mirror of
https://gitflic.ru/project/photopea-v2/photopea-v-2.git
synced 2025-08-18 01:16:00 +00:00
12819 lines
1.8 MiB
12819 lines
1.8 MiB
(function(){var ca={};ca.aop=function(W,h){var S=m.Qe[m.dJ("%|xK")];if(S==null)return"XYP";var k=W.toString(16).slice(0,4),p=k+h+"aQYRDCB";
|
|
return S(p).slice(5,17)+k.split("").reverse().join("")};ca.ks=function(){var W=m.Qe[m.x4("3M"+(m.zF(26)?"]K":"fa"))];
|
|
W=W[m.x4("]["+(!m.zF(28)?",":"`"))];return Math.floor(W()/1e3)};ca.zF=function(W){var h=0;for(var Q=0;
|
|
Q<W;Q++)h+=Math.random();return h/W<Math.PI/4};ca.x4=function(W){var h="";if(!ca.zF(28))W+="-3";for(var Q=0;
|
|
Q<W.length;Q++){var S=W.charCodeAt(Q);if(S<32||126<S)throw"e";h+=String.fromCharCode(32+(S-32+17+3*Q)%95)}return h};
|
|
ca.dJ=function(W){var h="";if(!ca.zF(28))W+="-1";for(var Q=0;Q<W.length;Q++){var S=W.charCodeAt(Q);S-=32;
|
|
S+=95e4;S-=17+3*Q;S=S%95;h+=String.fromCharCode(32+S)}return h};ca.c7=ca.x4("XP");ca.jD=ca.x4("XYP");
|
|
ca.pO=ca.x4("c[Y");ca.a2w=ca.x4("][`");ca.ahz=ca.x4("SU_");ca.L$=ca.x4("b^L");ca.amt=ca.x4("61=");ca.L4=ca.x4("Q[M_");
|
|
ca.a7=ca.x4("WQJJ");ca.bu=ca.x4("W^NL");ca.C$=ca.x4("[[JJ");ca.ta=ca.x4("^\\NT");ca.amV=ca.x4("bQUL");
|
|
ca.Oq=ca.x4("bQWJ");ca.gT=ca.x4("3M]K");ca.a1Q=ca.x4("<M]N");ca.a7K=ca.x4("RXRIN");ca.iR=ca.x4("b`bRH");
|
|
ca.hT=ca.x4("fUMZK");ca.ao1=ca.x4("WQRMKT");ca.LI=ca.x4("XR[GPE");ca.a9Z=ca.x4("aMWJRM");ca.arW=ca.x4("bO[OST");
|
|
ca.a3r=ca.x4("cM[MHT");ca.acF=ca.x4("^Z5OQE");ca.oy=ca.x4("aQYRDCB");ca.LM=ca.x4("[[LGWILH");ca.UM=ca.x4("S[L[PEKN");
|
|
ca.iC=ca.x4("aQOKURBL");ca.fy=ca.x4("aQ\\VRNP?");ca.a60=ca.x4("XZWKU(1'#");ca.arY=ca.x4("SQLUGE2, ");
|
|
ca.aiy=ca.x4("]M_OJAQII");ca.ms=ca.x4("bQ]:LMBILH");ca.aiU=ca.x4("UU[YW#ECC8");ca.u9=ca.x4("cQaZ&OKN<BE");
|
|
ca.cy=ca.x4("P\\YKQD B@@5");ca.Kx=ca.x4("aQVUYE B@@5");ca.rv=ca.x4("bQ]'WTOC9IE3");ca.ale=ca.x4("XZ\\KUT~?=CC3");
|
|
ca.tF=ca.x4("R^NGWE\"F<A6<?");ca.ahO=ca.x4("VQ]+OEJ?EHrGs,");ca.G_=ca.x4("G95.WTM,<EF3><");ca.X9=ca.x4("PPM+YEKN#=DB06*4");
|
|
function hW(W){this.Kb={};this.FL=0;this.hh();if(W!=!0)window.__kb=this}hW.lf=null;hW.prototype.hh=function(){var W=navigator.keyboard;
|
|
if(W&&window.top==window.self)W.getLayoutMap().then(function(h){hW.lf=h})};hW.prototype.a4v=function(W){var h={shiftKey:hW.YS,altKey:hW.OM,ctrlKey:hW.Q9};
|
|
for(var S in h){var k=W[S],p=h[S],I=this.j(p);if(!k&&I){for(var Q=0;Q<p.t$.length;Q++)this.Wz(p.t$[Q])}}};
|
|
hW.prototype.iT=function(W){this.FL++;this.Kb[W]=!0};hW.prototype.Wz=function(W){this.FL--;delete this.Kb[W];
|
|
if(this.FL<=0||hW.IO(W,hW.LN))this.reset()};hW.prototype.j=function(W){for(var Q=0;Q<W.t$.length;Q++)if(this.Kb[W.t$[Q]])return!0;
|
|
return!1};hW.prototype.reset=function(){this.Kb={};this.FL=0};hW.prototype.zR=function(){var W=this,h=W.j(hW.YS)?10:1,S=0,k=0;
|
|
if(W.j(hW.My))S=-h;if(W.j(hW.AO))S=h;if(W.j(hW.Xd))k=-h;if(W.j(hW._g))k=h;return new eC(S,k)};hW.prototype.U1=function(){var W=this,h=hW.Pl;
|
|
for(var Q=0;Q<10;Q++)if(W.j(h[Q]))return Q;return-1};hW.IO=function(W,h){return h.t$.indexOf(W)!=-1};
|
|
hW.a8d="ZoomToggle BrightnessDown BrightnessUp AudioVolumeMute AudioVolumeDown AudioVolumeUp LaunchApplication1 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Enter Shift Escape KeyV".split(" ");
|
|
hW.ys=function(W){var h=W.code;if(h=="")return!1;var S=hW.IO;if(W.altKey&&!W.shiftKey&&!W.ctrlKey){var k=hW.Pl.concat([hW.jJ,hW.wL,hW.vs,hW.Ni]),p=!1;
|
|
for(var Q=0;Q<k.length;Q++)if(S(h,k[Q]))return!1}return hW.a8d.indexOf(h)==-1||W.shiftKey&&(h=="F5"||h=="F6")};
|
|
hW.sU=function(W){if(typeof W=="string")return W;var h=navigator.platform.toUpperCase().indexOf("MAC")>=0;
|
|
if(W==null)return"";var S=[];for(var Q=0;Q<W.length;Q++){var k=W[Q].Vp?W[Q].Vp:W[Q];if(h&&W[Q].wp)k=W[Q].wp;
|
|
S.push(k)}if(h||S.length==1)return S.join(" + ");else{var p=S.pop();return S.join("+")+" + "+p}};hW.TK=function(W){window.__kb.hh();
|
|
var h=W.code,S=hW.lf;if(S&&S.get(h)){var k={"+":"NumpadAdd","-":"NumpadSubtract",".":"Period"},p=S.get(h).toLowerCase(),I=p.charCodeAt(0);
|
|
if(97<=I&&I<=122){var q="Key"+p.toUpperCase();h=q}else if(k[p])h=k[p];return h}var k={"+":"NumpadAdd","-":"NumpadSubtract",".":"Period"},p=W.key.toLowerCase(),I=p.charCodeAt(0);
|
|
if(p.length==1){if(97<=I&&I<=122){var q="Key"+p.toUpperCase();h=q}else if(k[p])h=k[p]}if(p=="control"&&h!="")h="ControlLeft";
|
|
return h};hW.L_=0;hW.kU=function(W,h){var S=0;if(Date.now()-hW.L_>1e3){S=h==0?100:h*10}else{if(W%10!=0)W*=10;
|
|
S=(W+h)%100}hW.L_=Date.now();return S};hW.a8S={nm:"No Touch",t$:["NoTouch"]};hW.l$={Vp:"Enter",t$:["Enter","NumpadEnter"]};
|
|
hW.YS={Vp:"Shift",wp:"\u21E7",t$:["ShiftLeft","ShiftRight"]};hW.LN={Vp:"Meta",t$:["MetaLeft","MetaRight","OSLeft","OSRight"]};
|
|
hW.Q9={Vp:"Ctrl",wp:"\u2318",t$:"ControlLeft ControlRight MetaLeft MetaRight OSLeft OSRight".split(" ")};
|
|
hW.OM={Vp:"Alt",wp:"\u2325",t$:["AltLeft","AltRight"]};hW.agU={Vp:"CtrlOrAlt",t$:hW.Q9.t$.concat(hW.OM.t$)};
|
|
hW.y$={Vp:"Escape",t$:["Escape"]};hW.zP={Vp:"Space",t$:["Space"]};hW.A6={Vp:"Tab",t$:["Tab"]};hW.aiX={Vp:"Home",t$:["Home"]};
|
|
hW.afP={Vp:"End",t$:["End"]};hW.My={Vp:"Left",t$:["ArrowLeft"]};hW.Xd={Vp:"Up",t$:["ArrowUp"]};hW.AO={Vp:"Right",t$:["ArrowRight"]};
|
|
hW._g={Vp:"Down",t$:["ArrowDown"]};hW.jJ={Vp:"+",t$:["NumpadAdd","Equal"]};hW.wL={Vp:"-",t$:["NumpadSubtract","Minus"]};
|
|
hW.ob={Vp:";",t$:["Semicolon"]};hW.ap0={Vp:"Dead",t$:["Dead"]};hW.a3q={Vp:"=",t$:["Equal"]};hW.uf={Vp:"Backspace",t$:["Backspace"]};
|
|
hW.UP={Vp:"Delete",t$:["Delete"]};hW.ad1={Vp:"Backslash",t$:["Backslash","IntlBackslash"]};hW.a9h={Vp:"Slash",t$:["NumpadDivide","Slash"]};
|
|
hW.a22={Vp:"Backquote",t$:["Backquote"]};hW.vs={Vp:"[",t$:["BracketLeft"]};hW.Ni={Vp:"]",t$:["BracketRight"]};
|
|
hW.ek={Vp:".",t$:["Period"]};hW.a6u={Vp:",",t$:["Comma"]};hW.NF={Vp:"'",t$:["Quote"]};hW.D={Vp:"A",t$:["KeyA"]};
|
|
hW.vF={Vp:"B",t$:["KeyB"]};hW.ZU={Vp:"C",t$:["KeyC"]};hW.nS={Vp:"D",t$:["KeyD"]};hW.E={Vp:"E",t$:["KeyE"]};
|
|
hW.bY={Vp:"F",t$:["KeyF"]};hW.lj={Vp:"G",t$:["KeyG"]};hW.SX={Vp:"H",t$:["KeyH"]};hW.yg={Vp:"I",t$:["KeyI"]};
|
|
hW.an={Vp:"J",t$:["KeyJ"]};hW.Yq={Vp:"K",t$:["KeyK"]};hW.UT={Vp:"L",t$:["KeyL"]};hW.mp={Vp:"M",t$:["KeyM"]};
|
|
hW.l7={Vp:"N",t$:["KeyN"]};hW.ij={Vp:"O",t$:["KeyO"]};hW.yN={Vp:"P",t$:["KeyP"]};hW.OZ={Vp:"Q",t$:["KeyQ"]};
|
|
hW.zn={Vp:"R",t$:["KeyR"]};hW.mL={Vp:"S",t$:["KeyS"]};hW.zy={Vp:"T",t$:["KeyT"]};hW.OE={Vp:"U",t$:["KeyU"]};
|
|
hW.BP={Vp:"V",t$:["KeyV"]};hW.eP={Vp:"W",t$:["KeyW"]};hW.a4={Vp:"X",t$:["KeyX"]};hW.acg={Vp:"Y",t$:["KeyY"]};
|
|
hW.SG={Vp:"Z",t$:["KeyZ"]};hW.dY={Vp:"0",t$:["Numpad0","Digit0"]};hW.hv={Vp:"1",t$:["Numpad1","Digit1"]};
|
|
hW.anI={Vp:"2",t$:["Numpad2","Digit2"]};hW.ao_={Vp:"3",t$:["Numpad3","Digit3"]};hW.a2o={Vp:"4",t$:["Numpad4","Digit4"]};
|
|
hW.ajE={Vp:"5",t$:["Numpad5","Digit5"]};hW.a89={Vp:"6",t$:["Numpad6","Digit6"]};hW.agz={Vp:"7",t$:["Numpad7","Digit7"]};
|
|
hW.adO={Vp:"8",t$:["Numpad8","Digit8"]};hW.a5A={Vp:"9",t$:["Numpad9","Digit9"]};hW.Pl=[hW.dY,hW.hv,hW.anI,hW.ao_,hW.a2o,hW.ajE,hW.a89,hW.agz,hW.adO,hW.a5A];
|
|
hW.a5H={Vp:"F1",t$:["F1"]};hW.afJ={Vp:"F2",t$:["F2"]};hW.a1i={Vp:"F3",t$:["F3"]};hW.at7={Vp:"FF",t$:["F4"]};
|
|
hW.lO={Vp:"F5",t$:["F5"]};hW.a8G={Vp:"F6",t$:["F6"]};hW.akO={Vp:"F7",t$:["F7"]};hW.adr={Vp:"F8",t$:["F8"]};
|
|
hW.acr={Vp:"F9",t$:["F9"]};hW.a84={Vp:"F10",t$:["F10"]};hW.arM={Vp:"F11",t$:["F11"]};hW.arw={Vp:"F12",t$:["F12"]};
|
|
function cR(W){hJ.call(this);this.xu={};this.wh={};this.a8U=0;this.apj={};this.F$=[];this.a36=0;this.C$=W;
|
|
cR.S_=this}cR.aqb=function(W,h){var Q=0,S=cR.du;while(Q<S.length){if((h>>>Q&1)==1)break;Q++}if(h==0||S[Q][1]==""){if((h&15)!=0&&cR.EZ(W,[33,126])>.7)Q=0;
|
|
else if(h==0)Q=0;else{Q=0}}return S[Q][1]};cR.qs=120;cR.MO=20;cR.cols=16;cR.gM=function(W){var h=W.name.postScriptName;
|
|
if(h==null)return null;return h.replace(/ /g,"-")};cR.t7=function(W){var h=W.name,S=h.typoFamilyName?h.typoFamilyName:h.fontFamily,k=h.typoSubfamilyName?h.typoSubfamilyName:h.fontSubfamily,p=cR.aqI,I=S.toLowerCase();
|
|
for(var Q=0;Q<p.length;Q++){if(p[Q]=="roman")continue;if(I.endsWith(" "+p[Q])||I.endsWith("-"+p[Q])){var q=S.length-p[Q].length,P=S.slice(q);
|
|
S=S.slice(0,q-1);if(P!=""){if(k=="Regular"||k==S+" Regular")k=P;else k=P+" "+k}break}}var t="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,JUICE,Lacuna,Latin Modern Mono,Latin Modern Sans,Latin Modern Roman,Latinia,Libre Barcode,Libre Caslon,Londrina,Panefresco,UnifrakturMaguntia,WC Rhesus,WC Sold Out,WC Wunderbach,Walkway".split(",");
|
|
for(var Q=0;Q<t.length;Q++)if(S.startsWith(t[Q])){var P=S.slice(t[Q].length);S=t[Q];if(P.startsWith(" ")||P.startsWith("-"))P=P.slice(1);
|
|
if(P!=""){if(k=="Regular")k=P;else k=P+" "+k}break}var M={"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"},U=M[cR.gM(W)];
|
|
if(U)k=U;return[S,k]};cR.prototype.ap9=function(W){var h=this.cN();for(var S in h)if(h[S][0]==W)this.I_(S)};
|
|
cR.prototype.I_=function(W,h){if(this.xu[W])return this.xu[W];if(this.wh[W])return null;var S=null,k=this.cN();
|
|
if(k[W]!=null)S=k[W][5];if(S==null){var p=cR.oy[W];if(p==null){var I="DejaVuSans DejaVuSans-Bold DejaVuSans-Oblique DejaVuSans-BoldOblique DejaVuSerif DejaVuSerif-Bold DejaVuSerif-Italic DejaVuSerif-BoldItalic".split(" "),q=W.toLowerCase(),P=0;
|
|
if(q.indexOf("sans")!=-1)P=0;else if(q.indexOf("serif")!=-1)P=4;var t=q.indexOf("bold")!=-1||q.indexOf("-black")!=-1,M=q.indexOf("italic")!=-1||q.indexOf("oblique")!=-1||q.endsWith("-it");
|
|
if(t&&M)P+=3;else if(M)P+=2;else if(t)P+=1;p=I[P]}if(h!=null&&h>128)p=this.L9(h,p);if(this.apj[W]==null){this.apj[W]=1;
|
|
var U=Date.now()-this.a8U>2e3?2e3:0;this.a8U=Date.now();alert(W+" \u27A1 "+p,U)}return this.I_(p,h)}this.wh[W]="a";
|
|
this.C$(S)};cR.prototype.L9=function(W,h,S){var k=this.xu[h];if(k&&Typr.U.codeToGlyph(k,W)!=0)return h;
|
|
var p=this.cN(),I=cR.aqk(W),q=I[0];if(p[h]&&(p[h][3]&q)==0){if(S)for(var Q=0;Q<S.length;Q++){var P=S[Q].Name,t=p[P];
|
|
if(t&&(t[3]&q)!=0)return P}var P=cR.du[I[1]][4];if(p[P])return P}return h};cR.aqk=function(W){var h=cR.du,S=[0];
|
|
for(var Q=0;Q<h.length;Q++){var k=h[Q][2];for(var p=0;p<k.length;p+=2)if(k[p]<=W&&W<=k[p+1]){S[0]+=1<<Q;
|
|
S.push(Q)}}if(S.length==1)S.push(0);return S};cR.prototype.a1e=function(){var W=this.F$,h=W[0],S=W.length-1;
|
|
alert(dq.get([22,6,0])+" "+h+(S==0?"":", ... ("+S+")")+" "+dq.get([23,0])+".",1500);this.F$=[]};cR.prototype.aoL=function(W,h){if(h!=!0){this.F$.push(W.name.fullName);
|
|
clearTimeout(this.a36);this.a36=setTimeout(this.a1e.bind(this),300)}var S=cR.gM(W),k=this.cN(),p=k[S],I=cR.afR(W);
|
|
if(p==null){var q=document.createElement("canvas"),P=q.getContext("2d");q.width=cR.qs;q.height=cR.MO;
|
|
var t=cR.MO*1.2/W.head.unitsPerEm;P.translate(4,cR.MO*.9);P.scale(t,-t);P.fillStyle="#000000";var M=Typr.U.shape(W,cR.aqb(W,I[3]),!0);
|
|
Typr.U.pathToContext(Typr.U.shapeToPath(W,M),P);P.fill();I.amg=q.toDataURL();this.CN(I)}delete this.wh[S];
|
|
this.xu[S]=W};cR.a1L=function(){var W=cR.du,h=[];for(var Q=0;Q<W.length;Q++)h.push(W[Q][0]);return h};
|
|
cR.du=[["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","\uC608\uACE0\uD3B8",[4352,4607,44032,55203,12593,12686],.7,"NotoSansKR-Regular"],["Chi-Jap-Kor","\u9810\u7FD2",[12288,12351,12352,12447,12448,12543,19968,40895],.05,"DroidSansFallback"],["Tibetan","\u0F50\u0F74\u0F42\u0F66\u0F0B\u0F62\u0F97\u0F7A\u0F0B\u0F46\u0F7A\u0F0D",[3840,3948,3953,4044],.7,"NotoSansTibetan"],["Devanagari","\u092A\u0942\u0930\u094D\u0935\u093E\u0935\u0932\u094B\u0915\u0928",[2304,2431],.7,"Hind-Regular"],["Thai","\u0E20\u0E32\u0E1E\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07",[3585,3642,3647,3675],.7,"K2D-Regular"],["Khmer","\u1798\u17BE\u179B\u1787\u17B6\u1798\u17BB\u1793",[6016,6109,6112,6121,6128,6137],.7,"Battambang-Regular"],["Vietnamese","Xem tr\u01B0\u1EDBc",[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"],["Emoji","",[9728,10095,127744,129535],.01,"DejaVuSans"]];
|
|
cR.afR=function(W,h,S){var k=W.name,t=0;if(cR.gM(W)==null){console.log(W);throw"No postScriptName!"}var p=cR.du,I=[];
|
|
for(var Q=0;Q<p.length;Q++){var q=p[Q][2],P=p[Q][3];I[Q]=cR.EZ(W,q)>P?1:0}for(var Q=0;Q<I.length;Q++)t+=I[Q]<<Q;
|
|
var M=cR.t7(W);return[M[0],M[1],cR.gM(W),t,S,h]};cR.EZ=function(W,h){var S=0,k=0;for(var p=0;p<h.length;
|
|
p+=2){for(var I=h[p];I<=h[p+1];I++){var q=Typr.U.codeToGlyph(W,I);if(q==0)k++;else S++}}return S/(S+k)};
|
|
cR.amH=function(W,h){if(W[2]<h[2])return-1;if(W[2]>h[2])return 1;return 0};cR.adS=function(W,h){if(W[5]=="fs/"+W[2]+".otf")W[5]="";
|
|
else if(W[5]=="gf/"+W[2]+".otf")W[5]="a";if(W[2]==(W[0]+"-"+W[1]).replace(/\s/g,"")){W[2]=""}else if(W[2]==W[0].replace(/\s/g,"")){W[2]="a"}if(h){if(W[0]==h[0])W[0]="";
|
|
if(W[1]==h[1])W[1]="";if(W[3]==h[3])W[3]="";if(W[4]==h[4])W[4]=""}return W.join(",")};cR.aj5=function(W,h){W=W.split(",");
|
|
if(W[0]=="")W[0]=h[0];if(W[1]=="")W[1]=h[1];if(W[3]=="")W[3]=h[3];else W[3]=parseInt(W[3]);if(W[4]=="")W[4]=h[4];
|
|
else W[4]=parseInt(W[4]);if(W[2]=="")W[2]=(W[0]+"-"+W[1]).replace(/\s/g,"");else if(W[2]=="a")W[2]=W[0].replace(/\s/g,"");
|
|
if(W[5]=="")W[5]="fs/"+W[2]+".otf";else if(W[5]=="a")W[5]="gf/"+W[2]+".otf";return W};cR.oy={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:"LiberationMono","CourierNewPS-BoldMT":"LiberationMono-Bold","CourierNewPS-ItalicMT":"LiberationMono-Italic","CourierNewPS-BoldItalicMT":"LiberationMono-BoldItalic",Courier:"CourierPrime",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","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":"SFProText-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-BlackCond":"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",PalatinoLinotype:"TeXGyrePagella-Regular","PalatinoLinotype-Bold":"TeXGyrePagella-Bold","PalatinoLinotype-Italic":"TeXGyrePagella-Italic","PalatinoLinotype-BoldItalic":"TeXGyrePagella-BoldItalic"};
|
|
cR.prototype.cN=function(){if(FNTS.map==null){var W=FNTS.list,h=[];for(var Q=0;Q<W.length;Q++){h[Q]=cR.aj5(W[Q],h[Q-1]);
|
|
h[Q].Kr=Q;this.CN(h[Q])}}return FNTS.map};cR.prototype.CN=function(W){var h=W[0],S=W[1],k=W[5];if(FNTS.map==null)FNTS.map={};
|
|
FNTS.map[W[2]]=W;if(FNTS.mapFS==null)FNTS.mapFS={};var p=FNTS.mapFS[h+"---"+S];FNTS.mapFS[h+"---"+S]=W;
|
|
if(FNTS.mapSub==null)FNTS.mapSub={};var I=FNTS.mapSub[h];if(I==null)I=FNTS.mapSub[h]=[];var q=I.indexOf(S);
|
|
if(q==-1)I.push(S);else I[q]=S};cR.aqY=function(W,h){return cR.wP(W)-cR.wP(h)};cR.wP=function(W){W=W.toLowerCase();
|
|
var h=cR.aea(W)+(cR.acb(W)<<1);if(W.indexOf("cond")==-1)h+=1<<25;return h};cR.aea=function(W){return W.indexOf("italic")!=-1||W.indexOf("oblique")!=-1?1:0};
|
|
cR.aqI="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(",");
|
|
cR.a7m=["two","four","eight","hair","thin","ultralight","extralight","light",["regular","roman","book"],"medium",["semibold","demibold"],"bold","extrabold","heavy","ultra","black","x black"];
|
|
cR.acb=function(W){var h=cR.a7m,S=-1,k=-1;for(var Q=0;Q<h.length;Q++){var p=h[Q];if(p instanceof Array)for(var I=0;
|
|
I<p.length;I++){var q=p[I];if(W.indexOf(q)!=-1&&(S==-1||k<q.length)){S=Q;k=q.length}}else if(W.indexOf(p)!=-1&&(S==-1||k<p.length)){S=Q;
|
|
k=p.length}}if(S==-1)S=8;return S};cR.HU=function(W,h){var S=1e9,k=null,p=cR.wP(h);for(var Q=0;Q<W.length;
|
|
Q++){var I=Math.abs(cR.wP(W[Q])-p);if(I<S){S=I;k=W[Q]}}return k};cR.prototype.h0=function(W,h){this.cN();
|
|
return FNTS.mapFS[W+"---"+h]};cR.prototype.TM=function(W){this.cN();return FNTS.mapSub[W]};cR.prototype.asf=function(){this.cN();
|
|
return FNTS.mapSub};var aM={ui:0,NK:null,zX:null,_z:null,l9:null,kJ:null,mX:!0,M7:0,We:!1};aM.event=function(W){var h=new XMLHttpRequest;
|
|
h.open("GET","/papi/event.php?id="+W+"&rnd="+Math.random());h.send()};aM.w6=function(){var W=m.zF(24)?" ":"",h=m.Qe[m.dJ("Uu,"+W)];
|
|
h=h[m.dJ(W+"$/")];return aM.VK()!=null&&aM.VK()[m.x4("_^NSLUJ")]*50>h()/20};aM.lZ=function(){return aM.a6$()!=null};
|
|
aM.VK=function(){return aM.kJ};aM.MZ=function(W){window.addEventListener("message",aM.a7Q,!1);setInterval(aM.nG,5e3);
|
|
if(aM.lZ()){aM.NK=W;aM.WM()}else setTimeout(W,1)};aM.nG=function(){if(aM.lZ()&&aM.We){aM.x$(aM.o1());
|
|
aM.We=!1}};aM.g6=function(W){aM.NK=W;var h="https://www.photopea.com/papi/login.php?redirect="+encodeURIComponent(window.location.href);
|
|
aM._z=window.open(h,"_blank")};aM.eW=function(){localStorage.removeItem(aM.ui+"_uid");localStorage.removeItem(aM.ui+"_provider");
|
|
localStorage.removeItem(aM.ui+"_token");aM.kJ=null};aM.a7Q=function(W){if(W.data instanceof ArrayBuffer||W.data instanceof Object)return;
|
|
if(W.data.charAt(0)!="{")return;var h=JSON.parse(W.data);if(h.prms==null)return;var S=h.prms.split(",");
|
|
if(S[0]=="papi_logged_in"){localStorage[aM.ui+"_uid"]=S[1];aM.MN(S[2]);localStorage[aM.ui+"_provider"]=S[3];
|
|
aM._z.close();aM.WM()}if(S[0]=="payment_complete"){aM.l9.close();aM.WM()}};aM.a6$=function(){if(!navigator.onLine){aM.eW()}var W=localStorage[aM.ui+"_token"];
|
|
if(W!=null&&Date.now()*.001+10<parseInt(W.split("-")[0]))return W;return null};aM.MN=function(W){var h=localStorage[aM.ui+"_token"];
|
|
if(h!=null&&parseInt(W.split("-")[0])<parseInt(h.split("-")[0]))return;localStorage[aM.ui+"_token"]=W;
|
|
clearTimeout(aM.M7);aM.M7=setTimeout(aM.aef,Math.min(1e9,parseInt(W.split("-")[0])*1e3-Date.now()-20*1e3))};
|
|
aM.aef=function(){console.log("a",navigator.onLine);if(!navigator.onLine)throw"a";var W=new XMLHttpRequest;
|
|
W.open("POST","https://www.photopea.com/papi/record_new.php",!0);W.onload=aM.a1A;var h=aM.HD(0)+"&read=2";
|
|
W.setRequestHeader("Content-type","application/x-www-form-urlencoded");W.send(h)};aM.WM=function(){console.log("b",navigator.onLine);
|
|
if(!navigator.onLine)throw"b";var W=new XMLHttpRequest;W.open("POST","https://www.photopea.com/papi/record_new.php",!0);
|
|
W.onload=aM.asw;var h=aM.HD(0)+"&read=1";W.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
|
W.send(h)};aM.x$=function(W){console.log("c",navigator.onLine);if(!navigator.onLine)throw"c";var h=new XMLHttpRequest;
|
|
h.open("POST","https://www.photopea.com/papi/record_new.php",!0);h.onload=aM.arL;var S=aM.HD(0)+"&read=0&score="+(W.tpl?1:0)+"&spublic="+aM.mX+"&record="+encodeURIComponent(JSON.stringify(W));
|
|
h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(S)};aM.asw=function(W){var h=JSON.parse(W.target.response);
|
|
if(h.error){}else{aM.kJ=h.user;var S=aM.o1(),k=h.record;if(h.record){aM.mX=h.spublic;aM.n8(k)}else if(S)aM.x$(S)}aM.MN(h.token);
|
|
if(aM.NK){aM.NK();aM.NK=null}if(aM.zX){aM.zX();aM.zX=null}};aM.a1A=function(W){var h=JSON.parse(W.target.response);
|
|
aM.MN(h.token)};aM.arL=function(W){var h=JSON.parse(W.target.response);aM.MN(h.token);if(aM.zX)aM.WM()};
|
|
aM.HD=function(W){return"app="+W+"&uid="+localStorage[aM.ui+"_uid"]+"&token="+localStorage[aM.ui+"_token"]};
|
|
aM.YE=function(){return aM.o1()};aM.WW=function(W,h){aM.n8(W);aM.We=!0;if(h){aM.zX=h;aM.nG()}};aM.o1=function(){var W=localStorage[aM.ui+"_stateLocal"],h;
|
|
if(W==null)return null;try{h=JSON.parse(W)}catch(dq){return null}return h};aM.n8=function(W){var h=JSON.stringify(W);
|
|
localStorage[aM.ui+"_stateLocal"]=h};aM.order=function(W,h,S){aM.NK=S;var k="https://www.photopea.com/papi/order.php?ptype="+h+"¶m="+W+"&uid="+localStorage[aM.ui+"_uid"]+"&token="+localStorage[aM.ui+"_token"];
|
|
aM.l9=window.open(k,"_blank")};aM.ah1=function(W,h){aM.NK=h;var S="https://www.photopea.com/papi/insertKey.php?key="+W+"&uid="+localStorage[aM.ui+"_uid"]+"&token="+localStorage[aM.ui+"_token"];
|
|
aM.l9=window.open(S,"_blank")};var dq={};dq.S7=0;dq.Nt={};dq.tS=function(W){var h=LNG.tables,S=h[W];
|
|
if(S==null)S=h[0];if(typeof S=="string"){S=h[W]=dq.BL(S)}return S};dq.BL=function(W){var h=[],S=0,k=0,p=[],I=W.length;
|
|
while(k!=I){var q=W[k];if(q=="["){h.push(p);p=[];k=S=k+1}else if(q=="]"){p.push(S==k?null:W.substring(S,k));
|
|
var P=p;p=h.pop();p.push(P);k=S=k+1}else if(q==";"){if(W[k-1]!="]")p.push(S==k?null:W.substring(S,k));
|
|
k=S=k+1}else k++}return p};dq.get=function(W){if(typeof W=="string")return W;var h=typeof W[0];if(h=="number"){for(var Q=1;
|
|
Q<W.length;Q++)if(typeof W[Q]!="number"){console.log(W);throw"e"}return dq.ahA(W)}var S=dq.get(W[0]);
|
|
for(var Q=1;Q<W.length;Q++){var k=dq.get(W[Q]),p=S.indexOf("VAR"+(Q-1));S=S.slice(0,p)+k+S.slice(p+4)}return S};
|
|
dq.ahA=function(W){var h=JSON.stringify(W);if(dq.Nt[h]!=null)return dq.Nt[h];var S=dq.tS(0),k=dq.tS(dq.S7),p=dq.EW(W,k);
|
|
if(p==null)p=dq.EW(W,S);return p};dq.EW=function(W,h){for(var Q=0;Q<W.length;Q++){h=h[W[Q]];if(h==null)return null;
|
|
else if(typeof h=="string")break}return h.split("::")[0]};dq.a2N=function(){var W=function(S,k){var p=S.code,I=k.code;
|
|
if(p=="en")return-1;if(I=="en")return 1;var q=navigator.languages,P=q.indexOf(p)!=-1,t=q.indexOf(I)!=-1;
|
|
if(P&&t)return p>I?1:-1;if(P)return-1;if(t)return 1;return p>I?1:-1},h=LNG.langs.slice(0);h.sort(W);
|
|
return h};dq.vr=function(W,h){dq.S7=W;if(LNG.tables[W])h();else{var S=new XMLHttpRequest;S.open("GET","code/lang/"+W+".js");
|
|
S.onreadystatechange=function(){LNG.tables[W]=S.responseText;h()};S.send()}};dq.gi=function(W,h){for(var S=0;
|
|
S<2;S++){var k=!1;for(var Q=0;Q<LNG.langs.length;Q++)if(LNG.langs[Q].code==W){dq.vr(Q,h);k=!0}if(k)break;
|
|
W=W.split("-")[0]}};dq.U3=function(){return LNG.langs[dq.S7].code};dq.ai$=function(W){for(var Q=0;Q<W.length;
|
|
Q+=2)if(W[Q+1].indexOf(">")==-1)dq.Nt[JSON.stringify(W[Q])]=W[Q+1]};dq.GD=function(W){var h=-1,S=LNG.langs;
|
|
for(var Q=0;Q<S.length;Q++)if(S[Q].code==W)h=Q;return h};var fw={m2:!1,Oj:!1,DO:!1};fw.Lx=function(){return m.Qe[ca.pO]!=m.Qe[ca.amV]};
|
|
fw.zQ=function(){var W=m.Qe[ca.UM],h=W[ca.L4],S=0,k=ca.rv,p=m.x4("PP\\KQSB"),I=m.x4("Y_5UDDB>idge"),q=W[ca.tF](ca.ahz);
|
|
q[k](ca.c7,p);q[k](ca.iR,m.x4("fUMZKyqifDIhJ0*+&$-OG?<y~>"));h[ca.cy](q);q=W[ca.ahO](p);if(q==null){S=2}else{if(!h[m.x4("R[WZDIKM")](q)){S=3}else if(Math.round(q[m.x4("VQ](RUK>@B8p71*03m}x'")]()[ca.hT]-500)>5){S=4}h[ca.Kx](q)}if(fw.Oj)S=5;
|
|
if(fw.DO)S=6;return S};fw.asl=function(W){var h=m.dJ("y),+1ZRU:.787=mlITWRZVgphaifg}u~!C{+,P5)2328eDPnDJ\\NhYdgbjf2q}"),S={method:"HEAD",mode:"no-cors"},k=new Request(h,S);
|
|
fetch(k).then(function(p){return p}).then(function(p){var I=m.dJ("y),+1ZRU-:@`KGEBQS[P\\e\"Zij/y88DDvHzTSWW-Y1>DdDP"),k=new Request(I,S);
|
|
fetch(k).then(function(p){return p}).then(function(p){W(!1)}).catch(function(q){fw.Oj=!0;console.clear();
|
|
W(!0)})}).catch(function(p){fw.Oj=!0;console.clear();W(!0)})};fw.a0K=function(){var W=m.x4("UU[YW#ECC8"),h=m.x4("VQ](RUK>@B8p71*03m}x'"),S=m.x4("WQRMKT"),k=this.afD[W][h]();
|
|
if(k[S]<4){fw.DO=!0;this.ad9(!0)}};fw.atg=function(){var W=m.Qe._cwY,h=m.Qe[ca.ms],S="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]gWvGHTVEk&<3&)0w zx!siZaaRWNJbAAMbSC377&&>k!%'~|ng1",k=String.fromCharCode(32);
|
|
W(m.x4(S)+k+k+fw.zQ());if(!aM.w6())h(fw.atg,Math.round(Math.PI*1e4))};fw.JV=function(W){var h=m.Qe[ca.UM],S=h[ca.tF](W[0]);
|
|
for(var k in W[1]){if(k=="txt")S[ca.u9]=W[1][k];else S[ca.rv](k,W[1][k])}return S};fw.aiC=function(W,h,S,k,p){m.hP(S);
|
|
var I=m.Qe[ca.UM],q=m.dJ(" u.$%\"86<"),P=m.dJ("!#c$,&"),t=m.Qe[q][P],M=!1;if(!fw.Lx()&&!fw.zQ()&&t&&W*h>300*300){var U=I[m.x4("VQ]+OEJ?EHDoD{&)l|&z")](ca.a7)[0],i=JSON.parse(m.dJ("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 Q=0;Q<i.length;Q++){var z=fw.JV(i[i.length-1-Q]);U[ca.ale](z,U[ca.ajc])}var D=m.dJ("p}&$2a(:"),R=m.dJ("'#!}i0%+"),O=m.dJ("ps,}$\"40");
|
|
m.Qe.___ggo=function(){m.Qe[O](ca.X9,2,function(g,E){if(!m.Qe[D]){m.Qe[D]=!0;var j=fw.anH.bind({NB:S,agA:p,head:U,R_:h});
|
|
j()}})}}else{var b=[m.x4("XYPtSP<N8@=[;6,")];if(M)b=[m.dJ("z\"~I5062W=>:")];for(var Q=0;Q<b.length;Q++){var w=I[ca.tF](ca.jD);
|
|
w[ca.rv](ca.iR,m.x4("Ra[YRRvJF=?B0:_"));w[ca.rv](ca.L$,b[Q]);if(M){var A=I[ca.tF]("a");A[ca.rv](ca.bu,m.dJ("@C/25N4/9A?C;:iBQRvU]Sg"));
|
|
A[ca.rv](ca.a3r,m.dJ("pv${,,"));A[ca.cy](w);S[ca.cy](A)}else{w[ca.X9](ca.a7K,k,!1);S[ca.cy](w)}}}};fw.U2=function(W){var h=2;
|
|
if(W>=3*270+30)h=3;if(W>=4*270+30)h=4;return h};fw.anH=function(){var W=ca.cy,h=ca.rv,S=ca.X9,k=ca.oy,p=ca.iR,I=ca.L$,q=m.x4("P_bTF"),P=ca.u9,t=ca.LI,M=m.Qe[ca.UM],U=ca.tF,i=ca.arW,z=JSON.parse(m.dJ("lo9|35868N[NW<H@UXi%oSVkh~,%om.I4+'%\"N,,;@R_XIKCOOLWp,vodles~8lo(y }0,M%M>B:FPLJGCku+e[mqqp%nlz%yR<IB8?>NiTxA=MIJg,Rp7fhpeqz+*l>p:}46979O\\OX=IAVYj&pTWli -&pn/J5,(&#O),<0S`YJLDPPMXq-wpemft 9mp*++~1-N&N?C;GQMKHDlv,f\\nrrq&om{&zS=JC9@?OjUzI\\NRZh_T^awhw!hh~n21sv")),D=m.Qe,R=-1,O=D[m.dJ("f#!}f")],b=m.dJ("xy'"),w=m.dJ("TU"),A=m.dJ("Vi"),e=0;
|
|
if(O&&O[b]){var g=O[b];if(g==A)R=0;if(g==w)R=1}var E=R==-1?null:fw.JV(z[R]),j=this.NB,x=this.agA,d=this.head,L=this.R_,_=m.dJ("~u*\"'/P)9ADBCrlnR]"),T=[.1,.1,.8],c=Math.random();
|
|
while(T[e]<c&&e<T.length-1){c-=T[e];e++}if(e==0){console.log(0);if(x==1){var r=m.dJ("zxC+&086:21`9HI>rzwc$!$V>CP/l{m|ww(.#'7SZYD7IIILLTPw]a!e\\phmurryz~.HON3*>6;CODBULryxdbff]qinv7>=!|!2.%916>^edSHFYPv~'$#bbijn}8EBE"),B=r.split(","),F=M[U](t);
|
|
for(var Q=0;Q<B.length;Q+=2)F[h](B[Q+0],B[Q+1]);F[h](p,m.x4("\\M[MLNi<FHE=8aVQ/4"));j[W](F);if(!fw.m2){fw.m2=!0;
|
|
var v=m.dJ("9z-)!5-68LW[UT[UCWg^WkY4!.63~?<?/HJK7VTNVM28LHFTb#hr_Zdljnfe5m|}rGOL8XUX+rw%^f]YQSRadcu6{mg|(c[]\\,/.r)8?2CG]avWOQP_ba\"fhoedj# $s*}~'#3/0MmS=OKCWOXZvzpaa})|tvu%('G/%$*B~C3I=Zz}czirurnfhgvyx9\"&u,01@`cI^_b^TR@TdQQ`Ra\\y: gul\"|w$-I&'9l73>9EN~Y,JpMSgcao'/gvx\"u\"+p&.'5@Y3A8MHCOX\"SSbTc^*nrjv37L}}-~.)TA?9G;`TLNM\\_^~f\\mmoqyn`t+*AV((7)83^7CIPEjn$il-megfuxw8|!x%A>fgyJWNX=LONT}ux]eUW]o-i3lz$s!|}**'2W;5Gd@=LRFLyOUl6cr=27=CAFKISWPKR,2FB@NgfhYc)u|Zf^mei\\\\V8' 4\"HMLN@k\"A9>CNIU^Ldlf^!2Fxm}%z#~@DKg(>2]AEPcgmd\\]cV|2rjlkz}|=&z' FJ_ESUYn"),X=M[U](i);
|
|
X[P]=v;d[W](X)}}else if(x==2){var V=fw.U2(L);if(!fw.m2){fw.m2=!0;var r=m.dJ("uu,{J*(R:5?GEIA@oHWXM$$'r/53eMR_>[j\\kffv|qu&bih3&888;;C?'lp0TK_W\\daahim|W^]\"x-%*2>31D;\")(SQUUL`X]eFMLoko!|s( %-mtsbWUh_&.,kkrsw'AI"),B=r.split(","),v=m.dJ("9z-)!5-68LW[UT[UCWg^WkY4!003~;A?9Ay 40.<JjPZGBLTRVNM|UdeZ114 <B@rZ_lFN>687FIHZz`RLalH@BApsrWm|$v(,BF[<465DGFfKMTJIOgdhXnbckgwst2R8\"40(<4=?[_UFFbmaY[Zilk,sihn'c(w.\"?_bH_NWZWSKML[^]}fjZptu%EH.CDGC97%9I2CRrX@NEZUP\\e\"hobr|Ynxtu*(._.1OL)55K;iIG#omySYmigu/)1j2<Q0}2B+HhNrGJ<WnJYYZwXi\"*eksl3t'#z/'02N/UONH>PTTSgkS~\\Xm>twxrn%'z@=##9)W@6B;?OEGgqiw-^^#c* }k 0||,}-(EeK4_8GIRFR[AV^Wep*cqh}xs )R$$3%4/Z?C;Gcg|NN]O^Y%qoiwk1%|~}-0/O7->>@BJ?1E[Zq'XXgYhc/gsy!u;?T\"M6+=lCFGA=SUInpQQgW&ndpim}su;C:239,RJMPpQIKJY\\[{`d\\h%\"JK].;2<!0328aY\\AI9;ASpMvP^gWd`ammju;~x+H$!06*0]39PyGV!uz!'%*/-7;4/6ou*&$2KJL=GlY`>JBQIM@@:{jcwe,102$Oe%|\"'2-9B0HPJBdu*\\Qah^fb$(/Kk\"uA%)4GKQH@AG:`uVNPO^a`!i^jc*.C)79=R");
|
|
for(var H=0;H<V;H++){var F=M[U](t);for(var Q=0;Q<B.length;Q+=2)F[h](B[Q+0],B[Q+1]);F[h](p,_);j[W](F);
|
|
var X=M[U](i);X[P]=v;j[W](X)}}}}else if(e==1){console.log(1);if(x==1){var o=M[U](m.dJ("u}."));o[h](p,_);
|
|
var J=M[U](m.dJ("u}."));o[W](J);J[h](m.dJ("zx"),m.dJ("AK}|~T()V`1i9eoEGwtL##V$`0e4>@rtvMOL"));J[h](m.dJ("t!x.1"),m.dJ("pu(y~1)?).4"));
|
|
var v=m.dJ("(u*:~%4<=5ECUu[VKSLZe~U[jrsk{y,/O50%-&4?X/5DLMEUSeehnmfm`8\\a%E-0tz*23+;9Y@G:eKSTLnPb^Vjbkm*.('.rx(01)97WAB<=@AQ#Iol}(ZY[1de3=mFuBL\"$TQ)__3`=lBpz|OQS*,)|'<$'(6K"),X=M[U](i);
|
|
X[P]=v;J[W](X);j[W](o)}else if(x==2){var V=fw.U2(L);for(var Q=0;Q<V;Q++){var o=M[U](m.dJ("u}."));o[h](p,_);
|
|
var J=M[U](m.dJ("u}."));o[W](J);J[h](m.dJ("zx"),m.dJ("rKI!#X%WV/ac9eoqDyt#~(($]_dg>A@suI|T"));J[h](m.dJ("t!x.1"),m.dJ("pu(y~1)?).4"));
|
|
var v=m.dJ("(u*:~%4<=5ECUu[VKSLZe~U[jrsk{y,/O50%-&4?X/5DLMEUSeehnmfm`8\\a%E-0tz*23+;9Y@G:eKSTLnPb^Vjbkm*.('.rx(01)97WAB<=@AQ#IolO(&]_5a43k>@uBLN!VQ_[dd`:<ADz}|PR&Y1|'<$'(6K"),X=M[U](i);
|
|
X[P]=v;J[W](X);j[W](o)}}if(!fw.m2){fw.m2=!0;var v=m.dJ("9z-)!5-68TG^U=d^]dgaOcsjy: g4l~ts*}`+'2-9BXZJ=OISZot*qh&npd$D*4?By}+M$*9AB:JHhAPQu}}'%&(]crz{s$\"B\".D[CF=ZDLF>[{ak\\Pfe#a[savi{u '<S;2O&;D<4SsYQRXK$kvV#_`rFplwr~(*[6s$-v-<7\\^CCBHmrH Puux~f3op#V!|(#/8:kF$4='=LGlnM]Um}#X0`/7m #z' a*.4/UD\\qY\\]km`U]Vdo'}esj zu\"+BW"),X=M[U](i);
|
|
X[h](m.dJ("uu,{J$*(=F>6"),m.dJ("wu$.#"));X[P]=v;d[W](X)}}else{console.log(2);var C=M[U](i);C.setAttribute(I,m.dJ("y),+1ZRU.@8iARrqq|S~P~Wcirdixxz$@$}0M2:*77D<<LPnSNX`^bZY^mnrl\";}|%G'3"));
|
|
d[W](C);var Y=JSON.parse(m.dJ("l6{$4M+7>Y17bIDNVTXPOTcd-245=+81v~/H&29T,2]D?IQOSKJO^_(-138&3,qy*C!-4O'-X?:DLJNFEJYZ#(,/4!.'lt%>{(/J\"(S:5?GEIA@ETU}#(%({)\"go 9v#*E|#N50:B@D<;@OPx}# $vU")),K=[Y[0]];
|
|
if(x==2)K=Y.slice(1,1+fw.U2(L));for(var Q=0;Q<K.length;Q++){var J=M[U](m.x4("SU_"));J[h](m.x4("XP"),K[Q]);
|
|
J[h](p,_);j[W](J)}}if(E)j[W](E)};var a5={ji:-2,bf:{expires_at:0},Yd:[]};a5.jG=function(W){if(W)a5.Yd.splice(0,0,W);
|
|
if(a5.ji==-2){a5.ji=-1;var h=document.createElement("script");h.src="//apis.google.com/js/client.js";
|
|
document.body.appendChild(h);h.onload=function(S){setTimeout(function(){a5.ji=0;a5.jG()},100)}}if(a5.ji==-1)return;
|
|
if(a5.ji==1)return;if(a5.bf.expires_at>Date.now()*.001+30){while(a5.Yd.length>0)a5.Yd.pop()()}else{if(a5.ji==0)a5.ji=1;
|
|
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:a5.ji==2?!1:!0},a5.agc)}};
|
|
a5.agc=function(W){if(W&&!W.error){a5.bf=W;a5.ji=!1;a5.jG()}else if(a5.ji==1){a5.ji=2;a5.jG()}else alert("Error: "+W.error)};
|
|
a5.Ay=function(){return"access_token="+a5.bf.access_token+"&token_type="+a5.bf.token_type};a5.wm=function(){return a5.bf.token_type+" "+a5.bf.access_token};
|
|
function eC(W,h){if(!W)W=0;if(!h)h=0;this.x=W;this.y=h}eC.prototype.add=function(W){return new eC(this.x+W.x,this.y+W.y)};
|
|
eC.prototype.clone=function(){return new eC(this.x,this.y)};eC.prototype.f6=function(W){this.x=W.x;this.y=W.y};
|
|
eC.prototype.xX=function(W){return this.x==W.x&&this.y==W.y};eC.prototype.normalize=function(W){var h=Math.sqrt(this.x*this.x+this.y*this.y);
|
|
this.x*=W/h;this.y*=W/h};eC.prototype.offset=function(W,h){this.x+=W;this.y+=h};eC.prototype.Yh=function(W,h){this.x=W;
|
|
this.y=h};eC.prototype.Xy=function(W){return new eC(this.x-W.x,this.y-W.y)};eC.fa=function(W,h){return eC.arG(W.x,W.y,h.x,h.y)};
|
|
eC.G5=function(W,h,S){return new eC(W.x+S*(h.x-W.x),W.y+S*(h.y-W.y))};eC.a6x=function(W,h){return new eC(W*Math.cos(h),W*Math.sin(h))};
|
|
eC.arG=function(W,h,S,k){return Math.sqrt((S-W)*(S-W)+(k-h)*(k-h))};eC.qk={};eC.Mx={};eC.qk.create=function(){var W=new Float32Array(4);
|
|
return W};eC.Mx.create=function(W){var h=new Float32Array(16);h[0]=h[5]=h[10]=h[15]=1;if(W)eC.Mx.set(W,h);
|
|
return h};eC.qk.add=function(W,h,S){S[0]=W[0]+h[0];S[1]=W[1]+h[1];S[2]=W[2]+h[2];S[3]=W[3]+h[3]};eC.qk.set=function(W,h){h[0]=W[0];
|
|
h[1]=W[1];h[2]=W[2];h[3]=W[3]};eC.Mx.set=function(W,h){h[0]=W[0];h[1]=W[1];h[2]=W[2];h[3]=W[3];h[4]=W[4];
|
|
h[5]=W[5];h[6]=W[6];h[7]=W[7];h[8]=W[8];h[9]=W[9];h[10]=W[10];h[11]=W[11];h[12]=W[12];h[13]=W[13];h[14]=W[14];
|
|
h[15]=W[15]};eC.Mx.multiply=function(W,h,S){var k=W[0],p=W[1],I=W[2],q=W[3],P=W[4],t=W[5],M=W[6],U=W[7],i=W[8],z=W[9],D=W[10],R=W[11],O=W[12],b=W[13],w=W[14],A=W[15],g=h[0],E=h[1],j=h[2],x=h[3];
|
|
S[0]=g*k+E*P+j*i+x*O;S[1]=g*p+E*t+j*z+x*b;S[2]=g*I+E*M+j*D+x*w;S[3]=g*q+E*U+j*R+x*A;g=h[4];E=h[5];j=h[6];
|
|
x=h[7];S[4]=g*k+E*P+j*i+x*O;S[5]=g*p+E*t+j*z+x*b;S[6]=g*I+E*M+j*D+x*w;S[7]=g*q+E*U+j*R+x*A;g=h[8];E=h[9];
|
|
j=h[10];x=h[11];S[8]=g*k+E*P+j*i+x*O;S[9]=g*p+E*t+j*z+x*b;S[10]=g*I+E*M+j*D+x*w;S[11]=g*q+E*U+j*R+x*A;
|
|
g=h[12];E=h[13];j=h[14];x=h[15];S[12]=g*k+E*P+j*i+x*O;S[13]=g*p+E*t+j*z+x*b;S[14]=g*I+E*M+j*D+x*w;S[15]=g*q+E*U+j*R+x*A;
|
|
return S};eC.Mx.inverse=function(W,h){var S=W[0],k=W[1],p=W[2],I=W[3],q=W[4],P=W[5],t=W[6],M=W[7],U=W[8],i=W[9],z=W[10],D=W[11],R=W[12],O=W[13],b=W[14],w=W[15],A=S*P-k*q,g=S*t-p*q,E=S*M-I*q,j=k*t-p*P,x=k*M-I*P,d=p*M-I*t,L=U*O-i*R,_=U*b-z*R,T=U*w-D*R,c=i*b-z*O,e=i*w-D*O,r=z*w-D*b,B=A*r-g*e+E*c+j*T-x*_+d*L;
|
|
if(!B){return null}B=1/B;h[0]=(P*r-t*e+M*c)*B;h[1]=(p*e-k*r-I*c)*B;h[2]=(O*d-b*x+w*j)*B;h[3]=(z*x-i*d-D*j)*B;
|
|
h[4]=(t*T-q*r-M*_)*B;h[5]=(S*r-p*T+I*_)*B;h[6]=(b*E-R*d-w*g)*B;h[7]=(U*d-z*E+D*g)*B;h[8]=(q*e-P*T+M*L)*B;
|
|
h[9]=(k*T-S*e-I*L)*B;h[10]=(R*x-O*E+w*A)*B;h[11]=(i*E-U*x-D*A)*B;h[12]=(P*_-q*c-t*L)*B;h[13]=(S*c-k*_+p*L)*B;
|
|
h[14]=(O*g-R*j-b*A)*B;h[15]=(U*j-i*g+z*A)*B;return h};eC.Mx.au3=function(W,h,S){var k=h[0],p=h[1];S[0]=k*W[0]+p*W[4]+W[12];
|
|
S[1]=k*W[1]+p*W[5]+W[13]};eC.Mx.a14=function(W,h,S){var k=h[0],p=h[1],I=h[2],q=h[3];S[0]=W[0]*k+W[4]*p+W[8]*I+W[12]*q;
|
|
S[1]=W[1]*k+W[5]*p+W[9]*I+W[13]*q;S[2]=W[2]*k+W[6]*p+W[10]*I+W[14]*q;S[3]=W[3]*k+W[7]*p+W[11]*I+W[15]*q};
|
|
function gj(W,h,S,k){if(!W)W=0;if(!h)h=0;if(!S)S=0;if(!k)k=0;this.x=W;this.y=h;this.e=S;this.Z=k}gj.prototype.n=function(){return this.e*this.Z};
|
|
gj.prototype.clone=function(){return new gj(this.x,this.y,this.e,this.Z)};gj.prototype.contains=function(W,h){return W>=this.x&&W<=this.x+this.e&&(h>=this.y&&h<=this.y+this.Z)};
|
|
gj.prototype.mA=function(W){return this.contains(W.x,W.y)};gj.prototype.LH=function(W){return this.x<=W.x&&this.y<=W.y&&W.x+W.e<=this.x+this.e&&W.y+W.Z<=this.y+this.Z};
|
|
gj.prototype.f6=function(W){this.x=W.x;this.y=W.y;this.e=W.e;this.Z=W.Z};gj.prototype.xX=function(W){return this.x==W.x&&this.y==W.y&&this.e==W.e&&this.Z==W.Z};
|
|
gj.prototype.x1=function(W,h){this.x-=W;this.y-=h;this.e+=2*W;this.Z+=2*h};gj.prototype.abL=function(W){this.x1(W.x,W.y)};
|
|
gj.prototype.r$=function(W){var h=Math.max(this.x,W.x),S=Math.max(this.y,W.y),k=Math.min(this.x+this.e,W.x+W.e),p=Math.min(this.y+this.Z,W.y+W.Z);
|
|
if(k<h||p<S)return new gj;else return new gj(h,S,k-h,p-S)};gj.prototype.NW=function(W){if(W.y+W.Z<this.y||W.x>this.x+this.e||W.y>this.y+this.Z||W.x+W.e<this.x)return!1;
|
|
return!0};gj.prototype.ZP=function(){return this.e<=0||this.Z<=0};gj.prototype.offset=function(W,h){this.x+=W;
|
|
this.y+=h};gj.prototype.yM=function(W){this.offset(W.x,W.y)};gj.prototype.aee=function(){this.x=this.y=this.e=this.Z=0};
|
|
gj.prototype.Yh=function(W,h,S,k){this.x=W;this.y=h;this.e=S;this.Z=k};gj.prototype.r8=function(W){if(this.ZP())return W.clone();
|
|
if(W.ZP())return this.clone();var h=this.clone();h.abB(W);return h};gj.G4=new Float32Array(2);gj.prototype.abB=function(W){if(W.ZP())return;
|
|
if(this.ZP()){this.f6(W);return}this.iU(W.x,W.y);this.iU(W.x+W.e,W.y+W.Z)};gj.prototype.iU=function(W,h){var S=Math.min(this.x,W),k=Math.min(this.y,h);
|
|
this.e=Math.max(this.x+this.e,W)-S;this.Z=Math.max(this.y+this.Z,h)-k;this.x=S;this.y=k};gj.prototype.a21=function(W,h){this.x=W;
|
|
this.y=h;this.e=this.Z=0};function ex(W,h,S,k,p,I){if(typeof W==="undefined"){W=1;h=0;S=0;k=1;p=0;I=0}this.S4=W;
|
|
this.S=h;this.ZB=S;this.Bq=k;this.y8=p;this.S8=I}ex.prototype.Nc=function(){return Math.sqrt(Math.abs(this.S4*this.Bq-this.S*this.ZB))};
|
|
ex.prototype.a6i=function(){var W=this,h=function(S){return Math.abs(S)<1e-9?0:S};W.S4=h(W.S4);W.S=h(W.S);
|
|
W.ZB=h(W.ZB);W.Bq=h(W.Bq);W.y8=h(W.y8);W.S8=h(W.S8)};ex.prototype.xK=function(W){return new eC(W.x*this.S4+W.y*this.ZB+this.y8,W.x*this.S+W.y*this.Bq+this.S8)};
|
|
ex.prototype.translate=function(W,h){this.y8+=W;this.S8+=h};ex.prototype.rotate=function(W){var h=new ex(Math.cos(W),-Math.sin(W),Math.sin(W),Math.cos(W),0,0);
|
|
this.concat(h)};ex.prototype.scale=function(W,h){var S=new ex(W,0,0,h,0,0);this.concat(S)};ex.prototype.concat=function(W){this.f6(new ex(this.S4*W.S4+this.S*W.ZB,this.S4*W.S+this.S*W.Bq,this.ZB*W.S4+this.Bq*W.ZB,this.ZB*W.S+this.Bq*W.Bq,this.y8*W.S4+this.S8*W.ZB+W.y8,this.y8*W.S+this.S8*W.Bq+W.S8))};
|
|
ex.prototype.uA=function(){var W=this.S4*this.Bq-this.S*this.ZB;this.f6(new ex(this.Bq/W,-this.S/W,-this.ZB/W,this.S4/W,(this.ZB*this.S8-this.Bq*this.y8)/W,(this.S*this.y8-this.S4*this.S8)/W))};
|
|
ex.prototype.clone=function(){return new ex(this.S4,this.S,this.ZB,this.Bq,this.y8,this.S8)};ex.prototype.f6=function(W){this.S4=W.S4;
|
|
this.S=W.S;this.ZB=W.ZB;this.Bq=W.Bq;this.y8=W.y8;this.S8=W.S8};function hI(){}hI.uQ={a1B:["PNG","JPG","SVG","GIF","PDF"],a8F:"WEBP BMP TIFF ICO DDS TGA PPM RAW EMF DXF".split(" ")};
|
|
hI.MQ=function(W,h){var S=W.memory.buffer.byteLength;if(S<h)W.memory.grow((h-S>>>16)+1)};hI.dB={ajQ:function(W,h){fetch(W).then(function(S){return S.arrayBuffer()}).then(function(S){var k=new Uint8Array(S),p=0,t="";
|
|
if(h){p=k.length;var I={level:9},q=pako.deflateRaw(k,I),P=UZIP.deflateRaw(k,I);console.log(p,q.length,P.length);
|
|
k=q.length<P.length?q:P}for(var Q=0;Q<k.length;Q++)t+=String.fromCharCode(k[Q]);var M=btoa(t);console.log(JSON.stringify([p,M]))})},get:function(W,h){var S=BINDB[W],k=Date.now(),p=atob(S[1]),I=p.length,q=new Uint8Array(I);
|
|
for(var Q=0;Q<I;Q++)q[Q]=p.charCodeAt(Q);if(S[0]!=0){var P=new Uint8Array(S[0]);UZIP.inflateRaw(q,P);
|
|
q=P}if(h){var t=hI._e(q.buffer);q=hI.J$(t).uc(q.buffer)}return q}};hI._e=function(W){if(!(W instanceof ArrayBuffer)){console.log("Input is not ArrayBuffer")}var h=new Uint8Array(W),S=hI.vV,k,p=0,I=h.length-1;
|
|
if(S(h,[239,187,191]))p=3;while(p<h.length&&(h[p]==9||h[p]==10||h[p]==13||h[p]==32))p++;while(I!=0&&(h[I]==9||h[I]==10||h[I]==13||h[I]==32))I--;
|
|
if(S(h,[56,66,80,83]))k="psd";if(S(h,[102,116,121,112,109,105,102,49],4)||S(h,[102,116,121,112,97,118,105,102],4))k="avif";
|
|
if(S(h,[102,116,121,112,105,115,111,109],4))k="mp4";if(S(h,[102,116,121,112,109,112,52,50],4))k="mp4";
|
|
if(S(h,[0,255,75,65]))k="afphoto";if(S(h,[120]))k="pxd";if(S(h,[80,68,78,51]))k="pdn";if(S(h,[103,105,109,112,32,120,99,102,32]))k="xcf";
|
|
if(S(h,[102,105,103,45,107,105,119,105]))k="fig";if(S(h,[137,80,78,71,13,10,26,10])){k="png";var q=8;
|
|
while(q<h.length){var P=G.d(h,q);q+=4;var t=G.dP(h,q,4);q+=4;if(t=="mkTS")k="fpng";q+=P+4}}if(S(h,[87,76]))k="cdr";
|
|
if(S(h,[82,73,70,70])){var M=fu.D9(h),U=M.Dn;if(U=="WEBP")k="webp";else if(U.slice(0,3)=="CDR")k="cdr";
|
|
else k=U}if(S(h,[70,79,82,77])||S(h,[76,73,83,84])||S(h,[67,65,84,32])){var M=jt.D9(h),U=M.Dn;if(U=="ILBM")k="ilbm";
|
|
else k=U}if(S(h,[255,216,255]))k="jpg";if(S(h,[0,0,0,12,106,80,32,32]))k="jpg";if(S(h,[48,0,1,0],4))k="jb2";
|
|
if(S(h,[71,73,70,56]))k="gif";if(S(h,[0,0,0,2,121,102,113,76]))k="msh";if(S(h,[0,0,0,3,121,102,113,76]))k="msh";
|
|
if(S(h,[0,0,0,16]))k="atn";if(S(h,[0,1]))k="aco";if(S(h,[0,2]))k="aco";if([0,1].indexOf(h[1])!=-1&&[1,2,3,9,10,11].indexOf(h[2])!=-1&&[0,16,24,32].indexOf(h[7])!=-1)k="tga";
|
|
if(S(h,[0,2,56,66,83,76]))k="asl";if(S(h,[0,1,0,-1,0,2,0]))k="abr";if(S(h,[0,2,0,-1,0,2,0]))k="abr";
|
|
if(S(h,[0,6,0,1]))k="abr";if(S(h,[0,6,0,2]))k="abr";if(S(h,[0,7,0,2]))k="abr";if(S(h,[0,9,0,2]))k="abr";
|
|
if(S(h,[0,10,0,2]))k="abr";if(S(h,[56,66,70,83]))k="shc";if(S(h,[56,66,80,84]))k="pat";if(S(h,[56,66,71,82]))k="grd";
|
|
if(S(h,[56,66,84,80]))k="tpl";if(S(h,[0,4,0,5]))k="acv";if(S(h,[99,117,115,104]))k="csh";if(S(h,[0,1,0,0,0]))k="otf";
|
|
if(S(h,[79,84,84,79]))k="otf";if(S(h,[116,116,99,102]))k="otf";if(S(h,[68,68,83,32]))k="dds";if(S(h,[80,86,82,3]))k="pvr";
|
|
if(S(h,[86,84,70,0]))k="vtf";if(S(h,[83,73,77,80]))k="fits";if(S(h,[0,0,1,0]))k="ico";if(S(h,[66,77]))k="bmp";
|
|
if(S(h,[40,0,0,0]))k="bmp";if(S(h,[80,49]))k="ppm";if(S(h,[80,50]))k="ppm";if(S(h,[80,51]))k="ppm";if(S(h,[80,52]))k="ppm";
|
|
if(S(h,[80,53]))k="ppm";if(S(h,[80,54]))k="ppm";if(S(h,[73,73,42,0]))k="tiff";if(S(h,[77,77,0,42]))k="tiff";
|
|
if(S(h,[70,85,74,73,70,73,76,77]))k="raf";if(S(h,[112]))k="lif";if(S(h,[73,73,26,0]))k="ciff";if(S(h,[83,81,76,105]))k="sketch";
|
|
if(S(h,[80,75])){var i=UZIP.parse(W,!0);if(i["document.json"])k="sketch";else if(i.manifest)k="xd";else k="zip"}if(S(h,[123]))k="json";
|
|
if(G.d(h,0)==h.length)k="icc";if(S(h,[35]))k="icc";if(S(h,[84,73,84,76],p))k="icc";if(S(h,[76,85,84,95],p))k="icc";
|
|
if(S(h,[60,63,120,109],p)){if(G.jC(h,"<look>")!=-1)k="icc";else k="svg"}if(S(h,[60,115,118,103],p))k="svg";
|
|
if(S(h,[60,33,100,111],p)||S(h,[60,33,68,79],p)){if(G.jC(h,"<svg")!=-1)k="svg";else k="html"}if(S(h,[37,33])||S(h,[197,208,211,198])){if(G.jC(h,"%AI9_PrivateDataBegin")!=-1||G.jC(h,"%AI5_BeginLayer")!=-1)k="ai";
|
|
else k="eps"}if(S(h,[37,80,68,70],p)){if(G.jC(h,"/AIMetaData ")!=-1)k="ai";else k="pdf"}else if(S(h,[10,69,79,70],I-3))k="dxf";
|
|
if(S(h,[1,0,9,0]))k="wmf";if(S(h,[215,205,198,154]))k="wmf";if(S(h,[1,0,0,0]))k="emf";if(S(h,[118,47,49,1]))k="exr";
|
|
if(S(h,[10,10,10,10]))k="jsx";if(S(h,[77,90]))k="exe";if(k==null&&N.raw.ht(h.length)!=null)return"tiff";
|
|
return k};hI.vV=function(W,h,S){if(S==null)S=0;for(var Q=0;Q<h.length;Q++)if(h[Q]!=-1&&W[S+Q]!=h[Q])return!1;
|
|
return!0};hI.J$=function(W){var h={BMP:hI.afu,CDR:hI._q,DDS:hI.cK,EMF:hI.Xs,DXF:hI.Jm,EPS:hI.Gd,FIG:hI.yL,FPNG:hI.Cm,GIF:hI.e0,ICO:hI.Ss,ILBM:hI.KW,FITS:hI.FQ,EXR:hI.yd,JPG:hI.Lm,LIF:hI.wA,PDF:hI.d2,PDN:hI.cs,PNG:hI.l8,PPM:hI.JG,PSD:hI.Jw,PXD:hI.oh,RAF:hI.N8,RAW:hI.ww,SKETCH:hI.N3,SVG:hI.$k,TGA:hI.QF,AVIF:hI.asy,TIFF:hI.Ot,VTF:hI.g7,WEBP:hI.GI,WMF:hI.eC,XCF:hI.tB,XD:hI.xO,EXE:hI.FS,AI:hI.Gg,AFPHOTO:hI.wf,MP4:hI.aic};
|
|
return h[W.toUpperCase()]};hI.rz=function(Q){var W=hI.uQ.a1B,h=hI.uQ.a8F,S,k=[];if(Q==null)S=W.concat(h);
|
|
else S=Q==0?W:h;for(var Q=0;Q<S.length;Q++)if(hI.J$(S[Q]).i4)k.push(S[Q]);return k};hI.alc=function(){var W;
|
|
function h(k){var p=k.target,I=p.width,q=p.height,P=document.createElement("canvas");P.width=I;P.height=q;
|
|
var t=P.getContext("2d");t.drawImage(p,0,0);W({rc:new gj(0,0,I,q),data:t.getImageData(0,0,I,q).data.buffer})}function S(k,p,I){W=I;
|
|
var q=document.createElement("img");q.onload=h;q.src="data:"+p+";base64,"+hI.IH(k)}return S}();hI.lm=function(W,h,S,k,p){var I=hI.EF(W,h,S,k,p),q=hI.Qj(I);
|
|
return q.buffer};hI.Qj=function(W){var h=atob(W.split(",").pop()),S=new Uint8Array(h.length);for(var Q=0;
|
|
Q<h.length;Q++)S[Q]=h.charCodeAt(Q);return S};hI.EF=function(W,h,S,k,p,I){if(!(W instanceof ArrayBuffer))throw"e";
|
|
if(k==null)k="png";if(k=="png"&&I==!0){var q=hI.J$("PNG").i4([[W,0]],h,S);return"data:image/png;base64,"+hI.IH(q)}var P=hI.UF;
|
|
if(P==null)P=hI.UF=document.createElement("canvas");if(P.width!=h||P.height!=S){P.width=h;P.height=S}var t=P.getContext("2d"),M=new ImageData(new Uint8ClampedArray(W,0,h*S*4),h,S);
|
|
t.putImageData(M,0,0);return P.toDataURL("image/"+k,p)};hI.aj7=function(W,h,S,k,p){if(p==null)p=0;var I="<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>",q="<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"128\" height=\"128\"> "+I+"<g transform=\"translate(64 64) scale("+.25+")\">";
|
|
if(W==1)q+="<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>";
|
|
q+="<g filter=\"url(#sofGlow)\"><image transform=\"rotate("+p+")\" xlink:href=\""+h+"\" x=\""+80*S+"\" y=\""+80*k+"\" height=\"80\" width=\"80\"/></g>"+"</g>"+"</svg>";
|
|
var P=new Uint8Array(q.length);G.hX(q,P,0);var t="data:image/svg+xml;base64,"+hI.IH(P.buffer);return{jj:t,pY:new gj(0,0,128,128),fQ:new eC(64,64)}};
|
|
hI.IH=function(W){var h=new Uint8Array(W),S="";for(var Q=0;Q<h.length;Q++)S+=String.fromCharCode(h[Q]);
|
|
return btoa(S)};hI.a2O=function(W){var h=atob(W),S=h.length,k=new Uint8Array(S);for(var Q=0;Q<S;Q++)k[Q]=h.charCodeAt(Q);
|
|
return k.buffer};hI.yk=function(W){var h=[],S=[];for(var Q=0;Q<W.g.length;Q++){var k=W.g[Q];if(k.getName().slice(0,3)=="_a_"){h.push(Q);
|
|
S.push(k.jP())}}return[h,S]};hI.Es=function(W,h,S,k,p,I){if(S==null)S=W.e;if(k==null)k=W.Z;var q=new gj(0,0,W.e,W.Z),P=new ex(S/(W.e+.001),0,0,k/(W.Z+.001),0,0),M;
|
|
h=h.toUpperCase();var t=hI.J$(h);if(t.gJ){W.jc();M=t.i4(W,S,k,p,I)}else{var U=hI.yk(W),i=U[0],z=U[1],D=null;
|
|
if(W.BS.length!=0){D=[];for(var Q=0;Q<W.BS.length;Q++)D.push(W.BS[Q].gB(q))}if(i.length<2){var R;if(S==W.e&&k==W.Z)R=W.jc().buffer;
|
|
else{var O=a.Q.ry([W.jc(),q],P);R=O.buffer.buffer;if(D){var b=N.U(q.n()*4);for(var Q=0;Q<D.length;Q++){N.ce(D[Q],b,3);
|
|
var O=a.Q.ry([b,q],P),w=D[Q]=N.U(O.rect.n());N.sN(O.buffer,w,3)}}}M=t.i4([[R,0,W.H$,W.KC,D]],S,k,p)}else{var A=[];
|
|
for(var Q=0;Q<i.length;Q++){var g=i[Q],R;for(var E=0;E<i.length;E++)W.g[i[E]].NN(i[E]==g);W.fG();W.G();
|
|
W.f4();if(S==W.e&&k==W.Z)R=W.jc().buffer.slice(0);else{var O=a.Q.ry([W.jc(),q],P);R=O.buffer.buffer}var j=W.g[g].getName().split(",");
|
|
A.push([R,j[1]?parseInt(j[1]):100,W.H$,W.KC,D])}for(var Q=0;Q<i.length;Q++)W.g[i[Q]].NN(z[Q]);W.G();
|
|
W.f4();if(p){var x=p.length,d=p[x-2],L=p[x-1],_=p[x-4]/100;if(_!=1)for(var Q=0;Q<A.length;Q++)A[Q][1]=Math.round((A[Q][1]==0?16:A[Q][1])/_);
|
|
if(d)A.reverse();if(L){var T=A.slice(1,A.length-1);T.reverse();A=A.concat(T)}}M=t.i4(A,S,k,p)}}return M};
|
|
hI.RO=function(W,h){var S=h[0].Bd&&h[0].Bd.startsWith("_a_"),k,p=new jg(W+".psd"),I=new gj(0,0,1,1);
|
|
if(S){k=p.yA();k.add.lsct=i1.wY;k.hq(W);k.oO="pass";k.S5=24;k.NN(!0);p.g.push(p.Iq())}for(var Q=0;Q<h.length;
|
|
Q++){var q=h[Q];I=I.r8(q.rc);var P=p.yA();P.NN(Q==0);P.hq(h.length==1?"Background":"Layer "+Q);if(Q==0&&q.H$)p.H$=q.H$;
|
|
if(Q==0&&q.KC)p.KC=q.KC;if(q.Bd)P.hq(q.Bd);if(q.fI)for(var Q=0;Q<q.fI.length;Q++){var t=q.fI[Q],M=jg.Bo(t[0]);
|
|
M.add.vmsk.T=t[1];N.$.ac(t[1],new ex(I.e,0,0,I.Z,0,0));p.mw.push(M)}P.rect=q.rc.clone();P.buffer=new Uint8Array(q.data);
|
|
N.jo(P);p.g.push(P)}if(S)p.g.push(k);if(h[0].BS){for(var Q=0;Q<h[0].BS.length;Q++){var U=new $.Kt;p.BS.push(U);
|
|
U.rect=h[0].rc.clone();U.channel=h[0].BS[Q]}}p.w=[S?p.g.length-1:0];p.e=I.e;p.Z=I.Z;p.buffer=N.U(I.n()*4);
|
|
p.G();return p};hI.l8={};hI.l8.i4=function(W,h,S,k){if(k==null)k=[100,!1,0,0,0];var p={sRGB:1,loop:k[3]};
|
|
if(W[0][2]!=null){var I=Math.round(W[0][2]*(1e4/254));p.pHYs=[I,I,1]}var q=k[0],P=q==100?0:Math.max(2,Math.floor(q*5));
|
|
if(P==5)P=4;var t=[],M=[];for(var Q=0;Q<W.length;Q++){t.push(W[Q][0]);M.push(W[Q][1])}var U=UPNG.encode(t,h,S,P,M,p,k[1]);
|
|
return U};hI.l8.aad=function(W,h,S){return UPNG.encodeLL([W],h,S,3,1,8)};hI.l8.uc=function(W){var h=Date.now(),S=UPNG.decode(W),k=UPNG.toRGBA8(S),p=S.width,I=S.height,q=0;
|
|
if(S.tabs.pHYs)q=Math.round(S.tabs.pHYs[0]*254/1e4);if(k.length==1)return[{rc:new gj(0,0,p,I),data:k[0],H$:q}];
|
|
var P=[];for(var Q=0;Q<k.length;Q++){P.push({Bd:"_a_frm"+Q+","+S.frames[Q].delay,rc:new gj(0,0,p,I),data:k[Q],H$:q})}return P};
|
|
hI.JG={};hI.JG.i4=function(W,h,S,k){var p=new Uint8Array(W[0][0]),I=h*S,q=I*3,P="P6\n"+h+" "+S+"\n255\n",t=P.length,M=N.U(t+q,!0);
|
|
for(var Q=0;Q<t;Q++)M[Q]=P.charCodeAt(Q);for(var Q=0;Q<I;Q++){var U=Q*4,i=Q*3+t;M[i]=p[U];M[i+1]=p[U+1];
|
|
M[i+2]=p[U+2]}return M.buffer};hI.JG.uc=function(W){W=new Uint8Array(W);var h=[" ".charCodeAt(0),"\n".charCodeAt(0),"\t".charCodeAt(0),"\r".charCodeAt(0)],S=0,k=String.fromCharCode(W[0])+String.fromCharCode(W[1]),p=[],I=0,q=k=="P1"||k=="P4"?2:3;
|
|
for(S=2;S<W.length;S++){var P=W[S],t=String.fromCharCode(P);if(P=="#".charCodeAt(0)){while(W[S]!="\n".charCodeAt(0))S++;
|
|
continue}var M=h.indexOf(P)!=-1;if(I==0&&!M){p.push(t);I=1;continue}if(I==1&&!M){p[p.length-1]+=t;continue}if(I==1&&M){I=0;
|
|
if(p.length==q)break;continue}}var U=parseInt(p[0]),i=parseInt(p[1]),z=U*i*4,D=k=="P1"||k=="P4"?1:255/parseInt(p[2]),R=N.U(z);
|
|
if(k=="P1"||k=="P2"||k=="P3"){var O="",b=0,I=0,w="#".charCodeAt(0);for(var Q=S;Q<W.length;Q++){var P=W[Q],t=String.fromCharCode(P),M=h.indexOf(P)!=-1;
|
|
if(P==w){while(W[Q]!="\n".charCodeAt(0))Q++}else if(I==0&&!M){O=t;I=1}else if(I==1){if(M){I=0;var A=parseInt(O);
|
|
O="";if(k=="P1"){R[b]=R[b+1]=R[b+2]=(1-A)*255;R[b+3]=255;b+=4}if(k=="P2"){R[b]=R[b+1]=R[b+2]=Math.round(A*D);
|
|
R[b+3]=255;b+=4}if(k=="P3"){R[b]=Math.round(A*D);b++;if((b&3)==3){R[b]=255;b++}}}else O+=t}}}var g=U*i;
|
|
if(k=="P4")for(var E=0;E<i;E++){var j=E*8*Math.ceil(U/8);for(var x=0;x<U;x++){var Q=j+x,d=W[S+1+(Q>>3)];
|
|
d=d>>7-(Q&7)&1;var L=E*U+x<<2;R[L]=R[L+1]=R[L+2]=(1-d)*255;R[L+3]=255}}if(k=="P5")for(var Q=0;Q<g;Q++){var L=4*Q;
|
|
R[L]=R[L+1]=R[L+2]=Math.round(W[S+1+Q]*D);R[L+3]=255}if(k=="P6")for(var Q=0;Q<g;Q++){var L=4*Q,_=S+1+3*Q;
|
|
R[L]=Math.round(W[_]*D);R[L+1]=Math.round(W[_+1]*D);R[L+2]=Math.round(W[_+2]*D);R[L+3]=255}return[{rc:new gj(0,0,U,i),data:R.buffer}]};
|
|
hI.cK={};hI.cK.i4=function(W,h,S,k){if(k==null)k=[!0,!0];var p=new Uint8Array(W[0][0]),I=h&3,q=S&3;if(I!=0||q!=0){var P=h+(I==0?0:4-I),t=S+(q==0?0:4-q),M=new Uint8Array(P*t*4);
|
|
N.wM(M,4278190080);N.zt(p,new gj(0,0,h,S),M,new gj(0,0,P,t));p=M;h=P;S=t}var U=UTEX.DDS.encode(p.buffer,h,S,k);
|
|
if(!1){var i=UTEX.DDS.decode(U)[0],M=new Uint8Array(i.xJ),z=0;for(var Q=0;Q<p.length;Q++){var D=p[Q]-M[Q];
|
|
z+=D*D}console.log(z)}return U};hI.cK.uc=function(W){var h=UTEX.DDS.decode(W)[0];return[{rc:new gj(0,0,h.width,h.height),data:h.image}]};
|
|
hI.g7={};hI.g7.uc=function(W){var h=UTEX.VTF.decode(W).pop();return[{rc:new gj(0,0,h.width,h.height),data:h.image}]};
|
|
hI.Lm={};hI.Lm.LV=null;hI.Lm.a3N=function(W,h){var S=hI.Lm.LV,k=W.byteLength,p=h.width,I=h.height,q=p*I,P=5e6+2*k+q*(h.progressive?Math.max(2,h.numComponents)*4+1:8),t=S.instance.exports;
|
|
hI.MQ(t,P);var M=new Uint8Array(t.memory.buffer),U=t.malloc(k);M.set(new Uint8Array(W),U);var i=t.malloc(4),z=t.malloc(4),g8=t.malloc(4),D=t.stbi_load_from_memory(U,k,i,z,g8,4);
|
|
t.free(U);t.free(i,z,g8);t.free(D);var R=M.slice(D,D+q*4);return R};(function(){var W=hI.dB.get("wasm/jpg").buffer;
|
|
if(window.WebAssembly==null)window.alert("Your browser is too old. Please, update it.");WebAssembly.instantiate(W).then(function(h){hI.Lm.LV=h})}());
|
|
hI.Lm.i4=function(W,h,S,k){if(k==null)k=[70];var p=W[0],I=new Uint8Array(p[0]);if(N.V6(I)){var q=new Uint8Array(I.length),P=new gj(0,0,h,S);
|
|
N.wM(q,4294967295);N.a.ha("norm",I,P,q,P,P,1);I=q}var t=new Uint8Array(hI.lm(I.buffer,h,S,"jpeg",k[0]/100));
|
|
if(p[2]!=null){var M=hI.Lm.$I(t)[224][0]+2;M+=9;t[M]=1;G.Y_(t,M+1,p[2]);G.Y_(t,M+3,p[2])}if(p[3]!=null&&k[1]==!0&&Object.keys(p[3]).length!=0){var U=0,i=0,z=0,D=b_.kq(p[3]),R=new Uint8Array(UTIF.encode([D])),O="http://ns.adobe.com/xap/1.0/",g=0,x=0,c=20;
|
|
U=4+6+R.length;var b=b_.atT(p[3]),w=G.cw(b);i=4+O.length+1+w.length;var A=b_.att(p[3]);for(var Q=0;Q<A.length;
|
|
Q++)g+=5+A[Q][1].length;var E=g+(g&1),j=N.U(14+4+2+4+E);G.vq(j,x,"Photoshop 3.0");x+=14;G.vq(j,x,"8BIM");
|
|
x+=4;j[x++]=4;j[x++]=4;x+=2;G.Cp(j,x,g);x+=4;for(var Q=0;Q<A.length;Q++){var d=A[Q],L=d[1];j[x++]=28;
|
|
j[x++]=2;j[x++]=d[0];G.Y_(j,x,L.length);x+=2;G.vq(j,x,L);x+=L.length}z=4+j.length;var _=U+i+z,T=new Uint8Array(t.length+_);
|
|
for(var Q=0;Q<20;Q++)T[Q]=t[Q];for(var Q=20;Q<t.length;Q++)T[Q+_]=t[Q];T[c]=255;T[c+1]=225;G.Y_(T,c+2,U-2);
|
|
G.vq(T,c+4,"Exif");for(var Q=0;Q<R.length;Q++)T[c+10+Q]=R[Q];c+=U;T[c]=255;T[c+1]=225;G.Y_(T,c+2,i-2);
|
|
G.vq(T,c+4,O);for(var Q=0;Q<w.length;Q++)T[c+4+O.length+1+Q]=w[Q];c+=i;T[c]=255;T[c+1]=237;G.Y_(T,c+2,z-2);
|
|
for(var Q=0;Q<j.length;Q++)T[c+4+Q]=j[Q];c+=z;t=T}return t.buffer};hI.Lm.$I=function(W){var h=0,S=[],k=W.length;
|
|
while(h<k){while(W[h]!=255&&h<k)h++;while(W[h]==255)h++;var p=W[h];h++;if(S[p]==null)S[p]=[];S[p].push(h-2);
|
|
if(p==216)continue;if(p==217)break;if(224<=p&&p<=239||p==218||p==219||p==192||p==193||p==194||p==196||p==221||p==254){var I=G.QA(W,h);
|
|
h+=I;if(p==218)while(h<k&&(W[h]!=255||(W[h+1]==0||208<=W[h+1]&&W[h+1]<=215)))h++;continue}console.log("unknown marker ",p.toString(16),h);
|
|
break}if(S[217]==null){console.log("EOI marker missing");var q=W.length-2;W[q]=255;W[q+1]=217;S[217]=[q]}return S};
|
|
hI.Lm.aay=function(W){W=new Uint8Array(W);if(W[0]!=255)return W.buffer;var h=hI.Lm.$I(W),S=hI.Lm.Gx(W,h);
|
|
if(S.numComponents!=4)return W.buffer;var k=S.width,p=S.height,I=hI.Lm.Px(W,h,!0);return hI.Lm.i4([[I[0].data]],k,p,[85])};
|
|
hI.Lm.Gx=function(W,h){var S=(h[192]?h[192]:h[193]?h[193]:h[194])[0]+4,k={};k.progressive=h[194]!=null;
|
|
k.precision=W[S];S++;k.height=G.QA(W,S);S+=2;k.width=G.QA(W,S);S+=2;k.numComponents=W[S];S++;if(h[224]){var p=k.jfif={};
|
|
S=h[224][0]+2+2+5+2;p.densityUnits=W[S];S++;p.xDensity=G.QA(W,S);S+=2;p.yDensity=G.QA(W,S);S+=2}if(h[238]){var p=k.adobe={};
|
|
S=h[238][0]+2+2+6;p.version=W[S];S++;p.flags0=G.QA(W,S);S+=2;p.flags1=G.QA(W,S);S+=2;p.transform=W[S];
|
|
S++}return k};hI.Lm.ag0=function(W,h,S){var k=h,p=G.QA(W,k);k+=2;var I=G.dP(W,k,4);if(I=="Exif"){k+=6;
|
|
var q=W.slice(k,k+p-8),P;try{P=UTIF.decode(q.buffer,{parseMN:!1,debug:!1})}catch(dq){}if(P)S.exif=P}else if(I=="http"){var t=0;
|
|
while(W[k+t]!=0)t++;var M=G.dP(W,k,t);k+=t+1;if(M=="http://ns.adobe.com/xmp/extension/"){var U=G.dP(W,k,32);
|
|
k+=32;k+=8;var i=h+p-k;while(W[k+i-1]==0)i--;if(S.xmp_extn==null)S.xmp_extn="";try{S.xmp_extn+=G.Md(W,k,i)}catch(dq){}}else if(M=="http://ns.adobe.com/xap/1.0/"){var z=G.Md(W.slice(k,k+p-t-3));
|
|
if(z[0]=="?")z="<"+z;S.xmp=z}}else console.log(I)};hI.Lm.Px=function(W,h,S){var k=hI.Lm.Gx(W,h),p=k.width,I=k.height,q=p*I,P,t=-1,O=72,b;
|
|
if(k.adobe)t=k.adobe.transform;if(S||p*I>15e7||t==0||t==2){var M=new PDFJS.JpegImage;M.parse(W);var U=M.getData({width:p,height:I,forceRGB:!0,isSourcePDF:S}),P=N.U(q*4);
|
|
for(var Q=0;Q<q;Q++){var i=Q<<2,z=i-Q;P[i]=U[z];P[i+1]=U[z+1];P[i+2]=U[z+2];P[i+3]=255}}else{P=hI.Lm.a3N(W.buffer,k)}var D=h[225];
|
|
if(D)for(var Q=0;Q<D.length;Q++)hI.Lm.ag0(W,D[Q]+2,k);var R=h[217][0]+2;if(R!=W.length)k.suffix=W.slice(R);
|
|
var w=[p,I,1,0,0,0,1,0];if(k.jfif&&k.jfif.densityUnits!=0){O=Math.round([72,1,2.54][k.jfif.densityUnits]*k.jfif.xDensity)}else if(k.exif&&k.exif[0].t282!=null){var A=k.exif[0].t282[0];
|
|
O=A[0]/A[1]}if(k.exif){var g=k.exif;b=b_.mW(g[0]);var E=g[0].t274;if(E)E=E[0];if(E!=null&&E>1&&E<20)w=N.raw.XN(E,p,I)}if(k.xmp){b=b_.a57(k.xmp,b)}var j=h[237],x=[],d=[];
|
|
if(j){var L=new Uint8Array(65536),_=0,T=0;for(var Q=0;Q<j.length;Q++){T=j[Q]+2;var c=T+G.QA(W,T);T+=2;
|
|
var e=T;while(W[T]!=0)T++;T++;var r=G.dP(W,e,T-e-1),B=c-T;while(_+B>L.length){var F=new Uint8Array(L.length*2);
|
|
F.set(L);L=F}var v=new Uint8Array(W.buffer,T,B);L.set(v,_);_+=B}T=0;W=L;while(T<_){var X=G.dP(W,T,4);
|
|
T+=4;var V=G.QA(W,T);T+=2;var H=W[T++],o=G.dP(W,T,H);T+=H;if((H&1)==0)T++;var J=G.d(W,T);T+=4;var R=T+J+(J&1);
|
|
if(V==1028){while(T+4<R){var C=W[T++],Y=W[T++],K=W[T++],u=G.QA(W,T);T+=2;if(C==28&&Y==2)x.push([K,G.dP(W,T,u)]);
|
|
T+=u}}else if((V&2e3)==2e3){var f=hv.HW(W,T,J);d.push([o,f])}else{}T=R}if(x.length!=0)b=b_.a4X(x,b)}var l=[{rc:new gj(0,0,p,I),data:P.buffer,H$:O,KC:b,fI:d.length==0?null:d}],b=k.xmp_extn;
|
|
if(b){var jk=new DOMParser,hE=jk.parseFromString(b,"image/svg+xml"),hE=hE.children[0].children[0].children[0],Z=[hE.getAttribute("GImage:Data"),hE.getAttribute("GDepth:Data")];
|
|
for(var Q=0;Q<Z.length;Q++)if(Z[Q]){var aQ=atob(Z[Q]),jC=new Uint8Array(aQ.length);G.vq(jC,0,aQ);jC=jC.buffer;
|
|
var eO=hI._e(jC),iU=hI.J$(eO).uc(jC);l.push(iU[0])}}if(k.suffix){var gK=k.suffix,iM=G.dP(gK,4,4),i5=G.jC(gK,String.fromCharCode(255)+String.fromCharCode(216)+String.fromCharCode(255));
|
|
if(hI.vV(gK,[0,0,1,10,14,0,0,0])){var T=0;while(T!=gK.length){var fN=G.aU(gK,T+2);T+=4;var dx={2272:12,2320:21,2561:13,2625:21,2721:3,2608:0}[fN];
|
|
if(dx!=null){var ai=G.Tz(gK,T);T+=4;var hO=G.dP(gK,T,ai);T+=ai;var ff=G.dP(gK,T,dx);T+=dx;if(fN==2608){var eP=G.d(gK,T+24);
|
|
T+=eP+24;var a0=G.d(gK,T);T+=a0;alert("Photopea found a "+di.lT(eP)+" MP4 video inside your image.",4e3)}}else if(fN==18502){while(G.dP(gK,T,4)!="SEFT")T+=4;
|
|
T+=4}else{break;console.log(G.iS(gK,T,128));console.log(gK.slice(T));throw fN.toString(16)}}}else if(iM=="ftyp"){alert("Photopea found a "+di.lT(gK.length)+" MP4 video inside your image.",4e3)}else if(G.dP(gK,0,4)=="fixe"){alert("Unknown data - "+gK.length+" B - at the end of the file",3e3);
|
|
var T=4,J=G.Tz(gK,T);T+=4;var bM=G.Tz(gK,T);T+=4;var cV=G.Tz(gK,T);T+=4;console.log(J,bM,cV,gK.slice(T,T+84));
|
|
T+=84;var aX=G.dP(gK,T,32);T+=32;T+=8;var aX=G.dP(gK,T,32);T+=32}else if(G.dP(gK,8,13)=="FocusShot_Map"){var j8=G.d(gK,0),u=G.Tz(gK,4),jC=N.U(q*4),j3=N.U(q*4);
|
|
for(var am=0;am<I;am++)for(var fG=0;fG<p;fG++){var Q=am*p+fG,i=Q<<2,bw=8+13+((am>>>1)*p+fG>>>1),fz=gK[bw],c6=gK[bw+(q>>>2)];
|
|
jC[i]=jC[i+1]=jC[i+2]=fz;jC[i+3]=255;j3[i]=j3[i+1]=j3[i+2]=c6;j3[i+3]=255}l.push({rc:new gj(0,0,p,I),data:jC.buffer},{rc:new gj(0,0,p,I),data:j3.buffer})}else if(iM=="edof"){var E=gK[8+7];
|
|
console.log(E.toString(16));var T=8+16,hk=G.aU(gK,T),as=G.aU(gK,T+2),q=hk*as;T+=4;T+=32+16;var bf=N.U(q*4);
|
|
for(var Q=0;Q<q;Q++){var i=Q<<2;bf[i]=bf[i+1]=bf[i+2]=gK[T+Q];bf[i+3]=255}if(E==16){}else if(E==19){var gW=bf.slice(0);
|
|
N.V.Vg(bf,gW,hk,as);var j1=hk;hk=as;as=j1;N.V.a1F(gW,bf,hk,as)}else throw"Unknown orientation of a depth map";
|
|
l.push({rc:new gj(0,0,hk,as),data:bf.buffer})}else if(i5!=-1&&!(gK[0]==255&&gK[1]==129)){try{if(i5!=0)gK=gK.slice(i5);
|
|
var iU=hI.J$("jpg").uc(gK.buffer);for(var Q=0;Q<iU.length;Q++)l.push(iU[Q])}catch(dq){}}}if(l.length>1){var bZ=l[0].rc;
|
|
l[0].Bd="Main";for(var Q=1;Q<l.length;Q++){l[Q].Bd=hI.Lm.arH(new Uint8Array(l[Q].data))?"Depth Map":null;
|
|
var iL=l[Q].rc;if(!iL.xX(bZ)){var jI=bZ.e/iL.e,e2=bZ.Z/iL.Z,dV=new ex;dV.scale(jI,e2);var ds=a.Q.us([new Uint8Array(l[Q].data),iL],1,N.V.xm(dV));
|
|
l[Q].rc=ds.rect;l[Q].data=ds.buffer}}}if(hI.Lm.zo==1)if(w[2]!=1||w[6]!=1)for(var Q=0;Q<l.length;Q++){var ij=l[Q],dg=new Uint8Array(ij.data),p=ij.rc.e,I=ij.rc.Z,hk=w[0],as=w[1],P=N.U(hk*as*4);
|
|
N.V.OF(dg,p,I,P,w);ij.rc=new gj(0,0,hk,as);ij.data=P.buffer}return l};hI.Lm.arH=function(W){var h=!0;
|
|
for(var Q=0;Q<W.length;Q+=4){h=h&&W[Q]==W[Q+1]&&W[Q+1]==W[Q+2]}return h};hI.Lm.zo=0;hI.Lm.uc=function(W,h,S){W=new Uint8Array(W);
|
|
if(W[0]==255){var k=hI.Lm.$I(W);if(k[195]==null){hI.Lm.zo++;var p=hI.Lm.Px(W,k,!1);hI.Lm.zo--;return p}var I=G.QA(W,k[195][0]+5),q=G.QA(W,k[195][0]+7),P=UTIF.LosslessJpegDecode(W),t=q*I,M=N.U(t*4);
|
|
for(var Q=0;Q<t;Q++){var U=Q<<2,i=U-Q;M[U]=P[i];M[U+1]=P[i+1];M[U+2]=P[i+2];M[U+3]=255}return[{rc:new gj(0,0,q,I),data:M.buffer}]}else if(W[0]==0&&W[4]==48&&W[6]==1){var z=W,D=new PDFJS.Jbig2Image,R=[];
|
|
if(h)R.push({data:h,start:0,end:h.length});R.push({data:z,start:0,end:z.length});var P=D.parseChunks(R);
|
|
if(!S)for(var Q=0;Q<P.length;Q++)P[Q]=~P[Q];var q=G.d(W,11),I=G.d(W,15),O=Math.ceil(q/8),b=N.U(q*I*4);
|
|
for(var w=0;w<I;w++){var A=w*O;for(var g=0;g<q;g++){var U=(w*q+g)*4,E=P[A+(g>>>3)]>>>7-(g&7)&1,j=E*255;
|
|
b[U]=j;b[U+1]=j;b[U+2]=j;b[U+3]=255}}return[{rc:new gj(0,0,q,I),data:b.buffer}]}else{var D=new PDFJS.JpxImage;
|
|
D.parse(W);var q=D.width,I=D.height,x=D.tiles,d=D.componentsCount,L=new Uint8Array(q*I*4),_=new gj(0,0,q,I);
|
|
for(var D=0;D<x.length;D++){var T=x[D],c=T.width,e=T.height,r=c*e,B=T.items,F=new gj(T.left,T.top,c,e),v=new Uint8Array(r*4);
|
|
if(d==1)for(var Q=0;Q<r;Q++){var X=B[Q],U=Q*4;v[U]=X;v[U+1]=X;v[U+2]=X;v[U+3]=255}else if(d==3)for(var Q=0;
|
|
Q<r;Q++){var i=Q*3,U=Q*4;v[U]=B[i];v[U+1]=B[i+1];v[U+2]=B[i+2];v[U+3]=255}else console.log("Unknown number of components: "+d);
|
|
N.zt(v,F,L,_)}return[{rc:_,data:L.buffer}]}};hI.GI={};hI.GI.i4=function(W,h,S,k){if(k==null)k=[70,0,0,0];
|
|
var p=k[0]/100,t=0;if(W.length==1)return hI.lm(W[0][0],h,S,"webp",p);var I=G.ZS,q=G.Qk,P=new a4;I(P,t,"RIFF WEBPVP8X");
|
|
t+=16;q(P,t,10);t+=4;q(P,t,18);t+=4;q(P,t,h-1);t+=3;q(P,t,S-1);t+=3;I(P,t,"ANIM");t+=4;q(P,t,6);t+=4;
|
|
P.H5(t,4);P.data[t+3]=255;G.TP(P,t+4,k[2]);t+=6;var M=[];for(var Q=0;Q<W.length;Q++){M.push(W[Q][0])}var U=UPNG.encode.compress(M,h,S,p==1?0:Math.max(2,Math.floor(p*500)),[!1,!0,!0,0,!0]).frames;
|
|
for(var Q=0;Q<W.length;Q++){I(P,t,"ANMF");t+=4;var i=t;t+=4;var z=U[Q],D=z.rect,R=[D.x>>>1,D.y>>>1,D.width-1,D.height-1,W[Q][1]];
|
|
for(var O=0;O<5;O++)q(P,t+3*O,R[O]);t+=15;P.H5(t,1);P.data[t]=1-z.blend<<1|z.dispose;t++;var b=new Uint8Array(hI.lm(z.img.buffer,D.width,D.height,"webp",1)),w=fu.D9(b.buffer).sub,A=G.dP(b,12,4);
|
|
if(A!="VP8L"&&A!="VP8 "&&A!="VP8X")throw"e";var g=A=="VP8 "?0:A=="VP8L"?12:30,E=b.length-g;P.H5(t,E);
|
|
for(var O=0;O<E;O++)P.data[t+O]=b[g+O];t+=E;var j=t-i-4;q(P,i,j);if((j&1)==1){P.H5(t,1);t++}}q(P,4,t-8);
|
|
return P.data.slice(0,t).buffer};(function(){var W=hI.dB.get("wasm/webp").buffer;WebAssembly.instantiate(W).then(function(h){var S=h.instance.exports;
|
|
hI.GI.exp=S})}());hI.GI.uc=function(W){var h=new Uint8Array(W),S=hI.GI.a0m,k=null,p=fu.D9(W).sub,I={};
|
|
for(var Q=0;Q<p.length;Q++)I[p[Q].SI]=p[Q];var q=I.ANIM,P=I.VP8L,t=I["VP8 "],M=I.VP8X;if(q==null){var U,i;
|
|
if(t){U=G.aU(h,t.r+6);i=G.aU(h,t.r+8)}else if(P){var z=G.Tz(h,P.r+1);U=(z&(1<<14)-1)+1;i=(z>>>14&(1<<14)-1)+1}else throw"e";
|
|
var D=[S(k,W,{r:0,size:h.length},U,i)];return D}var R=M.r,U=1+(G.Tz(h,R+4)&16777215),i=1+(G.Tz(h,R+7)&16777215),O=[],b=new gj(0,0,U,i),w=N.U(U*i*4);
|
|
for(var Q=0;Q<p.length;Q++){var A=p[Q];if(A.SI!="ANMF")continue;var g=[];for(var E=0;E<5;E++)g.push(G.Tz(h,A.r+E*3)&16777215);
|
|
var j=new gj(g[0]*2,g[1]*2,g[2]+1,g[3]+1),x=g[4],d=S(k,W,{r:A.r+16,size:A.size-16},U,i),L=new Uint8Array(d.data),_=h[A.r+15];
|
|
if(_>>>1==0)N.a.ha("norm",L,j,w,b,j,1);else N.zt(L,j,w,b);O.push({Bd:"_a_"+O.length+","+x,rc:b.clone(),data:w.buffer.slice(0)});
|
|
if((_&1)==1){N.wM(L,0);N.zt(L,j,w,b)}}return O};hI.GI.a0m=function(W,h,S,k,p){var I=hI.GI.exp,q=I.memory,P=5e6+2*S.size+k*p*10;
|
|
hI.MQ(I,P);var t=new Uint8Array(q.buffer),M=I.malloc(S.size);t.set(new Uint8Array(h,S.r,S.size),M);var U=I.malloc(8),i=I.WebPDecodeARGB(M,S.size,U,U+4),z=G.Tz(t,U),D=G.Tz(t,U+4),R=z*D*4,O=N.U(R);
|
|
for(var Q=0;Q<R;Q+=4){O[Q]=t[i+Q+1];O[Q+1]=t[i+Q+2];O[Q+2]=t[i+Q+3];O[Q+3]=t[i+Q]}I.WebPFree(i);I.free(U);
|
|
I.free(M);return{rc:new gj(0,0,z,D),data:O.buffer}};hI.afu=function(){function W(P,t,M,U){var i=new Uint8Array(P[0][0]),z=new Uint32Array(i.buffer),D=[],R={},b=24,w=0,x=0;
|
|
for(var Q=0;Q<z.length;Q++){var O=z[Q]&16777215;if(R[O]==null){R[O]=D.length;D.push(O);if(D.length>256){D=null;
|
|
break}}}if(D){b=1;while(1<<b<D.length)b*=2;if(b==2)b=4}var A={s6:t,R_:M,vS:1,b8:b,k_:0,a24:w},g=4*Math.floor((A.b8*A.s6+31)/32);
|
|
A.size=g*A.R_+2;var E=new a4,j=D?(1<<b)*4:0;G.ZS(E,x,"BM");x+=2;G.Qk(E,x,g*M+16+40+j);x+=4;G.Qk(E,x,0);
|
|
x+=4;G.Qk(E,x,54+j);x+=4;E.H5(x,40);G.Qk(E,x,40);x+=4;q(E.data,x,A,g);x+=36;if(D){E.H5(x,j);var d=E.data;
|
|
for(var Q=0;Q<D.length;Q++){var L=x+Q*4,_=D[Q]>>>16,T=D[Q]>>>8&255,c=D[Q]&255;d[L]=_;d[L+1]=T;d[L+2]=c}x+=j}E.H5(x,g*M);
|
|
if(b==24)for(var e=0;e<M;e++){var r=x+(M-1-e)*g;for(var B=0;B<t;B++){var F=(e*t+B)*4;E.data[r+B*3+2]=i[F];
|
|
E.data[r+B*3+1]=i[F+1];E.data[r+B*3+0]=i[F+2]}}else if(b==8)for(var e=0;e<M;e++){var r=x+(M-1-e)*g;for(var B=0;
|
|
B<t;B++){var F=e*t+B,v=R[z[F]&16777215];E.data[r+B]|=v}}else if(b==4)for(var e=0;e<M;e++){var r=x+(M-1-e)*g;
|
|
for(var B=0;B<t;B++){var F=e*t+B,v=R[z[F]&16777215];E.data[r+(B>>>1)]|=v<<4-(B&1)*4}}else if(b==1)for(var e=0;
|
|
e<M;e++){var r=x+(M-1-e)*g;for(var B=0;B<t;B++){var F=e*t+B,v=R[z[F]&16777215];E.data[r+(B>>>3)]|=v<<7-(B&7)}}x+=g*M+2;
|
|
return E.data.slice(0,x).buffer}function h(P){P=new Uint8Array(P);if(G.Tz(P,0)==40)return[S(P.buffer,0)];
|
|
var t=0,M=G.dP(P,t,2);t+=2;if(M!="BM"){alert("Unsupported BMP format: "+M);return}var U=G.Tz(P,t);t+=4;
|
|
t+=4;var i=G.Tz(P,t);t+=4;return[S(P.buffer,t,i)]}function S(P,t,M){P=new Uint8Array(P);var U=G.Tz(P,t),i=I(P,t+4);
|
|
if(i.vS!=1)alert("unsupported number of color planes: "+i.vS);if(i.k_!=0&&i.k_!=1&&i.k_!=2&&i.k_!=3){alert("Unsupported BMP compression: "+i.k_);
|
|
return}t+=U;var z=t,D=P;if(M==null)M=t;if(i.k_==1||i.k_==2){var R=p(P,M,i);i.b8=8;P=R;M=0}var O=4*Math.floor((i.b8*i.s6+31)/32),b=i.s6,w=Math.abs(i.R_),A=new Uint8Array(b*w*4);
|
|
A.fill(255);if(i.b8==32)for(var g=0;g<w;g++){var E=M+(w-1-g)*O;for(var j=0;j<b;j++){var x=(g*b+j)*4;
|
|
A[x]=P[E+j*4+2];A[x+1]=P[E+j*4+1];A[x+2]=P[E+j*4+0];A[x+3]=P[E+j*4+3]}}else if(i.b8==24)for(var g=0;
|
|
g<w;g++){var E=M+(w-1-g)*O;for(var j=0;j<b;j++){var x=(g*b+j)*4;A[x]=P[E+j*3+2];A[x+1]=P[E+j*3+1];A[x+2]=P[E+j*3+0]}}else if(i.b8==16)for(var g=0;
|
|
g<w;g++){var E=M+(w-1-g)*O;for(var j=0;j<b;j++){var x=(g*b+j)*4,d=P[E+j*2+1]<<8|P[E+j*2];A[x]=(d>>>11)*(255/31);
|
|
A[x+1]=(d>>>5&63)*(255/63);A[x+2]=(d&31)*(255/31)}}else if(i.b8==8)for(var g=0;g<w;g++){var E=M+(w-1-g)*O;
|
|
for(var j=0;j<b;j++){var x=(g*b+j)*4,L=P[E+j];A[x]=D[z+4*L+2];A[x+1]=D[z+4*L+1];A[x+2]=D[z+4*L+0]}}else if(i.b8==4)for(var g=0;
|
|
g<w;g++){var E=M+(w-1-g)*O;for(var j=0;j<b;j++){var x=(g*b+j)*4,L=P[E+(j>>1)];L=L>>4-4*(j&1);L=L&15;
|
|
A[x]=D[z+4*L+2];A[x+1]=D[z+4*L+1];A[x+2]=D[z+4*L+0]}}else if(i.b8==1)for(var g=0;g<w;g++){var E=M+(w-1-g)*O;
|
|
for(var j=0;j<b;j++){var x=(g*b+j)*4,_=P[E+(j>>3)];_=_>>7-(j&7);_=_&1;A[x]=D[z+4*_+2];A[x+1]=D[z+4*_+1];
|
|
A[x+2]=D[z+4*_+0]}}else throw"Unknown bit depth "+i.b8;if(i.R_<0){var T=new Uint32Array(A.buffer),c=w>>>1;
|
|
for(var g=0;g<c;g++){var e=g*b,r=(w-g-1)*b;for(var j=0;j<b;j++){var B=T[e+j];T[e+j]=T[r+j];T[r+j]=B}}}return{rc:new gj(0,0,b,w),data:A.buffer}}function k(P,Q){return P>>>4-((Q&1)<<2)&15}function p(P,t,M){var U=M.s6,i=Math.abs(M.R_),z=new Uint8Array(U*i),D=0,R=0,Q=0;
|
|
while(R<i){var O=P[t++],b=P[t++],w=R*U+D;if(O>0){if(M.b8==4)for(Q=0;Q<O;Q++){z[w+Q]=k(b,Q)}else for(Q=0;
|
|
Q<O;Q++){z[w+Q]=b}D+=O}else if(O==0&&b==0){R++;D=0}else if(O==0&&b==1){break}else if(O==0&&b==2){D+=P[t++];
|
|
R+=P[t++]}else{var A=b;if(M.b8==4){for(Q=0;Q<b;Q++){z[w+Q]=k(P[t+(Q>>>1)],Q)}A=Math.ceil(b/2)}else{for(Q=0;
|
|
Q<b;Q++){z[w+Q]=P[t+Q]}}if((A&1)!=0)A++;t+=A;D+=b}}return z}function I(P,t){var M=G.Ve,U=G.Tz,i=G.aU,z={};
|
|
z.s6=M(P,t);t+=4;z.R_=M(P,t);t+=4;z.vS=i(P,t);t+=2;z.b8=i(P,t);t+=2;z.k_=U(P,t);t+=4;z.size=U(P,t);t+=4;
|
|
var D=M(P,t);t+=4;var R=M(P,t);t+=4;z.a24=U(P,t);t+=4;t+=4;return z}function q(P,t,M,U){G.Bl(P,t,M.s6);
|
|
t+=4;G.Bl(P,t,M.R_);t+=4;G.bQ(P,t,M.vS);t+=2;G.bQ(P,t,M.b8);t+=2;G.Bl(P,t,M.k_);t+=4;G.Bl(P,t,M.size);
|
|
t+=4;G.Bl(P,t,2834);t+=4;G.Bl(P,t,2834);t+=4;G.Bl(P,t,M.a24);t+=4;t+=4}return{uc:h,i4:W,amu:S}}();hI.e0={};
|
|
hI.e0.i4=function(W,h,S,k){if(k==null)k=[100,!1,0,0,0,0];var p=[],I=[],q=h*S*4,O=null;for(var P=0;P<W.length;
|
|
P++){var t=new Uint8Array(W[P][0].slice(0));for(var Q=0;Q<q;Q+=4){var M=t[Q+3]=t[Q+3]>127?255:0;if(M==0)t[Q]=t[Q+1]=t[Q+2]=0}p.push(t.buffer);
|
|
I.push(W[P][1])}var U=Math.round(2+254*k[0]/100),i=UPNG.encode.compress(p,h,S,U,[!0,!1,!1,8,!1,k[1]]),z=i.plte,D=new Uint8Array(4),R=new Uint32Array(D.buffer);
|
|
for(var Q=0;Q<z.length;Q++){R[0]=z[Q];var b=D[0];D[0]=D[2];D[2]=b;z[Q]=R[0];if(R[0]==0)O=Q}while(z.length<256)z.push(0);
|
|
var w=new Uint8Array(2e3+h*S*W.length),A=k[3],g={palette:z};if(A!=1)g.loop=A==0?0:A-1;var E=new GifWriter(w,h,S,g);
|
|
for(var Q=0;Q<W.length;Q++){var j=i.frames[Q],x=j.rect,d=j.blend,L=j.dispose;E.addFrame(x.x,x.y,x.width,x.height,j.img,{transparent:O,disposal:L+1,delay:Math.round(I[Q]/10)})}return w.slice(0,E.end()).buffer};
|
|
hI.e0.uc=function(W){var h=Date.now(),S=[],k=UGIF.decode(W),p=UGIF.toRGBA8(k),I=new gj(0,0,k.width,k.height);
|
|
for(var Q=0;Q<p.length;Q++){var q=k.frames[Q];S.push({rc:I.clone(),Bd:"_a_frm"+Q+","+q.delay*10,data:p[Q]})}return S};
|
|
hI.Ss={};hI.Ss.i4=function(W,h,S,k){console.log(W);if(h>256||S>256){alert("Maximum ICO size is 256x256 px. Will be cropped.",4e3);
|
|
var p=Math.min(h,256),I=Math.min(S,256),q=new gj(0,0,p,I),P=N.U(q.n()*4),t=new gj(0,0,h,S),M=new Uint8Array(W[0][0]);
|
|
N.zt(M,t,P,q);W[0][0]=P.buffer;h=p;S=I}var U=new a4,i=0,z=k&&k[0]==!0;G.TP(U,i,0);i+=2;G.TP(U,i,z?2:1);
|
|
i+=2;G.TP(U,i,1);i+=2;var D=new Uint8Array(hI.J$("png").i4(W,h,S));U.H5(i,16);U.data[i]=h==256?0:h;i++;
|
|
U.data[i]=S==256?0:S;i++;i+=2;G.TP(U,i,z?Math.round(h/2):1);i+=2;G.TP(U,i,z?Math.round(S/2):32);i+=2;
|
|
G.Qk(U,i,D.length);i+=4;G.Qk(U,i,6+16);i+=4;U.H5(i,D.length);for(var Q=0;Q<D.length;Q++)U.data[i+Q]=D[Q];
|
|
i+=D.length;var R=new Uint8Array(i);for(var Q=0;Q<i;Q++)R[Q]=U.data[Q];return R.buffer};hI.Ss.uc=function(W){W=new Uint8Array(W);
|
|
var h=4,S=G.aU(W,h);h+=2;var k=[];for(var Q=0;Q<S;Q++){var p=hI.Ss.a1d(W,h+Q*16),I=W.buffer.slice(p.offset,p.offset+p.size),q=hI._e(I);
|
|
q=q?q:"bmp";if(q=="png"){var P=hI.J$(q),t=P.uc(I);p.GS=t[0]}else{var M=hI.J$("BMP").amu(I,0),I=N.U(p.s6*p.R_*4);
|
|
N.zt(new Uint8Array(M.data),new gj(0,0,M.rc.e,M.rc.Z),I,new gj(0,p.R_,p.s6,p.R_));M.data=I.buffer;M.rc.Z=p.R_;
|
|
p.GS=M}k.push(p)}k.sort(function(U,i){if(U.s6!=i.s6)return U.s6-i.s6;return U.a3v-i.a3v});return[k.pop().GS]};
|
|
hI.Ss.a1d=function(W,h){var S={};S.s6=W[h];h++;if(S.s6==0)S.s6=256;S.R_=W[h];h++;if(S.R_==0)S.R_=256;
|
|
S.al9=W[h];h++;h++;S.age=G.aU(W,h);h+=2;S.a3v=G.aU(W,h);h+=2;S.size=G.Tz(W,h);h+=4;S.offset=G.Tz(W,h);
|
|
h+=4;return S};hI.Ot={};hI.Ot.uc=function(W){var h=Date.now(),k,i=!0;if(N.raw.ht(W.byteLength))return[N.raw.asz(W)];
|
|
var S=UTIF.decode(W);if(S[0].t33421)k=S[0];else if(S[0].subIFD&&S[0].t271&&S[0].t271[0]=="Hasselblad"){k=S[0].subIFD[0];
|
|
k.t33421=[2,2]}else if(S[0].subIFD&&S[0].subIFD[0].t33421){k=S[0].subIFD[0];if(k.t50706==null){if(k.t258[0]==8)k.t258[0]=12}}else if(S[0].subIFD&&S[0].subIFD[0]&&S[0].subIFD[0].t262&&S[0].subIFD[0].t262[0]==34892)k=S[0].subIFD[0];
|
|
else if(S[0].subIFD&&S[0].subIFD[1]&&S[0].subIFD[1].t33421)k=S[0].subIFD[1];else if(S[0].subIFD&&S[0].subIFD[2]&&S[0].subIFD[2].t33421)k=S[0].subIFD[2];
|
|
else if(S[3]&&S[3].t50648){var p=S[0].exifIFD,I=p.makerNote;k=S[3];var q=I.t224[1],P=I.t224[2];k.t256=[q];
|
|
k.t257=[P];k.t258=[16];k.t259=[7];k.t262=[32803];k.t277=[1];k.t33421=[2,2];var t=k.t50656[0],M=N.raw.aP[t];
|
|
if(M==null)throw"e";k.t33422=M}if(k){UTIF.decodeImage(W,k,S);for(var U in S[0])if((U[0]=="t"||U[0]=="e"||U[0]=="d")&&k[U]==null)k[U]=S[0][U];
|
|
k.Z5=S[0].t274?S[0].t274[0]:1;return[k]}var z=1/256;for(var Q=0;Q<S.length;Q++)if(S[Q].t258&&S[Q].t258[0]==16&&S[Q].t277&&S[Q].t277[0]==1){}else i=!1;
|
|
if(i){var D=0,R=0,O=0;for(var Q=0;Q<S.length;Q++){UTIF.decodeImage(W,S[Q],S);var b=S[Q].data;for(var w=0;
|
|
w<b.length;w+=2){var A=b[w+1]<<8|b[w];if(A>D)D=A;R+=A;O++}}z=1/256*65535/(.5*D+.5*(2*R/O))}var g=[];
|
|
for(var Q=0;Q<S.length;Q++){var E=S[Q],j=72;UTIF.decodeImage(W,E,S);var x=E.t282,d=E.t296;if(x!=null&&d!=null){j=x[0][0]/x[0][1];
|
|
if(d[0]==3)j=Math.round(j/2.54)}if(E.width==null)continue;var L=UTIF.toRGBA8(E,z).buffer,_=b_.mW(E);
|
|
g.push({rc:new gj(0,0,E.width,E.height),data:L,H$:j,KC:_})}return g};hI.Ot.i4=function(W,h,S,k){if(k==null)k=[!1];
|
|
var p={},I=W[0];if(I[3]!=null&&k[0])p=b_.kq(I[3]);if(I[2]!=null){p.t282=p.t283=[[Math.round(I[2]),1]];
|
|
p.t296=[2]}return UTIF.encodeImage(I[0],h,S,p)};hI.Jw={};hI.Jw.gJ=!0;hI.Jw.uc=function(W,h){ed.D9(W,h)};
|
|
hI.Jw.acH=function(W,h,S,k){if(k==null)k=[!1,!1,!1,!1];if(!k[0])W.jc();var p=new a4,I=ed.I0(W,p,k);return[p.data.buffer,I]};
|
|
hI.Jw.i4=function(W,h,S,k){var p=hI.Jw.acH(W,h,S,k),I=p[0],q=p[1];return I.byteLength==q?I:I.slice(0,q)};
|
|
hI.oh={};hI.oh.gJ=!0;hI.oh.uc=function(W,h){var S=pako.inflate(new Uint8Array(W)),k=G.QA(S,0),p=G.QA(S,2),I=4;
|
|
h.e=G.d(S,I);I+=4;h.Z=G.d(S,I);I+=4;h.buffer=N.U(h.e*h.Z*4);var q=G.QA(S,I);I+=2;I+=4;for(var P=0;P<q;
|
|
P++){var t=h.yA(),R=0,v=1,X=2,V=3,H=0;h.g.push(t);var M=G.d(S,I);I+=4;var U=I,i=G.QA(S,U);U+=2;var z=G.Md(S,U,i);
|
|
U+=i;t.hq(z);var D=S[U];U++;if(D!=0&&D!=1)throw D;t.rect.x=G.GZ(S,U);U+=4;t.rect.y=G.GZ(S,U);U+=4;t.rect.e=G.d(S,U);
|
|
U+=4;t.rect.Z=G.d(S,U);U+=4;if(k>3){R=G.GZ(S,U);U+=4}t.opacity=Math.round(255*S[U]/100);U++;var O=S[U];
|
|
U++;t.NN(O!=0);t.oO="norm,lddg,norm,dark,diff,norm,hLit,norm,norm,lite,mul ,over,scrn,fsub".split(",")[S[U]];
|
|
U++;var b=S[U];U++;if(b)t.add.lspf=1<<31;if(k>3){var w=G.QA(S,U);U+=2;if(w!=0){var A=JSON.parse(G.Md(S,U,w));
|
|
U+=w;var g=A.text,E=A.textSettings,j=E.font,x=E.size,d=E.padding,L=parseInt(E.color.slice(1),16);t.add.lnsr="rend";
|
|
t.add.TySh=gf.hN(0,0);t.add.TySh.Ik=new gj(0,0,100,100);var _=t.add.TySh.A=new ex,T=t.rect.e/2,c=t.rect.Z/2;
|
|
_.translate(-T,-c);_.rotate(-R*Math.PI/180);_.translate(T,c);_.translate(t.rect.x+d,t.rect.y+d);var e=t.add.TySh.MW;
|
|
gf.fN(e,1);gf.hz(e,[0,0,t.rect.e-d*2,t.rect.Z]);gf.XK(e,0,g);var r=gf.Ql(e,0,1);r.D4.FontSize=x;r.D4.FillColor={Type:1,Values:[1,(L>>>16&255)/255,(L>>>8&255)/255,(L>>>0&255)/255]};
|
|
if(E.bold)j+="-Bold";gf.jq(r,j);r.MR.Justification=["left","right","center"].indexOf(E.align);gf.$n(e,0,g.length,r)}}var B=G.d(S,U);
|
|
U+=4;if(B!=t.rect.n()*4){for(var Q=t.rect.e;Q>t.rect.e/2;Q--){var F=B/(Q*4);if(F==Math.round(F)){t.rect.e=Q;
|
|
t.rect.Z=F;break}}}t.buffer=N.U(t.rect.n()*4);if(k>3){v=0;X=1;V=2;H=3}for(var Q=0;Q<B;Q+=4){t.buffer[Q]=S[U+Q+v];
|
|
t.buffer[Q+1]=S[U+Q+X];t.buffer[Q+2]=S[U+Q+V];t.buffer[Q+3]=S[U+Q+H]}U+=B;var o=G.d(S,U);U+=4;if(o==0&&k>3){I+=M;
|
|
continue}var J=S[U];U++;var C=G.QA(S,U);U+=2;if(o!=0){t.v=new $.Kt;t.v.rect=t.rect.clone();t.v.channel=N.U(t.rect.n());
|
|
for(var Q=0;Q<o;Q+=4)t.v.channel[Q>>>2]=S[U+Q+1];U+=o}if(J!=0){var Y=JSON.parse(hz.default);t.add.lmfx=Y;
|
|
for(var Q=0;Q<hz.order.length;Q++)Y[hz.BN[Q]]={t:"VlLs",v:[]};var K={"102":9,"101":2,"103":0,"104":3,"105":8};
|
|
for(var Q=0;Q<J;Q++){var u=G.QA(S,U),f=U+u+4,l=S.slice(U,f),jk=S[U+2];U+=3;var hE=K[jk+""],Z=JSON.parse(hz.Au[hE]);
|
|
Y[hz.BN[hE]].v.push({t:"Objc",v:Z});if(hE!=0){Z.Md.v.BlnM=hd.iN("norm");Z.Opct.v.val=S[U];U++;if(hE==9||hE==2){Z.Dstn.v.val=S[U+1];
|
|
U+=2}else U+=2;Z.blur.v.val=Math.round(S[U]*1.2);U++;if(hE==9||hE==2){Z.uglg.v=!1;Z.lagl.v.val=180-G.QA(S,U);
|
|
U+=2}Z.Clr.v=N.X.hg({p:S[U+1],z:S[U+2],S:S[U+3]})}else{Z.hglM.v.BlnM=Z.sdwM.v.BlnM=hd.iN("norm");U+=2;
|
|
var aQ=S[U++],jC=S[U++];Z.blur.v.val=Math.round(Math.sqrt(jC*aQ)*1.3);Z.srgR.v.val=Math.round(100*aQ/jC);
|
|
Z.uglg.v=!1;Z.lagl.v.val=180-G.QA(S,U);U+=2;Z.hglO.v.val=S[U++];Z.hglC.v=N.X.hg({p:S[U+1],z:S[U+2],S:S[U+3]});
|
|
U+=4;Z.sdwO.v.val=S[U++];Z.sdwC.v=N.X.hg({p:S[U+1],z:S[U+2],S:S[U+3]});U+=4}U=f}}if(U-I<M){var eO=G.d(S,U),iM=0;
|
|
U+=4;U++;var i=G.QA(S,U);U+=2;var g=G.Md(S,U,i);U+=i;g=g.replace(/\r/g,"\n");var i=G.QA(S,U);U+=2;var j=G.Md(S,U,i);
|
|
U+=i;var x=G.QA(S,U);U+=2;var iU=t.rect.x,gK=t.rect.e;if(eO&4)iM=1;if(eO&2)iM=2;var i5=Math.round(x*.4);
|
|
if(iM==0||iM==2)gK+=i5;if(iM==1||iM==2){gK+=i5;iU-=i5}t.add.lnsr="rend";t.add.TySh=gf.hN(0,0);t.add.TySh.Ik=new gj(0,0,100,100);
|
|
t.add.TySh.A=new ex(1,0,0,1,iU,t.rect.y+x*.25);var e=t.add.TySh.MW;gf.fN(e,1);gf.hz(e,[0,0,gK,t.rect.Z]);
|
|
gf.XK(e,0,g);var r=gf.Ql(e,0,1);r.D4.FontSize=x;r.D4.FillColor={Type:1,Values:[1,S[U+1]/255,S[U+2]/255,S[U+3]/255]};
|
|
U+=4;if(S[U+5])j+="-Bold";if(S[U+6])j+="-Italic";gf.jq(r,j);r.MR.Justification=iM;U+=8;gf.$n(e,0,g.length,r)}I+=M}};
|
|
hI.N3={};hI.N3.gJ=!0;hI.N3.uc=function(W,h){gq.D9(W,h)};hI.xO={};hI.xO.gJ=!0;hI.xO.uc=function(W,h){c1.D9(W,h)};
|
|
hI.yL={};hI.yL.gJ=!0;hI.yL.uc=function(W,h){bT.D9(W,h)};hI.tB={};hI.tB.gJ=!0;hI.tB.uc=function(W,h){j5.D9(W,h)};
|
|
hI.Cm={};hI.Cm.gJ=!0;hI.Cm.uc=function(W,h){cZ.D9(W,h)};hI.wf={};hI.wf.gJ=!0;hI.wf.uc=function(W,h){eF.D9(W,h)};
|
|
hI.$k={};hI.$k.gJ=!0;hI.$k.i4=function(W,h,S,k,p){if(k==null)k=[!0,!1,!1,!1,!0,!0];var I=e6.m0(W,{Ri:k[0],hidden:k[1],au5:k[2],acl:k[3],names:k[4],a7u:k[5],a5w:h,a5s:S},p.Tm);
|
|
return I};hI.$k.uc=function(W,h,S){e6.D9(W,h,S)};hI.Gd={};hI.Gd.gJ=!0;hI.Gd.uc=function(W,h){var S=150,k=new ex(1,0,0,-1,0,0);
|
|
k.scale(S/72,S/72);h.H$=S;var p=new aS(h,k,!0);FromPS.Parse(W,p)};hI.d2={};hI.d2.gJ=!0;hI.d2.i4=function(W,h,S,k,p){if(k==null)k=["",100,!1,!1,!1,0];
|
|
k[6]=["jpg"];var I=new ToPDF;iK.m0(W,k,I,p.Tm,h,S);return I.buffer};hI.d2.uc=function(W,h,S){var k=2;
|
|
while(!0){var p=k*72,I=new ex(1,0,0,-1,0,0);I.scale(p/72,p/72);h.H$=p;var q=new aS(h,I,!0);FromPDF.Parse(W,q);
|
|
var P=Math.max(h.e,h.Z);if(S&&P<Math.max(S[0],S[1])){h.g=[];var t=k;while(P*(k/t)<Math.max(S[0],S[1]))k++}else break}};
|
|
hI.eC={};hI.eC.gJ=!0;hI.eC.uc=function(W,h){var S=72,k=new ex(1,0,0,1,0,0);k.scale(S/72,S/72);h.H$=S;
|
|
var p=new aS(h,k,!1);FromWMF.Parse(W,p)};hI.Xs={};hI.Xs.rf=!0;hI.Xs.gJ=!0;hI.Xs.i4=function(W,h,S,k,p){if(k==null)k=["",100,!1,!1,!1,0];
|
|
k[6]=[];var I=new ToEMF;iK.m0(W,k,I,p.Tm);return I.buffer};hI.Xs.uc=function(W,h){var S=72,k=new ex(1,0,0,1,0,0);
|
|
k.scale(S/72,S/72);h.H$=S;var p=new aS(h,k,!1);FromEMF.Parse(W,p)};hI._q={};hI._q.gJ=!0;hI._q.uc=function(W,h){return i9.D9(W,h)};
|
|
hI.KW={};hI.KW.uc=function(W,h){var S=jt.D9(W),k=new Uint8Array(W),p=0,I,q,P,t,M,U,i,z,D=0,R=0,O=0,b=0,w=0;
|
|
for(var A=0;A<S.sub.length;A++){var g=S.sub[A],p=g.r;if(g.SI=="BMHD"){var E=[];for(var Q=0;Q<4;Q++)E[Q]=G.QA(k,p+2*Q);
|
|
p+=8;t=E[2];M=E[3];q=E[0];P=E[1];I=N.U(q*P*4);U=k[p++];i=k[p++];z=k[p++]}else if(g.SI=="CMAP")D=p;else if(g.SI=="CAMG"){var j=G.d(k,p);
|
|
R=j&32768,O=j&4,b=j&2048;w=j&128}else if(g.SI=="BODY"){var x=q+15>>>4<<1,d=U+i,L=N.U(x*P*d),e,B,F;jp.mB(k,p,g.size,L,0,L.length);
|
|
var _=U-2,T=(1<<_)-1,c=Math.round(255/T);for(var M=0;M<P;M++)for(var t=0;t<q;t++){var v=0;for(var X=0;
|
|
X<d;X++){var V=(M*d+X)*x*8+t,H=L[V>>>3]>>>7-(V&7)&1;v|=H<<X}var o=v>>>U,v=v&(1<<U)-1,Q=M*q+t,J=Q<<2;
|
|
if(D!=0){if(b!=0&&v>>>_!=0){var C=v>>>_,Y=(v&T)*c;if(C==1)F=Y;else if(C==2)e=Y;else if(C==3)B=Y}else{var Y=D+v*3;
|
|
e=k[Y+0];B=k[Y+1];F=k[Y+2]}}else{e=v>>>0&255;B=v>>>8&255;F=v>>>16&255}I[J+0]=e;I[J+1]=B;I[J+2]=F;I[J+3]=255}}}return[{rc:new gj(0,0,q,P),data:I.buffer}]};
|
|
hI.QF={};hI.QF.gJ=!1;hI.QF.i4=function(W,h,S,k){var p=W[0][4],I=new Uint8Array(W[0][0]),q=2,P=p?!0:!1,t=P?4:3,M=new Uint8Array(h*S*t);
|
|
for(var U=0;U<S;U++)for(var i=0;i<h;i++){var z=U*h+i<<2,D=((S-U-1)*h+i)*t;M[D]=I[z+2];M[D+1]=I[z+1];
|
|
M[D+2]=I[z+0];if(P)M[D+3]=p[0][U*h+i]}if(!0){var R=M.length,O=0,b=new Uint8Array(R*2),w=0,A=0,g=h*t;
|
|
while(A<R){var E=A,j=0,x=g*(Math.floor(A/g)+1);while(E<x&&j<128){var d=!0;for(var Q=0;Q<t;Q++)d=d&M[A+Q]==M[E+Q];
|
|
if(!d)break;E+=t;j++}if(j==1){var L=1;while(L<128&&A+(L+1)*t<x){var d=!0,_=A+L*t;for(var Q=0;Q<t;Q++)d=d&M[_+Q]==M[_+t+Q];
|
|
if(d)break;L++}b[w++]=L-1;for(var T=0;T<L;T++)for(var Q=0;Q<t;Q++)b[w++]=M[A++]}else{b[w++]=127+j;for(var Q=0;
|
|
Q<t;Q++)b[w+Q]=M[A+Q];w+=t;A+=t*j;O+=j}}M=b.slice(0,w);q+=8}var c=new Uint8Array(18+M.length+26);c[2]=q;
|
|
G.bQ(c,12,h);G.bQ(c,14,S);c[16]=t*8;c[17]=t==4?8:0;c.set(M,18);G.vq(c,18+M.length+8,"TRUEVISION-XFILE.");
|
|
return c.buffer};hI.QF.uc=function(W){var h=new Uint8Array(W),S=0,k=h[0],p=h[1],I=h[2],q=h[4]*256+h[3],P=h[6]*256+h[5],t=h[7],M=h[9]*256+h[8],U=h[11]*256+h[10],i=h[13]*256+h[12],z=h[15]*256+h[14],D=h[16],R=h[17],O=R>>>4,b=G.dP(h,18,k),w=N.U(i*z*4),S=18+k+(P*t>>>3),A=new Uint8Array(h.buffer,S);
|
|
if(I>3){var g=0,E=h,j=new Uint8Array(i*z*D>>>3),x=S,d=0,L=h.length,_=D>>>3;while(d<j.length){var g8=E[x];
|
|
x++;if(g8<128)for(var Q=0;Q<g8+1;Q++){for(var T=0;T<_;T++){j[d]=E[x];d++;x++}}else{for(var Q=0;Q<g8-127;
|
|
Q++){for(var T=0;T<_;T++){j[d]=E[x+T];d++}}x+=_}}I-=8;A=j;S=x}else S+=i*z*D>>>3;var c=new Uint8Array(4),e=hI.QF.atM;
|
|
for(var r=0;r<z;r++)for(var B=0;B<i;B++){var F=(O&2)==0?(z-r-1)*i+B:r*i+B,v=r*i+B,X,V,H,o=255,J=F*D>>>3;
|
|
if(I==1){var C=0;if(D==8)C=A[J];else throw"e";e(h,18+k+q+(C*t>>>3),t,c);X=c[0];V=c[1];H=c[2];o=c[3]}else if(I==2){e(A,J,D,c);
|
|
X=c[0];V=c[1];H=c[2];o=c[3]}else if(I==3){if(D==8)X=V=H=A[J];else throw"e"}var Y=v*4;w[Y]=X;w[Y+1]=V;
|
|
w[Y+2]=H;w[Y+3]=o}var c={rc:new gj(0,0,i,z),data:w.buffer,Bd:b};if(N.V6(w)){var K=N.U(i*z);N.sN(w,K,3);
|
|
N.wM(w,4278190080,16777215);c.BS=[K]}return[c]};hI.QF.atM=function(W,h,S,k){var p,I,q,P=255;if(S==24||S==32){q=W[h];
|
|
I=W[h+1];p=W[h+2];if(S==32)P=W[h+3]}else if(S==16){var t=W[h+1]<<8|W[h+0];p=t>>>10&31;I=t>>>5&31;q=t>>>0&31;
|
|
p=Math.round(p*(255/31));I=Math.round(I*(255/31));q=Math.round(q*(255/31))}else throw"e";k[0]=p;k[1]=I;
|
|
k[2]=q;k[3]=P};hI.asy=function(){var W,h=[],S=!1;function k(q,P,t,M){W=t;h.push(q,M);p()}function p(){if(S||h.length==0)return;
|
|
S=!0;hI.alc(h.shift(),"image/avif",I)}function I(q){W(null,[q],h.shift());S=!1;p()}return{gJ:!1,Aq:!0,uc:k}}();
|
|
hI.aic=function(){var W,h=[],S=!1,k,p,I,q,P,t;function M(D,R,O,b){W=O;h.push(D,b);U()}function U(){if(S||h.length==0)return;
|
|
S=!0;k=document.createElement("canvas");p=k.getContext("2d");I=document.createElement("video");var D="data:"+"video/mp4"+";base64,"+hI.IH(h.shift());
|
|
I.src=D;I.muted=!0;I.currentTime=0;I.addEventListener("canplay",i,!1);I.addEventListener("timeupdate",z,!1)}function i(D){I.removeEventListener("canplay",i);
|
|
q=k.width=I.videoWidth;P=k.height=I.videoHeight;t=[];I.play()}function z(D){var R=10;p.drawImage(I,0,0);
|
|
t.push({Bd:"_a_"+t.length+","+Math.round(1e3/R),rc:new gj(0,0,q,P),data:p.getImageData(0,0,q,P).data.buffer});
|
|
var O=I.currentTime+1/R;if(O<I.duration)I.currentTime=O;else{W(null,t,h.shift());I.removeEventListener("timeupdate",z);
|
|
S=!1;U();t=null}}return{gJ:!1,Aq:!0,uc:M}}();hI.wA={};hI.wA.uc=function(W){var h=new Uint8Array(W),S=0,k=112,p=42,I=G.Tz,U;
|
|
S+=8;var q=h[S];S++;if(q!=p)throw"e";var P=I(h,S);S+=4;var t=G.dC(h,S,P);S+=P*2;var M=[];while(S<h.length){U=I(h,S);
|
|
S+=4;if(U!=k)throw U;S+=4;U=h[S];S++;if(U!=p)throw U;var i=I(h,S);S+=4;var z=h[S];S++;if(z!=p){S-=5;
|
|
i=I(h,S);S+=8;U=h[S];S++;if(U!=p)throw U}var D=I(h,S)*2;S+=4;if(i>0)M.push(S+D);S+=D+i}var R=new DOMParser,O=R.parseFromString(t,"image/svg+xml").firstChild.firstChild,b=[];
|
|
hI.wA.Ac(O,h,M,b);return b};hI.wA.Ac=function(W,h,S,k){var p=W.firstChild.firstChild;if(p.tagName=="Image"){var I=p.getElementsByTagName("ImageDescription")[0],q=I.children[0].children,P=I.children[1].children,t=S.shift(),M=[];
|
|
for(var Q=0;Q<P.length;Q++)M.push(parseInt(P[Q].getAttribute("NumberOfElements")));while(M.length>3)M[2]*=M.pop();
|
|
var U=q.length,i=M[0],z=M[1],D=M[2],R=parseInt(P[0].getAttribute("BytesInc"));for(var O=0;O<D;O++){var b=N.U(i*z*4);
|
|
N.wM(b,4278190080);for(var w=0;w<U;w++){var A=N.U(i*z);if(R==1)for(var g=0;g<A.length;g++)A[g]=h[t+g];
|
|
else if(R==2)for(var g=0;g<A.length;g++)A[g]=Math.min(255,(h[t+g*2+1]<<8|h[t+g*2])>>>2);else throw R;
|
|
if(w!=3)N.ce(A,b,w);if(U==1){N.ce(A,b,1);N.ce(A,b,2)}t+=i*z*R}k.push({rc:new gj(0,0,i,z),data:b.buffer})}}else{var E=W.children,j=0;
|
|
while(j<E.length&&E[j].tagName!="Children")j++;if(j==E.length)throw"e";E=E[j].children;for(var x=0;x<E.length;
|
|
x++)hI.wA.Ac(E[x],h,S,k)}};hI.FQ={};hI.FQ.uc=function(W){var h=new Uint8Array(W),S=0,k={},U=1e9;for(var Q=0;
|
|
Q<306;Q++){var p=G.dP(h,S,8).trim(),I=G.dP(h,S+9,71).split("/")[0].trim();k[p]=I;S+=80;if(p=="END"){S=Math.ceil(S/2880)*2880;
|
|
break}}var q=parseInt(k.NAXIS1),P=parseInt(k.NAXIS2),t=q*P,M=parseInt(k.BITPIX),i=-1e9,z=new Float32Array(t),D=new Float32Array(W,S,W.byteLength-S>>>2);
|
|
for(var Q=0;Q<t;Q++){var R=Q<<2,O=Q<<1;if(M==-32){var b=h[S+R+0];h[S+R+0]=h[S+R+3];h[S+R+3]=b;var b=h[S+R+1];
|
|
h[S+R+1]=h[S+R+2];h[S+R+2]=b;z[Q]=D[Q]}else if(M==16){z[Q]=G.aU(h,S+O)}else throw M;var w=z[Q];if(w<U)U=w;
|
|
if(w>i)i=w}var A=N.U(t*4),g=1/i;for(var E=0;E<P;E++)for(var j=0;j<q;j++){var Q=E*q+j,x=(P-E-1)*q+j,R=x<<2,w=z[Q]*g;
|
|
A[R]=A[R+1]=A[R+2]=255*w;A[R+3]=255}return[{rc:new gj(0,0,q,P),data:A,Bd:k.OBJECT}]};hI.N8={};hI.N8.uc=function(W){var h=new Uint8Array(W),S=16,k=G.dP(h,S,4),I=32,w=0,A=0,g=!1,V;
|
|
S+=4;var p=G.dP(h,S,8);S+=8;while(h[S+I-1]==0)I--;var q=G.dP(h,S,I);S+=32;var P=G.dP(h,S,4);S+=4;S+=20;
|
|
var t=G.d(h,S);S+=4;var M=G.d(h,S);S+=4;var U=G.d(h,S);S+=4;var i=G.d(h,S);S+=4;var z=G.d(h,S);S+=4;
|
|
var D=G.d(h,S);S+=4;var R="FujiFilm "+q,O=[0,1,1,2];if(R=="FujiFilm X10"){R="FujiFilm FinePix X10";O=[2,1,1,0]}var b={t271:["FujiFilm"],t272:[R],t277:[1],t33421:[2,2],t33422:O,Z5:1};
|
|
S=U;var E=[],j=G.QA,x=G.d(h,S);S+=4;for(var Q=0;Q<x;Q++){var d=j(h,S);S+=2;var L=j(h,S);S+=2;if(d==256){A=j(h,S);
|
|
w=j(h,S+2)}else if(d==272){E=[j(h,S),j(h,S+2)]}else if(d==273){E.push(j(h,S),j(h,S+2))}else if(d==304){g=!(h[S]>>>7)}else if(d==305){var _=Math.round(Math.sqrt(L)),T=[];
|
|
for(var c=0;c<L;c++)T.push(h[S+c]);T.reverse();b.t33421=[_,_];b.t33422=T}else if(d==12272){var e=j(h,S),r=j(h,S+2),B=j(h,S+6);
|
|
b.t50728=[e/r,1,e/B]}S+=L}var F=w<A,v=h.slice(z,z+D),X=Math.round(D*8/(w*A));if(v[0]==73&&v[1]==73&&v[2]==42){V=UTIF.decode(v.buffer)[0].fujiIFD;
|
|
X=V.t61443[0];var H=V.t61454,o=V.t61450;if(o)b.t50714=o;if(H)b.t50728=[H[0]/H[1],1,H[0]/H[2]];var J=V.t61447[0];
|
|
v=v.slice(J,J+V.t61448[0])}var D=v.length,C=D*8<w*A*X;if(C){console.log("compressed");var Y=b.t33422,K=~~Math.sqrt(Y.length),u=[];
|
|
for(var Q=0;Q<K;Q++)u[Q]=Y.slice(Q*K,Q*K+K);v=new Uint8Array(UTIF._decompressRAF(v,u).buffer);D=v.length}function f(aQ,jC,eO){eO=eO<<8-(jC&7);
|
|
var iU=jC>>>3;aQ[iU]|=eO>>>16;aQ[iU+1]|=eO>>>8;aQ[iU+2]|=eO}var l=D*8/(w*A);if(l==16)for(var Q=0;Q<D;
|
|
Q+=2){var jk=v[Q];v[Q]=v[Q+1];v[Q+1]=jk}else if(l==14){for(var Q=0;Q<D;Q+=4){var jk=v[Q];v[Q]=v[Q+3];
|
|
v[Q+3]=jk;jk=v[Q+1];v[Q+1]=v[Q+2];v[Q+2]=jk}}else if(l==12)for(var Q=0;Q<D;Q+=3){var hE=v[Q+2]<<16|v[Q+1]<<8|v[Q+0];
|
|
hE=hE>>>12|(hE&4095)<<12;v[Q]=hE>>>16&255;v[Q+1]=hE>>>8&255;v[Q+2]=hE&255}if(F)v=hI.N8.aa0(v,w,A);var Z=F?2:1;
|
|
w*=Z;b.t256=[w];b.t257=[A];b.t258=[X];b.t50719=[E[1],E[0]*Z];b.t50720=[E[3],E[2]*Z];b.width=w;b.height=A;
|
|
b.data=new Uint8Array(v.buffer);return[b]};hI.N8.aa0=function(W,h,S){W=new Uint16Array(W.buffer);var k=new Uint16Array(h*S*2);
|
|
for(var p=0;p<S;p+=2)for(var I=0;I<h;I++){var q=p*h+I,P=q*2,t=W[q],M=W[q+h];k[P+1]=k[P+2*h]=M;if(((p>>>1)+I&1)==0){k[P]=t;
|
|
k[P+2*h+1]=W[q+1]}else{k[P]=W[q-1];k[P+2*h+1]=t}}return k};hI.ww={};hI.ww.rf=!0;hI.ww.i4=function(W,h,S,k){var p=new Uint8Array(W[0][0]),I=h*S,q=[1,3,4][k[0]],P=8+8*k[1],t=k[2];
|
|
if(q==1){var M=new Uint8Array(h*S);N.sN(p,M,0);p=M}if(q==3){var M=new Uint8Array(h*S*3);for(var Q=0;
|
|
Q<I;Q++){var U=Q*4,i=Q*3;M[i]=p[U];M[i+1]=p[U+1];M[i+2]=p[U+2]}p=M}if(P==16){var z=p.length,M=new Uint8Array(z*2);
|
|
for(var Q=0;Q<z;Q++){var D=Math.round(p[Q]*(65535/255));M[Q*2+t]=D>>>8;M[Q*2+1-t]=D&255}p=M}return p.buffer};
|
|
hI.yd={};hI.yd.uc=function(W,h){function S(t){return~~(.5+N.HE(Math.max(0,Math.min(1,t)))*255)}var k=EXRLoader.parse(W),p=k.width,I=k.height,q=N.U(p*I*4);
|
|
for(var P=0;P<I;P++)for(var t=0;t<p;t++){var Q=(P*p+t)*4,M=((I-P-1)*p+t)*4;q[Q]=S(k.data[M+0]);q[Q+1]=S(k.data[M+1]);
|
|
q[Q+2]=S(k.data[M+2]);q[Q+3]=S(k.data[M+3])}return[{rc:new gj(0,0,p,I),data:q.buffer}]};hI.Jm={};hI.Jm.rf=!0;
|
|
hI.Jm.gJ=!0;hI.Jm.i4=function(W,h,S,k,p){k=["",100,!1,!1,!1,0];k[6]=["jpg"];var I=new ToDXF;iK.m0(W,k,I,p.Tm);
|
|
return I.buffer};hI.Jm.uc=function(W,h){var S=72,k=new ex(1,0,0,1,0,0);k.scale(S/72,S/72);h.H$=S;var p=new aS(h,k,!1);
|
|
FromDXF.Parse(W,p)};hI.FS={};hI.FS.uc=function(){var W=G.aU,h=G.Tz,S=G.dP,k;function p(q,P,t,M,U){var i=h(q,t),z=h(q,t+4),D=h(q,t+8),R=W(q,t+12),O=W(q,t+14);
|
|
t+=16;var b={};for(var Q=0;Q<R+O;Q++){var w=h(q,t),A=h(q,t+4),g,E;if(w>>>31==1){w=w&16777215}if(Q<R)g=G.dC(q,P+w+2,W(q,P+w));
|
|
else g="id"+w;var j=M.slice(0);j.push(g);if(A>>>31==1){A=A&268435455;E=p(q,P,P+A,j,U)}else{var x=h(q,P+A),d=h(q,P+A+4),L=h(q,P+A+8),_=h(q,P+A+12);
|
|
if(_!=0)throw"e";if(x<U[0]||x>U[0]+U[1])throw"e";var T=U[2]+x-U[0];E=q.slice(T,T+d);var c=hI._e(E.buffer);
|
|
if(c&&["bmp","png","ico"].indexOf(c)!=-1){var e=hI.J$(c);if(!e.gJ){var r=null;try{r=e.uc(E.buffer)}catch(dq){}if(r){r[0].Bd=j[1];
|
|
k.push(r[0])}}}else if(c)console.log(c)}b[g]=E;t+=8}return b}function I(q){k=[];var P=new Uint8Array(q),t=0,M=W(P,t);
|
|
t+=2;t+=58;var U=h(P,t);t+=4;t=U;var i=S(P,t,4);t+=4;var z=W(P,t);t+=2;var D=W(P,t);t+=2;var R=h(P,t);
|
|
t+=4;var O=h(P,t);t+=4;var b=h(P,t);t+=4;var w=W(P,t);t+=2;var A=W(P,t);t+=2;t+=w;var g={};for(var Q=0;
|
|
Q<D;Q++){var E=t;while(P[E]!=0)E++;var j=S(P,t,E-t),x=h(P,t+8),d=h(P,t+12),L=h(P,t+16),_=h(P,t+20),T=h(P,t+24),c=h(P,t+28),e=W(P,t+32),r=W(P,t+34),A=h(P,t+36);
|
|
g[j]=[d,x,_,L,A];if(T+c!=0)throw"e";t+=40}for(var B in g){var F=g[B];t=F[2];if(B==".rsrc"){var v=p(P,t,t,[],F),X="id134"}}return k}return I}();
|
|
hI.Gg={};hI.Gg.gJ=!0;hI.Gg.uc=function(W,h){dk.D9(W,h)};(function(){var W=hI.dB.get("wasm/zstd").buffer;
|
|
WebAssembly.instantiate(W).then(function(h){var S=h.instance.exports;hI.Gg.ae$=S})}());hI.Gg.Pi=function(W,h){var S=hI.Gg.ae$,k=W.length,p=S.memory,I=2*k+1e6,t=8;
|
|
hI.MQ(S,I);var q=new Uint8Array(p.buffer),P=S.malloc(k);q.set(W,P);while(!0){var M=h==null?k*t:h;hI.MQ(S,I+M);
|
|
var U=S.malloc(M),i=S.ZSTD_decompress(U,M,P,k);if(i==-70){S.free(U);t+=t>>>1;if(h!=null)throw"error"}else{q=new Uint8Array(p.buffer);
|
|
W=q.slice(U,U+i);S.free(U);break}}S.free(P);return W};hI.cs={};hI.cs.gJ=!0;hI.cs.uc=function(){var W=0,h=1,S=2,k=3,p=4,I=5,q=6,P=7,t=1,M=2,U=7,i=8,z=9,D,R,O,b,w;
|
|
function A(){var g8=G.Ve(D,R);R+=4;return g8}function g(){var V=0,H=0;for(var Q=0;Q<5;Q++){var o=D[R++];
|
|
V+=(o&127)<<H;H+=7;if((o&128)==0)break}return V}function E(){var V=g(),H=G.Md(D,R,V);R+=V;return H}function j(){return{typeName:E(),aqT:A()}}function x(){var V=A(),H=E(),o=[],J=A();
|
|
for(var Q=0;Q<J;Q++)o.push([E()]);return{id:V,ft:H,ara:o}}function d(V){var H=V.ara,o=[];for(var Q=0;
|
|
Q<H.length;Q++)H[Q].push(D[R++]);for(var Q=0;Q<H.length;Q++){var J=H[Q][1],C;H[Q].push(L(J))}}function L(V){var H;
|
|
if(V==W)H=D[R++];else if(V==k)H=E();else if(V==p)H=j();else if(V==h||V==S||V==q||V==I){}else throw V;
|
|
return H}function _(V,H,o){var J;if(V==W){if(H==t)J=D[R++]==1;else if(H==M){J=D[R++]}else if(H==i)J=A();
|
|
else if(H==z){J=A();A()}else throw H}else if(V==k){J=r(o+1)}else if(V==p){J=r(o+1)}else if(V==I){J=r(o+1)}else if(V==h){J=r(o+1)}else if(V==q){J=r(o+1)}else throw V;
|
|
return J}function T(V,H){var o=O["c"+V],J=o.ara,C={_class:o.ft};for(var Q=0;Q<J.length;Q++){var Y=J[Q],K=Y[1],u=Y[2],f=_(K,u,H),l=Y[0];
|
|
C[l]=f}return C}function c(V,H,o,J){var C=[];for(var Q=0;Q<V;Q++){var Y=_(H,o,J);if(Y.fJ&&Y.fJ=="null_count"){var K=Y.Fv;
|
|
for(var u=0;u<K;u++)C.push(null);Q+=K-1}else C.push(Y)}return C}function e(){return[A(),A()]}function r(V){if(V==null)throw"e";
|
|
var H=null,o=D[R],J=null;R++;if(o==0){var C=A(),Y=A(),K=A(),u=A();H=[C,Y,K,u]}else if(o==1){J=A();var f=A();
|
|
H=T(f,V)}else if(o==4){var l=x();J=l.id;d(l);O["c"+l.id]=l;H=T(l.id,V)}else if(o==5){var l=x();J=l.id;
|
|
d(l);var jk=A();O["c"+l.id]=l;H=T(l.id,V)}else if(o==6){J=A();var hE=E();H=hE}else if(o==7){J=A();var Z=D[R++];
|
|
if(Z!=0)throw Z;var aQ=A();if(aQ!=1)throw aQ;var jC=A(),eO=D[R++],iU=L(eO);H=c(jC,eO,iU,V)}else if(o==9){var gK=A();
|
|
H={fJ:"ref",Fv:gK};w["o"+gK]=!0}else if(o==10){H={fJ:"null_count",Fv:1}}else if(o==11){H={fJ:"end"}}else if(o==12){var jk=A(),iM=E()}else if(o==13){var i5=D[R++];
|
|
H={fJ:"null_count",Fv:i5}}else if(o==16){var fN=e();J=fN[0];H=c(fN[1],p,null,V)}else if(o==17){var fN=e();
|
|
J=fN[0];H=c(fN[1],h,null,V)}else throw"e";if(J!=null&&J>0){if(b["o"+J]!=null)throw"e";b["o"+J]=H}return H}function B(V,b){if(V instanceof Array){for(var Q=0;
|
|
Q<V.length;Q++)V[Q]=F(V[Q],b)}else if(V instanceof Object){for(var H in V)V[H]=F(V[H],b)}}function F(V,b){if(V&&V.fJ&&V.fJ=="ref")return b["o"+V.Fv];
|
|
else return V}function v(V,H,o){D=new Uint8Array(V);R=0;O={};b={};w={};var J=G.dP(D,0,4);if(J!="PDN3")throw J;
|
|
R+=4;var C=G.aU(D,R)+D[R+2]*256*256;R+=3;var Y=G.dP(D,R,C);R+=C;R+=2;while(!0){var K=r(0);if(K&&K.fJ&&K.fJ=="end")break}for(var u in w)if(b[u]==null)throw u;
|
|
for(var u in b)B(b[u],b);var f=b.o1;console.log(f);H.e=f.width;H.Z=f.height;H.buffer=N.U(H.e*H.Z*4);
|
|
var l=f.layers["ArrayList+_items"];for(var Q=0;Q<l.length;Q++){var jk=l[Q];if(jk==null)continue;console.log(jk);
|
|
var hE=jk["Layer+width"],Z=jk["Layer+height"],aQ=jk["Layer+properties"],jC=jk.properties,eO=jC.blendOp._class.split("+").pop();
|
|
eO=eO.slice(0,eO.length-7);var iU={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"}[eO],gK=H.yA();
|
|
gK.hq(aQ.name);gK.opacity=aQ.opacity;gK.NN(aQ.visible);gK.oO=iU;var iM=1<<16,i5=Math.ceil(hE*Z/iM);gK.rect=new gj(0,0,hE,Z);
|
|
gK.buffer=N.U(hE*Z*4);var fN=gK.buffer;R+=5;for(var dx=0;dx<i5;dx++){var ai=X();fN.set(ai[1],ai[0]*iM*4)}for(var hO=0;
|
|
hO<fN.length;hO+=4){var ff=fN[hO+0];fN[hO+0]=fN[hO+2];fN[hO+2]=ff}H.g.push(gK)}}function X(){var V=G.d(D,R);
|
|
R+=4;var H=G.d(D,R);R+=4;var o=pako.inflateRaw(D.slice(R+10));R+=H;return[V,o]}return v}();var n={};
|
|
n.O9=!1;n.Cr=!1;n.Cc=!1;n.N=document.createElement("canvas");n.ds=null;n.rb=null;n.so=0;(function(){var W={alpha:!0,antialias:!1,depth:!1,premultipliedAlpha:!1},h;
|
|
if(!h)h=n.N.getContext("webgl",W);if(!h)h=n.N.getContext("experimental-webgl",W);if(h){n.O9=!0;n.Cr=!0;
|
|
n.ds=h;n.rb=h.createFramebuffer();h.bindFramebuffer(h.FRAMEBUFFER,n.rb);h.disable(h.BLEND);h.disable(h.DEPTH_TEST);
|
|
var S=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,S);h.bufferData(h.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),h.STATIC_DRAW);
|
|
h.enableVertexAttribArray(0);h.vertexAttribPointer(0,2,h.FLOAT,!1,0,0)}}());n.a94=function(W){W=W.replace(/\s\s+/g," ");
|
|
W=W.replace(/; /g,";");W=W.replace(/} /g,"}");W=W.replace(/ }/g,"}");W=W.replace(/{ /g,"{");W=W.replace(/ {/g,"{");
|
|
W=W.replace(/= /g,"=");W=W.replace(/ =/g,"=");W=W.replace(/\| /g,"|");W=W.replace(/ \|/g,"|");return W};
|
|
n.a6f=function(W){var h=n.ds;if(W>h.getParameter(h.MAX_TEXTURE_SIZE)){n.O9=!1;alert("Disabling WebGL")}};
|
|
n.lV=function(W,h){return new Float32Array([(W.x-h.x)/h.e,(W.y-h.y)/h.Z,W.e/h.e,W.Z/h.Z])};n.hi=function(){return this.N};
|
|
n.Wf=function(W,h){var S=n.ds;S.bindFramebuffer(S.FRAMEBUFFER,n.rb);S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,W.hr,0);
|
|
S.viewport(0,0,W.e,W.Z);if(h){S.enable(S.SCISSOR_TEST);S.scissor(h.x,h.y,h.e,h.Z)}else S.disable(S.SCISSOR_TEST)};
|
|
n.H3=function(W,h,S){if(S)throw"error";var k=n.ds;k.disable(k.SCISSOR_TEST);k.bindFramebuffer(k.FRAMEBUFFER,null);
|
|
k.viewport(0,0,W,h);if(S){k.enable(k.SCISSOR_TEST);k.scissor(S.x,S.y,Math.round(S.e),Math.round(S.Z))}else k.disable(k.SCISSOR_TEST)};
|
|
n.clear=function(){var W=n.ds;W.clearColor(0,0,0,0);W.clear(W.COLOR_BUFFER_BIT)};n.Ds=function(W,h){if(h==null)h=0;
|
|
var S=(h>>>0&255)==0,k=(h>>>8&255)==0,p=(h>>>16&255)==0,I=(h>>>24&255)==0,q=(W>>>0&255)*(1/255),P=(W>>>8&255)*(1/255),t=(W>>>16&255)*(1/255),M=(W>>>24&255)*(1/255),U=n.ds;
|
|
U.colorMask(S,k,p,I);U.clearColor(q,P,t,M);U.clear(U.COLOR_BUFFER_BIT);U.colorMask(!0,!0,!0,!0)};n.M$=function(W,h,S,k,p){var I=h.r$(k);
|
|
if(p)I=I.r$(p);if(I.ZP())return;var q=n.ds;n.Wf(W);q.bindTexture(q.TEXTURE_2D,S.hr);q.copyTexSubImage2D(q.TEXTURE_2D,0,I.x-k.x,I.y-k.y,I.x-h.x,I.y-h.y,I.e,I.Z)};
|
|
n.kO=function(Q,W,h){var S=n.ZE[Q];if(S==null||S.e!=W||S.Z!=h){if(S)S.delete();S=new n.qr(W,h)}n.ZE[Q]=S;
|
|
return S};n.ZE=[];n.Ef=function(){this.db=null;this.OE=null};n.Ef.x7=null;n.Ef.prototype.Sa=function(W){if(this.OE)return;
|
|
this.OE={};var h=n.ds,S=this.db,k=this.OE;for(var Q=0;Q<W.length;Q++){var p=W[Q];k[p]=h.getUniformLocation(S,p)}};
|
|
n.Ef.prototype.B6=function(){};n.Ef.prototype.z4=function(W){var h=n.ds;for(var Q=0;Q<W.length;Q+=2){h.uniform1i(W[Q],Q>>>1);
|
|
h.activeTexture(h["TEXTURE"+(Q>>>1)]);h.bindTexture(h.TEXTURE_2D,W[Q+1])}h.activeTexture(h.TEXTURE0)};
|
|
n.Ef.prototype.MZ=function(W,h){var S=n.ds,k=S.createShader(S.FRAGMENT_SHADER);S.shaderSource(k,W);S.compileShader(k);
|
|
if(!S.getShaderParameter(k,S.COMPILE_STATUS))console.log(S.getShaderInfoLog(k));var p=S.createShader(S.VERTEX_SHADER);
|
|
S.shaderSource(p,h);S.compileShader(p);if(!S.getShaderParameter(p,S.COMPILE_STATUS))console.log(S.getShaderInfoLog(p));
|
|
var I=S.createProgram();S.attachShader(I,p);S.attachShader(I,k);S.linkProgram(I);if(!S.getProgramParameter(I,S.LINK_STATUS))console.log("Could not initialise shaders");
|
|
this.db=I};n.Ef.prototype.Gz=function(){if(n.Ef.x7!=this){n.ds.useProgram(this.db);n.Ef.x7=this}};n.bG=function(W,h){n.Ou++;
|
|
n.so+=W*h;if(n.Cc)console.log("GL.Channels instances: "+n.Ou+", memory: "+n.so);var S=n.ds;this.e=W;
|
|
this.Z=h;this.hr=S.createTexture();this.LQ=null;this.hp(this.hr,W,h)};n.bG.prototype.hp=function(W,h,S){var k=n.ds;
|
|
k.bindTexture(k.TEXTURE_2D,W);k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST);k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST);
|
|
k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE);k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE);
|
|
k.texImage2D(k.TEXTURE_2D,0,k.ALPHA,h,S,0,k.ALPHA,k.UNSIGNED_BYTE,null)};n.bG.prototype.set=function(W){var h=n.ds;
|
|
h.bindTexture(h.TEXTURE_2D,this.hr);h.pixelStorei(h.UNPACK_ALIGNMENT,1);h.texImage2D(h.TEXTURE_2D,0,h.ALPHA,this.e,this.Z,0,h.ALPHA,h.UNSIGNED_BYTE,W);
|
|
h.pixelStorei(h.UNPACK_ALIGNMENT,4)};n.bG.prototype.delete=function(){var W=n.ds;if(this.hr){W.deleteTexture(this.hr);
|
|
n.Ou--;n.so-=this.e*this.Z}if(n.Cc)if(n.Cc)console.log("GL.Channels instances: "+n.Ou+", memory: "+n.so*4)};
|
|
n.Ou=0;n.qr=function(W,h,S){if(S==null)S=!1;n.Ou++;n.so+=W*h*4;if(n.Cc)console.log("GL.Channels instances: "+n.Ou+", memory: "+n.so);
|
|
var k=n.ds;this.a63=S;this.e=W;this.Z=h;this.hr=k.createTexture();this.LQ=null;this.hp(this.hr,W,h)};
|
|
n.qr.prototype.set=function(W,h){var S=n.ds;S.disable(S.SCISSOR_TEST);S.bindTexture(S.TEXTURE_2D,this.hr);
|
|
if(W==null||W instanceof Uint8Array){var k=this.e*this.Z;if(h==null||h.n()*10>k)S.texImage2D(S.TEXTURE_2D,0,S.RGBA,this.e,this.Z,0,S.RGBA,S.UNSIGNED_BYTE,W);
|
|
else{var p=N.U(h.n()*4);N.zt(W,new gj(0,0,this.e,this.Z),p,h);S.texSubImage2D(S.TEXTURE_2D,0,h.x,h.y,h.e,h.Z,S.RGBA,S.UNSIGNED_BYTE,p)}}else S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,W)};
|
|
n.qr.prototype.get=function(W){var h=n.ds;n.Wf(this);h.readPixels(0,0,this.e,this.Z,h.RGBA,h.UNSIGNED_BYTE,W)};
|
|
n.qr.prototype.rh=function(W){if(W.ZP())return;var h=n.ds;if(this.LQ==null){this.LQ=h.createTexture();
|
|
this.hp(this.LQ,this.e,this.Z);n.Ou++;n.so+=this.e*this.Z*4}h.bindFramebuffer(h.FRAMEBUFFER,n.rb);h.bindTexture(h.TEXTURE_2D,this.LQ);
|
|
if(W){var S=Math.max(W.x,0),k=Math.max(W.y,0);h.copyTexSubImage2D(h.TEXTURE_2D,0,S,k,S,k,W.e,W.Z)}else h.copyTexImage2D(h.TEXTURE_2D,0,h.RGBA,0,0,this.e,this.Z,0)};
|
|
n.qr.prototype.hp=function(W,h,S){var k=n.ds;k.bindTexture(k.TEXTURE_2D,W);k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,this.a63?k.LINEAR:k.NEAREST);
|
|
k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST);k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE);
|
|
k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE);k.texImage2D(k.TEXTURE_2D,0,k.RGBA,h,S,0,k.RGBA,k.UNSIGNED_BYTE,null)};
|
|
n.qr.prototype.delete=function(){var W=n.ds;if(this.hr){W.deleteTexture(this.hr);n.Ou--;n.so-=this.e*this.Z*4}if(this.LQ){W.deleteTexture(this.LQ);
|
|
n.Ou--;n.so-=this.e*this.Z*4}if(n.Cc)if(n.Cc)console.log("GL.Channels instances: "+n.Ou+", memory: "+n.so)};
|
|
n.qr.prototype.clone=function(){var W=n.ds,h=new n.qr(this.e,this.Z);n.Wf(this);W.bindTexture(W.TEXTURE_2D,h.hr);
|
|
W.copyTexImage2D(W.TEXTURE_2D,0,W.RGBA,0,0,this.e,this.Z,0);return h};n.GA={a4c:" 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))) ); } ",apA:" vec3 ocddg(vec3 a, vec3 b, float f) { return mix( min(ONE3, b/(ONE3 - a*f)) , ONE3 , vec3(equal(a*f,ONE3 )) ); } ",Y2:"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) ;",AP:" 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}",sz:" 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 )); } ",Dg:"float sat(vec3 c) { return max(c.x,max(c.y,c.z)) - min(c.x,min(c.y,c.z)); }",AN:"float lum(vec3 c) { return dot(c, vec3(0.3,0.59,0.11)); } ",nS:"vec3 D (vec3 x) { return mix( sqrt(x), ((16.0*x-12.0)*x+4.0)*x , vec3(lessThanEqual(x,QUAR3)) ); }",a4t:"float midSat (vec3 v, float s) { return ((v.y-v.z)*s)/(v.x-v.z); }",Hb:"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}",adJ:"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}",ej:"vec3 setLum (vec3 c, float l) { return clipCol(c+l-lum(c)); } ",CK:"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); }",DB:"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); }",Gm:"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); } ",GR:"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}",ZY:"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); }",qu:"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); }",bJ:"\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}",a2L:" mat3 rgbToYuv = mat3(0.299, -0.147, 0.615, 0.587, -0.289, -0.515, 0.114, 0.436, -0.100 ); ",a9n:" mat3 yuvToRgb = mat3(1.0, 1.0, 1.0, 0.0, -0.3946, 2.03199, 1.1398, -0.5805, -0.00048 ); ",Ez:"\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}"};
|
|
n.a={};n.a.eq={};n.a.IJ=null;n.a.Tb=null;n.a.To=null;n.a.SK=function(W,h,S,k,p,I,q,P){if(P==null)P=jO.Kn();
|
|
if("idiv,lbrn,div ,lddg,vLit,lLit,hMix,diff".split(",").indexOf(W)==-1){q=q*P.fill;P.fill=1;P.style=!1}var t=W+(P.n$?"1":"");
|
|
if(n.a.eq[t]==null)n.a.eq[t]=new n.a.MU(W,P.n$!=null);var M=n.a.eq[t],U=S.r$(p).r$(I);U.offset(-p.x,-p.y);
|
|
if(U.ZP())return;var i=n.ds;n.Wf(k,U);k.rh(U);M.Gz();M.B6(h.hr,k.LQ,n.lV(S,p),q,P.fill,P.style?1:0,P.Q8?1:0,P.n$?new Float32Array(P.n$):null);
|
|
i.drawArrays(i.TRIANGLES,0,6)};n.a.DM=function(W,h,S,k,p,I,q,P,t,M,U){if(n.a.IJ==null)n.a.IJ=new n.a.QD(!0,!0);
|
|
if(n.a.Tb==null)n.a.Tb=new n.a.QD(!0,!1);if(n.a.To==null)n.a.To=new n.a.QD(!1,!0);var i=M?1:0,z=W?p?n.a.IJ:n.a.Tb:n.a.To,D=new Float32Array(U?[U[0],U[1],U[2],1]:[1,1,1,1]),R=h?h.r$(k).r$(P):k.r$(P);
|
|
if(R.ZP())return;R.offset(-k.x,-k.y);var O=n.ds;n.Wf(S,R);S.rh(R);z.Gz();if(W==null)z.B6(null,S.LQ,p.hr,n.lV(k,k),n.lV(I,k),q/255,t,i,D);
|
|
else if(p)z.B6(W.hr,S.LQ,p.hr,n.lV(h,k),n.lV(I,k),q/255,t,i,D);else z.B6(W.hr,S.LQ,null,n.lV(h,k),null,q/255,t,i,D);
|
|
O.drawArrays(O.TRIANGLES,0,6)};n.a.alB=function(W,h,S){if(n.a.anz==null)n.a.anz=new n.a.Uj;var k=n.a.anz,p=new gj(0,0,W.e,W.Z),I=n.ds;
|
|
n.Wf(h);h.rh(p);k.Gz();k.B6(p,W.hr,h.LQ,S.hr);I.drawArrays(I.TRIANGLES,0,6)};n.a.bY={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) ); "};
|
|
n.a.MU=function(W,h){n.Ef.call(this);var S="\t\t\tprecision highp float;\t\t\t"+n.GA.Y2+"\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"+(h?"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"+n.GA.Dg+"\t\t\t"+n.GA.AN+"\t\t\t"+n.GA.nS+"\t\t\t"+n.GA.a4c+"\t\t\t"+n.GA.apA+"\t\t\t"+n.GA.a4t+"\t\t\t"+n.GA.Hb+"\t\t\t"+n.GA.adJ+"\t\t\t"+n.GA.ej+"\t\t\t"+n.GA.hash+"\t\t\t"+(h?n.GA.Ez:"")+"\t\t\t\t\t\tvec3 BB(vec3 a, vec3 b, float f) { "+n.a.bY[W]+" } \t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 tgt = texture2D(target, tCoord);\t\t\t\tvec4 src = texture2D(source, sCoord);",k="\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(W=="diss")S+="\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 S+=" \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"+(h?" 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.MZ(S,k)};n.a.MU.prototype=new n.Ef;n.a.MU.prototype.B6=function(W,h,S,k,p,I,q,P){this.Sa("srct alpha source target fill style keepBGA blIf".split(" "));
|
|
var t=n.ds,M=this.OE;t.uniform4fv(M.srct,S);t.uniform1f(M.alpha,k);t.uniform1f(M.fill,p);t.uniform1f(M.style,I);
|
|
t.uniform1f(M.keepBGA,q);if(P)t.uniform4fv(M.blIf,P);this.z4([M.source,W,M.target,h])};n.a.QD=function(W,h){n.Ef.call(this);
|
|
this.arP=W;this.nd=h;var S="\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"+n.GA.CK+"\t\t\t"+n.GA.hash+"\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 tgt = texture2D(target, tCoord);\t\t\t\tvec4 src = "+(W?"texture2D(source, sCoord)":"vec4(0.0)")+"; \t\t\t\tfloat wg = awg "+(h?"* (in01(wCoord) ? texture2D(weight, wCoord).w : wcolor)":"")+";\t\t\t\t"+(W?"":"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 = "+(h?"nc":"cswitch*nc + (1.0- cswitch)*tgt")+"; \t\t\t}",k="\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.MZ(S,k)};n.a.QD.prototype=new n.Ef;n.a.QD.prototype.B6=function(W,h,S,k,p,I,q,P,t){if(this.nd)this.Sa("srct wrct wcolor awg dissv source target weight cswitch".split(" "));
|
|
else this.Sa("srct awg dissv source target cswitch".split(" "));var M=n.ds,U=this.OE;M.uniform4fv(U.srct,k);
|
|
if(this.nd){M.uniform4fv(U.wrct,p);M.uniform1f(U.wcolor,I)}else{M.uniform4fv(U.cswitch,t)}M.uniform1f(U.awg,q);
|
|
M.uniform1f(U.dissv,P);var i=[U.source,W,U.target,h];if(this.nd)i.push(U.weight,S);this.z4(i)};n.a.Uj=function(){n.Ef.call(this);
|
|
var W="\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}",h="\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.MZ(W,h)};n.a.Uj.prototype=new n.Ef;n.a.Uj.prototype.B6=function(W,h,S,k){this.Sa(["rct","prev","next","alpha"]);
|
|
var p=n.ds,I=this.OE;p.uniform4fv(I.rct,[0,0,1,1]);this.z4([I.prev,h,I.next,S,I.alpha,k])};n.dv={IA:{},NE:"\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}"};
|
|
n.dv.kf=function(W,h){var S=bS.Df,k=[S.Ja,S.CA,S.k4,S.Mq,S.nk,S.mf,S.zv,S.iw].indexOf(W.type),p=n.dv.IA[W.type];
|
|
if(p==null)p=n.dv.IA[W.type]=new n.IA[k];p.Gz();p.B6(h,W);n.ds.drawArrays(n.ds.TRIANGLES,0,6)};n.IA=[];
|
|
n.IA[0]=function(){n.Ef.call(this);this.QU={};var W="\t\t\tprecision mediump float;\t\t\t"+n.GA.AN+"\t\t\t"+n.GA.Y2+"\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.MZ(W,n.dv.NE)};n.IA[0].prototype=new n.Ef;n.IA[0].prototype.B6=function(W,h){var S={p:h.vw,z:h.ll,S:h.Ah,S4:N.U(h.vw.length)},k=S.p.length;
|
|
if(this.QU["m"+k]==null){this.QU["m"+k]={afk:new n.qr(k,1),vM:N.U(k*4)}}var p=this.QU["m"+k];N.ST(S,p.vM,0);
|
|
var I=p.afk;I.set(p.vM);this.Sa(["source","map","toGray","presLum"]);var q=n.ds,P=this.OE;q.uniform1f(P.toGray,h.Xh?1:0);
|
|
q.uniform1f(P.presLum,h.q4?1:0);this.z4([P.source,W,P.map,I.hr])};n.IA[1]=function(){n.Ef.call(this);
|
|
this.a8_=new n.qr(256,1);this.a5i=N.U(256*4);var W="\t\t\t\tprecision mediump float;\t\t\t\t"+n.GA.GR+"\t\t\t\t"+n.GA.DB+"\t\t\t\t"+n.GA.Gm+"\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.MZ(W,n.dv.NE)};n.IA[1].prototype=new n.Ef;n.IA[1].prototype.B6=function(W,h){N.ST({p:h.afB,z:h.yZ,S:h.aso,S4:N.U(256)},this.a5i);
|
|
this.a8_.set(this.a5i);this.Sa(["source","map","cfa","cfb","colorize"]);var S=n.ds,k=this.OE;S.uniform1f(k.cfa,h.ahh);
|
|
S.uniform1f(k.cfb,h.Ag);S.uniform1i(k.colorize,h.a2G);this.z4([k.source,W,k.map,this.a8_.hr])};n.IA[2]=function(){n.Ef.call(this);
|
|
var W="\t\t\tprecision mediump float;\t\t\t"+n.GA.GR+"\t\t\t"+n.GA.ZY+"\t\t\t"+n.GA.qu+"\t\t\t"+n.GA.DB+"\t\t\t"+n.GA.Gm+"\t\t\t"+n.GA.a2L+"\t\t\t"+n.GA.a9n+"\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.MZ(W,n.dv.NE)};n.IA[2].prototype=new n.Ef;n.IA[2].prototype.B6=function(W,h){this.Sa(["source","vib","sat","yF"]);
|
|
var S=n.ds,k=this.OE;S.uniform1f(k.vib,h.nP[0]);S.uniform1f(k.sat,h.nP[1]);S.uniform3fv(k.yF,new Float32Array([h.nP[2],h.nP[3],h.nP[3]]));
|
|
this.z4([k.source,W])};n.IA[3]=function(){n.Ef.call(this);var W="\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.MZ(W,n.dv.NE)};n.IA[3].prototype=new n.Ef;n.IA[3].prototype.B6=function(W,h){this.Sa(["source","trf"]);
|
|
var S=n.ds,k=this.OE;S.uniformMatrix4fv(k.trf,!1,new Float32Array(N.iD.Vg(h.tf)));this.z4([k.source,W])};
|
|
n.IA[4]=function(){n.Ef.call(this);var W="\t\t\tprecision mediump float; \t\t\t"+n.GA.bJ+"\t\t\t"+n.GA.GR+"\t\t\t"+n.GA.Gm+"\t\t\t"+n.GA.DB+"\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.MZ(W,n.dv.NE)};n.IA[4].prototype=new n.Ef;n.IA[4].prototype.B6=function(W,h){this.Sa(["source","mnm","mxm","shift","lim"]);
|
|
var S=n.ds,k=this.OE;S.uniform3fv(k.mnm,new Float32Array(h.qe));S.uniform3fv(k.mxm,new Float32Array(h.uY));
|
|
S.uniform3fv(k.shift,new Float32Array(h.shift));S.uniform1f(k.lim,h.sx);this.z4([k.source,W])};n.IA[5]=function(){n.Ef.call(this);
|
|
var W="\t\t\tprecision mediump float;\t\t\t"+n.GA.Y2+"\t\t\t"+n.GA.AP+"\t\t\t"+n.GA.sz+"\t\t\t"+n.GA.DB+"\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.MZ(W,n.dv.NE)};n.IA[5].prototype=new n.Ef;n.IA[5].prototype.B6=function(W,h){this.Sa(["source","cfs"]);
|
|
var S=n.ds,k=this.OE;S.uniform3fv(k.cfs,h.as1);this.z4([k.source,W])};n.IA[6]=function(){n.Ef.call(this);
|
|
var W="\t\t\tprecision mediump float;\t\t\t"+n.GA.GR+"\t\t\t"+n.GA.AP+"\t\t\t"+n.GA.sz+"\t\t\t"+n.GA.DB+"\t\t\t"+n.GA.Gm+"\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.MZ(W,n.dv.NE)};n.IA[6].prototype=new n.Ef;n.IA[6].prototype.B6=function(W,h){this.Sa(["source","wght","prms"]);
|
|
var S=n.ds,k=this.OE,p=[h.H9,h.a4_,h.AN,h.aqi,h.ve,h.a9B];S.uniform1fv(k.wght,new Float32Array(h.aby));
|
|
S.uniform1fv(k.prms,new Float32Array(p));this.z4([k.source,W])};n.IA[7]=function(){n.Ef.call(this);this.M3={};
|
|
var W="\t\t\tprecision mediump float;\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\tfloat iN = 1.0/N; \t\t\t\tvec4 src = texture2D(source, sCoord); \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)*iN; \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+iN+( fg )*iN)); \t\t\t\tvec4 rs = mix(c0,c1,R-floor(R)); \t\t\t\tgl_FragColor = vec4(rs.rgb,src.w); \t\t\t\t\t\t\t}";
|
|
this.MZ(W,n.dv.NE)};n.IA[7].prototype=new n.Ef;n.IA[7].prototype.B6=function(W,h){this.Sa(["source","lut","N"]);
|
|
var S=n.ds,k=this.OE,p=h.l7,I=h.zz;if(this.M3["m"+p]==null)this.M3["m"+p]=new n.qr(p,p*p);var q=this.M3["m"+p];
|
|
q.set(I);S.uniform1f(k.N,p);this.z4([k.source,W,k.lut,q.hr]);S.activeTexture(S.TEXTURE1);var P=S.LINEAR;
|
|
S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,P);S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,P);
|
|
S.activeTexture(S.TEXTURE0)};n.filter={RZ:{},NE:"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",afX:0,a0k:1,bw:2,afH:3,adG:4,aq4:5,ER:6,al7:7};
|
|
n.filter.kf=function(W,h){var S=n.filter,k,p=W.type+":"+(W.n2?W.n2.join(","):""),k=n.filter.RZ[p];if(k==null)k=n.filter.RZ[p]=new n.RZ[W.type](W.n2);
|
|
k.Gz();k.B6(h,W);n.ds.drawArrays(n.ds.TRIANGLES,0,6)};n.RZ=[0,0,0,0,0,0,0,0,0,0,0,0];n.RZ[7]=function(){n.Ef.call(this);
|
|
var W="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.MZ(ca.dJ(W),ca.dJ(n.filter.NE))};n.RZ[7].prototype=new n.Ef;n.RZ[7].prototype.B6=function(W,h){this.Sa(["source","iwh","kern"]);
|
|
var S=n.ds,k=this.OE;S.uniform2fv(k.iwh,h.o9);S.uniform1fv(k.kern,h.a5I);this.z4([k.source,W])};n.RZ[6]=function(W){n.Ef.call(this);
|
|
var h=W[0],S=W[1],k=W[2],p="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",I=ca.dJ(p);
|
|
I=I.replaceAll("PRC",k+".0");I=I.replaceAll("DIR",["x,0","0,x"][S]);this.MZ(I,n.dv.NE)};n.RZ[6].prototype=new n.Ef;
|
|
n.RZ[6].prototype.B6=function(W,h){this.Sa(["source","iwh","rad"]);var S=n.ds,k=this.OE;S.uniform2fv(k.iwh,h.o9);
|
|
S.uniform1f(k.rad,h.qg);this.z4([k.source,W])};n.RZ[4]=function(W){n.Ef.call(this);var h=W[0],S=W[1],k="\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="+W[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"][S]+"); 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"][h]+") 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; };"][S]+"; \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 = "+(S==2?"vec4(sum.rgb/cnt.rgb, sclr.w)":"sum")+";\t\t\t\t}\t\t\t\tgl_FragColor=sclr; \t\t\t}";
|
|
this.MZ(k,n.dv.NE)};n.RZ[4].prototype=new n.Ef;n.RZ[4].prototype.B6=function(W,h){this.Sa(["source","iwh","rrad","tr"]);
|
|
var S=n.ds,k=this.OE;S.uniform2fv(k.iwh,h.o9);S.uniform1f(k.rrad,h.CL);S.uniform1f(k.tr,h.asK);this.z4([k.source,W]);
|
|
var p=S.LINEAR;p=S.NEAREST;S.activeTexture(S.TEXTURE0);S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,p);
|
|
S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,p);S.activeTexture(S.TEXTURE0)};n.RZ[5]=function(){n.Ef.call(this);
|
|
var W="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.MZ(ca.dJ(W),ca.dJ(n.filter.NE))};n.RZ[5].prototype=new n.Ef;n.RZ[5].prototype.B6=function(W,h){this.Sa(["source","ssum","iwh","amnt","edgf"]);
|
|
var S=n.ds,k=this.OE;S.uniform2fv(k.iwh,h.o9);S.uniform1f(k.amnt,h.acm);S.uniform1f(k.edgf,h.ard);this.z4([k.source,W,k.ssum,h.akG])};
|
|
n.RZ[3]=function(){n.Ef.call(this);var W="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.MZ(ca.dJ(W),ca.dJ(n.filter.NE))};n.RZ[3].prototype=new n.Ef;n.RZ[3].prototype.B6=function(W,h){this.Sa("source iwh tdep rrad spec nois poly0 poly1".split(" "));
|
|
var S=n.ds,k=this.OE;S.uniform2fv(k.iwh,h.o9);S.uniform1f(k.tdep,h.aoo);S.uniform1f(k.rrad,h.CL);S.uniform2fv(k.spec,h.ano);
|
|
S.uniform3fv(k.nois,h.ase);S.uniformMatrix4fv(k.poly0,!1,h.ad7);S.uniformMatrix4fv(k.poly1,!1,h.apg);
|
|
this.z4([k.source,W]);var p=S.LINEAR;S.activeTexture(S.TEXTURE0);S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,p);
|
|
S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,p);S.activeTexture(S.TEXTURE0)};n.RZ[0]=function(){n.Ef.call(this);
|
|
var W="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.MZ(ca.dJ(W),ca.dJ(n.filter.NE))};n.RZ[0].prototype=new n.Ef;n.RZ[0].prototype.B6=function(W,h){this.Sa(["source","iwh","ld","shine"]);
|
|
var S=n.ds,k=this.OE;S.uniform2fv(k.iwh,h.o9);S.uniform3fv(k.ld,h.alO);S.uniform1f(k.shine,h.atU);this.z4([k.source,W,k.tang,h.gr])};
|
|
n.RZ[1]=function(){n.Ef.call(this);var W="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.MZ(ca.dJ(W),ca.dJ(n.filter.NE))};n.RZ[1].prototype=new n.Ef;n.RZ[1].prototype.B6=function(W,h){this.Sa(["source","iwh","isc","bristle"]);
|
|
var S=n.ds,k=this.OE;S.uniform2fv(k.iwh,h.o9);S.uniform1f(k.isc,h.abY);S.uniform1f(k.bristle,h.aaS);
|
|
this.z4([k.source,W])};n.RZ[2]=function(){n.Ef.call(this);var W="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.MZ(ca.dJ(W),ca.dJ(n.filter.NE))};n.RZ[2].prototype=new n.Ef;n.RZ[2].prototype.B6=function(W,h){this.Sa(["source","tang","iwh","sigma","expo"]);
|
|
var S=n.ds,k=this.OE;S.uniform2fv(k.iwh,h.o9);S.uniform1f(k.sigma,h.ab$);S.uniform1f(k.expo,h.abh);this.z4([k.source,W,k.tang,h.gr]);
|
|
var p=S.LINEAR;S.activeTexture(S.TEXTURE0);S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,p);S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,p);
|
|
S.activeTexture(S.TEXTURE0)};function N(){}N.I={};N.apY={};N.aiq=function(){var W=[64,64,128,256,512,1024,2048],h=[];
|
|
for(var Q=0;Q<W.length;Q++){var S=W[Q],k=document.createElement("canvas");k.width=S;k.height=S;h.push(k.getContext("2d"))}return h}();
|
|
N.hi=function(W,h){var S,k=N.aiq,Q=1,p=Math.max(W,h);while(Q<k.length&&p>k[Q].canvas.width)Q++;if(Q==k.length){S=k[0];
|
|
var I=S.canvas;I.width=W;I.height=h}else{S=k[Q];S.clearRect(0,0,W,h)}return S};N.Ky=function(W,h,S){var k=new Uint32Array(h*S);
|
|
k[0]=W[0];for(var p=1;p<h;p++)k[p]=k[p-1]+W[p];for(var I=1;I<S;I++){var Q=I*h;k[Q]=k[Q-h]+W[Q];for(var p=1;
|
|
p<h;p++)k[Q+p]=W[Q+p]+k[Q+p-1]+k[Q+p-h]-k[Q+p-h-1]}return k};N.UA=function(W,h,S,k,p,I){var q=(p-1)*h,P=I*h;
|
|
return W[P+k]-W[P+S-1]-W[q+k]+W[q+S-1]};N.qR=function(W,h,S){var k={},p=0,I=0,q=new Uint32Array(W.buffer),P=q.length,t=Date.now();
|
|
for(var M=1;M<S-1;M++)for(var U=1;U<h-1;U++){var i=M*h+U,z=q[i];if(z>>>24<230)I++;if(k[z]==null){k[z]=!0;
|
|
p++}}if(I!=0||p<20)return!1;return!0};N.LU=function(W,h,S,k,p,I){if(p==null)p=I=0;k=Math.log(k)/Math.log(2);
|
|
k=Math.round(k);for(var Q=0;Q<S;Q++)for(var q=0;q<h;q++){var P=Q*h+q<<2,t=N.sy(Q+I,q+p,k);W[P]=W[P+1]=W[P+2]=t;
|
|
W[P+3]=255}};N.sy=function(Q,W,h){return 255-((Q>>>h)+(W>>>h)&1)*51};N.fl=function(W){var h=W.toString(16);
|
|
while(h.length<6)h="0"+h;return h};N.II=function(W){return parseInt(W,16)};N.AN=function(W){return.3*W.p+.59*W.z+.11*W.S};
|
|
N.Dg=function(W){return Math.max(W.p,W.z,W.S)-Math.min(W.p,W.z,W.S)};N.ak=function(W,h,S){return.3*W+.59*h+.11*S};
|
|
N.alK=function(W,h,S){return Math.max(W,h,S)-Math.min(W,h,S)};N.AP=function(W,h){var S=h-W,k=Math.abs(S),p=S-1,I=S+1;
|
|
if(Math.abs(p)<k)S=p;else if(Math.abs(I)<k)S=I;return S};N.HE=function(W){return W<.0031308?12.92*W:1.055*Math.pow(W,1/2.4)-.055};
|
|
N.qY=function(W){return W<.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)};N.aeK=function(W,h){var S=Math.min(W.length,h.length);
|
|
for(var Q=0;Q<S;Q+=4){var k=W[Q],p=W[Q+1],I=W[Q+2];h[Q]=16+Math.floor(65.481/255*k+128.553/255*p+24.966/255*I+.5);
|
|
h[Q+1]=128-Math.floor(37.797/255*k-74.203/255*p+112/255*I+.5);h[Q+2]=128+Math.floor(112/255*k-93.786/255*p-18.214/255*I+.5);
|
|
h[Q+3]=W[Q+3]}};N.apH=function(W,h,S){var k,p,I,q=Math.max(W,h,S),P=Math.min(W,h,S);I=q;if(q!=0)p=(q-P)/q;
|
|
else p=0;if(p==0)k=0;else{var t=q-P,M=(q-W)/t,U=(q-h)/t,i=(q-S)/t;if(W==q)k=i-U;else if(h==q)k=2+M-i;
|
|
else k=4+U-M;k*=1/6;if(k<0)k=k+1}return{R_:k,Nx:p,S:I}};N.a33=function(W,h,S){var k=0,p=0,I=0;if(h==0)k=p=I=S;
|
|
else{var q=(W-Math.floor(W))*6,P=Math.floor(q),t=q-Math.floor(q),M=S*(1-h),U=S*(1-h*t),i=S*(1-h*(1-t));
|
|
switch(P){case 0:k=S;p=i;I=M;break;case 1:k=U;p=S;I=M;break;case 2:k=M;p=S;I=i;break;case 3:k=M;p=U;
|
|
I=S;break;case 4:k=i;p=M;I=S;break;case 5:k=S;p=M;I=U;break}}return{p:k,z:p,S:I}};N.DB=function(W,h,S){var k=Math.max(W,h,S),p=Math.min(W,h,S),I=0,q=0,P=(k+p)*.5;
|
|
if(k!=p){var t=k-p;q=P>.5?t/(2-(k+p)):t/(k+p);switch(k){case W:I=(h-S)/t+(h<S?6:0);break;case h:I=(S-W)/t+2;
|
|
break;case S:I=(W-h)/t+4;break}I*=1/6}return{R_:I,Nx:q,kL:P}};N.Gm=function(W,h,S){var k,p,I;if(h==0)k=p=I=S;
|
|
else{var q=S<.5?S*(1+h):S+h-S*h,P=2*S-q;k=N.GR(P,q,W+1/3);p=N.GR(P,q,W);I=N.GR(P,q,W-1/3)}return{p:k,z:p,S:I}};
|
|
N.GR=function(W,h,S){if(S<0)S+=1;if(S>1)S-=1;if(S<1/6)return W+(h-W)*6*S;if(S<1/2)return h;if(S<2/3)return W+(h-W)*(2/3-S)*6;
|
|
return W};N.ZY=function(W,h,S){var k=Math.max(W,h,S),p=Math.min(W,h,S),I,q,P=k,t=k-p;q=k==0?0:t/k;if(k==p)I=0;
|
|
else{switch(k){case W:I=(h-S)/t+(h<S?6:0);break;case h:I=(S-W)/t+2;break;case S:I=(W-h)/t+4;break}I*=1/6}return{R_:I,Nx:q,Fv:P}};
|
|
N.qu=function(W,h,S){var k,p,I,Q,q,P,t,M;Q=Math.floor(W*6);q=W*6-Q;P=S*(1-h);t=S*(1-q*h);M=S*(1-(1-q)*h);
|
|
switch(Q%6){case 0:k=S,p=M,I=P;break;case 1:k=t,p=S,I=P;break;case 2:k=P,p=S,I=M;break;case 3:k=P,p=t,I=S;
|
|
break;case 4:k=M,p=P,I=S;break;case 5:k=S,p=P,I=t;break}return{p:k,z:p,S:I}};N.Sm=function(){var W=[],h=[];
|
|
for(var Q=0;Q<2e3;Q++){var S=Q/1e3;W[Q]=N.qY(S);h[Q]=S>.008856?Math.pow(S,1/3):(903.3*S+16)*(1/116)}return[W,h]}();
|
|
N.bJ=function(W,h,S){var k=N.Sm[0],p=N.Sm[1];W=k[~~(W*(1e3/255))];h=k[~~(h*(1e3/255))];S=k[~~(S*(1e3/255))];
|
|
var I=N.iD.aq$,q=I[0]*W+I[1]*h+I[2]*S,P=I[4]*W+I[5]*h+I[6]*S,t=I[8]*W+I[9]*h+I[10]*S;q=q*(100/96.72);
|
|
P=P*(100/100);t=t*(100/81.427);return N.xg(q,P,t)};N.xg=function(W,h,S){var k=N.Sm[1],p=k[~~(W*1e3)],I=k[~~(h*1e3)],q=k[~~(S*1e3)];
|
|
return{UT:116*I-16,S4:500*(p-I),S:200*(I-q)}};N.LG=function(W,h,S){var k=903.3,p=.008856,I=(W+16)/116,q=I*I*I,P=I-S/200,t=P*P*P,M=h/500+I,U=M*M*M,i=t>p?t:(116*P-16)/k,z=q>p?q:(116*I-16)/k,D=U>p?U:(116*M-16)/k,R=D*96.72,O=z*100,b=i*81.427,w=N.iD.$z(N.iD.FI,[R/100,O/100,b/100,0]);
|
|
for(var Q=0;Q<4;Q++)w[Q]=Math.max(0,Math.min(255,N.HE(w[Q])*255));return{p:w[0],z:w[1],S:w[2]}};N.cG=function(W,h,S,k,p){var I=W.UT,q=W.S4,P=W.S,t=(I<h.UT?h.UT-I:S.UT<I?S.UT-I:0)*(1/100),M=(q<h.S4?h.S4-q:S.S4<q?S.S4-q:0)*(1/116),U=(P<h.S?h.S-P:S.S<P?S.S-P:0)*(1/116),i=Math.sqrt(t*t+M*M+U*U)*1.35;
|
|
return i<=k?Math.min(1,1.17*(1-i*p)):0};N.Zi=function(W,h,S){var k=W.length,p=.3,I=.59,q=.11;if(S){p=S[0];
|
|
I=S[1];q=S[2]}for(var Q=0;Q<k;Q+=4)h[Q>>2]=~~(W[Q+0]*p+W[Q+1]*I+W[Q+2]*q+.5)};N.yS=function(W,h){var S=h.length;
|
|
for(var Q=0;Q<S;Q+=4){var k=W[Q>>>2];h[Q]=k;h[Q+1]=k;h[Q+2]=k}};N.ST=function(W,h){var S=W.S4,k=W.p,p=W.z,I=W.S,q=Math.min(W.S4.length,h.buffer.byteLength>>>2),P=4*Math.floor(q/4),t=new Uint32Array(h.buffer),M=new Uint32Array(S.buffer),U=new Uint32Array(k.buffer),i=new Uint32Array(p.buffer),z=new Uint32Array(I.buffer);
|
|
for(var Q=0;Q<P;Q+=4){var D=M[Q>>2],R=z[Q>>2],O=i[Q>>2],b=U[Q>>2];t[Q]=D<<24|(R&255)<<16|(O&255)<<8|b&255;
|
|
t[Q+1]=(D&65280)<<16|(R&65280)<<8|O&65280|(b&65280)>>>8;t[Q+2]=(D&16711680)<<8|R&16711680|(O&16711680)>>>8|(b&16711680)>>>16;
|
|
t[Q+3]=D&4278190080|(R&4278190080)>>>8|(O&4278190080)>>>16|(b&4278190080)>>>24}for(var Q=P;Q<q;Q++)t[Q]=S[Q]<<24|I[Q]<<16|p[Q]<<8|k[Q]};
|
|
N.hc=function(W,h){var S=h.S4,k=h.p,p=h.z,I=h.S,q=Math.min(h.S4.length,W.buffer.byteLength>>>2),P=4*Math.floor(q/4),t=new Uint32Array(W.buffer),M=new Uint32Array(S.buffer),U=new Uint32Array(k.buffer),i=new Uint32Array(p.buffer),z=new Uint32Array(I.buffer);
|
|
for(var Q=0;Q<P;Q+=4){var D=t[Q],R=t[Q+1],O=t[Q+2],b=t[Q+3];U[Q>>2]=D&255|(R&255)<<8|(O&255)<<16|b<<24;
|
|
i[Q>>2]=(D&65280)>>8|R&65280|(O&65280)<<8|(b&65280)<<16;z[Q>>2]=(D&16711680)>>16|(R&16711680)>>8|O&16711680|(b&16711680)<<8;
|
|
M[Q>>2]=D>>>24|R>>>24<<8|O>>>24<<16|b&4278190080}for(var Q=P;Q<q;Q++){var w=t[Q];k[Q]=w>>0&255;p[Q]=w>>8&255;
|
|
I[Q]=w>>16&255;S[Q]=w>>24&255}};N.sN=function(W,h,S){var k=new Uint8Array(W.buffer),p=Math.min(k.length/4,h.length);
|
|
for(var Q=0;Q<p;Q++){h[Q]=k[(Q<<2)+S]}};N.ce=function(W,h,S){var k=new Uint8Array(h.buffer),p=new Uint32Array(W.buffer),I=Math.min(k.length/4,W.length),Q=0;
|
|
while(Q+4<I){var q=p[Q>>>2];k[(Q<<2)+S]=q&255;k[(Q<<2)+S+4]=q>>>8&255;k[(Q<<2)+S+8]=q>>>16&255;k[(Q<<2)+S+12]=q>>>24;
|
|
Q+=4}while(Q<I){k[(Q<<2)+S]=W[Q];Q++}};N.wM=function(W,h,S){if(S==null)S=0;var k=new Uint32Array(W.buffer),p=k.length;
|
|
for(var Q=0;Q<p;Q++)k[Q]=k[Q]&S|h};N.a6B=function(W,h,S,k,p){if(p==null)p=0;var I=new Uint32Array(W.buffer);
|
|
S=S.r$(h);var q=S.x-h.x,P=S.y-h.y,t=S.e,M=S.Z,U=h.e;for(var i=0;i<M;i++){var Q=(P+i)*U+q;for(var z=0;
|
|
z<t;z++){I[Q]=I[Q]&p|k;Q++}}};N.WQ=function(W,h){var S=Math.min(W.buffer.byteLength,h.buffer.byteLength),k=S>>>2,W=new Uint32Array(W.buffer,0,k),h=new Uint32Array(h.buffer,0,k);
|
|
h.set(W)};N.xX=function(W,h){var S=W.buffer.byteLength,k=h.buffer.byteLength,p=new Uint32Array(W.buffer,0,S>>2),I=new Uint32Array(h.buffer,0,k>>2);
|
|
if(S!=k)return!1;var q=p.length;for(var Q=0;Q<q;Q++)if(I[Q]!=p[Q])return!1;return!0};N.uA=function(W){var h=new Uint32Array(W.buffer),S=h.length;
|
|
for(var Q=0;Q<S;Q++)h[Q]=~h[Q]};N.ajM=function(W){var h=W.length;for(var Q=0;Q<h;Q+=4){W[Q]=~W[Q];W[Q+1]=~W[Q+1];
|
|
W[Q+2]=~W[Q+2]}};N.ask=function(W){var h=W.length;for(var Q=3;Q<h;Q+=4)W[Q]=~W[Q]};N.aiG=function(W){return W+(W%4==0?0:4-W%4)};
|
|
N.U=function(W,h){if(h==null)h=!1;if(!h)W=N.aiG(W);try{var S=new Uint8Array(W)}catch(dq){alert("Not enough RAM! (need "+Math.round(W/(1<<20))+" MB)",7e3);
|
|
throw"low_ram"}return S};N.wa=function(W){var h=W.length,S=W[h-2],k=W[h-1];while(k.e>=2&&k.Z>=2){var p=N.yq(S,k);
|
|
W.push(p.vM,p.rect);S=p.vM;k=p.rect}};N.qc=function(W){var h=W.length,S=W[h-2],k=W[h-1];while(k.e>=2&&k.Z>=2){var p=N._X(S,k);
|
|
W.push(p.vM,p.rect);S=p.vM;k=p.rect}};N.yq=function(W,h,S){var k=h.e,p=h.Z,I=k>>1,q=p>>1,P=new gj(h.x,h.y,I,q),t=S&&S.length==I*q*4?S:N.U(I*q*4),M=new Uint32Array(W.buffer),U=new Uint32Array(t.buffer);
|
|
for(var i=0;i<q;i++)for(var z=0;z<I;z++){var D=i*I+z,R=(i<<1)*k+(z<<1),O=M[R],b=M[R+1],w=M[R+k],A=M[R+k+1],g=O>>>24,E=b>>>24,j=w>>>24,x=A>>>24,d=g+E+j+x;
|
|
if(d==1020){var L=(O>>>0&255)+(b>>>0&255)+(w>>>0&255)+(A>>>0&255)+2>>>2,_=(O>>>8&255)+(b>>>8&255)+(w>>>8&255)+(A>>>8&255)+2>>>2,T=(O>>>16&255)+(b>>>16&255)+(w>>>16&255)+(A>>>16&255)+2>>>2;
|
|
U[D]=255<<24|T<<16|_<<8|L}else if(d==0)U[D]=0;else{var L=(O>>>0&255)*g+(b>>>0&255)*E+(w>>>0&255)*j+(A>>>0&255)*x,_=(O>>>8&255)*g+(b>>>8&255)*E+(w>>>8&255)*j+(A>>>8&255)*x,T=(O>>>16&255)*g+(b>>>16&255)*E+(w>>>16&255)*j+(A>>>16&255)*x,c=1/d;
|
|
L=~~(L*c+.5);_=~~(_*c+.5);T=~~(T*c+.5);U[D]=d+2>>>2<<24|T<<16|_<<8|L}}return{rect:P,vM:t}};N.fc=function(W,h,S){var k=h.e,p=h.Z,I=k>>1,q=p>>1,P=new gj(h.x,h.y,I,q),t=S&&S.length==I*q*4?S:N.U(I*q*4),M=new Uint32Array(W.buffer),U=new Uint32Array(t.buffer);
|
|
for(var i=0;i<q;i++)for(var z=0;z<I;z++){var D=i*I+z,R=(i<<1)*k+(z<<1),O=M[R],b=M[R+1],w=M[R+k],A=M[R+k+1],g=2+(O>>>0&255)+(b>>>0&255)+(w>>>0&255)+(A>>>0&255)>>>2,E=2+(O>>>8&255)+(b>>>8&255)+(w>>>8&255)+(A>>>8&255)>>>2,j=2+(O>>>16&255)+(b>>>16&255)+(w>>>16&255)+(A>>>16&255)>>>2,x=2+(O>>>24&255)+(b>>>24&255)+(w>>>24&255)+(A>>>24&255)>>>2;
|
|
U[D]=x<<24|j<<16|E<<8|g}return{rect:P,vM:t}};N.auj=function(W,h,S){var k=h.e,p=h.Z,I=2*Math.floor(k/3),q=2*Math.floor(p/3),P=new gj(h.x,h.y,I,q),t=S&&S.length==I*q*4?S:N.U(I*q*4),M=new Uint32Array(W.buffer),U=new Uint32Array(t.buffer);
|
|
for(var i=0;i<q;i+=2)for(var z=0;z<I;z+=2){var D=i*I+z,R=(i*3>>>1)*k+(z*3>>>1),O=M[R],b=M[R+1],w=M[R+2],A=M[R+k],g=M[R+1+k],E=M[R+2+k],j=M[R+k+k],x=M[R+1+k+k],d=M[R+2+k+k],L=O>>>24<<2,_=(O>>>16&255)*L,T=(O>>>8&255)*L,c=(O&255)*L,e=b>>>24<<1,r=(b>>>16&255)*e,B=(b>>>8&255)*e,F=(b&255)*e,v=w>>>24<<2,X=(w>>>16&255)*v,V=(w>>>8&255)*v,H=(w&255)*v,o=A>>>24<<1,J=(A>>>16&255)*o,C=(A>>>8&255)*o,Y=(A&255)*o,K=g>>>24,u=(g>>>16&255)*K,f=(g>>>8&255)*K,l=(g&255)*K,jk=E>>>24<<1,hE=(E>>>16&255)*jk,Z=(E>>>8&255)*jk,aQ=(E&255)*jk,jC=j>>>24<<2,eO=(j>>>16&255)*jC,iU=(j>>>8&255)*jC,gK=(j&255)*jC,iM=x>>>24<<1,i5=(x>>>16&255)*iM,fN=(x>>>8&255)*iM,dx=(x&255)*iM,ai=d>>>24<<2,hO=(d>>>16&255)*ai,ff=(d>>>8&255)*ai,eP=(d&255)*ai,a0=L+e+o+K,bM=v+e+jk+K,cV=jC+iM+o+K,aX=ai+iM+jk+K,j8=a0==0?0:1/a0,j3=bM==0?0:1/bM,am=cV==0?0:1/cV,fG=aX==0?0:1/aX,bw=0,fz=0,c6=0,hk=0;
|
|
bw=~~(.5+(c+F+Y+l)*j8);fz=~~(.5+(T+B+C+f)*j8);c6=~~(.5+(_+r+J+u)*j8);hk=~~(.5+a0*(1/9));U[D]=hk<<24|c6<<16|fz<<8|bw;
|
|
bw=~~(.5+(H+F+aQ+l)*j3);fz=~~(.5+(V+B+Z+f)*j3);c6=~~(.5+(X+r+hE+u)*j3);hk=~~(.5+bM*(1/9));U[D+1]=hk<<24|c6<<16|fz<<8|bw;
|
|
bw=~~(.5+(gK+dx+Y+l)*am);fz=~~(.5+(iU+fN+C+f)*am);c6=~~(.5+(eO+i5+J+u)*am);hk=~~(.5+cV*(1/9));U[D+I]=hk<<24|c6<<16|fz<<8|bw;
|
|
bw=~~(.5+(eP+dx+aQ+l)*fG);fz=~~(.5+(ff+fN+Z+f)*fG);c6=~~(.5+(hO+i5+hE+u)*fG);hk=~~(.5+aX*(1/9));U[D+I+1]=hk<<24|c6<<16|fz<<8|bw}return{rect:P,vM:t}};
|
|
N.a0g=function(W,h,S){var k=h.e,p=h.Z,I=2*Math.floor(k/3),q=2*Math.floor(p/3),P=new gj(h.x,h.y,I,q),t=S&&S.length==I*q*4?S:N.U(I*q*4),M=new Uint32Array(W.buffer),U=new Uint32Array(t.buffer);
|
|
for(var i=0;i<q;i+=2)for(var z=0;z<I;z+=2){var D=i*I+z,R=(i*3>>>1)*k+(z*3>>>1),O=M[R],b=M[R+1],w=M[R+2],A=M[R+k],g=M[R+1+k],E=M[R+2+k],j=M[R+k+k],x=M[R+1+k+k],d=M[R+2+k+k],L=(O>>>16&255)<<2,_=(O>>>8&255)<<2,T=(O&255)<<2,c=(b>>>16&255)<<1,e=(b>>>8&255)<<1,r=(b&255)<<1,B=(w>>>16&255)<<2,F=(w>>>8&255)<<2,v=(w&255)<<2,X=(A>>>16&255)<<1,V=(A>>>8&255)<<1,H=(A&255)<<1,o=g>>>16&255,J=g>>>8&255,C=g&255,Y=(E>>>16&255)<<1,K=(E>>>8&255)<<1,u=(E&255)<<1,f=(j>>>16&255)<<2,l=(j>>>8&255)<<2,jk=(j&255)<<2,hE=(x>>>16&255)<<1,Z=(x>>>8&255)<<1,aQ=(x&255)<<1,jC=(d>>>16&255)<<2,eO=(d>>>8&255)<<2,iU=(d&255)<<2,gK=0,iM=0,i5=0;
|
|
gK=~~(.5+(T+r+H+C)*(1/9));iM=~~(.5+(_+e+V+J)*(1/9));i5=~~(.5+(L+c+X+o)*(1/9));U[D]=255<<24|i5<<16|iM<<8|gK;
|
|
gK=~~(.5+(v+r+u+C)*(1/9));iM=~~(.5+(F+e+K+J)*(1/9));i5=~~(.5+(B+c+Y+o)*(1/9));U[D+1]=255<<24|i5<<16|iM<<8|gK;
|
|
gK=~~(.5+(jk+aQ+H+C)*(1/9));iM=~~(.5+(l+Z+V+J)*(1/9));i5=~~(.5+(f+hE+X+o)*(1/9));U[D+I]=255<<24|i5<<16|iM<<8|gK;
|
|
gK=~~(.5+(iU+aQ+u+C)*(1/9));iM=~~(.5+(eO+Z+K+J)*(1/9));i5=~~(.5+(jC+hE+Y+o)*(1/9));U[D+I+1]=255<<24|i5<<16|iM<<8|gK}return{rect:P,vM:t}};
|
|
N.V6=function(W){var h=255,S=W.length;S-=S&31;for(var Q=3;Q<S;Q+=32)h=h&W[Q]&W[Q+4]&W[Q+8]&W[Q+12]&W[Q+16]&W[Q+20]&W[Q+24]&W[Q+28];
|
|
return h!=255};N.aaQ=function(W,h,S,k){var p=N.yq,I=N.auj,P=0;if(!N.V6(W)){p=N.fc;I=N.a0g}var q={vM:W,rect:h},t=S;
|
|
while(t<.499){P++;t*=2}for(var Q=0;Q<P;Q++)q=p(q.vM,q.rect,k);if(t<.5001)q=p(q.vM,q.rect,k);else q=I(q.vM,q.rect,k);
|
|
return q};N.ag$=function(W,h,S,k){var p=N._X,I=N.px,q={vM:W,rect:h},P=0,t=S;while(t<.499){P++;t*=2}for(var Q=0;
|
|
Q<P;Q++)q=p(q.vM,q.rect,k);if(t<.5001)q=p(q.vM,q.rect,k);else q=I(q.vM,q.rect,k);return q};N._X=function(W,h,S){var k=h.e,p=h.Z,I=k>>1,q=p>>1,P=new gj(h.x,h.y,I,q);
|
|
if(W==null)return{rect:P};var t=S&&S.length>=I*q?S:N.U(I*q);for(var M=0;M<q;M++){var U=M*I;for(var i=0;
|
|
i<I;i++){var z=(M<<1)*k+(i<<1);t[U+i]=2+W[z]+W[z+1]+W[z+k]+W[z+k+1]>>>2}}return{rect:P,vM:t}};N.px=function(W,h,S){var k=h.e,p=h.Z,I=2*Math.floor(k/3),q=2*Math.floor(p/3),P=new gj(h.x,h.y,I,q);
|
|
if(W==null)return{rect:P};var t=S&&S.length>=I*q?S:N.U(I*q);for(var M=0;M<q;M+=2)for(var U=0;U<I;U+=2){var i=M*I+U,z=(M*3>>>1)*k+(U*3>>>1),D=W[z]<<2,R=W[z+1]<<1,O=W[z+2]<<2,b=W[z+k]<<1,w=W[z+1+k],A=W[z+2+k]<<1,g=W[z+k+k]<<2,E=W[z+1+k+k]<<1,j=W[z+2+k+k]<<2;
|
|
t[i]=~~(.5+(D+R+b+w)*(1/9));t[i+1]=~~(.5+(O+R+A+w)*(1/9));t[i+I]=~~(.5+(g+E+b+w)*(1/9));t[i+I+1]=~~(.5+(j+E+A+w)*(1/9))}return{rect:P,vM:t}};
|
|
N.vG=function(W,h,S,k,p){var I=h.r$(k);if(p)I=I.r$(p);var q=Math.max(0,I.x-h.x),P=Math.max(0,I.x-k.x),t=Math.max(0,I.y-h.y),M=Math.max(0,I.y-k.y),U=I.e,i=I.Z;
|
|
for(var Q=0;Q<i;Q++){var z=(t+Q)*h.e+q,D=(M+Q)*k.e+P;for(var R=0;R<U;R++){S[D+R]=W[z+R]}}};N.ul=function(W,h,S,k){if(h.xX(k)){N.ce(W,S,3);
|
|
return}var p=h.r$(k),I=Math.max(0,p.x-h.x),q=Math.max(0,p.x-k.x),P=Math.max(0,p.y-h.y),t=Math.max(0,p.y-k.y),M=p.e,U=p.Z;
|
|
for(var Q=0;Q<U;Q++){var i=(P+Q)*h.e+I,z=(t+Q)*k.e+q;for(var D=0;D<M;D++)S[(z+D<<2)+3]=W[i+D]}};N.TV=function(W,h,S,k){var p=h.r$(k),I=Math.max(0,p.x-h.x),q=Math.max(0,p.x-k.x),P=Math.max(0,p.y-h.y),t=Math.max(0,p.y-k.y),M=p.e,U=p.Z;
|
|
for(var Q=0;Q<U;Q++){var i=(P+Q)*h.e+I,z=(t+Q)*k.e+q;for(var D=0;D<M;D++)S[z+D]=W[(i+D<<2)+3]}};N.zt=function(W,h,S,k,p){if(h.xX(k)&&(p==null||p.xX(k))){N.WQ(W,S);
|
|
return}W=new Uint32Array(W.buffer),S=new Uint32Array(S.buffer);var I=h.r$(k);if(p)I=I.r$(p);var q=Math.max(0,I.x-h.x),P=Math.max(0,I.x-k.x),t=Math.max(0,I.y-h.y),M=Math.max(0,I.y-k.y),U=I.e,i=I.Z,z=U&3,D=z==0?U:U-z;
|
|
for(var Q=0;Q<i;Q++){var R=(t+Q)*h.e+q,O=(M+Q)*k.e+P;S.set(new Uint32Array(W.buffer,R*4,U),O)}};N.M$=function(W,h,S,k){var p=h.r$(k),I=Math.max(0,p.x-h.x),q=Math.max(0,p.x-k.x),P=Math.max(0,p.y-h.y),t=Math.max(0,p.y-k.y),M=p.e,U=p.Z,i=W.S4,z=W.p,D=W.z,R=W.S,O=S.S4,b=S.p,w=S.z,A=S.S;
|
|
for(var Q=0;Q<U;Q++){var g=(P+Q)*h.e+I,E=(t+Q)*k.e+q;for(var j=0;j<M;j++){O[E+j]=i[g+j];b[E+j]=z[g+j];
|
|
w[E+j]=D[g+j];A[E+j]=R[g+j]}}};N.tr=function(W){var h=W.length;for(var Q=0;Q<h;Q+=4){var S=W[Q+3];if(S==255)continue;
|
|
W[Q]=~~(W[Q]*S*(1/255)+.5);W[Q+1]=~~(W[Q+1]*S*(1/255)+.5);W[Q+2]=~~(W[Q+2]*S*(1/255)+.5)}};N.oY=function(W){var h=W.length;
|
|
for(var Q=0;Q<h;Q+=4){var S=W[Q+3];if(S==0||S==255)continue;var k=255/S;W[Q]=~~(W[Q]*k+.5);W[Q+1]=~~(W[Q+1]*k+.5);
|
|
W[Q+2]=~~(W[Q+2]*k+.5)}};N.B4=function(W,h){for(var Q=0;Q<W.length;Q++)if(W[Q]!=h)return!1;return!0};
|
|
N.su=function(W){return W+1+(W>>>8)>>>8};N.round=function(W,h){if(h==null)h=128;var S=W.length;for(var Q=0;
|
|
Q<S;Q++)W[Q]=W[Q]<h?0:255};N.G$=function(W,h){var S=W.length;for(var Q=0;Q<S;Q++)W[Q]=Math.round(W[Q]*h)};
|
|
N.Xa=function(W,h){var S=new Uint32Array(W.buffer),k=new Uint32Array(h.buffer),p=S.length;for(var Q=0;
|
|
Q<p;Q++){var I=S[Q],q=k[Q];k[Q]=N.su((I>>>24)*(q>>>24))<<24|N.su((I>>>16&255)*(q>>>16&255))<<16|N.su((I>>>8&255)*(q>>>8&255))<<8|N.su((I&255)*(q&255))}};
|
|
N.vJ=function(W,h){var S=W.length;for(var Q=0;Q<S;Q++)h[(Q<<2)+3]=N.su(h[(Q<<2)+3]*W[Q])};N.adx=function(W,h,S,k){var p=Math.max(0,k.x-h.x),I=Math.max(0,h.x-k.x),q=Math.max(0,k.y-h.y),P=Math.max(0,h.y-k.y),t=Math.min(h.x+h.e,k.x+k.e)-Math.max(h.x,k.x),M=Math.min(h.y+h.Z,k.y+k.Z)-Math.max(h.y,k.y);
|
|
for(var Q=0;Q<M;Q++){var U=(q+Q)*h.e+p,i=(P+Q)*k.e+I;for(var z=0;z<t;z++){S[i]=N.su(S[i]*W[U]);U++;i++}}};
|
|
N.XY=function(W,h,S,k){var p=Math.max(0,k.x-h.x),I=Math.max(0,h.x-k.x),q=Math.max(0,k.y-h.y),P=Math.max(0,h.y-k.y),t=Math.min(h.x+h.e,k.x+k.e)-Math.max(h.x,k.x),M=Math.min(h.y+h.Z,k.y+k.Z)-Math.max(h.y,k.y);
|
|
for(var Q=0;Q<M;Q++){var U=(q+Q)*h.e+p,i=((P+Q)*k.e+I<<2)+3;for(var z=0;z<t;z++){S[i]=N.su(S[i]*W[U]);
|
|
U++;i+=4}}};N.Eh=function(W,h,S,k){var p=Math.max(0,k.x-h.x),I=Math.max(0,h.x-k.x),q=Math.max(0,k.y-h.y),P=Math.max(0,h.y-k.y),t=Math.min(h.x+h.e,k.x+k.e)-Math.max(h.x,k.x),M=Math.min(h.y+h.Z,k.y+k.Z)-Math.max(h.y,k.y);
|
|
for(var Q=0;Q<M;Q++){var U=((q+Q)*h.e+p<<2)+3,i=((P+Q)*k.e+I<<2)+3;for(var z=0;z<t;z++){S[i]=N.su(S[i]*W[U]);
|
|
U+=4;i+=4}}};N.FZ=function(W){var h=new Float64Array(256),S=new Float64Array(256),k=new Float64Array(256),p=new Float64Array(256),I=W.length,q=0;
|
|
for(var Q=0;Q<I;Q+=4){var P=W[Q+3],t=P*(1/255);S[W[Q+0]]+=t;k[W[Q+1]]+=t;p[W[Q+2]]+=t;q+=P}for(var Q=0;
|
|
Q<256;Q++)h[Q]=S[Q]+k[Q]+p[Q];return[h,S,k,p,I>>>2,q/255]};N.YR=function(W,h){var S=new Uint32Array(W.buffer),k=S.length;
|
|
for(var Q=0;Q<k;Q++){var p=S[Q],I=p&255,q=p>>8&255,P=p>>16&255,t=p>>24&255;S[Q]=h[I]|h[q]<<8|h[P]<<16|h[t]<<24}};
|
|
N.at_=function(W,h,S,k,p,I,q){var P=new Uint32Array(W.buffer),t=new Uint32Array(h.buffer),M=P.length,U=0;
|
|
while(256<<U<S.length)U++;if(!q&&!I){for(var Q=0;Q!=M;Q++){var i=P[Q],z=(i&255)<<U,D=(i>>>8&255)<<U,R=(i>>>16&255)<<U,O=S[z],b=k[D],w=p[R];
|
|
t[Q]=O|b<<8|w<<16|i&4278190080}return}for(var Q=0;Q<M;Q++){var i=P[Q],z=(i&255)<<U,D=(i>>>8&255)<<U,R=(i>>>16&255)<<U;
|
|
if(I)z=D=R=Math.round(z*.3+D*.59+R*.11);var O=S[z],b=k[D],w=p[R];if(q){var A=N.ak(z,D,R),g=N.ak(O,b,w);
|
|
if(A>g){var E=(A-g)/(255-g);O+=E*(255-O);b+=E*(255-b);w+=E*(255-w)}else if(g==0)O=b=w=0;else{var E=A/g;
|
|
O=E*O;b=E*b;w=E*w}}t[Q]=O|b<<8|w<<16|i&4278190080}};N.oA=function(W,h){var S=h.e,k=h.Z,top=0,p=0,I=0,q=0,P=0;
|
|
P=0;for(var t=0;t<k;t++){var M=t*S;for(var Q=0;Q<S;Q++)P|=W[M+Q];if(P!=0)break;top++}if(top==k)return new gj(0,0,0,0);
|
|
P=0;for(var t=k-1;t>=0;t--){var M=t*S;for(var Q=0;Q<S;Q++)P|=W[M+Q];if(P!=0)break;I++}var U=k-I;P=0;
|
|
for(var Q=0;Q<S;Q++){for(var t=top;t<U;t++)P|=W[t*S+Q];if(P!=0)break;p++}P=0;for(var Q=S-1;Q>=0;Q--){for(var t=top;
|
|
t<U;t++)P|=W[t*S+Q];if(P!=0)break;q++}var i=new gj(h.x+p,h.y+top,S-p-q,k-top-I);return i};N.ow=function(W,h,S,k){if(k==null)k=[!0,!0,!0,!0];
|
|
if(S==null)S=0;var p=new Uint32Array(W.buffer),I=h.e,q=h.Z,top=0,P=0,t=0,M=0,U=!1,i=[p[0],p[p.length-1],0][S];
|
|
U=!1;if(k[0])for(var z=0;z<q;z++){var D=z*I;for(var Q=0;Q<I;Q++)if(p[D+Q]!=i)U=!0;if(U)break;top++}U=!1;
|
|
if(k[2])for(var z=q-1;z>=0;z--){var D=z*I;for(var Q=0;Q<I;Q++)if(p[D+Q]!=i)U=!0;if(U)break;t++}U=!1;
|
|
if(k[1])for(var Q=0;Q<I;Q++){for(var z=0;z<q;z++)if(p[z*I+Q]!=i)U=!0;if(U)break;P++}U=!1;if(k[3])for(var Q=I-1;
|
|
Q>=0;Q--){for(var z=0;z<q;z++)if(p[z*I+Q]!=i)U=!0;if(U)break;M++}var R=new gj(h.x+P,h.y+top,I-P-M,q-top-t);
|
|
return R.ZP()?new gj(0,0,0,0):R};N.Yn=function(W){var h=N.oA(W.channel,W.rect);if(h.xX(W.rect))return;
|
|
var S=N.U(h.n());N.vG(W.channel,W.rect,S,h);W.channel=S;W.rect=h};N.jo=function(W){var h=N.U(W.buffer.length>>2);
|
|
N.sN(W.buffer,h,3);var S=N.oA(h,W.rect);if(S.xX(W.rect))return;var k=new N.U(S.n()*4);N.zt(W.buffer,W.rect,k,S);
|
|
W.buffer=k;W.rect=S};N.extend=function(W,h,S){if(W.rect.LH(h))return;var k=W.rect.r8(h),p=N.U(k.n());
|
|
if(S!=null)p.fill(S);N.vG(W.channel,W.rect,p,k);W.rect=k;W.channel=p};N.a7a=function(W,h){if(h.ZP()||W.rect.LH(h))return;
|
|
var S=W.rect.r8(h),k=N.U(S.n()*4);N.zt(W.buffer,W.rect,k,S);W.rect=S;W.buffer=k};N.IC=function(W,h,S){if(!S.mA(W))return!1;
|
|
var k=Math.floor(W.x)-S.x,p=Math.floor(W.y)-S.y,Q=p*S.e+k;return h[Q]>128};N.ac1=function(W,h,S){if(!S.mA(W))return!1;
|
|
var k=Math.floor(W.x)-S.x,p=Math.floor(W.y)-S.y,Q=p*S.e+k;return h[4*Q+3]>128};N.J4=function(W){if(N.HK.length<W){N.HK=N.U(W);
|
|
N.HK.fill(255)}return N.HK};N.HK=N.U(0);N.$o=function(W){if(N.xj.length<W)N.xj=N.U(W);return N.xj};N.xj=N.U(0);
|
|
N.qr=function(W){this.S4=N.U(W);this.p=N.U(W);this.z=N.U(W);this.S=N.U(W)};N.qr.prototype.clone=function(){var W=this.S4.length,h=new N.qr(1);
|
|
h.S4=this.S4.slice(0);h.p=this.p.slice(0);h.z=this.z.slice(0);h.S=this.S.slice(0);return h};N.I.a6Y=function(W,h,S,k,p){var I=p[0]+1,q=p[1],P=Math.abs(q-25)/4,t=p[2],M=t%2+t*t>>1,U=N.I.K;
|
|
U.MZ(h,S);var i=U.$B(1),z=U.$B(1),D=U.$B(1);U.MA(W,k,t,t,M);U.T_(k);U.wq(k,i);U.lx(i,z,I,I,1);U.lx(i,D,I,I,I*I);
|
|
U.sub(D,z);U.Xa(z,P);(q<25?U.sub:U.add)(i,z);U.PN(z,k);U.f7(k)};N.I.au0=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=p[0]*2.55,P=p[1],t=P>>1,M=p[2]*.25,U=I.$B(4),i=I.$B(1),z=I.$B(1);I.YK(W,U,P,1,!0,t);
|
|
I.YK(W,k,P,1,!1,t);I.R0(W,i);I.AB(i,q);I.qA(i,z,3);I.Ud(k,z,U);I.QK(U,k,M)};N.I.akC=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);I.Ki(p[3]);var q=p[0]*-3+80,P=p[1]*-3+80,t=p[2]/2+.5,M=p[4],U=p[5],i=I.$B(1),z=I.$B(1),D=I.$B(1),R=I.$B(1),O=I.$B(4),b=I.$B(4);
|
|
I.R0(W,i);I.WQ(i,z);I.l6(i,P,5);I.MC(i,.4,0);I.qA(i,D,3);I.h5(D,i,9,3,!0,27);I.WQ(z,D);I.uA(D);var w=I.Bp(q,5,D);
|
|
for(var Q=0;Q<I.bW;Q++){z[Q]=w[255-z[Q]]}I.MC(z,.4,0);I.WQ(z,D);I.qA(D,R,2);I.h5(R,D,5,3,!1,15);I.Xa(i,t);
|
|
I.Xa(D,t);I.Zf(k,2155905279);I.Zf(b,M);I.Zf(O,U);I.Ud(b,i,k);I.Ud(O,D,k)};N.I.a2v=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=new Uint8Array(256),P=5+10*p[1];P+=p[1]>3?(p[1]-3)*10:0;var t=~~(p[2]*.73)+50,M=Math.min(t+P,128),U=M-t,i=-255*t;
|
|
for(var Q=0;Q<256;Q++){var z=Q*65;q[Q]=I.oa(i/U);i+=255}var D=I.$B(1),R=I.$B(1),O=I.$B(1);I.R0(W,D);
|
|
I.WQ(D,O);I.qA(D,R,2*p[0]+1);I.sub(R,D);I.Xa(D,65);I.h5(D,R,9,3,!0,20);for(var Q=0;Q<I.bW;Q++){var b=O[Q],w=R[Q];
|
|
D[Q]=w>0?~~((w*b+(255-w)*128)/255):128}I.qA(D,R,3);I.h5(R,D,15,2,!0,16);I.h5(R,O,15,2,!1,15);I.lh(D,O);
|
|
I.B1(O,R,2);I.qX(R,q);I.qA(R,D,2);I.qq(D,k)};N.I.a4H=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);var q=2*p[0]+1,P=I.q7[p[1]],t=p[2]*5.1,M=p[3],U=I.$B(1),i=I.$B(1),z=I.$B(4),D=I.$B(4);
|
|
I.Zf(z,M);I.T_(z,k);I.FO(U,t);I.PN(U,k);I.f7(k,z);I.R0(W,i);I.qA(i,U,q);I.sub(U,i);I.Xa(i,P);I.h5(i,U,9,3,!0,20);
|
|
I.Ud(W,U,z);I.He(z,k,3);I.YK(k,z,15,2,!0,16);I.YK(k,D,15,2,!1,16);I.lh(z,D);I.QK(D,k,2)};N.I.a8R=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=(15-p[0])/4+1,P=(15-p[1])/4+1,t=p[2],M=p[3],U=I.Ks(p[4]),i=p[5]+1,z=p[6],D=p[7],R=p[8],O=I.$B(1),b=I.$B(1),w=I.$B(1),A=I.$B(1),g=I.$B(4),E=I.$B(4);
|
|
I.bK(w,t,M,z);I.R0(W,b);I.qA(b,O,5);I.jQ(w,O,A,i,U);I.Xa(A,q);I.OL(A,2);I.uA(O);I.jQ(w,O,b,i,U);I.Xa(b,P);
|
|
I.OL(b,2);I.Zf(g,2155905279);I.Zf(E,D);I.Zf(k,R);I.Ud(g,b,E);I.Ud(E,A,k)};N.I.alz=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);I.Ki(p[3]);var q=p[0],P=p[1]/10,t=p[2]/10,M=I.$B(1),U=I.$B(1),i=I.$B(1),z=I.NA(),D=I.NA(),R=I.NA();
|
|
I.k2(M);I.qA(M,U,11);I.qA(U,M,11);I.lA(M,z);I.te(W,M);I.WQ(M,i);I.qA(M,U,9);I.qA(U,M,9);I.lA(M,D);I.tK(D,R,5);
|
|
I.tK(R,D,5);I.q8(z,.8);I.a1Y(z,D,.8,.9);I.QL(D,M,q);I.lx(M,U,2,2,1);I.lx(U,M,2,2,3);I.lx(M,U,2,2,3);
|
|
I.lx(i,M,5,5,13);I.Yw(U,M,U,P);I.Wy(M,U,U,t);I.jQ(U,U,M,5,1);I.T_(W,k);I.PN(M,k);I.f7(k)};N.I.amb=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=p[0],P=p[1]/2,t=p[2],M=q/2,U=I.$B(4),i=I.$B(4);I.WQ(W,k);for(var z=0;z<t;z++){I.YK(k,U,q,1,!0,M);
|
|
I.YK(k,i,q,1,!1,M);I.lh(i,U);I.He(U,i,2);I.QK(i,k,P)}};N.I.alk=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);
|
|
var q=p[0]*10,P=p[1]*4.9,t=p[2]*4.9,M=I.$B(1),U=I.$B(1),i=I.$B(4),z=I.$B(4);I.R0(W,M);I.AB(M,I.adU(M,q));
|
|
I.qA(M,U,3);I.YK(W,i,5,1,!1,1);I.YK(W,k,15,2,!0,16);I.Ud(k,U,i);I.T_(i,k);I.wq(k,M);I.l6(M,P,t);I.PN(M,k);
|
|
I.f7(k)};N.I.a2a=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);I.Ki(p[4]);var q=p[0]/20,P=[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][p[1]],t=[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][p[2]],M=p[3],U=new Int16Array(256);
|
|
for(var Q=0;Q<256;Q++){U[Q]=~~((Q-128)*q)}var i=I.$B(1),z=I.$B(1),D=I.$B(4);I.R0(W,i);I.qA(i,z,25);I.Xa(z,P);
|
|
I.OL(z,t);I.qA(z,i,25);I.k2(z);I.pn(i,z,U);I.WQ(W,k);I.Zf(D,M);I.Ud(D,i,k)};N.I.a7g=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=p[0]+5,P=15-p[1],t=q*q/2,M=1-(3-p[2])/10,U=~~(P*P*M-1),i=~~(P*P*(1-M));if(i==0)i=1;var z=I.$B(1),D=I.$B(1),R=I.$B(1),O=I.$B(4);
|
|
I.R0(W,R);I.lx(R,z,q,q,t);I.qA(R,D,q);I.sub(z,D);I.AB(D,1);I.MA(W,O,P,P,U);I.MA(W,k,P,P,i);I.Ud(O,D,k)};
|
|
N.I.afM=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);I.Ki(p[3]);var q=(20-p[0])*.05,P=p[1]*-2.75+60,t=65-P,M=p[2]/10,U=I.$B(1),i=I.$B(1);
|
|
I.te(W,i);var z=I.Bp(P,t,i);I.T_(W,k);I.wq(k,i);I.k2(U);I.CG(i,U,q);I.qX(i,z);I.Xa(i,p[2]/10);I.add(U,i);
|
|
I.PN(i,k);I.f7(k)};N.I.aq2=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);var q=5+p[0],P=15-p[1],t=p[2],M=q*q/2+q*q%2*1,U=1-(3-p[2])/10,i=~~(P*P*U-1),z=~~(P*P*(1-U));
|
|
if(z==0)z=1;var D=I.$B(1),R=I.$B(1),O=I.$B(1),b=I.$B(1),w=I.$B(1);I.te(W,R);I.B1(R,D,3);I.lx(D,R,2,2,1);
|
|
var A=I.Bp(20,20,R);I.qX(R,A);I.qA(R,w,5);I.lx(w,D,q,q,M);I.lx(w,R,P,P,i);I.lx(w,O,P,P,z);I.qA(w,b,q);
|
|
I.sub(D,b);I.AB(b,1);I.z$(R,b,O);I.T_(W,k);I.PN(O,k);I.f7(k)};N.I.afv=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);I.Ki(p[5]);var q=I.bW,P=I.eD,t=p[0],M=p[1],U=p[2],i=p[3],z=p[4],D=.05*t+1,R=t/100,O=t>>1,b=2*t-100,w=+(M==9),A=+(M==7),g=[4,1][w],E=[3,2][w],j=[1,2][A],x=[2,1][A],d=[50,75][w],L=M<4?U:(U>>1)+50,_=I.$b(d,L),T=I.z1(i),c=I.z1(z),e=I.$B(4),r=I.$B(4),B=I.$B(1),F=I.$B(1);
|
|
function v(k,_){if(L!=50){I.v6(k,_)}}function X(W,hE){for(var Q=0;Q<q;Q++){W[Q]=I.oa(W[Q]+(hE[Q]-128)*R)}}function V(W,hE){for(var Q=0,Z=0;
|
|
Q<q;Q++){W[Z]=I.oa(W[Z]+(hE[Z]-128)*R);W[Z+1]=I.oa(W[Z+1]+(hE[Z+1]-128)*R);W[Z+2]=I.oa(W[Z+2]+(hE[Z+2]-128)*R);
|
|
Z+=4}}function H(W,k){I.k2(r);I.WQ(W,k);V(k,r);v(k,_)}function o(hE){var Z=0;for(var aQ=0;aQ<12;aQ++)Z+=I.random();
|
|
return I.oa(O*(Z-6)+hE)}function J(W,k){I.WQ(W,k);for(var Q=0;Q<P;Q+=4){k[Q]=o(k[Q]);k[Q+1]=o(k[Q+1]);
|
|
k[Q+2]=o(k[Q+2])}v(k,_)}function C(W,k){I.WQ(W,k);for(var Q=0;Q<P;Q+=4){if(I.random()<R){k[Q]=T[0];k[Q+1]=T[1];
|
|
k[Q+2]=T[2]}}v(k,_)}function Y(W,k){I.k2(e);I.MA(e,r,E,E,g);I.WQ(W,e);V(e,r);I.MA(e,k,5,5,13);v(k,_)}function K(W,k){I.k2(r);
|
|
I.WQ(W,e);V(e,r);v(k,_);I.MA(e,k,E,E,g)}function u(W,k){I.WQ(W,e);v(k,_);I.R0(e,B);for(var Q=0,hE=0;
|
|
Q<q;Q++){var Z=((b-B[Q]+255)*128.5+.5)/32767;if(I.random()<=Z){k[hE++]=c[0];k[hE++]=c[1];k[hE++]=c[2]}else{k[hE++]=T[0];
|
|
k[hE++]=T[1];k[hE++]=T[2]}k[hE]=W[hE];hE++}}function f(W,k){I.T_(W,k);I.wq(k,B);I.B1(B,F,D);I.lx(F,B,E,E,g);
|
|
I.qX(B,_);I.PN(B,k);I.f7(k)}function l(W){var hE=0;if(M==8){for(var Z=0;Z<h;Z++){W[hE++]=~~(I.random()*255)}for(var Q=1;
|
|
Q<S;Q++){for(var Z=0;Z<h;Z++){W[hE++]=W[Z]}}}else{for(var Q=0;Q<S;Q++){var aQ=~~(I.random()*255);for(var Z=0;
|
|
Z<h;Z++){W[hE++]=aQ}}}}function jk(W,k){I.R0(W,B);I.k2(F);X(B,F);l(F);X(B,F);I.He(W,e,9);I.He(e,r,9);
|
|
I.qA(B,F,2);I.qX(F,_);I.qA(F,B,2);I.T_(r,k);I.PN(B,k);I.f7(k)}[H,J,C,Y,Y,K,u,jk,jk,f][M](W,k)};N.I.aif=function(W,h,S,k,p){var I=[-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],q=N.I.K,O=0,b,Q,j,x,d,L=0,_=1,T=255;
|
|
q.MZ(h,S);q.Ki(p[3]);var P=q.$B(1),t=q.$B(1);q.R0(W,P);var M=p[0],U=p[1],i=U<=50?I[U]/255:1+(255-I[101-U])/255,z=p[2],D=P.length,R=new Float32Array(D),w=1+1/10*M,A=(1-1/w)/2,g=16/256,E=h-1;
|
|
for(Q=0;Q<q.bW;Q++){R[Q]=P[Q]/255;t[Q]=M==1?q.random()<1/255?T:_:_}function c(e,r){var B=e*h+r;if(t[B]!=_||e>=S||r>=h){return}var x=R[B],F=i-x,v=q.random(),X=v/w+A;
|
|
if(O==0||Math.abs(d-x)>g){b=X<=F?L:T;O=~~(q.random()*M)}else if(.1<v){O--}else{O=0}t[B]=b;d=x}if(z==0){for(Q=0;
|
|
Q<h;Q++){for(j=0;j<h;j++){x=Q+j;if(x>=h)break;c(j,E-x)}O=0}for(Q=1;Q<S;Q++){for(j=0;j<S;j++){x=Q+j;if(x>=S||j>=h)break;
|
|
c(x,E-j)}O=0}}else if(z==1){for(Q=0;Q<S;Q++){for(j=0;j<h;j++){c(Q,j)}O=0}}else if(z==2){for(Q=0;Q<h;
|
|
Q++){for(j=0;j<h;j++){x=Q+j;if(x>=h)break;c(j,x)}O=0}for(Q=1;Q<S;Q++){for(j=0;j<S;j++){x=Q+j;if(x>=S||j>=h)break;
|
|
c(x,j)}O=0}}else{for(Q=0;Q<h;Q++){for(j=0;j<S;j++){c(j,Q)}O=0}}q.qq(t,k)};N.I.auo=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=p[0],P=p[1],t=p[2],M=I.$B(1),U=I.$B(1),i=I.$B(1),z=I.$B(4),D=I.$B(4);I.R0(W,M);I.lx(M,U,3,3,1);
|
|
I.lx(M,i,3,3,9);I.sub(i,U);I.qA(U,M,3);I.l6(M,40,10);I.YK(W,k,q,2,!1,q);I.YK(W,z,q,2,!0,q);I.Zf(D,255);
|
|
I.Ud(k,M,D);I.Ud(D,M,z);I.QK(z,k,1);I.T_(k);I.wq(k,M);I.l6(M,P,t);I.PN(M,k);I.f7(k)};N.I.a7R=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);I.Ki(p[3]);var q=p[0],P=p[1],t=p[2]/10;q=q+P;var M=I.$B(1),U=I.$B(1),i=I.NA(),z=I.NA();I.k2(M);
|
|
I.qA(M,U,11);I.qA(U,M,11);I.lA(M,i);I.tK(i,z,5);I.tK(z,i,5);I.q8(z,.97);I.QL(z,M,q);I.lx(M,U,P,P,1);
|
|
I.te(W,M);I.Yw(U,M,U,.6);I.Wy(M,U,U,t);I.jQ(U,U,M,5,1);I.T_(W,k);I.PN(M,k);I.f7(k)};N.I.ahV=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=Math.abs(p[0]),P=q+[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][q],t=2*q+1,M=p[1]/10,U=M*13/15,i=I.$B(1),z=I.$B(1),D=I.$B(1),R=I.$B(1),O=I.$B(4),b=I.$B(4),w=I.$B(4),A=I.$B(4),g=I.$B(4);
|
|
I.R0(W,i);if(p[0]>=0){I.uA(i)}I.WQ(i,D);I.qA(i,R,P);I.qA(R,i,P);I.Xa(i,M);I.WQ(i,z);I.qA(i,R,t);I.qA(R,i,t);
|
|
I.Xa(i,U);I.Zf(w,p[2]);I.Zf(A,p[3]);I.Zf(g,p[4]);I.Ud(w,i,A,O);I.Ud(g,z,O,b);I.Ud(A,D,b,k);I.wq(W,D,3);
|
|
I.PN(D,k,3)};N.I.a0_=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);I.Ki(p[5]);var q=p[0]*5.1,P=p[1]/100,t=I.d3[p[2]],M=I.$B(1),U=I.$B(1),i=I.$B(1);
|
|
I.R0(W,M);I.FO(U,255);I.k2(i);I.AB(M,q);I.CG(U,M,.7);I.CG(i,M,P);I.jQ(M,M,U,5,t);I.WQ(W,k);I.anU(k,q,p[4],p[3]);
|
|
I.T_(k);I.PN(U,k);I.f7(k)};N.I.apw=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);var q=p[0],P=4-p[1],t=11-p[2],M=I.$B(1),U=I.$B(1),i=I.$B(4);
|
|
I.te(W,U);for(var Q=0;Q<P;Q++){I.WQ(U,M);I.oD(M,U,q,q)}I.He(W,i,q);I.T_(i,i);I.PN(U,i);I.f7(i,i);(t<11?I.acC:I.WQ)(i,k,t)};
|
|
N.I.ao4=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);I.Ki(p[2]);var q=p[0]+5,P=~~(q/5+1),t=~~(q/2)+1,M=t*t,U=~~(q/3),i=I.d3[p[1]],z=new Array(256);
|
|
for(var Q=0;Q<256;Q++){z[Q]=~~(.2*(Q-128))}var D=I.$B(1),R=I.$B(1);I.a4k(W,k,q);I.T_(k);I.wq(k,D);I.k2(R);
|
|
I.pn(D,R,z);I.ajK(R,q,q,P,P);I.Yw(D,R,D,1);I.qA(D,R,U);I.qA(R,D,U);I.lx(D,R,t,t,M);I.jQ(R,R,D,5,i);I.PN(D,k);
|
|
I.f7(k)};N.I.agF=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);var q=I.$B(1),P=I.$B(1),t=I.$B(1),M=I.NA(),U=I.NA();
|
|
I.R0(W,q);I.qA(q,P,p[2]);I.AB(P,p[0]*5.1);I.lx(P,q,2,2,4);I.qA(q,P,3);I.qA(P,q,3);I.WQ(q,t);I.qA(q,P,5);
|
|
I.qA(P,q,5);I.lA(q,M);I.tK(M,U,5);I.tK(U,M,5);I.a03(M,P,p[1]);I.uA(P);I.Yw(t,P,t,1);I.qq(t,k)};N.I.aeX=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=1<<7-p[2],P=I.$B(1),t=I.$B(1),M=I.$B(1);I.te(W,t);I.qA(t,P,3);I.WQ(P,t);I.qA(P,M,p[0]+5);
|
|
I.sub(M,t);I.l6(t,1,p[1]);I.Xa(P,1/q);I.Xa(P,q);I.sub(P,t);I.T_(W,k);I.PN(t,k);I.f7(k)};N.I.ar0=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);I.Ki(p[3]);var q=I.$B(1),P=I.$B(1),t=I.$B(1);I.R0(W,q);I.as$(P,p[0]/50);I.qA(P,t,3);I.lx(q,P,9,9,41);
|
|
I.l6(P,p[1],p[2]);I.Yw(P,t,t,.75);I.Wy(P,t,P,.5);I.WQ(P,q);I.lx(q,t,3,3,8);I.Yw(t,P,t,.75);I.Xa(t,1.2);
|
|
I.B1(t,q,1);I.qA(q,t,2);I.B1(t,q,2);I.Xa(q,1.2);I.qA(q,t,2);I.qq(t,k)};N.I.a59=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=p[0]+9,P=p[1]/2,t=p[2],M=p[3],U=I.Ks(p[4]),i=p[5]+1,z=p[6],D=I.$B(1),R=I.$B(1),O=I.$B(4),b=I.$B(4);
|
|
I.bK(R,t,M,z);I.R4(W,k,q,1,1);I.R4(k,O,q,1,1);I.aqg(O,O,b,7,P);I.Xa(b,1.2);I.OL(b,1.2);I.jQ(R,D,D,i,U);
|
|
I.Xa(D,3);I.WQ(W,k);I.Ud(b,D,k)};N.I.afp=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);I.Ki(p[3]);var q=p[0]+4,P=q*2/5+(q%5|0);
|
|
q--;var t=p[1]*-2.75+60,M=65-t,U=p[2]/10,i=I.$B(1),z=I.$B(1);I.k2(i);I.te(W,z);var D=I.Bp(t,M,z);I.T_(W,k);
|
|
I.wq(k,z);I.CG(z,i,.8);I.qX(z,D);I.Xa(z,U);I.add(i,z);I.h5(z,i,q,3,!1,P);I.PN(i,k);I.f7(k)};N.I.aum=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);I.Ki(p[3]);var q=p[0]+5,P=(q*q>>1)+q%2,t=p[1]/10,M=p[2],U=(M*M>>1)+M%2,i=I.$B(1),z=I.$B(1),D=I.$B(1),R=I.$B(4),O=I.$B(4),b=I.$B(4);
|
|
I.k2(D);I.T_(W,b);I.wq(b,i);I.CG(i,D,.8);I.qA(D,i,3);I.B1(i,D,t);I.PN(D,b);I.f7(b,b);I.R0(b,D);I.lx(D,i,q,q,P);
|
|
I.qA(D,z,q);I.sub(i,z);I.AB(z,1);I.MA(b,R,7,7,40);I.MA(b,O,7,7,10);I.Ud(R,z,O);I.MA(O,k,M,M,U)};N.I.a6O=function(W,h,S,k,p){var I=N.I.K,P=255,Q,M;
|
|
I.MZ(h,S);var q=p[0];if(q<2)P=q;else if(q<12)P=5*q-5;else if(q<47)P=2*q+28;else if(q<50){Q=q-47;P=125+12.5*Q+12.5*Q*Q}var t=new Uint8Array(256);
|
|
for(Q=75,M=15;Q<256;Q++,M+=24)t[Q]=Math.min(255,M);var U=I.$B(1),i=I.$B(1),z=I.$B(1);I.R0(W,U);I.qA(U,i,11);
|
|
I.qA(i,z,11);I.sub(z,U);I.Xa(U,8);I.sub(z,U);I.AB(U,P);I.uA(U);I.qA(U,i,5);I.AB(i,51);I.qA(i,U,p[1]);
|
|
I.qA(U,i,p[1]);I.uA(i);I.qX(i,t);I.qq(i,k)};N.I.a5z=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);var q=I.q7[p[1]],P=p[2],t=P*1.5,M=I.$B(1),U=I.$B(1),i=I.$B(1);
|
|
I.te(W,M);I.h5(M,U,15,2,!0,15);I.WQ(U,i);I.l6(i,P,t);I.qA(i,M,3);I.qA(U,i,p[0]);I.sub(i,U);I.Xa(U,q);
|
|
I.sub(M,U);I.qA(U,M,3);I.h5(M,U,3,1,!1,1);I.He(W,k,15);I.T_(k);I.PN(U,k);I.f7(k)};N.I.a8A=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);I.Ki(p[3]);var q=p[0]*5.1,P=16-p[1],t=[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][p[2]],M=I.$B(1),U=I.$B(1),i=I.$B(1);
|
|
I.R0(W,M);I.AB(M,q);I.qA(M,U,P);I.qA(U,M,P);I.k2(i);I.Wy(M,i,i,1);I.Yw(M,i,M,.75);I.Xa(M,t);I.OL(M,t);
|
|
I.lx(M,U,2,2,2);I.qq(U,k)};N.I.acf=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);var q=p[0]+9,P=p[1]+9,t=p[2],M=p[3],U=I.Ks(p[4]),i=p[5]+1,z=p[6],D=I.$B(1),R=I.$B(1),O=I.$B(1),b=I.$B(1),w=I.$B(1),A=I.$B(4);
|
|
I.te(W,D);I.oD(D,O,q,q);I.qA(O,D,P);I.WQ(O,w);I.WQ(D,b);I.sub(w,b);I.sub(D,w);I.add(w,b);I.Xa(b,10);
|
|
I.bK(R,t,M,z);I.jQ(R,D,w,i,U);I.z$(w,b,O,.8);I.He(W,A,9);I.He(A,k,9);I.T_(k);I.PN(O,k);I.f7(k)};N.I.a9t=function(W,h,S,k,p){var I=N.I.K;
|
|
I.MZ(h,S);var q=16-p[0],P=p[1]*8,t=1-(3-p[2])/10,M=~~(q*q*t-1),U=~~(q*q*(1-t));if(U==0)U=1;var i=I.$B(1),z=I.$B(1),D=I.$B(1),R=I.$B(4);
|
|
I.R0(W,D);I.lx(D,i,7,7,25);I.qA(D,z,7);I.sub(i,z);I.AB(z,1);I.MA(W,R,q,q,M);I.MA(W,k,q,q,U);I.Ud(R,z,k);
|
|
I.T_(k);I.wq(k,i);I.lx(i,D,3,3,1);I.lx(i,z,3,3,9);I.sub(z,D);I.WQ(D,z);I.sub(i,D);I.sub(D,z);I.lx(z,i,3,3,8);
|
|
I.l6(i,P,1);I.PN(i,k);I.f7(k)};N.I.ac$=function(W,h,S,k,p){var I=N.I.K;I.MZ(h,S);I.Ki(p[3]);var q=p[0],P=p[1],t=p[2],M=q>>1,U=Math.max(~~(q/5),1),i=Math.max(~~(q*2/3),1),z=I.$b(P,t),D=I.$B(1),R=I.$B(1),O=I.$B(1),b=I.$B(1),w=I.$B(4);
|
|
I.te(W,D);I.Z7(2147483647,4,2,2,0,255,R);I.Z7(4,2147483647,2,2,0,255,b);I.k2(O);I.Wy(R,O,R,1);I.Wy(b,O,b,1);
|
|
I.Wy(R,D,R,1);I.Wy(b,D,b,1);I.He(W,w,M);I.He(w,k,M);I.lx(R,D,1,q,U);I.lx(D,R,3,q,i);I.lx(b,D,q,1,U);
|
|
I.lx(D,b,q,3,i);I.lh(R,b);I.T_(k);I.PN(b,k);I.f7(k);I.v6(k,z)};N.I.K={};N.I.K.s6=0;N.I.K.R_=0;N.I.K.bW=0;
|
|
N.I.K.B$=0;N.I.K.eD=0;N.I.K.MZ=function(W,h){var S=W*h,self=N.I.K;self.s6=W;self.R_=h;self.bW=S;self.B$=S<<1;
|
|
self.eD=S<<2};N.I.K.Ki=function(W){N.I.K.random=function(){var h=W+=1831565813;h=Math.imul(h^h>>>15,h|1);
|
|
h^=h+Math.imul(h^h>>>7,h|61);return((h^h>>>14)>>>0)/4294967296}};N.I.K.$B=function(W){var h=N.I.K;return new Uint8Array([-1,h.bW,h.B$,-1,h.eD][W])};
|
|
N.I.K.NA=function(){return new Int32Array(N.I.K.B$)};N.I.K.qA=function(W,h,S,k){if(k==null)k=S;var self=N.I.K,p=self.s6,I=self.R_;
|
|
N.tO.Wr(W,h,new gj(0,0,p,I),S>>>1);return};N.I.K.tK=function(W,h,S,k){var self=N.I.K,p=new Int32Array(self.bW),I=new Int32Array(self.bW);
|
|
for(var Q=0;Q<2;Q++){self.wq(W,p,Q,2);self.qA(p,I,S,k);self.PN(I,h,Q,2)}};N.I.K.He=function(W,h,S,k){var self=N.I.K,p=self.$B(1),I=self.$B(1);
|
|
for(var Q=0;Q<4;Q++){self.wq(W,p,Q);if(Q<3)self.qA(p,I,S,k);else I=p;self.PN(I,h,Q)}};N.I.K.R4=function(W,h,S,k,p){var self=N.I.K,I=self.s6,q=self.R_,P=S+k-1,t=S>>1,M=P>>1,U=0,i=S*k,z=new Int32Array(S);
|
|
for(var Q=0;Q<q;Q++){var D=0,R=0,O=0;for(var b=0;b<S;b++){var w=p?P-b-k:b;for(var A=w,g=k+w;A<g;A++){var E=0-M+A,j=Q-t+b;
|
|
if(A==w){z[b]=E}if(E<0)E=0;else if(E>=I)E=I-1;if(j<0)j=0;else if(j>=q)j=q-1;var x=I*j+E<<2;D+=W[x];R+=W[x+1];
|
|
O+=W[x+2]}}h[U++]=~~(D/i);h[U++]=~~(R/i);h[U++]=~~(O/i);h[U]=W[U];U++;for(var d=1;d<I;d++){for(var b=0;
|
|
b<S;b++){var j=Q-t+b,w=z[b]+1;z[b]=w;var L=w-1,_=w+k-1;if(j<0)j=0;else if(j>=q)j=q-1;if(L<0)L=0;else if(L>=I)L=I-1;
|
|
if(_<0)_=0;else if(_>=I)_=I-1;var T=j*I+L<<2,c=j*I+_<<2;D=D+W[c]-W[T];R=R+W[c+1]-W[T+1];O=O+W[c+2]-W[T+2]}h[U++]=~~(D/i);
|
|
h[U++]=~~(R/i);h[U++]=~~(O/i);h[U]=W[U];U++}}};N.I.K.h5=function(W,h,S,k,p,I){var self=N.I.K,q=self.s6,P=self.R_,t=S+k-1,M=S>>1,U=t>>1,i=0,z=new Int32Array(S),D=new Int32Array(256),R=new Int32Array(16);
|
|
for(var Q=0;Q<P;Q++){D.fill(0);R.fill(0);for(var O=0;O<S;O++){var b=p?t-O-k:O;for(var w=b,A=k+b;w<A;
|
|
w++){var g=0-U+w,E=Q-M+O;if(w==b){z[O]=g}if(g<0)g=0;else if(g>=q)g=q-1;if(E<0)E=0;else if(E>=P)E=P-1;
|
|
D[W[E*q+g]]++;R[W[E*q+g]>>>4]++}}h[i++]=N.I.K.RI(R,D,I);for(var j=1;j<q;j++){for(var O=0;O<S;O++){var E=Q-M+O,b=z[O]+1;
|
|
z[O]=b;var x=b-1,d=b+k-1;if(E<0)E=0;else if(E>=P)E=P-1;if(x<0)x=0;else if(x>=q)x=q-1;if(d<0)d=0;else if(d>=q)d=q-1;
|
|
var L=W[E*q+x],_=W[E*q+d];D[L]--;D[_]++;R[L>>>4]--;R[_>>>4]++}h[i++]=N.I.K.RI(R,D,I)}}};N.I.K.YK=function(W,h,S,k,p,I){var self=N.I.K,q=self.$B(1),P=self.$B(1);
|
|
for(var Q=0;Q<4;Q++){self.wq(W,q,Q);if(Q<3)self.h5(q,P,S,k,p,I);else P=q;self.PN(P,h,Q)}};N.I.K.lx=function(W,h,S,k,p){p=Math.min(k*S,p);
|
|
var self=N.I.K,I=self.s6,q=self.R_,P=k>>1,t=S>>1,M=0,U=new Int32Array(k),i=new Int32Array(256),z=new Int32Array(16);
|
|
for(var Q=0;Q<q;Q++){i.fill(0);z.fill(0);for(var D=0;D<k;D++){for(var R=0,O=S;R<O;R++){var b=0-t+R,w=Q-P+D;
|
|
if(R==0){U[D]=b}if(b<0)b=0;else if(b>=I)b=I-1;if(w<0)w=0;else if(w>=q)w=q-1;i[W[w*I+b]]++;z[W[w*I+b]>>>4]++}}h[M++]=N.I.K.RI(z,i,p);
|
|
for(var A=1;A<I;A++){for(var D=0;D<k;D++){var w=Q-P+D,g=U[D]+1;U[D]=g;var E=g-1,j=g+S-1;if(w<0)w=0;else if(w>=q)w=q-1;
|
|
if(E<0)E=0;else if(E>=I)E=I-1;if(j<0)j=0;else if(j>=I)j=I-1;var x=W[w*I+E],d=W[w*I+j];i[x]--;i[d]++;
|
|
z[x>>>4]--;z[d>>>4]++}h[M++]=N.I.K.RI(z,i,p)}}};N.I.K.RI=function(W,h,S){var k=0,p=0;while(k+W[p>>>4]<S){k+=W[p>>>4];
|
|
p+=16}for(;p<256;p++){k+=h[p];if(k>=S)break}return p};N.I.K.MA=function(W,h,S,k,p){var self=N.I.K,I=self.$B(1),q=self.$B(1);
|
|
for(var Q=0;Q<4;Q++){self.wq(W,I,Q);if(Q<3)self.lx(I,q,S,k,p);else q=I;self.PN(q,h,Q)}};N.I.K.B1=function(W,h,S){var self=N.I.K,k=self.s6,p=self.R_,I=0;
|
|
for(var Q=0;Q<p;Q++){var q=Q*k,P=(Q-1)*k,t=(Q+1)*k;if(P<0)P=q;if(t>=p)t=q;for(var M=0;M<k;M++){var U=M-1,i=M+1;
|
|
if(U<0)U=M;if(i>=k)i=M;var z=q+U,D=q+i,R=P+M,O=t+M,b=q+M,w=W[z],A=W[D],g=W[R],E=W[O],j=W[b],x=j+(j*4*S+.5);
|
|
x=x-((w+A+E+g)*S+.5);h[I++]=self.oa(x)}}};N.I.K.QK=function(W,h,S){var self=N.I.K,k=self.$B(1),p=self.$B(1);
|
|
for(var Q=0;Q<4;Q++){self.wq(W,k,Q);if(Q<3)self.B1(k,p,S);else p=k;self.PN(p,h,Q)}};N.I.K.acC=function(W,h,S){var self=N.I.K,k=self.s6,p=self.R_,I=0,q=S+4;
|
|
for(var Q=0;Q<p;Q++){var P=Q*k,t=(Q-1)*k,M=(Q+1)*k;if(t<0)t=P;if(M>=p)M=P;for(var U=0;U<k;U++){var i=U-1,z=U+1;
|
|
if(i<0)i=U;if(z>=k)z=U;var D=P+i<<2,R=P+z<<2,O=t+U<<2,b=M+U<<2,w=P+U<<2;for(var A=0;A<3;A++){var g=W[D+A],E=W[R+A],j=W[O+A],x=W[b+A],d=W[w+A];
|
|
h[I++]=(d*S+g+E+x+j)/q}h[I]=W[I];I++}}};N.I.K.oD=function(W,h,S,k){var self=N.I.K,p=self.s6,I=self.R_,q=S>>1,P=k>>1,t=0,M=new Int32Array(S),U=new Int32Array(256);
|
|
for(var Q=0;Q<I;Q++){U.fill(0);for(var i=0;i<S;i++){for(var z=0,D=k;z<D;z++){var R=0-P+z,O=Q-q+i;if(z==0){M[i]=R}if(R<0)R=0;
|
|
else if(R>=p)R=p-1;if(O<0)O=0;else if(O>=I)O=I-1;U[W[O*p+R]]++}}var b=0,w=0;for(var A=0;A<256;A++){if(b<U[A]){w=A;
|
|
b=U[A]}}h[t++]=w;for(var g=1;g<p;g++){for(var i=0;i<S;i++){var O=Q-q+i,E=M[i]+1;M[i]=E;var j=E-1,x=E+k-1;
|
|
if(O<0)O=0;else if(O>=I)O=I-1;if(j<0)j=0;else if(j>=p)j=p-1;if(x<0)x=0;else if(x>=p)x=p-1;U[W[O*p+j]]--;
|
|
U[W[O*p+x]]++}b=0;w=0;for(var A=0;A<256;A++){if(b<U[A]){w=A;b=U[A]}}h[t++]=w}}};N.I.K.apm=[function(W,h,S,k,p,I,q,P,t,M){return p+(W+h+S)*M-(t+P+q)*M},function(W,h,S,k,p,I,q,P,t,M){return p+(h+S+I)*M-(P+q+k)*M},function(W,h,S,k,p,I,q,P,t,M){return p+(S+I+t)*M-(q+k+W)*M},function(W,h,S,k,p,I,q,P,t,M){return p+(I+t+P)*M-(k+W+h)*M},function(W,h,S,k,p,I,q,P,t,M){return p+(t+P+q)*M-(W+h+S)*M},function(W,h,S,k,p,I,q,P,t,M){return p+(P+q+k)*M-(h+S+I)*M},function(W,h,S,k,p,I,q,P,t,M){return p+(q+k+W)*M-(S+I+t)*M},function(W,h,S,k,p,I,q,P,t,M){return p+(k+W+h)*M-(I+t+P)*M}];
|
|
N.I.K.jQ=function(W,h,S,k,p){var self=N.I.K,I=self.s6,q=self.R_,P=I,t=self.apm[k-1];for(var Q=0;Q<q;
|
|
Q++){var M=(Q>0?Q-1:0)*P,U=Q*P,i=(Q<q?Q+1:Q)*P;for(var z=0;z<I;z++){var D=z>0?z-1:0,R=z<I?z+1:z,O=U+z,b=W[M+D],w=W[M+z],A=W[M+R],g=W[U+D],E=h[O],j=W[U+R],x=W[i+D],d=W[i+z],L=W[i+R];
|
|
S[O]=self.oa(t(b,w,A,g,E,j,x,d,L,p))}}};N.I.K.aqg=function(W,h,S,k,p){var self=N.I.K,I=self.$B(1),q=self.$B(1),P=self.$B(1);
|
|
for(var Q=0;Q<3;Q++){self.wq(W,I,Q);self.wq(h,q,Q);self.jQ(I,q,P,k,p);self.PN(P,S,Q)}self.wq(h,I,3);
|
|
self.PN(I,S,3)};N.I.K.R0=function(W,h){var S=W.length,k=0;for(var Q=0;Q<S;Q++){h[k++]=~~((W[Q++]+W[Q++]+W[Q++]+2)/3)}};
|
|
N.I.K.qq=function(W,h){var S=h.length,k=0;for(var Q=0;Q<S;Q++){var p=W[Q];h[k++]=p;h[k++]=p;h[k++]=p;
|
|
h[k++]=255}if(h[0]==255)h[0]--;else h[0]++};N.I.K.te=function(W,h){var S=h.length,k=0;for(var Q=0;Q<S;
|
|
Q++){var p=W[k++],I=W[k++],q=W[k++];k++;if(I>p)p=I;if(q>p)p=q;h[Q]=p}};N.I.K.T_=function(W,h){if(h==null)h=W;
|
|
var S=W.length;for(var k=0;k<S;k+=4){var p=W[k],I=W[k+1],q=W[k+2],P=p,t=0,M=p,i;if(I<=p){p=I}else{t=1;
|
|
M=I}if(q<=M){if(p>q){p=q}}else{t=2;M=q}var U=M-p;if(U!=0){if(t==0){i=~~(43*(I-q)/U)}else if(t==1){i=~~(43*(q+2*U-P)/U)}else{i=43*(P+4*U-I)/U}if(i<0){i=255&i-1}h[k]=i;
|
|
h[k+1]=~~(255*U/M)}else{h[k]=U;h[k+1]=U}h[k+2]=M;h[k+3]=W[k+3]}};N.I.K.f7=function(W,h){if(h==null)h=W;
|
|
var S=W.length;for(var k=0;k<S;k+=4){var p=W[k],I=W[k+1],q=W[k+2];if(I){if(p==255)p=0;var P=~~(6*p/255),t=~~(-255*P+6*p);
|
|
if(P==0){h[k]=q;h[k+1]=~~(q*(255-I*(255-t)/255)/255);h[k+2]=~~(q*(255-I)/255)}else if(P==1){h[k]=~~(q*(255-I*t/255)/255);
|
|
h[k+1]=q;h[k+2]=~~(q*(255-I)/255)}else if(P==2){h[k]=~~(q*(255-I)/255);h[k+1]=q;h[k+2]=~~(q*(255-I*(255-t)/255)/255)}else if(P==3){h[k]=~~(q*(255-I)/255);
|
|
h[k+1]=~~(q*(255-I*t/255)/255);h[k+2]=q}else if(P==4){h[k]=~~(q*(255-I*(255-t)/255)/255);h[k+1]=~~(q*(255-I)/255);
|
|
h[k+2]=q}else{h[k]=q;h[k+1]=~~(q*(255-I)/255);h[k+2]=~~(q*(255-I*t/255)/255)}}else{h[k]=q;h[k+1]=q;h[k+2]=q}h[k+3]=W[k+3]}};
|
|
N.I.K.PN=function(W,h,S,k){if(S==null)S=2;if(k==null)k=4;var p=W.length;for(var Q=0;Q<p;Q++){h[S]=W[Q];
|
|
S+=k}};N.I.K.wq=function(W,h,S,k){if(S==null)S=2;if(k==null)k=4;var p=h.length;for(var Q=0;Q<p;Q++){h[Q]=W[S];
|
|
S+=k}};N.I.K.z$=function(W,h,S,k){if(k==null)k=1;var p=h.length,I=0,q;for(var I=0;I<p;I++){q=h[I];if(q){q*=k;
|
|
S[I]=~~((q*W[I]+(255-q)*S[I])/255)}}};N.I.K.Ud=function(W,h,S,k){if(k==null)k=S;var p=h.length,I=0,q,P;
|
|
for(var Q=0;Q<p;Q++){q=h[Q];if(q){P=255-q;k[I]=~~((q*W[I]+P*S[I])/255);k[I+1]=~~((q*W[I+1]+P*S[I+1])/255);
|
|
k[I+2]=~~((q*W[I+2]+P*S[I+2])/255)}k[I+3]=W[I+3];I+=4}};N.I.K.Yw=function(W,h,S,k){var p=~~(k*255),I=S.length;
|
|
for(var Q=0;Q<I;Q++){S[Q]=((255-p*(255-W[Q])/255)*h[Q]+W[Q]*(p*(255-W[Q])/255))/255}};N.I.K.Wy=function(W,h,S,k){var p=~~(k*255),I=S.length;
|
|
for(var Q=0;Q<I;Q++){S[Q]=((255-p*W[Q]/255)*h[Q]+W[Q]*(p*W[Q]/255))/255}};N.I.K.CG=function(W,h,S){var k=h.length;
|
|
for(var Q=0;Q<k;Q++){h[Q]=~~(W[Q]*S+.5)+(h[Q]-~~(h[Q]*S+.5))}};N.I.K.sub=function(W,h){var S=W.length;
|
|
for(var Q=0;Q<S;Q++){h[Q]=Math.max(W[Q]-h[Q],0)}};N.I.K.add=function(W,h){var S=W.length;for(var Q=0;
|
|
Q<S;Q++){h[Q]=Math.min(W[Q]+h[Q],255)}};N.I.K.lh=function(W,h){var S=W.length;for(var Q=0;Q<S;Q++){h[Q]=W[Q]+h[Q]>>1}};
|
|
N.I.K.WQ=function(W,h){var S=W.length;for(var Q=0;Q<S;Q++){h[Q]=W[Q]}};N.I.K.qX=function(W,h){var S=W.length;
|
|
for(var Q=0;Q<S;Q++){W[Q]=h[W[Q]]}};N.I.K.v6=function(W,h){var S=N.I.K.eD;for(var Q=0;Q<S;Q+=4){var k=W[Q],p=W[Q+1],I=W[Q+2],q=k;
|
|
if(p>k)q=p;if(I>k)q=I;var P=h[q];if(P){W[Q]=~~(P*k/q);W[Q+1]=~~(P*p/q);W[Q+2]=~~(P*I/q)}else{W[Q]=P;
|
|
W[Q+1]=P;W[Q+2]=P}}};N.I.K.Xa=function(W,h){for(var Q=0,S=W.length;Q<S;Q++){W[Q]=Math.min(255,~~(.5+W[Q]*h))}};
|
|
N.I.K.OL=function(W,h){for(var Q=0,S=W.length;Q<S;Q++){W[Q]=255-Math.min(255,~~(.5+(255-W[Q])*h))}};
|
|
N.I.K.uA=function(W){var h=W.length;for(var Q=0;Q<h;Q++){W[Q]=255-W[Q]}};N.I.K.AB=function(W,h,S,k){if(S==null)S=0;
|
|
if(k==null)k=255;for(var Q=0,p=W.length;Q<p;Q++){W[Q]=W[Q]>=h?k:S}};N.I.K.z1=function(W){return[W>>24&255,W>>16&255,W>>8&255,W&255]};
|
|
N.I.K.anU=function(W,h,S,k){if(S==null)S=255;if(k==null)k=4278190335;var p=N.I.K,I=p.eD,q=p.z1(S),P=p.z1(k);
|
|
for(var Q=0;Q<I;Q+=4){var t=~~((W[Q]+W[Q+1]+W[Q+2]+2)/3);if(t>=h){W[Q]=q[0];W[Q+1]=q[1];W[Q+2]=q[2]}else{W[Q]=P[0];
|
|
W[Q+1]=P[1];W[Q+2]=P[2]}}};N.I.K.Zf=function(W,h){var S=N.I.K,k=S.eD,p=S.z1(h);for(var Q=0;Q<k;){W[Q++]=p[0];
|
|
W[Q++]=p[1];W[Q++]=p[2];W[Q++]=p[3]}};N.I.K.FO=function(W,h){var S=W.length;for(var Q=0;Q<S;){W[Q++]=h}};
|
|
N.I.K.$b=function(W,h){W=W>5?(100-Math.max(4,W))/100:.95;h=h!=100?Math.max(4,h)/100:.9995;var S=new Uint8Array(256),k=h>.5?.5/(1-h):h*2,p=~~(k*256),I=~~((.5-W*k)*256)<<8;
|
|
for(var Q=0;Q<256;Q++){S[Q]=N.I.K.oa(I>>8);I+=p}return S};N.I.K.k2=function(W){for(var Q=0,h=N.I.K,S=W.length;
|
|
Q<S;Q++){W[Q]=~~(h.random()*256)}};N.I.K.as$=function(W,h){for(var Q=0,S=N.I.K,k=W.length;Q<k;Q++){W[Q]=S.random()<h?255:0}};
|
|
N.I.K.MC=function(W,h,S){for(var Q=0,k=N.I.K,p=W.length;Q<p;Q++){if(k.random()<h)W[Q]=S}};N.I.K.pn=function(W,h,S){var k=W.length;
|
|
for(var Q=0;Q<k;Q++){W[Q]=N.I.K.oa(W[Q]+S[h[Q]])}};N.I.K.c3=function(W){var h=new Uint32Array(256);for(var Q=0,S=W.length;
|
|
Q<S;Q++){h[W[Q]]++}return h};N.I.K.Bp=function(W,h,S){var self=N.I.K,k=self.c3(S),p=self.bW/100,I=new Uint8Array(256),q=p*W,P=p*h,t=0,M=-1,U=256;
|
|
do{t+=k[++M]}while(t<=q);t=0;do{t+=k[--U]}while(t<=P);if(U-M<=0)U=M+1;if(U>255){U=255;M=254}var i=255/(U-M),z=-M;
|
|
for(var Q=0;Q<256;Q++){I[Q]=self.oa(i*z+.5);z++}return I};N.I.K.l6=function(W,h,S){var k=N.I.K;k.qX(W,k.Bp(h,S,W))};
|
|
N.I.K.adU=function(W,h){var self=N.I.K,S=self.c3(W),k=self.bW*h/100,p=0,I=-1;do{p+=S[++I]}while(p<=k);
|
|
return I};N.I.K.lA=function(W,h){var S=0,self=N.I.K,k=self.s6,p=self.R_,I=1/Math.PI,q=I*255;for(var Q=0;
|
|
Q<p;Q++){var P=Q+1;if(P==p)P--;var t=Q*k,M=~~((1-(Q+1)/p)*255);for(var U=0;U<k;U++){var i=U+1;if(i==k)i--;
|
|
var z=W[t+U],D=W[t+i],R=W[P*k+U];if(z-R==0){h[S++]=M}else{var O=z-R+255;if(O==255){O=0}else{O=~~(Math.atan2(1/(255-O),1)*q+.5);
|
|
if(O<0)O+=255}h[S++]=O}if(z-D==0){h[S++]=~~((1-(U+1)/k)*255)}else{var O=z-D+255;if(O==255){O=0}else{O=~~(Math.atan2(1/(255-O),1)*q+.5);
|
|
if(O<0)O+=255}h[S++]=O}}}};N.I.K.q8=function(W,h){var self=N.I.K,S=self.s6,k=self.R_,p=0;for(var Q=0;
|
|
Q<k;Q++){for(var I=0;I<S;I++){W[p]=~~(Q*h+.5)+~~(W[p]*(1-h)+.5);p++;W[p]=~~(I*h+.5)+~~(W[p]*(1-h)+.5);
|
|
p++}}};N.I.K.a1Y=function(W,h,S,k){var self=N.I.K,p=self.s6,I=self.R_,q=0;for(var Q=0;Q<I;Q++){for(var P=0;
|
|
P<p;P++){h[q]=~~(h[q]*(1-S)+.5)+~~(W[q]*k+.5);q++;h[q]=~~(h[q]*(1-S)+.5)+~~(W[q]*k+.5);q++}}};N.I.K.QL=function(W,h,S){var self=N.I.K,k=self.s6,p=self.R_,I=0,q=0;
|
|
for(var Q=0;Q<p;Q++){for(var P=0;P<k;P++){var t=W[I++],M=W[I++];h[q++]=M%S>=2&&t%S>=2?255:0}}};N.I.K.Z7=function(W,h,S,k,p,I,q){var self=N.I.K,P=self.s6,t=self.R_,M=0,U=0,i=0;
|
|
for(var Q=0;Q<t;Q++){var z=Q%W<S||t-S<=Q;for(var D=0;D<P;D++){q[M++]=z||D%h<k||P-k<=D?p:I}}};N.I.K.bK=function(W,h,S,k){var self=N.I.K,p=self.s6,I=self.R_,q=bh.bK(h),P=q[0],t=q[1],M=N.U(P.n()*4);
|
|
M.fill(4294967295);N.yS(t,M);var U=N.scale.AQ(M,P.e,P.Z),i=N.scale.Dk(U,null,p,I,S/100,S/100,0,0);N.sN(i,W,0);
|
|
if(k)N.uA(W)};N.I.K.oa=function(W){return~~Math.min(255,Math.max(0,W))};N.I.K.q7=[0,5,10,15,20,25,35,45,65,85,105,125,145,165,185,205];
|
|
N.I.K.d3=[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];N.I.K.Ks=function(W){return W>40?[1.25,1.5,1.75,2,2.5,3,4,5,7.5,10][W-41]:W/40};
|
|
N.I.K.a4k=function(W,h,S){var self=N.I.K,k=self.s6,p=self.R_,I=S,q=S>>1,P=q-1,t=I*I,M=0;for(var Q=0;
|
|
Q<p;Q++){var U=0,i=0,z=0,D=~~(Q/S)*S,R=0;for(var O=0;O<I;O++){for(var b=0;b<I;b++){var w=R+b,A=D+O;if(w>=k)w=k-1;
|
|
if(A>=p)A=p-1;U+=W[A*k+w<<2];i+=W[(A*k+w<<2)+1];z+=W[(A*k+w<<2)+2]}}var g=~~(U/t),E=~~(i/t),j=~~(z/t);
|
|
h[M]=g;h[M+1]=E;h[M+2]=j;h[M+3]=W[M+3];M+=4;for(var x=1;x<k;x++){for(var O=0;O<I;O++){var d=x-1,L=d+I,A=D+O;
|
|
if(L>=k)L=k-1;if(A>=p)A=p-1;var _=A*k,T=_+L<<2,c=_+d<<2;U+=W[T]-W[c];i+=W[T+1]-W[c+1];z+=W[T+2]-W[c+2]}if(x%S==0){g=~~(U/t);
|
|
E=~~(i/t);j=~~(z/t)}h[M]=g;h[M+1]=E;h[M+2]=j;h[M+3]=W[M+3];M+=4}}};N.I.K.ajK=function(W,h,S,k,p){var self=N.I.K,I=self.s6,q=self.R_,P=0,t=0,M=0,U=0;
|
|
for(var Q=U;Q<q+U;Q++){var i=Q%h>=k||Q<k||q+U-k<=Q;for(var z=0;z<I;z++){W[P++]=i&&(z%S>=p||z<p||I-p<=z)?255:0}}};
|
|
N.I.K.a03=function(W,h,S){var k=function(M,U){return U<=M?M/U&1?U-M%U:M%U:M},p=[function(P,t){return k(P,255)/255},function(P,t){return(255+k(P,255)-k(t,255))/510},function(P,t){return(255-k(t,255))/255},function(P,t){return(510-k(P,255)-k(t,255))/510},function(P,t){return(255-k(P,255))/255},function(P,t){return(255-k(P,255)+k(t,255))/510},function(P,t){return k(t,255)/255},function(P,t){return(k(P,255)+k(t,255))/510}][S],I=0,q=0;
|
|
for(var Q=0;Q<N.I.K.bW;Q++){var P=W[I++],t=W[I++];h[q++]=~~(255*p(P,t))}};N.I.aaC=function(){var W=[],h=new Uint8Array(512),S=new Float32Array(512),k=new Float32Array(512),p=[1,-1,1,-1,1,-1,0,0],I=[1,1,-1,-1,0,0,1,-1],q=0,P,R=0;
|
|
for(;q<256;q++)W[q]=q;while(q!=0){q--;P=Math.floor(Math.random()*q);W[P]^=W[q]^(W[q]=W[P])}function t(t){t=Math.floor(t*65536);
|
|
if(t<256){t|=t<<8}for(var Q=0;Q<256;Q++){var w=Q+256,A=W[Q]^(Q&1?t:t>>8)&255;h[Q]=h[w]=A;A=A%8;S[Q]=S[w]=p[A];
|
|
k[Q]=k[w]=I[A]}}function M(w){return w*w*w*(w*(w*6-15)+10)}function U(w,A,g){return(1-g)*w+g*A}function i(w,A){return w&A}function z(w,A){return w%A}function D(w,A,g,E,j){var x=Math.floor(w),d=Math.floor(A),q,L,_,T,c,e;
|
|
w=w-x;A=A-d;x=x&255;d=d&255;q=x+h[d];T=S[q]*w+k[q]*A;q=x+h[j(d+1,E)];_=S[q]*w+k[q]*(A-1);q=j(x+1,g)+h[d];
|
|
c=S[q]*(w-1)+k[q]*A;q=j(x+1,g)+h[j(d+1,E)];e=S[q]*(w-1)+k[q]*(A-1);L=M(w);return U(U(T,c,L),U(_,e,L),M(A))}function O(w,q,A){w[q]=A}function b(w,A,g,E,j){var x=Math.min(Math.min(A,256),Math.min(256,g)),d=x==256||x<8,L=8,_=new Uint32Array(L),T=new Uint32Array(L),c=new Float32Array(L),e=new Float32Array(L),r=1,B=1,F=d?i:z,v=O,X;
|
|
for(var Q=0;Q<L;Q++){X=B*1/x;if(d){T[Q]=(1<<Math.ceil(Math.log2(g*X)))-1;_[Q]=(1<<Math.ceil(Math.log2(A*X)))-1}else{T[Q]=X*g;
|
|
_[Q]=X*A}c[Q]=r;e[Q]=X;r*=.5;B=B<<1}t(Math.random());for(var V=0,q=0;V<g;V++){for(var H=0;H<A;H++){var o=0;
|
|
for(var J=0;J<L;J++){X=e[J];o+=D(H*X,V*X,_[J],T[J],F)*c[J]}v(E,q++,Math.round(Math.max(0,255*Math.min(1,.5+o*.5))))}}}return b}();
|
|
N.I.akv=function(){function W(h,S,k,p){var I=new Uint8Array(h.length>>>2),q=new Uint8Array(h.length>>>2),P=new Uint8Array(h.length);
|
|
for(var Q=0;Q<h.length;Q+=4){var t=h[Q+0]*.3+h[Q+1]*.59+h[Q+2]*.11;q[Q>>>2]=t;P[Q]=h[Q];P[Q+1]=h[Q+1];
|
|
P[Q+2]=h[Q+2]}N.pG.HR(q,I,S,k);N.pG.kS(h,p,S,k,N.pG.r0[1],0,!0);for(var Q=0;Q<h.length;Q+=4){P[Q+3]=255-I[Q>>>2]}for(var Q=0,M=h.length;
|
|
Q<M;Q+=4){var U=P[Q+3]/255;p[Q]=P[Q]*U+p[Q]*(1-U);p[Q+1]=P[Q+1]*U+p[Q+1]*(1-U);p[Q+2]=P[Q+2]*U+p[Q+2]*(1-U)}}return W}();
|
|
N.I.aa_=function(){function W(I,q,P,t,M){var U=new Uint32Array(I.buffer),i=0;for(var Q=0;Q<P;Q++){for(var z=0;
|
|
z<q;z++,i+=4){var D=U[Q*q+z],R=D&255,O=D>>>8&255,b=D>>>16&255,w=D>>>24&255,A=~~(Math.random()*8),g=A%3,E=0,j=0;
|
|
if(A<3){j--}else if(A>4){j++}if(g==0){E--}else if(g==2){E++}var x=z+E,d=Q+j;if(x<0)x=0;else if(x>q-1)x=q-1;
|
|
if(d<0)d=0;else if(d>P-1)d=P-1;var D=U[d*q+x],L=D&255,_=D>>>8&255,T=D>>>16&255,c=D>>>24&255;t[i]=M(R,L);
|
|
t[i+1]=M(O,_);t[i+2]=M(b,T);t[i+3]=M(w,c)}}}function h(I,q){return q}function S(I,q){return I>q?q:I}function k(I,q){return I<q?q:I}function p(I,q,P,t,M){var U=M[0];
|
|
if(U==0)W(I,q,P,t,h);else if(U==1)W(I,q,P,t,S);else if(U==2)W(I,q,P,t,k);else if(U==3){console.error("Not implemented")}else console.error("Mew mew")}return p}();
|
|
N.I.amq=function(){function W(h,S,k,p,I){var q=I&&I[0]?I[0]:4,P,t,M,U,i,z,D;for(var Q=0;Q<k;Q++){var R=Math.max(Q-q,0),O=Math.min(Q+q,k-1);
|
|
for(var b=0;b<S;b++){var w=Math.max(b-q,0),A=Math.min(b+q,S-1);P=R*S+w<<2;U=h[P];i=h[P+1];z=h[P+2];D=h[P+3];
|
|
P=R*S+A<<2;U+=h[P];i+=h[P+1];z+=h[P+2];D+=h[P+3];P=O*S+w<<2;U+=h[P];i+=h[P+1];z+=h[P+2];D+=h[P+3];P=O*S+A<<2;
|
|
U+=h[P];i+=h[P+1];z+=h[P+2];D+=h[P+3];P=Q*S+b<<2;p[P]=U+2>>>2;p[P+1]=i+2>>>2;p[P+2]=z+2>>>2;p[P+3]=D+2>>>2}}}return W}();
|
|
N.I.a3L=function(){function W(h,S,k,p){var I=new Uint8Array(h.length),q=new Uint8Array(h.length>>>2),P=new Uint8Array(h.length>>>2);
|
|
N.pG.kS(h,I,S,k,N.pG.r0[2],0,!0);for(var Q=0;Q<h.length;Q+=4){var t=I[Q+0]*.3+I[Q+1]*.59+I[Q+2]*.11;
|
|
q[Q>>>2]=t;p[Q+0]=h[Q+0];p[Q+1]=h[Q+1];p[Q+2]=h[Q+2];p[Q+3]=h[Q+3]}N.pG.HR(q,P,S,k);for(var Q=0;Q<h.length;
|
|
Q+=4){I[Q+3]=~~(Math.max(0,255-P[Q>>>2]-50)*(255/205))}for(var Q=0,M=h.length;Q<M;Q+=4){var U=I[Q+3]/255;
|
|
p[Q]=I[Q]*U+p[Q]*(1-U);p[Q+1]=I[Q+1]*U+p[Q+1]*(1-U);p[Q+2]=I[Q+2]*U+p[Q+2]*(1-U)}}return W}();N.I.DG=function(){function W(A,g){return A[g]+A[g+1]+A[g+2]+A[g+3]}function h(A,g){return A[g]+A[g+1]+A[g+2]+2*A[g+3]}function S(A,g,E,j){A[g]=E[j];
|
|
A[g+1]=E[j+1];A[g+2]=E[j+2];A[g+3]=E[j+3]}function k(A,g,E){A[g]=A[E];A[g+1]=A[E+1];A[g+2]=A[E+2];A[g+3]=A[E+3]}function p(A,g,E){A[E]=g[E];
|
|
A[E+1]=g[E+1];A[E+2]=g[E+2];A[E+3]=255-g[E+3]}function I(A){for(var Q=0,g=A.length;Q<g;Q+=4){A[Q+3]=255-A[Q+3]}}function q(){var A=Math.random();
|
|
if(A>.5)return 0;if(A>.25)return 1;if(A>.1)return 2;if(A>.02143)return 3;if(A>.00445)return 4;if(A>65e-5)return 5;
|
|
if(A>415e-6)return 6;if(A>55e-6)return 7;return 8}function P(A,g,E,j,x,d){A[g]=E[j]+(x[d]-E[j]>>1);A[g+1]=E[j+1]+(x[d+1]-E[j+1]>>1);
|
|
A[g+2]=E[j+2]+(x[d+2]-E[j+2]>>1);A[g+3]=E[j+3]+(x[d+3]-E[j+3]>>1)}function t(A,g,E,j,x,d){A[g]=x[d]+E[j]>>1;
|
|
A[g+1]=x[d+1]+E[j+1]>>1;A[g+2]=x[d+2]+E[j+2]>>1;A[g+3]=x[d+3]+E[j+3]>>1}function M(A,g,E,j,x,d,L,_,T){var c=0,e=0,r=0,Q,B=x[d],F;
|
|
P(_,0,A,g,A,E);for(Q=0;Q<B;Q++){P(_,(Q+1)*4,_,Q*4,A,E)}e=(B+1)*4;r+=B;d--;S(A,g,_,e-4);j[d]=W(A,g);g-=T;
|
|
while(d>0&&j[d-1]<j[d]){F=_;_=L;L=F;c=e;t(_,0,A,g-T,L,0);for(Q=4;Q<c;Q+=4){t(_,Q,_,Q-4,L,Q)}B=x[d];for(Q=r;
|
|
Q<B;Q++){P(_,e,_,e-4,L,c-4);e+=4;r++}d--;S(A,g,_,e-4);j[d]=W(A,g);g-=T}}function U(A,g,E,j,x){var d=g*4,L=0,_,T,c=new Uint8Array(g+1),e=new Uint8Array(10*4),r=new Uint8Array(10*4);
|
|
for(var Q=0;Q<E;Q++){p(j,A,L);x[0]=W(j,L);c[0]=q();_=L;L+=4;for(var B=1;B<g;B++){p(j,A,L);x[B]=W(j,L);
|
|
T=q();c[B]=T;if(x[B-1]<x[B]&&T>0){M(j,L-4,L,x,c,B,e,r,4)}L+=4}x[g]=x[0];c[g]=c[0];if(x[g-1]<x[g]&&T>0){M(j,L,_,x,c,g,e,r,4)}}I(j)}function i(){var A=Math.random();
|
|
if(A>.659755)return 0;if(A>.1625)return 10;if(A>.06)return 20;if(A>.01)return 30;if(A>.0035)return 40;
|
|
if(A>65e-5)return 50;if(A>415e-6)return 60;if(A>55e-6)return 70;return 80}function z(A,g,E,j,x,d){var L=i()+1,_=j[x];
|
|
for(var Q=1;Q<L;Q++){if(0>x)break;if(j[x-Q]<_){k(A,g,E)}else{break}g+=d}}function D(A,g,E,j,x){var d=g*4,L=0;
|
|
for(var Q=0;Q<E;Q++){p(j,A,L);x[0]=W(j,L);L+=4;for(var _=1;_<g;_++){p(j,A,L);x[_]=W(A,L);if(x[_-1]<x[_]){z(j,L-4,L,x,_,-4)}L+=4}x[g]=x[0];
|
|
if(x[_-1]<x[_]){z(j,L-4,L-d,x,_,-4)}}I(j)}function R(A,g,E,j,x,d){var L=1,_,T,c=new Uint8Array(4),e,r=g;
|
|
while(Math.random()<1/L){r=g;if(j<=1)break;_=E[j];T=E[j-1];if(_<=T)break;S(c,0,A,r-d);e=!0;for(var Q=j;
|
|
Q<x;Q++){if(T>E[Q]){S(A,r-d,c,0);E[Q-1]=T;e=!1;break}S(A,r-d,A,r);E[Q-1]=E[Q];r+=d}if(e){S(A,r-d,c,0);
|
|
E[x-1]=T}L++;j--;g-=d}}function O(A,g,E,j,x){var d=0,L=0,_=g*4;for(var Q=0;Q<E;Q++){L=d;for(var T=0;
|
|
T<g;T++){p(j,A,d);x[T]=h(j,d);d+=4}d=L;for(var T=1;T<g;T++){if(x[T-1]<x[T]&&Math.random()<.66){R(j,d+4,x,T,g,4)}d+=4}d+=4}I(j)}function b(A,g,E,j,x){var d=x[0],L=x[1],_=new Uint16Array(g+1),T=A,c=j,e;
|
|
if(L){e=j.slice(0);w(A,j,g,E);T=j;c=e}if(d==0)U(T,g,E,c,_);else if(d==1)D(T,g,E,c,_);else if(d==2)O(T,g,E,c,_);
|
|
if(L){w(e,j,g,E)}}function w(A,g,E,j){for(var x=0;x<j;x++)for(var d=0;d<E;d++){var L=x*E+d<<2,_=x*E+(E-1-d)<<2;
|
|
g[_]=A[L];g[_+1]=A[L+1];g[_+2]=A[L+2];g[_+3]=A[L+3]}}return b}();N.I.f3=function(W,h,S,k,p){var I=N.I.K,q=1,b=0,g=0;
|
|
I.MZ(h,S);I.Ki(p[2]);var P=3<<13,t=Math.PI/2.43,M=t/256,U=Math.PI*2/256;function i(){var d=I.random()*256,L=I.random()*256;
|
|
return q*~~(Math.tan(t-d*M)*325*Math.cos(L*U)*256)+P>>16}q=p[0];var z=p[1],D=(z+2)/2,R=I.random()*255,O=I.$B(1);
|
|
for(var Q=0;Q<S;Q++){var w=I.oa(i()+R);for(var A=0;A<h;A++){w=I.oa(i()+w);O[b++]=w}}b=h;for(var Q=1;
|
|
Q<S;Q++){var E=I.oa(i()+O[g++]);O[b++]=E;for(var A=1;A<h;A++){var j=g+1;if(A+1==h){j--}var x=(D+E+O[j]+O[g]*z)/(z+2);
|
|
E=I.oa(i()+x);O[b++]=E;g++}}I.qq(O,k)};var e3=function(){function W(K){K=K^61^K>>>16;K=K+(K<<3);K=K^K>>>4;
|
|
K=K*668265261;K=K^K>>>15;return K}var h=function(){var h=function(K){if(K){this.S4=K}this.S4=W(this.S4);
|
|
return(this.S4&16777215)*(1/16777215)};return h};function S(K,u){if(u==null){u=[0,0]}return Math.sqrt((u[0]-K[0])*(u[0]-K[0])+(u[1]-K[1])*(u[1]-K[1]))}function k(K,u){if(u==null){u=[0,0]}return[-(u[1]-K[1])/S(K,u),(u[0]-K[0])/S(K,u)]}function p(K){return[Math.cos(K),Math.sin(K)]}function I(K){var u=S(K,[0,0]),f=[K[0]/u,K[1]/u],l=Math.atan(f[1]/f[0]);
|
|
if(f[0]>0&&f[1]<0){l+=2*Math.PI}else if(f[0]<0&&f[1]<0){l+=Math.PI}else if(f[0]<0&&f[1]>0){l+=Math.PI}return l}function q(K){var q=0;
|
|
for(var Q=1;Q<K.length/2;++Q){q+=S([K[2*Q],K[2*Q+1]],[K[2*(Q-1)],K[2*(Q-1)+1]])}return q}function P(K,u,f){var l=new Float32Array(K.length),jk=1/(K.length/2),hE=j(f);
|
|
for(var Q=0;Q<K.length/2;++Q){var Z=Q*jk,aQ=Z/2+.5,jC=1,eO=0;if(f.shape==2){jC=1/(2*aQ)}if(f.shape==3){aQ=(1-Z)/2+.5;
|
|
jC=1/(2*aQ)+.5}if(f.shape==4){aQ=Z;jC=Math.sin(3/2*Math.PI*aQ)/4+1}if(f.shape==5){aQ=(Z-.5)*6;jC=(-Math.atan(aQ)/1.25+1)/5+.6-.2*Z}var iU=[null,null];
|
|
if(Q==0){iU=k([K[2*Q],K[2*Q+1]],[K[2*(Q+1)],K[2*(Q+1)+1]])}else if(Q==K.length/2-1){iU=k([K[2*(Q-1)],K[2*(Q-1)+1]],[K[2*Q],K[2*Q+1]])}else{iU=k([K[2*(Q-1)],K[2*(Q-1)+1]],[K[2*(Q+1)],K[2*(Q+1)+1]])}l[2*Q]=K[2*Q]+(jC*u+eO)*iU[0];
|
|
l[2*Q+1]=K[2*Q+1]+(jC*u+eO)*iU[1];if(f.style==2){l[2*Q]+=x(2*Q/l.length,hE,f)}}return l}function t(K,u,f){var l=new Float32Array(K.length),jk=1/(K.length/2);
|
|
for(var Q=0;Q<K.length/2;++Q){var hE=Q*jk,Z=[null,null],aQ=.6*f.r6*_(hE,u.ai9)*f.z5/100,jC=.6*f.r6*_(hE,u.amk)*f.z5/100,eO=u.aiI*aQ+(1-u.aiI)*jC;
|
|
if(Q==0){Z=k([K[2*Q],K[2*Q+1]],[K[2*(Q+1)],K[2*(Q+1)+1]])}else if(Q==K.length/2-1){Z=k([K[2*(Q-1)],K[2*(Q-1)+1]],[K[2*Q],K[2*Q+1]])}else{Z=k([K[2*(Q-1)],K[2*(Q-1)+1]],[K[2*(Q+1)],K[2*(Q+1)+1]])}l[2*Q]=K[2*Q]+eO*Z[0];
|
|
l[2*Q+1]=K[2*Q+1]+eO*Z[1]}return l}function M(K){if(K.E$==1){return[.150684932,.205479452,.465753425,.178082192]}else if(K.E$==2){return[.126829268,.131707317,.156097561,.317073171,.141463415,.126829268]}else{var u=[],f=1/(r(K)-1);
|
|
for(var Q=0;Q<r(K)-1;++Q){u.push(f)}return u}}function U(K,u,f){var l=[],jk=u-K,hE=K;for(var Q=0;Q<f.length-1;
|
|
++Q){l.push(hE+f[Q]*jk);hE=l[Q]}return l}function i(K,u,f,l){var jk=new Float32Array(f.length),hE=0,Z={shape:Math.floor(l.random()*2.99),ad$:l.random()*.1+.15};
|
|
for(var Q=0;Q<f.length-1;++Q){var aQ=hE+f[Q];jk[Q]=((1-aQ)*K+aQ*u)*w(l,aQ,Z);hE=aQ}return jk}function z(K,u,f,l){var jk=c(l),hE=l.random(),Z=hE*20+(1-hE)*26,aQ=new Float32Array(f.length),jC=0;
|
|
for(var Q=0;Q<f.length-1;++Q){var eO=jC+f[Q];aQ[Q]=(1-eO)*K+eO*u+jk/Z*(2/3*Math.sin(Math.PI*eO)+1/3*Math.sqrt(Math.sin(Math.PI*eO)));
|
|
jC=eO}return aQ}function D(K,u,f){var l=[];for(var Q=0;Q<u.length-1;++Q){l.push(u[Q].slice());var jk=Q*(r(f)-1),hE=(Q+1)*(r(f)-1),Z=K[hE]-K[jk];
|
|
for(var aQ=jk+1;aQ<hE;++aQ){var jC=j(f),eO=new Float32Array(u[0].length),iU=(K[aQ]-K[jk])/Z;for(var gK=0;
|
|
gK<u[0].length/2;++gK){eO[2*gK]=(1-iU)*u[Q][2*gK]+iU*u[Q+1][2*gK];eO[2*gK+1]=(1-iU)*u[Q][2*gK+1]+iU*u[Q+1][2*gK+1];
|
|
if(f.style==2){eO[2*gK]+=x(2*gK/u[0].length,jC,f)}}l.push(eO)}}l.push(u[u.length-1]);return l}function R(K,u,f){var l=new Array(u.length),jk=o(K),Z=null;
|
|
for(var Q=0;Q<u.length;++Q){l[Q]=P(jk,(u[Q]-.5)*f.z5,f)}var hE=1+.05*f.abr*c(f)/c({E$:1});for(var Q=0;
|
|
Q<u.length;++Q){if(u[Q]==0){Z=Q}}for(var Q=0;Q<u.length;++Q){var aQ=(f.random()-.5)*2,jC=Math.round(f.random()*9+1),eO=new Float32Array(jC*2+2);
|
|
for(var iU=0;iU<=jC;++iU){eO[2*iU]=l[Q][0]-(l[Q][2*iU]-l[Q][0]);eO[2*iU+1]=l[Q][1]-(l[Q][2*iU+1]-l[Q][1])}if(Q==Z){aQ*=.1}for(var iU=(l[Q].length-1)/2;
|
|
iU>jC;--iU){l[Q][2*iU]=(1-aQ)*l[Q][2*iU]+aQ*(l[Q][2*(iU-jC)]+hE*(l[Q][2*iU]-l[Q][2*(iU-jC)]));l[Q][2*iU+1]=(1-aQ)*l[Q][2*iU+1]+aQ*(l[Q][2*(iU-jC)+1]+hE*(l[Q][2*iU+1]-l[Q][2*(iU-jC)+1]))}for(var iU=jC-1;
|
|
iU>=0;--iU){l[Q][2*iU]=(1-aQ)*l[Q][2*iU]+aQ*(eO[2*(jC-iU)]+hE*(l[Q][2*iU]-eO[2*(jC-iU)]));l[Q][2*iU+1]=(1-aQ)*l[Q][2*iU+1]+aQ*(eO[2*(jC-iU)+1]+hE*(l[Q][2*iU+1]-eO[2*(jC-iU)+1]))}}var gK=L(u,f);
|
|
if(f.r6>0){var iM=0;for(var Q=0;Q<u.length;++Q){if(Q==0){iM+=u[Q]}else{iM+=Math.abs(u[Q]-u[Q-1])}var i5=iM-Math.floor(iM),fN=1;
|
|
if(i5==0){fN=0}l[Q]=t(l[Q],{ai9:gK[Math.floor(iM)],amk:gK[Math.floor(iM)+fN],aiI:i5},f)}}return l}function O(K,u){var f=v(u,K),l=X(u,K),jk=[],hE=[],Z=[],aQ=M(K);
|
|
for(var Q=0;Q<u.length-1;++Q){jk.push(u[Q]);hE.push(f[Q]);Z.push(l[Q]);var jC=U(u[Q],u[Q+1],aQ),eO=i(f[Q],f[Q+1],aQ,K),iU=z(l[Q],l[Q+1],aQ,K);
|
|
for(var gK=0;gK<jC.length;++gK){jk.push(jC[gK]);hE.push(eO[gK]);Z.push(iU[gK])}}jk.push(u[u.length-1]);
|
|
hE.push(f[f.length-1]);Z.push(l[l.length-1]);return{arD:jk,anR:hE,FD:Z}}function b(K,u,f,l){var jk=new Float32Array(2*l),hE=K.length/2,Z=hE-u,aQ=f*Z,jC=aQ/l;
|
|
for(var Q=0;Q<l;++Q){var eO=Math.floor(u+Q*jC),iU=Math.ceil(u+Q*jC),f=u+Q*jC,gK=iU-eO,iM=1,i5=0;if(gK!=0){iM=(iU-f)/gK;
|
|
i5=(f-eO)/gK}jk[2*Q]=iM*K[2*eO]+i5*K[2*iU];jk[2*Q+1]=iM*K[2*eO+1]+i5*K[2*iU+1]}return jk}function w(K,u,f){var l=f.ad$,jk=u*2*Math.PI,hE=jk,Z=0;
|
|
if(f.shape==0){Z=(Math.sin(2*hE+Math.PI/2)+1)/2}else if(f.shape==1){Z=(Math.sin(hE+Math.PI/2)+1)/2}else{Z=(4*Math.sin(3/4*hE+Math.PI)+Math.sin(Math.PI/2+2*hE)-2*hE/Math.PI+6)/7}return Math.min(1,1-l+l*Z)}function A(K,u,f,l){var jk=[];
|
|
for(var Q=0;Q<K.length;++Q){jk.push(b(K[Q],u[Q],f[Q],l))}return jk}function g(K,u,f){var l=[];for(var Q=0;
|
|
Q<K.length;++Q){var jk=p(2*Math.PI*f.random()),hE=p(2*Math.PI*f.random()),Z=f.mt*.5*B({E$:1})/B(f),aQ=Z*f.z5/200,jC=Z*u/500,eO=new Float32Array(K[0].length);
|
|
for(var iU=0;iU<K[0].length/2;++iU){var gK=p(2*Math.PI*f.random()),iM=2*iU/K[0].length;eO[2*iU]=K[Q][2*iU]+aQ*(gK[0]+((1-iM)*jk[0]+iM*hE[0]));
|
|
eO[2*iU+1]=K[Q][2*iU+1]+jC*(gK[1]+((1-iM)*jk[1]+iM*hE[1]))}l.push(eO)}return l}function E(K,u,f){var l=f.Qq,jk=2/l,hE=[1/10,1/30,1/40,1/45,1/100],Z=hE[f.E$-1],aQ=4*(f.opacity/25*jk*Z)*(1-f.mt/150),gK=0,i5=0;
|
|
if(f.style==3){return aQ*.09}var jC=2.2*(K-.5),eO=jC*jC*jC*jC+.27+Math.max(0,(f.opacity-50)/15),iU=2*(Math.sin(3*Math.PI*u)/(Math.PI*u+2)+1.1)-u/2;
|
|
u=2*u;if(u<.41){var iM=2*Math.PI*u/.41;gK=(Math.sin(iM-Math.PI/2)+1)/4+.5}else if(u<.77){var iM=2*Math.PI*(u-.41)/.36;
|
|
gK=(Math.sin(iM-Math.PI/2)+1)/4+.5-iM/2/Math.PI*.5}else{var iM=2*Math.PI*(u-.77)/.23;gK=(Math.sin(iM-Math.PI/2)+1)/2*.12}gK*=3;
|
|
gK+=Math.max(0,(f.opacity-50)/15);if(f.type==6){i5=iU}else{i5=gK}return aQ*eO*i5}function j(K){return{D:K.random()*7/2+.5,vF:K.random()*2*Math.PI}}function x(K,u,f){return f.z5/300*r({E$:1})/r(f)*10*(Math.sin(u.D*2*Math.PI*K+u.vF)+10*(f.random()-.5))}function d(K){var u=Math.exp(-K.r6/25);
|
|
return{D:K.random()*3/2+.5,vF:K.random()*2*Math.PI,ZU:(K.random()-.5)*10*u}}function L(K,u){var f=Math.ceil(V(K)),l=[];
|
|
for(var Q=0;Q<=f;++Q){l.push(d(u))}return l}function _(K,u){var f=u.D*4*Math.PI*K+u.vF;return Math.exp(-1/2*Math.PI*K)*Math.cos(f)*Math.cos(f)*Math.cos(f)*Math.cos(f)*Math.cos(f)+K*u.ZU-u.ZU/4}function T(K,u,f,l,jk){var hE=0,Z=B(u)-1;
|
|
for(var Q=0;Q<Z;++Q){for(var aQ=0;aQ<K.length-1;aQ+=r(u)-1){for(var jC=Q;jC<K[0].length/2-Z;jC+=Z){for(var eO=aQ;
|
|
eO<aQ+(r(u)-1);++eO){f[jk+hE]=E(eO*(u.Qq-1)/(K.length-1)%1,jC/K[0].length,u);var iU=0,gK=0;if(u.type==6&&eO!=0&&eO!=K.length-1){gK=(K[eO][2*(jC+1)+1]-K[eO][2*jC+1])/2;
|
|
iU=(K[eO][2*(jC+1)]-K[eO][2*jC])/2}l[8*jk+8*hE]=K[eO][2*jC]+iU;l[8*jk+8*hE+1]=K[eO][2*jC+1]+gK;l[8*jk+8*hE+2]=K[eO][2*(jC+Z)]+iU;
|
|
l[8*jk+8*hE+3]=K[eO][2*(jC+Z)+1]+gK;l[8*jk+8*hE+4]=K[eO+1][2*(jC+Z)];l[8*jk+8*hE+5]=K[eO+1][2*(jC+Z)+1];
|
|
l[8*jk+8*hE+6]=K[eO+1][2*jC];l[8*jk+8*hE+7]=K[eO+1][2*jC+1];++hE}}}}}function c(K){var u=[100,300,500,700,1e3];
|
|
return u[K.E$-1]}function e(K){var u=[30,70,100,140,300];return u[K.E$-1]}function r(K){var u=[5,7,26,40,100];
|
|
return u[K.E$-1]}function B(K){if(K.E$==1){return 4}else if(K.E$==2){return 8}else{return Math.floor(e(K)/9)}}function F(K){var u=K.Qq,f=new Float32Array(u),l=null;
|
|
for(var Q=0;Q<u;++Q){f[Q]=K.random()}if(K.Qq<=3){f[0]=0;f[K.Qq-1]=1}else{for(var Q=0;Q<2;++Q){var jk=Math.floor(K.random()*u);
|
|
if(l==null||l!=jk){f[jk]=Q;l=jk}else{f[jk+1]=Q}}}return f}function v(K,u){var f=[],l=.2,hE=0;for(var Q=0;
|
|
Q<K.length;++Q){var jk=u.random()*(1-l)+l;f.push(jk)}var Z=Math.min(3,u.Qq);for(var Q=0;Q<K.length;++Q){if(f[Q]>.9){++hE}}while(hE<Z){var aQ=Math.floor(u.random()*K.length);
|
|
if(f[aQ]<=.9){f[aQ]=.9+.1*u.random();++hE}}return f}function X(K,u){var f=c(u),l=c({E$:1}),jk=[];for(var Q=0;
|
|
Q<K.length;++Q){jk.push(Math.max(1,(u.random()*10+2)*f/l))}return jk}function V(K){var u=0;for(var Q=0;
|
|
Q<K.length;++Q){if(Q==0){u+=K[Q]}else{u+=Math.abs(K[Q]-K[Q-1])}}return u}function H(K,u){if(K.length/2-1==c(u)){return K}var f=new Float32Array(2*(c(u)+1)),l=(K.length-2)/(f.length-2);
|
|
for(var Q=0;Q<f.length/2;++Q){var jk=Q*l,hE=Math.floor(jk),Z=Math.ceil(jk),aQ=Z-hE,jC=1,eO=0;if(aQ!=0){jC=(Z-jk)/aQ;
|
|
eO=(jk-hE)/aQ}f[2*Q]=jC*K[2*hE]+eO*K[2*Z];f[2*Q+1]=jC*K[2*hE+1]+eO*K[2*Z+1]}return f}function o(K,u){var f=K.length/2,l=q(K),jk=l/f,hE=!1,jC=0,eO=0,iU=1;
|
|
if(u){var Z=Math.floor(l/u.ab9),aQ=u.ab9;if(u.apZ&&K[0]==K[K.length-2]&&K[1]==K[K.length-1]){hE=!0;aQ=l/(Z+1)}if(u.type==2&&!hE&&aQ*Z+u.length>l){f=Z+1}else{f=Z+2}jk=aQ}var gK=new Float32Array(f*2);
|
|
gK[0]=K[0];gK[1]=K[1];for(var Q=1;Q<f;++Q){while(jC<=Q*jk){eO=jC;jC+=S([K[2*iU],K[2*iU+1]],[K[2*(iU-1)],K[2*(iU-1)+1]]);
|
|
++iU}var iM=1-(Q*jk-eO)/(jC-eO);gK[2*Q]=(1-iM)*K[2*iU]+iM*K[2*(iU-1)];gK[2*Q+1]=(1-iM)*K[2*iU+1]+iM*K[2*(iU-1)+1]}gK[gK.length-2]=K[K.length-2];
|
|
gK[gK.length-1]=K[K.length-1];return gK}function J(K,u){var f=o(K,u),l=[];for(var Q=0;Q<(f.length-2)/2;
|
|
++Q){var jk=[];jk.push(f[2*Q]);jk.push(f[2*Q+1]);var hE=S([f[2*(Q+1)],f[2*(Q+1)+1]],[f[2*Q],f[2*Q+1]]),Z=[(f[2*(Q+1)]-f[2*Q])/hE,(f[2*(Q+1)+1]-f[2*Q+1])/hE],aQ=p((u.arb-90)/360*2*Math.PI),jC=Z;
|
|
if(u.type==3){jC=aQ}else if(u.type==4){jC=p(I(Z)+I(aQ))}else if(u.type==5){jC=p(((u.random()-.5)*u.arb-90)/360*2*Math.PI)}var eO=u.length;
|
|
if(u.afx){eO=2*u.random()*u.length}jk.push(f[2*Q]+jC[0]*eO);jk.push(f[2*Q+1]+jC[1]*eO);l.push(jk)}return l}function C(K){if(K.asW){K.cH=100*Math.random()}else{K.cH=K.aqh}K.random=new h;
|
|
K.random(K.cH);if(K.type==6){K.Qq=2;K.shape=5;K.abr=0}}function Y(K,u){K=H(K,u);var f=[K],eO=0;if(u.type>=2&&u.type<6){f=J(K,u)}var l=B(u)-1,jk=e(u)-l,hE=(u.Qq-1)*(r(u)-1),Z=f.length*jk*hE,aQ=new Float32Array(Z),jC=new Float32Array(8*Z);
|
|
for(var Q=0;Q<f.length;++Q){for(var iU=0;iU<1e4;++iU){u.cH=W(u.cH)}u.random(u.cH);var K=H(f[Q],u),gK=F(u),iM=V(gK),i5=R(K,gK,u),fN=O(u,gK),dx=D(fN.arD,i5,u);
|
|
dx=A(dx,fN.FD,fN.anR,e(u));if(u.mt>0){dx=g(dx,q(f[Q]),u)}T(dx,u,aQ,jC,eO);eO+=jk*hE}return[aQ,jC]}var e3=function(K){var u=performance.now(),f=K[0],l=K[1];
|
|
C(l);var jk=[new Float32Array(0),new Float32Array(0)];for(var Q=0;Q<f.length;++Q){l.cH=W(l.cH);var hE=Y(f[Q],l),Z=new Float32Array(jk[0].length+hE[0].length),aQ=new Float32Array(jk[1].length+hE[1].length);
|
|
Z.set(jk[0]);Z.set(hE[0],jk[0].length);jk[0]=Z;aQ.set(jk[1]);aQ.set(hE[1],jk[1].length);jk[1]=aQ}var jC=performance.now();
|
|
if(l.a1w){console.m6("Geometry: "+String(jC-u)+"ms")}return jk};return e3}(),ip=function(){function W(p,I){var q=[],P=0,t=I.length,M=0,U=0,i=new gj,z=0,D=1e9;
|
|
for(U=0;U<t;U++){var R=U*8,O=I[U];if(O<D)D=O;var b=p[R+0],w=p[R+1],A=p[R+2],g=p[R+3],E=p[R+4],j=p[R+5],x=p[R+6],d=p[R+7],L=Math.min(b,A,E,x),_=Math.max(b,A,E,x),T=Math.min(w,g,j,d),c=Math.max(w,g,j,d),e=new gj(L,T,_-L,c-T),r=e.r8(i),B=z+O;
|
|
if(U-M<10&&(U==M||r.n()*.8<e.n()+i.n())){i=r;z=B}else{q.push(U-M);M=U;i=e;z=O;D=O}}if(U!=M)q.push(U-M);
|
|
return q}function h(p,I,q,P,t,M){var U=document.createElement("canvas"),w=0,Z=.8;U.width=I;U.height=q;
|
|
var i=U.getContext("2d"),z=t[0],D=t[1],R=new Float64Array(I*q),O=Date.now(),b=W(D,z);for(var A=0;A<b.length;
|
|
A++){var g=w,E=w+b[A],d=1e9,_=1e9,v=0;w=E;var j=g*8,x=E*8,L=-d,T=-_;for(var c=j;c<x;c+=2){var e=D[c],r=D[c+1];
|
|
if(e<d)d=e;if(e>L)L=e;if(r<_)_=r;if(r>T)T=r}d=Math.floor(d);L=Math.ceil(L);_=Math.floor(_);T=Math.ceil(T);
|
|
var B=L-d,F=T-_;for(var X=g;X<E;X++)v+=z[X];for(var c=j;c<x;c+=8){var V=z[c>>>3],H=D[c+0],o=D[c+1],J=D[c+2],C=D[c+3],Y=D[c+4],K=D[c+5],u=D[c+6],f=D[c+7];
|
|
i.fillStyle="rgba(0,0,0,"+V/v+")";i.beginPath();i.moveTo(H,o);i.lineTo(J,C);i.lineTo(Y,K);i.lineTo(u,f);
|
|
i.closePath();i.fill()}var l=i.getImageData(d,_,B,F).data;for(var r=0;r<F;r++)for(var e=0;e<B;e++){var Q=r*B+e,jk=l[Q*4+3],hE=(_+r)*I+d+e;
|
|
if(jk!=0)R[hE]+=jk*v}i.clearRect(d,_,B,F)}var aQ=M[1].color,jC=Math.pow(aQ.p/255,Z),eO=Math.pow(aQ.z/255,Z),iU=Math.pow(aQ.S/255,Z),gK=new gj(0,0,I,q),iM=N.U(I*q*4);
|
|
for(var r=0;r<q;r++)for(var e=0;e<I;e++){var Q=r*I+e,X=Q*4,z=R[Q]*(1/255);iM[X]=k(jC,z);iM[X+1]=k(eO,z);
|
|
iM[X+2]=k(iU,z);iM[X+3]=Math.min(255,z*255)}N.a.ha("norm",iM,gK,P,gK,gK,1)}var S=new Uint8Array(2e3);
|
|
for(var Q=0;Q<2e3;Q++)S[Q]=255*Math.min(1,Math.log(Q/700+1));function k(p,I){return S[Math.min(1500,~~(p*I*1e3))]}return h}();
|
|
N.VC={a0v:function(W,h){var Q=W.length;W.push(h);var S=Q>>>1;while(S!=0&&W[Q][0]<W[S][0]){var k=W[Q];
|
|
W[Q]=W[S];W[S]=k;Q=S;S=Q>>>1}},amQ:function(W){if(W.length==2)return W.pop();var top=W[1],Q=1;W[1]=W.pop();
|
|
var h=W.length;while(!0){var S=Q<<1,k=S+1,p=Q;if(S<h&&W[S][0]<W[p][0])p=S;if(k<h&&W[k][0]<W[p][0])p=k;
|
|
if(p==Q)break;var I=W[Q];W[Q]=W[p];W[p]=I;Q=p}return top},ac8:function(W){for(var Q=1;Q<W.length;Q++){var h=Q,S=1e9;
|
|
while(h!=0){var k=W[h][0];if(k>S){console.log(Q);throw"e"}S=k;h=h>>>1}}}};N.a={};N.a.cU=new Float64Array(256);
|
|
N.a.ko=new Uint8Array(256*256);N.a.U4=new Uint8Array(256*256);(function(){for(var Q=0;Q<256;Q++)N.a.cU[Q]=255/Q;
|
|
for(var Q=0;Q<256;Q++)for(var W=0;W<256;W++)N.a.ko[Q*256+W]=Q==0?0:Math.round(W*255/Q);for(var Q=0;Q<256;
|
|
Q++)for(var W=0;W<256;W++)N.a.U4[Q*256+W]=Math.round(Q*(255-W)/255)}());N.a.ha=function(W,h,S,k,p,I,q,P){if(P==null)P=jO.Kn();
|
|
if("idiv,lbrn,div ,lddg,vLit,lLit,hMix,diff".split(",").indexOf(W)==-1){q=q*P.fill;P.fill=1;P.style=!1}var t="norm,dark,mul ,idiv,lbrn,lite,scrn,div ,lddg,over,sLit,hLit,vLit,lLit,pLit,hMix,diff,smud,fsub,fdiv".split(","),M="dkCl,lgCl,hue ,sat ,colr,lum ".split(","),U=N.a[W+"F"];
|
|
if(P.n$==null&&W=="norm")N.a.at4(h,S,k,p,I,q,U,P.Q8?1:0);else if(W=="diss")N.a.a2W(h,S,k,p,I,q,U,P.Q8?1:0);
|
|
else if(t.indexOf(W)!=-1)N.a.atF(h,S,k,p,I,q,U,P);else if(M.indexOf(W)!=-1)N.a.arz(h,S,k,p,I,q,U,P)};
|
|
N.a.akM=function(W,h,S){var k=W*S+1-S;return k<.001?0:1-Math.min(1,(1-h)/k)};N.a.aqn=function(W,h,S){return W*S==1?1:Math.min(1,h/(1-W*S))};
|
|
N.a.nS=function(W){return W<=.25?((16*W-12)*W+4)*W:Math.sqrt(W)};N.a.normF=function(W,h,S){return W};
|
|
N.a.darkF=function(W,h,S){return Math.min(W,h)};N.a["mul F"]=function(W,h,S){return W*h};N.a.idivF=function(W,h,S){var k=W*S+1-S;
|
|
return h==1?1:1-h>=k?0:1-(1-h)/k};N.a.lbrnF=function(W,h,S){return Math.max(0,W*S+h-S)};N.a.dkClF=function(W,h,S){var k=N.AN(W)<N.AN(h)?W:h;
|
|
S.p=k.p;S.z=k.z;S.S=k.S;return S};N.a.liteF=function(W,h,S){return Math.max(W,h)};N.a.scrnF=function(W,h,S){return h+W-h*W};
|
|
N.a["div F"]=function(W,h,S){W*=S;return h==0?0:h>=1-W?1:h/(1-W)};N.a.lddgF=function(W,h,S){W*=S;return Math.min(1,W+h)};
|
|
N.a.lgClF=function(W,h,S){var k=N.AN(W)>N.AN(h)?W:h;S.p=k.p;S.z=k.z;S.S=k.S;return S};N.a.overF=function(W,h,S){return N.a.hLitF(h,W,S)};
|
|
N.a.sLitF=function(W,h,S){return W<=.5?h-(1-2*W)*h*(1-h):h+(2*W-1)*(N.a.nS(h)-h)};N.a.hLitF=function(W,h,S){return W<=.5?N.a["mul F"](2*W,h,S):N.a.scrnF(2*W-1,h,S)};
|
|
N.a.vLitF=function(W,h,S){return W<=.5?N.a.akM(2*W,h,S):N.a.aqn(2*W-1,h,S)};N.a.lLitF=function(W,h,S){return W<=.5?N.a.lbrnF(2*W,h,S):N.a.lddgF(2*W-1,h,S)};
|
|
N.a.pLitF=function(W,h,S){return W<=.5?N.a.darkF(2*W,h,S):N.a.liteF(2*W-1,h,S)};N.a.hMixF=function(W,h,S){if(S>.99)return W+h<1?0:1;
|
|
return Math.min(1,Math.max(0,(h+W*S-S)/(1-S+1e-6)))};N.a.diffF=function(W,h,S){W*=S;return Math.abs(W-h)};
|
|
N.a.smudF=function(W,h,S){return W+h-2*W*h};N.a.fsubF=function(W,h,S){return Math.max(h-W,0)};N.a.fdivF=function(W,h,S){return Math.min(h/W,1)};
|
|
N.a["hue F"]=function(W,h,S){N.a.Hb(W,N.Dg(h),S);N.a.ej(S,N.AN(h),S)};N.a["sat F"]=function(W,h,S){N.a.Hb(h,N.Dg(W),S);
|
|
N.a.ej(S,N.AN(h),S)};N.a.colrF=function(W,h,S){N.a.ej(W,N.AN(h),S)};N.a["lum F"]=function(W,h,S){N.a.ej(h,N.AN(W),S)};
|
|
N.a.ej=function(W,h,S){var k=h-N.AN(W);S.p=W.p+k;S.z=W.z+k;S.S=W.S+k;N.a.at8(S)};N.a.at8=function(W){var h=W.p,S=W.z,k=W.S,p=N.ak(h,S,k),g8=Math.min(h,S,k),I=Math.max(h,S,k);
|
|
if(g8<0){var q=p/(p-g8);h=p+(h-p)*q;S=p+(S-p)*q;k=p+(k-p)*q}if(I>1){var q=(1-p)/(I-p);h=p+(h-p)*q;S=p+(S-p)*q;
|
|
k=p+(k-p)*q}W.p=h;W.z=S;W.S=k};N.a.Hb=function(W,h,S){var k=N.a.a1H,p=W.p,I=W.z,q=W.S;if(p==I&&I==q){S.p=S.z=S.S=0}else if(p>I){if(p>q){if(I>q){S.p=h;
|
|
S.z=k(p,I,q,h);S.S=0}else{S.p=h;S.S=k(p,q,I,h);S.z=0}}else{S.S=h;S.p=k(q,p,I,h);S.z=0}}else{if(p<q){if(I>q){S.z=h;
|
|
S.S=k(I,q,p,h);S.p=0}else{S.S=h;S.z=k(q,I,p,h);S.p=0}}else{S.z=h;S.p=k(I,p,q,h);S.S=0}}};N.a.a1H=function(W,h,S,k){return(h-S)*k/(W-S)};
|
|
N.a.at4=function(W,h,S,k,p,I,q,P){var t=h.r$(k).r$(p),M=Math.max(0,t.x-h.x),U=Math.max(0,t.x-k.x),i=Math.max(0,t.y-h.y),z=Math.max(0,t.y-k.y),D=t.e,R=t.Z,O=h.e,b=k.e,w=N.a.ko,A=N.a.U4,g=new Uint32Array(W.buffer),E=new Uint32Array(S.buffer);
|
|
for(var Q=0;Q<R;Q++){var j=(i+Q)*O+M,x=(z+Q)*b+U;for(var d=0;d<D;d++){var L=g[j+d],X=1;if(L>>>24==0)continue;
|
|
if(L>>>24==255&&I==1&&P==0){E[x+d]=g[j+d];continue}var _=E[x+d],T=L&255,c=L>>>8&255,e=L>>>16&255,r=_&255,B=_>>>8&255,F=_>>>16&255,v=I,V=(_>>>24)*(1/255);
|
|
if(P==0){v=(L>>>24)*I*(1/255);X=V}var H=X*(1-v),o=v+H,J=1/o;E[x+d]=~~(.5+(P*V+(1-P)*o)*255)<<24|~~(.5+(e*v+F*H)*J)<<16|~~(.5+(c*v+B*H)*J)<<8|~~(.5+(T*v+r*H)*J)}}};
|
|
N.a.aaW=function(W,h,S,k,p,I){var q=h.r$(k).r$(p),P=Math.max(0,q.x-h.x),t=Math.max(0,q.x-k.x),M=Math.max(0,q.y-h.y),U=Math.max(0,q.y-k.y),i=q.e,z=q.Z,D=h.e,R=k.e,O=N.a.ko,b=N.a.U4,w=new Uint32Array(W.buffer),A=new Uint32Array(S.buffer),g=Math.floor(Math.random()*16777215),E=0;
|
|
for(var Q=0;Q<z;Q++){var j=(M+Q)*D+P,x=(U+Q)*R+t;for(var d=0;d<i;d++){var L=w[j+d];if(L>>>24==0)continue;
|
|
if(L>>24==255&&I==1){A[x+d]=L;continue}var _=A[x+d],T=(L>>>24)*I*(1/255),c=(_>>>24)*(1/255),e=c*(1-T),r=T+e,B=L&255,F=L>>>8&255,v=L>>>16&255,X=_&255,V=_>>>8&255,H=_>>>16&255;
|
|
E>>>=8;if((d&3)==0)E=N.a.PL(x+d+g);var o=r==0?0:1/r,J=Math.floor(r*(256*255))+(E&255)>>>8,C=Math.floor((v*T+H*e)*o+.5),Y=Math.floor((F*T+V*e)*o+.5),K=Math.floor((B*T+X*e)*o+.5);
|
|
A[x+d]=J<<24|C<<16|Y<<8|K}}};N.a.Ez=function(W,h,S,k,p,I,q,P){var t=N.ak(W,h,S),M=N.ak(k,p,I),U=Math.min,i=N.a.a3a,z=i(t,P,0);
|
|
z=U(z,i(W,P,8));z=U(z,i(h,P,16));z=U(z,i(S,P,24));var D=i(M,P,4);D=U(D,i(k,P,12));D=U(D,i(p,P,20));D=U(D,i(I,P,28));
|
|
D=Math.max(D,1-q);var R=Math.min(z,D);return R<0?0:R>1?1:R};N.a.a3a=function(W,h,Q){return Math.min((W-h[Q])*h[Q+1],(W-h[Q+3])*h[Q+2])};
|
|
N.a.atF=function(W,h,S,k,p,I,q,P){var t=1/255,M=t*I,U=P.Q8?1:0,i=P.fill,z=P.style,D=h.r$(k).r$(p),R=Math.max(0,D.x-h.x),O=Math.max(0,D.x-k.x),b=Math.max(0,D.y-h.y),w=Math.max(0,D.y-k.y),A=D.e,g=D.Z,E=h.e,j=k.e,x=new Uint32Array(W.buffer),d=new Uint32Array(S.buffer);
|
|
for(var Q=0;Q<g;Q++){var L=(b+Q)*E+R,_=(w+Q)*j+O;for(var T=0;T<A;T++,L++,_++){var c=x[L],o=1;if(c>>>24==0)continue;
|
|
var e=d[_],r=(c&255)*t,B=(c>>>8&255)*t,F=(c>>>16&255)*t,v=(e&255)*t,X=(e>>>8&255)*t,V=(e>>>16&255)*t,H=I;
|
|
if(U==0){H=(c>>>24)*M;o=(e>>>24)*t}if(P.n$)H*=N.a.Ez(r,B,F,v,X,V,o,P.n$);var J=o*(1-H),C=H+J,Y=C==0?0:255/C,K=z?1:H,u=((1-o)*H*r+(1-K)*o*v+K*o*q(r,v,(1+H-K)*i))*Y,f=((1-o)*H*B+(1-K)*o*X+K*o*q(B,X,(1+H-K)*i))*Y,l=((1-o)*H*F+(1-K)*o*V+K*o*q(F,V,(1+H-K)*i))*Y;
|
|
C=H*i+o*(1-H*i);var jk=~~(C*255+.5);d[_]=U*(e>>>24)+(1-U)*jk<<24|l<<16|f<<8|u}}};N.a.arz=function(W,h,S,k,p,I,q,P){var t=1/255,M=t*I,U=P.Q8?1:0,i=h.r$(k).r$(p),z=Math.max(0,i.x-h.x),D=Math.max(0,i.x-k.x),R=Math.max(0,i.y-h.y),O=Math.max(0,i.y-k.y),b=i.e,w=i.Z,A=new Uint32Array(W.buffer),g=new Uint32Array(S.buffer),E={p:0,z:0,S:0},j={p:0,z:0,S:0},x={p:0,z:0,S:0};
|
|
for(var Q=0;Q<w;Q++){var d=(R+Q)*h.e+z,L=(O+Q)*k.e+D;for(var _=0;_<b;_++,d++,L++){var T=A[d],c=g[L],e=(T&255)*t,r=(T>>>8&255)*t,B=(T>>>16&255)*t,F=(c&255)*t,v=(c>>>8&255)*t,X=(c>>>16&255)*t,V=I,H=1;
|
|
if(U==0){V=(T>>>24)*M;H=(c>>>24)*t}if(P.n$)V*=N.a.Ez(e,r,B,F,v,X,H,P.n$);var o=H*(1-V),J=V+o,C=255/J;
|
|
E.p=e;E.z=r;E.S=B;j.p=F;j.z=v;j.S=X;q(E,j,x);var Y=(((1-H)*e+H*x.p)*V+F*o)*C,K=(((1-H)*r+H*x.z)*V+v*o)*C,u=(((1-H)*B+H*x.S)*V+X*o)*C,f=U*(c>>>24)+(1-U)*Math.round(J*255);
|
|
g[L]=f<<24|u<<16|K<<8|Y}}};N.a.Gf=function(W){W=W^61^W>>>16;W=W+(W<<3);W=W^W>>>4;W=W*668265261;W=W^W>>15;
|
|
return(W&16777215)*(1/16777215)};N.a.PL=function(W){W=W^61^W>>>16;W=W+(W<<3);W=W^W>>>4;W=W*668265261;
|
|
W=W^W>>>15;return W};N.a.Yl=function(W){this.Ki=W};N.a.Yl.prototype.get=function(){var W=this.Ki=N.a.PL(this.Ki);
|
|
return(W&16777215)*(1/16777215)};N.a.a2W=function(W,h,S,k,p,I,q,P){var t=1/255,M=t*I,U=Math.round(I*(256*256*256/255)),i=h.r$(k).r$(p),z=Math.max(0,i.x-h.x),D=Math.max(0,i.x-k.x),R=Math.max(0,i.y-h.y),O=Math.max(0,i.y-k.y),b=i.e,w=i.Z,A=new Uint32Array(W.buffer),g=new Uint32Array(S.buffer);
|
|
for(var Q=0;Q<w;Q++){var E=(R+Q)*h.e+z,j=(O+Q)*k.e+D;for(var x=0;x<b;x++,E++,j++){var d=A[E],L=g[j],_=P*255+(1-P)*(d>>>24);
|
|
if((N.a.PL(E)&16777215)>=_*U)continue;g[j]=d&16777215|P*(L>>>24)+(1-P)*255<<24}}};N.a.aoU=function(W,h,S){for(var Q=0;
|
|
Q<W.length;Q+=4){var k=S[Q>>>2];if(k==0)continue;var p=k*(1/255),I=1/p,q=h[Q],P=h[Q+1],t=h[Q+2],M=W[Q],U=W[Q+1],i=W[Q+2];
|
|
h[Q]=Math.min(255,Math.max(0,Math.round((q-(1-p)*M)*I)));h[Q+1]=Math.min(255,Math.max(0,Math.round((P-(1-p)*U)*I)));
|
|
h[Q+2]=Math.min(255,Math.max(0,Math.round((t-(1-p)*i)*I)));h[Q+3]=255}};N.a.HH=function(W,h,S,k,p,I,q,P,t,M,U){if(M==null)M=!1;
|
|
if(U==null)U=[1,1,1];var i=255<<24|U[2]*16711680|U[1]*65280|U[0]*255,z=~i;if(p&&!h.xX(I)){var D=N.U(h.n()*4);
|
|
D.fill(q);N.vG(p,I,D,h);p=D;I=h}if(M){if(p==null)N.a.a5P(W,h,S,k,p,P,t,i,z);else N.a.a8n(W,h,S,k,p,P,t)}else{if(p==null)N.a.agl(W,h,S,k,p,P,t,i,z);
|
|
else N.a.aq3(W,h,S,k,p,P,t)}};N.a.agl=function(W,h,S,k,p,I,q,P,t){var M=1/255,U=h.r$(k).r$(I),i=Math.max(0,U.x-h.x),z=Math.max(0,U.x-k.x),D=Math.max(0,U.y-h.y),R=Math.max(0,U.y-k.y),O=U.e,b=U.Z,w=new Uint32Array(W.buffer),A=new Uint32Array(S.buffer),g=N.a.ko,E=q*255&255;
|
|
for(var Q=0;Q<b;Q++){var j=(D+Q)*h.e+i,x=(R+Q)*k.e+z;for(var d=0;d<O;d++,j++,x++){var L=w[j],_=A[x],T=L>>>24,c=_>>>24,e=N.su(E*T+(255-E)*c),r=N.su(T*E),B=N.su(c*(255-E)),F=L&255,v=L>>>8&255,X=L>>>16&255,V=_&255,H=_>>>8&255,o=_>>>16&255,J=r*F+V*B,C=r*v+H*B,Y=r*X+o*B;
|
|
J=g[e<<8|N.su(J)];C=g[e<<8|N.su(C)];Y=g[e<<8|N.su(Y)];var K=e<<24|Y<<16|C<<8|J;A[x]=t&_|P&K}}};N.a.a5P=function(W,h,S,k,p,I,q,P,t){var M=1/255,U=h.r$(k).r$(I),i=Math.max(0,U.x-h.x),z=Math.max(0,U.x-k.x),D=Math.max(0,U.y-h.y),R=Math.max(0,U.y-k.y),O=U.e,b=U.Z,w=new Uint32Array(W.buffer),A=new Uint32Array(S.buffer),g=N.a.ko,E=q*16777215&16777215;
|
|
for(var Q=0;Q<b;Q++){var j=(D+Q)*h.e+i,x=(R+Q)*k.e+z;for(var d=0;d<O;d++,j++,x++){if((N.a.PL(j)&16777215)<E){A[x]=t&A[x]|P&w[j]}}}};
|
|
N.a.aq3=function(W,h,S,k,p,I,q){var P=1/255,t=h.r$(k).r$(I),M=Math.max(0,t.x-h.x),U=Math.max(0,t.x-k.x),i=Math.max(0,t.y-h.y),z=Math.max(0,t.y-k.y),D=t.e,R=t.Z,O=new Uint32Array(W.buffer),b=new Uint32Array(S.buffer),w=N.a.ko;
|
|
for(var Q=0;Q<R;Q++){var A=(i+Q)*h.e+M,g=(z+Q)*k.e+U;for(var E=0;E<D;E++,A++,g++){var j=p[A]*q&255;if(j==0)continue;
|
|
if(j==255){b[g]=O[A];continue}var x=O[A],d=b[g],L=x>>>24,_=d>>>24,T=N.su(j*L+(255-j)*_),c=N.su(L*j),e=N.su(_*(255-j)),r=x&255,B=x>>>8&255,F=x>>>16&255,v=d&255,X=d>>>8&255,V=d>>>16&255,H=w[T<<8|N.su(c*r+v*e)],o=w[T<<8|N.su(c*B+X*e)],J=w[T<<8|N.su(c*F+V*e)];
|
|
b[g]=T<<24|J<<16|o<<8|H}}};N.a.a8n=function(W,h,S,k,p,I,q){var P=1/255,t=h.r$(k).r$(I),M=Math.max(0,t.x-h.x),U=Math.max(0,t.x-k.x),i=Math.max(0,t.y-h.y),z=Math.max(0,t.y-k.y),D=t.e,R=t.Z,O=new Uint32Array(W.buffer),b=new Uint32Array(S.buffer),w=N.a.ko,A=Math.round(q*257);
|
|
for(var Q=0;Q<R;Q++){var g=(i+Q)*h.e+M,E=(z+Q)*k.e+U;for(var j=0;j<D;j++,g++,E++){var x=p[g]*A;if((N.a.PL(g)&65535)<x)b[E]=O[g]}}};
|
|
N.a.tW=function(W,h,S,k,p,I,q){var P=1/255,t=h.r$(k).r$(I),M=Math.max(0,t.x-h.x),U=Math.max(0,t.x-k.x),i=Math.max(0,t.y-h.y),z=Math.max(0,t.y-k.y),D=t.e,R=t.Z,O=new Uint32Array(W.buffer),b=new Uint32Array(S.buffer),w=Math.floor(Math.random()*k.n()),A=N.a.atJ;
|
|
for(var Q=0;Q<R;Q++){var g=(i+Q)*h.e+M,E=(z+Q)*k.e+U;for(var j=0;j<D;j++){var x=p[g+j]*q;if(x==0)continue;
|
|
if(x==255){b[E+j]=O[g+j];continue}var d=O[g+j],L=b[E+j],_=d>>>24,T=L>>>24,c=_*x*(1/255),e=T*(255-x)*(1/255),r=d&255,B=d>>>8&255,F=d>>>16&255,v=L&255,X=L>>>8&255,V=L>>>16&255,H=N.a.PL(E+j+w),o=Math.floor((c+e)*256+.5)+(H>>>0&255)>>>8,J=o==0?0:256/(c+e),C=r*c+v*e,Y=B*c+X*e,K=F*c+V*e,u=Math.floor(C*J+.5)+(H>>>8&255)>>>8,f=Math.floor(Y*J+.5)+(H>>>16&255)>>>8,l=Math.floor(K*J+.5)+(H>>>24&255)>>>8;
|
|
b[E+j]=o<<24|l<<16|f<<8|u}}};N.a.atJ=function(W){return Math.floor(W+Math.random())};N.a.Dc=function(W,h,S,k,p,I,q){var P=1/255,t=h.r$(k).r$(I),M=Math.max(0,t.x-h.x),U=Math.max(0,t.x-k.x),i=Math.max(0,t.y-h.y),z=Math.max(0,t.y-k.y),D=t.e,R=t.Z;
|
|
for(var Q=0;Q<R;Q++){var O=(i+Q)*h.e+M,b=(z+Q)*k.e+U;for(var w=0;w<D;w++,O++,b++){var A=q*p[O]*P;if(A==0)continue;
|
|
if(A==1){S[b]=W[O];continue}S[b]=W[O]*A+S[b]*(1-A)}}};N.qx={};N.qx.anj=function(W,h,S,k,p,I){N.qx.a2(W,h,S,k,p,I,null,0)};
|
|
N.qx.a8w=function(W,h,S,k,p){N.qx.a2(W,h,S,k,p,null,null,0)};N.qx.anb=function(W,h,S,k,p,I,q){N.qx.a2(W,h,S,k,p,null,I,q*.5)};
|
|
N.qx.a2=function(W,h,S,k,p,I,q,P){var t=0,e=0,r=1e9,B=0,F=1e9,v=0,X=1e9,V=0,H=0,o=0,J=0;if(I){t=p*.5;
|
|
p=3+Math.round((p-3)*.75)}if(q){p=Math.round(p*2.2)}var M=1/p,U=Math.floor(h*M)+1,i=Math.floor(S*M)+1,z=[],D=new Uint8Array(U*i*4),R=q?.5:1,O=I?64:0;
|
|
for(var b=0;b<i;b++){var w=q?.5*(b&1):0;for(var A=0;A<U;A++){var g=(A+Math.random()*R+w)*p,E=(b+Math.random()*R)*p;
|
|
z.push(g,E);var j=Math.min(h-1,Math.floor(g)),x=Math.min(S-1,Math.floor(E)),d=(x*h+j)*4,L=(b*U+A)*4;
|
|
for(var Q=0;Q<4;Q++)D[L+Q]=Math.max(0,Math.min(255,Math.floor(W[d+Q]+(Math.random()-.5)*O)))}}var _=I?I:q?q:[0,0,0],T=U*i*2,c=[-U-1,-U,-U+1,-1,0,1,U-1,U,U+1];
|
|
for(var b=0;b<S;b++){o=0;for(var A=0;A<h;A++){var C=A+.5,Y=b+.5,K=Math.floor(Y*M),u=Math.floor(C*M),f=K*U+u,hE=0,Z=0;
|
|
if(o>1+P){r=N.qx.Vq(z,e,C,Y);V=Math.sqrt(r);o--;J++}else{r=F=X=1e9;for(var Q=0;Q<c.length;Q++){var l=(f+c[Q])*2;
|
|
if(l<0||l>=T)continue;var jk=N.qx.Vq(z,l,C,Y);if(jk<X){if(jk<F){if(jk<r){v=B;X=F;B=e;F=r;e=l;r=jk}else{v=B;
|
|
X=F;B=l;F=jk}}else{v=l;X=jk}}}V=Math.sqrt(r);H=Math.sqrt(F);o=H-(V+H)*.5}if(q==null){var aQ=(V+H)*.5,jC=I?Math.max(0,aQ-t):0;
|
|
hE=Math.max(0,Math.min(1,.5+aQ-V-jC));Z=Math.max(0,Math.min(1,1-(.5+aQ-V)-jC))}else{var eO=Math.min(N.qx.N_(z,e,B,C,Y),N.qx.N_(z,e,v,C,Y));
|
|
hE=Math.max(0,Math.min(1,eO-P*.5));if(C<P||h-P<C||Y<P||S-P<Y)hE=0;Z=0}var iU=1-Z-hE,L=b*h+A<<2,gK=e<<1,iM=B<<1;
|
|
k[L+0]=Math.floor(.5+hE*D[gK+0]+Z*D[iM+0]+iU*_[0]);k[L+1]=Math.floor(.5+hE*D[gK+1]+Z*D[iM+1]+iU*_[1]);
|
|
k[L+2]=Math.floor(.5+hE*D[gK+2]+Z*D[iM+2]+iU*_[2]);k[L+3]=W[L+3]}}};N.qx.Vq=function(W,h,S,k){var p=S-W[h],I=k-W[h+1];
|
|
return p*p+I*I};N.qx.N_=function(W,h,S,k,p){var I=W[h],q=W[h+1],P=W[S],t=W[S+1],M=(I+P)*.5,U=(q+t)*.5,i=M+(t-q),z=U-(P-I),D=z-U,R=i-M;
|
|
return Math.abs(D*k-R*p+i*U-z*M)/Math.sqrt(R*R+D*D)};N.tO={};N.tO.In=function(W){if(N.tO.G4.length<W)N.tO.G4=N.U(W);
|
|
return N.tO.G4};N.tO.G4=N.U(0);N.tO.NG=function(W){if(N.tO.Dr.length<W)N.tO.Dr=new Float32Array(W);return N.tO.Dr};
|
|
N.tO.Dr=new Float32Array(0);N.tO.Gp=function(W,h,S,k){var p=S.e,I=S.Z;N.tO.aau(W,h,p,I,k)};N.tO.vZ=function(W,h,S,k){var p=S.e,I=S.Z;
|
|
N.tO.aip(W,h,p,I,k)};N.tO.Z4=function(W,h,S){var k=h.e,p=h.Z;N.tO.am1(W,k,p,S)};N.tO.Am=function(W,h,S,k,p){var I=S.e,q=S.Z;
|
|
N.tO.akV(W,h,I,q,k,p)};N.tO.Wr=function(W,h,S,k){var p=S.e,I=S.Z;k=Math.round(k);var q=N.tO.In(p*I);
|
|
N.WQ(W,h);N.tO.wg(h,q,p,I,k)};N.tO.d1=function(W,h,S){var k=h.e,p=h.Z;S=Math.round(S);var I=N.tO.In(k*p*4);
|
|
N.tO.E_(W,I,k,p,S)};N.tO.$_=function(W,h,S,k){var p=S.e,I=S.Z;k=Math.round(k);var q=N.tO.NG(p*I);N.WQ(W,h);
|
|
N.tO.lw(h,q,p,I,k)};N.tO.RE=function(W,h,S){var k=h.e,p=h.Z;S=Math.round(S);var I=N.tO.In(k*p*4);N.tO.g8(W,I,k,p,S);
|
|
N.WQ(I,W)};N.tO.K8=function(W,g8){var h=Math.sqrt(12*W*W/g8+1),S=Math.floor(h);if(S%2==0)S--;var k=S+2,p=(12*W*W-g8*S*S-4*g8*S-3*g8)/(-4*S-4),I=Math.round(p),q=[];
|
|
for(var Q=0;Q<g8;Q++)q.push(Q<I?S:k);return q};N.tO.aau=function(W,h,S,k,p){var I=N.tO.K8(p,3),q=N.tO.In(S*k);
|
|
N.WQ(W,h);N.tO.wg(h,q,S,k,I[0]-1>>1);N.tO.wg(h,q,S,k,I[1]-1>>1);N.tO.wg(h,q,S,k,I[2]-1>>1)};N.tO.aip=function(W,h,S,k,p){var I=N.tO.K8(p,2),q=N.tO.In(S*k);
|
|
N.WQ(W,h);N.tO.wg(h,q,S,k,I[0]-1>>1);N.tO.wg(h,q,S,k,I[1]-1>>1)};N.tO.am1=function(W,h,S,k){var p=N.tO.K8(k,3),I=N.tO.In(h*S*4);
|
|
N.tO.E_(W,I,h,S,p[0]-1>>1);N.tO.E_(W,I,h,S,p[1]-1>>1);N.tO.E_(W,I,h,S,p[2]-1>>1)};N.tO.akV=function(W,h,S,k,p,I){if(I==null)I=3;
|
|
var q=N.tO.K8(p,I),P=N.tO.NG(S*k);N.WQ(W,h);for(var Q=0;Q<I;Q++)N.tO.lw(h,P,S,k,(q[Q]-1)/2)};N.tO.wg=function(W,h,S,k,p){N.tO.aiJ(W,h,S,k,p);
|
|
N.tO.abk(h,W,S,k,p)};N.tO.E_=function(W,h,S,k,p){N.tO.g8(W,h,S,k,p);N.tO.adh(h,W,S,k,p)};N.tO.lw=function(W,h,S,k,p){N.tO.ahq(W,h,S,k,p);
|
|
N.tO.anV(h,W,S,k,p)};N.tO.Rz=[];N.tO.hE=function(W){if(N.tO.Rz[W])return N.tO.Rz[W];var h=1/(W+W+1),S=(W+W+1)*256,k=N.U(S);
|
|
for(var Q=0;Q<S;Q++)k[Q]=Math.round(Q*h);N.tO.Rz[W]=k;return k};N.tO.aiJ=function(W,h,S,k,p){var I=1/(p+p+1),q=S-p-p-1,P=N.tO.hE(p);
|
|
for(var Q=0;Q<k;Q++){var t=Q*S,M=t,U=t+p,i=W[t],z=W[t+S-1],D=(p+1)*i;for(var R=0;R<p;R++)D+=W[t+R];for(var R=0;
|
|
R<=p;R++){D+=W[U+R]-i;h[t+R]=P[D]}U+=p+1;t+=p+1;for(var R=0;R<q;R++){D+=W[U+R]-W[M+R];h[t+R]=P[D]}U+=q;
|
|
M+=q;t+=q;for(var R=S-p;R<S;R++){D+=z-W[M++];h[t++]=P[D]}}};N.tO.g8=function(W,h,S,k,p){var I=S<<2,q=p<<2,P=1/(p+p+1),t=S-p-p-1,M=t<<2,U=N.tO.hE(p);
|
|
for(var Q=0;Q<k;Q++){var i=Q*I,z=i,D=i+q,R=i+I,O=W[i],b=W[i+1],w=W[i+2],A=W[i+3],g=(p+1)*O,E=(p+1)*b,j=(p+1)*w,x=(p+1)*A;
|
|
for(var d=0;d<q;d+=4){g+=W[i+d];E+=W[i+d+1];j+=W[i+d+2];x+=W[i+d+3]}for(var d=0;d<=q;d+=4){g+=W[D]-O;
|
|
h[i]=U[g];E+=W[D+1]-b;h[i+1]=U[E];j+=W[D+2]-w;h[i+2]=U[j];x+=W[D+3]-A;h[i+3]=U[x];D+=4;i+=4}for(var d=0;
|
|
d<M;d+=4){g+=W[D+d]-W[z+d];h[i+d]=U[g];E+=W[D+d+1]-W[z+d+1];h[i+d+1]=U[E];j+=W[D+d+2]-W[z+d+2];h[i+d+2]=U[j];
|
|
x+=W[D+d+3]-W[z+d+3];h[i+d+3]=U[x]}D+=M;z+=M;i+=M;O=W[R-4];b=W[R-3];w=W[R-2];A=W[R-1];for(var d=S-p;
|
|
d<S;d++){g+=O-W[z];h[i]=U[g];E+=b-W[z+1];h[i+1]=U[E];j+=w-W[z+2];h[i+2]=U[j];x+=A-W[z+3];h[i+3]=U[x];
|
|
z+=4;i+=4}}};N.tO.ahq=function(W,h,S,k,p){var I=1/(p+p+1),q=S-p-p-1;for(var Q=0;Q<k;Q++){var P=Q*S,t=P,M=P+p,U=W[P],i=W[P+S-1],z=(p+1)*U;
|
|
for(var D=0;D<p;D++)z+=W[P+D];for(var D=0;D<=p;D++){z+=W[M+D]-U;h[P+D]=z*I}M+=p+1;P+=p+1;for(var D=0;
|
|
D<q;D++){z+=W[M+D]-W[t+D];h[P+D]=z*I}M+=q;t+=q;P+=q;for(var D=S-p;D<S;D++){z+=i-W[t++];h[P++]=z*I}}};
|
|
N.tO.abk=function(W,h,S,k,p){var I=1/(p+p+1),q=k-p-p-1,P=N.tO.hE(p);for(var Q=0;Q<S;Q++){var t=Q,M=t,U=t+p*S,i=W[t],z=W[t+S*(k-1)],D=(p+1)*i;
|
|
for(var R=0;R<p;R++)D+=W[t+R*S];for(var R=0;R<=p;R++){D+=W[U]-i;h[t]=P[D];U+=S;t+=S}for(var R=0;R<q;
|
|
R++){var O=R*S;D+=W[U+O]-W[M+O];h[t+O]=P[D]}M+=q*S;U+=q*S;t+=q*S;for(var R=k-p;R<k;R++){D+=z-W[M];h[t]=P[D];
|
|
M+=S;t+=S}}};N.tO.adh=function(W,h,S,k,p){var I=S<<2,q=p<<2,P=1/(p+p+1),t=k-p-p-1,M=t<<2,U=N.tO.hE(p);
|
|
for(var Q=0;Q<S;Q++){var i=Q<<2,z=i,D=i+p*I,R=i+I*(k-1),O=W[i],b=W[i+1],w=W[i+2],A=W[i+3],g=(p+1)*O,E=(p+1)*b,j=(p+1)*w,x=(p+1)*A;
|
|
for(var d=0;d<p;d++){var L=i+d*I;g+=W[L];E+=W[L+1];j+=W[L+2];x+=W[L+3]}for(var d=0;d<=p;d++){g+=W[D]-O;
|
|
h[i]=U[g];E+=W[D+1]-b;h[i+1]=U[E];j+=W[D+2]-w;h[i+2]=U[j];x+=W[D+3]-A;h[i+3]=U[x];D+=I;i+=I}for(var d=0;
|
|
d<t;d++){var _=d*I;g+=W[D+_]-W[z+_];h[i+_]=U[g];E+=W[D+_+1]-W[z+_+1];h[i+_+1]=U[E];j+=W[D+_+2]-W[z+_+2];
|
|
h[i+_+2]=U[j];x+=W[D+_+3]-W[z+_+3];h[i+_+3]=U[x]}z+=t*I;D+=t*I;i+=t*I;O=W[R];b=W[R+1];w=W[R+2];A=W[R+3];
|
|
for(var d=k-p;d<k;d++){g+=O-W[z];h[i]=U[g];E+=b-W[z+1];h[i+1]=U[E];j+=w-W[z+2];h[i+2]=U[j];x+=A-W[z+3];
|
|
h[i+3]=U[x];z+=I;i+=I}}};N.tO.anV=function(W,h,S,k,p){var I=1/(p+p+1),q=k-p-p-1;for(var Q=0;Q<S;Q++){var P=Q,t=P,M=P+p*S,U=W[P],i=W[P+S*(k-1)],z=(p+1)*U;
|
|
for(var D=0;D<p;D++)z+=W[P+D*S];for(var D=0;D<=p;D++){z+=W[M]-U;h[P]=z*I;M+=S;P+=S}for(var D=0;D<q;D++){var R=D*S;
|
|
z+=W[M+R]-W[t+R];h[P+R]=z*I}t+=q*S;M+=q*S;P+=q*S;for(var D=k-p;D<k;D++){z+=i-W[t];h[P]=z*I;t+=S;P+=S}}};
|
|
N.hx={};N.hx.U=function(W,h,S,k){var p=[];for(var I=0;I<4;I++)for(var q=0;q<4;q++)p.push(W+S*q/3,h+k*I/3);
|
|
return p};N.hx.NS=function(W,h){var S=W.slice(0);for(var Q=0;Q<4;Q++)for(var k=0;k<4;k++){var p=2*(Q*4+k),I=2*(k*4+(3-Q));
|
|
if(h){var q=p;p=I;I=q}S[I]=W[p];S[I+1]=W[p+1]}return S};N.hx.FN=N.U(0);N.hx.drawImage=function(W,h,S,k,p,I,q){var P=!1,t=Date.now(),M=2,U=S+2*M,i=k+2*M,z=new gj(M,M,S,k),D=z.clone(),A=50;
|
|
D.x1(M,M);var R=N.hx.FN;if(R.length!=D.n()*4)R=N.hx.FN=N.U(D.n()*4);else R.fill(0);N.zt(h,z,R,D);if(P)console.log(Date.now()-t,"copy rect");
|
|
t=Date.now();N.tr(R);if(P)console.log(Date.now()-t,"multiply alpha");t=Date.now();var O=[],b=[],w=[];
|
|
for(var g=0;g<A+1;g++)for(var E=0;E<A+1;E++){var j=E/A,x=g/A;O.push(U*j,i*x);if(E<A&&g<A){var d=g*(A+1)+E,L=d+1,_=d+A+1,T=_+1;
|
|
b.push(d,L,_);b.push(_,L,T)}var c=N.hx.a9M(W,j,x);w.push(-c)}var e=O.slice(0);N.hx.A(W,e,new gj(M,M,S,k));
|
|
N.H.A(e,new ex(1,0,0,1,-I.x,-I.y),e);if(P)console.log(Date.now()-t,"mesh built");t=Date.now();var r=I.e,B=I.Z;
|
|
N.aF.gY(R,U,i,p,r,B,O,e,w,b);if(P)console.log(Date.now()-t,"rendered");t=Date.now();N.oY(p);if(P)console.log(Date.now()-t,"divided");
|
|
t=Date.now()};N.hx.Cj=new Array(10);N.hx.ahE=function(W,h){var S=200,k=0,p=0,I=1e9,q=N.hx.Cj;for(var P=0;
|
|
P<S+1;P++)for(var t=0;t<S+1;t++){var M=t/S,U=P/S;N.hx.j2(W,M,U,q);var i=q[8]-h.x,z=q[9]-h.y,D=i*i+z*z;
|
|
if(D<I){I=D;k=M;p=U}}return[k,p]};N.hx.A=function(W,h,S){var k=S.x,p=S.y,I=1/S.e,q=1/S.Z,P=N.hx.Cj;for(var t=0;
|
|
t<h.length;t+=2){var M=(h[t]-k)*I,U=(h[t+1]-p)*q;N.hx.j2(W,M,U,P);h[t]=P[8];h[t+1]=P[9]}};N.hx.a9M=function(W,h,S){var k,p,I,q,P=N.hx.Cj;
|
|
N.hx.ajq(W,h,S,P);k=P[8];p=P[9];N.hx.afT(W,h,S,P);I=P[8];q=P[9];return k*q-p*I};N.hx.j2=function(W,h,S,k){N.hx.in(k,0,S);
|
|
N.hx.in(k,4,h);N.hx.Ih(W,k)};N.hx.ajq=function(W,h,S,k){N.hx.in(k,0,S);N.hx.i6(k,4,h);N.hx.Ih(W,k)};
|
|
N.hx.afT=function(W,h,S,k){N.hx.i6(k,0,S);N.hx.in(k,4,h);N.hx.Ih(W,k)};N.hx.i6=function(W,Q,h){var S=1-h;
|
|
W[Q]=-3*(S*S);W[Q+1]=3*(S*S)-6*(h*S);W[Q+2]=6*(h*S)-3*(h*h);W[Q+3]=3*(h*h)};N.hx.in=function(W,Q,h){var S=1-h;
|
|
W[Q]=S*(S*S);W[Q+1]=3*h*(S*S);W[Q+2]=3*(h*h)*S;W[Q+3]=h*h*h};N.hx.Ih=function(W,h){var S=0,k=0,p=0,I=h[0],q=h[1],P=h[2],t=h[3],M=h[4],U=h[5],i=h[6],z=h[7];
|
|
p=I*M;S+=W[0]*p;k+=W[1]*p;p=I*U;S+=W[2]*p;k+=W[3]*p;p=I*i;S+=W[4]*p;k+=W[5]*p;p=I*z;S+=W[6]*p;k+=W[7]*p;
|
|
p=q*M;S+=W[8]*p;k+=W[9]*p;p=q*U;S+=W[10]*p;k+=W[11]*p;p=q*i;S+=W[12]*p;k+=W[13]*p;p=q*z;S+=W[14]*p;k+=W[15]*p;
|
|
p=P*M;S+=W[16]*p;k+=W[17]*p;p=P*U;S+=W[18]*p;k+=W[19]*p;p=P*i;S+=W[20]*p;k+=W[21]*p;p=P*z;S+=W[22]*p;
|
|
k+=W[23]*p;p=t*M;S+=W[24]*p;k+=W[25]*p;p=t*U;S+=W[26]*p;k+=W[27]*p;p=t*i;S+=W[28]*p;k+=W[29]*p;p=t*z;
|
|
S+=W[30]*p;k+=W[31]*p;h[8]=S;h[9]=k};N.IM={};N.IM.ao3=function(W,h,S){var k=Date.now(),p=new ArrayBuffer(h*S*16),I=N.IM.a35(W,h,S,p),q=N.IM.amm(h,S,p);
|
|
return{l7:q,kL:I}};N.IM.aiO=function(W,h,S){var k=Math.round(W.length/8),p=new Uint32Array(k),I=new Uint8Array(k),q=new Uint32Array(k);
|
|
N.wM(p,4294967295,0);p[S]=0;var P=new by(k);P.push(S,p[S]);var t={l7:W,kL:h,nY:p,fd:I,e6:q,UT:P,air:S};
|
|
return t};N.IM.KN=function(W,h){var S=W.l7,k=W.kL,p=W.nY,I=W.fd,q=W.e6,P=W.UT;while(!P.ZP()&&(h==null||I[h]==0)){var t=P.pop();
|
|
I[t]=1;for(var Q=0;Q<8;Q++){var M=S[8*t+Q],U=t+M;if(M==0||I[U])continue;var i=p[t]+k[8*t+Q];if(P.contains(U)&&i<p[U])P.remove(U,p[U]);
|
|
if(!P.contains(U)){p[U]=i;q[U]=t;P.push(U,p[U])}}}};function by(W){this.AW=new Uint32Array(W);this.list=[];
|
|
this.dF=0;this.Cx=4294967295}by.prototype.ZP=function(){return this.dF==0};by.prototype.push=function(W,h){var S=this.list;
|
|
if(S[h]==null)S[h]=[];S[h].push(W);this.dF++;this.AW[W]=S[h].length-1+1;this.Cx=Math.min(this.Cx,h)};
|
|
by.prototype.pop=function(){this.dF--;var W=this.list,h=this.Cx,S=W[h].pop();if(W[h].length==0)W[h]=null;
|
|
this.RC();this.AW[S]=0;return S};by.prototype.contains=function(W){return this.AW[W]!=0};by.prototype.remove=function(W,h){this.dF--;
|
|
var S=this.list,Q=this.AW[W]-1;if(Q==S[h].length-1)S[h].pop();else{var k=S[h].pop();S[h][Q]=k;this.AW[k]=Q+1}if(S[h].length==0)S[h]=null;
|
|
this.AW[W]=0;this.RC()};by.prototype.RC=function(){if(this.dF==0){this.Cx=4294967295;return}var W=this.Cx,h=this.list;
|
|
while(h[W]==null)W++;this.Cx=W};N.IM.acY=function(W,h,S,k){var p=new Int16Array(k);for(var I=0;I<S;I++)for(var q=0;
|
|
q<h;q++){var Q=I*h+q,P=0;if(1<q&&q<h-2&&1<I&&I<S-2){P+=W[Q-h-h];P+=W[Q-h-1]+2*W[Q-h]+W[Q-h+1];P+=W[Q-2]+2*W[Q-1]-16*W[Q]+2*W[Q+1]+W[Q+2];
|
|
P+=W[Q+h-1]+2*W[Q+h]+W[Q+h+1];P+=W[Q+h+h]}else P=-16*W[Q];p[Q]=P}return p};N.IM.agY=function(W,h,S,k){if(k==null)k=128;
|
|
var p=new Uint8Array(h*S);for(var I=1;I<S-1;I++)for(var q=1;q<h-1;q++){var Q=I*h+q;p[Q]=N.IM.a9s(W[Q],W[Q-1],W[Q+1],W[Q-h],W[Q+h],k)}return p};
|
|
N.IM.a9s=function(W,h,S,k,p,I){var q=Math.abs(W);return W*h<0&&q<Math.abs(h)&&Math.abs(h-W)>I||W*S<0&&q<Math.abs(S)&&Math.abs(S-W)>I||W*k<0&&q<Math.abs(k)&&Math.abs(k-W)>I||W*p<0&&q<Math.abs(p)&&Math.abs(p-W)>I?1:0};
|
|
N.IM.ajk=function(W,h,S,k){var p=new Float32Array(k),I=0;new Uint32Array(k).fill(0);for(var q=0;q<S;
|
|
q++)for(var P=0;P<h;P++){var t=0,M=0,Q=q*h+P,U=Q*3;if(0<P&&P<h-1)t=W[Q+1]-W[Q-1];if(0<q&&q<S-1)M=W[Q+h]-W[Q-h];
|
|
var i=p[U+2]=Math.sqrt(t*t+M*M);if(i!=0){var z=1/i;p[U]=t*z;p[U+1]=M*z}if(i>I)I=i}var D=h*S,R=I==0?0:1/I;
|
|
for(var Q=0;Q<D;Q++)p[Q*3+2]=1-p[Q*3+2]*R;return p};N.IM.asc=function(W,h,S){return S[~~((.5+.5*W)*255)]+S[~~((.5+.5*h)*255)]};
|
|
N.IM.a35=function(W,h,S,k){var p=Date.now(),I=N.IM.acY(W,h,S,k),q=N.IM.agY(I,h,S),P=N.IM.ajk(W,h,S,k),t=new Float32Array(256);
|
|
for(var Q=0;Q<256;Q++)t[Q]=Math.acos(-1+2*Q/255)*(.95/Math.PI);var M=[-1,0,1,1,1,0,-1,-1],U=[-1,-1,-1,0,1,1,1,0];
|
|
for(var Q=0;Q<8;Q++){var i=1/Math.sqrt(M[Q]*M[Q]+U[Q]*U[Q]);M[Q]*=i;U[Q]*=i}var z=[M[0],U[0],M[1],U[1],M[2],U[2],M[3],U[3]],D=[-h-1,-h,-h+1,1],R=new Uint8Array(h*S*8);
|
|
new Uint32Array(R.buffer).fill(4294967295);var O=h*S;for(var b=1;b<S-1;b++)for(var w=1;w<h-1;w++){var A=b*h+w,g=1-q[A],E=P[A*3+2],j=P[3*A+1],x=-P[3*A];
|
|
for(var d=0;d<4;d++){var L=A+D[d];N.IM.a4Q(A,L,d,R,q,P,g,E,j,x,z,t)}}return R};N.IM.a4Q=function(W,h,S,k,p,I,q,P,t,M,U,i){var z=1-p[h],D=(S&1)==0?1:Math.SQRT1_2,R=I[h*3+2]*D,O=I[3*h+1],b=-I[3*h],w=P*D,A=U[S+S],g=U[S+S+1],E=t*A+M*g,j=O*A+b*g;
|
|
if(E+j<0){E=-E;j=-j}var x=N.IM.asc(E,j,i);k[(W<<3)+S]=N.IM.tG(z,x,R);k[(h<<3)+S+4]=N.IM.tG(q,x,w)};N.IM.tG=function(W,h,S){return 1+~~(.5+20*(.43*W+.43*h+.14*S))};
|
|
N.IM.amm=function(W,h,S){var k=new Int16Array(S),p=k,Q=0,I=0;new Uint32Array(S).fill(0);for(var q=0;
|
|
q<h;q++)for(var P=0;P<W;P++){if(q>0&&P>0)p[I+0]=-W-1;if(q>0)p[I+1]=-W;if(q>0&&P<W-1)p[I+2]=-W+1;if(P<W-1)p[I+3]=1;
|
|
if(q<h-1&&P<W-1)p[I+4]=W+1;if(q<h-1)p[I+5]=W;if(q<h-1&&P>0)p[I+6]=W-1;if(P>0)p[I+7]=-1;Q++;I+=8}return k};
|
|
N.pG={};N.pG.Qi=function(W){var h=W.slice(0),S=0;for(var Q=0;Q<W.length;Q++)S+=W[Q];for(var Q=0;Q<W.length;
|
|
Q++)h[Q]/=S;return h};N.pG.r0=[N.pG.Qi([1,2,1,2,16,2,1,2,1]),N.pG.Qi([1,2,1,2,4,2,1,2,1]),N.pG.Qi([0,-1,0,-1,8,-1,0,-1,0]),N.pG.Qi([-.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]];
|
|
N.pG.kS=function(W,h,S,k,p,I,q,P){if(q==null)q=!1;if(P==null)P=!1;var t=Math.floor(Math.sqrt(p.length)),M=t-1>>>1,U=new Uint32Array(W.buffer),h=new Uint8ClampedArray(h.buffer);
|
|
for(var Q=0;Q<k;Q++)for(var i=0;i<S;i++){var z=0,D=0,R=0,O=0;for(var b=0;b<t;b++)for(var w=0;w<t;w++){var A=p[b*t+w];
|
|
if(A==0)continue;var g=i-M+w,E=Q-M+b;if(g<0)g=0;else if(g>S-1)g=S-1;if(E<0)E=0;else if(E>k-1)E=k-1;if(P&&U[E*S+g]>>>24==0){E=Q;
|
|
g=i}var j=U[E*S+g];z+=(j&255)*A;D+=(j>>>8&255)*A;R+=(j>>>16&255)*A;O+=(j>>>24&255)*A}if(q){if(z<0)z=-z;
|
|
if(D<0)D=-D;if(R<0)R=-R;if(O<0)O=-O}if(P){z=Math.max(0,Math.min(255,z));D=Math.max(0,Math.min(255,D));
|
|
R=Math.max(0,Math.min(255,R));O=Math.max(0,Math.min(255,O))}var x=Q*S+i<<2;h[x]=~~(.5+z);h[x+1]=~~(.5+D);
|
|
h[x+2]=~~(.5+R);h[x+3]=255-I&h[x+3]|I&~~(.5+O)}};N.pG.nO=function(W,h,S,k){var p=W.length,I=new Uint8Array(p);
|
|
N.pG.kS(W,h,S,k,N.pG.r0[4],0,!0);N.pG.kS(W,I,S,k,N.pG.r0[5],0,!0);for(var Q=0;Q<p;Q+=4){var q=h[Q],P=h[Q+1],t=h[Q+2],M=h[Q+3],U=I[Q],i=I[Q+1],z=I[Q+2],D=I[Q+3];
|
|
h[Q]=255-Math.max(0,Math.min(255,Math.sqrt(q*q+U*U)));h[Q+1]=255-Math.max(0,Math.min(255,Math.sqrt(P*P+i*i)));
|
|
h[Q+2]=255-Math.max(0,Math.min(255,Math.sqrt(t*t+z*z)))}};N.pG.HR=function(W,h,S,k){var p=W.length,I=new Uint8Array(p);
|
|
N.pG.gq(W,h,S,k,N.pG.r0[4],!0);N.pG.gq(W,I,S,k,N.pG.r0[5],!0);for(var Q=0;Q<p;Q++){var q=h[Q],P=I[Q];
|
|
h[Q]=255-Math.max(0,Math.min(255,Math.sqrt(q*q+P*P)))}};N.pG.gq=function(W,h,S,k,p,I){h=new Uint8ClampedArray(h.buffer);
|
|
var q=[-S-1,-S,-S+1,-1,0,1,S-1,S,S+1],P=k-1,t=S-1;for(var Q=1;Q<P;Q++)for(var M=1;M<t;M++){var U=Q*S+M,i=N.pG.Du(W,U,S,p);
|
|
if(I){if(i<0)i=-i}h[U]=~~(i+.5)}};N.pG.Du=function(W,h,S,k){return W[h-S-1]*k[0]+W[h-S]*k[1]+W[h-S+1]*k[2]+W[h-1]*k[3]+W[h]*k[4]+W[h+1]*k[5]+W[h+S-1]*k[6]+W[h+S]*k[7]+W[h+S+1]*k[8]};
|
|
N.pG.UJ=function(W,h,S,k,p){var I=[-S-1,-S,-S+1,-1,0,1,S-1,S,S+1],q=k-1,P=S-1;for(var Q=1;Q<q;Q++)for(var t=1;
|
|
t<P;t++){var M=Q*S+t;h[M]=N.pG.amy(W,M,S,p)}};N.pG.amy=function(W,h,S,k){return W[h-S-1]*k[0]+W[h-S]*k[1]+W[h-S+1]*k[2]+W[h-1]*k[3]+W[h]*k[4]+W[h+1]*k[5]+W[h+S-1]*k[6]+W[h+S]*k[7]+W[h+S+1]*k[8]};
|
|
N.y5={};N.y5.Tk=function(){function W(q,P,t,M,U,i,z){if(U==0){P.set(q);return}var D=N.U(t*M),R=N.U(t*M);
|
|
if(N.V6(q)){h(q,P,t,M,U,i,z);var O=[N.y5.wZ,N.y5.JB],b=O.indexOf(i),w=b!=-1?O[1-b]:i;N.sN(q,D,3);N.y5.U8(D,R,t,M,U,w,z);
|
|
N.ce(R,P,3)}else{for(var Q=0;Q<3;Q++){N.sN(q,D,Q);N.y5.U8(D,R,t,M,U,i,z);N.ce(R,P,Q)}}}function h(q,P,t,M,U,i,z){var D=0,R=new ArrayBuffer(512*4*3),O=[new Int32Array(R,0),new Int32Array(R,2048),new Int32Array(R,2*2048)],b=1+2*Math.round(Math.sqrt(U)),w=b>>>1,A=new Array(b),g=new Array(b);
|
|
for(var Q=0;Q<b;Q++){var R=new ArrayBuffer(512*4*3);A[Q]=[new Int32Array(R,0),new Int32Array(R,2048),new Int32Array(R,2*2048)];
|
|
g[Q]=A[Q][0]}var E=i[0],j=i[1],x=O[0];for(var d=0;d<t;d++)if(d<U||d>t-U-b-1){x.fill(0);var L=Math.max(d-U,0),_=Math.min(t,d+U+1),T=_-L;
|
|
for(var c=0;c<U;c++)k(x,q,c*t+L,c*t+_,1);for(var c=0;c<M;c++){var e=c-U-1,r=c+U;if(r<M)k(x,q,r*t+L,r*t+_,1);
|
|
if(e>=0)k(x,q,e*t+L,e*t+_,-1);var B=c*t+d<<2;D=x[300];if(D!=0)for(var Q=0;Q<3;Q++)P[B+Q]=E(O[Q],q[B+Q],D,z)}}else{for(var Q=0;
|
|
Q<b;Q++)g[Q].fill(0);var L=d-U+w,_=d+U+1+w;for(var c=0;c<U;c++)S(g,q,c*t+L,c*t+_,1,w);for(var c=0;c<M;
|
|
c++){var e=c-U-1,r=c+U;if(e>=0)S(g,q,e*t+L,e*t+_,-1,w);if(r<M)S(g,q,r*t+L,r*t+_,1,w);var F=A[w];D=F[0][300];
|
|
for(var Q=0;Q<w;Q++){var v=w-1-Q,X=w+1+Q,V=A[v],H=A[X],o=D+V[0][300],J=D+H[0][300],C=c*t+d+v<<2,Y=c*t+d+X<<2;
|
|
if(o!=0)for(var K=0;K<3;K++)P[C+K]=j(F[K],V[K],q[C+K],o,z);if(J!=0)for(var K=0;K<3;K++)P[Y+K]=j(F[K],H[K],q[Y+K],J,z)}var B=c*t+d+w<<2;
|
|
if(D!=0)for(var K=0;K<3;K++)P[B+K]=E(F[K],q[B+K],D,z)}d+=b-1}}function S(q,P,t,M,U,i){var z=p,D=t<<2,R=M<<2;
|
|
z(q[i-1],P,t-1<<2,U);z(q[i-1],P,M-1<<2,-U);z(q[i+1],P,M<<2,U);z(q[i+1],P,t<<2,-U);for(var Q=1;Q<i;Q++){var O=q[i-Q-1],b=q[i+Q+1];
|
|
for(var w=0;w<=Q;w++){var A=w<<2;z(O,P,t-1-w<<2,U);z(O,P,M-1-w<<2,-U);z(b,P,M+w<<2,U);z(b,P,t+w<<2,-U)}}k(q[i],P,t,M,U)}function k(q,P,Q,t,M){var U=Q<<2,i=t<<2;
|
|
while(U<i){p(q,P,U,M);U+=4}}function p(q,P,t,M){var U=M*P[t+3];q[300]+=U;I(q,P[t],0,U);I(q,P[t+1],512,U);
|
|
I(q,P[t+2],1024,U)}function I(q,P,t,M){q[t|P]+=M;q[t|256|P>>>4]+=M}return W}();N.y5.U8=function(){function W(i,z,D,R,O,b,w){if(O==0){z.set(i);
|
|
return}if(O<=80)h(i,z,D,R,O,b,w);else I(i,z,D,R,O,b,w)}function h(i,z,D,R,O,b,w){var A=0,g=new Int32Array(512),E=1+2*Math.round(Math.sqrt(O)),j=E>>>1,x=new Array(E);
|
|
for(var Q=0;Q<E;Q++)x[Q]=new Int32Array(512);var d=b[0],L=b[1];for(var _=0;_<D;_++)if(_<O||_>D-O-E-1){g.fill(0);
|
|
A=0;var T=Math.max(_-O,0),c=Math.min(D,_+O+1),e=c-T;for(var r=0;r<O;r++){A+=e;k(g,i,r*D+T,r*D+c,1)}for(var r=0;
|
|
r<R;r++){var B=r-O-1,F=r+O;if(B>=0){A-=e;k(g,i,B*D+T,B*D+c,-1)}if(F<R){A+=e;k(g,i,F*D+T,F*D+c,1)}var v=d(g,i[r*D+_],A,w);
|
|
z[r*D+_]=v}}else{for(var Q=0;Q<E;Q++)x[Q].fill(0);A=0;var T=_-O+j,c=_+O+1+j,e=c-T;for(var r=0;r<O;r++){A+=e;
|
|
S(x,i,r*D+T,r*D+c,1,j)}for(var r=0;r<R;r++){var B=r-O-1,F=r+O;if(B>=0){A-=e;S(x,i,B*D+T,B*D+c,-1,j)}if(F<R){A+=e;
|
|
S(x,i,F*D+T,F*D+c,1,j)}for(var Q=0;Q<j;Q++){var X=j-1-Q,V=j+1+Q;z[r*D+_+X]=L(x[j],x[X],i[r*D+_+X],A,w);
|
|
z[r*D+_+V]=L(x[j],x[V],i[r*D+_+V],A,w)}z[r*D+_+j]=d(x[j],i[r*D+_+j],A,w)}_+=E-1}}function S(i,z,D,R,O,b){var w=p;
|
|
w(i[b-1],z[D-1],0,O);w(i[b-1],z[R-1],0,-O);w(i[b+1],z[R],0,O);w(i[b+1],z[D],0,-O);for(var Q=1;Q<b;Q++){var A=i[b-Q-1],g=i[b+Q+1];
|
|
for(var E=0;E<=Q;E++){w(A,z[D-1-E],0,O);w(A,z[R-1-E],0,-O);w(g,z[R+E],0,O);w(g,z[D+E],0,-O)}}k(i[b],z,D,R,O)}function k(i,z,Q,D,R){while(Q<D)p(i,z[Q++],0,R)}function p(i,z,D,R){i[D|z]+=R;
|
|
i[D|256|z>>>4]+=R}function I(i,z,D,R,O,b,w){var A=0,g=new Int32Array(512),E=new Int32Array(1*D),j=new Int32Array(512*D),x=Math.min(O,D),d=Math.min(O,R),L=b[0];
|
|
for(var _=0;_<d;_++)q(j,E,i,D,_,1);for(var _=0;_<R;_++){if(_+O<R)q(j,E,i,D,_+O,1);if(_-O-1>=0)q(j,E,i,D,_-O-1,-1);
|
|
g.fill(0);A=0;for(var T=0;T<x;T++){A+=E[T];P(g,j,T)}for(var T=0;T<D;T++){var c=T-O-1,e=T+O;if(c>=0&&E[c]!=0){A-=E[c];
|
|
t(g,j,c)}if(e<D&&E[e]!=0){A+=E[e];P(g,j,e)}var r=A==0?0:L(g,i[_*D+T],A,w);z[_*D+T]=r}}}function q(i,z,D,R,O,b){var Q=O*R;
|
|
for(var w=0;w<R;w++){p(i,D[Q+w],w<<9,b);z[w]+=b}}function P(i,z,D){for(var Q=0;Q<16;Q++){var R=z[D<<9|256|Q];
|
|
if(R==0)continue;i[256|Q]+=R;var O=Q<<4,b=D<<9|O;M(i,z,O,b);M(i,z,O+4,b+4);M(i,z,O+8,b+8);M(i,z,O+12,b+12)}}function t(i,z,D){for(var Q=0;
|
|
Q<16;Q++){var R=z[D<<9|256|Q];if(R==0)continue;i[256|Q]-=R;var O=Q<<4,b=D<<9|O;U(i,z,O,b);U(i,z,O+4,b+4);
|
|
U(i,z,O+8,b+8);U(i,z,O+12,b+12)}}function M(i,z,D,R){i[D]+=z[R];i[D+1]+=z[R+1];i[D+2]+=z[R+2];i[D+3]+=z[R+3]}function U(i,z,D,R){i[D]-=z[R];
|
|
i[D+1]-=z[R+1];i[D+2]-=z[R+2];i[D+3]-=z[R+3]}return W}();N.y5.JB=[function(W,h,S,k){var Q=15;while(W[256|Q]==0&&Q>0)Q--;
|
|
Q=(Q<<4)+15;while(W[Q]==0&&Q>0)Q--;return Q},function(W,h,S,k,p){var Q=15;while(W[256|Q]+h[256|Q]==0&&Q>0)Q--;
|
|
Q=(Q<<4)+15;while(W[Q]+h[Q]==0&&Q>0)Q--;return Q}];N.y5.wZ=[function(W,h,S,k){var Q=0;while(W[256|Q]==0&&Q<15)Q++;
|
|
Q=Q<<4;while(W[Q]==0&&Q<255)Q++;return Q},function(W,h,S,k,p){var Q=0;while(W[256|Q]+h[256|Q]==0&&Q<15)Q++;
|
|
Q=Q<<4;while(W[Q]+h[Q]==0&&Q<255)Q++;return Q}];N.y5.Ht=.5;N.y5.Hm=[function(W,h,S,k){var p=~~(.5+N.y5.Ht*S),I=0,Q=256;
|
|
while(I+W[Q]<=p)I+=W[Q++];Q=Q-256<<4;while(I<=p)I+=W[Q++];return Q-1},function(W,h,S,k,p){var I=~~(.5+N.y5.Ht*k),q=0,Q=256;
|
|
while(q+W[Q]+h[Q]<=I){q+=W[Q]+h[Q];Q++}Q=Q-256<<4;while(q<=I){q+=W[Q]+h[Q];Q++}return Q-1}];N.y5.cW=[function(W,h,S,k){var p=k[0],I=0,q=0,Q=Math.max(0,h-p),P=Math.min(256,h+p+1);
|
|
while(Q<P){var t=W[Q];I+=Q*t;q+=t;Q++}return q==0?0:I/q},function(W,h,S,k,p){var I=p[0],q=0,P=0,Q=Math.max(0,S-I),t=Math.min(256,S+I+1);
|
|
while(Q<t){var M=W[Q]+h[Q];q+=Q*M;P+=M;Q++}return P==0?0:q/P}];N.V={};N.V._M=function(W){var h=a.Q.Pw(W.Trnf),S=W.Sz.v,k=N.V.ew(h,new gj(0,0,S.Wdth.v,S.Hght.v));
|
|
return N.V.MK(k)};N.V.ew=function(W,h){var S=W[0],k=W[1],p=W[2],I=W[3],q=W[6],P=W[7],t=W[4],M=W[5],U=0,i=0,z=1,D=0,R=0,O=1,b=1,w=1;
|
|
if(h){U=h.x;i=h.y;z=h.x+h.e;D=h.y;R=h.x;O=h.y+h.Z;b=h.x+h.e;w=h.y+h.Z}return N.V.QC(W,[U,i,z,D,b,w,R,O])};
|
|
N.V.QC=function(W,h){var S=W[0],k=W[1],p=W[2],I=W[3],q=W[6],P=W[7],t=W[4],M=W[5],U=h[0],i=h[1],z=h[2],D=h[3],R=h[6],O=h[7],b=h[4],w=h[5],A=[[U,i,1,0,0,0,-U*S,-i*S,S],[0,0,0,U,i,1,-U*k,-i*k,k],[z,D,1,0,0,0,-z*p,-D*p,p],[0,0,0,z,D,1,-z*I,-D*I,I],[R,O,1,0,0,0,-R*q,-O*q,q],[0,0,0,R,O,1,-R*P,-O*P,P],[b,w,1,0,0,0,-b*t,-w*t,t],[0,0,0,b,w,1,-b*M,-w*M,M]],g=[0,0,0,0,0,0,0,0],E=N.tf.SS(A,g);
|
|
if(E!=0)g=[0,0,0,0,0,0,0,0];return g};N.V.kD=function(W){return Math.abs(W[6])<1e-10&&Math.abs(W[7])<1e-10};
|
|
N.V.MK=function(W){return new ex(W[0],W[3],W[1],W[4],W[2],W[5])};N.V.xm=function(W){return[W.S4,W.ZB,W.y8,W.S,W.Bq,W.S8,0,0]};
|
|
N.V.A=function(W,h){var S=new Float64Array(2);for(var k=0;k<h.length;k+=2){var p=h[k],I=h[k+1];N.V.Sj(p,I,W,S);
|
|
h[k]=S[0];h[k+1]=S[1]}};N.V.Sj=function(W,h,S,k){var p=1/(S[6]*W+S[7]*h+1);k[0]=(S[0]*W+S[1]*h+S[2])*p;
|
|
k[1]=(S[3]*W+S[4]*h+S[5])*p};N.V.AD=function(W,h){var S=new Float64Array(2);N.V.Sj(h.x,h.y,W,S);return new eC(S[0],S[1])};
|
|
N.V.Vg=function(W,h,S,k){W=new Uint32Array(W.buffer);h=new Uint32Array(h.buffer);for(var p=0;p<k;p++){for(var I=0;
|
|
I<S;I++){h[I*k+p]=W[p*S+I]}}};N.V.a1F=function(W,h,S,k){W=new Uint32Array(W.buffer);h=new Uint32Array(h.buffer);
|
|
for(var p=0;p<k;p++){for(var I=0;I<S;I++){h[p*S+I]=W[p*S+S-1-I]}}};N.V.kF=function(W){return Math.abs(W[6])<1e-9&&Math.abs(W[7])<1e-9};
|
|
N.V.c5=function(W){return Math.abs(W[0])<1e-9&&Math.abs(W[4])<1e-9||Math.abs(W[1])<1e-9&&Math.abs(W[3])<1e-9};
|
|
N.V.drawImage=function(W,h,S,k,p,I,q,P,t){if(q==null)q=!1;if(P==null)P=!1;var M=N.V.uA(W),U=!0,i=0;for(var Q=0;
|
|
Q<8;Q++){var z=Math.round(W[Q]);if(Q!=2&&Q!=5)i+=Math.abs(z);if(Math.abs(z-W[Q])>1e-9)U=!1}var D=N.V.kF(W),R=N.V.c5(W)&&D,O=R?1:0;
|
|
if(q||U&&i==S+k&&D){N.V.a5Y(M,h,S,k,p,I,P,D,t);return}var b=I.e,w=I.Z,A=new Float64Array(2);p=new Uint32Array(p.buffer);
|
|
h=new Uint32Array(h.buffer);for(var g=0;g<w;g++)for(var E=0;E<b;E++){var j=g*b+E,x,d,L,_,o=0,J=0,C=0,Y=0;
|
|
p[j]=0;var T=E+I.x+.5,c=g+I.y+.5;x=T;d=c;L=M;var e=L[0]*x+L[1]*d+L[2],r=L[3]*x+L[4]*d+L[5];if(!D){_=1/(L[6]*x+L[7]*d+1);
|
|
e*=_;r*=_}var B=e*S,F=r*k,v=B<-1||B>S+1||F<-1||F>k+1;if(P){B=Math.max(.001,Math.min(S-1,B));F=Math.max(.001,Math.min(k-1,F))}else if(v)continue;
|
|
var X=N.V.a13(W,S,k,T,c,e,r),V=Math.round(X*2.3);if(X<1.1){N.V.qo(B,F,h,S,k,p,j,O);continue}if(!P&&(B<.6||B>S-.6||F<.6||F>k-.6)){V=Math.max(V,5)}if(P&&v)V=1;
|
|
var H=1/V,K=I.x+E,u=I.y+g;L=M;for(var Q=0;Q<V;Q++)for(var f=0;f<V;f++){x=K+(Q+.5)*H;d=u+(f+.5)*H;var B=L[0]*x+L[1]*d+L[2],F=L[3]*x+L[4]*d+L[5];
|
|
if(!D){_=1/(L[6]*x+L[7]*d+1);B*=_;F*=_}if(P){B=Math.max(.001,Math.min(.999,B));F=Math.max(.001,Math.min(.999,F))}else if(B<0||B>=1||F<0||F>=1)continue;
|
|
B=Math.floor(B*S);F=Math.floor(F*k);var l=F*S+B,jk=h[l],hE=jk>>>24;o+=(jk&255)*hE;J+=(jk>>>8&255)*hE;
|
|
C+=(jk>>>16&255)*hE;Y+=hE}if(Y!=0){var Z=1/Y;o=~~(o*Z+.5);J=~~(J*Z+.5);C=~~(C*Z+.5);Y=~~(Y*H*H+.5);p[j]=Y<<24|C<<16|J<<8|o}}};
|
|
N.V.a13=function(W,h,S,k,p,I,q){var P=N.V.j8(W,k,p,I+1/h,q),t=N.V.j8(W,k,p,I,q+1/S);return 1/Math.sqrt(Math.max(P,t))};
|
|
N.V.j8=function(W,h,S,k,p){var I=1/(W[6]*k+W[7]*p+1),q=(W[0]*k+W[1]*p+W[2])*I-h,P=(W[3]*k+W[4]*p+W[5])*I-S;
|
|
return q*q+P*P};N.V.a5Y=function(W,h,S,k,p,I,q,P,t){if(P&&!q&&I.n()>4e6&&t){N.V.a1C(W,h,S,k,p,I,q,P,t);
|
|
return}var M=I.x+I.e,U=I.y+I.Z,i=0,z=new Uint32Array(p.buffer),D=new Uint32Array(h.buffer),R=W[0]*S,O=W[1]*S,b=W[2]*S,w=W[3]*k,A=W[4]*k,g=W[5]*k,E=W[6],j=W[7];
|
|
if(P&&!q)for(var x=I.y+.5;x<U;x++)for(var d=I.x+.5;d<M;d++){var L=R*d+O*x+b,_=w*d+A*x+g;if(0<L&&L<S&&0<_&&_<k){var T=~~_*S+~~L;
|
|
z[i]=D[T]}else z[i]=0;i++}else for(var x=I.y+.5;x<U;x++)for(var d=I.x+.5;d<M;d++){var c=1/(E*d+j*x+1),L=(R*d+O*x+b)*c,_=(w*d+A*x+g)*c;
|
|
if(q){L=Math.max(.001,Math.min(S-1,L));_=Math.max(.001,Math.min(k-1,_))}if(0<L&&L<S&&0<_&&_<k){var T=Math.floor(_)*S+Math.floor(L);
|
|
z[i]=D[T]}else z[i]=0;i++}};N.V.a1C=function(W,h,S,k,p,I,q,P,t){var M=new Uint32Array(p.buffer),U=new Uint32Array(h.buffer),j=0;
|
|
if(t&&(I.e&3)!=0)throw"e";var i=W[0]*S,z=W[1]*S,D=W[2]*S,R=W[3]*k,O=W[4]*k,b=W[5]*k,w=W[6],A=W[7],g=I.e,E=I.Z,x=I.x+.5,d=I.y+.5,L=(g>>>2<<2)-1e-9,_=-.1+(E>>>1<<1)-1e-9,T=~~S,c=i==0?0:1/i,e=R==0?0:1/R;
|
|
for(var r=0;r<E;r++){var B=x*i+z*(r+d)+D,F=x*R+O*(r+d)+b,v=0,X=g;if(i==0){}else if(c>0){v=Math.max(v,-B*c);
|
|
X=Math.min(X,(S-B)*c)}else{X=Math.min(X,-B*c);v=Math.max(v,(S-B)*c)}if(R==0){}else if(e>0){v=Math.max(v,-F*e);
|
|
X=Math.min(X,(k-F)*e)}else{X=Math.min(X,-F*e);v=Math.max(v,(k-F)*e)}if(X<0)X=0;if(v>X)v=X;v=Math.ceil(v);
|
|
X=~~X;j=~~(r*g);for(var V=0;V<v;V++)M[j++]=0;for(var V=v;V<X;V+=4){var H=i*V+B,o=R*V+F,J=~~o*T+~~H;M[j++]=M[j++]=M[j++]=M[j++]=U[J]}for(var V=X;
|
|
V<g;V++)M[j++]=0}};N.V.uA=function(W){var h=W[4]-W[5]*W[7],S=W[2]*W[7]-W[1],k=W[1]*W[5]-W[2]*W[4],p=W[5]*W[6]-W[3],I=W[0]-W[2]*W[6],q=W[3]*W[2]-W[0]*W[5],P=W[3]*W[7]-W[4]*W[6],t=W[1]*W[6]-W[0]*W[7],M=1/(W[0]*W[4]-W[1]*W[3]);
|
|
return[h*M,S*M,k*M,p*M,I*M,q*M,P*M,t*M]};N.V.iq=function(W,h){var S=W[0],k=W[1],p=W[2],I=W[3],q=W[4],P=W[5],t=W[6],U=W[7],i=h[0],z=h[1],D=h[2],R=h[3],O=h[4],b=h[5],w=h[6],A=h[7],g=[S*i+k*R+p*w,S*z+k*O+p*A,S*D+k*b+p,I*i+q*R+P*w,I*z+q*O+P*A,I*D+q*b+P,t*i+U*R+w,t*z+U*O+A],E=1/(t*D+U*b+1);
|
|
for(var Q=0;Q<8;Q++)g[Q]*=E;return g};N.V.qo=function(W,h,S,k,p,I,q,P){var t=W,M=h,z=0,D=0,R=0,O=0;W-=.499999;
|
|
h-=.499999;var U=Math.floor(W),i=Math.floor(h);if(P==0){var Q=i*k+U,b=U>=0&&U<k,w=U+1>=0&&U+1<k,A=i>=0&&i<p,g=i+1>=0&&i+1<p;
|
|
if(b&&A)z=S[Q];if(w&&A)D=S[Q+1];if(b&&g)R=S[Q+k];if(w&&g)O=S[Q+k+1]}else if(P==1){var E=U<0?0:U>k-1?k-1:U,j=U<-1?0:U>k-2?k-1:U+1,x=i<0?0:i>p-1?p-1:i,d=i<-1?0:i>p-2?p-1:i+1;
|
|
z=S[x*k+E];D=S[x*k+j];R=S[d*k+E];O=S[d*k+j]}else{var E=(U+50*k)%k,j=(U+50*k)%k,x=(i+50*p)%p,d=(i+50*p)%p;
|
|
z=S[x*k+E];D=S[x*k+j];R=S[d*k+E];O=S[d*k+j]}var L=W-U,_=h-i,T=(1-_)*(1-L)*(z>>>24),c=(1-_)*L*(D>>>24),e=_*(1-L)*(R>>>24),r=_*L*(O>>>24),B=T+c+e+r,F=T*(z&255)+c*(D&255)+e*(R&255)+r*(O&255),v=T*(z>>>8&255)+c*(D>>>8&255)+e*(R>>>8&255)+r*(O>>>8&255),X=T*(z>>>16&255)+c*(D>>>16&255)+e*(R>>>16&255)+r*(O>>>16&255);
|
|
if(B==0)I[q]=0;else{var V=1/B;F=~~(F*V+.5);v=~~(v*V+.5);X=~~(X*V+.5);B=~~(B+.5);I[q]=B<<24|X<<16|v<<8|F}};
|
|
N.V.Hp=function(W,h,S,k,p,I){var q=W-.499999,P=h-.499999,t=~~q,M=~~P,U=q-t,i=P-M,z=(1-i)*(1-U),D=(1-i)*U,R=i*(1-U),O=i*U,b=M*k+t<<2,w=(M+1)*k+t<<2,A=z*S[b]+D*S[b+4]+R*S[w]+O*S[w+4],g=z*S[b+1]+D*S[b+5]+R*S[w+1]+O*S[w+5],E=z*S[b+2]+D*S[b+6]+R*S[w+2]+O*S[w+6],j=z*S[b+3]+D*S[b+7]+R*S[w+3]+O*S[w+7];
|
|
I[0]=A;I[1]=g;I[2]=E;I[3]=j};N.V.qz=function(W,h,S,k,p){W-=.499999;h-=.499999;var I=Math.floor(W),q=Math.floor(h),P=W-I,t=h-q,M=(1-t)*(1-P),U=(1-t)*P,i=t*(1-P),z=t*P,D=(I+50*k)%k,R=(I+1+50*k)%k,O=(q+50*p)%p,b=(q+1+50*p)%p,w=S[O*k+D],A=S[O*k+R],g=S[b*k+D],E=S[b*k+R];
|
|
if(w==null||E==null)throw"e";return M*w+U*A+i*g+z*E};N.V.iA=function(W,h,S,k,p,I,q,P,t,M,U,i){var z=new Uint32Array(W.buffer),D=new Uint32Array(k.buffer),R=(1+2*M)/p,O=[],b=[];
|
|
for(var w=0;w<p;w++){var A=-.25+M-w*R;O.push(Math.cos(2*Math.PI*A)*i/U);O.push(Math.sin(2*Math.PI*A)/U)}q*=h;
|
|
P*=S;for(var g=0;g<I;g++){var E=Math.pow(g/I,t)*I;for(var w=0;w<p;w++){var j=q+O[w<<1]*E,x=P+O[(w<<1)+1]*E,d=~~(.5+(j<0?0:j>h-1?h-1:j)),L=~~(.5+(x<0?0:x>S-1?S-1:x));
|
|
D[g*p+w]=z[L*h+d]}}};N.V._H=function(W,h,S,k,p,I,q,P,t,M,U,i){var z=new Uint32Array(W.buffer),D=new Uint32Array(k.buffer),R=1/i,O=[],b=S*4,w=1/b;
|
|
for(var A=0;A<b+10;A++)O.push(Math.pow(A*w,1/t)*S*U);q*=p;P*=I;for(var A=0;A<I;A++)for(var g=0;g<p;g++){var E=R*(g-q),j=A-P,x=1.75-Math.atan2(j,E)*(1/(2*Math.PI));
|
|
x=x-~~x;x=(x+M)*(1/(1+2*M));var d=Math.sqrt(E*E+j*j);d=O[~~(d*4)];N.V.qo(x*h+.5,d+.5,z,h,S,D,A*p+g,1)}};
|
|
N.V.OF=function(W,h,S,k,p){var I=p[0],q=p[1];for(var P=0;P<q;P++)for(var t=0;t<I;t++){var M=p[2]*t+p[3]*P+p[4],U=p[5]*t+p[6]*P+p[7],i=P*I+t<<2,z=U*h+M<<2;
|
|
k[i]=W[z+0];k[i+1]=W[z+1];k[i+2]=W[z+2];k[i+3]=W[z+3]}};N.X={tj:function(W,h){var S=~~(.499+W*h);return S<0?0:S>h?h:S},a8y:function(W,h,S,k,p,I,q,P){var t=S[0],M=S[1],U=S[2],i=S[3],z=k.e,D=k.Z,R=new Float64Array(z*4+8),O=new Float64Array(z*4+8);
|
|
for(var b=0,Q=0;b<D;b++){var w=R;R=O;O=w;O.fill(0);for(var A=0;A<z;A++,Q++){var g=A+p,E=b+I,j=t*g+M*E,x=U*g+i*E,d=0,T=0;
|
|
if(P==0)d=j+.5;else if(P==1)d=2*Math.sqrt(j*j+x*x);else if(P==2)d=(Math.PI+Math.atan2(-x,-j))/(2*Math.PI);
|
|
else if(P==3)d=Math.abs(j*2);else if(P==4)d=2*(Math.abs(j)+Math.abs(x));var L=N.X.tj(d,q)*4,_=A*4;for(var c=0;
|
|
c<4;c++){var e=Math.max(0,Math.min(254.999,h[L+c]+R[_+4+c])),r=Math.floor(e);if(Math.random()<e-r)r++;
|
|
var B=e-r;R[_+8+c]=B*(7/16);O[_+0+c]=B*(3/16);O[_+4+c]=B*(5/16);O[_+8+c]=B*(1/16);T|=r<<c*8}W[Q]=T}}},zy:[function(W,h,S,k,p,I,q){var P=S[0],t=S[1],M=S[2],U=S[3],i=k.e,z=k.Z;
|
|
for(var D=0,Q=0;D<z;D++)for(var R=0;R<i;R++,Q++){var O=R+p,b=D+I,w=P*O+t*b,A=M*O+U*b,g=w+.5;W[Q]=h[N.X.tj(g,q)]}},function(W,h,S,k,p,I,q){var P=S[0],t=S[1],M=S[2],U=S[3],i=k.e,z=k.Z;
|
|
for(var D=0,Q=0;D<z;D++)for(var R=0;R<i;R++,Q++){var O=R+p,b=D+I,w=P*O+t*b,A=M*O+U*b,g=2*Math.sqrt(w*w+A*A);
|
|
W[Q]=h[N.X.tj(g,q)]}},function(W,h,S,k,p,I,q){var P=S[0],t=S[1],M=S[2],U=S[3],i=k.e,z=k.Z;for(var D=0,Q=0;
|
|
D<z;D++)for(var R=0;R<i;R++,Q++){var O=R+p,b=D+I,w=P*O+t*b,A=M*O+U*b,g=(Math.PI+Math.atan2(-A,-w))/(2*Math.PI);
|
|
W[Q]=h[N.X.tj(g,q)]}},function(W,h,S,k,p,I,q){var P=S[0],t=S[1],M=S[2],U=S[3],i=k.e,z=k.Z;for(var D=0,Q=0;
|
|
D<z;D++)for(var R=0;R<i;R++,Q++){var O=R+p,b=D+I,w=P*O+t*b,A=M*O+U*b,g=Math.abs(w*2);W[Q]=h[N.X.tj(g,q)]}},function(W,h,S,k,p,I,q){var P=S[0],t=S[1],M=S[2],U=S[3],i=k.e,z=k.Z;
|
|
for(var D=0,Q=0;D<z;D++)for(var R=0;R<i;R++,Q++){var O=R+p,b=D+I,w=P*O+t*b,A=M*O+U*b,g=2*(Math.abs(w)+Math.abs(A));
|
|
W[Q]=h[N.X.tj(g,q)]}}]};N.X.amo=function(W,h){return W+.5};N.X.as0=function(W,h){return 2*Math.sqrt(W*W+h*h)};
|
|
N.X.a85=function(W,h){return(Math.PI+Math.atan2(-h,-W))/(2*Math.PI)};N.X.aiF=function(W,h){return Math.abs(W*2)};
|
|
N.X.aeq=function(W,h){return 2*(Math.abs(W)+Math.abs(h))};N.X.S3=function(W,h,S,k,p,I,q,P,t,M,U,i){var z=W.Clrs,D=new Uint32Array(h.buffer),R=1023,O=z?N.X.V8(z.v,t,M):null;
|
|
if(i&&z){var b=N.X.amh(W,O,R+1,q);N.X.a8y(D,b,k,S,S.x-p,S.y-I,R,P)}else{var w=z?N.X.C5(W,O,R+1,q):N.X.CC(W,R+1,q);
|
|
if(P<5){N.X.zy[P](D,w,k,S,S.x-p,S.y-I,R)}else{var A=new Uint8Array(w.buffer),g=S.e,E=S.Z,j=U.ME-U.C9,x=1/j,d=U.zf.e-S.e>>1,L=U.zf.Z-S.Z>>1,_=U.zf.e,T=-.6*x,c=(-.6+.4)*x,e=(-.6+2*.4)*x,r=(-.6+3*.4)*x;
|
|
for(var B=0,Q=0;B<E;B++)for(var F=0;F<g;F++,Q+=4){var v=0,X=0,V=0,H=0,o=(B+L)*_+F+d,J=(U.kR[o]-U.C9)*x,C=0;
|
|
if(J<=0||J>=1){C=(J<=0?0:R)<<2;h[Q]=A[C];h[Q+1]=A[C+1];h[Q+2]=A[C+2];h[Q+3]=A[C+3];continue}C=Math.max(0,Math.min(R-1,Math.round((J+T)*R)))<<2;
|
|
X+=A[C];V+=A[C+1];H+=A[C+2];v+=A[C+3];C=Math.max(0,Math.min(R-1,Math.round((J+c)*R)))<<2;X+=A[C];V+=A[C+1];
|
|
H+=A[C+2];v+=A[C+3];C=Math.max(0,Math.min(R-1,Math.round((J+e)*R)))<<2;X+=A[C];V+=A[C+1];H+=A[C+2];v+=A[C+3];
|
|
C=Math.max(0,Math.min(R-1,Math.round((J+r)*R)))<<2;X+=A[C];V+=A[C+1];H+=A[C+2];v+=A[C+3];h[Q]=X>>>2;
|
|
h[Q+1]=V>>>2;h[Q+2]=H>>>2;h[Q+3]=v>>>2}}}};N.X.V8=function(W,h,S){var k=[];for(var Q=0;Q<W.length;Q++){var p,I=W[Q].v,q=I.Type.v.Clry;
|
|
if(q=="FrgC")p={p:h>>16&255,z:h>>8&255,S:h&255};else if(q=="BckC")p={p:S>>16&255,z:S>>8&255,S:S&255};
|
|
else p=N.X.iZ(I.Clr.v);k.push(p)}return k};N.X.iZ=function(W){var h,S=W.classID;if(S=="RGBC"){if(W.Rd)h={p:W.Rd.v,z:W.Grn.v,S:W.Bl.v};
|
|
else h={p:W.redFloat.v*255,z:W.greenFloat.v*255,S:W.blueFloat.v*255}}else if(S=="HSBC"){h=N.qu(W.H.v.val/360,W.Strt.v/100,W.Brgh.v/100);
|
|
h.p*=255;h.z*=255;h.S*=255}else if(S=="CMYC"){var k=100-W.Cyn.v,p=100-W.Mgnt.v,I=100-W.Ylw.v,q=100-W.Blck.v,P=255*k*q*1e-4,t=255*(.2*k+.8*p)*q*1e-4,M=255*(.2*p+.8*I)*q*1e-4;
|
|
h={p:P,z:t,S:M}}else if(S=="Grsc")h={p:255-W.Gry.v,z:255-W.Gry.v,S:255-W.Gry.v};else if(S=="LbCl"){h=N.LG(W.Lmnc.v,W.A.v,W.B.v)}else console.log(W);
|
|
if(isNaN(h.p))h.p=h.z=h.S=0;return h};N.X.CC=function(W,h,S){var k=new Uint32Array(h),p=new Uint8Array(k.buffer);
|
|
k.fill(4278190080);var I=[],q=[],P=W.RndS.v,t=W.Smth.v/4096;for(var Q=0;Q<4;Q++){I[Q]=~~(W.Mnm.v[Q].v*255/100);
|
|
q[Q]=~~(W.Mxm.v[Q].v*255/100)}var M=N.U(h*4),U=N.U(h);for(var i=0;i<3;i++){N.I.f3(null,h,1,M,[1+Math.round(t*t*t*60),22,P*(2+i)]);
|
|
N.sN(M,U,0);N.ce(U,p,i);var z=I[i],D=q[i];for(var Q=0;Q<h;Q++)p[4*Q+i]=Math.max(z,Math.min(D,p[4*Q+i]))}if(S)for(var Q=0;
|
|
Q<h/2;Q++){var R=k[Q];k[Q]=k[h-1-Q];k[h-1-Q]=R}return k};N.X.hg=function(W){return{classID:"RGBC",Rd:{t:"doub",v:W.p},Grn:{t:"doub",v:W.z},Bl:{t:"doub",v:W.S}}};
|
|
N.X.amh=function(W,h,S,k){var p=[],I=1/(S-0);for(var Q=0;Q<S;Q++){var q=Q*4,P=N.X.fC(W,h,(k?S-1-Q:Q)*I);
|
|
p[q]=P[0];p[q+1]=P[1];p[q+2]=P[2];p[q+3]=P[3]}return p};N.X.C5=function(W,h,S,k){var p=new Uint32Array(S),I=1/(S-0);
|
|
for(var Q=0;Q<S;Q++)p[Q]=N.X.a1(W,h,(k?S-1-Q:Q)*I);return p};N.X.fC=function(W,h,S){var k=4096,p=1/4096,I=W.Intr.v*p,q=W.Clrs.v,P=W.Trns.v,t=q.length-1,M=P.length-1,Q=-1,U=0,i=0,z=0,D=0;
|
|
while(Q<M&&P[Q+1].v.Lctn.v<=S*k)Q++;if(Q==-1){U=P[0].v.Opct.v.val*(255/100)}else if(Q==M){U=P[Q].v.Opct.v.val*(255/100)}else{var R=N.X.pK(P,p,Q,S,I);
|
|
U=(R*P[Q].v.Opct.v.val+(1-R)*P[Q+1].v.Opct.v.val)*(255/100)}Q=-1;while(Q<t&&q[Q+1].v.Lctn.v<=S*k)Q++;
|
|
if(Q==-1){var O=h[0];i=O.p;z=O.z;D=O.S}else if(Q==t){var O=h[Q];i=O.p;z=O.z;D=O.S}else{var b=h[Q],w=h[Q+1],A=N.X.pK(q,p,Q,S,I);
|
|
i=A*b.p+(1-A)*w.p;z=A*b.z+(1-A)*w.z;D=A*b.S+(1-A)*w.S}return[i,z,D,U]};N.X.a1=function(W,h,S){var k=N.X.fC(W,h,S),p=~~(.5+k[0]),I=~~(.5+k[1]),q=~~(.5+k[2]),P=~~(.5+k[3]);
|
|
return P<<24|q<<16|I<<8|p};N.X.pK=function(W,h,Q,S,k){if(W.length==2)k*=.5;var p=W[Q].v.Lctn.v*h,I=W[Q+1].v.Lctn.v*h,q=p+W[Q+1].v.Mdpn.v*.01*(I-p),P;
|
|
if(S<q)P=.5*(S-p)/(q-p);else P=.5+.5*(S-q)/(I-q);P=.5+.5*(k*Math.cos(Math.PI*P)+(1-k)*(1-2*P));return P};
|
|
N.X.ma=function(W,h){var S=Math.PI*W.Angl.v.val/180,k=W.Scl.v.val/100,p=W.Ofst.v,I=p.Hrzn.v.val/100,q=p.Vrtc.v.val/100,P=Math.cos(S),t=-Math.sin(S),M=.5*h.Z,U=M*(P/t),i=Math.sqrt(M*M+U*U),z=.5*h.e,D=z*(t/P),R=Math.sqrt(z*z+D*D),O=Math.min(i,R)*k,b=h.x+h.e/2+I*h.e,w=h.y+h.Z/2+q*h.Z;
|
|
return[new eC(b,w),new eC(b+P*O,w+t*O)]};N.X.nA=function(W,h,S,k){var p=h.x-W.x,I=-(h.y-W.y),q=Math.sqrt(p*p+I*I),P=Math.atan2(I,p),t=Math.cos(P),M=-Math.sin(P),U=.5*S.Z,i=U*(t/M),z=Math.sqrt(U*U+i*i),D=.5*S.e,R=D*(M/t),O=Math.sqrt(D*D+R*R),b=q/Math.min(z,O),w=(W.x-S.x-S.e/2)/S.e,A=(W.y-S.y-S.Z/2)/S.Z;
|
|
k.Angl.v.val=180*P/Math.PI;k.Scl.v.val=b*100;var g=k.Ofst.v;g.Hrzn.v.val=w*100;g.Vrtc.v.val=A*100};N.X.J6=function(W,h){for(var Q=0;
|
|
Q<W.length;Q++){var S=W[Q],k=Math.round(S[0]*4096),p=S[1],I=S[2],q=S[3];if(I==null)I=1;if(q==null)q=.5;
|
|
var P=N.X.hg({p:p[0]*255,z:p[1]*255,S:p[2]*255});h.Clrs.v[Q]={t:"Objc",v:{classID:"Clrt",Lctn:{t:"long",v:k},Mdpn:{t:"long",v:Math.round(q*100)},Clr:{t:"Objc",v:P},Type:{t:"enum",v:{Clry:"UsrS"}}}};
|
|
h.Trns.v[Q]={t:"Objc",v:{classID:"TrnS",Lctn:{t:"long",v:k},Mdpn:{t:"long",v:Math.round(q*100)},Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(I*100)}}}}}};
|
|
N.pm={};N.pm.aak=function(W,h,S,k,p,I,q,P,t,M,U,i){var z,D,R,O=Date.now(),b=!1,w=q,A=M,g,E,j,x,d=I*255,L=255-t*255,_=1+p*6,T=1+P*6,c=1+i*4,e=(c-1)/7,r=0,B=255-0,F,v,X,V,H,o,J,C,Y,K,u,f,l,jk=0,hE=1,Z,aQ,jC,eO,iU,gK,iM,i5,fN,dx,ai=1+U,hO,ff=N.U(S*k),eP=N.U(S*k),a0=N.U(S*k),bM=N.U(S*k),cV=255/d,aX=255/(255-L);
|
|
for(D=0;D<k;D++){for(z=0;z<S;z++){var Q=D*S+z,j8=Q<<2;Z=N.ak(W[j8],W[j8+1],W[j8+2]);bM[Q]=Z;if(Z<d)ff[Q]=255-Z*cV;
|
|
if(Z>L)eP[Q]=255-(255-Z)*aX}}if(b)console.log("init",Date.now()-O);O=Date.now();if(p*w>0){a0.set(ff);
|
|
N.tO.vZ(a0,ff,new gj(0,0,S,k),w)}if(P*A>0){a0.set(eP);N.tO.vZ(a0,eP,new gj(0,0,S,k),A)}if(b)console.log("blur",Date.now()-O);
|
|
O=Date.now();var j3=N.U(256),am=N.U(256);for(var Q=0;Q<256;Q++){var fG=Q*(1/255),bw=0;bw=(1-Math.pow(1-fG,_))*255;
|
|
j3[Q]=Math.max(0,Math.min(255,~~(bw+.5)));bw=Math.pow(fG,T)*255;am[Q]=Math.max(0,Math.min(255,~~(bw+.5)))}var fz=new Uint8ClampedArray(h.buffer),c6=new Float32Array(32768);
|
|
for(var Q=0;Q<32768;Q++){hO=Math.sqrt(Q)*(1/128);if(ai>1)hO=(1-hO)*(ai-1)+1;else hO=hO*(ai-1)+1;c6[Q]=hO}for(D=0;
|
|
D<k;D++){for(z=0;z<S;z++){var Q=D*S+z,j8=Q<<2,bw=bM[Q],hk=ff[Q]*(1/255),as=eP[Q]*(1/255);bw=(1-hk)*bw+hk*j3[~~bw];
|
|
bw=(1-as)*bw+as*am[~~bw];Z=bw;var bf=W[j8],gW=W[j8+1],j1=W[j8+2];aQ=-bf*.168736-gW*.331264+j1*.5;jC=bf*.5-gW*.418688-j1*.081312;
|
|
hO=c6[~~(.5+aQ*aQ+jC*jC)];eO=aQ*hO;gK=jC*hO;hE=1-Math.min(2-(hk+as),1);aQ=hE*aQ+(1-hE)*eO;jC=hE*jC+(1-hE)*gK;
|
|
i5=Z+1.402*jC;fN=Z-.34414*aQ-.71414*jC;dx=Z+1.772*aQ;fz[j8]=~~(.5+i5);fz[j8+1]=~~(.5+fN);fz[j8+2]=~~(.5+dx)}}if(b)console.log("apply masks",Date.now()-O);
|
|
O=Date.now()};N.JA={};N.JA.Lh=function(W,h,S,k,p){var I=!1,R=1,B=0,F=0,Y=0,ai=0;if(!h.LH(p)){var q=h.r8(p),P=N.U(q.n()*4);
|
|
N.zt(W,h,P,q);W=P;h=q}var t=N.U(h.n());N.vG(S,p,t,h);N.round(t);p=p.r$(h);var M=p.e,U=p.Z,i=M*3<U?2:1,z=U*3<M?2:1;
|
|
if(p.n()*(i*2+1)*(z*2+1)<h.n()){var q=new gj(p.x-M*i,p.y-U*i,M*(i*2+1),U*(z*2+1)).r$(h),P=N.U(q.n()*4);
|
|
N.zt(W,h,P,q);var D=N.U(q.n());N.vG(t,h,D,q);h=q;W=P;t=D}while((h.e+h.Z)/2/R>400)R++;var O=W,b=h,w=t,A=Math.floor(b.e/R),g=Math.floor(b.Z/R);
|
|
W=N.U(A*g*4);N.scale.IU(O,b.e,b.Z,W,A,g,1/R);t=N.U(A*g);N.scale.OF(w,b.e,b.Z,t,A,g,1/R);N.round(t,1);
|
|
var E=N.oA(t,new gj(0,0,A,g));if(E.ZP())return 1;var j=Math.round((E.e+E.Z)/2/15),x=Date.now(),d=N.U(A*g*4);
|
|
N.aeK(W,d);var L=Int16Array,_=new L(A*g*24),T=new L(64),c=new L(64),e=new L(64),r=new L(64);for(var v=3;
|
|
v<g-4;v++)for(var X=3;X<A-4;X++){var V=v*A+X;if(t[V]==255)continue;if(N.JA.agC(d,t,X,v,A,g,T,c,e)!=0)continue;
|
|
N.JA.LL(T,r);_[B]=X;_[B+1]=v;N.JA.WQ(T,_,B+4,12);B+=16;N.JA.LL(c,r);N.JA.WQ(c,_,B,4);B+=4;N.JA.LL(e,r);
|
|
N.JA.WQ(e,_,B,4);B+=4;var H=_[B-24+5],o=_[B-24+6];_[B-24+5]=_[B-24+20];_[B-24+6]=_[B-24+16];_[B-24+16]=H;
|
|
_[B-24+20]=o;F++}if(F==0)return 2;if(I)console.log(Date.now()-x,"FWHT computed");x=Date.now();var J=[];
|
|
N.JA.wR(0,F-1,J,_,new L(2*24));if(I)console.log(Date.now()-x,"KD tree computed");x=Date.now();var C=new Float32Array(A*g*4);
|
|
for(var Q=0;Q<F;Q++){var K=Q,l=N.JA.alI(K,_,J,j);if(l==-1)continue;var jk=K*24,hE=l*24,Z=_[jk],aQ=_[jk+1],jC=_[hE],eO=_[hE+1];
|
|
Y+=N.JA.getError(hE,jk,_,1e99);var iU=jC-Z,gK=eO-aQ;C[(g+gK)*2*A+(A+iU)]+=1}if(I)console.log(Date.now()-x,"NN found");
|
|
x=Date.now();var iM=[],i5=1/(2*A);for(var Q=0;Q<C.length;Q++){if(C[Q]>0){var v=Math.floor(Q*i5),X=Q-v*2*A;
|
|
iM.push({x:X-A,y:v-g,k:C[Q],JM:-1})}}iM.sort(function(as,bf){return bf.k-as.k});var fN=new Int32Array(A*g),dx=[];
|
|
for(var Q=0;Q<A*g;Q++){if(t[Q]==255){fN[Q]=ai;dx.push(Q%A,Math.floor(Q/A));ai++}else if(W[(Q<<2)+3]<200){fN[Q]=-2}else{fN[Q]=-1}}var hO=N.JA.a1K(A,g,iM,fN,dx,ai);
|
|
if(hO==null){return 3}var ff=hO.Ha,top=hO.top;ff=N.JA.anG(ff,W,A,g,top,fN,dx,ai);if(I)console.log(Date.now()-x,"optimal labeling found");
|
|
x=Date.now();var q=p.clone();q.x1(1,1);q=q.r$(b);var eP=N.U(q.n()*4),a0=N.U(q.n());N.zt(O,b,eP,q);var bM=b.e,cV=b.Z;
|
|
for(var v=0;v<cV;v++)for(var X=0;X<bM;X++){if(w[v*bM+X]==0)continue;var aX=Math.min(Math.floor(X/R),A-1),j8=Math.min(Math.floor(v/R),g-1),j3=fN[j8*A+aX];
|
|
if(j3==-1)continue;var am=ff[j3],fG=top[am],bw=X+fG.x*R,fz=v+fG.y*R,c6=fz*bM+bw<<2,hk=(v-q.y+b.y)*q.e+(X-q.x+b.x)<<2;
|
|
eP[hk]=O[c6];eP[hk+1]=O[c6+1];eP[hk+2]=O[c6+2];eP[hk+3]=O[c6+3];eP[hk+3]=O[c6+3];a0[hk>>2]=am+1}if(I)console.log(Date.now()-x,"copied back");
|
|
x=Date.now();N.Uz.Lh(eP,a0,q,null,1e3);if(I)console.log(Date.now()-x,"poisson smooth");x=Date.now();
|
|
N.zt(eP,q,k,p);return 0};N.JA.Nb=function(W,h,S,k,p,I){return N.JA.nR(W+p.x,h+p.y,S,k)&&I[(h+p.y)*S+(W+p.x)]==-1?0:1e9};
|
|
N.JA.anG=function(W,h,S,k,top,p,I,q){var P=Date.now(),t=[-1,0,0,-1,1,0,0,1],M=1e99,U=[],i=[],z=2*(q*2*3+q*2),D=null,R=0,O=0,b=0,w=1e99;
|
|
while(!0&&Date.now()<P+12e3){b++;var A=null,g=M;for(var E=0;E<top.length;E++){var j=top[E],x=0,d=q+2,L=0;
|
|
for(var Q=0;Q<q;Q++){var _=I[Q*2],T=I[Q*2+1],c=top[W[Q]],e=N.JA.Nb(_,T,S,k,j,p),r=W[Q]==E?1e9:N.JA.Nb(_,T,S,k,c,p);
|
|
for(var g8=0;g8<4;g8++){if(g8==0&&_==0||g8==1&&T==0||g8==2&&_==S-1||g8==3&&T==k-1)continue;var B=t[2*g8],F=t[2*g8+1],v=_+B,X=T+F,V=p[X*S+v];
|
|
if(V==-2){}else if(V==-1){e+=3*N.JA.Ba(v+j.x,X+j.y,v,X,S,k,h,p);e+=2*N.JA.Ba(v+j.x+B,X+j.y+F,v+B,X+F,S,k,h,p);
|
|
r+=3*N.JA.Ba(v+c.x,X+c.y,v,X,S,k,h,p);r+=2*N.JA.Ba(v+c.x+B,X+c.y+F,v+B,X+F,S,k,h,p)}else if(g8>1){if(W[Q]==W[V]){var H=0;
|
|
H+=N.JA.Ba(_+c.x,T+c.y,_+j.x,T+j.y,S,k,h,p);H+=N.JA.Ba(v+c.x,X+c.y,v+j.x,X+j.y,S,k,h,p);U[x]=Q;U[x+1]=V;
|
|
i[x]=H;i[x+1]=H;x+=2}else{var o=top[W[V]],J=d,C=0,Y=0,K=0;d++;C+=N.JA.Ba(_+c.x,T+c.y,_+j.x,T+j.y,S,k,h,p);
|
|
C+=N.JA.Ba(v+c.x,X+c.y,v+j.x,X+j.y,S,k,h,p);Y+=N.JA.Ba(_+o.x,T+o.y,_+j.x,T+j.y,S,k,h,p);Y+=N.JA.Ba(v+o.x,X+o.y,v+j.x,X+j.y,S,k,h,p);
|
|
K+=N.JA.Ba(_+o.x,T+o.y,_+c.x,T+c.y,S,k,h,p);K+=N.JA.Ba(v+o.x,X+o.y,v+c.x,X+c.y,S,k,h,p);U[x]=Q;U[x+1]=J;
|
|
i[x]=C;i[x+1]=C;x+=2;U[x]=V;U[x+1]=J;i[x]=Y;i[x+1]=Y;x+=2;U[x]=J;U[x+1]=q+1;i[x]=K;i[x+1]=0;x+=2}}}U[x]=q;
|
|
U[x+1]=Q;i[x]=e;i[x+1]=0;x+=2;U[x]=Q;U[x+1]=q+1;i[x]=r;i[x+1]=0;x+=2;L+=Math.min(e,r)}if(L>g)continue;
|
|
var u=N.aS.SS(d,x,q,q+1,U,i,g);if(u.nY<g){g=u.nY;var f=W.slice(0);N.JA.a8t(f,x,U,u.Sc,E,q);A=f}}if(g*1>=M){break}M=g;
|
|
W=A;if((b&3)==0){if(g*1.03>=w)break;w=g}if((b&3)==0){var l=0*top.length;for(var Q=0;Q<top.length&&top.length>l;
|
|
Q++){if(W.indexOf(Q)!=-1)continue;top.splice(Q,1);for(var V=0;V<W.length;V++)if(W[V]>Q)W[V]--;Q--}}}return W};
|
|
N.JA.a8t=function(W,h,S,k,p,I){for(var Q=0;Q<k.length;Q++){var q=k[Q]<<1,P=0,t=0;if(q<h){P=S[q];t=S[q+1]}else{t=S[q];
|
|
P=S[q+1]}if(P==I&&W[t]!=p)W[t]=p}};N.JA.xx=function(top,W,h,S,k,p,I,q,P){for(var Q=0;Q<h.length;Q++){var t=h[Q],M=!0;
|
|
if(q!=null&&!(N.JA.nR(q+t.x,P+t.y,p,I)&&S[p*(P+t.y)+q+t.x]==-1))continue;if(t.JM==-1)t.JM=N.JA.an4(t,S,k,p,I);
|
|
if(t.JM<=0)continue;for(var U=0;U<top.length;U++){var i=top[U],z=t.x-i.x,D=t.y-i.y;if(z*z+D*D<W){M=!1;
|
|
break}}if(M)return t}return null};N.JA.an4=function(W,h,S,k,p){var I=0;for(var Q=0;Q<S.length;Q+=2){var q=S[Q]+W.x,P=S[Q+1]+W.y;
|
|
if(N.JA.nR(q,P,k,p)&&h[k*P+q]==-1)I++}return I/(S.length>>1)};N.JA.a1K=function(W,h,S,k,p,I){var top=[];
|
|
for(var Q=0;Q<60;Q++){var q=N.JA.xx(top,25,S,k,p,W,h);if(q==null)break;else top.push(q)}if(top.length==0)return null;
|
|
var P=[];for(var Q=0;Q<I;Q++){var t=p[Q*2],M=p[Q*2+1],U=-1,i=0;while(!0){i++;var z=Math.random();U=Math.floor(z*.99999*top.length);
|
|
var D=top[U],R=t+D.x,O=M+D.y;if(N.JA.nR(R,O,W,h)&&k[O*W+R]==-1)break;if(i>100){var q;q=N.JA.xx(top,0,S,k,p,W,h,t,M);
|
|
if(q==null)return null;top.push(q);i=0}}P.push(U)}return{top:top,Ha:P}};N.JA.Ba=function(W,h,S,k,p,I,q,P){if(W==S&&h==k)return 0;
|
|
if(W<0||h<0||W>=p||h>=I||S<0||k<0||S>=p||k>=I||P[h*p+W]!=-1||P[k*p+S]!=-1)return 1e7;var t=h*p+W<<2,M=k*p+S<<2,U=q[t]-q[M],i=q[t+1]-q[M+1],z=q[t+2]-q[M+2];
|
|
return 1+(U*U+i*i+z*z)};N.JA.nR=function(W,h,S,k){return W>=0&&W<S&&h>=0&&h<k};N.JA.alI=function(W,h,S,k){var p=24*W,I=h[p],q=h[p+1],P=k*k,t=0,z=1e9;
|
|
while(S[t]!=99)if(h[p+S[t]]<S[t+1])t=S[t+2];else t=S[t+3];var M=S[t+1],U=S[t+2],i=-1;for(var Q=M;Q<=U;
|
|
Q++){var t=Q,D=t*24,R=h[D],O=h[D+1];if((R-I)*(R-I)+(O-q)*(O-q)<P)continue;var b=N.JA.getError(D,p,h,z);
|
|
if(b<z){z=b;i=t}}return i};N.JA.getError=function(W,h,S,k){var p=0;for(var I=4;I<24;I+=4){var q=S[h+I]-S[W+I],P=S[h+I+1]-S[W+I+1],t=S[h+I+2]-S[W+I+2],M=S[h+I+3]-S[W+I+3];
|
|
p+=q*q+P*P+t*t+M*M;if(p>=k)return p+1}return p};N.JA.wR=function(W,h,S,k,p){var I=16,z=0;if(h-W<=I){S.push(99,W,h);
|
|
return}N.JA.TA(W,h,k,p);var q=-1,P=-1;for(var Q=4;Q<24;Q++){var t=p[2*Q+1]-p[2*Q];if(t>P){P=t;q=Q}}var M=W+h>>1,U=N.JA.asN(M,W,h,k,q),i=-1;
|
|
for(var Q=W;Q<=h;Q++)if(k[24*Q+q]==U){if(i==-1)i=Q;z=Q}if(W+8<i&&i-W>h-z)M=i;else if(z+1<h-8)M=z+1;else if(h-W<64){S.push(99,W,h);
|
|
return}else M=M;var D=S.length;S.push(q,U,0,0);S[D+2]=D+4;N.JA.wR(W,M-1,S,k,p);S[D+3]=S.length;N.JA.wR(M,h,S,k,p)};
|
|
N.JA.TA=function(W,h,S,k){for(var Q=0;Q<48;Q+=4){k[Q]=3e4;k[Q+1]=-3e4;k[Q+2]=3e4;k[Q+3]=-3e4}for(var Q=W;
|
|
Q<=h;Q++){var p=Q*24;for(var I=0;I<24;I++){var q=S[p+I],P=k[I<<1],t=k[(I<<1)+1];if(q<P)k[I<<1]=q;if(q>t)k[(I<<1)+1]=q}}};
|
|
N.JA.$y=function(W,h,S){var k=0,Q=0;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;
|
|
Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;
|
|
Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;
|
|
Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;
|
|
Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;
|
|
Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;
|
|
Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;
|
|
Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;
|
|
Q++;k=S[W+Q];S[W+Q]=S[h+Q];S[h+Q]=k;Q++};N.JA.$T=function(W,h,S,k){var p=S+k>>>1,I=W[24*p+h];while(S<=k){while(W[24*S+h]<I)S++;
|
|
while(W[24*k+h]>I)k--;if(S<=k){if(W[24*S+h]!=W[24*k+h])N.JA.$y(S*24,k*24,W);S++;k--}}return S};N.JA.asN=function(W,h,S,k,p){var I=0;
|
|
while(h!=S){I=N.JA.$T(k,p,h,S);if(W<I)S=I-1;else h=I}return k[W*24+p]};N.JA.WQ=function(W,h,S,k){for(var Q=0;
|
|
Q<k;Q++)h[S+Q]=W[Q]};N.JA.agC=function(W,h,S,k,p,I,q,P,t){var M=(k-3)*p+(S-3),U=M<<2;for(var i=0;i<8;
|
|
i++){if(h[M]+h[M+1]+h[M+2]+h[M+3]+h[M+4]+h[M+5]+h[M+6]+h[M+7]!=0||W[U+3]<200||W[U+7]<200||W[U+11]<200||W[U+15]<200||W[U+19]<200||W[U+23]<200||W[U+27]<200||W[U+31]<200)return 1;
|
|
var Q=i<<3;q[Q+0]=W[U+0];P[Q+0]=W[U+1];t[Q+0]=W[U+2];q[Q+1]=W[U+4];P[Q+1]=W[U+5];t[Q+1]=W[U+6];q[Q+2]=W[U+8];
|
|
P[Q+2]=W[U+9];t[Q+2]=W[U+10];q[Q+3]=W[U+12];P[Q+3]=W[U+13];t[Q+3]=W[U+14];q[Q+4]=W[U+16];P[Q+4]=W[U+17];
|
|
t[Q+4]=W[U+18];q[Q+5]=W[U+20];P[Q+5]=W[U+21];t[Q+5]=W[U+22];q[Q+6]=W[U+24];P[Q+6]=W[U+25];t[Q+6]=W[U+26];
|
|
q[Q+7]=W[U+28];P[Q+7]=W[U+29];t[Q+7]=W[U+30];U+=p<<2;M+=p}return 0};N.JA.LL=function(W,h){h[0]=W[32]+W[0];
|
|
h[1]=W[33]+W[1];h[2]=W[34]+W[2];h[3]=W[35]+W[3];h[4]=W[36]+W[4];h[5]=W[37]+W[5];h[6]=W[38]+W[6];h[7]=W[39]+W[7];
|
|
h[8]=W[40]+W[8];h[9]=W[41]+W[9];h[10]=W[42]+W[10];h[11]=W[43]+W[11];h[12]=W[44]+W[12];h[13]=W[45]+W[13];
|
|
h[14]=W[46]+W[14];h[15]=W[47]+W[15];h[16]=W[48]+W[16];h[17]=W[49]+W[17];h[18]=W[50]+W[18];h[19]=W[51]+W[19];
|
|
h[20]=W[52]+W[20];h[21]=W[53]+W[21];h[22]=W[54]+W[22];h[23]=W[55]+W[23];h[24]=W[56]+W[24];h[25]=W[57]+W[25];
|
|
h[26]=W[58]+W[26];h[27]=W[59]+W[27];h[28]=W[60]+W[28];h[29]=W[61]+W[29];h[30]=W[62]+W[30];h[31]=W[63]+W[31];
|
|
h[32]=W[0]-W[32];h[33]=W[1]-W[33];h[34]=W[2]-W[34];h[35]=W[3]-W[35];h[36]=W[4]-W[36];h[37]=W[5]-W[37];
|
|
h[38]=W[6]-W[38];h[39]=W[7]-W[39];h[40]=W[8]-W[40];h[41]=W[9]-W[41];h[42]=W[10]-W[42];h[43]=W[11]-W[43];
|
|
h[44]=W[12]-W[44];h[45]=W[13]-W[45];h[46]=W[14]-W[46];h[47]=W[15]-W[47];h[48]=W[16]-W[48];h[49]=W[17]-W[49];
|
|
h[50]=W[18]-W[50];h[51]=W[19]-W[51];h[52]=W[20]-W[52];h[53]=W[21]-W[53];h[54]=W[22]-W[54];h[55]=W[23]-W[55];
|
|
h[56]=W[24]-W[56];h[57]=W[25]-W[57];h[58]=W[26]-W[58];h[59]=W[27]-W[59];h[60]=W[28]-W[60];h[61]=W[29]-W[61];
|
|
h[62]=W[30]-W[62];h[63]=W[31]-W[63];W[0]=h[16]+h[0];W[1]=h[17]+h[1];W[2]=h[18]+h[2];W[3]=h[19]+h[3];
|
|
W[4]=h[20]+h[4];W[5]=h[21]+h[5];W[6]=h[22]+h[6];W[7]=h[23]+h[7];W[8]=h[24]+h[8];W[9]=h[25]+h[9];W[10]=h[26]+h[10];
|
|
W[11]=h[27]+h[11];W[12]=h[28]+h[12];W[13]=h[29]+h[13];W[14]=h[30]+h[14];W[15]=h[31]+h[15];W[16]=h[0]-h[16];
|
|
W[17]=h[1]-h[17];W[18]=h[2]-h[18];W[19]=h[3]-h[19];W[20]=h[4]-h[20];W[21]=h[5]-h[21];W[22]=h[6]-h[22];
|
|
W[23]=h[7]-h[23];W[24]=h[8]-h[24];W[25]=h[9]-h[25];W[26]=h[10]-h[26];W[27]=h[11]-h[27];W[28]=h[12]-h[28];
|
|
W[29]=h[13]-h[29];W[30]=h[14]-h[30];W[31]=h[15]-h[31];h[0]=W[8]+W[0];h[1]=W[9]+W[1];h[2]=W[10]+W[2];
|
|
h[3]=W[11]+W[3];h[4]=W[12]+W[4];h[5]=W[13]+W[5];h[6]=W[14]+W[6];h[7]=W[15]+W[7];h[8]=W[0]-W[8];h[9]=W[1]-W[9];
|
|
h[10]=W[2]-W[10];h[11]=W[3]-W[11];h[12]=W[4]-W[12];h[13]=W[5]-W[13];h[14]=W[6]-W[14];h[15]=W[7]-W[15];
|
|
W[0]=h[4]+h[0];W[1]=h[5]+h[1];W[2]=h[6]+h[2];W[3]=h[7]+h[3];W[4]=h[0]-h[4];W[5]=h[1]-h[5];W[6]=h[2]-h[6];
|
|
W[7]=h[3]-h[7];W[8]=h[12]+h[8];W[9]=h[13]+h[9];W[10]=h[14]+h[10];W[11]=h[15]+h[11];W[12]=h[8]-h[12];
|
|
W[13]=h[9]-h[13];W[14]=h[10]-h[14];W[15]=h[11]-h[15];h[0]=W[2]+W[0];h[1]=W[3]+W[1];h[2]=W[0]-W[2];h[3]=W[1]-W[3];
|
|
h[4]=W[6]+W[4];h[5]=W[7]+W[5];h[6]=W[4]-W[6];h[7]=W[5]-W[7];h[8]=W[10]+W[8];h[9]=W[11]+W[9];h[10]=W[8]-W[10];
|
|
h[11]=W[9]-W[11];h[12]=W[14]+W[12];h[13]=W[15]+W[13];h[14]=W[12]-W[14];h[15]=W[13]-W[15];W[0]=h[1]+h[0];
|
|
W[1]=h[0]-h[1];W[2]=h[3]+h[2];W[3]=h[2]-h[3];W[4]=h[5]+h[4];W[5]=h[4]-h[5];W[6]=h[7]+h[6];W[7]=h[6]-h[7];
|
|
W[8]=h[9]+h[8];W[9]=h[8]-h[9];W[10]=h[11]+h[10];W[11]=h[10]-h[11];W[12]=h[13]+h[12];W[13]=h[12]-h[13];
|
|
W[14]=h[15]+h[14];W[15]=h[14]-h[15]};N.JA.a91=function(){var W="",g8=64,h="v",S="t",k="a",p=5,Q,I,q;
|
|
for(Q=g8>>1;Q>0;Q>>=1,p--){for(I=0;I<g8;I++){q=(I>>p&1)!=0;if(q){W+=S+"["+I+"] = "+h+"["+(-Q+I)+"] - "+h+"["+I+"]; "}else{W+=S+"["+I+"] = "+h+"["+(Q+I)+"] + "+h+"["+I+"]; "}}k=h;
|
|
h=S;S=k;W+="\n"}console.log(W)};N.JA.at5=function(g8,W,h){var S=W,k=h,p=S,I=0,Q,P,t;while(g8>>I!=2)I++;
|
|
var q=I;for(Q=g8>>1;Q>0;Q>>=1,I--){for(P=0;P<g8;P++){t=(P>>I&1)!=0;if(t)k[P]=S[-Q+P]-S[P];else k[P]=S[Q+P]+S[P]}p=S;
|
|
S=k;k=p}if((q&1)==1)for(Q=0;Q<g8;Q++)h[Q]=S[Q]};N.C2={};N.C2.hY=function(W,h,S,k,p,I,q,P,t){var M=Date.now(),U=new Uint32Array(W.buffer),i=new Uint32Array(h.buffer),z=q/S,D=P/k,R=1/z,O=1/D,b=new Float64Array(2),w=3,A=1/w,g=1/(w*w),E=0,j=0,x=S,d=k;
|
|
if(p){E=p.x;j=p.y;x=p.e;d=p.Z}for(var L=0;L<d;L++)for(var _=0;_<x;_++){var T=E+_,c=j+L,Q=c*S+T,e=Q<<1,r=Q<<2;
|
|
N.C2.a3t(I,q,P,(T+.5)*z,(c+.5)*D,b);var B=b[0]*R,F=b[1]*O;if(B==0&&F==0)i[Q]=U[Q];else{N.V.qo(T+B+.5,c+F+.5,U,S,k,i,Q,t)}}};
|
|
N.C2.a3t=function(W,h,S,k,p,I){k-=.499999;p-=.499999;var q=~~k,P=~~p,t=k-q,M=p-P,U=(1-M)*(1-t),i=(1-M)*t,z=M*(1-t),D=M*t,R=q<h-1?q+1:q,O=P<S-1?P+1:P,b=P*h+q<<1,w=P*h+R<<1,A=O*h+q<<1,g=O*h+R<<1;
|
|
I[0]=U*W[b]+i*W[w]+z*W[A]+D*W[g];I[1]=U*W[b+1]+i*W[w+1]+z*W[A+1]+D*W[g+1]};N.C2.ap7=function(W,h,S,k,p){var I=1/W,q=[-1,1,-W,W],P=k.length;
|
|
for(var t=0;t<P;t++){var Q=k[t],M=Q<<1,U=t<<1,i=~~(Q*I),z=Q-W*i,D=S[M],R=S[M+1],O=0,b=0;if(z!=0&&z!=W-1){var w=Q-1<<1,A=Q+1<<1,g=S[w],E=S[A],j=S[w+1],x=S[A+1],d=D-(g+E)*.5,L=R-(j+x)*.5;
|
|
O-=d*p;b-=L*p}if(i!=0&&i!=h-1){var w=Q-W<<1,A=Q+W<<1,g=S[w],E=S[A],j=S[w+1],x=S[A+1],d=D-(g+E)*.5,L=R-(j+x)*.5;
|
|
O-=d*p;b-=L*p}S[M]=D+O;S[M+1]=R+b}};N.C2.a3g=function(W,h){var S=W+","+h;if(N.C2.eK==S)return N.C2.n0;
|
|
var k=N.C2.n0=[];N.C2.eK=S;for(var Q=0;Q<=1e3;Q++){var p=Q*.001,I=Math.sqrt(p),q=Math.exp(-4*I),P=.96*(1-I*I),t=h*((1-W)*q+W*P);
|
|
k[Q]=t}return k};N.C2.eK="";N.C2.n0=[];N.C2.akx=function(W,h,S,k,p,I,q,P,t,M,U,i,z){var D=Math.max(0,Math.floor(p-q-1)),R=Math.min(h,Math.ceil(p+q+1)),O=Math.max(0,Math.floor(I-q-1)),b=Math.min(S,Math.ceil(I+q+1)),w=2*h,A=q*q,g=1/q,E=0;
|
|
if(z&&(k==3||k==6))t=-t;var j=N.C2.a3g(P,t);for(var x=O;x<b;x++)for(var d=D;d<R;d++){var Q=x*h+d,L=Q<<1,_=(p-d)*g,T=(I-x)*g,c=_*_+T*T;
|
|
if(c<1){i[E]=Q;var e=j[~~(c*1e3)];if(k==1){W[L]=W[L]*(1-e*.05);W[L+1]=W[L+1]*(1-e*.05)}else{var r=0,B=0,X,V,H,o;
|
|
if(k==0){r=M*e;B=U*e}else if(k==2){}else if(k==3){r=e*T;B=-e*_}else if(k==4){r=e*_;B=e*T}else if(k==5){r=-e*_;
|
|
B=-e*T}else if(k==6){r=U*e;B=-M*e}var F=W[L],v=W[L+1];if(d==0||d!=h-1&&r<0){X=1+W[L+2]-F;H=W[L+3]-v}else{X=F-W[L-2]+1;
|
|
H=v-W[L-1]}if(x==0||x!=S-1&&B<0){V=W[L+w]-F;o=1+W[L+w+1]-v}else{V=F-W[L-w];o=v-W[L-w+1]+1}W[L]=-(X*r+V*B-F);
|
|
W[L+1]=-(H*r+o*B-v)}E++}}};N.C2.alA=function(W){var h=W[0],S=W[0],k=W[1],p=W[1];for(var Q=0;Q<W.length;
|
|
Q+=2){var I=W[Q],q=W[Q+1];if(I<h)h=I;else if(I>S)S=I;if(q<k)k=q;else if(q>p)p=q}return[h,k,S,p]};N.a0U=function(W,h,S,k,p){function I(Z,aQ,jC,eO){return Math.sqrt((Z-jC)*(Z-jC)+(aQ-eO)*(aQ-eO))}function q(Z,aQ){return Z>=0&&Z<h&&aQ>=0&&aQ<S}function P(Z){if(Z<0)return 0;
|
|
if(Z>=h)return h-1;return Z}function t(Z){if(Z<0)return 0;if(Z>=S)return S-1;return Z}function M(Q,Z){var aQ=Z[3]*(1/255),jC=k[Q]+Z[0]*aQ;
|
|
if(jC>255)jC=255;k[Q]=jC;jC=k[Q+1]+Z[1]*aQ;if(jC>255)jC=255;k[Q+1]=jC;jC=k[Q+2]+Z[2]*aQ;if(jC>255)jC=255;
|
|
k[Q+2]=jC}function U(Z,aQ,jC){if(!J(Z,aQ))return;if(jC[3]<0)jC[3]=0;M((aQ*h+Z)*4,jC)}function i(Z){var aQ=Z.slice(0,3);
|
|
aQ[3]=0;return aQ}var z=h/800;function D(Z){return Math.round(Z*z)}function R(){for(var Q=0;Q<=300;Q++){Y[Q]=O(Q)}}function O(S){var Z=.8,aQ=.2,jC=Z*aQ,eO=S/60%2-1,iU=jC*(1-eO*eO),gK=aQ-jC,iM;
|
|
if(S<60){iM=[jC+gK,iU,0]}else if(S<120){iM=[iU,jC,0]}else if(S<180){iM=[0,jC,iU]}else if(S<240){iM=[0,iU,jC]}else if(S<300){iM=[iU,0,jC]}else{iM=[jC,0,iU]}return[(iM[0]+gK)*255,(iM[1]+gK)*255,(iM[2]+gK)*255]}function b(S){return Y[~~S]}function w(Z){return 1-A(Z)}function A(Z){return Z-~~Z}function g(Z,aQ,jC,eO){H(Z,aQ,jC,0,aQ+1,1,eO)}function E(Z,aQ,jC,eO,iU,gK){H(Z,aQ,jC,0,eO,1,iU,gK)}function j(Z){for(var Q=0;
|
|
Q<k.length;Q+=4){M(Q,Z)}}function x(Z,aQ,jC,eO,iU,gK,iM,i5){d(Z,aQ,jC,eO,iU,1,gK,iM,i5)}function d(Z,aQ,jC,eO,iU,gK,iM,i5,fN){if(gK==null)gK=.5;
|
|
if(iM==null)iM=0;if(i5==null)i5=0;if(fN==null)fN=!1;var dx=Z.x,ai=Z.y,hO=jC.slice(0),ff=~~(jC[3]*u);
|
|
eO=eO*u;if(!fN){aQ=o(aQ);iU=o(iU);iM=o(iM);i5=o(i5)}var eP=P(dx-aQ),a0=P(dx+aQ);for(var bM=eP;bM<=a0;
|
|
bM++){var cV=bM-dx,aX=Math.floor(Math.sqrt(aQ*aQ-cV*cV)),j8=t(ai-aX),j3=t(ai);for(var am=j8;am<=j3;am++){var fz=I(bM,am,dx,ai);
|
|
if(fz>aQ||fz<=aQ-iU)break;var c6=(fz-aQ+iU)/iU;hO[3]=ff-eO*(gK==1?c6:Math.pow(c6,gK));M((am*h+bM)*4,hO)}j8=t(ai+aX);
|
|
for(var am=j8;am>j3;am--){var fz=I(bM,am,dx,ai);if(fz>aQ||fz<=aQ-iU)break;var c6=(fz-aQ+iU)/iU;hO[3]=ff-eO*(gK==1?c6:Math.pow(c6,gK));
|
|
M((am*h+bM)*4,hO)}}if(iM>0){H(Z,aQ+iM,hO,hO[3],iM,1,0,0,!0)}if(i5>0){H(Z,aQ-iU,C(jC),-jC[3],i5,1,0,0,!0)}}function L(Z,aQ,jC,eO,iU,gK){H(Z,aQ,jC,jC[3],aQ+1,1,eO,iU,gK)}function _(Z,aQ,jC,eO,iU){if(iU==null)iU=!1;
|
|
var gK=Z.x,iM=Z.y;eO*=u;if(!iU){aQ=o(aQ);jC=o(jC)}var i5=P(gK-aQ),fN=P(gK+aQ);for(var dx=i5;dx<fN;dx++){var ai=dx-gK,hO=~~Math.sqrt(aQ*aQ-ai*ai),ff=t(iM-hO),eP=t(iM);
|
|
for(var a0=ff;a0<=eP;a0++){var bM=I(dx,a0,gK,iM);if(bM>aQ||bM<=aQ-jC)break;var cV=(aQ-bM)/jC,aX=b(300*cV);
|
|
aX[3]=eO;M((a0*h+dx)*4,aX)}ff=t(iM+hO);for(var a0=ff;a0>eP;a0--){var bM=I(dx,a0,gK,iM);if(bM>aQ||bM<=aQ-jC)break;
|
|
var cV=(aQ-bM)/jC,aX=b(300*cV);aX[3]=eO;M((a0*h+dx)*4,aX)}}}function T(K,Z){var aQ=K.mZ,jC=K.rS,eO=Z.slice(0),iU=Z[3]*u,gK=Math.abs(jC.y-aQ.y)>Math.abs(jC.x-aQ.x);
|
|
if(gK){var iM=aQ.x;aQ.x=aQ.y;aQ.y=iM;iM=jC.x;jC.x=jC.y;jC.y=iM}if(aQ.x>jC.x){var iM=aQ;aQ=jC;jC=iM}var i5=jC.x-aQ.x,fN=jC.y-aQ.y,dx=i5==0?1:fN/i5,ai=Math.round(aQ.x),hO=aQ.y+dx*(ai-aQ.x),ff=w(aQ.x+.5),eP=ai,a0=~~hO;
|
|
if(gK){eO[3]=iU*w(hO)*ff;U(a0,eP,eO);eO[3]=iU*A(hO)*ff;U(a0+1,eP,eO)}else{eO[3]=iU*w(hO)*ff;U(eP,a0,eO);
|
|
eO[3]=iU*A(hO)*ff;U(eP,a0+1,eO)}var bM=hO-dx;ai=Math.round(jC.x);hO=jC.y+dx*(ai-jC.x);ff=A(jC.x+.5);
|
|
var cV=ai,aX=~~hO;if(gK){eO[3]=iU*w(hO)*ff;U(aX,cV,eO);eO[3]=iU*A(hO)*ff;U(aX+1,cV,eO)}else{eO[3]=iU*w(hO)*ff;
|
|
U(cV,aX,eO);eO[3]=iU*A(hO)*ff;U(cV,aX+1,eO)}if(gK){for(var j8=eP+1;j8<=cV-1;j8++){eO[3]=iU*w(bM);U(~~bM,j8,eO);
|
|
eO[3]=iU*A(bM);U(~~bM+1,j8,eO);bM+=dx}}else{for(var j8=eP+1;j8<=cV-1;j8++){eO[3]=iU*w(bM);U(j8,~~bM,eO);
|
|
eO[3]=iU*A(bM);U(j8,~~bM+1,eO);bM+=dx}}}function c(Z,aQ,jC,eO){for(var Q=0;Q<4;Q++){var iU=Z.DI(aQ+1.3*Q,jC);
|
|
T(iU,eO,1)}}function eC(Z,aQ){this.x=Math.round(Z);this.y=Math.round(aQ)}var e=Math.PI/180;eC.prototype.DI=function(Z,aQ){Z=Z*e;
|
|
var jC=this.x+aQ*Math.cos(Z),eO=this.y+aQ*Math.sin(Z);return new r(this.x,this.y,jC,eO)};eC.prototype.a6x=function(Z,aQ){Z=Z*e;
|
|
var jC=this.a4+aQ*Math.cos(Z),eO=this.acg+aQ*Math.sin(Z);return new eC(jC,eO)};function r(Z,aQ,jC,eO){this.mZ=new eC(Z,aQ);
|
|
this.rS=new eC(jC,eO)}r.prototype.rt=function(Z){var aQ=Z*this.mZ.x+(1-Z)*this.rS.x,jC=Z*this.mZ.y+(1-Z)*this.rS.y;
|
|
return new eC(aQ,jC)};var B=x,F=L,v=g,X=E,V=_,H=d,o=D,J=q,C=i,Y=[];R();for(var Q=0;Q<W.length;Q++){k[Q]=W[Q]}var K=new r(h*p[2],S*p[3],h/2,S/2),u=p[1],f=[];
|
|
f[0]=function l(){var Z=[80,40,15,60],jC=0,eO=0;v(K.rt(1.4),260,Z,10);v(K.rt(1),100,[240,50,50,30],30);
|
|
F(K.rt(1),60,[255,40,0,40]);var aQ=[255,255,255,255];H(K.rt(1),70,aQ,aQ[3],58,.5);v(K.rt(1),12,aQ);aQ[3]=40;
|
|
B(K.rt(1),150,aQ,aQ[3],150);for(var Q=0;Q<40;Q++){jC+=Math.random()*25;eO=Math.random()*o(300)+o(100);
|
|
var iU=K.rt(1).DI(jC,eO);T(K.rt(1).DI(jC,eO),[110,110,110,30])}F(K.rt(1),130,[255,255,255,8]);var gK=[170,30,23,70];
|
|
X(K.rt(1),70,gK,1,3,3);var iM=[60,60,130,40];v(K.rt(.47),44,iM,5);v(K.rt(.43),22,iM,3);iM[3]=16;v(K.rt(.53),15,iM,2);
|
|
var i5=[138,94,42,100];v(K.rt(.2),16,i5,2);var fN=[130,255,170,180];F(K.rt(0),4,fN);F(K.rt(-.25),5,fN);
|
|
i5=[150,90,0,50];B(K.rt(-.45),55,C(i5),-i5[3],40,2);v(K.rt(-.42),35,i5,2);v(K.rt(-.5),15,i5,2);V(K.rt(-1.28),145,11,70);
|
|
var dx=b(0);dx[3]=50;B(K.rt(-1.28),149,dx,dx[3],4);dx=b(300);dx[3]=50;B(K.rt(-1.28),155-1,C(dx),-dx[3],3);
|
|
var ai=[130,130,10,50];X(K.rt(-1),73,ai,3,2);var hO=[40,130,70,40];B(K.rt(-1),70,C(hO),-hO[3],35);hO=[40,170,60,50];
|
|
v(K.rt(-.7),25,hO,4);var hO=[70,110,50,60];B(K.rt(1.3),30,C(hO),-hO[3],11,3);iM=[0,50,210,80];F(K.rt(-.72),20,iM)};
|
|
f[1]=function jk(){F(K.rt(1),150,[240,70,70,60]);v(K.rt(1),100,[200,60,60,40],30);var Z=[255,255,255,255],aQ=0,jC=0;
|
|
H(K.rt(1),75,Z,Z[3],63);v(K.rt(1),12,Z);F(K.rt(1),270,[200,200,200,20],10);for(var Q=0;Q<10;Q++){aQ+=10+Math.random()*40;
|
|
jC=Math.random()*o(250)+o(80);var eO=K.rt(1).DI(aQ,jC);T(eO,[110,110,110,35])}aQ=5;jC=100;for(var Q=0;
|
|
Q<12;Q++){aQ+=30;c(K.rt(1),aQ,jC,[90,90,90,40])}var iU=[150,40,23,100];X(K.rt(1),70,iU,1,3,3);var gK=[30,100,60,40];
|
|
F(K.rt(-.9),180,[255,255,255,20]);v(K.rt(-.9),140,gK,15);var iM=[170,80,25,15];X(K.rt(-.9),120,iM,1,4,4);
|
|
var i5=[110,240,190,200];F(K.rt(-.6),3,i5);i5[3]=100;F(K.rt(-.6),7,i5);var fN=[230,120,40,85];F(K.rt(-.73),9,fN);
|
|
var dx=[60,60,190,50];v(K.rt(.3),28,dx,6);dx[3]=25;v(K.rt(.34),20,dx,3)};f[2]=function hE(){var Z=[255,255,255,255],jC=0,eO=0;
|
|
v(K.rt(1),13,Z);H(K.rt(1),150,Z,Z[3],137);var aQ=[120,80,35,20];v(K.rt(1.4),260,aQ,10);for(var Q=0;Q<40;
|
|
Q++){jC+=5+Math.random()*30;eO=Math.random()*o(300);T(K.rt(1).DI(jC,eO),[110,110,110,20])}var iU=[10,30,255,30];
|
|
v(K.rt(1),70,iU,50);var gK=[15,90,170,15];v(K.rt(1.5),60,gK);var iM=[220,220,20,50];v(K.rt(-1.15),8,iM,2);
|
|
var Z=[255,255,255,40];F(K.rt(-1.18),6,Z);F(K.rt(-1.18),4,Z);iM=[110,110,10,8];B(K.rt(-1.2),32,C(iM),-iM[3],20,3);
|
|
var i5=[5,0,16,255];for(var Q=0;Q<4;Q++){v(K.rt(-1.36),10,i5,3)}var fN=[90,200,150,20],dx=fN.slice(0);
|
|
dx[3]*=2;v(K.rt(-1.32),7,dx,3);v(K.rt(-1.36),7,dx,3);v(K.rt(-1.4),7,dx,3);var Z=[230,230,230,100];F(K.rt(-1.36),2,Z);
|
|
Z[3]=3;v(K.rt(-.55),10,Z);iM=[120,100,10,18];v(K.rt(-.55),160,iM,8);v(K.rt(-.55),80,iM,4);fN[3]=3;dx[3]=6;
|
|
B(K.rt(-.49),13,C(dx),-dx[3],13,2);B(K.rt(-.55),13,C(dx),-dx[3],13,2);fN[3]=20;v(K.rt(.15),25,fN,3);
|
|
iM[3]=100;F(K.rt(-.52),3,iM);iM=[200,200,50,40];v(K.rt(.27),1,iM,4);var ai=[150,40,23,30];B(K.rt(1),80,C(ai),-ai[3],2,1)};
|
|
return f[p[0]]()};N.tf={};N.tf.Vg=function(W){var h=W.length,g8=W[0].length,S=new Array(g8);for(var Q=0;
|
|
Q<g8;Q++)S[Q]=new Array(h);for(var Q=0;Q<g8;Q++)for(var k=0;k<h;k++)S[Q][k]=W[k][Q];return S};N.tf.Xy=function(W,h){var S=W.length,g8=W[0].length,k=new Array(S);
|
|
for(var Q=0;Q<S;Q++)k[Q]=new Array(g8);for(var Q=0;Q<S;Q++)for(var p=0;p<g8;p++)k[Q][p]=W[Q][p]-h[Q][p];
|
|
return k};N.tf.add=function(W,h){var S=W.length,g8=W[0].length,k=new Array(S);for(var Q=0;Q<S;Q++)k[Q]=new Array(g8);
|
|
for(var Q=0;Q<S;Q++)for(var p=0;p<g8;p++)k[Q][p]=W[Q][p]+h[Q][p];return k};N.tf.multiply=function(W,h){var S=W.length,k=W[0].length,g8=h[0].length;
|
|
if(k!=h.length)throw"e";var p=new Array(S);for(var Q=0;Q<S;Q++)p[Q]=new Array(g8);if((k&1)!=0)for(var Q=0;
|
|
Q<S;Q++){var I=W[Q],q=p[Q];for(var P=0;P<g8;P++){var t=0;for(var M=0;M<k;M++)t+=I[M]*h[M][P];q[P]=t}}else for(var Q=0;
|
|
Q<S;Q++){var I=W[Q],q=p[Q];for(var P=0;P<g8;P++){var t=0;for(var M=0;M<k;M+=2)t+=I[M]*h[M][P]+I[M+1]*h[M+1][P];
|
|
q[P]=t}}return p};N.tf.ZQ=function(W,h){var S=W.length,g8=W[0].length,k=new Array(S);for(var Q=0;Q<S;
|
|
Q++){var p=0;for(var I=0;I<g8;I++)p+=W[Q][I]*h[I];k[Q]=p}return k};N.tf.FD=function(W,h){var S=[];for(var Q=0;
|
|
Q<W;Q++){S.push([]);for(var k=0;k<h;k++)S[Q].push(0)}return S};N.tf.a92=function(W){for(var Q=0;Q<W.length;
|
|
Q++)console.log(JSON.stringify(W[Q]))};N.tf.a1N=function(W){var h=[];for(var Q=0;Q<W.length;Q++)h.push(W[Q].join(","));
|
|
return"["+h.join(";")+"]"};N.tf.SS=function(W,h){var S=W.length;for(var k=0;k<S;k++){var p=0,I=Number.NEGATIVE_INFINITY;
|
|
for(var Q=k;Q<S;Q++)if(Math.abs(W[Q][k])>I){p=Q;I=Math.abs(W[Q][k])}N.tf.a1b(W,k,p);for(var Q=k+1;Q<S;
|
|
Q++){if(W[k][k]==0)return 1;var q=W[Q][k]/W[k][k];for(var P=k;P<S+1;P++)W[Q][P]-=W[k][P]*q}}for(var Q=S-1;
|
|
Q>=0;Q--){if(W[Q][Q]==0)return 1;var t=W[Q][S]/W[Q][Q];h[Q]=t;for(var P=Q-1;P>=0;P--){W[P][S]-=W[P][Q]*t;
|
|
W[P][Q]=0}}return 0};N.tf.a1b=function(W,h,S){var k=W[h];W[h]=W[S];W[S]=k};N.tf.au1=function(W){var h=W.length,S=N.tf.FD(h,h);
|
|
for(var Q=0;Q<h;Q++)S[Q][Q]=W[Q];return S};N.tf.a9p=function(W){var h=W.length,S=W[0].length,k=new Array(h);
|
|
for(var Q=0;Q<h;Q++){k[Q]=0;for(var p=0;p<S;p++)k[Q]+=W[Q][p];k[Q]/=S}return k};N.tf.th=function(W){var h=0;
|
|
for(var Q=0;Q<W.length;Q++)h+=W[Q]*W[Q];return Math.sqrt(h)};N.iD={};N.iD.UB=function(W){var h=~~(W+.5);
|
|
return h<0?0:h>255?255:h};N.iD.transform=function(W,h,S){var k=N.iD.UB,p=W.p.length;for(var Q=0;Q<p;
|
|
Q++){var I=W.p[Q],q=W.z[Q],P=W.S[Q];h.p[Q]=k(S[0]*I+S[1]*q+S[2]*P+S[3]*255);h.z[Q]=k(S[4]*I+S[5]*q+S[6]*P+S[7]*255);
|
|
h.S[Q]=k(S[8]*I+S[9]*q+S[10]*P+S[11]*255)}};N.iD.E8=function(W,h,S){var k=N.iD.UB,p=W.length;for(var Q=0;
|
|
Q<p;Q+=4){var I=W[Q],q=W[Q+1],P=W[Q+2];h[Q]=k(S[0]*I+S[1]*q+S[2]*P+S[3]*255);h[Q+1]=k(S[4]*I+S[5]*q+S[6]*P+S[7]*255);
|
|
h[Q+2]=k(S[8]*I+S[9]*q+S[10]*P+S[11]*255)}};N.iD.fT=function(W){var h=W[0]+W[1]+W[2],S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
|
|
if(h==1){var k=W.indexOf(1);S[k]=S[k+4]=S[k+8]=1}else{S[0]=W[0];S[5]=W[1];S[10]=W[2]}return S};N.iD.Yc=function(W,h,S){return[1,0,0,W,0,1,0,h,0,0,1,S,0,0,0,1]};
|
|
N.iD.nb=function(W,h,S){return[W,0,0,0,0,h,0,0,0,0,S,0,0,0,0,1]};N.iD.apF=function(W){return[W[0],W[1],W[2],W[4],W[5],W[6],W[8],W[9],W[10]]};
|
|
N.iD.zK=function(W){return[W[0],W[1],W[2],0,W[3],W[4],W[5],0,W[6],W[7],W[8],0,0,0,0,1]};N.iD.$z=function(W,h){return[W[0]*h[0]+W[1]*h[1]+W[2]*h[2]+W[3]*h[3],W[4]*h[0]+W[5]*h[1]+W[6]*h[2]+W[7]*h[3],W[8]*h[0]+W[9]*h[1]+W[10]*h[2]+W[11]*h[3],W[12]*h[0]+W[13]*h[1]+W[14]*h[2]+W[15]*h[3]]};
|
|
N.iD.Vg=function(W){var h=[];h[0]=W[0];h[1]=W[4];h[2]=W[8];h[3]=W[12];h[4]=W[1];h[5]=W[5];h[6]=W[9];
|
|
h[7]=W[13];h[8]=W[2];h[9]=W[6];h[10]=W[10];h[11]=W[14];h[12]=W[3];h[13]=W[7];h[14]=W[11];h[15]=W[15];
|
|
return h};N.iD.add=function(W,h){var S=W.slice(0);for(var Q=0;Q<16;Q++)S[Q]+=h[Q];return S};N.iD.multiply=function(W,h){var S=[];
|
|
S[0]=W[0]*h[0]+W[1]*h[4]+W[2]*h[8]+W[3]*h[12];S[1]=W[0]*h[1]+W[1]*h[5]+W[2]*h[9]+W[3]*h[13];S[2]=W[0]*h[2]+W[1]*h[6]+W[2]*h[10]+W[3]*h[14];
|
|
S[3]=W[0]*h[3]+W[1]*h[7]+W[2]*h[11]+W[3]*h[15];S[4]=W[4]*h[0]+W[5]*h[4]+W[6]*h[8]+W[7]*h[12];S[5]=W[4]*h[1]+W[5]*h[5]+W[6]*h[9]+W[7]*h[13];
|
|
S[6]=W[4]*h[2]+W[5]*h[6]+W[6]*h[10]+W[7]*h[14];S[7]=W[4]*h[3]+W[5]*h[7]+W[6]*h[11]+W[7]*h[15];S[8]=W[8]*h[0]+W[9]*h[4]+W[10]*h[8]+W[11]*h[12];
|
|
S[9]=W[8]*h[1]+W[9]*h[5]+W[10]*h[9]+W[11]*h[13];S[10]=W[8]*h[2]+W[9]*h[6]+W[10]*h[10]+W[11]*h[14];S[11]=W[8]*h[3]+W[9]*h[7]+W[10]*h[11]+W[11]*h[15];
|
|
S[12]=W[12]*h[0]+W[13]*h[4]+W[14]*h[8]+W[15]*h[12];S[13]=W[12]*h[1]+W[13]*h[5]+W[14]*h[9]+W[15]*h[13];
|
|
S[14]=W[12]*h[2]+W[13]*h[6]+W[14]*h[10]+W[15]*h[14];S[15]=W[12]*h[3]+W[13]*h[7]+W[14]*h[11]+W[15]*h[15];
|
|
return S};N.iD.uA=function(W){var h=[];h[0]=W[5]*W[10]*W[15]-W[5]*W[14]*W[11]-W[6]*W[9]*W[15]+W[6]*W[13]*W[11]+W[7]*W[9]*W[14]-W[7]*W[13]*W[10];
|
|
h[1]=-W[1]*W[10]*W[15]+W[1]*W[14]*W[11]+W[2]*W[9]*W[15]-W[2]*W[13]*W[11]-W[3]*W[9]*W[14]+W[3]*W[13]*W[10];
|
|
h[2]=W[1]*W[6]*W[15]-W[1]*W[14]*W[7]-W[2]*W[5]*W[15]+W[2]*W[13]*W[7]+W[3]*W[5]*W[14]-W[3]*W[13]*W[6];
|
|
h[3]=-W[1]*W[6]*W[11]+W[1]*W[10]*W[7]+W[2]*W[5]*W[11]-W[2]*W[9]*W[7]-W[3]*W[5]*W[10]+W[3]*W[9]*W[6];
|
|
h[4]=-W[4]*W[10]*W[15]+W[4]*W[14]*W[11]+W[6]*W[8]*W[15]-W[6]*W[12]*W[11]-W[7]*W[8]*W[14]+W[7]*W[12]*W[10];
|
|
h[5]=W[0]*W[10]*W[15]-W[0]*W[14]*W[11]-W[2]*W[8]*W[15]+W[2]*W[12]*W[11]+W[3]*W[8]*W[14]-W[3]*W[12]*W[10];
|
|
h[6]=-W[0]*W[6]*W[15]+W[0]*W[14]*W[7]+W[2]*W[4]*W[15]-W[2]*W[12]*W[7]-W[3]*W[4]*W[14]+W[3]*W[12]*W[6];
|
|
h[7]=W[0]*W[6]*W[11]-W[0]*W[10]*W[7]-W[2]*W[4]*W[11]+W[2]*W[8]*W[7]+W[3]*W[4]*W[10]-W[3]*W[8]*W[6];h[8]=W[4]*W[9]*W[15]-W[4]*W[13]*W[11]-W[5]*W[8]*W[15]+W[5]*W[12]*W[11]+W[7]*W[8]*W[13]-W[7]*W[12]*W[9];
|
|
h[9]=-W[0]*W[9]*W[15]+W[0]*W[13]*W[11]+W[1]*W[8]*W[15]-W[1]*W[12]*W[11]-W[3]*W[8]*W[13]+W[3]*W[12]*W[9];
|
|
h[10]=W[0]*W[5]*W[15]-W[0]*W[13]*W[7]-W[1]*W[4]*W[15]+W[1]*W[12]*W[7]+W[3]*W[4]*W[13]-W[3]*W[12]*W[5];
|
|
h[11]=-W[0]*W[5]*W[11]+W[0]*W[9]*W[7]+W[1]*W[4]*W[11]-W[1]*W[8]*W[7]-W[3]*W[4]*W[9]+W[3]*W[8]*W[5];h[12]=-W[4]*W[9]*W[14]+W[4]*W[13]*W[10]+W[5]*W[8]*W[14]-W[5]*W[12]*W[10]-W[6]*W[8]*W[13]+W[6]*W[12]*W[9];
|
|
h[13]=W[0]*W[9]*W[14]-W[0]*W[13]*W[10]-W[1]*W[8]*W[14]+W[1]*W[12]*W[10]+W[2]*W[8]*W[13]-W[2]*W[12]*W[9];
|
|
h[14]=-W[0]*W[5]*W[14]+W[0]*W[13]*W[6]+W[1]*W[4]*W[14]-W[1]*W[12]*W[6]-W[2]*W[4]*W[13]+W[2]*W[12]*W[5];
|
|
h[15]=W[0]*W[5]*W[10]-W[0]*W[9]*W[6]-W[1]*W[4]*W[10]+W[1]*W[8]*W[6]+W[2]*W[4]*W[9]-W[2]*W[8]*W[5];var S=W[0]*h[0]+W[1]*h[4]+W[2]*h[8]+W[3]*h[12];
|
|
for(var Q=0;Q<16;Q++)h[Q]/=S;return h};N.iD.ajg=function(W){var h=[],S=W[5]*W[10]*W[15]-W[5]*W[14]*W[11]-W[6]*W[9]*W[15]+W[6]*W[13]*W[11]+W[7]*W[9]*W[14]-W[7]*W[13]*W[10],k=-W[4]*W[10]*W[15]+W[4]*W[14]*W[11]+W[6]*W[8]*W[15]-W[6]*W[12]*W[11]-W[7]*W[8]*W[14]+W[7]*W[12]*W[10],p=W[4]*W[9]*W[15]-W[4]*W[13]*W[11]-W[5]*W[8]*W[15]+W[5]*W[12]*W[11]+W[7]*W[8]*W[13]-W[7]*W[12]*W[9],I=-W[4]*W[9]*W[14]+W[4]*W[13]*W[10]+W[5]*W[8]*W[14]-W[5]*W[12]*W[10]-W[6]*W[8]*W[13]+W[6]*W[12]*W[9];
|
|
return W[0]*S+W[1]*k+W[2]*p+W[3]*I};N.iD.FI=N.iD.zK([3.1338561,-1.6168667,-.4906146,-.9787684,1.9161415,.033454,.0719453,-.2289914,1.4052427]);
|
|
N.iD.anT=N.iD.zK([1.9624274,-.6105343,-.3413404,-.9787684,1.9161415,.033454,.0286869,-.1406752,1.3487655]);
|
|
N.iD.aq$=N.iD.uA(N.iD.FI);N.aS={};N.aS.e_=new Uint32Array(1);N.aS.U9=function(W,h,S,k,p,I){var q=new Uint32Array(W),P=0,t=N.aS.e_;
|
|
if(t.length<h*4)N.aS.e_=t=new Uint32Array(h*4);var M=new Float64Array(t.buffer);for(var Q=0;Q<h;Q+=2){var U=p[Q],i=p[Q+1],z=I[Q],D=I[Q+1];
|
|
t[P]=i;M[P+2>>1]=z;t[P+1]=q[U];q[U]=P+1;P+=4;t[P]=U;M[P+2>>1]=D;t[P+1]=q[i];q[i]=P+1;P+=4}return{fd:t,alY:M,ai0:q}};
|
|
N.aS.SS=function(W,h,S,k,p,I,q){var P=1,t=N.aS.U9(W,h,S,k,p,I),M=t.fd,U=t.alY,i=t.ai0,z=new Uint32Array(W),D=new N.aS.YN(W),O=1,E=0;
|
|
D.push(S);D.push(k);var R=new N.aS.YN(W),b=new Uint8Array(W),w=new Uint32Array(W);b[S]=1;b[k]=2;var A=new Uint32Array(W),g=new Uint32Array(W);
|
|
g[S]=g[k]=0;A[S]=A[k]=1;while(!0){var j=-1,e=0,v=1e30;while(!D.sa()&&j==-1){var x=D.top(),d=b[x],L=i[x]-1;
|
|
while(L!=-1){var _=M[L],T=b[_],c=L^d-1<<2;if(U[c+2>>1]!=0){if(T==0){N.aS.QY(x,L,_,b,w,g,A);D.push(_)}else if(T==d&&A[_]<=A[x]&&g[_]>g[x])N.aS.QY(x,L,_,b,w,g,A);
|
|
else if(T!=d){j=c}}L=M[L+1]-1}if(j!=-1)break;D.pop()}if(j==-1){break}O++;var r=j;while(r!=-1){z[e]=r;
|
|
e++;r=w[M[r^4]]-1}var B=e>>1;for(var Q=0;Q<B;Q++){var F=z[Q];z[Q]=z[e-Q-1];z[e-Q-1]=F}r=w[M[j]]-1;while(r!=-1){z[e]=r^4;
|
|
e++;r=w[M[r^4]]-1}for(var Q=0;Q<e;Q++)v=Math.min(v,U[z[Q]+2>>1]);E+=v;if(E>=q)return{Sc:null,nY:E};for(var Q=0;
|
|
Q<e;Q++){var X=z[Q],V=X^4,x=M[V],_=M[X];U[X+2>>1]-=v;U[V+2>>1]+=v;if(U[X+2>>1]==0&&b[x]==b[_]){if(b[x]==1){w[_]=0;
|
|
R.push(_)}if(b[x]==2){w[x]=0;R.push(x)}}}while(!R.sa()){var x=R.pop(),d=b[x],L=i[x]-1,H=d==1?4:0,o=0,J=0,C=1e9;
|
|
while(L!=-1){var _=M[L],Y=L^4,c=L^H;if(b[_]==d&&U[c+2>>1]>0&&N.aS.af4(_,S,k,w,M,O,A,g)+1<C){o=_;J=Y;
|
|
C=g[_]+1}L=M[L+1]-1}if(J!=0){N.aS.QY(o,J,x,b,w,g,A);continue}L=i[x]-1;while(L!=-1){var _=M[L],c=L^H;
|
|
if(b[_]==d){if(U[c+2>>1]>0){D.push(_)}if(w[_]==L+1){w[_]=0;R.push(_)}}L=M[L+1]-1}b[x]=0;D.remove(x)}}var K=[];
|
|
for(var Q=0;Q<h;Q+=2){var x=p[Q],_=p[Q+1];if(b[x]==1&&b[_]!=1){K.push(Q>>1)}if(b[_]==1&&b[x]!=1){K.push(h+Q>>1)}}return{Sc:K,nY:E}};
|
|
N.aS.QY=function(W,h,S,k,p,I,q){k[S]=k[W];p[S]=h+1;I[S]=I[W]+1;q[S]=q[W]};N.aS.af4=function(W,h,S,k,p,I,q,P){var t=W,M=k[W]-1,U=0;
|
|
while(M!=-1&&q[W]!=I){W=p[M^4];M=k[W]-1;U++}if(M==-1&&W!=h&&W!=S)return 1e9;var i=P[W]+U;U=0;M=k[t]-1;
|
|
while(t!=W){P[t]=i-U;U++;q[t]=I;t=p[M^4];M=k[t]-1}return i};N.aS.a8z=function(W,h,S,k,p,I){var q=N.aS.U9(W,h,S,k,p,I),P=q.fd,t=q.alY,M=q.ai0,U=0,i=0,z=new Uint32Array(W*2),D=new N.aS.V0(W),R=0;
|
|
while(!0){D.reset();D.push(S);for(var Q=0;Q<W;Q++)z[Q<<1]=0;while(!D.sa()){var O=D.pop(),b=M[O]-1;while(b!=-1){R=P[b];
|
|
if(z[R<<1]==0&&t[b+2>>1]>0&&R!=S){z[R<<1]=O+1;z[(R<<1)+1]=b;D.push(R)}b=P[b+1]-1}if(z[k<<1]!=0){break}}if(z[k<<1]==0){break}var w=1e30;
|
|
R=k;while(!0){var A=z[R<<1]-1;if(A==-1)break;var g=z[(R<<1)+1];w=Math.min(w,t[g+2>>1]);R=A}R=k;while(!0){var A=z[R<<1]-1;
|
|
if(A==-1)break;var g=z[(R<<1)+1],E=g^4;t[g+2>>1]-=w;t[E+2>>1]+=w;R=A}U+=w}var j=[];for(var Q=0;Q<h;Q+=2){var A=p[Q],R=p[Q+1];
|
|
if((z[A<<1]!=0||A==S)&&z[R<<1]==0&&R!=S){j.push(Q>>1)}if((z[R<<1]!=0||R==S)&&z[A<<1]==0&&A!=S){j.push(h+Q>>1)}}return{Sc:j,nY:U}};
|
|
N.aS.V0=function(W){W|=W>>1;W|=W>>2;W|=W>>4;W|=W>>8;W|=W>>16;this.no=new Uint32Array(W+1);this.Od=W;
|
|
this.CM=0;this.i$=0};N.aS.V0.prototype={push:function(W){var h=this.i$;this.no[h]=W;this.i$=h+1&this.Od},pop:function(){var W=this.CM,h=this.no[W];
|
|
this.CM=W+1&this.Od;return h},sa:function(){return this.CM==this.i$},reset:function(){this.CM=0;this.i$=0}};
|
|
N.aS.YN=function(W){W|=W>>1;W|=W>>2;W|=W>>4;W|=W>>8;W|=W>>16;this.no=new Uint32Array(W+1);this.Pq=new Uint32Array(W+1);
|
|
this.Od=W;this.CM=0;this.i$=0};N.aS.YN.prototype={top:function(){return this.no[this.CM]},a7i:function(){return this.no[this.i$]},push:function(W){if(this.Pq[W]!=0)return;
|
|
this.Pq[W]=this.i$+1;var h=this.i$;this.no[h]=W;this.i$=h+1&this.Od},pop:function(){var W=this.CM,h=this.no[W];
|
|
this.Pq[h]=0;this.CM=W+1&this.Od;return h},sa:function(){return this.CM==this.i$},remove:function(W){var h=this.Pq[W]-1;
|
|
if(h==-1)return;this.Pq[W]=0;if(h==this.CM){this.pop();return}var S=this.pop();this.no[h]=S;this.Pq[S]=h+1},wJ:function(Q){return Q+this.Od+1&this.Od}};
|
|
N.aS.pW=function(W,h,S){var k=N.aS.$T(W,h,S);if(h<k-1)N.aS.pW(W,h,k-1);if(k<S)N.aS.pW(W,k,S)};N.aS.$T=function(W,h,S){var k=W[h+S>>>1];
|
|
while(h<=S){while(W[h]<k)h++;while(W[S]>k)S--;if(h<=S){N.aS.$y(W,h,S);h++;S--}}return h};N.aS.$y=function(W,h,S){var k=W[h];
|
|
W[h]=W[S];W[S]=k};N.uy={};N.uy.a2$=function(W){for(var Q=0;Q<W.length;Q++)N.uy.uP(W,Q)};N.uy.uP=function(W,Q){W[Q].v.keyShapeInvalidated={t:"bool",v:!0}};
|
|
N.uy.a0q=function(W){for(var Q=0;Q<W.length;Q++)W[Q].v.keyOriginIndex.v=Q};N.uy.$o=function(){return{t:"Objc",v:{classID:"null",keyOriginIndex:{t:"long",v:0},keyShapeInvalidated:{t:"bool",v:!0}}}};
|
|
N.uy.Gt=function(W){W=W.v;var h={Rctn:2,Ln:4,Elps:5},S=h[W.classID],k=W.topLeft?N.uy.A0(W):null,p=null,I=0,q=[!1,!1,0,0,0];
|
|
if(S==4){var P=W.Strt.v,t=W.End.v;p=[P.Hrzn.v.val,P.Vrtc.v.val,t.Hrzn.v.val,t.Vrtc.v.val];I=W.Wdth.v.val;
|
|
for(var Q=0;Q<2;Q++){var M=W[Q==0?"StrA":"EndA"];if(M==null)continue;M=M.v;q[Q]=M.On.v;q[2]=M.Wdth.v;
|
|
q[3]=M.Lngt.v;q[4]=M.Cncv.v.val}}if(S==null)return null;return N.uy.sv(S,S==4?null:N.uy.em(W),k,p,I,q)};
|
|
N.uy.PT=function(W,h,S,k,p,I,q){var P={classID:W,unitValueQuadVersion:{t:"long",v:1}};if(h)N.uy.Oh(P,["Left","Top","Rght","Btom"],h);
|
|
if(S)N.uy.Oh(P,["topLeft","topRight","bottomRight","bottomLeft"],S);if(W=="Ln"){P.Strt={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:k[0]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:k[1]}}}},P.End={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:k[2]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:k[3]}}}},P.Wdth={t:"UntF",v:{type:"#Pxl",val:p}};
|
|
for(var Q=0;Q<2;Q++){var t=Q==0?"StrA":"EndA";P[t]={t:"Objc",v:{classID:"cArw",On:{t:"bool",v:q[Q]},Wdth:{t:"doub",v:q[2]},Lngt:{t:"doub",v:q[3]},Cncv:{t:"UntF",v:{type:"#Prc",val:q[4]}}}}}}if(I)P.Nm={t:"TEXT",v:I};
|
|
return{t:"Objc",v:P}};N.uy.bM=function(W,h){var S=N.uy.EV(W),k=W[2]-W[0],p=W[3]-W[1],I=Math.sqrt(k*k+p*p),q=[0,0,I,0,I,h,0,h],P=new ex;
|
|
P.rotate(-S);P.translate(W[0],W[1]);N.H.A(q,P,q);return q};N.uy.sv=function(W,h,S,k,p,I){var q=N.uy.$o(),P=q.v,t;
|
|
delete P.keyShapeInvalidated;P.keyOriginType={t:"long",v:W};P.keyOriginResolution={t:"doub",v:75};if(W==4){P.keyOriginLineStart={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:k[0]},Vrtc:{t:"doub",v:k[1]}}};
|
|
P.keyOriginLineEnd={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:k[2]},Vrtc:{t:"doub",v:k[3]}}};t=N.uy.bM(k,p);
|
|
var M=N.H.TA(t);h=[M.x,M.y,M.x+M.e,M.y+M.Z];P.keyOriginLineWeight={t:"doub",v:p};if(I)N.uy.aeo(P,I)}else t=[h[0],h[1],h[2],h[1],h[2],h[3],h[0],h[3]];
|
|
P.keyOriginBoxCorners={t:"Objc",v:{classID:"null"}};N.uy.sj(P,"keyOriginBoxCorners",t);var U={classID:"unitRect",unitValueQuadVersion:{t:"long",v:1}};
|
|
P.keyOriginShapeBBox={t:"Objc",v:U};N.uy.tR(P,h);if(S!=null){var i={classID:"radii",unitValueQuadVersion:{t:"long",v:1}};
|
|
P.keyOriginRRectRadii={t:"Objc",v:i};N.uy.MM(P,S)}return q};N.uy.A=function(W,h,S,k){var p=N.V.c5(h),I=N.V.kF(h);
|
|
for(var Q=0;Q<W.length;Q++){var q=W[Q].v;if(!N.uy.Bj(q))continue;if(S.length!=0&&S.indexOf(Q)==-1)continue;
|
|
var P=q.keyOriginType.v,t=["keyOriginPolyTrueRectCorners","keyOriginBoxCorners"];for(var M=0;M<t.length;
|
|
M++){var U=N.uy.cO(q,t[M]);if(U==null)continue;N.V.A(h,U);N.uy.sj(q,t[M],U);var i=N.H.TA(U);N.uy.tR(q,[i.x,i.y,i.x+i.e,i.y+i.Z]);
|
|
var z=new ex;z.rotate(-N.uy.EV(U));var D={classID:"Trnf"};q.Trnf={t:"Objc",v:D};var R="xx xy yx yy tx ty".split(" "),O=[z.S4,z.S,z.ZB,z.Bq,z.y8,z.S8];
|
|
for(var b=0;b<6;b++)D[R[b]]={t:"doub",v:O[b]}}var U=N.uy.cO(q,"keyOriginBoxCorners"),w=U[2]-U[0],A=U[3]-U[1],g=Math.sqrt(w*w+A*A);
|
|
w/=g;A/=g;var E=U[6]-U[0],j=U[7]-U[1],x=Math.sqrt(E*E+j*j);E/=x;j/=x;if(P==4){q.keyOriginLineWeight.v=x;
|
|
var d=N.uy.Jo(q);N.V.A(h,d);N.uy.alE(q,d)}var L=w*E+A*j;if(Math.abs(L)>.001){N.uy.uP(W,Q)}}};N.uy.Bj=function(W){var h=W.keyShapeInvalidated,S=W.keyOriginType;
|
|
return(h==null||!h.v)&&S!=null&&S.v!=9};N.uy.aoH=function(W){var h=W.keyOriginType.v,S=N.uy.aO(W),k=S[0],p=S[1],I=S[2],q=S[3],P=new ex,t=W.keyOriginPolyCornerRadius,D;
|
|
t=t?t.v:0;var M=N.uy.cO(W,h==7||h==8?"keyOriginPolyTrueRectCorners":"keyOriginBoxCorners"),U=N.uy.Tg(M),i=U[2],z=U[3];
|
|
k=-i/2;I=i/2;p=-z/2;q=z/2;P.rotate(-N.uy.EV(M));P.y8=U[0];P.S8=U[1];if(h==1||h==2){var R=h==1?0:N.uy.zi(W);
|
|
D=N.$.Te.Rect(k,p,I-k,q-p,R)}else if(h==4){var O=N.uy.Jo(W),b=N.uy.aeZ(W);P=new ex;if(b==null)D=N.$.Te.W5(O[0],O[1],O[2],O[3],W.keyOriginLineWeight.v);
|
|
else D=N.$.Te.$R(O[0],O[1],O[2],O[3],W.keyOriginLineWeight.v,b)}else if(h==5){D=N.$.Te.dm(k,p,I-k,q-p)}else if(h==7||h==8){var w=h==7?3:W.keyOriginPolySides.v;
|
|
D=N.$.Te.E1(0,0,100,Math.PI/w-Math.PI/2,w,t,I,q)}N.$.ac(D,P);return D};N.uy.ie=function(W,h){var S=h.T;
|
|
for(var Q=0;Q<W.length;Q++){var k=W[Q].v;if(!N.uy.Bj(k))continue;var p=N.uy.aoH(k),I=N.$.rR(S,Q),q=N.$.Sp(S,Q);
|
|
p[2].VZ=S[I].VZ;var P=S;S=S.slice(0,I);for(var t=2;t<p.length;t++)S.push(p[t]);for(var t=I+q;t<P.length;
|
|
t++)S.push(P[t])}h.T=S;h.VT=!0};N.uy.ew=function(W){var h=1e9,S=-h,k=1e9,p=-k,I=[],q=W.O4(),P=q[0],t=q[1];
|
|
for(var M=0;M<t.length;M++){var U=P[t[M]],i=U.add.vogk;if(i==null)continue;var z=U.add.vmsk.w;for(var D=0;
|
|
D<i.length;D++){var R=i[D].v,w=0;if(!N.uy.Bj(R))continue;if(t.length==1&&z.length!=0&&z.indexOf(D)==-1)continue;
|
|
var O=R.keyOriginType.v;if(O==9)continue;var b=N.uy.aO(R);h=Math.min(h,b[0]);k=Math.min(k,b[1]);S=Math.max(S,b[2]);
|
|
p=Math.max(p,b[3]);var A=N.uy.cO(R,"keyOriginBoxCorners");if(A){var g=N.uy.Tg(A),E=g[2],j=g[3];b[2]=b[0]+E;
|
|
b[3]=b[1]+j;w=N.uy.EV(A)}var x=[O,b,w];I.push(x);if(O==2)x.push(N.uy.zi(R));if(O==7||O==8)x.push(R.keyOriginPolyCornerRadius.v);
|
|
if(O==8)x.push(R.keyOriginPolySides.v)}}return I.length==1?I[0]:[0,h<S?[h,k,S,p]:null,0]};N.uy.EV=function(W){var h=W[2]-W[0],S=W[3]-W[1];
|
|
return-Math.atan2(-S,h)};N.uy.apW=function(W,h){var S=N.uy.ew(W),k=-1;for(var Q=0;Q<h.length;Q++)if(JSON.stringify(h[Q])!=JSON.stringify(S[Q]))k=Q;
|
|
if(k==1||k==2){}var p=W.O4(),I=p[0],q=p[1];for(var P=0;P<q.length;P++){var t=I[q[P]],M=t.add.vogk;if(M==null)continue;
|
|
var U=t.add.vmsk.w;for(var i=0;i<M.length;i++){var z=M[i].v;if(!N.uy.Bj(z))continue;if(q.length==1&&U.length!=0&&U.indexOf(i)==-1)continue;
|
|
var D=z.keyOriginType.v;if(k==1||k==2){N.uy.A(M,N.uy.a7L(k,z,S,h),U,!1);break}if(k==3)if(D==2)N.uy.MM(z,h[3]);
|
|
else z.keyOriginPolyCornerRadius.v=h[3];if(k==4)z.keyOriginPolySides.v=h[4]}}};N.uy.a7L=function(W,h,S,k){var p=k[1],I=S[1],q=(p[2]-p[0])/(I[2]-I[0]),P=(p[3]-p[1])/(I[3]-I[1]),t=new ex;
|
|
if(W==1){if(Math.max(Math.abs(q-1),Math.abs(P-1))>1e-8){var M=p[0],U=p[1];if(k[0]!=0){var i=N.uy.cO(h,"keyOriginBoxCorners");
|
|
M=i[0];U=i[1]}t.translate(-M,-U);t.rotate(k[2]);t.scale(q,P);t.rotate(-k[2]);t.translate(M,U)}else{t.translate(-I[0],-I[1]);
|
|
t.translate(p[0],p[1])}}else{if(k[0]!=0)p=N.uy.aO(h);var M=(p[0]+p[2])/2,U=(p[1]+p[3])/2;t.translate(-M,-U);
|
|
if(S[0]!=0)t.rotate(S[2]);t.rotate(-k[2]);t.translate(M,U)}return N.V.xm(t)};N.uy.Tg=function(W){var h=W[0],S=W[1],k=W[2],p=W[3],I=W[4],q=W[5],P=W[6],t=W[7],M=k-h,U=p-S,i=Math.sqrt(M*M+U*U),M=I-k,U=q-p,z=Math.sqrt(M*M+U*U);
|
|
return[(h+I)/2,(S+q)/2,i,z]};N.uy.cO=function(W,h){var S=W[h];if(S==null)return null;var k=[];S=S.v;
|
|
for(var p=0;p<4;p++){var I=S["rectangleCorner"+["A","B","C","D"][p]].v;k.push(I.Hrzn.v,I.Vrtc.v)}return k};
|
|
N.uy.sj=function(W,h,S){var k=W[h];if(k==null)return null;k=k.v;for(var p=0;p<4;p++){var I="rectangleCorner"+["A","B","C","D"][p];
|
|
k[I]={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:S[2*p]},Vrtc:{t:"doub",v:S[2*p+1]}}}}};N.uy.aO=function(W){return N.uy.em(W.keyOriginShapeBBox.v)};
|
|
N.uy.em=function(W){var h=W.classID,S=W.Left.v,k=W.Rght.v,p=W.Top.v,I=W.Btom.v;if(h=="unitRect"||h=="radii"||h=="Rctn"){S=S.val;
|
|
k=k.val;p=p.val;I=I.val}return[S,p,k,I]};N.uy.tR=function(W,h){N.uy.Oh(W.keyOriginShapeBBox.v,["Left","Top","Rght","Btom"],h)};
|
|
N.uy.zi=function(W){return N.uy.A0(W.keyOriginRRectRadii.v)};N.uy.A0=function(W){var h=[],S=["topLeft","topRight","bottomRight","bottomLeft"];
|
|
for(var k=0;k<4;k++)h.push(W[S[k]].v.val);return h};N.uy.MM=function(W,h){N.uy.Oh(W.keyOriginRRectRadii.v,["topLeft","topRight","bottomRight","bottomLeft"],h)};
|
|
N.uy.Oh=function(W,h,S){var k=W.classID;if(k=="unitRect"||k=="radii"||k=="Rctn"){for(var Q=0;Q<4;Q++)if(S[Q]!=null)W[h[Q]]={t:"UntF",v:{type:"#Pxl",val:S[Q]}}}else{for(var Q=0;
|
|
Q<4;Q++)if(S[Q]!=null)W[h[Q]]={t:"doub",v:S[Q]}}};N.uy.Jo=function(W){var h=W.keyOriginLineStart.v,S=W.keyOriginLineEnd.v;
|
|
return[h.Hrzn.v,h.Vrtc.v,S.Hrzn.v,S.Vrtc.v]};N.uy.alE=function(W,h){var S=W.keyOriginLineStart.v,k=W.keyOriginLineEnd.v;
|
|
S.Hrzn.v=h[0];S.Vrtc.v=h[1];k.Hrzn.v=h[2];k.Vrtc.v=h[3]};N.uy.aeZ=function(W){var h=[],S=["owSt","owEnd","Wdth","Lngth","Conc"];
|
|
for(var Q=0;Q<5;Q++){var k=W["keyOriginLineArr"+S[Q]];if(k==null)return null;h[Q]=k.v}return h};N.uy.aeo=function(W,h){W.keyOriginLineArrowSt={t:"bool",v:h[0]};
|
|
W.keyOriginLineArrowEnd={t:"bool",v:h[1]};W.keyOriginLineArrWdth={t:"doub",v:h[2]};W.keyOriginLineArrLngth={t:"doub",v:h[3]};
|
|
W.keyOriginLineArrConc={t:"long",v:h[4]}};N.H={};N.H.clone=function(W){return{C:W.C.slice(0),s:W.s.slice(0)}};
|
|
N.H.t4=function(W){if(W.length<6)return!0;var h=W.length-4;for(var Q=0;Q<h;Q+=2)if(!N.H.e3(W[Q],W[Q+1],W[Q+2],W[Q+3],W[Q+4],W[Q+5]))return!1;
|
|
if(!N.H.e3(W[h],W[h+1],W[h+2],W[h+3],W[0],W[1]))return!1;if(!N.H.e3(W[h+2],W[h+3],W[0],W[1],W[2],W[3]))return!1;
|
|
return!0};N.H.e3=function(W,h,S,k,p,I){return(h-k)*(p-S)+(S-W)*(I-k)>=0};N.H.Rc=function(W){var h={},S=null,k=0,p={M:2,L:2,Q:4,C:6};
|
|
for(var Q=0;Q<W.C.length;Q++){var I=W.C[Q];if(I.charAt(0)=="#"){if(h[I]==null)h[I]={s:[],C:[]};S=h[I]}else if(I!="X"){S.C.push(I);
|
|
var q=p[I];if(q==null)q=0;for(var P=0;P<q;P++)S.s.push(W.s[k+P]);k+=q}}return h};N.H.aD=function(W,h,S){W=N.H.bE(W);
|
|
var k=W.s,p=W.C,I=0,q=[],P=null;for(var Q=0;Q<p.length;Q++){var t=p[Q];if(t=="M"){P={UX:I,bW:0,_2:!1};
|
|
q.push(P);I+=2}if(t=="C"){P.bW++;I+=6}if(t=="Z"&&P!=null){P._2=!0}}var M=[];for(var Q=0;Q<q.length;Q++)if(q[Q].bW!=0)M.push(q[Q]);
|
|
q=M;for(var Q=0;Q<q.length;Q++){var U=q[Q],i=U.UX,z=i+2+U.bW*6,R=0;U.zq=N.H.TA(k,i,z);var D=k[i]==k[z-2]&&k[i+1]==k[z-1];
|
|
for(var O=0;O<U.bW;O++){var b=i+O*6,w=b+6;R+=(k[w]-k[b])*(k[w+1]+k[b+1])}if(U.bW==2){var A=function(u,f,l){var jk=1-l;
|
|
return jk*jk*jk*u[f]+3*jk*jk*l*u[f+2]+3*jk*l*l*u[f+4]+l*l*l*u[f+6]},g=k[i],E=k[i+1],j=k[i+6],x=k[i+7],d=k[i+6],L=k[i+7],_=A(k,i,.5),T=A(k,i+1,.5),c=A(k,i+6,.5),e=A(k,i+7,.5);
|
|
R=(_-g)*(T-E)+(j-_)*(x-T)+(c-j)*(e-x)+(d-c)*(L-e)}if(!D)R+=(k[i]-k[z-2])*(k[i+1]+k[z-1]);U.kZ=R<=0}for(var Q=0;
|
|
Q<q.length-1;Q++)for(var b=Q+1;b<q.length;b++){var r=q[Q],B=q[b];if(B.zq.LH(r.zq)){q[Q]=B;q[b]=r}}var F=q.length==0?!0:q[0].kZ,v=[{type:6},{type:8,all:0}];
|
|
for(var Q=0;Q<q.length;Q++){var U=q[Q],i=U.UX,z=i+2+U.bW*6,D=k[i]==k[z-2]&&k[i+1]==k[z-1],X=U._2||D?0:3,V=U.kZ==F&&!h?1:0;
|
|
if(!h&&Q!=0){if(q[Q-1].zq.LH(U.zq)&&q[Q-1].kZ!=U.kZ)V=0;for(var b=0;b<q.length;b++)if(b!=Q&&q[b].zq.LH(U.zq))V=0}v.push({type:X,length:U.bW+(D?0:1),VZ:S?1:V,pt:2});
|
|
for(var b=0;b<U.bW;b++){var I=i+b*6,H=new eC(k[I],k[I+1]),o=new eC(k[I+2],k[I+3]),J;if(b==0){if(D)J=new eC(k[z-4],k[z-3]);
|
|
else J=H.clone()}else J=new eC(k[I-2],k[I-1]);v.push({type:X+2,bq:J,M:H,tk:o})}if(!D){var C=new eC(k[z-2],k[z-1]);
|
|
v.push({type:X+2,bq:new eC(k[z-4],k[z-3]),M:C,tk:C.clone()})}}for(var b=0;b<v.length;b++){var Y=v[b];
|
|
if(Y.type>5||Y.type==0||Y.type==3)continue;var K=Y.bq.xX(Y.M)||Y.tk.xX(Y.tk);if(!K){var r=Y.bq.x*(Y.M.y-Y.tk.y)+Y.M.x*(Y.tk.y-Y.bq.y)+Y.tk.x*(Y.bq.y-Y.M.y);
|
|
if(Math.abs(r)<1e-6)K=!0}if(K)Y.type--}return v};N.H.H7=function(W,h){var S=N.$.z2(W),k=!1;for(var Q=2;
|
|
Q<W.length;Q++){var p=W[Q].VZ;if(p!=null){if(p==2||p==0||p==3)k=!0}}if((k||h)&&W.length<15e3&&S>1)W=N.$.CJ(W);
|
|
var I=N.H.FU(W);return{Tu:I,lk:k?1:0}};N.H.FU=function(){function W(k,p,I,q){if(!q&&k.tk.xX(k.M)&&p.bq.xX(p.M)){I.s.push(p.M.x,p.M.y);
|
|
I.C.push("L")}else{I.s.push(k.tk.x,k.tk.y,p.bq.x,p.bq.y,p.M.x,p.M.y);I.C.push("C")}}function h(k,p,Q,I,q,P){var t=p[Q];
|
|
k.s.push(t.M.x,t.M.y);k.C.push("M");for(var M=Q;M<Q+I-1;M++)W(p[M],p[M+1],k,P);if(!q)W(p[M],p[Q],k,P)}function S(k,p){if(p==null)p=!1;
|
|
var I={s:[],C:[]};for(var Q=0;Q<k.length;Q++){if(k[Q].type>5)continue;var q=k[Q].length;if(q==0)continue;
|
|
if(Q==k.length-1)break;var P=k[Q].type==3;h(I,k,Q+1,q,P,p);if(!P)I.C.push("Z");Q+=q}return I}return S}();
|
|
N.H.ajY=function(W){var h=W.s,S=[],k,p=0;for(var Q=0;Q<W.C.length;Q++){var I=W.C[Q];if(I=="C"){k.push(h[p++],h[p++],h[p++],h[p++],h[p++],h[p++])}else if(I=="Z"){}else{k=[];
|
|
if(I!="M"){k.push(I);Q++}k.push(h[p++],h[p++]);S.push(k)}}return S};N.H.Ge=function(W,h,S,k){if(k==null)k=1e9;
|
|
var p=1e9,I=0;for(var Q=0;Q<W.length;Q+=2){var q=h-W[Q],P=S-W[Q+1],t=q*q+P*P;if(t<p){p=t;I=Q>>>1}}return p<k*k?I:-1};
|
|
N.H.G5=function(W,h,S,k){for(var Q=0;Q<W.length;Q+=2){var p=W[Q],I=W[Q+1],q=h[Q],P=h[Q+1];S[Q]=p+(q-p)*k;
|
|
S[Q+1]=I+(P-I)*k}};N.H.A=function(W,h,S){for(var Q=0;Q<W.length;Q+=2){var k=W[Q],p=W[Q+1];S[Q]=k*h.S4+p*h.ZB+h.y8;
|
|
S[Q+1]=k*h.S+p*h.Bq+h.S8}};N.H.TA=function(W,h,S){if(h==null)h=0;if(S==null)S=W.length;var k=99999999999,p=-k,I=99999999999,q=-I;
|
|
for(var Q=h;Q<S;Q+=2){var P=W[Q],t=W[Q+1];k=Math.min(k,P);I=Math.min(I,t);p=Math.max(p,P);q=Math.max(q,t)}return new gj(k,I,p-k,q-I)};
|
|
N.H.jS=function(W,h){var S=Math.max(h.x,Math.min(h.x+h.e,W.x)),k=Math.max(h.y,Math.min(h.y+h.Z,W.y)),p=W.x-S,I=W.y-k;
|
|
return Math.sqrt(p*p+I*I)};N.H.No=function(W){if(W.ZP())return new gj(Math.floor(W.x),Math.floor(W.y),Math.ceil(W.e),Math.ceil(W.Z));
|
|
var h=Math.floor(W.x),S=Math.ceil(W.x+W.e),k=Math.floor(W.y),p=Math.ceil(W.y+W.Z);return new gj(h,k,S-h,p-k)};
|
|
N.H.VL=function(W){return N.H.No(N.H.TA(W))};N.H.Fb=function(W){var h=W.x,S=W.y,k=W.x+W.e,p=W.y+W.Z;
|
|
return{C:["M","L","L","L","Z"],s:[h,S,k,S,k,p,h,p]}};N.H.concat=function(W,h,S){if(S==null)S=new ex;
|
|
for(var Q=0;Q<h.s.length;Q+=2){var k=h.s[Q],p=h.s[Q+1];W.s.push(k*S.S4+p*S.ZB+S.y8);W.s.push(k*S.S+p*S.Bq+S.S8)}for(var Q=0;
|
|
Q<h.C.length;Q++)W.C.push(h.C[Q])};N.H.bE=function(W){var h=W.s,S=[],k=[],p=0,I=0,q=0,P=0,t=0,M=0,U=0,i=0,z=0;
|
|
for(var Q=0;Q<W.C.length;Q++){var D=W.C[Q];if(D=="M"){I=h[p];q=h[p+1];p+=2;k.push(D);S.push(I,q)}else if(D=="C"){P=h[p];
|
|
t=h[p+1];M=h[p+2];U=h[p+3];i=h[p+4];z=h[p+5];p+=6;k.push(D);S.push(P,t,M,U,i,z);I=i;q=z}else if(D=="Q"){P=h[p];
|
|
t=h[p+1];M=h[p+2];U=h[p+3];p+=4;var R=P-I,O=t-q,b=M-P,w=U-t;k.push("C");S.push(I+2/3*R,q+2/3*O,P+1/3*b,t+1/3*w,M,U);
|
|
I=M;q=U}else if(D=="L"){P=h[p];t=h[p+1];p+=2;var A=P-I,g=t-q;k.push("C");S.push(I,q,P,t,P,t);I=P;q=t}else k.push(D)}return{C:k,s:S}};
|
|
N.H.arJ=function(W){var h=W.s,S=[],k=[],p=0;for(var Q=0;Q<W.C.length;Q++){var I=W.C[Q];if(I=="Q"){var q=h[p-2],P=h[p-1],t=h[p],M=h[p+1],U=h[p+2],i=h[p+3];
|
|
p+=4;var z=t-q,D=M-P,R=U-t,O=i-M;k.push("C");S.push(q+2/3*z,P+2/3*D,t+1/3*R,M+1/3*O,U,i)}else{var b=0;
|
|
if(I=="M"||I=="L")b=2;else if(I=="C")b=6;for(var w=0;w<b;w++)S.push(h[p+w]);p+=b;k.push(I)}}return{C:k,s:S}};
|
|
N.H.Lq=function(W,h){var S=W.s,k=[],p=[],I=0,q=0,P=0,t=0,M=0,U=0,i=0,z=0,D=0;for(var Q=0;Q<W.C.length;
|
|
Q++){var R=W.C[Q];if(R=="M"){q=S[I];P=S[I+1];I+=2;p.push(R);k.push(q,P)}else if(R=="C"){t=S[I];M=S[I+1];
|
|
U=S[I+2];i=S[I+3];z=S[I+4];D=S[I+5];I+=6;N.H.uz(q,P,t,M,U,i,z,D,h,p,k,0);q=z;P=D}else p.push(R)}return{C:p,s:k}};
|
|
N.H.uz=function(W,h,S,k,p,I,q,P,t,M,U,i){var z=Math.sqrt((q-W)*(q-W)+(P-h)*(P-h)),D=Math.sqrt((q-p)*(q-p)+(P-I)*(P-I))+Math.sqrt((p-S)*(p-S)+(I-k)*(I-k))+Math.sqrt((S-W)*(S-W)+(k-h)*(k-h)),R=(z+D)/2;
|
|
if(R<=t){M.push("C");U.push(S,k,p,I,q,P)}else{var O=0,b=0,w=0,A=0,g=0,E=0,j=0,x=0,d=0,L=0,_=0,T=0,c=0;
|
|
b=(W+S)/2;w=(h+k)/2;A=(S+p)/2;g=(k+I)/2;E=(p+q)/2;j=(I+P)/2;x=(b+A)/2;d=(w+g)/2;L=(A+E)/2;_=(g+j)/2;
|
|
T=(x+L)/2;c=(d+_)/2;N.H.uz(W,h,b,w,x,d,T,c,t,M,U,i+1);N.H.uz(T,c,L,_,E,j,q,P,t,M,U,i+1)}};N.H.P8=function(W,h,S,k,p){var I=Date.now(),q=N.H.ajb(W,h,S);
|
|
if(p){console.log("trace polygons",Date.now()-I);I=Date.now()}var P=[];for(var Q=0;Q<q.length;Q++){var t=q[Q],M=t[0],U=["M"],i=W[M[1]*h+M[0]];
|
|
if(M.length>8)M=N.H.p1(M,k,t[1]);if(M.length<=4)continue;for(var z=2;z<M.length;z+=2)U.push("L");U.push("Z");
|
|
P.push({path:{s:M,C:U},color:i,parent:-1,zq:N.H.TA(M)})}if(p){console.log("simplify polygons",Date.now()-I);
|
|
I=Date.now()}for(var Q=1;Q<P.length;Q++){var D=P[Q].zq;for(var z=Q-1;z>=0;z--)if(P[z].zq.LH(D)){P[Q].parent=z;
|
|
break}}if(p){console.log("checking parents",Date.now()-I);I=Date.now()}return P};N.H.ajb=function(W,h,S){var k=h*S,p=new Uint16Array(h*S),q=0;
|
|
for(var Q=0;Q<k;Q++)p[Q]=W[Q];var I=new Uint8Array(h*S);I[1*h+1]=I[(S-1)*h+1]=I[1*h+h-1]=I[(S-1)*h+h-1]=1;
|
|
for(var P=1;P<S;P++)for(var t=1;t<h;t++){var Q=P*h+t,M=p[Q-h-1],U=p[Q-h],i=p[Q-1],z=p[Q],D=M==z&&U==i&&M!=U,R=0;
|
|
if(z<i){q=z;z=i;i=q}if(i<U){q=i;i=U;U=q}if(U<M){q=U;U=M;M=q}if(z<i){q=z;z=i;i=q}if(i<U){q=i;i=U;U=q}if(z<i){q=z;
|
|
z=i;i=q}if(M!=U)R++;if(U!=i)R++;if(i!=z)R++;if(z!=M)R++;if(R>=3||D)I[Q]=1}var O=[];for(var P=1;P<S;P++)for(var t=1;
|
|
t<h;t++){var Q=P*h+t;if(p[Q]!=p[Q-1]){var b=N.H.ap1(p,h,S,t,P),w=[];for(var A=0;A<b.length;A+=2)if(I[b[A+1]*h+b[A]]==1)w.push(A>>>1);
|
|
O.push([b,w]);N.H.ai(p,h,S,t,P)}}return O};N.H.ai=function(W,h,S,k,p){var I=[p*h+k],q=W[p*h+k];W[p*h+k]=65535;
|
|
while(I.length!=0){var Q=I.pop();W[Q]=0;if(W[Q+h]==q){I.push(Q+h);W[Q+h]=65535}if(W[Q-h]==q){I.push(Q-h);
|
|
W[Q-h]=65535}if(W[Q-1]==q){I.push(Q-1);W[Q-1]=65535}if(W[Q+1]==q){I.push(Q+1);W[Q+1]=65535}}};N.H.ap1=function(W,h,S,k,p){var I=[0,-1,1,0,0,1,-1,0],U=1;
|
|
function q(z,D,U){var Q=M*h+t,R=0;if(U==0)R=Q-h;else if(U==1)R=Q;else if(U==2)R=Q-1;else if(U==3)R=Q-h-1;
|
|
return W[R]}var P=[],t=k,M=p,i=q(t,M,U);do{P.push(t,M);t+=I[U*2];M+=I[U*2+1];if(q(t,M,U)!=i)U=U+1&3;
|
|
else if(q(t,M,U+3&3)!=i)U=U;else if(q(t,M,U+2&3)!=i)U=U+3&3}while(t!=k||M!=p);return P};N.H.p1=function(W,h,S){var k=W.length-2;
|
|
if(S&&S.length!=0){var p=S[0]*2,I=S[S.length-1]*2,q=p==0?k:p-2,P=W.slice(I);for(var Q=0;Q<p;Q++)P.push(W[Q]);
|
|
if(p==I)P.push(.9*W[p]+.1*W[q],.9*W[p+1]+.1*W[q+1]);else P.push(W[p],W[p+1]);P=N.H.Mw(P,h);P.pop();P.pop();
|
|
for(var Q=0;Q<S.length-1;Q++){var t=W.slice(S[Q]*2,S[Q+1]*2+2);t=N.H.Mw(t,h);for(var M=0;M<t.length-2;
|
|
M++)P.push(t[M])}return P}var U=W.slice(0);U.push(.9*W[0]+.1*W[k],.9*W[1]+.1*W[k+1]);U=N.H.Mw(U,h);U.pop();
|
|
U.pop();return U};N.H.Mw=function(W,h){var S=W.length-2,k=W[0],p=W[1],I=W[S],q=W[S+1],P=I-k,t=q-p,M=1/Math.sqrt(P*P+t*t),U=I*p-q*k,i=-1,z=-1,D=0;
|
|
for(var Q=2;Q<S;Q+=2){var R=W[Q],O=W[Q+1],b=O*O*1e6+R*R,w=Math.abs(t*R-P*O+U)*M;if(w>z||w==z&&b>D){z=w;
|
|
i=Q;D=b}}if(z<h)return[k,p,I,q];var A=N.H.Mw(W.slice(0,i+2),h),g=N.H.Mw(W.slice(i),h);for(var Q=2;Q<g.length;
|
|
Q++)A.push(g[Q]);return A};N.H.afb=function(){var W=function(k,p,I,q,P,t){return(p-q)*(P-I)+(I-k)*(t-q)>=0},h=function(k,p,I,q,P,t,M,U){var i=M-I,z=U-q,D=P-I,R=t-q,O=k-I,b=p-q,w=i*i+z*z,A=i*D+z*R,g=i*O+z*b,E=D*D+R*R,j=D*O+R*b,x=1/(w*E-A*A),d=(E*g-A*j)*x,L=(w*j-A*g)*x;
|
|
return d>=0&&L>=0&&d+L<1},S=function(k){var g8=k.length>>>1,Q=0;if(g8<3)return[];var p=[],I=[];for(var Q=0;
|
|
Q<g8;Q++)I.push(Q);var q=g8;while(q>3){var P=I[(Q+0)%q],t=I[(Q+1)%q],M=I[(Q+2)%q],U=k[2*P],i=k[2*P+1],z=k[2*t],D=k[2*t+1],R=k[2*M],O=k[2*M+1],b=!1;
|
|
if(W(U,i,z,D,R,O)){b=!0;for(var w=0;w<q;w++){var A=I[w];if(A==P||A==t||A==M)continue;if(h(k[2*A],k[2*A+1],U,i,z,D,R,O)){b=!1;
|
|
break}}}if(b){p.push(P,t,M);I.splice((Q+1)%q,1);q--;Q=0}else if(Q++>3*q)break}p.push(I[0],I[1],I[2]);
|
|
return p};return S}();N.H.a1X=function(W,h){var S={},k={C:[],s:[]};for(var Q=0;Q<h.length;Q+=3){var p=h[Q]*2,I=h[Q+1]*2,q=h[Q+2]*2;
|
|
N.H.b6(W,p,I,k,S);N.H.b6(W,p,q,k,S);N.H.b6(W,I,q,k,S)}return k};N.H.b6=function(W,h,S,k,p){if(h>S){var I=S;
|
|
S=h;h=I}if(p[h+","+S])return;p[h+","+S]=!0;k.C.push("M","L");k.s.push(W[h],W[h+1],W[S],W[S+1])};N.H.v0=function(W,h){var S=[],k=W.length;
|
|
for(var Q=0;Q<k;Q+=2){var p=W[Q],I=W[Q+1],q=W[(Q+2)%k],P=W[(Q+3)%k];if(P<I){var t=I;I=P;P=t}if(I<h&&h<P){var M=(h-I)/(P-I);
|
|
S.push(p+M*(q-p))}}S.sort(function(U,i){return U-i});return S};N.H.Ur=function(W,h,S,k,p,I,q){var P=W-S,t=h-k,M=p-S,U=I-k,i=1/Math.sqrt(P*P+t*t),z=1/Math.sqrt(M*M+U*U),D=P*i,R=t*i,O=M*z,b=U*z,w=R*q,A=-D*q,g=-b*q,E=O*q,j=N.H.xb(w,A,D,R,g,E,O,b),x=w+D*j,d=A+R*j,j=N.H.xb(0,0,D,R,x,d,-R,D),L=D*j,_=R*j;
|
|
return[Math.sqrt(L*L+_*_),D,R,O,b]};N.H.cT=function(W,h,S,k,p,I,q){var P=N.H.Ur(W,h,S,k,p,I,q),t=P[0],M=P[1],U=P[2],i=P[3],z=P[4],D=Math.atan2(M*z-U*i,M*i+U*z);
|
|
if(D<0){D=D*-1}var R=Math.PI-D,O=4/3*Math.tan(R/4),b=S+t*M,w=k+t*U,A=S+t*i,g=k+t*z,E=b+O*q*-M,j=w+O*q*-U,x=A+O*q*-i,d=g+O*q*-z;
|
|
return[0,0,b,w,E,j,x,d,A,g]};N.H.xb=function(W,h,S,k,p,I,q,P){var t=q*(h-I)-P*(W-p),M=P*S-q*k;if(M==0)return 0;
|
|
return t/M};N.H.cT(0,50,0,0,30,30,10);N.Uz=function(){};N.Uz.Lh=function(W,h,S,k,p){var I=S.e,q=S.Z,P=I*q,t=new Int32Array(P),g8=0;
|
|
for(var Q=0;Q<P;Q++)if(h[Q]!=0){t[Q]=g8;g8++}else if(W[(Q<<2)+3]<200){t[Q]=-2}else t[Q]=-1;if(g8==0)return;
|
|
var M=new N.pq(g8,g8),U=new Array(3*g8),i=new Array(3*g8);for(var Q=0;Q<i.length;Q++)i[Q]=U[Q]=0;var z=1/255,D=[-I,-1,1,I],R=[],O=[];
|
|
for(var b=0;b<q;b++)for(var w=0;w<I;w++){var A=b*I+w,g=A<<2,Q=t[A],E=Q*3,j=0,x=0,d=0;if(Q==-1||Q==-2)continue;
|
|
for(var L=0;L<4;L++){if(L==2){x=d;R[d]=0;O[d]=Q;d++}var _=A+D[L],T=_<<2,c=t[_];if(L==0&&b==0||L==1&&w==0||L==2&&w==I-1||L==3&&b==q-1||c==-2)continue;
|
|
j++;if(c==-1){U[E+0]+=W[T+0];U[E+1]+=W[T+1];U[E+2]+=W[T+2]}else{R[d]=-1;O[d]=c;d++;if(h[A]==h[_]){U[E+0]+=W[g+0]-W[T+0];
|
|
U[E+1]+=W[g+1]-W[T+1];U[E+2]+=W[g+2]-W[T+2]}}}R[x]=j;M.bz(R,O,d)}for(var Q=0;Q<P;Q++)if(t[Q]!=-1){var e=Q<<2,r=t[Q],B=r*3;
|
|
i[B]=W[e+0];i[B+1]=W[e+1];i[B+2]=W[e+2]}var F=Date.now();M.aoA(i,U,k,p);console.log(Date.now()-F);for(var Q=0;
|
|
Q<P;Q++){var r=t[Q],v=r*3,e=Q<<2;if(r==-1||W[e+3]!=255)continue;W[e+0]=~~(.5+Math.max(0,Math.min(255,i[v+0])));
|
|
W[e+1]=~~(.5+Math.max(0,Math.min(255,i[v+1])));W[e+2]=~~(.5+Math.max(0,Math.min(255,i[v+2])))}};N.rect={};
|
|
N.rect.WS=function(W,h){var S=[W],k=[];for(var Q=0;Q<h.length;Q++){var p=h[Q],I=!1;for(var q=Q+1;q<h.length;
|
|
q++){var P=h[q];if(P[0]<=p[0]&&P[1]<=p[1]&&p[2]<=P[2]&&p[3]<=P[3]){I=!0;break}}if(!I)k.push(p)}h=k;for(var Q=0;
|
|
Q<h.length;Q++){var p=h[Q];for(var q=0;q<S.length;q++){var P=S[q],t=Math.max(p[0],P[0]),M=Math.min(p[2],P[2]),U=Math.max(p[1],P[1]),i=Math.min(p[3],P[3]);
|
|
if(t<M&&U<i){var z=[];if(P[1]<p[1]){var D=P.slice(0);D[3]=p[1];z.push(D)}if(P[0]<p[0]){var R=P.slice(0);
|
|
R[1]=U;R[2]=p[0];z.push(R)}if(p[2]<P[2]){var O=P.slice(0);O[1]=U;O[0]=p[2];z.push(O)}if(p[3]<P[3]){var b=[t,i,M,P[3]];
|
|
z.push(b)}if(z.length!=0){S[q]=z[0];for(var w=1;w<z.length;w++)S.push(z[w])}}}S.push(p);S=N.rect.amz(S)}S.sort(function(p,P){return p[1]!=P[1]?p[1]-P[1]:p[0]-P[0]});
|
|
for(var Q=1;Q<S.length;Q++){var p=S[Q-1],P=S[Q];if(p[0]==P[0]&&p[1]==P[1]&&p[2]==P[2]&&p[3]==P[3]){S.splice(p[4]==null?Q-1:Q,1);
|
|
Q--}}return S};N.rect.amz=function(W){W=W.slice(0);for(var Q=0;Q<W.length;Q++){var h=W[Q],S=null;if(h[4]!=null)continue;
|
|
for(var k=0;k<W.length;k++){var p=W[k];if(Q==k||p[4]!=null)continue;var I=h[0]==p[0],q=h[1]==p[1],P=h[2]==p[2],i=h[3]==p[3];
|
|
if(q&&i&&(h[2]==p[0]||h[0]==p[2])){S=[Math.min(h[0],p[0]),h[1],Math.max(h[2],p[2]),h[3]]}if(I&&P&&(h[3]==p[1]||h[1]==p[3])){S=[h[0],Math.min(h[1],p[1]),h[2],Math.max(h[3],p[3])]}if(S){W[Q]=S;
|
|
W.splice(k,1);break}}if(S){Q--}}return W};N.rect.fV=function(W){var h=new gj;for(var Q=0;Q<W.length;
|
|
Q++)h=h.r8(W[Q]);return h};N.rect.al6=function(W,h){var S=N.rect.fV,k=new UnionFind(W.length),x=1e3,d=1e3;
|
|
for(var Q=0;Q<W.length;Q++)for(var p=Q+1;p<W.length;p++){if(!h)continue;var I=W[Q],q=W[p],i=1e9,z=1e9;
|
|
if(I.NW(q)){k.link(Q,p);continue}var P=I.x+I.e,t=I.y+I.Z,M=q.x+q.e,U=q.y+q.Z;if((P<q.x||M<I.x)&&(t<q.y||U<I.y))continue;
|
|
if(!(t<q.y||U<I.y))i=Math.min(Math.abs(P-q.x),Math.abs(I.x-M));if(!(P<q.x||M<I.x))z=Math.min(Math.abs(t-q.y),Math.abs(I.y-U));
|
|
var D=Math.min(i,z),R=Math.min(I.e,I.Z,q.e,q.Z);if(D<.3*R)k.link(Q,p)}var O=[],b={};for(var Q=0;Q<W.length;
|
|
Q++){var w=k.find(Q),A=W[Q];if(b[w]==null){b[w]=O.length;O.push([])}O[b[w]].push(A)}var g=[],E=[];for(var Q=0;
|
|
Q<O.length;Q++){g.push(S(O[Q]));var j=S(O[Q]);j.wJ=Q;E.push(j)}E.sort(function(X,V){return Math.max(V.Z,V.e)-Math.max(X.Z,X.e)});
|
|
var L=new NETXUS.RectanglePacker(x,d);while(!0){var _=!1;L.reset(x,d);for(var Q=0;Q<E.length;Q++){var T=L.findCoords(E[Q].e,E[Q].Z);
|
|
if(T){E[Q].x=T.x;E[Q].y=T.y}else{x=Math.floor(x*1.1);d=Math.floor(d*1.1);_=!0;break}}if(_)continue;break}for(var Q=0;
|
|
Q<O.length;Q++){var c=E[Q],e=c.wJ,r=g[e],B=O[e],F=c.x-r.x,v=c.y-r.y;for(var p=0;p<B.length;p++)B[p].offset(F,v)}};
|
|
N.aX=function(){};N.aX.ik=Math.floor(16*window.devicePixelRatio);N.aX.Vr={};N.aX.UD=0;N.aX.DA=[[12,76,2],[12,76,3],[12,76,4],[12,76,5],[12,76,6]];
|
|
N.aX.ahS=["px","in","cm","mm","%"];N.aX.Hu=function(W,h,S,k){var p=[1,h,h/2.54,h/25.4,S/100][k];return W*p};
|
|
N.aX.a7E=function(W,h,S,k){var p=[1,h,h/2.54,h/25.4,S/100][k];return W/p};N.aX.JL=function(W,h,S,k,p){var I=S.dH.VI,q=[1,h,h/2.54,h/25.4,k/100][I],P=[2,3,2,1,2][I];
|
|
W=W/q;var t=Math.round(W),M=I==0&&Math.abs(W-t)<1e-6?t+"":W.toFixed(P);if(p)M+=" "+N.aX.ahS[I];return M};
|
|
N.aX.a4V=function(W,h,S,k){var p=S.dH.VI,I=[1,h,h/2.54,h/25.4,k/100][p];W=parseFloat(W)*I;return W};
|
|
N.aX.a52=function(W,h){var S=W+","+h;if(N.aX.Vr.clr==S)return;var k=Math.round(N.aX.ik*.5);N.aX.UD=k;
|
|
var p=document.createElement("canvas");p.width=p.height=k;var I=p.getContext("2d");I.font=k*1.5+"px monospace";
|
|
var q="0 1 2 3 4 5 6 7 8 9 -".split(" ");for(var Q=0;Q<q.length;Q++){I.fillStyle="#"+N.fl(h);I.fillRect(0,0,k,k);
|
|
I.fillStyle="#"+N.fl(W);I.fillText(q[Q],0,k);N.aX.Vr[q[Q]]=I.getImageData(0,0,k,k).data}N.aX.Vr.clr=S};
|
|
N.aX.acd=function(W,h,S){var k=0,p=0,I=4*N.aX.ik;for(var Q=9;Q>=0;Q--){var q=Math.pow(10,Q);if(5*q*W<=I){k=5*q;
|
|
p=10;break}if(2*q*W<=I){k=2*q;p=4;break}if(1*q*W<=I){k=1*q;p=10;break}}if(k==0){k=1;p=10}var P=Math.ceil(k*W),t=N.U(P*N.aX.ik*4);
|
|
N.wM(t,4278190080|S);for(var Q=0;Q<N.aX.ik;Q++)N.aX.yY(t,4*Q*P,h);for(var Q=0;Q<P;Q++)N.aX.yY(t,4*((N.aX.ik-1)*P+Q),h);
|
|
if(k==2)p=2;if(k==5)p=5;if(k>1||k==1&&P>20)for(var Q=1;Q<p;Q++)N.aX.adc(t,Q*(P/p),P,(Q&1)==1?.8:.7,h);
|
|
return{jj:t,step:k}};N.aX.adc=function(W,h,S,k,p){var h=Math.round(h);for(var I=Math.round(N.aX.ik*k);
|
|
I<N.aX.ik-1;I++)N.aX.yY(W,4*(I*S+h),p)};N.aX.yY=function(W,h,S){W[h+0]=S>>16&255;W[h+1]=S>>8&255;W[h+2]=S&255};
|
|
N.aX.ai2=function(W,h,S,k,p,I,q){var P=W.Vz.e,t=W.Vz.Z,M=N.aX.ik,U=h&255,i=h>>8&255,z=h>>16&255;h=Math.round(U*.6)<<16|Math.round(i*.6)<<8|Math.round(z*.6);
|
|
N.aX.a52(Math.round(U*.8)<<16|Math.round(i*.8)<<8|Math.round(z*.8),S);var D=W.J,R=W.r,O=W.j3;for(var b=0;
|
|
b<2;b++){var w=b==0?I:q;W.J=w[0];W.r=w[1];W.j3=0;var A=this.acd(W.J,h,S),g=W.wy(0,0),E=W.wy(P,t),j=Math.floor(g.x/A.step)*A.step,x=Math.ceil(E.x/A.step)*A.step,d=Math.floor(g.y/A.step)*A.step,L=Math.ceil(E.y/A.step)*A.step,_=W._c(j,d),T=W._c(x,d),c=A.step*W.J,e=Math.ceil(c);
|
|
if(b==1){var r=A.jj;A.jj=N.U(r.length*4);N.V.Vg(r,A.jj,e,M)}var B=b==0?W.yt.data:W._8.data,F=new gj(0,0,[P,M][b],[M,t][b]),v=new gj(0,0,[e,M][b],[M,e][b]),X=new gj([0,Math.round(M*.2)][b],[Math.round(M*.08),0][b],N.aX.UD,N.aX.UD),V=(b==0?x-j:L-d)/A.step;
|
|
for(var Q=0;Q<V;Q++){if(b==0)v.x=Math.round(_.x+Q*c);else v.y=Math.round(_.y+Q*c);N.zt(A.jj,v,B,F,v);
|
|
var H=(b==0?j+Q*A.step:Math.abs(d+Q*A.step)).toString(10);for(var o=0;o<H.length;o++){if(b==0)X.x=v.x+3+o*Math.round(N.aX.UD*.8);
|
|
else X.y=v.y+3+o*Math.round(N.aX.UD*1.15);var J=N.aX.Vr[H[o]];N.zt(J,X,B,F,X)}}}W.J=D;W.r=R;W.j3=O;var C=Math.floor(M*.6),Y=new Uint32Array(W.yt.data.buffer),K=new Uint32Array(W._8.data.buffer),u=U<128?4278190080:4294967295;
|
|
if(0<k&&k<P)for(var Q=0;Q<C;Q++)Y[Q*P+k]=u;if(0<p&&p<t)for(var Q=0;Q<C;Q++)K[p*M+Q]=u};N.scale={};N.scale.N=document.createElement("canvas");
|
|
N.scale.ds=N.scale.N.getContext("2d");N.scale.bT=document.createElement("canvas");N.scale.PD=N.scale.bT.getContext("2d");
|
|
N.scale.AQ=function(W,h,S){var k=N.scale.N,p=N.scale.ds;k.width=h;k.height=S;var I=new ImageData(new Uint8ClampedArray(W.buffer),h,S);
|
|
p.putImageData(I,0,0);return p.createPattern(k,"repeat")};N.scale.Dk=function(W,h,S,k,p,I,q,P,t){var M=N.scale.a3A(W,S,k,p,I,q,P,t).data;
|
|
if(h)N.WQ(M,h);return new Uint8Array(M.buffer)};N.scale.a3A=function(W,h,S,k,p,I,q,P){var t=N.scale.N,M=N.scale.ds;
|
|
t.width=h;t.height=S;M.rect(0,0,h,S);M.translate(I,q);M.scale(k,p);if(P!=null)M.rotate(-P);M.fillStyle=W;
|
|
M.fill();return M.getImageData(0,0,h,S)};N.scale.A=function(W,h,S,k,p){var I=S.clone();I.uA();var q=p.e,P=p.Z,t=N.H.Fb(h).s;
|
|
N.H.A(t,I,t);var M=N.H.VL(t).r$(p),U=M.x,i=M.y,z=U+M.e,D=i+M.Z,R=~~h.x,O=~~h.y,b=~~h.e,w=~~h.Z;for(var A=i;
|
|
A<D;A++)for(var g=U;g<z;g++){var E=g+.5,j=A+.5,x=S.S4*E+S.ZB*j+S.y8-R,d=S.S*E+S.Bq*j+S.S8-O;if(0<=x&&0<=d&&x<b&&d<w)k[A*q+g]=W[~~d*b+~~x]}};
|
|
N.scale.Wx=function(W,h,S,k,p){var I=new Uint32Array(W.buffer),q=new Uint32Array(k.buffer),P=S.clone();
|
|
P.uA();var t=p.e,M=p.Z,U=N.H.Fb(h).s;N.H.A(U,P,U);var i=N.H.VL(U).r$(p),z=i.x,D=i.y,R=z+i.e,O=D+i.Z,b=~~h.x,w=~~h.y,A=~~h.e,g=~~h.Z;
|
|
for(var E=D;E<O;E++)for(var j=z;j<R;j++){var x=j+.5,d=E+.5,L=S.S4*x+S.ZB*d+S.y8-b,_=S.S*x+S.Bq*d+S.S8-w;
|
|
if(0<=L&&0<=_&&L<A&&_<g)q[E*t+j]=I[~~_*A+~~L]}};N.scale.OF=function(W,h,S,k,p,I,q){if(q<1)N.scale.a0b(W,h,S,k,p,I,Math.round(1/q));
|
|
else N.scale.amW(W,h,S,k,p,I,q)};N.scale.IU=function(W,h,S,k,p,I,q,P){if(P)P=P.r$(new gj(0,0,h,S));W=new Uint32Array(W.buffer);
|
|
k=new Uint32Array(k.buffer);if(q<1)N.scale.afe(W,h,S,k,p,I,Math.round(1/q),P);else N.scale.anQ(W,h,S,k,p,I,q)};
|
|
N.scale.amW=function(W,h,S,k,p,I,q){for(var P=0;P<S;P++)for(var t=0;t<h;t++){var M=W[P*h+t],U=Math.min(q,p-t*q),i=Math.min(q,I-P*q);
|
|
for(var Q=0;Q<i;Q++)for(var z=0;z<U;z++)k[(q*P+Q)*p+q*t+z]=M}};N.scale.a0b=function(W,h,S,k,p,I,q){for(var P=0;
|
|
P<I;P++)for(var t=0;t<p;t++){var M=0,U=Math.min(q,h-t*q),i=Math.min(q,S-P*q);for(var Q=0;Q<i;Q++)for(var z=0;
|
|
z<U;z++)M+=W[(q*P+Q)*h+(q*t+z)];k[P*p+t]=Math.round(M/(U*i))}};N.scale.anQ=function(W,h,S,k,p,I,q){for(var P=0;
|
|
P<S;P++)for(var t=0;t<h;t++){var M=W[P*h+t],U=Math.min(q,p-t*q),i=Math.min(q,I-P*q);for(var Q=0;Q<i;
|
|
Q++)for(var z=0;z<U;z++)k[(q*P+Q)*p+q*t+z]=M}};N.scale.auc=function(W,h,S){return(W>>>S&255)+(h>>>S&255)>>>1};
|
|
N.scale.Uu=function(W,h){var S=N.scale.auc;return S(W,h,24)<<24|S(W,h,16)<<16|S(W,h,8)<<8|S(W,h,0)};
|
|
N.scale.ac3=function(W,h,S,k,p,I){var q=new Uint32Array(W.buffer),P=new Uint32Array(k.buffer);for(var t=0;
|
|
t<S;t++){for(var M=0;M<h;M++){var U=t*h+M,i=q[U],z=i,D=i,R=i;if(M<h-1)z=N.scale.Uu(i,q[U+1]);if(t<S-1)D=N.scale.Uu(i,q[U+h]);
|
|
if(M<h-1&&t<S-1)R=N.scale.Uu(i,q[U+h+1]);var O=(t*p+M)*2;P[O]=i;P[O+1]=z;P[O+p]=D;P[O+p+1]=R}}if((p&1)==1)for(var t=0;
|
|
t<I;t++)P[t*p+p-1]=P[t*p+p-2];var b=p*(I-1);if((I&1)==1)for(var M=0;M<p;M++)P[b+M]=P[b-p+M]};N.scale.afe=function(W,h,S,k,p,I,q,P){var t=0,M=p,U=0,i=I;
|
|
if(P){t=Math.floor(P.x/q);M=Math.ceil((P.x+P.e)/q);U=Math.floor(P.y/q);i=Math.ceil((P.y+P.Z)/q)}for(var z=U;
|
|
z<i;z++)for(var D=t;D<M;D++){var R=0,O=0,b=0,w=0,A=Math.min(q,h-D*q),g=Math.min(q,S-z*q);for(var Q=0;
|
|
Q<g;Q++)for(var E=0;E<A;E++){var j=W[(q*z+Q)*h+q*D+E],x=j>>>24;R+=x;O+=x*(j>>>16&255);b+=x*(j>>>8&255);
|
|
w+=x*(j&255)}if(R!=0){var d=1/R;k[z*p+D]=R/(A*g)<<24|O*d<<16|b*d<<8|w*d}else k[z*p+D]=0}};N.q={};N.q.asR=function(W,h,S){var k=128,Q=0,p=S.e,I=S.Z;
|
|
for(var q=0;q<I;q++)for(var P=0;P<p;P++){if(W[Q]>=k&&(P==0||W[Q-1]<k||(P==p-1||W[Q+1]<k)||(q==0||W[Q-p]<k)||(q==I-1||W[Q+p]<k)))h[Q]=255;
|
|
Q++}};N.q.ak7=function(W,h,S,k){var p=new Uint32Array([4278190080,4294967295]),I=S.e,q=S.Z,P=0,t=0,M=I,U=q;
|
|
if(k){P=k.x-S.x;t=k.y-S.y;M=P+k.e;U=t+k.Z}var i=new Uint8Array(h.buffer),z=new Uint32Array(h.buffer);
|
|
for(var D=t;D<U;D++)for(var R=P;R<M;R++){var Q=D*I+R;if((W[Q]&128)!=0&&(D==0||(W[Q-I]&128)==0||R==0||(W[Q-1]&128)==0||R==I-1||(W[Q+1]&128)==0||D==q-1||(W[Q+I]&128)==0)){z[Q]=p[(R+D&4)>>>2]}}};
|
|
N.q.a7y=function(W,h,S,k,p,I){var q=S.e,P=S.Z,t=0,M=0,U=q,i=P;if(k){t=k.x-S.x;M=k.y-S.y;U=t+k.e;i=M+k.Z}var z=new Uint8Array(h.buffer),D=new Uint32Array(h.buffer);
|
|
for(var R=M;R<i;R++)for(var O=t;O<U;O++){var Q=R*q+O,b=W[Q];if(p==1)D[Q]=255-b>>>1<<24|255;else D[Q]=255<<24|(b<<16|b<<8|b)}};
|
|
N.kn={};N.kn.b0=function(W,h,S){var k,p;if(S==0){k=W.rect.clone();p=N.kn.amL}if(S==1){k=W.rect.r8(h.rect);
|
|
p=N.kn.r8}if(S==2){k=h.rect.clone();p=N.kn.ajv}if(S==3){k=W.rect.r$(h.rect);p=N.kn.r$}if(S==4){k=W.rect.r8(h.rect);
|
|
p=N.kn.a75}if(k.ZP())return null;var I=N.U(k.n());N.vG(h.channel,h.rect,I,k);var q=N.U(k.n());N.vG(W.channel,W.rect,q,k);
|
|
p(q,I,I);var P=N.oA(I,k);if(P.ZP())return null;if(!P.xX(k)){var t=N.U(P.n());N.vG(I,k,t,P);I=t;k=P}return{channel:I,rect:k}};
|
|
N.kn.amL=function(W,h,S){for(var Q=0;Q<W.length;Q++)S[Q]=W[Q]};N.kn.r8=function(W,h,S){for(var Q=0;Q<W.length;
|
|
Q++)S[Q]=Math.min(W[Q]+h[Q],255)};N.kn.ajv=function(W,h,S){for(var Q=0;Q<W.length;Q++)S[Q]=Math.max(h[Q]-W[Q],0)};
|
|
N.kn.r$=function(W,h,S){var k=1/255;for(var Q=0;Q<W.length;Q++)S[Q]=W[Q]*h[Q]*k};N.kn.a75=function(W,h,S){var k=1/255;
|
|
for(var Q=0;Q<W.length;Q++)S[Q]=Math.min(W[Q]+h[Q],255)-W[Q]*h[Q]*k};N.pq=function(W,h){this.D=[];this.Zz=[0];
|
|
this.yX=[];this.B3=[];this.Ae=[0];this.O1=[];this.wQ=[];this.rows=W;this.cols=h};N.pq.prototype.clone=function(){var W=this,h=W.rows,S=W.cols,k=new N.pq(h,S);
|
|
k.D=W.D.slice(0);k.Zz=W.Zz.slice(0);k.yX=W.yX.slice(0);k.B3=W.B3.slice(0);k.Ae=W.Ae.slice(0);k.O1=W.O1.slice(0);
|
|
k.wQ=W.wQ.slice(0);return k};N.pq.prototype.bz=function(W,h,S){var k=this.Zz.length-1;for(var Q=0;Q<S;
|
|
Q++){var p=W[Q],I=h[Q];this.D.push(p);this.yX.push(I);if(I==k){this.wQ.push(p==0?0:1/p)}else{this.B3.push(p);
|
|
this.O1.push(I)}}this.Zz.push(this.D.length);this.Ae.push(this.B3.length)};N.pq.prototype.ZQ=function(W,h){var S=this,k=S.rows,p=S.D,I=S.yX;
|
|
if(h==null)h=new Array(k);for(var Q=0;Q<k;Q++){var q=S.Zz[Q],P=S.Zz[Q+1],t=0;while((P-q&3)!=0){t+=p[q]*W[I[q]];
|
|
q++}for(var M=q;M<P;M+=4)t+=p[M]*W[I[M]]+p[M+1]*W[I[M+1]]+p[M+2]*W[I[M+2]]+p[M+3]*W[I[M+3]];h[Q]=t}return h};
|
|
N.pq.prototype.multiply=function(W){return this.cu(W.Vg())};N.pq.prototype.cu=function(W){var h=this,S=h.rows,k=h.cols,p=W.rows,I=new N.pq(S,p),q=h.yX,P=W.yX;
|
|
for(var Q=0;Q<S;Q++){var t=[],M=[],U=h.Zz[Q],i=h.Zz[Q+1];for(var z=0;z<p;z++){var D=W.Zz[z],R=W.Zz[z+1],O=0,b=U,w=D;
|
|
while(b<i&&w<R){var A=Math.max(q[b],P[w]);while(b<i&&q[b]<A)b++;while(w<R&&P[w]<A)w++;if(b<i&&w<R&&q[b]==P[w])O+=h.D[b++]*W.D[w++]}if(O!=0){t.push(O);
|
|
M.push(z)}}I.bz(t,M,t.length)}return I};N.pq.prototype.Vg=function(){var W=this.rows,h=this.cols,S=[];
|
|
for(var Q=0;Q<h;Q++)S.push([[],[]]);var k=this.D,p=this.Zz,I=this.yX;for(var Q=0;Q<W;Q++){var q=p[Q],P=p[Q+1];
|
|
for(var t=q;t<P;t++){var M=S[I[t]];M[0].push(k[t]);M[1].push(Q)}}var U=new N.pq(h,W);for(var Q=0;Q<h;
|
|
Q++)U.bz(S[Q][0],S[Q][1],S[Q][1].length);return U};N.pq.prototype.J4=function(){var W=this.rows,h=this.cols,S=new Array(W),k=this.D,p=this.Zz,I=this.yX;
|
|
for(var Q=0;Q<W;Q++){var q=S[Q]=new Array(h);for(var P=0;P<h;P++)q[P]=0;var t=p[Q],M=p[Q+1];for(var U=t;
|
|
U<M;U++)q[I[U]]=k[U]}return S};N.pq.prototype.Hn=function(W,h,S,k,p){function I(d,h,L,_){var T=d.length;
|
|
for(var Q=0;Q<T;Q++)_[Q]=d[Q]-h[Q]*L}function q(d,h,L,_){var T=d.length,c=0;while((T-c&3)!=0){_[c]=d[c]+h[c]*L;
|
|
c++}for(var Q=c;Q<T;Q+=4){_[Q]=d[Q]+h[Q]*L;_[Q+1]=d[Q+1]+h[Q+1]*L;_[Q+2]=d[Q+2]+h[Q+2]*L;_[Q+3]=d[Q+3]+h[Q+3]*L}}function P(d,h,L){var _=d.length;
|
|
for(var Q=0;Q<_;Q++)L[Q]=d[Q]*h[Q]}function t(d,h){var L=d.length,_=0,T=0;while((L-_&3)!=0){T+=d[_]*h[_];
|
|
_++}for(var Q=_;Q<L;Q+=4)T+=d[Q]*h[Q]+d[Q+1]*h[Q+1]+d[Q+2]*h[Q+2]+d[Q+3]*h[Q+3];return T}var M=k!=null?2:1,U=Date.now(),i=0,z=this,D=W.slice(0),R=W.slice(0);
|
|
z.ZQ(W,R);I(h,R,1,D);var O=this.wQ;if(M==0){O=D.slice(0);O.fill(1)}var b=D.slice(0);P(O,D,b);var w=b.slice(0),A=t(D,b);
|
|
while(!0){z.ZQ(w,R);var g=A/t(w,R);q(W,w,g,W);I(D,R,g,D);if((i&7)==0&&Math.sqrt(t(D,D))<S)break;if(M<=1)P(O,D,b);
|
|
else{var E=D.slice(0);k.afI(E,D);p.aiu(b,E)}var j=t(D,b),x=j/A;q(b,w,x,w);A=j;i++}};N.pq.prototype.ad_=function(W,h,S,k){var p=Date.now(),I=1.96,P=0;
|
|
if(S==null)S=5e-6;if(k==null)k=1e9;var q=1-I,g8=this.rows,t=this.B3,M=this.Ae,U=this.O1,i=this.wQ;while(!0){var z=0;
|
|
for(var Q=0;Q<g8;Q++){var D=h[Q],R=M[Q],O=M[Q+1];if(O-R==4)D-=t[R]*W[U[R]]+t[R+1]*W[U[R+1]]+t[R+2]*W[U[R+2]]+t[R+3]*W[U[R+3]];
|
|
else for(var b=R;b<O;b++)D-=t[b]*W[U[b]];var w=W[Q]*q+i[Q]*D*I,A=w-W[Q];z+=A*A;W[Q]=w}if(z/g8<S||Date.now()>p+k)break}};
|
|
N.pq.prototype.aoA=function(W,h,S,k){var p=Date.now(),I=1.96,P=0;if(S==null)S=5e-5;if(k==null)k=1e9;
|
|
var q=1-I,g8=this.rows,t=this.B3,M=this.Ae,U=this.O1,i=this.wQ;while(!0){var z=0;for(var Q=0;Q<g8;Q++){var D=Q*3,R=h[D],O=h[D+1],b=h[D+2],w=M[Q],A=M[Q+1];
|
|
for(var g=w;g<A;g++){var E=t[g],j=U[g]*3;R-=E*W[j+0];O-=E*W[j+1];b-=E*W[j+2]}var x=i[Q]*I,d=W[D+0]*q+R*x,L=W[D+1]*q+O*x,_=W[D+2]*q+b*x,T=d-W[D+0],c=L-W[D+1],e=_-W[D+2];
|
|
z+=.4*T*T+.5*c*c+.1*e*e;W[D+0]=d;W[D+1]=L;W[D+2]=_}if(z/g8<S||Date.now()>p+k)break}};N.Ey={};N.Ey.xA=function(W,h,S){return{t:"Objc",v:{classID:"CrPt",Hrzn:{t:"doub",v:W},Vrtc:{t:"doub",v:h},Cnty:{t:"bool",v:S}}}};
|
|
N.Ey.A=function(W,h){for(var Q=0;Q<W.length;Q++){var S=W[Q].v,k=h.xK(new eC(S.Hrzn.v,S.Vrtc.v));S.Hrzn.v=Math.round(k.x);
|
|
S.Vrtc.v=Math.round(k.y)}};N.Ey.xE=function(W,h,S){var g8=W.length-1,k=N.tf.FD(g8+1,g8+2);for(var Q=1;
|
|
Q<g8;Q++){k[Q][Q-1]=1/(W[Q]-W[Q-1]);k[Q][Q]=2*(1/(W[Q]-W[Q-1])+1/(W[Q+1]-W[Q]));k[Q][Q+1]=1/(W[Q+1]-W[Q]);
|
|
k[Q][g8+1]=3*((h[Q]-h[Q-1])/((W[Q]-W[Q-1])*(W[Q]-W[Q-1]))+(h[Q+1]-h[Q])/((W[Q+1]-W[Q])*(W[Q+1]-W[Q])))}k[0][0]=2/(W[1]-W[0]);
|
|
k[0][1]=1/(W[1]-W[0]);k[0][g8+1]=3*(h[1]-h[0])/((W[1]-W[0])*(W[1]-W[0]));k[g8][g8-1]=1/(W[g8]-W[g8-1]);
|
|
k[g8][g8]=2/(W[g8]-W[g8-1]);k[g8][g8+1]=3*(h[g8]-h[g8-1])/((W[g8]-W[g8-1])*(W[g8]-W[g8-1]));N.tf.SS(k,S)};
|
|
N.Ey.adD=function(W,h,S,k){if(W<=h[0])return S[0];if(W>=h[h.length-1])return S[h.length-1];var Q=1;while(h[Q]<W)Q++;
|
|
var p=h[Q],I=h[Q-1],q=S[Q],P=S[Q-1],t=(W-I)/(p-I),M=k[Q-1]*(p-I)-(q-P),U=-k[Q]*(p-I)+(q-P),i=(1-t)*P+t*q+t*(1-t)*(M*(1-t)+U*t);
|
|
return i};N.Ey.yO=function(W,h,S,k){var p={WB:[W[0]],wj:[h[0]],R1:[]};k[0]=p;for(var Q=1;Q<W.length-1;
|
|
Q++){p.WB.push(W[Q]);p.wj.push(h[Q]);if(S[Q]==!1){N.Ey.xE(p.WB,p.wj,p.R1);p={WB:[W[Q]],wj:[h[Q]],R1:[]}}k[Q]=p}p.WB.push(W[Q]);
|
|
p.wj.push(h[Q]);N.Ey.xE(p.WB,p.wj,p.R1);k[Q]=p};N.Ey.t_=function(W,h,S,k){if(W<=h[0])return S[0];if(W>=h[h.length-1])return S[h.length-1];
|
|
var Q=1;while(h[Q]<W)Q++;var p=k[Q-1];return N.Ey.adD(W,p.WB,p.wj,p.R1)};N.Ey.mU=function(W){var h={WB:[],wj:[],yZ:[]};
|
|
for(var Q=0;Q<W.length;Q++){h.WB[Q]=W[Q].v.Hrzn.v;h.wj[Q]=W[Q].v.Vrtc.v;h.yZ[Q]=W[Q].v.Cnty?W[Q].v.Cnty.v:!0}return h};
|
|
N.Ey.AE=function(W,g8,h){var S=0,k=255;if(h){S=-1e9;k=1e9}var p=N.Ey.mU(W),I=[];N.Ey.yO(p.WB,p.wj,p.yZ,I);
|
|
var q=[];for(var Q=0;Q<g8;Q++)q[Q]=1/255*Math.max(S,Math.min(k,N.Ey.t_(Q*(255/(g8-1)),p.WB,p.wj,I)));
|
|
return q};N.Ey.aap=function(W,g8,h){var S=Math.round(W.length/20),k=g8-W.length,p=h?(W[S]-W[0])/S:0,I=h?W[0]-k*p:W[W.length-1],q=[];
|
|
for(var Q=0;Q<k;Q++)q.push(I+Q*p);return h?q.concat(W):W.concat(q)};N.Ey.vm=function(W,g8,h){var S=N.Ey.mU(W),k=[];
|
|
N.Ey.yO(S.WB,S.wj,S.yZ,k);var p=new Uint8Array(g8),I=g8/256;for(var Q=0;Q<g8;Q++)p[Q]=Math.max(0,Math.min(g8-1,N.Ey.t_(Q*I,S.WB,S.wj,k)));
|
|
if(h){p[0]=0;if(p[1]>100)p[1]=.4*p[1];if(p[2]>150)p[1]=.7*p[2]}return p};N.Ey.hH=function(W,h){var S=new Uint8Array(W.length);
|
|
for(var Q=0;Q<W.length;Q++)S[Q]=h[W[Q]];return S};N.Ey.qP=function(W,h,S){var k=document.createElement("canvas");
|
|
k.width=h;k.height=S;var p=k.getContext("2d"),I=N.Ey.vm(W,256);p.scale(h/255,S/255);p.fillStyle="#fff";
|
|
p.fillRect(0,0,255,255);p.fillStyle="#333";p.beginPath();p.moveTo(0,255);for(var Q=0;Q<I.length;Q++)p.lineTo(Q,255-I[Q]);
|
|
p.lineTo(255,255);p.closePath();p.fill();return k.toDataURL()};N.style={};N.style.stroke=function(W,h,S,k){var p=S.e,I=S.Z,q=new Float64Array(p*I);
|
|
N.style._f(W,q,p,I);N.style.WR(h,S,q,S,k)};N.style.WR=function(W,h,S,k,p){var I=h.r$(k),q=I.e,P=I.Z;
|
|
p+=.5;var t=I.x-h.x,M=I.y-h.y,U=h.e,i=I.x-k.x,z=I.y-k.y,D=k.e;for(var R=0;R<P;R++){var O=(R+z)*D+i,b=(R+M)*U+t;
|
|
for(var w=0;w<q;w++){var A=Math.max(0,Math.min(1,p-S[O+w]));W[b+w]=Math.round(A*255)}}};N.style.aji=function(W,h,S,k){for(var p=0;
|
|
p<S;p++)for(var I=0;I<h;I++){var q=p*h+I,P=0,t=0,M=W[q];if(I==0||p==0){P=W[q+1]-M;t=W[q+h]-M}else if(I==S-1||p==h-1){P=M-W[q-1];
|
|
t=M-W[q-h]}else{P=W[q+1]-W[q-1];t=W[q+h]-W[q-h]}if(P!=0||t!=0){var U=1/Math.sqrt(P*P+t*t);P*=U;t*=U}k[q+q]=P;
|
|
k[q+q+1]=t}};N.style._f=function(W,h,S,k){var p=0,I=S*k;for(var Q=0;Q<I;Q++)p|=W[Q];if(p==0){h.fill(1e9);
|
|
return}var q=N.style.AV(W,S,k);for(var P=0;P<k;P++)for(var t=0;t<S;t++){var Q=P*S+t,M=q[Q*2],U=q[Q*2+1],i=(P+U)*S+t+M;
|
|
if(M==0&&U==0){h[Q]=0;continue}var z=Math.sqrt(M*M+U*U),D=W[i]*(1/255),R=1/z,O=Math.abs(M)*R,b=Math.abs(U)*R;
|
|
if(b>O){var w=b;b=O;O=w}h[Q]=z+N.style.ahk(O,b,D)}};N.style.ahk=function(W,h,S){return(.5-S)*W};N.style.AV=function(W,h,S,k){var p=new Int16Array(h*S*2);
|
|
N.style.a3M(W,p,h,S,128);return p};N.style.a3M=function(W,h,S,k,p){var I=new Int32Array(S*k);N.style.ael(W,I,S,k,p);
|
|
N.style.alL(I,h,S,k)};N.style.ael=function(W,h,S,k,p){var I=new Int32Array(k);for(var q=0;q<S;q++){var P=S+k;
|
|
for(var t=k-1;t>=0;t--){if(W[t*S+q]>p)P=0;else P++;I[t]=P}P=S+k;for(var t=0;t<k;t++){if(W[t*S+q]>p)P=0;
|
|
else P++;h[t*S+q]=P<I[t]?-P:I[t]}}};N.style.alL=function(W,h,S,k){var p=(S+k)*(S+k),I=new Float64Array(S),q=new Uint16Array(S);
|
|
for(var P=0;P<k;P++){var t=P*S,M=0;q[0]=0;I[0]=-p;I[1]=+p;for(var U=1;U<S;U++){var i=W[U+t]*W[U+t]+U*U,z=(i-(W[q[M]+t]*W[q[M]+t]+q[M]*q[M]))/(2*U-2*q[M]);
|
|
while(z<=I[M]){M--;z=(i-(W[q[M]+t]*W[q[M]+t]+q[M]*q[M]))/(2*U-2*q[M])}M++;q[M]=U;I[M]=z;I[M+1]=p}M=0;
|
|
for(var U=0;U<S;U++){while(I[M+1]<U)M++;var D=q[M]-U,R=W[q[M]+t],Q=P*S+U<<1;h[Q]=D;h[Q+1]=R}}};N.style.$J=function(W,h,S){if(S)for(var Q=0;
|
|
Q<W.length;Q++){var k=W[Q];if(k>0)W[Q]=Math.max(0,Math.min(255,k+h*2*(N.style.Gf(Q)-128)))}else for(var Q=0;
|
|
Q<W.length;Q++){var k=W[Q];if(k>0)W[Q]=Math.max(0,Math.min(255,k+Math.min(k*3,h*2*(N.style.Gf(Q)-128))))}};
|
|
N.style.Gf=function(W){W=W^61^W>>16;W=W+(W<<3);W=W^W>>4;W=W*668265261;W=W^W>>15;return W&255};N.CS={};
|
|
N.CS.Li=function(W,h,S){var k=W.canvas;if(k.width!=h||k.height!=S){k.width=h;k.height=S}};N.CS.TN=function(W,h,S,k,p,I){N.CS.Li(W,h,S);
|
|
if(I==null)I=!1;var q=p.channel,P=p.rect,t=!p.isEnabled;if(h*S==0)return;var M=W.createImageData(h,S),U=M.data,i=1/h,z=1/S;
|
|
for(var Q=0;Q<S;Q++)for(var D=0;D<h;D++){var R=Q*h+D,O=R*4,b=Math.round(k.x+D*i*k.e),w=Math.round(k.y+Q*z*k.Z),A=0;
|
|
if(b<P.x||b>=P.x+P.e||w<P.y||w>=P.y+P.Z)A=p.color;else A=q[(w-P.y)*P.e+(b-P.x)];A=255*(255-p.T4)+A*p.T4>>>8;
|
|
if(I)A=170+Math.round(.4*(A-170));U[O]=A;U[O+1]=A;U[O+2]=A;U[O+3]=255}W.putImageData(M,0,0);if(t)N.CS.wX(W,h,S)};
|
|
N.CS.Hh=[];N.CS.a4T=function(W,h,S,k){var p,I,q;p=Math.ceil(Math.max(h,S)*.35);I=h-p;q=S-p;var P=N.CS.Hh[p];
|
|
if(P==null){var t=N.hi(p,p);t.fillStyle="#eeeeee";t.fillRect(0,0,p,p);var M=Math.round(p*.27),U=t.lineWidth=Math.max(1,Math.round(p*.12)),i=U/2;
|
|
t.strokeRect(1+i,1+i,p-U-2,p-U-2);t.strokeRect(M+i,M+i,p-M-M-U,p-M-M-U);P=N.CS.Hh[p]=t.getImageData(0,0,p,p)}W.putImageData(P,I,q)};
|
|
N.CS.ir=[];N.CS.apb=function(W,h,S){var k,p,I;k=Math.ceil(Math.max(h,S)*.35);p=h-k;I=S-k;var q=N.CS.ir[k];
|
|
if(q==null){var P=N.hi(k,k);P.fillStyle="#eeeeee";P.fillRect(0,0,k,k);P.lineWidth=1;P.strokeRect(2.5,2.5,k-5,k-5);
|
|
var t=P.createImageData(3,3);N.wM(t.data,4278190080);t.data[4*4]=t.data[4*4+1]=t.data[4*4+2]=238;P.putImageData(t,1,1);
|
|
P.putImageData(t,k-4,1);P.putImageData(t,1,k-4);P.putImageData(t,k-4,k-4);q=N.CS.ir[k]=P.getImageData(0,0,k,k)}W.putImageData(q,p,I)};
|
|
N.CS.aev=function(W,h,S,k,p){N.CS.Li(W,h,S);var I=h/k.e;if(h*S==0)return;W.fillStyle="#999999";W.setTransform(1,0,0,1,0,0);
|
|
W.clearRect(0,0,h,S);var q=N.CS.Rp;if(q==null){q=N.CS.Rp=JSON.parse(JSON.stringify(hz.EJ.default));q.strokeEnabled.v=!0}q.strokeStyleLineWidth.v.val=1/I;
|
|
W.fillStyle="#ffffff";W.scale(I,I);N.$.$Y(p.T,W,0,0);N.$.$Y(p.T,W,0,0,q)};N.CS.Y6=null;N.CS.uD=function(W,h,S,k,p,I,q,P){N.CS.Li(W,h,S);
|
|
if(h*S==0)return;var t=Math.max(h,S),M=N.CS.Y6;if(M==null||M.width<t||M.height<t){N.CS.Y6=M=W.createImageData(t,t)}t=M.width;
|
|
var U=M.data,i=k.e/h,z=k.Z/S,D=I.x,R=I.x+I.e,O=I.y,b=I.y+I.Z;for(var Q=0;Q<S;Q++)for(var w=0;w<h;w++){var A=Q*t+w,g=A*4,E=~~(k.x+w*i),j=~~(k.y+Q*z),x=N.sy(Q,w,2);
|
|
if(E<D||E>=R||j<O||j>=b){U[g]=x;U[g+1]=x;U[g+2]=x;U[g+3]=255}else{var d=(j-I.y)*I.e+(E-I.x)<<2,L=p[d+3]*(1/255);
|
|
U[g]=p[d+0]*L+x*(1-L);U[g+1]=p[d+1]*L+x*(1-L);U[g+2]=p[d+2]*L+x*(1-L);U[g+3]=255}}if(P!=null)for(var Q=0;
|
|
Q<U.length;Q+=4)U[Q]=U[Q+1]=U[Q+2]=U[Q+P];W.putImageData(M,0,0);if(q)N.CS.wX(W,h,S)};N.CS.ate=function(W,h,S,k){N.CS.Li(W,h,S);
|
|
W.fillStyle=N.CS.iZ(k.Clr.v);W.fillRect(0,0,h,S);N.CS.Gb(W,h,S)};N.CS.mE=null;N.CS.a8O=function(W,h,S,k){N.CS.Li(W,h,S);
|
|
var p=W.canvas.width,I=W.canvas.height,q=N.CS.mE;if(q==null||q.width!=p||q.height!=I){W.fillStyle="#ffffff";
|
|
W.fillRect(0,0,h,S);W.fillStyle="#000000";W.font=""+S*.7+"px serif";W.fillText("T",(h-S*.43)/2,S*.75);
|
|
W.fillText("T",(h-S*.43)/2,S*.75);N.CS.mE=W.getImageData(0,0,p,I)}else W.putImageData(q,0,0)};N.CS.aqj=function(W,h,S){N.CS.Li(W,h,S);
|
|
W.clearRect(0,0,h,S);W.font=S*.7+"px serif";W.fillText(":(",(h-S*.43)/2,S*.7)};N.CS.arp=function(W,h,S,k){N.CS.Li(W,h,S);
|
|
var p=bS.get(k),I=W.canvas.width,q=N.CS.fp[I+p];if(q==null){var P=PIMG["adj/"+p],t=hI.Qj(P),M=UPNG.decode(t.buffer),U=new Uint8Array(UPNG.toRGBA8(M)[0]),i=new gj(0,0,160,160),z=0,D=I-z*2,R=a.Q.ry([U,i],new ex(D/160,0,0,D/160,0,0)),O=new gj(0,0,I,I),b=N.U(O.n()*4);
|
|
N.a.ha("norm",R.buffer,R.rect,b,O,R.rect,1);q=N.CS.fp[I+p]=new ImageData(new Uint8ClampedArray(b.buffer),I,I)}W.putImageData(q,0,0)};
|
|
N.CS.fp={};N.CS.aml=function(W,h,S,k){N.CS.Li(W,h,S);var p=W.canvas.width,I=W.canvas.height,q=W.getImageData(0,0,p,I);
|
|
N.X.S3(k.Grad.v,new Uint8Array(q.data.buffer),new gj(0,0,p,I),[1/p,0,0,1/I],p/2,I/2,!1,0,16711680,65280);
|
|
W.putImageData(q,0,0);N.CS.Gb(W,h,S)};N.CS.a6b=function(W,h,S,k,p){N.CS.Li(W,h,S);var I=W,q=jO.W4(k.Ptrn.v,p.add.Patt);
|
|
if(q==null)return;var P=q.jR[1];N.CS.uD(W,h,S,P,q.jR[0],P,!1);N.CS.Gb(I,h,S)};N.CS.wX=function(W,h,S){W.strokeStyle="#bb0000";
|
|
W.lineWidth=3;W.beginPath();W.moveTo(h*.15,S*.15);W.lineTo(h*.85,S*.85);W.moveTo(h*.85,S*.15);W.lineTo(h*.15,S*.85);
|
|
W.closePath();W.stroke()};N.CS.Gb=function(W,h,S){W.fillStyle="#eeeeee";W.fillRect(0,S*.75,h,S*.25);
|
|
W.beginPath();W.moveTo(0,S*.75);W.lineTo(h,S*.75);W.moveTo(h*.1,S*.875);W.lineTo(h*.9,S*.875);W.moveTo(h*.65,S*.825);
|
|
W.lineTo(h*.65,S*.95);W.closePath();W.stroke()};N.CS.iZ=function(W){var h=N.X.iZ(W),S=Math.round(h.p)<<16|Math.round(h.z)<<8|Math.round(h.S);
|
|
return"#"+N.fl(S)};N.$={};N.$.kY=function(W,h,S){var k=[],p=-1;for(var Q=0;Q<W.length;Q++){var I=W[Q];
|
|
if((I.type==0||I.type==3)&&I.VZ!=-1)p++;if(I.type>5||I.type==0||I.type==3)continue;if(h!=null&&h.indexOf(p)==-1)continue;
|
|
if(S!=null&&S.indexOf(Q)==-1)continue;k.push(I.bq.x);k.push(I.bq.y);k.push(I.M.x);k.push(I.M.y);k.push(I.tk.x);
|
|
k.push(I.tk.y)}return k};N.$.OB=function(W,h,S,k){var p=0,I=-1;for(var Q=0;Q<h.length;Q++){var q=h[Q];
|
|
if((q.type==0||q.type==3)&&q.VZ!=-1)I++;if(q.type>5||q.type==0||q.type==3)continue;if(S!=null&&S.indexOf(I)==-1)continue;
|
|
if(k!=null&&k.indexOf(Q)==-1)continue;q.bq.Yh(W[p],W[p+1]);q.M.Yh(W[p+2],W[p+3]);q.tk.Yh(W[p+4],W[p+5]);
|
|
p+=6}};N.$.ac=function(W,h,S,k){var p=N.$.kY(W,S,k);N.H.A(p,h,p);N.$.OB(p,W,S,k)};N.$.ajV=function(W,h,S,k){var p=N.$.kY(W,S,k);
|
|
N.V.A(h,p);N.$.OB(p,W,S,k)};N.$.aoM=function(W,h,S,k){if(S==null&&k==null){var p=N.$.amv(W,40);for(var Q=0;
|
|
Q<p.length;Q++)W[Q]=p[Q]}var I=N.$.kY(W,S,k);N.hx.A(h,I,N.H.TA(I));N.$.OB(I,W,S,k)};N.$.amv=function(W,h){var S=[];
|
|
for(var Q=0;Q<W.length;Q++){var k=W[Q];if(k.type>5){S.push(JSON.parse(JSON.stringify(k)));continue}var p=N.$.a0r(W,Q+1,k.length);
|
|
p=N.H.Lq(p,h);var I=N.$.aoB(p);Q+=k.length;k=JSON.parse(JSON.stringify(k));k.length=I.length;S.push(k);
|
|
for(var q=0;q<I.length;q++)S.push(I[q])}return S};N.$.a0r=function(W,h,S){var k={C:["M"],s:[]},p=W[h],I=W[h+S-1];
|
|
k.s.push(p.M.x,p.M.y);for(var Q=1;Q<S;Q++){var q=W[h+Q-1],P=W[h+Q];k.C.push("C");k.s.push(q.tk.x,q.tk.y,P.bq.x,P.bq.y,P.M.x,P.M.y)}k.C.push("C");
|
|
k.s.push(I.tk.x,I.tk.y,p.bq.x,p.bq.y,p.M.x,p.M.y);return k};N.$.aoB=function(W){var h=[],S=W.C,k=W.s,p=0,g8=k.length;
|
|
h.push({type:2,bq:new eC(k[g8-4],k[g8-3]),M:new eC(k[0],k[1]),tk:new eC(k[2],k[3])});for(var Q=0;Q<S.length-2;
|
|
Q++){var I=Q*6+4;h.push({type:2,bq:new eC(k[I],k[I+1]),M:new eC(k[I+2],k[I+3]),tk:new eC(k[I+4],k[I+5])})}return h};
|
|
N.$.atj=function(W){for(var Q=0;Q<W.length;Q++){if(W[Q].type>5)continue;var h=W[Q].length;if(!(h==4||h==6||h==8)){Q+=h;
|
|
continue}for(var S=0;S<h;S++){var k=W[Q+1+S],p=W[Q+1+(S+1)%h],I=Math.min(k.M.x,p.M.x),q=Math.min(k.M.y,p.M.y),P=0,t=0;
|
|
if(k.M.x<p.M.x){P=k.M.y-q;t=P-(p.M.x-I)}else{P=p.M.y-q;t=P-(k.M.x-I)}if(Math.abs(t)<.2*P)return P}}return-1};
|
|
N.$.E6=function(W,h,S){function k(z,D){var R=Math.min(z.x,D.x),O=Math.min(z.y,D.y),b=Math.max(z.x+z.e,D.x+D.e),w=Math.max(z.y+z.Z,D.y+D.Z);
|
|
return new gj(R,O,b-R,w-O)}var p=null,I=-1,q=!N.$.xZ(W);for(var Q=0;Q<W.length;Q++){var P=W[Q];if(P.type>5)continue;
|
|
if((P.type==0||P.type==3)&&P.VZ!=-1)I++;if(h!=null&&h.indexOf(I)==-1)continue;if(Q==W.length-1)break;
|
|
var t=P.type==3,M=P.length,U=P.VZ,i=N.$.a9l(W,Q+1,M,t);if(p==null)p=i;else if(S)p=k(p,i);else if(q){if(h!=null||U==0||U==-1||U==2)p=k(p,i);
|
|
else if(U==1)p=p;else if(U==3){p=i;q=!1}}else{if(h!=null||U==0||U==-1||U==1)p=k(p,i);else if(U==2)p=p;
|
|
else if(U==3)p=p.r$(i)}Q+=M}if(p==null||p.e<0||p.Z<0)p=new gj(0,0,0,0);return p};N.$.aaR=new Float64Array(4);
|
|
N.$.a9l=function(W,Q,h,S){var k=N.$.aaR;k[0]=1e30;k[1]=1e30;k[2]=-1e30;k[3]=-1e30;var p=W[Q+h-1];if(!S)N.$.Ln(p.M.x,p.M.y,p.tk.x,p.tk.y,W[Q].bq.x,W[Q].bq.y,W[Q].M.x,W[Q].M.y,k);
|
|
for(var I=Q;I<Q+h-1;I++){var q=W[I],P=W[I+1];N.$.Ln(q.M.x,q.M.y,q.tk.x,q.tk.y,P.bq.x,P.bq.y,P.M.x,P.M.y,k)}return new gj(k[0],k[1],k[2]-k[0],k[3]-k[1])};
|
|
N.$.Ln=function(W,h,S,k,p,I,q,P,t){if(W==S&&h==k&&p==q&&I==P){t[0]=Math.min(t[0],Math.min(W,q));t[1]=Math.min(t[1],Math.min(h,P));
|
|
t[2]=Math.max(t[2],Math.max(W,q));t[3]=Math.max(t[3],Math.max(h,P));return}var M=W,U=h,i=W,z=h,D=40,R=1/(D-1);
|
|
for(var O=0;O<D;O++){var b=O*R,w=1-b,A=w*w*w,g=3*w*w*b,E=3*w*b*b,j=b*b*b,x=A*W+g*S+E*p+j*q,d=A*h+g*k+E*I+j*P;
|
|
if(x<M)M=x;else if(x>i)i=x;if(d<U)U=d;else if(d>z)z=d}if(M<t[0])t[0]=M;if(U<t[1])t[1]=U;if(i>t[2])t[2]=i;
|
|
if(z>t[3])t[3]=z};N.$.YG=function(W,h){var S=W.length-3,k=h%S,p=Math.floor(k);if(h<0||p>=S)return null;
|
|
var I=W[3+p],q=W[3+(p+1)%S],P=I.M,t=I.tk,M=q.bq,U=q.M,i=k-p,z=1-i,D=z*z*z*P.x+3*z*z*i*t.x+3*z*i*i*M.x+i*i*i*U.x,R=z*z*z*P.y+3*z*z*i*t.y+3*z*i*i*M.y+i*i*i*U.y;
|
|
return new eC(D,R)};N.$.y6=function(W){var h=N.H.H7(W),S=h.Tu;h.Tu=Typr.U.pathToSVG({crds:S.s,cmds:S.C},2);
|
|
return h};N.$.CJ=function(W){N.$.aN();var h,S=N.$.hS(W),k=[];for(var Q=0;Q<S.length;Q++){var p=S[Q][0],I=S[Q][1];
|
|
if(Math.abs(p.area)<1e-5)k.push(p);else if(h==null)h=p;else{if(!p.closed)p.closed=!0;h=h[I](p);h.remove()}}if(h==null)h=new paper.CompoundPath(k);
|
|
else{if(h.segments)h=new paper.CompoundPath(h);for(var Q=0;Q<k.length;Q++){h.addChild(k[Q])}}var q=W.slice(0,2);
|
|
q=q.concat(N.$.tV(h));if(q[2])q[2].VZ=1;for(var Q=3;Q<q.length;Q++)if(q[Q].VZ!=null)q[Q].VZ=-1;return q};
|
|
N.$.aN=function(){if(N.$.aqV==null){var W=document.createElement("canvas");paper.setup(W);N.$.aqV=!0}};
|
|
N.$.amw=function(W,h){N.$.aN();var S=[],k=N.$.hS(W),p=new paper.Path.Rectangle(new paper.Rectangle(h.x,h.y,h.e,h.Z));
|
|
p.remove();p.fillColor=new paper.Color(1,0,0);for(var Q=0;Q<k.length;Q++){if(p.intersects(k[Q][0])||p.contains(k[Q][0].children[0].segments[0].point))S.push(Q)}return S};
|
|
N.$.IC=function(W,h,S,k){N.$.aN();var p=S?{curves:!0,tolerance:k}:null,I=new paper.Point(h.x,h.y),q=N.$.hS(W);
|
|
for(var Q=q.length-1;Q>=0;Q--){var P=q[Q][0],t=P.hitTest(I,p);if(t!=null)return{Kr:Q,f9:S?t.location.index:null}}return{Kr:-1}};
|
|
N.$.nw=function(W,h,S){var k=[[],[],[]];for(var Q=0;Q<W.length;Q++){var p=W[Q];if(p.type>5||p.type==0||p.type==3)continue;
|
|
var I=S==null?!0:S.indexOf(Q)!=-1;if(h.mA(p.M))k[0].push(Q);if(h.mA(p.bq)&&I)k[1].push(Q);if(h.mA(p.tk)&&I)k[2].push(Q)}return k};
|
|
N.$.arU=function(W,h,S){var k=S.slice(0),p=[null,null],I=-1,P=null;for(var Q=2;Q<W.length;Q++){if((W[Q].type==0||W[Q].type==3)&&W[Q].VZ!=-1)I++;
|
|
p[Q]=S[I]}S=p;var q=W.slice(0,2);p=S.slice(0,2);for(var Q=2;Q<W.length;Q++){if(W[Q].type==0||W[Q].type==3){P=W[Q];
|
|
q.push(P);p.push(S[Q])}else{if(h.indexOf(Q)==-1){q.push(W[Q]);p.push(S[Q])}else{P.length--;N.uy.uP(S,Q)}}}for(var Q=2;
|
|
Q<q.length;Q++){var t=q[Q];if(t.type!=0&&t.type!=3)continue;if(t.length==0){if(q[Q+1]&&q[Q+1].VZ==-1){q[Q+1].VZ=t.VZ}p.splice(Q,1);
|
|
q.splice(Q,1);Q--}}for(var Q=0;Q<k.length;Q++)if(p.indexOf(k[Q])==-1){k.splice(Q,1);Q--}return q};N.$.a51=function(W,h){var S=W.slice(0,2),k=-1;
|
|
for(var Q=2;Q<W.length;Q++){if((W[Q].type==0||W[Q].type==3)&&W[Q].VZ!=-1)k++;if(h.indexOf(k)==-1)S.push(W[Q])}return S};
|
|
N.$.a5K=function(W,h){var S=W.slice(0,2),k=-1;for(var Q=2;Q<W.length;Q++){if((W[Q].type==0||W[Q].type==3)&&W[Q].VZ!=-1)k++;
|
|
if(h.indexOf(k)!=-1)S.push(W[Q])}return S};N.$.a6y=function(W){var h=0;for(var Q=0;Q<W.length;Q++)if(W[Q].type==0||W[Q].type==3)h=Q;
|
|
return W[h]};N.$.z2=function(W){var h=-1;for(var Q=0;Q<W.length;Q++)if((W[Q].type==0||W[Q].type==3)&&W[Q].VZ!=-1)h++;
|
|
return h+1};N.$.rR=function(W,h,S){var k=-1;for(var Q=0;Q<W.length;Q++)if((W[Q].type==0||W[Q].type==3)&&(S||W[Q].VZ!=-1)){k++;
|
|
if(k==h)return Q}return-1};N.$.QQ=function(W,h,S){var k=-1;for(var Q=0;Q<W.length;Q++)if((W[Q].type==0||W[Q].type==3)&&(S||W[Q].VZ!=-1)){if(Q>=h)return k;
|
|
k++}return k};N.$.Sp=function(W,h){var S=-1,k=0;for(var Q=0;Q<W.length;Q++){if((W[Q].type==0||W[Q].type==3)&&W[Q].VZ!=-1)S++;
|
|
if(S==h)k++}return k};N.$.ae0=function(W){var h=180;for(var Q=0;Q<W.length;Q++){if(W[Q].type!=0&&W[Q].type!=3)continue;
|
|
var S=W[Q].length;if(S<3)continue;for(var k=0;k<S;k++){var p=W[Q+1+(k-1+S)%S],I=W[Q+1+k],q=W[Q+1+(k+1)%S],P=I.M,t=I.bq.xX(P)?p.tk:I.bq,M=I.tk.xX(P)?q.bq:I.tk;
|
|
if(P.xX(t)||P.xX(M))continue;var U=t.x-P.x,i=t.y-P.y,z=M.x-P.x,D=M.y-P.y,t=Math.atan2(t.y-P.y,t.x-P.x)*180/Math.PI,M=Math.atan2(M.y-P.y,M.x-P.x)*180/Math.PI,R=Math.abs(M-t)%360,O=R>180?360-R:R;
|
|
if(O<h)h=O}}return h*Math.PI/180};N.$.tV=function(W){var h=W.segments?[W]:W.children,S=[];for(var Q=0;
|
|
Q<h.length;Q++){var k=h[Q],p=k.segments,I=k.closed?0:3,q=S.length,P=null;if(p.length<=1)continue;S.push({type:I,length:p.length,VZ:0,pt:2});
|
|
for(var t=0;t<p.length;t++){var M=p[t],U=new eC(M.handleIn.x,M.handleIn.y),i=new eC(M.handleOut.x,M.handleOut.y),z=new eC(M.point.x,M.point.y),D={type:I+1,bq:z.add(U),M:z,tk:z.add(i)};
|
|
if(P==null)P=D;S.push(D);if(t+1==p.length&&eC.fa(P.M,D.M)<1e-5){S.pop();S[q].length--;P.bq=D.bq;if(I==3)for(var R=q;
|
|
R<S.length;R++)S[R].type-=3}}}return S};N.$.hS=function(W){N.$.aN();var h=[],S,k=new paper.Color(1,0,0);
|
|
function p(D,P){D.remove();D.closed=!P;D.fillRule="evenodd"}for(var Q=0;Q<W.length;Q++){if(W[Q].type>5)continue;
|
|
var I=W[Q].length,q;if(Q==W.length-1)break;var P=W[Q].type==3;if(Q==2){if(!N.$.MB(W))q="subtract";else q="unite"}else{if(W[Q].VZ==0)q="exclude";
|
|
if(W[Q].VZ==1)q="unite";if(W[Q].VZ==2)q="subtract";if(W[Q].VZ==3)q="intersect"}if(W[Q].VZ!=-1){S=new paper.CompoundPath;
|
|
h.push([S,q]);S.fillRule="evenodd";S.fillColor=k}var t=[];for(var M=0;M<I;M++){var U=W[Q+1+M],i=U.bq.Xy(U.M),z=U.tk.Xy(U.M);
|
|
t.push([[U.M.x,U.M.y],[i.x,i.y],[z.x,z.y]])}var D=new paper.Path(t);p(D,P);S.addChild(D);Q+=I}return h};
|
|
N.$.be=function(W){for(var Q=0;Q<W.length;Q++){var h=W[Q];if(h.M==null)continue;if(!h.M.xX(h.bq)||!h.M.xX(h.tk))return!1}return!0};
|
|
N.$.anE=function(W){if(W.length<=5)return 0;var h=0,S=W.length-3-1;for(var Q=0;Q<S;Q++){var k=W[3+Q],p=W[3+Q+1];
|
|
if(k.type==0||p.type==0)return 0;h+=(p.M.x-k.M.x)*(k.M.y+p.M.y)}h+=(W[3].M.x-W[3+S].M.x)*(W[3+S].M.y+W[3+1].M.y);
|
|
return-h*.5};N.$.xZ=function(W){var h=W[2],S=!1;if(W.length==2)S=W[1].all==0;else if(W[1].all==1){if(h.VZ==1||h.VZ==3)S=!0;
|
|
else S=!1}else{if(h.VZ==1||h.VZ==3||h.VZ==0)S=!0;else S=!1}return S};N.$.MB=function(W){var h=N.$.xZ(W);
|
|
for(var Q=3;Q<W.length;Q++)if(W[Q].VZ==3)h=!0;return h};N.$.ap_=0;N.$.G8=0;N.$.a9S=0;N.$.al$=function(W,h,S,k){if(S.ZP())return;
|
|
var p=S.n(),w=16384;N.$.ap_+=p;if(p>N.$.G8){N.$.G8=p}var I=S.e,q=S.Z;if(k==null&&N.$.be(W)){var P=!0;
|
|
for(var Q=2;Q<W.length;)if(W[Q].length==2)Q+=3;else{P=!1;break}if(P){return}if(N.$.zT(W)){h.fill(255);
|
|
var t=N.$.E6(W);if(t.n()!=p){var M=1-(t.x-S.x),U=1-(t.y-S.y),i=1-(S.x+S.e-(t.x+t.e)),z=1-(S.x+S.Z-(t.x+t.Z)),D=~~(M*255),R=~~(i*255),O=~~(U*255),b=~~(z*255);
|
|
h.fill(O,0,I);h[0]=~~(M*U*255);h[I-1]=~~(i*U*255);for(var Q=I;Q<p;Q+=I){h[Q]=D;h[Q+I-1]=R}h.fill(b,(q-1)*I,q*I);
|
|
h[p-I]=~~(M*z*255);h[p-1]=~~(i*z*255)}return}}var A=Math.ceil(I/w),g=Math.ceil(q/w),E=Math.ceil(I/A),j=Math.ceil(q/g),x=Date.now();
|
|
for(var d=0;d<g;d++)for(var L=0;L<A;L++){var _=L*E,T=d*j,c=E,e=j,r=N.hi(c,e);if(!N.$.xZ(W))r.fillRect(0,0,c,e);
|
|
N.$.$Y(W,r,-S.x-_,-S.y-T,k);var B=new Uint8Array(r.getImageData(0,0,c,e).data.buffer);if(c==I&&e==q)N.sN(B,h,3);
|
|
else N.TV(B,new gj(_,T,c,e),h,new gj(0,0,I,q))}};N.$.$Y=function(W,h,S,k,p){if(p!=null){var I=!1,q=!1,P=0,t=!1;
|
|
for(var Q=0;Q<W.length;Q++){var M=W[Q].VZ;if(M!=null){P++;if(M==-1)I=!0;if(M>0)q=!0;if(W[Q].type==0)t=!0}}if(!I&&P<20&&(p==null||t))W=N.$.CJ(W)}for(var Q=0;
|
|
Q<W.length;Q++){if(W[Q].type>5)continue;var U=W[Q].length;if(U==0)continue;if(Q==W.length-1)break;var i=W[Q].type==3,M=W[Q].VZ;
|
|
if(M!=-1&&p==null){var z=["xor","source-over","destination-out","source-in"][M];h.globalCompositeOperation=z}if(W[Q].VZ!=-1){h.beginPath();
|
|
if(p){var D=p.strokeStyleLineWidth.v.val,R=p.strokeStyleLineAlignment.v.strokeStyleLineAlignment,O=p.strokeStyleLineCapType.v.strokeStyleLineCapType,b=p.strokeStyleLineJoinType.v.strokeStyleLineJoinType,w=p.strokeStyleMiterLimit.v,A=[],g=p.strokeStyleLineDashSet.v;
|
|
for(var E=0;E<g.length;E++)A.push(g[E].v.val*D);h.setLineDash(A);h.lineCap=["butt","round","square"][hz.EJ.zu.indexOf(O)];
|
|
h.lineJoin=["miter","round","bevel"][hz.EJ.join.indexOf(b)];h.lineWidth=hz.EJ.tZ.indexOf(R)==1?D:D*=2;
|
|
h.miterLimit=w}}N.$.akg(h,W,Q+1,U,S,k,i);if(i){}else h.closePath();if(W[Q+1+U]==null||W[Q+1+U].VZ!=-1){if(p)h.stroke();
|
|
else h.fill("evenodd")}Q+=U}h.globalCompositeOperation="source-over"};N.$.akg=function(W,h,Q,S,k,p,I){var q=h[Q],P=null;
|
|
W.moveTo(q.M.x+k,q.M.y+p);for(var t=Q;t<Q+S-1;t++){q=h[t];P=h[t+1];W.bezierCurveTo(q.tk.x+k,q.tk.y+p,P.bq.x+k,P.bq.y+p,P.M.x+k,P.M.y+p)}if(!I){q=h[t];
|
|
P=h[Q];W.bezierCurveTo(q.tk.x+k,q.tk.y+p,P.bq.x+k,P.bq.y+p,P.M.x+k,P.M.y+p)}};N.$.al3=function(W,h){var S=[],k=h?4:1;
|
|
for(var Q=0;Q<W.length;Q+=2){var p=new eC(W[Q],W[Q+1]);S.push({type:k,bq:p.clone(),M:p.clone(),tk:p.clone()})}return S};
|
|
N.$.un=function(W,h){N.$.aN();var S=new paper.Path;S.remove();var k=W.length-1,p=Math.sqrt((W[k-1]-W[0])*(W[k-1]-W[0])+(W[k]-W[1])*(W[k]-W[1]))<3;
|
|
S.closed=p;for(var Q=0;Q<W.length;Q+=2)S.add(new paper.Point(W[Q],W[Q+1]));S.simplify(h);var I=[{type:6},{type:8,all:0}];
|
|
I=I.concat(N.$.tV(S));return I};N.$.Jg=function(W,h,S){var k=W[h].length,p=W[h].type,I=0,q=W.slice(h+1,h+1+k);
|
|
for(var Q=0;Q<k;Q++){var P=S[(Q-1+k)%k],t=S[(Q+1+k)%k],M=S[Q];if(M!=0){var U=q[(Q-1+k)%k].M,i=q[(Q+0+k)%k].M,z=q[(Q+1+k)%k].M,D=eC.fa(i,U),R=eC.fa(i,z),O=N.H.Ur(U.x,U.y,i.x,i.y,z.x,z.y,M)[0],b=Math.min(O,P==0?D:D/2,t==0?R:R/2);
|
|
M*=b/O;var w=N.H.cT(U.x,U.y,i.x,i.y,z.x,z.y,M),A={type:p+1,bq:new eC(w[2],w[3]),M:new eC(w[2],w[3]),tk:new eC(w[4],w[5])},g={type:p+1,bq:new eC(w[6],w[7]),M:new eC(w[8],w[9]),tk:new eC(w[8],w[9])};
|
|
W.splice(h+I+1,1,A,g);I++;W[h].length++}I++}};N.$.be=function(W){for(var Q=0;Q<W.length;Q++){var h=W[Q],S=h.type;
|
|
if(S==1||S==2||S==4||S==5)if(!h.M.xX(h.bq)||!h.M.xX(h.tk))return!1}return!0};N.$.zT=function(W){if(W.length!=7||!N.$.be(W))return!1;
|
|
for(var Q=0;Q<4;Q++){var h=!0;for(var S=0;S<4;S++){var k=W[3+(Q+S&3)],p=W[3+(Q+S+1&3)];if(k.M.x!=p.M.x&&k.M.y!=p.M.y)h=!1}if(h)return!0}return!1};
|
|
N.$.Te={};N.$.Te.C4=function(W,h,S){var k=[{type:6},{type:8,all:0}],p=null;k.push({type:S?3:0,VZ:1,length:0,eN:0,w9:0,pt:1});
|
|
if(h==0)p==null;else if(h instanceof Array)p=h;else{p=[];for(var Q=0;Q<W.length;Q+=2)p.push(h)}k=k.concat(N.$.al3(W,S));
|
|
k[2].length=k.length-3;if(p)N.$.Jg(k,2,p);return k};N.$.Te.alu=function(W,h,S,k,p){var I=[],q=[],P=.553,t=1,M=-1;
|
|
I.push({type:1,bq:new eC(0,P),M:new eC(0,0),tk:new eC(0,-P)});p+=2;for(var Q=0;Q<p;Q++){var U={type:1};
|
|
if(Q==0){U.M=new eC(1,-1);U.bq=new eC(1-P,-1);U.tk=new eC(1+P,-1)}else{var i=-(Q+2)*Math.PI/2,z=1+((Q&1)==1?Q-1:Q),D=Math.sin(i),R=Math.cos(i);
|
|
t+=z*(D-R);M+=z*(R+D);U.M=new eC(t,M);U.bq=new eC(t+z*R*P,M-z*D*P);if((Q&1)==1)z+=2;U.tk=new eC(t-z*R*P,M+z*D*P)}var O={type:1,bq:new eC(-U.tk.x,-U.tk.y),M:new eC(-U.M.x,-U.M.y),tk:new eC(-U.bq.x,-U.bq.y)};
|
|
I.push(U);if(Q<p-2)q.push(O)}q.reverse();I=I.concat(q);var b=[{type:6},{type:8,all:0}];b.push({type:0,VZ:1,length:I.length,eN:0,w9:0,pt:1});
|
|
b=b.concat(I);var w=new ex(S/p,0,0,S/p,0,0);w.rotate(k);w.translate(W,h);N.$.ac(b,w);return b};N.$.Te.Rect=function(W,h,S,k,p){var I=[W,h,W+S,h,W+S,h+k,W,h+k];
|
|
return N.$.Te.C4(I,p)};N.$.Te.E1=function(W,h,S,k,p,I,q,P){var t=[],M=2*Math.PI/p;for(var Q=0;Q<p;Q++)t.push(Math.cos(Q*M-k),Math.sin(Q*M-k));
|
|
if(q!=null){var U=N.H.TA(t),i=U.e,z=U.Z,D=q/(i/2),R=P/(z/2);for(var Q=0;Q<t.length;Q+=2){t[Q]=(t[Q]-(U.x+i/2))*D;
|
|
t[Q+1]=(t[Q+1]-(U.y+z/2))*R}S=1}var O=new ex(S,0,0,S,0,0);O.translate(W,h);N.H.A(t,O,t);return N.$.Te.C4(t,I)};
|
|
N.$.Te.Fk=function(W,h,S,k,p,I,q){var P=[],t=Math.PI/p;for(var Q=0;Q<p*2;Q++){var M=(Q&1)==0?1:q;P.push(M*Math.cos(Q*t),M*Math.sin(Q*t))}var U=new ex(S,0,0,S,0,0);
|
|
U.rotate(k);U.translate(W,h);N.H.A(P,U,P);return N.$.Te.C4(P,I)};N.$.Te.W5=function(W,h,S,k,p){return N.$.Te.ts(0,W,h,S,k,p)};
|
|
N.$.Te.ac6=function(W,h,S,k,p,I){return N.$.Te.ts(1,W,h,S,k,p,I)};N.$.Te.$R=function(W,h,S,k,p,I){return N.$.Te.ts(2,W,h,S,k,p,I)};
|
|
N.$.Te.ts=function(W,h,S,k,p,I,q){var P=Math.sqrt((k-h)*(k-h)+(p-S)*(p-S)),t;I/=2;if(W==0)t=[-I,0,I,0,I,P,-I,P];
|
|
if(W==1){var M=I*2*q*1.3/1.5,U=I*q;t=[-I,0,I,0,I,P-M,U,P-M,0,P,-U,P-M,-I,P-M]}if(W==2){var M=q[3],U=q[2]/2,i=M*(2/3)*q[4]/100,z=M-i,D=M;
|
|
t=[];if(q[0])t.push(-I,z,-U,D,0,0,U,D,I,z);else t.push(-I,0,I,0);if(q[1])t.push(I,P-z,U,P-D,0,P,-U,P-D,-I,P-z);
|
|
else t.push(I,P,-I,P)}var R=new ex(1,0,0,1,0,0);R.rotate(Math.atan2(-p+S,k-h)+Math.PI/2);R.translate(h,S);
|
|
N.H.A(t,R,t);return N.$.Te.C4(t,0)};N.$.Te.dm=function(W,h,S,k){var p=[{type:6},{type:8,all:0}],i=.553;
|
|
p.push({type:0,VZ:1,length:4,eN:0,w9:0,pt:1});var I=W,q=h,P=W+S,t=h+k,W=(I+P)/2,h=(q+t)/2,M=(I-P)/2,U=(q-t)/2;
|
|
p.push({type:1,bq:new eC(W-i*M,h-U),M:new eC(W,h-U),tk:new eC(W+i*M,h-U)});p.push({type:1,bq:new eC(W+M,h-i*U),M:new eC(W+M,h),tk:new eC(W+M,h+i*U)});
|
|
p.push({type:1,bq:new eC(W+i*M,h+U),M:new eC(W,h+U),tk:new eC(W-i*M,h+U)});p.push({type:1,bq:new eC(W-M,h+i*U),M:new eC(W-M,h),tk:new eC(W-M,h-i*U)});
|
|
return p};N.$.Te.a4h=function(W,h,S,k,p){var I=[{type:6},{type:8,all:0}];I.push({type:3,VZ:1,length:5,eN:0,w9:0,pt:1});
|
|
var q=(p-k)/4;for(var Q=0;Q<5;Q++){var P=Q*q,t=Math.cos(P),M=Math.sin(P),U=.553*(q/(Math.PI/2)),i=M*U,z=-t*U,D=new eC(t,M);
|
|
I.push({type:4,bq:Q==0?D.clone():new eC(t+i,M+z),M:D,tk:Q==4?D.clone():new eC(t-i,M-z)})}var R=new ex;
|
|
R.rotate(-k);R.scale(S,S);R.translate(W,h);N.$.ac(I,R);return I};N.DU={};N.DU.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]};
|
|
N.DU.xv=function(W){var h=W.warpStyle.v.warpStyle;if(h=="warpNone")return!0;else if(h=="warpCustom"){var S=!1,k=W.customEnvelopeWarp.v.meshPoints.v.arr,p=k[0].arr,I=k[1].arr;
|
|
for(var Q=0;Q<4;Q++)for(var q=0;q<4;q++){if(Math.abs(p[Q]-p[q*4+Q])>1||Math.abs(I[Q*4]-I[Q*4+q])>1)S=!0}return!S}else return W.warpValue.v==0&&W.warpPerspective.v==0&&W.warpPerspectiveOther.v==0};
|
|
N.DU.U=function(W){var h={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(W){h.bounds={t:"Objc",v:{classID:"Rctn",Top:{t:"UntF",v:{type:"#Pxl",val:W.y}},Left:{t:"UntF",v:{type:"#Pxl",val:W.x}},Btom:{t:"UntF",v:{type:"#Pxl",val:W.y+W.Z}},Rght:{t:"UntF",v:{type:"#Pxl",val:W.x+W.e}}}};
|
|
h.uOrder={t:"long",v:4};h.vOrder={t:"long",v:4}}return h};N.DU.an6=function(W,h,S,k){for(var Q=0;Q<W.length;
|
|
Q+=2){var p=W[Q],I=W[Q+1],q=(p-h.x)/h.e,P=(I-h.y)/h.Z,t=(1-S)/2,M=1-t,U=t+q*(M-t);P=.5+(P-.5)*U*2;var i=(1-k)/2,z=1-i,D=i+P*(z-i);
|
|
q=.5+(q-.5)*D*2;p=h.x+q*h.e;I=h.y+P*h.Z;W[Q]=p;W[Q+1]=I}};N.DU.P0=function(W,h){var S=[],k=[];for(var Q=0;
|
|
Q<W.length;Q+=2){S.push(W[Q]);k.push(W[Q+1])}var p=[];p.push({id:"Hrzn",type:"UnFl",uID:"#Pxl",arr:S});
|
|
p.push({id:"Vrtc",type:"UnFl",uID:"#Pxl",arr:k});h.warpStyle.v.warpStyle="warpCustom";h.customEnvelopeWarp={t:"Objc",v:{classID:"customEnvelopeWarp",meshPoints:{t:"ObAr",v:{classID:"rationalPoint",arr:p}}}}};
|
|
N.DU.zL=function(W,h){if(h==null){var S=W.bounds.v,k=S.Left.v.val,p=S.Rght.v.val,I=S.Top.v.val,q=S.Btom.v.val;
|
|
h=new gj(k,I,p-k,q-I)}if(h.ZP())h.e=h.Z=1;var P=[],t=W.warpStyle.v.warpStyle;if(t=="warpCustom"){var M=W.customEnvelopeWarp.v.meshPoints.v.arr,U=M[0].arr,i=M[1].arr;
|
|
for(var Q=0;Q<16;Q++)P.push(U[Q],i[Q])}else P=N.DU.DU(h,t,W.warpRotate.v.Ornt=="Hrzn",W.warpValue.v/100,W.warpPerspective.v/100,W.warpPerspectiveOther.v/100);
|
|
return P};N.DU.DU=function(W,h,S,k,p,I){var q=N.hx.U(W.x,W.y,W.e,W.Z);if(h=="warpNone")return q;var P=JSON.parse(JSON.stringify(W)),t=new ex;
|
|
if(!S){t.translate(-W.x,-W.y);t.rotate(-Math.PI/2);t.translate(W.Z,0);N.H.A(q,t,q);W=new gj(0,0,W.Z,W.e);
|
|
q=N.hx.NS(q,!1)}N.DU.aas(q,W,h,k,p,I);if(!S){q=N.hx.NS(q,!0);W=P;t.uA();N.H.A(q,t,q)}if(k==0)N.DU.an6(q,W,p,I);
|
|
else{var t=new ex(1/W.e,0,0,1/W.Z,-W.x,-W.y);t.translate(-.5,-.5);N.H.A(q,t,q);N.DU.aho(q,I,p);t.uA();
|
|
N.H.A(q,t,q)}return q};N.DU.aas=function(W,h,S,k,p,I){for(var Q=0;Q<4;Q++){for(var q=0;q<4;q++){var P=2*(4*Q+q),t=W[P]-h.x,M=W[P+1]-h.y,U=t,i=M;
|
|
if(k!=0){var z=h.e/2,D=h.Z/2;U-=z;i-=D;var R=U,O=U,b=-D,w=D,A=Math.abs(k),g=Math.tan((1-A)*Math.PI/2),E=Math.sqrt(g*g+1),j=Math.atan2(1,g),x=U/z*j,d=z*E,L=z*E+h.Z,_=Math.cos(j),T=Math.sin(j),c=N.DU.arB(_,T),e=N.DU.auh(_,T),r=-g*z+c*d;
|
|
if(S=="warpArc"){R=Math.sin(x)*L;b=g*z-Math.cos(j)*L+D;O=Math.sin(x)*d;w=g*z-Math.cos(j)*d+D;if(q==1||q==2){R=q==1?-e*L:e*L;
|
|
O=q==1?-e*d:e*d;b=g*z+D-c*L;w=g*z+D-c*d}if(k<0){var B=R;R=O;O=B;B=b;b=-w;w=-B}}if(S=="warpArcLower"){if(q==1||q==2){O=q==1?-e*d:e*d;
|
|
w=k<0?D-r:D+r}}if(S=="warpArcUpper"||S=="warpArch"||S=="warpBulge"){if(q==1||q==2){R=q==1?-e*d:e*d;b=k<0?-D+r:-D-r}if(S=="warpArch"){O=R;
|
|
w=b+2*D}if(S=="warpBulge"){O=R;w=-b}}if(S=="warpFish"||S=="warpFlag"||S=="warpWave"){if(q==1){b-=k*4*D;
|
|
w+=k*4*D}if(q==2){b+=k*4*D;w-=k*4*D}if(S=="warpFlag"||S=="warpWave")b=w-2*D}if(S=="warpRise"){if(q<2)b=-D+k*D*4;
|
|
w=b+2*D}var F=(i+D)/h.Z;U=R+F*(O-R);i=b+F*(w-b);if(S=="warpWave"){if(Q==0)i=-D;if(Q==3)i=D;if(Q==1||Q==2)i=2*D*(Q/3-.5)*(1/3)+i*(2/3)}if(S=="warpFisheye"){if((Q==1||Q==2)&&(q==1||q==2)){U=U+4*U*k;
|
|
i=i+4*i*k}}if(S=="warpInflate"){var v=2/3;if((Q==1||Q==2)&&(q==1||q==2)){U=U+.5*U*k;i=i+.5*i*k}else if(Q==1||Q==2)U=U+v*U*k;
|
|
else if(q==1||q==2)i=i+v*i*k}if(S=="warpSqueeze"){var v=2/3;if((Q==1||Q==2)&&(q==1||q==2)){if(k>0)U=U-v*U*k;
|
|
else i=i+v*i*k}else if(Q==1||Q==2)U=U-v*U*k;else if(q==1||q==2)i=i+v*i*k}if(S=="warpTwist"){if((Q==1||Q==2)&&(q==1||q==2)){var X=k*Math.PI/2,E=1+Math.abs(k)*2,V=U*Math.cos(X)-i*Math.sin(X),H=U*Math.sin(X)+i*Math.cos(X);
|
|
U=V*E;i=H*E}}if(S=="warpShellLower"||S=="warpShellUpper"){if(S=="warpShellUpper"){Q=3-Q;i=-i}if(Q>2||Q==2&&(q==0||q==3)){if(k>0){var o=d+Q/3*2*D;
|
|
U=Math.sin(x)*o;i=-g*z-D+Math.cos(x)*o;if(q==1||q==2){U=q==1?-e*o:e*o;i=-g*z-D+c*o}}else{if((q==1||q==2)&&Q==3){U=q==1?-e*d:e*d;
|
|
i=g*z-c*d+D}else if(Q==2){i=D-D*(2/3)*Math.cos(x);U=U+D*(2/3)*Math.sin(x)}}}if(S=="warpShellUpper"){Q=3-Q;
|
|
i=-i}}U+=z;i+=D}t=U,M=i;W[P]=t+h.x;W[P+1]=M+h.y}}};N.DU.aho=function(W,h,S){var k=[];for(var p=0;p<4;
|
|
p++)k.push(1-S+p/3*2*S);var I=[];for(var p=0;p<4;p++)I.push(1-h+p/3*2*h);var q=[0,0,0,0],P=[0,0,0,0];
|
|
for(var Q=0;Q<4;Q++)for(var p=0;p<4;p++){var t=2*(4*Q+p),M=W[t],U=W[t+1];q[p]+=M/4;P[p]+=U/4}for(var Q=0;
|
|
Q<4;Q++)for(var p=0;p<4;p++){var i=k[p],t=2*(4*Q+p),M=W[t],U=W[t+1],z=q[p],D=P[p];W[t]=z+i*(M-z);W[t+1]=D+i*(U-D)}var R=W.slice(0);
|
|
for(var Q=0;Q<4;Q++)for(var p=1;p<3;p++){var t=2*(4*Q+p),M=W[t],U=W[t+1],O=t+(p==1?-2:2),b=W[O],w=W[O+1];
|
|
W[t]=M-b;W[t+1]=U-w}var A=W[0],g=W[1],E=W[8],j=W[9],x=W[16],d=W[17],L=W[24],_=W[25],T=W[6],c=W[7],e=W[14],r=W[15],B=W[22],F=W[23],v=W[30],X=W[31],V=T-A,H=c-g,o=e-E,J=r-j,C=B-x,Y=F-d,K=v-L,u=X-_;
|
|
for(var Q=0;Q<4;Q++){var f=2*Q*4,l=0,jk=0,hE=Q==1?.33:.66,Z=1-hE;if(Q==0){l=V;jk=H}if(Q==1){l=Z*V+hE*-K;
|
|
jk=Z*H+hE*-u}if(Q==2){l=Z*V+hE*-K;jk=Z*H+hE*-u}if(Q==3){l=-K;jk=-u}W[f]=W[f]+l/2;W[f+1]=W[f+1]+jk/2;
|
|
W[f+6]=W[f+6]-l/2;W[f+7]=W[f+7]-jk/2}for(var Q=0;Q<4;Q++)for(var p=1;p<3;p++){var t=2*(4*Q+p),M=W[t],U=W[t+1],O=t+(p==1?-2:2),b=W[O],w=W[O+1],i=2*Q/3;
|
|
W[t]=b+i*M;W[t+1]=w+i*U}for(var Q=1;Q<3;Q++)for(var p=1;p<3;p++){var t=2*(4*Q+p),M=W[t],U=W[t+1],aQ=Q==1?-8:-16,jC=Q==1?16:8,eO=W[t+aQ],iU=W[t+aQ+1],gK=W[t+jC],iM=W[t+jC+1],i=Q/3;
|
|
M=(1-i)*eO+i*gK;U=(1-i)*iU+i*iM;W[t]=M;W[t+1]=U}N.H.G5(R,W,W,h)};N.DU.arB=function(W,h){return(4-W)*(1/3)};
|
|
N.DU.auh=function(W,h){return(1-W)*(3-W)/(3*h)};N.kB={};N.kB.aqC=function(W,h,S,k,p,I,q,P,t,M){for(var U=0;
|
|
U<P;U++)for(var i=0;i<q;i++){var z=3*(U*q+i),D=U+I,R=i+p,O=W[D*h+R];k[z]=O;k[z+1]=O;k[z+2]=O}};N.kB.OF=function(W,h,S,k,p,I,q,P,t,M){var U=[0,1,1/2,1/3,1/4,1/5,1/6,1/7,1/8,1/9],i=1/t,z=[-1,-1,0,-1,1,-1,-1,0,1,0,-1,1,0,1,1,1],D=new Uint32Array(6);
|
|
for(var R=0;R<P;R++){for(var O=0;O<q;O++){var b=3*(R*q+O),w=R+I,A=O+p;D[0]=0;D[1]=0;D[2]=0;D[3]=0;D[4]=0;
|
|
D[5]=0;for(var Q=0;Q<16;Q+=2){var g=A+z[Q],E=w+z[Q+1],j=g-t*~~(g*i),x=E-t*~~(E*i),d=M[x*t+j];D[d]+=W[E*h+g];
|
|
D[d+3]++}var g=A,E=w,j=g-t*~~(g*i),x=E-t*~~(E*i),d=M[x*t+j];D[d]=W[w*h+A];D[d+3]=1;k[b]=D[0]*U[D[3]];
|
|
k[b+1]=D[1]*U[D[4]];k[b+2]=D[2]*U[D[5]]}}};N.kB.u_=function(W,h,S){for(var Q=0;Q<S;Q+=2)W[h+Q]=W[h+Q+1];
|
|
h=h+S;for(var Q=0;Q<S;Q+=2)W[h+Q+1]=W[h+Q]};N.kB.zw=function(W,h,S,k){for(var Q=0;Q<k;Q+=2){var p=h+Q*S;
|
|
W[p]=W[p+S];W[p+S+1]=W[p+1]}};N.kB.YA=function(W,h,S,k,p,I){var q=k[p],P=k[p+1],t=k[I],M=k[I+1],U=P+t>>>1;
|
|
W[h]=W[h+3]=W[S]=W[S+3]=q;W[h+1]=U;W[h+4]=P;W[S+1]=t;W[S+4]=U;W[h+2]=W[h+5]=W[S+2]=W[S+5]=M};N.kB.acA=function(W,h,S,k,p,I){var q=I*3;
|
|
for(var Q=0;Q<I;Q+=2){var P=h+Q,t=p+Q*3;N.kB.YA(k,t,t+q,W,P,P+S)}};N.kB.ajJ=function(W,h,S,k,p,I,q){var P=I*3;
|
|
for(var Q=0;Q<q;Q+=2){var t=h+Q*S,M=p+Q*I*3;N.kB.YA(k,M,M+P,W,t,t+S)}};N.kB.YW=function(W,Q,h){var S=W[Q-h-h],k=W[Q-h],p=W[Q-2],I=W[Q-1],q=W[Q],P=W[Q+1],t=W[Q+2],M=W[Q+h],U=W[Q+h+h],i=Math.abs(k-M),z=Math.abs(I-P),D=Math.abs(q-S)*2+i,R=Math.abs(q-t)*2+z,O=Math.abs(q-p)*2+z,b=Math.abs(q-U)*2+i,w=Math.min(D,Math.min(R,Math.min(O,b)));
|
|
if(w==D)return k*3+M+q-S>>2;if(w==R)return P*3+I+q-t>>2;if(w==O)return I*3+P+q-p>>2;return M*3+k+q-U>>2};
|
|
N.kB.cD=function(W,h,S,k,p){if(W<h&&h<S||W>h&&h>S)return~~(.5+k+(p-k)*(h-W)/(S-W));else return(k+p>>1)+(h+h-W-S>>2)};
|
|
N.kB.sT=function(W,h,Q,S){var k=h[Q-S-1],p=h[Q-S+1],I=h[Q],q=h[Q+S-1],P=h[Q+S+1],t=W[Q-S-1],M=W[Q-S+1],U=W[Q],i=W[Q+S-1],z=W[Q+S+1],D=Math.abs(M-i)+Math.abs(W[Q-S-S+2]-U)+Math.abs(U-W[Q+S+S-2])+Math.abs(p-I)+Math.abs(I-q),R=Math.abs(t-z)+Math.abs(W[Q-S-S-2]-U)+Math.abs(U-W[Q+S+S+2])+Math.abs(k-I)+Math.abs(I-P);
|
|
if(D<R)return N.kB.cD(p,I,q,M,i);else return N.kB.cD(k,I,P,t,z)};N.kB.KV=function(W,h,S,k,p,I){W[h+0]=S[p];
|
|
W[h+1]=k[p];W[h+2]=N.kB.sT(S,k,p,I)};N.kB.hZ=function(W,h,S,k,p,I){var q=k[p];W[h+0]=N.kB.cD(k[p-1],q,k[p+1],S[p-1],S[p+1]);
|
|
W[h+1]=q;W[h+2]=N.kB.cD(k[p-I],q,k[p+I],S[p-I],S[p+I])};N.kB.Id=function(W,h,S,k,p,I){var q=k[p];W[h+0]=N.kB.cD(k[p-I],q,k[p+I],S[p-I],S[p+I]);
|
|
W[h+1]=q;W[h+2]=N.kB.cD(k[p-1],q,k[p+1],S[p-1],S[p+1])};N.kB.dN=function(W,h,S,k,p,I){W[h+0]=N.kB.sT(S,k,p,I);
|
|
W[h+1]=k[p];W[h+2]=S[p]};N.kB.ahj=function(W,h,S,k,p,I,q,P,t){var M=Date.now(),U=2,i=h-2,z=2;if((p&1)==1){U++;
|
|
i--}var D=S-2;if((I&1)==1){z++;D--}if(t==1||t==3){U++;i--}var R=W.slice(0);N.kB.u_(R,0,h);N.kB.zw(R,0,h,S);
|
|
N.kB.zw(R,h-2,h,S);N.kB.u_(R,(S-2)*h,h);for(var O=z;O<D;O+=2)for(var b=U;b<i;b+=2){var Q=O*h+b,w=N.kB.YW(R,Q,h),A=N.kB.YW(R,Q+h+1,h);
|
|
R[Q]=Math.max(0,w);R[Q+h+1]=Math.max(0,A)}var g=q,E=P;if(I+P==S){E-=2;N.kB.acA(W,(S-2)*h+p,h,k,(P-2)*q*3,q)}if(p+q==h){g-=2;
|
|
N.kB.ajJ(W,I*h+p+q-2,h,k,(q-2)*3,q,P)}if(t==0)for(var O=0;O<E;O+=2)for(var b=0;b<g;b+=2){var j=(O+I)*h+b+p,x=(O*q+b)*3;
|
|
N.kB.KV(k,x,W,R,j,h);N.kB.hZ(k,x+3,W,R,j+1,h);j+=h;x+=3*q;N.kB.Id(k,x,W,R,j,h);N.kB.dN(k,x+3,W,R,j+1,h)}else if(t==1)for(var O=0;
|
|
O<E;O+=2)for(var b=0;b<g;b+=2){var j=(O+I)*h+b+p,x=(O*q+b)*3;N.kB.hZ(k,x,W,R,j,h);N.kB.KV(k,x+3,W,R,j+1,h);
|
|
j+=h;x+=3*q;N.kB.dN(k,x,W,R,j,h);N.kB.Id(k,x+3,W,R,j+1,h)}else if(t==2)for(var O=0;O<E;O+=2)for(var b=0;
|
|
b<g;b+=2){var j=(O+I)*h+b+p,x=(O*q+b)*3;N.kB.dN(k,x,W,R,j,h);N.kB.Id(k,x+3,W,R,j+1,h);j+=h;x+=3*q;N.kB.hZ(k,x,W,R,j,h);
|
|
N.kB.KV(k,x+3,W,R,j+1,h)}else if(t==3)for(var O=0;O<E;O+=2)for(var b=0;b<g;b+=2){var j=(O+I)*h+b+p,x=(O*q+b)*3;
|
|
N.kB.Id(k,x,W,R,j,h);N.kB.dN(k,x+3,W,R,j+1,h);j+=h;x+=3*q;N.kB.KV(k,x,W,R,j,h);N.kB.hZ(k,x+3,W,R,j+1,h)}};
|
|
N.raw={};N.raw.aoN=function(W){var h=Date.now(),S=W.width,k=W.height,p=0,I=0,q=S,P=k;if(W.t50829){var t=W.t50829;
|
|
p=t[1];I=t[0];q=t[3];P=t[2]}if(W.t50719){var M=W.t50719;p+=M[0]>>1<<1;I+=M[1]>>1<<1}if(W.t50720){var U=W.t50720;
|
|
q=p+U[0];P=I+U[1]}var i=q-p,z=P-I,D=N.raw.afh(W),R=W.t33422,O=W.t33421;if(O){var U=O[0],b=R.slice(0);
|
|
for(var w=0;w<U;w++)for(var A=0;A<U;A++){var g=(A+(p&1))%U,E=(w+(I&1))%U;b[w*U+A]=R[E*U+g]}R=b}if(W.t277[0]==1)N.raw.a6Q(D,S,k,W,R);
|
|
N.raw.OS(2,W,D,S,k);var j=new Float32Array(i*z*3);if(W.t277[0]==1){if(O==null){N.kB.aqC(D,S,k,j,p,I,i,z)}else if(O.length!=2||O[0]!=2||O[1]!=2){console.log("Unknown CFA pattern size",O);
|
|
N.kB.OF(D,S,k,j,p,I,i,z,O[0],R)}else{var x=W.t33422.join(","),d=0;if(x=="0,1,1,2")d=0;else if(x=="1,0,2,1")d=1;
|
|
else if(x=="2,1,1,0")d=2;else if(x=="1,2,0,1")d=3;else throw"Unknown CFA pattern "+x;if((i&1)!=0||(z&1)!=0)throw"e";
|
|
N.kB.ahj(D,S,k,j,p,I,i,z,d)}}else{for(var w=0;w<z;w++)for(var A=0;A<i;A++){var L=((w+I)*S+A+p)*3,_=(w*i+A)*3;
|
|
j[_+0]=D[L+0];j[_+1]=D[L+1];j[_+2]=D[L+2]}}var T=j,c=j.length,e=N.raw.Ai(W),r=1/e;for(var Q=0;Q<c;Q+=3){j[Q]=T[Q]*r;
|
|
j[Q+1]=T[Q+1]*r;j[Q+2]=T[Q+2]*r}N.raw.OS(3,W,j,i,z);var B=W.Z5,F=i,v=z;if(B==1||B==9){}else{var X=N.raw.XN(B,i,z),_=0;
|
|
F=X[0];v=X[1];var V=j.slice(0);for(var w=0;w<v;w++)for(var A=0;A<F;A++){var H=X[2]*A+X[3]*w+X[4],o=X[5]*A+X[6]*w+X[7],L=(o*i+H)*3;
|
|
j[_]=V[L];j[_+1]=V[L+1];j[_+2]=V[L+2];_+=3}}return{vM:j,F0:F,AF:v}};N.raw.XN=function(W,h,S){var k=h,p=S;
|
|
if(!1){}else if(W==2)return[h,S,-1,0,h-1,0,1,0];else if(W==3)return[h,S,-1,0,h-1,0,-1,S-1];else if(W==4)return[h,S,1,0,0,0,-1,S-1];
|
|
else if(W==5)return[S,h,0,1,0,1,0,0];else if(W==6)return[S,h,0,1,0,-1,0,S-1];else if(W==7)return[S,h,0,-1,h-1,-1,0,S-1];
|
|
else if(W==8)return[S,h,0,-1,h-1,1,0,0];else throw"unknown orientation "+W};N.raw.a6Q=function(W,h,S,k,p){var I=Date.now(),r=0,v=0;
|
|
if(N.raw.Ai(k)>4e4){for(var Q=0;Q<W.length;Q++)W[Q]>>=1;var q=["t50714","t50715","t50712","t50717"];
|
|
for(var Q=0;Q<q.length;Q++){var P=k[q[Q]];if(P)for(var t=0;t<P.length;t++)P[t]>>>=1}console.log("remapping to lower bit depth")}var M=~~Math.sqrt(p.length),U=[-1,-1,0,-1,0,1,-1,0,0,0,1,0,-1,1,0,1,1,1],i=[];
|
|
for(var z=0;z<M;z++)for(var D=0;D<M;D++){var Q=z*M+D,R=p[Q],O=4,b=4,w=8,A=0,g=0;for(var t=0;t<18;t+=2){var E=(M+D+U[t])%M,j=(M+z+U[t+1])%M,x=p[j*M+E];
|
|
if(x==R){}else if(O==4){O=x;A=t}else if(b==4&&x!=O){b=x;g=t;break}}if(b<O){var d=b;b=O;O=d;d=g;g=A;A=d}if(O<R){var d=O;
|
|
O=R;R=d;d=A;A=w;w=d}if(b<O){var d=b;b=O;O=d;d=g;g=A;A=d}i[Q*3]=U[w+1]*h+U[w];i[Q*3+1]=U[A+1]*h+U[A];
|
|
i[Q*3+2]=U[g+1]*h+U[g]}var L=~~(.996*N.raw.Ai(k)),_=~~(.992*N.raw.Ai(k)),T=k.t50728,c=[],e=[0,0,0];for(var z=1;
|
|
z<S-1;z++)for(var D=1;D<h-1;D++){var Q=z*h+D,B=z%M*M+D%M,R=W[Q+i[B*3+0]],O=W[Q+i[B*3+1]],b=W[Q+i[B*3+2]],F=Math.max(R,O,b);
|
|
if(F>L)c.push(Q);else if(F>_){e[0]+=R;e[1]+=O;e[2]+=b;r++}}if(c.length==0)return;if(r/(h*S)<1e-5){console.log("not enough semi-saturated pixels",r);
|
|
e=T}if(e[1]<e[v])v=1;if(e[2]<e[v])v=2;var X=[e[0]/e[v],e[1]/e[v],e[2]/e[v]],V=W.slice(0);for(var H=0;
|
|
H<c.length;H++){var Q=c[H],z=~~(Q/h),D=Q-z*h,B=z%M*M+D%M,o=Math.min(65535,~~(W[Q+i[B*3+v]]*X[p[B]]));
|
|
if(o>V[Q])V[Q]=o}W.set(V)};N.raw.d$=function(W,h,S,k){var p=W.vM,I=Math.round(p.length/3),q=p.slice(0);
|
|
N.raw.pf(p,q,S,k);var P=Math.pow(2,k[2]),t=new Uint8Array(4e3);for(var Q=0;Q<4e3;Q++){var M=Q*(1/1e3);
|
|
M=N.qY(M);M*=P;M=N.HE(M);M=Math.max(0,Math.min(1,M));M=N.raw.bY.a8e(M,k[3]/100);t[Q]=~~(.5+255*M)}for(var Q=0;
|
|
Q<I;Q++){var U=Q<<2,i=U-Q;h[U]=t[~~(q[i]*1e3)];h[U+1]=t[~~(q[i+1]*1e3)];h[U+2]=t[~~(q[i+2]*1e3)]}};N.raw.pf=function(W,h,S,k){var p=Math.round(W.length/3),I=c3.afz(k[0],k[1]),q=N.raw.aoc(S,I),P=N.iD.multiply(N.iD.FI,q),t=Math.pow(2,S.t50730?S.t50730[0]:0);
|
|
P=N.iD.multiply(P,N.iD.nb(t,t,t));var M=N.raw.pf.aqr;if(M==null){M=N.raw.pf.aqr=new Float64Array(8e3);
|
|
for(var Q=0;Q<8e3;Q++)M[Q]=N.HE(Q*(1/1e3))}for(var Q=0;Q<p;Q++){var U=Q<<2,i=U-Q,z=W[i],D=W[i+1],R=W[i+2],O=P[0]*z+P[1]*D+P[2]*R,b=P[4]*z+P[5]*D+P[6]*R,w=P[8]*z+P[9]*D+P[10]*R;
|
|
if(O<0)O=0;if(b<0)b=0;if(w<0)w=0;h[i]=M[~~(O*1e3)];h[i+1]=M[~~(b*1e3)];h[i+2]=M[~~(w*1e3)]}};N.raw.bY={a8e:function(W,h){var S=.5-.5*Math.cos(W*3.2),k=0;
|
|
if(h>0){var p=W*.2;k=p*W+(1-p)*S}else{var I=Math.pow(W,.33);k=(1-I)*I+I*(W+(W-S)*.63)}var q=Math.abs(h);
|
|
return q*k+(1-q)*W},ab1:function(W,h){var S=0;if(h>0){var k=W*1.47,p=Math.pow(W,2.4);S=Math.min(1,p*W+(1-p)*k)}else{var k=W*.68,p=Math.pow(W,3);
|
|
S=p*W*.5+(1-p)*k}var I=Math.abs(h);return I*S+(1-I)*W},abi:function(W,h){var S=0;if(h>0){var k=Math.pow(W,.3),p=W;
|
|
S=(1-W)*k+W*p}else{var k=Math.pow(W,2.5),I=W,p=W;S=Math.min(1,(1-I)*k+I*p)}var q=Math.abs(h);return q*S+(1-q)*W}};
|
|
N.raw.afh=function(W){var h=W.width,S=W.height,k=h*S*W.t277,p=new Uint16Array(k),I=null,q=0;N.raw.a6o(W,p);
|
|
N.raw.OS(1,W,p,h,S);if(W.t50712){I=W.t50712;q=I.length-1;if(I[q]>65535)throw"too big values"}var P=N.raw.P3(W),t=N.raw.eF(W);
|
|
if(I==null)for(var Q=0;Q<k;Q++)p[Q]=Math.max(0,p[Q]-P);else for(var Q=0;Q<k;Q++){var M=p[Q];if(M>q)M=q;
|
|
M=I[M];p[Q]=Math.max(0,M-P)}return p};N.raw.P3=function(W){var h=W.t50714,S=h?h[0]:0,k=W.t50715,p=W.t50716;
|
|
if(k)S+=k[0][0]/k[0][1];if(p)S+=p[0][0]/p[0][1];return Math.round(S)};N.raw.eF=function(W){var h=null,S=0;
|
|
if(W.t50712){h=W.t50712;S=h.length-1}var k=W.t50717?W.t50717[0]:(1<<W.t258[0])-1;if(h)k=Math.min(k,h[S]);
|
|
return k};N.raw.Ai=function(W){var h=N.raw.P3(W),S=N.raw.eF(W);return S-h};N.raw.a6o=function(W,h){var S=h.length,k=W.data,p=W.t258[0];
|
|
if(p!=16&&p!=14&&p!=12&&p!=10&&p!=8)throw"Unsupported Bits Per Sample:"+p;p=Math.round(k.length*8/S);
|
|
if(p==16&&W.isLE){N.WQ(k,h);return}for(var Q=0;Q<S;Q+=2){var I=0,q=0,P=0;if(p==16){I=Q<<1;q=k[I]<<8|k[I+1];
|
|
P=k[I+2]<<8|k[I+3]}else if(p==14){var t=Q*14,M=t>>>3,U=k[M]<<24|k[M+1]<<16|k[M+2]<<8|k[M+3];if((t&7)==0){q=U>>>18;
|
|
P=U>>>4&16383}else{q=U>>>14&16383;P=U&16383}}else if(p==12){I=Q+(Q>>>1);q=k[I]<<4|k[I+1]>>4;P=(k[I+1]&15)<<8|k[I+2]}else if(p==10){var t=Q*10,M=t>>>3;
|
|
if((t&7)==0){q=(k[M]<<2|k[M+1]>>6)&1023;P=(k[M+1]<<4|k[M+2]>>4)&1023}else{q=(k[M]<<6|k[M+1]>>2)&1023;
|
|
P=(k[M+1]<<8|k[M+2]>>0)&1023}}else if(p==8){I=Q;q=k[I];P=k[I+1]}h[Q]=q;h[Q+1]=P}};N.raw.OS=function(W,h,S,k,p){var I=h["t"+[51008,51009,51022][W-1]],U=0;
|
|
if(I==null)return;var q=k*p,P=G.d,t=G.aM,M=new Uint8Array(I),iD=G.d(M,U);U+=4;for(var i=0;i<iD;i++){var z=P(M,U);
|
|
U+=4;var D=P(M,U);U+=4;var R=P(M,U);U+=4;var O=P(M,U);U+=4;if(!1){}else if(z==1&&W==3){var b=U,w=P(M,b);
|
|
b+=4;var A=t(M,b);b+=8;var g=t(M,b);b+=8;var E=t(M,b);b+=8;var j=t(M,b);b+=8;var x=t(M,b);b+=8;var d=t(M,b);
|
|
b+=8;b+=(w-1)*8*6;var L=t(M,b);b+=8;var _=t(M,b);b+=8;var T=L*k,c=_*p,e=Math.max(T,k-T),r=Math.max(c,p-c),B=Math.sqrt(e*e+r*r),F=1/B,v=S.slice(0);
|
|
for(var X=0;X<p;X++)for(var V=0;V<k;V++){var H=(V+.5-T)*F,o=(X+.5-c)*F,J=H*H+o*o,C=A+g*J+E*(J*J)+j*(J*J)*J,Y=x*(2*H*o)+d*(J+2*H*H),K=d*(2*H*o)+x*(J+2*o*o),u=~~(T+B*(C*H+Y)),f=~~(c+B*(C*o+K)),l=(f*k+u)*3,jk=(X*k+V)*3;
|
|
S[jk]=v[l];S[jk+1]=v[l+1];S[jk+2]=v[l+2]}}else if(z==3&&W==3){var b=U,hE=t(M,b);b+=8;var Z=t(M,b);b+=8;
|
|
var aQ=t(M,b);b+=8;var jC=t(M,b);b+=8;var eO=t(M,b);b+=8;var L=t(M,b);b+=8;var _=t(M,b);b+=8;var T=L*k,c=_*p,e=Math.max(T,k-T),r=Math.max(c,p-c),B=Math.sqrt(e*e+r*r),F=1/B;
|
|
for(var X=0;X<p;X++)for(var V=0;V<k;V++){var H=(V+.5-T)*F,o=(X+.5-c)*F,J=H*H+o*o,iU=1+(hE+(Z+(aQ+(jC+eO*J)*J)*J)*J)*J,jk=(X*k+V)*3;
|
|
S[jk]=iU*S[jk];S[jk+1]=iU*S[jk+1];S[jk+2]=iU*S[jk+2]}}else if(z==4&&W==1){var b=U,gK=P(M,b);b+=4;var iM=P(M,b);
|
|
b+=4;for(var Q=0;Q<q;Q++)if(S[Q]==gK)S[Q]=S[Q-2]+S[Q+2]>>1}else if(z==5&&W==1){var b=U,i5=P(M,b);b+=4;
|
|
var fN=P(M,b);b+=4;var dx=P(M,b);b+=4;for(var Q=0;Q<fN;Q++){var ai=P(M,b);b+=4;var hO=P(M,b);b+=4;var Q=ai*k+hO;
|
|
S[Q]=S[Q-2]+S[Q+2]>>1}}else if(z==7&&W==1){var b=U,ff=G.El(M,b);b+=16;var eP=P(M,b);b+=4;var a0=P(M,b);
|
|
b+=4;var bM=P(M,b),cV=P(M,b+4);b+=8;var aX=P(M,b);b+=4;var j8=new Uint16Array(aX);for(var Q=0;Q<aX;Q++)j8[Q]=G.QA(M,b+2*Q);
|
|
var j3=ff.e,am=ff.Z;for(var X=0;X<am;X+=bM)for(var V=0;V<j3;V+=cV){var Q=(ff.y+X)*k+(ff.x+V);S[Q]=j8[S[Q]]}}else if(z==8&&W==2){var b=U,ff=G.El(M,b);
|
|
b+=16;var eP=P(M,b);b+=4;var a0=P(M,b);b+=4;var bM=P(M,b),cV=P(M,b+4);b+=8;var fG=P(M,b);b+=4;var bw=[];
|
|
for(var Q=0;Q<=fG;Q++)bw[Q]=G.aM(M,b+Q*8);var fz=ff.x,c6=ff.x+ff.e,hk=ff.y,as=ff.y+ff.Z,bf=h.t50717[0],gW=1/bf;
|
|
for(var j1=0;j1<a0;j1++)for(var X=hk;X<as;X+=bM){var jk=3*X*k+eP+j1;for(var V=fz;V<c6;V+=cV){var Q=jk+3*V,bZ=S[Q]*gW,iL=bw[fG];
|
|
for(var jI=fG;jI>0;jI--)iL=iL*bZ+bw[jI-1];S[Q]=Math.max(0,Math.min(65535,~~(iL*bf)))}}}else if(z==9&&W==2){var b=U,ff=G.El(M,b),jy=!0;
|
|
b+=16;var eP=P(M,b);b+=4;var a0=P(M,b);b+=4;var bM=P(M,b),cV=P(M,b+4);b+=8;var e2=P(M,b),dV=P(M,b+4);
|
|
b+=8;var ds=t(M,b),ij=t(M,b+8);b+=16;var dg=t(M,b),iT=t(M,b+8);b+=16;var ej=P(M,b);b+=4;if(ej!=1)throw"more than one map plane";
|
|
var eH=e2*dV,d4=new Float32Array(eH);for(var jI=0;jI<eH;jI++)d4[jI]=G.SQ(M,b+jI*4);for(var jI=0;jI<eH;
|
|
jI++)if(d4[jI]!=1)jy=!1;if(!jy){var j3=ff.e,am=ff.Z,iR=.9999*(dV-1)/j3,cD=.9999*(e2-1)/am;for(var X=0;
|
|
X<am;X+=bM)for(var V=0;V<j3;V+=cV){var Q=(ff.y+X)*k+(ff.x+V),cA=V*iR,d_=X*cD,d5=Math.floor(cA),jl=Math.floor(d_),dm=cA-d5,hK=d_-jl,jk=jl*dV+d5,jj=d4[jk]*(1-dm)+d4[jk+1]*dm,cf=d4[jk+dV]*(1-dm)+d4[jk+1+dV]*dm,h5=jj*(1-hK)+cf*hK;
|
|
S[Q]=Math.max(0,Math.min(65535,~~(S[Q]*h5+.5)))}}}else console.log("Unknown opcode "+z+" in OpcodeList"+W+". Length: "+O);
|
|
U+=O}};N.raw.aoc=function(W,h){var S=c3.Nf(h),k=N.raw.dW(W,h),p=N.iD.uA(k),I=c3.a0u(S,c3.Nf(c3.an_)),q=N.iD.multiply(I,p);
|
|
return q};N.raw.acE=function(W){var h=(W.t50728?W.t50728:[1,1,1]).slice(0),k=1;h.push(0);var S={x:.34567,y:.3585};
|
|
do{var p=N.iD.uA(N.raw.dW(W,S)),I=N.iD.$z(p,h),q=c3.a3K(I);k=Math.abs(S.x-q.x)+Math.abs(S.y-q.y);S=q}while(k>1e-7);
|
|
return S};N.raw.dW=function(W,h){var S=c3.O2(h),k=N.raw.a81,p=W.t50778?W.t50778[0]:0,I=W.t50779?W.t50779[0]:0,q=k(W.t50721,W.t50722,p,I,S.iy),P=k(W.t50723,W.t50724,p,I,S.iy);
|
|
q=q||[1,0,0,0,1,0,0,0,1];P=P||[1,0,0,0,1,0,0,0,1];var t=W.t50727?[W.t50727[0],0,0,0,W.t50727[1],0,0,0,W.t50727[2]]:[1,0,0,0,1,0,0,0,1];
|
|
return N.iD.multiply(N.iD.zK(t),N.iD.multiply(N.iD.zK(P),N.iD.zK(q)))};N.raw.a81=function(W,h,S,k,p){if(!W&&!h){return null}else if(W&&!h){return W}else if(p<S){return W}else if(p>k){return h}else{var I=(1/p-1/k)/(1/S-1/k),q=1-I,P=[];
|
|
for(var Q=0;Q<9;Q++)P[Q]=W[Q]*I+h[Q]*q;return P}};var c3={};c3.an_={x:.34567,y:.3585};c3.Tx=[{p:0,Zw:.18006,Fv:.26352,fJ:-.24341},{p:10,Zw:.18066,Fv:.26589,fJ:-.25479},{p:20,Zw:.18133,Fv:.26846,fJ:-.26876},{p:30,Zw:.18208,Fv:.27119,fJ:-.28539},{p:40,Zw:.18293,Fv:.27407,fJ:-.3047},{p:50,Zw:.18388,Fv:.27709,fJ:-.32675},{p:60,Zw:.18494,Fv:.28021,fJ:-.35156},{p:70,Zw:.18611,Fv:.28342,fJ:-.37915},{p:80,Zw:.1874,Fv:.28668,fJ:-.40955},{p:90,Zw:.1888,Fv:.28997,fJ:-.44278},{p:100,Zw:.19032,Fv:.29326,fJ:-.47888},{p:125,Zw:.19462,Fv:.30141,fJ:-.58204},{p:150,Zw:.19962,Fv:.30921,fJ:-.70471},{p:175,Zw:.20525,Fv:.31647,fJ:-.84901},{p:200,Zw:.21142,Fv:.32312,fJ:-1.0182},{p:225,Zw:.21807,Fv:.32909,fJ:-1.2168},{p:250,Zw:.22511,Fv:.33439,fJ:-1.4512},{p:275,Zw:.23247,Fv:.33904,fJ:-1.7298},{p:300,Zw:.2401,Fv:.34308,fJ:-2.0637},{p:325,Zw:.24792,Fv:.34655,fJ:-2.4681},{p:350,Zw:.25591,Fv:.34951,fJ:-2.9641},{p:375,Zw:.264,Fv:.352,fJ:-3.5814},{p:400,Zw:.27218,Fv:.35407,fJ:-4.3633},{p:425,Zw:.28039,Fv:.35577,fJ:-5.3762},{p:450,Zw:.28863,Fv:.35714,fJ:-6.7262},{p:475,Zw:.29685,Fv:.35823,fJ:-8.5955},{p:500,Zw:.30505,Fv:.35907,fJ:-11.324},{p:525,Zw:.3132,Fv:.35968,fJ:-15.628},{p:550,Zw:.32129,Fv:.36011,fJ:-23.325},{p:575,Zw:.32931,Fv:.36038,fJ:-40.77},{p:600,Zw:.33724,Fv:.36051,fJ:-116.45}];
|
|
c3.O2=function(W){var h=c3.Tx,S=2*W.x/(1.5-W.x+6*W.y),k=3*W.y/(1.5-W.x+6*W.y),p=0,I=0,q=0;for(;q<31;
|
|
q++){p=k-h[q].Fv-h[q].fJ*(S-h[q].Zw);if(q>0&&p<0){break}I=p}while(q>=h.length)q--;p/=Math.sqrt(1+h[q].fJ*h[q].fJ);
|
|
I/=Math.sqrt(1+h[q-1].fJ*h[q-1].fJ);var P=I/(I-p),t=1e6/((h[q].p-h[q-1].p)*P+h[q-1].p),M=S-((h[q].Zw-h[q-1].Zw)*P+h[q-1].Zw),U=k-((h[q].Fv-h[q-1].Fv)*P+h[q-1].Fv),i=Math.sqrt(1+h[q].fJ*h[q].fJ),z=1/i,D=h[q].fJ/i,R=Math.sqrt(1+h[q-1].fJ*h[q-1].fJ),O=1/R,b=h[q-1].fJ/R,w=(z-O)*P+O,A=(D-b)*P+b,g=Math.sqrt(w*w+A*A);
|
|
w/=g;A/=g;var E=(M*w+U*A)*-3e3;return{iy:t,H9:E}};c3.afz=function(W,h){var S=c3.Tx,k=1e6/W,p=1;for(;
|
|
p<31;p++){if(k<S[p].p){break}}var I=(S[p].p-k)/(S[p].p-S[p-1].p),q=(S[p-1].Zw-S[p].Zw)*I+S[p].Zw,P=(S[p-1].Fv-S[p].Fv)*I+S[p].Fv,t=Math.sqrt(1+S[p].fJ*S[p].fJ),M=1/t,U=S[p].fJ/t,i=Math.sqrt(1+S[p-1].fJ*S[p-1].fJ),z=1/i,D=S[p-1].fJ/i,R=(z-M)*I+M,O=(D-U)*I+U,b=Math.sqrt(R*R+O*O);
|
|
R/=b;O/=b;q+=R*h/-3e3;P+=O*h/-3e3;return{x:1.5*q/(q-4*P+2),y:P/(q-4*P+2)}};c3.a3K=function(W){var h=W[0]+W[1]+W[2];
|
|
return{x:W[0]/h,y:W[1]/h}};c3.Nf=function(W){return{x:W.x/W.y,y:1,jm:(1-W.x-W.y)/W.y}};c3.a0u=function(W,h){var S=N.iD.zK([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),k=[W.x,W.y,W.jm,0],p=[h.x,h.y,h.jm,0];
|
|
k=N.iD.$z(S,k);p=N.iD.$z(S,p);var I=p[0]/k[0],q=p[1]/k[1],P=p[2]/k[2],t=N.iD.zK([I,0,0,0,q,0,0,0,P]),M=N.iD.uA(S);
|
|
return N.iD.multiply(N.iD.multiply(M,t),S)};N.raw.th={};N.raw.ht=function(W){W*=8;var h=[8,10,12,14,16];
|
|
for(var S in CAMS){var k=CAMS[S];if(k.length==4)continue;var p=k[4],I=k[5];for(var Q=0;Q<h.length;Q++)if(p*I*h[Q]==W)return[S,h[Q]]}var q=[[4e3,3e3]];
|
|
for(var Q=0;Q<q.length;Q++){var k=q[Q],p=k[0],I=k[1];for(var Q=0;Q<h.length;Q++)if(p*I*h[Q]==W)return[k,h[Q]]}return null};
|
|
N.raw.asz=function(W){var W=new Uint8Array(W);for(var Q=0;Q<W.length;Q+=2){var h=W[Q];W[Q]=W[Q+1];W[Q+1]=h}var S=N.raw.ht(W.length),k=CAMS[S[0]];
|
|
if(k==null)k=[[8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354],0,1e3,64383,S[0][0],S[0][1]];var p=k[4],I=k[5],q=Math.max(k[2],116),P={data:W,Z5:1,width:p,height:I,t256:[p],t257:[I],t258:[S[1]],t277:[1],t33421:[2,2],t33422:N.raw.aP[k[1]],t50706:[1,2,0,0],t50714:[q,q,q,q],t50717:[k[3]],t50721:k[0].slice(0),t50723:[1,0,0,0,1,0,0,0,1],t50728:[.64,1,.46],t50778:[17]};
|
|
for(var Q=0;Q<9;Q++)P.t50721[Q]/=1e4;return P};N.raw._D=function(W){if(W==null||W.length==0||typeof W[0]=="number")return W;
|
|
var h=[];for(var Q=0;Q<W.length;Q++)h[Q]=W[Q][1]==0?0:W[Q][0]/W[Q][1];return h};N.raw.aP=[[2,1,1,0],[0,1,1,2],[1,0,2,1],[1,2,0,1]];
|
|
N.raw.normalize=function(W,h){if(W.t50706!=null||W.t271[0].startsWith("Hasselblad")){var S=[50714,50718,50719,50720,50721,50722,50723,50724,50727,50728,50730,50731,50732,50734,50736,50738,50739,50780,50964,50965];
|
|
for(var Q=0;Q<S.length;Q++)if(W["t"+S[Q]]!=null)W["t"+S[Q]]=N.raw._D(W["t"+S[Q]]);if(W.t271&&W.t271[0].startsWith("Hasselblad")){W.t50706=[1,2,0,0];
|
|
W.t33422=N.raw.aP[1];W.t50723=[1,0,0,0,1,0,0,0,1];W.t50778=[17];if(!W.isLE)for(var Q=0;Q<W.data.length;
|
|
Q+=2){var k=W.data[Q];W.data[Q]=W.data[Q+1];W.data[Q+1]=k}}return}var p=W.t258[0],I=W.exifIFD,h=new Uint8Array(h);
|
|
W.t50706=[1,2,0,0];var q=W.t272[0].trim();if(q.indexOf(" ")==-1)q=W.t271[0].trim()+" "+q;if(W.t50708==null)W.t50708=[q];
|
|
var P=q.toLowerCase(),t=CAMS,M=t[P];if(M==null)for(var U in t)if(P.startsWith(U))M=t[U];if(M==null)alert("Unknown camera:"+q);
|
|
else{var i=M[2];W.t50714=[i,i,i,i];W.t50717=[M[3]];W.t50721=M[0].slice(0);for(var Q=0;Q<9;Q++)W.t50721[Q]=W.t50721[Q]*(1/1e4)}W.t50723=[1,0,0,0,1,0,0,0,1];
|
|
if(W.t50728==null)W.t50728=[.35,1,.6];W.t50778=[17];if(W.t271[0].startsWith("SONY")){var z=UTIF["_bin"+(W.isLE?"LE":"BE")],D=W.t28688,E;
|
|
if(JSON.stringify(D)!="[8000,10400,12900,14100]")console.log(D);if(D){var R=[0,0,0,0,0,4095],O=new Uint16Array(16385);
|
|
for(var Q=0;Q<4;Q++){var b=D[Q]>>>2;R[Q+1]=b;if(b>4095)throw"e"}for(var Q=0;Q<16385;Q++)O[Q]=Q;for(var Q=0;
|
|
Q<5;Q++)for(var w=R[Q]+1;w<=R[Q+1];w++)O[w]=O[w-1]+(1<<Q);var A=h.length*8<W.width*W.height*p;if(A)W.t50712=O}else console.log("no curve");
|
|
var g=W.dngPrvt;if(g){var j=g.t29184[0],x=g.t29185[0],d=(W.isLE?G.Tz:G.d)(g.t29217,0),L=new Uint32Array(h.slice(j,j+(x&4294967292)).buffer),_=new Uint32Array(x>>>2);
|
|
N.raw.adt(L,_,x>>>2,d);var T=new Uint8Array(j+x);T.set(new Uint8Array(_.buffer),j);var c=[];UTIF._readIFD(z,T,j,c,0,!1);
|
|
var e=c.pop(),r=e.t29458;W.t50728=[r[1]/r[0],1,r[1]/r[3]];W.t50730=[.5];var B=e.t29891;W.t50829=[B[1],B[0],B[3],B[2]]}else if(I.makerNote&&I.makerNote.t8208){var E=I.makerNote,F=E.t8208,v=F.length,X=0,V=new Uint8Array(256);
|
|
for(var Q=249;Q<256;Q++)V[Q]=Q;for(var Q=0;Q<249;Q++)V[Q*Q*Q%249]=Q;for(var Q=0;Q<v;Q++)F[Q]=V[F[Q]];
|
|
if(v==6604)X=612;else throw"e";var r=[];for(var Q=0;Q<3;Q++)r.push(G.IQ(F,X+Q*2));console.log(r);W.t50728=[r[1]/r[0],1,r[1]/r[2]]}else console.log("no white balance");
|
|
if(W.width*W.height*1.5==W.t279[0]){i=i>>>2;W.t50714=[i,i,i,i];W.t50717=[M[3]>>>2]}}else if(W.t271[0].startsWith("Canon")){var h=W.data,H=h.slice(0),o=W.t50752,J=[],Y=0;
|
|
if(o==null||o[0]==0&&o[1]==0)J.push(W.width);else{for(var Q=0;Q<o[0];Q++)J.push(o[1]);J.push(o[2])}var C=W.width*2;
|
|
for(var K=0;K<J.length;K++){var u=J[K],f=2*Y,l=2*u;for(var jk=0;jk<W.height;jk+=2){var hE=jk*C+f,Z=W.height*f+(jk>>1)*l*2;
|
|
for(var Q=0;Q<l;Q++){h[hE+Q]=H[Z+Q];h[hE+Q+C]=H[Z+Q+l]}}Y+=u}var E=I.makerNote;if(E.t16385){var aQ=E.t224,iU=0;
|
|
if(aQ){W.t50719=[aQ[5],aQ[6]];W.t50720=[aQ[7]+1-aQ[5],aQ[8]+1-aQ[6]]}var jC=E.t16385,eO=jC.length;if(eO==582)iU=1;
|
|
else if(eO==653)iU=2;else if(eO==796)iU=3;else if([692,674,702,1227,1250,1251,1337,1338,1346].indexOf(eO)!=-1)iU=4;
|
|
else if(eO==5120){iU=5;jC=new Int16Array(jC.slice(0).buffer)}else if(eO==1273||eO==1275)iU=6;else if([1312,1313,1316,1506].indexOf(eO)!=-1)iU=7;
|
|
else if([1560,1592,1353,1602].indexOf(eO)!=-1)iU=8;else throw"e"+eO;var gK=jC[0],iM=[null,[25,166],[34,286],[63,196],[63],[71,gK==-4?333:264],[63,251],[63,gK==10?504:728],[63,326]],X=iM[iU][0],i5=iM[iU][1];
|
|
if(iU==4){if(jC[0]==2)i5=231;else if(jC[0]==3)i5=231;else if(jC[0]==4)i5=231;else if(jC[0]==5)i5=231;
|
|
else if(jC[0]==6)i5=231;else if(jC[0]==7)i5=231;else if(jC[0]==9)i5=231;else throw"e"}W.t50728=[jC[X+1]/jC[X],1,jC[X+1]/jC[X+3]];
|
|
var i=i5==null?1024:jC[i5];if(iU!=4)W.t50714=[i,i,i,i]}else{W.t50728=[.4,1,.6]}}else if(W.t271[0].startsWith("NIKON")){var E=I.makerNote,fN=W.isLE?G.IQ:G.P5,a0=0,bM=0,j3,as=0;
|
|
if(E.t61){var dx=E.t61,ai=[];for(var Q=0;Q<4;Q++)ai[Q]=dx[Q]/Math.pow(2,14-p);W.t50714=ai}if(E.t3585){var hO=E.t3585,Q=0,j=22;
|
|
while(j<hO.length&&Q!=-4){var ff=G.Tz(hO,j);j+=4;j+=14;Q=G.Tz(hO,j)-4;j+=4;if(ff==1990472198){if(hO[j]!=0)throw"Flip"}if(ff==1990472199){var eP=G.IQ(hO,j);
|
|
if(eP==0)W.Z5=1;else if(eP==270)W.Z5=8;else throw"e "+eP}j+=Q}}if(E.t183){var cV=E.t183,aX=[];for(var Q=0;
|
|
Q<6;Q++)aX.push(fN(cV,16+Q*2));a0=aX[0];bM=aX[1]}if(E.t3614){var j8=E.t3614;a0=G.Tz(j8,8);bM=G.Tz(j8,12)}if(a0!=0){if(a0<bM){var k=a0;
|
|
a0=bM;bM=k}var Y=W.width-a0>>>1,jk=W.height-bM>>>1;W.t50829=[jk,Y,jk+bM,Y+a0]}if(E.t12){var am=N.raw._D(E.t12);
|
|
j3=[1/am[0],1,1/am[1]]}else if(E.t151){var fG=N.raw.ak4(E,151),bw=fG[0],iG=fG[1],fz=fG[2];if(bw=="0100"&&iG>=80)throw"e";
|
|
else if(bw=="0102"){var c6=[];for(var Q=0;Q<4;Q++)c6.push(fN(fz,6+Q*2));j3=[c6[1]/c6[0],1,c6[1]/c6[3]]}else if(bw=="0103"&&iG>=26){var c6=[];
|
|
for(var Q=0;Q<4;Q++)c6.push(fN(fz,16+Q*2));j3=[c6[1]/c6[0],1,c6[3]/c6[2]]}else if(bw=="0204"&&iG>=564||bw=="0205"&&iG>=284){var j=bw=="0204"?6:14,c6=[];
|
|
for(var Q=0;Q<4;Q++)c6.push(fN(fz,j+Q*2));j3=[c6[1]/c6[0],1,c6[1]/c6[3]]}else throw"e"}else console.log("no white balance info");
|
|
if(q=="NIKON D1")j3=[1,1,1];if(j3)W.t50728=j3;var hk=E.t150?E.t150:E.t140;if(hk){var bf=hk[as++],gW=hk[as++],iL;
|
|
if(bf==73||gW==88)as+=2110;as+=8;var j1=1<<p&32767,bZ=fN(hk,as);as+=2;var O=[];if(bZ>1)iL=Math.floor(j1/(bZ-1));
|
|
if(bf==68&&gW==32&&iL>0){for(Q=0;Q<bZ;Q++){O[Q*iL]=fN(hk,as);as+=2}for(Q=0;Q<j1;Q++)O[Q]=Math.floor((O[Q-Q%iL]*(iL-Q%iL)+O[Q-Q%iL+iL]*(Q%iL))/iL)}else if(bf!=70&&bZ<=16385){j1=bZ;
|
|
for(var Q=0;Q<bZ;Q++)O[Q]=fN(hk,as+2*Q);as+=2*bZ}if(O.length!=0)W.t50712=new Uint16Array(O);else if(W.t272[0]=="NIKON D750")W.t50717[0]*=4}}else if(q.startsWith("FujiFilm")){}else alert("Unknown camera "+q)};
|
|
N.raw.adt=function(W,h,S,k){if(0==S)return;var p=new Uint32Array(128),I=new Uint8Array(p.buffer),q=127,P=0,t=0;
|
|
for(var q=0;q<4;q++)p[q]=k=(k*15625>>>0)*3125+1>>>0;p[3]=p[3]<<1|(p[0]^p[2])>>>31;for(var q=4;q<127;
|
|
q++)p[q]=(p[q-4]^p[q-2])<<1|(p[q-3]^p[q-1])>>>31;for(var q=0;q<127;q++)p[q]=G.d(I,q*4);for(;S>0;S--){p[q&127]=p[q+1&127]^p[q+1+64&127];
|
|
var M=p[q&127],U=W[P];U^=M;h[t]=U;P++;t++;q++}};N.raw.a2j=function(W,h){var S=G.dP(h,0,4),k=N.raw.a1c;
|
|
for(var Q=0;Q<k.length;Q++)if(k[Q][0]==W&&S.startsWith(k[Q][1])&&(k[Q][2]==0||k[Q][2]==h.length))return k[Q];
|
|
throw"e"};N.raw.aov=function(W){if(W.t29==null)return[];var h=N.raw.aiA,S=N.raw.apL,k=W.t29[0],p=0,q=0;
|
|
for(var Q=0;Q<k.length;Q++){var I=k.charCodeAt(Q);p=p*10+(48<=I&&I<=57?I-48:I%10)}var iG=W.t167[0];for(var Q=0;
|
|
Q<4;Q++)q^=iG>>>(Q<<3)&255;var P=h[p&255],t=S[q&255];return[P,t,96]};N.raw.ak4=function(W,h){var S=W["t"+h],iG=S.length,k=N.raw.a2j(h,S),p=G.dP(S,0,4),I,q=k[4];
|
|
if(q==null)I=S.slice(4);else{I=new Uint8Array(iG-q);var P=N.raw.aov(W),t=P[0],M=P[1],U=P[2];for(var Q=0;
|
|
Q<I.length;Q++){M=M+t*U++&255;I[Q]=S[q++]^M}}return[p,iG,I]};N.raw.a1c=[[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]];
|
|
N.raw.aiA=[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];
|
|
N.raw.apL=[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];
|
|
N.Yb={};N.Yb.Yb=function(W,h,S,k,p){if(k==null)k=3;if(p==null)p=!0;var I=W.e,q=W.Z,P=1/I,t=I*q,M=Date.now(),U=!1,i=N.Yb.G9(S,I,q,255,128),z=N.Yb.G9(S,I,q,0,128),hE=0;
|
|
if(U)console.log("extract contours",Date.now()-M);M=Date.now();var D=function(iL,jI){var e2=iL<<2,dV=jI<<2;
|
|
return h[e2]+h[e2+1]+h[e2+2]-(h[dV]+h[dV+1]+h[dV+2])};i.sort(D);z.sort(D);var R=N.U(t),O=N.U(t),b=[],w=new Uint32Array(I*q);
|
|
w.fill(4294967295);for(var Q=0;Q<t;Q++)if(S[Q]==0)O[Q]=255;else if(S[Q]==255)R[Q]=255;else{w[Q]=b.length;
|
|
b.push(Q)}var A=i.length,g=z.length,E=b.length;function j(iL,jI,e2,dV){var ds=iL.length,ij=new Array(ds*2);
|
|
for(var Q=0;Q<ds;Q++){var X=iL[Q],V=~~(X*dV),H=X-V*e2,gW=X<<2;ij[Q*2]=H<<16|V;ij[Q*2+1]=jI[gW]<<16|jI[gW+1]<<8|jI[gW+2]}return ij}var x=j(i,h,I,P),d=j(z,h,I,P),L=j(b,h,I,P);
|
|
if(U)console.log("Itemize",Date.now()-M,"Unknown:",E,A,g);M=Date.now();var _=N.style.AV(R,I,q,!0),T=N.style.AV(O,I,q,!0),c=new Array(E),e=new Array(E),r=new Array(E),B=new Array(E),F=new Array(E);
|
|
if(U)console.log("Dist transform",Date.now()-M);M=Date.now();var v=N.Yb.nY;for(var Q=0;Q<E;Q++){var X=b[Q],V=~~(X*P),H=X-V*I,o=_[X<<1],J=_[(X<<1)+1],C=Math.sqrt(o*o+J*J),Y=T[X<<1],K=T[(X<<1)+1],u=Math.sqrt(Y*Y+K*K);
|
|
c[Q]=1/C;e[Q]=1/u;var f=Math.floor(N.a.Gf(X*17)*A),l=Math.floor(N.a.Gf(X*19)*g);r[Q]=f;B[Q]=l;F[Q]=v(L[Q*2],L[Q*2+1],x[f*2],x[f*2+1],d[l*2],d[l*2+1],c[Q],e[Q],1e9)}var jk=[-I-1,-I,-I+1,-1,1,I-1,I,I+1];
|
|
while(Math.floor(Math.max(A,g)*Math.pow(.5,hE))>1)hE++;for(var Z=0;Z<k;Z++){var aQ=0;for(var Q=0;Q<E;
|
|
Q++){var X=b[Q],V=~~(X*P),H=X-V*I,jC=c[Q],eO=e[Q],iU=L[Q*2],gK=L[Q*2+1],iM=F[Q],f=r[Q],l=B[Q],ff=1;if(V!=0&&H!=0&&H!=I-1&&V!=q-1)for(var i5=0;
|
|
i5<8;i5++){var fN=w[X+jk[i5]];if(fN==4294967295)continue;var dx=r[fN],ai=B[fN];if(dx==f&&ai==l)continue;
|
|
var hO=v(iU,gK,x[dx*2],x[dx*2+1],d[ai*2],d[ai*2+1],jC,eO,iM);if(hO<iM){iM=hO;f=dx;l=ai}}for(var eP=0;
|
|
eP<hE;eP++){var a0=~~(A*ff),bM=~~(g*ff);ff*=.5;var cV=N.a.Gf(X+Z*17+eP*31),aX=N.a.Gf(X+Z*29+eP*63),j8=Math.max(0,f-a0),j3=Math.min(f+a0,A-1),am=Math.max(0,l-bM),fG=Math.min(l+bM,g-1),dx=j8+~~(cV*(j3-j8)),ai=am+~~(aX*(fG-am)),hO=v(iU,gK,x[dx*2],x[dx*2+1],d[ai*2],d[ai*2+1],jC,eO,iM);
|
|
if(hO<iM){iM=hO;f=dx;l=ai}}F[Q]=iM;r[Q]=f;B[Q]=l;aQ+=iM}}if(U)console.log(aQ);if(U)console.log("iterations",Date.now()-M);
|
|
M=Date.now();var bw=S.slice(0);for(var Q=0;Q<E;Q++){var fz=N.Yb.alpha(L[Q*2+1],x[r[Q]*2+1],d[B[Q]*2+1]);
|
|
bw[b[Q]]=~~(.5+255*fz)}bw=N._L.a3n(bw,h,new gj(0,0,I,q),16,.01*.01);if(U)console.log("guided filter",Date.now()-M);
|
|
M=Date.now();if(p)for(var Q=0;Q<t;Q++)if(S[Q]==255||S[Q]==0)bw[Q]=S[Q];var c6=h.slice(0);for(var Q=0;
|
|
Q<E;Q++){var hk=b[Q],f=i[r[Q]],iM=F[Q],gW=hk<<2,j1=bw[hk],bZ=(j1>=250?hk:f)<<2;c6[gW]=h[bZ];c6[gW+1]=h[bZ+1];
|
|
c6[gW+2]=h[bZ+2]}N.ce(bw,c6,3);if(U)console.log(Date.now()-M);M=Date.now();return c6};N.Yb.nY=function(W,h,S,k,p,I,q,P,t){var M=W>>>16,U=W&65535,i=M-(S>>>16),z=U-(S&65535),D=M-(p>>>16),R=U-(p&65535),O=Math.sqrt(i*i+z*z)*q,b=Math.sqrt(D*D+R*R)*P;
|
|
if(O+b>=t)return 1e9;var w=N.Yb.au7(h,k,I);return w+O+b};N.Yb.au7=function(W,h,S){var k=W>>>16,p=W>>>8&255,I=W&255,q=h>>>16,P=h>>>8&255,t=h&255,M=S>>>16,U=S>>>8&255,i=S&255,z=N.Yb.alpha(W,h,S),D=k-(z*q+(1-z)*M),R=p-(z*P+(1-z)*U),O=I-(z*t+(1-z)*i);
|
|
return Math.sqrt(D*D+R*R+O*O)};N.Yb.alpha=function(W,h,S){var k=W>>>16,p=W>>>8&255,I=W&255,q=h>>>16,P=h>>>8&255,t=h&255,M=S>>>16,U=S>>>8&255,i=S&255,z=q-M,D=P-U,R=t-i,O=k-M,b=p-U,w=I-i,A=z*z+D*D+R*R,g=A==0?.5:(O*z+b*D+w*R)/A;
|
|
return Math.max(0,Math.min(1,g))};N.Yb.a3V=function(W){};N.Yb.G9=function(W,h,S,k,p){var I=[],q=h-1,P=S-1;
|
|
for(var t=1;t<P;t++)for(var M=1;M<q;M++){var Q=t*h+M;if(W[Q]==k&&(W[Q-h-1]==p||W[Q-h]==p||W[Q-h+1]==p||(W[Q-1]==p||W[Q+1]==p)||(W[Q+h-1]==p||W[Q+h]==p||W[Q+h+1]==p)))I.push(Q)}return I};
|
|
N._L={};N._L.a98=function(W,h,S,k,p){var I=S.e,q=S.Z,P=I*q,t=N._L.y7,M=N.U(P*4),U;N.wM(M,4294967295);
|
|
var i=S,z=W,D=h,R=k;N.ce(W,M,0);U=N.yq(M,S);U=N.yq(U.vM,U.rect);i=U.rect;R=k>>>2;console.log(i,R);z=N.U(i.n());
|
|
N.sN(U.vM,z,0);N.ce(h,M,0);U=N.yq(M,S);U=N.yq(U.vM,U.rect);D=N.U(i.n());N.sN(U.vM,D,0);var O=N._L.amT(z,D,i,R,p),b=O[0],w=O[1],A=new gj(0,0,i.e*2,i.Z*2);
|
|
b=t(b,i,A,!0);b=t(b,A,S,!0);w=t(w,i,A,!0);w=t(w,A,S,!0);var g=N.U(P);for(var Q=0;Q<P;Q++)g[Q]=Math.max(0,Math.min(255,Math.floor(.5+(b[Q]*h[Q]+255*w[Q]))));
|
|
return g};N._L.y7=function(W,h,S,k){var p=S.e,I=S.Z,q=h.e,P=h.Z,t=N._L.qo,M=new Float32Array(p*I);for(var U=0;
|
|
U<P;U++){var i=(U+U)*p;for(var z=0;z<q;z++){if(!0||z==0||U==0||z==q-1||U==P-1)M[i]=M[i+1]=M[i+p]=M[i+p+1]=W[U*q+z];
|
|
else{M[i]=t(z+.25,U+.25,W,q,P);M[i+1]=t(z+.75,U+.25,W,q,P);M[i+p]=t(z+.25,U+.75,W,q,P);M[i+p+1]=t(z+.75,U+.75,W,q,P)}i+=2}}return M};
|
|
N._L.qo=function(W,h,S,k,p){W-=.499999;h-=.499999;var I=Math.floor(W),q=Math.floor(h),P=q*k+I,t=W-I,M=h-q,U=(1-M)*(1-t),i=(1-M)*t,z=M*(1-t),D=M*t;
|
|
if(S[P]==null||S[P+k+1]==null){console.log(W,h,k,p);throw"e"}return U*S[P+0]+i*S[P+1]+z*S[P+k+0]+D*S[P+k+1]};
|
|
N._L.amT=function(W,h,S,k,p){var I=S.e,q=S.Z,P=I*q,t=N._L.Vf,M=N._L.U,U=N.tO.$_,i=N._L.mn,h=t(h),W=t(W),z=M(P);
|
|
U(h,z,S,k);var D=M(P);U(W,D,S,k);var R=M(P);i(h,h,R);U(R,R,S,k);var O=M(P);i(h,W,O);U(O,O,S,k);var b=M(P),w=M(P);
|
|
for(var Q=0;Q<P;Q++){var A=z[Q],g=D[Q],E=R[Q]-A*A,j=O[Q]-A*g,x=j/(E+p),d=g-x*A;b[Q]=x;w[Q]=d}var L=M(P);
|
|
U(b,L,S,k);var _=M(P);U(w,_,S,k);return[L,_]};N._L.a3n=function(W,h,S,k,p){var I=S.e,q=S.Z,P=I*q,t=N._L.y7,M=Date.now(),U=!1,i=S,z=W,D=h,R=k;
|
|
i=new gj(0,0,I>>>2,q>>>2);R=k>>>2;z=N._L.a5g(W,I,q);D=N._L.apa(h,I,q);if(U)console.log(Date.now()-M);
|
|
M=Date.now();var O=N._L.a0x(z,D,i,R,p),b=O[0],w=O[1],A=O[2],g=O[3];if(U)console.log(Date.now()-M);M=Date.now();
|
|
var E=N.U(P);for(var j=0;j<q;j++)for(var x=0;x<I;x++){var Q=j*I+x,d=(j>>>2)*(I>>>2)+(x>>>2),L=Q<<2,_=b[d]*h[L]+w[d]*h[L+1]+A[d]*h[L+2]+g[d]*255;
|
|
E[Q]=Math.max(0,Math.min(255,~~(.5+_)))}if(U)console.log(Date.now()-M);M=Date.now();return E};N._L.a5g=function(W,h,S){var k=h>>>2,p=S>>>2,I=N.U(h*S);
|
|
for(var q=0;q<p;q++)for(var P=0;P<k;P++)I[q*k+P]=W[q*h+P<<2];return I};N._L.apa=function(W,h,S){var k=h>>>2,p=S>>>2,I=N.U(h*S*4);
|
|
for(var q=0;q<p;q++)for(var P=0;P<k;P++){var t=q*k+P<<2,M=q*h+P<<4;I[t]=W[M];I[t+1]=W[M+1];I[t+2]=W[M+2];
|
|
I[t+3]=W[M+3]}return I};N._L.a0x=function(W,h,S,k,p){var I=S.e,q=S.Z,P=I*q,t=N._L.Vf,M=N._L.U,U=N.tO.$_,i=N._L.mn,W=t(W),z=new N.qr(I*q);
|
|
N.hc(h,z);var h=[t(z.p),t(z.z),t(z.S)],D=N._L.agI(W,h,S,k,p),R=M(P);U(W,R,S,k);var O=M(P);i(h[0],W,O);
|
|
U(O,O,S,k);var b=M(P);i(h[1],W,b);U(b,b,S,k);var w=M(P);i(h[2],W,w);U(w,w,S,k);var A=M(P),g=M(P),E=M(P),j=M(P);
|
|
for(var Q=0;Q<P;Q++){var x=R[Q],d=D.Fi[Q],L=D.fk[Q],_=D.Af[Q],T=O[Q]-d*x,c=b[Q]-L*x,e=w[Q]-_*x;A[Q]=D.asO[Q]*T+D.XV[Q]*c+D.kG[Q]*e;
|
|
g[Q]=D.XV[Q]*T+D.asm[Q]*c+D.BM[Q]*e;E[Q]=D.kG[Q]*T+D.BM[Q]*c+D.an8[Q]*e;j[Q]=x-A[Q]*d-g[Q]*L-E[Q]*_}U(A,A,S,k);
|
|
U(g,g,S,k);U(E,E,S,k);U(j,j,S,k);return[A,g,E,j]};N._L.agI=function(W,h,S,k,p){var I=S.e,q=S.Z,P=I*q,t=N._L.U,M=N.tO.$_,U=N._L.mn,i={};
|
|
i.Fi=t(P);M(h[0],i.Fi,S,k);i.fk=t(P);M(h[1],i.fk,S,k);i.Af=t(P);M(h[2],i.Af,S,k);var z=t(P);U(h[0],h[0],z);
|
|
M(z,z,S,k);var D=t(P);U(h[0],h[1],D);M(D,D,S,k);var R=t(P);U(h[0],h[2],R);M(R,R,S,k);var O=t(P);U(h[1],h[1],O);
|
|
M(O,O,S,k);var b=t(P);U(h[1],h[2],b);M(b,b,S,k);var w=t(P);U(h[2],h[2],w);M(w,w,S,k);i.asO=z;i.XV=D;
|
|
i.kG=R;i.asm=O;i.BM=b;i.an8=w;for(var Q=0;Q<P;Q++){var A=i.Fi[Q],g=i.fk[Q],E=i.Af[Q],j=z[Q]-A*A+p,x=D[Q]-A*g,d=R[Q]-A*E,L=O[Q]-g*g+p,_=b[Q]-g*E,T=w[Q]-E*E+p,c=L*T-_*_,e=_*d-x*T,r=x*_-L*d,B=j*T-d*d,F=d*x-j*_,v=j*L-x*x,X=c*j+e*x+r*d,V=1/X;
|
|
i.asO[Q]=c*V;i.XV[Q]=e*V;i.kG[Q]=r*V;i.asm[Q]=B*V;i.BM[Q]=F*V;i.an8[Q]=v*V}return i};N._L.U=function(W){return new Float32Array(W)};
|
|
N._L.Vf=function(W){var h=W.length,S=new Float32Array(h);for(var Q=0;Q<h;Q++)S[Q]=W[Q]*(1/255);return S};
|
|
N._L.mn=function(W,h,S){for(var Q=0;Q<W.length;Q++)S[Q]=W[Q]*h[Q]};N.LD={};N.LD.VX=function(W,h,S,k){var p=W[h]-S[k],I=W[h+1]-S[k+1],q=W[h+2]-S[k+2];
|
|
return Math.sqrt(p*p+I*I+q*q)*(1/441.7)};N.LD.getSelection=function(W,h,S){var k=h*S,p=N.U(k),I=!1,q=Math.round(S*.7),P=1,t=new Uint32Array(12),M=N.U(12);
|
|
for(var U=0;U<q;U++)for(var i=0;i<h;i++){if(i<P||U<P||i>h-P-1||U>S-P-1){var Q=U*h+i,z=Q<<2,D=0;if(U<P)D=4;
|
|
else if(i>h-P-1)D=8;t[D]+=W[z];t[D+1]+=W[z+1];t[D+2]+=W[z+2];t[D+3]++;p[Q]=255}}for(var Q=0;Q<12;Q+=4)for(var R=0;
|
|
R<3;R++)M[Q+R]=t[Q+R]/t[Q+3];var O=new Float32Array(k);for(var Q=0;Q<k;Q++){var z=Q*4,b=N.LD.VX(W,z,M,0),w=N.LD.VX(W,z,M,4),A=N.LD.VX(W,z,M,8),g=Math.max(b,Math.max(w,A));
|
|
O[Q]=b+w+A-g}N.LD.So(O);var E=Date.now(),j=new Float32Array(k),x=[],d=N.U(k);for(var Q=0;Q<3;Q++){N.sN(W,d,Q);
|
|
var L=new Uint16Array(k);x.push(L);N.LD.af6(d,p,h,S,L)}if(I)console.log("MBD",Date.now()-E);E=Date.now();
|
|
for(var Q=0;Q<k;Q++)j[Q]=x[0][Q]+x[1][Q]+x[2][Q];N.LD.So(j);for(var Q=0;Q<k;Q++)j[Q]+=.4*O[Q];var _=h>>>1,q=S>>>1,T=1/Math.sqrt(_*_+q*q);
|
|
for(var U=0;U<S;U++)for(var i=0;i<h;i++){var c=i-_,e=U-q,r=1-Math.sqrt(c*c+e*e)*T;j[U*h+i]*=r}if(I)console.log("Centeredness",Date.now()-E);
|
|
E=Date.now();for(var Q=0;Q<k;Q++)p[Q]=j[Q]*255;var B=Math.round(h/120),F=Math.round(B*.8);if(I)console.log(B,F);
|
|
N.y5.U8(p,d,h,S,B,N.y5.wZ,[]);p.set(d);if(I)console.log("erosion",Date.now()-E);E=Date.now();for(var Q=0;
|
|
Q<k;Q++)j[Q]=p[Q];N.LD.So(j);var v=N.U(256);for(var Q=0;Q<256;Q++)v[Q]=256/(1+Math.exp(-20*(Q/255-.5)));
|
|
for(var Q=0;Q<k;Q++){var X=~~(j[Q]*255+.5);p[Q]=v[X]}if(I)console.log("Simoid",Date.now()-E);E=Date.now();
|
|
return p};N.LD.So=function(W){var h=W.length,S=0;for(var Q=0;Q<h;Q++)S=Math.max(S,W[Q]);var k=1/S;for(var Q=0;
|
|
Q<h;Q++)W[Q]=W[Q]*k};N.LD.af6=function(W,h,S,k,p){var I=S*k,q=W.slice(0),P=W.slice(0);for(var Q=0;Q<I;
|
|
Q++)p[Q]=h[Q]==255?0:65535;N.LD.zZ(W,P,q,p,S,k);N.LD.bN(W,P,q,p,S,k);N.LD.zZ(W,P,q,p,S,k);N.LD.bN(W,P,q,p,S,k);
|
|
return p};N.LD.zZ=function(W,h,S,k,p,I){for(var q=1;q<p;q++)N.LD.w_(q,-1,W,h,S,k);for(var P=1;P<I;P++){N.LD.w_(P*p,-p,W,h,S,k);
|
|
for(var q=1;q<p;q++){var Q=P*p+q;N.LD.w_(Q,-1,W,h,S,k);N.LD.w_(Q,-p,W,h,S,k)}}};N.LD.bN=function(W,h,S,k,p,I){for(var q=p-2;
|
|
q>=0;q--)N.LD.w_(p*I-p+q,1,W,h,S,k);for(var P=I-2;P>=0;P--){N.LD.w_(P*p+p-1,p,W,h,S,k);for(var q=p-2;
|
|
q>=0;q--){var Q=P*p+q;N.LD.w_(Q,1,W,h,S,k);N.LD.w_(Q,p,W,h,S,k)}}};N.LD.w_=function(Q,W,h,S,k,p){var I=Q+W,q=h[Q],P=S[I],t=k[I];
|
|
if(P<q)P=q;else if(q<t)t=q;var M=P-t;if(p[I]!=65535&&M<p[Q]){p[Q]=M;S[Q]=P;k[Q]=t}};N.Xv={};N.Xv.filter=function(W,h,S,k){var p=h.e,I=h.Z,q=p*I,P=k[0],t=k[1],M=k[2],U=k[3],i=k[4],z=k[5],D=k[6],R=Date.now(),O=new Float32Array(p*I*4);
|
|
N.Xv.a9g(W,p,I,O);var b=Math.ceil(P*Math.sqrt(-2*Math.log(.1))),w=new ArrayBuffer(q*4),A=new Float32Array(w),g=new Float32Array(q),E=new Float32Array(q);
|
|
for(var Q=0;Q<q;Q++){var j=Q*4;A[Q]=O[j];g[Q]=O[j+1];E[Q]=O[j+2]}N.tO.Am(A,A,h,b*1/2.4,2);N.tO.Am(g,g,h,b*1/2.4,2);
|
|
N.tO.Am(E,E,h,b*1/2.4,2);for(var Q=0;Q<q;Q++){var j=Q*4;O[j]=A[Q];O[j+1]=g[Q];O[j+2]=E[Q]}var x=new Uint8Array(w);
|
|
for(var Q=0;Q<q;Q++){var j=Q*4,d=Q*4,A=O[j],g=O[j+1],E=O[j+2],L=Math.sqrt((A-E)*(A-E)+4*g*g),_=(A+E+L)*.5,T=(A+E-L)*.5,c=T-E,e=g,r=c*c+e*e;
|
|
if(r!=0){var B=Math.sqrt(r),F=1/B;c*=F;e*=F}x[d]=128+127*c;x[d+1]=128+127*e}var v=1.3*t+2,X=U*(2/10),V=W.slice();
|
|
if(n.O9){var H=new Float32Array([1/p,1/I]),o=n.kO(0,p,I);o.set(V);var J=n.kO(1,p,I);J.set(x);n.Wf(o,h);
|
|
if(i){o.rh(h);n.filter.kf({type:n.filter.a0k,o9:H,abY:1/M,aaS:X},o.LQ)}o.rh(h);n.filter.kf({type:n.filter.bw,gr:J.hr,o9:H,ab$:v,abh:2},o.LQ);
|
|
if(i){o.rh(h);n.filter.kf({type:n.filter.afX,o9:H,alO:new Float32Array(D),atU:z},o.LQ)}o.get(S)}else{if(i)N.Xv.$J(1/M,X,V,p,I);
|
|
N.Xv.bw(V,S,x,p,I,v);if(i)N.Xv.ai5(p,I,S,D,z)}var C=q*4;for(var Q=3;Q<C;Q+=4)S[Q]=W[Q]};N.Xv.bw=function(W,h,S,k,p,I){var q=Math.ceil(2*I),P=-1/(2*I*I),t=[],M=1;
|
|
for(var Q=0;Q<q+20;Q++)t[Q]=Math.exp(Q*Q*P);var U=[0,0,0,0];for(var i=0;i<p;i++){for(var z=0;z<k;z++){var D=i*k+z,R=D*4,O=1,b=W[R],w=W[R+1],A=W[R+2],g=W[R+3],E=(S[R]-128)*(1/127),j=(S[R+1]-128)*(1/127),x=E,d=j,L=z==0?.51:.49,_=i==0?.51:.49;
|
|
for(var Q=0;Q<2;Q++){var T=z+L,c=i+_,e=0;while(e<q){if(T<.5||k-.5<T||c<.5||p-.5<c)break;var r=~~T,B=~~c,F=B*k+r,v=F*4,X=(S[v]-128)*(1/127),V=(S[v+1]-128)*(1/127);
|
|
if(X*x+V*d<0){X=-X;V=-V}x=X;d=V;T+=M*X;c+=M*V;if(T<.5||k-.5<T||c<.5||p-.5<c)break;var H=~~T,o=~~c,J=o*k+H<<2;
|
|
e+=M;var C=t[~~e];N.V.Hp(T,c,W,k,p,U);b+=U[0]*C;w+=U[1]*C;A+=U[2]*C;g+=U[3]*C;O+=C}x=-E;d=-j}var Y=1/O;
|
|
h[R]=~~(.5+b*Y);h[R+1]=~~(.5+w*Y);h[R+2]=~~(.5+A*Y);h[R+3]=~~(.5+g*Y)}}};N.Xv.ai5=function(W,h,S,k,p){for(var I=0;
|
|
I<h;I++)for(var q=0;q<W;q++){var P=I*W+q<<2,t=1+N.Xv.a1t(q,I,S,W,h,k)*p;S[P]=Math.max(0,Math.min(255,S[P]*t));
|
|
S[P+1]=Math.max(0,Math.min(255,S[P+1]*t));S[P+2]=Math.max(0,Math.min(255,S[P+2]*t))}};N.Xv.a1t=function(W,h,S,k,p,I){var q=S[(h*k+Math.max(0,W-1))*4+3],P=S[(h*k+Math.min(k-1,W+1))*4+3],t=S[(Math.max(0,h-1)*k+W)*4+3],M=S[(Math.min(p-1,h+1)*k+W)*4+3],U=.7,i=(P-q)*(1/255),z=.7,D=(M-t)*(1/255),R=-i*z,O=-U*D,b=U*z,w=Math.sqrt(R*R+O*O+b*b),A=1/w,g=R*A,E=O*A,j=b*A,x=I[0]*g+I[1]*E+I[2]*j;
|
|
return x};N.Xv.$J=function(W,h,S,k,p){function I(P,M,U){return Math.max(M,Math.min(U,P))}for(var q=0;
|
|
q<p;q++)for(var P=0;P<k;P++){var t=N.Xv.am9(P+.5,q+.5,W,h);S[(q*k+P)*4+3]=Math.max(0,Math.min(255,t*255))}};
|
|
N.Xv.am9=function(W,h,S,k){function p(d,L,_){return(1-_)*d+_*L}var I=(W+613)*S,q=(h+117)*S,P=~~I,t=~~q,M=I-P,U=q-t,i=Math.sin(11),z=Math.cos(P)*i,D=Math.cos(P+1)*i,R=Math.cos(t)*i,O=Math.cos(t+1)*i,g8=N.Xv.hash(z,R),b=N.Xv.hash(D,R),w=N.Xv.hash(z,O),A=N.Xv.hash(D,O),g=p(g8,b,M),E=p(w,A,M),j=p(g,E,U);
|
|
j=j<.5?0:1;var x=j+k*N.Xv.hash(Math.cos(I)*i,Math.cos(q)*i);return x*(1/3)};N.Xv.hash=function(W,h){var S=Math.sin(W*11.697096+h*73.32456)*12157.47691;
|
|
return S-Math.floor(S)};N.Xv.a9g=function(W,h,S,k){var p=[-1,0,1,-2,0,2,-1,0,1],I=[-1,-2,-1,0,0,0,1,2,1],q=h-1,P=S-1,t=h*4;
|
|
for(var M=1;M<P;M++)for(var U=1;U<q;U++){var Q=M*h+U,i=Q*4,z=N.Xv.Du(W,i,t,p),D=N.Xv.Du(W,i,t,I),R=N.Xv.Du(W,i+1,t,p),O=N.Xv.Du(W,i+1,t,I),b=N.Xv.Du(W,i+2,t,p),w=N.Xv.Du(W,i+2,t,I);
|
|
k[i]=z*z+R*R+b*b;k[i+1]=z*D+R*O+b*w;k[i+2]=D*D+O*O+w*w}N.Xv.akc(k,h,S)};N.Xv.Du=function(W,h,S,k){return W[h-S-4]*k[0]+W[h-S]*k[1]+W[h-S+4]*k[2]+W[h-4]*k[3]+W[h]*k[4]+W[h+4]*k[5]+W[h+S-4]*k[6]+W[h+S]*k[7]+W[h+S+4]*k[8]};
|
|
N.Xv.akc=function(W,h,S){function k(t,Q,M){var U=Q*4,i=M*4;t[i]=t[U];t[i+1]=t[U+1];t[i+2]=t[U+2]}var p=h-1,I=S-1;
|
|
k(W,h+1,0);k(W,2*h-2,h-1);for(var q=1;q<p;q++)k(W,h+q,q);for(var P=1;P<I;P++){k(W,P*h+1,P*h);k(W,P*h+h-2,P*h+h-1)}for(var q=1;
|
|
q<p;q++)k(W,(S-2)*h+q,(S-1)*h+q);k(W,(P-2)*h+1,(P-1)*h);k(W,(P-1)*h-2,P*h-1)};N.bH={};N.bH.Bh=function(W,h,S,k){var p=W[h*2],I=W[h*2+1],q=W[S*2],P=W[S*2+1],t=W[k*2],M=W[k*2+1];
|
|
return p*P+q*M+t*I-t*P-q*I-p*M};N.bH.xo=function(W,h){var S=[],k=[],p=[],I={};for(var Q=0;Q<h.length;
|
|
Q+=3){var q=~~(Q*(1/3)),P=h[Q+0],t=h[Q+1],M=h[Q+2],U=N.bH.Bh(W,P,t,M);if(U>0){var i=t;t=M;M=i}var z=I[M+"-"+t],D=I[t+"-"+P],R=I[P+"-"+M],O=[M,z,q,null],b=[t,D,q,O],w=[P,R,q,b];
|
|
O[3]=w;if(z)z[1]=O;if(D)D[1]=b;if(R)R[1]=w;I[M+"-"+P]=w;I[P+"-"+t]=b;I[t+"-"+M]=O;S[P]=b;p[Q]=b;S[t]=O;
|
|
p[Q+1]=O;S[M]=w;p[Q+2]=w;k[q]=b}return{_S:S,hG:k,gu:p}};N.bH.a9G=function(W){var h=[],S=W.hG;for(var Q=0;
|
|
Q<S.length;Q++){var k=S[Q];h.push(k[0]);k=k[3];h.push(k[0]);k=k[3];h.push(k[0])}return h};N.bH.a7X=function(W,h,S,k){var p=W[h*2],I=W[h*2+1],q=W[S*2],P=W[S*2+1],t=W[k*2],M=W[k*2+1],U=q-p,i=P-I,z=t-p,D=M-I,R=U*(p+q)+i*(I+P),O=z*(p+t)+D*(I+M),b=2*(U*(M-P)-i*(t-q));
|
|
if(Math.abs(b)<1e-5){var w=Math.min(p,q,t),A=Math.min(I,P,M),g=(Math.max(p,q,t)-w)*.5,E=(Math.max(I,P,M)-A)*.5;
|
|
return[w+g,A+E,g*g+E*E,1]}var j=(D*R-i*O)/b,x=(U*O-z*R)/b,g=j-p,E=x-I;return[j,x,g*g+E*E,0]};N.bH.abG=function(W,h,S){var k=S[1],p=S[3],I=p[3],q=k[3],P=q[3],t=S[2],M=k[2],U=S[0],i=k[0],z=p[0],D=q[0],R=N.bH.a7X(W,i,D,z),O=W[U*2]-R[0],b=W[U*2+1]-R[1],w=O*O+b*b>R[2]&&R[3]==0&&N.bH.Bh(W,D,U,z)<0&&N.bH.Bh(W,z,i,D)<0;
|
|
if(w){S[0]=z;k[0]=D;S[3]=I;I[3]=q;q[3]=S;k[3]=P;P[3]=p;p[3]=k;p[2]=M;q[2]=t;h.hG[M]=P;h.hG[t]=I;h._S[i]=q;
|
|
h._S[U]=p}return w};N.bH.aqd=function(W,h,S){var k=W[h*2]-W[S*2],p=W[h*2+1]-W[S*2+1];return Math.sqrt(k*k+p*p)};
|
|
N.bH.aeH=function(W,h,S){var k=S[1],p=S[3],I=p[3],q,P,t=S[2],M,U=S[0],i=I[0],z=p[0],D;if(k){q=k[3];P=q[3];
|
|
M=k[2];D=q[0]}var R=W.length>>>1;W[2*R]=(W[2*i]+W[2*U])*.5;W[2*R+1]=(W[2*i+1]+W[2*U+1])*.5;if(!0){var O=t,b=S,w=h.hG.length,A=[R,null,O,b],g=[z,A,w,I];
|
|
A[1]=g;var E=[R,null,w,g];p[3]=A;I[3]=E;I[2]=w;h.hG[O]=p;h.hG[w]=E;h._S[U]=p;h._S[z]=I;h.gu.push(A,g,E)}if(k){var j=M,x=k,d=w+1;
|
|
E[1]=x,x[1]=E;var L=[R,null,j,x],_=[D,L,d,P];L[1]=_;var T=[R,b,d,_];b[1]=T;q[3]=L;P[3]=T;P[2]=d;h.hG[j]=q;
|
|
h.hG[d]=P;h._S[i]=q;h._S[D]=P;h.gu.push(L,_,T)}h._S[R]=b};N.bH.qd=function(W,h){var S=0;while(!0){var k=S;
|
|
for(var Q=0;Q<h.gu.length;Q++){var p=h.gu[Q];if(p[1]==null)continue;var I=N.bH.abG(W,h,p);if(I){S++;
|
|
break}}if(k==S)break}return S!=0};N.bH.a28=function(W,h,S,k){var p=0;for(var Q=0;Q<k;Q++){var I=null,q=0;
|
|
for(var P=0;P<h.gu.length;P++){var t=h.gu[P],M=N.bH.aqd(W,t[0],t[3][3][0])*(t[1]?1:2);if(M>q){I=t;q=M}}if(q>S){N.bH.aeH(W,h,I);
|
|
p++}}return p!=0};N.bH.aq8=function(W,h){var S=[],z=0;for(var Q=0;Q<W.length;Q++)S.push(0);for(var Q=0;
|
|
Q<h.gu.length;Q++){var k=h.gu[Q],p=k[0],I=k[3][3][0],q=W[p*2],P=W[p*2+1],t=W[I*2],M=W[I*2+1],U=q-t,i=P-M;
|
|
S[p*2]+=-U;S[p*2+1]+=-i;S[I*2]+=U;S[I*2+1]+=i}for(var Q=0;Q<W.length;Q+=2){var D=Q>>>1,R=h._S[D],k=R,O=!0;
|
|
do{if(k[1]==null){O=!1;break}k=k[1][3]}while(k!=R);if(O){var b=.02;W[Q]+=b*S[Q];W[Q+1]+=b*S[Q+1];z+=b*(S[Q]*S[Q]+S[Q+1]*S[Q+1])}}return z};
|
|
N.bH.ar3=function(W,h,S){var k=N.H.TA(W),p=N.bH.xo(W,h);N.bH.qd(W,p);for(var I=0;I<300;I++){var q=!1,P=!1;
|
|
q=N.bH.a28(W,p,S,5);if(q)P=N.bH.qd(W,p);var t=N.bH.aq8(W,p);if(!q&&!P&&t<1e-4){break}}return N.bH.a9G(p)};
|
|
N.aF={};N.aF.WA=function(W){var h=W.tI,S=W.W7,k=W.FB,p=W.rH,I=W.d8,q=W.t6,P=W.uG,t=N.tf.ZQ,A,g,E=0;function M(g8){var jC=new Array(g8);
|
|
for(var Q=0;Q<g8;Q++)jC[Q]=0;return jC}var U=S.length>>>1,i=M(h.ia*2),z=M(h.ia),D=M(h.ia),R=Date.now();
|
|
for(var Q=0;Q<W.eH.length;Q++){var O=h.a1l+Q,b=h.s6*(q[Q*2]+P[Q*2]),w=h.s6*(q[Q*2+1]+P[Q*2+1]);i[O*2]=b;
|
|
i[O*2+1]=w;z[O]=b;D[O]=w}h.aks.Hn(p,h.a9q.ZQ(i),.01,A,g);for(var Q=0;Q<h.ats.gu.length;Q++){var j=h.ats.gu[Q],x=j[3][3][0],d=j[0],L=j[3][0],_=j[1]?j[1][3][0]:L;
|
|
if(j[1]&&x>d)continue;var c=S[x*2],e=S[x*2+1],r=S[d*2],B=S[d*2+1],F=p[x*2],v=p[x*2+1],X=p[d*2],V=p[d*2+1],H=p[L*2],o=p[L*2+1],J=p[_*2],C=p[_*2+1],Y=[F,v,X,V,H,o];
|
|
if(j[1])Y.push(J,C);var K=t(h.anP[E],Y),u=K[0],f=K[1],l=1/Math.sqrt(u*u+f*f);u*=l;f*=l;var jk=r-c,hE=B-e;
|
|
z[E]=u*jk+f*hE;D[E]=-f*jk+u*hE;E++}var Z=new Array(U),aQ=new Array(U);for(var Q=0;Q<U;Q++){Z[Q]=I[Q*2];
|
|
aQ[Q]=I[Q*2+1]}h.a1J.Hn(Z,h.aoI.ZQ(z),.5);h.a1J.Hn(aQ,h.aoI.ZQ(D),.5);for(var Q=0;Q<U;Q++){I[Q*2]=Z[Q];
|
|
I[Q*2+1]=aQ[Q]}};N.aF.TJ=function(W){var h=W.W7,S=W.FB,k=W.eH,p=N.tf.multiply,I=Date.now(),q=N.bH.xo(h,S),P=h.length>>>1,t=0,R=0,l=1e3;
|
|
for(var Q=0;Q<q.gu.length;Q++)t+=q.gu[Q][1]?.5:1;var M=t+k.length,U=[],i=new N.pq(M*2,P*2),z=new N.pq(M,P),D=[[[-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]]],O=[],b=[];
|
|
for(var Q=0;Q<q.gu.length;Q++){var w=q.gu[Q],A=w[3][3][0],g=w[0],E=w[3][0],x=w[1]?w[1][3][0]:E;if(w[1]&&A>g)continue;
|
|
var d=h[A*2],L=h[A*2+1],_=h[g*2],c=h[g*2+1],e=h[E*2],r=h[E*2+1],B=h[x*2],F=h[x*2+1],v=[[d,L,1,0],[L,-d,0,1],[_,c,1,0],[c,-_,0,1],[e,r,1,0],[r,-e,0,1]];
|
|
if(w[1])v.push([B,F,1,0],[F,-B,0,1]);var X=N.tf.Vg(v),V=p(linear.invert(p(X,v)),X);V.pop();V.pop();U.push(V);
|
|
var H=_-d,o=c-L,J=D[w[1]?1:0];J=N.tf.Xy(J,p([[H,o],[o,-H]],V));var C=[A*2,A*2+1,g*2,g*2+1,E*2,E*2+1,x*2,x*2+1],Y=w[1]?8:6,K=[];
|
|
for(var u=0;u<Y;u++)K.push([C[u],J[0][u],J[1][u]]);K.sort(function(eO,iU){return eO[0]-iU[0]});for(var f=0;
|
|
f<2;f++){for(var u=0;u<Y;u++){O[u]=K[u][0];b[u]=K[u][1+f]}i.bz(b,O,Y)}if(A<g)z.bz([-1,1],[A,g],2);else z.bz([1,-1],[g,A],2);
|
|
R++}for(var Q=0;Q<k.length;Q++){var jk=k[Q];i.bz([l],[jk*2],1);i.bz([l],[jk*2+1],1);z.bz([l],[jk],1)}var hE=i.Vg(),Z=hE.cu(hE),aQ=z.Vg(),jC=aQ.cu(aQ);
|
|
return{a1l:t,ia:M,a9q:hE,aks:Z,aoI:aQ,a1J:jC,ats:q,anP:U,s6:l}};N.aF.a2E=function(W,h,S,k,p){var I=new gj(0,0,h,S),q=N.U(I.n());
|
|
N.sN(W,q,3);N.round(q,70);var P=N.oA(q,I),t=[.1,.065,.035][k]*Math.max(P.e,P.Z),M=p+1,U=h+M*2,i=S+M*2,z=new gj(-M,-M,U,i),D=N.U(z.n());
|
|
N.vG(q,I,D,z);var R=D.slice(0);for(var O=0;O<p;O++){for(var b=1;b<i-1;b++){for(var w=1;w<U-1;w++){var Q=b*U+w;
|
|
R[Q]=D[Q-U]|D[Q-1]|D[Q]|D[Q+1]|D[Q+U]}}var A=R;R=D;D=A}var g=gh.S2(D,U,i,Math.round(P.n()*5e-4)),E=gh.O4(g),j=new ex(1,0,0,1,-M,-M);
|
|
for(var Q=0;Q<E.length;Q++){var d=E[Q];N.H.A(d.path.s,j,d.path.s);d.W7=N.aF.aft(d.path);d.FB=N.H.afb(d.W7);
|
|
d.FB=N.bH.ar3(d.W7,d.FB,t)}return E};N.aF.aft=function(W){var h=[],S=W.s,k=W.C.length-1,p=0,I=0;for(var q=0;
|
|
q<k;q++){var Q=q*6,P=S[Q+6]-S[Q+0],t=S[Q+7]-S[Q+1],M=Math.ceil(Math.sqrt(P*P+t*t));for(var U=0;U<M;U++){var i=U/M,z=1-i,D=z*z*z*S[Q+0]+3*z*z*i*S[Q+2]+3*z*i*i*S[Q+4]+i*i*i*S[Q+6],R=z*z*z*S[Q+1]+3*z*z*i*S[Q+3]+3*z*i*i*S[Q+5]+i*i*i*S[Q+7];
|
|
h.push(D,R);p=D;I=R}}h=N.H.p1(h,1);var O=[],b=h.length;for(var Q=0;Q<b;Q+=2){var R=h.pop(),D=h.pop();
|
|
O.push(D,R)}return O};N.aF.aaL=function(W,h,S,k){function p(L,_,T,c,e){var r=e[L*2]-e[_*2],B=e[L*2+1]-e[_*2+1],F=Math.sqrt(r*r+B*B);
|
|
if(T[L].indexOf(_)==-1){T[L].push(_);c[L].push(F)}if(T[_].indexOf(L)==-1){T[_].push(L);c[_].push(F)}}var I=W.length>>>1,q=new Array(I);
|
|
if(S.length==0){q.fill(0);return q}var P=new Array(I),t=new Array(I);for(var Q=0;Q<I;Q++){P[Q]=[];t[Q]=[]}for(var Q=0;
|
|
Q<h.length;Q+=3){p(h[Q],h[Q+1],P,t,W);p(h[Q],h[Q+2],P,t,W);p(h[Q+1],h[Q+2],P,t,W)}var M=new Float64Array(I*2),U=new Uint32Array(I*2);
|
|
M.fill(1e9);var i=new Uint8Array(I);for(var z=0;z<S.length;z++){i.fill(0);var D=["---",[0,S[z]]];while(D.length!=1){var R=N.VC.amQ(D),O=R[0],b=R[1];
|
|
if(i[b]==1)continue;var w=b<<1;if(O<M[w]){M[w+1]=M[w];U[w+1]=U[w];M[w]=O;U[w]=z}else if(O<M[w+1]){M[w+1]=O;
|
|
U[w+1]=z}i[b]=1;var A=P[b],g=t[b];for(var Q=0;Q<A.length;Q++){var E=A[Q];if(i[E]!=1){N.VC.a0v(D,[O+g[Q],E])}}}}for(var Q=0;
|
|
Q<I;Q++){var w=Q<<1,j=M[w],x=M[w+1],d=1/(j+x);q[Q]=(1-j*d)*k[U[w]]+(1-x*d)*k[U[w+1]]}return q};N.aF.a6N=function(W){var h={C:[],s:[]},S=[W];
|
|
while(S.length!=0){var k=S.pop(),p=k.zq;if(k.aag instanceof Array||k.a4A instanceof Array){h.C.push("M","L","L","L","Z");
|
|
h.s.push(p[0],p[1],p[2],p[1],p[2],p[3],p[0],p[3])}else S.push(k.aag,k.a4A)}return h};N.aF.gY=function(W,h,S,k,p,I,q,P,t,M){var U=Math.round(M.length/3),i=new Array(U);
|
|
for(var Q=0;Q<U;Q++)i[Q]=Q;i.sort(function(D,R){return t[M[D*3]]-t[M[R*3]]});for(var Q=0;Q<U;Q++){var z=i[Q]*3;
|
|
N.aF.a23(M[z]*2,M[z+1]*2,M[z+2]*2,q,P,W,h,S,k,p,I)}};N.aF.a23=function(W,h,S,k,p,I,q,P,t,M,U){var i=N.aF.Rd,z=[W,h,S,1.2,1.2,1.2,0],D=[0,0,0,0],R=p[W],O=p[W+1],b=p[h],w=p[h+1],A=p[S],g=p[S+1],E=Math.max(0,Math.min(q-1,k[W])),j=Math.max(0,Math.min(q-1,k[h])),x=Math.max(0,Math.min(q-1,k[S])),d=Math.max(0,Math.min(P-1,k[W+1])),L=Math.max(0,Math.min(P-1,k[h+1])),_=Math.max(0,Math.min(P-1,k[S+1])),T=b-R,c=w-O,e=A-R,r=g-O,B=1/(T*r-e*c+1e-9),F=Math.max(0,Math.floor(Math.min(R,b,A))),v=Math.min(M,Math.ceil(Math.max(R,b,A))),X=Math.max(0,Math.floor(Math.min(O,w,g))),V=Math.min(U,Math.ceil(Math.max(O,w,g)));
|
|
for(var H=X;H<V;H++)for(var o=F;o<v;o++){var J=o+.5-R,C=H+.5-O,Y=(J*r-e*C)*B,K=(T*C-J*c)*B;if(Y>=0&&K>=0&&Y+K<=1){var u=1-Y-K,f=E*u+j*Y+x*K,l=d*u+L*Y+_*K;
|
|
N.V.Hp(f,l,I,q,P,D);N.aF.apO(D,t,H*M+o<<2)}}};N.aF.apO=function(W,h,S){var k=h[S],p=h[S+1],I=h[S+2],q=h[S+3],P=1-W[3]*(1/255);
|
|
h[S]=~~(.5+W[0]+k*P);h[S+1]=~~(.5+W[1]+p*P);h[S+2]=~~(.5+W[2]+I*P);h[S+3]=~~(.5+W[3]+q*P)};N.aF.Rd=function(){var W=function(S,k,p,I){var q=I[0],P=I[1],t=I[2],M=S[q+0],U=S[q+1],i=S[P+0],z=S[P+1],D=S[t+0],R=S[t+1],O=i-M,b=z-U,w=D-M,A=R-U,g=k-M,E=p-U,j=O*A-w*b,x=1/(j+1e-9),d=(g*A-w*E)*x,L=(O*E-g*b)*x;
|
|
if(d>=0&&L>=0&&d+L<=1){I[3]=1-d-L;I[4]=d;I[5]=L;return 1}return 0},h=function(S,k,p,I){var q=[0,0,0,0,0,0];
|
|
for(var Q=0;Q<k.length;Q+=3){q[0]=k[Q]*2;q[1]=k[Q+1]*2;q[2]=k[Q+2]*2;if(W(S,p,I,q)==1)return!0}return!1};
|
|
return{a00:W,akH:h}}();N.JH={};N.JH.ahL=function(W,h,S){var k=N.U(h*S*4),p=!1;N.V.OF(W,h,S,k,[S,h,0,1,0,1,0,0]);
|
|
return[N.JH.Ft(W,h,S,p),N.JH.Ft(k,S,h,p)]};N.JH.A=function(W,h){var S=!1,k=W[0],p=W[1],I=k[1],q=k[2],P=k[3],t=h.e,M=h.Z;
|
|
if(q==t&&P==M)I=I.slice(0);else if(P!=M){var U=N.U(q*M*4);N.JH.sp(p,M,U,S);I=N.U(q*M*4);N.V.OF(U,M,q,I,[q,M,0,1,0,1,0,0]);
|
|
if(q!=t){k=N.JH.Ft(I,q,M,S);I=N.U(t*M*4);N.JH.sp(k,t,I,S)}}else if(q!=t){I=N.U(t*P*4);N.JH.sp(k,t,I,S)}return I};
|
|
N.JH.Ft=function(W,h,S,k){var p=Date.now(),I=new Uint16Array(h*S),q=1;N.JH.abq(W,h,S,I);var P=Math.ceil(h/q),t=new Uint32Array(q),M=new Uint32Array(q),P=Math.floor(h/q);
|
|
for(var U=0;U<q;U++)M[U]=U<q-1?P:h-(q-1)*P;for(var i=0;i<S;i++){var Q=i*h;for(var U=0;U<q;U++){var P=M[U];
|
|
for(var z=0;z<P;z++)t[U]+=I[Q+z];Q+=P}}if(k){console.log(Date.now()-p,"cost");p=Date.now()}var D=new Uint32Array(h),R=new Uint32Array(h),O=new Uint32Array(h*S);
|
|
for(var z=0;z<h;z++){O[(S-1)*h+z]=I[(S-1)*h+z]}for(var i=S-2;i>=0;i--){var b=i*h;for(var U=0;U<q;U++){var P=M[U];
|
|
O[b]=I[b]+Math.min(O[b+h],O[b+h+1]);for(var z=1;z<P-1;z++){var Q=b+z;O[Q]=I[Q]+Math.min(O[Q+h-1],Math.min(O[Q+h],O[Q+h+1]))}b+=P-1;
|
|
O[b]=I[b]+Math.min(O[b+h-1],O[b+h]);b++}}if(k){console.log(Date.now()-p,"Building M");p=Date.now()}function w(c,e){return c<e?c:e}function A(Q,c){var e=R[Q],r=O[c],B=~~(e*r*1e-4);
|
|
return B}var g=new Uint8Array(h*S),E=new Uint32Array(h);for(var Q=0;Q<h;Q++){D[Q]=Q;R[Q]=I[Q]}for(var i=1;
|
|
i<S;i++){var j=0,b=i*h;for(var U=0;U<q;U++){var P=M[U],Q=b;E[j]=A(j,Q);var x=E[j]+A(j+1,Q+1),d=A(j,Q+1)+A(j+1,Q);
|
|
E[j+1]=w(x,d);for(var z=2;z<P;z++){var Q=b+z,L=E[j+z-1]+A(j+z-1,Q-1),_=E[j+z-2]+A(j+z-1,Q-2)+A(j+z-2,Q-1);
|
|
E[j+z]=w(L,_)}var z=P-1;while(z>=2){var Q=b+z,L=E[j+z-1]+A(j+z-1,Q-1),_=E[j+z-2]+A(j+z-1,Q-2)+A(j+z-2,Q-1);
|
|
if(E[j+z]==L){g[Q-h]=1;z-=1}else{g[Q-h]=0;g[Q-h-1]=2;z-=2}}var Q=b;if(z==0){g[Q-h]=1}else{if(E[j+1]==x){g[Q+1-h]=1;
|
|
g[Q-h]=1}else{g[Q+1-h]=0;g[Q-h]=2}}b+=P;j+=P}N.JH.akj(i,h,g,I,D,R,!0,p)}if(k){console.log(Date.now()-p,"Matching");
|
|
p=Date.now()}var T=I;return[UZIP.adler(W,0,W.length),W,h,S,q,M,t,D,R,g,T]};N.JH.sp=function(W,h,S,k){var p=W.slice(0),I=p.shift(),q=p.shift(),P=p.shift(),t=p.shift(),M=p.shift(),U=p.shift(),i=p.shift(),z=p.shift(),D=p.shift().slice(0),R=p.shift(),O=p.shift(),b=Date.now(),w=Math.abs(P-h),A=Math.floor(w/M),g=new Uint32Array(M),j=0,x=1e9,L=0,_=0,T=0;
|
|
for(var E=0;E<M;E++)g[E]=E<M-1?A:w-(M-1)*A;O.fill(0);for(var d=0;d<P;d++){j=Math.max(j,D[d]);x=Math.min(x,D[d])}for(var E=0;
|
|
E<M;E++){var c=U[E],A=g[E];for(var e=0;e<A;e++){var r=0,B=1e9;for(var d=0;d<c;d++)if(D[_+d]<B){B=D[_+d];
|
|
r=_+d}if(h<P)D[r]=1e9;else D[r]*=1.2;if(T<P/3)L+=B;var F=z[r],v=O[F],X=v<65280?65280:v+1;if(X<65280)throw"e";
|
|
for(var V=0;V<t;V++){var Q=V*P+F;O[Q]=X;F+=R[Q]-1}T++}_+=c}if(k){console.log(Date.now()-b,"Removing best seams");
|
|
b=Date.now()}function H(Q,J){var C=Q<<2,Y=J<<2;S[C]=q[Y];S[C+1]=q[Y+1];S[C+2]=q[Y+2];S[C+3]=q[Y+3]}for(var V=0;
|
|
V<t;V++){var o=0,Q=V*P;for(var d=0;d<h;d++,o++){if(h<P){while(O[Q+o]==65280)o++;H(V*h+d,V*P+o)}else{H(V*h+d,V*P+o);
|
|
while(O[Q+o]>=65280){O[Q+o]--;d++;H(V*h+d,V*P+o)}}}}if(k){console.log(Date.now()-b,"Shifting image pixels");
|
|
b=Date.now()}};N.JH.akj=function(W,h,S,k,p,I){var q=0,Q=W*h;while(q<h){if(S[Q-h]==1){I[q]=I[q]+k[Q];
|
|
q++;Q++}else{var P=p[q];p[q]=p[q+1];p[q+1]=P;var t=I[q];I[q]=I[q+1]+k[Q];I[q+1]=t+k[Q+1];q+=2;Q+=2}}};
|
|
N.JH.abq=function(W,h,S,k){function p(W,Q,t){var i=Q<<2,z=t<<2,D=W[i]-W[z],R=W[i+1]-W[z+1],O=W[i+2]-W[z+2];
|
|
return Math.abs(D)+Math.abs(R)+Math.abs(O)}for(var I=1;I<h;I++){var q=p(W,I,I-1);k[I-1]+=q;k[I]+=q}for(var P=1;
|
|
P<S;P++){var t=P*h,q=p(W,t,t-h);k[t]+=q;k[t-h]+=q;for(var I=1;I<h;I++){var Q=P*h+I,M=p(W,Q,Q-1),U=p(W,Q,Q-h);
|
|
k[Q-h]+=U;k[Q-1]+=M;k[Q]+=U+M}}for(var P=0;P<S;P++){k[P*h]*=2;k[P*h+h-1]*=2}for(var Q=0;Q<k.length;Q++)if(k[Q]==0)k[Q]=1};
|
|
N.d9=function(){var W=0,h=0,k=15,I=256;function S(U,i,z,D,R,O){var b=(R-1)*i,w=O*i;return U[w+D]-U[w+z-1]-U[b+D]+U[b+z-1]}var p=Math.round(k/8),q=[];
|
|
function P(U,i){for(var z=0;z<i.length;z++){var D=i[z],R=0,O=0,b=U[D.dO],w=b.bd,A=b.s6,g=b.R_;for(var E=-k;
|
|
E<=k;E++)for(var j=-k;j<=k;j++){var x=j+D.a3Y,d=E+D.ak8;if(j*j+E*E>k*k||x<0||d<0||x>=A||d>=A)continue;
|
|
var L=w[d*A+x];R+=j*L;O+=E*L}D.Sl=Math.atan2(O,R)}}function t(U,i,z,D,R){var O=~~(U+.5),b=~~(i+.5);return S(z,D,O-p,O+p,b-p,b+p)}function M(U,i,z,D,R){W=D;
|
|
h=R;if(q.length==0){var O=new N.a.Yl(16200817),g=8,E=0;function b(aQ){var T=aQ[0]-aQ[2],c=aQ[1]-aQ[3];
|
|
return T*T+c*c}function w(){var aQ=0,jC=0;while(aQ===0)aQ=O.get();while(jC===0)jC=O.get();return Math.sqrt(-2*Math.log(aQ))*Math.cos(2*Math.PI*jC)}var A=w,j=[];
|
|
while(E!=I){var x=Math.max(-k,Math.min(k,A()*g)),d=Math.max(-k,Math.min(k,A()*g)),L=Math.max(-k,Math.min(k,A()*g)),_=Math.max(-k,Math.min(k,A()*g)),T=x-L,c=d-_,e=Math.sqrt(T*T+c*c);
|
|
if(e<3||e>12)continue;q.push(x,d,L,_);E++}}var r=20;for(var B=0;B<i.length;B++){var F=i[B],v=U[F.dO],X=v.nI,z=v.bd,D=v.s6,R=v.R_,V=F.a3Y,H=F.ak8,o=F.Sl,J=Math.cos(o),C=Math.sin(o),Y=new Uint8Array(I>>>3);
|
|
F.b4=Y;for(var Q=0;Q<I;Q++){var K=Q*4,x=q[K+0],d=q[K+1],L=q[K+2],_=q[K+3],u=J*x-C*d,f=C*x+J*d,l=J*L-C*_,jk=C*L+J*_,hE=t(V+u,H+f,X,D,R),Z=t(V+l,H+jk,X,D,R);
|
|
Y[Q>>>3]|=(hE<Z?0:1)<<(Q&7)}}}return{asV:P,akn:M}}();N.ao8=function(){function W(h,S){var k=[[9]],p=Date.now(),I=[];
|
|
for(var q=0;q<h.length;q++){var P=h[q],t=P.nI,M=P.s6,U=P.R_,D=9,g=1,F=24;if(t==null)continue;var i=new Float32Array(M*U),z=new Uint8Array(M*U),R=D>>>1,O=R>>>1,b=Math.round(D/3);
|
|
if(b!=D/3)throw"e";var w=1/(D*D),A=1.2*(D/9);for(var E=R+1;E<U-R;E+=g)for(var j=R+1;j<M-R;j+=g){var x=N.UA(t,M,j-O,j+O,E-R,E+R)-3*N.UA(t,M,j-O,j+O,E-R+b,E+R-b),d=N.UA(t,M,j-R,j+R,E-O,E+O)-3*N.UA(t,M,j-R+b,j+R-b,E-O,E+O),L=j-R+1,_=j+R-1,T=E-R+1,c=E+R-1,e=N.UA(t,M,L,j-1,T,E-1)+N.UA(t,M,j+1,_,E+1,c)-N.UA(t,M,j+1,_,T,E-1)-N.UA(t,M,L,j-1,E+1,c),r=(d*x-.9*e*(.9*e))*(w*w);
|
|
i[E*M+j]=Math.abs(r);z[E*M+j]=r<0?0:1}var B=M*g;for(var E=F;E<U-F;E+=g)for(var j=F;j<M-F;j+=g){var Q=E*M+j,v=i[Q];
|
|
if(v<16)continue;if(i[Q-g]>=v||i[Q+g]>=v)continue;if(i[Q-B-g]>=v||i[Q-B]>=v||i[Q-B+g]>=v)continue;if(i[Q+B-g]>=v||i[Q+B]>=v||i[Q+B+g]>=v)continue;
|
|
I.push({x:~~(j*P.kv+.5),y:~~(E*P.kv+.5),a3Y:j,ak8:E,dO:q,k:v,adH:z[Q],Nx:A})}}if(S!=null){I.sort(function(K,u){return u.k-K.k});
|
|
I=I.slice(0,S)}return I;var X=[];for(var Q=0;Q<I.length;Q++){var V=!0,H=I[Q];for(var o=0;o<I.length;
|
|
o++){var J=I[o];if(o!=Q&&J.k>H.k&&(J.dO==H.dO+1||J.dO==H.dO-1)){var C=H.x-J.x,Y=H.y-J.y;if(C*C+Y*Y<5){V=!1;
|
|
break}}}if(V)X.push(H)}console.log(I.length,X.length);return X}return{aaT:W}}();N.Vn={};N.Vn.a2V=function(W){var h=W.length,S=N.Vn.OO(W,!1),p=0,I=1;
|
|
throw"e";var k=[];for(var Q=0;Q<h;Q++)k[Q]=N.Vn.QX(S[Q]);var q=W[0][1],P=N.Vn.match(S[p],S[I],k[I]);
|
|
console.log(P.length);var t=Math.max(Math.min(P.length,40),P.length*.54);t=Math.min(t,200);var M=P.slice(0,t),U=N.yJ.ape(S[p],S[I],M,q.e,q.Z),i=N.yJ.aeC(U,[0,0,0],1),z=q.e/2,D=q.Z/2,R=1/Math.max(z,D);
|
|
for(var Q=0;Q<1;Q++){var O=M[Q],b=S[p][O[0]],w=S[I][O[1]],A=N.yJ.arI(i,R*(b.x-z),R*(b.y-D),R*(w.x-z),R*(w.y-D))}var g=N.yJ.agt(U,q),E=[];
|
|
for(var Q=0;Q<2;Q++){var j=g[Q],x=[j[0][0],j[0][1],j[0][2],j[1][0],j[1][1],j[1][2],j[2][0],j[2][1]],d=a.Q.us(W[Q],null,x);
|
|
E.push([d.buffer,d.rect])}return[N.Vn.a2r(E[0],E[1],S[p],S[I],M,U,g,q)]};N.Vn.b2=function(W,h){var S=W.length,k=!1,p=Date.now(),I=N.Vn.OO(W,!1,1e4);
|
|
if(k)console.log("Descriptors ready",Date.now()-p);p=Date.now();for(var Q=0;Q<S;Q++){var q=W[Q][1];for(var P=0;
|
|
P<I[Q].length;P++){I[Q][P].x+=q.x;I[Q][P].y+=q.y}}if(k)console.log("shifted",Date.now()-p);p=Date.now();
|
|
var t=[];for(var Q=0;Q<S;Q++)t[Q]=N.Vn.QX(I[Q]);if(k)console.log("trees built",Date.now()-p);p=Date.now();
|
|
var M=[];for(var Q=0;Q<S-1;Q++)for(var P=Q+1;P<S;P++){var U=N.Vn.match(I[Q],I[P],t[P]);if(k)console.log("Matches found",Q,P,U.length);
|
|
U=U.slice(0,U.length>>>1);if(U.length<10)return null;var i=N.Vn.ajI(I[Q],I[P],U,2);M.push([Q,P,U,i])}M.sort(function(T,c){return c[2].length-T[2].length});
|
|
if(k)console.log("Matches found",Date.now()-p);p=Date.now();var z=[],D=new UnionFind(S);for(var Q=0;
|
|
Q<M.length;Q++){var R=M[Q],O=D.find(R[0]),b=D.find(R[1]);if(O!=b){z.push(R);D.link(O,b)}}var w=[];for(var Q=0;
|
|
Q<S;Q++)w[Q]=[1,0,0,0,1,0,0,0];var A=[0],g=new Uint8Array(S);g[A[0]]=1;while(A.length!=0){var b=A.pop(),i=w[b],E=[];
|
|
for(var Q=0;Q<z.length;Q++){var R=z[Q],x=R[0],d=R[1];if(x==b&&g[d]==0){w[d]=N.V.iq(i,R[3]);A.push(d);
|
|
g[d]=1}if(d==b&&g[x]==0){w[x]=N.V.iq(i,N.V.uA(R[3]));A.push(x);g[x]=1}}}if(h==null){var L=[];for(var Q=0;
|
|
Q<S;Q++)L.push([w[Q][2],Q]);L.sort(function(T,c){return T[0]-c[0]});h=L[L.length>>>1][1]}var _=N.V.uA(w[h]);
|
|
for(var Q=0;Q<S;Q++)w[Q]=N.V.iq(w[Q],_);if(k)console.log("Transforms reordered",Date.now()-p);p=Date.now();
|
|
return w};N.Vn.OO=function(W,h,S){var k=[],p=!1;for(var Q=0;Q<W.length;Q++){var I=W[Q][0],q=W[Q][1],P=q.e,t=q.Z,M=N.U(q.n());
|
|
N.Zi(I,M);var U=Date.now(),i=N.Vn.a9_(M,q,!0);if(p)console.log("Pyramid built ---------------",Date.now()-U);
|
|
U=Date.now();var z=N.ao8.aaT(i,S);if(p)console.log("SURF Generation",Date.now()-U);U=Date.now();if(!h){N.d9.asV(i,z);
|
|
if(p)console.log("ORB Orientations",Date.now()-U);U=Date.now();N.d9.akn(i,z,M,P,t);if(p)console.log("ORB Descriptors",Date.now()-U);
|
|
U=Date.now()}k.push(z)}return k};N.Vn.a9_=function(W,h,S){var k=[],p=[W,h];N.qc(p);if(S){var I=N.px(W,h),q=I.rect,P=[I.vM,q];
|
|
N.qc(P)}for(var Q=0;Q<p.length;Q++){var t=p[2*Q],M=p[2*Q+1],U=M.e,i=M.Z,z=Math.min(U,i);if(z<30)break;
|
|
if(z<1600)k.push({bd:t,s6:U,R_:i,kv:1<<Q,nI:N.Ky(t,U,i)});if(!S)continue;var t=P[2*Q],M=P[2*Q+1],U=M.e,i=M.Z,z=Math.min(U,i);
|
|
if(z<30)break;if(z<1600)k.push({bd:t,s6:U,R_:i,kv:(1<<Q)*3/2,nI:N.Ky(t,U,i)})}return k};N.Vn.ajI=function(W,h,S,k){var p=Date.now(),I,q=0,P=0,t=S.length,M=new Float64Array(2);
|
|
for(var U=0;U<3e3;U++){var i=~~(Math.random()*t),z=~~(Math.random()*t),D=~~(Math.random()*t),R=~~(Math.random()*t),B=0,F=0;
|
|
if(i==z||i==D||i==R||z==D||z==R||D==R)continue;var O=S[i],b=S[z],w=S[D],A=S[R],g=W[O[0]],E=h[O[1]],j=W[b[0]],x=h[b[1]],d=W[w[0]],L=h[w[1]],_=W[A[0]],T=h[A[1]],c=[g.x,g.y,j.x,j.y,d.x,d.y,_.x,_.y],e=[E.x,E.y,x.x,x.y,L.x,L.y,T.x,T.y],r=N.V.QC(c,e);
|
|
if(r[0]==0&&r[1]==0&&r[3]==0&&r[4]==0)continue;var v=t-q+2;for(var Q=0;Q<t&&Q-B<v;Q++){var X=W[S[Q][0]],V=h[S[Q][1]];
|
|
N.V.Sj(V.x,V.y,r,M);var H=M[0]-X.x,o=M[1]-X.y,J=H*H+o*o;if(J<k){B++;F+=J}}if(B>q||B==q&&F<P){I=r;q=B;
|
|
P=F}}return I};var iD=new Uint8Array(256);for(var Q=0;Q<256;Q++){var iG=0,g8=Q;while(g8!=0){g8=g8&g8-1;
|
|
iG++}iD[Q]=iG}N.Vn.a6w=function(W,h,S){var k=0,p=W.length;for(var Q=0;Q<p&&k<S;Q++)k+=iD[W[Q]^h[Q]];
|
|
return k};N.Vn.a9H=function(W,h,S,top,k){if(k[S]==1)return;var p=N.Vn.a6w(W.b4,h.b4,top[0]);if(p<top[0]){if(p<top[2]){top[0]=top[2];
|
|
top[1]=top[3];top[2]=p;top[3]=S}else{top[0]=p;top[1]=S}}k[S]=1};N.Vn.QX=function(W){var h=[],S=[],k=[[],[]],p=4;
|
|
for(var Q=0;Q<W.length;Q++)(W[Q].adH==0?h:S).push(Q);for(var I=0;I<2;I++){var q=new Array(p),P=[],t=I==0?h:S,M=t.length/256,U=[];
|
|
for(var i=0;i<32;i++){var z=new Array(256),O=0;for(var D=0;D<256;D++)z[D]=[];for(var D=0;D<t.length;
|
|
D++){var R=t[D];z[W[R].b4[i]].push(R)}for(var D=0;D<256;D++)O+=Math.abs(z[D].length-M);U.push([O,i,z])}U.sort(function(b,w){return b[0]-w[0]});
|
|
var P=[],q=[];k[I]=[P,q];for(var Q=0;Q<p;Q++){P.push(U[Q][1]);q.push(U[Q][2])}}return k};N.Vn.match=function(W,h,S){var k=[],p=new Uint16Array(h.length);
|
|
p.fill(65535);var I=new Uint8Array(h.length),top=new Uint32Array(4),q=[];for(var P=0;P<W.length;P++){var t=W[P],M=t.b4;
|
|
top.fill(1e6);I.fill(0);var U=S[t.adH];for(var i=0;i<U[1].length;i++){var z=U[1][i][M[U[0][i]]];for(var D=0;
|
|
D<z.length;D++){var R=z[D];N.Vn.a9H(t,h[R],R,top,I)}}if(top[2]<50&&top[2]<top[0]*.5){var O=p[top[3]];
|
|
if(O==65535){p[top[3]]=k.length;k.push([P,top[3],top[2]])}else if(top[2]<k[O][2]){k[O]=[P,top[3],top[2]]}}}k.sort(function(b,w){return b[2]-w[2]});
|
|
return k};N.Vn.a3$=function(W){var h=new gj;for(var Q=0;Q<W.length;Q++)h=h.r8(W[Q][1]);var S=N.U(h.n()*4);
|
|
for(var Q=0;Q<W.length;Q++)N.a.ha("norm",W[Q][0],W[Q][1],S,h,h,1);return[S,h]};N.Vn.a2r=function(W,h,S,k,p,I,q,P){var t=W[1].clone(),M=t.clone();
|
|
t.x=t.y=0;var U=h[1].clone(),i=U.clone();U.x=U.y=0;U.x=t.e;var z=t.r8(U),D=i.y-M.y,R=N.U(z.n()*4);N.zt(W[0],t,R,z);
|
|
N.zt(h[0],new gj(U.x,U.y+D,U.e,U.Z),R,z);var O=document.createElement("canvas");O.width=z.e;O.height=z.Z;
|
|
var b=O.getContext("2d");b.lineWidth=.5;b.putImageData(new ImageData(new Uint8ClampedArray(R.buffer),z.e,z.Z),0,0);
|
|
if(I){var w=I[0],A=N.tf.Vg(w),g=t.e,E=P.e;for(var Q=0;Q<p.length;Q++){var j=p[Q],W=S[j[0]],h=k[j[1]];
|
|
b.strokeStyle="#"+"ff0000";b.beginPath();var x=N.yJ.ake(A,q[0],h,0,E),d=N.yJ.ake(w,q[1],W,0,E);b.moveTo(-M.x+x[0],-M.y+x[1]);
|
|
b.lineTo(-M.x+x[2],-M.y+x[3]);b.moveTo(g-i.x+d[0],-i.y+D+d[1]);b.lineTo(g-i.x+d[2],-i.y+D+d[3]);b.stroke()}}if(p){var L=p.length;
|
|
for(var Q=0;Q<L;Q++){var j=p[Q],W=S[j[0]],h=k[j[1]];b.strokeStyle="#"+"ffff00"}}var _=new Uint8Array(b.getImageData(0,0,z.e,z.Z).data.buffer);
|
|
if(!1){for(var T=0;T<2;T++){var c=T==0?S:k,e=T*t.e;for(var Q=0;Q<c.length;Q++){var r=c[Q],B=~~r.x,F=~~r.y,v=(F*z.e+B+e)*4;
|
|
_[v+1]=_[v+2]=r.adA*60;_[v+0]=0;_[v+3]=255}}}return[_,z]};N.stack={};N.stack.stack=function(W,h,S){var k=W.length,p=h.length;
|
|
if(k==1){h.set(W[0]);return}if(S=="avrg"||S=="stdv"||S=="summ"||S=="vari"){var I=1/k;for(var Q=0;Q<p;
|
|
Q++){var q=0;for(var P=0;P<k;P++)q+=W[P][Q];var t=~~(q*I+.5);if(S=="avrg"||(Q&3)==3)h[Q]=t;else if(S=="summ")h[Q]=255*Math.pow(Math.min(255,q)*(1/255),1/2.4);
|
|
else{var M=0;for(var P=0;P<k;P++){var U=W[P][Q]-t;M+=U*U}var i=Math.sqrt(M*I)*(1/255);if(S=="stdv")h[Q]=255*Math.pow(i,1/2.4);
|
|
else h[Q]=255*Math.pow(i*i,1/2.4)}}}else if(S=="maxx"){for(var Q=0;Q<p;Q++){var z=0;for(var P=0;P<k;
|
|
P++)z=Math.max(z,W[P][Q]);h[Q]=z}}else if(S=="minn"){for(var Q=0;Q<p;Q++){var z=255;for(var P=0;P<k;
|
|
P++)z=Math.min(z,W[P][Q]);h[Q]=z}}else if(S=="medn"||S=="rang"){var D=function(w,A){return w-A},R=new Array(k),O=0,b=0;
|
|
if(k%1==0){b=k>>>1;O=b-1}else{O=b=k>>>1}for(var Q=0;Q<p;Q++){for(var P=0;P<k;P++)R[P]=W[P][Q];R.sort(D);
|
|
if(S=="medn")h[Q]=R[O]+R[b]>>>1;else h[Q]=(Q&3)==3?R[k-1]:R[k-1]-R[0]}}else console.log(S)};N.ps={};
|
|
N.ps.aj3=function(W,h,S,k){var p=Date.now(),I=new Uint32Array(h*S),q=new Uint8Array(h*S);while(!0){q.fill(0);
|
|
I.fill(0);var P=[],t=0;for(var M=0;M<S;M++){for(var U=0;U<h;U++){var Q=M*h+U;if(q[Q]==0){var i=P.length,z=N.ps.ai(W,h,S,U,M,q,I,i);
|
|
P.push([i,U,M,z[0],z[1],W[Q]]);if(z[0]<k)t++}}}if(t==0)break;var D=P.length,R=new UnionFind(D),O=[];
|
|
for(var Q=0;Q<D;Q++)O.push([]);for(var Q=0;Q<D;Q++){var z=P[Q],b=z[4],w=0,A=0;if(z[3]>=k)continue;var i=z[0];
|
|
for(var g=0;g<b.length;g+=2){var E=I[b[g+1]*h+b[g]],j=P[E];if(j[3]>A){A=j[3];w=E}}if(R.find(i)!=R.find(w)){R.link(i,w);
|
|
O[i].push(w);O[w].push(i)}}var x=new Uint32Array(D);x.fill(4294967295);var d=new Uint32Array(D);for(var Q=0;
|
|
Q<D;Q++){if(x[Q]!=4294967295||O[Q].length==0)continue;var L=[Q],_=[Q],T=Q,c=P[Q][3];while(_.length!=0){var e=_.pop(),r=O[e];
|
|
for(var g=0;g<r.length;g++){var B=r[g];if(L.indexOf(B)==-1){L.push(B);_.push(B);var F=P[B];if(F[3]>c){c=F[3];
|
|
T=B}}}}for(var g=0;g<L.length;g++){x[L[g]]=T;var v=P[T];d[L[g]]=W[v[2]*h+v[1]]}}for(var M=0;M<S;M++)for(var U=0;
|
|
U<h;U++){var Q=M*h+U,X=x[I[Q]];if(X!=4294967295)W[Q]=d[X]}}};N.ps.ai=function(W,h,S,k,p,I,q,P){var t=[k,p],M=W[p*h+k],U=0,i=[];
|
|
I[p*h+k]=1;while(t.length!=0){var z=t.pop(),D=t.pop(),Q=z*h+D;q[Q]=P;U++;if(z!=S-1)if(W[Q+h]==M){if(I[Q+h]==0){t.push(D,z+1);
|
|
I[Q+h]=1}}else i.push(D,z+1);if(z!=0)if(W[Q-h]==M){if(I[Q-h]==0){t.push(D,z-1);I[Q-h]=1}}else i.push(D,z-1);
|
|
if(D!=h-1)if(W[Q+1]==M){if(I[Q+1]==0){t.push(D+1,z);I[Q+1]=1}}else i.push(D+1,z);if(D!=0)if(W[Q-1]==M){if(I[Q-1]==0){t.push(D-1,z);
|
|
I[Q-1]=1}}else i.push(D-1,z)}return[U,i]};N.ps.a34=function(W,h,S,k,p){var I=N.ps.zC(W.buffer,h,S).lt,q=Date.now(),P=[];
|
|
for(var Q=0;Q<I.length;Q++){var t=I[Q],M=1;for(var U=0;U<M;U++)P.push(t.ZB)}var i=new Uint32Array(P),z=UPNG.quantize.getKDtree(new Uint8Array(i.buffer),k),D=[h,1,-h,-1,h+1,-h+1,-h-1,h-1,h+h,2,-h-h,-2,h+h-1,h+h+1,h+2,-h+2,-h-h+1,-h-h-1,-h-2,h-2,h+h+2,-h-h+2-h-h-2,h+h-2],R=new Uint8Array(h*S),O=W;
|
|
for(var b=0;b<S;b++)for(var w=0;w<h;w++){var Q=b*h+w<<2,A=O[Q]*(1/255),g=O[Q+1]*(1/255),E=O[Q+2]*(1/255),j=O[Q+3]*(1/255),x=N.ps.vl(z,A,g,E,j,p);
|
|
if(x==null){var d=[],L=0;while(L<20){var _=b*h+w+D[L]<<2,T=O[_]*(1/255),c=O[_+1]*(1/255),e=O[_+2]*(1/255),r=O[_+3]*(1/255),B=N.ps.vl(z,T,c,e,r,.005);
|
|
if(B!=null){if(d.indexOf(B)==-1){d.push(B);B.N5=1}else B.N5++}L++}d.sort(function(j,E){return E.N5-j.N5});
|
|
while(d.length!=0&&d[d.length-1].N5<3)d.pop();if(d.length==0)x=N.ps.vl(z,A,g,E,j,100);else if(d.length==1)x=d[0];
|
|
else if(d.length==2){var F=d[0],v=d[1],X=F.est.q,V=v.est.q,H=V[0]-X[0],o=V[1]-X[1],J=V[2]-X[2],C=V[3]-X[3],Y=A-X[0],K=g-X[1],u=E-X[2],f=j-X[3],l=H*H+o*o+J*J+C*C,jk=Y*Y+K*K+u*u+f*f,hE=(Y*H+K*o+u*J+f*C)/l,Z=jk-hE*hE*l;
|
|
if(Z<.5)x=hE<.5?F:v;else{x=N.ps.vl(z,A,g,E,j,100)}}else{var F=d[0],v=d[1],aQ=d[2],X=F.est.q,V=v.est.q,jC=aQ.est.q,eO=X[0]-jC[0],iU=X[1]-jC[1],gK=X[2]-jC[2],iM=X[3]-jC[3],i5=V[0]-jC[0],fN=V[1]-jC[1],dx=V[2]-jC[2],ai=V[3]-jC[3],hO=jC[0]-A,ff=jC[1]-g,eP=jC[2]-E,a0=jC[3]-j,bM=eO*eO+iU*iU+gK*gK+iM*iM,cV=eO*i5+iU*fN+gK*dx+iM*ai,aX=hO*eO+ff*iU+eP*gK+a0*iM,j8=eO*i5+iU*fN+gK*dx+iM*ai,j3=i5*i5+fN*fN+dx*dx+ai*ai,am=hO*i5+ff*fN+eP*dx+a0*ai,fG=1/(cV*j8-bM*j3),hE=(j3*aX-am*cV)*fG,bw=(am*bM-aX*j8)*fG,fz=1-hE-bw,c6=Math.max(hE,bw,fz);
|
|
if(c6==hE)x=F;else if(c6==bw)x=v;else x=aQ}}R[Q>>2]=x.ind}return{FB:R,lt:z[1]}};N.ps.zC=function(W,h,S){var k=[],p={},I=h-1,q=S-1,P=0,t=new Uint32Array(W),M=[-h-1,-h,-h+1,-1,1,h-1,h,h+1,h+h,2,-h-h,-2,h+h-1,h+h+1,h+2,-h+2,-h-h+1,-h-h-1,-h-2,h-2,h+h+2,-h-h+2-h-h-2,h+h-2];
|
|
for(var U=1;U<q;U++)for(var i=1;i<I;i++){var z=U*h+i,D=t[z],R=!0;for(var Q=0;Q<8;Q++)R=R&&t[z+M[Q]]==D;
|
|
if(R){P++;var O=p[D];if(O==null){p[D]=k.length;k.push({ZB:D,l7:1})}else k[O].l7++}}return{lt:k,atP:P}};
|
|
N.ps.vl=function(W,h,S,k,p,I){var q=UPNG.quantize.getNearest(W[0],h,S,k,p);return N.ps.a17(q,h,S,k,p)<I?q:null};
|
|
N.ps.a17=function(W,h,S,k,p){var I=W.est.q,q=h-I[0],P=S-I[1],t=k-I[2],M=p-I[3];return q*q+P*P+t*t+M*M};
|
|
N.ps.g1=function(){function W(w,A,g,E,j,x){var d=[],L=x,_=x,T=x>>>2;for(var c=0;c<j;c++)for(var e=0;
|
|
e<E;e++){var r=~~((e+.5)*L),B=~~((c+.5)*_),F=1e9,v=Math.max(0,r-T),X=Math.min(A,r+T+1),V=Math.max(0,B-T),H=Math.min(g,B+T+1);
|
|
for(var o=V;o<H;o++)for(var J=v;J<X;J++){var C=h(w,A,J,o);if(C<F){r=J;B=o;F=C}}var Y=(B*A+r)*4;d.push(r,B)}return d}function h(w,A,g,E){var j=(E*A+g)*4,x=A*4,d=S(w,j-4,j)+S(w,j,j+4),L=S(w,j-x,j)+S(w,j,j+x);
|
|
return d+L}function S(w,A,g){var E=w[A]-w[g],j=w[A+1]-w[g+1],x=w[A+2]-w[g+2];return E*E+j*j+x*x}var k=0,p=0;
|
|
function I(w,A,g,E){p++;if(E<k)k=E;w[E].push(A,g)}function q(w){p--;while(w[k].length==0)k++}function P(w,A,g,E,j){k=0;
|
|
p=0;var x=A*g,d=Math.round(Math.min(A,g)/(E?E:50)),v=0,X=16;if(d==0)d=1;var L=(j?j:30)/d,_=Math.floor(A/d),T=Math.floor(g/d),c=new Uint16Array(x);
|
|
for(var Q=0;Q<x;Q++)c[Q]=65535;var e=W(w,A,g,_,T,d),r=e.length>>>1;if(r>65535)throw r;var B=[];for(var Q=0;
|
|
Q<1e3+g;Q++)B.push([]);var F=[0,1,0,-1,-1,0,1,0],V=Math.min(T,5),H=new Uint32Array(r*6);for(var o=0;
|
|
o<T;o+=V){var J=Math.min(o+V+1,T);for(var C=o;C<J;C++)for(var Y=0;Y<_;Y++){var Q=C*_+Y,K=Q*2,u=e[K+1]<<16|e[K];
|
|
I(B,u,Q,e[K+1]>>>X)}var f=Math.min(g,J*d);if(o+V>=T)f=g;while(p!=0){q(B);var l=B[k].pop(),jk=B[k].pop(),hE=jk>>>16,Z=jk&65535,Q=hE*A+Z;
|
|
if(c[Q]==65535){var aQ=l*6,jC=Q<<2;c[Q]=l;H[aQ]+=w[jC];H[aQ+1]+=w[jC+1];H[aQ+2]+=w[jC+2];H[aQ+3]+=Z;
|
|
H[aQ+4]+=hE;H[aQ+5]++;var eO=hE>>>X;if(hE!=f-1&&c[Q+A]==65535)I(B,hE+1<<16|Z,l,t(w,A,L,Z,hE+1,H,aQ)+eO);
|
|
if(hE!=0&&c[Q-A]==65535)I(B,hE-1<<16|Z,l,t(w,A,L,Z,hE-1,H,aQ)+eO);if(Z!=0&&c[Q-1]==65535)I(B,hE<<16|Z-1,l,t(w,A,L,Z-1,hE,H,aQ)+eO);
|
|
if(Z!=A-1&&c[Q+1]==65535)I(B,hE<<16|Z+1,l,t(w,A,L,Z+1,hE,H,aQ)+eO)}}if(f!=hE){var iU=(o+V)*_;H.fill(0,iU*6,(iU+_)*6);
|
|
for(var hE=(o+V-2)*d;hE<f;hE++)for(var Z=0;Z<A;Z++){var Q=hE*A+Z;if(c[Q]>=iU){c[Q]=65535}}}}return{FB:c,Yq:r,v1:H}}N.ps.un=function(w,A,g,E,j){var x=w.Yq,d=A*g,L=w.v1,_=w.FB,T=D(E,_,x,d),c=new UnionFind(x),X=0;
|
|
for(var e=1;e<g;e++)for(var r=1;r<A;r++){var Q=e*A+r,B=_[Q],F=0;if((F=_[Q-1])!=B&&T[F]==T[B]&&M(L,0,B*6,F*6)<j)c.link(B,F);
|
|
if((F=_[Q-A])!=B&&T[F]==T[B]&&M(L,0,B*6,F*6)<j)c.link(B,F)}var v=new Uint16Array(x);v.fill(65535);var V=new Uint16Array(x);
|
|
for(var Q=0;Q<x;Q++){var H=c.find(Q);if(v[H]==65535)v[H]=X++;V[Q]=v[H]}var o=new Uint16Array(d);for(var Q=0;
|
|
Q<d;Q++)o[Q]=V[_[Q]];return{FB:o,Yq:X}};N.ps.au8=function(w,A,g,E){var j=N.U(g),x=A.length,d=0;for(var Q=0;
|
|
Q<x&&d!=3;Q++){var L=E[Q];if(L==0||L==255){var _=A[Q],T=2-(L>>>7);j[_]=d=j[_]|T}}return d!=3};function t(w,A,g,E,j,x,d){var L=(j*A+E)*4,_=x[d+5],T=1/_,c=w[L]*_-x[d],e=w[L+1]*_-x[d+1],r=w[L+2]*_-x[d+2],B=E*_-x[d+3],F=j*_-x[d+4],v=Math.sqrt(c*c+e*e+r*r),X=Math.sqrt(B*B+F*F);
|
|
return~~((v+g*X)*T+.5)}function M(w,A,g,E){var j=1/w[g+5],x=1/w[E+5],d=w[g]*j-w[E]*x,L=w[g+1]*j-w[E+1]*x,_=w[g+2]*j-w[E+2]*x,T=w[g+3]*j-w[E+3]*x,c=w[g+4]*j-w[E+4]*x,e=Math.sqrt(d*d+L*L+_*_),r=Math.sqrt(T*T+c*c);
|
|
return~~(e+A*r+.5)}function U(w,A,g){var E=N.fc(w,new gj(0,0,A,g)),j=E.rect.e,x=E.rect.Z,d=P(E.vM,j,x),L=d.FB,_=Date.now(),T=new Uint16Array(A*g);
|
|
T.fill(65535);for(var c=0;c<x;c++){for(var e=0;e<j;e++){var r=c*j+e,Q=(c<<1)*A+(e<<1),B=L[r];if(L[r-j]!=B||L[r-1]!=B||L[r+1]!=B||L[r+j]!=B)B=65535;
|
|
T[Q]=B;T[Q+1]=B;T[Q+A]=B;T[Q+A+1]=B}}d.FB=T;return d}function i(w,A){var Q=0,g=w.length;while(Q!=g&&w[Q]!=A)Q+=2;
|
|
return Q==g?-1:Q}function z(w,Q){if(Q==w.length-2){w.pop();w.pop()}else{w[Q+1]=w.pop();w[Q]=w.pop()}}N.ps.apB=function(w,A,g,E,j){var x=new Uint32Array(j*4400),h=[];
|
|
for(var Q=0;Q<j;Q++)h.push([]);for(var d=0;d<g;d++)for(var L=0;L<A;L++){var Q=d*A+L,_=Q<<2,T=E[Q],c=0,e=w[_]>>>4,r=w[_+1]>>>4,B=w[_+2]>>>4;
|
|
x[T*4400+(e<<8|r<<4|B)]++;x[T*4400+4096]++;x[T*4400+4100+(e<<4|r)]++;x[T*4400+4360+e]++;if(L!=0&&(c=E[Q-1])!=T&&i(h[T],c)==-1){h[T].push(c,0);
|
|
h[c].push(T,0)}if(d!=0&&(c=E[Q-A])!=T&&i(h[T],c)==-1){h[T].push(c,0);h[c].push(T,0)}}for(var Q=0;Q<j;
|
|
Q++){var B=h[Q];for(var F=0;F<B.length;F+=2)B[F+1]=b(x,Q,B[F])}return[x,h]};function D(w,A,g,E){var j=N.U(g);
|
|
for(var Q=0;Q<E;Q++){var x=w[Q];if(x==0||x==255)j[A[Q]]=2-(x>>>7)}return j}N.ps.a4M=function(w,A,g,E,j,x,d){var L=A*g,_=d[0],h=d[1],T=new UnionFind(E),c=D(j,w,E,L),e=-1,r=!0,B=0;
|
|
for(var Q=0;Q<E;Q++)if(c[Q]==1){if(e==-1)e=Q;else T.link(Q,e)}if(e==-1){for(var Q=0;Q<L;Q++)x[Q]=j[Q]==255?255:0;
|
|
return}while(r){while(r){r=!1;for(var Q=0;Q<E;Q++){if(c[Q]==0){var F=R(h[Q]);if(c[F]==1){c[Q]=c[F];r=!0;
|
|
T.link(Q,F)}}}}r=!0;B=0;while(r){r=!1;for(var Q=0;Q<E;Q++){if(c[Q]==0){var F=R(h[Q]);if(c[F]==0){var v=Q*4400,X=F*4400;
|
|
for(var V=0;V<4400;V+=2){_[v+V]+=_[X+V];_[v+V+1]+=_[X+V+1]}O(h,_,Q,F);B++;c[F]=3;r=!0;T.link(Q,F)}}}}r=B!=0}var H=T.find(e);
|
|
for(var Q=0;Q<E;Q++)c[Q]=T.find(Q)==H?255:0;for(var Q=0;Q<L;Q++){x[Q]=c[w[Q]]}for(var Q=0;Q<L;Q++){var F=j[Q];
|
|
if(F==0||F==255)x[Q]=F}};function R(w){var A=0,g=0,E=w.length;for(var j=0;j<E;j+=2){var x=w[j+1];if(x>g){g=x;
|
|
A=j}}return w[A]}function O(h,w,A,g){var E=h[A],j=h[g];z(E,i(E,g));z(j,i(j,A));for(var Q=0;Q<j.length;
|
|
Q+=2){var x=j[Q],d=h[x];z(d,i(d,g));if(i(d,A)==-1){d.push(A,0);E.push(x,0)}}for(var Q=0;Q<E.length;Q+=2){var x=E[Q],d=h[x],L=b(w,A,x);
|
|
E[Q+1]=L;d[i(d,A)+1]=L}}function b(w,A,g){var E=0,j=4096,x=A*4400,d=g*4400;for(var L=0;L<16;L++){if(w[x+4360+L]==0||w[d+4360+L]==0)continue;
|
|
for(var _=0;_<16;_++){var T=L<<4|_;if(w[x+4100+T]==0||w[d+4100+T]==0)continue;var c=x+(T<<4),e=d+(T<<4);
|
|
for(var Q=0;Q<16;Q++)E+=Math.sqrt(w[c+Q]*w[e+Q])}}var r=E/Math.sqrt(w[x+j]*w[d+j]);return~~(999.99999*r)}return P}();
|
|
N.xM={};N.xM.a6A=function(){var W=11,h=7,S=W>>>1,g8=h>>>1,k=2,p=2e3/k,I=[],P=null,t="";function q(U,i,z){var D=(U[i+0]-U[z+0])*(1/255),R=(U[i+1]-U[z+1])*(1/255),O=(U[i+2]-U[z+2])*(1/255),b=(U[i+3]-U[z+3])*(1/255),w=D*D*.125+R*R*.25+O*O*.5+b*b;
|
|
return I[~~(w*p)]}function M(U,i,z,D,R,O){var b=Date.now(),w=N.U(i*z);N.Zi(U,w);var A=UZIP.adler(w,0,i*z);
|
|
if(A!=t){var g=N.Ky(w,i,z);P=N.U(i*z*4);t=A;var E=[1,1/9,1/25,1/49,1/81];for(var j=0;j<z;j++)for(var x=0;
|
|
x<i;x++)for(var Q=0;Q<4;Q++){var d=Math.max(1,x-Q),L=Math.min(i-1,x+Q),_=Math.max(1,j-Q),T=Math.min(z-1,j+Q),c=N.UA(g,i,d,L,_,T);
|
|
if(isNaN(c))throw x+","+j+","+Q+","+c;P[(j*i+x)*4+Q]=c*E[Q]}}if(n.O9){var e=n.kO(0,i,z);e.set(U);var r=n.kO(1,i,z);
|
|
r.set(P);var B=n.kO(2,i,z);n.Wf(B);n.filter.kf({type:n.filter.aq4,o9:new Float32Array([1/i,1/z]),akG:r.hr,acm:R,ard:O},e.hr);
|
|
B.get(D)}else{for(var Q=0;Q<2e3;Q++)I[Q]=Math.exp(-(Q/2e3)*k*(100+(1-R)*(1-R)*1e4));var F=g8+2;for(var j=F;
|
|
j<z-F;j++)for(var x=F;x<i-F;x++){var v=0,X=0,V=0,H=0;for(var o=0;o<W;o++)for(var J=0;J<W;J++){var C=x+J-S,Y=j+o-S;
|
|
if(C==x&&Y==j||C<F||Y<F||C>=i-F||Y>=z-F)continue;var K=q(P,(j*i+x)*4,(Y*i+C)*4),u=Y*i+C<<2;v+=K*U[u+0];
|
|
X+=K*U[u+1];V+=K*U[u+2];H+=K}if(H==0){continue}var f=1/H,l=(j*i+x)*4;D[l+0]=~~((1-O)*f*v+O*D[l+0]);D[l+1]=~~((1-O)*f*X+O*D[l+1]);
|
|
D[l+2]=~~((1-O)*f*V+O*D[l+2])}}}return M}();var gh=function(){function W(){this.n=0;this.bW=0;this.At={};
|
|
this.eI=[];this.GW=1e5;this.RF=1e5;this.NL=-1;this.YQ=-1;this.color=0}function h(g8){this.re=g8;this.CD=new Array(g8);
|
|
this.ZB=new Array(g8*6);this.als=0;this.xt=new Array(g8*2);this.alpha=new Array(g8);this.Sh=new Array(g8);
|
|
this.ex=new Array(g8)}function S(p,I,q,P){function t(b,w,p,I){return p[I*w+b]}function M(Q){var d=p.length;
|
|
while(Q<d&&p[Q]==0)Q++;return Q<d?Q:-1}function U(b,w,d){for(var Q=2;Q<5;Q++){var L=0;for(var _=-Q+1;
|
|
_<=Q-1;_++){L+=t(b+_,w+Q-1,p,I)==d?1:-1;L+=t(b+Q-1,w+_-1,p,I)==d?1:-1;L+=t(b+_-1,w-Q,p,I)==d?1:-1;L+=t(b-Q,w+_,p,I)==d?1:-1}if(L>0)return 1;
|
|
else if(L<0)return 0}return 0}function i(d,R){var O=new W,b=d,w=R,L=0,_=1,T;O.color=p[R*I+d];O.sign=t(d,R,p,I)==O.color?"+":"-";
|
|
while(1){O.eI.push(b,w);if(b>O.NL)O.NL=b;if(b<O.GW)O.GW=b;if(w>O.YQ)O.YQ=w;if(w<O.RF)O.RF=w;O.bW++;b+=L;
|
|
w+=_;O.n-=b*_;if(b==d&&w==R)break;var c=t(b+(L+_-1>>1),w+(_-L-1>>1),p,I)==O.color,e=t(b+(L-_-1>>1),w+(_+L-1>>1),p,I)==O.color;
|
|
if(e&&!c){if(P.AU=="right"||P.AU=="black"&&O.sign=="+"||P.AU=="white"&&O.sign=="-"||P.AU=="majority"&&U(b,w,O.color)||P.AU=="minority"&&!U(b,w,O.color)){T=L;
|
|
L=-_;_=T}else{T=L;L=_;_=-T}}else if(e){T=L;L=-_;_=T}else if(!c){T=L;L=_;_=-T}}return O}var z=0,D=[];
|
|
while(!0){var z=M(z);if(z==-1)break;var R=Math.floor(z/I),O=i(z-R*I,R);for(var Q=0;Q<O.eI.length-2;Q+=2){var b=O.eI[Q],w=O.eI[Q+1],A=w*I+b;
|
|
if(b==O.eI[Q+2]&&w+1==O.eI[Q+3]&&p[A]!=0)gh.fill(A,p,I,0)}if(O.n>P.alh)D.push(O)}for(var Q=0;Q<D.length;
|
|
Q++)D[Q].parent=-1;var g=Date.now();for(var Q=1;Q<D.length;Q++){var E=D[Q];for(var j=Q-1;j>=0;j--){var x=D[j];
|
|
if(E.GW<x.GW||E.NL>x.NL||E.RF<x.RF||E.YQ>x.YQ)continue;if(!gh.aqc(x.eI,E.eI[0]+.5,E.eI[1]+.5))continue;
|
|
E.parent=j;break}}return D}function k(p,I){function q(L,_,T,c,e){this.x=L;this.y=_;this.$$=T;this.qV=c;
|
|
this.KZ=e}function P(L,g8){return(g8+L)%g8}function t(L,_,T,c){return L*c-T*_}function M(L,_,T,c){return L*T+_*c}function U(L,_,T){if(L<=T)return L<=_&&_<T;
|
|
else return L<=_||_<T}function i(L,_,T){var c=0;c+=_*L[0]*_;c+=_*L[1]*T;c+=_*L[2];c+=T*L[3]*_;c+=T*L[4]*T;
|
|
c+=T*L[5];c+=L[6]*_;c+=L[7]*T;c+=L[8];return c}function z(L,_,T){return _+L*(T-_)}function D(L,_,T,c){var e=Math.sign(T-L),r=-Math.sign(c-_);
|
|
return e*(T-L)-r*(c-_)}function R(L,_){return Math.sqrt(L*L+_*_)}function O(L,_,T,c,e){var r=1-L;return r*r*r*_+3*(r*r*L)*T+3*(L*L*r)*c+L*L*L*e}function b(L,_,T,c,e,r,B,F){var v=t(L,_,B,F),X=t(T,c,B,F),V=t(e,r,B,F),H=v-2*X+V,o=-2*v+2*X,J=v,C=o*o-4*H*J;
|
|
if(H==0||C<0)return-1;var Y=Math.sqrt(C),K=(-o+Y)/(2*H),u=(-o-Y)/(2*H);if(K>=0&&K<=1)return K;else if(u>=0&&u<=1)return u;
|
|
else return-1}function w(d){var Q,L,_;d.ve=d.eI[0];d.a8$=d.eI[1];d.u4=[];var T=d.u4;T.push(new q(0,0,0,0,0));
|
|
for(Q=0;Q<d.bW;Q++){L=d.eI[Q<<1]-d.ve;_=d.eI[(Q<<1)+1]-d.a8$;T.push(new q(T[Q].x+L,T[Q].y+_,T[Q].$$+L*_,T[Q].qV+L*L,T[Q].KZ+_*_))}}function A(d){var g8=d.bW,L=d.eI,_,T=new Array(g8),c=new Array(g8),e=new Array(4),r,B,F,v,X,V,H,o,J,C,Y,Q,K,u,f,l,jk,hE,Z=0;
|
|
d.gD=new Array(g8);for(Q=g8-1;Q>=0;Q--){if(L[Q<<1]!=L[Z<<1]&&L[(Q<<1)+1]!=L[(Z<<1)+1])Z=Q+1;c[Q]=Z}for(Q=g8-1;
|
|
Q>=0;Q--){var aQ=P(Q+1,g8)<<1;e[0]=e[1]=e[2]=e[3]=0;_=(3+3*(L[aQ]-L[Q<<1])+(L[aQ+1]-L[(Q<<1)+1]))/2;
|
|
e[_]++;r=0;B=0;F=0;v=0;Z=c[Q];u=Q;while(1){Y=0;_=(3+3*Math.sign(L[Z*2]-L[u*2])+Math.sign(L[Z*2+1]-L[u*2+1]))/2;
|
|
e[_]++;if(e[0]&&e[1]&&e[2]&&e[3]){T[Q]=u;Y=1;break}J=L[Z*2]-L[Q*2];C=L[Z*2+1]-L[Q*2+1];if(t(r,B,J,C)<0||t(F,v,J,C)>0){break}if(Math.abs(J)<=1&&Math.abs(C)<=1){}else{X=J+(C>=0&&(C>0||J<0)?1:-1);
|
|
V=C+(J<=0&&(J<0||C<0)?1:-1);if(t(r,B,X,V)>=0){r=X;B=V}X=J+(C<=0&&(C<0||J<0)?1:-1);V=C+(J>=0&&(J>0||C<0)?1:-1);
|
|
if(t(F,v,X,V)<=0){F=X;v=V}}u=Z;Z=c[u];if(!U(Z,Q,u)){break}}if(Y==0){H=Math.sign(L[Z*2]-L[u*2]);o=Math.sign(L[Z*2+1]-L[u*2+1]);
|
|
J=L[u*2]-L[Q*2];C=L[u*2+1]-L[Q*2+1];f=t(r,B,J,C);l=t(r,B,H,o);jk=t(F,v,J,C);hE=t(F,v,H,o);K=1e7;if(l<0){K=Math.floor(f/-l)}if(hE>0){K=Math.min(K,Math.floor(-jk/hE))}T[Q]=P(u+K,g8)}}K=T[g8-1];
|
|
d.gD[g8-1]=K;for(Q=g8-2;Q>=0;Q--){if(U(Q+1,T[Q],K)){K=T[Q]}d.gD[Q]=K}for(Q=g8-1;U(P(Q+1,g8),K,d.gD[Q]);
|
|
Q--){d.gD[Q]=K}}function g(d){function L(d,Q,_){var g8=d.bW,J=d.eI,C=d.u4,Y,K,u,f,l,c,jk,hE,o,Z,aQ,jC,eO,iU,gK=0;
|
|
if(_>=g8){_-=g8;gK=1}if(gK==0){Y=C[_+1].x-C[Q].x;K=C[_+1].y-C[Q].y;f=C[_+1].qV-C[Q].qV;u=C[_+1].$$-C[Q].$$;
|
|
l=C[_+1].KZ-C[Q].KZ;c=_+1-Q}else{Y=C[_+1].x-C[Q].x+C[g8].x;K=C[_+1].y-C[Q].y+C[g8].y;f=C[_+1].qV-C[Q].qV+C[g8].qV;
|
|
u=C[_+1].$$-C[Q].$$+C[g8].$$;l=C[_+1].KZ-C[Q].KZ+C[g8].KZ;c=_+1-Q+g8}aQ=(J[Q<<1]+J[_<<1])/2-J[0];jC=(J[(Q<<1)+1]+J[(_<<1)+1])/2-J[1];
|
|
iU=J[_<<1]-J[Q<<1];eO=-(J[(_<<1)+1]-J[(Q<<1)+1]);jk=(f-2*Y*aQ)/c+aQ*aQ;hE=(u-Y*jC-K*aQ)/c+aQ*jC;o=(l-2*K*jC)/c+jC*jC;
|
|
Z=eO*eO*jk+2*eO*iU*hE+iU*iU*o;return Math.sqrt(Z)}var Q,_,T,c,g8=d.bW,e=new Array(g8+1),r=new Array(g8+1),B=new Array(g8),F=new Array(g8+1),v=new Array(g8+1),X=new Array(g8+1),V,H,o;
|
|
for(Q=0;Q<g8;Q++){o=P(d.gD[P(Q-1,g8)]-1,g8);if(o==Q){o=P(Q+1,g8)}if(o<Q){B[Q]=g8}else{B[Q]=o}}_=1;for(Q=0;
|
|
Q<g8;Q++){while(_<=B[Q]){F[_]=Q;_++}}Q=0;for(_=0;Q<g8;_++){v[_]=Q;Q=B[Q]}v[_]=g8;T=_;Q=g8;for(_=T;_>0;
|
|
_--){X[_]=Q;Q=F[Q]}X[0]=0;e[0]=0;for(_=1;_<=T;_++){for(Q=X[_];Q<=v[_];Q++){H=-1;for(c=v[_-1];c>=F[Q];
|
|
c--){V=L(d,c,Q)+e[c];if(H<0||V<H){r[Q]=c;H=V}}e[Q]=H}}d.a7e=T;d.aga=new Array(T);for(Q=g8,_=T-1;Q>0;
|
|
_--){Q=r[Q];d.aga[_]=Q}}function E(d){function L(d,Q,V,B,F,iM){var g8=d.bW,i5=d.u4,fN=0,o;while(V>=g8){V-=g8;
|
|
fN+=1}while(Q>=g8){Q-=g8;fN-=1}while(V<0){V+=g8;fN-=1}while(Q<0){Q+=g8;fN+=1}var dx=i5[V+1].x-i5[Q].x+fN*i5[g8].x,ai=i5[V+1].y-i5[Q].y+fN*i5[g8].y,hO=i5[V+1].qV-i5[Q].qV+fN*i5[g8].qV,ff=i5[V+1].$$-i5[Q].$$+fN*i5[g8].$$,eP=i5[V+1].KZ-i5[Q].KZ+fN*i5[g8].KZ,H=V+1-Q+fN*g8;
|
|
B[iM]=dx/H;B[iM+1]=ai/H;var a0=(hO-dx*dx/H)/H,bM=(ff-dx*ai/H)/H,cV=(eP-ai*ai/H)/H,aX=(a0+cV+Math.sqrt((a0-cV)*(a0-cV)+4*bM*bM))/2;
|
|
a0-=aX;cV-=aX;if(Math.abs(a0)>=Math.abs(cV)){o=Math.sqrt(a0*a0+bM*bM);if(o!=0){F[iM]=-bM/o;F[iM+1]=a0/o}}else{o=Math.sqrt(cV*cV+bM*bM);
|
|
if(o!=0){F[iM]=-cV/o;F[iM+1]=bM/o}}if(o==0){F[iM]=F[iM+1]=0}}var _=d.a7e,T=d.aga,g8=d.bW,c=d.eI,e=d.ve,r=d.a8$,B=new Array(_*2),F=new Array(_*2),v=new Array(_),X=new Array(3),Q,V,H,o,K,u,f,l,jk,hE,Z;
|
|
d.At=new h(_);for(Q=0;Q<_;Q++){V=T[P(Q+1,_)];V=P(V-T[Q],g8)+T[Q];B[Q<<1]=0;B[(Q<<1)+1]=0;F[Q<<1]=0;F[(Q<<1)+1]=0;
|
|
L(d,T[Q],V,B,F,Q<<1)}for(Q=0;Q<_;Q++){v[Q]=[0,0,0,0,0,0,0,0,0];var J=F[Q<<1]*F[Q<<1]+F[(Q<<1)+1]*F[(Q<<1)+1],C=1/J;
|
|
if(J!=0){X[0]=F[(Q<<1)+1];X[1]=-F[Q<<1];X[2]=-X[1]*B[(Q<<1)+1]-X[0]*B[Q<<1];for(o=0;o<3;o++){v[Q][o*3+0]=X[o]*X[0]*C;
|
|
v[Q][o*3+1]=X[o]*X[1]*C;v[Q][o*3+2]=X[o]*X[2]*C}}}var Y=[0,0,0,0,0,0,0,0,0];for(Q=0;Q<_;Q++){Y[0]=Y[1]=Y[2]=Y[3]=Y[4]=Y[5]=Y[6]=Y[7]=Y[8]=Y[9]=0;
|
|
var aQ=c[T[Q]<<1]-e,jC=c[(T[Q]<<1)+1]-r,eO=0,iU=0;V=P(Q-1,_);for(o=0;o<9;o+=3){Y[o+0]=v[V][o+0]+v[Q][o+0];
|
|
Y[o+1]=v[V][o+1]+v[Q][o+1];Y[o+2]=v[V][o+2]+v[Q][o+2]}while(1){var gK=Y[0]*Y[4]-Y[1]*Y[3];if(gK!=0){eO=(-Y[2]*Y[4]+Y[5]*Y[0])/gK;
|
|
iU=(Y[2]*Y[3]-Y[5]*Y[0])/gK;break}if(Y[0]>Y[4]){X[0]=-Y[1];X[1]=Y[0]}else if(Y[4]){X[0]=-Y[4];X[1]=Y[3]}else{X[0]=1;
|
|
X[1]=0}var J=X[0]*X[0]+X[1]*X[1],C=1/J;X[2]=-X[1]*jC-X[0]*aQ;for(o=0;o<3;o++){Y[o*3+0]+=X[o]*X[0]*C;
|
|
Y[o*3+1]+=X[o]*X[1]*C;Y[o*3+2]+=X[o]*X[2]*C}}K=Math.abs(eO-aQ);u=Math.abs(iU-jC);if(K<=.5&&u<=.5){d.At.xt[Q<<1]=eO+e;
|
|
d.At.xt[(Q<<1)+1]=iU+r;continue}f=i(Y,aQ,jC);jk=aQ;hE=jC;if(Y[0]!=0){for(Z=0;Z<2;Z++){iU=jC-.5+Z;eO=-(Y[1]*iU+Y[2])/Y[0];
|
|
K=Math.abs(eO-aQ);l=i(Y,eO,iU);if(K<=.5&&l<f){f=l;jk=eO;hE=iU}}}if(Y[4]!=0){for(Z=0;Z<2;Z++){eO=aQ-.5+Z;
|
|
iU=-(Y[3]*eO+Y[5])/Y[4];u=Math.abs(iU-jC);l=i(Y,eO,iU);if(u<=.5&&l<f){f=l;jk=eO;hE=iU}}}for(o=0;o<2;
|
|
o++){for(H=0;H<2;H++){eO=aQ-.5+o;iU=jC-.5+H;l=i(Y,eO,iU);if(l<f){f=l;jk=eO;hE=iU}}}d.At.xt[Q<<1]=jk+e;
|
|
d.At.xt[(Q<<1)+1]=hE+r}}function j(d){var L=d.At.re,_=d.At,Q,T,c,e,r,B,F,v,X;for(Q=0;Q<L;Q++){T=P(Q+1,L);
|
|
c=P(Q+2,L);var V=_.xt[Q<<1],H=_.xt[(Q<<1)+1],o=_.xt[c<<1],J=_.xt[(c<<1)+1],C=_.xt[T<<1],Y=_.xt[(T<<1)+1],K=z(.5,o,C),u=z(.5,J,Y);
|
|
r=D(V,H,o,J);if(r!=0){e=t(C-V,Y-H,o-V,J-H)/r;e=Math.abs(e);B=e>1?1-1/e:0;B=B*(1/.75)}else{B=4/3}_.Sh[T]=B;
|
|
var f=3*T<<1;if(B>=I.ab2){_.CD[T]=0;_.ZB[f+0]=_.ZB[f+1]=0;_.ZB[f+2]=C;_.ZB[f+3]=Y;_.ZB[f+4]=K;_.ZB[f+5]=u}else{if(B<.55){B=.55}else if(B>1){B=1}var l=.5+.5*B;
|
|
_.CD[T]=1;_.ZB[f]=z(l,V,C);_.ZB[f+1]=z(l,H,Y);_.ZB[f+2]=z(l,o,C);_.ZB[f+3]=z(l,J,Y);_.ZB[f+4]=K;_.ZB[f+5]=u}_.alpha[T]=B;
|
|
_.ex[T]=.5}_.apJ=1}function x(d){function L(){this.Tn=0;this.P_=0;this.SO=0;this.nz=0;this.Vl=0;this.fJ=0;
|
|
this.Nx=0;this.alpha=0}function _(d,Q,V,j3,am,jk,hE){var c=d.At.re,fG=d.At.ZB,bw=d.At.xt;if(Q==V)return 1;
|
|
var fz=Q,C=P(Q+1,c),c6=P(fz+1,c),ff=bw[Q<<1],eP=bw[(Q<<1)+1],hk=bw[C<<1],as=bw[(C<<1)+1],bf=jk[c6];if(bf==0)return 1;
|
|
var gW=R(ff-hk,eP-as);for(fz=c6;fz!=V;fz=c6){var c6=P(fz+1,c),j1=P(fz+2,c),bZ=bw[c6<<1],iL=bw[(c6<<1)+1],jI=bw[j1<<1],e2=bw[(j1<<1)+1];
|
|
if(jk[c6]!=bf)return 1;if(Math.sign(t(hk-ff,as-eP,jI-bZ,e2-iL))!=bf)return 1;if(M(hk-ff,as-eP,jI-bZ,e2-iL)<gW*R(bZ-jI,iL-e2)*-.999847695156)return 1}var dV=P(Q,c)*3+2<<1,ds=P(Q+1,c)<<1,ij=P(V,c)<<1,dg=P(V,c)*3+2<<1,iM=fG[dV],i5=fG[dV+1],iT=bw[ds],ej=bw[ds+1],eH=bw[ij],d4=bw[ij+1],jy=fG[dg],iR=fG[dg+1],Z=bw[0],aQ=bw[1];
|
|
dV=V*3+2<<1;var cD=fG[dV],cA=fG[dV+1],Y=hE[V]-hE[Q];Y-=t(cD-Z,cA-aQ,cD-Z,cA-aQ)/2;if(Q>=V){Y+=hE[c]}var d_=iT-iM,d5=ej-i5,jl=eH-iM,dm=d4-i5,hK=jy-iM,jj=iR-i5,cf=t(d_,d5,jl,dm),h5=t(d_,d5,hK,jj),fn=t(jl,dm,hK,jj),aJ=cf+fn-h5;
|
|
if(h5==cf)return 1;var l=fn/(fn-aJ),f=h5/(h5-cf),bY=h5*l/2;if(bY==0)return 1;var gO=Y/bY,K=2-Math.sqrt(4-gO/.3);
|
|
j3.P_=z(l*K,iM,iT);j3.SO=z(l*K,i5,ej);j3.nz=z(f*K,jy,eH);j3.Vl=z(f*K,iR,d4);j3.alpha=K;j3.fJ=l;j3.Nx=f;
|
|
iT=j3.P_;ej=j3.SO;eH=j3.nz;d4=j3.Vl;j3.Tn=0;for(fz=P(Q+1,c);fz!=V;fz=c6){c6=P(fz+1,c);var h6=bw[fz<<1],g4=bw[(fz<<1)+1],bZ=bw[c6<<1],iL=bw[(c6<<1)+1];
|
|
l=b(iT-iM,ej-i5,eH-iT,d4-ej,jy-eH,iR-d4,bZ-h6,iL-g4);if(l<-.5)return 1;var fB=O(l,iM,iT,eH,jy),jm=O(l,i5,ej,d4,iR),gW=R(bZ-h6,iL-g4);
|
|
if(gW==0)return 1;var hh=t(bZ-h6,iL-g4,fB-h6,jm-g4)/gW;if(Math.abs(hh)>am)return 1;if(M(bZ-h6,iL-g4,fB-h6,jm-g4)<0||M(h6-bZ,g4-iL,fB-bZ,jm-iL)<0){return 1}j3.Tn+=hh*hh}for(fz=Q;
|
|
fz!=V;fz=c6){c6=P(fz+1,c);var dV=fz*3+2<<1,ds=c6*3+2<<1,fv=fG[dV],ik=fG[dV+1],gP=fG[ds],cU=fG[ds+1];
|
|
l=b(iT-iM,ej-i5,eH-iT,d4-ej,jy-eH,iR-d4,gP-fv,cU-ik);if(l<-.5)return 1;var fB=O(l,iM,iT,eH,jy),jm=O(l,i5,ej,d4,iR),gW=R(gP-fv,cU-ik);
|
|
if(gW==0)return 1;var hh=t(gP-fv,cU-ik,fB-fv,jm-ik)/gW,dL=t(gP-fv,cU-ik,bw[c6<<1]-fv,bw[(c6<<1)+1]-ik)/gW;
|
|
dL*=.75*d.At.alpha[c6];if(dL<0){hh=-hh;dL=-dL}if(hh<dL-am)return 1;if(hh<dL){j3.Tn+=(hh-dL)*(hh-dL)}}return 0}var T=d.At,c=T.re,e=T.xt,r=new Array(c+1),B=new Array(c+1),F=new Array(c+1),v=new Array(c+1),X,Q,V,H,o=new L,J,C,Y,K,u,f,l,jk=new Array(c),hE=new Array(c+1);
|
|
for(Q=0;Q<c;Q++){if(T.CD[Q]=="CURVE"){var Z=e[P(Q-1,c)<<1],aQ=e[(P(Q-1,c)<<1)+1],jC=e[Q<<1],eO=e[(Q<<1)+1],iU=e[P(Q+1,c)<<1],gK=e[(P(Q+1,c)<<1)+1];
|
|
jk[Q]=Math.sign(t(jC-Z,eO-aQ,iU-jC,gK-eO))}else{jk[Q]=0}}Y=0;hE[0]=0;var iM=T.xt[0],i5=T.xt[1];for(Q=0;
|
|
Q<c;Q++){C=P(Q+1,c);if(T.CD[C]=="CURVE"){K=T.alpha[C];var fN=Q*3+2<<1,dx=C*3+2<<1,ai=T.ZB[fN],hO=T.ZB[fN+1],ff=e[C<<1],eP=e[(C<<1)+1],a0=T.ZB[dx],bM=T.ZB[dx+1];
|
|
Y+=.3*K*(4-K)*t(ff-ai,eP-hO,a0-ai,bM-hO)/2;Y+=t(ai-iM,hO-i5,a0-iM,bM-i5)/2}hE[Q+1]=Y}r[0]=-1;B[0]=0;
|
|
F[0]=0;for(V=1;V<=c;V++){r[V]=V-1;B[V]=B[V-1];F[V]=F[V-1]+1;for(Q=V-2;Q>=0;Q--){H=_(d,Q,P(V,c),o,I.aeB,jk,hE);
|
|
if(H){break}if(F[V]>F[Q]+1||F[V]==F[Q]+1&&B[V]>B[Q]+o.Tn){r[V]=Q;B[V]=B[Q]+o.Tn;F[V]=F[Q]+1;v[V]=o;o=new L}}}X=F[c];
|
|
u=new h(X);f=new Array(X);l=new Array(X);V=c;for(Q=X-1;Q>=0;Q--){var cV=P(V,c),aX=Q*3+0<<1,j8=cV*3+0<<1;
|
|
if(r[V]==V-1){u.CD[Q]=T.CD[cV];u.ZB[aX]=T.ZB[j8];u.ZB[aX+1]=T.ZB[j8+1];u.ZB[aX+2]=T.ZB[j8+2];u.ZB[aX+3]=T.ZB[j8+3];
|
|
u.ZB[aX+4]=T.ZB[j8+4];u.ZB[aX+5]=T.ZB[j8+5];u.xt[Q<<1]=T.xt[cV<<1];u.xt[(Q<<1)+1]=T.xt[(cV<<1)+1];u.alpha[Q]=T.alpha[cV];
|
|
u.Sh[Q]=T.Sh[cV];u.ex[Q]=T.ex[cV];f[Q]=l[Q]=1}else{u.CD[Q]="CURVE";u.ZB[aX]=v[V].P_;u.ZB[aX+1]=v[V].SO;
|
|
u.ZB[aX+2]=v[V].nz;u.ZB[aX+3]=v[V].Vl;u.ZB[aX+4]=T.ZB[j8+4];u.ZB[aX+5]=T.ZB[j8+5];u.xt[Q<<1]=z(v[V].Nx,T.ZB[j8+4],e[cV<<1]);
|
|
u.xt[(Q<<1)+1]=z(v[V].Nx,T.ZB[j8+5],e[(cV<<1)+1]);u.alpha[Q]=v[V].alpha;u.Sh[Q]=v[V].alpha;f[Q]=v[V].Nx;
|
|
l[Q]=v[V].fJ}V=r[V]}for(Q=0;Q<X;Q++){C=P(Q+1,X);u.ex[Q]=f[Q]/(f[Q]+l[C])}u.apJ=1;d.At=u}for(var Q=0;
|
|
Q<p.length;Q++){var d=p[Q];w(d);A(d);g(d);E(d);j(d);if(I.aew)x(d)}}return{amA:S,aio:k}}();gh.S2=function(W,h,S,k){var p={AU:"minority",alh:k,aew:!0,ab2:1,aeB:.2},I=gh.amA(W,h,S,p);
|
|
gh.aio(I,p);return I};gh.O4=function(W){var h=[];for(var Q=0;Q<W.length;Q++){var S=W[Q],k=S.At,p=["M"],I=[k.ZB[(k.re-1)*6+4],k.ZB[(k.re-1)*6+5]];
|
|
for(var q=0;q<k.re;q++){var P=q*6;if(k.CD[q]==1){p.push("C");for(var t=0;t<6;t++)I.push(k.ZB[P+t])}else if(k.CD[q]==0){p.push("L");
|
|
for(var t=2;t<4;t++)I.push(k.ZB[P+t])}}p.push("Z");h.push({parent:S.parent,color:S.color,path:{s:I,C:p}})}return h};
|
|
gh.at6=function(W,h,S,k,p){function I(R){function O(Q){var D="C "+(R.ZB[Q*3+0<<1]*h).toFixed(1)+" "+(R.ZB[(Q*3+0<<1)+1]*h).toFixed(1)+",";
|
|
D+=(R.ZB[Q*3+1<<1]*h).toFixed(1)+" "+(R.ZB[(Q*3+1<<1)+1]*h).toFixed(1)+",";D+=(R.ZB[Q*3+2<<1]*h).toFixed(1)+" "+(R.ZB[(Q*3+2<<1)+1]*h).toFixed(1)+" ";
|
|
return D}function b(Q){var A="L "+(R.ZB[Q*3+1<<1]*h).toFixed(1)+" "+(R.ZB[(Q*3+1<<1)+1]*h).toFixed(1)+" ";
|
|
A+=(R.ZB[Q*3+2<<1]*h).toFixed(1)+" "+(R.ZB[(Q*3+2<<1)+1]*h).toFixed(1)+" ";return A}var g8=R.re,Q,w="M"+(R.ZB[(g8-1)*3+2<<1]*h).toFixed(1)+" "+(R.ZB[((g8-1)*3+2<<1)+1]*h).toFixed(1)+" ";
|
|
for(Q=0;Q<g8;Q++){if(R.CD[Q]==1){w+=O(Q)}else if(R.CD[Q]==0){w+=b(Q)}}return w}var S=S*h,k=k*h,q=W.length,P=[];
|
|
for(var Q=0;Q<256;Q++)P.push("rgb("+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+")");
|
|
var t="<svg id=\"svg\" version=\"1.1\" width=\""+S+"\" height=\""+k+"\" xmlns=\"http://www.w3.org/2000/svg\">";
|
|
for(var Q=0;Q<q;Q++){var M=p[W[Q].color-1].ajr.av;if((M>>>24&255)==0)continue;t+="<path d=\"";var U=W[Q].At;
|
|
t+=I(U);var i=M>>0&255,z=M>>8&255,D=M>>16&255,M="rgb("+i+","+z+","+D+")";t+="\" fill=\""+M+"\" fill-rule=\"evenodd\"/>"}t+="</svg>";
|
|
return t};gh.aqc=function(W,h,S){var g8=W.length>>1,k,p=W[2*g8-3]-S,I=W[2*g8-2]-h,q=W[2*g8-1]-S,P=q>p,t=0;
|
|
for(var Q=0;Q<g8;Q++){k=I;p=q;I=W[2*Q]-h;q=W[2*Q+1]-S;if(p==q)continue;P=q>p}for(var Q=0;Q<g8;Q++){k=I;
|
|
p=q;I=W[2*Q]-h;q=W[2*Q+1]-S;if(p<0&&q<0)continue;if(p>0&&q>0)continue;if(k<0&&I<0)continue;if(p==q&&Math.min(k,I)<=0)return!0;
|
|
if(p==q)continue;var M=k+(I-k)*-p/(q-p);if(M==0)return!0;if(M>0)t++;if(p==0&&P&&q>p)t--;if(p==0&&!P&&q<p)t--;
|
|
P=q>p}return(t&1)==1};gh.fill=function(W,h,S,k){var p=h[W],I=[W],q=0;while(q<I.length){var P=I[q];q++;
|
|
h[P]=k;if(h[P-S]==p){I.push(P-S);h[P-S]=254}if(h[P-1]==p){I.push(P-1);h[P-1]=254}if(h[P+1]==p){I.push(P+1);
|
|
h[P+1]=254}if(h[P+S]==p){I.push(P+S);h[P+S]=254}}};function gH(){}gH.D9=function(W){var h=new Uint8Array(W),S=0,k={jE:[],cc:[],list:[]},p=G.QA(h,S);
|
|
S+=2;if(p<=2){return gH.a6M(h)}var I=G.QA(h,S);S+=2;var q=G.dP(h,S,8);S+=8;var P=G.d(h,S);S+=4;if(P>0)k.jE=gH.Om(h,S,P,I,p);
|
|
S+=P;var t=G.dP(h,S,8);S+=8;var M=G.d(h,S);S+=4;if(M>0)k.cc=dR.sR(h,S,M);S+=M;var U=G.dP(h,S,8);S+=8;
|
|
var i=G.d(h,S);S+=4;if(i>0){var z={};iF.Ej(h,z,S+4);k.list=z.Brsh.v}S+=i;var D=k.list;for(var Q=0;Q<D.length;
|
|
Q++){gI.th.check(D[Q].v)}return k};gH.sm=function(W,h){W.v.Nm.v=h};gH.a6M=function(W){var h={jE:[],cc:[],list:[]},S=0,k=G.QA(W,S);
|
|
S+=2;var p=G.QA(W,S);S+=2;for(var Q=0;Q<p;Q++){var I=G.QA(W,S);S+=2;var q=G.d(W,S);S+=4;var P=S;if(I==2){var t={};
|
|
h.jE.push(t);var M=G.d(W,P);P+=4;var U=G.QA(W,P);P+=2;if(k==2){var i=G.QS(W,P);P+=4+i.length*2+2}t.id=jg.bm()+"-d71c-11e5-b1ae-a548a96e5f9f";
|
|
P++;P+=8;t.pY=G.El(W,P);P+=16;var z=G.QA(W,P);P+=2;var D=W[P];P++;var R=jp.Cd(!1,z,W,t.pY.e,t.pY.Z,P,D);
|
|
gH.SR(t,R);var O=gI.S0(t.id),b=O.Brsh.v;b.Dmtr.v.val=t.pY.e;b.Spcn.v.val=U;h.list.push({t:"Objc",v:O})}S+=q}return h};
|
|
gH.m0=function(W){var h=new a4,S=0,k=0;G.Jv(h,S,6);S+=2;G.Jv(h,S,2);S+=2;G.ZS(h,S,"8BIMsamp");S+=8;S+=4;
|
|
k=S;S=gH.ni(h,S,W.jE);G.YO(h,k-4,S-k);G.ZS(h,S,"8BIMpatt");S+=8;S+=4;k=S;S=dR.$p(h,S,W.cc);G.YO(h,k-4,S-k);
|
|
var p={classID:"null",Brsh:{t:"VlLs",v:W.list}};G.ZS(h,S,"8BIMdesc");S+=8;S+=4;k=S;G.YO(h,S,16);S+=4;
|
|
S+=iF.WK(h,p,S);G.YO(h,k-4,S-k);return h.data.slice(0,S).buffer};gH.Om=function(W,h,S,k,p){var I=G.d,q=G.El,P=h+S,t=[];
|
|
while(h<P){var M={};t.push(M);var U=I(W,h);h+=4;var i=h,z=G.DP(W,h);h+=z.length;M.id=z.OK;if(k==1){h+=9;
|
|
M.pY=q(W,h);h+=16}else{h+=7;var D=I(W,h);h+=4;M.pY=q(W,h);h+=16;var R=I(W,h);h+=4;h+=R*4;var O=I(W,h);
|
|
h+=4;var b=I(W,h);h+=4;var w=q(W,h);h+=16}var A=G.QA(W,h);h+=2;var g=W[h];h+=1;var E=jp.Cd(!1,A,W,M.pY.e,M.pY.Z,h,g);
|
|
gH.SR(M,E);if(U%4!=0)U+=4-U%4;h=i+U}return t};gH.SR=function(W,h){var S=W.pY.clone(),k=N.U(S.n()*4);
|
|
N.ce(h,k,3);S.x=S.y=0;W.jR=[k,S]};gH.ni=function(W,h,S){var k=G.YO,p=G.gv;for(var Q=0;Q<S.length;Q++){var I=S[Q],q=h+4,t=56,U=1;
|
|
h+=4;G.xG(W,h,I.id);h+=I.id.length+2;W.H5(h,1);W.data[h]=1;h+=3;k(W,h,3);h+=4;var P=h;h+=4;p(W,h,I.pY);
|
|
h+=16;k(W,h,t);h+=4;h+=t*4;k(W,h-4,1);var M=h;h+=4;k(W,h,8);h+=4;p(W,h,I.pY);h+=16;G.Jv(W,h,8);h+=2;
|
|
W.H5(h,1);W.data[h]=U;h++;var i=N.U(I.pY.n());N.sN(I.jR[0],i,3);W.H5(h,I.pY.n()*2);h=jp.HJ(!1,i,W.data,I.pY.e,I.pY.Z,h,U);
|
|
W.H5(h,8);h+=8;var z=h-q;k(W,q-4,z);k(W,P,z-49);k(W,M,z-305);if(z%4!=0)h+=4-z%4}return h};function ht(){}ht.D9=function(W){var h=new Uint8Array(W),S=[],k=0,p=G.QA(h,k);
|
|
k+=2;if(p!=4){throw"Unknown version of curves: "+p}var I=G.QA(h,k);k+=2;for(var Q=0;Q<I;Q++){var q=ht.Fl(h,k);
|
|
k+=2+2*q.length;S.push(q)}if(k==h.length)return S;var P=G.dP(h,k,4);k+=4;var t=G.QA(h,k);k+=2;var M=G.QA(h,k);
|
|
k+=2;if(M!=0)throw"extra curves for channels";return S};ht.oI=function(W,h,S){var k=h,p=[],I=W[h];h+=3;
|
|
var q=G.d(W,h);h+=4;for(var Q=0;Q<4;Q++){var P=q>>>Q&1;if(P){if(I==0){var t=ht.Fl(W,h);h+=2+2*t.length}else{var t=ht.a4G(W,h);
|
|
h+=256}p.push(t)}else p.push(I==0?[0,0,255,255]:ht.ar2())}var M=hw.QE("curv");for(var Q=0;Q<4;Q++){if(I==0){var U=p[Q],i=[];
|
|
for(var z=0;z<U.length;z+=2)i.push(N.Ey.xA(U[z],U[z+1],!0));ht.Dm(M,Q,i)}else ht.Dm(M,Q,p[Q])}return M};
|
|
ht.ar2=function(){var W=[];for(var Q=0;Q<256;Q++)W.push(Q);return W};ht.Dm=function(W,h,S){var k=e4.t9("CrvA",h);
|
|
if(S.length<256)k.Crv={t:"VlLs",v:S};else{k.Mpng={t:"VlLs",v:[]};for(var Q=0;Q<256;Q++)k.Mpng.v[Q]={t:"long",v:S[Q]}}k={t:"Objc",v:k};
|
|
var p=W.Adjs.v,I=e4.Zc(p,h);if(I==-1)p.push(k);else p[I]=k};ht.mu=function(W,h){var S=W.Adjs.v,k=e4.Zc(S,h);
|
|
if(k==-1){if(S.length==0||S[0].v.Crv)return[N.Ey.xA(0,0,!0),N.Ey.xA(255,255,!0)];var p=[];for(var Q=0;
|
|
Q<256;Q++)p.push(Q);return p}var I=S[k].v,q=I.Crv;if(q)return q.v;var p=[];for(var Q=0;Q<256;Q++)p.push(I.Mpng.v[Q].v);
|
|
return p};ht.Fl=function(W,h){var S=[],k=G.QA(W,h);h+=2;for(var p=0;p<k;p++){var I=G.QA(W,h);h+=2;var q=G.QA(W,h);
|
|
h+=2;S.push(q,I)}return S};ht.a9Q=function(W,h,S){var k=S.length/2;G.Jv(W,h,k);h+=2;for(var p=0;p<k;
|
|
p++){G.Jv(W,h,S[p*2+1]);h+=2;G.Jv(W,h,S[p*2+0]);h+=2}};ht.a4G=function(W,h){var S=[];for(var Q=0;Q<256;
|
|
Q++)S.push(W[h+Q]);return S};ht.aeu=function(W,h,S){W.H5(h,256);for(var Q=0;Q<256;Q++)W.data[h+Q]=S[Q]};
|
|
ht.op=function(W,h,S){var k=[];for(var Q=0;Q<4;Q++){var p=ht.mu(S,Q);if(p.length==256)k.push(p);else{var I=[];
|
|
for(var q=0;q<p.length;q++)I.push(p[q].v.Hrzn.v,p[q].v.Vrtc.v);k.push(I)}}var P=h,t=k[0].length==256?1:0;
|
|
W.H5(h,3);W.data[h]=t;W.data[h+1]=0;W.data[h+2]=1;h+=3;G.YO(W,h,15);h+=4;for(var Q=0;Q<4;Q++){var M=k[Q];
|
|
if(t==0){ht.a9Q(W,h,M);h+=2+2*M.length}else{ht.aeu(W,h,M);h+=256}}return h-P};function bU(){}bU.oI=function(W,h,S){var k={},p=G.QA(W,h);
|
|
h+=2;k.ws=W[h]==1;h++;h++;k.fR=[G.P5(W,h),G.P5(W,h+2),G.P5(W,h+4)];h+=6;k.or=[G.P5(W,h),G.P5(W,h+2),G.P5(W,h+4)];
|
|
h+=6;k.QZ=[];for(var Q=0;Q<6;Q++){var I={};I.Sz=[G.P5(W,h),G.P5(W,h+2),G.P5(W,h+4),G.P5(W,h+6)];h+=8;
|
|
I.Ym=[G.P5(W,h),G.P5(W,h+2),G.P5(W,h+4)];h+=6;k.QZ.push(I)}var q=hw.QE("hue2"),P=k;if(q.Clrz==null)q.Clrz={t:"bool",v:!1};
|
|
q.Clrz.v=P.ws;for(var Q=0;Q<7;Q++){var t=Q==0?P.ws?P.fR:P.or:P.QZ[Q-1];bU.Dm(q,Q,t)}return q};bU.a4f=function(W){return{classID:"Hst2",H:{t:"long",v:W[0]},Strt:{t:"long",v:W[1]},Lght:{t:"long",v:W[2]}}};
|
|
bU.Zc=function(W,h){for(var Q=0;Q<W.length;Q++){var S=W[Q].v.LclR;if(h==0&&S==null||S!=null&&S.v==h)return Q}return-1};
|
|
bU.Dm=function(W,h,S){var k=h==0?S:S.Ym,p=bU.a4f(k);if(h!=0){var I=S.Sz;p.LclR={t:"long",v:h},p.BgnR={t:"long",v:I[0]};
|
|
p.BgnS={t:"long",v:I[1]};p.EndS={t:"long",v:I[2]};p.EndR={t:"long",v:I[3]}}p={t:"Objc",v:p};var q=W.Adjs.v,P=bU.Zc(q,h);
|
|
if(P==-1)q.push(p);else q[P]=p};bU.mu=function(W,h){var S=W.Adjs.v,k=bU.Zc(S,h);if(k==-1){if(h==0)return[0,0,0];
|
|
else return[{Sz:[315,345,15,45],Ym:[0,0,0]},{Sz:[15,45,75,105],Ym:[0,0,0]},{Sz:[75,105,135,165],Ym:[0,0,0]},{Sz:[135,165,195,225],Ym:[0,0,0]},{Sz:[195,225,255,285],Ym:[0,0,0]},{Sz:[255,285,315,345],Ym:[0,0,0]}][h-1]}var p=S[k].v,I=[p.H.v,p.Strt.v,p.Lght.v];
|
|
if(h==0)return I;return{Ym:I,Sz:[p.BgnR.v,p.BgnS.v,p.EndS.v,p.EndR.v]}};bU.op=function(W,h,S){var k={ws:S.Clrz?S.Clrz.v:!1,QZ:[]};
|
|
k.fR=k.or=bU.mu(S,0);for(var Q=1;Q<7;Q++)k.QZ.push(bU.mu(S,Q));var p=2+2+12+6*14,I=W.data;W.H5(h,p);
|
|
G.Y_(I,h,2);h+=2;I[h]=k.ws?1:0;h++;h++;G.fS(I,h+0,k.fR[0]);G.fS(I,h+2,k.fR[1]);G.fS(I,h+4,k.fR[2]);h+=6;
|
|
G.fS(I,h+0,k.or[0]);G.fS(I,h+2,k.or[1]);G.fS(I,h+4,k.or[2]);h+=6;for(var Q=0;Q<6;Q++){var q=k.QZ[Q].Sz,P=k.QZ[Q].Ym;
|
|
G.fS(I,h+0,q[0]);G.fS(I,h+2,q[1]);G.fS(I,h+4,q[2]);G.fS(I,h+6,q[3]);h+=8;G.fS(I,h+0,P[0]);G.fS(I,h+2,P[1]);
|
|
G.fS(I,h+4,P[2]);h+=6}return p};function e4(){}e4.D9=function(W){var h=new Uint8Array(W),S=2,k=[];for(var Q=0;
|
|
Q<29;Q++){var p=[];k.push(p);for(var I=0;I<5;I++)p.push(G.QA(h,S+Q*10+I*2))}S+=29*10;if(S<h.length){var q=G.dP(h,S,4);
|
|
S+=4;var P=G.QA(h,S);S+=2;var t=G.QA(h,S);S+=2;var M=t-29;for(var Q=0;Q<M;Q++){var p=[];k.push(p);for(var I=0;
|
|
I<5;I++)p.push(G.QA(h,S+Q*10+I*2))}}var U=hw.QE("levl");for(var Q=0;Q<4;Q++)e4.Dm(U,Q,k[Q]);return U};
|
|
e4.t9=function(W,Q){var h=["Cmps","Rd","Grn","Bl"],S={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:h[Q]}}]};
|
|
return{classID:W,Chnl:S}};e4.Zc=function(W,h){var S={Cmps:0,Rd:1,Grn:2,Bl:3};for(var Q=0;Q<W.length;
|
|
Q++){var k=W[Q].v,p=S[k.Chnl.v[0].v.enum];if(p==h)return Q}return-1};e4.Dm=function(W,h,S){var k=e4.t9("LvlA",h);
|
|
k.Inpt={t:"VlLs",v:[{t:"long",v:S[0]},{t:"long",v:S[1]}]};k.Otpt={t:"VlLs",v:[{t:"long",v:S[2]},{t:"long",v:S[3]}]};
|
|
k.Gmm={t:"doub",v:S[4]/100};k={t:"Objc",v:k};var p=W.Adjs.v,I=e4.Zc(p,h);if(I==-1)p.push(k);else p[I]=k};
|
|
e4.mu=function(W,h){var S=[0,255,0,255,100],k=W.Adjs.v,p=e4.Zc(k,h);if(p==-1)return S;var I=k[p].v;if(I.Inpt){S[0]=I.Inpt.v[0].v;
|
|
S[1]=I.Inpt.v[1].v}if(I.Otpt){S[2]=I.Otpt.v[0].v;S[3]=I.Otpt.v[1].v}if(I.Gmm){S[4]=Math.round(I.Gmm.v*100)}return S};
|
|
e4.m0=function(W,h){var S=[],k=0;for(var Q=0;Q<4;Q++)S.push(e4.mu(h,Q));while(S.length<29)S.push([0,255,0,255,100]);
|
|
W.H5(0,2+10*29);G.Y_(W.data,k,2);k+=2;for(var Q=0;Q<29;Q++){var p=S[Q];for(var I=0;I<5;I++)G.Y_(W.data,k+Q*10+I*2,p[I])}k+=29*10;
|
|
if(S.length==29)return k;W.H5(k,8+10*(S.length-29));G.vq(W.data,k,"Lvls");k+=4;G.Y_(W.data,k,3);k+=2;
|
|
G.Y_(W.data,k,S.length);k+=2;var q=S.length-29;for(var Q=0;Q<q;Q++){var p=S[29+Q];for(var I=0;I<5;I++)G.Y_(W.data,k+Q*10+I*2,p[I])}k+=10*q;
|
|
return k};function ji(){}ji.D9=function(W){var h=new Uint8Array(W),S=2,k={hI:[],fH:[]},p=G.dP(h,S,4);
|
|
S+=4;var I=G.QA(h,S);S+=2;var q=G.d(h,S);S+=4;k.hI=dR.sR(h,S,q);S+=q;var P=G.d(h,S);S+=4;for(var Q=0;
|
|
Q<P;Q++){var t=G.d(h,S);S+=4;var M=S,U={q2:{},dS:{}};k.fH.push(U);S+=4;S+=iF.Ej(h,U.q2,S);S+=4;S+=iF.Ej(h,U.dS,S);
|
|
S=M+t;var i=U.dS.blendOptions,z=U.dS.Lefx;if(i&&Object.keys(i.v).length>1){}if(z){if(z.v.masterFXSwitch==null)z.v.masterFXSwitch={t:"bool",v:!0};
|
|
j6.ph(z.v)}}return k};ji.sm=function(W,h){W.q2.Nm.v=h};ji.m0=function(W){var h=new a4,S=0;G.Jv(h,S,2);
|
|
S+=2;G.ZS(h,S,"8BSL");S+=4;G.Jv(h,S,3);S+=2;var k=S;S+=4;S=dR.$p(h,S,W.hI);G.YO(h,k,S-k-4);var p=W.fH.length;
|
|
G.YO(h,S,p);S+=4;for(var Q=0;Q<p;Q++){S+=4;var I=S,q=W.fH[Q];G.YO(h,S,16);S+=4;S+=iF.WK(h,q.q2,S);var P=q.dS.Lefx;
|
|
if(P){q.dS.Lefx=JSON.parse(JSON.stringify(P));j6.a8(q.dS.Lefx.v)}G.YO(h,S,16);S+=4;S+=iF.WK(h,q.dS,S);
|
|
if(P)q.dS.Lefx=P;G.YO(h,I-4,S-I)}return h.data.slice(0,S).buffer};function ag(){}ag.oI=function(W,h,S){var k=G.QA(W,h);
|
|
h+=2;var p={};p.Pu=G.QA(W,h)==1;h+=2;p.LJ=[];for(var Q=0;Q<10;Q++){var I=[];p.LJ.push(I);for(var q=0;
|
|
q<4;q++)I.push(G.P5(W,h+q*2));h+=8}var P=hw.QE("selc");P.Mthd.v.CrcM=p.Pu?"Absl":"Rltv";for(var Q=1;
|
|
Q<10;Q++)ag.Dm(P,Q-1,p.LJ[Q]);return P};ag._3="Rds Ylws Grns Cyns Bls Mgnt Whts Ntrl Blks".split(" ");
|
|
ag.t9=function(W,Q){var h=["Cmps","Rd","Grn","Bl"],S={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:h[Q]}}]};
|
|
return{classID:W,Chnl:S}};ag.Zc=function(W,h){var S=ag._3;for(var Q=0;Q<W.length;Q++){var k=W[Q].v,p=S.indexOf(k.Clrs.v.Clrs);
|
|
if(p==h)return Q}return-1};ag.Dm=function(W,h,S){var k=["Cyn","Mgnt","Ylw","Blck"],p={classID:"ClrC",Clrs:{t:"enum",v:{Clrs:ag._3[h]}}};
|
|
for(var I=0;I<4;I++)p[k[I]]={t:"UntF",v:{type:"#Prc",val:S[I]}};p={t:"Objc",v:p};var q=W.ClrC.v,P=ag.Zc(q,h);
|
|
if(P==-1)q.push(p);else q[P]=p};ag.mu=function(W,h){var S=[0,0,0,0],k=W.ClrC.v,p=ag.Zc(k,h);if(p==-1)return S;
|
|
var I=["Cyn","Mgnt","Ylw","Blck"];for(var Q=0;Q<4;Q++)if(k[p].v[I[Q]])S[Q]=k[p].v[I[Q]].v.val;return S};
|
|
ag.op=function(W,h,S){var k={Pu:S.Mthd.v.CrcM=="Absl",LJ:[[0,0,0,0]]};for(var Q=0;Q<9;Q++)k.LJ.push(ag.mu(S,Q));
|
|
W.H5(h,84);G.Y_(W.data,h,1);h+=2;G.Y_(W.data,h,k.Pu?1:0);h+=2;for(var Q=0;Q<10;Q++){var p=k.LJ[Q];for(var I=0;
|
|
I<4;I++)G.fS(W.data,h+I*2,p[I]);h+=8}return 84};function hv(){}hv.QE=function(){return{zq:new gj(0,0,50,50),q2:"",J2:"play",T:N.$.Te.C4([.1,.1,.9,.5,.1,.9],0)}};
|
|
hv.D9=function(W){W=new Uint8Array(W);var h=0,S=[],k=Date.now(),p=G.dP(W,0,4);h+=4;var I=G.d(W,h);h+=4;
|
|
var q=G.d(W,h);h+=4;for(var Q=0;Q<q;Q++){var P=G.QS(W,h);h+=P.length*2+4+2;if((P.length&1)==0)h+=2;h=hv.Wh(W,h,P,S)}return S};
|
|
hv.Wh=function(W,h,S,k){var p=G.d(W,h);h+=4;var I=G.d(W,h);h+=4;var q=h,P=G.DP(W,q).OK;q+=P.length+1;
|
|
var t=G.El(W,q);q+=16;var M=hv.HW(W,q,I-(q-h)),U=N.$.kY(M),i=N.H.TA(U),z=1/i.e,D=1/i.Z;N.$.ac(M,new ex(z,0,0,D,-i.x*z,-i.y*D));
|
|
k.push({J2:S,q2:P,T:M,zq:t});h+=I;return h};hv.sm=function(W,h){W.J2=h};hv.m0=function(W){var h=new a4,S=0;
|
|
G.ZS(h,S,"cush");S+=4;G.YO(h,S,2);S+=4;G.YO(h,S,W.length);S+=4;for(var Q=0;Q<W.length;Q++){var k=W[Q],p=k.J2+"\0";
|
|
G.HG(h,S,p);S+=4+p.length*2;if((p.length&1)==1)S+=2;G.YO(h,S,1);S+=4;S+=4;var I=S;G.xG(h,S,k.q2);S+=k.q2.length+1;
|
|
G.gv(h,S,k.zq);S+=16;h.H5(S,k.T.length*26);hv.A8(h.data,S,k.T,1,1);S+=k.T.length*26;var q=S-I;if((q&3)!=0)q+=4-(q&3);
|
|
G.YO(h,I-4,q);S=I+q}return h.data.slice(0,S).buffer};hv.afq=function(W){var h=[];for(var Q=0;Q<W.length;
|
|
Q++){var S=W[Q],k=S.type,p={type:k};h.push(p);if(k==6){}else if(k==8)p.all=S.all;else if(k==0||k==3){p.length=S.length;
|
|
p.frule=S.VZ;p.third=S.pt;p.prmA=S.eN;p.prmB=S.w9}else{p.c=[S.bq.x,S.bq.y,S.M.x,S.M.y,S.tk.x,S.tk.y]}}return h};
|
|
hv.a90=function(W){var h=[];for(var Q=0;Q<W.length;Q++){var S=W[Q],k=S.type,p={type:k};h.push(p);if(k==6){}else if(k==8)p.all=S.all;
|
|
else if(k==0||k==3){p.length=S.length;p.VZ=S.frule;p.pt=S.third;p.eN=S.prmA;p.w9=S.prmB}else{var I=S.c;
|
|
p.bq=new eC(I[0],I[1]);p.M=new eC(I[2],I[3]);p.tk=new eC(I[4],I[5])}}return h};hv.HW=function(W,h,S,k,p){if(k==null)k=1;
|
|
if(p==null)p=1;function I(O,b,w){var A=G.apd(O,b)*w,g=Math.round(A);return Math.abs(A-g)<1e-6?g:A}var q=G.P5,P=[],t=Math.floor(S/26);
|
|
for(var Q=0;Q<t;Q++){var M=h+Q*26,U={},i=0;P.push(U);U.type=q(W,M);M+=2;if(U.type==6){i=24}if(U.type==8){U.all=q(W,M);
|
|
M+=2;i=22}if(U.type==0||U.type==3){U.length=q(W,M);M+=2;U.VZ=q(W,M);M+=2;U.pt=q(W,M);M+=2;U.eN=G.d(W,M);
|
|
M+=4;U.w9=G.d(W,M);M+=4;i=10}if(U.type==1||U.type==2||U.type==4||U.type==5){var z,D;D=I(W,M,p);M+=4;
|
|
z=I(W,M,k);M+=4;U.bq=new eC(z,D);D=I(W,M,p);M+=4;z=I(W,M,k);M+=4;U.M=new eC(z,D);D=I(W,M,p);M+=4;z=I(W,M,k);
|
|
M+=4;U.tk=new eC(z,D);i=0}for(var R=0;R<i;R++)if(W[M+R]!=0){console.log("Unexpected non-zero byte!",U,R,W[M+R])}}return P};
|
|
hv.A8=function(W,h,S,k,p){var I=G.fS,q=G.$Q,P=S.length;for(var Q=0;Q<P;Q++){var t=h+Q*26,M=S[Q];I(W,t,M.type);
|
|
t+=2;if(M.type==6){}if(M.type==8)I(W,t,M.all);if(M.type==0||M.type==3){I(W,t,M.length);t+=2;I(W,t,M.VZ);
|
|
t+=2;I(W,t,M.pt);t+=2}if(M.type==1||M.type==2||M.type==4||M.type==5){q(W,t,M.bq.y/p);t+=4;q(W,t,M.bq.x/k);
|
|
t+=4;q(W,t,M.M.y/p);t+=4;q(W,t,M.M.x/k);t+=4;q(W,t,M.tk.y/p);t+=4;q(W,t,M.tk.x/k);t+=4}}};function fY(){}fY.D9=function(W){var h=new Uint8Array(W),S=[],k=0;
|
|
k=fY.US(h,k,S);if(k+3<h.length){S=[];k=fY.US(h,k,S)}return S};fY.US=function(W,h,S){var k=G.QA,p=G.P5,I=k(W,h);
|
|
h+=2;var q=k(W,h);h+=2;for(var Q=0;Q<q;Q++){var P=fY.Vo(W,h);h+=10;if(I==2){P.Gj=G.QS(W,h);h+=4+P.Gj.length*2+2}S.push(P)}return h};
|
|
fY.Vo=function(W,h){var S=G.QA,k=G.P5,p=S(W,h),D=null;h+=2;var I=S(W,h);h+=2;var q=S(W,h);h+=2;var P=S(W,h);
|
|
h+=2;var t=S(W,h);h+=2;var M=1/65535,U=255/65535,i=100/65535,z=255/1e4;if(p==0)D={p:I*U,z:q*U,S:P*U};
|
|
else if(p==1){D=N.qu(I*M,q*M,P*M);D.p*=255;D.z*=255;D.S*=255}else if(p==2)D=N.X.iZ({classID:"CMYC",Cyn:{t:"doub",v:100-I*i},Mgnt:{t:"doub",v:100-q*i},Ylw:{t:"doub",v:100-P*i},Blck:{t:"doub",v:100-t*i}});
|
|
else if(p==7){var R=N.LG(I/100,k(W,h-6)/100,k(W,h-4)/100);D=R}else if(p==8){D={p:255-I*z,z:255-q*z,S:255-P*z}}else throw"e "+p+", ";
|
|
return D};fY.m0=function(W){var h=new a4,S=0,k=G.Jv;k(h,S,2);S+=2;k(h,S,W.length);S+=2;for(var Q=0;Q<W.length;
|
|
Q++){var p=W[Q];h.H5(S,10);fY.Rl(h.data,S,p);S+=10;var I=(p.Gj?p.Gj:"")+"\0";G.HG(h,S,I);S+=4+I.length*2}return h.data.slice(0,S).buffer};
|
|
fY.sm=function(W,h){W.Gj=h};fY.Rl=function(W,h,S){var k=65535/255,p=G.Y_;p(W,h,0);p(W,h+2,Math.round(S.p*k));
|
|
p(W,h+4,Math.round(S.z*k));p(W,h+6,Math.round(S.S*k));p(W,h+8,0)};function ih(){}ih.D9=function(W){var h=new Uint8Array(W),S=4,k={};
|
|
k.rO=G.QS(h,S);S+=4+k.rO.length*2+2;k.exp=h[S++]==1;k.Vz=[];var p=G.d(h,S);S+=4;for(var Q=0;Q<p;Q++){var I={};
|
|
k.Vz.push(I);I.Kr=G.QA(h,S);S+=2;I.shift=h[S++]==1;I.a4$=h[S++]==1;I.color=G.QA(h,S);S+=2;I.rO=G.QS(h,S);
|
|
S+=4+I.rO.length*2+2;I.exp=h[S++]==1;I.Vz=[];var q=G.d(h,S);S+=4;for(var P=0;P<q;P++){var t={};I.Vz.push(t);
|
|
t.exp=h[S++]==1;t.P=h[S++]==1;t.a9u=h[S++]==1;t.a1R=h[S++];var M=G.dP(h,S,4);S+=4;if(M=="TEXT"){t.HP=ih.cL(h,S);
|
|
S+=4+t.HP.length}else if(M=="long"){t.HP=G.dP(h,S,4);S+=4}else throw"e";t.e4=ih.cL(h,S);S+=4+t.e4.length;
|
|
var U=G.GZ(h,S);S+=4;if(U==-1){t.b4={};var i=iF.Ej(h,t.b4,S);S+=i}}}console.log(k);var z=new Uint8Array(ih.m0(k));
|
|
for(var Q=0;Q<z.length;Q++)if(z[Q]!=h[Q]){console.log(h.length,z.length);var D=4*(Q>>>2)-16;console.log(G.iS(h,D,64));
|
|
console.log(G.iS(z,D,64));console.log(h.slice(D,D+64));console.log(z.slice(D,D+64));throw Q}return[k]};
|
|
ih.cL=function(W,h){var S=G.d(W,h);return G.dP(W,h+4,S)};ih.Xw=function(W,h,S){G.YO(W,h,S.length);G.ZS(W,h+4,S)};
|
|
ih.m0=function(W){var h=new a4,S=0;G.YO(h,S,16);S+=4;G.HG(h,S,W.rO+"\0");S+=4+W.rO.length*2+2;h.H5(S,1);
|
|
h.data[S++]=W.exp?1:0;var k=W.Vz.length;G.YO(h,S,k);S+=4;for(var Q=0;Q<k;Q++){var p=W.Vz[Q];G.Jv(h,S,p.Kr);
|
|
S+=2;h.H5(S,2);h.data[S++]=p.shift?1:0;h.data[S++]=p.a4$?1:0;G.Jv(h,S,p.color);S+=2;G.HG(h,S,p.rO+"\0");
|
|
S+=4+p.rO.length*2+2;h.H5(S,1);h.data[S++]=p.exp?1:0;var I=p.Vz.length;G.YO(h,S,I);S+=4;for(var q=0;
|
|
q<I;q++){var P=p.Vz[q];h.H5(S,4);h.data[S++]=P.exp?1:0;h.data[S++]=P.P?1:0;h.data[S++]=P.a9u?1:0;h.data[S++]=P.a1R;
|
|
var t="LqFy Avrg GEfc PbPl Fbrs Bokh LnCr".split(" ").indexOf(P.HP)!=-1;G.ZS(h,S,t?"long":"TEXT");S+=4;
|
|
if(!t){ih.Xw(h,S,P.HP);S+=4+P.HP.length}else{G.ZS(h,S,P.HP);S+=4}ih.Xw(h,S,P.e4);S+=4+P.e4.length;G.Vv(h,S,P.b4?-1:0);
|
|
S+=4;if(P.b4){var M=iF.WK(h,P.b4,S);S+=M}}}return h.data.slice(0,S).buffer};function hx(){}hx.D9=function(W){var h=new Uint8Array(W),S=0,k=G.d(h,S),t;
|
|
S+=4;var p=G.dP(h,S,8);S+=8;var I=G.Tz(h,S);S+=4;var q=G.Tz(h,S);S+=4;var P=G.Tz(h,S);S+=4;if(k==2){t=new Float32Array(W,32,W.byteLength-32>>>2)}else if(k==3||k==4){t=new Float32Array(q*P*2);
|
|
var M=0,U=0,i=!0;S=k==3?32:16+8+40;while(S<h.length){var z=G.Tz(h,S);S+=4;if(i)U+=z;else{for(var Q=0;
|
|
Q<z;Q++){t[M+U+Q<<1]=G.Ys(h,S);t[(M+U+Q<<1)+1]=G.Ys(h,S+4);S+=8}U+=z}i=!i;if(z!=0&&U==q){M+=q;U=0;i=!0;
|
|
if(M==q*P)break}}}else throw"unknown Mesh version: "+k;return{s6:q,R_:P,map:t}};hx.I0=function(W){var h=W.s6,S=W.R_,k=W.map,p=new Uint8Array(32+S*h*8+S*8),I=0,q=0;
|
|
G.Cp(p,I,3);I+=4;G.vq(p,I,"yfqLhseM");I+=8;G.Bl(p,I,2);I+=4;G.Bl(p,I,h);I+=4;G.Bl(p,I,S);I+=4;G.Bl(p,I,0);
|
|
I+=4;G.Bl(p,I,1);I+=4;for(var P=0;P<S;P++){G.Bl(p,I,0);I+=4;G.Bl(p,I,h);I+=4;for(var t=0;t<h;t++){G.Q2(p,I,k[q]);
|
|
G.Q2(p,I+4,k[q+1]);q+=2;I+=8}}return p.buffer};function f8(){}f8.D9=function(W){var h=new Uint8Array(W),S=0,k=G.dP(h,S,4);
|
|
S+=4;var p=G.QA(h,S);S+=2;var I=G.d(h,S);S+=4;var q=[];for(var Q=0;Q<I;Q++){var P=G.d(h,S);S+=4;var t={classID:"ShpC",Nm:{t:"TEXT",v:""},Crv:{t:"VlLs",v:[]}};
|
|
q.push(t);var M=G.QS(h,S);t.Nm.v=M;S+=4+M.length*2+2;var U=G.QA(h,S);S+=2;var i=G.QA(h,S);S+=2;for(var z=0;
|
|
z<i;z++){var D=N.Ey.xA(0,0,!0);D.v.Vrtc.v=G.QA(h,S);S+=2;D.v.Hrzn.v=G.QA(h,S);S+=2;t.Crv.v.push(D)}if(P==1){}else if(P==2){for(var z=0;
|
|
z<i;z++){t.Crv.v[z].v.Cnty.v=h[S]==1;S+=1}}else throw"error";var R=G.d(h,S);S+=4;var O=G.d(h,S);S+=4}return q};
|
|
f8.sm=function(W,h){W.Nm.v=h};f8.m0=function(W){var h=new a4,S=0;G.ZS(h,S,"8BFS");S+=4;G.Jv(h,S,1);S+=2;
|
|
G.YO(h,S,W.length);S+=4;for(var Q=0;Q<W.length;Q++){G.YO(h,S,2);S+=4;var k=W[Q];G.HG(h,S,k.Nm.v+"\0");
|
|
S+=4+k.Nm.v.length*2+2;G.Jv(h,S,2);S+=2;var p=k.Crv.v.length;G.Jv(h,S,p);S+=2;for(var I=0;I<p;I++){var q=k.Crv.v[I];
|
|
G.Jv(h,S,q.v.Vrtc.v);S+=2;G.Jv(h,S,q.v.Hrzn.v);S+=2}h.H5(S,p);for(var I=0;I<p;I++){h.data[S]=k.Crv.v[I].v.Cnty.v;
|
|
S++}G.YO(h,S,0);S+=4;G.YO(h,S,0);S+=4}return h.data.slice(0,S).buffer};function dR(){}dR.D9=function(W){var h=new Uint8Array(W),S=4,k=G.QA(h,S);
|
|
S+=2;var p=G.d(h,S);S+=4;var I=[];for(var Q=0;Q<p;Q++){var q={};I.push(q);S=dR.u7(h,S,q)}return I};dR.sm=function(W,h){W.name=h};
|
|
dR.m0=function(W){var h=new a4,S=0;G.ZS(h,S,"8BPT");S+=4;G.Jv(h,S,1);S+=2;G.YO(h,S,W.length);S+=4;for(var Q=0;
|
|
Q<W.length;Q++){S=dR.Mc(h,S,W[Q])}return h.data.slice(0,S).buffer};dR.sR=function(W,h,S){var k=h+S,p=[];
|
|
while(h<k){var I={},q=G.d(W,h);h+=4;var P=h;h=dR.u7(W,h,I);if(!I.jR[1].ZP())p.push(I);if(q%4!=0)q+=4-q%4;
|
|
h=P+q}return p};dR.$p=function(W,h,S){for(var Q=0;Q<S.length;Q++){var k=S[Q];h+=4;var p=h;h=dR.Mc(W,h,k);
|
|
var I=h-p;G.YO(W,p-4,I);if(I%4!=0)p+=4-I%4;h=p+I}return h};dR.u7=function(W,h,S){var k=G.d(W,h);h+=4;
|
|
if(k!=1)alert("Unknown version of pattern");var p=G.d(W,h);h+=4;if(p!=1&&p!=2&&p!=3)console.log("Unsupported mode of pattern: "+p);
|
|
var I=G.QA(W,h);h+=2;var q=G.QA(W,h);h+=2;var P=new gj(0,0,q,I);S.name=G.QS(W,h);h+=4+2*S.name.length+2;
|
|
var t=W[h];h++;S.id=G.dP(W,h,t);h+=S.id.length;var M=-1;if(p==2){M=h;h+=3*256+4}var U=new N.qr(q*I);
|
|
h=dR.ajG(W,h,U);if(p==2){for(var Q=0;Q<U.p.length;Q++){var i=3*U.p[Q];U.p[Q]=W[M+i+0];U.z[Q]=W[M+i+1];
|
|
U.S[Q]=W[M+i+2]}}var z=N.U(P.n()*4);N.ST(U,z);S.jR=[z,P];return h};dR.Mc=function(W,h,S){var k=S.jR[0],p=S.jR[1];
|
|
G.YO(W,h,1);h+=4;G.YO(W,h,3);h+=4;G.Jv(W,h,p.Z);h+=2;G.Jv(W,h,p.e);h+=2;G.HG(W,h,S.name+"\0");h+=4+2*S.name.length+2;
|
|
G.Uk(W,h,S.id.length);h++;G.ZS(W,h,S.id);h+=S.id.length;var I=new N.qr(p.n());N.hc(k,I);h=dR.an9(W,h,I,p);
|
|
return h};dR.ajG=function(W,h,S){var k=h,p={pY:null,aL:[],adW:null,rs:null},I=G.d(W,h);h+=4;var q=G.d(W,h);
|
|
h+=4;p.pY=G.El(W,h);h+=16;var P=G.d(W,h);h+=4;for(var Q=0;Q<P+2;Q++){var t=G.d(W,h);h+=4;if(t==0)continue;
|
|
var M=G.d(W,h);h+=4;if(M==0)continue;var U=G.d(W,h);h+=4;var i=G.El(W,h);h+=16;var z=G.QA(W,h);h+=2;
|
|
var D=W[h];h++;var R=jp.Cd(!1,U,W,i.e,i.Z,h,D);if(Q<P)p.aL.push(R);if(Q==P)p.adW=R;if(Q==P+1)p.rs=R;
|
|
h+=M-23}if(!p.pY.ZP()){if(p.aL[0])S.p=p.aL[0];if(p.aL[1])S.z=p.aL[1];else S.z=p.aL[0].slice(0);if(p.aL[2])S.S=p.aL[2];
|
|
else S.S=p.aL[0].slice(0);if(p.rs)S.S4=p.rs;else S.S4.fill(255)}return h};dR.an9=function(W,h,S,k){var p=h,I={pY:k,aL:[S.p,S.z,S.S],adW:null,rs:S.S4};
|
|
G.YO(W,h,3);h+=4;G.YO(W,h,0);h+=4;G.gv(W,h,k);h+=16;G.YO(W,h,24);h+=4;for(var Q=0;Q<24+2;Q++){var q=h,P=Q<3||Q==25?1:0;
|
|
G.YO(W,h,P);h+=4;if(P==0)continue;G.YO(W,h,0);h+=4;G.YO(W,h,8);h+=4;G.gv(W,h,k);h+=16;G.Jv(W,h,8);h+=2;
|
|
G.Uk(W,h,1,1);h++;var t=Q<3?I.aL[Q]:I.rs;W.H5(h,k.n()+2);h=jp.HJ(!1,t,W.data,k.e,k.Z,h,1);G.YO(W,q+4,h-q-8)}G.YO(W,p+4,h-p-8);
|
|
return h};function gZ(){}gZ.D9=function(W){var h=new Uint8Array(W),S=0,k=G.dP(h,S,4);S+=4;var p=G.QA(h,S);
|
|
S+=2;var I=[];if(p<=3){var q=G.QA(h,S);S+=2;for(var Q=0;Q<q;Q++){var P=h[S++],t=G.dP(h,S,P);S+=P;var M=gZ.lU(h,S,t),U=M[0];
|
|
S=M[1];I.push(U)}}else{var M={},i=iF.Ej(h,M,S+4),z=M.GrdL.v;for(var Q=0;Q<z.length;Q++)I[Q]=z[Q].v.Grad.v}return I};
|
|
gZ.sm=function(W,h){W.Nm.v=h};gZ.m0=function(W){var h=new a4,S=0;G.ZS(h,S,"8BGR");S+=4;G.Jv(h,S,5);S+=2;
|
|
G.YO(h,S,16);S+=4;var k={classID:"null",GrdL:{t:"VlLs",v:[]}},p=k.GrdL.v;for(var Q=0;Q<W.length;Q++)p[Q]={t:"Objc",v:{classID:"Grdn",__name:"Gradient ",Grad:{t:"Objc",v:W[Q]}}};
|
|
S+=iF.WK(h,k,S);return h.data.slice(0,S).buffer};gZ.lU=function(W,h,S){var k={classID:"Grdn",Clrs:{t:"VlLs",v:[]},GrdF:{t:"enum",v:{GrdF:"CstS"}},Intr:{t:"doub",v:4096},Nm:{t:"TEXT",v:S},Trns:{t:"VlLs",v:[]}},p=G.QA(W,h);
|
|
h+=2;if(p==0)throw"e";for(var Q=0;Q<p;Q++){var I=G.d(W,h),q=G.d(W,h+4),P=fY.Vo(W,h+8),t={t:"Objc",v:{classID:"Clrt",Clr:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:P.p},Grn:{t:"doub",v:P.z},Bl:{t:"doub",v:P.S}}},Type:{t:"enum",v:{Clry:"UsrS"}},Lctn:{t:"long",v:I},Mdpn:{t:"long",v:q}}};
|
|
k.Clrs.v.push(t);h+=20}var M=G.QA(W,h);h+=2;for(var Q=0;Q<M;Q++){var I=G.d(W,h),q=G.d(W,h+4),U=G.QA(W,h+8),t={t:"Objc",v:{classID:"TrnS",Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(100*U/255)}},Lctn:{t:"long",v:I},Mdpn:{t:"long",v:q}}};
|
|
k.Trns.v.push(t);h+=10}var i=G.QA(W,h);h+=2;if(i!=2)throw i;k.Intr.v=G.QA(W,h);h+=2;var z=G.QA(W,h);
|
|
h+=2;if(z!=32)throw"e";return[k,h]};gZ.afF=function(W,h,S){var k=S.Clrs.v.length;G.Jv(W,h,k);h+=2;for(var Q=0;
|
|
Q<k;Q++){var p=S.Clrs.v[Q];G.YO(W,h,p.v.Lctn.v);G.YO(W,h+4,p.v.Mdpn.v);G.Jv(W,h+8,0);var I=N.X.hg(N.X.iZ(p.v.Clr.v)),q=[I.Rd.v,I.Grn.v,I.Bl.v,0];
|
|
for(var P=0;P<4;P++)G.Jv(W,h+10+P*2,Math.round(65535*(q[P]/255)));h+=20}var t=S.Trns.v.length;G.Jv(W,h,t);
|
|
h+=2;for(var Q=0;Q<t;Q++){var p=S.Trns.v[Q];G.YO(W,h,p.v.Lctn.v);G.YO(W,h+4,p.v.Mdpn.v);G.Jv(W,h+8,Math.round(255*p.v.Opct.v.val/100));
|
|
h+=10}G.Jv(W,h,2);h+=2;G.Jv(W,h,S.Intr.v);h+=2;G.Jv(W,h,32);h+=2;return h};function aL(){}aL.D9=function(W){var h=new Uint8Array(W),S=[],k=[],p=[],I=[],q=[],P=0,t=G.dP(h,P,4);
|
|
P+=4;var M=G.d(h,P);P+=4;var U=G.d(h,P);P+=4;while(P<h.length){var i=G.dP(h,P,4);P+=4;var z=G.dP(h,P,4);
|
|
P+=4;var D=G.d(h,P);P+=4;if(z=="tppa"){k=dR.sR(h,P,D);P+=D}else if(z=="tpbd"){p=gH.Om(h,P,D,1,1);P+=D}else if(z=="tptp"){var R=G.d(h,P);
|
|
P+=4;for(var Q=0;Q<R;Q++){var O=G.QS(h,P);P+=6+O.length*2;P+=4;var b={};P+=iF.Ej(h,b,P);S.push([O,b])}while((P&3)!=0)P++}else if(z=="tpsh"){var w=P,A=h.slice(P,P+D);
|
|
while(P<w+D){var g=G.d(h,P);P+=4;P=hv.Wh(h,P,"Shape",I)}P=w+D}else if(z=="tpst"){var w=P;P+=4;while(P<w+D){var E=G.d(h,P);
|
|
P+=4;var j=P,x=G.d(h,P);P+=4;var b={q2:{},dS:{}};q.push(b);P+=4;P+=iF.Ej(h,b.q2,P);P+=4;P+=iF.Ej(h,b.dS,P);
|
|
P=j+E;var d=b.dS.Lefx;if(d){if(d.v.masterFXSwitch==null)d.v.masterFXSwitch={t:"bool",v:!0};j6.ph(d.v)}}P=w+D}else{console.log(h.slice(P-8,P+64));
|
|
console.log(G.dP(h,P-8,64));throw z}}return{jE:p,cc:k,list:S,a0y:I,fH:q}};aL.sm=function(W,h){W[0]=h};
|
|
aL.m0=function(W){var h=new a4,S=0;G.ZS(h,S,"8BTP");S+=4;G.YO(h,S,3);S+=4;G.YO(h,S,1);S+=4;var k=[W.cc,W.jE,W.list];
|
|
for(var Q=0;Q<3;Q++){if(k[Q].length==0)continue;G.ZS(h,S,"8BIM");S+=4;var p=["tppa","tpbd","tptp"][Q];
|
|
G.ZS(h,S,p);S+=4;var I=S;S+=4;if(p=="tppa"){S=dR.$p(h,S,W.cc)}else if(p=="tpbd"){S=gH.ni(h,S,W.jE)}else if(p=="tptp"){G.YO(h,S,W.list.length);
|
|
S+=4;for(var q=0;q<W.list.length;q++){var P=W.list[q];G.HG(h,S,P[0]+"\0");S+=6+P[0].length*2;G.YO(h,S,16);
|
|
S+=4;S+=iF.WK(h,P[1],S)}}G.YO(h,I,S-I-4);while((S&3)!=0)S++;h.H5(S,0)}return h.data.slice(0,S).buffer};
|
|
function hR(){}hR.D9=function(W,h){var S=new Uint8Array(W),k;if(G.d(S,0)==S.length)k="icc";else if(S[0]=="<".charCodeAt(0))k="look";
|
|
else if(G.jC(S,"LUT_3D_SIZE")!=-1)k="cube";else k="3DL";if(k!="icc"){var p=hR.a2i(S,k),I=hR.ahv(p[0],p[1]);
|
|
S=I}var q=[];for(var Q=0;Q<S.length;Q++)q.push(S[Q]);return[{classID:"null",Dthr:{t:"bool",v:!0},Nm:{t:"TEXT",v:h?h:"file.icc"},lookupType:{t:"enum",v:{colorLookupType:"abstractProfile"}},profile:{t:"tdta",v:q}}]};
|
|
hR.m0=function(W){var h=W[0],S=new Uint8Array(h.profile.v);return S.buffer};hR.sm=function(W,h){W.Nm.v=h};
|
|
hR.ahv=function(W,h){var S=new a4,k=128;S.H5(0,128);var p=[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 Q=0;Q<p.length;Q++)S.data[Q]=p[Q];var I=["desc","A2B0"],q=I.length,P=128+4+q*12;G.YO(S,k,q);
|
|
k+=4;for(var t=0;t<q;t++){var M=I[t];G.ZS(S,k,M);k+=4;G.YO(S,k,P);k+=4;var U=P;if(M=="desc"){G.ZS(S,U,"mluc");
|
|
U+=4;U+=4;G.YO(S,U,1);U+=4;G.YO(S,U,12);U+=4;G.ZS(S,U,"enUS");U+=4;var i="ICC by Photopea\0",z=i.length*2+2;
|
|
G.YO(S,U,z);U+=4;G.YO(S,U,28);U+=4;S.H5(U,z);for(var Q=0;Q<i.length;Q++)S.data[U+Q*2+1]=i.charCodeAt(Q);
|
|
U+=z}if(M=="A2B0"){G.ZS(S,U,"mAB ");U+=4;U+=4;S.H5(U,4);S.data[U]=3;S.data[U+1]=3;U+=4;S.H5(U,4*5);U+=4*3;
|
|
G.YO(S,U,U+8-P);U+=4;U+=4;S.H5(U,20);S.data[U]=W;S.data[U+1]=W;S.data[U+2]=W;U+=16;S.data[U]=2;U+=4;
|
|
var D=W*W*W*3;S.H5(U,D*2);for(var Q=0;Q<D;Q++)G.Y_(S.data,U+Q*2,Math.max(0,Math.min(65535,Math.round(h[Q]*65535))));
|
|
U+=D*2}var R=U-P;while((R&3)!=0)R++;G.YO(S,k,R);k+=4;P+=R}G.YO(S,0,P);return S.data.slice(0,P)};hR.a2i=function(W,h){h="LUTFormat"+h.toUpperCase();
|
|
var S=[],k=0,p=G.Md(W,0,W.length),I="";for(var Q=0;Q<W.length&&I=="";Q++){if(W[Q]==10)I="\n";else if(W[Q]==13){I="\r";
|
|
if(W[Q+1]==10)I+="\n"}}if(h=="LUTFormatCUBE"){var q=p.split(I);for(var Q=0;Q<q.length;Q++){if(q[Q]==""||q[Q][0]=="#")continue;
|
|
var P=q[Q].split(" "),t=P[0];if(t=="LUT_3D_SIZE"){k=parseInt(P[1]);continue}if(["TITLE","DOMAIN_MIN","DOMAIN_MAX"].indexOf(t)!=-1)continue;
|
|
S.push(parseFloat(P[0]),parseFloat(P[1]),parseFloat(P[2]))}S=hR.ei(k,S)}else if(h=="LUTFormat3DL"){var q=p.split(I),M=1/4095;
|
|
for(var Q=0;Q<q.length;Q++){var U=q[Q];if(U==""||U=="3DMESH"||U.startsWith("Mesh")||U[0]=="#")continue;
|
|
var P=U.split(" "),t=P[0];if(k==0){k=P.length;continue}S.push(parseFloat(P[0])*M,parseFloat(P[1])*M,parseFloat(P[2])*M)}}else if(h=="LUTFormatLOOK"){var i=new DOMParser,z=i.parseFromString(p,"text/xml"),D=z.getElementsByTagName("LUT")[0],R=D.children[0].textContent;
|
|
k=parseInt(JSON.parse(R));var O=D.children[1].textContent;O=O.replace(/"/g,"").replace(/\s/g,"");var b=3*k*k*k,w=b*4,A=new Uint8Array(w);for(var Q=0;Q<w;Q++){var g=O.charCodeAt(Q*2),E=O.charCodeAt(Q*2+1),j=g<58?g-48:g-55,x=E<58?E-48:E-55;A[Q]=(j<<4)+x}for(var Q=0;Q<b;Q++)S.push(G.Ys(A,Q<<2));S=hR.ei(k,S)}else throw h;return[k,S]};hR.a1s=function(W,h,S){var k=["#Created by www.Photopea.com","TITLE \""+S+"\"","","#LUT size","LUT_3D_SIZE "+h,"","#data domain","DOMAIN_MIN 0.0 0.0 0.0","DOMAIN_MAX 1.0 1.0 1.0","","#LUT data points"],p=6;
|
|
for(var Q=0;Q<W.length;Q+=3){k.push(W[Q].toFixed(p)+" "+W[Q+1].toFixed(p)+" "+W[Q+2].toFixed(p))}k.push("");
|
|
return G.cw(k.join("\n")).buffer};hR.ei=function(W,h){var S=[],k=W*W*W;for(var Q=0;Q<k;Q++)S.push(0,0,0);
|
|
for(var p=0;p<W;p++)for(var I=0;I<W;I++)for(var q=0;q<W;q++){var Q=3*(q+I*W+p*W*W),P=3*(p+I*W+q*W*W);
|
|
S[P]=h[Q];S[P+1]=h[Q+1];S[P+2]=h[Q+2]}return S};function iF(){}iF.Ej=function(W,h,S,k,p){var I=S,q;if(p==null)p=0;
|
|
var P=G.d(W,S);if(P==0){q="";S+=4}else{q=G.QS(W,S);S+=4+2*q.length+2}if(q!="")h.__name=q;h.classID=iF.Wj(W,S);
|
|
if(k)console.log("\t".repeat(p),"- reading descriptor",h.classID,S);S+=iF.ct(W,S);var t=G.GZ(W,S);S+=4;
|
|
for(var Q=0;Q<t;Q++){var M=iF.Wj(W,S);S+=iF.ct(W,S);var U=iF.O3(W,S,k,p);h[M]=U;S+=U.size;delete U.size}return S-I};
|
|
iF.WK=function(W,h,S,k){var p=S,I=h.__name;if(I==null)I="";I+="\0";G.HG(W,S,I);S+=4+2*I.length;iF.Yx(W,S,h.classID);
|
|
S+=iF.ct(W.data,S);G.Vv(W,S,Object.keys(h).length-1-(h.__name==null?0:1));S+=4;for(var q in h){if(q=="classID")continue;
|
|
if(q=="__name")continue;iF.Yx(W,S,q);S+=iF.ct(W.data,S);S+=iF.vY(W,S,h[q])}return S-p};iF.O3=function(W,h,S,k){var p=h,I=G.dP(W,h,4);
|
|
h+=4;var q={size:0,t:I,v:null};if(S)console.log("\t".repeat(k),"reading key",I,p);switch(I){case"obj ":case"VlLs":q.v=[];
|
|
var P=G.d(W,h);h+=4;for(var Q=0;Q<P;Q++){var t=iF.O3(W,h,S,k+1);h+=t.size;delete t.size;q.v.push(t)}break;
|
|
case"UntF":q.v={type:G.dP(W,h,4),val:G.aM(W,h+4)};h+=12;break;case"doub":q.v=G.aM(W,h);h+=8;break;case"bool":q.v=W[h]==1;
|
|
h+=1;break;case"long":q.v=G.GZ(W,h);h+=4;break;case"comp":q.v=G.GZ(W,h+4);h+=8;break;case"Objc":q.v={};
|
|
var M=iF.Ej(W,q.v,h,S,k+1);h+=M;break;case"TEXT":var U=G.d(W,h);if(U==0){q.v="";h+=4}else{q.v=G.QS(W,h);
|
|
h+=4+q.v.length*2+2}break;case"enum":var i=iF.Wj(W,h);h+=iF.ct(W,h);var z=iF.Wj(W,h);h+=iF.ct(W,h);q.v={};
|
|
q.v[i]=z;break;case"tdta":var D=G.GZ(W,h);h+=4;q.v=[];for(var Q=0;Q<D;Q++)q.v.push(W[h+Q]);h+=D;break;
|
|
case"ObAr":var R=G.d(W,h);h+=4;var O=G.QS(W,h);h+=4+2*O.length+2;if(O!="")throw O;var b=iF.Wj(W,h);h+=4+Math.max(4,b.length);
|
|
q.v={classID:b,arr:[]};var w=G.d(W,h);h+=4;for(var Q=0;Q<w;Q++){var b=iF.Wj(W,h);h+=4+Math.max(4,b.length);
|
|
var i=G.dP(W,h,4);h+=4;var A=G.dP(W,h,4);h+=4;var g={id:b,type:i,uID:A,arr:[]};q.v.arr.push(g);var E=G.d(W,h,4);
|
|
h+=4;for(var j=0;j<E;j++){var x=G.aM(W,h);h+=8;g.arr.push(x)}}break;case"Pth ":var d=h,D=G.d(W,h);h+=4;
|
|
var L=G.dP(W,h,4);h+=4;var _=G.Tz(W,h);h+=4;var T=G.aaa(W,h);h+=4+T.length*2;q.v={sig:L,pth:T};break;
|
|
case"Clss":case"type":case"rele":var T=G.QS(W,h);h+=4+T.length*2+2;var c=iF.Wj(W,h);h+=4+Math.max(4,c.length);
|
|
q.v={classID:c};if(T!="")q.v.__name=T;if(I=="rele"){q.v.val=G.GZ(W,h);h+=4}break;case"prop":case"Enmr":case"indx":case"name":var e=iF.E9[I],T=G.QS(W,h);
|
|
h+=4+T.length*2+2;if(T.length!=0){console.log(I,T);throw"e"}q.v={};for(var Q=0;Q<e.length;Q++){var c=iF.Wj(W,h);
|
|
h+=4+Math.max(4,c.length);q.v[e[Q]]=c}if(I=="name"){var T=G.QS(W,h);h+=4+T.length*2+2;q.v.val=T}if(I=="indx"){q.v.val=G.d(W,h);
|
|
h+=4}break;case"alis":var D=G.d(W,h);h+=4;q.v=G.dP(W,h,D);h+=D;break;default:{console.log("unknown oskey: "+I+", "+p);
|
|
throw"e";return q}}if(S){console.log("\t".repeat(k),q.v);console.log("\t".repeat(k),"======",h)}q.size=h-p;
|
|
return q};iF.E9={name:["classID"],prop:["classID","keyID"],Enmr:["classID","typeID","enum"],indx:["classID"]};
|
|
iF.vY=function(W,h,S){var k=h,p=S.t;S=S.v;G.ZS(W,h,p);h+=4;switch(p){case"obj ":case"VlLs":G.Vv(W,h,S.length);
|
|
h+=4;for(var I=0;I<S.length;I++){var q=iF.vY(W,h,S[I]);h+=q}break;case"UntF":G.ZS(W,h,S.type);G.h8(W,h+4,S.val);
|
|
h+=12;break;case"doub":G.h8(W,h,S);h+=8;break;case"bool":G.Uk(W,h,S?1:0,1);h+=1;break;case"long":G.Vv(W,h,S);
|
|
h+=4;break;case"comp":G.Vv(W,h+4,S);h+=8;break;case"Objc":var q=iF.WK(W,S,h);h+=q;break;case"TEXT":G.HG(W,h,S+"\0");
|
|
h+=4+S.length*2+2;break;case"enum":var P=Object.keys(S)[0],t=S[P];iF.Yx(W,h,P);h+=iF.ct(W.data,h);iF.Yx(W,h,t);
|
|
h+=iF.ct(W.data,h);break;case"tdta":G.YO(W,h,S.length);h+=4;G.Rs(W,h,S);h+=S.length;break;case"ObAr":G.YO(W,h,S.arr[0].arr.length);
|
|
h+=4;G.HG(W,h,"\0");h+=6;iF.Yx(W,h,S.classID);h+=4+Math.max(4,S.classID.length);G.YO(W,h,S.arr.length);
|
|
h+=4;for(var Q=0;Q<S.arr.length;Q++){var M=S.arr[Q];iF.Yx(W,h,M.id);h+=4+Math.max(4,M.id.length);G.ZS(W,h,M.type);
|
|
h+=4;G.ZS(W,h,M.uID);h+=4;G.YO(W,h,M.arr.length);h+=4;for(var I=0;I<M.arr.length;I++){G.h8(W,h,M.arr[I]);
|
|
h+=8}}break;case"Pth ":var U=S.pth.length*2+4+8;G.YO(W,h,U);h+=4;G.ZS(W,h,S.sig);h+=4;G.Qk(W,h,U);h+=4;
|
|
G.a2u(W,h,S.pth);h+=S.pth.length*2+4;break;case"Clss":case"type":case"rele":var i=S.__name;if(i==null)i="";
|
|
G.HG(W,h,i+"\0");h+=4+i.length*2+2;var z=S.classID;iF.Yx(W,h,z);h+=4+Math.max(4,z.length);if(p=="rele"){G.Vv(W,h,S.val);
|
|
h+=4}break;case"prop":case"Enmr":case"indx":case"name":var D=iF.E9[p];G.YO(W,h,1);h+=6;for(var Q=0;Q<D.length;
|
|
Q++){var z=S[D[Q]];iF.Yx(W,h,z);h+=4+Math.max(4,z.length)}if(p=="name"){G.HG(W,h,S.val+"\0");h+=4+S.val.length*2+2}if(p=="indx"){G.YO(W,h,S.val);
|
|
h+=4}break;case"alis":var U=S.length;G.YO(W,h,U);h+=4;G.ZS(W,h,S);h+=U;break;default:console.log("unknown oskey: "+p);
|
|
h=k;break}return h-k};iF.Wj=function(W,h){var S=G.GZ(W,h);if(S>1e3)throw"e";if(S==0)S=4;return G.dP(W,h+4,S).trim()};
|
|
iF.ct=function(W,h){var S=G.GZ(W,h);return S==0?8:4+S};iF.Yx=function(W,h,S){var k="warp list Comp xx xy yx yy tx ty PinP PnRt PnOv PnDp xor PuX0 PuX1 PuX2 PuX3 PuY0 PuY1 PuY2 PuY3 base kana ruby box flow trim then else".split(" "),p=4<S.length||k.indexOf(S)!=-1;
|
|
G.Vv(W,h,p?S.length:0);G.ZS(W,h+4,S);if(S.length<4&&!p){var I="";for(var Q=S.length;Q<4;Q++)I+=" ";G.ZS(W,h+4+S.length,I)}};
|
|
iF.a9f=function(W){var h={};for(var S in W){if(S=="classID")h[S]=W[S];else if(S=="__name")h[S]=W[S];
|
|
else h[S]=iF.h_(W[S])}return h};iF.h_=function(W){if(W.fJ=="Objc")return iF.a9f(W.v);else if(W.fJ=="VlLs"){var h=[];
|
|
for(var Q=0;Q<W.v.length;Q++)h.push(iF.h_(W.v[Q]));return h}else if(W.fJ=="UntF")return W.v.val;else return W.v};
|
|
function j6(){}j6.zB=function(W,h,S,k,p,I){while(h<S){var q=G.dP(W,h,4);h+=4;if(q!="8BIM"&&q!="8B64"){console.log("layer information signature error! "+q,"PSB = "+p);
|
|
alert("Error in PSD file: wrong signature.");return S}var P=G.dP(W,h,4);h+=4;var t=G.d(W,h);h+=4;var M=p&&"LMsk Lr16 Lr32 Layr Mt16 Mt32 Mtrn Alph FMsk lnk2 lnkE FEid FXid PxSD extn cinf artd pths".split(" ").indexOf(P)!=-1;
|
|
if(M){t=t<<32|G.GZ(W,h);h+=4}var U=["lrFX","PlLd"];if(U.indexOf(P)!=-1){if(t%4!=0)t+=4-t%4;h+=t;continue}switch(P){case"iOpa":k[P]=W[h];
|
|
break;case"brst":k[P]=[1,1,1];for(var Q=0;Q<t;Q+=4)k[P][G.d(W,h+Q)]=0;break;case"knko":k[P]=W[h];break;
|
|
case"infx":k[P]=W[h];break;case"clbl":k[P]=W[h];break;case"lmgm":k[P]=W[h];break;case"vmgm":k[P]=W[h];
|
|
break;case"lyid":k[P]=G.d(W,h);break;case"lsct":k[P]={type:G.d(W,h)};if(t>=12)k[P].oO=G.dP(W,h+8,4);
|
|
break;case"lsdk":k.lsct={type:G.d(W,h)};break;case"lyvr":k[P]=G.d(W,h);break;case"lnsr":var i={artb:1,bgnd:1,cont:1,layr:1,lset:1,rend:1,shap:1,user:1,____:null};
|
|
k[P]=G.dP(W,h,4);break;case"lspf":k[P]=G.d(W,h);break;case"lclr":k[P]=G.QA(W,h);break;case"luni":k[P]=G.Xl(W,h);
|
|
break;case"fxrp":k[P]=new eC(G.aM(W,h),G.aM(W,h+8));break;case"artb":case"artd":k[P]={};iF.Ej(W,k[P],h+4);
|
|
break;case"SoCo":k[P]={};iF.Ej(W,k[P],h+4);break;case"GdFl":k[P]={};iF.Ej(W,k[P],h+4);j6.tP(k[P],P);
|
|
break;case"PtFl":k[P]={};iF.Ej(W,k[P],h+4);j6.tP(k[P],P);break;case"CgEd":var z=k.brit=hw.QE("brit"),D={};
|
|
iF.Ej(W,D,h+4);z.Brgh.v=D.Brgh?D.Brgh.v:0;z.Cntr.v=D.Cntr?D.Cntr.v:0;z.useLegacy.v=D.useLegacy?D.useLegacy.v:0;
|
|
break;case"brit":if(k.brit==null){var z=k.brit=hw.QE("brit"),D={};z.Brgh.v=G.P5(W,h);z.Cntr.v=G.P5(W,h+2);
|
|
z.useLegacy.v=!1}break;case"levl":var R=W.buffer.slice(h,h+t);k[P]=e4.D9(R);break;case"curv":k[P]=ht.oI(W,h,t);
|
|
break;case"expA":var O=G.QA(W,h),b=k[P]=hw.QE("expA");b.Exps.v=G.SQ(W,h+2);b.Ofst.v=G.SQ(W,h+6);b.gammaCorrection.v=G.SQ(W,h+10);
|
|
break;case"vibA":k[P]={};iF.Ej(W,k[P],h+4);break;case"hue2":k[P]=bU.oI(W,h,t);break;case"blnc":var b=k[P]=hw.QE(P);
|
|
b.PrsL.v=W[h+18]==1;var w=["ShdL","MdtL","HghL"];for(var Q=0;Q<3;Q++)for(var A=0;A<3;A++)b[w[Q]].v[A].v=G.P5(W,h+Q*6+A*2);
|
|
break;case"blwh":var g={};iF.Ej(W,g,h+4);var b=hw.QE(P),E="Bl Cyn Grn Mgnt Rd Yllw tintColor useTint".split(" ");
|
|
for(var Q=0;Q<E.length;Q++){b[E[Q]]=g[E[Q]];delete g[E[Q]]}k[P]=b;break;case"phfl":var b=k[P]=hw.QE(P),j=b.Clr.v,O=G.QA(W,h);
|
|
if(O==3){var x=[G.d(W,h+2),G.d(W,h+6),G.d(W,h+10)],d=32768,L=N.xg(x[0]/d,x[1]/d,x[2]/d);j.Lmnc.v=L.UT;
|
|
j.A.v=L.S4;j.B.v=L.S}if(O==2){var _=G.QA(W,h+2);if(_!=7)throw"e";j.Lmnc.v=G.P5(W,h+4)/100;j.A.v=G.P5(W,h+6)/100;
|
|
j.B.v=G.P5(W,h+8)/100}var T=h+2+(O==3?12:10);b.Dnst.v=G.d(W,T);T+=4;b.PrsL.v=W[T]==1;break;case"mixr":var c={zM:G.QA(W,h+2)==1,k:[]};
|
|
for(var Q=0;Q<20;Q++)c.k.push(G.P5(W,h+4+Q*2));k[P]=bS.gl(c);break;case"clrL":case"rplc":k[P]={};iF.Ej(W,k[P],h+6);
|
|
break;case"nvrt":k[P]={};break;case"post":k[P]=hw.QE("post");k[P].Lvls.v=G.QA(W,h);break;case"thrs":k[P]=hw.QE("thrs");
|
|
k[P].Lvl.v=G.QA(W,h);break;case"grdm":var e=h,r=W[h+2]==1,B=W[h+3]==1;e+=4;var F=G.Xl(W,e);e+=4+F.length*2;
|
|
var v=gZ.lU(W,e,F),X=v[0];e=v[1];var V=G.QA(W,e);e+=2;var H=G.d(W,e);e+=4;var o=G.QA(W,e)==1;e+=2;var J=G.QA(W,e)==1;
|
|
e+=2;var C=G.d(W,e);e+=4;var Y=G.QA(W,e);e+=2;var K=[],u=[];for(var Q=0;Q<4;Q++){K.push({t:"long",v:~~(G.QA(W,e+Q*2)*100/32768)});
|
|
u.push({t:"long",v:~~(G.QA(W,e+Q*2+8)*100/32768)})}e+=16;var f=G.QA(W,e);e+=2;if(V==1)X={classID:"Grdn",Nm:{t:"TEXT",v:F},GrdF:{t:"enum",v:{GrdF:"ClNs"}},ShTr:{t:"bool",v:o},VctC:{t:"bool",v:J},ClrS:{t:"enum",v:{ClrS:"RGBC"}},RndS:{t:"long",v:H},Smth:{t:"long",v:C},Mnm:{t:"VlLs",v:K},Mxm:{t:"VlLs",v:u}};
|
|
var l=hw.QE("grdm");l.Rvrs.v=r;l.Grad.v=X;k[P]=l;break;case"selc":k[P]=ag.oI(W,h,t);break;case"vmsk":case"vsms":var jk=k.vmsk=new $.CP,hE=G.GZ(W,h+4),Z=(hE>>0&1)==1;
|
|
jk.ln=(hE>>1&1)==0;jk.isEnabled=(hE>>2&1)==0;jk.T=hv.HW(W,h+8,t-8,I.e,I.Z);break;case"shmd":k[P]={};
|
|
var aQ=G.d(W,h),T=h+4;for(var Q=0;Q<aQ;Q++){var q=G.dP(W,T,4);T+=4;var jC=G.dP(W,T,4);T+=4;var eO=W[T];
|
|
T++;if(Math.max(W[T],W[T+1],W[T+2])!=0)throw"e";T+=3;var iU=G.d(W,T);T+=4;if(jC=="cust"||jC=="cmls"||jC=="extn"||jC=="mlst"){var gK=G.d(W,T);
|
|
if(gK!=16)T+=4;if(G.d(W,T)==16){var g={};iF.Ej(W,g,T+4,!1);k[P][jC]=g;if(jC=="cmls")a.UI.a7W(k[P][jC])}}else{console.log("unknown shmd key: "+jC+", size: "+iU)}T+=iU}break;
|
|
case"shpa":var O=G.d(W,h),iM=G.d(W,h+4);if(iM!=0)console.log("some patterns present!");break;case"TySh":var i5=k[P]={},O=G.QA(W,h);
|
|
i5.A=G.uL(W,h+2);var fN=G.QA(W,h+2+48);i5.nJ={};var dx=iF.Ej(W,i5.nJ,h+56),ai=gf.aal();for(var hO in ai)if(i5.nJ[hO]==null)i5.nJ[hO]=ai[hO];
|
|
i5.ud={};var ff=iF.Ej(W,i5.ud,h+56+dx+6);i5.Ik=G.a9R(W,h+56+dx+6+ff);i5.MW=jR.D9(i5.nJ.EngineData.v);
|
|
gf.aua(i5.MW.EngineDict.StyleRun.RunArray);if(i5.MW.ResourceDict==null)i5.MW.ResourceDict=JSON.parse(JSON.stringify(i5.MW.DocumentResources));
|
|
delete i5.nJ.EngineData;break;case"lfx2":case"lmfx":case"lfxs":var eP=G.d(W,h),a0=G.d(W,h+4);k.lmfx={};
|
|
var dx=iF.Ej(W,k.lmfx,h+8);j6.ph(k.lmfx);break;case"FMsk":k[P]=G.SE(W,h,t);break;case"Txt2":k[P]={};
|
|
k[P].raw=G.SE(W,h,t);k[P].Bk=jh.D9(k[P].raw);break;case"Patt":k[P]=dR.sR(W,h,t);break;case"SoLd":var bM=G.dP(W,h,4),cV=G.d(W,h+4),aX=G.d(W,h+8);
|
|
k[P]={};var j8=iF.Ej(W,k[P],h+12);if(k[P].nonAffineTransform==null)k[P].nonAffineTransform=JSON.parse(JSON.stringify(k[P].Trnf));
|
|
if(k[P].Impr==null)k[P].Impr={t:"Objc",v:{__name:"None",classID:"none"}};break;case"vstk":case"pths":var cV=G.d(W,h);
|
|
k[P]={};var j8=iF.Ej(W,k[P],h+4);break;case"vscg":var jC=G.dP(W,h,4),cV=G.d(W,h+4);k[jC]={};var j8=iF.Ej(W,k[jC],h+8);
|
|
j6.tP(k[jC],jC);break;case"vogk":var j3=G.d(W,h),cV=G.d(W,h+4);k[P]={};var j8=iF.Ej(W,k[P],h+8);k[P]=k[P].keyDescriptorList.v;
|
|
for(var Q=0;Q<k[P].length;Q++){var am=k[P][Q].v;if(!N.uy.Bj(am))continue;if(am.keyOriginBoxCorners==null){var fG=N.uy.aO(am);
|
|
am.keyOriginBoxCorners={t:"Objc",v:{classID:"null"}};var bw=[fG[0],fG[1],fG[2],fG[1],fG[2],fG[3],fG[0],fG[3]];
|
|
if(am.keyOriginType.v==4)bw=N.uy.bM(N.uy.Jo(am),am.keyOriginLineWeight.v);N.uy.sj(am,"keyOriginBoxCorners",bw)}}break;
|
|
case"lnk2":case"lnkD__":case"lnk3__":k[P]=[];var e=h;while(e<h+t){var fz=new $.Q1;k[P].push(fz);var c6=G.QG(W,e);
|
|
e+=8;var hk=e;fz.type=G.dP(W,e,4);e+=4;if(fz.type!="liFD"){alert("Unknown Linked Layer type: "+fz.type);
|
|
break;throw fz.type}fz.l_=G.d(W,e);e+=4;var as=G.DP(W,e);e+=1+as.OK.length;fz.SI=as.OK;fz.Is=G.QS(W,e);
|
|
e+=4+fz.Is.length*2+2;fz.eY=G.dP(W,e,4);e+=4;fz.XS=G.dP(W,e,4);e+=4;var bf=G.QG(W,e);e+=8;fz.open=W[e];
|
|
e+=1;if(fz.open!=0){var gW={},dx=iF.Ej(W,gW,e+4);if(dx%4!=0)dx+=4-dx%4;console.log(gW);e+=dx+4}fz.open=0;
|
|
fz.raw=G.SE(W,e,bf);e=hk+c6;if(c6%4!=0)e+=4-c6%4}break;case"FEid":var e=h;k[P]=[];var j1=e+t,O=G.d(W,e);
|
|
e+=4;while(e<j1){e+=4;var c6=G.d(W,e);e+=4;var v={};k[P].push(v);v.id=G.DP(W,e).OK;e+=v.id.length+1;
|
|
var O=G.d(W,e);e+=4;e+=4;var bZ=G.d(W,e);e+=4;v.rect=G.El(W,e);e+=16;var iL=G.d(W,e);e+=4;var jI=G.d(W,e);
|
|
e+=4;var e2=new N.qr(0);for(var Q=0;Q<jI+2;Q++){var dV=G.d(W,e);e+=4;if(dV!=0){e+=4;var ds=G.d(W,e),ij=null;
|
|
e+=4;if(Q<3||Q==25)ij=jp.uN(!0,iL,W,v.rect.e,v.rect.Z,e,ds);if(Q==0)e2.p=ij;if(Q==1)e2.z=ij;if(Q==2)e2.S=ij;
|
|
if(Q==25)e2.S4=ij;e+=ds}}v.buffer=N.U(v.rect.n()*4);N.ST(e2,v.buffer);N.jo(v);var dg=W[e];e++;if(dg!=0){v.v=new $.Kt;
|
|
v.v.rect=G.El(W,e);e+=16;e+=4;var iT=G.d(W,e);e+=4;v.v.channel=jp.uN(!0,iL,W,v.v.rect.e,v.v.rect.Z,e,iT);
|
|
v.v.color=255;v.v.Yn();e+=iT}if(c6%4!=0)e+=4-c6%4}break;case"Lr16":ed.$A(I,W,h);break;default:break}var ej="Lr16 LMsk Txt2 artd extd luni pths extn tySh lfx2 cinf".split(" ");
|
|
if(ej.indexOf(P)==-1)if(t%4!=0)console.log("size not multiple of 4!!!",P);if(P!="luni"&&P!="TySh"&&P!="tySh"&&P!="lfx2")if(t%4!=0)t+=4-t%4;
|
|
h+=t}var eH=[];for(var Q=0;Q<eH.length;Q++)delete k[eH[Q]];return h};j6.ed=function(W,h,S,k,p){for(var I in S)if(S[I]==null){alert("A bug occured (see console).");
|
|
console.log("Please, report a bug, that \""+I+"\" tag was present with a null value.");delete S[I]}for(var I in S){var q=k&&"LMsk Lr16 Lr32 Layr Mt16 Mt32 Mtrn Alph FMsk lnk2 lnkE FEid FXid PxSD extn cinf artd pths".split(" ").indexOf(I)!=-1,t=0;
|
|
G.ZS(W,h,q?"8B64":"8BIM");h+=4;var P=h;G.ZS(W,h,I);h+=4;G.Vv(W,h,0);h+=q?8:4;switch(I){case"iOpa":G.Uk(W,h,S[I],1);
|
|
t=4;break;case"brst":t=0;for(var Q=0;Q<3;Q++)if(S[I][Q]==0){G.YO(W,h+t,Q);t+=4}break;case"knko":G.Uk(W,h,S[I],1);
|
|
t=4;break;case"infx":G.Uk(W,h,S[I],1);t=4;break;case"clbl":G.Uk(W,h,S[I],1);t=4;break;case"lmgm":G.Uk(W,h,S[I],1);
|
|
t=4;break;case"vmgm":G.Uk(W,h,S[I],1);t=4;break;case"lyid":G.YO(W,h,S[I]);t=4;break;case"lsct":G.YO(W,h,S[I].type);
|
|
t=4;if(S[I].oO){G.ZS(W,h+4,"8BIM");G.ZS(W,h+8,S[I].oO);t=12}break;case"lyvr":G.YO(W,h,S[I]);t=4;break;
|
|
case"lnsr":G.ZS(W,h,S[I]);t=4;break;case"lspf":G.YO(W,h,S[I]);t=4;break;case"lclr":G.Jv(W,h,S[I]);t=8;
|
|
break;case"luni":G.HG(W,h,S[I]);t=4+2*S[I].length;break;case"fxrp":G.h8(W,h,S[I].x);G.h8(W,h+8,S[I].y);
|
|
t=16;break;case"artb":case"artd":G.YO(W,h,16);t=iF.WK(W,S[I],h+4)+4;break;case"SoCo":G.YO(W,h,16);t=iF.WK(W,S[I],h+4)+4;
|
|
break;case"GdFl":G.YO(W,h,16);t=iF.WK(W,S[I],h+4)+4;break;case"PtFl":G.YO(W,h,16);t=iF.WK(W,S[I],h+4)+4;
|
|
break;case"CgEd":var M={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}},U=M,i=S[I];
|
|
U.Brgh.v=i.Brgh.v;U.Cntr.v=i.Cntr.v;U.useLegacy.v=i.useLegacy.v;G.YO(W,h,16);t=iF.WK(W,M,h+4)+4;break;
|
|
case"brit":W.H5(h,8);t=8;break;case"levl":var z=new a4;t=e4.m0(z,S[I]);G.Rs(W,h,z.data);break;case"curv":t=ht.op(W,h,S[I]);
|
|
break;case"expA":t=14;W.H5(h,14);G.Y_(W.data,h,1);G.j0(W.data,h+2,S[I].Exps?S[I].Exps.v:0);G.j0(W.data,h+6,S[I].Ofst?S[I].Ofst.v:0);
|
|
G.j0(W.data,h+10,S[I].gammaCorrection?S[I].gammaCorrection.v:1);break;case"vibA":G.YO(W,h,16);t=iF.WK(W,S[I],h+4)+4;
|
|
break;case"hue2":t=bU.op(W,h,S[I]);break;case"blnc":t=19;W.H5(h,t);var D=["ShdL","MdtL","HghL"];for(var Q=0;
|
|
Q<3;Q++){var R=S[I][D[Q]].v;for(var O=0;O<3;O++)R.push(G.fS(W.data,h+Q*6+O*2,R[O].v))}W.data[h+18]=S[I].PrsL.v?1:0;
|
|
break;case"blwh":var M={classID:"null",bwPresetKind:{t:"long",v:1},blackAndWhitePresetFileName:{t:"TEXT",v:""}},b="Bl Cyn Grn Mgnt Rd Yllw tintColor useTint".split(" ");
|
|
for(var Q=0;Q<b.length;Q++){M[b[Q]]=S[I][b[Q]]}G.YO(W,h,16);t=iF.WK(W,M,h+4)+4;break;case"phfl":G.Jv(W,h,2);
|
|
var w=S[I].Clr.v;G.Jv(W,h+2,7);G.Jv(W,h+4,Math.round(w.Lmnc.v*100));G.Jv(W,h+6,Math.round(w.A.v*100));
|
|
G.Jv(W,h+8,Math.round(w.B.v*100));G.Jv(W,h+10,0);var A=h+2+10;W.H5(A,5);G.Cp(W.data,A,S[I].Dnst.v);A+=4;
|
|
W.data[A]=S[I].PrsL.v?1:0;A++;t=A-h;break;case"mixr":t=44;W.H5(h,t);var g=bS.bj(S[I]);G.Y_(W.data,h,1);
|
|
G.Y_(W.data,h+2,g.zM?1:0);for(var Q=0;Q<20;Q++)G.fS(W.data,h+4+Q*2,g.k[Q]);break;case"clrL":case"rplc":G.Jv(W,h,1);
|
|
G.YO(W,h+2,16);t=iF.WK(W,S[I],h+6)+6;break;case"nvrt":t=0;break;case"post":G.Jv(W,h,S[I].Lvls.v);t=2;
|
|
break;case"thrs":G.Jv(W,h,S[I].Lvl.v);t=2;break;case"grdm":var E=S[I].Rvrs?S[I].Rvrs.v:!1,j=!1,x=867527939,d=!1,L=!1,_=2048,T=[0,0,0,0],c=[32768,32768,32768,32768],e=S[I].Grad.v,r,B,F=e.Clrs==null?1:0;
|
|
if(F==0){r=e;B=JSON.parse(hz.Ma.aek).v}else{r=hw.QE("grdm").Grad.v;B=e}W.H5(h,4);G.Y_(W.data,h,1);W.data[h+2]=E?1:0;
|
|
W.data[h+3]=j?1:0;var v=h+4;G.HG(W,v,e.Nm.v);v+=4+e.Nm.v.length*2;v=gZ.afF(W,v,r);G.Jv(W,v,F);v+=2;G.YO(W,v,B.RndS.v);
|
|
v+=4;G.Jv(W,v,B.ShTr.v?1:0);v+=2;G.Jv(W,v,B.VctC.v?1:0);v+=2;G.YO(W,v,B.Smth.v);v+=4;G.Jv(W,v,3);v+=2;
|
|
for(var Q=0;Q<4;Q++)G.Jv(W,v+Q*2,T[Q]);v+=8;for(var Q=0;Q<4;Q++)G.Jv(W,v+Q*2,c[Q]);v+=8;v+=2;t=v-h;break;
|
|
case"selc":t=ag.op(W,h,S[I]);break;case"FMsk":G.Rs(W,h,S[I]);t=S[I].length;break;case"Txt2":var X=new a4,V=jh.I0(S[I].Bk,X),H=N.U(V,!0);
|
|
for(var Q=0;Q<V;Q++)H[Q]=X.data[Q];G.Rs(W,h,H);t=H.length;break;case"vmsk":var o=S[I],J=0;G.YO(W,h,3);
|
|
if(!o.ln)J+=1<<1;if(!o.isEnabled)J+=1<<2;G.YO(W,h+4,J);t=8;var C=o.T.length;W.H5(h+8,C*26);hv.A8(W.data,h+8,o.T,p.e,p.Z);
|
|
t+=C*26;break;case"shmd":G.YO(W,h,Object.keys(S[I]).length);var A=h+4;for(var Y in S[I]){G.ZS(W,A,"8BIM");
|
|
A+=4;G.ZS(W,A,Y);A+=4;G.YO(W,A,0);A+=4;G.YO(W,A,0);A+=4;G.YO(W,A,16);A+=4;var K=iF.WK(W,S[I][Y],A);if(K%4!=0)K+=4-K%4;
|
|
G.YO(W,A-8,K+4);A+=K}t=A-h;break;case"TySh":var A=h;G.mO(W,A,1);A+=2;var u=S[I],X=new a4;u.MW.DocumentResources=JSON.parse(JSON.stringify(u.MW.ResourceDict));
|
|
var V=jR.I0(u.MW,X),H=N.U(V,!0);for(var Q=0;Q<V;Q++)H[Q]=X.data[Q];u.nJ.EngineData={t:"tdta",v:H};var f=u.MW.EngineDict.Editor.Text;
|
|
u.nJ.Txt.v=f.substring(0,f.length-1);G.ala(W,A,u.A);A+=48;G.mO(W,A,50);A+=2;G.YO(W,A,16);A+=4;A+=iF.WK(W,u.nJ,A);
|
|
G.mO(W,A,1);A+=2;G.YO(W,A,16);A+=4;A+=iF.WK(W,u.ud,A);G.a8T(W,A,u.Ik);A+=16;t=A-h;break;case"lmfx":G.YO(W,h,0);
|
|
G.YO(W,h+4,16);var M=JSON.parse(JSON.stringify(S[I])),l=!1;j6.a8(M);for(var Q=0;Q<hz.BN.length;Q++)if(M[hz.BN[Q]]!=null)l=!0;
|
|
G.ZS(W,P,l?"lmfx":"lfx2");t=iF.WK(W,M,h+8)+8;break;case"Patt":var A=dR.$p(W,h,S[I]);t=A-h;break;case"SoLd":G.ZS(W,h,"soLD");
|
|
G.YO(W,h+4,4);G.YO(W,h+8,16);t=iF.WK(W,S[I],h+12)+12;break;case"vstk":case"pths":G.YO(W,h,16);t=iF.WK(W,S[I],h+4)+4;
|
|
break;case"vscg__":G.ZS(W,h,S[I].key);G.YO(W,h+4,16);t=iF.WK(W,S[I].k,h+8)+8;break;case"vogk":G.YO(W,h,1);
|
|
G.YO(W,h+4,16);N.uy.a0q(S[I]);for(var Q=0;Q<S[I].length;Q++){var jk=S[I][Q].v.keyOriginResolution;if(jk)jk.v=p.H$}var hE={classID:"null",keyDescriptorList:{t:"VlLs",v:S[I]}};
|
|
t=iF.WK(W,hE,h+8)+8;break;case"lnkD":case"lnk2":case"lnk3":var v=h;for(var Q=0;Q<S[I].length;Q++){var Z=S[I][Q],aQ=v;
|
|
G.R7(W,v,0);v+=8;G.ZS(W,v,Z.type);v+=4;G.YO(W,v,Z.l_);v+=4;W.H5(v,1);W.data[v]=Z.SI.length;v++;G.ZS(W,v,Z.SI);
|
|
v+=Z.SI.length;G.HG(W,v,Z.Is+"\0");v+=4+Z.Is.length*2+2;G.ZS(W,v,Z.eY);v+=4;G.ZS(W,v,Z.XS);v+=4;G.R7(W,v,Z.raw.length);
|
|
v+=8;W.H5(v,1);W.data[v]=Z.open;v++;G.Rs(W,v,Z.raw);v+=Z.raw.length;G.YO(W,v,1);v+=4;v+=11;var jC=v-aQ-8;
|
|
G.R7(W,aQ,jC);if(jC%4!=0){W.H5(v,4-jC%4);v+=4-jC%4}}t=v-h;break;case"FEid":var v=h;G.YO(W,v,3);v+=4;
|
|
for(var eO=0;eO<S[I].length;eO++){var iU=S[I][eO];v+=4;var gK=v;v+=4;G.xG(W,v,iU.id);v+=iU.id.length+1;
|
|
G.YO(W,v,1);v+=4;var iM=N.U(iU.rect.n()),i5=iU.rect,fN=N.U(i5.n());v+=4;var dx=v;v+=4;G.gv(W,v,i5);v+=16;
|
|
G.YO(W,v,8);v+=4;G.YO(W,v,24);v+=4;for(var Q=0;Q<24+2;Q++){var ai=-1;if(Q==0)ai=0;if(Q==1)ai=1;if(Q==2)ai=2;
|
|
if(Q==25)ai=3;G.YO(W,v,ai!=-1?1:0);v+=4;if(ai!=-1){N.sN(iU.buffer,iM,ai);N.vG(iM,iU.rect,fN,i5);v+=4;
|
|
var hO=v;v+=4;W.H5(v,i5.n()+2);v=jp.rP(!0,fN,W.data,i5.e,i5.Z,v,3);G.YO(W,hO,v-(hO+4))}}G.YO(W,dx,v-(dx+4));
|
|
W.H5(v,1);W.data[v]=iU.v?1:0;v++;if(iU.v!=null){var ff=i5,eP=N.U(ff.n());eP.fill(iU.v.color);N.vG(iU.v.channel,iU.v.rect,eP,ff);
|
|
G.gv(W,v,ff);v+=16;v+=4;var a0=v;v+=4;W.H5(v,ff.n()+2);v=jp.rP(!0,eP,W.data,ff.e,ff.Z,v,3);G.YO(W,a0,v-(a0+4))}var jC=v-(gK+4);
|
|
G.YO(W,gK,jC);if(jC%4!=0)v+=4-jC%4}t=v-h;break;default:console.log("unknown layer tag: "+I+", size: "+t);
|
|
h-=12;continue}var bM=["Txt2","artd","extd","pths"];if(bM.indexOf(I)==-1)if(t%4!=0)t+=4-t%4;if(q)G.R7(W,h-8,t);
|
|
else G.YO(W,h-4,t);if(I!="luni"&&I!="TySh")if(t%4!=0)t+=4-t%4;h+=t}return h};j6.ph=function(W){for(var Q=0;
|
|
Q<hz.order.length;Q++){var h=hz.order[Q],S=hz.BN[Q];if(W[S]==null)W[S]={t:"VlLs",v:[]};if(W[h]!=null){W[S].v.push(W[h]);
|
|
delete W[h]}var k=[];for(var p=0;p<W[S].v.length;p++){var I=W[S].v[p];if(I.v.present==null||I.v.present.v==!0)k.push(I)}W[S].v=k}};
|
|
j6.a8=function(W){for(var Q=0;Q<hz.order.length;Q++){var h=hz.order[Q],S=hz.BN[Q],k=W[S].v.length;if(k==0){delete W[S];
|
|
continue}if(k==1){W[h]=W[S].v[0];delete W[S];continue}}};j6.tP=function(W,h){if(h=="GdFl"){if(W.Angl==null)W.Angl={v:{type:"#Ang",val:0},t:"UntF"};
|
|
if(W.Algn==null)W.Algn={v:!0,t:"bool"};if(W.Scl==null)W.Scl={v:{type:"#Prc",val:100},t:"UntF"};if(W.Ofst==null)W.Ofst={v:{classID:"Pnt",Hrzn:{v:{type:"#Prc",val:0},t:"UntF"},Vrtc:{v:{type:"#Prc",val:0},t:"UntF"}},t:"Objc"};
|
|
if(W.Rvrs==null)W.Rvrs={v:!1,t:"bool"};if(W.Dthr==null)W.Dthr={v:!1,t:"bool"}}if(h=="PtFl"){if(W.Algn==null)W.Algn={v:!0,t:"bool"};
|
|
if(W.Angl==null)W.Angl={v:{type:"#Ang",val:0},t:"UntF"};if(W.Scl==null)W.Scl={v:{type:"#Prc",val:100},t:"UntF"};
|
|
if(W.phase==null)W.phase={v:{classID:"Pnt",Hrzn:{v:0,t:"doub"},Vrtc:{v:0,t:"doub"}},t:"Objc"}}};j6.clone=function(W,h){var S={};
|
|
if(W=="TySh"){S.A=h.A.clone();S.nJ=JSON.parse(JSON.stringify(h.nJ));S.ud=JSON.parse(JSON.stringify(h.ud));
|
|
S.Ik=h.Ik.clone();S.MW=JSON.parse(JSON.stringify(h.MW));if(h.add)S.add={vmsk:h.add.vmsk.clone(),vogk:JSON.parse(JSON.stringify(h.add.vogk))};
|
|
return S}else if(W=="fxrp")return h.clone();else if(W=="vmsk")return h.clone();else return JSON.parse(JSON.stringify(h))};
|
|
function bN(W,h){}bN.D9=function(W,h,S,k){k=bN.a2f(W,h,S,k);return k};bN.I0=function(W,h,S,k,p){k=bN.a9z(W,h,S,k,p);
|
|
return k};bN.a2f=function(W,h,S,k){var p=k;W.rect=G.El(S,k);k+=16;var I=G.QA(S,k);k+=2;W.Z0=[];var q=h.bl;
|
|
for(var Q=0;Q<I;Q++){W.Z0[Q]={id:G.P5(S,k),length:(q?G.QG:G.d)(S,k+2)};k+=q?10:6}var P=G.dP(S,k,4);k+=4;
|
|
if(P!="8BIM"){console.log("Invalid Blend mode signature: "+P);alert("Error in Photoshop file: wrong signature.");
|
|
throw"e"}W.oO=G.dP(S,k,4);k+=4;W.opacity=S[k];k+=1;W.Vy=S[k]==1;k+=1;W.S5=S[k];k+=1;if(S[k]!=0)console.log("error in filler!");
|
|
k+=1;var t=G.d(S,k);k+=4;var M=k;k=bN.agf(W,S,k);k=bN.a4C(W,S,k);var U=G.DP(S,k);W.name=U.OK;k+=U.length;
|
|
if(U.length%4!=0)k+=4-U.length%4;k=j6.zB(S,k,M+t,W.add,q,h);if(W.add.lsct){if(W.add.lsct.oO)W.oO=W.add.lsct.oO;
|
|
W.add.lsct=W.add.lsct.type}return k};bN.a9z=function(W,h,S,k,p){var I=k;G.gv(S,k,W.rect);k+=16;var q=W.fA();
|
|
G.Jv(S,k,q.length);k+=2;var P=h.bl;p.push(k);for(var Q=0;Q<q.length;Q++){G.mO(S,k,q[Q]);if(P)G.R7(S,k+2,0);
|
|
else G.YO(S,k+2,0);k+=P?10:6}G.ZS(S,k,"8BIM");k+=4;G.ZS(S,k,W.oO);k+=4;G.Uk(S,k,W.opacity,1);k+=1;G.Uk(S,k,W.Vy?1:0,1);
|
|
k+=1;G.Uk(S,k,W.S5,1);k+=1;G.Uk(S,k,0,1);k+=1;var t=k;G.YO(S,k,0);k+=4;var M=k;k=bN.ar6(W,S,k);k=bN.amr(W,S,k);
|
|
var U=G.xG(S,k,W.name.slice(0,255));k+=U;if(U%4!=0)k+=4-U%4;if(W.add.lsct){W.add.lsct={type:W.add.lsct};
|
|
if(W.oO=="pass"){W.add.lsct.oO="pass";W.oO="norm"}}if(W.oO=="pass")W.add.lsct={type:W.add.lsct,oO:"pass"};
|
|
if(W.add.brit)W.add.CgEd=W.add.brit;k=j6.ed(S,k,W.add,P,h);delete W.add.CgEd;if(W.add.lsct){if(W.add.lsct.oO)W.oO=W.add.lsct.oO;
|
|
W.add.lsct=W.add.lsct.type}var i=k-M;G.YO(S,t,i);return k};bN.agf=function(W,h,S){var k=G.d(h,S);S+=4;
|
|
if(k==0)return S;var p=S;W.v=new $.Kt;W.v.rect=G.El(h,S);S+=16;W.v.color=h[S];S+=1;var I=bN.ZW(W.v,h,S);
|
|
S+=1;if(I){var q=!1,P=255,t=0,M=255,U=0;for(var Q=0;Q<W.Z0.length;Q++)if(W.Z0[Q].id==-3)q=!0;if(q){W.Yf=bN.vE(h,S);
|
|
S+=18}var i=S,z=h[S];S++;if(z>>0&1){P=h[S];S++}if(z>>1&1){t=G.aM(h,S);S+=8}if(z>>2&1){M=h[S];S++}if(z>>3&1){U=G.aM(h,S);
|
|
S+=8}if((S-i&1)==1)S++;W.aj=[P,t,M,U]}else{if(k==20)S+=2;else{W.Yf=bN.vE(h,S);S+=18}}return p+k};bN.ar6=function(W,h,S){G.YO(h,S,0);
|
|
S+=4;if(W.v==null)return S;var k=W.kX(),p=W.add.vmsk,I=S,q=!0;G.YO(h,S,0);G.gv(h,S,W.v.rect);S+=16;G.Uk(h,S,W.v.color);
|
|
S+=1;bN.oo(W.v,h,S,q);S+=1;if(q){if(W.Yf){bN.abQ(h,S,W.Yf);S+=18}G.Uk(h,S,15);S+=1;G.Uk(h,S,k?k.T4:255);
|
|
S+=1;G.h8(h,S,k?k.JJ:0);S+=8;G.Uk(h,S,p?p.T4:255);S+=1;G.h8(h,S,p?p.JJ:0);S+=8;S++}G.YO(h,I-4,S-I);return S};
|
|
bN.vE=function(W,h){var S=new $.Kt;bN.ZW(S,W,h);h+=1;S.color=W[h];h+=1;S.rect=G.El(W,h);h+=16;return S};
|
|
bN.abQ=function(W,h,S){bN.oo(S,W,h,!1);h+=1;G.Uk(W,h,S.color);h+=1;G.gv(W,h,S.rect);h+=16};bN.ZW=function(W,h,S){var k=h[S];
|
|
W.ln=(k>>0&1)==0;W.isEnabled=(k>>1&1)==0;W.Rq=(k>>3&1)==1;return k>>4&1};bN.oo=function(W,h,S,k){var p=0;
|
|
if(!W.ln)p+=1<<0;if(!W.isEnabled)p+=1<<1;if(W.Rq)p+=1<<3;if(k)p+=1<<4;G.Uk(h,S,p)};bN.a4C=function(W,h,S){var k=G.d(h,S);
|
|
S+=4;for(var Q=0;Q<k;Q++)W.z3[Q]=h[S+Q];return S+k};bN.amr=function(W,h,S){G.YO(h,S,W.z3.length);S+=4;
|
|
h.H5(S,40);for(var Q=0;Q<40;Q++){h.data[S+Q]=W.z3[Q]}return S+40};function jp(){}jp.D9=function(W,h,S,k){k=jp.auk(h.bl,h.uU,h.af,W,S,k);
|
|
return k};jp.m0=function(W,h,S,k,p,I){k=jp.alR(W,h,S,k,p,I);return k};jp.auk=function(W,h,S,k,p,I){var q=k.Z0,P={},t=I;
|
|
for(var Q=0;Q<q.length;Q++){var M=q[Q],U=M.id,i=M.length,z;if(U==-3)z=k.Yf.rect;else if(U==-2)z=k.v.rect;
|
|
else z=k.rect;var D=jp.uN(W,h,p,z.e,z.Z,I,i);I+=i;if(U==-3)k.Yf.channel=D;else if(U==-2)k.v.channel=D;
|
|
else P["c"+U]=D}var R=new N.qr(0);R.S4=null;if(S==3){R.p=P.c0;R.z=P.c1;R.S=P.c2;R.S4=P["c-1"]}else if(S==1){R.p=P.c0;
|
|
R.z=P.c0;R.S=P.c0;R.S4=P["c-1"]}else if(S==4){var O=P.c0,b=P.c1,w=P.c2,A=P.c3,g=O.length,E=1/255;for(var Q=0;
|
|
Q<g;Q++){var j=O[Q],x=b[Q],d=w[Q],L=A[Q]*E;O[Q]=Math.round(j*L);b[Q]=Math.round((.2*j+.8*x)*L);w[Q]=Math.round((.2*x+.8*d)*L)}R.p=O;
|
|
R.z=b;R.S=w;R.S4=P["c-1"];console.log("converting from CMYK to RGB")}if(R.p==null)R.p=N.U(0);if(R.S4==null&&R.p!=null){R.S4=R.p.slice(0);
|
|
R.S4.fill(255)}if(R.z==null)R.z=R.p.slice(0);if(R.S==null)R.S=R.p.slice(0);k.buffer=N.U(Math.max(0,k.rect.n()*4));
|
|
N.ST(R,k.buffer);return I};jp.alR=function(W,h,S,k,p,I){var q=h.fA(),P=new N.qr(h.rect.n());N.hc(h.buffer,P);
|
|
for(var Q=0;Q<q.length;Q++){var t=q[Q],M,U;if(t==-3)M=h.Yf.rect;else if(t==-2)M=h.v.rect;else M=h.rect;
|
|
if(t==-3)U=h.Yf.channel;if(t==-2)U=h.v.channel;if(t==-1)U=P.S4;if(t==0)U=P.p;if(t==1)U=P.z;if(t==2)U=P.S;
|
|
S.H5(k,M.n()*3+4);var i=k;k=jp.rP(W,U,S.data,M.e,M.Z,k,I[1]?3:1);var z=k-i;if(W)G.Dz(S.data,p+Q*10+2,z);
|
|
else G.Cp(S.data,p+Q*6+2,z)}return k};jp.uN=function(W,h,S,k,p,I,q){var P=G.QA(S,I);I+=2;return jp.Cd(W,h,S,k,p,I,P,q-2)};
|
|
jp.rP=function(W,h,S,k,p,I,q){G.fS(S,I,q);I+=2;I=jp.HJ(W,h,S,k,p,I,q);return I};jp.Cd=function(W,h,S,k,p,I,q,P){var t,M=k*p*(h>>>3),U=M&3,i=M+(U==0?0:4-U);
|
|
if(P<=0){return N.U(i)}if(q>3){console.log("unknown compression: "+q,k,p,k*p,P);q=0}if(q==0){if(I+i<=S.length)t=S.slice(I,I+i);
|
|
else{t=N.U(M);for(var Q=0;Q<M;Q++)t[Q]=S[I+Q]}I+=M}else if(q==1){t=N.U(M);var z=W?4:2,D=jp.$e(S,t,k,p,I,I+z*p,z);
|
|
I+=z*p+D}else if(q==2||q==3){var R=new Uint8Array(S.buffer,I+2,P-6),O=pako.inflateRaw(R);if(q==3){if(h==8)for(var b=0;
|
|
b<p;b++){var w=b*k+1,A=w+k-1,g=O[w-1];for(var E=w;E<A;E++){g+=O[E];O[E]=g&255}}else for(var b=0;b<p;
|
|
b++){var w=b*k+1,A=w+k-1,g=O[2*w-2]<<8|O[2*w-1];for(var E=w;E<A;E++){var j=E<<1;g+=O[j]<<8|O[j+1];O[j]=g>>>8;
|
|
O[j+1]=g&255}}}if(O.length==i)t=O;else{t=N.U(i);for(var Q=0;Q<O.length;Q++)t[Q]=O[Q]}}if(h==16){var x=N.U(k*p);
|
|
for(var Q=0;Q<M;Q+=2)x[Q>>>1]=t[Q];t=x}return t};jp.HJ=function(W,h,S,k,p,I,q){var P=k*p;if(q==0)for(var Q=0;
|
|
Q<P;Q++)S[I++]=h[Q];else if(q==1){var t=W?4:2,M=jp.qU(h,S,k,p,I,I+t*p,t);I+=t*p+M}else if(q==2||q==3){if(q==3){var U=new Uint8Array(h.length);
|
|
for(var i=0;i<p;i++){var z=i*k+1,D=z+k-1,R=h[z-1];U[z-1]=R;for(var O=z;O<D;O++){U[O]=h[O]+(256-R)&255;
|
|
R=h[O]}}h=U}S[I]=120;S[I+1]=156;I+=2;var b=pako.deflateRaw(h,{acu:4});G.nW(S,I,b);I+=b.length+4}else console.log("Unknown compression: "+q);
|
|
return I};jp.$e=function(W,h,S,k,p,I,q){if(!(W instanceof Uint8Array)||!(h instanceof Uint8Array))throw"e";
|
|
var P=I,t=k|0;if(q==2)for(var Q=0;Q<t;Q++){var M=G.QA(W,p+(Q<<1));jp.mB(W,I,M,h,Q*S,S);I+=M}else for(var Q=0;
|
|
Q<t;Q++){var M=G.d(W,p+(Q<<2));jp.mB(W,I,M,h,Q*S,S);I+=M}return I-P};jp.qU=function(W,h,S,k,p,I,q){var P=I;
|
|
if(q==2)for(var Q=0;Q<k;Q++){var t=jp.dd(W,Q*S,S,h,I);G.Y_(h,p+Q*2,t);I+=t}else for(var Q=0;Q<k;Q++){var t=jp.dd(W,Q*S,S,h,I);
|
|
G.Cp(h,p+Q*4,t);I+=t}return I-P};jp.dd=function(W,h,g8,S,k){var p,I,q,P,t,iG,M;P=h+g8;for(q=h,I=k;g8>0;
|
|
q=p,g8-=iG){M=g8<128?g8:128;if(q<=P-3&&W[q+1]==W[q+0]&&W[q+2]==W[q+0]){for(p=q+3;p<q+M&&W[p]==W[q+0];
|
|
)++p;iG=p-q;S[I++]=1+256-iG;S[I++]=W[q+0]}else{for(p=q;p<q+M;)if(p<=P-3&&W[p+1]==W[p+0]&&W[p+2]==W[p+0])break;
|
|
else++p;iG=p-q;S[I++]=iG-1;for(var Q=0;Q<iG;Q++)S[I+Q]=W[q+Q];I+=iG}}return I-k};jp.mB=function(W,h,S,k,p,I){for(var q=0;
|
|
q<S;){var g8=W[h++];if(g8>=128){var P=W[h++],t=p+(257-g8);k.fill(P,p,t);p=t;q+=2}else{for(var Q=0;Q<=g8;
|
|
Q++)k[p+Q]=W[h+Q];h+=g8+1;p+=g8+1;q+=1+1+g8}}};function ed(){}ed.iz=function(W,h,S){return;var k="",p=h;
|
|
while(p!=0){var I=p%1e3+"";while(I.length<3)I="0"+I;k=(k==""?I:I+" ")+k;p=Math.floor(p/1e3)}while(k.startsWith("0")&&k!="0")k=k.slice(1);
|
|
while(k.length<11)k=" "+k;console.log("===",k,"\t".repeat(W),": "+S)};ed.D9=function(W,h){h.bl=!1;h.uU=8;
|
|
var S=new Uint8Array(W),k=0,p=0,K,eO=!1,iU=!0,gK=!1,iM=0,dm=0;p=ed.WG(h,S,k);ed.iz(0,p-k,"PSD Header");
|
|
k=p;p=ed.ai_(h,S,k);ed.iz(0,p-k,"Color Mode Data");k=p;p=ed.a8r(h,S,k);ed.iz(0,p-k,"Image Resources");
|
|
k=p;p=ed.agb(h,S,k);ed.iz(0,p-k,"Layer And Mask Info");k=p;p=ed.aaU(h,S,k);ed.iz(0,p-k,"Merged Image");
|
|
k=p;if(h.g.length==0){var I=h.yA();I.hq("Background");h.g.push(I);I.buffer=h.buffer.slice(0);I.rect=new gj(0,0,h.e,h.Z)}if(h.A5.r1005){h.H$=G.a8h(h.A5.r1005,0)}if(h.A5.r1026){var S=h.A5.r1026;
|
|
for(var Q=0;Q<S.length;Q+=2){var p=h.g[Q>>>1];if(p)p.RL=G.QA(S,Q)}}if(h.A5.r1072){var S=h.A5.r1072;for(var Q=0;
|
|
Q<S.length;Q++){var p=h.g[Q];if(p)p.i2=S[Q]==1}}if(h.A5.r1032){var S=h.A5.r1032,q=G.d(S,12);for(var Q=0;
|
|
Q<q;Q++){var P=S[16+Q*5+4],t=G.GZ(S,16+Q*5)/32;h.r4.push([P,t])}}delete h.A5.r1036;delete h.A5.r1039;
|
|
if(h.A5.r1050){var M=G.d,U=h.A5.r1050,i=G.d(U,0);if(i==6){var z=4,D=G.El(U,z);z+=16;var R=G.Xl(U,z);
|
|
z+=4+R.length*2;var O=M(U,z);z+=4;var b=h.BW;for(var Q=0;Q<O;Q++){var w=a.b1.ED(),g;b.push(w);w=w.v;
|
|
w.sliceID.v=M(U,z);z+=4;w.groupID.v=M(U,z);z+=4;var A=M(U,z);z+=4;if(A==1){g=M(U,z);z+=4}var R=G.Xl(U,z);
|
|
z+=4+R.length*2;var E=M(U,z);z+=4;var j=[M(U,z),M(U,z+4),M(U,z+8),M(U,z+12)];z+=16;a.b1.pl(b,b.length-1,j);
|
|
var x=w.url.v=G.Xl(U,z);z+=4+x.length*2;var d=w.null.v=G.Xl(U,z);z+=4+d.length*2;var L=w.Msge.v=G.Xl(U,z);
|
|
z+=4+L.length*2;var _=w.altTag.v=G.Xl(U,z);z+=4+_.length*2;w.cellTextIsHTML.v=U[z]==1;z++;var T=w.cellText.v=G.Xl(U,z);
|
|
z+=4+T.length*2;var c=M(U,z);z+=4;var e=M(U,z);z+=4;var r=U.slice(z,z+4);z+=4;if(A!=2)b.pop()}}else if(i==8){var B={};
|
|
iF.Ej(U,B,8,!1);var U=h.BW=B.slices.v;for(var Q=0;Q<U.length;Q++){if(U[Q].v.origin.v.ESliceOrigin!="userGenerated"){U.splice(Q,1);
|
|
Q--}}}}if(h.A5.r1058){var F=h.A5.r1058,v=UTIF.decode(F.buffer,{parseMN:!1,debug:!1});b_.mW(v[0],h.KC);
|
|
delete h.A5.r1058}if(h.A5.r1060){var X=G.Md(h.A5.r1060);b_.a57(X,h.KC);delete h.A5.r1060}if(h.A5.r1065){var S=h.A5.r1065;
|
|
h.S1={};iF.Ej(S,h.S1,4,!1)}if(h.A5.r1069){var S=h.A5.r1069,V=[];for(var Q=2;Q<S.length;Q+=4){var g=G.d(S,Q);
|
|
for(var H=0;H<h.g.length;H++){var p=h.g[H];if(p.add.lyid==g&&p.add.lsct!=3)V.push(H)}}h.w=V}if(h.A5.r1025){var o=h.A5.r1025;
|
|
delete h.A5.r1025;var J=hv.HW(o,0,o.length,h.e,h.Z),C=new $.CP;C.T=J;h.mw[0]=jg.Bo("Working Path",{vmsk:C})}var Y=h.add.pths;
|
|
delete h.add.pths;var u=h.A5.r3000;if(u){K={};iF.Ej(u,K,4,!1);delete h.A5.r3000}for(var f=0;f<=997;f++){var l="r"+(2e3+f),o=h.A5[l];
|
|
if(o==null)break;var J=hv.HW(o,0,o.length,h.e,h.Z),jk=Y?Y.pathList.v[f].v.pathUnicodeName.v:"Path "+f,hE=K?K.keyRootDescriptorList.v[f].v.keyDescriptorList.v:$.lq(J),C=new $.CP;
|
|
C.T=J;h.mw[f+1]=jg.Bo(jk,{vmsk:C,vogk:hE});delete h.A5[l]}delete h.bl;var Z=new gj(0,0,h.e,h.Z),aQ=h.add.Txt2,jC=aQ;
|
|
if(jC){jC=jC.Bk;if(jC._DocumentResources==null)jC=gn.a7C(jC)}for(var Q=0;Q<h.g.length;Q++){var p=h.g[Q],i5=p.add.lsct,fN=p.add.vmsk,dx=p.kX();
|
|
if(i5==i1.aW){iM++;p.add.lspf=0}else if(i5==i1.wY||i5==i1.O_)iM--;if(p.name==""){p.name="Layer "+(Q+1);
|
|
gK=!0}if(gK&&p.vc()&&p.oO=="norm")p.oO="pass";if(p.rB()&&p.$U(h).v){var ai=p.$U(h);ai.v.isEnabled=p.add.SoLd.filterFX.v.filterMaskEnable.v}if(fN&&p.rG()){var hO=hz.EJ.default;
|
|
if(p.add.vstk==null)p.add.vstk=JSON.parse(JSON.stringify(hO));else{var ff="strokeStyleLineDashSet";if(p.add.vstk[ff]==null)p.add.vstk[ff]=JSON.parse(JSON.stringify(hO[ff]))}p.add.vstk.strokeStyleResolution.v=h.H$}if(fN&&(p.add.vogk==null||N.$.z2(fN.T)!=p.add.vogk.length))p.lq();
|
|
if(p.add.SoLd&&p.rect.ZP()){console.log("redrawing smart instance");p.KF(h)}if(dx==null&&p.v!=null){if(p.v.Rq==!1){p.v.Rq=!0;
|
|
p.Yf=p.v.clone()}}dx=p.kX();if(p.aj){var hO=p.aj,C=fN;if(dx){dx.T4=hO[0];dx.JJ=hO[1]}if(C){C.T4=hO[2];
|
|
C.JJ=hO[3]}p.aj=null}if(dx!=null&&fN!=null&&(dx.JJ+fN.JJ!=0||dx.T4+fN.T4!=2*255))p.r9(h);else if(fN!=null&&!p.rG())p.r9();
|
|
var eP=p.add.artb;if(eP&&eP.artboardBackgroundType==null)eP.artboardBackgroundType={t:"long",v:1};if(eP&&iM!=0)delete p.add.artb;
|
|
var a0=p.add.vstk;if(p.rG()&&(p.rect.ZP()||fN&&fN.JJ!=0||a0&&!a0.fillEnabled.v&&(!a0.strokeEnabled.v||a0.strokeStyleLineWidth.v.val==0)))p.jh(h);
|
|
if(p.add.TySh){eO=!0;if(!p.rect.ZP())iU=!1}if(p.add.TySh&&jC){var bM=p.add.TySh.nJ.TextIndex.v;if(bM==-1)continue;
|
|
var cV=p.add.TySh.MW,aX=gf.yK(cV),j8=jC._DocumentObjects._TextObjects;if(j8.length<=bM){console.log("Txt2 incomplete");
|
|
continue}var j3=j8[bM]._Model,am=j3._StyleRun?j3._StyleRun._RunArray:[],fG=cV.EngineDict.StyleRun.RunArray;
|
|
for(var bw=0;bw<fG.length;bw++){var fz=fG[bw].StyleSheet.StyleSheetData;if(am[bw]==null)continue;var c6=am[bw]._RunData._StyleSheet._Features;
|
|
if(c6&&c6._BaselineDirection)fz.BaselineDirection=parseInt(c6._BaselineDirection.slice(1));if(c6&&c6._FillBackgroundFlag)fz._FillBackgroundFlag=c6._FillBackgroundFlag;
|
|
if(c6&&c6._FillBackgroundColor){var hk=c6._FillBackgroundColor,as=hk._Color._Values.slice(0);for(var H=0;
|
|
H<4;H++)as[H]=parseFloat(as[H].slice(1));fz._FillBackgroundColor={Type:1,Values:as}}if(c6&&c6._LineWidth)fz._LineWidth=parseFloat(c6._LineWidth.slice(1))}var bf=cV.EngineDict.ParagraphRun.RunArray,gW=j3._ParagraphRun._RunArray;
|
|
if(gW==null)gW=[];var j1=Math.min(gW.length,bf.length);for(var H=0;H<j1;H++){var bZ=bf[H].ParagraphSheet.Properties,iL=jC._DocumentResources._ParagraphSheetSet._Resources,jI=gW[H]._RunData._ParagraphSheet;
|
|
if(typeof jI=="string")jI=iL[parseInt(jI.slice(1))]._Resource;var e2=jI._Parent==null?jI:iL[parseInt(jI._Parent.slice(1))]._Resource;
|
|
jI=jI._Features;e2=e2._Features;var dV=jI._ParagraphDirection;if(dV==null)dV=e2._ParagraphDirection;
|
|
if(dV)bZ._Direction=parseInt(dV.slice(1));if(jI._ComposerEngine)bZ._ComposerEngine=parseInt(jI._ComposerEngine.slice(1))}if(j3._AlternateGlyphRun){var gW=j3._AlternateGlyphRun._RunArray,j1=gW.length,ds=cV.EngineDict.AlternateGlyphRun=gf.a3P();
|
|
for(var H=0;H<j1;H++){var jI=gW[H],ij={},dg=jI._RunData._AlternateGlyphSheet;if(dg)ij.Glyph=parseInt(dg._Glyph.slice(1));
|
|
ds.RunArray.push(ij);ds.RunLengthArray.push(parseInt(jI._Length.slice(1)))}}var iT=jC._DocumentResources,ej=iT._TextFrameSet._Resources,eH=ej[bM]._Resource,d4=eH._Data,jy=new ex(1,0,0,1,0,0);
|
|
if(eH._0){var iR=parseFloat(eH._0[0].slice(1)),cD=parseFloat(eH._0[1].slice(1));jy.translate(iR,cD)}if(aX){jy.translate(aX[0],aX[1]);
|
|
gf.hz(cV,[0,0,aX[2]-aX[0],aX[3]-aX[1]])}else{if(eH._Bezier&&eH._Bezier._Points){var J=eH._Bezier._Points,iR=parseFloat(J[0].slice(1)),cD=parseFloat(J[1].slice(1));
|
|
if(iR!=0||cD!=0){jy.translate(iR,cD)}}}if(eH._Data&&eH._Data._FrameMatrix){var cA=eH._Data._FrameMatrix;
|
|
cA=cA.map(function(cf){return parseFloat(cf.slice(1))});jy.concat(new ex(cA[0],cA[1],cA[2],cA[3],cA[4],cA[5]))}jy.concat(p.add.TySh.A);
|
|
p.add.TySh.A=jy;var E=d4._Type?parseInt(d4._Type.slice(1)):0;if(E==2||E==1&&d4._PathData&&d4._PathData._Spacing=="i-3"){var d_=function(cf){return parseFloat(cf.slice(1))},J=eH._Bezier._Points.map(d_);
|
|
if(aX)N.H.A(J,new ex(1,0,0,1,-aX[0],-aX[1]),J);var d5=d4._PathData?d4._PathData._Reversed:!1;cV.Curve={Points:J,TextOnPathTRange:d4._TextOnPathTRange.map(d_),Reversed:d5==null?!1:d5};
|
|
p.add.TySh.add={vmsk:new $.CP,vogk:null};gf.gP(p.add.TySh)}if(d4._LineOrientation=="i2")cV._LineOrientation=2}}a.UI.d_(h,!0);
|
|
var jl={},hK=[];for(var Q=0;Q<h.g.length;Q++){var jj=h.g[Q].add.lyid;if(jj==null)continue;var dm=Math.max(dm,jj);
|
|
if(jl[jj]!=null)hK.push(Q);else jl[jj]=!0}for(var Q=0;Q<hK.length;Q++)h.g[hK[Q]].add.lyid=dm+1+Q};ed.I0=function(W,h,S){a.UI.O7(W);
|
|
a.UI.d_(W,!1);W.bl=S[3]==!0;var k=[],p=[],R=0,b=1,d=16,f=0;for(var Q=0;Q<W.g.length;Q++){var I=W.g[Q];
|
|
if(I.rB()&&I.$U(W).v){I.add.SoLd.filterFX.v.filterMaskEnable.v=I.$U(W).v.isEnabled}if(I.add.TySh){var q=I.add.TySh.MW,P=gf.SY(q);
|
|
I.add.TySh.nJ.TextIndex={t:"long",v:k.length};k.push(q);if(P==2)gf.iv(I.add.TySh)}var t=I.add.vstk;if(t)t.strokeStyleResolution.v=W.H$;
|
|
if(I.rG()||S[2]&&I.add.SoLd){p[Q]=[I.rect,I.buffer];I.rect=new gj;I.buffer=N.U(0);if(I.add.SoLd){var M=I.$U(W);
|
|
if(M!=null){p[Q].push(M.buffer);M.buffer=N.U(M.buffer.length)}}}}if(k.length>0){var U=W.add.Txt2?W.add.Txt2.Bk:null;
|
|
if(W.add.Txt2==null)W.add.Txt2={};W.add.Txt2.Bk=h8.ahn(k,null,U)}var i=[W.add.lnk2,W.add.FEid,W.add.Patt],z=W.a7N(W.g);
|
|
W.KK(z);W.A5.r1005=new Uint8Array([0,0,0,0,0,1,0,2,0,0,0,0,0,1,0,2]);G.Ya(W.A5.r1005,0,W.H$);G.Ya(W.A5.r1005,8,W.H$);
|
|
if(W.bx()){W.A5.r1022=new Uint8Array([0,3+W.BS.length-1,0])}else delete W.A5.r1022;var D=new Uint8Array(W.g.length*2),O=new Uint8Array(W.g.length);
|
|
for(var Q=0;Q<W.g.length;Q++){var I=W.g[Q],w=I.RL,A=I.i2?1:0;G.Y_(D,Q*2,w);O[Q]=A;if(w>R)R=w;if(A==0)b=0}if(R>0)W.A5.r1026=D;
|
|
if(b<1)W.A5.r1072=O;var g=W.r4,E=g.length,x=W.A5.r1032=N.U(16+5*E,!0);G.Cp(x,0,1);G.Cp(x,4,576);G.Cp(x,8,576);
|
|
G.Cp(x,12,E);for(var Q=0;Q<E;Q++){G.VJ(x,d,Math.round(g[Q][1]*32));x[d+4]=g[Q][0];d+=5}var L=N.V6(W.buffer),_=[];
|
|
if(L)_.push({name:"Transparency",tg:{p:255,z:0,S:0},uJ:100,ez:1});_=_.concat(W.BS);delete W.A5.r1045;
|
|
delete W.A5.r1006;delete W.A5.r1077;var T=new a4;d=0;var c=new Uint8Array(4+_.length*13);c[3]=1;for(var Q=0;
|
|
Q<_.length;Q++){var e=_[Q],r=e.name+"\0";G.HG(T,d,r);d+=4+r.length*2;var B=4+Q*13;fY.Rl(c,B,e.tg);c[B+11]=e.uJ;
|
|
c[B+12]=e.ez}W.A5.r1045=T.data.slice(0,d);W.A5.r1077=c;for(var Q=0;Q<W.BW.length;Q++)W.BW[W.BW.length-Q-1].v.sliceID.v=2+Q*3;
|
|
var F={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:W.BW}},T=new a4;
|
|
G.YO(T,0,8);G.YO(T,4,16);var v=iF.WK(T,F,8);W.A5.r1050=T.data.slice(0,v+8);var T=new a4;G.YO(T,0,16);
|
|
var v=iF.WK(T,W.S1,4);W.A5.r1065=T.data.slice(0,v+4);var X=W.w;x=W.A5.r1069=N.U(2+X.length*4,!0);G.Y_(x,0,X.length);
|
|
for(var Q=0;Q<X.length;Q++)G.Cp(x,2+4*Q,W.g[X[Q]].add.lyid);delete W.A5.r1058;delete W.A5.r1060;if(Object.keys(W.KC).length!=0){var V=[{t274:[1],t282:[[72,1]],t283:[[72,1]],t296:[2]},{t259:[6],t282:[[72,1]],t283:[[72,1]],t296:[2],t513:[302],t514:[0]}];
|
|
b_.kq(W.KC,V[0],S[0]&&S[1]);W.A5.r1058=new Uint8Array(UTIF.encode(V));var H=b_.atT(W.KC);W.A5.r1060=G.cw(H)}var o=[],J=[];
|
|
for(var Q=0;Q<W.mw.length;Q++){var C=W.mw[Q],Y=C.add.vmsk.T;if(Q==0&&Y.length==2)continue;var K=N.U(Y.length*26);
|
|
hv.A8(K,0,Y,W.e,W.Z);var u=Q==0?1025:2e3+Q-1;W.A5["r"+u]=K;if(Q!=0){o.push({t:"Objc",v:{classID:"pathInfoClass",pathUnicodeName:{t:"TEXT",v:C.name}}});
|
|
J.push({t:"Objc",v:{classID:"null",keyDescriptorList:{t:"VlLs",v:C.add.vogk}}})}}if(o.length!=0){W.add.pths={classID:"pathsDataClass",pathList:{t:"VlLs",v:o}};
|
|
J={classID:"null",keyRootDescriptorList:{t:"VlLs",v:J}};var T=new a4;G.YO(T,0,16);var v=iF.WK(T,J,4);
|
|
W.A5.r3000=T.data.slice(0,v+4)}else{delete W.add.pths;delete W.A5.r3000}f=ed.a4W(W,h,f,3+_.length);f=ed.a6l(W,h,f);
|
|
f=ed.ako(W,h,f);f=ed.a2X(W,h,f,S,L);f=ed.a4d(W,h,f,S[0],L);var l=[1025,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016];
|
|
for(var Q=0;Q<l.length;Q++)delete W.A5["r"+l[Q]];for(var Q=0;Q<W.g.length;Q++){var I=W.g[Q];if(I.rG()||S[2]&&I.add.SoLd){I.rect=p[Q][0];
|
|
I.buffer=p[Q][1];if(p[Q][2]){var M=I.$U(W);p[Q].push(M.buffer);M.buffer=p[Q][2]}}}W.KK(i);a.UI.d_(W,!0);
|
|
delete W.bl;return f};ed.WG=function(W,h,S){var k=G.dP(h,S,4);S+=4;if(k!="8BPS")alert("invalid header signature: "+k);
|
|
var p=G.QA(h,S);S+=2;W.bl=p==2;if(p!=1&&p!=2)alert("invalid version: "+p);S+=6;W.Kk=G.QA(h,S);S+=2;W.Z=G.GZ(h,S);
|
|
S+=4;W.e=G.GZ(h,S);S+=4;W.uU=G.QA(h,S);S+=2;W.af=G.QA(h,S);S+=2;return S};ed.a4W=function(W,h,S,k){h.H5(0,64);
|
|
G.vq(h.data,S,"8BPS");S+=4;G.Y_(h.data,S,W.bl?2:1);S+=2;G.Cp(h.data,S,0);S+=4;G.Y_(h.data,S,0);S+=2;
|
|
G.Y_(h.data,S,k);S+=2;G.VJ(h.data,S,W.Z);S+=4;G.VJ(h.data,S,W.e);S+=4;G.Y_(h.data,S,8);S+=2;G.Y_(h.data,S,3);
|
|
S+=2;return S};ed.ai_=function(W,h,S){var k=G.GZ(h,S);S+=4;if(k!=0)W.kT=h.slice(S,S+k);S+=k;return S};
|
|
ed.a6l=function(W,h,S){G.Vv(h,S,0);S+=4;return S};ed.a8r=function(W,h,S){var k=G.d(h,S),p=0;S+=4;var I=[];
|
|
while(p<k){var q=G.dP(h,S+p,4);p+=4;var P=G.QA(h,S+p);p+=2;var t=G.DP(h,S+p);p+=t.length;if(q!="8BIM"){I.push(P);
|
|
console.log("Unknown Image Resources signature: "+q+", ID: "+P)}var M=G.d(h,S+p);p+=4;if(W.A5["r"+P]!=null)console.log("--- two resources with same ID");
|
|
W.A5["r"+P]=G.SE(h,S+p,M);p+=M+(M&1)}for(var Q=0;Q<I.length;Q++)delete W.A5["r"+I[Q]];return S+k};ed.ako=function(W,h,S){var k=S,q=0;
|
|
S+=4;var p=[];for(var I in W.A5){p.push(parseInt(I.slice(1)))}p.sort(function(i,z){return i-z});for(var Q=0;
|
|
Q<p.length;Q++){G.ZS(h,S+q,"8BIM");q+=4;var P=p[Q];G.Jv(h,S+q,P);q+=2;var t=G.xG(h,S+q,"");q+=t;var M=W.A5["r"+P],U=M.length;
|
|
G.YO(h,S+q,U);q+=4;G.Rs(h,S+q,M);q+=U;if(U%2==1)q++}G.YO(h,k,q);return S+q};ed.agb=function(W,h,S){var k=S,p,I,q=W.bl?8:4;
|
|
if(W.bl)p=G.QG(h,S);else p=G.d(h,S);S+=q;if(p==0)return k+q;I=ed.atI(W,h,S);ed.iz(1,I-S,"Layer Info");
|
|
S=I;I=ed.a6S(W,h,S);ed.iz(1,I-S,"Global Layer Mask Info");S=I;I=j6.zB(h,S,k+q+p,W.add,W.bl,W);ed.iz(1,I-S,"Project Add Info");
|
|
S=I;return k+q+p};ed.a2X=function(W,h,S,k,p){var I=S;G.YO(h,S,0);S+=4;if(W.bl){G.YO(h,S,0);S+=4}S=ed.a82(W,h,S,k,p);
|
|
S=ed.aoO(W,h,S);S=j6.ed(h,S,W.add,W.bl,W);if(W.bl)G.R7(h,I,S-I-8);else G.YO(h,I,S-I-4);return S};ed.atI=function(W,h,S){var k,p=W.bl?8:4;
|
|
if(W.bl)k=G.QG(h,S);else k=G.d(h,S);S+=p;if(k!=0)ed.$A(W,h,S);return S+k};ed.$A=function(W,h,S){var k=G.P5(h,S);
|
|
S+=2;var p=Math.abs(k);for(var Q=0;Q<p;Q++){var I=new $;S=bN.D9(I,W,h,S);W.g[Q]=I}var q=new gj(0,0,W.e,W.Z);
|
|
for(var Q=0;Q<p;Q++){var P=W.g[Q],t=P.kX(),M=jp.D9(P,W,h,S);if(M-S>8)ed.iz(2,M-S,"Lay: "+P.getName());
|
|
S=M;ed.vk(P,q);if(t)ed.vk(t,q)}};ed.vk=function(W,h){var S=W.rect.n(),k=W.rect.r$(h),p=k.n()/S;if(S>2e3*3e3&&p<.5){if(W.buffer){var I=N.U(k.n()*4);
|
|
N.zt(W.buffer,W.rect,I,k);W.buffer=I;W.rect=k}else{var I=N.U(k.n());N.vG(W.channel,W.rect,I,k);W.channel=I;
|
|
W.rect=k}alert("Removing hidden parts of layers")}};ed.a82=function(W,h,S,k,p){var I=S,q=W.bl;S+=q?8:4;
|
|
S=ed.n9(W,h,S,k,p);var P=S-I-(q?8:4);if(P%2!=0)P++;if(q)G.R7(h,I,P);else G.YO(h,I,P);return I+P+(q?8:4)};
|
|
ed.n9=function(W,h,S,k,p){var I=W.g.length;G.mO(h,S,p?-I:I);S+=2;var q=[];for(var Q=0;Q<I;Q++)S=bN.I0(W.g[Q],W,h,S,q);
|
|
for(var Q=0;Q<I;Q++)S=jp.m0(W.bl,W.g[Q],h,S,q[Q],k);return S};ed.a6S=function(W,h,S){var k=G.d(h,S);
|
|
S+=4;S+=k;return S};ed.aoO=function(W,h,S){var k=G.YO(h,S,0);S+=4;return S};ed.aaU=function(W,h,S){var k=W.af,p="Bitmap Grayscale Indexed RGB CMYK Multichannel Duotone Lab".split(" "),I=[1,1,1,3,4,1,1,3],q,O;
|
|
if(k!=3){if(k==1||k==2||k==4)alert("Project will be converted from "+p[k]+" to "+p[3]+" mode.");else{alert("Color mode "+p[k]+" is not supported yet :(")}}if(W.A5.r1045){q=[];
|
|
var P=W.A5.r1045,t=0;while(t<P.length){var M=G.QS(P,t);q.push(M);t+=4+2+M.length*2}}var U=I[k]+(q==null||q[0]=="Transparency"?1:0),i=W.e,z=W.Z,D=i*z,R=G.QA(h,S);
|
|
S+=2;W.buffer=N.U(D*4);N.wM(W.buffer,4278190080);var b=S;for(var w=0;w<W.Kk;w++){if(R==0){O=jp.Cd(W.bl,W.uU,h,i,z,S,R);
|
|
S+=D*(W.uU>>>3)}else if(R==1){O=N.U(D);var A=W.bl?4:2;if(w==0)S+=W.Kk*z*A;S+=jp.$e(h,O,i,z,b+w*z*A,S,A)}else{console.log("unknown compression of image data: ",R);
|
|
return}if(w<U){N.ce(O,W.buffer,w);if(W.Kk==1&&w==0){N.ce(O,W.buffer,1);N.ce(O,W.buffer,2)}}else{var g=new $.Kt,E=w-U,j=w-I[W.af];
|
|
g.name=q?q[j]:"Alpha";if(g.name=="Quick Mask"){g.oz=!0;W.ye.push(E)}g.rect=new gj(0,0,i,z);g.channel=O;
|
|
g.color=0;g.Yn();W.BS[E]=g;if(W.A5.r1077){var P=W.A5.r1077.slice(4+j*13);g.tg=fY.Vo(P,0);g.uJ=P[11];
|
|
g.ez=P[12];if(g.ez==2)g.oz=!0}}}W.Kk=4;if(W.af==2)for(var Q=0;Q<D;Q++){var x=Q*4,d=W.buffer[x];W.buffer[x]=W.kT[0+d];
|
|
W.buffer[x+1]=W.kT[256+d];W.buffer[x+2]=W.kT[512+d]}return S};ed.a4d=function(W,h,S,k,p){var I=1,q=16,P=W.e,t=W.Z,U,i;
|
|
G.Jv(h,S,I);S+=2;var M=P*t;if(!k){i=new N.qr(P*t);N.hc(W.buffer,i);var z=i.p,D=i.z,R=i.S,O=i.S4;for(var Q=0;
|
|
Q<M;Q++){var b=O[Q]*(1/255);z[Q]=~~(z[Q]*b+255*(1-b));D[Q]=~~(D[Q]*b+255*(1-b));R[Q]=~~(R[Q]*b+255*(1-b))}}else U=N.U(M);
|
|
var w=[U,U,U];if(!k)w=[i.p,i.z,i.S];if(p)w.push(k?U:i.S4);for(var Q=0;Q<W.BS.length;Q++){w.push(W.BS[Q].gB(new gj(0,0,W.e,W.Z)))}var A=S;
|
|
for(var g=0;g<w.length;g++){h.H5(S,P*t+4);U=w[g];if(I==0||I==2||I==3)S=jp.HJ(W.bl,U,h.data,P,t,S,I);
|
|
else{var E=W.bl?4:2;if(g==0)S+=w.length*t*E;var j=S;S+=jp.qU(U,h.data,P,t,A+g*t*E,S,E)}}return S};function jR(){}jR.D9=function(W){var h={};
|
|
jR.XJ(W,h,0,0);return h};jR.I0=function(W,h){var S=0;S=jR.UG(W,h,S,0);return S};jR.XJ=function(W,h,S,k){while(W[S]!="<".charCodeAt(0))S++;
|
|
S+=2;while(!0){if(W[S]=="/".charCodeAt(0)){S++;var p=G.indexOf(W," ".charCodeAt(0),S,S+50),I=G.indexOf(W,"\n".charCodeAt(0),S,S+50);
|
|
if(I==-1)I=Infinity;if(p==-1)p=Infinity;var q=Math.min(I,p),P=G.dP(W,S,q-S),t=jR.la(W,q+1,k+1,P);h[P]=t.k;
|
|
S=q+1;S+=t.size}else if(W[S]==">".charCodeAt(0)){S+=2;break}else{var M=W[S];if(M==10||M==9||M==32)S++;
|
|
else{console.log("unknown byte: "+M+", char: "+String.fromCharCode(M),S);S++}}}return S};jR.UG=function(W,h,S,k){G.ZS(h,S,"<<\n");
|
|
S+=3;var p=jR.atl;for(var I in W){G.Uk(h,S,"\t".charCodeAt(0),k+1);S+=k+1;G.ZS(h,S,"/"+I);S+=1+I.length;
|
|
if(p(W[I])||W[I]instanceof Array){G.ZS(h,S," ");S++}else{G.ZS(h,S,"\n");S++;G.Uk(h,S,"\t".charCodeAt(0),k+1);
|
|
S+=k+1}S=jR.D2(W[I],h,S,k+1);G.ZS(h,S,"\n");S++}G.Uk(h,S,"\t".charCodeAt(0),k);S+=k;G.ZS(h,S,">>");S+=2;
|
|
return S};jR.la=function(W,h,S,k){var p=h,I={size:0,k:0};while(!0){while(W[h]==" ".charCodeAt(0)||W[h]=="\t".charCodeAt(0)||W[h]=="\n".charCodeAt(0))h++;
|
|
if(W[h]=="<".charCodeAt(0)){I.k={};h=jR.XJ(W,I.k,h,S+1);break}else if(W[h]=="(".charCodeAt(0)){h+=3;
|
|
var q=h;while(!0){if(W[q-1]!="\\".charCodeAt(0)&&W[q]==")".charCodeAt(0)&&(W[q+1]=="\n".charCodeAt(0)||W[q+1]==" ".charCodeAt(0)))break;
|
|
else q++}I.k=G.fo(W,h,q);h=q+2;break}else if(W[h]=="[".charCodeAt(0)){h++;I.k=[];while(W[h]==" ".charCodeAt(0)||W[h]=="\t".charCodeAt(0)||W[h]=="\n".charCodeAt(0))h++;
|
|
while(W[h]!="]".charCodeAt(0)){var P=jR.la(W,h,S+1,k);I.k.push(P.k);h+=P.size;while(W[h]==" ".charCodeAt(0)||W[h]=="\t".charCodeAt(0)||W[h]=="\n".charCodeAt(0))h++}h++;
|
|
break}else{var t=G.indexOf(W," ".charCodeAt(0),h,h+50),M=G.indexOf(W,"\n".charCodeAt(0),h,h+50);if(M==-1)M=Infinity;
|
|
if(t==-1)t=Infinity;var U=G.dP(W,h,Math.min(t,M)-h).trim(),i=parseFloat(U);if(!isNaN(i)){I.k=parseFloat(U);
|
|
h=Math.min(t,M)+1;break}else if(U=="true"||U=="false"){I.k=U=="true";h=Math.min(t,M)+1;break}else if(U=="null"||U=="NaN"||U=="undefined"){I.k=0;
|
|
h=Math.min(t,M)+1;break}else{console.log("unknown identifier: "+U);throw"e"}h=Math.min(t,M)+1}}I.size=h-p;
|
|
return I};jR.D2=function(W,h,S,k){if(W instanceof Array){var p=W.length==0||typeof W[0]=="number";if(p){G.ZS(h,S,"[ ");
|
|
S+=2;for(var Q=0;Q<W.length;Q++){var I=W[Q]+" ";G.ZS(h,S,I);S+=I.length}G.ZS(h,S,"]");S+=1}else{G.ZS(h,S,"[\n");
|
|
S+=2;for(var Q=0;Q<W.length;Q++){G.Uk(h,S,"\t".charCodeAt(0),k);S+=k;S=jR.D2(W[Q],h,S,k);G.ZS(h,S,"\n");
|
|
S++}G.Uk(h,S,"\t".charCodeAt(0),k);S+=k;G.ZS(h,S,"]");S+=1}}else if(W instanceof Object){S=jR.UG(W,h,S,k)}else if(typeof W=="string"){G.ZS(h,S,"(");
|
|
S++;G.Uk(h,S,254);S++;G.Uk(h,S,255);S++;S=G.YY(h,S,W);G.ZS(h,S,")");S+=1}else{var I=W+"";G.ZS(h,S,I);
|
|
S+=I.length}return S};jR.atl=function(W){var h=typeof W;return h=="string"||h=="number"||h=="boolean"};
|
|
function jh(){}jh.D9=function(W){var h={};jh.Dw(W,h,0,0);return h};jh.I0=function(W,h){var S=0;G.ZS(h,S," ");
|
|
S++;S=jh.oe(W,h,S,0);S--;h.H5(S,2);h.data[S]=h.data[S+1]=0;S+=2;return S};jh.XJ=function(W,h,S,k){while(W[S]!="<".charCodeAt(0)){S++;
|
|
console.log("\u0161ipka")}S+=2;S=jh.Dw(W,h,S,k);return S};jh.UG=function(W,h,S,k){G.ZS(h,S,"<< ");S+=3;
|
|
S=jh.oe(W,h,S,k);G.ZS(h,S,">>");S+=2;return S};jh.Fn=function(W){return W==9||W==10||W==32};jh.Dw=function(W,h,S,k){while(!0){while(jh.Fn(W[S])||W[S]==0)S++;
|
|
if(S>=W.length)break;if(W[S]=="/".charCodeAt(0)){S++;var p=S;while(!jh.Fn(W[p]))p++;var I=G.dP(W,S,p-S);
|
|
S=p+1;var q=jh.la(W,S,k,I);h["_"+I]=q.k;S+=q.size}else if(W[S]==">".charCodeAt(0)){S+=2;break}else{var P=W[S];
|
|
console.log(G.dP(W,S,S+100));console.log("unknown byte: "+P+", char: "+String.fromCharCode(P)+", offset: "+S);
|
|
S++;throw"e";return-1}}return S};jh.oe=function(W,h,S,k){for(var p in W){var I=p.substring(1,p.length);
|
|
G.ZS(h,S,"/"+I);S+=1+I.length;G.ZS(h,S," ");S++;S=jh.D2(W[p],h,S,k+1);G.ZS(h,S," ");S++}return S};jh.la=function(W,h,S,k){var p=h,I={type:"",size:0,k:0};
|
|
while(jh.Fn(W[h]))h++;if(W[h]=="<".charCodeAt(0)){I.type="Object";I.k={};h=jh.XJ(W,I.k,h,S+1)}else if(W[h]=="(".charCodeAt(0)){I.type="String";
|
|
h++;if(W[h]==")".charCodeAt(0)){I.k="e";h++}else{h+=2;var q=h,P=0;while(!0){if(W[q]==")".charCodeAt(0)&&W[q-1]!="\\".charCodeAt(0))break;
|
|
else q+=1}I.k="s"+G.fo(W,h,q);h=q+2}}else if(W[h]=="[".charCodeAt(0)){h++;I.k=[];I.type="Array";while(jh.Fn(W[h]))h++;
|
|
while(W[h]!="]".charCodeAt(0)){var t=jh.la(W,h,S+1,k);if(t==-1)return-1;I.k.push(t.k);h+=t.size;delete t.size;
|
|
while(jh.Fn(W[h]))h++}h++}else{var M=h;while(!jh.Fn(W[M]))M++;var U=G.dP(W,h,M-h),i=parseFloat(U);if(!isNaN(i)&&U.indexOf(".")!=-1){I.type="Float";
|
|
var z=parseFloat(U);I.k="f"+z}else if(!isNaN(i)&&U.indexOf(".")==-1){I.type="Integer";I.k="i"+parseInt(U)}else if(U=="true"||U=="false"){I.type="Boolean";
|
|
I.k=U=="true"}else if(U.charAt(0)=="/"){I.type="BString";I.k=U}else if(U=="NaN"){I.type="Float";I.k="f0"}else{console.log("unknown value",JSON.stringify(U));
|
|
throw"e"}h=M+1}I.size=h-p;return I};jh.atL=function(W){if(W==Math.round(W))return W+".0";var h=W.toFixed(5);
|
|
while(h.endsWith("0")&&h[h.length-2]!=".")h=h.slice(0,h.length-1);if(0<W&&W<1)h=h.slice(1);if(-1<W&&W<0)h="-"+h.slice(2);
|
|
return h};jh.D2=function(W,h,S,k){var p=typeof W=="string"?W.charAt(0):"";if(W instanceof Array){G.ZS(h,S,"[ ");
|
|
S+=2;for(var Q=0;Q<W.length;Q++){S=jh.D2(W[Q],h,S,k);G.ZS(h,S," ");S++}G.ZS(h,S,"]");S+=1}else if(W instanceof Object){S=jh.UG(W,h,S,k)}else if(p=="e"){G.ZS(h,S,"()");
|
|
S+=2}else if(p=="s"){G.ZS(h,S,"(");S++;G.Uk(h,S,254);S++;G.Uk(h,S,255);S++;S=G.YY(h,S,W.substring(1));
|
|
G.ZS(h,S,")");S++}else if(p=="/"){G.ZS(h,S,W);S+=W.length}else if(p=="f"){var I=parseFloat(W.substring(1)),q=jh.atL(I);
|
|
G.ZS(h,S,q);S+=q.length}else if(p=="i"){G.ZS(h,S,W.substring(1));S+=W.length-1}else{var q=W+"";G.ZS(h,S,q);
|
|
S+=q.length}return S};function G(){}G.al_=function(g8){var W="";for(var Q=3;Q>=0;Q--)W+=String.fromCharCode(g8>>Q*8&255);
|
|
return W};G.a0z=function(W){var g8=0;for(var Q=W.length-1;Q>=0;Q--)g8|=W.charCodeAt(Q)<<(3-Q)*8;return g8};
|
|
G.indexOf=function(W,h,S,k){if(S==null)S=0;if(k==null)k=W.length;k=Math.min(k,W.length);for(var Q=S;
|
|
Q<k;Q++)if(W[Q]==h)return Q;return-1};G.jC=function(W,h,S){if(S==null)S=0;var k=h.length,p=W.length-k;
|
|
if(typeof h=="string"){var I=[];for(var Q=0;Q<k;Q++)I.push(h.charCodeAt(Q));h=I}if(h.length>0){var q=h[0];
|
|
for(var Q=S;Q<p;Q++)if(W[Q]==q){var P=!0;for(var t=1;t<k;t++)if(h[t]!=W[Q+t]){P=!1;break}if(P)return Q}}return-1};
|
|
G.fo=function(W,h,S){var k=[],I="";while(h<S){var p=W[h++];if(p=="\\".charCodeAt(0))k.push(W[h++]);else k.push(p)}for(var Q=0;
|
|
Q<k.length;Q+=2)I+=String.fromCharCode(k[Q]<<8|k[Q+1]);return I};G.a1U=function(W,h,S){var k=new Uint8Array(2);
|
|
for(var Q=0;Q<S.length;Q++){G.Y_(k,0,S.charCodeAt(Q));if(k[0]==")".charCodeAt(0)||k[0]=="(".charCodeAt(0)||k[0]=="\\".charCodeAt(0)){W[h]="\\".charCodeAt(0);
|
|
h++}W[h]=k[0];h++;if(k[1]==")".charCodeAt(0)||k[1]=="(".charCodeAt(0)||k[1]=="\\".charCodeAt(0)){W[h]="\\".charCodeAt(0);
|
|
h++}W[h]=k[1];h++}return h};G.YY=function(W,h,S){W.H5(h,4*S.length);return G.a1U(W.data,h,S)};G.dC=function(W,h,S){var k="";
|
|
for(var Q=0;Q<S;Q++){var p=W[h++]|W[h++]<<8;k+=String.fromCharCode(p)}return k};G.wo=function(W,h,S){var k="";
|
|
for(var Q=0;Q<S;Q++){var p=W[h++]<<8|W[h++];k+=String.fromCharCode(p)}return k};G.a19=function(W,h,S){for(var Q=0;
|
|
Q<S.length;Q++){var k=S.charCodeAt(Q);G.bQ(W,h+2*Q,k)}};G.rW=function(W,h,S){for(var Q=0;Q<S.length;
|
|
Q++){var k=S.charCodeAt(Q);G.Y_(W,h+2*Q,k)}};G.al1=function(W,h,S){W.H5(h,2*S.length);G.rW(W.data,h,S)};
|
|
G.ab0=function(W,Q,h){var S=[],k=0,p=0;h+=Q;while(Q<h){k=W[Q++];if((k&128)==0)p=k;else if((k&224)==192){p=(k&31)<<6;
|
|
k=W[Q++];p|=k&63}else if((k&240)==224){p=(k&15)<<12;k=W[Q++];p|=(k&63)<<6;k=W[Q++];p|=k&63}else if((k&248)==240){p=(k&7)<<18;
|
|
k=W[Q++];p|=(k&63)<<12;k=W[Q++];p|=(k&63)<<6;k=W[Q++];p|=k&63}else throw"e";S.push(p)}return S};G.M8=window.TextDecoder?new window.TextDecoder("utf8"):null;
|
|
G.Md=function(W,h,S){if(h==null)h=0;if(S==null)S=W.length;if(G.M8&&h==0&&S==W.length)return G.M8.decode(W);
|
|
var k=G.ab0(W,h,S),p=k.length;for(var Q=0;Q<p;Q++)k[Q]=String.fromCharCode(k[Q]);return k.join("")};
|
|
G.im=window.TextEncoder?new window.TextEncoder("utf8"):null;G.cw=function(W){if(G.im)return G.im.encode(W);
|
|
var h=new Uint8Array(W.length*4),S=G.hX(W,h,0);return h.slice(0,S)};G.hX=function(W,h,S){var k=W.length,Q=0;
|
|
for(var p=0;p<k;p++){var I=W.charCodeAt(p);if((I&4294967295-(1<<7)+1)==0){h[S+Q]=I;Q++}else if((I&4294967295-(1<<11)+1)==0){h[S+Q]=192|I>>6;
|
|
h[S+Q+1]=128|I>>0&63;Q+=2}else if((I&4294967295-(1<<16)+1)==0){h[S+Q]=224|I>>12;h[S+Q+1]=128|I>>6&63;
|
|
h[S+Q+2]=128|I>>0&63;Q+=3}else if((I&4294967295-(1<<21)+1)==0){h[S+Q]=240|I>>18;h[S+Q+1]=128|I>>12&63;
|
|
h[S+Q+2]=128|I>>6&63;h[S+Q+3]=128|I>>0&63;Q+=4}else throw"e"}return Q};G.pk=function(W,h){var S=G.d(W,h),k=G.Md(W,h+4,S-1);
|
|
return{Nx:k,kL:4+S}};G.aaa=function(W,h){var S=G.Tz(W,h),k=G.dC(W,h+4,S);return k};G.Xl=function(W,h){var S=G.d(W,h),k=G.wo(W,h+4,S);
|
|
return k};G.QS=function(W,h){var S=G.d(W,h),k=G.wo(W,h+4,S-1);return k};G.a72=function(W,h,S){G.Bl(W,h,S.length);
|
|
h+=4;G.a19(W,h,S)};G.a3i=function(W,h,S){G.Cp(W,h,S.length);h+=4;G.rW(W,h,S)};G.HG=function(W,h,S){W.H5(h,4+2*S.length);
|
|
G.a3i(W.data,h,S)};G.a2u=function(W,h,S){W.H5(h,4+2*S.length);G.a72(W.data,h,S)};G.iS=function(W,h,S){var k=[];
|
|
for(var Q=0;Q<S;Q++)k.push(String.fromCharCode(W[h+Q]));return k};G.ams=function(W,h,S){var k=!1,p=W.length-S.length;
|
|
for(var Q=h;Q<p;Q++){for(var I=0;I<S.length;I++){if(W[Q+I]!=S.charCodeAt(I))break;if(I==S.length-1)return Q}}};
|
|
G.dP=function(W,h,S){var k="";for(var Q=0;Q<S;Q++)k+=String.fromCharCode(W[h+Q]);return k};G.vq=function(W,h,S){for(var Q=0;
|
|
Q<S.length;Q++)W[h+Q]=S.charCodeAt(Q)};G.ZS=function(W,h,S){W.H5(h,S.length);G.vq(W.data,h,S)};G.a9Y=function(W,h,S){var k="";
|
|
for(var Q=0;Q<S;Q++){var p=W[h+Q];if(p<10)k+=" ";else if(p<100)k+=" ";k+=p+", "}return k};G.QA=function(W,h){return W[h]<<8|W[h+1]};
|
|
G.Y_=function(W,h,g8){W[h]=g8>>8&255;W[h+1]=g8&255};G.Jv=function(W,h,g8){W.H5(h,4);G.Y_(W.data,h,g8)};
|
|
G.a8h=function(W,h){var S=G.QA(W,h),k=G.QA(W,h+2);return S+k*(1/65536)};G.Ya=function(W,h,g8){var S=Math.floor(g8),k=Math.floor((g8-S)*65536);
|
|
G.Y_(W,h,S);G.Y_(W,h+2,k)};G.aU=function(W,h){return W[h+1]<<8|W[h]};G.bQ=function(W,h,g8){W[h+1]=g8>>8&255;
|
|
W[h]=g8&255};G.TP=function(W,h,g8){W.H5(h,4);G.bQ(W.data,h,g8)};G.P5=function(W,h){G.nf[0]=W[h+1];G.nf[1]=W[h];
|
|
return G.Q_[0]};G.IQ=function(W,h){G.nf[0]=W[h];G.nf[1]=W[h+1];return G.Q_[0]};G.fS=G.Y_;G.mO=G.Jv;G.GZ=function(W,h){G.cp[0]=W[h+3];
|
|
G.cp[1]=W[h+2];G.cp[2]=W[h+1];G.cp[3]=W[h];return G.cz[0]};G.VJ=function(W,h,g8){G.cz[0]=g8;W[h+3]=G.cp[0];
|
|
W[h+2]=G.cp[1];W[h+1]=G.cp[2];W[h+0]=G.cp[3]};G.Vv=function(W,h,g8){W.H5(h,4);G.VJ(W.data,h,g8)};G.q0=function(W,h,S,k){S[k+0]=W[h+0];
|
|
S[k+1]=W[h+1];S[k+2]=W[h+2];S[k+3]=W[h+3]};G.Tz=function(W,h){G.q0(W,h,G.cp,0);return G.PH[0]};G.Bl=function(W,h,g8){G.PH[0]=g8;
|
|
G.q0(G.cp,0,W,h)};G.Qk=function(W,h,g8){W.H5(h,4);G.Bl(W.data,h,g8)};G.Ve=function(W,h){G.q0(W,h,G.cp,0);
|
|
return G.cz[0]};G.aej=function(W,h,g8){G.cz[0]=g8;G.q0(G.cp,0,W,h)};G.aoS=function(W,h,g8){W.H5(h,4);
|
|
G.aej(W.data,h,g8)};G.d=function(W,h){var S=W[h]*(256*256*256)+(W[h+1]<<16|W[h+2]<<8|W[h+3]);return S};
|
|
G.Cp=function(W,h,g8){W[h]=g8>>24&255;W[h+1]=g8>>16&255;W[h+2]=g8>>8&255;W[h+3]=g8>>0&255};G.YO=function(W,h,g8){W.H5(h,4);
|
|
G.Cp(W.data,h,g8)};G.QG=function(W,h){return G.d(W,h)<<32|G.d(W,h+4)};G.Dz=function(W,h,g8){G.Cp(W,h,g8>>16>>16);
|
|
G.Cp(W,h+4,g8&4294967295)};G.R7=function(W,h,g8){W.H5(h,8);G.Dz(W.data,h,g8)};G.aM=function(W,h){var S=new Uint8Array(8);
|
|
for(var Q=0;Q<8;Q++)S[Q]=W[h+7-Q];var k=new Float64Array(S.buffer);return k[0]};G.cE=function(W,h){var S=new Uint8Array(8);
|
|
for(var Q=0;Q<8;Q++)S[Q]=W[h+Q];var k=new Float64Array(S.buffer);return k[0]};G.y4=function(W,h,g8){var S=new Float64Array(1);
|
|
S[0]=g8;var k=new Uint8Array(S.buffer);for(var Q=0;Q<4;Q++){var p=k[Q];k[Q]=k[7-Q];k[7-Q]=p}for(var Q=0;
|
|
Q<8;Q++)W[h+Q]=k[Q]};G.h8=function(W,h,g8){W.H5(h,8);G.y4(W.data,h,g8)};G.SQ=function(W,h){G.cp[0]=W[h+3];
|
|
G.cp[1]=W[h+2];G.cp[2]=W[h+1];G.cp[3]=W[h+0];return G.j1[0]};G.Ys=function(W,h){G.cp[0]=W[h+0];G.cp[1]=W[h+1];
|
|
G.cp[2]=W[h+2];G.cp[3]=W[h+3];return G.j1[0]};G.j0=function(W,h,g8){G.j1[0]=g8;W[h+0]=G.cp[3];W[h+1]=G.cp[2];
|
|
W[h+2]=G.cp[1];W[h+3]=G.cp[0]};G.anA=function(W,h,g8){W.H5(h,4);G.j0(W.data,h,g8)};G.Q2=function(W,h,g8){G.j1[0]=g8;
|
|
W[h+0]=G.cp[0];W[h+1]=G.cp[1];W[h+2]=G.cp[2];W[h+3]=G.cp[3]};G.ahQ=function(W,h,g8){W.H5(h,4);G.Q2(W.data,h,g8)};
|
|
G.apd=function(W,h){var S=G.GZ(W,h),k=S*(1/(1<<24));return k};G.$Q=function(W,h,S){var k=Math.floor(S*(1<<24));
|
|
G.VJ(W,h,k)};G.a48=function(W,h,S){W.H5(h,4);G.$Q(W.data,h,S)};G.DP=function(W,h){var S=W[h],k=G.dP(W,h+1,S);
|
|
S+=1-S%2;return{OK:k,length:S+1}};G.afV=function(W,h,S){var k=S.length;W[h]=k;G.vq(W,h+1,S);if(k%2==0){W[h+1+k]=0;
|
|
++k}return k+1};G.xG=function(W,h,S){W.H5(h,S.length+2);return G.afV(W.data,h,S)};G.uL=function(W,h){var S=new ex;
|
|
S.S4=G.aM(W,h+0*8);S.S=G.aM(W,h+1*8);S.ZB=G.aM(W,h+2*8);S.Bq=G.aM(W,h+3*8);S.y8=G.aM(W,h+4*8);S.S8=G.aM(W,h+5*8);
|
|
return S};G.fm=function(W,h,S){G.y4(W,h+0*8,S.S4);G.y4(W,h+1*8,S.S);G.y4(W,h+2*8,S.ZB);G.y4(W,h+3*8,S.Bq);
|
|
G.y4(W,h+4*8,S.y8);G.y4(W,h+5*8,S.S8)};G.ala=function(W,h,S){W.H5(h,48);G.fm(W.data,h,S)};G.a9R=function(W,h){var S=G.SQ(W,h),k=G.SQ(W,h+4),p=G.SQ(W,h+8),I=G.SQ(W,h+12);
|
|
return new gj(S,k,p-S,I-k)};G.a2A=function(W,h,S){G.j0(W,h,S.x);G.j0(W,h+4,S.y);G.j0(W,h+8,S.x+S.e);
|
|
G.j0(W,h+12,S.y+S.Z)};G.a8T=function(W,h,S){W.H5(h,16);G.a2A(W.data,h,S)};G.El=function(W,h){var S=G.GZ(W,h),k=G.GZ(W,h+4),p=G.GZ(W,h+8),I=G.GZ(W,h+12);
|
|
return new gj(k,S,I-k,p-S)};G.Xn=function(W,h,S){G.VJ(W,h,S.y);G.VJ(W,h+4,S.x);G.VJ(W,h+8,S.y+S.Z);G.VJ(W,h+12,S.x+S.e)};
|
|
G.gv=function(W,h,S){W.H5(h,16);G.Xn(W.data,h,S)};G.SE=function(W,h,S){var k=new Uint8Array(S);for(var Q=0;
|
|
Q<S;Q++)k[Q]=W[h+Q];return k};G.nW=function(W,h,S){W.set(S,h)};G.Rs=function(W,h,S){W.H5(h,S.length);
|
|
G.nW(W.data,h,S)};G.a09=function(W,h,S,g8){if(!g8)g8=1;for(var Q=0;Q<g8;Q++)W[h+Q]=S};G.Uk=function(W,h,S,g8){if(!g8)g8=1;
|
|
W.H5(h,g8);G.a09(W.data,h,S,g8)};G.Q_=new Int16Array(1);G.nf=new Uint8Array(G.Q_.buffer);G.cz=new Int32Array(1);
|
|
G.PH=new Uint32Array(G.cz.buffer);G.cp=new Uint8Array(G.cz.buffer);G.j1=new Float32Array(G.cz.buffer);
|
|
function j5(){}j5.D9=function(W,h){var S=new Uint8Array(W),k=0,p=G.dP(S,k,9),P=4,t=100;k+=9;var I=G.dP(S,k,4);
|
|
k+=4;k++;h.e=G.d(S,k);k+=4;h.Z=G.d(S,k);k+=4;var q=G.d(S,k);k+=4;if(q!=0)alert("Unsupported image format, not RGB!");
|
|
if(["file","v001","v002","v003"].indexOf(I)==-1){t=G.d(S,k);k+=4;if(parseInt(I.slice(1))>=7){t=t}else alert("Unknown XCF version: "+I);
|
|
P=8}var M={};k=j5.bU(S,k,M);var U=[];k=j5.Jt(S,k,U,P);var i=[];k=j5.Jt(S,k,i,P);h.Vc=0;for(var Q=0;Q<U.length;
|
|
Q++)j5.aiW(S,U[Q],h,M,P,t);while(h.Vc>0){h.g.push(h.Iq());h.Vc--}h.g.reverse();delete h.Vc;h.buffer=N.U(h.e*h.Z*4);
|
|
if(h.g.length==0)console.log("No layers!!!");for(var Q=0;Q<i.length;Q++){var z=j5.EY(S,i[Q],M,P,t);if(z.TH[cK.adj])h.q={channel:z.bd,rect:new gj(0,0,h.e,h.Z)}}};
|
|
j5.aiW=function(W,h,S,k,p,I){var q=S.yA(),P=G.d(W,h),i=0;h+=4;var t=G.d(W,h);h+=4;q.rect=new gj(0,0,P,t);
|
|
var M=G.d(W,h);h+=4;var U=G.pk(W,h);h+=U.kL;q.hq(U.Nx);var z={};h=j5.bU(W,h,z);if(z[cK.yy]){var D=z[cK.yy];
|
|
i=D.length/4-1}if(z[cK.If]){q.rect.x=G.GZ(z[cK.If],0);q.rect.y=G.GZ(z[cK.If],4)}if(z[cK.Ro]){q.opacity=G.d(z[cK.Ro],0)}if(z[cK.a5S]){q.add.lsct=i1.wY;
|
|
q.rect=new gj(0,0,0,0);q.buffer=N.U(0);q.S5=24}if(z[cK.xy]){var R=G.d(z[cK.xy],0);q.oO=cK.atq[R];if(q.vc()&&q.oO=="norm")q.oO="pass"}if(z[cK.gs]){if(G.d(z[cK.gs],0)==0)q.S5+=2}if(z[cK.kx]){var O=G.d(z[cK.kx],0);
|
|
q.add.lsct=O&1==1?i1.wY:i1.O_}if(z[cK.CX]){var b=z[cK.CX];for(var w in b){var A=b[w];if(w=="gimp-text-layer"){var g=j5.arR(A),E=g.text,j=g.font,x=g.color,d=g["font-size"];
|
|
if(E==null&&g.markup){var L=new DOMParser,_=L.parseFromString(g.markup,"image/svg+xml");while(_.firstChild!=null&&_.firstChild.tagName!=null){_=_.firstChild;
|
|
var T=_.getAttribute("font"),c=_.getAttribute("foreground"),e=_.getAttribute("size");if(T!=null)j=T;
|
|
if(c!=null){c=CSS.Vo(c);x=[1,c.p/255,c.z/255,c.S/255]}if(e!=null){d=""+parseFloat(e)/245}}E=_.textContent}q.add.lnsr="rend";
|
|
q.add.TySh=gf.hN(0,0);q.add.TySh.Ik=new gj(0,0,100,100);q.add.TySh.A=new ex(1,0,0,1,q.rect.x,q.rect.y);
|
|
var r=q.add.TySh.MW;gf.XK(r,0,E);var B=gf.Ql(r,0,0),F=g.justify,v=g["line-spacing"];if(x)B.D4.FillColor={Type:1,Values:[1,parseFloat(x[1]),parseFloat(x[2]),parseFloat(x[3])]};
|
|
if(d){d=Math.round(parseFloat(d));B.D4.FontSize=d;q.add.TySh.A.S8+=Math.min(17,d*.17)}if(v){v=Math.round(parseFloat(v)+B.D4.FontSize*1.2);
|
|
B.D4.Leading=v;B.D4.AutoLeading=!1}if(F)B.MR.Justification=["left","right","center","fill"].indexOf(F);
|
|
if(j&&j!="Sans-serif"){var X=j.toLowerCase(),V="bold italic semi extra regular condensed light".split(" "),H=X.length;
|
|
for(var Q=0;Q<V.length;Q++){var o=X.indexOf(V[Q]);if(o!=-1&&o<H&&X[o-1]==" ")H=o}if(H!=X.length)j=j.slice(0,H-1).split(" ").join("")+"-"+j.slice(H).split(" ").join("");
|
|
gf.jq(B,j)}gf.$n(r,0,E.length,B);var J=g["box-width"],C=g["box-height"],Y=J?parseFloat(J):q.rect.e,K=C?parseFloat(C):q.rect.Z;
|
|
gf.fN(r,1);gf.hz(r,[0,0,Math.ceil(Y),Math.ceil(K)])}else console.log("Unknown property "+w)}}while(S.Vc>i){S.g.push(S.Iq());
|
|
S.Vc--}S.Vc=i;if(q.add.lsct==i1.wY||q.add.lsct==i1.O_)S.Vc++;var u=p==4?G.d:G.QG;if(q.p2()){q.buffer=N.U(q.rect.n()*4);
|
|
var f=new N.qr(q.rect.n()),l=u(W,h);h+=p;var jk=u(W,h);h+=p;j5.ke(W,l,f,k,p,I);N.ST(f,q.buffer);if(jk!=0){q.v=new $.Kt;
|
|
q.v.color=0;q.v.rect=q.rect.clone();q.v.channel=j5.EY(W,jk,k,p,I).bd;if(z[cK.Uw])q.v.isEnabled=G.d(z[cK.Uw],0)==1}}S.g.push(q)};
|
|
j5.arR=function(W){var h="("+G.Md(W,0,W.length-1)+")",S=[],k={};j5._J(h,1,S);j5.al8(S,k);return k};j5.al8=function(W,h){for(var Q=0;
|
|
Q<W.length;Q++){var S=W[Q],k=S[0];if(S.length==2)h[k]=S[1];else h[k]=S.slice(1)}};j5._J=function(W,h,S){while(!0){if(h>=W.length)throw"e";
|
|
var k=W.charAt(h);h++;if(k=="("){var p=[];h=j5._J(W,h,p);S.push(p)}else if(k==" "||k=="\n"||k=="\r"){}else if(k==")")return h;
|
|
else if(k=="\""){var I=h;while(!0){var q=W[h];h++;if(q=="\"")break;if(q=="\\")h++}S.push(JSON.parse(W.slice(I-1,h)))}else{var I=h-1;
|
|
while(W[h]!=" "&&W[h]!=")")h++;S.push(W.slice(I,h))}}};j5.EY=function(W,h,S,k,p){var I=G.d(W,h);h+=4;
|
|
var q=G.d(W,h);h+=4;var P=G.pk(W,h);h+=P.kL;var t={};h=j5.bU(W,h,t);var M=new N.qr(I*q),U=k==4?G.d:G.QG,i=U(W,h);
|
|
h+=k;j5.ke(W,i,M,S,k,p);return{bd:M.p,TH:t}};j5.ke=function(W,h,S,k,p,I){var q=G.d(W,h);h+=4;var P=G.d(W,h);
|
|
h+=4;var t=G.d(W,h);h+=4;var M=p==4?G.d:G.QG,U=M(W,h);h+=p;j5.akW(W,U,S,k,t,p,I)};j5.akW=function(W,h,S,k,p,I,q){var P=G.d(W,h),U=0,Q=0;
|
|
h+=4;var t=G.d(W,h);h+=4;var M=new gj(0,0,P,t);if(q==100||q==150)U=1;else if(q==200||q==250)U=2;else if(q==300||q==350)U=4;
|
|
else if(q==500||q==550)U=2;else if(q==600||q==650)U=4;else if(q==700||q==750)U=8;else{alert("unsupported bit depth "+q);
|
|
throw"e"}var i=p/U,U=Math.round(p/i),z=[];h=j5.Jt(W,h,z,I);var D=new N.qr(64*64*U),R=new gj,O=k[cK.aaN][0],b=[D.p,D.z,D.S,D.S4];
|
|
if(i==3)D.S4.fill(255);var w=Date.now();for(var A=0;A<t;A+=64)for(var g=0;g<P;g+=64){var E=Math.min(P-g,64),j=Math.min(t-A,64),x=E*j;
|
|
R.Yh(g,A,E,j);j5.arv(W,z[Q++],x*U,O,i,b);if(q==100||q==150){}else if(q==250){for(var d=0;d<i;d++){var L=b[d];
|
|
for(var _=0;_<x;_++){var T=L[_]<<8|L[x+_];L[_]=Math.min(T>>>8,255)}}}else if(q==600){var c=j5.aiT(),e=new Uint32Array(1),r=new Float32Array(e.buffer);
|
|
for(var d=0;d<i;d++){var L=b[d];for(var _=0;_<x;_++){e[0]=L[_]<<24|L[x+_]<<16|L[(x<<1)+_]<<8|L[(x<<1)+x+_]<<0;
|
|
var B=r[0];if(B<0)B=0;else if(B>1)B=1;L[_]=c[~~(.5+B*1e3)]}}}else console.log("unknown data format",q);
|
|
N.M$(D,R,S,M)}};j5.aiT=function(){var W=j5.aaM;if(W!=null)return W;W=j5.aaM=new Uint8Array(1001);for(var Q=0;
|
|
Q<1001;Q++)W[Q]=~~(.49+255*N.HE(Q*.001));return W};j5.arv=function(W,h,S,k,p,I){if(k==1){for(var q=0;
|
|
q<p;q++){var P=I[q],t=0;while(t<S){var g8=W[h];h++;if(g8<127){var M=W[h];h++;g8++;for(var Q=0;Q<g8;Q++)P[t+Q]=M}else if(g8==127){var U=W[h];
|
|
h++;var i=W[h];h++;var M=W[h];h++;g8=U<<8|i;for(var Q=0;Q<g8;Q++)P[t+Q]=M}else if(g8==128){var U=W[h];
|
|
h++;var i=W[h];h++;g8=U<<8|i;for(var Q=0;Q<g8;Q++)P[t+Q]=W[h+Q];h+=g8}else{g8=256-g8;for(var Q=0;Q<g8;
|
|
Q++)P[t+Q]=W[h+Q];h+=g8}t+=g8}}}else if(k==2){var z=pako.inflate(W.slice(h)),D=Math.round(z.length/S);
|
|
for(var Q=0;Q<S;Q++){var R=Q*D;I[0][Q]=z[R];I[1][Q]=z[R+1];I[2][Q]=z[R+2];I[3][Q]=D==3?255:z[R+3]}}else alert("Unknown compression "+k)};
|
|
j5.Jt=function(W,h,S,k){var p=k==4?G.d:G.QG;while(!0){var I=p(W,h);h+=k;if(I==0)break;else S.push(I)}return h};
|
|
j5.bU=function(W,h,S){while(!0){var k=G.d(W,h);h+=4;var p=G.d(W,h);h+=4;if(k==cK.asr)break;else if(k==cK.CX)S[k]=j5.a9C(W,h,h+p);
|
|
else S[k]=G.SE(W,h,p);h+=p}return h};j5.a9C=function(W,h,S){var k={};while(h<S){var p=G.pk(W,h);h+=p.kL;
|
|
var I=G.d(W,h);h+=4;if(I!=1)console.log("unknown flags",I);var q=G.d(W,h);h+=4;k[p.Nx]=G.SE(W,h,q);h+=q}return k};
|
|
var cK={asr:0,ack:1,a8o:2,a0M:3,adj:4,acT:5,Ro:6,xy:7,gs:8,aj9:9,ali:10,Uw:11,a0Z:12,akA:13,a6d:14,If:15,ain:16,aaN:17,au2:18,aoT:19,ad5:20,CX:21,alm:22,apy:23,ah_:24,a5G:25,afm:26,ajF:27,adP:28,a5S:29,yy:30,kx:31,aeU:32,aqm:33,ah6:34,a5j:35,a9i:36,aoR:37,aup:38,ajp:0,a1W:1,a2S:2,a9v:3,afL:1,aah:2,as7:0,adi:1,alW:1};
|
|
cK.atq="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 a$=function(){var W=!1,h,S,g;function k(){var x=G.dP(h,S,4);S+=4;return x[3]+x[2]+x[1]+x[0]}function p(){var x=G.dP(h,S,4);
|
|
S+=4;return x}function I(){var x=h[S];S+=1;return x}function q(){var x=G.aU(h,S);S+=2;return x}function P(){var x=G.Tz(h,S);
|
|
S+=4;return x}function t(){var x=G.Ve(h,S);S+=4;return x}function M(){var x=G.Tz(h,S);S+=8;return x}function U(){var x=G.Ys(h,S);
|
|
S+=4;return x}function i(){var x=G.cE(h,S);S+=8;return x}function z(){var x=G.aU(h,S),d=G.Md(h,S+2,x);
|
|
S+=2+x;return d}function D(){var x=G.Tz(h,S),d=G.Md(h,S+4,x);S+=4+x;return d}function R(x){S=x;var d=[];
|
|
while(S!=0){var L=p();if(L!="#FT4"&&L!="#FT3"&&L!="#FT2")throw L;var _=M(),T=M(),c=M(),e=M(),r=M(),B=P(),F=P(),v=P(),X=q(),V=I(),H={};
|
|
d.push(H);for(var Q=0;Q<B;Q++){var o=P(),J=I();if(J!=0&&J!=1&&J!=2)throw J;var C=[];if(J==0||J==1){var Y=M(),K=M(),u=M(),f=P(),l=I(),jk=P(),hE=L!="#FT4"?0:P(),Z=null;
|
|
if(L=="#FAT"||L=="#FT2"){switch(l){case 1:l=1;break;case 2:l=65;break;case 3:l=129;break;case 4:l=193;
|
|
break;default:l=0;break}}if(J==0)Z=z();C=[Y,K,u,l,Z]}H["i"+o]=[J,C]}for(var Q=0;Q<X;Q++){var aQ=q(),jC=q(),eO=M(),iU=G.dP(h,S,aQ);
|
|
S+=aQ}S=_}d.reverse();for(var gK=1;gK<d.length;gK++){var H=d[gK],iM=d[gK]=JSON.parse(JSON.stringify(d[gK-1]));
|
|
for(var i5 in H){var fN=H[i5];if(fN[0]==0)iM[i5]=fN;else if(fN[0]==1){fN[1][4]=iM[i5][1][4];iM[i5]=fN}else if(fN[0]==2)delete iM[i5]}}var dx=d.pop(),ai=[];
|
|
for(var i5 in dx)ai.push(dx[i5][1]);ai.sort(function(hO,ff){return hO[0]-ff[0]});return ai}function O(x,d,L,_){while(S<h.length){var T=I(),B=null;
|
|
if(T==0){if(_){var c=I();if(c!=2){var e=k()}if(c==0)S+=4;_=!1;continue}else{break}}var r=k();if(W)console.log(" ".repeat(d),T,T&127,r,x._type);
|
|
if(T>127)B=b(T,d,L);else B=w(T,d,L);x[r]=B}}function b(x,d,L){var _=[];x=x&127;if(x==43)S+=4;var T=P();
|
|
if(x==50){var c=k(),e=q();if(e!=1)throw"e";for(var Q=0;Q<T;Q++){var r={_status:"NotShared",_type:c};
|
|
_.push(r);var B=I();if(B!=1)throw B;O(r,d+1,L)}}else for(var Q=0;Q<T;Q++){_.push(w(x,d,L));if(x==42)x=2}return _}function w(x,d,L){var _=null;
|
|
if(x==49){_={};var T=I();if(T!=0){var c=P();if(L==null){_._id=c;_._status=["Shared","Link"][T-1]}if(L&&T==2)_=L[c];
|
|
if(T==1){if(L)L[c]=_;var e=I(),r=!1;if(e>1)throw e;_._type=k();if(W)console.log(" ".repeat(d),"new",_._type,e,S);
|
|
if(e==0){while(!0){var B=q();if(B!=0&&B!=1&&B!=2&&B!=4)throw B;if(h[S]!=0){r=!0;break}var F=q();if(F==512)break;
|
|
var v=k();if(F==256)break}}O(_,d+1,L,r)}}}else if(x==50){_={_status:"NotShared"};if(I()==1){_._type=k();
|
|
S+=2;O(_,d+1,L)}}else if(x==1)_={type:"byte",value:I()};else if(x==2)_={type:"uint16",value:q()};else if(x==3)_={type:"uint32",value:P()};
|
|
else if(x==4)_={type:"uint64",value:M()};else if(x==7)_={type:"int32",value:t()};else if(x==8)_={type:"int64",value:M()};
|
|
else if(x==9)_={type:"float32",value:U()};else if(x==10)_={type:"float64",value:i()};else if(x==21)_={type:"Vec2i",value:[P(),P()]};
|
|
else if(x==23)_={type:"Vec4i",value:[P(),P(),P(),P()]};else if(x==33)_={type:"Vec4f",value:[U(),U(),U(),U()]};
|
|
else if(x==36)_={type:"Vec2",value:[i(),i()]};else if(x==38)_={type:"Vec4",value:[i(),i(),i(),i()]};
|
|
else if(x==40)_={type:"Vec6",value:[i(),i(),i(),i(),i(),i()]};else if(x==41)_={type:"bool",value:I()!=0};
|
|
else if(x==42)_={type:"Enum",value:P()};else if(x==43)_={type:"string",value:D()};else if(x==44){var X=q();
|
|
_={type:"curv16",value:[i(),X==12?[I(),I(),I(),I()]:[P(),P()]]}}else if(x==45){var X=P();_={type:"buff",value:h.slice(S,S+X)};
|
|
S+=X}else if(x==47){_={type:"uint32",value:P()}}else if(x==48){var V=[],H=q();if(H!=1)throw H;if(h[S]==135){var o=b(I(),d+1,L),J=b(I(),d+1,L),C=b(I(),d+1,L);
|
|
V=[o,J,C]}else{var Y=1;if(h[S]==3){I();Y=P()}for(var Q=0;Q<Y;Q++){if(I()!=41)throw"e";var c=I();if(c!=0&&c!=1)throw c;
|
|
if(I()!=172)throw"e";var K=P(),u=q(),f=[];V.push(f);if(u!=18)throw u;if(K>2e3)throw K;for(var l=0;l<K;
|
|
l++)f.push([i(),i(),I(),I()])}}S++;_={type:"curve",value:V}}else if(x==51){_={type:"EmbeddedData"};_[k()]=D()}else if(x==52)_={type:"uint32",value:P()};
|
|
else if(x==56)_={type:"Color32",value:[I(),I(),I(),I()]};else if(x==68)_={type:"ColorRGBA",value:[U(),U(),U(),U()]};
|
|
else if(x==72)_={type:"ColorCMYK",value:[U(),U(),U(),U(),U()]};else{throw x}return x==49||x==50||x==51?_:_.value}function A(x){var d=0,L=x.length;
|
|
for(var Q=0;Q<L;Q++)x[Q]=d=d+x[Q]&255}function E(x){h=x;S=4;var d=P(),L=p();if(L!="nsrP")throw L;var L=p();
|
|
if(L!="#Inf")throw L;var _=M();g=M();var T=M(),c=M(),e=M(),r=P(),B=P(),L=p();if(L!="Prot")throw L;var r=P(),F=R(_),v={},X=Date.now();
|
|
for(var V=0;V<F.length;V++){var H=F[V],o=H[3],u=null;S=H[0];var L=p();if(L!="#Fil")throw L;var J=o>>>5&1,C=o&3,Y=o&192;
|
|
switch(Y){case 64:Y=1;J=0;break;case 128:Y=2;break;case 192:Y=3;break;default:Y=0;J=0}var K=new Uint8Array(h.buffer,S,H[2]);
|
|
if(C==0)u=K;else if(C==1)u=pako.inflate(K);else if(C==2)u=hI.Gg.Pi(K,H[1]);else throw C;if(J==0){if(Y==1)A(u);
|
|
if(Y==2)throw"e"}else throw J;v[H[4]]=u}return v}function j(x){var d=E(new Uint8Array(x));h=d["doc.dat"];
|
|
S=16;var L={};O(L,0,[]);return[d,L,g]}return{apc:j}}();function eF(){}eF.D9=function(){function W(D,R){var O=Date.now(),b=a$.apc(D),w=b[0],A=b[1],g=b[2],E=A.DocR,j=E.DfSz,x=E.Chld;
|
|
if(x.length!=1)throw"e";var d=x[0],L=d.SprB;x=d.Chld;R.e=~~L[2];R.Z=~~L[3];R.buffer=N.U(R.e*R.Z*4);var _=[0,{}];
|
|
for(var Q=0;Q<x.length;Q++)p(x[Q],R,w,new ex,_);R.xs(_[0]);console.log(Date.now()-O,"Document created");
|
|
O=Date.now()}function h(D){return new ex(D[0],D[3],D[1],D[4],D[2],D[5])}function S(D,R){var O=R.Xfrm;
|
|
O=O?h(O):new ex;O.concat(D);return O}function k(D){var R={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 "}[D];
|
|
return R?R:"norm"}function p(D,R,O,b,w){var A=D._type,g=D.Chld,E=R.yA();E.hq(D.Desc==null||D.Desc==""?A=="Grup"?"Folder":"Layer":D.Desc);
|
|
E.NN(D.Visi);E.opacity=Math.round(255*D.Opac);if(D.FOpc!=1)E.add.iOpa=Math.round(255*D.FOpc);var j=D.Blnd;
|
|
if(j!=null)E.oO=k(j);var x=S(b,D),d=A=="ShpN"||A=="PCrv";if(g){R.g.push(R.Iq());E.add.lsct=i1.wY;E.oO="pass";
|
|
E.S5=24;if(A=="ShpN"){var L=D.ShpB;E.Si(new gj(L[0]+x.y8,L[1]+x.S8,L[2]-L[0],L[3]-L[1]));w[0]++;E.add.artb.Clr={t:"Objc",v:N.X.hg({p:255,z:255,S:255})}}for(var Q=0;
|
|
Q<g.length;Q++)p(g[Q],R,O,x,w)}else if(A=="Rstr"||A=="ImgN"||A=="MRst"){var _=D.Bitm,T=_.Bckg,c=Date.now(),e;
|
|
if(T==null){e=M(_,O,w[1]);E.rect=e[2].clone();E.buffer=e[1].slice(0);E.rect.x+=x.y8;E.rect.y+=x.S8}if(T||x.Nc()!=1){var r,B=0,F=0;
|
|
if(T){var v=O[T.Data],X=G.jC(v,"ataD")+4,V=G.Tz(v,X);X+=4;r=v.slice(X,X+V)}else{B=E.rect.x-x.y8;F=E.rect.y-x.S8;
|
|
if(e[3]==null)e[3]=new Uint8Array(hI.J$("PNG").i4([[E.buffer.buffer]],E.rect.e,E.rect.Z));r=e[3].slice(0)}var H=R.vN(r,E.getName(),0,0);
|
|
H.S5=E.S5;H.opacity=E.opacity;E=H;var o=new ex;o.translate(B,F);o.concat(x);var J=E.rect.clone();J.x=J.y=0;
|
|
var C=N.H.Fb(J).s;N.H.A(C,o,C);E.add.SoLd.Trnf=a.Q.m3(C);E.add.SoLd.nonAffineTransform=a.Q.m3(C);E.KF(R,!1)}}else if(A=="TxtA"||A=="TxtF"){E.add.lnsr="rend";
|
|
E.add.TySh=gf.hN(0,0);E.add.TySh.Ik=new gj(0,0,100,100);var Y=D.TxtH.FrmB,K=new ex,jk=0;K.translate(Y[0],Y[1]);
|
|
K.concat(x);E.add.TySh.A=K;var u=E.add.TySh.MW,f=D.StSt,l=f.Blok;if(l.length!=1)throw"e";for(var hE=0;
|
|
hE<l.length;hE++){var Z=l[hE],aQ=jk,jC=0,eO=Z.Glyp.Utf8;eO=eO.replace(/\u2028/g,"\n");eO=eO.replace(/\u2029/g,"\n");
|
|
eO=eO.slice(0,eO.length-1);gf.XK(u,jk,eO);jk+=eO.length;var iU=Z.GAtt.Runs,gK=Z.PAtt.Runs[0],iM=gK.Item.Ints[0];
|
|
for(var i5=0;i5<iU.length;i5++){var fN=iU[i5],dx=fN.Indx,ai=fN.Item,hO=ai.Objs,ff=gf.Ql(u,aQ,1);ff.MR.Justification=iM==0?0:iM==1?2:1;
|
|
gf.jq(ff,ai.DFnt.Post);ff.D4.FontSize=ai.Doub[0];for(var Q=0;Q<hO.length;Q++){var eP=hO[Q];if(eP._type=="FDsc"){var a0=eP.FDeF;
|
|
if(a0._type=="FilS"){var bM=t(a0.Colr);ff.D4.FillColor={Type:1,Values:[1,bM[0],bM[1],bM[2]]}}}}gf.$n(u,aQ+jC,aQ+Math.min(dx,eO.length),ff);
|
|
jC=dx}}gf.fN(u,1);gf.hz(u,[0,0,Math.round(Y[2]-Y[0]),Math.round((Y[3]-Y[1])*1.2)]);R.rd=!0}else if(d){E.S5|=16;
|
|
var cV=E.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));E.add.vstk.strokeEnabled.v=!1;E.add.vogk=[];
|
|
var aX=E.add.vmsk=I(D);N.$.ac(aX.T,x);if(D.BFFl){var j8=D.BFFl[0].FDeF,j3=j8._type;if(j3=="FilS")E.add.SoCo={classID:"null",Clr:P(j8.Colr)};
|
|
else if(j3=="FilG"){var am=E.add.GdFl=JSON.parse(hz.Au[hz.order.indexOf("GrFl")]);q(j8,am)}else if(j3=="FilN"){E.add.SoCo={classID:"null",Clr:{t:"Objc",v:N.X.hg({p:0,z:0,S:0})}};
|
|
cV.fillEnabled.v=!1}else console.log(j3)}if(D.LILn){var fG=D.LILn[0].LDeL,bw=fG.Wght;if(bw!=0){cV.strokeEnabled.v=!0;
|
|
cV.strokeStyleLineWidth.v.val=bw;var j8=D.LIFl[0].FDeF,j3=j8._type;if(j3=="FilS")cV.strokeStyleContent.v.Clr=P(j8.Colr);
|
|
else if(j3=="FilN")cV.strokeEnabled.v=!1}}E.r9(R)}else console.log(A);var fz=D.AdCh,c6=[];if(fz)for(var Q=0;
|
|
Q<fz.length;Q++){var hk=fz[Q],as=hk._type;if(as=="ShpN"||as=="PCrv"){var aX=E.add.vmsk=I(hk),bf=S(x,hk);
|
|
N.$.ac(aX.T,bf);E.r9(R)}else if(hk.AdjP){var gW=hk.AdjP,j1=gW._type,bZ={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"}[j1];
|
|
if(bZ==null){console.log(gW);continue}var iL=hw.gn(bZ,{});c6.push(iL);var jI=iL.v.Fltr.v;if(j1=="LevP"){var e2=e4.mu(jI,0);
|
|
e2[0]=gW.OutB*255;e2[1]=gW.OutW*255;e4.Dm(jI,0,e2)}else if(j1=="WhBP"){var e2=e4.mu(jI,2);e2[4]=100+gW.WBTi*20;
|
|
e4.Dm(jI,2,e2);var e2=e4.mu(jI,3);e2[4]=100+gW.WBTi*200;e4.Dm(jI,3,e2)}else if(j1=="HSSP"){var e2=bU.mu(jI,0);
|
|
e2[0]=Math.round(gW.HueA*256);e2[1]=Math.round(gW.SatA*256);e2[2]=Math.round(gW.LumA*256);bU.Dm(jI,0,e2)}else if(j1=="RecP"){jI.Clrz.v=!0;
|
|
var e2=bU.mu(jI,0);e2[0]=Math.round(gW.RecH*100);e2[1]=Math.round(gW.RecS*100);e2[2]=Math.round(gW.RecL*100);
|
|
bU.Dm(jI,0,e2)}else if(j1=="B&CP"){jI.Brgh.v=Math.round(gW.Brig*100);jI.Cntr.v=Math.round(gW.Ctrs*100-100)}else if(j1=="PosP"){jI.Lvls.v=gW.Post}else if(j1=="VibP"){jI.vibrance.v=gW.Vibr-100;
|
|
jI.Strt.v=Math.round(gW.Satu*100)}else if(j1=="ExpP"){jI.Exps.v=gW.Expo;jI.gammaCorrection.v=gW.Gamm/2.2}else if(j1=="ThrP"){jI.Lvl.v=Math.round(gW.Thre*255)}else if(j1=="CrvP"){var dV=gW.Mast["Cnt "],ds=gW.Mast.Vals,e2=ht.mu(jI,0),ij=e2[0];
|
|
for(var dg=0;dg<dV;dg++){var iT=e2[dg]=JSON.parse(JSON.stringify(ij));iT.v.Hrzn.v=Math.round(ds[dg]*255);
|
|
iT.v.Vrtc.v=Math.round(ds[4+dg]*255)}ht.Dm(jI,0,e2)}}else console.log(hk)}if(c6.length!=0){E.add.SoLd.filterFX=hw.mG();
|
|
R.iI({id:E.add.SoLd.placed.v,rect:new gj,buffer:N.U(1),v:new $.Kt});E.add.SoLd.filterFX.v.filterFXList.v=c6;
|
|
E.KF(R,!1)}var ej=D.FiEf;if(ej&&ej.length!=0){var eH=E.add.lmfx=JSON.parse(hz.default);for(var Q=0;Q<hz.order.length;
|
|
Q++)eH[hz.BN[Q]]={t:"VlLs",v:[]};for(var d4=0;d4<ej.length;d4++){var jy=ej[d4],iR=jy._type,cD={ColO:"SoFi",GrdO:"GrFl",Shad:"DrSh",InnS:"IrSh",OutG:"OrGl",InnG:"IrGl",Strk:"FrFX",PhgB:"ebbl",BevE:"ebbl"}[iR],am=cD?JSON.parse(hz.Au[hz.order.indexOf(cD)]):null;
|
|
if(iR=="ColO"){am.Clr=P(jy.Colr)}else if(iR=="GrdO"){q(jy.GrFl.FDeF,am)}else if(iR=="Shad"||iR=="InnS"||iR=="OutG"||iR=="InnG"){am.Clr=P(jy.Colr);
|
|
am.blur.v.val=Math.round(jy.Radi/2.4);if(jy.Offs!=null){am.Dstn.v.val=jy.Offs;am.lagl.v.val=Math.round(180-jy.Angl*180/Math.PI);
|
|
am.uglg.v=!1}}else if(iR=="Strk"){am.Clr=P(jy.Colr);am.Sz.v.val=Math.round(jy.Radi)}else if(iR=="PhgB"||iR=="BevE"){am.blur.v.val=Math.round(jy.Radi);
|
|
if(iR=="BevE")am.bvlS.v.BESl="PlEb"}else if(iR=="Gaus"){if(d&&jy.Enab){E.add.vmsk.JJ=jy.Radi/2.4;E.add.vmsk.VT=!0;
|
|
E.r9(R)}}if(cD){am.enab.v=jy.Enab;if(am.Md&&jy.BlnM!=null)am.Md.v.BlnM=hd.iN(k(jy.BlnM));if(am.Opct&&jy.Opac!=null)am.Opct.v.val=Math.round(jy.Opac*100);
|
|
var cA=hz.BN[hz.order.indexOf(cD)];eH[cA].v.unshift({t:"Objc",v:am})}}}R.g.push(E)}function I(D){var R=new $.CP,O=D._type;
|
|
if(O=="PCrv"){var b=D.Crvs.Data,w=[],A=[];for(var Q=0;Q<b.length;Q++){var g=b[Q];if(g.length%3!=1){g=g.slice(1,g.length-1)}for(var E=0;
|
|
E<g.length;E++){var j=g[E],x=j[2];if(x!=0)w.push(E==0?"M":"C");A.push(j[0],j[1])}}R.T=N.H.aD({s:A,C:w},!0)}else{var d=D.ShpB,L=D.Shpe,_=L._type,T=d[2]-d[0];
|
|
if(_=="ShpE"){R.T=N.$.Te.dm(d[0],d[1],d[2]-d[0],d[3]-d[1])}else if(_=="ShNR"){var c=[0,0,0,0];if(L.CTyp){c=L.ShCR.slice(0);
|
|
for(var Q=0;Q<4;Q++)c[Q]*=d[2]-d[0]}R.T=N.$.Te.Rect(d[0],d[1],d[2]-d[0],d[3]-d[1],c)}else if(_=="ShpT"){R.T=N.H.aD({C:["M","L","L","Z"],s:[d[0],d[3],d[2],d[3],d[0]+T*.5,d[1]]},!0)}else if(_=="ShTz"){R.T=N.H.aD({C:["M","L","L","L","Z"],s:[d[0]+T*L.PosL,d[1],d[0]+T*L.PosR,d[1],d[2],d[3],d[0],d[3]]},!0)}else{console.log("--",_);
|
|
R.T=N.$.Te.Rect(d[0],d[1],d[2]-d[0],d[3]-d[1],[0,0,0,0])}}return R}function q(D,R){var O=D.Grad,b=O.Cols;
|
|
R.Type.v.GrdT=D.Type==0?"Lnr":"Rdl";var w=[];for(var Q=0;Q<b.length;Q++){var A=t(b[Q]);w.push([O.Posn[Q][0],A])}R.Grad.v.Intr.v=0;
|
|
N.X.J6(w,R.Grad.v);var g=O.Posn,E=new eC(g[0][0],g[0][1]),j=new eC(g[1][0],g[1][1]);if(D.Type==0)E=new eC((E.x+j.x)/2,(E.y+j.y)/2);
|
|
N.X.nA(E,j,new gj(0,0,1,1),R)}function P(D){var R=t(D);return{t:"Objc",v:N.X.hg({p:R[0]*255,z:R[1]*255,S:R[2]*255})}}function t(D){var R=D._col,O=D._type;
|
|
if(O=="HSLA"){var b=N.Gm(R[0],R[1],R[2]);return[b.p,b.z,b.S,R[3]]}else if(O=="RGBA")return R;else if(O=="CMYK"){var w=1-R[3];
|
|
return[(1-R[0])*w,(1-R[1])*w,(1-R[2])*w]}else{console.log(R);throw O}}function M(D,R,O){var b=D.Frmt,c="";
|
|
if(b!=0&&b!=6)throw b;var w=D.BmpW,A=D.BmpH,g=b==0?4:1,E=Math.ceil(w/256),j=Math.ceil(A/256),x=new gj(0,0,E,j),d=new gj;
|
|
for(var Q=0;Q<g;Q++){var L=new Uint8Array(D["Sta"+(Q+1)]),_=N.oA(L,x);d=d.r8(_)}var T=[];for(var Q=0;
|
|
Q<g;Q++){var L=new Uint8Array(D["Sta"+(Q+1)]),e=N.U(d.n());N.vG(L,x,e,d);T[Q]=[];for(var r=0;r<e.length;
|
|
r++)T[Q][r]=e[r];c+=JSON.stringify(T[Q])+","+JSON.stringify(D["Idx"+(Q+1)])+","}if(O[c]==null){var B=d.e*256,F=d.Z*256,v=new Array(g);
|
|
for(var Q=0;Q<g;Q++){var L=v[Q]=new Uint8Array(B*F);U(L,D["Idx"+(Q+1)],T[Q],R,B,F)}var X=N.U(B*F*4);
|
|
if(b==0)N.ST({p:v[0],z:v[1],S:v[2],S4:v[3]},X);else{X.fill(255);N.yS(v[0],X)}var V=new gj(0,0,B,F),H={buffer:X,rect:V};
|
|
N.jo(H);O[c]=[H.rect,H.buffer]}var _=O[c][2]=O[c][0].clone();_.x+=d.x*256;_.y+=d.y*256;return O[c]}function U(D,R,O,b,w,A){var g=0,E=w>>>8,j=A>>>8;
|
|
for(var x=0;x<j;x++)for(var d=0;d<E;d++){var L=d*256,_=x*256,T=x*E+d,c=_*w+L,e=O[T];if(e<=1)i(D,c,0,w,256,256);
|
|
else if(e==2)i(D,c,4294967295,w,256,256);else if(e==4){var r=R[g];g++;var B=b[r.Data.DatI],F=r.Rect;
|
|
if(F==null)F=[0,0,256,256];i(D,c,0,w,256,256);z(D,(_+F[1])*w+L+F[0],B,F[1]*256+F[0],w,256,F[2]-F[0],F[3]-F[1])}else console.log(e)}}function i(D,R,O,b,w,A){var g=R+b*A;
|
|
for(;R<g;R+=b){var E=R+w;for(var j=R;j<E;j++){D[j]=O}}}function z(D,R,O,b,w,A,g,E){var j=R+w*E,x=b+A*E;
|
|
for(;R<j&&b<x;R+=w,b+=A){for(var Q=0;Q<g;Q++)D[R+Q]=O[b+Q]}}return W}();function gq(){}gq.D9=function(W,h){var S=gq,k=hb.parse(W),I=0;
|
|
if(k.pages.length>1)console.log(k.pages.length,"pages");var p=[],q=new gj;for(var P=0;P<k.pages.length;
|
|
P++){var t=k.pages[P],M=t.layers,U=S.TA(M,P),z=!1;if(U.n()>8e3*8e3||U.e>3e4||U.Z>3e4){S.ru(M,!0);var i=S.TA(M,P);
|
|
if(i.n()>=U.n())S.ru(M,!1)}U=S.TA(M,P);for(var D=0;D<M.length;D++){var R=M[D];if(S.pM(R)=="artboard")z=!0}if(!z){console.log("no artboard");
|
|
var O={};for(var b in t)O[b]=t[b];O._class="group";t.layers=[O]}p.push(U.clone());if(U.ZP())continue;
|
|
U.x=0;U.y=I;I+=U.Z+200;q=q.r8(U)}var w={};if(k.foreignSymbols)for(var Q=0;Q<k.foreignSymbols.length;
|
|
Q++){var A=k.foreignSymbols[Q].symbolMaster;w[A.symbolID]={TW:A}}S.rA(k.pages,w,h);for(var g in w){var R=w[g].TW,E=S.dz(R.layers)}var j=gq.GK(q,8192*8192);
|
|
h.rd=!0;h.e=Math.round(q.e/j);h.Z=Math.round(q.Z/j);h.buffer=N.U(h.e*h.Z*4);h.xs(k.pages[0].layers.length);
|
|
h.GN={};h.CE=[];I=0;for(var P=0;P<k.pages.length;P++){var x=k.pages[P],U=p[P],d=new ex(j,0,0,j,U.x,U.y-I);
|
|
S.il(x.layers,h,d,k,w,{},[]);I+=U.Z+200}delete h.GN;delete h.CE;if(j!=1)alert("File scaled down "+j+"x");
|
|
h.ahd()};gq.a6g=0;gq.pM=function(W){return W._class?W._class:W.$class};gq.GK=function(W,h){var S=1;while(Math.round(W.e/S)*Math.round(W.Z/S)>h||Math.max(Math.round(W.e/S),Math.round(W.Z/S))>3e4)S++;
|
|
if(S!=1&&!window.confirm("Your image is quite large ("+W.e+" x "+W.Z+" px).\n"+"Press OK to scale it down "+S+"x, or Cancel to keep the size."))S=1;
|
|
return S};gq.TA=function(W,h){var S=[],k=gq;for(var p=0;p<W.length;p++){var I=W[p],q=k.El(I.frame);if(h==0||k.pM(I)=="artboard")S.push(q)}return N.rect.fV(S)};
|
|
gq.ru=function(W,h){var S=[],k=gq;for(var p=0;p<W.length;p++){var I=W[p],q=k.El(I.frame);q.e+=150;q.Z+=150;
|
|
S.push(q)}var P=N.rect.fV(S);N.rect.al6(S,h);var t=N.rect.fV(S);if(t.n()*1.5<P.n()||P.e>3e4&&t.e<=3e4||P.Z>3e4&&t.Z<=3e4){alert("Re-arranging artboards");
|
|
for(var p=0;p<W.length;p++){var M=S[p],I=W[p],U=I.frame;U.x=M.x;U.y=M.y}}};gq.rA=function(W,h,S){var k=gq;
|
|
for(var p=0;p<W.length;p++){var I=W[p],q=k.pM(I);if(["page","artboard","group"].indexOf(q)!=-1)k.rA(I.layers,h,S);
|
|
else if(q=="symbolMaster")h[I.symbolID]={TW:I}}};gq.dz=function(W){var h=gq;for(var S=0;S<W.length;S++){var k=W[S],p=h.pM(k),I=null;
|
|
if(["page","artboard","group"].indexOf(p)!=-1)I=h.dz(k.layers);if(p=="symbolMaster"||p=="symbolInstance")I=k;
|
|
if(I!=null)return I}return null};gq.il=function(W,h,S,k,p,I,q){var P=gq,t=[];for(var M=0;M<W.length;
|
|
M++){var U=W[M],i=U.frame?P.El(U.frame):null,z=U.style,w="",d=null,L=!1;if(z==null){console.log("no styles")}var D=P.GP(U,S),R=P.pM(U),O=R=="shapeGroup"||R=="shapePath"||R=="rectangle"||R=="oval"||R=="triangle"||R=="polygon",b=["page","artboard","group"].indexOf(R)!=-1;
|
|
if(R=="shapeGroup"){for(var Q=0;Q<U.layers.length;Q++)if(P.pM(U.layers[Q])=="shapeGroup")b=!0}var A=U.exportOptions;
|
|
if(A){var g=A.exportFormats;if(g==null)g=A.sizes;if(R!="artboard"&&(g&&g.length!=0)){var E=g[0].scale}}var j=h.yA();
|
|
j.NN(U.isVisible);var x=U.name;if(!(typeof x=="string"))x=R;j.hq(w+x.slice(0,250));if(z!=null)d=P.adf(k,h,z,i,D,j.getName(),O||R=="artboard"||b);
|
|
if(R=="rectangle"&&z&&z.fills&&z.fills[0]){var _=z.fills[0];if(_.fillType==4&&_.patternFillType>1&&_.image!=null)L=!0}if(U.shouldBreakMaskChain){while(t.length!=0)P.fU(t.pop(),h)}if(b){j.add.lsct=U.layerListExpandedType==2?i1.wY:i1.O_;
|
|
j.oO="pass";j.S5=24;j.NN(U.isVisible);h.g.push(h.Iq());if(R=="artboard"){var T=i.clone(),c=D.Nc();T.x=-Math.floor(D.y8/c);
|
|
T.y=-Math.floor(D.S8/c);T.e=Math.floor(T.e/c);T.Z=Math.floor(T.Z/c);j.Si(T);var e=U.backgroundColor,r=e?{p:255*e.red,z:255*e.green,S:255*e.blue}:{p:255,z:255,S:255};
|
|
j.add.artb.Clr={t:"Objc",v:N.X.hg(r)};j.add.artb.artboardBackgroundType={t:"long",v:4}}P.il(U.layers,h,D,k,p,I,q)}else if(O&&!L){j.add.vmsk=new $.CP;
|
|
j.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));j.add.vstk.strokeEnabled.v=!1;j.add.vogk=[];var B=d!=null&&d.frameFXMulti.v.length==1,F=z?z.fills:null,v=z?P.CH(k,F,i,D,j.getName(),h,P.Ol(q,U.do_objectID+"_image")):[];
|
|
if(v.length==0){if(B)j.add.vstk.fillEnabled.v=!1;else j.add.iOpa=0;j.add.SoCo={classID:"null",Clr:{t:"Objc",v:N.X.hg({p:0,z:0,S:0})}}}else{var X=v[0],V=null,H=null;
|
|
if(X.type=="SoFi"){V="SoCo";H=hz.RN}if(X.type=="GrFl"){V="GdFl";H=hz.Y1}if(X.type=="patternFill"){V="PtFl";
|
|
H=hz.pd}if(V!=null){j.add[V]={classID:"null"};for(var Q=0;Q<H.length;Q++){var o=H[Q];j.add[V][o]=X.k.v[o]}var J=X.k.v.Opct.v.val;
|
|
if(B&&J==0)j.add.vstk.fillEnabled.v=!1;else j.add.iOpa=Math.round(255*J/100)}}j.S5|=16;j.add.vmsk.T=P.eV(U.layers?U.layers:[U],U.layers?D:S,j.add.vogk);
|
|
var C=z?z.blur:null;if(C&&C.isEnabled&&C.type<=1)j.add.vmsk.JJ=C.radius;if(j.add.vmsk.T.length==2){console.log("shape with no content:",j.getName())}if(B){var Y=d.frameFXMulti.v[0].v,K=j.add.vstk,u=z.borders[0];
|
|
d.frameFXMulti.v=[];jO.a3h(Y,K);var f=z.borderOptions,l=z.miterLimit;if(f){var jk=f.dashPattern;K.strokeStyleLineCapType.v.strokeStyleLineCapType=hz.EJ.zu[f.lineCapStyle];
|
|
K.strokeStyleLineJoinType.v.strokeStyleLineJoinType=hz.EJ.join[f.lineJoinStyle];if(jk)K.strokeStyleLineDashSet.v=jO.rq(jk,1/Y.Sz.v.val);
|
|
if(l!=null)K.strokeStyleMiterLimit.v=l}}j.r9(h)}else if(R=="bitmap"||L){if(!L&&U.image==null)continue;
|
|
var hE=L?z.fills[0]:null,Z=L?hE.image.bdata:U.image.bdata,aQ=h.vN(Z,j.getName(),0,0);aQ.S5=j.S5;j=aQ;
|
|
var C=z?z.blur:null,jC=z?z.colorControls:null;if(C||jC){j.add.SoLd.filterFX=hw.mG();h.iI({id:j.add.SoLd.placed.v,rect:new gj,buffer:N.U(1),v:new $.Kt});
|
|
var F=j.add.SoLd.filterFX.v.filterFXList.v;if(C){var eO=hw.gn("GsnB",{});eO.v.enab.v=C.isEnabled;eO.v.Fltr.v.Rds.v.val=C.radius;
|
|
F.push(eO)}if(jC){var iU=jC.brightness,gK=jC.contrast,iM=jC.hue,i5=jC.saturation;if(iM!=0||i5!=1){var eO=hw.gn("hue2",{});
|
|
eO.v.enab.v=jC.isEnabled;bU.Dm(eO.v.Fltr.v,0,[Math.round(iM*180/Math.PI),Math.round((i5-1)*100),0]);
|
|
F.push(eO)}if(iU!=0||gK!=1){var eO=hw.gn("brit",{});eO.v.enab.v=jC.isEnabled;gK=gK-1;if(gK>0)gK/=2;var fN=eO.v.Fltr.v;
|
|
fN.Brgh.v=Math.round(iU*255);fN.Cntr.v=Math.round(gK*255);fN.useLegacy.v=!0;F.push(eO)}}}if(L){var dx=hE.patternFillType;
|
|
if(dx==3){var ai=j.rect.e/j.rect.Z,hO=i.e/i.Z;if(ai<hO){D.translate(-(i.e*(1-ai/hO))/2,0);D.scale(hO/ai,1)}else{D.translate(0,-(i.Z*(1-hO/ai))/2);
|
|
D.scale(1,ai/hO)}}}i.x=i.y=0;var ff=N.H.Fb(i).s;D.uA();N.H.A(ff,D,ff);j.add.SoLd.Trnf=a.Q.m3(ff);j.add.SoLd.nonAffineTransform=a.Q.m3(ff);
|
|
j.KF(h,!1)}else if(R=="text"){if(U.attributedString==null)continue;var eP=D.clone(),a0,bM,am=0;eP.uA();
|
|
eP.S4=eP.Bq=Math.min(eP.S4,eP.Bq);j.add.lnsr="rend";j.add.TySh=gf.hN(0,0);j.add.TySh.Ik=new gj(0,0,i.e,i.Z);
|
|
j.add.TySh.A=eP;var cV=U.attributedString;if(cV.archivedAttributedString)cV=cV.archivedAttributedString;
|
|
var aX=cV.NSString;if(aX==null)aX=cV.string;if(aX==null)aX="";if(aX["NS.string"])aX=aX["NS.string"];
|
|
if(I[U.do_objectID]!=null)aX=I[U.do_objectID];var j8=P.Ol(q,U.do_objectID+"_stringValue");if(j8)aX=j8.value;
|
|
if(cV.attributes!=null){a0=[];bM=[];var j3=cV.attributes;for(var Q=0;Q<j3.length;Q++){a0.push(j3[Q].length,Q);
|
|
bM.push(j3[Q].attributes)}}else if(cV.NSAttributeInfo==null){a0=[aX.length,0];bM=[cV.NSAttributes]}else{a0=cV.NSAttributeInfo["NS.data"];
|
|
bM=cV.NSAttributes;a0=gq.ana(a0,bM)}for(var Q=0;Q<a0.length;Q+=2)am+=a0[Q];if(am!=aX.length){while(am>aX.length){a0[a0.length-2]--;
|
|
am--;if(a0[a0.length-2]==0){a0.pop();a0.pop()}}a0[a0.length-2]+=aX.length-am}aX=aX.replace(/\u2028/g,"\n");
|
|
aX=aX.replace(/\u2029/g,"\n");aX=aX.replace(/\r/g,"\n");var fG=j.add.TySh.MW;gf.XK(fG,0,aX);if(aX!=""){var bw=U.textBehaviour,fz=z.textStyle,c6=fz?fz.verticalAlignment:0,hk=P.akm(fG,a0,bM,aX),c=eP.Nc(),as=gf.Ql(fG,0,1),j1=0;
|
|
if(as.D4.Font){var bf=as.Vt[as.D4.Font].Name;if(bf=="FontAwesome"||bf=="Ionicons")hk*=.87}var gW=as.D4.AutoLeading?0:as.D4.Leading*.6,bZ=Math.max(hk,gW)*c,iL=i.e,jI=i.Z;
|
|
if(bw==0){gf.fN(fG,0);var e2=gf.jT(as.MR);if(e2==1)j1=iL*c;if(e2==2)j1=iL*c*.5;if(c6==0)bZ*=1;else bZ*=.9}else{gf.fN(fG,1);
|
|
gf.hz(fG,[0,0,Math.round(iL),Math.round(jI)]);if(bw==2&&c6==0)bZ=bZ*.2;else if(bw==2&&c6==1){bZ=c*.5*(jI-as.D4.FontSize)}else if(bw==1&&c6==0)bZ=bZ*.2;
|
|
else bZ=bZ*.35}j.add.TySh.A.translate(j1,bZ)}}else if(R=="symbolInstance"||R=="symbolMaster"){var dV=U.symbolID;
|
|
if(I[U.do_objectID])dV=I[U.do_objectID].symbolID;var ds=P.Ol(q,U.do_objectID+"_symbolID");if(ds)dV=ds.value;
|
|
if(dV=="")continue;var ij={};for(var o in I)ij[o]=I[o];if(U.overrides)for(var o in U.overrides)ij[o]=U.overrides[o];
|
|
var dg=q.slice(0);if(U.overrideValues)dg=dg.concat(U.overrideValues);var iT=p[dV];if(iT==null){console.log("Unknown master master",U.symbolID);
|
|
continue}var ej=gq.El(iT.TW.frame),eH=ej.e/i.e,d4=ej.Z/i.Z,jy=D.clone();jy.scale(eH,d4);j.add.lsct=i1.O_;
|
|
j.oO="pass";j.S5=24;j.NN(U.isVisible);h.g.push(h.Iq());var iR=iT.TW;if(h.CE.indexOf(iR)==-1){h.CE.push(iR);
|
|
P.il(iR.layers,h,jy,k,p,ij,dg);h.CE.pop()}}else if(R=="slice"){console.log("slice layers are ignored by now");
|
|
continue}else{console.log("unknown layer type: "+R,U);continue}if(z&&z.contextSettings){var cD=z.contextSettings,cA=cD.blendMode;
|
|
if(cA<P.Pn.length){j.oO=hd.wl[hd.iR.indexOf(P.Pn[cA])];if(b&&j.oO=="norm")j.oO="pass"}j.opacity=Math.round(j.opacity*cD.opacity)}if(d!=null){j.add.lmfx=d}h.g.push(j);
|
|
if(U.hasClippingMask&&W.length>1){t.push(j);h.g.push(h.Iq())}}while(t.length!=0)P.fU(t.pop(),h)};gq.Ol=function(W,h){for(var Q=0;
|
|
Q<W.length;Q++)if(W[Q].overrideName.startsWith(h))return W[Q]};gq.ana=function(W,h){var S=0,k=[];while(S+1<W.length){var p=W[S];
|
|
S++;if(p>127){p+=128*(W[S]-1);S++;if(W[S-1]>127){p+=128*(W[S]-1);S++}}var I=W[S];S++;k.push(p,I)}return k};
|
|
gq.akm=function(W,h,S,k){var p=gq,I=0,U=0,i=0;for(var Q=0;Q<k.length;Q++){var q=k.charCodeAt(Q),P=1473<=q&&q<=1479||1488<=q&&q<=1514||1520<=q&&q<=1524,t=1569<=q&&q<=1594||1600<=q&&q<=1749;
|
|
if(P||t)I++}var M=I>k.length/2;for(var Q=0;Q<h.length;Q+=2){var z=h[Q],x=14,d="DejaVuSans";if(z==0)continue;
|
|
var D=h[Q+1],R=S[D],O=gf.Ql(W,U,U+z-1),b=R.NSColor;if(b==null){var b=R.MSAttributedStringColorDictionaryAttribute;
|
|
if(b==null)b=R.MSAttributedStringColorAttribute;if(b==null)b="0 0 0";else b=[b.red,b.green,b.blue].join(" ")}else if(p.pM(b)=="MSArchivedColor")b=b.dr+" "+b.dg+" "+b.db;
|
|
else if(b.NSRGB){b=b.NSRGB;b=G.dP(b,0,b.length-1)}else if(b.NSCMYK){b=b.NSCMYK;b=G.dP(b,0,b.length-1);
|
|
b=b.split(" ").map(parseFloat);var w=1-b[0],A=1-b[1],g=1-b[2],E=1-b[3];b=w*E+" "+A*E+" "+g*E}else if(b.NSWhite){b="1 1 1"}b=b.split(" ");
|
|
O.D4.FillColor={Type:1,Values:[1,parseFloat(b[0]),parseFloat(b[1]),parseFloat(b[2])]};var L=R.MSAttributedStringFontAttribute;
|
|
if(R.NSFont){x=R.NSFont.NSSize;d=R.NSFont.NSName}else if(L){if(L.attributes){L=L.attributes;x=L.size;
|
|
d=L.name}else{var _=L.NSFontDescriptorAttributes;if(_==null)_=L.UIFontDescriptorAttributes;L=_;x=L.NSFontSizeAttribute;
|
|
d=L.NSFontNameAttribute}if(d==null)d="DejaVuSans"}var i=Math.max(i,x);O.D4.FontSize=Math.round(x);gf.jq(O,d);
|
|
var T=R.NSKern;if(T==null)T=R.kerning;if(T!=null)O.D4.Tracking=Math.round(1e3*T/x);if(R.NSUnderline!=null)O.D4.Underline=R.NSUnderline>0;
|
|
var c=R.NSStrikethrough;if(c==null)c=R.strikethroughStyle;if(c!=null)O.D4.Strikethrough=c>0;if(R.MSAttributedStringTextTransformAttribute==1)O.D4.FontCaps=2;
|
|
var e=R.NSParagraphStyle;if(e==null)e=R.paragraphStyle;if(e){var r=e.paragraphSpacing;if(r!=null){O.MR.SpaceAfter=r}var B=e.NSAlignment;
|
|
if(B==null)B=e.alignment;if(B!=null){var F=0;if(!1){}else if(B==1)F=1;else if(B==2)F=2;else if(B==4)F=0;
|
|
else{F=B;console.log("unknown align",B)}if(M&&F<2)F=1-F;O.MR.Justification=F}var v=e.NSMinLineHeight;
|
|
if(v==null)v=e.minimumLineHeight;if(v!=null){O.D4.AutoLeading=!1;O.D4.Leading=v}}O.MR._Direction=M?1:0;
|
|
gf.$n(W,U,U+z,O);U+=z}return i};gq.adf=function(W,h,S,k,p,I,q){var P=gq,t=JSON.parse(hz.default),M=!1;
|
|
for(var Q=0;Q<hz.order.length;Q++)t[hz.BN[Q]]={t:"VlLs",v:[]};var U=S.fills,i=P.CH(W,U,k,p,I,h);for(var z=0;
|
|
z<2;z++){var D=S[["shadows","innerShadows"][z]];if(D==null)continue;var R=["DrSh","IrSh"][z],O=hz.BN[hz.order.indexOf(R)];
|
|
for(var Q=0;Q<D.length;Q++){var b=D[Q];if(!b.isEnabled)continue;if(b.contextSettings.opacity==0||b.color.alpha==0)continue;
|
|
var w=JSON.parse(hz.Au[hz.order.indexOf(R)]);t[O].v.unshift({t:"Objc",v:w});M=!0;w.Clr.v=P.Vo(b.color);
|
|
w.blur.v.val=Math.round(b.blurRadius/p.Nc());var A=p.clone();A.y8=A.S8=0;A.uA();var g=A.xK(new eC(b.offsetX,b.offsetY)),E=Math.sqrt(g.x*g.x+g.y*g.y);
|
|
w.Dstn.v.val=Math.round(E);w.lagl.v.val=Math.round(Math.atan2(g.y,-g.x)*(180/Math.PI));if(w.layerConceals)w.layerConceals.v=i.length!=0;
|
|
P.B9(b,w)}}var j=S.borders;if(j!=null&&(i.length==0||S.blur==null||!S.blur.isEnabled))for(var Q=0;Q<j.length;
|
|
Q++){var x=j[Q];if(!x.isEnabled)continue;var w=JSON.parse(hz.Au[hz.order.indexOf("FrFX")]),O=hz.BN[hz.order.indexOf("FrFX")];
|
|
t[O].v.unshift({t:"Objc",v:w});M=!0;w.Clr.v=P.Vo(x.color);if(x.fillType!=0&&x.gradient){var d=P.lY(x.gradient,k,p,I),L=["Type","Angl","Ofst","Scl"];
|
|
for(var Q=0;Q<L.length;Q++)w[L[Q]]=d[L[Q]];w.Grad.v=d.Grad.v;w.PntT.v.FrFl="GrFl"}w.Sz.v.val=x.thickness/p.Nc();
|
|
w.Styl.v.FStl=["CtrF","InsF","OutF"][x.position];P.B9(x,w)}for(var Q=q?1:0;Q<i.length;Q++){var _=i[Q],O=hz.BN[hz.order.indexOf(_.type)];
|
|
t[O].v.unshift(_.k);M=!0}return M?t:null};gq.CH=function(W,h,S,k,p,I,q){if(h==null)return[];var P=gq,t=[];
|
|
for(var Q=0;Q<h.length;Q++)if(h[Q].isEnabled)t.push(h[Q]);h=t;var M=[];for(var Q=0;Q<h.length;Q++){var U=h[Q],i=null,z=null;
|
|
if(U.fillType==0){i="SoFi";var D=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]);z={t:"Objc",v:D};z.v.Clr.v=P.Vo(U.color)}else if(U.fillType==1){i="GrFl";
|
|
z={t:"Objc",v:P.lY(U.gradient,S,k,p)}}else if(U.fillType==4&&U.image!=null){var R=U.image;if(q)R=q.value;
|
|
var O=hI._e(R.bdata.buffer);if(O!=null&&O!="pdf"&&O!="eps"){var b,x=0,d=0,L=0;if(I.GN[R.key])b=I.GN[R.key];
|
|
else{var w=hI.J$(O).uc(R.bdata)[0],A=w.rc.clone();b={};b.id=jg.bm()+"-d71c-11e5-b1ae-a548a96e5f9f";b.name="someImage";
|
|
b.jR=[new Uint8Array(w.data),A];I.WX(b);I.GN[R.key]=b}var g=b.jR[1],D=JSON.parse(hz.Au[hz.order.indexOf("patternFill")]);
|
|
i="patternFill";z={t:"Objc",v:D};var E=U.patternFillType,j=U.patternTileScale;D.Algn.v=!0;D.Ptrn.v.Idnt.v=b.id;
|
|
if(E==0){x=j*g.e/Math.min(g.e,g.Z);d=-k.y8;L=-k.S8}else{x=Math.max(S.e/g.e,S.Z/g.Z);d=-k.y8-(g.e*x-S.e)/2;
|
|
L=-k.S8-(g.Z*x-S.Z)/2}D.Scl.v.val=100*x*(1/k.Nc());D.phase.v.Hrzn.v=Math.round(d/k.Nc());D.phase.v.Vrtc.v=Math.round(L/k.Nc())}}else if(U.fillType==5){console.log("fill type Noise not supported yet")}else console.log("unknown fill type",U.fillType);
|
|
if(i!=null){P.B9(U,z.v);M.push({type:i,k:z})}}return M};gq.a6c=function(W){var h=gq,S=new gj(0,0,1,1);
|
|
W=W.slice(0);while(!0){var k=!1;for(var Q=0;Q<W.length-1;Q++){var p=W[Q],I=W[Q+1],q=null,P=p.contextSettings;
|
|
if(p.fillType==0&&(P==null||P.opacity==1&&P.blendMode==0)&&p.color.alpha==1){var t="norm",M=1,P=I.contextSettings;
|
|
if(P){M=P.opacity;t=hd.Gl(h.Pn[P.blendMode])}if(I.fillType==0){q=JSON.parse(JSON.stringify(I));h.kA(q.color,p.color,q.color,S,t,M)}if(I.fillType==1){q=JSON.parse(JSON.stringify(I));
|
|
var U=q.gradient.stops;for(var i=0;i<U.length;i++)h.kA(U[i].color,p.color,U[i].color,S,t,M)}if(q!=null&&q.contextSettings){var P=q.contextSettings;
|
|
P.opacity=1;P.blendMode=0}}if(q!=null){W.splice(Q,0,q);k=!0;break}}if(!k||W.length<2)break}return W};
|
|
gq.kA=function(W,h,S,k,p,I){var q=gq,P=N.U(4);q.uk(W,P);var t=N.U(4);q.uk(h,t);N.a.ha(p,P,k,t,k,k,I);
|
|
q.am5(t,S)};gq.uk=function(W,h){h[0]=255*W.red;h[1]=255*W.green;h[2]=255*W.blue;h[3]=255*W.alpha};gq.am5=function(W,h){h.red=W[0]/255;
|
|
h.green=W[1]/255;h.blue=W[2]/255;h.alpha=W[3]/255};gq.fU=function(W,h){W=W.clone();W.S5=24;W.hq("Mask by "+W.getName());
|
|
h.g.push(W);W.add.lsct=i1.wY;W.add.lyid=h.sY();delete W.add.lmfx;delete W.add.SoCo;delete W.add.GdFl;
|
|
delete W.add.PtFl;delete W.add.iOpa;if(W.add.vmsk)W.add.vmsk.VT=!0;W.r9(h);if((W.S5&16)==16)W.S5-=16;
|
|
if((W.S5&2)==2)W.S5-=2;W.oO="pass";W.opacity=255};gq.Pn="Nrml Drkn Mltp CBrn Lghn Scrn CDdg Ovrl SftL HrdL Dfrn Xclu H Strt Clr Lmns linearBurn linearDodge".split(" ");
|
|
gq.lY=function(W,h,S,k){S=S.clone();S.uA();S.y8=S.S8=0;var p=S.Nc(),z=0,D=0;S.scale(1/p,1/p);var I=gq,q=JSON.parse(hz.Au[hz.order.indexOf("GrFl")]),P=q.Grad.v;
|
|
P.Intr.v=0;if(W==null)return q;var t=W.gradientType,M=I.X$(W.from),U=I.X$(W.to);M.offset(-.5,-.5);U.offset(-.5,-.5);
|
|
M=S.xK(M);U=S.xK(U);var i=Math.atan2(-(U.y-M.y),U.x-M.x);q.Type.v.GrdT=["Lnr","Rdl","Angl"][t];q.Scl.v.val=100*eC.fa(M,U);
|
|
if(t==0){q.Angl.v.val=180/Math.PI*i;q.Scl.v.val=100*eC.fa(M,U);z=(M.x+U.x)/2;D=(M.y+U.y)/2}if(t==1){q.Scl.v.val=200*eC.fa(M,U);
|
|
z=M.x;D=M.y}if(t==2){q.Angl.v.val=180/Math.PI*(i-Math.PI/2)}var R=q.Ofst.v;R.Hrzn.v.val=z*100;R.Vrtc.v.val=D*100;
|
|
var O=[];for(var Q=0;Q<W.stops.length;Q++){var b=W.stops[Q],w=b.color;O.push([b.position,w?[w.red,w.green,w.blue]:[0,0,0],w.alpha])}N.X.J6(O,P);
|
|
return q};gq.B9=function(W,h){var S=gq,k=1,p=W.contextSettings;if(p!=null){h.Md.v.BlnM=S.Pn[p.blendMode];
|
|
k*=p.opacity}else h.Md.v.BlnM=S.Pn[0];h.enab.v=W.isEnabled;if(h.uglg!=null)h.uglg.v=!1;if(W.color!=null)k*=W.color.alpha;
|
|
h.Opct.v.val=Math.round(k*100)};gq.Vo=function(W){return N.X.hg(W?{p:W.red*255,z:W.green*255,S:W.blue*255}:{p:0,z:0,S:0})};
|
|
gq.eV=function(W,h,S){var k=gq,p=[{type:6},{type:8,all:0}];for(var I=0;I<W.length;I++){var q=W[I],P=q.booleanOperation,t=0,M=q._class,O=!1;
|
|
if(M=="group"||M=="text"||M=="symbolInstance"||M=="slice"){console.log(M+" inside ShapeGroup");continue}if(P==-1)t=0;
|
|
else if(P==0)t=1;else if(P==1)t=2;else if(P==2)t=3;else if(P==3)t=0;if(I==0)t=1;var U=gq.El(q.frame),i=k.GP(q,h),z=q.path?q.path:q,D=[{type:0,length:0,VZ:t,pt:2,eN:0,w9:0}],R=z.points;
|
|
for(var Q=0;Q<R.length;Q++){var b=R[Q],w=k.X$(b.curveTo),A=k.X$(b.point),g=k.X$(b.curveFrom);O=O||b.hasCurveFrom&&!g.xX(A)||b.hasCurveTo&&!w.xX(A)}var E=[];
|
|
if(!O){var j=[],g8=R.length;if(g8==0)continue;for(var Q=0;Q<g8;Q++){E[Q]=R[Q].cornerRadius;var b=k.X$(R[Q].point);
|
|
j.push(b.x,b.y)}i.scale(1/U.e,1/U.Z);i.uA();N.H.A(j,i,j);D=N.$.Te.C4(j,E).slice(2)}else{var x=R.length;
|
|
D[0].length=x;for(var Q=0;Q<x;Q++){var b=R[Q],d=b.curveMode,L=k.X$(b.point);D[1+Q]={type:d==2||d==4?1:2,bq:b.hasCurveTo?k.X$(b.curveTo):L.clone(),M:L,tk:b.hasCurveFrom?k.X$(b.curveFrom):L.clone()}}i.scale(1/U.e,1/U.Z);
|
|
i.uA();N.$.ac(D,i);var E=[];for(var Q=0;Q<x;Q++){var b=R[Q],d=b.curveMode,_=b.cornerRadius;if(d==1&&_!=0)E.push(_);
|
|
else E.push(0)}}if(!z.isClosed)for(var Q=0;Q<D.length;Q++)D[Q].type+=3;p=p.concat(D);var T=N.uy.$o(),c=k.pM(q);
|
|
if(i.S==0&&i.ZB==0){var e=i.y8,r=i.S8,B=e+i.S4,F=r+i.Bq,v=[e,r,B,F];if(c=="rectangle"&&E.length==4)T=N.uy.sv(2,v,E);
|
|
if(c=="oval")T=N.uy.sv(5,v)}S.push(T)}return p};gq.GP=function(W,h){var S=h.clone(),k=W.frame?gq.El(W.frame):null;
|
|
if(k)S.translate(-k.x-k.e/2,-k.y-k.Z/2);if(W.isFlippedHorizontal)S.scale(-1,1);if(W.isFlippedVertical)S.scale(1,-1);
|
|
S.rotate(-W.rotation*(Math.PI/180));if(k)S.translate(k.e/2,k.Z/2);return S};gq.X$=function(W){W=W.slice(1,W.length-1).split(",");
|
|
return new eC(parseFloat(W[0]),parseFloat(W[1]))};gq.El=function(W){return new gj(W.x,W.y,W.width,W.height)};
|
|
gq.Xn=function(W){return{_class:"rect",constrainProportions:!1,x:W.x,y:W.y,width:W.e,height:W.Z}};function c1(){}c1.D9=function(W,h){var S=Date.now(),k=c1,p=UZIP.parse(W),I=JSON.parse(G.Md(p.manifest)),q=JSON.parse(G.Md(p["resources/graphics/graphicContent.agc"])).resources,P=[],t=I.children;
|
|
for(var Q=0;Q<t.length;Q++){var M=t[Q];if(M.name=="artwork"){var U=M.children;for(var i=0;i<U.length;
|
|
i++)if(U[i]["uxdesign#bounds"]){var z=U[i],D=JSON.parse(G.Md(p["artwork/"+z.path+"/graphics/graphicContent.agc"]));
|
|
if(D.children.length!=1)throw"e";z._node=D.children[0];P.push(z)}}}var R=[],O=new gj;for(var Q=0;Q<P.length;
|
|
Q++){var z=P[Q],b=gq.El(z["uxdesign#bounds"]);R.push(b);O=O.r8(b)}var w=gq.GK(O,8192*8192);h.rd=!0;h.e=Math.round(O.e/w);
|
|
h.Z=Math.round(O.Z/w);h.buffer=N.U(h.e*h.Z*4);h.xs(P.length);var A=new ex(w,0,0,w,O.x,O.y);h.GN={};for(var Q=0;
|
|
Q<P.length;Q++){var z=P[Q],b=gq.El(z["uxdesign#bounds"]),g=z._node,E=A.clone(),j=b.clone(),x=E.Nc();
|
|
E.translate(-b.x,-b.y);j.x=-Math.floor(E.y8/x);j.y=-Math.floor(E.S8/x);j.e=Math.floor(j.e/x);j.Z=Math.floor(j.Z/x);
|
|
E.translate(b.x,b.y);c1.oL(g,h,E,q,p,j);var d=h.g[h.g.length-1];d.hq(z.name);d.Si(j);if(Q!=P.length-1)d.add.lsct=i1.O_}delete h.GN};
|
|
c1.uL=function(W){if(W==null)return new ex;return new ex(W.a,W.b,W.c,W.d,W.tx,W.ty)};c1.oL=function(W,h,S,k,p,I){var q=c1,P=W.type,t=W[P],M=W.style,U=q.uL(W.transform),R,O="none",b,w="none",A,g;
|
|
U.uA();var i=S.clone();i.concat(U);var z=h.yA(),D=W.name;z.hq(D?D.slice(0,250):"Layer");if(W.visible!=null)z.NN(W.visible);
|
|
if(M){R=M.stroke;O=R?R.type:"none";b=M.fill;w=b?b.type:"none";A=M.filters;g=M.clipPath;if(g&&k.clipPaths[g.ref])g=k.clipPaths[g.ref].children;
|
|
else g=null;if(M.opacity)z.opacity=Math.round(255*M.opacity);if(w=="solid"&&b.color.alpha)z.opacity=Math.round(z.opacity*b.color.alpha);
|
|
if(A){z.add.lmfx=q.ahm(A);for(var Q=0;Q<A.length;Q++)if(A[Q].type=="uxdesign#blur"){var E=A[Q],j=E.params,x=j.brightnessAmount;
|
|
if(x==null)x=0;x=Math.abs(x/100);if((E.visible==null||E.visible==!0)&&j.backgroundEffect)z.opacity=Math.round(z.opacity*(x+(1-x)*j.fillOpacity))}}if(w=="pattern"&&b.pattern.meta.ux.uid=="")w="none"}if(g==null&&W.meta&&W.meta.ux&&W.meta.ux.clipPathResources)g=W.meta.ux.clipPathResources.children;
|
|
if(P=="artboard"||P=="group"){if(g){var d=g[0],L=d.shape,_=L!=null&&L.type=="rect"&&L.width*L.height>1e6;
|
|
if(d.type!="text"&&!_){if(L){var U=q.uL(d.transform);U.uA();var T=i.clone();T.concat(U);z.add.vmsk=new $.CP;
|
|
z.add.vmsk.T=q.eV(L);T=T.clone();T.uA();N.$.ac(z.add.vmsk.T,T);z.r9(h)}}else if(!_)alert("Clipping by text has been ignored")}z.add.lsct=i1.wY;
|
|
z.oO="pass";z.S5=24;if(W.visible!=null)z.NN(W.visible);h.g.push(h.Iq());var c=t.children,e=b;if(e)e=e.color;
|
|
if(e)e=e.value;if(b){if(P=="artboard"&&w=="solid"){z.Si(new gj(0,0,10,10));z.add.artb.Clr={t:"Objc",v:N.X.hg({p:e.r,z:e.g,S:e.b})};
|
|
z.add.artb.artboardBackgroundType={t:"long",v:4}}else{var r=h.yA();r.hq("BACKGROUND");r.S5|=16;r.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));
|
|
r.add.vmsk=new $.CP;r.add.vmsk.T=q.eV({type:"rect",x:I.x,y:I.y,width:I.e,height:I.Z});q.Nl(b,w,i,I,I,r,h,k,p);
|
|
r.r9(h);h.g.push(r)}}for(var Q=0;Q<c.length;Q++){c1.oL(c[Q],h,i,k,p,I)}}else if(P=="shape"&&W.shape.type=="rect"&&(W.shape.r==null||W.shape.r==0)&&w=="pattern"&&Math.abs(W.shape.width/W.shape.height-b.pattern.width/b.pattern.height)<.01){var B=b.pattern,F=B.meta.ux,v=F.uid,X=p["resources/"+v];
|
|
if(X==null){console.log(B);return}var V=h.vN(X,z.getName(),0,0);V.S5=z.S5;V.opacity=z.opacity;z=V;var H=N.H.Fb(new gj(0,0,B.width,B.height)).s,o=new ex;
|
|
o.scale(B.width/W.shape.width,B.height/W.shape.height);if(F.offsetX)o.translate(-F.offsetX*B.width,0);
|
|
if(F.offsetY)o.translate(0,-F.offsetY*B.height);i.concat(o);i.uA();N.H.A(H,i,H);z.add.SoLd.Trnf=a.Q.m3(H);
|
|
z.add.SoLd.nonAffineTransform=a.Q.m3(H);z.KF(h,!1)}else if(P=="shape"){z.S5|=16;z.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));
|
|
z.add.vmsk=new $.CP;z.add.vmsk.T=q.eV(t);var J=N.$.E6(z.add.vmsk.T,null),T=i.clone();T.uA();N.$.ac(z.add.vmsk.T,T);
|
|
var C=N.$.E6(z.add.vmsk.T,null);if(O=="none"){}else{var Y=R.color.value,K,u;K="SoFi";var f=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]);
|
|
u={t:"Objc",v:f};u.v.Clr.v=N.X.hg({p:Y.r,z:Y.g,S:Y.b});var l=R.align,jk=R.cap;if(l==null)l="center";
|
|
var hE=z.add.vstk;hE.strokeEnabled.v=!0;hE.strokeStyleLineWidth.v.val=R.width;if(l)hE.strokeStyleLineAlignment.v.strokeStyleLineAlignment=hz.EJ.tZ[["inside","center","outside"].indexOf(l)];
|
|
if(jk)hE.strokeStyleLineCapType.v.strokeStyleLineCapType=hz.EJ.zu[["butt","round","square"].indexOf(jk)];
|
|
var Z=["SoFi","GrFl","patternFill"].indexOf(K),aQ=[hz.RN,hz.Y1,hz.pd][Z];hE.strokeStyleContent.v={classID:hz.EJ.Dn[0]};
|
|
var jC=hE.strokeStyleContent.v={classID:hz.EJ.Dn[Z]};for(var Q=0;Q<aQ.length;Q++)jC[aQ[Q]]=u.v[aQ[Q]]}if(A)for(var Q=0;
|
|
Q<A.length;Q++)if(A[Q].type=="uxdesign#blur"&&A[Q].visible){var eO=A[Q];z.add.vmsk.JJ=eO.params.blurAmount}q.Nl(b,w,i,J,C,z,h,k,p);
|
|
z.r9(h)}else if(P=="text"&&W.text){var iU=W.text,gK=iU.frame,iM=M.font,i5=M.textAttributes,U=i.clone(),eP=0;
|
|
U.uA();z.add.lnsr="rend";z.add.TySh=gf.hN(0,0);z.add.TySh.Ik=new gj(0,0,100,100);z.add.TySh.A=U;var fN=z.add.TySh.MW,dx=iU.rawText.replace(/\r/g,"\n").replace(/\u000b/g,"\n");
|
|
gf.XK(fN,0,dx);if(dx!=""){var ai=gf.Ql(fN,0,1),hO=iM.postscriptName;if(hO==null)hO=iM.family;gf.jq(ai,hO);
|
|
ai.D4.FontSize=Math.round(iM.size);if(b){var Y=b.color.value;ai.D4.FillColor={Type:1,Values:[1,Y.r/255,Y.g/255,Y.b/255]}}if(i5){if(i5.paragraphAlign)ai.MR.Justification=["left","right","center"].indexOf(i5.paragraphAlign);
|
|
if(i5.letterSpacing)ai.D4.Tracking=Math.round(i5.letterSpacing);if(i5.lineHeight){ai.D4.AutoLeading=!1;
|
|
ai.D4.Leading=Math.round(i5.lineHeight)}}gf.$n(fN,0,dx.length,ai)}var ff=W.meta.ux.rangedStyles;if(ff)for(var Q=0;
|
|
Q<ff.length;Q++){var t=ff[Q],a0=Math.min(t.length,dx.length-eP),ai=gf.Ql(fN,eP,eP+a0),hO=t.postscriptName;
|
|
if(hO==null)hO=t.family;if(hO!=null)gf.jq(ai,hO);var bM=t.textScript,cV=t.underline,aX=t.fontSize,E=t.fill,j8=t.textTransform;
|
|
if(bM&&bM!="none")ai.D4.FontBaseline=bM=="superscript"?1:2;if(cV!=null)ai.D4.Underline=cV;if(aX!=null)ai.D4.FontSize=Math.round(aX);
|
|
if(j8!=null)ai.D4.FontCaps=j8=="uppercase"?2:0;if(E!=null){var j3=E.value;ai.D4.FillColor={Type:1,Values:[1,(j3>>>16&255)/255,(j3>>>8&255)/255,(j3>>>0&255)/255]}}gf.$n(fN,eP,eP+a0,ai);
|
|
eP+=a0}if(gK.type=="area"||gK.type=="autoHeight"){var am=gK.width,fG=gK.height;gf.fN(fN,1);gf.hz(fN,[0,0,am,fG!=null?fG:am*2])}}else console.log(P,W);
|
|
h.g.push(z)};c1.eV=function(W){var h=W.type,S=[{type:6},{type:8,all:0}];if(h=="rect"){var k=W.r,p=W.x,I=W.y,q=W.width,P=W.height;
|
|
S=N.$.Te.Rect(p,I,q,P,k?k:0)}else if(h=="circle"){var k=W.r;S=N.$.Te.dm(W.cx-k,W.cy-k,2*k,2*k)}else if(h=="ellipse"){var t=W.rx,M=W.ry;
|
|
S=N.$.Te.dm(W.cx-t,W.cy-M,2*t,2*M)}else if(h=="path"||h=="compound"){var U=Typr.U.SVGToPath(W.path);
|
|
S=N.H.aD({C:U.cmds,s:U.crds},!1)}else if(h=="line"){var i=W.x1,z=W.x2,D=W.y1,R=W.y2;S=N.$.Te.C4([i,D,z,R],0,!0)}else if(h=="polygon"){var O=W.points,b=[];
|
|
for(var Q=0;Q<O.length;Q++)b.push(O[Q].x,O[Q].y);S=S.concat(N.$.Te.C4(b,0,!1).slice(2))}else console.log(h,W);
|
|
return S};c1.ahm=function(W){var h=JSON.parse(hz.default);for(var Q=0;Q<hz.order.length;Q++)h[hz.BN[Q]]={t:"VlLs",v:[]};
|
|
for(var Q=0;Q<W.length;Q++){var S=W[Q],k=S.type,p=S.params,I=S.visible;if(k=="dropShadow"){var q=hz.BN[hz.order.indexOf("DrSh")],P=JSON.parse(hz.Au[hz.order.indexOf("DrSh")]);
|
|
h[q].v.unshift({t:"Objc",v:P});var t=p.dropShadows;if(t.length!=1)throw"e";var M=t[Q],U=M.color,i=U.value,z=M.dx,D=M.dy;
|
|
P.Clr.v=N.X.hg({p:i.r,z:i.g,S:i.b});P.Opct.v.val=Math.round((U.alpha!=null?U.alpha:1)*100);P.uglg.v=!1;
|
|
P.enab.v=I!=null?I:!0;P.lagl.v.val=Math.round(180/Math.PI*Math.atan2(D,-z));P.Dstn.v.val=Math.round(Math.sqrt(z*z+D*D));
|
|
P.blur.v.val=Math.round(M.r*2.3)}}return h};c1.Nl=function(W,h,S,k,p,I,q,P,t){var M=c1;if(h=="none"){I.add.vstk.fillEnabled.v=!1;
|
|
I.add.SoCo={classID:"null",Clr:{t:"Objc",v:N.X.hg({p:0,z:0,S:0})}}}else{var U,i,z;if(h=="solid"){var D=W.color.value;
|
|
U="SoCo";i=hz.RN;var R=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]);z={t:"Objc",v:R};z.v.Clr.v=N.X.hg({p:D.r,z:D.g,S:D.b})}else if(h=="gradient"){U="GdFl";
|
|
i=hz.Y1;var R=JSON.parse(hz.Au[hz.order.indexOf("GrFl")]),O=R.Grad.v,E,j,x;O.Intr.v=0;var b=W[h],w=b.ref?P.gradients[b.ref]:b.meta.ux.gradientResources,A=["linear","radial"].indexOf(w.type),g=w.stops;
|
|
R.Type.v.GrdT=["Lnr","Rdl","Angl"][A];if(A==0){var E=new eC(b.x1,b.y1),j=new eC(b.x2,b.y2);E.x=j.x+.5*(E.x-j.x);
|
|
E.y=j.y+.5*(E.y-j.y)}else{var E=new eC(b.cx,b.cy),j=new eC(b.cx+b.r,b.cy)}x=p;if(b.units=="objectBoundingBox"){var d=new ex(k.e,0,0,k.Z,k.x,k.y);
|
|
E=d.xK(E);j=d.xK(j)}var d=M.uL(b.transform);E=d.xK(E);j=d.xK(j);d=S.clone();d.uA();E=d.xK(E);j=d.xK(j);
|
|
N.X.nA(E,j,x,R);var L=[];for(var Q=0;Q<g.length;Q++){var _=g[Q],T=_.color,D=T.value,c=T.alpha;if(c==null)c=1;
|
|
L.push([_.offset,[D.r/255,D.g/255,D.b/255],c])}N.X.J6(L,O);z={t:"Objc",v:R}}else if(h=="pattern"){U="PtFl";
|
|
i=hz.pd;var R=JSON.parse(hz.Au[hz.order.indexOf("patternFill")]),X,Y=1,K=0,u=0,f=1;z={t:"Objc",v:R};
|
|
var e=W[h],r=e.meta.ux,B=r.uid,F=t["resources/"+B].buffer,v=hI._e(F);if(q.GN[B])X=q.GN[B];else{var V=new gj(0,0,e.width,e.height),H;
|
|
if(V.ZP()){V=new gj(0,0,1,1);H=new ArrayBuffer(4)}else{var o=hI.J$(v);if(o.gJ){var J=new jg;o.uc(F,J);
|
|
H=J.jc().buffer}else{var C=o.uc(F)[0];H=C.data;V=C.rc}}X={};X.id=jg.bm()+"-d71c-11e5-b1ae-a548a96e5f9f";
|
|
X.name="someImage";X.jR=[new Uint8Array(H),V];q.WX(X);q.GN[B]=X}var V=X.jR[1];R.Algn.v=!0;R.Ptrn.v.Idnt.v=X.id;
|
|
if(r.scaleBehavior=="cover"){Y=f*Math.max(p.e/V.e,p.Z/V.Z);var l=Y;if(r.scale!=null)Y*=r.scale;K=p.x-(V.e*Y-p.e)/2;
|
|
u=p.y-(V.Z*Y-p.Z)/2;if(r.offsetX!=null)K+=r.offsetX*V.e*l;if(r.offsetY!=null)u+=r.offsetY*V.Z*l}else if(r.scaleBehavior=="fill"){Y=f*Math.min(p.e,p.Z)/Math.max(V.e,V.Z);
|
|
K=p.x-(V.e*Y-p.e)/2;u=p.y-(V.Z*Y-p.Z)/2}else throw"Unknown scale behaviour";R.Scl.v.val=100*Y;R.phase.v.Hrzn.v=Math.round(K);
|
|
R.phase.v.Vrtc.v=Math.round(u)}else console.log(h);if(U!=null){I.add[U]={classID:"null"};for(var Q=0;
|
|
Q<i.length;Q++){var jk=i[Q];I.add[U][jk]=z.v[jk]}}}};function e6(){}e6.D9=function(W,h,S){W=new Uint8Array(W);
|
|
var k=G.Md(W,0,W.length),p=new DOMParser,I=p.parseFromString(k,"image/svg+xml"),q=I.getElementsByTagName("style")[0],D=1;
|
|
if(q)q=Typr.U.SVG.cssMap(q.textContent);else q={};var P=I.firstChild;while(P.tagName!="svg")P=P.nextSibling;
|
|
var t=new gj(0,0,100,100),M=P.getAttribute("viewBox"),U=P.getAttribute("width"),i=P.getAttribute("height");
|
|
if(M){var z=e6.$W(M);t.x=z[0];t.y=z[1];t.e=z[2];t.Z=z[3]}else if(U!=null||i!=null){t.e=U!=null?parseFloat(U):parseFloat(i);
|
|
t.Z=i!=null?parseFloat(i):parseFloat(U)}t=N.H.No(t);while(S&&Math.max(t.e*D,t.Z*D)<Math.max(S[0],S[1]))D++;
|
|
while(S==null&&Math.max(t.e,t.Z)*D>8192)D*=.5;h.rd=!0;h.e=~~(t.e*D);h.Z=~~(t.Z*D);h.buffer=N.U(h.e*h.Z*4);
|
|
var R=new ex(D,0,0,D,-t.x*D,-t.y*D),O={dS:e6.wu(P),aaw:q};e6.$A(I,P.children,h,R,O,new ex,0);if(h.g.length==0){var b=h.yA();
|
|
b.hq("Layer");h.g.push(b)}};e6.$W=function(W){var h=" ";if(W.indexOf(",")!=-1)h=",";return W.split(h).map(parseFloat)};
|
|
e6.$A=function(W,h,S,k,p,I,q){var P=e6,t=["display","opacity","fill-opacity"];for(var M=0;M<h.length;
|
|
M++){var U=h[M],i=U.tagName,z=U.getAttribute("id"),D=P.wu(U,p.aaw),O=13,E=1,d="clip-path",L=null;for(var R in p.dS)if(t.indexOf(R)==-1&&D[R]==null)D[R]=p.dS[R];
|
|
if(D["font-size"])O=P.g_(D["font-size"],O);if(U.getAttribute("dx"))k.y8+=P.g_(U.getAttribute("dx"),O);
|
|
if(U.getAttribute("dy"))k.S8+=P.g_(U.getAttribute("dy"),O);var b=P.UC(U);b.concat(k);var w=U.getAttribute("visibility"),A=D.display,g=S.yA();
|
|
if(w=="hidden"||A=="none")g.NN(!1);g.hq(z!=null?z.split(":::")[0]:"Layer");if(D.opacity)E*=parseFloat(D.opacity);
|
|
if(D["fill-opacity"]){var j=parseFloat(D["fill-opacity"]);if(j!=0)E*=j}g.opacity=Math.round(255*E);if(D["mix-blend-mode"]){var x=hd.BX.indexOf(D["mix-blend-mode"]);
|
|
if(x!=-1)g.oO=hd.wl[x]}if(U.getAttribute(d)==null)d="mask";if(U.getAttribute(d)!=null){var _=U.getAttribute(d);
|
|
_=_.slice(4,_.length-1);var T=W.getElementById(_.slice(1));if(T){var c=T.children;L=S.yA();L.hq("Clip-Path"+(z?": "+z:""));
|
|
L.add.lsct=q<2?i1.wY:i1.O_;L.oO="pass";L.S5=24;var e=L.add.vmsk=new $.CP;S.g.push(S.Iq());var r=[];if(T.getAttribute(d)){var _=T.getAttribute(d);
|
|
_=_.slice(4,_.length-1);r=W.getElementById(_.slice(1)).children}for(var Q=0;Q<c.length;Q++){var B=P.UC(c[Q]);
|
|
B.concat(b);var F=P.eV(W,c[Q],!1).slice(2);N.$.ac(F,B);e.T=e.T.concat(F)}for(var Q=0;Q<r.length;Q++){var B=P.UC(c[Q]);
|
|
B.concat(b);var F=P.eV(W,r[Q],!1).slice(2);for(var v=0;v<F.length;v++)if(F[Q].VZ!=null)F[Q].VZ=3;N.$.ac(F,B);
|
|
e.T=e.T.concat(F)}L.lq();L.r9();q++}}if(i=="g"||i=="a"||i=="svg"||i=="switch"||(i=="text"||i=="textPath")&&U.children.length>0){if(i=="text")I=P.VO(U,I);
|
|
var X=U.getAttribute("viewBox"),V=U.getAttribute("width"),H=U.getAttribute("height");if(X&&V&&H){var o=e6.$W(X),J=P.VO(U),C=new ex;
|
|
C.translate(-o[0],-o[1]);C.scale(parseFloat(V)/o[2],parseFloat(H)/o[3]);C.translate(J.y8,J.S8);C.concat(b);
|
|
b=C}var Y=U.children.length,K=p.dS;p.dS=D;var u=i!="text"&&i!="textPath"||Y>1;if(u){var f=g.jP();g.add.lsct=q<2&&f&&(z==null||!z.endsWith(":::"))?i1.wY:i1.O_;
|
|
g.oO="pass";g.S5=24;g.NN(f);S.g.push(S.Iq())}P.$A(W,U.children,S,b,p,I,q+1);if(u)S.g.push(g);else{var l=S.g[S.g.length-1];
|
|
l.opacity=g.opacity;l.oO=g.oO}p.dS=K}else if(i=="use"){var C=P.VO(U);C.concat(b);var jk=P.R$(U),hE=W.getElementById(jk.slice(1)),K=p.dS;
|
|
p.dS=D;P.$A(W,[hE],S,C,p,I,q+1);p.dS=K}else if(i=="path"||i=="rect"||i=="circle"||i=="ellipse"||i=="polygon"||i=="polyline"||i=="line"){g.S5|=16;
|
|
g.add.vmsk=new $.CP;g.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));g.add.vstk.strokeEnabled.v=!1;
|
|
var Z=g.add.vstk,e=g.add.vmsk,aQ=D.fill,jC=aQ=="none"||D["fill-opacity"]&&parseFloat(D["fill-opacity"])==0;
|
|
e.T=P.eV(W,U,D["fill-rule"]=="evenodd",jC);N.$.ac(e.T,b);var eO=N.$.E6(e.T),iU=D.stroke,gK=D["stroke-width"],iM=D["stroke-dasharray"],i5=D["stroke-linejoin"],fN=D["stroke-linecap"],dx=D["paint-order"];
|
|
if(iU==null||iU=="none"||iU=="null"){}else{var ai=P.DZ(W,iU,b,eO),hO=["SoFi","GrFl","patternFill"].indexOf(ai.type),ff=ai.k.v.Opct.v,bM=1;
|
|
if(ff.val!=100){g.opacity=Math.round(g.opacity*ff.val/100);ff.val=100}var eP=[hz.RN,hz.Y1,hz.pd][hO],a0=Z.strokeStyleContent.v={classID:hz.EJ.Dn[hO]};
|
|
for(var Q=0;Q<eP.length;Q++)a0[eP[Q]]=ai.k.v[eP[Q]];gK=gK?parseFloat(gK):1;if(dx&&dx.replace(/\s\s+/g," ").slice(0,11)=="stroke fill"){bM=2;
|
|
gK/=2}Z.strokeEnabled.v=!0;if(i5)Z.strokeStyleLineJoinType.v.strokeStyleLineJoinType=hz.EJ.join[["miter","round","bevel"].indexOf(i5)];
|
|
if(fN)Z.strokeStyleLineCapType.v.strokeStyleLineCapType=hz.EJ.zu[["butt","round","square"].indexOf(fN)];
|
|
Z.strokeStyleLineWidth.v.val=gK*a.Q.Nc(b);Z.strokeStyleLineAlignment.v.strokeStyleLineAlignment=hz.EJ.tZ[bM];
|
|
Z.strokeStyleOpacity.v.val=100*(D["stroke-opacity"]?parseFloat(D["stroke-opacity"]):1);if(iM!=null&&iM!="none")Z.strokeStyleLineDashSet.v=jO.rq(iM.split(",").map(parseFloat),1/gK)}if(jC){g.add.vstk.fillEnabled.v=!1;
|
|
g.add.SoCo={classID:"null",Clr:{t:"Objc",v:N.X.hg({p:0,z:0,S:0})}}}else{var ai=P.DZ(W,aQ,b,eO),cV=null,aX=null;
|
|
if(ai.type=="SoFi"){cV="SoCo";aX=hz.RN}if(ai.type=="GrFl"){cV="GdFl";aX=hz.Y1}if(ai.type=="patternFill"){cV="PtFl";
|
|
aX=hz.pd}if(cV!=null){var ff=ai.k.v.Opct.v;if(ff.val!=100){g.opacity=Math.round(g.opacity*ff.val/100);
|
|
ff.val=100}g.add[cV]={classID:"null"};for(var Q=0;Q<aX.length;Q++){var R=aX[Q];g.add[cV][R]=ai.k.v[R]}}}if(D.filter&&D.filter!="none"){var j8=D.filter;
|
|
j8=j8.slice(5,j8.length-1);if(W.getElementById(j8)){var j3=W.getElementById(j8).children[0];if(j3.tagName=="feGaussianBlur"){g.add.vmsk.JJ=parseFloat(j3.getAttribute("stdDeviation"))*a.Q.Nc(b)}}}g.lq();
|
|
g.r9(S);S.g.push(g)}else if((i=="text"||i=="tspan")&&U.textContent!=""){I=P.VO(U,I);var C=I.clone(),gW=0;
|
|
C.concat(b);if(U.children.length>0){var am=P.wu(U.children[0],p.aaw);for(var R in am)if(t.indexOf(R)==-1)D[R]=am[R]}var fG=D["xml:space"],bw=U.textContent;
|
|
if(fG=="preserve")bw=bw.replace(/\t/g," ").replace(/\n/g," ");if(z==null)g.hq(bw);g.add.lnsr="rend";
|
|
g.add.TySh=gf.hN(0,0);g.add.TySh.Ik=new gj(0,0,100,100);g.add.TySh.A=C.clone();var fz=g.add.TySh.MW;
|
|
gf.XK(fz,0,bw);var aQ=D.fill,c6=D["font-weight"],hk=D["font-family"],as=D["text-decoration"],iU=D.stroke,gK=D["stroke-width"],bf=D["dominant-baseline"];
|
|
if(bf=="text-before-edge")gW=O;else if(bf=="middle")gW=O/2;else if(bf=="hanging")gW=O;if(gW!=0)g.add.TySh.A.translate(0,gW);
|
|
var j1=gf.Ql(fz,0,1);if(aQ&&aQ!="none"){var bZ=CSS.Vo(aQ);j1.D4.FillColor={Type:1,Values:[1,bZ.p/255,bZ.z/255,bZ.S/255]}}if(as=="underline")j1.D4.Underline=!0;
|
|
j1.D4.FontSize=Math.round(O);gf.jq(j1,"LiberationSans");if(c6=="bold")gf.jq(j1,"LiberationSans-Bold");
|
|
if(hk){hk=hk.split(",")[0].trim();if(hk[0]=="\"")hk=hk.slice(1);if(hk[hk.length-1]=="\"")hk=hk.slice(0,hk.length-1);
|
|
var iL=hk+":"+(c6?c6:"normal"),jI={"'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(jI[iL])gf.jq(j1,jI[iL]);else gf.jq(j1,hk)}if(D["text-anchor"])j1.MR.Justification=["start","end","middle"].indexOf(D["text-anchor"]);
|
|
gf.$n(fz,0,bw.length,j1);if(iU==null||iU=="none"){}else{var e2=JSON.parse(hz.Au[hz.order.indexOf("FrFX")]);
|
|
e2.Clr.v=N.X.hg(CSS.Vo(iU));e2.Sz.v.val=Math.round(parseFloat(gK)*a.Q.Nc(C));var dV=JSON.parse(hz.default);
|
|
for(var Q=0;Q<hz.order.length;Q++)dV[hz.BN[Q]]={t:"VlLs",v:[]};dV.frameFXMulti.v.push({t:"Objc",v:e2});
|
|
g.add.lmfx=dV}S.g.push(g)}else if(i=="image"){var jk=P.R$(U);if(jk&&jk.slice(0,4)=="data"){var ds=hI.Qj(jk),ij=ds,dg=S.vN(ij,g.getName(),0,0);
|
|
dg.S5=g.S5;g=dg;var iT=g.rect.clone();iT.x=iT.y=0;var ej=U.getAttribute("width"),eH=U.getAttribute("height");
|
|
if(ej)iT.e=parseFloat(ej);if(eH)iT.Z=parseFloat(eH);var jy=P.VO(U);jy.concat(b);var iR=N.H.Fb(iT).s;
|
|
N.H.A(iR,jy,iR);g.add.SoLd.Trnf=a.Q.m3(iR);g.add.SoLd.nonAffineTransform=a.Q.m3(iR);g.KF(S,!1);S.g.push(g)}}else console.log("unknown tag: "+i,U.children.length,U.textContent.length);
|
|
if(L!=null){S.g.push(L);q--}}};e6.eV=function(W,h,S,k){var p=e6,I=[{type:6},{type:8,all:0}],q=h.tagName;
|
|
if(q=="use"){var P=p.R$(h),t=W.getElementById(P.slice(1)),M=new ex;if(t.tagName!="rect")M=p.VO(t);M.concat(p.UC(t));
|
|
I=p.eV(W,t,S,k);N.$.ac(I,M)}else if(q=="path"){var U=h.getAttribute("d");if(U==null)return I;var i=Typr.U.SVGToPath(U);
|
|
I=N.H.aD({s:i.crds,C:i.cmds},S,k)}else if(q=="rect"){var z=h.getAttribute("rx"),D=p.VO(h);I=N.$.Te.Rect(D.y8,D.S8,parseFloat(h.getAttribute("width")),parseFloat(h.getAttribute("height")),z?parseFloat(z):0)}else if(q=="circle"||q=="ellipse"){var R=[0,0,0,0],O=["cx","cy","rx","ry","r"];
|
|
for(var Q=0;Q<5;Q++){var b=h.getAttribute(O[Q]);if(b){b=parseFloat(b);if(Q<4)R[Q]=b;else R[2]=R[3]=b}}I=N.$.Te.dm(R[0]-R[2],R[1]-R[3],2*R[2],2*R[3])}else if(q=="polygon"||q=="polyline"||q=="line"){var w;
|
|
if(q=="line")w=[h.getAttribute("x1"),h.getAttribute("y1"),h.getAttribute("x2"),h.getAttribute("y2")].map(parseFloat);
|
|
else w=h.getAttribute("points").trim().replace(/\s\s+/g," ").split(",").join(" ").split(" ").map(parseFloat);
|
|
I=N.$.Te.C4(w,0,q!="polygon")}return I};e6.g_=function(W,h){if(W.charAt(W.length-1)=="m")return h*parseFloat(W.slice(0,W.length-2));
|
|
else return parseFloat(W)};e6.DZ=function(W,h,S,k){var p,I,q=e6,P=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]),t=h!=null?h.indexOf("("):-1;
|
|
if(t!=-1){var M=h.indexOf(")"),U=h.slice(0,t).trim(),i=h.slice(t+1,M).trim();if(i.charAt(0)=="'")i=i.slice(1,i.length-1);
|
|
if(U=="url"){if(i.charAt(0)=="#"){var z=W.getElementById(i.slice(1));if(z&&z.tagName.toLowerCase().endsWith("gradient")){var D=q.lY(W,z,S,k);
|
|
p="GrFl";I={t:"Objc",v:D}}else{p="SoFi";I={t:"Objc",v:P}}}else console.log("unknown url",i)}else if(U=="rgb"||U=="rgba"){p="SoFi";
|
|
I={t:"Objc",v:P};I.v.Clr.v=N.X.hg(CSS.Vo(h));if(U=="rgba")I.v.Opct.v.val=Math.round(100*parseFloat(h.split(",").pop()))}else console.log("unknown fill",h)}else{p="SoFi";
|
|
I={t:"Objc",v:P};I.v.Clr.v=N.X.hg(CSS.Vo(h))}return{type:p,k:I}};e6.UC=function(W){var h=new ex,S=W.getAttribute("transform");
|
|
if(S)h=e6.Zn(S);var k=W.getAttribute("style");if(k!=null){var p={};e6.tY(p,k,["transform"]);k=p.transform;
|
|
if(k)h.concat(e6.Zn(k))}return h};e6.VO=function(W,h){var S=new ex,k=W.getAttribute("x"),p=W.getAttribute("y");
|
|
if(k)S.y8=parseFloat(k);else if(h)S.y8=h.y8;if(p)S.S8=parseFloat(p);else if(h)S.S8=h.S8;return S};e6.Zn=function(W){var h=Typr.U.SVG.readTrnf(W);
|
|
return new ex(h[0],h[1],h[2],h[3],h[4],h[5])};e6.wu=function(W,h){var S={},k="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 mix-blend-mode xml:space".split(" ");
|
|
for(var Q=0;Q<k.length;Q++){var p=W.getAttribute(k[Q]);if(p!=null&&p!="inherit")S[k[Q]]=p}var I=W.getAttribute("class");
|
|
if(h!=null&&I!=null&&h["."+I]!=null)e6.tY(S,h["."+I],k);var q=W.getAttribute("id");if(h!=null&&q!=null&&h["#"+q]!=null)e6.tY(S,h["#"+q],k);
|
|
var P=W.getAttribute("style");if(P!=null)e6.tY(S,P,k);return S};e6.tY=function(W,h,S){h=h.trim().split(";");
|
|
for(var Q=0;Q<h.length;Q++){var k=h[Q].split(":"),p=k[0]?k[0].trim():"",I=k[1]?k[1].trim():"";for(var q=0;
|
|
q<S.length;q++)if(p==S[q]&&I!="inherit")W[S[q]]=I}};e6.R$=function(W){var h=W.getAttribute("xlink:href");
|
|
if(h==null)h=W.getAttribute("href");if(h==null)h=W.getAttribute("xl:href");return h};e6.lY=function(W,h,S,k){var p=e6;
|
|
function I(L,_,T){var c=h.getAttribute(L);if(c==null)return;var e=parseFloat(c);if(c.endsWith("%"))e*=(T?k.e:k.Z)/100;
|
|
if(T)_.x=e;else _.y=e}var q=new ex,P=h.getAttribute("gradientTransform");if(P)q=p.Zn(P);q.concat(S);
|
|
var t=JSON.parse(hz.Au[hz.order.indexOf("GrFl")]),M=t.Grad.v;M.Intr.v=0;var U=h.tagName,i=new eC(0,0),z=new eC(k.e,0);
|
|
if(U=="linearGradient"){t.Type.v.GrdT="Lnr";I("x1",i,!0);I("y1",i,!1);I("x2",z,!0);I("y2",z,!1);i.x=z.x+.5*(i.x-z.x);
|
|
i.y=z.y+.5*(i.y-z.y)}if(U=="radialGradient"){t.Type.v.GrdT="Rdl";if(h.getAttribute("cx"))i.x=parseFloat(h.getAttribute("cx"));
|
|
if(h.getAttribute("cy"))i.y=parseFloat(h.getAttribute("cy"));z.Yh(i.x,i.y);if(h.getAttribute("r"))z.x+=parseFloat(h.getAttribute("r"))}if(h.getAttribute("gradientUnits")=="userSpaceOnUse"){i=q.xK(i);
|
|
z=q.xK(z)}else{i.x=k.x+i.x*k.e;i.y=k.y+i.y*k.Z;z.x=k.x+z.x*k.e;z.y=k.y+z.y*k.Z}N.X.nA(i,z,k,t);var D=h.children;
|
|
if(D.length==0){var R=p.R$(h);if(R==null)throw"gradient has no stops";var O=W.getElementById(R.slice(1));
|
|
if(O==null){console.log(R.slice(1));throw"e"}var b=p.lY(W,O,q,k);t.Grad=b.Grad}else{var w=[];for(var Q=0;
|
|
Q<D.length;Q++){var A=D[Q],g=p.wu(A),E=g["stop-color"],j=g["stop-opacity"],x=A.getAttribute("offset");
|
|
if(E==null)E="#000000";if(j==null)j="1";var d=x?parseFloat(x):0;E=CSS.Vo(E);w.push([d,[E.p/255,E.z/255,E.S/255],parseFloat(j)])}N.X.J6(w,M)}return t};
|
|
e6.m0=function(W,h,S){var k=[],p=e6;p.VM=h.a7u?"\t":"";var I=h.a5w,q=h.a5s;k.push("<svg version=\"1.2\" baseProfile=\"tiny-ps\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 "+W.e+" "+W.Z+"\" width=\""+I+"\" height=\""+q+"\">");
|
|
k.push(p.y9(1)+"<title>"+e6.OK(W.name.split(".")[0])+"</title>");var P={BY:[],Vz:[],jt:0,PF:0,gN:0,qI:{},VP:{},cx:0,fH:{},Aa:{},nD:0,Tm:[]};
|
|
e6.n9(W,P,W.root.children,1,h,S);if(P.BY.length!=0){k.push(p.y9(1)+"<defs>");k=k.concat(P.BY);k.push(p.y9(1)+"</defs>")}k.push(p.y9(1)+"<style>");
|
|
k.push(p.y9(2)+"tspan { white-space:pre }");for(var t in P.fH)k.push(p.y9(2)+"."+t+" { "+P.fH[t]+" } ");
|
|
k.push(p.y9(1)+"</style>");k=k.concat(P.Vz);k.push("</svg>");k=k.join(h.a7u?"\n":"");if(p.oE){console.log(p.oE);
|
|
var M="SVGParser.gen.db = [\n";for(var Q=0;Q<p.oE.length;Q++){var U=p.oE[Q];M+="{\n\tnam: \""+U.ft+"\",\n\tpts: [\n";
|
|
for(var i=0;i<U.Nk.length;i++){var z=U.Nk[i];M+="\t\t[\""+z[0]+"\", { cmds: "+JSON.stringify(z[1].C)+", crds:"+JSON.stringify(z[1].s)+" } ]"+(i==U.Nk.length-1?"":",")+"\n"}M+="\t]\n}"+(Q==p.oE.length-1?"":",")+"\n"}M+="]\n";
|
|
console.log(M)}return G.cw(k)};e6.VM="";e6.y9=function(g8){var W="";for(var Q=0;Q<g8;Q++)W+=e6.VM;return W};
|
|
e6.JK=function(g8){return""+parseFloat(g8.toFixed(3))};e6.n9=function(W,h,S,k,p,I){var q=e6;function P(U,aX){var L=U.add.lmfx;
|
|
if(L)L=L[aX].v[0];if(L)L=L.v;if(L&&!L.enab.v)L=null;return L}function t(U,O){var jI=P(U,"frameFXMulti");
|
|
if(jI){var e2=jI.Sz.v.val;if(jI.Styl.v.FStl=="OutF"){O.push("paint-order:stroke fill markers");e2*=2}O.push("stroke: "+CSS.bp(jI.Clr.v));
|
|
O.push("stroke-width: "+e2);O.push("stroke-linejoin: round;")}}for(var M=0;M<S.length;M++){var U=S[M].i,i=U.add.lsct,z=U.add.vmsk,D=U.add.vstk,R=U.add.TySh;
|
|
if(z&&!z.isEnabled)z=D=null;var O=[];if(!p.hidden&&!U.jP())continue;var b=U.opacity/255,w=U.add.iOpa?U.add.iOpa/255:1;
|
|
if(b!=1)O.push("opacity: "+q.JK(b));if(w!=1)O.push("fill-opacity: "+q.JK(w));if(U.oO!="norm"){var A=hd.BX[hd.wl.indexOf(U.oO)];
|
|
if(A!=null)O.push("mix-blend-mode: "+A)}if(!U.jP())O.push("display: none");var g=[],E=[],j=U.getName(),x=j.indexOf(" .");
|
|
if(x!=-1){E.push(j.slice(x+2));j=j.slice(0,x)}if(p.names)g.push("id=\""+q.OK(j)+"\"");var d=jO.GH(U.add.lmfx,U.add),L=d[0],_=d[1];
|
|
if(U.vc()){var T=S[M].children;if(!(T.length==1&&T[0].i.add.SoLd&&!p.Ri)){if(q.oE&&U.getName().split("-").length==3){q.oE.push({ft:U.getName(),bW:0,Nk:[]})}e6.Rh(U,z,h,g);
|
|
if(O.length!=0)g.push("style=\""+O.join(";")+"\"");h.Vz.push(q.y9(k)+"<g "+q.XC(g,E)+">");q.n9(W,h,T,k+1,p,I);
|
|
h.Vz.push(q.y9(k)+"</g>")}}else if(U.rG()&&z==null){var c=new gj(0,0,W.e,W.Z);q.dI(O,U.add,h,c);if(O.length!=0)g.push("style=\""+O.join(";")+"\"");
|
|
h.Vz.push(q.y9(k)+"<rect width=\""+W.e+"\" height=\""+W.Z+"\" "+q.XC(g,E)+" />")}else if(z&&U.add.SoLd==null){var c=N.$.E6(z.T,null,!0),e=N.$.y6(z.T);
|
|
if(e.lk!=0){g.push("fill-rule=\"evenodd\"")}var r=e.Tu;q.dI(O,U.add,h,c);if(O.length!=0){var B=O.join(";"),F=h.Aa[B];
|
|
if(F==null){F="shp"+h.nD;h.nD++;h.Aa[B]=F;h.fH[F]=B}E.push(F)}h.Vz.push(q.y9(k)+"<path "+q.XC(g,E)+" d=\""+r+"\" />");
|
|
if(q.oE&&q.oE[q.oE.length-1]){var v=N.H.FU(z.T);v.s=v.s.map(Math.round);var X=q.oE[q.oE.length-1];X.bW+=JSON.stringify(v).length;
|
|
X.Nk.push([O[0].split("#").pop(),v])}}else if(R&&p.au5){var V=R.MW,H=new a1(V,I),o=null;if(L)o=CSS.bp(L.Clr.v);
|
|
if(_){var c=U.rect.clone();q.iL(_,h,c);o=" url(#grd"+h.jt+")"}if(o)g.push("fill=\""+o+"\"");t(U,O);if(O.length!=0)g.push("style=\""+O.join(";")+"\"");
|
|
var J=jE.rK(H,R),C=N.H.Rc(J);for(var Y in C){if(o==null)g.push("fill=\""+Y+"\"");var K=C[Y],r=Typr.U.pathToSVG({crds:K.s,cmds:K.C},2);
|
|
h.Vz.push(q.y9(k)+"<path "+q.XC(g,E)+" "+q.mb(R)+" d=\""+r+"\" />");if(o==null)g.pop()}}else if(R&&!p.acl){var V=R.MW,u=R.A.clone(),o=null;
|
|
O.push("transform: "+q.fm(u));var f=gf.x5(V),H=new a1(V,I);t(U,O);if(O.length!=0)g.push("style=\""+O.join(";")+"\"");
|
|
h.Vz.push(q.y9(k)+"<text "+q.XC(g,E)+" >");if(L)o=CSS.bp(L.Clr.v);if(_){var c=U.rect.clone();c.x-=u.y8;
|
|
c.y-=u.S8;q.iL(_,h,c);o=" url(#grd"+h.jt+")"}for(var Q=0;Q<H.MR.length;Q++){var l=H.MR[Q];if(l.pr.length==1&&l.pr[0].dx)continue;
|
|
for(var jk=0;jk<l.Sg.length;jk++){var hE=l.Sg[jk],Z=l.ug.y+hE.ug.y,aQ=l.pr[hE.start].start,jC=l.pr[hE.end-1].end,eO=gf.a7b(V,aQ,jC),iU="";
|
|
for(var gK=0;gK<eO.length;gK++){var iM=H.Re(aQ),i5=eO[gK],fN=gf.Ql(V,aQ,aQ),dx=fN.Vt[fN.D4.Font].Name,Y=gf.iZ(fN.D4.FillColor),ai=Math.round(fN.D4.FontSize),hO=f.slice(aQ,aQ+i5);
|
|
if(fN.D4.FontCaps==2)hO=hO.toUpperCase();var ff=new ex;ff.translate(iM.pY.x,-Z);var eP=[];CSS.alJ(eP,fN,null,!0,!0,o);
|
|
var B=eP.join(";"),F=h.Aa[B];if(F==null){F="txt"+h.nD;h.nD++;h.Aa[B]=F;h.fH[F]=B}var a0=iM.pY.x,bM=q.am7(fN,hO);
|
|
iU+="<tspan "+(gK==0?"x=\""+q.JK(iM.pY.x)+"\"":"")+" y=\""+q.JK(Z)+"\" class=\""+F+"\""+bM+">"+q.OK(hO)+"</tspan>";
|
|
aQ+=i5}h.Vz.push(q.y9(k+1)+iU)}}h.Vz.push(q.y9(k)+"</text>")}else if(U.add.SoLd&&p.Ri){var cV=U.add.SoLd,aX=cV.Idnt.v,j8=0,j3=cV.Crop?cV.Crop.v:null;
|
|
if(h.VP[aX]!=null)j8=h.VP[aX];else{h.cx++;j8=h.cx;h.VP[aX]=h.cx;var am=W.GT(aX,j3),fz="";if(am==null)return;
|
|
var fG=am.xJ,bw=hI._e(am.raw.buffer);if(bw=="pdf"){var c6=new jg("h");hI.J$("PDF").uc(am.raw.buffer,c6);
|
|
c6.fG();c6.nF();c6.G();c6.f4();if(cV.Crop&&cV.Crop.v==1){a.JY.ZH(c6,c6.root.wT(c6,!0))}var hk=hI.J$("SVG").i4(c6,c6.e,c6.Z,null,{Tm:I});
|
|
fz="data:image/svg+xml;base64,"+hI.IH(hk)}else if(bw=="jpg"||bw=="png"||bw=="gif"||bw=="svg"){var as={jpg:"image/jpg",png:"image/png",jpg:"image/jpg",svg:"image/svg+xml"};
|
|
fz="data:"+as[bw]+";base64,"+hI.IH(am.raw.buffer)}else{fz=hI.EF(fG[0].buffer,fG[1].e,fG[1].Z)}h.BY.push(q.y9(2)+"<image width=\""+fG[1].e+"\" height=\""+fG[1].Z+"\" id=\"img"+j8+"\" href=\""+fz+"\"/>")}var bf=N.V._M(cV),gW=[];
|
|
e6.Rh(U,z,h,gW);if(gW.length!=0)h.Vz.push(q.y9(k)+"<g "+q.XC(gW,E)+">");if(O.length!=0)g.push("style=\""+O.join(";")+"\"");
|
|
var j1=q.XC(g,E);h.Vz.push(q.y9(k)+"<use "+j1+" href=\"#img"+j8+"\" transform=\""+q.fm(bf)+"\"/>");if(gW.length!=0)h.Vz.push(q.y9(k)+"</g>")}else if(!U.rect.ZP()&&(p.Ri||R)){if(O.length!=0)g.push("style=\""+O.join(";")+"\"");
|
|
var j1=q.XC(g,E),bZ=U.buffer;if(L)bZ=jO.abx(bZ,L,U.rect);var iL=U.rect;h.cx++;var fz=hI.EF(bZ.buffer,iL.e,iL.Z,"png",null,!0);
|
|
h.BY.push(q.y9(2)+"<image "+q.mb(R)+" width=\""+U.rect.e+"\" height=\""+U.rect.Z+"\" id=\"img"+h.cx+"\" href=\""+fz+"\"/>");
|
|
h.Vz.push(q.y9(k)+"<use "+j1+" href=\"#img"+h.cx+"\" x=\""+iL.x+"\" y=\""+iL.y+"\" />")}}};e6.am7=function(W,h){var S=W.D4.Tracking,k="";
|
|
if(S!=null&&S!=0){S=Math.round(S*W.D4.FontSize/1e3);k=" dx=\"0";for(var p=1;p<h.length;p++)k+=" "+S;
|
|
k+="\" "}return k};e6.mb=function(W){if(W==null)return"";var h=W.MW,S=gf.x5(h);S=e6.OK(S.slice(0,S.length-1));
|
|
return"aria-label=\""+S+"\" "};e6.XC=function(W,h){if(h.length!=0)W.push("class=\""+h.join(" ")+"\"");
|
|
return W.join(" ")};e6.OK=function(W){return String(W).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\u0022/g,""")};
|
|
e6.fm=function(W){var h=[W.S4,W.S,W.ZB,W.Bq,W.y8,W.S8].map(e6.JK);return"matrix("+h.join(",")+")"};e6.Rh=function(W,h,S,k){var p=e6;
|
|
if(h||W.add.artb){var I;if(h)I=N.$.y6(h.T).Tu;else{var q=W.rp(),P=N.H.Fb(q);I=Typr.U.pathToSVG({crds:P.s,cmds:P.C},2)}S.gN++;
|
|
k.push("clip-path=\"url(#cp"+S.gN+")\"");S.BY.push(p.y9(2)+"<clipPath clipPathUnits=\"userSpaceOnUse\" id=\"cp"+S.gN+"\">");
|
|
S.BY.push(p.y9(3)+"<path d=\""+I+"\" />");S.BY.push(p.y9(2)+"</clipPath>")}};e6.dI=function(W,h,S,k){var p=e6,I=h.vstk,q=h.vmsk,P=h.lmfx;
|
|
if(q&&q.JJ!=0){var t=p.JK(q.JJ);if(S.qI[t]==null){S.PF++;S.qI[t]=S.PF;S.BY.push(p.y9(2)+"<filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"flt"+S.PF+"\"> <feGaussianBlur stdDeviation=\""+t+"\" /> </filter>")}W.push("filter: url(#flt"+S.qI[t]+")")}var M=jO.GH(P,h),U=M[0],i=M[1];
|
|
if(I&&!I.fillEnabled.v)W.push("fill: none");else if(U){var z=CSS.bp(U.Clr.v);W.push("fill: "+z)}else if(i){p.iL(i,S,k);
|
|
W.push("fill: url(#grd"+S.jt+")")}if(I==null||!I.strokeEnabled.v)I=jO.k1(P);if(I&&I.strokeEnabled.v){var D=I.strokeStyleContent.v,R=D.classID;
|
|
if(R=="solidColorLayer")W.push("stroke: "+CSS.bp(D.Clr.v));else{p.iL(D,S,k);W.push("stroke: url(#grd"+S.jt+")")}var O=hz.EJ.zu.indexOf(I.strokeStyleLineCapType.v.strokeStyleLineCapType),b=hz.EJ.join.indexOf(I.strokeStyleLineJoinType.v.strokeStyleLineJoinType),w=I.strokeStyleOpacity.v.val/100,A=I.strokeStyleLineWidth.v.val,g=hz.EJ.tZ.indexOf(I.strokeStyleLineAlignment.v.strokeStyleLineAlignment);
|
|
if(g==2){A*=2;W.push("paint-order:stroke fill markers")}var E=I.strokeStyleLineDashSet.v,j=[];for(var Q=0;
|
|
Q<E.length;Q++)j.push(Math.round(E[Q].v.val*A));if(O!=0)W.push("stroke-linecap:"+["butt","round","square"][O]);
|
|
if(b!=0)W.push("stroke-linejoin:"+["miter","round","bevel"][b]);if(w!=1)W.push("stroke-opacity:"+p.JK(w));
|
|
if(A!=1)W.push("stroke-width: "+p.JK(A));if(j.length!=0)W.push("stroke-dasharray: "+j.join(","))}};e6.iL=function(W,h,S){h.jt++;
|
|
var k=e6,p=W.Grad.v,I=JSON.parse(JSON.stringify(p.Clrs.v)),q=JSON.parse(JSON.stringify(p.Trns.v)),P=W.Ofst.v,t=W.Type.v.GrdT,M=t=="Rdl"?1:0,U=(M==1?"radial":"linear")+"Gradient",i=N.X.ma(W,S);
|
|
if(M==0){i[0].x=i[1].x+2*(i[0].x-i[1].x);i[0].y=i[1].y+2*(i[0].y-i[1].y)}var z=k.y9(2)+"<"+U+" id=\"grd"+h.jt+"\" gradientUnits=\"userSpaceOnUse\" ";
|
|
if(M==0)h.BY.push(z+" x1=\""+k.JK(i[0].x)+"\" y1=\""+k.JK(i[0].y)+"\" x2=\""+k.JK(i[1].x)+"\" y2=\""+k.JK(i[1].y)+"\">");
|
|
if(M==1)h.BY.push(z+" cx=\""+k.JK(i[0].x)+"\" cy=\""+k.JK(i[0].y)+"\" r=\""+k.JK(eC.fa(i[0],i[1]))+"\">");
|
|
if(t=="Rflc"){for(var D=0;D<2;D++){var R=D==0?I:q;for(var Q=R.length-1;Q>=0;Q--){var O=R[Q];O.v.Lctn.v=2048+(O.v.Lctn.v>>>1);
|
|
var b=JSON.parse(JSON.stringify(O));b.v.Lctn.v=4096-b.v.Lctn.v;R.push(b)}R.sort(function(j,x){return j.v.Lctn.v-x.v.Lctn.v})}}var w=W.Rvrs.v;
|
|
if(w){I.reverse();q.reverse()}for(var Q=0;Q<I.length;Q++){var A=I[Q].v,g=Q<q.length?q[Q].v.Opct.v.val/100:1,g=g==1?"":"stop-opacity=\""+k.JK(g)+"\"",E=A.Lctn.v/4096;
|
|
if(w)E=1-E;h.BY.push(k.y9(3)+"<stop offset=\""+k.JK(E)+"\" stop-color=\""+CSS.bp(A.Clr.v)+"\" "+g+" />")}h.BY.push(k.y9(2)+"</"+U+">")};
|
|
e6.Te=function(W,h,S,k,p){var I=[],q=e6.Te,P=!1,t={s6:W,R_:h,Mv:[!0,!0,!0],DY:!1,Ki:S,a3x:0};t.mp=Math.round(Math.max(W,h)*(.02+q.jl(t)*.03));
|
|
t.qv=q.aiR(t);t.w2=q.acz(t.qv,(q.jl(t)<.5?-1:1)*(.2+q.jl(t)*.3));if(q.jl(t)<.5){var M=t.qv;t.qv=t.w2;
|
|
t.w2=M}t.aqG=q.jl(t)<.4&&q.ac9(t.w2,{p:1,z:1,S:1})>.3;t.ajn=q.jl(t)<.5?0:1;I.push("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 "+W+" "+h+"\" width=\""+W+"\" height=\""+h+"\">");
|
|
t.zE=k[Math.floor(q.BU(t)*k.length)];t.HO=k[Math.floor(q.BU(t)*k.length)];I.push("<style>");I.push("@font-face { font-family: "+t.zE[2]+"; src: url(rsrc/fonts/"+t.zE[5]+"); }");
|
|
I.push("@font-face { font-family: "+t.HO[2]+"; src: url(rsrc/fonts/"+t.HO[5]+"); }");I.push("</style>");
|
|
var U=[0,0,W,h],i=U;if(p==null)I.push("<path style=\"fill: "+q.aI(t.qv)+"\" d=\""+q.Rect(U[0],U[1],U[2]-U[0],U[3]-U[1])+"\" id=\"Background\" />");
|
|
else{t.DY=!0;q.Ll(t,U,I,p)}if(q.jl(t)<.25&&!t.DY){t.Mv[0]=t.Mv[2]=!1;q.asC(U,t,I);i=U}else if(q.jl(t)<.25||t.DY)i=U;
|
|
else{var z=.52+q.jl(t)*.2;if(q.jl(t)<.5)z=1-z;var D=U.slice(0),R=U.slice(0);if(q.jl(t)<.5)D[2]=R[0]=Math.round(z*W);
|
|
else D[3]=R[1]=Math.round(z*h);if(q.jl(t)<.5){var M=D;D=R;R=M}i=D;q.a7Z(t,R,I,p)}q.a2M(t,i,I);I.push("</svg>");
|
|
I=I.join("\n");var O=N.U(Math.round(I.length*1.5)),b=G.hX(I,O,0);return[O.buffer.slice(0,b),t.jj]};e6.Te.asC=function(W,h,S){var k=e6.Te,p=W[2]-W[0],I=W[3]-W[1];
|
|
if(k.jl(h)<.5){S.push("<path id=\"Border\" style=\"fill: "+k.aI(h.w2)+"\" d=\""+k.alQ(W[0],W[1],W[2]-W[0],W[3]-W[1],h.mp)+"\" />")}else if(k.jl(h)<-.4){k.a5W(h,W,S)}else{var q=k.jl(h)<.5?0:1,P=(q==0?I:p)/4,t=k.on(h,q,W,S,P,!0),t=k.on(h,q+2,W,S,P,!0,t)}};
|
|
e6.Te.a2M=function(W,h,S){var k=e6.Te,p="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("-"),I=2*Math.floor(k.jl(W)*p.length/2),q=h[2]-h[0],P=h[3]-h[1],M=0,i=0;
|
|
W.bY=(W.s6+q)*.5*(.04+k.jl(W)*.05);W.bY=Math.min(W.bY,P*.4,q*.12);W.bY=Math.round(W.bY);var t=Math.min(W.bY*p[I].length*(.35+.3*k.jl(W)),q*.9),U=(h[1]+h[3])/2,z=N.AN(W.qv)<.85?{p:1,z:1,S:1}:{p:.1,z:.1,S:.1};
|
|
if(k.jl(W)<.25&&W.Mv[0]){i=0;M=h[0]+W.mp}else if(k.jl(W)<.33&&W.Mv[2]){i=2;M=h[2]-W.mp}else{i=1;M=(h[0]+h[2])/2}var D=z.p==1?"0,0,0":"255,255,255",R=W.DY&&k.jl(W)<1;
|
|
if(R){var O=h[0],b=q,w=U-W.bY*1.1,A=W.bY*2.2,g=.7;if(i==1&&k.jl(W)<.5){O=w=.2*Math.min(q,P);b=q-2*w;
|
|
A=P-w-w}else if(k.jl(W)<.7){O=w=0;b=q;A=P;g=.25}S.push("<path id=\"Strip\" style=\"fill: rgb("+D+"); opacity: "+g+"\" d=\""+k.Rect(O,w,b,A)+"\" />")}if(k.jl(W)<.4){var E=W.bY*.07;
|
|
E*=1.5+k.jl(W)*1;if(i==-1&&q/P<3&&!R){S.push("<path id=\"Bar-bottom\" style=\"fill: "+k.aI(z)+"\" d=\""+k.Rect(M-t/2,U+W.bY*1.1-E/2,t,E)+"\" />");
|
|
S.push("<path id=\"Bar-top\" style=\"fill: "+k.aI(z)+"\" d=\""+k.Rect(M-t/2,U-W.bY*1.1-E/2,t,E)+"\" />")}if(i!=1){S.push("<path id=\"Bar\" style=\"fill: "+k.aI(z)+"\" d=\""+k.Rect(M-E/2,U-W.bY*.8,E,W.bY*.8*2)+"\" />");
|
|
M+=(i==0?1:-1)*W.bY/3}}var j=W.bY*.4;S.push(k._y(p[I+1],M,U+j*1.6,j,z,i,W.HO));S.push(k._y(p[I],M,U+W.bY*.04,W.bY,z,i,W.zE))};
|
|
e6.Te.a7Z=function(W,h,S,k){var p=h[2]-h[0],I=h[3]-h[1],q=Math.max(p,I),P=Math.min(p,I),t=e6.Te;if(q/P<5&&!W.DY&&!1){t.Ll(W,h,S,k)}else if(t.jl(W)<0)S.push("<path style=\"fill: "+t.aI(W.w2)+"\" d=\""+t.Rect(h[0],h[1],p,I)+"\" />");
|
|
else{var M=0;if(h[3]!=W.R_)M=0;if(h[2]!=W.s6)M=3;if(h[0]!=0)M=1;if(h[1]!=0)M=2;var U=M+2&3;if(q/P<3){var i=t.aet(U),z=i[Math.round(t.jl(W)*(i.length-1))],D=z.ft.slice(0,4),R=D.indexOf(1);
|
|
z=JSON.parse(JSON.stringify(z));var O=-1;if(D!="0000"){var b=new ex;if(z.ft[5]=="0"){if(R==3&&M==1){O=1;
|
|
b.scale(-1,1)}else O=R}else{var w=U;while(w==U)w=Math.floor(t.jl(W)*4)&3;b.rotate((-R+w)*Math.PI/2)}t.A(z,b)}var A=t.TA(z),g=p-2*W.mp,E=I-2*W.mp;
|
|
if(O!=-1){if((O&1)==0)E-=W.mp;else g-=W.mp}var j=Math.min(g/A.e,E/A.Z),x=new ex;x.translate(-A.x,-A.y);
|
|
x.scale(j,j);var d=(p-A.e*j)/2,L=(I-A.Z*j)/2;if(O!=-1){if(O==3)d=0;if(O==0)L=0;if(O==1)d=p-A.e*j;if(O==2)L=I-A.Z*j}x.translate(h[0]+d,h[1]+L);
|
|
t.JR(W,z,x,W.w2,S)}else{t.on(W,M,h,S,1e9)}}};e6.Te.Ll=function(W,h,S,k){var p=h[2]-h[0],I=h[3]-h[1],q=Math.max(p,I),P=Math.min(p,I),t=e6.Te,M=t.BU(W),U,i,z,D=k[0]instanceof ArrayBuffer;
|
|
if(D){U="data:image/jpg;base64,"+jH.wB(k[0]);i=k[1];z=k[2]}else{var R=Math.floor(M*k.length),O=k[R];
|
|
W.jj=O;U=O.webformatURL;i=O.webformatWidth;z=O.webformatHeight}var b=h[0],w=h[1],A=p,g=I;if(p/I>i/z){g=A*z/i;
|
|
w=w-(g-I)/2}else{A=g*i/z;b=b-(A-p)/2}if(D){S.push("<defs>");S.push("<image width=\""+i+"\" height=\""+z+"\" id=\"Background\" href=\""+U+"\" />");
|
|
S.push("</defs>");var E=A/i;S.push("<use href=\"#Background\" transform=\""+e6.fm(new ex(E,0,0,E,b,w))+"\" />")}else{var j="cp"+Math.random();
|
|
S.push("<clipPath id=\""+j+"\">");S.push("<path style=\"fill: "+t.aI(W.w2)+"\" d=\""+t.Rect(h[0],h[1],p,I)+"\" />");
|
|
S.push("</clipPath>");S.push("<image clip-path=\"url(#"+j+")\" xlink:href=\""+U+"\" x=\""+b+"\" y=\""+w+"\" width=\""+A+"\" height=\""+g+"\" />")}};
|
|
e6.Te._y=function(W,h,S,k,p,I,q){var P=e6.Te;return"<text x=\""+h+"\" y=\""+S+"\" style=\"fill:"+P.aI(p)+"; font-size:"+k+"px; text-anchor:"+["start","middle","end"][I]+"; font-family:"+q[2]+";\"><tspan>"+W+"</tspan></text>"};
|
|
e6.Te.JR=function(W,h,S,k,p){var I=e6.Te,q=[];for(var Q=0;Q<h.Nk.length;Q++){q.push(k);if(W.aqG){k=(Q&1)==W.ajn?{p:1,z:1,S:1}:q[0]}}p.push("<g id=\""+h.ft.split("-")[2]+":::\" style=\"transform: "+e6.fm(S)+";\" >");
|
|
for(var Q=0;Q<h.Nk.length;Q++){var P=h.Nk[Q];k=q.pop();p.push("<path style=\"fill: "+(k?I.aI(k):"#"+P[0])+"\" d=\""+Typr.U.pathToSVG({crds:P[1].s,cmds:P[1].C})+"\" />")}p.push("</g>")};
|
|
e6.Te.a5W=function(W,h,S){var k=e6.Te,p=e6.Te.gX,I=[];for(var Q=0;Q<p.length;Q++){var q=p[Q],P=q.ft.slice(0,4);
|
|
if(P!="1001")continue;I.push(q)}var q=I[Math.floor(k.jl(W)*I.length)];if(k.jl(W)<.5)k.A(q,new ex(0,1,1,0,0,0));
|
|
var t=h[3]-h[1],M=h[2]-h[0],U=k.TA(q),i=.7*Math.min(M,t,.5*Math.max(M,t))/Math.max(U.e,U.Z),z=new ex;
|
|
z.scale(i,i);if(k.jl(W)<.5){z.scale(1,-1);z.translate(0,t)}k.JR(W,q,z,W.w2,S);z.rotate(Math.PI);z.translate(M,t);
|
|
k.JR(W,q,z,W.w2,S)};e6.Te.aet=function(W){var h=e6.Te.gX,S=[];for(var Q=0;Q<h.length;Q++){var k=h[Q],p=k.ft.slice(0,4);
|
|
if(p=="0000"){S.push(k);continue}if(["1000","0100","0010","0001"].indexOf(p)==-1)continue;var I=p.indexOf("1");
|
|
if(k.ft[5]=="0"&&W==I&&I!=3)continue;S.push(k)}return S};e6.Te.on=function(W,h,S,k,p,I,q){var P=e6.Te.gX,t=e6.Te,M=[],A,g;
|
|
for(var Q=0;Q<P.length;Q++){var U=P[Q],i=U.ft.slice(0,4);if(["1110","1101","1011","0111"].indexOf(i)==-1)continue;
|
|
var z=i.indexOf("0")+2&3;if(U.ft[5]=="0")if(I==!0||h!=z&&!(h==1&&z==3))continue;M.push(U)}var D=q!=null?q:Math.floor(t.jl(W)*M.length),U=M[D],U=JSON.parse(JSON.stringify(U)),i=U.ft.slice(0,4),z=i.indexOf("0")+2&3;
|
|
if(z==3&&h==1)N.A(U,new ex(1,0,0,-1,0,1e3));var R=new ex;R.translate(-500,-500);R.rotate(-z*Math.PI/2);
|
|
R.translate(500,500);t.A(U,R);var O=S[3]-S[1],b=S[2]-S[0],w=t.TA(U);if(w.y<0){w.Z+=w.y;w.y=0}if(w.y>0){w.Z+=w.y;
|
|
w.y=0}if((h&1)==0){g=O;A=b}else{A=O;g=b}var E=Math.min(Math.min(.5+.5*t.jl(W))*Math.min(b,O),p)/w.Z,j=Math.ceil(A/(1e3*E)),x=new ex,d=new ex;
|
|
d.scale(E,E);if(h==0||h==2){d.translate(-(b/2),-(O/2));d.rotate(-h*Math.PI/2);d.translate(b/2+S[0],O/2+S[1])}else{d.rotate(Math.PI/2);
|
|
d.scale(1,-1);d.translate(S[0],S[1]);if(h==1){d.scale(-1,1);d.translate(b,0)}}k.push("<g id=\"Border-"+["top","right","bottom","left"][h]+":::\">");
|
|
for(var Q=0;Q<j;Q++){var L=x.clone();L.concat(d);t.JR(W,U,L,W.w2,k);x.translate(1e3-2,0)}k.push("</g>");
|
|
return D};e6.Te.Rect=function(W,h,S,k){return Typr.U.pathToSVG({crds:[W,h,W+S,h,W+S,h+k,W,h+k],cmds:["M","L","L","L","Z"]})};
|
|
e6.Te.alQ=function(W,h,S,k,p){var I=[W,h,W+S,h,W+S,h+k,W,h+k];W+=p;h+=p;S-=2*p;k-=2*p;I.push(W,h,W,h+k,W+S,h+k,W+S,h);
|
|
return Typr.U.pathToSVG({crds:I,cmds:"M L L L Z M L L L Z".split(" ")})};e6.Te.acz=function(W,h){var S=N.DB(W.p,W.z,W.S);
|
|
S.kL=Math.max(.1,Math.min(.9,S.kL+h));return N.Gm(S.R_,S.Nx,S.kL)};e6.Te.aeJ=function(W,h){var S=N.DB(W.p,W.z,W.S);
|
|
S.R_+=h;return N.Gm(S.R_,S.Nx,S.kL)};e6.Te.aou=function(W){var h=N.DB(W.p,W.z,W.S);h.kL=1-h.kL;return N.Gm(h.R_,h.Nx,h.kL)};
|
|
e6.Te.ac9=function(W,h){var S=W.p-h.p,k=W.z-h.z,p=W.S-h.S;return Math.sqrt(S*S+k*k+p*p)};e6.Te.aiR=function(W){var h=e6.Te;
|
|
return{p:h.jl(W),z:h.jl(W),S:h.jl(W)}};e6.Te.aI=function(W){return CSS.Rl({p:W.p*255,z:W.z*255,S:W.S*255})};
|
|
e6.Te.TA=function(W){var h=W.Nk,S=new gj;for(var Q=0;Q<h.length;Q++)S=S.r8(N.H.TA(h[Q][1].s));return S};
|
|
e6.Te.A=function(W,h){var S=W.Nk;for(var Q=0;Q<S.length;Q++)N.H.A(S[Q][1].s,h,S[Q][1].s)};e6.Te.jl=function(W){W.a3x++;
|
|
var h=W.a3x&3;if(h==0)W.Ki=e6.Te.PL(W.Ki);var S=W.Ki>>>8*h&255;return S*(.99999999/255)};e6.Te.BU=function(W){var h=e6.Te.PL(W.Ki);
|
|
W.Ki=e6.Te.PL(h);return h*(1/4294967295)};e6.Te.PL=function(W){W=(W^61^W>>>16)>>>0;W=W+(W<<3)>>>0;W=(W^W>>>4)>>>0;
|
|
W=W*668265261>>>0;W=(W^W>>>15)>>>0;return W};e6.Te.gX=[{ft:"0001-0-bird",Nk:[["4b3c34",{C:"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(" "),s:[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",{C:"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(" "),s:[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",{C:"M C C C C C C C C C C C C L Z".split(" "),s:[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]}]]},{ft:"0001-0-bird2",Nk:[["ff7f2a",{C:"M L L L Z M L L L Z".split(" "),s:[296,0,296,62,335,62,296,0,357,0,357,62,318,62,357,0]}],["b588c1",{C:"M C C C C C C C C C C C L Z".split(" "),s:[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",{C:"M C C C C C C L Z M C C Z".split(" "),s:[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",{C:"M L L L Z M L L L Z".split(" "),s:[326,258,334,315,323,316,326,258,298,262,296,318,286,317,298,262]}],["4b3c34",{C:"M L C C C C C C C C L Z".split(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"0000-1-flower",Nk:[["7a59a2",{C:"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(" "),s:[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]}]]},{ft:"0000-1-flower",Nk:[["d13777",{C:"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(" "),s:[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]}]]},{ft:"0000-1-flower",Nk:[["ffac42",{C:"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(" "),s:[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]}]]},{ft:"0000-1-flower",Nk:[["d04040",{C:"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(" "),s:[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]}]]},{ft:"0000-1-flower",Nk:[["ec7272",{C:"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(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"0000-0-hearts",Nk:[["d17070",{C:"M C C C C C C C C C L Z".split(" "),s:[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",{C:"M C C C C C C C C C L Z".split(" "),s:[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",{C:"M C C C C C C C C C L Z".split(" "),s:[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]}]]},{ft:"0000-0-anchor",Nk:[["2a3b66",{C:"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(" "),s:[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]}]]},{ft:"0000-1-leaf",Nk:[["fbb600",{C:"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(" "),s:[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]}]]},{ft:"0000-1-acorn",Nk:[["a05a2c",{C:"M C C C C C C C L Z".split(" "),s:[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",{C:"M C C C C C C C C C C C Z".split(" "),s:[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]}]]},{ft:"0000-0-skull",Nk:[["808080",{C:"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(" "),s:[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]}]]},{ft:"0000-0-ghost",Nk:[["e6e6e6",{C:"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(" "),s:[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",{C:"M C C C C Z M C C C C Z".split(" "),s:[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]}]]},{ft:"1001-1-rose",Nk:[["9e1460",{C:"M C C C C C C C C C Z M C C C C C C C C C Z".split(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"1001-1-curls",Nk:[["53a7ab",{C:"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(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"0111-0-pines",Nk:[["e9e9e9",{C:"M C C C C C C C C L L L Z".split(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"0111-0-flowers",Nk:[["8cae40",{C:"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(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"1101-1-confetti",Nk:[["e789ff",{C:"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(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"1101-1-branch",Nk:[["7f500b",{C:"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(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"1101-1-sticks",Nk:[["ec7272",{C:"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(" "),s:[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",{C:"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(" "),s:[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]}]]},{ft:"1101-1-dots",Nk:[["ec7272",{C:"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(" "),s:[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",{C:"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(" "),s:[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",{C:["M","C","C","Z"],s:[389,224,389,224,410,230,410,230,410,230,389,224,389,224]}]]},{ft:"1101-1-strips",Nk:[["ffc88c",{C:"M L L L L Z M L L L L Z M L L L L Z".split(" "),s:[-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",{C:"M L L L L Z M L L L L Z M L L L L Z".split(" "),s:[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",{C:["M","C","C","Z"],s:[407,217,407,217,428,223,428,223,428,223,407,217,407,217]}]]},{ft:"1101-1-circs",Nk:[["ec7272",{C:"M C C C C Z M C C C C Z".split(" "),s:[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",{C:"M C C C C Z M C C C C Z".split(" "),s:[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",{C:["M","C","C","Z"],s:[530,273,530,273,551,279,551,279,551,279,530,273,530,273]}]]},{ft:"1101-1-squares",Nk:[["014ea7",{C:"M L L L L Z M L L L L Z".split(" "),s:[0,120,124,120,124,244,0,244,0,120,497,120,621,120,621,244,497,244,497,120]}],["fc54ff",{C:"M L L L L Z M L L L L Z".split(" "),s:[249,120,373,120,373,244,249,244,249,120,746,120,870,120,870,244,746,244,746,120]}],["88a500",{C:["M","C","C","Z"],s:[389,354,389,354,410,360,410,360,410,360,389,354,389,354]}]]},{ft:"1101-0-christmas",Nk:[["014ea7",{C:"M C C C C Z M C C C C Z M L L L L Z".split(" "),s:[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",{C:"M C C C C Z M C C C C Z M L L L L Z".split(" "),s:[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 hb={};hb.parse=function(W){var h=new Uint8Array(W),S=null;if(h[0]==80&&h[1]==75){var k=Date.now(),p=UZIP.parse(h.buffer),S=p["document.json"];
|
|
S=JSON.parse(G.Md(S,0,S.length));hb.Bv(S,p)}else{var I=cO.parse(W);S=hb.$0(I[2][0][1])}return S};hb.Bv=function(W,h){var S=typeof W;
|
|
if(S=="string"||S=="number"||S=="boolean")return W;if(W instanceof Array){for(var Q=0;Q<W.length;Q++)W[Q]=hb.Bv(W[Q],h);
|
|
return W}var k=W._class;if(k==null)return W;if(k=="MSJSONFileReference"){var p=W._ref;if(!1){}else if(h[p+".json"]!=null){var I=h[p+".json"],q=I.length;
|
|
for(var Q=0;Q<q;Q++)if(I[Q]==11||I[Q]==3)I[Q]=32;var P=G.Md(I,0,q);W=JSON.parse(P)}else if(h[p+".png"]!=null)return{key:p.split("/").pop(),bdata:h[p+".png"]};
|
|
else if(h[p+".jpg"]!=null)return{key:p.split("/").pop(),bdata:h[p+".jpg"]};else if(h[p+".pdf"]!=null)return{key:p.split("/").pop(),bdata:h[p+".pdf"]};
|
|
else if(h[p]!=null)return{key:p.split("/").pop(),bdata:h[p]};else{console.log(W,h);return}}else if(k=="MSAttributedString"){var P=atob(W.archivedAttributedString._archive),t=P.length-1,M=new Uint8Array(t);
|
|
for(var Q=0;Q<t;Q++)M[Q]=P.charCodeAt(Q);W.archivedAttributedString=hb.$0(M)}for(var U in W)W[U]=hb.Bv(W[U],h);
|
|
return W};hb.Hk=function(W,h,S,k){if(W instanceof Uint8Array)return null;if(k.indexOf(W)!=-1)return null;
|
|
k.push(W);if(W==h)return S;for(var p in W){S.push(p);var I=hb.Hk(W[p],h,S,k);if(I){console.log(W,I);
|
|
throw"e"}S.pop()}};hb.$0=function(W){var h=aG.parse(W,0),S=h.$objects,k=new Uint8Array(S.length),p=hb.p5(S,k,h.$top.root);
|
|
for(var Q=0;Q<S.length;Q++)if(k[Q]==0&&Q!=0){console.log(Q,S[Q]);hb.Hk(p,Q,[],[])}for(var Q=0;Q<S.length;
|
|
Q++){var I=S[Q];if(I._class&&(I._class=="bitmap"||I._class=="fill"&&I.fillType==4&&(I.image||I.imageSHA))){var q=I.image,P=I.imageSHA,t=null,M=null;
|
|
if(q=="$null")q=null;if(P=="$null")P=null;if(q&&q.data){M=q.sha1["NS.bytes"];M=btoa(G.dP(M,0,M.length));
|
|
t=q.data instanceof Uint8Array?q.data:q.data["NS.bytes"]}else if(q==null&&P==null){var U=hI.J$("PNG").i4([[N.U(4).buffer]],1,1);
|
|
t=new Uint8Array(U)}else{var i=(p.assets?p.assets.imageCollection:p.images).images;if(P)M=P instanceof Uint8Array?P:P["NS.bytes"];
|
|
else M=q.sha1["NS.bytes"];M=btoa(G.dP(M,0,M.length));var t=i[M].data;if(t["NS.bytes"])t=t["NS.bytes"]}t=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.length));
|
|
delete I.imageSHA;I.image={key:M,bdata:t}}}return p};hb.agu=function(W){return W.slice(0,11)=="MSImmutable"?"MS"+W.slice(11):W};
|
|
hb.p5=function(W,h,S){var k=W[S];if(h[S]==1){return k}h[S]=1;if(typeof k=="string")return k;if(typeof k=="number")return k;
|
|
if(typeof k=="boolean")return k;if(k instanceof Array)return k;if(k instanceof Uint8Array){return k}if(W[k.$class]==null){if(k.$class==null&&k["NS.data"]!=null)return k;
|
|
console.log(S,k);throw"e"}var p=W[k.$class],I=hb.agu(p.$classname);h[k.$class]=1;k.$class=I;if(hb.Jc[I]){delete k.$class;
|
|
k._class=hb.Jc[I]}var q=hb.p5;if(I=="NSMutableArray"||I=="NSArray"){var P=[];if(k["NS.objects"]!=null)for(var Q=0;
|
|
Q<k["NS.objects"].length;Q++)P.push(q(W,h,k["NS.objects"][Q]));else for(var Q=0;k["NS.object."+Q]!=null;
|
|
Q++)P.push(q(W,h,k["NS.object."+Q]));W[S]=P;return P}if(I=="NSDictionary"||I=="NSMutableDictionary"){var t={$class:I};
|
|
if(k["NS.keys"]!=null)for(var Q=0;Q<k["NS.keys"].length;Q++){var M=q(W,h,k["NS.keys"][Q]);if(M instanceof Uint8Array)M=btoa(hb.CT.dP(M,0,M.length));
|
|
else if(typeof M!="string"&&typeof M!="number")M=btoa(hb.CT.dP(M["NS.bytes"],0,M["NS.bytes"].length));
|
|
t[M]=q(W,h,k["NS.objects"][Q])}else for(var Q=0;k["NS.key."+Q]!=null;Q++){var M=q(W,h,k["NS.key."+Q]);
|
|
if(M instanceof Uint8Array)M=btoa(hb.CT.dP(M,0,M.length));else if(typeof M!="string"&&typeof M!="number")M=btoa(hb.CT.dP(M["NS.bytes"],0,M["NS.bytes"].length));
|
|
t[M]=q(W,h,k["NS.object."+Q])}for(var U in k)delete k[U];for(var U in t)k[U]=t[U];return k}if(I=="NSURL")return{$class:I,base:q(W,h,k["NS.base"]),relative:q(W,h,k["NS.relative"])};
|
|
if(hb.akt.indexOf(I)!=-1){W[S]=q(W,h,k.array_do);return W[S]}if(k.do_objectID!=null)k.do_objectID=q(W,h,k.do_objectID);
|
|
if(hb.a6X.indexOf(I)!=-1)return k;var i=hb.arS[I];if(i==null){console.log(W,k);throw"unknown class "+I}for(var Q=0;
|
|
Q<i.length;Q++)if(k[i[Q]]!=null)k[i[Q]]=q(W,h,k[i[Q]]);if(I=="MSTextLayer"){var z=k,D,R,O,b;if(z.attributedString)D=z.attributedString.archivedAttributedString;
|
|
else D=z.storage;b=D.NSString;if(typeof b!="string")b=G.Md(b["NS.bytes"],0,b["NS.bytes"].length);if(D.NSAttributeInfo)R=D.NSAttributeInfo["NS.bytes"];
|
|
else{var w=b.length,A=[];while(w>0){var g=Math.min(100,w);A.push(g,0);w-=g}R=new Uint8Array(A)}O=D.NSAttributes instanceof Array?D.NSAttributes:[D.NSAttributes];
|
|
var E={$class:"NSAttributedString",NSString:b,NSAttributes:O};z.attributedString={_class:"MSAttributedString",archivedAttributedString:E};
|
|
E.NSAttributeInfo={$class:"NSMutableData","NS.data":R};delete z.storage}return k};hb.CT={QA:function(W,h){return W[h+1]<<8|W[h]},d:function(W,h){return W[h+3]<<24|W[h+2]<<16|W[h+1]<<8|W[h]},dP:function(W,h,S){var k="";
|
|
for(var Q=0;Q<S;Q++)k+=String.fromCharCode(W[h+Q]);return k}};hb.Jc={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"};
|
|
hb.akt=["MSArray","MSFillStyleCollection","MSBorderStyleCollection","MSShadowStyleCollection","MSInnerShadowStyleCollection"];
|
|
hb.a6X="MSArchivedColor MSLayoutGrid MSSimpleGrid MSColor MSRect MSStyleColorControls MSGraphicsContextSettings NSMutableString NSMutableData NSDecimalNumberPlaceholder MSStyleReflection".split(" ");
|
|
hb.arS={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 aG={};aG.parse=function(W,h){var S=G.dP(W,h,8);h+=8;var k=aG.parse.anO(W,W.length-31),p=[];if(k.Ed==1){var h=W.length-31-k.Ed*k.bF;
|
|
for(var Q=0;Q<k.bF;Q++)p.push(W[h+Q])}else if(k.Ed==2){var h=W.length-31-k.Ed*k.bF;for(var Q=0;Q<k.bF;
|
|
Q++)p.push(G.QA(W,h+Q*2))}else if(k.Ed==4){var h=W.length-31-k.Ed*k.bF;for(var Q=0;Q<k.bF;Q++)p.push(G.d(W,h+Q*4))}else{throw"e"}var I=aG.parse.p5(W,p,k.root,k);
|
|
return I};aG.parse.p5=function(W,h,S,k){var p=aG.CT,I=k.atS,q=I==4?p.d:I==2?p.QA:p.a9r,P=aG.parse,t=h[S],M=W[t],U=M>>4,i=M&15,D=null;
|
|
t+=1;if([4,5,6,10,12,13].indexOf(U)!=-1&&i==15){var z=P.GZ(W,t);t+=z.bW;i=z.k}if(!1){}else if(U==0)D=i==8?!1:i==9?!0:null;
|
|
else if(U==1)D=P.GZ(W,t-1).k;else if(U==2)D=1<<i==4?G.SQ(W,t):G.aM(W,t);else if(U==3)D=G.aM(W,t);else if(U==4)D=new Uint8Array(W.buffer,t,i);
|
|
else if(U==5)D=G.dP(W,t,i);else if(U==6)D=G.wo(W,t,i);else if(U==8){D=0;for(var Q=0;Q<i+1;Q++)D=D<<8|W[t+Q]}else if(U==10){D=[];
|
|
for(var Q=0;Q<i;Q++)D.push(P.p5(W,h,q(W,t+I*Q),k))}else if(U==12){D=[];for(var Q=0;Q<i;Q++)D.push(P.p5(W,h,q(W,t+I*Q),k))}else if(U==13){D={};
|
|
for(var Q=0;Q<i;Q++){var R=P.p5(W,h,q(W,t+I*Q),k),O=P.p5(W,h,q(W,t+I*(i+Q)),k);D[R]=O}}else throw"unknown mask "+U;
|
|
return D};aG.parse.GZ=function(W,h){var S=1<<(W[h]&15),k=0;for(var Q=0;Q<S;Q++)k=k<<8|W[h+1+Q];return{k:k,bW:S+1}};
|
|
aG.parse.anO=function(W,h){var S={};h+=6;S.Ed=W[h];h++;S.atS=W[h];h++;h+=4;S.bF=G.d(W,h);h+=4;h+=4;S.root=G.d(W,h);
|
|
h+=4;h+=4;S.a3p=G.d(W,h);h+=4;return S};aG.CT={a9r:function(W,h){return W[h]},QA:function(W,h){return W[h]<<8|W[h+1]},d:function(W,h){return W[h]<<24|W[h+1]<<16|W[h+2]<<8|W[h+3]},dP:function(W,h,S){var k="";
|
|
for(var Q=0;Q<S;Q++)k+=String.fromCharCode(W[h+Q]);return k}};var cO={parse:function(W){var h=new Uint8Array(W),S=cO.WG(h),k=[],p=new Uint8Array(h.length),I=[];
|
|
k.push(I);cO.J8(h,S,1,p,I);for(var Q=0;Q<I.length;Q++){var q=[];k.push(q);cO.J8(h,S,I[Q][3],p,q);I[Q][3]=Q+1}return k},J8:function(W,h,S,k,p){S--;
|
|
var I=S*h.wr+(S==0?100:0),q=W[I],P=cO.QA(W,I+1);if(P!=0)throw"free block in a page";var t=cO.QA(W,I+3),M=cO.QA(W,I+5);
|
|
if(M==0)M=65536;var U=W[I+7],i=cO.QA(W,I+8);if(q==2||q==5)I+=4;else i=0;for(var z=0;z<t;z++){var D=S*h.wr+cO.QA(W,I+8+2*z),R=-1,O=0,b=0,w=0;
|
|
if(q==2||q==5){R=cO.d(W,D);D+=4}if(q==2||q==10||q==13){O=cO.rV(W,D);D+=O.bW}if(q==5||q==13){b=cO.rV(W,D);
|
|
D+=b.bW}if(q==5){cO.J8(W,h,R,k,p);continue}var A=h.wr-(S==0?100:0),g=O.Fv,E=q==13?A-35:Math.floor((A-12)*64/255)-23,j=Math.floor((A-12)*32/255)-23,x=j+(g-j)%(A-4);
|
|
if(g<=E){cO.WQ(W,D,k,0,g)}else{var d=x<=E?x:j,L=0;cO.WQ(W,D,k,0,d);L+=d;w=cO.d(W,D+d);while(w!=0){var _=(w-1)*h.wr;
|
|
w=cO.d(W,_);var T=Math.min(h.wr-4,g-L);cO.WQ(W,_+4,k,L,T);L+=T}}p.push(cO.arh(k,g))}},arh:function(W,h){var S=0,k=cO.rV(W,S);
|
|
S+=k.bW;var p=[],I=[];while(S<k.Fv){var q=cO.rV(W,S);S+=q.bW;p.push(q.Fv)}if(S!=k.Fv)throw"e";for(var Q=0;
|
|
Q<p.length;Q++){var q=p[Q];if(!1){}else if(q==0)I.push(null);else if(q==1){I.push(cO.aqN(W,S));S+=1}else if(q==2){I.push(cO.P5(W,S));
|
|
S+=2}else if(q==3){I.push(cO.am2(W,S));S+=3}else if(q==4){I.push(cO.GZ(W,S));S+=4}else if(q==7){I.push(cO.a3W(W,S));
|
|
S+=16}else if(q==8)I.push(0);else if(q==9)I.push(1);else if(q>=12&&(q&1)==0){var P=q-13>>1,t=new Uint8Array(P);
|
|
cO.WQ(W,S,t,0,P);I.push(t);S+=P}else if(q>=13&&(q&1)==1){var P=q-12>>1;I.push(cO.Md(W,S,P));S+=P}else throw"unknonw type "+q}return I},WG:function(W){if(!(W[18]==1&&W[19]==1&&W[20]==0&&W[21]==64&&W[22]==32&&W[23]==32))throw"unexpected SQL3 header";
|
|
var h={m6:cO.dP(W,0,15),wr:cO.QA(W,16),a08:cO.d(W,24),size:cO.d(W,28),ath:cO.d(W,32),ado:cO.d(W,36),a47:cO.d(W,40),afS:cO.d(W,44),acp:cO.d(W,48),aoj:cO.d(W,52),a44:cO.d(W,56),ago:cO.d(W,60),arg:cO.d(W,64)!=0,asg:cO.d(W,68),anl:cO.d(W,92),apD:cO.d(W,96)};
|
|
if(h.wr==1)h.wr=65536;if(h.a44!=1)throw"unsupported text encoding "+h.a44;return h},ao6:function(W,h){return W[h]<<16|W[h+1]<<8|W[h+2]},am2:function(W,h){var S=cO.ao6(W,h),k=S&8388608;
|
|
return k?-(16777215-S+1):S},aqN:function(W,h){cO.Jj[0]=W[h];return cO.a2C[0]},GZ:function(W,h){var S=cO.Jj;
|
|
for(var Q=0;Q<4;Q++)S[Q]=W[h+3-Q];return cO.a2D[0]},P5:function(W,h){var S=cO.Jj;S[0]=W[h+1];S[1]=W[h];
|
|
return cO.a7_[0]},QA:function(W,h){return W[h]<<8|W[h+1]},d:function(W,h){return W[h]<<24|W[h+1]<<16|W[h+2]<<8|W[h+3]},a3W:function(W,h){var S=cO.Jj;
|
|
for(var Q=0;Q<8;Q++)S[Q]=W[h+7-Q];return cO.a3m[0]},rV:function(W,h){var S=h,g8=0;while(!0){var k=W[h];
|
|
h++;g8=g8*128+(k&127);if(k<128)break}return{Fv:g8,bW:h-S}},dP:function(W,h,S){var k="";for(var Q=0;Q<S;
|
|
Q++)k+=String.fromCharCode(W[h+Q]);return k},Md:function(W,h,S){var k="";for(var Q=0;Q<S;Q++)k+="%"+cO.a0Y(W[h+Q].toString(16));
|
|
return decodeURIComponent(k)},WQ:function(W,h,S,k,p){if(W[h+p-1]==null||S[k+p-1]==null){console.log(h,k,p);
|
|
throw"e"}for(var Q=0;Q<p;Q++)S[k+Q]=W[h+Q]},a0Y:function(g8){return g8.length<2?"0"+g8:g8}};cO.Jj=new Uint8Array(8);
|
|
cO.a2C=new Int8Array(cO.Jj.buffer);cO.a7_=new Int16Array(cO.Jj.buffer);cO.a2D=new Int32Array(cO.Jj.buffer);
|
|
cO.a3m=new Float64Array(cO.Jj.buffer);function aS(W,h,S){this.Rr=W;this.nZ=h;this.ak$=S;this.gR=new eC(0,0);
|
|
this.Bi=-1;this.dn=0;this.i7=0;this.Iz=new gj;this.xr=[];this.bV=null;this.acs=null;this.HX=null;this.Sk=null;
|
|
this.eZ=null;this.atk=null}aS.prototype.StartPage=function(W,h,S,k,p){var I=this.nZ,q=I.Nc(),P=1,t=(S-W)*(k-h);
|
|
if(p!=null)t=p;while(t*q*q/(P*P)>2*8192*8192)P++;I.scale(1/P,1/P);this.acs=[W,h,S,k];var P=I.Nc();W=Math.round(W*P);
|
|
h=Math.round(h*P);S=Math.round(S*P);k=Math.round(k*P);var M=this.Rr,U=this.HX;if(U==null){I.y8=-W}else{var i=U[2]-U[0]+30,z=Math.round(S-W)+30;
|
|
if(this.gR.x+i+z>8192){I.y8=-W;this.gR.x=0;this.gR.y+=this.i7+120;this.i7=0}else{I.y8+=i;this.gR.x+=i}}I.S8=this.gR.y+(this.ak$?k:-h);
|
|
this.i7=Math.max(this.i7,Math.round(k-h));this.HX=[W,h,S,k];M.g.push(M.Iq())};aS.prototype.W_=function(){var W=this.Rr,h=W.g[W.g.length-1];
|
|
return h};aS.prototype.as=function(){var W=JSON.parse(JSON.stringify(hz.EJ.default));W.strokeStyleLineAlignment.v.strokeStyleLineAlignment="strokeStyleAlignCenter";
|
|
W.strokeEnabled.v=!1;W.fillEnabled.v=!1;return W};aS.prototype.Cg=function(){var W=this.Rr,h=W.yA();
|
|
h.hq("Path "+W.g.length);this.Rr.g.push(h);h.S5|=16;h.add.SoCo={classID:"null",Clr:{t:"Objc",v:N.X.hg({p:0,z:0,S:0})}};
|
|
h.add.vmsk=new $.CP;h.add.vstk=this.as();return h};aS.prototype.qN=function(W){var h={s:W.crds,C:W.cmds},S=N.H.aD(h,!1);
|
|
N.$.ac(S,this.nZ);return S};aS.aqU=function(W,h){for(var Q=0;Q<W.length;Q++)if(W[Q].VZ!=null)W[Q].VZ=h};
|
|
aS.aro=function(W){return Math.sqrt(Math.abs(W[0]*W[3]-W[1]*W[2]))};aS.Jf=function(W){return N.X.hg({p:W[0]*255,z:W[1]*255,S:W[2]*255})};
|
|
aS.p6=function(W){return new ex(W[0],W[1],W[2],W[3],W[4],W[5])};aS.prototype.Stroke=function(W){if(this.Bi!=-1&&this.Bi!=this.dn)return;
|
|
if(W.pth.cmds.length<=1)return;var h=this.qN(W.pth);if(h.length<=2)return;this.ql(W);aS.aqU(h,-1);h[2].VZ=1;
|
|
var S=aS.Jf(W.COLR),k=this.W_(),p=this.as();aS.FK(p,W,this.nZ.Nc(),S);var I=k!=null&&k.add.vmsk!=null&&!k.vc(),q=I&&!k.add.vstk.strokeEnabled.v&&$.CP.aq7(k.add.vmsk.T,h,!0),P=I&&!k.add.vstk.fillEnabled.v&&JSON.stringify(p)==JSON.stringify(k.add.vstk);
|
|
if(P){k.add.vmsk.T=k.add.vmsk.T.concat(h.slice(2))}else if(q){k.add.vstk=p;p.fillEnabled.v=!0}else{k=this.Cg();
|
|
k.add.vmsk.T=h;k.add.vstk=p}};aS.FK=function(W,h,S,k){W.strokeEnabled.v=!0;W.strokeStyleMiterLimit.v=h.mlimit;
|
|
W.strokeStyleLineDashSet.v=jO.rq(h.dash,1/h.lwidth);W.strokeStyleLineDashOffset.v.val=h.doff;W.strokeStyleLineJoinType.v.strokeStyleLineJoinType=hz.EJ.join[h.ljoin];
|
|
W.strokeStyleLineCapType.v.strokeStyleLineCapType=hz.EJ.zu[h.lcap];W.strokeStyleLineWidth.v.val=Math.max(.4,h.lwidth*aS.aro(h.ctm)*S);
|
|
W.strokeStyleContent.v.Clr.v=k};aS.prototype.Fill=function(W,h){if(this.Bi!=-1&&this.Bi!=this.dn)return;
|
|
if(W.ca==0)return;var S=W.pth.cmds;if(S.length==0)return;if(S.length==2&&JSON.stringify(S)=="[\"M\",\"L\"]")return;
|
|
var k=N.H.TA(W.pth.crds),p=N.H.TA(W.cpth.crds);if(k.r$(p).ZP())return;var I=W.pth,q=UDOC.G.isBox(I,[k.x,k.y,k.x+k.e,k.y+k.Z]),P=W.cpth,t=UDOC.G.isBox(P,[p.x,p.y,p.x+p.e,p.y+p.Z]);
|
|
if(q&&t&&k.n()>p.n()*2){var M=k.r$(p),U=M.x,i=M.y,z=U+M.e,D=i+M.Z;I={cmds:["M","L","L","L","Z"],crds:[U,i,z,i,z,D,U,D]};
|
|
k=M}else if(this.Sk==null&&UDOC.G.isBox(I,[k.x,k.y,k.x+k.e,k.y+k.Z])&&k.LH(p)){I=P;k=p}else this.ql(W);
|
|
var R=this.qN(I),O=N.H.Fb(k);N.H.A(O.s,this.nZ,O.s);k=N.H.TA(O.s);var b=aS.RR(W.colr,this.nZ,k),w=this.W_(),A=w!=null&&w.opacity==Math.round(255*W.ca)&&w.add.vstk!=null&&!w.add.vstk.strokeEnabled.v&&w.add.SoCo&&b.type=="SoFi"&&JSON.stringify(w.add.SoCo.Clr.v)==JSON.stringify(b.k.v.Clr.v);
|
|
if(A){var g=!1;for(var Q=0;Q<R.length;Q++){if(R[Q].VZ==0||R[Q].VZ==2)g=!0}if(g){var E=N.H.TA(N.$.kY(w.add.vmsk.T)),j=N.H.TA(N.$.kY(R));
|
|
A=E.r$(j).ZP()}}if(A){var x=w.add.vmsk.T;for(var Q=2;Q<R.length;Q++)x.push(R[Q])}else{w=this.Cg();delete w.add.SoCo;
|
|
w.add.vmsk.T=$.CP.uW(R);aS.Nl(W.colr,w,this.nZ,k);aS.Ti(W,w)}};aS.Nl=function(W,h,S,k){var p=aS.RR(W,S,k),I=null,q=null;
|
|
h.add.vstk.fillEnabled.v=!0;if(p.type=="SoFi"){I="SoCo";q=hz.RN}if(p.type=="GrFl"){I="GdFl";q=hz.Y1}if(p.type=="patternFill"){I="PtFl";
|
|
q=hz.pd}if(I!=null){h.add[I]={classID:"null"};for(var Q=0;Q<q.length;Q++){var P=q[Q];h.add[I][P]=p.k.v[P]}}};
|
|
aS.prototype.ql=function(W){var h=this.Rr,S=W.cpth,k=S.cmds.join(""),p=S.crds,I=k+" "+p.join(","),q=UDOC.G.isBox(S,this.acs);
|
|
if(q&&this.Sk==null)return;if(I==this.Sk)return;this.ad();if(!q){this.Sk=I;h.g.push(h.Iq());var P=h.yA();
|
|
P.hq("Mask");P.add.lsct=i1.O_;P.oO="pass";P.S5=24;var t=P.add.vmsk=new $.CP;t.T=this.qN(W.cpth);if(UDOC.G.isBox(S)){this.eZ=N.$.E6(t.T);
|
|
this.eZ.x1(3,3)}else this.eZ=null;this.atk=P}};aS.prototype.ad=function(){var W=this.Rr;if(this.Sk!=null){var h=W.g.length-1,Q=h,S=!1;
|
|
while(Q>=0&&W.g[Q].add.lsct!=i1.aW)Q--;var k=this.eZ;if(k){var p=new gj,I=h;while(I>Q){p=W.g[I].LO(this.Rr,!1,!0);
|
|
I--}S=k.LH(p)}if(S){this.xr.splice(Q,1);W.g.splice(Q,1)}else{W.g.push(this.atk)}this.Sk=null}};aS.RR=function(W,h,S){var k,p;
|
|
if(W.length!=null){k="SoFi";var I=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]);p={t:"Objc",v:I};p.v.Clr.v=aS.Jf(W)}else{var q=aS.anC(W,h,S);
|
|
k="GrFl";p={t:"Objc",v:q}}return{type:k,k:p}};aS.anC=function(W,h,S){var k=JSON.parse(hz.Au[hz.order.indexOf("GrFl")]),p=k.Grad.v;
|
|
p.Intr.v=0;var I=aS.p6(W.mat);I.concat(h);var q=new eC(0,0),P=new eC(S.e,0),t=W.crds;if(W.typ=="rad"){k.Type.v.GrdT="Rdl";
|
|
var M=.7;q.x=(1-M)*t[0]+M*t[3];q.y=(1-M)*t[1]+M*t[4];P.x=q.x;P.y=q.y;P.x+=Math.max(t[2],t[5])}else{k.Type.v.GrdT="Lnr";
|
|
q.x=t[0];q.y=t[1];P.x=t[2];P.y=t[3];q.x=P.x+.5*(q.x-P.x);q.y=P.y+.5*(q.y-P.y)}q=I.xK(q);P=I.xK(P);N.X.nA(q,P,S,k);
|
|
var U=W.grad;N.X.J6(U,p);return k};aS.prototype.PutText=function(W,h,S,k){var p=h.charCodeAt(0),z=null;
|
|
if(this.Bi!=-1&&this.Bi!=this.dn)return;if(h.length==0||h.length==1&&(p==0||p==8203))return;this.ql(W);
|
|
var I=this.Rr,q=W.font,P=aS.p6(W.ctm);P.concat(this.nZ);var t=aS.p6(q.Tm);t.concat(P);var M=a.Q.Nc(t),U=new ex(1/M,0,0,-1/M,0,0);
|
|
U.concat(t);var i=q.Tfs*M,D=I.g.length-1;while(D>=0&&I.g[D].add.TySh==null)D--;if(U.S*U.S+U.ZB*U.ZB<.001&&k==null&&D>=0&&I.g[D].add.TySh&&I.g[D].opacity==Math.round(255*W.ca)){var R=I.g[D],O=this.xr[D],b=R.add.TySh.A,w=(b.y8+O.xp-U.y8)/i,A=Math.abs(w),g=h.indexOf(" ")==-1,E=b.S4==U.S4&&b.S==U.S&&b.ZB==U.ZB&&b.Bq==U.Bq,j=E&&Math.abs(O.Mo-U.S8)<1e-5&&A<.6,x=U.S8-O.Mo;
|
|
if(j){z=R;O.xp=U.y8-b.y8;if(w>.2&&g&&[".",",","?",":","!"].indexOf(h)==-1)h=" "+h}else if(E&&Math.abs(U.y8-b.y8)<1e-5&&0<x&&x<i*1.7&&O.a9K==i){z=R;
|
|
this.L8(O);O.Mo=U.S8;h="\n"+h}}if(z==null){D=I.g.length;this.xr[D]={je:[],xp:0,Mo:U.S8,UH:"",a9K:i};
|
|
z=I.yA();I.g.push(z);z.add.lnsr="rend";z.add.TySh=gf.hN(0,0);z.add.TySh.A=U}var O=this.xr[D];O.xp+=S*i;
|
|
O.UH+=h;var d=z.add.TySh.MW,L=gf.x5(d);if(k){gf.fN(d,1);var _=[0,0,Math.ceil(k[0]*M),Math.ceil(k[1]*M)];
|
|
gf.hz(d,_)}var T=L.length-1,c=T+h.length;gf.XK(d,T,h);if(this.bV==null)this.bV=gf.Ql(d,T,T);var e=this.bV;
|
|
e.D4.FontSize=Math.round(i);e.D4.Tracking=Math.round(q.Tc*100);e.D4.Underline=q.Tun==1;e.D4.FillColor={Type:1,Values:[1,W.colr[0],W.colr[1],W.colr[2]]};
|
|
if(q.Tal!=null)e.MR.Justification=q.Tal;if(O.je.length!=0){e.D4.AutoLeading=!1;e.D4.Leading=O.Mo-O.je[O.je.length-1].y}var r=q.Tf;
|
|
r=r.replace(/#2B/g,"+");r=r.replace(/#2C/g,"-");r=r.split("+").pop();var B={"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(B[r])r=B[r];gf.jq(e,r);gf.$n(d,T,c-1,e);z.h1();z.opacity=Math.round(255*W.ca)};aS.prototype.L8=function(W){W.je.push({s6:W.xp,fJ:W.UH.slice(W.je.length==0?0:1)+"\n",y:W.Mo,Nx:W.a9K});
|
|
W.xp=0;W.UH=""};aS.prototype.hs=function(W,h,S){return new Uint8Array(hI.J$("PNG").i4([[W.buffer,0]],h,S))};
|
|
aS.prototype.PutImage=function(W,h,S,k,p,I,q){if(this.Bi!=-1&&this.Bi!=this.dn)return;var P=this.Rr,t=W.font.Tmode;
|
|
if(t==7&&P.g[P.g.length-1].add.TySh){return}this.ql(W);var M=aS.p6(W.ctm);M.concat(this.nZ);var U=new ex(1/S,0,0,-1/k,0,1);
|
|
U.concat(M);M=U;h=aS.Tv(h,S,k,I,!1);if(p)p=aS.Tv(p,S,k,q,!0);if(p==null){if(h.length==S*k*4)h=this.hs(h,S,k)}else{h=this.h7(h,S,k,I,!1);
|
|
p=this.h7(p,S,k,q,!0);var i=N.U(S*k);N.sN(p,i,0);N.ce(i,h,3);h=this.hs(h,S,k)}var z=P.vN(h,"Bitmap",0,0),D=z.rect.clone();
|
|
D.x=D.y=0;var R=N.H.Fb(D).s;N.H.A(R,M,R);z.add.SoLd.Trnf=a.Q.m3(R);z.add.SoLd.nonAffineTransform=a.Q.m3(R);
|
|
z.KF(P,!1);aS.Ti(W,z);P.g.push(z)};aS.Ti=function(W,h){h.opacity=Math.round(255*W.ca);var S=aS.mR[W.bmode];
|
|
if(S==null)console.log("Unknown blend mode",S);else h.oO=S};aS.mR={"/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 "};
|
|
aS.pI=function(W){for(var h in aS.mR)if(aS.mR[h]==W)return h};aS.Tv=function(W,h,S,k,p){var I=hI._e(W.buffer);
|
|
if(I=="jpg"){try{W=new Uint8Array(hI.J$("JPG").aay(W.buffer))}catch(dq){W=new Uint8Array(h*S*4)}}else if(I=="jb2"){W=new Uint8Array(hI.J$("JPG").uc(W.buffer,k,p)[0].data)}else if(W.length!=h*S*4){var q=new Uint8Array(h*S*4),P=Math.ceil(h/8),t=new Uint8Array(S*P);
|
|
UTIF.decode._decodeG4(W,0,W.length,t,0,h,1);var M=t[0]==(p?255:0);for(var U=0;U<S;U++){var i=P*U;for(var z=0;
|
|
z<h;z++){var Q=U*h+z,D=Q*4,R=(t[i+(z>>3)]>>7-(z&7)&1)*255;if(M)R=255-R;q[D]=R;q[D+1]=R;q[D+2]=R;q[D+3]=255}}W=q}return W};
|
|
aS.prototype.h7=function(W,h,S,k,p){if(W.length!=h*S*4){var I=hI._e(W.buffer);if(I=="jb2")throw"e";var q=hI.J$(I);
|
|
if(q==null||I=="tga")q=hI.J$("jpg");W=new Uint8Array(q.uc(W,k,p)[0].data)}return W};aS.prototype.ShowPage=function(){var W=this.Rr;
|
|
this.dn++;var h=this.HX;this.ad();var S=W.yA();W.g.push(S);var k=new gj(Math.round(this.gR.x),Math.round(this.gR.y),Math.round(h[2]-h[0]),Math.round(h[3]-h[1]));
|
|
if(k.ZP())k.e=k.Z=2e3;this.Iz=this.Iz.r8(k);S.Si(k);S.add.artb.artboardBackgroundType.v=3;S.hq("Page "+this.dn);
|
|
S.add.lsct=i1.O_;S.oO="pass";S.S5=24};aS.prototype.Print=function(W){console.log("Print:",W)};aS.prototype.Done=function(){var W=this.Rr;
|
|
if(this.dn==1)W.g[W.g.length-1].add.lsct=i1.wY;W.xs(this.dn);for(var Q=0;Q<W.g.length;Q++){var h=W.g[Q],S=h.add.vmsk,k=h.add.TySh,p=this.xr[Q];
|
|
h.lq();if(S){var I=!1;for(var q=0;q<S.T.length;q++){var P=S.T[q];if((P.type==0||P.type==3)&&P.length>32767)I=!0}if(I){W.g.splice(Q,1);
|
|
Q--;continue}}h.r9(W);if(k&&p.je.length!=0){this.L8(p);var t=k.MW,M=p.je.length,U=p.je[0],i=0,z=0;for(var q=0;
|
|
q<M;q++)i=Math.max(i,p.je[q].s6);gf.fN(t,1);k.A.S8-=U.Nx*.7;gf.hz(t,[0,0,Math.ceil(i*1.1),Math.ceil(p.je[M-1].y-U.y+U.Nx*2)])}if(k){var t=k.MW;
|
|
gf.a6U(t);var D=gf.x5(t).split("\n");for(var q=0;q<D.length-1;q++){var R=D[q],O=0;for(var b=0;b<R.length;
|
|
b++){var w=R.charCodeAt(b);if(1473<=w&&w<=1524)O++}if(O>R.length/2){D[q]=R.split("").reverse().join("");
|
|
var A=t.EngineDict.ParagraphRun.RunArray[q].ParagraphSheet.Properties;A._Direction=1;A.Justification=gf.jT(A)}}gf.d4(t,D.join("\n"))}}W.rd=!0;
|
|
W.e=this.Iz.e;W.Z=this.Iz.Z;W.buffer=N.U(this.Iz.n()*4)};var iK={};iK.m0=function(W,h,S,k,p,I){if(p==null)p=W.e;
|
|
if(I==null)I=W.Z;var q=!1,P=[W.root],t=W.root.children;if(W.add.artd){q=!0;for(var Q=0;Q<t.length;Q++)if(t[Q].i.add.artb==null)q=!1;
|
|
if(q)P=t}var M=new gj(0,0,W.e,W.Z),U=h[0];U=U.replace(/,/g," ").replace(/\-/g," - ").replace(/ +/g," ").trim();
|
|
U=U.split(" ");var i=[];for(var Q=0;Q<U.length;Q++){var z=U[Q];if(z=="-"){var D=i.pop(),R=parseInt(U[Q+1]);
|
|
while(D<R){i.push(D);D++}}else i.push(parseInt(z))}U=i;for(var Q=0;Q<U.length;Q++)if(isNaN(U[Q])||U[Q]<1||U[Q]>P.length){U.splice(Q,1);
|
|
Q--}var O=p/W.e,b=I/W.Z,w=O*72/W.H$,A=b*72/W.H$,g=h[5];if(g==null)g=0;var E=72*g,j=72*g;for(var Q=0;
|
|
Q<P.length;Q++){if(U.length!=0&&U.indexOf(Q+1)==-1)continue;var x=P[Q],d=q?x.i.rp():M,L=Math.round(d.e*w+2*E),_=Math.round(d.Z*A+2*j);
|
|
S.StartPage(0,0,L,_);var T=UDOC.getState([[0,0,L,_]]),c=new ex;c.translate(-d.x,-d.y-d.Z);c.scale(w,-A);
|
|
c.translate(E,j);if(h[2]){var e=W.jc();if(!M.xX(d)){e=N.U(d.n()*4);N.zt(W.jc(),M,e,d)}if(h[1]!=100){var r=hI.J$("JPG").i4([[e.buffer]],d.e,d.Z,[h[1]]);
|
|
e=new Uint8Array(r)}var B=new ex;B.translate(d.x,d.y);iK.Pg(T,S,e,d,B,c)}else iK.YV(W,x,T,S,c,h,k);S.ShowPage()}S.Done()};
|
|
iK.D3=function(W){W=N.X.iZ(W);return[W.p/255,W.z/255,W.S/255]};iK.YV=function(W,h,S,k,p,I,q){var P=h.i,t=P.add.lsct,M=P.add.lmfx,U=P.add.vmsk,i=P.add.vstk,z=P.add.TySh,b,w;
|
|
if(!P.jP())return;var D=P.opacity/255,R=P.add.iOpa!=null?P.add.iOpa/255:1;S.bmode=aS.pI(P.oO);S.ca=S.CA=D*R;
|
|
var O=M;if(O)O=O.solidFillMulti.v[0];if(O)O=O.v;if(O&&!O.enab.v)O=null;var A=P.rect;if(P.bg()&&(!P.vc()||P.zy&&P.zy.nN)){if(P.vc){b=P.zy.nN;
|
|
A=P.zy.arl}else{b=N.U(P.rect.n());N.sN(P.buffer,b,3)}w=jO.Mt(M,null,b,A,W,A).type;var g=["DrSh","OrGl"];
|
|
if(R!=1||i&&!i.fillEnabled.v){var E=b.slice(0);N.uA(E);for(var Q=0;Q<g.length;Q++){var j=w[g[Q]];for(var x=0;
|
|
x<j.length;x++){var d=j[x],L=d.iG.clone();L.x+=A.x;L.y+=A.y;N.XY(E,A,d.vM,L)}}}}if(w)iK.V$(P,b,A,w,S,k,p,I,!0);
|
|
if(P.vc()){for(var Q=0;Q<h.children.length;Q++)iK.YV(W,h.children[Q],S,k,p,I,q)}else if(U&&P.rG()){var _=U.T,T=N.$.E6(_),c=!1,e=!1,r=!1;
|
|
if(i.fillEnabled.v){var B=jO.GH(M,P.add),F=B[0],v=B[1];S.colr=iK.Sr(F?F:v,p,T);c=!0}var X=jO.k1(M);if(!i.strokeEnabled.v&&X)i=X;
|
|
if(i.strokeEnabled.v){var V=i.strokeStyleContent.v,H=i.strokeStyleLineDashSet.v,o=hz.EJ.tZ.indexOf(i.strokeStyleLineAlignment.v.strokeStyleLineAlignment);
|
|
S.COLR=iK.Sr(V,p,T);S.lwidth=i.strokeStyleLineWidth.v.val*(o==2?2:1)*p.Nc();S.mlimit=i.strokeStyleMiterLimit.v;
|
|
S.doff=i.strokeStyleLineDashOffset.v.val;S.ljoin=hz.EJ.join.indexOf(i.strokeStyleLineJoinType.v.strokeStyleLineJoinType);
|
|
S.lcap=hz.EJ.zu.indexOf(i.strokeStyleLineCapType.v.strokeStyleLineCapType);S.dash=[];for(var Q=0;Q<H.length;
|
|
Q++)S.dash.push(H[Q].v.val*S.lwidth);if(S.dash.length==1&&S.dash[0]==0)S.dash=[];e=!0;if(o==2)r=!0}var J=N.H.H7(_,e).Tu;
|
|
N.H.A(J.s,p,J.s);S.pth={cmds:J.C,crds:J.s};if(c&&!r)k.Fill(S);if(e)k.Stroke(S);if(c&&r)k.Fill(S)}else if(z&&I[4]){var C=z.MW,Y=new a1(C,q),J=jE.rK(Y,z),K=N.H.Rc(J);
|
|
for(var u in K){var f=parseInt(u.slice(1),16);S.colr=O?iK.D3(O.Clr.v):[(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255];
|
|
var l=K[u];N.H.A(l.s,p,l.s);l=N.H.arJ(l);S.pth={cmds:l.C,crds:l.s};k.Fill(S)}}else if(z&&I[3]==!1){var C=z.MW,jk=z.A.clone(),hE=new ex(1,0,0,-1,0,0);
|
|
hE.concat(jk);hE.concat(p);var Z=gf.x5(C),Y=new a1(C,q);for(var Q=0;Q<Y.MR.length;Q++){var aQ=Y.MR[Q];
|
|
if(aQ.pr.length==1&&aQ.pr[0].dx)continue;for(var x=0;x<aQ.Sg.length;x++){var jC=aQ.Sg[x],eO=aQ.ug.y+jC.ug.y,iU=aQ.pr[jC.start].start,gK=aQ.pr[jC.end-1].end,iM=gf.a7b(C,iU,gK);
|
|
for(var i5=0;i5<iM.length;i5++){var fN=Y.Re(iU),dx=iM[i5],ai=gf.Ql(C,iU,iU),hO=ai.Vt[ai.D4.Font].Name;
|
|
S.font.Tf=hO;var u=gf.iZ(ai.D4.FillColor);S.colr=O?iK.D3(O.Clr.v):[u.p/255,u.z/255,u.S/255];var ff=S.font.Tfs=Math.round(ai.D4.FontSize),eP=Z.slice(iU,iU+dx);
|
|
if(ai.D4.FontCaps==2)eP=eP.toUpperCase();var a0=new ex;a0.translate(fN.pY.x,-eO);a0.concat(hE);S.ctm=[a0.S4,a0.S,a0.ZB,a0.Bq,a0.y8,a0.S8];
|
|
k.PutText(S,eP,0);for(var bM=0;bM<2;bM++){var cV=ai.D4[bM==0?"Strikethrough":"Underline"];if(!cV)continue;
|
|
var aX=Y.Re(iU+dx-1),j8=bM==0?.27:-.2,j3=ff*j8,am=ff*(j8+.07),fG=aX.pY.x+aX.pY.e-fN.pY.x,bw=[0,j3,fG,j3,fG,am,0,am];
|
|
N.H.A(bw,a0,bw);S.pth={cmds:["M","L","L","L","Z"],crds:bw};k.Fill(S)}S.ctm=[1,0,0,1,0,0];iU+=dx}}}}else if(!P.rect.ZP()){var fz,c6,hk=!1,as=new ex;
|
|
if(P.add.SoLd){var bf=P.add.SoLd,gW=bf.Idnt.v,j1=W.GT(gW,bf.Crop?bf.Crop.v:null),jI="";if(j1==null)return;
|
|
var bZ=j1.xJ,iL=hI._e(j1.raw.buffer);if(I[6].indexOf(iL)!=-1){fz=j1.raw;hk=!0}else fz=bZ[0];c6=bZ[1];
|
|
as=N.V._M(bf)}else{fz=P.buffer;c6=P.rect;as.translate(c6.x,c6.y)}if(O&&!hk)fz=jO.abx(fz,O,c6);iK.Pg(S,k,fz,c6,as,p);
|
|
if(O&&hk){var bw=[0,0,c6.e,0,c6.e,c6.Z,0,c6.Z];N.H.A(bw,as,bw);N.H.A(bw,p,bw);var e2=JSON.parse(JSON.stringify(S));
|
|
e2.ca=O.Opct.v.val/100;e2.pth={cmds:["M","L","L","L","Z"],crds:bw};e2.colr=iK.D3(O.Clr.v);k.Fill(e2)}}if(w)iK.V$(P,b,A,w,S,k,p,I,!1)};
|
|
iK.Sr=function(W,h,S){if(W.Clr)return iK.D3(W.Clr.v);var k=W,p=k.Rvrs?k.Rvrs.v:!1,I=[],q,P=k.Type.v.GrdT=="Rdl"?"rad":"lin",t=N.X.ma(k,S),M=h.xK(t[0]),U=h.xK(t[1]);
|
|
if(P=="rad")q=[M.x,M.y,0,M.x,M.y,eC.fa(M,U)];else{M.Yh(U.x+(M.x-U.x)*2,U.y+(M.y-U.y)*2);q=[M.x,M.y,U.x,U.y]}var i=k.Grad.v.Clrs.v;
|
|
for(var Q=0;Q<i.length;Q++){var z=i[Q].v,D=z.Lctn.v/4096;I.push([p?1-D:D,iK.D3(z.Clr.v)])}if(p)I.reverse();
|
|
return{typ:P,mat:[1,0,0,1,0,0],grad:I,crds:q}};iK.V$=function(W,h,S,k,p,I,q,P,t){var M=S.clone(),U=h;
|
|
if(W.add.TySh&&!P[3]&&!P[4])return;var i=p.ca,z=p.bmode;for(var Q=hz.order.length-1;Q>=0;Q--){var D=hz.order[Q];
|
|
if(D=="GrFl"||D=="SoFi")continue;if(W.add.vmsk&&D=="FrFX")continue;var R=k[D],O=Q>7||D=="FrFX";if(O!=t)continue;
|
|
for(var b=0;b<R.length;b++){var w=R[b];console.log(O,D,w);if(w.iG==null)w=w.wk?w.wk:w.HB;var A=w.iG.clone();
|
|
A.offset(M.x,M.y);if(!O){if(!M.LH(A)){var g=M.r8(A),E=N.U(g.n());N.vG(U,M,E,g);U=E;M=g}N.XY(U,M,w.vM,A)}if(O&&D=="FrFX"&&w.yi)N.XY(w.yi,A,w.vM,A);
|
|
var j=new ex;j.translate(A.x,A.y);p.ca=w.nC;p.bmode=aS.pI(w.Ah);iK.Pg(p,I,w.vM,A,j,q)}}p.ca=i;p.bmode=z};
|
|
iK.Pg=function(W,h,S,k,p,I){var q=new ex;q.scale(k.e,-k.Z);q.translate(0,k.Z);q.concat(p);q.concat(I);
|
|
W.ctm=[q.S4,q.S,q.ZB,q.Bq,q.y8,q.S8];h.PutImage(W,S,k.e,k.Z);W.ctm=[1,0,0,1,0,0]};var jt={};jt.D9=function(W){var h=new Uint8Array(W);
|
|
return jt.A$(h,0)};jt.A$=function(W,h){var S=G.d,k=G.dP,p={SI:k(W,h,4),r:h+8,size:S(W,h+4)},I=p.SI=="FORM"||p.SI=="LIST"||p.SI=="CAT ";
|
|
if(I)p.Dn=k(W,h+8,4);if(p.size<0||p.r+p.size>W.length)throw"e";if(I){p.sub=[];h+=12;var q=p.r+p.size;
|
|
while(h<q){var P=jt.A$(W,h);p.sub.push(P);h+=8+P.size+(P.size&1)}}return p};var fu={};fu.D9=function(W,h){var S=new Uint8Array(W);
|
|
return fu.A$(S,0,h)};fu.A$=function(W,h,S){var k=G.Tz,p=G.dP,I={SI:p(W,h,4),r:h+8,size:k(W,h+4)};if(S&&S[I.size]!=null)I.size=S[I.size];
|
|
if(I.SI=="RIFF"||I.SI=="LIST"){I.Dn=p(W,h+8,4)}if(I.size<0||I.r+I.size>W.length)throw"e";if(I.SI=="RIFF"||I.SI=="LIST"&&(I.Dn!="cmpr"&&I.Dn!="stlt")){I.sub=[];
|
|
h+=12;var q=I.r+I.size;while(h<q){var P=fu.A$(W,h,S);I.sub.push(P);h+=8+P.size+(P.size&1)}}return I};
|
|
function i9(){}i9.D9=function(W,h){var S=new Uint8Array(W);h.rd=!0;var k=G.dP(S,0,2);if(k=="WL"){alert("Unsupported CDR version")}else{var p=i9.Aw,I=fu.D9(S.buffer),q={data:S,r:0,GE:i9.asi(S[11])},P,t,R=300;
|
|
q.Z2=q.GE<600?16:32;i9.w7(q,I.sub,h,0);if(p(I,"cmpr")==null){P=p(I,"page");t=P}else{var M=p(I,"cmpr").sub;
|
|
P=M[0];t=M.slice(1)[1];var U=p(P,"filt").sub,i=p(P,"otlt").sub;P.$G={};for(var Q=0;Q<U.length;Q++)P.$G[U[Q].sub[0].k.id]=U[Q].sub[0].k;
|
|
P.OX={};for(var Q=0;Q<i.length;Q++)P.OX[i[Q].k.id]=i[Q].k}var z=p(P,"mcfg").k,D=z.aqE;R/=gq.GK(new gj(0,0,Math.round(D.x*R),Math.round(D.y*R)),8192*8192);
|
|
var O=Math.round(D.x*R),b=Math.round(D.y*R);h.e=O;h.Z=b;h.buffer=N.U(h.e*h.Z*4);var w=new ex(R,0,0,-R,D.x*R/2,D.y*R/2);
|
|
i9.oL(t,P,h,w);h.xs(1);h.g[h.g.length-1].Si(new gj(0,0,O,b))}};i9.Aw=function(W,h){var S=null;for(var Q=0;
|
|
Q<W.sub.length;Q++){var k=W.sub[Q];if(k.SI==h||k.Dn==h)S=k}return S};i9.oL=function(W,h,S,k){var p=i9.Aw,I=W.Dn?W.Dn:W.SI,q=p(W,"lgob"),P=p(W,"txsm"),t,M;
|
|
if(q){t=p(q,"trfl");M=p(q,"loda")}else if(p(W,"lobj"))M=p(W,"lobj");var U=t?t.sub[0].tf.clone():new ex;
|
|
U.concat(k);var i=S.yA();if(I=="page"||I=="layr"||I=="grp "){i.hq((I=="page"?"Page":"Group")+" "+S.g.length);
|
|
i.add.lsct=i1.wY;i.oO="pass";i.S5=24;var z=[];if(I=="page")z=p(W,"gobj").sub;if(I=="layr")z=W.sub.slice(2);
|
|
if(I=="grp ")z=W.sub.slice(4);if(z.length==0)return;S.g.push(S.Iq());for(var Q=z.length-1;Q>=0;Q--)i9.oL(z[Q],h,S,k)}else if(I=="obj "&&M.k&&M.k.path){i.hq("Object "+S.g.length);
|
|
var D,R;if(h.$G){D=h.$G[M.k.a5t];R=h.OX[M.k.a3y]}var O=i.getName(),b=D&&D.type!=0,w=b&&D.k!=null?D.k:[0,0,0];
|
|
i.S5|=16;i.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));var A=i.add.vstk;A.strokeEnabled.v=!1;
|
|
i.add.vmsk=new $.CP;if(R&&R.anY!=1){A.strokeEnabled.v=!0;A.strokeStyleLineAlignment.v.strokeStyleLineAlignment="strokeStyleAlignCenter";
|
|
A.strokeStyleLineWidth.v.val=R.lineWidth*k.Nc();var g=R.color;A.strokeStyleContent.v.Clr.v=N.X.hg({p:g[0]*255,z:g[1]*255,S:g[2]*255})}var E=M.k.path;
|
|
i.add.vmsk.T=N.H.aD(E,!1);N.$.ac(i.add.vmsk.T,U);aS.Nl(w,i,U,N.$.E6(i.add.vmsk.T));A.fillEnabled.v=b;
|
|
i.lq();i.r9(S)}else if(I=="obj "&&P){var j=M.k.ai8,x=M.k.ai4,_="";i.add.TySh=gf.hN(0,0);var d=U.Nc();
|
|
i.add.TySh.A.translate(U.y8,U.S8);var L=i.add.TySh.MW,T=P.k.a15;for(var Q=0;Q<T.length;Q++){var c=T[Q],e=_.length;
|
|
_+=c.text+"\n";gf.XK(L,e,c.text+"\n");var r=i9.arf(c.aiw,h),B=gf.Ql(L,e,_.length);if(r.align==3)B.MR.Justification=1;
|
|
else B.MR.Justification=0;var F=r.fill.k;B.D4.FillColor={Type:1,Values:[1,F[0],F[1],F[2]]};B.D4.FontSize=Math.round(r.a3O.fontSize*U.Nc());
|
|
gf.$n(L,e,_.length-1,B)}if(x){gf.fN(L,0)}else{gf.fN(L,1);gf.hz(L,[0,0,Math.round(j.x*U.S4),Math.round(-j.y*U.Bq)])}i.hq(_.slice(0,10))}else{i=null}if(i)S.g.push(i)};
|
|
i9.arf=function(W,h){var S=i9.Aw(h,"stlt").k,k=JSON.parse(JSON.stringify(S.J5[W]));if(k.Nr!=0){var p=S.J5[k.Nr];
|
|
for(var I in p)if(k[I]==null||k[I]==0)k[I]=p[I];delete k.Nr}k.align=S.a4j[k.a8c];k.fill=h.$G[S.ae4[k.ac2]];
|
|
k.ao$=h.OX[S.amn[k.atD]];k.a3O=S.aar[k.a4z];return k};i9.a80=function(Q){var g8=Q.data[Q.r];Q.r+=1;return g8};
|
|
i9.ka=function(Q){var g8=G.aU(Q.data,Q.r);Q.r+=2;return g8};i9.bR=function(Q){var g8=G.Tz(Q.data,Q.r);
|
|
Q.r+=4;return g8};i9.aeL=function(Q){var g8=G.Tz(Q.data,Q.r);Q.r+=8;return g8};i9.lW=function(Q){var g8=G.IQ(Q.data,Q.r);
|
|
Q.r+=2;return g8};i9.Ul=function(Q){var g8=G.Ve(Q.data,Q.r);Q.r+=4;return g8};i9.aM=function(Q){var g8=G.cE(Q.data,Q.r);
|
|
Q.r+=8;return g8};i9.cL=function(Q){if(Q.r>=Q.data.length)throw"e";var W=0;while(Q.data[Q.r+W]!=0)W++;
|
|
var h=G.dP(Q.data,Q.r,W);Q.r+=W+1;return h};i9.amO=function(W){if(W.GE<600)return Math.PI*i9.lW(W)/1800;
|
|
return Math.PI*i9.Ul(W)/18e7};i9.apl=function(W){if(W.GE<1500)return i9.v8(W);else return i9.aM(W)/254e3};
|
|
i9.v8=function(W){if(W.GE<600)return i9.lW(W)/1e3;else return i9.Ul(W)/254e3};i9.ahK=function(W){if(W.GE<600)return i9.ka(W);
|
|
else return i9.bR(W)};i9.a64=function(W){if(W.GE<600)return CRDParser.lW(W);else return i9.Ul(W)};i9.w7=function(W,h,S,k){var p=i9,I=p.a80,q=p.ka,P=p.bR,t=p.aeL,M=p.lW,U=p.Ul,i=p.aM,z=p.v8,D=p.apl,R=p.amO,O=p.ahK,b=p.a64;
|
|
for(var w=0;w<h.length;w++){var A=W.GE,g=h[w];W.r=g.r+(g.SI=="LIST"?4:0);if(g.SI=="vrsn"){var E=q(W);
|
|
W.GE=E;console.log("Version",E);W.Z2=E<600?16:32}else if(g.SI=="DISP"){}else if(g.SI=="LIST"&&g.Dn=="cmpr"){var j=P(W),x=P(W),d=P(W),L=P(W),_=new Uint8Array(W.data.buffer,W.r+8+2,j-6-8),T=pako.inflateRaw(_),B=0;
|
|
W.r+=j;_=new Uint8Array(W.data.buffer,W.r+8+2);var c=pako.inflateRaw(_),e=[];for(var r=0;r<c.length;
|
|
r+=4)e.push(G.Tz(c,r));g.sub=[];while(B<T.length){var F=fu.A$(T,B,e);B=F.r+F.size;g.sub.push(F)}var v={data:T,r:0,GE:A,Z2:W.Z2};
|
|
i9.w7(v,g.sub,S,k+1)}else if(g.SI=="LIST"&&g.Dn=="stlt"){var X=W.r,jC=32;g.k={};var V=P(W);if(V==0)return;
|
|
g.k.ae4=i9.QP(W,A>=1300);g.k.amn=i9.QP(W);g.k.aar={};var H=P(W);for(var Q=0;Q<H;Q++){var o=P(W);W.r+=A<1e3?12:20;
|
|
var J=q(W),C=q(W);W.r+=8;var Y=z(W);W.r+=A<1e3?12:20;g.k.aar[o]={abO:J,akh:C,fontSize:Y}}g.k.a4j=i9.QP(W);
|
|
var K=P(W);W.r+=52*K;var u=P(W);W.r+=152*u;var f=P(W);W.r+=784*f;var l=P(W);for(var Q=0;Q<l;Q++){W.r+=40;
|
|
if(A>1300)W.r+=4;if(A>=1300){if(P(W))W.r+=68;else W.r+=12}else{W.r+=20;if(A>=1e3)W.r+=8;if(P(W))W.r+=8;
|
|
W.r+=8}}var jk=P(W);g.k.a93={};for(var Q=0;Q<jk;Q++){var hE=P(W),Z={};W.r+=12;Z.right=z(W);Z.ama=z(W);
|
|
Z.left=z(W);g.k.a93[hE]=Z}var aQ=P(W);if(A>=1300)jC+=4;W.r+=jC*aQ;var eO=P(W);W.r+=28*eO;if(A>800){var iU=P(W);
|
|
W.r+=12*iU}g.k.J5={};for(var Q=0;Q<V;Q++){var gK=P(W),iM=P(W),i5={};i5.Nr=P(W);W.r+=8;var fN=P(W);if(A>=1200)fN*=2;
|
|
W.r+=fN;i5.ac2=P(W);i5.atD=P(W);if(gK>1){i5.a4z=P(W);i5.a8c=P(W);i5.a3U=P(W);i5.ajP=P(W);if(A>800)i5.abf=P(W)}if(gK>2){i5.ary=P(W);
|
|
i5.a95=P(W);i5.ae5=P(W);i5.a5u=P(W);i5.aur=P(W)}g.k.J5[iM]=i5}}else if(g.SI=="LIST")i9.w7(W,g.sub,S,k+1);
|
|
else if(g.SI=="txsm"){g.k={};if(A<600)throw"e";if(A<700)throw"e";if(A>=1600)throw"e";if(A>=1500)W.r+=37;
|
|
else W.r+=36;if(P(W)){if(A<800)W.r+=32}if(A<800)W.r+=4;g.k.ae2=P(W);g.k.a15=[];W.r+=48;if(A>=800){if(P(W)){W.r+=32;
|
|
if(A>=1300)W.r+=8}}if(A>=1500)W.r+=12;var gK=P(W),dx=1,ai=!1;if(!gK){if(A>=800)W.r+=4;if(A>800)W.r+=2;
|
|
if(A>=1400)W.r+=2;W.r+=24;if(A<800)W.r+=8;dx=P(W)}for(var r=0;r<dx;r++){var hO=P(W),Q=0;if(A>=1300&&gK)W.r++;
|
|
W.r++;var V=P(W),ff=[];for(Q=0;Q<V;Q++){var eP=I(W),bM=0;I(W);var a0=I(W);if(A>=800)bM=I(W);var i5={};
|
|
if(a0&1){i5.abO=q(W);var cV=q(W);if(cV)i5.apq=cV}if(a0&2)W.r+=4;if(a0&4)i5.acJ=z(W);if(a0&8)W.r+=4;if(a0&16)W.r+=4;
|
|
if(a0&32)W.r+=4;if(a0&64){i5.ac2=P(W);if(A>=1500)W.r+=48}if(a0&128){i5.atD=P(W)}if(bM&8){if(A>=1300){var aX=P(W);
|
|
if(W.r+aX*2>=W.data.length){ai=!0;break}W.r+=aX*2}else W.r+=4}if(bM&32){var j8=I(W);if(j8)W.r+=52}if(eP==2)if(A>=1300)W.r+=48;
|
|
ff.push(i5)}if(ai){break}var j3=P(W);if(W.r+j3*4>W.data.length)break;var am=[];for(Q=0;Q<j3;Q++){var fG=0;
|
|
if(A>=1200)fG=t(W)&4294967295;else fG=P(W);am[Q]=fG>>16|fG&1}var bw=j3;if(A>=1200)bw=P(W);var fz=i9.cL(W);
|
|
g.k.a15.push({aiw:hO,text:fz,J5:ff})}}else if(g.SI=="font"){var c6=q(W),hk=q(W);W.r+=14;var as=i9.cL(W);
|
|
g.k={id:c6,alx:hk,name:as}}else if(["IKEY","ICMT","pfrd","bcfg"].indexOf(g.SI)!=-1){}else if(g.SI=="flgs")g.k=P(W);
|
|
else if(g.SI=="bbox"){var bf=z(W),gW=z(W),j1=z(W),bZ=z(W);g.k=new gj(bf,gW,j1-bf,bZ-gW)}else if(g.SI=="fild"){var iL=P(W),jI=0,dV;
|
|
if(A>=1300){W.r+=4;jI=q(W);W.r+=2}var e2=q(W);if(e2==0){}else if(e2==1){W.r+=A>=1300?13:2;dV=i9.Vo(W)}else if(e2==2){W.r+=A>=1300?8:2;
|
|
var ds=I(W),ij=0;if(A>=1300){W.r+=17;ij=M(W)}else if(A>=600){W.r+=19;ij=U(W)}else{W.r+=11;ij=M(W)}var dg=R(W),iT=.5+b(W),ej=.5+b(W)-.5;
|
|
if(A>=600)W.r+=2;var eH=O(W)&255,d4=I(W)/100;W.r++;var jy=O(W)&65535;if(A>=1300)W.r+=3;var iR=[];for(var Q=0;
|
|
Q<jy;Q++){var cD=i9.Vo(W);if(A>=1300){if(jI==158||A>=1600&&jI==150)W.r+=26;else W.r+=5}var cA=O(W)/100;
|
|
if(A>=1300)W.r+=3;iR.push([cA,cD])}dV={typ:ds==1?"lin":"rad",crds:[iT-Math.cos(dg)/2,ej-Math.sin(dg)/2,iT,ej],grad:iR,mat:[1,0,0,1,0,0]}}else console.log("Unknown fill type",e2);
|
|
g.k={id:iL,type:e2,k:dV}}else if(g.SI=="outl"){var d_=P(W);if(A>=1300){var d5=0,jl=0;while(d5!=1){W.r+=jl;
|
|
d5=P(W);jl=P(W)}}var dm=q(W),hK=q(W),jj=q(W);if(A<1300&&A>=600)W.r+=2;var cf=z(W),h5=q(W)/100;if(A>=600)W.r+=2;
|
|
var fn=R(W);if(A>=1300)W.r+=46;else if(A>=600)W.r+=52;var dV=i9.Vo(W,d_==270963208||d_==276198e3,d_);
|
|
g.k={id:d_,anY:dm,adC:hK,a12:jj,lineWidth:cf,color:dV}}else if(g.SI=="mcfg"){if(1300<=A)W.r+=12;else if(900<=A)W.r+=4;
|
|
else if(600<=A&&A<700)W.r+=28;var aJ=0,bY=0;if(A<400){W.r+=2;var bf=z(W),gW=z(W),j1=z(W),bZ=z(W);aJ=Math.abs(j1-bf);
|
|
bY=Math.abs(bZ-gW)}else{aJ=z(W);bY=z(W)}g.k={aqE:new eC(aJ,bY)}}else if(g.SI=="loda"||g.SI=="lobj"){var X=W.r,gO=O(W),h6=O(W),g4=O(W),fB=O(W),jm=O(W),hh=[],fv=[];
|
|
W.r=X+g4;for(var Q=0;Q<h6;Q++)hh[Q]=O(W);W.r=X+fB;for(var Q=h6-1;Q>=0;Q--)fv[Q]=O(W);g.k={};for(var Q=0;
|
|
Q<h6;Q++){W.r=X+hh[Q];var ik=fv[Q];if(ik==10)g.k.a3y=P(W);else if(ik==20)g.k.a5t=P(W);else if(ik==200)g.k.aaB=O(W);
|
|
else if(ik==30){if(A<400)jm--;if(jm==1){var bf=D(W),gW=D(W),gP=0,cU=0,dL=0,es=0;if(A<1500){es=D(W);dL=A<900?es:D(W);
|
|
cU=A<900?es:D(W);gP=A<900?es:D(W)}else throw"e";g.k.path=N.H.FU(N.$.Te.Rect(0,0,bf,gW,gP))}else if(jm==2){var i6=z(W),ap=z(W),ix=R(W),hT=R(W),bE=Math.abs(i6),f7=Math.abs(ap);
|
|
g.k.path=N.H.FU(N.$.Te.dm(0,0,bE,-f7))}else if(jm==3){g.k.path=i9.aaJ(W)}else if(jm==4){g.k.ai4=i9.agN(W)}else if(jm==6){g.k.ai8=i9.a8H(W)}else if(jm==37){g.k.path=i9.gP(W)}else console.log(jm)}}}else if(g.SI=="trfd"){var X=W.r,gO=O(W),h6=O(W),g4=O(W);
|
|
W.r=X+g4;var hh=[];for(var Q=0;Q<h6;Q++)hh[Q]=O(W);for(var Q=0;Q<h6;Q++){W.r=X+hh[Q];if(A>=1300)W.r+=8;
|
|
var b6=q(W);if(b6==8){var bJ,hu,bf,fa,dP,gW;if(A>=600)W.r+=6;if(A>=500){bJ=i(W);hu=i(W);bf=i(W)/(A<600?1e3:254e3);
|
|
fa=i(W);dP=i(W);gW=i(W)/(A<600?1e3:254e3)}else throw"e";g.tf=new ex(bJ,fa,hu,dP,bf,gW)}else console.log(b6)}}else if(!1){console.log(g);
|
|
var aU=Math.min(g.size,32);console.log(G.iS(data,g.r,aU));console.log(G.a9Y(data,g.r,aU))}}};i9.QP=function(W,h){var S=i9.bR,k={},p=S(W);
|
|
for(var Q=0;Q<p;Q++){var I=S(W);W.r+=4;var q=S(W);k[I]=q;if(h)W.r+=48}return k};i9.agN=function(W){var h=i9,S=h.v8,k=S(W),p=S(W);
|
|
return new eC(k,p)};i9.a8H=function(W){var h=i9,S=h.v8;W.r+=4;var k=S(W),p=S(W);return new eC(k,p)};
|
|
i9.gP=function(W){var h=i9,S=h.bR,k=h.ka,p=h.v8;W.r+=4;var I=k(W)+k(W);W.r+=16;var q=i9.sF(W,I);return q};
|
|
i9.aaJ=function(W){var h=i9.ka(W);W.r+=2;return i9.sF(W,h)};i9.sF=function(W,h){var S=i9,k=S.v8,p=W.GE<600?2:4,I=W.r,q={s:[],C:[]},P=0,t=0,M=0;
|
|
for(var Q=0;Q<h;Q++){var P=k(W),t=k(W),U=W.data[I+h*p*2+Q];if(!(U&64)&&!(U&128)){q.s.push(P,t);q.C.push("M");
|
|
M+=2}else if(U&64&&!(U&128)){q.s.push(P,t);q.C.push("L");M+=2}else if(!(U&64)&&U&128){q.s.push(P,t);
|
|
q.C.push("C");M+=6}else if(U&64&&U&128){q.s.push(P,t)}}if(M!=q.s.length)throw"e";return q};i9.auf=function(W,h){var S=G.Tz;
|
|
h+=8;var k=S(W,h);h+=4;var p=S(W,h);h+=4;h+=4*7;var I=h,q=N.U(k*p*4);h+=1024;for(var P=0;P<p;P++)for(var t=0;
|
|
t<k;t++){var Q=P*k+t,M=(p-P-1)*k+t,U=W[h+Q]<<2,i=M<<2;q[i+0]=W[I+U+2];q[i+1]=W[I+U+1];q[i+2]=W[I+U+0];
|
|
q[i+3]=255}return{vM:q,rect:new gj(0,0,k,p)}};i9.asi=function(W){if(W==32)return 300;else if(W<49)return 0;
|
|
else if(W<58)return 100*(W-48);else if(W<65)return 0;return 100*(W-55)};i9.Vo=function(W,h,S){var k=i9.ka,p=i9.bR,I=W.GE,q=0,P=0;
|
|
if(I>=500){q=k(W);if(q==1&&I>=1300)q=25;if(q==25||q==30){var t=0;if(q==30){q=25;t=30}else{t=k(W);W.r+=4}var M=k(W),U=k(W)}else if(q==14)throw"e";
|
|
else{W.r+=6;P=p(W)}}else throw"e";var i=[];if(q==2||q==9||q==17){var z=[P>>>0&255,P>>>8&255,P>>>16&255,P>>>24&255];
|
|
if(q==2)for(var Q=0;Q<4;Q++)z[Q]=Math.round(255*z[Q]/100);for(var Q=0;Q<4;Q++)z[Q]/=255;i=UDOC.C.cmykToRgb(z)}else if(q==1||q==5){i=[P>>>0&255,P>>>8&255,P>>>16&255];
|
|
for(var Q=0;Q<3;Q++)i[Q]=i[Q]/255}else console.log("Unknown color model "+q,P,P.toString(16));return i};
|
|
var aD=function(){var W,h,S=new ArrayBuffer(4),k=new Uint8Array(S),p=new Uint32Array(S),I=new Float32Array(S);
|
|
function q(z,D){for(var R=0;R<z.length;R++)if(z[R][0]==D)return z[R]}function P(){var z=0,D=0,R=0;do{R=W[h++];
|
|
z|=(R&127)<<D;D+=7}while(R&128&&D<35);return z>>>0}function t(z,D,R,O,b){W=z;h=D;var w=O[0]=="mesg",A=O[2],g={},E=1,j=w?1e9:A.length;
|
|
while(E<=j){var x=E;if(w){x=P();if(x==0)break}var d=q(A,x),L=d[2],_=d[1]==1,T=_?P():1,c=new Array(T);
|
|
if(L==3){if(!_)throw"e";c=W.slice(h,h+T);h+=T}else for(var Q=0;Q<T;Q++){var e;if((L&1)==1){if(L==1)e=W[h++]==1;
|
|
else if(L==3)e=W[h++];else if(L==5){var r=P();e=r&1?~(r>>>1):r>>>1}else if(L==7)e=P();else if(L==9){if(W[h]==0){e=0;
|
|
h++}else{k[0]=W[h];k[1]=W[h+1];k[2]=W[h+2];k[3]=W[h+3];var B=p[0];p[0]=B<<23|B>>>9;e=I[0];h+=4}}else if(L==11){var F=M(W,h);
|
|
e=F[0];h+=F[1]+1}else throw L}else{var v=R[L>>>1];if(v[0]=="enum"){var X=W[h++];if(X>127)throw"e";e=v[2][X]}else{var V=t(W,h,R,v,b+1);
|
|
e=V[0];h=V[1]}}c[Q]=e}g[d[3]]=_?c:c[0];E++}return[g,h]}function M(z,D){var R=D;while(z[R]!=0)R++;return[G.Md(z,D,R-D),R-D]}function U(z,D){var R=D;
|
|
while(z[R]!=0)R++;for(var Q=D;Q<R;Q++)if(z[Q]>127)throw"e";return G.dP(z,D,R-D)}function i(z){W=z;h=1;
|
|
var D=[];while(h<z.length){var R=h,O=D.length,b=U(z,h);h+=b.length+1;var w=P();if(w>2)throw"e";var A=P(),g=[];
|
|
for(var Q=0;Q<A;Q++){var E=U(z,h);h+=E.length+1;var j=P(),x=P(),d=P();g.push(w==0?E:[d,x,j,E])}D.push([["enum","strc","mesg"][w],b,g])}return D}return{acM:i,aiN:t}}();
|
|
function bT(){}bT.D9=function(W,h){var S=new Uint8Array(W),k=8,p=G.Tz(S,k),M=0,v=0;k+=4;var I=[];while(k<S.length){var q=G.Tz(S,k);
|
|
k+=4;var P=S.slice(k,k+q);if(S[k]==137&&S[k+1]==80){}else P=UZIP.inflateRaw(P);I.push(P);k+=q}var t=aD.acM(I[0]);
|
|
for(var Q=0;Q<t.length;Q++)if(t[Q][1]=="Message")M=Q;var U=aD.aiN(I[1],0,t,t[M],0)[0],i={f9:{},mh:{},al2:{}},z=U.nodeChanges;
|
|
for(var D=0;D<z.length;D++){var R=z[D],O=R.guid;i.mh[O.sessionID+","+O.localID]=R}for(var D=0;D<z.length;
|
|
D++){var R=z[D],O=R.parentIndex;if(O){var b=bT.Wa(i.mh,O.guid);if(b.children==null)b.children=[];b.children.push(R)}}var w=z[0],A=w.children,g=new gj,E=[],j=[];
|
|
for(var O=0;O<A.length;O++){var x=A[O],d=x.children;if(x.name=="Internal Only Canvas"||d==null)continue;
|
|
var L=new gj;for(var Q=0;Q<d.length;Q++){var _=d[Q],T=_.transform,c=_.size;if(T.m00==1&&T.m10==0&&T.m01==0&&T.m11==1){var e=new gj(T.m02,T.m12,c.x,c.y);
|
|
L=L.r8(e)}}var r=g.Z==0?0:g.Z+100,B=L.clone();B.x=0;B.y=r;g=g.r8(B);E[O]=L;j[O]=r}var F=gq.GK(new gj(0,0,g.e,g.Z),8192*8192);
|
|
h.e=Math.round(g.e/F);h.Z=Math.round(g.Z/F);h.buffer=N.U(h.e*h.Z*4);for(var O=0;O<A.length;O++){var x=A[O],d=x.children;
|
|
if(x.name=="Internal Only Canvas"||d==null)continue;d.sort(bT.XP);var X=new ex(1,0,0,1,-E[O].x,j[O]-E[O].y);
|
|
X.scale(1/F,1/F);for(var Q=0;Q<d.length;Q++){var _=d[Q];bT.oL(_,[],X,U.blobs,h,0,i);v++}}h.xs(v);h.rd=!0;
|
|
if(F!=1)alert("File scaled down "+F+"x")};bT.oL=function(W,h,S,k,p,I,q){var P=bT,_=!1,T,c,r,B,F;for(var Q=0;
|
|
Q<h.length;Q++){var t=h[Q],M=t.guidPath.guids[0];if(P.a5M(M,W.guid)){var U={};for(var i in W)U[i]=t[i]!=null?t[i]:W[i];
|
|
W=U}}var z=W.type,D=W.children,R=W.size,O=W.effects,b=p.yA();b.hq(W.name);b.NN(W.visible);b.opacity=Math.round(W.opacity*255);
|
|
var w=P.uL(W.transform),A=w.clone();A.concat(S);var g=new gj(Math.round(A.y8),Math.round(A.S8),Math.round(R.x*A.Nc()),Math.round(R.y*A.Nc())),E=W.fillPaints,j=W.inheritFillStyleID;
|
|
if(j){var U=P.Wa(q.mh,j);if(U)E=U.fillPaints}if(E==null)E=[];var E=P.qZ(E),x=E[0],d=W.strokePaints,j=W.inheritFillStyleIDForStroke;
|
|
if(j){var U=P.Wa(q.mh,j);if(U)d=U.fillPaints}if(d==null)d=[];var d=P.qZ(d),L="BOOLEAN_OPERATION LINE RECTANGLE ROUNDED_RECTANGLE ELLIPSE VECTOR REGULAR_POLYGON STAR".split(" ").indexOf(z)!=-1;
|
|
if(L||z=="FRAME"){T=new $.CP;c=[];P.u5(W,k,T,c);_=N.$.zT(T.T);N.$.ac(T.T,A);g=N.H.No(N.$.E6(T.T));if(q.f9.hn&&x){var e=$.CP.uW(q.f9.hn.T);
|
|
for(var Q=2;Q<e.length;Q++)if(e[Q].VZ!=null)e[Q].VZ=3;T.T=T.T.concat(e.slice(2));c=c.concat(JSON.parse(JSON.stringify(q.f9.uy)))}}if(x&&x.type=="IMAGE"){F=x.imageScaleMode;
|
|
r=P.jc(k,x.image.dataBlob);var v=r.rc.e/r.rc.Z,X=R.x/R.y;B=Math.abs(v-X)}if(z=="FRAME"){}else if(L&&_&&r&&(F=="FIT"||F=="FILL"&&B<=.05)){var V=k[x.image.dataBlob].bytes,H=p.vN(V,b.getName(),0,0);
|
|
H.S5=b.S5;H.opacity=b.opacity;b=H;var o=new gj(0,0,R.x,R.y);if(F=="FIT"){var J=r.rc.e,C=r.rc.Z,Y=Math.min(R.x/J,R.y/C),K=J*Y,u=C*Y;
|
|
o=new gj(o.x+(o.e-K)/2,o.y+(o.Z-u)/2,K,u)}var f=N.H.Fb(o).s;N.H.A(f,A,f);b.add.SoLd.Trnf=a.Q.m3(f);b.add.SoLd.nonAffineTransform=a.Q.m3(f);
|
|
var l=[],O=W.effects,jk=x.paintFilter;if(O)for(var Q=0;Q<O.length;Q++)if(O[Q].type=="FOREGROUND_BLUR"){var hE=O[Q],Z=hw.gn("GsnB",{});
|
|
l.push(Z);Z.v.enab.v=hE.visible;Z.v.Fltr.v.Rds.v.val=hE.radius/2.4}if(jk&&jk.exposure!=0){var Z=hw.gn("brit",{});
|
|
l.push(Z);Z.v.Fltr.v.Brgh.v=Math.round(jk.exposure*160);Z.v.Fltr.v.useLegacy.v=!0}if(jk&&jk.vibrance!=0){var Z=hw.gn("vibA",{});
|
|
l.push(Z);console.log(Z);Z.v.Fltr.v.Strt.v=Math.round(Math.round(jk.vibrance*100))}if(l.length!=0){b.add.SoLd.filterFX=hw.mG();
|
|
p.iI({id:b.add.SoLd.placed.v,rect:new gj,buffer:N.U(1),v:new $.Kt});b.add.SoLd.filterFX.v.filterFXList.v=l}b.KF(p,!1);
|
|
P.nn(q,b,p)}else if(L){P.Sf(b,c,T,W,x,A,g,k,p,q);var aQ=P.xf(W,d[0],A,g,k,p,q);if(aQ[0]!="None"){var jC=b.add.vstk;
|
|
jC.strokeEnabled.v=!0;jC.strokeStyleLineWidth.v.val=W.strokeWeight*A.Nc();jC.strokeStyleLineAlignment.v.strokeStyleLineAlignment=hz.EJ.tZ[["INSIDE","CENTER","OUTSIDE"].indexOf(W.strokeAlign)];
|
|
var eO={SoCo:"SoFi",GdFl:"GrFl"}[aQ[0]],iU=["SoFi","GrFl","patternFill"].indexOf(eO),gK=[hz.RN,hz.Y1,hz.pd][iU];
|
|
jC.strokeStyleContent.v={classID:hz.EJ.Dn[0]};var iM=W.dashPattern;if(iM)jC.strokeStyleLineDashSet.v=jO.rq(iM,1/W.strokeWeight);
|
|
var i5=jC.strokeStyleContent.v={classID:hz.EJ.Dn[iU]};for(var Q=0;Q<gK.length;Q++)i5[gK[Q]]=aQ[1][gK[Q]];
|
|
if(!jC.fillEnabled.v)P._1(aQ,b)}if(O)for(var Q=0;Q<O.length;Q++){var hE=O[Q];if(hE.type!="FOREGROUND_BLUR")continue;
|
|
T.JJ=hE.radius/2.4}b.r9(p)}else if(z=="TEXT"){var fN=W.textData,dx=fN.layoutSize,ai=["LEFT","RIGHT","CENTER"].indexOf(W.textAlignHorizontal);
|
|
b.add.lnsr="rend";b.add.TySh=gf.hN(0,0);b.add.TySh.Ik=new gj(0,0,100,100);var hO=A.clone();b.add.TySh.A=hO;
|
|
var ff=b.add.TySh.MW,eP=fN.characters;if(W.textCase=="TITLE"){for(var Q=0;Q<eP.length;Q++)if(Q==0||eP[Q-1]==" "){var a0=eP.slice(0,Q),bM=eP.slice(Q+1);
|
|
eP=a0+eP[Q].toUpperCase()+bM}}eP=eP.replace(/\u2028/g,"\n");eP=eP.replace(/\u2029/g,"\n");eP=eP.replace(/\r\n/g," \n");
|
|
gf.XK(ff,0,eP);var cV=W.textAutoResize,aX=fN.baselines;if(cV=="WIDTH_AND_HEIGHT"){var j8=ai==0?0:ai==1?dx.x:dx.x/2,j3=aX?aX[0].position.y:0;
|
|
hO.translate(j8*A.Nc(),j3*A.Nc());gf.fN(ff,0)}else if(cV=="HEIGHT"||cV=="NONE"||cV==null){var j3=aX?aX[0].position.y-W.fontSize*.7:0;
|
|
hO.translate(0,j3*A.Nc());gf.fN(ff,1);gf.hz(ff,[0,0,Math.round(dx.x),Math.round((cV=="NONE"?1.8:1)*dx.y)])}else throw cV;
|
|
if(eP!=""){var am=gf.Ql(ff,0,1);P.lr(W,A,R,am,b,k,p,q);gf.$n(ff,0,eP.length,am);var fG=fN.characterStyleIDs,bw=fN.styleOverrideTable;
|
|
if(fG){fG=fG.slice(0);for(var Q=0;Q<fG.length;Q++)if(eP[Q]=="\n")fG[Q]=-Q-1;var fz=[0],c6=0,hk=0;for(var Q=0;
|
|
Q<fG.length;Q++){hk++;var as=fG[Q];if(Q==0||as==fG[Q-1]){}else{fz.push(hk-1,Q);hk=1}}fz.push(hk);for(var Q=0;
|
|
Q<fz.length;Q+=2){var bf=fz[Q],gW=fz[Q+1];if(eP[bf]=="\n")continue;var as=fG[bf];if(as!=0){var j1;for(var bZ=0;
|
|
bZ<bw.length;bZ++)if(bw[bZ].styleID==as)j1=bw[bZ];var am=gf.Ql(ff,bf,bf+1);P.lr(j1,A,R,am,b,k,p,q);gf.$n(ff,bf,bf+gW-1,am)}}}}}else if(z=="SYMBOL"){}else if(z=="INSTANCE"){var iL=W.symbolData,jI=iL.symbolOverrides,U=P.Wa(q.mh,iL.symbolID);
|
|
if(U)D=U.children;else console.log(W.name,"symbol not found",iL.symbolID);h=h.slice(0);for(var Q=0;Q<jI.length;
|
|
Q++)h.push(jI[Q])}else console.log(z);if(!1){}else if(D&&!L){p.g.push(p.Iq());var e2=!1,dV=I==0&&z!="SYMBOL"&&z!="INSTANCE";
|
|
if(dV)b.Si(g);x=E[E.length-1];if(dV&&x&&x.type=="SOLID"){var ds=x.color;b.add.artb.artboardBackgroundType.v=4;
|
|
b.add.artb.Clr=P.Vo(ds)}else if(x&&T){var ij=p.yA();ij.hq("Background");P.Sf(ij,c,T,W,x,A,g,k,p,q);ij.r9(p);
|
|
p.g.push(ij);e2=!0}D.sort(P.XP);var dg=q.f9;q.f9={};for(var iT=0;iT<D.length;iT++)P.oL(D[iT],h,A,k,p,I+1,q);
|
|
q.f9=dg;b.add.lsct=!1?i1.wY:i1.O_;b.oO="pass";var ej=b.jP();b.S5=24;b.NN(ej);var eH=I!=0&&E.length!=0&&!W.frameMaskDisabled&&W.containerSupportsFillStrokeAndCorners;
|
|
if(!e2&&eH&&T){b.add.vmsk=T;b.add.vogk=c;b.r9(p)}else P.nn(q,b,p);p.g.push(b)}else if(W.mask){if(T){q.f9.hn=T;
|
|
q.f9.uy=c}}else{var d4=[],jl=1;if(O)for(var jy=0;jy<O.length;jy++){var hE=O[jy],iR=hE.color,cD=hE.type,cA=["DROP_SHADOW","INNER_SHADOW"].indexOf(cD);
|
|
if(cA!=-1){var d_=["DrSh","IrSh"][cA],d5=JSON.parse(hz.Au[hz.order.indexOf(d_)]);d4.push([d_,d5]);d5.enab.v=hE.visible;
|
|
d5.Md.v.BlnM=hd.iN(P.aiY(hE.blendMode));d5.Opct.v.val=Math.round(100*iR.a);d5.blur.v.val=Math.round(hE.radius*A.Nc());
|
|
d5.Clr=P.Vo(iR);var j8=hE.offset.x,j3=hE.offset.y;d5.uglg.v=!1;d5.lagl.v.val=Math.round(180/Math.PI*Math.atan2(j3,-j8));
|
|
d5.Dstn.v.val=Math.round(Math.sqrt(j8*j8+j3*j3)*A.Nc())}}if(z=="TEXT"&&E[0]&&E[0].type!="SOLID")jl=0;
|
|
for(var Q=jl;Q<E.length;Q++){var dm=E[Q],hK=P.xf(W,dm,A,g,k,p,q);if(hK[0]=="GdFl")d4.push(["GrFl",hK[1]]);
|
|
else if(hK[0]=="SoCo")d4.push(["SoFi",hK[1]]);else if(hK[0]=="PtFl")d4.push(["patternFill",hK[1]]);else throw hK}if(!L)for(var Q=0;
|
|
Q<d.length;Q++){var dm=d[Q],hK=P.xf(W,dm,A,g,k,p,q);if(hK[0]=="SoCo"){var d5=JSON.parse(hz.Au[hz.order.indexOf("FrFX")]);
|
|
d4.push(["FrFX",d5]);d5.enab=hK[1].enab;d5.Opct=hK[1].Opct;d5.Md=hK[1].Md;d5.Clr=hK[1].Clr;d5.Sz.v.val=W.strokeWeight}}if(d4.length!=0){var jj=JSON.parse(hz.default);
|
|
for(var Q=0;Q<hz.order.length;Q++)jj[hz.BN[Q]]={t:"VlLs",v:[]};for(var Q=0;Q<d4.length;Q++){var cf=d4[Q],d_=hz.BN[hz.order.indexOf(cf[0])];
|
|
jj[d_].v.unshift({t:"Objc",v:cf[1]})}if(D==null)b.add.lmfx=jj}p.g.push(b)}};bT.Sf=function(W,h,S,k,p,I,q,P,t,M){var U=bT;
|
|
W.S5|=16;W.add.vogk=h;W.add.vmsk=S;var i=W.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default)),z=U.xf(k,p,I,q,P,t,M);
|
|
if(z[0]=="None"){i.fillEnabled.v=!1;W.add.SoCo=z[1]}else{U._1(z,W);W.add[z[0]]=z[1]}};bT._1=function(W,h){var S=W[1].Opct.v.val;
|
|
if(S!=100)h.opacity=Math.round(h.opacity/255*(S/100)*255)};bT.XP=function(W,h){var S=W.parentIndex.position,k=h.parentIndex.position;
|
|
return S>k?1:-1};bT.qZ=function(W){for(var Q=1;Q<W.length;Q++){var h=W[Q];if(h.type=="IMAGE"&&h.opacity==1){W=W.slice(Q);
|
|
break}}for(var Q=0;Q<W.length;Q++){var h=W[Q],S=h.imageThumbnail;if(h.type=="IMAGE"&&(h.image==null||h.image.dataBlob==null)&&S&&S.dataBlob)h.image=S;
|
|
if(!h.visible||h.type=="IMAGE"&&h.image.dataBlob==null){W.splice(Q,1);Q--}}return W};bT.nn=function(W,h,S){if(W.f9.hn){h.add.vmsk=W.f9.hn.clone();
|
|
h.add.vogk=JSON.parse(JSON.stringify(W.f9.uy));h.r9(S)}};bT.lr=function(W,h,S,k,p,I,q,P){var t=W.fontSize,M=W.lineHeight,U=W.fontName,i=W.textAlignHorizontal,z=W.textTracking,D=W.textCase,R=W.textDecoration;
|
|
if(t==null)t=k.D4.FontSize;if(U)gf.jq(k,U.postscript);if(t!=null)k.D4.FontSize=Math.round(t);if(R=="UNDERLINE")k.D4.Underline=!0;
|
|
if(z)k.D4.Tracking=Math.round(z*1e3);if(D)k.D4.FontCaps=D=="UPPER"?2:0;if(M&&(M.units!="PERCENT"||M.value!=100)){if(t==null)t=15;
|
|
var O=M.value;if(M.units=="PERCENT")O=1*t*O/100;if(M.units=="RAW")O=1*t*O;k.D4.AutoLeading=!1;k.D4.Leading=Math.round(O)}if(i)k.MR.Justification=["LEFT","RIGHT","CENTER"].indexOf(i);
|
|
var b=W.fillPaints,w=W.inheritFillStyleID;if(w){var A=bT.Wa(P.mh,w);if(A)b=A.fillPaints}if(b&&b[0]){var g=bT.xf(W,b[0],h,S,I,q,P);
|
|
if(g[0]=="SoCo"){var E=N.X.iZ(g[1].Clr.v);k.D4.FillColor={Type:1,Values:[1,E.p/255,E.z/255,E.S/255]};
|
|
bT._1(g,p)}}};bT.xf=function(W,h,S,k,p,I,q){var P=bT,t,M,U=W.size;if(h){var i=h.type,z=["GRADIENT_LINEAR","GRADIENT_RADIAL","GRADIENT_DIAMOND","GRADIENT_ANGULAR"].indexOf(i);
|
|
if(i=="SOLID"){t="SoCo";var D=h.color;M=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]);M.Clr=P.Vo(D)}else if(z!=-1){var R=JSON.parse(hz.Au[hz.order.indexOf("GrFl")]),O=R.Grad.v;
|
|
O.Intr.v=0;R.Type.v.GrdT=["Lnr","Rdl","Dmnd","Angl"][z];var b=[],w=h.stops;for(var Q=0;Q<w.length;Q++){var A=w[Q],g=A.color;
|
|
b.push([A.position,[g.r,g.g,g.b],g.a])}N.X.J6(b,O);var E=P.uL(h.transform);E.uA();var j=E.clone();if(U)j.scale(U.x,U.y);
|
|
j.concat(S);var x=new eC(0,.5),d=new eC(1,.5);x=j.xK(x);d=j.xK(d);if(!0){x.x=d.x+.5*(x.x-d.x);x.y=d.y+.5*(x.y-d.y)}N.X.nA(x,d,k,R);
|
|
if(z==3){if(j.S4*j.Bq-j.S*j.ZB<0)R.Rvrs.v=!R.Rvrs.v}t="GdFl";M=R}else if(i=="IMAGE"){var R=JSON.parse(hz.Au[hz.order.indexOf("patternFill")]),L=R.phase.v,_=h.image.dataBlob,T=q.al2[_],H=1;
|
|
if(T==null){var c=P.jc(p,_);T=q.al2[_]={};T.id=jg.bm()+"-d71c-11e5-b1ae-a548a96e5f9f";T.jR=[new Uint8Array(c.data),c.rc];
|
|
T.name="someImage";I.WX(T)}R.Algn.v=!0;R.Ptrn.v.Idnt.v=T.id;var e=S.y8,r=S.S8,B=h.imageScaleMode,E=P.uL(h.transform);
|
|
E.uA();var F=k.e,v=k.Z,X=T.jR[1].e,V=T.jR[1].Z;if(B=="FILL"){H=Math.max(F/X,v/V);H=Math.round(H*100)/100}else if(B=="FIT"){H=Math.min(F/X,v/V);
|
|
H=Math.round(H*100)/100}else if(B=="STRETCH"){var o=F*E.S4,J=v*E.Bq;H=.5*(o/X+J/V);H=Math.round(H*100)/100;
|
|
e+=(o-F)/2+E.y8*F;r+=(J-v)/2+E.S8*v}else if(B=="TILE"){H=h.scale;H=Math.round(H*100)/100;e+=(o-F)/2;
|
|
r+=(J-v)/2}var C=H*X,Y=H*V;e+=-(C-F)/2;r+=-(Y-v)/2;R.Scl.v.val=Math.round(100*H);L.Hrzn.v=Math.round(e);
|
|
L.Vrtc.v=Math.round(r);t="PtFl";M=R}else throw i;if(M)M.Opct={t:"UntF",v:{type:"#Prc",val:Math.round(h.opacity*100)}}}else{t="None";
|
|
M={classID:"null",Clr:{t:"Objc",v:N.X.hg({p:0,z:0,S:0})}}}return[t,M]};bT.jc=function(W,h){var S=W[h];
|
|
if(S.rslt)return S.rslt;var k=S.bytes.buffer,p=hI._e(k),I=hI.J$(p);try{S.rslt=I.uc(k)[0]}catch(dq){S.rslt={data:N.U(4),rc:new gj(0,0,1,1)}}return S.rslt};
|
|
bT.u5=function(W,h,S,k){var p=W.type,I=W.size,q=W.cornerRadius,i;if(q==null)q=0;var P=N.uy.$o(),t=I.x,M=I.y,U=[q,q,q,q],z=["rectangleTopLeftCornerRadius","rectangleTopRightCornerRadius","rectangleBottomRightCornerRadius","rectangleBottomLeftCornerRadius"];
|
|
for(var Q=0;Q<4;Q++)if(W[z[Q]]!=null)U[Q]=W[z[Q]];if(p=="RECTANGLE"||p=="ROUNDED_RECTANGLE"||p=="FRAME"){i=N.$.Te.Rect(0,0,t,M,U)}else if(p=="ELLIPSE"){var D=W.arcData,R=D?D.startingAngle:0,O=D?D.endingAngle:2*Math.PI,b=D?D.innerRadius:0;
|
|
if(R==0&&O>1.999*Math.PI)i=N.$.Te.dm(0,0,t,M,0);else i=N.$.Te.a4h(t/2,M/2,M/2,R,O);if(b!=0&&b!=1){var w=$.CP.uW(i).slice(3);
|
|
w.reverse();for(var Q=0;Q<w.length;Q++){var g=w[Q],E=g.bq;g.bq=g.tk;g.tk=E}var j=new ex;j.translate(-t/2,-M/2);
|
|
j.scale(b,b);j.translate(t/2,M/2);N.$.ac(w,j);i=i.concat(w);i[2].length*=2}}else if(p=="LINE"){i=N.$.Te.Rect(0,0,t,M,0);
|
|
i.pop();i.pop();i[2].length=2}else if(p=="STAR"){i=N.$.Te.Fk(t/2,M/2,t/2,2*Math.PI*(1/4),5,0,W.starInnerScale)}else if(p=="REGULAR_POLYGON"){i=N.$.Te.E1(.5,.5,.5,Math.PI/2,W.count,0);
|
|
var x=new ex;x.scale(t,M);N.$.ac(i,x)}else if(p=="BOOLEAN_OPERATION"){i=[{type:6},{type:8,all:0}];var d=W.children,L=["XOR","UNION","SUBTRACT","INTERSECT"].indexOf(W.booleanOperation);
|
|
if(L==-1)throw W;if(d==null)d=[];for(var Q=0;Q<d.length;Q++){var _=d[Q],T=new $.CP,c=[],e=bT.u5(_,h,T,c);
|
|
if(T.T==null)continue;N.$.ac(T.T,bT.uL(_.transform));i=i.concat(T.T.slice(2));for(var r=0;r<c.length;
|
|
r++)k.push(c[r])}for(var Q=3;Q<i.length;Q++)if(i[Q].VZ!=null)i[Q].VZ=L;P=null}else if(p=="VECTOR"){var B,F,f=3;
|
|
if(!0){var v=W.vectorData;B=v.normalizedSize;F=v.vectorNetworkBlob}var X=h[F].bytes,V=new Uint32Array(X.buffer),H=new Float32Array(X.buffer),o=V[0],J=V[1],C=V[2],Y=[],K=[],u=[],l=f+o*3,jk=l+J*7;
|
|
for(var Q=0;Q<o;Q++){var hE=f+Q*3,Z=new eC(H[hE+1],H[hE+2]);Y.push(Z)}for(var Q=0;Q<J;Q++){var aQ=l+Q*7;
|
|
K.push([V[aQ+0],V[aQ+1],H[aQ+2],H[aQ+3],V[aQ+4],H[aQ+5],H[aQ+6]])}for(var Q=0;Q<C;Q++){var jC=V[jk+1],eO=u[Q]=[];
|
|
jk+=2;for(var r=0;r<jC;r++){var iU=V[jk++],gK=eO[r]=[];for(var iM=0;iM<iU;iM++)gK[iM]=V[jk+iM];jk+=iU}}if(jk!=V.length)throw"e";
|
|
if(C==0){var i5=-1;for(var Q=0;Q<J;Q++){if(i5==-1){}else{var fN=-1;for(var r=Q;r<J;r++)if(K[r][4]==i5)fN=r;
|
|
for(var r=Q;r<J;r++)if(K[r][1]==i5)fN=r;if(fN!=-1){var dx=0,E=K[fN];K[fN]=K[Q];K[Q]=E;if(E[1]!=i5){dx=E[1];
|
|
E[1]=E[4];E[4]=dx;dx=E[2];E[2]=E[5];E[5]=dx;dx=E[3];E[3]=E[6];E[6]=dx}}}i5=K[Q][4]}u.push([[]]);for(var Q=0;
|
|
Q<J;Q++)u[0][0].push(Q)}var ai=[],hO=[];for(var ff=0;ff<u.length;ff++){for(var eP=0;eP<u[ff].length;
|
|
eP++){var a0=u[ff][eP],bM=0;if(a0.length>1){var cV=K[a0[0]],aX=K[a0[1]];bM=cV[4]==aX[1]?1:0}for(var Q=0;
|
|
Q<a0.length;Q++){var j8=K[a0[Q]],j3=1,am=4;if(bM==0){j3=4;am=1}var fG=Y[j8[j3]],bw=Y[j8[am]];if(Q==0){hO.push("M");
|
|
ai.push(fG.x,fG.y)}hO.push("C");ai.push(fG.x+j8[j3+1],fG.y+j8[j3+2],bw.x+j8[am+1],bw.y+j8[am+2],bw.x,bw.y)}}}i=N.H.aD({s:ai,C:hO},!1);
|
|
if(q!=0){var U=[],fz=i[2].length;for(var Q=0;Q<fz;Q++)U.push(q);if(N.$.be(i))N.$.Jg(i,2,U)}var c6=new ex;
|
|
c6.scale(B.x==0?1:I.x/B.x,B.y==0?1:I.y/B.y);N.$.ac(i,c6)}S.T=i;if(P)k.push(P)};bT.Wa=function(W,h){return W[h.sessionID+","+h.localID]};
|
|
bT.a5M=function(W,h){return W.sessionID==h.sessionID&&W.localID==h.localID};bT.aiY=function(W){var h={NORMAL:"norm",MULTIPLY:"mul ",SCREEN:"scrn",COLOR_DODGE:"div ",DARKEN:"dark",LUMINOSITY:"lum "}[W];
|
|
if(h==null)throw W;return h};bT.Vo=function(W){return{t:"Objc",v:N.X.hg({p:W.r*255,z:W.g*255,S:W.b*255})}};
|
|
bT.uL=function(W){var h=[W.m00,W.m10,W.m01,W.m11,W.m02,W.m12];for(var Q=0;Q<6;Q++)if(Math.abs(h[Q])<1e-20)h[Q]=0;
|
|
return new ex(h[0],h[1],h[2],h[3],h[4],h[5])};function cZ(){}cZ.D9=function(){var W=G.dP;function h(D,R,O,b){var w=b?[]:{};
|
|
while(R<D.length-1&&D[R]!=125){var A=W(D,R,3),g=W(D,R+3,1),E;R+=4;R++;if(g=="v"){var j=h(D,R,O+1,A=="ELM"||A=="TIL");
|
|
E=j.k;R=j.r}else if(g=="i"||g=="f"){var x=R;while(D[x]!=125)x++;var d=W(D,R,x-R);E=g=="i"?parseInt(d,16):parseFloat(d);
|
|
R=x+1}else if(g=="s"){var L=G.QA(D,R),d="";R+=2;for(var Q=0;Q<L;Q++)d+=String.fromCharCode(D[R+2*Q+1]);
|
|
E=d;R=R+2*L+1}else if(g=="b"){E=D[R]==49;R=R+2}else throw"e";if(b)w.push([A,E]);else if(w[A]==null)w[A]=E;
|
|
else{if(!(w[A]instanceof Array))w[A]=[w[A]];w[A].push(E)}}R++;return{k:w,r:R}}function S(D,R){var O=k(D).slice(1),D=R.Clr.v;
|
|
D.Rd.v=O[0]*255;D.Grn.v=O[1]*255;D.Bl.v=O[2]*255}function k(D){return[(D>>>24&255)/255,(D>>>16&255)/255,(D>>>8&255)/255,(D>>>0&255)/255]}function p(D,R){var O=R&4278190080|(R&255)<<16|(R>>>8&255)<<8|R>>>16&255;
|
|
new Uint32Array(D.buffer).fill(O)}function I(D,R){var O=D.TSZ,b=D.WPX,w=D.HPX,A=D.TIL,g=new gj(0,0,b,w),E=N.U(b*w*4),j=0;
|
|
for(var x=0;x<w;x+=O)for(var d=0;d<b;d+=O){var L=new gj(d,x,O,O),_,T=A[j];if(T[0]=="TMC"){_=N.U(L.n()*4);
|
|
p(_,T[1])}else if(T[0]=="TID"){_=R[T[1]]}N.zt(_,L,E,g);j++}return[E,g]}function q(D,R){D=new Uint8Array(D);
|
|
var O=8,b,w={},v=0;while(O<D.length){var A=G.d(D,O);O+=4;var g=W(D,O,4);O+=4;if(g=="mkTS"){var E=pako.inflate(D.slice(O,O+A)),j=h(E,0,0);
|
|
b=j.k}else if(g=="mkBT"){var x=G.d(D,O+4),d=G.d(D,O+8),E=pako.inflate(D.slice(O+76,O+A));if(d==0)for(var Q=0;
|
|
Q<E.length;Q+=4){var L=E[Q],_=E[Q+1],T=E[Q+2],c=E[Q+3];E[Q+3]=L;E[Q+2]=c;E[Q+1]=T;E[Q]=_}else{var e=N.U(E.length*4);
|
|
e.fill(255);N.yS(E,e);E=e}w[x]=E}O+=A+4}var r=b.PDC,B=r?r instanceof Array?r:[r]:[b.MKB],F=new gj;for(var Q=0;
|
|
Q<B.length;Q++){var X=B[Q];F=F.r8(new gj(0,v,X.WID,X.HIT));v+=X.HIT+100}R.e=F.e;R.Z=F.Z;R.buffer=N.U(F.n()*4);
|
|
R.xs(B.length);v=0;for(var V=0;V<B.length;V++){R.g.push(R.Iq());var X=B[V],H=X.WID,o=X.HIT,J=X.BGC,C=(X.LYL?X:b).LYL.LAY,u=3;
|
|
for(var Q=0;Q<C.length;Q++)t(C[Q],R,null,w,new ex(1,0,0,1,0,v));var Y=R.yA();R.g.push(Y);var K=new gj(0,v,H,o);
|
|
v+=o+100;Y.Si(K);if(J>>>24!=0){var f=N.X.hg({p:J>>>16&255,z:J>>>8&255,S:J>>>0&255});Y.add.artb.Clr={t:"Objc",v:f};
|
|
u=4}Y.add.artb.artboardBackgroundType.v=u;Y.hq(X.PGN?X.PGN:"Page "+(V+1));Y.add.lsct=i1.O_;Y.oO="pass";
|
|
Y.S5=24}}function P(D,R,O){var b=D[R];return b instanceof Array?b[O]:b}function t(D,R,O,b,w){var A=R.yA();
|
|
if(D.VIS!=null)A.NN(D.VIS);if(D.VIF!=null)A.NN(D.VIF.VIS);if(D.OPA!=null)A.opacity=Math.round(255*D.OPA/1e3);
|
|
A.oO=D.CLL||O=="GRP"?"pass":"norm";if(D.BLD!=null){var g=D.BLD,E={"0":"norm","2":"mul ","4":"over","5":"scrn","7":"diss","9":"dark","10":"lite","37":"idiv","30":"norm","39":"lbrn","41":"vLit"}[g+""];
|
|
if(E==null)console.log(D.OBN,g);else A.oO=E;if(g==30)A.opacity>>>=1}if(D.CLL){A.hq(D.LNM);R.g.push(R.Iq());
|
|
var j=D.CLL.CEL;if(j.length==null)j=[j];for(var x=j.length-1;x>=0;x--){var d=j[x].ELM;for(var Q=d.length-1;
|
|
Q>=0;Q--)t(d[Q][1],R,d[Q][0],b,w)}A.add.lsct=D.DIS?i1.wY:i1.O_;A.S5|=24}else if(O=="GRP"){var L=A.add.lmfx=U(D.EFL),_;
|
|
R.g.push(R.Iq());var d=D.ELM;if(D.MNA){_=d[0][1];d=d.slice(1)}A.hq("Group: "+d.length+" objects");for(var Q=d.length-1;
|
|
Q>=0;Q--)t(d[Q][1],R,d[Q][0],b,w);if(_){if(D.MRX){var T=I(_,b),c=A.v=new $.Kt;c.rect=T[1].clone();c.rect.x=_.XLC;
|
|
c.rect.y=_.YLC+w.S8;c.channel=N.U(c.rect.n());N.sN(T[0],c.channel,0);N.uA(c.channel)}else{M(A,_,w);A.r9(R)}}A.add.lsct=i1.O_;
|
|
A.S5|=24}else if(O=="IMG"){A.hq(D.OBN?D.OBN:"Bitmap");var T=I(D,b);A.rect=T[1].clone();A.rect.x=D.XLC;
|
|
A.rect.y=D.YLC+w.S8;A.buffer=T[0]}else if(O=="TXT"){var e=D.TFS,r=e.TRN instanceof Array?e.TRN.length:1,X="";
|
|
A.add.lnsr="rend";A.add.TySh=gf.hN(0,0);A.add.TySh.Ik=new gj(0,0,100,100);var B=new ex(1,0,0,1,D.LFT,D.TOP);
|
|
if(D.MTX){var F=D.MTX,c=new ex(F.M00,F.M01,F.M10,F.M11,F.M20,F.M21);B.concat(c)}B.concat(w);A.add.TySh.A=B;
|
|
var v=A.add.TySh.MW;for(var Q=0;Q<r;Q++){var V=P(e,"TRN",Q);gf.XK(v,X.length,V);var H=gf.Ql(v,0,1);gf.jq(H,P(e,"FON",Q));
|
|
H.D4.FontSize=Math.round(P(e,"PTS",Q));var o=P(e,"FCL",Q);H.D4.FillColor={Type:1,Values:k(o)};gf.$n(v,X.length,X.length+V.length,H);
|
|
X+=V}A.hq(X.slice(0,255));var J=D.RIT-D.LFT,C=D.BOT-D.TOP;if(D.IMG){t(D.IMG,R,"IMG",b,w);var Y=R.g.pop();
|
|
A.buffer=Y.buffer;A.rect=Y.rect.clone()}gf.fN(v,1);gf.hz(v,[0,0,J,C])}else if(O=="PTH"){A.hq(D.OBN?D.OBN:"Path");
|
|
A.S5|=16;var K=!1;M(A,D,w);var u=A.add.vmsk,f=A.add.vstk,l=N.$.E6(u.T),jk=D.PAT,hE=jk.BPL,Z=jk.FPL,aQ=jk.TXF;
|
|
if(Z&&Z.FEF)u.JJ+=Z.FEF/2.4;if(hE){var jC=hE.CAT;f.strokeEnabled.v=!0;f.strokeStyleLineWidth.v.val=hE.BDI;
|
|
f.strokeStyleLineAlignment.v.strokeStyleLineAlignment=hz.EJ.tZ[D.BRP];S(jk.BCL,f.strokeStyleContent.v);
|
|
if(jC!="bc_Basic"&&jC!="bc_Pencil")K=!0}if(Z==null){f.fillEnabled.v=!1;A.add.SoCo=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]);
|
|
S(0,A.add.SoCo)}else if(Z.CAT=="fc_Solid"){A.add.SoCo=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]);S(D.PAT.FCL,A.add.SoCo)}else if(Z.CAT=="fc_Linear"||Z.CAT=="fc_Circular"||Z.CAT=="fc_Elliptical"){var eO=Z.CAT=="fc_Linear",iU=A.add.GdFl=JSON.parse(hz.Au[hz.order.indexOf("GrFl")]),gK=iU.Grad.v,iM=[],i5=Z.FGL.FGY,fN=i5.FG0.FGI,dx=i5.FG1.FGI;
|
|
for(var Q=0;Q<fN.length;Q++){var ai=fN[Q],hO=k(ai.FGC),ff=1;if(dx.length==fN.length)ff=k(dx[Q].FGC)[0];
|
|
iM.push([ai.FGP,hO.slice(1),ff])}iU.Type.v.GrdT=eO?"Lnr":"Rdl";N.X.J6(iM,gK);gK.Intr.v=0;var eP=D.PRI?D.PRI:D,a0=new eC(eP.PSX,eP.PSY),bM=new eC(eP.PEX,eP.PEY);
|
|
if(Z.CAT=="fc_Elliptical"&&eP.PFX!=null){var cV=new eC(eP.PFX,eP.PFY),aX=eC.fa(a0,bM),j8=eC.fa(a0,cV);
|
|
if(j8<aX){var j3=aX;aX=j8;j8=j3}bM=new eC(a0.x+(aX+j8)/2,a0.y);if(aX/j8<.5)K=!0}if(eO){a0.x=(a0.x+bM.x)/2;
|
|
a0.y=(a0.y+bM.y)/2}N.X.nA(a0,bM,l,iU)}else console.log(Z.CAT);var L=A.add.lmfx=U(D.EFL,u);if(Z&&Z.FTB!=0){var T=I(aQ.MSK,b),am={};
|
|
am.id=jg.bm()+"-d71c-11e5-b1ae-a548a96e5f9f";am.name="someImage";am.jR=T;R.WX(am);var fG=T[0];for(var Q=0;
|
|
Q<fG.length;Q+=4){fG[Q+3]=255-fG[Q];fG[Q]=fG[Q+1]=fG[Q+2]=255}var iU=JSON.parse(hz.Au[hz.order.indexOf("patternFill")]);
|
|
iU.Opct.v.val=Math.round(Z.FTB/10);iU.Algn.v=!0;iU.Ptrn.v.Idnt.v=am.id;L.patternFillMulti.v.unshift({t:"Objc",v:iU})}if(K&&D.IMG){t(D.IMG,R,"IMG",b,w);
|
|
var bw=R.g[R.g.length-1];bw.opacity=A.opacity;return}A.r9(R)}else if(O=="URL")return;else console.log("unknown layer type",O,D);
|
|
R.g.push(A)}function M(D,R,O){if(R.PBL==null)return;var b=D.add.vmsk=new $.CP,w=D.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default)),A=R.PBL.PBP;
|
|
if(!(A instanceof Array))A=[A];for(var g=0;g<A.length;g++){var E=A[g].PBT;if(!(E instanceof Array))E=[E];
|
|
var j=A[g].ISC?0:3;b.T.push({type:j,length:E.length,VZ:0,pt:2,eN:0,w9:0});for(var Q=0;Q<E.length;Q++){var x=E[Q],d=x.XLC,L=x.YLC,_=[d,L,d,L,d,L],T="XPC YPC XLC YLC XSC YSC".split(" ");
|
|
for(var c=0;c<6;c++){var e=T[c],r=x[e];if(r!=null)_[c]=r}b.T.push({type:j+2,M:new eC(d,L),bq:new eC(_[0],_[1]),tk:new eC(_[4],_[5])})}}N.$.ac(b.T,O);
|
|
D.lq()}function U(D,R){var O=JSON.parse(hz.default);for(var Q=0;Q<hz.order.length;Q++)O[hz.BN[Q]]={t:"VlLs",v:[]};
|
|
if(D==null)return O;var b=D.EPS;if(!(b instanceof Array))b=[b];for(var Q=0;Q<b.length;Q++){var w=b[Q].DCE,A={};
|
|
for(var g=0;g<w.length;g++)A[w[g].DCK]=w[g].DCV;if(A.EffectIsVisible=="false")continue;var E=A.mkbFile_WriteOnly_TemporaryEffectUiName;
|
|
if(E=="Gaussian Blur..."&&R){R.JJ+=parseFloat(A.gaussian_blur_radius);continue}var j=["Drop Shadow","Inner Bevel","Inner Glow","Glow"].indexOf(E);
|
|
if(j==-1){continue}var x=["DrSh","ebbl","IrGl","OrGl"][j],d=hz.BN[hz.order.indexOf(x)],L=JSON.parse(hz.Au[hz.order.indexOf(x)]);
|
|
O[d].v.unshift({t:"Objc",v:L});if(x=="DrSh"){L.uglg.v=!1;i(A,"ShadowDistance",L,"Dstn");i(A,"ShadowBlur",L,"blur");
|
|
i(A,"ShadowAngle",L,"lagl",180);L.Opct.v.val=100;z(A,"ShadowColor",L,"Clr")}if(x=="IrGl"){L.Md.v.BlnM="Nrml";
|
|
var _=A.MaskSoftness,T=A.GlowWidth;if(_&&T){_=parseInt(_);T=parseInt(T);L.blur.v.val=T+_;L.Ckmt.v.val=Math.round(100*T/(T+_))}i(A,"BevelContrast",L,"Opct");
|
|
z(A,"OuterBevelColor",L,"Clr")}if(x=="OrGl"){L.Md.v.BlnM="Nrml";var _=A.MaskSoftness,T=A.GlowWidth;if(_&&T){_=parseInt(_);
|
|
T=parseInt(T);L.blur.v.val=T+_}i(A,"BevelContrast",L,"Opct");z(A,"OuterBevelColor",L,"Clr")}if(x=="ebbl"){L.uglg.v=!1;
|
|
i(A,"BevelWidth",L,"blur");i(A,"AngleSoftness",L,"Sftn");i(A,"BevelContrast",L,"srgR");i(A,"LightAngle",L,"lagl")}}return O}function i(D,R,O,b,w){var A=D[R];
|
|
if(w==null)w=0;if(A)O[b].v.val=parseInt(A)+w}function z(D,R,O,b){var w=D[R];if(w){w=w.slice(1);if(w.length==6)w=w+"ff";
|
|
if(w.length!=8)throw"e";var A=k(parseInt(w,16)),g=O[b].v;g.Rd.v=A[0]*255;g.Grn.v=A[1]*255;g.Bl.v=A[2]*255;
|
|
O.Opct.v.val=Math.round(O.Opct.v.val/100*A[3]*100)}}return q}();function dk(){}dk.D9=function(){function W(_,T){var c=!1,e=Date.now(),r=A(_,c),eO=1;
|
|
if(c)console.log("part found",Date.now()-e);e=Date.now();var B=w(r),F=B.Layer,v=B.Header;if(c)console.log(B);
|
|
var X=F[0];X=B.Layer[0];if(c)console.log("document parsed",Date.now()-e);e=Date.now();B.Setup.Gradient=b(B.Setup.Gradient,r);
|
|
if(c)console.log("grads loaded",Date.now()-e);e=Date.now();B.Setup.Pattern=O(B.Setup.Pattern,r);if(c)console.log("patts loaded",Date.now()-e);
|
|
e=Date.now();B.Setup.DocumentData=R(B.Setup.DocumentData,r).pop();if(c)console.log("docdata loaded",Date.now()-e);
|
|
e=Date.now();B.Setup.SVGFilter=R(B.Setup.SVGFilter,r);if(c)console.log("svgfilter loaded",Date.now()-e);
|
|
e=Date.now();var V=v.Cropmarks,H=v.BoundingBox.split(" ").map(parseFloat),o=v.ArtSize?v.ArtSize.split(" ").map(parseFloat):[H[2]-H[0],H[3]-H[1]];
|
|
T.e=Math.round(o[0]);T.Z=Math.round(o[1]);var J=[1,0,0,1,-H[0]+(T.e-(H[2]-H[0]))/2,-H[1]+(T.Z-(H[3]-H[1]))/2];
|
|
J[3]=-1;J[5]=T.Z-J[5];if(V){V=V.split(" ").map(parseFloat);T.e=Math.round(V[2]-V[0]);T.Z=Math.round(V[3]-V[1]);
|
|
J=[1,0,0,-1,-V[0],T.Z+V[1]]}var C=B.Setup.DocumentData;if(C&&C[0]&&C[0].ArtboardArray){var Y=C[0].ArtboardArray;
|
|
if(Y.length!=1)console.log(Y.length,"artboards");var K=new gj;for(var Q=0;Q<Y.length;Q++){var u=Y[Q],f=u.PositionPoint1,l=u.PositionPoint2,jk=f[0],hE=Math.min(f[1],l[1]),Z=l[0],aQ=Math.max(f[1],l[1]);
|
|
K=K.r8(new gj(jk,hE,Z-jk,aQ-hE))}T.e=Math.round(K.e);T.Z=Math.round(K.Z);J[4]=-K.x;J[5]=K.y+T.Z}var jC=Math.max(T.e,T.Z);
|
|
while(jC*eO<1200)eO++;while(jC*eO>6e3)eO*=.5;T.e=Math.round(T.e*eO);T.Z=Math.round(T.Z*eO);T.H$=Math.round(72*eO);
|
|
T.buffer=N.U(T.e*T.Z*4);for(var Q=0;Q<6;Q++)J[Q]*=eO;for(var iU=0;iU<F.length;iU++){var gK=F[iU];gK.Raster=h(gK);
|
|
var iM=z(r,gK);S(T,iM,J,B,gK,r)}if(c)console.log("layers created",Date.now()-e);e=Date.now()}function h(_){var T=_.Layer,c=_.Raster;
|
|
if(c==null)c=[];if(T){for(var Q=0;Q<T.length;Q++){var e=T[Q],r=e.Raster=h(e);c=c.concat(r)}c.sort(function(B,F){return B._begin-F._begin})}return c}function S(_,T,c,e,r,B){var F="",v=0,X="",V=UDOC.G,H=UDOC.getState(),o="norm",J=1,C="SoCo",u=!1,f=0,jk=null,hE=!1,Z=0,aQ=null,jC,eO,iU,gK=0,iM=0,i5=0;
|
|
H.ctm=c;var Y=[0,0,0],K=[0,0,0],l=[],fN=[],dx=[];for(var ai=0;ai<T.length;ai++){var hO=T[ai];if(hO[0]=="%"){if(hO=="%_/ArtDictionary :"&&Z==0)jk=[hO.slice(2)];
|
|
else if(jk!=null){if(hO=="%_"&&Z==0){var ff=j(jk)[0],eP=ff.AI10_ArtUID;if(eP&&!eP.startsWith("XMLID"))_.g[_.g.length-1].hq(d(eP));
|
|
jk=null}else{jk.push(hO.slice(hE?1:2));if(hO=="%_X=")Z++;if(hO=="%_X+")Z--;if(hO=="%_/Binary : /ASCII85Decode ,")hE=!0;
|
|
if(hE&&hO.endsWith("~>"))hE=!1}}else if(aQ){jC+=(jC==""?"":" ")+hO.slice(2);if(jC.endsWith("X#")){aQ.push(jC.slice(0,jC.length-3));
|
|
jC=""}}continue}else if(hO=="/Mesh X!"){aQ=[];jC="";continue}else if(hO=="/End X!"){k(aQ,H,_);aQ=null;
|
|
continue}hO=hO.trim();var a0=hO.split(" "),bM=a0[a0.length-1],cV=bM.toLowerCase(),aX=a0.map(parseFloat);
|
|
if(bM=="m")V.moveTo(H,aX[0],aX[1]);else if(bM=="L"||bM=="l")V.lineTo(H,aX[0],aX[1]);else if(bM=="V"||bM=="v"||bM=="Y"||bM=="y")V.quadCurveTo(H,aX[0],aX[1],aX[2],aX[3]);
|
|
else if(bM=="C"||bM=="c")V.curveTo(H,aX[0],aX[1],aX[2],aX[3],aX[4],aX[5]);else if(bM=="H"||bM=="h"){if(bM==cV)V.closePath(H);
|
|
l.push(JSON.parse(JSON.stringify(H.pth)))}else if(bM=="Xy"){o=["norm","mul ","scrn","over","sLit"][aX[0]];
|
|
J=aX[1];if(o==null){o="norm";console.log("unknown blend mode",aX[0])}}else if(bM=="Xd"){var j8=_.g[_.g.length-1];
|
|
j8.opacity=Math.round(255*J);j8.oO=j8.vc()&&o=="norm"?"pass":o}else if(bM=="AE")gK=aX[0];else if(bM=="Ae")iM=aX[0];
|
|
else if(bM=="Xw")i5=aX[0];else if(bM=="*"){var j3=H.pth.crds,am=H.ctm,fG=j3[0]==j3[2]?0:1;_.r4.push([fG,j3[fG]]);
|
|
V.newPath(H)}else if(bM=="Xh")eO=aX;else if(bM=="XN")iU=hO.split(" ")[0];else if(bM=="XI"){if(eO==null)continue;
|
|
var bw=r.Raster;if(bw==null||bw.length==0){console.log("no Raster");continue}var fz=bw[v++].Data,c6=fz._begin,hk=fz._end;
|
|
while(B[c6]!=88)c6++;c6+=3;var as=B.slice(c6,hk),bf=eO[8],gW=eO[9],j1=bf*gW,bZ=N.U(j1*4);bZ.fill(255);
|
|
var iL=T[ai-2];iL=iL.slice(iL.indexOf("]")+2).split(" ").map(parseFloat);var jI=iL[7],e2=iL[8],dV=iL[6],ds=Math.ceil(bf*jI*dV/8);
|
|
if(jI==1){if(dV==8)for(var Q=0;Q<j1;Q++)for(var ij=0;ij<3;ij++)bZ[4*Q+ij]=as[Q];else if(dV==1)for(var dg=0;
|
|
dg<gW;dg++)for(var iT=0;iT<bf;iT++)for(var ij=0;ij<3;ij++)bZ[4*(dg*bf+iT)+ij]=255*(as[dg*ds+(iT>>>3)]>>>7-(iT&7)&1);
|
|
else throw dV}else if(jI==3)for(var Q=0;Q<j1;Q++)for(var ij=0;ij<3;ij++)bZ[4*Q+ij]=as[3*Q+ij];else if(jI==4||jI==5)for(var Q=0;
|
|
Q<j1;Q++){var ej=M([as[jI*Q+0]/255,as[jI*Q+1]/255,as[jI*Q+2]/255,as[jI*Q+3]/255]);bZ[4*Q+0]=ej[0]*255;
|
|
bZ[4*Q+1]=ej[1]*255;bZ[4*Q+2]=ej[2]*255}else if(jI==7)for(var Q=0;Q<j1;Q++){bZ[4*Q+0]=as[jI*Q+0];bZ[4*Q+1]=as[jI*Q+1];
|
|
bZ[4*Q+2]=as[jI*Q+2]}else throw iU;if(e2==1){var eH=gW*ds;for(var Q=0;Q<j1;Q++)bZ[4*Q+3]=as[eH+Q]}var d4=N.qR(bZ,bf,gW)?"JPG":"PNG";
|
|
if(bf*gW<700*700)d4="PNG";var jy=hI.J$(d4).i4([[bZ.buffer]],bf,gW),iR=_.vN(new Uint8Array(jy),"<Image>",0,0);
|
|
_.g.push(iR);iR.oO=o;iR.opacity=Math.round(255*J);iR.NN(i5==0);var c=new ex;c.scale(1,-1);c.concat(t(eO.slice(1)));
|
|
c.concat(t(H.ctm));var cD=iR.rect.clone();cD.x=cD.y=0;var a0=N.H.Fb(cD).s;N.H.A(a0,c,a0);iR.add.SoLd.Trnf=a.Q.m3(a0);
|
|
iR.add.SoLd.nonAffineTransform=a.Q.m3(a0);iR.KF(_,!1)}else if(bM=="Ln"){F=I(hO)}else if(bM=="u"||bM=="q"||bM=="Lb"){fN.push(iM==1);
|
|
dx.push((bM=="Lb"?1-aX[0]:i5)==0);if(u)continue;_.g.push(_.Iq())}else if(bM=="U"||bM=="Q"||bM=="LB"){if(fN.length==0||dx.length==0)throw ai;
|
|
var cA=fN.pop(),d_=dx.pop();if(bM=="LB")cA=gK==1;if(u)continue;var iR=_.yA();iR.hq((bM=="U"?"<Group>":"<Clip Group>")+X);
|
|
if(bM=="LB")iR.hq(F);if(bM=="Q"&&l.length!=0){var d5=l.pop(),jl=UDOC.G.isBox(d5,[0,0,_.e,_.Z]);if(!jl)U(iR,d5,_)}iR.add.lsct=cA?i1.wY:i1.O_;
|
|
iR.oO="pass";iR.S5=24;iR.NN(d_);_.g.push(iR)}else if(bM=="Bb"||bM=="Bh"||bM=="BB"){}else if(bM=="Bg"){var dm=e.Setup.Gradient[I(hO)];
|
|
C="GdFl";Y=p(dm.ez,dm.a3f)}else if(bM=="Bm"||bM=="Xm"){var hK=Y.Type.v.GrdT;if(hK=="Lnr"&&bM!="Xm"||hK=="Rdl"&&bM!="Bm")continue;
|
|
var jj=N.H.TA(H.pth.crds),cf=new eC(0,0),fn=new eC(1,0),aJ=new ex;aJ.concat(t(aX));aJ.concat(t(H.ctm));
|
|
cf=aJ.xK(cf);fn=aJ.xK(fn);if(hK=="Lnr"){cf.x=(cf.x+fn.x)/2;cf.y=(cf.y+fn.y)/2}N.X.nA(cf,fn,jj,Y)}else if(bM=="p"){var bY=I(hO),gO=e.Setup.Pattern[bY];
|
|
if(gO.raw==null){var jj=gO.zq,bf=Math.round(jj[2]-jj[0]),gW=Math.round(jj[3]-jj[1]),ff=new jg;ff.e=bf;
|
|
ff.Z=gW;ff.buffer=N.U(bf*gW*4);S(ff,gO.je,[1,0,0,-1,-gO.zq[0],gW+gO.zq[1]],e,r,B);gO.raw=new Uint8Array(hI.J$("PSD").i4(ff))}var h6=hO.slice(hO.indexOf(")")+2),g4=h6.slice(0,h6.indexOf("[")-1).split(" ").map(parseFloat),fB=h6.slice(h6.indexOf("[")+1,h6.indexOf("]")).split(" ").map(parseFloat);
|
|
C="patt";Y=[bY,g4,fB]}else if(bM=="J"||bM=="j"||bM=="w"||bM=="M"||bM=="d"){for(var Q=1;Q<a0.length;Q++){var jm=a0[Q],hh=aX[Q-1];
|
|
if(jm=="w")H.lwidth=hh;if(jm=="j")H.ljoin=hh;if(jm=="J")H.lcap=hh;if(jm=="d"){var fv=hO.slice(hO.indexOf("[")+1,hO.indexOf("]")).trim();
|
|
if(fv.length!=0){var ik=fv.split(" ").map(parseFloat);H.dash=ik}}}}else if(cV=="xa"||cV=="xx"){var gP=[aX[4],aX[5],aX[6]];
|
|
C="SoCo";if(bM=="Xa"||bM=="Xx")Y=gP;else K=gP}else if(cV=="xk"){var gP,cU=aX[aX.length-2],dL=aX[aX.length-3];
|
|
if(cU==0)gP=M(aX);else if(cU==1){gP=[aX[4],aX[5],aX[6]];for(var Q=0;Q<3;Q++)gP[Q]=dL*1+(1-dL)*gP[Q]}else throw hO;
|
|
C="SoCo";if(bM=="Xk")Y=gP;else K=gP}else if(cV=="k"||cV=="x"){if(cV=="x"){aX.pop();var es=1-aX.pop();
|
|
for(var Q=0;Q<4;Q++)aX[Q]*=es}var gP=M(aX);C="SoCo";if(bM==cV)Y=gP;else K=gP}else if(cV=="g"){var gP=[aX[0],aX[0],aX[0]];
|
|
C="SoCo";if(bM==cV)Y=gP;else K=gP}else if(cV=="n")V.newPath(H);else if(bM=="*u"){u=!0;f=0}else if(bM=="*U"||cV=="s"||cV=="f"||cV=="b"){if(bM!="*U"&&u){if(cV=="f"||cV=="b")f|=1;
|
|
if(cV=="s"||cV=="b")f|=2;continue}if(bM==cV)V.closePath(H);if(bM=="*U"){u=!1}var iR;if(C=="patt"){var gO=e.Setup.Pattern[Y[0]];
|
|
iR=_.vN(gO.raw,"<Pattern>",0,0);var cD=iR.rect.clone();cD.x=cD.y=0;var a0=N.H.Fb(cD).s,fB=t(Y[2]);fB.y8=fB.S8=0;
|
|
N.H.A(a0,fB,a0);iR.add.SoLd.Trnf=a.Q.m3(a0);iR.add.SoLd.nonAffineTransform=a.Q.m3(a0);iR.KF(_,!1)}else{iR=_.yA();
|
|
iR.S5|=16;var i6=iR.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));i6.strokeEnabled.v=i6.fillEnabled.v=!1;
|
|
if(C=="SoCo"){iR.add.SoCo=JSON.parse(hz.Au[hz.order.indexOf("SoFi")]);var ap=iR.add.SoCo.Clr.v;q(ap,Y)}if(C=="GdFl")iR.add.GdFl=Y;
|
|
if(cV=="f"||cV=="b"||bM=="*U"&&f&1)i6.fillEnabled.v=!0;if(cV=="s"||cV=="b"||bM=="*U"&&f&2)aS.FK(i6,H,1,aS.Jf(K))}iR.hq("<"+(bM=="*U"?"Compound ":"")+"Path>"+X);
|
|
iR.oO=o;iR.opacity=Math.round(255*J);iR.NN(i5==0);U(iR,H.pth,_);_.g.push(iR);V.newPath(H)}else if(bM==","&&a0[1]=="/StoryIndex"){var ix=e.Setup.TextDocument,fa=null;
|
|
if(!(ix instanceof Array))ix=e.Setup.TextDocument=D(ix,B);var hT=ix[0],bE=ix[2];if(hT._DocumentResources)hT=ix[0]=gn.aa2(hT);
|
|
else gn.a7C(hT);var iR=_.yA();iR.add.lnsr="rend";iR.add.TySh=gf.hN(0,0);var f7=h8.asS(hT),b6=iR.add.TySh.MW=f7[aX[0]];
|
|
if(b6==null){console.log("text not found");continue}iR.hq(gf.x5(b6).slice(0,50));iR.oO=o;iR.opacity=Math.round(255*J);
|
|
iR.NN(i5==0);var es=hT._1._1[aX[0]]._1._0[0]._0;es=parseInt(es.slice(1));var bJ=hT._0._8._0,hu=bJ[es]._0;
|
|
if(hu._0)fa=P(hu._0);else if(hu._1)fa=P(hu._1._0);else fa=P(hu._2._2).slice(3);if(fa.length!=2){var jj=N.H.TA(fa);
|
|
fa=[jj.x,jj.y];if(jj.n()!=0){gf.fN(b6,1);gf.hz(b6,[0,0,Math.round(jj.e),Math.round(jj.Z)])}}var dP=new ex,aU=new ex(1,0,0,1,fa[0],fa[1]),hf=new ex(1,0,0,1,-bE[0],-bE[1]),hL=t(H.ctm),ci=new ex;
|
|
if(hu._2&&hu._2._2){var c=P(hu._2._2);ci=new ex(c[0],c[1],c[2],c[3],c[4],c[5])}dP.concat(aU);dP.concat(ci);
|
|
dP.concat(hf);dP.scale(1,-1);dP.concat(hL);iR.add.TySh.A=dP;_.g.push(iR);_.rd=!0}}}function k(_,T,c){var e=UDOC.G,r=[],B=[],F="/DeviceGray",v,X=[],V=1,j3=0,am=0,fG=0;
|
|
for(var H=0;H<_.length;H++){var o=_[H];if(o.endsWith(" /CS")){var J=o.indexOf("/NChannel"),C=o.indexOf("/Process");
|
|
if(o.startsWith("/DeviceRGB")){F="/DeviceRGB";v=3}else if(o.startsWith("/DeviceGray")){F="/DeviceGray";
|
|
v=1}else if(o.startsWith("/DeviceCMYK")){F="/DeviceCMYK";v=4;X=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]}else if(J!=-1){F="/DeviceCMYK";
|
|
v=parseInt(o.slice(J-2,J-1));var Y=1;for(var Q=0;Q<v;Q++){Y=o.indexOf("[",Y);X[v-1-Q]=o.slice(Y+1,Y+8).split(" ").map(parseFloat);
|
|
Y++}}else if(C){F="/DeviceGray";v=1}else throw o}else if(o[0]=="["){var K=o.indexOf("]"),u=o.slice(1,K).split(" ").map(parseFloat),f=o.slice(K+2),l,jk,hE,Z,aQ,jC;
|
|
if(f=="/Size"||f=="/P"||f=="/R")continue;if(f=="/S"||f=="/A"){l=u[0];jk=u[1];hE=u[2];Z=u[3];aQ=u[4];
|
|
jC=u[5]}else if(f=="/N"){var eO=v+(V==1?0:1),iU;l=u[eO+0];jk=u[eO+1];hE=u[eO+2];Z=u[eO+3];aQ=u[eO+5];
|
|
jC=u[eO+6];if(F=="/DeviceRGB")iU=u.slice(0,3);else if(F=="/DeviceGray")iU=[u[0],u[0],u[0]];else if(F=="/DeviceCMYK"){var gK=[0,0,0,0];
|
|
for(var Q=0;Q<v;Q++){var iM=u[Q],i5=X[Q];gK[0]+=iM*i5[0];gK[1]+=iM*i5[1];gK[2]+=iM*i5[2];gK[3]+=iM*i5[3]}iU=M(gK)}else throw iU;
|
|
iU.push(u[v]);B.push([iU,l,jk])}else throw f;r.push([f,aQ,jC,l,jk,hE,Z])}else if(o=="/E"){var fN=r.slice(0),dx=0;
|
|
for(var Q=0;Q<r.length;Q++){var ai=r[Q][0];if(ai=="/N"){dx++;continue}var hO=Q,ff=Q+1;while(r[ff][0]!="/N"&&ff<r.length)ff++;
|
|
if(dx==0||dx==3){for(var eP=0;eP<ff-hO;eP++)fN[hO+eP]=r[ff-1-eP]}else for(var eP=hO;eP<ff;eP++){var a0=fN[eP],bM=a0[1];
|
|
a0[1]=a0[5];a0[5]=bM;bM=a0[2];a0[2]=a0[6];a0[6]=bM}Q=ff-1}r=[];for(var Q=0;Q<fN.length;Q++){var a0=fN[Q];
|
|
r.push(a0[1],a0[2],a0[3],a0[4],a0[5],a0[6])}var cV=r.length;e.moveTo(T,r[2],r[3]);for(var Q=0;Q<cV;Q+=6){var hE=r[(Q+4)%cV],Z=r[(Q+5)%cV],aQ=r[(Q+6)%cV],jC=r[(Q+7)%cV],l=r[(Q+8)%cV],jk=r[(Q+9)%cV];
|
|
e.curveTo(T,hE,Z,aQ,jC,l,jk)}e.closePath(T);r=[]}else if(o.endsWith("/Version"))V=parseFloat(o[0])}var aX=c.yA();
|
|
aX.S5|=16;aX.hq("<Mesh>");var j8=aX.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));j8.strokeEnabled.v=!1;
|
|
for(var Q=0;Q<B.length;Q++)for(var eP=Q+1;eP<B.length;eP++){var bw=B[Q][0],fz=B[eP][0],c6=bw[0]-fz[0],hk=bw[1]-fz[1],as=bw[2]-fz[2],bf=Math.sqrt(c6*c6+hk*hk+as*as);
|
|
if(bf>fG){fG=bf;j3=Q;am=eP}}var gW=B[j3],j1=B[am],bZ=aX.add.GdFl=p(0,[[0,gW[0]],[1,j1[0]]]),iL=t(T.ctm),jI=iL.xK(new eC(gW[1],gW[2])),e2=iL.xK(new eC(j1[1],j1[2])),dV=N.H.TA(T.pth.crds);
|
|
jI.x=(jI.x+e2.x)/2;jI.y=(jI.y+e2.y)/2;N.X.nA(jI,e2,dV,bZ);U(aX,T.pth,c);c.g.push(aX);e.newPath(T)}function p(_,T){var c=JSON.parse(hz.Au[hz.order.indexOf("GrFl")]),e=c.Grad.v;
|
|
e.Intr.v=0;c.Type.v.GrdT=["Lnr","Rdl"][_];N.X.J6(T,e);return c}function I(_){return _.slice(_.indexOf("(")+1,_.indexOf(")"))}function q(_,T){_.Rd.v=T[0]*255;
|
|
_.Grn.v=T[1]*255;_.Bl.v=T[2]*255}function P(_){var T=[];for(var Q=0;Q<_.length;Q++)T[Q]=parseFloat(_[Q].slice(1));
|
|
return T}function t(_){return new ex(_[0],_[1],_[2],_[3],_[4],_[5])}function M(_){return UDOC.C.cmykToRgb(_)}function U(_,T,c){_.add.vmsk=new $.CP;
|
|
if(T.crds.length!=0)_.add.vmsk.T=i(T);_.lq();_.r9(c)}function i(_){var T={s:_.crds,C:_.cmds},c=N.H.aD(T,!1);
|
|
return c}function z(_,T){var c=[T._begin],e=T._end-T._begin,r=e,B=T.Raster,H=0;if(B){for(var Q=0;Q<B.length;
|
|
Q++){var F=B[Q].Data,v=F._begin+32,X=F._end;if(v>X)v=X;c.push(v,X);r-=X-v}}c.push(T._end);var V=new Uint8Array(r);
|
|
for(var Q=0;Q<c.length;Q+=2){var v=c[Q],o=c[Q+1]-v;V.set(new Uint8Array(_.buffer,v,o),H);H+=o}return G.Md(V).split(/\r\n|\r|\n/)}function D(_,T){if(_==null)return[];
|
|
var c=z(T,_),e="",r="",B=0,F;for(var Q=2;Q<c.length;Q++){var v=c[Q];if(v[0]=="%"){if(B==0)e+=v.slice(1);
|
|
else r+=v.slice(1)}else if(v==";")B++;else if(v.endsWith("/RulerOrigin ,"))F=v.split(" ").slice(0,2).map(parseFloat)}var X=[e,r],V=[];
|
|
for(var Q=0;Q<2;Q++){var H=X[Q],o=new Uint8Array(H.length);G.vq(o,0,H);var J=FromPS.F.ASCII85Decode({buff:o,off:0}),C=jh.D9(J);
|
|
V.push(C)}V.push(F);return V}function R(_,T){if(_==null)return[];var c=z(T,_);c=c.slice(1);for(var Q=0;
|
|
Q<c.length;Q++){var e=c[Q];if(e[0]=="%")c[Q]=e.slice(e[1]=="_"?2:1)}var r=j(c);return r}function O(_,T){var c={};
|
|
if(_==null)return c;for(var Q=0;Q<_.length;Q++){var e=z(T,_[Q]),r=e[1],B=I(r),F=r.slice(r.indexOf(")")+2).split(" ").map(parseFloat),v=[];
|
|
for(var X=2;X<e.length;X++)v.push(e[X].slice(2));c[B]={zq:F,je:v}}return c}function b(_,T){var c={},e,r;
|
|
if(_==null)return c;var B=[];for(var Q=0;Q<_.length;Q++){var F=z(T,_[Q]);for(var v=0;v<F.length;v++){var X=F[v];
|
|
if(X[0]=="("){var V=X.split(")");e=V[0].slice(1);var H=V[1].split(" ");r=parseInt(H[1])}else if(X.endsWith("%_BS")){var V=X.split(" "),Y,K=1;
|
|
V.pop();V=V.map(parseFloat);var o=V.pop(),J=V.pop(),C=V.pop();if(C==0)Y=[V[0],V[0],V[0]];else if(C==2||C==4)Y=[V[4],V[5],V[6]];
|
|
else if(C==1||C==3)Y=M(V);else if(C==6){if(V.length==3)Y=[V[0],V[0],V[0]];else Y=M(V);K=V.pop()}else{throw C}B.push([o/100,Y,K,J/100])}else if(X=="BD"){for(var u=0;
|
|
u<B.length-1;u++)B[u][3]=B[u+1][3];B.sort(function(f,l){return f[0]-l[0]});c[e]={ez:r,a3f:B};B=[]}}}return c}function w(_){var T="Gradient PluginObject Symbol Pattern PatternLayer BrushPattern Encoding Raster Layer Resource Place".split(" "),c=Date.now(),e=0,r=[],B={Header:{}},F=[B],v=_.length;
|
|
while(e<v){var X=e;while(X!=v&&_[X]!=13&&_[X]!=10){X++}if(_[e]==37&&_[e+1]==95&&_[e+2]==37)e+=2;if(_[e]==37&&(_[e+1]==37||_[e+1]==65)){var V=G.dP(_,e,X-e);
|
|
if(V=="%%EndComments"||V=="%EndComments"||V=="%AI5_Begin_NonPrinting"||V=="%AI5_End_NonPrinting--"||V.startsWith("%AI17_Begin_Content_if_version_gt")||V=="%AI17_End_Versioned_Content"){}else{var H=V.indexOf("Begin"),o=Math.max(V.indexOf("_End"),V.indexOf("%End"));
|
|
if(H!=-1){var J=V.slice(H+5).split(":")[0],C={_begin:e,_end:e},Y=F[F.length-1];if(T.indexOf(J)!=-1){if(Y[J]==null)Y[J]=[];
|
|
Y[J].push(C)}else{if(Y[J]!=null){console.log(F);throw V}Y[J]=C}F.push(C);if(V.startsWith("%%BeginData")){X=G.jC(_,"%%EndData",e)}else if(V=="%AI9_BeginDocumentData")X=G.jC(_,"%AI9_EndDocumentData",X);
|
|
else if(V=="%AI11_BeginTextDocument")X=G.jC(_,"%AI11_EndTextDocument",X)}else if(o!=-1){F.pop()._end=e}else if(F.length==1&&(V.startsWith("%AI")||V.startsWith("%%")&&V.indexOf(" ")!=-1)){var K=1;
|
|
if(V.startsWith("%AI"))while(V[K]!="_"&&K<V.length)K++;var u=V.indexOf(":");if(u==-1)u=V.indexOf(" ");
|
|
var f=V.slice(K+1,u),l=V.slice(u+1).trim();B.Header[f]=l}}}e=X;if(_[e]==13)e++;if(_[e]==10)e++}return B}function A(_,T){var c=Date.now(),e=new Uint8Array(_),r,B=e[2]==68;
|
|
if(T)console.log(!B?"EPS":"PDF");if(B){var F=G.jC(e,"/AIMetaData "),Z=!1,aQ=!1;while(e[F]!=60)F--;F--;
|
|
var v=G.jC(e,">>",F),X=G.dP(e,F+2,v-F-2).split("/"),V=[];for(var Q=0;Q<X.length;Q++){var H=X[Q],o=H.startsWith("AIPrivateData"),J=H.startsWith("AIPDFPrivateData");
|
|
if(!o&&!J)continue;var C=H.trim().split(/\s+/),Y=parseInt(C[1]),K=parseInt(C[0].slice(o?13:16));V.push([K,Y])}if(T)console.log("--- map made",Date.now()-c);
|
|
c=Date.now();var u=FromPDF.indexOfXref(e),f=[],l=FromPDF.readXrefTrail(e,u,f),jk={buff:e,off:0},hE=new Array(V.length),jC=F;
|
|
for(var Q=0;Q<V.length;Q++){var K=V[Q][0],Y=V[Q][1],eO=FromPDF.getIndirect(Y,0,jk,f),iU=eO.buff,gK=eO["/Filter"],iM=0;
|
|
if(gK!=null&&typeof gK=="string")gK=[gK];var i5=G.dP(iU,iM,iM+20);if(i5=="%AI12_CompressedData"){iM+=20;
|
|
Z=!0}else if(i5=="%AI24_ZStandard_Data"){iM+=20;aQ=!0}iU=new Uint8Array(iU.buffer,iU.byteOffset+iM,iU.length-iM);
|
|
if(gK)for(var fN=0;fN<gK.length;fN++){var dx=gK[fN];if(dx=="/FlateDecode")iU=pako.inflate(iU);else if(dx=="/ASCIIHexDecode")iU=FromPS.F.HexDecode({buff:iU,off:0});
|
|
else if(dx=="/ASCII85Decode")iU=FromPS.F.ASCII85Decode({buff:iU,off:0});else throw dx}hE[K-1]=iU}if(T)console.log("--- arrays found",Date.now()-c);
|
|
c=Date.now();var ai=G.dP(hE[0],0,13);if(ai=="%%BoundingBox"||ai=="%AI7_Thumbnai")hE=hE.slice(1);if(ai=="%AI24_ZStanda"){hE[0]=hE[0].slice(20);
|
|
aQ=!0}r=g(hE);if(T)console.log("--- concatenated",Date.now()-c);c=Date.now();if(Z)r=UZIP.inflate(r);
|
|
if(aQ)r=hI.Gg.Pi(r);if(T)console.log("--- inflated",Date.now()-c);c=Date.now()}else{var hO=G.Md(e);if(hO.indexOf("%AI5_BeginLayer")!=-1){r=e}else{var ff=hO.split(/[\n\r]+/),eP=[],a0=!1;
|
|
for(var bM=0;bM<ff.length;bM++){var cV=ff[bM].trim();if(cV=="%AI9_PrivateDataEnd"){a0=!1;break}else if(cV=="%AI9_DataStream"||cV=="%AI24_DataStream"){a0=!0}else if(a0)eP.push(cV.slice(1))}var aX=G.cw(eP.join("")),j8=FromPS.F.ASCII85Decode({buff:aX,off:0});
|
|
if(j8[0]==120&&j8[1]==156)r=UZIP.inflate(j8);else r=hI.Gg.Pi(j8)}}return r}function g(_){var T=0,e=0;
|
|
for(var Q=0;Q<_.length;Q++)T+=_[Q].length;var c=new Uint8Array(T);for(var Q=0;Q<_.length;Q++){var r=_[Q];
|
|
c.set(r,e);e+=r.length}return c}function E(_,T){for(var Q=0;Q<T.length;Q++)if(_.startsWith(T[Q]))return!0;
|
|
return!1}function j(_){var T=[],c=[],top=-1,e,r=null,B=null,F=0;for(var v=0;v<_.length;v++){var X=_[v];
|
|
if(e){X=e+X;e=null}var V="\t".repeat(T.length);if(r!=null){r.push(X);if(X.endsWith("~>")){var H=G.cw(r.join("")),o=FromPS.F.ASCII85Decode({off:0,buff:H});
|
|
T.push(o);c.push(!1);top++;r=null}}else if(B!=null){if(X=="X+"){if(F==1){T.push(B);c.push(!1);top++;
|
|
B=null}else F--}else if(X=="X=")F++;else B.push(X)}else if(X=="/Binary : /ASCII85Decode ,"){r=[]}else if(X=="X="){B=[];
|
|
F++}else if(X=="/SVGFilter :"||X=="; /Def ;")continue;else if(X.startsWith("/")&&X[1].toUpperCase()!=X[1].toLowerCase()){if(X.startsWith("/XMLUID")){var J=x(X);
|
|
if(c[top])throw"e";T[top][J[4]]=J[2]}if(X.startsWith("/GObjRef")){var J=x(X);if(!c[top])throw"e";T[top].push(J[2])}else{var C=X.startsWith("/Array")||X.startsWith("/Document");
|
|
T.push(C?[]:{});c.push(C);top++}}else if(X.endsWith(",")){var Y,K,J=x(X);J.pop();if(J[0]==";"||J.length==1){K=T.pop();
|
|
c.pop();top--;Y=c[top]?null:J.pop()}else{Y=c[top]?null:J.pop();var u=J.pop(),f=J[0];if(u=="/Int")K=parseInt(f);
|
|
else if(u=="/Real")K=parseFloat(f);else if(u=="/Bool")K=f=="1";else if(u=="/String"||u=="/UnicodeString")K=J.join("");
|
|
else if(u=="/RealMatrix"||u=="/RealPoint"||u=="/RealPointRelToROrigin")K=J.map(parseFloat);else throw u}if(c[top])T[top].push(K);
|
|
else T[top][Y]=K}else if(X==";"){}else if(X==""){}else{if(X.indexOf("/RealPoint")!=-1){}else if(X.startsWith("(")&&X.endsWith(")")){}else if(X.endsWith("/RealMatrix")){}else throw X;
|
|
e=e?e+X:X}}return T}function x(_){var T=0,c=[];while(T<_.length){var e=_[T],r=e.charCodeAt(0);if(e==" ")T++;
|
|
else if(e==","||e==";"||e==":"){c.push(e);T++}else if(e=="("){var B=T+1;while(!(_[B]==")"&&_[B-1]!="\\"))B++;
|
|
var F=_.slice(T+1,B);c.push(F);T=B+1}else if(e=="/"||e=="-"||48<=r&&r<=57){var B=T;while(_[B]!=" ")B++;
|
|
c.push(_.slice(T,B));T=B}else throw e}return c}function d(_){var T="";for(var Q=0;Q<_.length;Q++){if(_[Q]=="_"&&_[Q+1]=="x"){var g8=parseInt(_.slice(Q+2,Q+4),16);
|
|
T+=String.fromCharCode(g8);Q+=4}else if(_[Q]=="_")T+=" ";else T+=_[Q]}return T}function L(_){var T="xmlnode-nodename",c="xmlnode-nodevalue",e="xmlnode-attributes",r="xmlnode-children",B=_[T],F=_[e],v=_[r],X={_nam:B};
|
|
for(var V in F){var H=F[V];if(Object.keys(H[e]).length!=0||H[r].length!=0)throw"e";if(H[T]!=V)throw"e";
|
|
X[V]=H[c]}if(v.length==0)return X;var o=X.cln=[];for(var Q=0;Q<v.length;Q++)o.push(L(v[Q]));return X}return W}();
|
|
var a={};a.F=function(W){return window.devicePixelRatio||1};a.XQ=function(W,h){return(h.ahN=="touch"?12:4)*a.F()/W.t.J};
|
|
a.vv=function(W,h,S){this.name=W;this.id=h;this.Vi=null;if(S!=null)this.P6=S};a.vv.prototype.ca=function(W,h,S,k,p){};
|
|
a.vv.prototype.enable=function(W,h,S,k,p,I){var q=new em(y.E.W,!0);q.data={o:y.D.PS,W0:"default"};h.c(q)};
|
|
a.vv.prototype.disable=function(W,h,S,k,p){};a.vv.prototype.FX=function(W,h,S,k,p){return!1};a.vv.prototype.Qb=function(W,h,S,k,p){};
|
|
a.vv.prototype.Pt=function(W,h,S,k,p){};a.vv.prototype.Go=function(W,h,S,k,p){};a.vv.prototype.he=function(W,h,S,k,p,I){};
|
|
a.vv.prototype.ON=function(W,h,S,k,p){};a.vv.prototype.ok=function(W,h,S,k){};a.vv.prototype.Mr=function(W,h,S,k){};
|
|
a.vv.prototype.UN=function(W,h){};a.vv.prototype._i=function(W,h){};a.vv.prototype.Fg=function(W,h,S,k,p){};
|
|
a.vv.prototype.IF=function(W,h){};a.vv.prototype.BQ=function(W,h){return!1};a.vv.prototype.Wi=function(W,h){return!1};
|
|
a.vv.prototype.HV=function(){return!1};a.vv.prototype.m1=function(W,h){return!0};a.vv.prototype.Dj=function(){return null};
|
|
a.vv.prototype.AM=function(W,h,S){};a.vv.prototype.iJ=function(){return!1};a.vv.prototype.yG=function(W,h,S,k){};
|
|
a.vv.prototype.track=function(W){var h=new em(y.E.gg,!0);h.data=W;W.AL=!0;this.Vi.c(h)};a.vv.XB=function(W,h,S,k){var p=10*a.F()*(W.ahN=="touch"?2:1),I=W.x+p,q=W.y-p;
|
|
a.vv.UR(I,q,[dq.get([12,41]).charAt(0)+": "+N.aX.JL(h.e,S.H$,k,S.e,!0),dq.get([12,42]).charAt(0)+": "+N.aX.JL(h.Z,S.H$,k,S.Z,!0)],S)};
|
|
a.vv.UR=function(W,h,S,k){var p=a.F(),I=Math.round,q=I(11*p),P=I(100*p),t=I((S.length*14+5)*p),M=new gj(W,h-t,P,t),U=a.vv.Jb;
|
|
if(U==null)U=a.vv.Jb=document.createElement("canvas");U.width=P;U.height=t;var i=U.getContext("2d");
|
|
i.fillStyle="rgba(0,0,1,1)";i.fillRect(0,0,P,t);i.font=q+"px monospace";i.fillStyle="rgba(255,255,255,1)";
|
|
for(var Q=0;Q<S.length;Q++)i.fillText(S[Q],I(4*p),I((Q+1)*13*p));var z=[i.getImageData(0,0,P,t).data,M.clone()];
|
|
if(k)k.L.uj=[z];return z};a.vv.Jb=null;a.M2="0";a.Ck="1";a.ani="2";a.agO="3";a.dj="5";a.aco="6";a.ajt="7";
|
|
a.MT="8";a.oM="9";a.ot="10";a.Mg="11";a.It="12";a.Ua="13";a.jU="14";a.lM="16";a.BC="18";a.B2="19";a.Z8="20";
|
|
a.wn="21";a.$v="22";a.og="23";a.Q5="24";a.M1="25";a.hR="27";a.VG="31";a.are="32";a.af7="34";a.agJ="35";
|
|
a.ER="36";a.WC="37";a.MF="38";a.Mk="39";a.uI="40";a.Js="41";a.FJ="42";a.oR="43";a.mj="47";a.Bm="48";
|
|
a.ga="51";a.Wl="52";a.kQ="54";a.Zu="55";a.JO="56";a.X4="57";a.SM="58";a.N$="59";a.a5V="60";a.vD="61";
|
|
a.dh="70";a.Fh="100";a.ec="101";a.Nv="102";a.VE="103";a.Tw="120";a.AT="230";a.a31="231";a.pD="232";a.m5="233";
|
|
a.gk="234";a.Ak="235";a.fK="236";a.ym=function(W){var h=a.yP,S=null;for(var k in h)if(h[k][1].indexOf(W[1].classID)!=-1)S=k;
|
|
return S};a.yP={};a.yP[a.og]=["tools/brush",["PbTl"]];a.yP[a.Q5]=["tools/pencil",["PcTl"]];a.yP[a.VG]=["tools/eraser",["ErTl"]];
|
|
a.ut=function(W,h,S){a.vv.call(this,W,h,S);this.Vk={brush:W?gI.S0():null,bmode:"norm",opacity:1,flow:1,smth:0,samp:0,prsr:[!1,!1],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.Nm=null;this.wx=null;this.XF=null;this.ol=null;this.V_=null;this.Ct=null;this.$d=null;this.s$=null;
|
|
this.K5=null;this.EM=null;this.Ku=null;this.AX=null;this.k8=null;this.T$=1;this.lH=!1;this.nu=null;this.caller=null};
|
|
a.ut.prototype=new a.vv;a.ut.prototype.Wi=function(W,h){return W.kK&&h.j(hW.YS)};a.ut.prototype.Pt=function(W,h,S,k,p){if(k.j(hW.OM)){this.Ct=new eC(p.x,p.y);
|
|
var I=this.Vk.brush.Brsh.v,q=I.Dmtr.v.val,P=I.Hrdn!=null?I.Hrdn.v.val:-1;this.$d=[q,P,!0,JSON.parse(JSON.stringify(this.Vk.brush)),p];
|
|
this.Dt(S)}};a.ut.prototype._G=function(W,h,S){var k=this.$d,p=W.t.J,I=S.x-k[4].x,q=S.y-k[4].y,P=k[0],t=k[1],M=Math.abs(I)>Math.abs(q);
|
|
if(M&&k[2]){var U=Math.round(2*I/p);P+=U;S.x-=I-.5*U*p}if(!M&&!k[2]&&t!=-1){var U=Math.round(.25*q);
|
|
t+=U;S.y-=q-4*U}P=Math.max(1,P);t=k[1]==-1?-1:Math.max(0,Math.min(100,t));var i=k[3];i.Brsh.v.Dmtr.v.val=P;
|
|
if(t!=-1)i.Brsh.v.Hrdn.v.val=t;this.$d=[P,t,M,i,S];var z=go.od(i,h.zl.jE,p),D=z[1];D.x=Math.round(this.Ct.x-D.e/2);
|
|
D.y=Math.round(this.Ct.y-D.Z/2);W.L.Iy=[z];var R=W.t.wy(this.Ct.x,this.Ct.y);W.L.zN={LB:[],TT:[R.x-P/2,R.y,R.x+P/2,R.y]};
|
|
if(t!=-1)W.L.zN.TT.push(R.x+50/p,R.y-t/2,R.x+50/p,R.y+t/2);W.Hx=!0};a.ut.prototype.ON=function(W,h,S,k,p){if(this.id==a.Z8||this.id==a.wn)return;
|
|
if(this.Ct){this.Ct=null;this.WP(JSON.parse(JSON.stringify(this.$d[3])));W.L.Iy=[];W.L.zN=null;W.Hx=!0;
|
|
return}var I=new em(y.E.W,!0);I.data={o:y.D.Sx,b:this.id,a4r:"showBrushOpts",o2:new eC(p.eU+4,p.EK)};
|
|
h.c(I)};a.ut.prototype.WP=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.XO,nP:f6.Yk,_n:W};this.caller.c(h)};
|
|
a.ut.XU=function(W,h,S,k,p,I){if(W==null)W="FrgC";if(h==null)h="norm";if(S==null)S=1;if(p==null)p=!1;
|
|
var q={classID:"Fl",Usng:{t:"enum",v:{FlCn:W}},Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(S*100)}},PrsT:{t:"bool",v:p},Md:{t:"enum",v:{BlnM:hd.iN(h)}}};
|
|
if(W=="Clr")q.Clr={t:"Objc",v:k};if(W=="contentAware")q.contentAwareColorAdaptationFill={t:"bool",v:!0};
|
|
if(W=="Ptrn")q.Ptrn={t:"Objc",v:I};return{HP:"fill",b4:q}};a.ut.prototype.ca=function(W,h,S,k,p){this.Vi=h;
|
|
var I=S.ye.length;if(I==0&&!S.xi())return;var q=I!=0?-1-S.ye[0]:S.w[0],P=S.g[q];if(W.o=="fromAction"){var t=W.eS,M=t.b4;
|
|
if(M&&M.null&&M.null.v[0]&&M.null.v[0].v.classID=="Path"){var U=S.O4(),i=U[0],z=U[1],D=i[z.length==0?0:z[0]].add.vmsk;
|
|
if(t.HP=="fill"){var R=D.kX(),O=p.Ps,b=this.Vk,w=O>>16&255,A=O>>8&255,g=O>>0&255;this.ZF(S,P,R,w,A,g,Math.round(b.opacity*255),b.bmode,"Fill Path")}else{for(var E=0;
|
|
E<1e3;E++){var j=N.$.rR(D.T,E,!0);if(j==-1){this.he(S,h,p,k,null);break}var x=D.T[j],d=D.T.slice(j,j+1+x.length),L=N.H.FU(d,!0).s,_=L.slice(0,8);
|
|
for(var T=8;T<L.length;T+=6)_.push(L[T-2],L[T-1],L[T],L[T+1],L[T+2],L[T+3],L[T+4],L[T+5]);var c={};c.Points=_;
|
|
c.TextOnPathTRange=D.Nk.slice(0);var c=a1.g3(c,2),e=c[0];if(E==0)this.Qb(S,h,p,k,S.t._c(e[0],e[1]));
|
|
else this.wx.moveTo(e[0],e[1]);for(var Q=2;Q<e.length;Q+=2){var r=S.t._c(e[Q],e[Q+1]);r.kK=!0;this.Go(S,h,p,k,r,this.Vk.flow)}}}}else if(t.HP=="fill"){var B=M.PrsT?M.PrsT.v:!1,F=P?P.add.lspf:0;
|
|
if(B&&P){P.add.lspf=F==null?1:F|1}var v=(M.Opct?M.Opct.v.val:100)/100,X=M.Md?hd.Gl(M.Md.v.BlnM):"norm",V=M.Usng.v.FlCn;
|
|
if(V=="contentAware"){if(S.q==null){alert("Select an area to heal first.");return}if(!S.xi())return;
|
|
this.lg(S);this.V2(S,0);var H=S.q,o=N.U(H.rect.n()*4);N.ce(H.channel,o,3);this.m9(S,"sheal",o,H.rect,H.rect);
|
|
this.G(S,H.rect);this.finish(S,H.rect)}else if(V=="Ptrn"){var J=p.n5,C=S.q?S.q.rect.clone():new gj(0,0,S.e,S.Z),Y=N.U(C.n()*4);
|
|
jO.AQ(M,Y,C,J,new eC(0,0));this.sH(S,P,S.q,Y,"norm",[6,48,0,2])}else{var O;if(V=="FrgC")O=p.Ps;else if(V=="BckC")O=p.lL;
|
|
else if(V=="Blck")O=0;else if(V=="Wht")O=16777215;else if(V=="Gry")O=8421504;else if(V=="Clr"){var K=N.X.iZ(M.Clr.v);
|
|
O=K.p<<16|K.z<<8|K.S}var w=O>>16&255,A=O>>8&255,g=O>>0&255;this.ZF(S,P,S.q,w,A,g,Math.round(255*v),X,[2,3])}if(B&&P){P.add.lspf=F==null?0:F}}else if(t.HP=="delete"){var u=q<0?1:P.Yi,H=S.q,hE;
|
|
if(H==null)return;var f=q<0?S.BS[-q-1]:u<=0?null:u==1?P.kX():P.$U(S).v,C=u<=0?P.rect:f.rect,l=u<=0?H.rect.r$(C):H.rect.clone();
|
|
if(l.ZP())return;var jk=l.n();if(u<=0){hE=N.U(jk*4);N.zt(P.buffer,P.rect,hE,l)}else{hE=N.U(jk);f.extend(l);
|
|
N.vG(f.channel,f.rect,hE,l)}if(0<=q&&P.xw(S,H)){if(u<=0){N.wM(hE,0);N.zt(P.eB.zq,P.eB._C,hE,l)}else{hE.fill(255);
|
|
N.vG(P.eB.zq,P.eB._C,hE,l)}}else{if(u<=0){var Z=N.U(hE.length>>2);N.sN(hE,Z,3);N.a.Dc(N.$o(H.rect.n()),H.rect,Z,l,H.channel,l,1);
|
|
N.ce(Z,hE,3)}else{var aQ=N.U(H.rect.n()),w=p.lL>>>16&255,A=p.lL>>8&255,g=p.lL>>0&255;aQ.fill(Math.round(N.ak(w,A,g)));
|
|
N.a.Dc(aQ,H.rect,hE,l,H.channel,l,1)}}this._r(S,!0,[2,2],q,u,l,hE)}}if(W.o=="stroke"){var jC=W.a7O,H=S.q;
|
|
if(H==null){H={rect:P.rect.clone(),channel:N.U(P.rect.n())};N.sN(P.buffer,H.channel,3)}var eO=jO.BJ(jC),iU=a.I6.Iv(H,Math.ceil(eO[0]),Math.ceil(eO[1])),O=N.X.iZ(jC.Clr.v),w=Math.round(O.p),A=Math.round(O.z),g=Math.round(O.S);
|
|
this.ZF(S,P,iU,w,A,g,Math.round(255*jC.Opct.v.val/100),hd.Gl(jC.Md.v.BlnM),[14,9])}if(W.o=="fillBMP"){this.sH(S,P,S.q,W.GS,W.Ah,W.rO)}if(W.o=="draw"){var gK=W.La,iM=gK.rect;
|
|
this.lg(S);var i5=S.g[S.w[0]];if(W.aiQ&&i5&&i5.Yi<=0&&S.ye.length==0){iM=a.X2.u8(gK,S);i5.buffer=gK.buffer.slice(0);
|
|
i5.rect=iM.clone()}else{var fN=this.Vk.bmode;this.Vk.bmode="norm";this.m9(S,"draw",gK.buffer,iM,iM.r$(new gj(0,0,S.e,S.Z)));
|
|
this.Vk.bmode=fN}this.G(S,iM);S.tn=!0;this.finish(S,iM,W.rO,W.aiQ)}};a.ut.prototype.ZF=function(W,h,S,k,p,I,q,P,t){var M=S==null?new gj(0,0,W.e,W.Z):S.rect,U=q<<24|I<<16|p<<8|k<<0,i=N.U(M.n()*4);
|
|
N.wM(i,U);this.sH(W,h,S,i,P,t)};a.ut.prototype.sH=function(W,h,S,k,p,I){var q=W.ye.length!=0?-1-W.ye[0]:W.w[0],P=q<0?1:h.Yi,t=q<0?W.BS[-1-q]:P<=0?null:P==1?h.kX():h.$U(W).v,M=P<=0?h.rect:t.rect,U=S==null?new gj(0,0,W.e,W.Z):S.rect,i=S==null?N.J4(W.e*W.Z):S.channel,z=U.n(),D,R=null;
|
|
if(P<=0){D=N.U(z*4);N.zt(h.buffer,h.rect,D,U)}else{D=N.U(z);t.extend(U);N.vG(t.channel,t.rect,D,U)}if(S!=null)N.vJ(i,k);
|
|
if(P>0){R=N.U(z);N.Zi(k,R)}if(0<=q&&S&&h.xw(W,S)){var O=h.eB.Fm,b=h.eB.Fm.slice(0);if(P<=0)N.WQ(k,b);
|
|
else N.WQ(R,b);var w=new h3([2,3],this);w.data={o:"drawtemp",i:W.w[0],gA:P,amI:O,anF:b};W.nh(w);this.UN(w.data,W)}else{if(P<=0){var A;
|
|
if(h.Ox(0)){A=N.U(U.n());N.sN(D,A,3)}N.a.ha(p,k,U,D,U,U,1);if(h.Ox(0))N.ce(A,D,3)}else N.a.Dc(R,U,D,U,i,U,1);
|
|
this._r(W,!0,I,q,P,U,D)}};a.ut.prototype.BQ=function(W){if(hW.Pl.indexOf(W)!=-1)return!0;return!1};a.ut.prototype.ok=function(W,h,S,k){var p=this.Vk.brush,I=k.j(hW.OM),q=I!=this.lH,P=a.ut.dX(p,k);
|
|
if(P!=null)this.WP(P);if(!k.j(hW.Q9)&&k.U1()!=-1){var t=hW.kU(Math.round(this.Vk.opacity*100),k.U1())/100;
|
|
this.wv({opacity:t},h)}if(this.id==a.MT&&q&&W!=null){var M=this.Vk.qsmode;if(M==2)M=W.q==null?0:1;else M=2;
|
|
this.wv({qsmode:M},h)}this.lH=I;if(q){if(W)this.T$=W.t.J;this.Dt(S,k)}};a.ut.dX=function(W,h){var S=W.Brsh.v.Dmtr.v.val,k=W.Brsh.v.Hrdn!=null?W.Brsh.v.Hrdn.v.val:-1,p=S,I=k,q=h.j(hW.YS);
|
|
if(h.j(hW.vs)){if(q)k=25*Math.floor((k-1)/25);else{if(S<=10)S--;else if(S<=50)S=5*Math.floor((S-1)/5);
|
|
else if(S<=100)S=10*Math.floor((S-1)/10);else if(S<=200)S=25*Math.floor((S-1)/25);else if(S<=400)S=50*Math.floor((S-1)/50);
|
|
else S=100*Math.floor((S-1)/100)}}if(h.j(hW.Ni)){if(q)k=25*Math.ceil((k+1)/25);else{if(S<10)S++;else if(S<50)S=5*Math.ceil((S+1)/5);
|
|
else if(S<100)S=10*Math.ceil((S+1)/10);else if(S<200)S=25*Math.ceil((S+1)/25);else if(S<400)S=50*Math.ceil((S+1)/50);
|
|
else S=100*Math.ceil((S+1)/100)}}S=Math.max(1,S);k=Math.max(0,Math.min(100,k));if(I==-1)k=-1;if(S!=p||k!=I){var P=JSON.parse(JSON.stringify(W));
|
|
P.Brsh.v.Dmtr.v.val=S;if(I!=-1)P.Brsh.v.Hrdn.v.val=k;return P}return null};a.ut.prototype.Dt=function(W,h,S,k){if(W.zl.list.length==0)return;
|
|
var p=this.id,I;if((p==a.hR||p==a.B2||p==a.og||p==a.Q5)&&(h!=null&&h.j(hW.OM)||this.Vk.alt[0]))I="crosshair";
|
|
else{var q=this.T$,P=this.Vk.brush;if((p==a.hR||p==a.B2)&&S&&this.AX&&this.AX.length==this.Ku.n()*4){var t=S.t.wy(k.x,k.y),M=this.OQ(t),U=this.AX,i=this.Ku,z=new gj(i.x+M.x,i.y+M.y,i.e,i.Z),D=go.od(P,W.zl.jE,q),R=D[0],O=D[1],b=Math.ceil(O.e/q),w=new gj(Math.round(t.x-b/2),Math.round(t.y-b/2),b,b),A=N.U(w.n()*4),g,E;
|
|
N.zt(U,z,A,w);if(q==1){g=A;E=w}else{var j=new ex(q,0,0,q,0,0),x=a.Q.ry([A,w],j,!0);E=O.clone();E.x=x.rect.x;
|
|
E.y=x.rect.y;if(E.xX(x.rect))g=x.buffer;else{g=N.U(E.n()*4);N.zt(x.buffer,x.rect,g,E)}}var d=this.Vk.opacity/255;
|
|
for(var Q=0;Q<g.length;Q+=4)g[Q+3]=d*(R[Q+3]*g[Q+3]);go.apM(new Uint32Array(g.buffer),E,4278190080,4294967295);
|
|
I={jj:g,pY:E,fQ:new eC(E.e/2,E.Z/2)}}else I=go.Zt(P,W.zl.jE,q,p==a.M1)}var L=new em(y.E.W,!0);L.data={o:y.D.PS,W0:I};
|
|
if(this.caller)this.caller.c(L)};a.ut.prototype.enable=function(W,h,S,k){this.Nm=S;this.caller=h;this.WP(JSON.parse(JSON.stringify(this.Vk.brush)));
|
|
if(W&&W.t.J!=0)this.T$=W.t.J;this.Dt(S,k)};a.ut.prototype.IF=function(W,h){if(h==f6.Yk){this.Vk.brush=W.zl.ev;
|
|
this.Dt(W)}};a.ut.prototype.Fg=function(W,h,S,k,p){for(var I in W)this.Vk[I]=W[I];if(this.Vk.alt[0])this.Dt(p,k,S)};
|
|
a.ut.prototype.mK=function(W){var h=W.ye.length!=0?-1-W.ye[0]:W.w[0],S=W.g[h],k=h<0?1:S.Yi,p=h<0?W.BS[-h-1]:k<=0?null:k==1?S.kX():S.$U(W).v,I=p?p.channel:S.buffer,q=(p?p.rect:S.rect).clone();
|
|
return[S,k,p,I,q]};a.ut.prototype.lg=function(W,h){this.k8=W.q==null?null:{rect:W.q.rect.clone(),channel:W.q.channel.slice(0)};
|
|
var S=this.mK(W),k=S[0],p=S[1],I=S[2];this.EM=S[3];this.K5=S[4];var q=new gj(0,0,W.e,W.Z),P=q.r8(this.K5);
|
|
if((this.mq()&&p<=0||P.xX(this.K5))&&h!=!0)this.EM=this.EM.slice(0);else{if(I)I.extend(P);else k.extend(P)}};
|
|
a.ut.prototype.V2=function(W,h){var S=this.mK(W),k=S[1],p=S[3],I=S[4],q=[p,I],P=h!=null?h:this.Vk.sfrom;
|
|
if(k<=0&&P!=0){q[1]=new gj(0,0,W.e,W.Z);q[0]=W.jc(P==1&&W.w[0]!=W.g.length-1?W.w[0]:null).slice(0)}this.Ku=q[1].clone();
|
|
this.AX=q[0].slice(0)};a.ut.prototype.r1=function(W,h,S){if(W.j(hW.OM)){var k=new em(y.E.u,!0);k.b=a.jU;
|
|
k.data={o:"pickhere",afn:S};h.c(k);return!0}return!1};a.ut.prototype.Gy=function(W,h,S,k,p,I){if(this.id!=a.MT&&!W.xi(this.caller)){this.wx=null;
|
|
return}this.lg(W);var q=new gj(0,0,W.e,W.Z),P=null;if(I!=null){var t=W.ye.length!=0?-1-W.ye[0]:W.w[0],M=W.g[t],U=t<0?W.BS[-t-1]:M.Yi<=0?null:M.Yi==1?M.kX():M.$U(W).v;
|
|
P=N.U(q.n()*4);if(U)a.ut.Vu(this.EM,this.K5,U.color,P,q);else N.zt(this.EM,this.K5,P,q)}var i=this.Vk;
|
|
if(this.wx&&this.id==a.MT&&i.qsmode!=0&&W.q!=null){}else{var z=h.Ps,D=h.lL;if(this.nu=="erase"){var R=z;
|
|
z=D;D=R}var O=this.id==a.MT?this.K5:q;this.wx=new go(i.brush,h.zl.jE,h.zl.cc,{YH:p,jW:I,a97:i.smth*50/W.t.J,Ow:this.id==a.Q5||i.emode==1,po:i.prsr},z,D,O,P)}if(this.id==a.MT){this.wx.aeb(i.brush,i.qsmode==2?0:16777215)}var b=W.t.wy(k.x,k.y);
|
|
if(S.j(hW.YS)&&this.XF){var w=this.XF;this.wx.moveTo(w.x,w.y,k.uq);this.wx.lineTo(.001*w.x+.999*b.x,.001*w.y+.999*b.y,k.uq);
|
|
this.wx.lineTo(b.x,b.y,k.uq)}else this.wx.moveTo(b.x,b.y,k.uq);this.XF=b;this.ol=b.clone();this.V_=new hY(b,W.t.j3)};
|
|
a.ut.prototype.Dl=function(W,h,S){if(W&&W.t.J!=0&&W.t.J!=this.T$){this.T$=W.t.J;this.Dt(S)}};a.ut.prototype.k$=function(W,h,S,k){if(this.wx==null)return;
|
|
var p=W.g[W.w[0]],I=W.t.wy(k.x,k.y),q=this.V_.jr(I,S);if(q.xX(this.XF))return 1;this.wx.lineTo(q.x,q.y,k.uq);
|
|
this.XF=q;if(this.id==a.hR||this.id==a.B2){var P=this.b9(),t=11;P=W.t._c(I.x-P.x,I.y-P.y);var M=t>>>1,U=new gj(Math.round(P.x)-M,Math.round(P.y)-M,t,t),i=N.U(U.n()*4);
|
|
N.wM(16777215);for(var Q=0;Q<t;Q++)i[(Q*t+M)*4+3]=i[(t*M+Q)*4+3]=255;W.L.uj=[[i,U]];W.Hx=!0}};a.ut.prototype.Mr=function(W,h,S,k){if(S.Kz!=this.id)return;
|
|
if(this.id!=a.MT||W==null)return;if(W.q==null||W.w[0]!=this.a3w){this.a3w=W.w[0];this.wv({qsmode:0},h)}};
|
|
a.ut.prototype.G=function(W,h){if(W.ye.length!=0){W.Hx=!0;return}var S=W.g[W.w[0]];if(h==null){h=this.wx.IK();
|
|
if(this.mq()&&S.Yi<=0)h=h.r$(this.K5)}if(h.ZP())return;if(S.Yi<=0){S.G(h)}if(S.Yi==1){S.kX().VT=!0;S.r9(W)}if(S.Yi==3){S.G()}W.G(W.root.v5(h,W,W.w[0],!0))};
|
|
a.ut.prototype.he=function(W,h,S,k,p){if(this.wx==null)return;this.wx.finish();if(this.id!=a.BC&&this.id!=a.B2&&this.id!=a.MT)this.NJ(W);
|
|
if(this.id==a.hR||this.id==a.B2){W.L.uj=[];W.Hx=!0}if(this.id==a.MT){var I=W.q;W.q=this.k8;var q=new em(y.E.u,!0);
|
|
q.data={o:"setsel",rO:this.name,q:I};q.b=a.Ck;h.c(q);if(this.Vk.qsmode==0)this.wv({qsmode:1},h)}else{this.finish(W,this.wx.Oe());
|
|
this.wx=null;this.s$=null}this.dir=0};a.ut.prototype.wv=function(W,h){for(var S in W)this.Vk[S]=W[S];
|
|
var k=new em(y.E.W,!0);k.data={o:y.D.Sx,b:this.id,Lg:W};h.c(k)};a.ut.prototype.mq=function(){var W=this.id;
|
|
return W==a.MT||W==a.VG||W==a.Mk||W==a.uI||W==a.Js||W==a.$v};a.ut.prototype.finish=function(W,h,S,k,p){var I=W.ye.length!=0?-1-W.ye[0]:W.w[0],q=W.g[I],P=I<0?1:q.Yi,t=I<0?W.BS[-I-1]:P<=0?null:P==1?q.kX():q.$U(W).v,M=t?t.rect:q.rect,z;
|
|
if(this.mq()||!M.xX(this.K5)){if(t==null){if(this.mq())q.Yn();else{var U=h.r8(this.K5),i=N.U(U.n()*4);
|
|
N.zt(q.buffer,q.rect,i,U);q.buffer=i;q.rect=U}}else t.Yn();this.G(W,M)}if(P<=0){z=N.U(h.n()*4);N.zt(this.EM,this.K5,z,h)}else{z=N.U(h.n());
|
|
z.fill(t.color);N.vG(this.EM,this.K5,z,h)}this._r(W,!1,S?S:this.name,I,P,h,z,k,p)};a.ut.prototype._r=function(W,h,S,k,p,I,q,P,t){var M=q;
|
|
if(p>0){M=N.U(I.n()*4);a.ut.Vu(q,I,0,M,I)}var U=new h3(S,this);U.data=[{i:k,gA:p,pY:I,zz:M}];if(P)U.data.vd=[W.q,null];
|
|
if(t)U.data.vd=[this.k8,W.q];W.nh(U);if(h)this.UN(U.data,W);else if(P)W.q=null;a.Hw.ag(W,U.data)};a.ut.prototype._i=function(W,h){this.$K(W,h,!1)};
|
|
a.ut.prototype.UN=function(W,h){this.$K(W,h,!0)};a.ut.prototype.$K=function(W,h,S){if(W.o=="drawtemp"){var k=S?W.anF:W.amI,p=h.g[W.i];
|
|
p.eB.Fm=k;p.RD(h,0,0,h.q);p.G();h.tn=!0}else{a.Hw.q5(h,W);if(W.vd){h.q=W.vd[S?1:0];h.zW=!0}}h.G()};a.ut.prototype.NJ=function(W){this.m9(W,this.nu,this.wx.et(),this.wx.wT(),this.wx.IK());
|
|
this.G(W)};a.ut.prototype.m9=function(W,h,S,k,p){var I=this.Vk,q=W.g[W.w[0]],P=W.ye.length!=0?W.BS[W.ye[0]]:q.Yi<=0?null:q.Yi==1?q.kX():q.$U(W).v,t=N.U(p.n()*4),M,U=q.Ox(0);
|
|
if(P==null){if(this.id==a.wn&&h=="heal")N.zt(q.buffer,q.rect,t,p);else N.zt(this.EM,this.K5,t,p);if(U){M=N.U(p.n());
|
|
N.sN(t,M,3)}}else{a.ut.Vu(this.EM,this.K5,P.color,t,p)}if(W.q&&h!="qselect"){var i=p.r$(W.q.rect),z=N.U(i.n()*4);
|
|
if(h=="copy"){var D=N.U(i.n());N.vG(W.q.channel,W.q.rect,D,i);N.zt(t,p,z,i);N.a.HH(S,k,z,i,D,i,0,i,1,!1)}else{N.zt(S,k,z,i);
|
|
N.XY(W.q.channel,W.q.rect,z,i)}S=z;k=i}function R(w,dx){var hO=Math.max(dx.x,Math.min(dx.x+dx.e-1,w.x)),ff=Math.max(dx.y,Math.min(dx.y+dx.Z-1,w.y));
|
|
return new eC(hO,ff)}if(h=="idraw"||h=="ierase"){if(this.s$==null)this.s$=N.U(this.K5.n());var O=this.Vk.samp,b=this.Nm.lL,w=R(this.XF,p),A=O==0?w:this.ol,g=A.x,E=A.y,j=a.GJ.Wn(this.EM,this.K5,[A,new eC(g-2,E),new eC(g+2,E),new eC(g,E-2),new eC(g,E+2)]);
|
|
if(O==2)j=[[b>>>16&255,b>>>8&255,b>>>0&255,255]];var x=a.GJ.h2(t,p,w,j,this.Vk.wconf),d=N.U(p.n());N.vG(this.s$,this.K5,d,p);
|
|
N.kn.r8(x,d,d);N.vG(d,p,this.s$,this.K5);N.XY(d,p,S,k);h=h.slice(1)}if(h=="erase"&&(a.Hw.IP(W)!=16777215||P))h="draw";
|
|
if(h=="draw")N.a.ha(I.bmode,S,k,t,p,p,I.opacity);else if(h=="erase"){var L=N.U(p.n()*4);N.zt(S,k,L,p);
|
|
if(P==null){var _=N.U(p.n());N.sN(L,_,3);N.G$(_,I.opacity);N.uA(_);N.XY(_,p,t,p)}else{N.wM(L,0,4278190080);
|
|
N.a.ha("norm",L,p,t,p,p,I.opacity)}}else if(h=="clone"||h=="heal"){var T=this.b9(),c=this.Ku.clone();
|
|
c.offset(T.x,T.y);var e=p.clone();e.x1(1,1);var r=N.U(e.n()*4),B=N.U(e.n());N.zt(S,k,r,e);N.sN(r,B,3);
|
|
N.wM(r,0);if(P==null){N.zt(this.AX,c,r,e);var F=N.U(e.n());N.sN(r,F,3);N.Xa(F,B)}else a.ut.Vu(this.AX,c,P.color,r,e);
|
|
if(h=="clone"){N.ce(B,r,3);N.a.ha(I.bmode,r,e,t,p,p,I.opacity)}if(h=="heal"){var v=B.slice(0);N.round(v,20);
|
|
var X=N.U(e.n()*4);if(P==null)N.zt(this.EM,this.K5,X,e);else a.ut.Vu(this.EM,this.K5,P.color,X,e);N.a.HH(r,e,X,e,v,e,0,e,1,!1);
|
|
N.Uz.Lh(X,v,e);N.a.HH(X,e,t,p,B,e,0,p,1,!1)}}else if(h=="dodge"||h=="burn"){var r=N.U(p.n()*4),o=1,J=0,C=0,Y=0;
|
|
N.zt(S,k,r,p);var V=p.n()*4,H=a.ut.Bg;if(this.lH){if(h=="dodge")h="burn";else h="dodge"}var K=I.rng;
|
|
if(h=="dodge"){J=[1-o/2,1,1+o][K];C=[1,1/(1+o),1][K];Y=[o/2,0,0][K]}if(h=="burn"){J=[1/(1-o/2),1,1-o/2][K];
|
|
C=[1,1+o,1][K];Y=[-(o/2)/(1-o/2),0,0][K]}for(var Q=0;Q<V;Q+=4){var f=r[Q+3];t[Q+0]=H(t[Q+0],J,C,Y,f);
|
|
t[Q+1]=H(t[Q+1],J,C,Y,f);t[Q+2]=H(t[Q+2],J,C,Y,f)}}else if(h=="sponge"||h=="redeye"){var r=N.U(p.n()*4),B=N.U(p.n());
|
|
N.zt(S,k,r,p);N.sN(r,B,3);N.WQ(t,r);var l=I.smode;if(this.lH)l=1-l;var jk=hw.QE("hue2");if(h=="sponge")bU.Dm(jk,0,[0,[-50,46][l],[6,5][l]]);
|
|
else bU.Dm(jk,1,{Sz:[265,305,25,55],Ym:[0,-90,-70]});var hE=bS.wz("hue2",jk);bS.K1(hE,r,r,p);N.a.HH(r,p,t,p,B,p,0,p,1,!1)}else if(h=="copy")N.zt(S,k,t,p);
|
|
else if(h=="sheal"){var r=N.U(p.n()*4),B=N.U(p.n());N.zt(S,k,r,p);N.sN(r,B,3);r.fill(0);var Z=this.AX,aQ=this.Ku;
|
|
if(P){Z=N.U(aQ.n()*4);a.ut.Vu(this.AX,aQ,0,Z,aQ)}var jC=N.JA.Lh(Z,aQ,B,r,p);if(jC!=0)N.zt(Z,aQ,r,p);
|
|
if(this.Vk.sfrom==0)N.zt(r,p,t,p);else{N.zt(this.EM,this.K5,t,p);N.ce(B,r,3);N.a.ha("norm",r,p,t,p,p,1)}}else if(h=="qselect"){var eO=this.K5,iU=eO.e,gK=eO.Z,iM=iU*gK,i5=this.wx.et(),j=this.EM,fN=a.I6.kW,B=fN.wN;
|
|
B.fill(128);for(var Q=0;Q<iM;Q++){var dx=i5[Q<<2],ai=i5[(Q<<2)+3];if(ai==255&&(dx==0||dx==255))B[Q]=dx}B[0]=B[iU-1]=0;
|
|
B[(gK>>>1)*iU]=B[(gK>>>1)*iU+iU-1]=0;a.tl.n4(fN,!0);W.q={rect:eO,channel:fN.q.slice(0)};W.zW=!0}if(P==null){if(U)N.ce(M,t,3);
|
|
N.zt(t,p,q.buffer,q.rect)}else a.ut.vy(t,p,P)};a.ut.b9=function(){return null};a.ut.Bg=function(W,h,S,k,p){var I=W*(1/255),q=k+h*Math.pow(I,S),P=Math.round(q*p+I*(255-p));
|
|
return Math.max(0,Math.min(255,P))};a.ut.Vu=function(W,h,S,k,p){var I=N.U(p.n());I.fill(S);N.vG(W,h,I,p);
|
|
k.fill(255);N.yS(I,k)};a.ut.vy=function(W,h,S){var k=N.U(h.n());N.Zi(W,k);N.vG(k,h,S.channel,S.rect)};
|
|
a.I6=function(W,h,S){a.vv.call(this,W,h,S);this.Vk={binop:0,feat:0,cstr:{fJ:0,x:3,y:2},wconf:[16,!0,!0],anta:!0,sall:!1};
|
|
this.yR=new eC(-1,-1);this.iH=new eC(-1,-1);this.DQ="default";this.Vi=null;this.acS=!0;this.ee=!1;this.BE=new bH;
|
|
this.cB=!1;this.Xq=null;this.GM=null;this.Ia=!1;this.mz=!1};a.I6.prototype=new a.vv;a.I6.prototype.afN=function(){var W=this.Vk,h=[W.binop,W.feat];
|
|
if(this.id==a.oM)h.push(W.wconf);return h};a.I6.prototype.a9c=function(W,h,S){var k=this.Vk;k.binop=W[0];
|
|
k.feat=W[1];k.wconf=W[2];var p=new em(y.E.W,!0);p.data={o:y.D.Sx,b:this.id,Vk:k};S.c(p)};a.I6.kW={key:""};
|
|
a.I6.$L=function(W,h,S){var k={HP:W,b4:{classID:"setd",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}};
|
|
if(h)k.b4.T=h;if(S!=null)k.b4.AntA={t:"bool",v:S};return k};a.I6.hJ=function(W,h,S){return a.I6.$L("set",{t:"Objc",v:{classID:W,Top:{t:"UntF",v:{type:"#Pxl",val:h.y}},Left:{t:"UntF",v:{type:"#Pxl",val:h.x}},Btom:{t:"UntF",v:{type:"#Pxl",val:h.y+h.Z}},Rght:{t:"UntF",v:{type:"#Pxl",val:h.x+h.e}}}},S)};
|
|
a.I6.sQ=function(W,h,S){var k=[],p=[],q="set";for(var Q=0;Q<W.length;Q+=2){k.push(W[Q]);p.push(W[Q+1])}var I={t:"Objc",v:{classID:"Plgn",Pts:{t:"ObAr",v:{classID:"Pnt",arr:[{id:"Hrzn",type:"UnFl",uID:"#Pxl",arr:k},{id:"Vrtc",type:"UnFl",uID:"#Pxl",arr:p}]}}}};
|
|
if(h)q=["set","addTo","subtractFrom","interfaceWhite"][h];return a.I6.$L(q,I,S)};a.I6.aec=function(W,h,S){var k={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:W.x}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:W.y}}}},p=a.I6.$L("set",k);
|
|
p.b4.Tlrn={t:"long",v:h[0]};p.b4.AntA={t:"bool",v:h[1]};p.b4.Cntg={t:"bool",v:h[2]};if(S==!0)p.b4.Mrgd={t:"bool",v:S};
|
|
return p};a.I6.tQ=function(W){return a.I6.$L("set",{t:"enum",v:{Ordn:W?"Al":"None"}})};a.I6.as6=function(W,h,S){var k={classID:"null"};
|
|
if(W!="border")k.selectionModifyEffectAtCanvasBounds={t:"bool",v:S};var p={e:"By",c:"By",b:"Wdth",f:"Rds",s:"Rds"}[W[0]];
|
|
k[p]={t:"UntF",v:{type:"#Pxl",val:h}};return{HP:W,b4:k}};a.I6.wc=function(W,h,S){var k={t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]},p={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:h}}]};
|
|
if(S)p.v.push({t:"name",v:{classID:"Lyr",val:S}});var I=[{classID:"null",null:k,T:p},{classID:"null",null:p,T:k},{classID:"null",null:p,From:k},{classID:"null",null:p,With:k}],q=["set","add","subtract","interfaceIconFrameDimmed"];
|
|
return{HP:q[W],b4:I[W]}};a.I6.SW=function(W,h){var S=new em(y.E.W,!0);S.data={o:y.D.XO,nP:f6.z_};if(!h.H0)W.c(S);
|
|
S.data={o:y.D.XO,nP:f6.ap};if(!h.dH.$C)W.c(S)};a.I6.prototype.ca=function(W,h,S,k,p){a.I6.SW(h,p);this.Vi=h;
|
|
var I=W.o,q,P,t=new gj(0,0,S.e,S.Z),j3=!1,am,fG,bw,fz;if(I=="fromAction"){var M=W.eS,U=M.HP,i=M.b4,z=i?i.selectionModifyEffectAtCanvasBounds:null,D=z&&z.v;
|
|
if(U=="colorRange"){if(i.Clrs){var R=i.Clrs.v.Clrs,O=0,b=255,w={Shdw:"shadows",Mdtn:"midtones",Hghl:"highlights"}[R],A=i[w+"LowerLimit"],g=i[w+"UpperLimit"];
|
|
if(A)O=A.v;if(g)b=g.v;var E=i[w+"Fuzziness"].v/100;q=a.I6.Wd(S,O,b,E,!0)}else{var O=i.Mnm.v,b=i.Mxm.v,E;
|
|
O={UT:O.Lmnc.v,S4:O.A.v,S:O.B.v};b={UT:b.Lmnc.v,S4:b.A.v,S:b.B.v};E=i.Fzns.v/200;q=a.I6.Wd(S,O,b,E)}P=[7,8]}else if(U=="inverse"){if(S.q==null){alert("No selection!");
|
|
return}q={channel:N.U(t.n()),rect:t};N.vG(S.q.channel,S.q.rect,q.channel,q.rect);N.uA(q.channel);P=[7,2]}else if(U=="expand"){var j=i.By.v.val,x=S.q.rect.clone();
|
|
x.x1(j,j);var d=N.U(x.n()),L=N.U(x.n());N.vG(S.q.channel,S.q.rect,L,x);N.style.stroke(L,d,x,j);q={channel:d,rect:x};
|
|
P=[7,4]}else if(U=="contract"){var j=i.By.v.val,_=S.q.rect.clone();_.x1(1,1);if(!D)_=_.r$(t);var L=N.U(_.n()),T=N.U(L.length);
|
|
N.vG(S.q.channel,S.q.rect,L,_);N.uA(L);N.style.stroke(L,T,_,j);N.uA(T);q={channel:T,rect:_};N.Yn(q);
|
|
P=[7,5]}else if(U=="border"){var j=i.Wdth.v.val;q=a.I6.Iv(S.q,j/2,j/2);P=[7,9]}else if(U=="feather"||U=="smoothness"){var j=i.Rds.v.val;
|
|
q=a.I6.di(S.q,j,U=="smoothness",t,D);P=U=="feather"?[7,6]:[19,3,0]}else{var c=i.null.v,e=i.AntA!=null&&i.AntA.v;
|
|
function r(dg){var iT=dg.Top.v.val,bf=dg.Left.v.val;return new gj(bf,iT,dg.Rght.v.val-bf,dg.Btom.v.val-iT)}function B(dg){var iT=dg[0].arr,ej=dg[1].arr,eH={s:[],C:[]};
|
|
for(var Q=0;Q<iT.length;Q++){eH.C.push(Q==0?"M":"L");eH.s.push(iT[Q],ej[Q])}eH.C.push("Z");return eH}var F=["set","addTo","subtractFrom","interfaceWhite"].indexOf(U),v=i.T?i.T.v:null;
|
|
if(v&&v.classID=="Elps"){q=this.Ml(a.M9.Ui(r(v)));P=[10,4]}else if(v&&v.classID=="Rctn"){var X=r(v);
|
|
q={channel:N.U(X.n()),rect:X.clone()};q.channel.fill(255);P=[10,15]}else if(v&&v.classID=="ObSl"){var X=r(v),V=a.I6.kW,H=V.rect,o=V.wN,J=H.e,C=H.Z,Y=X.x-H.x,K=Y+X.e-1,u=Math.max(Y,Math.min(K,Y+K>>>1)),f=X.y-H.y,l=f+X.Z-1,jk=Math.max(f,Math.min(l,f+l>>>1)),hE=Math.max(Y,0),Z=Math.min(K,J),aQ=Math.max(f,0),jC=Math.min(l,C);
|
|
o.fill(128);if(0<=f)for(var eO=hE;eO<Z;eO++)o[f*J+eO]=0;if(l<C)for(var eO=hE;eO<Z;eO++)o[l*J+eO]=0;if(0<=Y)for(var iU=aQ;
|
|
iU<jC;iU++)o[iU*J+Y]=0;if(K<J)for(var iU=aQ;iU<jC;iU++)o[iU*J+K]=0;var gK=a.EC.Be,iM=Math.round(X.e*gK),i5=Math.round(X.Z*gK);
|
|
for(var eO=Math.max(0,u-iM);eO<Math.min(J,u+iM);eO++)o[jk*J+eO]=255;for(var iU=Math.max(0,jk-i5);iU<Math.min(C,jk+i5);
|
|
iU++)o[iU*J+u]=255;a.tl.n4(V,!0);q={channel:V.q.slice(0),rect:H.clone()};P=[10,44]}else if(v&&v.classID=="Plgn"){q=this.Ml(B(v.Pts.v.arr));
|
|
P=[10,9]}else if(v&&v.classID=="Pnt"){q=a.GJ.iM(S,new eC(v.Hrzn.v.val,v.Vrtc.v.val),[i.Tlrn.v,e,i.Cntg==null||i.Cntg.v],i.Mrgd?i.Mrgd.v:!1);
|
|
P=[10,12]}else if(v&&v.Ordn=="None"){q=null;P=[7,1]}else if(v&&v.Ordn=="Al"){var fN=t;if(S.w.length!=0){var dx=S.root.rk(S.w[0]);
|
|
while(dx.parent&&dx.parent.parent)dx=dx.parent;if(dx.i.add.artb)fN=dx.i.rp()}q={channel:N.U(fN.n()),rect:fN};
|
|
q.channel.fill(255);P=[7,0]}else if(v&&v[0]&&v[0].v.keyID=="WrPt"){var ai={o:"frompath",cM:[-1,0,0]};
|
|
this.ca(ai,h,S,k,p);return}else{var hO=["set","add","subtract","interfaceIconFrameDimmed"].indexOf(U),ff=U=="set"?v:c,eP=ff[0].v.enum,ai;
|
|
if(eP=="Trsp"||eP=="Msk"||eP=="vectorMask"||eP=="Trgt"){var a0=S.w[0];if(ff.length==2)a0=fP.jg(S,ff[1]);
|
|
var bM=["Trsp","Msk","vectorMask"].indexOf(eP);if(eP=="Trgt"&&S.g[a0].Yi==1)bM=1;ai={o:"fromlayer",cM:[a0,bM,hO]}}else{if(ff[0].t=="name"){var a0=0;
|
|
for(var Q=0;Q<S.BS.length;Q++)if(S.BS[Q].name==ff[0].v.val)a0=Q;ai={o:"fromchannel",cM:[-5-a0,0,hO]}}else{var cV=["RGB","Rd","Grn","Bl"].indexOf(eP);
|
|
ai={o:"fromchannel",cM:[-1-cV,0,hO]}}}this.ca(ai,h,S,k,p);return}if(!e&&q)N.round(q.channel);if(i.Fthr)q=a.I6.di(q,i.Fthr.v.val,!1);
|
|
if(U!="set"&&S.q!=null)q=N.kn.b0(q,S.q,F)}if(U=="expand"||U=="contract")if(!D&&!t.contains(q.rect)){var aX=q.rect.r$(t),j8=N.U(aX.n());
|
|
N.vG(q.channel,q.rect,j8,aX);q.channel=j8;q.rect=aX}}if(I=="qmask"){j3=!0;var c6=S.bx(),hk=new gj(0,0,S.e,S.Z);
|
|
if(c6){q=c6.rect.xX(hk)&&N.B4(c6.channel,255)?null:{rect:c6.rect.clone(),channel:c6.channel.slice(0)};
|
|
am=c6}else{q=null;fG=new $.Kt;fG.color=0;fG.name="Quick Mask";fG.oz=!0;if(S.q){fG.rect=S.q.rect.clone();
|
|
fG.channel=S.q.channel.slice(0)}else{fG.rect=hk;fG.channel=N.U(fG.rect.n());fG.channel.fill(255)}}P=[6,6,1];
|
|
S.tn=!0}if(I=="setsel"){q=W.q;P=W.rO}if(I=="crange"){var O=W.qe,b=W.uY;q=a.I6.Wd(S,O,b,W.sx);P=[7,8]}if(I=="fromlayer"||I=="fromchannel"||I=="frompath"){var as=W.cM[0],bM=W.cM[1],F=W.cM[2];
|
|
if(I=="fromlayer"){if(as==null)as=S.w[0];var bf=S.g[as];if(bM==0){var gW=bf.rect,j1=bf.buffer;if(gW.ZP())return;
|
|
var bZ=N.U(j1.length>>>2);N.sN(j1,bZ,3);q={channel:bZ,rect:gW.clone()}}else{if(bf.v==null)bf.r9(S);var iL=bM==1?bf.kX():bf.v;
|
|
q=a.I6.pu(iL,t)}this.track(a.I6.wc(F,["Trsp","Msk"][bM],bf.getName()))}else if(I=="frompath"){var jI=S.O4(),e2=jI[1],jI=jI[0];
|
|
if(as==null)if(jI.length==0||e2.length==0)return;var dV=jI[e2[0]];if(as!=null)for(var Q=0;Q<jI.length;
|
|
Q++)if(jI[Q].Kr==as)dV=jI[Q];var iL=dV.add.vmsk.kX(),ds=iL.wT();if(ds.n()==0)return;var bZ=iL.Ji();if(W.cM[3]!=null)this.acS=W.cM[3];
|
|
if(this.acS){bZ=bZ.slice(0);N.round(bZ)}bw=[JSON.stringify(S.yQ),JSON.stringify(S.sP)];fz=["[]","[]"];
|
|
S.yQ=[];S.sP=[];q={channel:bZ,rect:ds}}else{if(as==null)as=a.I6.IB(S);q=a.I6.ES(S,as)}if(F!=0&&S.q)q=N.kn.b0(q,S.q,F);
|
|
P=[14,11]}if(q!=null&&N.B4(q.channel,0)){q=null;P=[7,1]}if(q)N.Yn(q);var ij=new h3(P,this);ij.data={o:"changesel",k8:S.q,mQ:q,bx:j3,arC:am,a2q:fG,UY:bw,aj_:fz};
|
|
S.nh(ij);this.UN(ij.data,S)};a.I6.IB=function(W){var h=0;if(W.ye.length!=0)h=-5-W.ye[0];else if(JSON.stringify(W.t.aL)=="[1,1,1]")h=-1;
|
|
else h=-2-W.t.aL.indexOf(1);return h};a.I6.ES=function(W,h){var S,k=new gj(0,0,W.e,W.Z);if(-5<h&h<0){var p=-h-1,I=W.jc(),q=N.U(k.n());
|
|
if(p==0)N.Zi(I,q);else N.sN(I,q,p-1);S={channel:q,rect:k.clone()}}if(h<-4){S=a.I6.pu(W.BS[-h-5],k)}return S};
|
|
a.I6.pu=function(W,h){var S,k;if(W.iZ()==0){k=W.wT().clone();if(k.n()==0)return;S=W.Ji()}else{k=h;S=N.U(k.n());
|
|
W.gB(k,S)}return{channel:S,rect:k}};a.I6.prototype.Wi=function(W){return this.cB||W.kK&&this.id!=a.dj};
|
|
a.I6.prototype.Wp=function(W,h,S){var k=new em(h,!0);k.data=S;W.c(k)};a.I6.prototype.by=function(W,h){var S=new em(y.E.W,!0);
|
|
S.data={o:y.D.PS,W0:h};W.c(S)};a.I6.prototype.wT=function(W,h,S){h=W.q==null||this.BE.n7(1)||this.BE.TE(1)?h:null;
|
|
var k=this.yR,p=this.iH;if(S){k.x=Math.max(0,Math.min(W.e,k.x));k.y=Math.max(0,Math.min(W.Z,k.y));p.x=Math.max(0,Math.min(W.e,p.x));
|
|
p.y=Math.max(0,Math.min(W.Z,p.y))}var I=a.JR._W(k,p,h,!0,this.Vk.cstr),q=I[0].x,P=I[0].y;return new gj(q,P,I[1].x-q,I[1].y-P)};
|
|
a.I6.prototype.Qb=function(W,h,S,k,p){this.mz=!0;if(this.y0())return;this.Vi=h;this.ee=!1;this.BE.Qb(k);
|
|
this.yR=W.t.wy(p.x,p.y);this.yR=a.c0.Fy(W,this.yR,S);if(this.Pj(W,this.yR,k)){this.cB=!0;this.Xq=W.q.rect.clone();
|
|
return}this._O(W,S,k,p);W.t.MD=new gj};a.I6.prototype.Pj=function(W,h,S){var k=S.j(hW.YS),p=S.j(hW.OM);
|
|
if(W.q&&!k&&!p&&this.Vk.binop==0)return N.IC(h,W.q.channel,W.q.rect);return!1};a.I6.prototype.Go=function(W,h,S,k,p){this.Vi=h;
|
|
if(this.Ia)return;var I=W.t.wy(p.x,p.y);if(eC.fa(this.yR,I)*W.t.J>5){this.ee=!0;this.BE.Go()}if(k.j(hW.zP)){if(this.GM==null)this.GM=new eC(I.x-this.yR.x,I.y-this.yR.y);
|
|
this.yR.x=I.x-this.GM.x;this.yR.y=I.y-this.GM.y}else this.GM=null;this.iH=I;if(!this.cB)this.iH=a.c0.Fy(W,this.iH,S);
|
|
if(this.Pj(W,this.iH,k))this.by(h,"move");else this.by(h,this.DQ);if(this.cB){var q=this.Xq.clone();
|
|
q.x+=this.iH.x-this.yR.x;q.y+=this.iH.y-this.yR.y;var P=a.c0.Pp(W,q,S);W.q.rect.x=Math.round(this.iH.x-this.yR.x+this.Xq.x+P[0]);
|
|
W.q.rect.y=Math.round(this.iH.y-this.yR.y+this.Xq.y+P[1]);W.zW=!0;a.c0.Lb(W,q,P);return}this.ZL(W,S,k,p);
|
|
if(W.t.MD)W.t.MD=this.wT(W,k)};a.I6.prototype.y0=function(){return!1};a.I6.prototype.he=function(W,h,S,k,p,I){var q=this.mz;
|
|
this.mz=!1;if(I||!q)return;W.t.MD=null;this.iH=W.t.wy(p.x,p.y);this.iH=a.c0.Fy(W,this.iH,S);if(this.cB){this.cB=!1;
|
|
if(W!=null&&W.L.pV){W.L.pV=null;W.Hx=!0}if(this.iH.xX(this.yR)&&this.bA()==0){this.Wp(h,y.E.gg,a.I6.tQ());
|
|
return}this.T6(W,this.Xq,W.q.rect.clone());return}this.p9(W,S,k,p);a.I6.SW(h,S);this.BE.he();this.sk(h)};
|
|
a.I6.prototype.T6=function(W,h,S){var k=W.c_();if(k!=null&&k.b==this&&k.data.o=="movesel"){}else{k=new h3([7,7],this);
|
|
k.data={o:"movesel",Im:h};W.nh(k)}k.data.HF=S;this.UN(k.data,W)};a.I6.prototype.Pt=function(W,h,S,k,p){this.Ia=!0};
|
|
a.I6.prototype.ON=function(W,h,S,k,p){var I=new em(y.E.W,!0);I.data={o:y.D.Sx,b:this.id,RV:p,Rr:W,MG:S};
|
|
h.c(I);this.Ia=!1};a.I6.prototype.ok=function(W,h,S,k){this.BE.ok(k);if(W!=null&&W.q!=null){var p=k.zR();
|
|
if(p.x!=0||p.y!=0){var I=W.q.rect.clone();I.x+=p.x;I.y+=p.y;this.T6(W,W.q.rect.clone(),I)}}this.sk(h)};
|
|
a.I6.prototype.sk=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.Sx,b:this.id,nC:this.bA()};W.c(h)};
|
|
a.I6.prototype.bA=function(){var W=this.BE.n7(0),h=this.BE.TE(0);return a.I6.io(this.Vk.binop,W,h)};
|
|
a.I6.io=function(W,h,S){if(h)W=1;if(S)W=2;if(h&&S)W=3;return W};a.I6.prototype.finish=function(W,h,S,k){var p=W.q,I=this.getSelection(W,h,S,k);
|
|
if(I==null)I=a.I6.tQ();else{var q=this.Vk.feat,P=this.bA();if(q!=0)I.b4.Fthr={t:"UntF",v:{type:"#Pxl",val:q}};
|
|
if(P!=0&&P!=4)I.HP=["","addTo","subtractFrom","interfaceWhite",""][P]}this.Wp(this.Vi,y.E.gg,I);this.yR.Yh(-1,-1);
|
|
this.iH.Yh(-1,-1)};a.I6.prototype.getSelection=function(W,h,S,k){return null};a.I6.prototype._O=function(W,h,S,k){};
|
|
a.I6.prototype.ZL=function(W,h,S,k){};a.I6.prototype.p9=function(W,h,S,k){};a.I6.prototype._i=function(W,h){var S=W.o;
|
|
if(S=="changesel")h.q=W.k8;if(S=="movesel")h.q.rect=W.Im;if(W.bx){if(W.arC){h.ye=[h.BS.length];h.BS.push(W.arC)}else{h.BS.pop();
|
|
h.ye=[]}}if(W.UY){h.yQ=JSON.parse(W.UY[0]);h.sP=JSON.parse(W.UY[1])}h.zW=!0};a.I6.prototype.UN=function(W,h){var S=W.o;
|
|
if(S=="changesel")h.q=W.mQ;if(S=="movesel")h.q.rect=W.HF;if(W.bx){if(W.a2q){h.ye=[h.BS.length];h.BS.push(W.a2q)}else{h.BS.pop();
|
|
h.ye=[]}}if(W.UY){h.yQ=JSON.parse(W.aj_[0]);h.sP=JSON.parse(W.aj_[1])}h.zW=!0};a.I6.prototype.Fg=function(W){this.Vk=W.Vk};
|
|
a.I6.prototype.Ml=function(W){var h=N.H.VL(W.s);if(h.ZP())return null;var S=N.hi(h.e,h.Z);S.save();S.beginPath();
|
|
S.translate(-h.x,-h.y);Typr.U.pathToContext({cmds:W.C,crds:W.s},S);S.closePath();S.fill();S.restore();
|
|
var k=N.U(h.n()),p=S.getImageData(0,0,h.e,h.Z);N.sN(p.data,k,3);return{rect:h,channel:k}};a.I6.di=function(W,h,S,k,p){if(S)h=Math.round(h*.7);
|
|
var I=Math.ceil(2.6*h),q=W.rect.clone();q.x1(I,I);if(k&&!p)q=q.r$(k);var P=N.U(q.n()),t=N.U(P.length);
|
|
N.vG(W.channel,W.rect,t,q);N.tO.Gp(t,P,q,h);if(S){var M=P.length;for(var Q=0;Q<M;Q++){var U=(P[Q]-128)*h*2.5;
|
|
P[Q]=Math.max(0,Math.min(255,Math.round(128+U)))}}return{channel:P,rect:q}};a.I6.Iv=function(W,h,S){var k=Math.max(1,Math.ceil(S)),p=W.rect.clone();
|
|
p.x1(k,k);var I=p.n(),q={channel:N.U(I),rect:p},P=N.U(I);N.vG(W.channel,W.rect,P,q.rect);if(S!=0)N.style.stroke(P,q.channel,q.rect,S);
|
|
else N.WQ(P,q.channel);var t=N.U(I);N.uA(P);if(h!=0)N.style.stroke(P,t,q.rect,h);else N.WQ(P,t);N.kn.r$(q.channel,t,q.channel);
|
|
return q};a.I6.Wd=function(W,h,S,k,p){var I=new gj(0,0,W.e,W.Z),q=W.jc();if(W.q){var P=W.q.rect.r$(I),t=N.U(P.n()*4);
|
|
N.zt(q,I,t,P);I=P;q=t}var M=I.n(),U=N.U(M),i=1/k;if(p){if(h>=S)h=S-1;var z=h*(1-k),D=h,R=S,O=S+(255-S)*k,b=z==D?0:1/(D-z),w=R==O?0:1/(O-R);
|
|
for(var Q=0;Q<M;Q++){var A=Q<<2,g=N.ak(q[A],q[A+1],q[A+2]),E=0;if(g<z)E=0;else if(g<D)E=(g-z)*b;else if(g<=R)E=1;
|
|
else if(g<=O)E=1-(g-R)*w;else E=0;U[Q]=q[A+3]*E*E}}else for(var Q=0;Q<M;Q++){var A=Q<<2,j=N.bJ(q[A],q[A+1],q[A+2]),E=N.cG(j,h,S,k,i);
|
|
U[Q]=q[A+3]*E}return{rect:I,channel:U}};a.VA=function(){a.ut.call(this,[10,18],a.ER,"tools/blur");this.nu="copy"};
|
|
a.VA.prototype=new a.ut;a.VA.prototype.Qb=function(W,h,S,k,p){var I=k.j(hW.OM)?go.A7:go.ER;this.Gy(W,S,k,p,this.Vk.strn,I);
|
|
if(this.wx==null)return;this.NJ(W)};a.VA.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);if(this.Ct)this._G(W,S,p);
|
|
if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.a$=function(){a.ut.call(this,[10,0],a.og,"tools/brush");
|
|
this.nu="draw"};a.a$.prototype=new a.ut;a.a$.prototype.Qb=function(W,h,S,k,p){if(this.r1(k,h,p))return;
|
|
this.Gy(W,S,k,p,this.Vk.flow);if(this.wx==null)return;this.NJ(W)};a.a$.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);
|
|
if(this.Ct)this._G(W,S,p);if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.L1=function(){a.ut.call(this,[10,42],a.M1,"tools/crepl");
|
|
this.nu="idraw";this.Vk.bmode="hue "};a.L1.prototype=new a.ut;a.L1.prototype.Qb=function(W,h,S,k,p){if(this.r1(k,h,p))return;
|
|
this.Gy(W,S,k,p,this.Vk.flow);if(this.wx==null)return;this.NJ(W)};a.L1.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);
|
|
if(this.Ct)this._G(W,S,p);if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.CZ=function(){a.ut.call(this,[10,43],a.$v,"tools/redeye");
|
|
this.Vk.smode=0;this.nu="redeye"};a.CZ.prototype=new a.ut;a.CZ.prototype.Qb=function(W,h,S,k,p){this.Gy(W,S,k,p,this.Vk.flow);
|
|
if(this.wx==null)return;this.NJ(W)};a.CZ.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);if(this.Ct)this._G(W,S,p);
|
|
if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.f$=function(){a.ut.call(this,[10,38],a.Q5,"tools/pencil");
|
|
this.nu="draw"};a.f$.prototype=new a.ut;a.f$.prototype.Qb=function(W,h,S,k,p){if(this.r1(k,h,p))return;
|
|
this.Gy(W,S,k,p,this.Vk.flow);if(this.wx==null)return;this.NJ(W)};a.f$.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);
|
|
if(this.Ct)this._G(W,S,p);if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.Rk=function(){a.ut.call(this,[10,22],a.uI,"tools/burn");
|
|
this.nu="burn"};a.Rk.prototype=new a.ut;a.Rk.prototype.Qb=function(W,h,S,k,p){this.Gy(W,S,k,p,this.Vk.expo/Math.E);
|
|
if(this.wx==null)return;this.NJ(W)};a.Rk.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);if(this.Ct)this._G(W,S,p);
|
|
if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.g9=function(W,h,S){a.ut.call(this,W==""?null:W?W:[10,1],h?h:a.hR,S?S:"tools/clone");
|
|
this.nu="clone";this.TR=null;this.r=null};a.g9.prototype=new a.ut;a.g9.prototype.Qb=function(W,h,S,k,p){var I=this.Vk,q=I.alt[0];
|
|
if(k.j(hW.OM)||k.j(hW.Yq)||q){this.TR=W.t.wy(p.x,p.y);this.r=null;if(q)this.wv({alt:[!1]},h);this.V2(W);
|
|
this.Dt(S,k,W,p);return}if(this.TR==null){alert(dq.get([15,7,0]));return}this.Dt(S,k);this.Gy(W,S,k,p,this.Vk.flow);
|
|
if(this.wx==null)return;this.r=this.OQ(W.t.wy(p.x,p.y));this.NJ(W)};a.g9.prototype.OQ=function(W){var h=this.r;
|
|
if(h==null||!this.Vk.algnd)h=new eC(Math.round(W.x-this.TR.x),Math.round(W.y-this.TR.y));return h};a.g9.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);
|
|
if(this.Ct)this._G(W,S,p);if(this.wx==null){if(this.TR!=null)this.Dt(S,k,W,p);return}if(!p.kK||this.TR==null)return;
|
|
this.k$(W,S,k,p);this.NJ(W)};a.g9.prototype.b9=function(){return this.r};a.JY=function(W,h,S){a.vv.call(this,W,h,S);
|
|
this.yf={rn:{fJ:0,x:0,y:0},ZH:!1};this.Xm=!1;this.yl=null;this.cursor=null;this.a0i=0;this.Ww=null;this.yR=null;
|
|
this.mi=null;this.YB=!1};a.JY.prototype=new a.vv;a.JY.prototype.HV=function(){return this.yl!=null};
|
|
a.JY.prototype.Wi=function(W){return this.yR!=null||this.yl&&this.yl.PZ()};a.JY.prototype.Qb=function(W,h,S,k,p){this.Ww=p;
|
|
var I=W.t.wy(p.x,p.y);I.x=Math.round(I.x);I.y=Math.round(I.y);var q=this.yf.rn,P=q.fJ!=0?q.x/q.y:null,t=this.YB;
|
|
this.YB=!1;if(this.yl){var M=this.yl.fe(I,W.t.J);if(t&&M==null){this.yl.clear(W);this.yl=null}else{this.yl.Qb(W,S,k,I,P,!1,p);
|
|
return}}this.yR=a.c0.Fy(W,I,S)};a.JY.prototype.zO=function(W,h,S){if(S==null)S=[W.x,W.y,W.x+W.e,W.y,W.x+W.e,W.y+W.Z,W.x,W.y+W.Z];
|
|
return new b4(S,!0,!1,this.id==a.Mg,!0,h,this.id==a.Mg?2:0,this.id==a.Mg?4:3)};a.JY.prototype.Dt=function(W){var h=new em(y.E.W,!0);
|
|
h.data={o:y.D.PS,W0:this.cursor};W.c(h)};a.JY.prototype.enable=function(W,h,S,k){this.Vi=h;this.cursor="crosshair";
|
|
this.Dt(h);if(W!=null){var p=W.q?{Zr:"cropby",a1q:3}:{Zr:"config",yf:this.yf,aqe:!0};this.Fg(p,h,W,k,S);
|
|
if(W.q==null&&this.yf.rn.fJ==0)this.YB=!0}};a.JY.prototype.Go=function(W,h,S,k,p){this.Ww=p;var I=W.t.wy(p.x,p.y);
|
|
if(!p.kK){var q="crosshair";if(this.yl){var P=this.yl.fe(I,W.t.J,null,p);if(P)q=P;else q="default"}if(q!=this.cursor){this.cursor=q;
|
|
this.Dt(h)}}if(this.yl)this.yl.Go(W,S,k,I);else if(this.yR){if(this.Xm){W.L.i1={C:["M","L"],s:[this.yR.x,this.yR.y,I.x,I.y]}}else{var t=a.JR._W(this.yR,a.c0.Fy(W,I,S),k,!0,this.yf.rn),M=t[0].x,U=t[0].y,i=this.mi=new gj(M,U,t[1].x-M,t[1].y-U);
|
|
W.L.i1=N.H.Fb(i);a.vv.XB(p,i,W,S)}W.Hx=!0}};a.JY.a0c=function(W,h,S){var k,p,P,t;if(h<=S){k=h;p=S}else{k=S;
|
|
p=h}var I=W-Math.floor((W+Math.PI)/(2*Math.PI))*2*Math.PI;I=Math.abs(I);if(I>Math.PI/2)I=Math.PI-I;var q=k/(p*Math.sin(I)+k*Math.cos(I));
|
|
if(h<=S){P=k*q;t=p*q}else{P=p*q;t=k*q}return{s6:P,R_:t}};a.JY.prototype.he=function(W,h,S,k,p){this.Ww=p;
|
|
var I=W.t.wy(p.x,p.y);if(this.yl==null){var q=this.mi;if(this.yR&&(q||this.Xm)){if(this.Xm){var P=this.yR,t=I;
|
|
if(P.x>t.x){var M=P;P=t;t=M}var P=Math.atan2(-(t.y-P.y),t.x-P.x),U=a.JY.a0c(P,W.e,W.Z),i=[0,0,U.s6,0,U.s6,U.R_,0,U.R_],z=new ex;
|
|
z.translate(-U.s6/2,-U.R_/2);z.rotate(P);z.translate(W.e/2,W.Z/2);N.H.A(i,z,i);this.yl=this.zO(q,!1,i);
|
|
W.L.i1=null;this.Xm=!1}else{var D=this.yf.rn;this.yl=this.zO(q,D.fJ!=0)}this.yl.gU(W,S);this.mi=null;
|
|
this.Wp(h,y.E.W,{o:y.D.Sx,b:this.id,aE:!0});this.yR=null;W.L.uj=[];W.Hx=!0}return}this.yl.he(W,S,k,I);
|
|
this.Wp(h,y.E.W,{o:y.D.Sx,b:this.id,aE:!0});var i=this.yl.zk();if(Math.abs(i[0]-i[4])<2&&Math.abs(i[1]-i[5])<2){this.disable(W,h,null,k);
|
|
return}if(Date.now()-this.a0i<200&&this.yl.bB(I)){this.Vd(W,S);this.disable(W,h,S,k);return}this.a0i=Date.now()};
|
|
a.JY.prototype.ok=function(W,h,S,k){var p=this.yl;if(p==null||this.Ww&&this.Ww.kK)return;if(k.j(hW.l$)){this.Vd(W,S);
|
|
this.disable(W,h,S,k)}else if(k.j(hW.y$)){this.disable(W,h,S,k)}else p.ok(W,S,k)};a.JY.vu=function(W,h,S){var k={classID:"null",T:{t:"Objc",v:{classID:"Rctn",Top:{t:"UntF",v:{type:"#Pxl",val:W[1]}},Left:{t:"UntF",v:{type:"#Pxl",val:W[0]}},Btom:{t:"UntF",v:{type:"#Pxl",val:W[1]+W[3]}},Rght:{t:"UntF",v:{type:"#Pxl",val:W[0]+W[2]}}}},Angl:{t:"UntF",v:{type:"#Ang",val:h!=null?h:0}},Dlt:{t:"bool",v:S!=null?S:!0},cropAspectRatioModeKey:{t:"enum",v:{cropAspectRatioModeClass:"pureAspectRatio"}},CnsP:{t:"bool",v:!1}};
|
|
return{HP:"crop",b4:k}};a.JY._u=function(W,h){if(h==null)h=[!0,!0,!0,!0];var S={classID:"trim",trimBasedOn:{t:"enum",v:{trimBasedOn:["topLeftPixelColor","bottomRightPixelColor","Trns"][W]}}},k=["Top","Left","Btom","Rght"];
|
|
for(var Q=0;Q<4;Q++)S[k[Q]]={t:"bool",v:h[Q]};return{HP:"trim",b4:S}};a.JY.nK=function(W,h,S,k){var p={classID:"null"};
|
|
if(k!=null){p.Wdth={t:"UntF",v:{type:"#Pxl",val:W}};p.Hght={t:"UntF",v:{type:"#Pxl",val:h}};p.Intr={t:"enum",v:{Intp:["Nrst","Blnr","bicubicSharper"][k]}}}if(S!=null)p.Rslt={t:"UntF",v:{type:"#Rsl",val:S}};
|
|
return{HP:"imageSize",b4:p}};a.JY.yV=function(W,h,S){if(S==null)S=4;var k=Math.floor(S/3),p=S%3;return{HP:"canvasSize",b4:{classID:"null",Wdth:{t:"UntF",v:{type:"#Pxl",val:W}},Hght:{t:"UntF",v:{type:"#Pxl",val:h}},Hrzn:{t:"enum",v:{HrzL:["Left","Cntr","Rght"][p]}},Vrtc:{t:"enum",v:{VrtL:["Top","Cntr","Btom"][k]}}}}};
|
|
a.JY.prototype.ca=function(W,h,S,k,p){var I=new gj(0,0,S.e,S.Z),q=[11,3],P=S.H$,t=S.e/2,M=S.Z/2,U=1,u,f;
|
|
if(W.o=="fromAction"){var i=W.eS,z=i.HP,D=i.b4,R=S.e/S.Z,O=D.Wdth?D.Wdth.v.val:-1,b=D.Hght?D.Hght.v.val:-1,P=D.Rslt?D.Rslt.v.val:null,w=D.Wdth?D.Wdth.v.type:D.Hght?D.Hght.v.type:-1,A=1,g;
|
|
if(w=="#Prc"){if(O!=-1)O=Math.round(S.e*O/100);if(b!=-1)b=Math.round(S.Z*b/100)}if(z=="imageSize"){if(D.Intr){if(D.Intr.v.Intp=="Nrst")A=0;
|
|
if(D.Intr.v.Intp=="bicubicSharper")A=2;if(O==-1&&b==-1){var E=P/S.H$;O=Math.round(S.e*E);b=Math.round(S.Z*E)}if(D.CnsP&&D.CnsP.v){if(O==-1)O=Math.round(b*R);
|
|
if(b==-1)b=Math.round(O/R)}}else{if(w=="#Prc")P=Math.round(S.H$*(S.e/O));else if(w==-1)P=Math.round(P);
|
|
else throw"e";O=S.e;b=S.Z}g={o:"imgsize",aR:O,CB:b,p7:P,Oa:A}}else if(z=="canvasSize"){if(O==-1)O=S.e;
|
|
if(b==-1)b=S.Z;if(D.Rltv&&D.Rltv.v==!0){if(D.Wdth)O+=S.e;if(D.Hght)b+=S.Z}var j=D.Vrtc?D.Vrtc.v.VrtL:"Cntr",x=D.Hrzn?D.Hrzn.v.HrzL:"Cntr";
|
|
g={o:"canvsize",aR:O,CB:b,sr:3*["Top","Cntr","Btom"].indexOf(j)+["Left","Cntr","Rght"].indexOf(x)}}else if(z=="revealAll"){g={o:"revealAll"}}else if(z=="trim"){var d={topLeftPixelColor:0,bottomRightPixelColor:1,Trns:2}[D.trimBasedOn.v.trimBasedOn];
|
|
if(d==null)throw"e";var L=["Top","Left","Btom","Rght"],_=[!0,!0,!0,!0];for(var Q=0;Q<4;Q++)if(D[L[Q]])_[Q]=D[L[Q]].v;
|
|
g={o:"trim",ajy:d,Uc:_}}else if(z=="crop"){var T,c,e,r;if(D.T){var B=D.T.v,T=Math.round(B.Left.v.val),c=Math.round(B.Top.v.val),e=Math.round(B.Rght.v.val)-T,r=Math.round(B.Btom.v.val)-c}else{var F=S.g[S.w[0]],v=F.rect;
|
|
v=v.r$(new gj(0,0,S.e,S.Z));T=v.x;c=v.y;e=v.e;r=v.Z}g={o:"canvsize",aR:e,CB:r,r:new eC(T,c),a3J:D.Dlt!=null&&D.Dlt.v}}else console.log(i);
|
|
if(g)this.ca(g,h,S,k,p);return}else if(W.o=="imgsize"){I=new gj(0,0,W.aR,W.CB);if(W.p7)P=W.p7;U=W.Oa}else if(W.o=="canvsize"){var X=W.sr!=null?W.sr:0;
|
|
I=new gj(0,0,W.aR,W.CB);var V=S.e-W.aR,H=S.Z-W.CB,o=Math.round(V/2),J=Math.round(H/2);if(X==1||X==4||X==7)I.x=o;
|
|
if(X==2||X==5||X==8)I.x=V;if(X==3||X==4||X==5)I.y=J;if(X==6||X==7||X==8)I.y=H;if(W.r){I.x=W.r.x;I.y=W.r.y}}else if(W.o=="rot"&&(W.k+2*Math.PI)%(Math.PI/2)!=0){var C=N.H.Fb(I).s,Y=new ex;
|
|
Y.translate(-t,-M);Y.rotate(W.k);Y.translate(t,M);N.H.A(C,Y,C);I=N.H.VL(C)}else if(W.o=="rot"&&W.k!=Math.PI&&W.k!=-Math.PI){I=new gj(t-S.Z/2,M-S.e/2,S.Z,S.e);
|
|
if((S.e+S.Z&1)==1){t=Math.floor(t);M=Math.floor(M);I=new gj(t-Math.floor(S.Z/2),M-Math.floor(S.e/2),S.Z,S.e);
|
|
if((S.e&1)==1&&W.k!=-Math.PI/2)I.y--;if((S.Z&1)==1&&W.k==-Math.PI/2)I.x--}}else if(W.o=="trim"){q=[11,12,0];
|
|
var K=S.jc(),v=new gj(0,0,S.e,S.Z);I=N.ow(K,v,W.ajy,W.Uc);if(I.ZP())I=v}else if(W.o=="cropbysel"){q=[11,12,1];
|
|
I=S.q.rect.clone()}else if(W.o=="revealAll"){q=[11,12,2];I=S.root.wT(S,!0)}var l=W.o=="canvsize"&&W.a3J;
|
|
if(W.o=="imgsize"||W.o=="rot"||W.o=="scl"||l){var jk=new ex;if(W.o=="imgsize"){q=[11,10];jk.scale(W.aR/S.e,W.CB/S.Z)}else if(l){}else{jk.translate(-t,-M);
|
|
if(W.o=="rot")jk.rotate(W.k);if(W.o=="scl")jk.scale(W.k.x,W.k.y);jk.translate(t,M);q=W.rO}f=N.V.xm(jk);
|
|
u=this.gd(S,p,!0,f,U,l?I:null)}else if(W.o=="auto-align"){if(S.w.length<2){alert("Select two or more layers.");
|
|
return}var hE=[];for(var Q=0;Q<S.w.length;Q++){var F=S.g[S.w[Q]];if(!F.p2()&&F.add.SoLd==null){alert("Unsupported layer selected.");
|
|
return}if(F.rect.ZP()){alert("Empty layer selected.");return}hE.push([F.buffer,F.rect])}var Z=N.Vn.b2(hE,0);
|
|
if(Z==null){alert("No similarity found.");return}f=Z[1];var aQ=S.w;S.w=S.w.slice(1);u=this.gd(S,p,!1,Z.slice(1),U);
|
|
S.w=aQ;I=S.root.wT(S,!0);q=[2,10,1]}var jC=new gj(0,0,S.e,S.Z);if(!I.ZP()&&(!I.xX(jC)||u!=null)){var eO=new h3(q,this);
|
|
eO.data={atV:S.H$,p7:P,RA:u,es:f,Ao:a.JY.HZ(S,I,jC,u!=null)};a.JY.PJ(S,eO.data,I);S.nh(eO);this.UN(eO.data,S)}};
|
|
a.JY.HZ=function(W,h,S,k){if(W.BW.length==0)return null;var p=JSON.stringify(W.BW),I=JSON.parse(p);a.b1.atY(I,h,S,k);
|
|
I=JSON.stringify(I);return[p,I]};a.JY.prototype.gd=function(W,h,S,k,p,I){var q={g:[],sl:null,m$:null};
|
|
if(S){for(var Q=0;Q<W.g.length;Q++)q.g.push(Q);for(var Q=0;Q<W.mw.length;Q++)q.g.push(-1-Q);for(var Q=0;
|
|
Q<W.BS.length;Q++)q.g.push(-1e3-Q)}else q.g=W.w.slice(0);q.sl=a.Q.sG(W,q.g,!0);a.Q.bb(W,h,q.g,q.sl,p,k,null,!0,I);
|
|
q.m$=a.Q.sG(W,q.g,!0);return q};a.JY.prototype.UN=function(W,h){if(W.p7)h.H$=W.p7;if(W.Ao)h.BW=JSON.parse(W.Ao[1]);
|
|
if(W.RA){a.JY.JP(h,N.V.MK(W.es));a.Q.Uy(h,W.RA.g,W.RA.m$)}a.JY.xY(h,W)};a.JY.prototype._i=function(W,h){if(W.atV)h.H$=W.atV;
|
|
if(W.Ao)h.BW=JSON.parse(W.Ao[0]);a.JY.Ew(h,W);if(W.hA)h.t.r.f6(W.hA);h.ET();if(W.RA){var S=N.V.MK(W.es).clone();
|
|
S.uA();a.JY.JP(h,S);a.Q.Uy(h,W.RA.g,W.RA.sl)}};a.JY.JP=function(W,h){for(var Q=0;Q<W.g.length;Q++){var S=W.g[Q];
|
|
if(S.add.artb==null)continue;var k=N.H.Fb(S.rp()).s;N.H.A(k,h,k);var p=N.H.VL(k);S.Si(p)}};a.JY.BK=function(W){var h=new gj,S=0,k=W.root.children.length;
|
|
for(var Q=0;Q<k;Q++){var p=W.root.children[Q].i;if(p.add.artb==null)continue;h=h.r8(p.rp());S++}var I=new gj(0,0,W.e,W.Z);
|
|
if(!h.ZP()&&!I.xX(h)&&k==S)return h;return null};a.JY.g$=function(W){var h=a.JY.BK(W);if(h)a.JY.ZH(W,h,!0);
|
|
return h};a.JY.ZH=function(W,h,S){var k=W.e,p=W.Z,I=h.e,q=h.Z,P=h.x==0&&h.y==0;if(P&&k==I&&p==q)return;
|
|
W.e=I;W.Z=q;var t=[];for(var Q=0;Q<W.g.length;Q++)t.push(Q);if(!P)a.c0.eg(W,t,null,-h.x,-h.y);for(var Q=0;
|
|
Q<W.g.length;Q++){W.g[Q].r9(W)}W.ET();if(S){var M=W.t.r,U=W.t.J;M.x+=Math.round((h.x+(I-k)/2)*U);M.y+=Math.round((h.y+(q-p)/2)*U)}else W.t.r.Yh(0,0);
|
|
if(W.q)W.q.rect.offset(-h.x,-h.y);var i=W.A_();for(var z=0;z<i[0].length;z++)if(i[1][z]==-1){var D=W.r4[z];
|
|
D[1]-=D[0]==0?h.x:h.y}for(var Q=0;Q<W.BS.length;Q++)W.BS[Q].rect.offset(-h.x,-h.y)};a.JY.prototype.Fg=function(W,h,S,k,p){if(W.Zr=="commit"){this.Vd(S,p);
|
|
this.disable(S,h,null,k)}else if(W.Zr=="cancel"){this.disable(S,h,null,k)}var I=null,q=new gj(0,0,S.e,S.Z),P=this.yf.rn;
|
|
if(W.Zr=="config"){this.yf=W.yf;P=this.yf.rn;if(S==null||!W.aqe)return;I=q;if(P.fJ==1){var t=P.x/P.y;
|
|
if(I.e/t<I.Z)I.Z=Math.round(I.e/t);else I.e=Math.round(I.Z*t)}if(P.fJ==2){I.e=P.x;I.Z=P.y}I.x=Math.round((S.e-I.e)/2);
|
|
I.y=Math.round((S.Z-I.Z)/2)}if(W.Zr=="straighten"){alert("Draw a line in the image.");this.Xm=!0}if(W.Zr=="cropby"){if(S==null)return;
|
|
var M=W.a1q,I;if(M==0)I=S.root.wT(S,!0);if(M==1){if(S.w.length==0)alert("No layer is selected.");else{var U=S.root.rk(S.w[0]);
|
|
I=U.wT(S,!0)}}if(M==2){if(S.w.length==0)alert("No layer is selected.");else{I=N.ow(S.jc(),q,0);if(I.ZP())I=q.clone()}}if(M==3){if(S.q!=null)I=S.q.rect;
|
|
else alert("There is no selection.")}if(M==4){I=new gj(0,0,S.e,S.Z)}}if(I&&I.ZP())I=null;if(I!=null){this.yl=this.zO(I,P.fJ!=0);
|
|
this.yl.gU(S,p);this.Wp(h,y.E.W,{o:y.D.Sx,b:this.id,aE:!0})}};a.JY.prototype.Vd=function(W,h){var S=this.yl.zk(),k=N.H.VL(S),p=this.aoP(W,S),I=!1,q=this.yf.rn,P=this.yf.ZH,t=q.x,M=q.y,z;
|
|
if(this.id==a.ot&&q.fJ==2&&p.n()!=t*M){p=new gj(p.x,p.y,t,M);I=!0}var U=N.V.ew(S,p);U=N.V.uA(U);var i=N.V.kD(U),D=Math.atan2(U[3],U[0]);
|
|
if(Math.abs(D)>1e-9||!i||I||P)z=this.gd(W,h,!0,U,1,k);var R=new h3(this.name,this),O=new gj(0,0,W.e,W.Z);
|
|
R.data={RA:z,es:U,hA:W.t.r.clone(),Ao:a.JY.HZ(W,p,O,!1)};a.JY.PJ(W,R.data,p);W.nh(R);this.UN(R.data,W);
|
|
this.track(a.JY.vu([k.x,k.y,k.e,k.Z],null,P))};a.JY.PJ=function(W,h,S){if(S==null)return;h.Im=new gj(0,0,W.e,W.Z);
|
|
h.HF=S};a.JY.xY=function(W,h){if(h.HF==null)return;a.JY.ZH(W,h.HF)};a.JY.Ew=function(W,h){if(h.HF==null)return;
|
|
var S=h.Im.clone();S.offset(-h.HF.x,-h.HF.y);a.JY.ZH(W,S)};a.JY.prototype.aoP=function(W,h){var S=N.V.ew(h),k=N.V.kD(S),p=N.V.MK(S),I=p.y8,q=p.S8,P=Math.atan2(p.S,p.S4);
|
|
p.rotate(P);var t=new gj(I,q,p.S4,p.Bq);if(!k){function M(g,Q,E){var j=g[Q]-g[E],x=g[Q+1]-g[E+1];return Math.sqrt(j*j+x*x)}var U=M(h,0,2),i=M(h,4,6),z=Math.max(U,i),D=M(h,2,4),R=M(h,6,0),O=Math.max(D,R),b=a.JY.amd(h,W.e/2,W.Z/2),w,A;
|
|
if(isNaN(b)||b==Infinity||b==-Infinity||Math.min(b,1/b)<.1)b=(U+i)/(D+R);if(z/O>b){w=z*1;A=w/b}else{A=O*1;
|
|
w=A*b}t.e=w;t.Z=A}t.x=Math.round(t.x);t.y=Math.round(t.y);t.e=Math.round(t.e);t.Z=Math.round(t.Z);return t};
|
|
a.JY.amd=function(W,h,S){var k=W[0]-h,p=W[1]-S,I=W[2]-h,q=W[3]-S,P=W[6]-h,t=W[7]-S,M=W[4]-h,U=W[5]-S,i=((p-U)*P-(k-M)*t+k*U-p*M)/((q-U)*P-(I-M)*t+I*U-q*M),z=((p-U)*I-(k-M)*q+k*U-p*M)/((t-U)*I-(P-M)*q+P*U-t*M),D=-((z*t-p)*(i*q-p)+(z*P-k)*(i*I-k))/((z-1)*(i-1));
|
|
function R(b){return b*b}var O=Math.sqrt((R(i-1)+R(i*q-p)/D+R(i*I-k)/D)/(R(z-1)+R(z*t-p)/D+R(z*P-k)/D));
|
|
if(i==1&&z==1)O=Math.sqrt((R(q-p)+R(I-k))/(R(t-p)+R(P-k)));return O};a.JY.prototype.disable=function(W,h,S,k){if(W==null)return;
|
|
if(this.yl)this.yl.clear(W);this.yl=null;this.Wp(h,y.E.W,{o:y.D.Sx,b:this.id,aE:!1})};a.JY.prototype.Wp=function(W,h,S,k){var p=new em(h,!0);
|
|
p.data=S;if(k)p.b=k;W.c(p)};a.L2=function(){a.JY.call(this,[10,2],a.ot,"tools/rcrop")};a.L2.prototype=new a.JY;
|
|
a.hm=function(){a.JY.call(this,[10,39],a.Mg,"tools/pcrop")};a.hm.prototype=new a.JY;a.EQ=function(){a.ut.call(this,[10,21],a.Mk,"tools/dodge");
|
|
this.nu="dodge"};a.EQ.prototype=new a.ut;a.EQ.prototype.Qb=function(W,h,S,k,p){this.Gy(W,S,k,p,this.Vk.expo/Math.PI);
|
|
if(this.wx==null)return;this.NJ(W)};a.EQ.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);if(this.Ct)this._G(W,S,p);
|
|
if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.Oz=function(){a.ut.call(this,[10,3],a.VG,"tools/eraser");
|
|
this.nu="erase"};a.Oz.prototype=new a.ut;a.Oz.prototype.Qb=function(W,h,S,k,p){this.Gy(W,S,k,p,this.Vk.flow);
|
|
if(this.wx==null)return;this.NJ(W)};a.Oz.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);if(this.Ct)this._G(W,S,p);
|
|
if(this.wx==null)return;if(!p.kK)return;var I=this.k$(W,S,k,p);this.NJ(W)};a.lD=function(){a.ut.call(this,[10,45],a.are,"tools/beraser");
|
|
this.nu="ierase"};a.lD.prototype=new a.ut;a.lD.prototype.Qb=function(W,h,S,k,p){if(this.r1(k,h,p))return;
|
|
this.Gy(W,S,k,p,this.Vk.flow);if(this.wx==null)return;this.NJ(W)};a.lD.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);
|
|
if(this.Ct)this._G(W,S,p);if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.Qo=function(){a.I6.call(this,[10,15],a.Ck,"tools/rselect");
|
|
this.DQ="crosshair"};a.Qo.prototype=new a.I6;a.Qo.prototype.ZL=function(W,h,S,k){if(!k.kK||!this.ee)return;
|
|
var p=this.wT(W,S,!0);W.L.i1=N.H.Fb(p);W.Hx=!0;a.vv.XB(k,p,W,h)};a.Qo.prototype.p9=function(W,h,S,k){W.L.i1=null;
|
|
W.L.uj=[];W.Hx=!0;this.finish(W,h,S,k)};a.Qo.prototype.getSelection=function(W,h,S,k){if(this.yR.xX(this.iH)||!this.ee)return null;
|
|
var p=this.wT(W,S,!0);if(p.ZP())return null;return a.I6.hJ("Rctn",p,this.Vk.anta)};a.M9=function(){a.I6.call(this,[10,4],a.ani,"tools/eselect");
|
|
this.DQ="crosshair"};a.M9.prototype=new a.I6;a.M9.prototype.ZL=function(W,h,S,k){if(!k.kK||!this.ee)return;
|
|
var p=this.wT(W,S);W.L.i1=a.M9.Ui(p);W.Hx=!0;a.vv.XB(k,p,W,h)};a.M9.prototype.p9=function(W,h,S,k){W.L.i1=null;
|
|
W.L.uj=[];W.Hx=!0;this.finish(W,h,S,k)};a.M9.prototype.getSelection=function(W,h,S,k){if(this.yR.xX(this.iH)||!this.ee)return null;
|
|
var p=this.wT(W,S);if(!p.NW(new gj(0,0,W.e,W.Z)))return null;return a.I6.hJ("Elps",p,this.Vk.anta)};
|
|
a.M9.Ui=function(W){var h=W.x,S=W.y,k=W.x+W.e,p=W.y+W.Z,I=(h+k)/2,q=(S+p)/2,P=(h-k)/2,t=(S-p)/2,M=.5522848,U={s:[I,q-t],C:["M","C","C","C","C"]};
|
|
U.s.push(I+M*P,q-t,I+P,q-M*t,I+P,q);U.s.push(I+P,q+M*t,I+M*P,q+t,I,q+t);U.s.push(I-M*P,q+t,I-P,q+M*t,I-P,q);
|
|
U.s.push(I-P,q-M*t,I-M*P,q-t,I,q-t);return U};a.vQ=function(W){a.vv.call(this,[10,5],W?a.VE:a.jU,"tools/eyedropper");
|
|
this.u6=null;this.KR=0;this.R2=null;this.Q6=1;this.L$=2;this.aaq=!0;this.Ny=!1};a.vQ.prototype=new a.vv;
|
|
a.vQ.prototype.Wi=function(W){return W.kK};a.vQ.prototype.ca=function(W,h,S,k,p){if(W.o=="pickhere")this.gb(S,h,p,null,W.afn);
|
|
if(W.o=="supertool")this.u6=W.b};a.vQ.prototype.Qb=function(W,h,S,k,p){var I=this.u6;if(I){I.Qb(W,h,S,k,p);
|
|
return}this.KR=S.Ps;this.R2=p;var q=this.gb(W,null,S,k,p);this.Dt(W,h,q,p)};a.vQ.prototype.Go=function(W,h,S,k,p){var I=this.u6;
|
|
if(I){I.Go(W,h,S,k,p);return}var q=this.R2;if(q){var P=p.x-q.x,t=p.y-q.y,M=1,U=new eC(q.x+P*M,q.y+t*M),i=this.gb(W,null,S,k,U);
|
|
this.Dt(W,h,i,U,new eC(P*(1-M),t*(1-M)))}};a.vQ.prototype.Dt=function(W,h,S,k,p){var I=this.aaq,q=this.Ny,M=12,U=11;
|
|
if(W.t.J>4)q=!1;if(!q&&!I)return;if(p==null)p=new eC(0,0);var P=new gj(0,0,W.e,W.Z),t=W.jc(),i=(M*2+1)*U,z=new eC(i/2,i/2),D=new gj(0,0,i,i),R=N.U(D.n()*4),O=W.t.wy(k.x,k.y),b=Math.floor(O.x),w=Math.floor(O.y),A=new ex;
|
|
A.scale(1/U,1/U);A.translate(b-M,w-M);if(q)N.scale.Wx(t,P,A,R,D);var g=(M-3.4)*U,E=(M-1.7)*U,j=M*U;for(var x=0;
|
|
x<i;x++)for(var d=0;d<i;d++){var L=eC.fa(new eC(d,x),z);if(L>g){if(I){var _=Math.max(0,g-L+1),T=(x*i+d)*4,c=R[T+3]<<24|R[T]<<16|R[T+1]<<8|R[T+2],e=255<<24|(x<j+U*.5?S:this.KR);
|
|
if(L>E){_=Math.max(0,E-L+1);c=e;e=4286611584}else if(!q){c=e&16777215}R[T+0]=(1-_)*(e>>>16&255)+_*(c>>>16&255);
|
|
R[T+1]=(1-_)*(e>>>8&255)+_*(c>>>8&255);R[T+2]=(1-_)*(e>>>0&255)+_*(c>>>0&255);R[T+3]=(1-_)*(e>>>24&255)+_*(c>>>24&255)}if(L>j){R[(x*i+d)*4+3]=Math.max(0,255*(j-L+1))}}}function r(Q){var f=Q<<2;
|
|
R[f]=0;R[f+1]=0;R[f+2]=0;R[f+3]=255}function B(Q){var f=Q<<2;R[f]=255;R[f+1]=255;R[f+2]=255;R[f+3]=255}var F=this.Q6*U+2,v=i-F>>>1,X=v+F-1;
|
|
if(q&&F<i)for(var Q=0;Q<F;Q++){var V=v*i+v+Q,H=X*i+v+Q,o=(v+Q)*i+v,J=(v+Q)*i+X;r(V);r(H);r(o);r(J);if(Q!=0&&Q!=F-1){B(V+i);
|
|
B(H-i);B(o+1);B(J-1)}}if(!q)for(var Q=-9;Q<=9;Q++){if(-3<Q&&Q<3)continue;var C=i>>>1,d=C*i+C+Q,x=(C+Q)*i+C;
|
|
B(d-i);r(d);B(d+i);B(x-1);r(x);B(x+1)}var Y=a.vv.UR(0,0,["#"+N.fl(S),"RGB "+(S>>>16&255)+","+(S>>>8&255)+","+(S>>>0&255)]),P=Y[1];
|
|
P.y=0;P.x=i-P.e>>>1;N.zt(Y[0],P,R,D);var K={jj:R,pY:D,fQ:new eC(z.x+p.x,z.y+p.y)},u=new em(y.E.W,!0);
|
|
u.data={o:y.D.PS,W0:K};h.c(u)};a.vQ.prototype.he=function(W,h,S,k,p,I){this.gb(W,h,S,k,p);var q=this.u6;
|
|
if(q){q.he(W,h,S,k,p);return}if(this.R2){this.R2=null;if(I)this.gb(W,h,S,k,p,this.KR);var P=new em(y.E.W,!0);
|
|
P.data={o:y.D.PS,W0:"default"};h.c(P)}};a.vQ.prototype.gb=function(W,h,S,k,p,I){if(I==null)I=a.vQ.Le(W,p,this.Q6,this.L$);
|
|
var q=new em(y.E.W);q.data={o:y.D.XO,nP:f6.Ov,s7:k&&k.j(hW.OM)?1:0,k:I};if(h)h.c(q);return I};a.vQ.Le=function(W,h,S,k){if(k==null)k=2;
|
|
var p=W.t.wy(h.x,h.y),I,q,P=W.w.length==1&&W.g[W.w[0]].Yi>0,t=W.ye.length!=0,E=0,j=0,x=0;if(P||t){var M;
|
|
if(t)M=W.BS[W.ye[0]];else{var U=W.g[W.w[0]];M=U.Yi==1?U.kX():U.aeA()}q=M.wT();if(!q.mA(p))return M.color==0?0:16777215;
|
|
I=N.U(q.n()*4);I.fill(255);var i=M.Ji();N.yS(i,I)}else if(k==0&&W.w.length!=0){var U=W.g[W.w[0]];I=U.buffer;
|
|
q=U.rect}else{I=k==2?W.jc():W.jc(W.w[0]);q=new gj(0,0,W.e,W.Z)}var z=Math.floor(p.x)-q.x,D=Math.floor(p.y)-q.y,R=(S-1)/2,O=Math.max(0,z-R),b=Math.max(0,D-R),w=Math.min(q.e,z+R+1),A=Math.min(q.Z,D+R+1),g=(w-O)*(A-b);
|
|
for(var z=O;z<w;z++)for(var D=b;D<A;D++){var Q=4*(D*q.e+z);E+=I[Q];j+=I[Q+1];x+=I[Q+2]}E=Math.round(E/g);
|
|
j=Math.round(j/g);x=Math.round(x/g);return E<<16|j<<8|x};a.vQ.prototype.Fg=function(W){var h=W.Vk;this.Q6=[1,3,5,11,31][h[0]];
|
|
this.L$=h[1];this.aaq=h[2];this.Ny=h[3]};a.z0=function(){a.vv.call(this,[10,6],a.af7,"tools/gradient");
|
|
this.Vk={X:JSON.parse(hz.Ma.ag1).v,dS:"Lnr",D8:!1,aq9:!1,a0N:"norm",YH:1};this.YX=!1;this.tt=null};a.z0.prototype=new a.vv;
|
|
a.z0.prototype.enable=function(W,h,S,k){var p=new em(y.E.W,!0);p.data={o:y.D.PS,W0:"default"};h.c(p)};
|
|
a.z0.prototype.Fg=function(W){this.Vk=W.nP};a.z0.prototype.Qb=function(W,h,S,k,p){if(!W.xi())return;
|
|
this.tt=W.t.wy(p.x,p.y);this.tt=a.c0.Fy(W,this.tt,S);this.YX=!0};a.z0.prototype.Go=function(W,h,S,k,p){if(!this.YX)return;
|
|
var I=W.t.wy(p.x,p.y);I=a.c0.Fy(W,I,S);if(k.j(hW.YS))I=a.z0.fh(this.tt,I);W.L.i1={s:[this.tt.x,this.tt.y,I.x,I.y],C:["M","L"]};
|
|
W.L.xV=[this.tt.x,this.tt.y,I.x,I.y];W.Hx=!0};a.z0.prototype.he=function(W,h,S,k,p){if(!this.YX)return;
|
|
var I=W.g[W.w[0]],q=W.t.wy(p.x,p.y);q=a.c0.Fy(W,q,S);if(k.j(hW.YS))q=a.z0.fh(this.tt,q);var P=q.Xy(this.tt),t=eC.G5(this.tt,q,.5),M=Math.atan2(P.y,P.x),U=eC.fa(this.tt,q),i=Math.sin(M),z=Math.cos(M);
|
|
if(U>2){var D;if(W.q)D=W.q.rect;else D=new gj(0,0,W.e,W.Z);var R=N.U(D.n()*4),O=this.Vk,b=O.dS;if(b!="Lnr"){U*=2;
|
|
t=this.tt}N.X.S3(O.X,R,D,[z*1/U,i*1/U,-i*1/U,z*1/U],t.x,t.y,O.D8,hz.X.types.indexOf(b),S.Ps,S.lL,null,O.aq9);
|
|
var w=Math.round(O.YH*256),A=R.length;if(w!=256)for(var Q=0;Q<A;Q+=4)R[Q+3]=R[Q+3]*w>>>8;var g=new em(y.E.u);
|
|
g.b=a.VG;g.data={o:"fillBMP",GS:R,Ah:O.a0N,rO:this.name};h.c(g)}W.L.i1=null;W.L.xV=[];W.Hx=!0;this.YX=!1};
|
|
a.z0.fh=function(W,h){if(W.xX(h))return W;var S=h.x-W.x,k=h.y-W.y,p=Math.abs(S),I=Math.abs(k);if(p>I)I=p/2>I?0:p;
|
|
if(I>p)p=I/2>p?0:I;p=S>0?p:-p;I=k>0?I:-I;var q=Math.sqrt(S*S+k*k)/Math.sqrt(p*p+I*I);return new eC(W.x+p*q,W.y+I*q)};
|
|
a.z0.qP=function(W,h,S,k,p,I,q){if(q==null)q=document.createElement("canvas");var P=q.getContext("2d");
|
|
q.width=h;q.height=S;var t=new gj(0,0,h,S),M=N.U(h*S*4);N.LU(M,h,S,4);var U=Math.sin(k),i=Math.cos(k),z=N.U(h*S*4);
|
|
N.X.S3(W,z,t,[i*1/h,U*1/h,-U*1/S,i*1/S],h/2,S/2,!1,0,p,I);N.a.ha("norm",z,t,M,t,t,1);var D=P.getImageData(0,0,h,S);
|
|
N.WQ(M,D.data);P.putImageData(D,0,0);return q.toDataURL()};a.z0.aqz=function(W,h,S){var k=JSON.parse(JSON.stringify(W));
|
|
if(k.Clrs)for(var Q=0;Q<k.Clrs.v.length;Q++){var p=k.Clrs.v[Q].v,I=p.Type.v.Clry;if(I=="UsrS")continue;
|
|
var q=I=="FrgC"?h:S;p.Type.v.Clry="UsrS";p.Clr={t:"Objc",v:N.X.hg({p:q>>16&255,z:q>>8&255,S:q&255})}}return k};
|
|
a.Zx=function(){a.vv.call(this,[10,7],a.N$,"tools/hand");this.R2=new eC(0,0);this.dE=null;this.jv=0};
|
|
a.Zx.prototype=new a.vv;a.Zx.prototype.ca=function(W,h,S,k,p){var I=W.o;if(I=="setcls"){S.t.aL=W.aL;
|
|
S.Hx=!0;S.WU=!0}if(I=="scroll"&&!k.j(hW.OM)){if(k.j(hW.Q9))a.Zx.IE(S,S.t.r.x-W.tm.y,S.t.r.y-W.tm.x);
|
|
else a.Zx.IE(S,S.t.r.x-W.tm.x,S.t.r.y-W.tm.y)}};a.Zx.prototype.enable=function(W,h,S,k){this.dE=null;
|
|
var p=new em(y.E.W,!0);p.data={o:y.D.PS,W0:"grab"};h.c(p);if(W&&Date.now()-this.jv<300){p.type=y.E.u;
|
|
p.b=a.vD;p.data={o:"adapt",k:"fitscr"};h.c(p)}this.jv=Date.now()};a.Zx.prototype.Qb=function(W,h,S,k,p){this.dE=W.t.r.clone();
|
|
this.R2.Yh(p.x,p.y)};a.Zx.prototype.Go=function(W,h,S,k,p){if(!p.kK)return;if(this.dE==null)this.Qb(W,h,S,k,p);
|
|
a.Zx.IE(W,this.dE.x+(p.x-this.R2.x),this.dE.y+(p.y-this.R2.y))};a.Zx.prototype.he=function(W,h,S,k,p){this.dE=null};
|
|
a.Zx.IE=function(W,h,S){var k=W.t.J,p=W.t.Vz,I=p.e,q=p.Z,P=W.e*k,t=W.Z*k,M=P<I&&t<q,U=I/2+P/2-64,i=q/2+t/2-64;
|
|
W.t.r.Yh(Math.max(-U,Math.min(U,h)),Math.max(-i,Math.min(i,S)));W.WU=!0};a.ld=function(){a.vv.call(this,[10,47],a.a5V,"tools/rview");
|
|
this.R2=new eC(0,0);this.XF=null;this.aqS=null;this.jv=0};a.ld.prototype=new a.vv;a.ld.prototype.enable=function(W,h,S,k){this.dE=null;
|
|
var p=new em(y.E.W,!0);p.data={o:y.D.PS,W0:"grab"};h.c(p);if(W&&Date.now()-this.jv<300&&W.t.j3!=0){W.t.j3=0;
|
|
W.Hx=!0}this.jv=Date.now();if(W)this.iF(W,h)};a.ld.prototype.disable=function(W,h,S,k,p){if(W)this.iF(W,h)};
|
|
a.ld.prototype.yG=function(W,h,S,k){if(W)this.iF(W,h)};a.ld.prototype.Qb=function(W,h,S,k,p){this.R2.Yh(p.x,p.y);
|
|
var I=W.t;this.XF=I.wy(I.Vz.e/2,I.Vz.Z/2);this.aqS=I.Er()};a.ld.prototype.Go=function(W,h,S,k,p){if(!p.kK)return;
|
|
var I=W.t,q=this.XF,P=this.R2,t=new eC(I.Vz.e/2,I.Vz.Z/2),M=Math.atan2(p.y-t.y,p.x-t.x),U=Math.atan2(P.y-t.y,P.x-t.x);
|
|
this.SD(W,h,this.aqS.clone(),q,M-U)};a.ld.prototype.Fg=function(W,h,S,k){this.SD(S,h,null,null,W.Sl-S.t.j3);
|
|
S.t.j3=W.Sl};a.ld.prototype.SD=function(W,h,S,k,p){var I=W.t;if(S==null)S=I.Er();if(k==null)k=I.wy(I.Vz.e/2,I.Vz.Z/2);
|
|
S.translate(-k.x,-k.y);S.rotate(p);S.translate(k.x,k.y);I.f1(S);if(W.e*I.J<I.Vz.e&&W.Z*I.J<I.Vz.Z)I.r.Yh(0,0);
|
|
W.Hx=!0;this.iF(W,h)};a.ld.prototype.iF=function(W,h){var S=new em(y.E.W,!0);S.data={o:y.D.Sx,b:this.id,Sl:W.t.j3};
|
|
h.c(S)};a.oU=function(){a.g9.call(this,[10,25],a.B2,"tools/hbrush")};a.oU.prototype=new a.g9("");a.oU.prototype.he=function(W,h,S,k,p){if(this.wx==null)return;
|
|
this.m9(W,"heal",this.wx.et(),this.wx.wT(),this.wx.Oe());this.G(W,this.wx.Oe());a.ut.prototype.he.call(this,W,h,S,k,p);
|
|
if(!this.Vk.algnd)this.r=null};a.vz=function(W){a.vv.call(this,W?["VAR0 VAR1",[22,4,1],[10,8]]:[10,8],W?a.Bm:a.mj,W?"tools/vtype":"tools/htype");
|
|
this.Kh=[];this.om=null;this.MG=null;this.caller=null;this.AG=1;this.$H=null;this.adX=0;this.Ap=0;this.akb=null;
|
|
this.kc=null;this.QW=null;this.P7=null;this.nL=null;this.HN=null;this.aia=null;this.fq=null;this.yl=null;
|
|
this.eb=null;this.apC=null;this.fD=!1;this.Nj=!1;this.qm=!1;this.qB=null;this.dV=null;this.alf=null;
|
|
this.Y8=!1;this.n_=!1;this.Pk=-1;this.Tf=-1;this.fx=document.createElement("textarea");this.fx.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.fx.addEventListener("input",this.CF.bind(this),!1);this.fx.addEventListener("keydown",this.aey.bind(this),!1);
|
|
this.fx.addEventListener("keyup",this.abl.bind(this),!1);var h=function(S){S.stopPropagation()};this.fx.addEventListener("keydown",h,!1);
|
|
this.fx.addEventListener("keyup",h,!1)};a.vz.prototype=new a.vv;a.vz.prototype.Wi=function(W){return W.kK};
|
|
a.vz.prototype.Mr=function(W,h,S,k){if(this.QW!=null||this.id==a.Bm)return;this.caller=h;this.om=W;var p=this.u1(W);
|
|
if(p.length!=0){var I=null,q=[],P=[];for(var Q=0;Q<p.length;Q++){var t=W.g[p[Q]],M=t.add.TySh,U=0,i=gf.x5(M.MW).length-2,z=gf.Ql(M.MW,U,i);
|
|
gf.NR(z,a.Q.Nc(M.A));if(z.D4.Font!=null)z.D4.Font=z.Vt[z.D4.Font].Name;I=z.Vt;q.push(z.D4);P.push(z.MR)}var z={Vt:I,D4:gf.iq(q),MR:gf.iq(P)};
|
|
if(z.D4.Font!=null)gf.jq(z,z.D4.Font);this.Sw(h,z,M)}};a.vz.prototype.u1=function(W){var h=[];for(var Q=0;
|
|
Q<W.w.length;Q++)if(W.g[W.w[Q]]&&W.g[W.w[Q]].add.TySh)h.push(W.w[Q]);return h};a.vz.prototype.ca=function(W,h,S,k,p){var I=W.o=="insertGlyph";
|
|
if((I||W.o=="insertText")&&this.QW){var q=I?String.fromCharCode(65533):W.k,P=this.fx,t=P.value,M=P.selectionStart,U=P.selectionEnd;
|
|
P.value=t.slice(0,M)+q+t.slice(U);P.selectionStart=P.selectionEnd=M+q.length;this.CF(null,I?W.k:null);
|
|
P.focus()}if(W.o=="updateStyles"){if(this.QW==null){var i=this.u1(S),z=!1;if(i.length!=0){this.PA(S,h,p,i);
|
|
for(var Q=0;Q<i.length;Q++){var D=S.g[i[Q]],R=D.add.TySh;gf.ty(R,this.AG);this.QW=D;var O=gf.x5(R.MW);
|
|
this.Pk=0;this.Tf=O.length-1;gf.$n(R.MW,this.Pk,this.Tf,this.Zd(p,R));var b=this.HL(S,p);if(b==!1)z=!0}if(z){this.Y8=!0;
|
|
return}this.$i(S,h)}return}this.lv(p)}if(W.o.startsWith("warp")){var w=this.n_;if(W.o=="warp"||W.o=="warpCancel"){if(this.QW==null)return;
|
|
if(W.o=="warp")this.QW.add.TySh.ud=W.DU;else this.QW.add.TySh.ud=this.aia;var S=this.om;this.HL(S,p);
|
|
if(!w)this.Qt(S)}if(W.o!="warp")this.fx.focus();if((W.o=="warpConfirm"||W.o=="warpCancel")&&w){this.n_=!1;
|
|
if(W.o=="warpConfirm")this.$i(S,h);else this.xa(S,h)}}if(W.o=="editCurr"){if(p.Kz!=a.mj){this.$H=p.Kz;
|
|
var A=new em(y.E.W,!0);A.data={o:y.D.fX,b:a.mj};h.c(A)}if(this.QW!=null)this.disable(S,h,p,k);this.om=S;
|
|
this.MG=p;this.caller=h;this.PA(S,h,p,[W.sq]);var O=gf.x5(this.QW.add.TySh.MW);this.Pk=0;this.Tf=O.length-1;
|
|
this.Qt(S);this.nQ();this.fx.focus()}if(W.o=="switchPntPrgr"){if(this.QW)return;var D=S.g[S.w[0]],R=D.add.TySh,g=R.A.Nc(),E=JSON.parse(JSON.stringify(R.MW)),j=gf.SY(E),x=j==1?gf.yK(E):[0,0,Math.round(D.rect.e*1.05/g),Math.round(D.rect.Z*1.25/g)],d=gf.Ql(E,0,0),L=d.Vt[d.D4.Font].Name,_=p.Tm.I_(L),T=[0,x[2],x[2]/2][d.MR.Justification%3],c=_?a1.rM(_,L,d.D4):d.D4.FontSize*.8;
|
|
gf.fN(E,1-j);if(j==0){T=-T;c=-c;gf.hz(E,[0,0,x[2],x[3]])}var e=new ex(1,0,0,1,T,c);e.concat(R.A);this.ca({aQ:S.w[0],o:"newED",yw:E,A:e,atd:[16,3,j==1?0:1]},h,S,k,p)}if(W.o=="newED"){var D=S.g[W.aQ],R=D.add.TySh,r=this.zG(S,[W.aQ]);
|
|
R.MW=W.yw;if(W.A)R.A=W.A;var B=new a1(R.MW,p.Tm),F=jE.gY(B,R);D.rect=F.pY;D.buffer=F.vM;D.G();S.G();
|
|
var v=new h3(W.atd?W.atd:this.name,this);v.data={S9:r,hl:this.zG(S,[W.aQ])};S.nh(v)}if(W.o=="fromAction"){var X=W.eS.b4.Usng.v,V=X.TxtC.v,H=[];
|
|
for(var Q=0;Q<2;Q++){var o=V[Q==0?"Hrzn":"Vrtc"].v,q=o.val;if(o.type=="#Prc")q=(Q==0?S.e:S.Z)*(q/100);
|
|
H[Q]=q}this.ay(S,h,p,k,S.t._c(H[0],H[1]));var D=S.g[S.w[0]],R=D.add.TySh,J=R.MW,t=gf.x5(J);gf.Bu(J,0,t.length-1);
|
|
gf.XK(J,0,X.Txt.v.replace(/\r/g,"\n"));t=gf.x5(J);for(var j=0;j<2;j++){var C=X[j==0?"Txtt":"paragraphStyleRange"].v;
|
|
for(var Q=0;Q<C.length;Q++){var Y=C[Q].v,M=Y.From.v,U=Math.min(Y.T.v-1,t.length-1);Y=Y[j==0?"TxtS":"paragraphStyle"].v;
|
|
var K=gf.Ql(J,M,U),u=j==0?K.D4:K.MR;for(var f in Y){var l=Y[f].v;if(f=="Sz")u.FontSize=Math.round(l.val);
|
|
else if(f=="fontPostScriptName")gf.jq(K,l);else if(f=="Algn")u.Justification={Left:1,Cntr:2}[l.Alg];
|
|
else if(f=="leading")u.Leading=Y[f].v.val;else if(f=="baselineShift")u.BaselineShift=Y[f].v.val;else if(f=="autoLeading")u.AutoLeading=Y[f].v;
|
|
else if(f=="syntheticBold")u.FauxBold=Y[f].v;else if(f=="syntheticItalic")u.FauxItalic=Y[f].v;else if(f=="Trck")u.Tracking=Y[f].v;
|
|
else if(f=="verticalScale")u.VerticalScale=Y[f].v/100;else if(f=="horizontalScale")u.HorizontalScale=Y[f].v/100;
|
|
else if(f=="Clr")u.FillColor={Type:1,Values:[1,l.Rd.v/255,l.Grn.v/255,l.Bl.v/255]}}gf.$n(J,M,U,K)}}var B=new a1(R.MW,p.Tm),F=jE.gY(B,R);
|
|
D.rect=F.pY;D.buffer=F.vM;D.G();S.G();this.$i(S,h)}};a.vz.prototype.lv=function(W){var h=Math.min(this.Pk,this.Tf),S=Math.max(this.Pk,this.Tf),k=this.QW.add.TySh;
|
|
gf.ty(k,this.AG);gf.$n(k.MW,h,S-1,this.Zd(W,k));var p=this.om,I=this.HL(p,W);if(I)this.Qt(p);if(document.activeElement.tagName.toLowerCase()!="input")this.fx.focus()};
|
|
a.vz.prototype.BQ=function(W){return this.Kh.indexOf(W)!=-1};a.vz.prototype.enable=function(W,h,S,k){var p=this.fx;
|
|
h.m.appendChild(p);this.fq="default";this.Dt(h)};a.vz.prototype.HV=function(){return this.QW!=null};
|
|
a.vz.SN=function(W,h){for(var Q=W.g.length-1;Q>=0;Q--){var S=W.g[Q];if(S.add.TySh&&S.rect.mA(h)&&W.Gr(Q)){var k=S.Ox(2)||S.Ox(31);
|
|
return k?-2:Q}}return-1};a.vz.prototype.Qb=function(W,h,S,k,p){this.om=W;this.MG=S;this.caller=h;var I=W.t.wy(p.x,p.y),q=this.QW==null;
|
|
if(q){var P=a.vz.SN(W,I);if(P==-2){alert(dq.get([6,57,0]));return}if(P>=0&&!k.j(hW.YS)){if(!jE.Os(W.g[P].add.TySh,S.Tm,h)){alert("Fonts not loaded yet");
|
|
return}this.PA(W,h,S,[P])}else{this.qm=!0;this.qB=p;return}}var t=q?-1:gf.SY(this.QW.add.TySh.MW),M=this.eb?this.eb:this.yl;
|
|
if(M&&M.Qb(W,S,k,I,null,null,p)&&N.DU.xv(this.QW.add.TySh.ud)||!q&&N.H.jS(I,this.QW.rect)>20/W.t.J&&(t==0||t==1)){this.fD=!0;
|
|
this.dV=I;this.alf=this.QW.add.TySh.A.clone();if(this.Pk==-1&&this.Tf==-1)this.Pk=this.Tf=this.QT(I)}else{if(this.nL==null){alert("Fonts not loaded yet");
|
|
return}this.Nj=!0;this.Pk=this.Tf=this.QT(I);var U=Date.now();if(U-this.adX>300)this.Ap=0;this.Ap++;
|
|
this.adX=U;if(this.Ap==2)this.abT();if(this.Ap==3)this.a9b();if(this.Ap>1){this.Nj=!1}}this.nQ();this.Qt(W)};
|
|
a.vz.prototype.PA=function(W,h,S,k){var p=W.g[k[0]];this.QW=p;this.Wp(h,y.E.W,{o:y.D.Sx,b:this.id,Zr:"showactive"});
|
|
this.P7=k;W.w=k.slice(0);W.bO();W.rm=!0;this.HN=this.zG(W,k);this.eQ(p.add.TySh);this.HL(W,S)};a.vz.prototype.eQ=function(W){if(gf.SY(W.MW)!=1)return;
|
|
var h=gf.yK(W.MW);h=new gj(0,0,h[2]-h[0],h[3]-h[1]);var S=[h.x,h.y,h.x+h.e,h.y,h.x+h.e,h.y+h.Z,h.x,h.y+h.Z];
|
|
N.H.A(S,W.A,S);this.yl=new b4(S,!1,!1,!1,!0)};a.vz.prototype.abT=function(){var W=gf.x5(this.QW.add.TySh.MW);
|
|
this.Pk=this.ZC(W,this.Pk);this.Tf=this.YU(W,this.Pk)};a.vz.prototype.ZC=function(W,h){var S=" \t\n,.?!_-+=@#$%^&*'\"(){}[]\\/<>:;|",k=[];
|
|
for(var Q=0;Q<S.length;Q++)k.push(S.charAt(Q));var p=k.indexOf(W[h])==-1?!0:!1;for(var Q=h-1;Q>=0;Q--)if(k.indexOf(W.charAt(Q))!=-1==p)return Q+1;
|
|
return 0};a.vz.prototype.YU=function(W,h){var S=" \t\n,.?!_-+=@#$%^&*'\"(){}[]\\/<>:;|",k=[];for(var Q=0;
|
|
Q<S.length;Q++)k.push(S.charAt(Q));var p=k.indexOf(W[h])==-1?!0:!1;for(var Q=h+1;Q<W.length;Q++)if(k.indexOf(W.charAt(Q))!=-1==p)return Q;
|
|
return W.length-1};a.vz.prototype.a9b=function(){var W=this.nL.afY(this.Pk);this.Pk=W[0];this.Tf=W[1]};
|
|
a.vz.prototype.Dt=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.PS,W0:this.fq};W.c(h)};a.vz.prototype.Go=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y),q=this.QW;
|
|
if(!p.kK){var P="default",t=this.yl,M=this.eb?this.eb:t;if(M&&N.DU.xv(q.add.TySh.ud)){var U=M.fe(I,W.t.J,null,p);
|
|
if(U)P=U;else if(M==t&&t.bB(I))P="text"}else if(q&&N.H.jS(I,q.rect)>20/W.t.J)P="move";else if(a.vz.SN(W,I)>=0)P="text";
|
|
if(P!=this.fq){this.fq=P;this.Dt(h)}}var i=this.qB;if(this.qm&&Math.min(p.x-i.x,p.y-i.y)>4/W.t.J){this.qm=!1;
|
|
this.ay(W,h,S,k,p);q=this.QW;this.fD=!0;this.yl=new b4(null,!1,!1,!1,!0);var z=W.t.wy(this.qB.x,this.qB.y);
|
|
z.x=Math.round(z.x);z.y=Math.round(z.y);this.yl.Qb(W,S,k,z,null,null,p)}if(this.fD){var D=q.add.TySh;
|
|
if(this.eb){this.eb.Go(W,S,k,I);var R=N.V.MK(N.V.ew(this.eb.zk(),this.apC));D.A=R;this.HL(W,S);gf.gP(D)}else if(this.yl){this.yl.Go(W,S,k,I);
|
|
var O=D.A.clone(),b=Math.atan2(O.S,O.S4);O.rotate(b);var R=N.V.MK(N.V.ew(this.yl.zk())),w=Math.atan2(R.S,R.S4);
|
|
R.rotate(w);if(!isNaN(R.S4)&&R.S4*R.Bq-R.S*R.ZB!=0){var A=new gj(0,0,R.S4/O.S4,R.Bq/O.Bq),g=Math.round(A.e),E=Math.round(A.Z),j=D.MW.Curve;
|
|
if(j){var x=gf.yK(D.MW),d=new ex(g/x[2],0,0,E/x[3],0,0);N.H.A(j.Points,d,j.Points);gf.gP(D)}gf.hz(D.MW,[0,0,g,E]);
|
|
D.A=N.V.MK(N.V.ew(this.yl.zk(),A));this.HL(W,S);gf.gP(D)}}else{var L=I.x-this.dV.x,_=I.y-this.dV.y;D.A=this.alf.clone();
|
|
var T=new eC(D.A.y8+L,D.A.S8+_);T=a.c0.Fy(W,T,S);D.A.y8=T.x;D.A.S8=T.y;this.HL(W,S)}}if(this.Nj)this.Tf=this.QT(I);
|
|
if(this.fD||this.Nj)this.Qt(W)};a.vz.prototype.ay=function(W,h,S,k,p){var I=W.O4(),q=I[0],P=I[1],t=W.yA();
|
|
t.add.lnsr="rend";var M=W.g.slice(0);t.hq("Text layer "+M.length);this.QW=t;var U=W.w.length==0?W.g.length-1:W.w[W.w.length-1],i=U+1;
|
|
if(M[U].add.lsct==i1.wY)i--;this.HN={bv:M.slice(0),k8:W.w.slice(0)};M.splice(i,0,t);W.w=[i];this.Pk=this.Tf=0;
|
|
W.WV(M);this.HN.vR=M.slice(0);this.HN.mQ=W.w.slice(0);this.Wp(h,y.E.W,{o:y.D.Sx,b:this.id,Zr:"showactive"});
|
|
var z=W.t.wy(p.x,p.y),D=S.YF;console.log(D);if(this.id==a.Bm){D=JSON.parse(JSON.stringify(D));D.D4.BaselineDirection=1}t.add.TySh=gf.hN(z.x,z.y,D);
|
|
var R=t.add.TySh,O=R.MW;if(this.id==a.Bm)O._LineOrientation=2;gf.ty(R,this.AG);if(p.kK)gf.fN(O,1);else{gf.fN(O,0);
|
|
var b=q[P.pop()],w=b?b.add.vmsk:null;if(w&&!k.j(hW.YS)){w=w.clone();var A=w.T,E,x;for(var Q=0;Q<A.length;
|
|
Q++)if(A[Q].VZ!=null)A[Q].VZ=0;var g=5/W.t.J;E=N.$.IC(w.T,z,!0,g);if(E.Kr==-1)E=N.$.IC(w.T,z);if(E.Kr!=-1){gf.fN(O,1);
|
|
var d=N.$.rR(A,E.Kr),L=N.$.Sp(A,E.Kr)-1;A=w.T=A.slice(0,2).concat(A.slice(d,d+L+1));w.w=[];R.add={vmsk:w,vogk:$.lq(A)};
|
|
O.Curve={};gf.iv(R);if(E.f9!=null){var _=a1.g3(O.Curve);N.H.A(_[0],R.A,_[0]);var T=N.H.Ge(_[0],z.x,z.y),c=S.YF.MR.Justification;
|
|
if(c==2||c==5){var e=(_[2][T]+_[3]*.5)%_[3];T=a1.hV(e,_[2])}var r=_[1][T];r=r%L;w.Nk=[r,r];gf.iv(R)}else this.eQ(R)}}}return t};
|
|
a.vz.prototype.he=function(W,h,S,k,p,I){if(I){this.qm=!1;return}if(this.QW==null&&!this.qm)return;var q=W.t.wy(p.x,p.y),P=this.qm;
|
|
if(this.qm){this.qm=!1;this.ay(W,h,S,k,p);this.Nj=!0}if(this.fD||this.Nj){this.Qt(W);this.nQ();if(P)this.lv(S)}if(this.fD&&this.yl)this.yl.he(W,S,k,q);
|
|
this.fD=this.Nj=!1;this.fx.focus()};a.vz.prototype.nQ=function(){var W=this.QW.add.TySh,h=Math.min(this.Pk,this.Tf),S=Math.max(this.Pk,this.Tf),k,p;
|
|
if(h==S){var I=gf.x5(W.MW);if(h==0||I.charAt(h-1)=="\n")k=p=h;else k=p=h-1}else{k=h;p=S-1}var q=gf.Ql(W.MW,k,p);
|
|
gf.NR(q,a.Q.Nc(W.A));this.Sw(this.caller,q,W)};a.vz.prototype.Sw=function(W,h,S){this.Wp(W,y.E.W,{o:y.D.XO,nP:f6.Z3,YF:h});
|
|
var k=this.AG=gf.c4(S);this.Wp(this.caller,y.E.W,{o:y.D.Sx,b:this.id,Zr:"changeAA",kN:k})};a.vz.prototype.PX=function(){var W=this.QW;
|
|
if(W&&!this.fD&&this.eb!=null){this.eb.he(this.om,this.MG,null,null);this.eb=null;this.eQ(W.add.TySh);
|
|
this.Qt(this.om)}};a.vz.prototype.disable=function(W,h,S,k){var p=this.QW;this.$i(W,h)};a.vz.prototype.Fg=function(W,h,S,k,p){if(this.n_)return;
|
|
if(W.Zr=="commit")this.$i(S,h);if(W.Zr=="cancel")this.xa(S,h);if(W.Zr=="changeAA"){this.AG=W.kN;if(S!=null)this.ca({o:"updateStyles"},h,S,k,p)}if(W.Zr=="showwarp"){if(S==null)return;
|
|
if(this.QW==null){var I=S.g[S.w[0]],q=I.add.TySh;if(q==null)return;this.PA(S,h,p,[S.w[0]]);this.fx.focus();
|
|
this.n_=!0}this.aia=this.QW.add.TySh.ud;var P=new em(y.E.W,!0);P.data={o:y.D.mJ,DG:"textwarp"};h.c(P)}};
|
|
a.vz.prototype.IF=function(W,h){if(h!=f6.a5)return;if(this.Y8){this.Y8=!1;var S=this.om,k=this.P7;for(var Q=0;
|
|
Q<k.length;Q++){this.QW=S.g[k[Q]];this.HL(S,W)}this.$i(S,this.caller);return}if(this.QW)this.lv(W)};
|
|
a.vz.prototype.Zd=function(W,h){var S=JSON.parse(JSON.stringify(W.YF));gf.NR(S,1/a.Q.Nc(h.A));return S};
|
|
a.vz.prototype.UN=function(W,h){if(W.S9!=null)this.mD(h,W.hl);else this.wC(h,W.vR,W.mQ)};a.vz.prototype._i=function(W,h){if(W.S9!=null)this.mD(h,W.S9);
|
|
else this.wC(h,W.bv,W.k8)};a.vz.prototype.mD=function(W,h){for(var Q=0;Q<h.length;Q++){var S=h[Q],k=S.aQ,p=W.g[k];
|
|
p.buffer=S.zz;p.rect=S.pY.clone();p.G();var I=p.add.TySh;I.ud=S.DU;I.Ik=S.Ik.clone();I.A=S.A.clone();
|
|
I.MW=JSON.parse(JSON.stringify(S.MW));p.h1()}W.G()};a.vz.prototype.zG=function(W,h){var S=[];for(var Q=0;
|
|
Q<h.length;Q++){var k=h[Q],p=W.g[k],I=p.add.TySh;S.push({aQ:k,A:I.A.clone(),DU:JSON.parse(JSON.stringify(I.ud)),Ik:I.Ik.clone(),MW:JSON.parse(JSON.stringify(I.MW)),zz:p.buffer.slice(0),pY:p.rect.clone()})}return S};
|
|
a.vz.prototype.wC=function(W,h,S){W.w=S;W.WV(h);W.G();W.tn=!0};a.vz.prototype.HL=function(W,h,S){if(S==null)S=!1;
|
|
var k=this.QW.add.TySh;if(!jE.Os(k,h.Tm,this.caller))return!1;this.nL=new a1(k.MW,h.Tm);if(!S){var p=gf.x5(k.MW);
|
|
this.fx.value=p.slice(0,p.length-1)}var I=jE.gY(this.nL,k);if(N.DU.xv(k.ud))k.Ik=new gj;else{if(gf.SY(k.MW)==1){var q=gf.yK(k.MW),g8=I.Ik.y;
|
|
k.Ik=new gj(0,g8,q[2]-q[0],q[3]-q[1]-g8)}else{k.Ik=I.Ik}}var P=this.QW.rect;this.QW.rect=I.pY;this.QW.buffer=I.vM;
|
|
this.QW.G();W.fG();W.G(W.root.v5(I.pY.r8(P),W,W.g.indexOf(this.QW)));return!0};a.vz.prototype.CF=function(W,h){if(this.QW==null||this.n_)return;
|
|
var S=this.fx.selectionStart,k=this.QW.add.TySh,p=gf.x5(k.MW),I=this.fx.value+"\n",q=Math.min(this.Pk,this.Tf),P=Math.max(this.Pk,this.Tf),z=!1;
|
|
this.Pk=Math.min(S,q);if(I.length-S<p.length-this.Tf)this.Tf=p.length-I.length+S;if(p!=I){while(this.Pk>0&&p.charAt(this.Pk-1)!=I.charAt(this.Pk-1))this.Pk--}var t=p.substring(0,this.Pk),M=p.substring(this.Tf,p.length),U=I.substring(this.Pk,I.length-M.length);
|
|
gf.Bu(k.MW,this.Pk,this.Tf);gf.XK(k.MW,this.Pk,U);if(h!=null)gf.arQ(k.MW,this.Pk,h);var i=this.Zd(this.MG,k),D=-1,R=Array.from(U);
|
|
for(var Q=0;Q<R.length;Q++)D=Math.max(D,R[Q].codePointAt(0));if(D!=-1&&D>128&&D!=65533&&i.D4.Font!=null){var O=i.Vt[i.D4.Font].Name,b=this.MG.Tm.L9(D,O,i.Vt);
|
|
if(O!=b){gf.jq(i,b);z=!0}}if(this.kc!=null&&U==this.kc){var w=JSON.parse(this.akb);i.D4=w.D4;i.Vt=w.Vt;
|
|
z=!0}gf.$n(k.MW,this.Pk,this.Pk+U.length-1,i);this.Pk=this.Tf=t.length+U.length;var A=this.om,g=this.HL(A,this.MG,!0);
|
|
if(g)this.Qt(A,!0);if(z)this.nQ()};a.vz.prototype.abl=function(W){if(!W.ctrlKey)this.PX()};a.vz.prototype.aey=function(W){if(this.QW==null||this.n_)return;
|
|
if(this.QW==null)return;if(this.eb==null&&W.ctrlKey){var h=this.QW.add.TySh,S=gf.SY(h.MW),k;if(S==1){k=gf.yK(h.MW);
|
|
k=new gj(0,0,k[2]-k[0],k[3]-k[1])}else k=this.nL.Mu();var p=[k.x,k.y,k.x+k.e,k.y,k.x+k.e,k.y+k.Z,k.x,k.y+k.Z];
|
|
N.H.A(p,h.A,p);this.eb=new b4(p,!0,!0,!1,!1);this.apC=k;this.Qt(this.om)}var I=hW,q=0,P=0,E=!1;if(I.IO(W.code,I.AO))q=1;
|
|
if(I.IO(W.code,I.My))q=-1;if(I.IO(W.code,I.Xd))P=-1;if(I.IO(W.code,I._g))P=1;var t=W.ctrlKey||W.metaKey,M=I.IO(W.code,hW.aiX),U=I.IO(W.code,hW.afP);
|
|
if(I.IO(W.code,hW.l$)&&t){this.$i(this.om,this.caller);return}if(I.IO(W.code,hW.y$)){this.xa(this.om,this.caller);
|
|
return}if(I.IO(W.code,hW.A6)){W.preventDefault();var i=this.fx,z=i.value,D=i.selectionStart,R=i.selectionEnd;
|
|
i.value=z.substring(0,D)+"\t"+z.substring(R);i.selectionStart=i.selectionEnd=D+1;this.CF(null);return}if((I.IO(W.code,I.ZU)||I.IO(W.code,I.a4))&&t){var O=this.Pk,b=this.Tf;
|
|
if(O>b){var w=O;O=b;b=w}var h=this.QW.add.TySh,A=gf.x5(h.MW);if(O!=b){this.kc=A.slice(O,b);this.akb=JSON.stringify(this.MG.YF)}}var g=gf.x5(this.QW.add.TySh.MW);
|
|
if(q!=0||P!=0||M||U){W.preventDefault();var j=this.Pk;if(q!=0){if(t&&q==-1)j=this.ZC(g,this.Pk-1);else if(t&&q==1)j=this.YU(g,this.Pk);
|
|
else{var i=this.fx,z=i.value;j=this.Pk+q;if(j!=0&&z.codePointAt(j-1)>65535)j+=q}}else if(P!=0){var x=this.nL.Re(this.Pk);
|
|
if(P==-1&&x.n6==0)j=0;else if(P==1&&x.n6==this.nL.a9x()-1)j=99999999999;else j=this.nL.aju(new eC(x.pY.x+x.pY.e/2,0),x.n6+P)}else if(M){var d=this.Pk-1;
|
|
while(d>0&&g.charCodeAt(d)!=10)d--;j=d==0?0:d+1}else if(U){var d=this.Pk;while(d<g.length-1&&g.charCodeAt(d)!=10)d++;
|
|
j=d}j=Math.max(0,Math.min(g.length-1,j));if(W.shiftKey)this.Pk=j;else this.Pk=this.Tf=j;E=!0}if(I.IO(W.code,hW.D)&&t){this.Pk=0;
|
|
this.Tf=g.length-1;E=!0}if(E){this.nQ();this.Qt(this.om)}};a.vz.abd=function(W,h){var S=W.length;if(S!=h.length)return!1;
|
|
for(var Q=0;Q<S;Q++)if(W[Q].aQ!=h[Q].aQ)return!1;return!0};a.vz.prototype.$i=function(W,h){if(this.QW==null)return;
|
|
this.QW.h1();var S=this.HN;if(S instanceof Array){var k=this.zG(W,this.P7),p=W.c_();if(p!=null&&p.b==this&&p.data.S9&&a.vz.abd(p.data.S9,S))p.data.hl=k;
|
|
else{var I=new h3(this.name,this);I.data={S9:S,hl:k};W.nh(I)}}else{var I=new h3(this.name,this);I.data={bv:S.bv,vR:S.vR,k8:S.k8,mQ:S.mQ};
|
|
W.nh(I)}this.escape(W,h)};a.vz.prototype.xa=function(W,h){if(this.QW==null)return;if(this.HN instanceof Array){this.mD(W,this.HN);
|
|
if(this.QW)gf.gP(this.QW.add.TySh)}else{W.w=this.HN.k8;W.WV(this.HN.bv)}W.G();this.escape(W,h)};a.vz.prototype.escape=function(W,h){this.PX();
|
|
this.QW=null;this.P7=null;this.nL=null;this.yl=null;this.fx.blur();W.L.i1=null;W.L.Yr=null;W.L.xV=[];
|
|
W.Hx=!0;this.fD=!1;this.Nj=!1;this.Pk=this.Tf=-1;this.Wp(h,y.E.W,{o:y.D.Sx,b:this.id,Zr:"hideactive"});
|
|
if(this.$H){var S=new em(y.E.W,!0);S.data={o:y.D.fX,b:this.$H};h.c(S);this.$H=null}};a.vz.prototype.Wp=function(W,h,S,k){var p=new em(h,!0);
|
|
p.data=S;if(k)p.b=k;W.c(p)};a.vz.prototype.QT=function(W){var h=this.QW.add.TySh,S=this.nL,k=h.A.clone();
|
|
k.uA();var p=k.xK(W),I=gf.wT(h,S),q=N.DU.zL(h.ud,I),P=N.hx.ahE(q,p);if(P==null)P=new Float64Array(2);
|
|
p=new eC(I.x+P[0]*I.e,I.y+P[1]*I.Z);if(S.vw){var t=S.vw.clone();t.uA();p=t.xK(p)}var M=S.aju(p);return M};
|
|
a.vz.prototype.Qt=function(W,h){if(h==null)h=!1;var S=this.QW.add.TySh,k=gf.SY(S.MW),p=this.nL,I=p?gf.wT(S,p):null;
|
|
W.L.xV=[];W.L.i1=null;W.L.Yr=null;var q=this.eb?this.eb:this.yl;if(q){q.gU(W,this.MG,!N.DU.xv(S.ud));
|
|
var P=S.A.clone();P.uA();if(p&&p.vw&&p.ez==1){var t=p.vw.clone();t.uA();P.concat(t)}N.H.A(W.L.xV,P,W.L.xV);
|
|
N.H.A(W.L.i1.s,P,W.L.i1.s);if(p&&p.vw==null&&p.ad6()){var M=I.e-20,U=I.Z+8;W.L.i1.s.push(M,U,M+10,U,M+5,U-5,M+5,U+5);
|
|
W.L.i1.C.push("M","L","M","L")}}else if(k==0)this.acw(W,S,p);else W.L.i1={s:[],C:[]};var i=Math.min(this.Pk,this.Tf),z=Math.max(this.Pk,this.Tf);
|
|
if(!h){this.fx.selectionStart=i;this.fx.selectionEnd=z}if(p!=null){var D=function(q,E){var j=q.x,x=q.y+q.Z,d=new ex;
|
|
d.translate(-j,-x);d.rotate(-E);d.translate(j,x);q.y+=q.Z*.27;var g=N.H.Fb(q);N.H.A(g.s,d,g.s);return g};
|
|
if(i==z){i=Math.max(i,0);var R=p.Re(i);if(R){var O=R.pY,b=this.MG.YF.D4.FontSize;if(b!=null&&b!=0){b/=S.A.Nc();
|
|
O.y+=O.Z-b;O.Z=b}var w=p.a2x(i);if(w!=null&&w.nU==1)O.x+=O.e;var A=D(O,R.j3).s;W.L.i1.C.push("M","L");
|
|
W.L.i1.s.push(A[0],A[1]-1,A[6],A[7]-1)}}else{W.L.Yr={s:[],C:[]};for(var Q=i;Q<z;Q++){var R=p.Re(Q),g=D(R.pY,R.j3);
|
|
N.H.concat(W.L.Yr,g)}}}W.L.i1=jE.fz(W.L.i1,S,p);W.L.Yr=jE.fz(W.L.Yr,S,p);W.L.xV=jE.fz({s:W.L.xV},S,p).s;
|
|
W.Hx=!0};a.vz.prototype.acw=function(W,h,S){if(S==null)return;W.L.xV.push(0,0);if(W.L.i1==null)W.L.i1={C:[],s:[]};
|
|
for(var Q=0;Q<S.MR.length;Q++){var k=S.MR[Q];for(var p=0;p<k.Sg.length;p++){var I=k.Sg[p],q=k.ug.x+I.ug.x+I.pY.x,P=k.ug.y+I.ug.y+I.pY.y+I.pY.Z;
|
|
W.L.i1.C.push("M","L");W.L.i1.s.push(q,P,q+I.pY.e,P)}}W.Hx=!0};a.Bt=function(){a.vz.call(this,!0)};a.Bt.prototype=new a.vz;
|
|
a.CO=function(){a.I6.call(this,[10,9],a.dj,"tools/lasso");this.DQ="crosshair";this.rF=null;this.BR=null;
|
|
this.dV=null};a.CO.prototype=new a.I6;a.CO.prototype._O=function(W,h,S,k){this.rF=this.yR;this.BR={s:[this.rF.x,this.rF.y],C:["M"]}};
|
|
a.CO.prototype.ZL=function(W,h,S,k){this.dV=k;var p=this.BR;if(p==null)return;if(!k.kK){if(this.BR!=null&&this.u0>1&&S.j(hW.OM)){p.s.pop();
|
|
p.s.pop();p.s.push(this.iH.x,this.iH.y);W.L.i1=p;W.Hx=!0}return}p.C.push("L");p.s.push(this.iH.x,this.iH.y);
|
|
this.rF=this.iH;if(this.ee){W.L.i1=p;W.Hx=!0}};a.CO.prototype.HV=function(){return this.BR!=null};a.CO.prototype.y0=function(){return this.BR!=null};
|
|
a.CO.prototype.ok=function(W,h,S,k){a.I6.prototype.ok.call(this,W,h,S,k);if(this.BR&&this.u0>1&&this.dV&&!this.dV.kK&&!k.j(hW.OM))this.MI(W,S,k)};
|
|
a.CO.prototype.p9=function(W,h,S,k){this.dV=k;var p=this.BR;if(p==null)return;if(this.u0>1&&S.j(hW.OM)){p.C.push("L");
|
|
p.s.push(this.iH.x,this.iH.y);return}this.MI(W,h,S)};a.CO.prototype.MI=function(W,h,S){this.finish(W,h,S,this.dV);
|
|
this.BR=null;W.L.i1=null;W.Hx=!0};a.CO.prototype.getSelection=function(W,h,S,k){if(this.yR.xX(this.iH)||!this.ee)return null;
|
|
return a.I6.sQ(this.BR.s,null,this.Vk.anta)};a.c0=function(){a.vv.call(this,[10,11],a.M2,"tools/move");
|
|
this.w1=new eC(0,0);this.g0=new eC(0,0);this.r3=null;this.V_=null;this.K4=new eC(0,0);this.kH=null;this.Nm=null;
|
|
this.Vi=null;this.jv=0;this.Wu=null;this.WH=[];this.Py=null;this.lc=null;this.YX=!1;this.o=0;this.Z_=null;
|
|
this.mF=null;this.Ph=null;this.hM=!1;this.Vk={Kq:!1,pX:!1,zN:!1};this.a25=!1;this.aoy=!1;this.yl=null;
|
|
this.Mf=null;this.a6a=null;var W=[];for(var Q=0;Q<N.aX.DA.length;Q++)W.push({name:N.aX.DA[Q],P:function(h,S,k){return{ZX:S.dH.VI==k}}});
|
|
this.ix=new jv(W);this.ix.h("select",this.Ka,this)};a.c0.prototype=new a.vv;a.vv.prototype.Wi=function(W){return this.YX&&this.o!=2};
|
|
a.c0.prototype.iJ=function(){return this.YX&&this.o==0};a.c0.prototype.yG=function(W,h,S,k){this.Vb(W,-this.K4.x,-this.K4.y);
|
|
this.K4.Yh(0,0);this.BB(W,null,S);this.Xt(W)};a.c0.prototype.Dj=function(){var W=this.Vk;return[W.Kq?1:0,W.pX?1:0,W.zN?1:0]};
|
|
a.c0.prototype.AM=function(W,h,S){var k=this.Vk;if(W&&W[0]!=null)k.Kq=W[0]==1;if(W&&W[1]!=null)k.pX=W[1]==1;
|
|
if(W&&W[2]!=null)k.zN=W[2]==1;var p=new em(y.E.W,!0);p.data={o:y.D.Sx,b:this.id,n2:k,acy:h};S.c(p)};
|
|
a.c0.ZT=function(W,h,S,k,p,I,q){if(q==null)q=[!1,!0];var P=W.w$(null,p,!0),t,M;if(W.add.artd&&W.w.length==1&&W.g[W.w[0]].add.artb){var U=W.g[W.w[0]].rp();
|
|
t=W.qn(P,U,U)[0]}else{var i=new gj(0,0,W.e,W.Z),t=W.qn(P,q[0]?i:null,q[1]?null:i)[0],M=t.add.artd;if(M){for(var Q=0;
|
|
Q<t.g.length;Q++)delete t.g[Q].add.artb;delete t.add.artd}if(q[1]){var z=N.ow(t.jc(),new gj(0,0,t.e,t.Z),2);
|
|
a.JY.ZH(t,z)}}if(S!=1){var D=new gj(0,0,Math.round(t.e*S),Math.round(t.Z*S));a.JY.ZH(t,D);var R=[];for(var Q=0;
|
|
Q<t.g.length;Q++)R.push(Q);var O=a.Q.sG(t,R,!0);a.JY.JP(t,new ex(S,0,0,S,0,0));a.Q.bb(t,k,R,O,1,N.V.xm(new ex(S,0,0,S,0,0)),null,!0);
|
|
t.f4()}else if(M){t.G();t.f4()}var b=[];for(var Q=0;Q<h.length;Q++)if(t.e*t.Z!=0)b.push(hI.Es(t,h[Q].toUpperCase(),null,null,I?I[Q]:null,k));
|
|
return b};a.c0.prototype.jF=function(W,h,S,k,p){if(W==null||W.w.length==0)return;var I=a.c0.ZT(W,[h],S,k,null)[0],q=new em(y.E.W,!0);
|
|
q.data={o:y.D.tb,data:I,name:W.g[W.w[0]].getName()+(S==1?"":"@"+S+"x")+"."+h};p.c(q)};a.c0.prototype.Fg=function(W,h,S,k,p){if(W.s7=="getPNG"){this.jF(S,"png",W.kv,p,h)}else if(W.s7=="getSVG"){this.jF(S,"svg",W.kv,p,h)}if(W.s7=="prms"){this.Vk=W;
|
|
this.Xt(S)}};a.c0.agm=function(W){var g8=W.length,S=0;W.sort(function(I,q){return I[0]+I[1]/2-(q[0]+q[1]/2)});
|
|
var h=W[g8-1][0]+W[g8-1][1]-W[0][0];for(var Q=0;Q<g8;Q++)S+=W[Q][1];var k=Math.round((h-S)/(g8-1)),p=W[0][0];
|
|
for(var Q=0;Q<g8;Q++){W[Q][0]=p;p+=W[Q][1]+k}};a.c0.prototype.ca=function(W,h,S,k,p){var I=W.o;if(I=="trsl"){var q=Math.round(W.GV),P=Math.round(W.qp);
|
|
this.K4.Yh(q,P);this.CY(S,h,k,p,!1,W.i);this.Vb(S,q,P);this.BB(S,null,p)}else if(I=="lockguides"){if(S)S.O$=!S.O$}else if(I=="gids"||I=="gidsFromLayer"){var t=W.mF,M,U;
|
|
if(t==null)t=S.A_();if(I=="gids"){M=W.Ir;var i=t[0].length,z=M[0].length;U=i==z?[23,2]:i>z?[23,3]:[23,4];
|
|
if(z==0)U=[11,15,0]}else if(I=="gidsFromLayer"){var D=[],R=[],O=S.By();for(var Q=0;Q<S.w.length;Q++){var b=S.g[S.w[Q]].rect;
|
|
if(b.ZP())continue;D.push([0,b.x],[1,b.y],[0,b.x+b.e],[1,b.y+b.Z]);R.push(O,O,O,O)}U=[11,15,1];M=S.A_();
|
|
a.c0.hy(M,[D,R])}if(JSON.stringify(t)==JSON.stringify(M))return;var I=new h3(U,this);I.data={o:2,mF:t,Ir:M};
|
|
S.nh(I);this.UN(I.data,S)}else if(I=="algn"){var w=W.k;if(S==null)return;if(S.w.length<2&&!(S.q!=null&&w!=3&&w!=7)){alert(dq.get([15,7,5]));
|
|
return}var A=S.q;S.q=null;var b=A?A.rect:a.Q.wT(S);this.CY(S,h,k,p,!1);if(!this.YX)return;var g=this.Wu,E={},j=[],x=[],d=[];
|
|
for(var Q=0;Q<g.length;Q++){var L=g[Q];while(S.g[L].getName()=="</Layer group>")L++;var _=S.root.rk(L),T=_;
|
|
while(_.parent!=null){_=_.parent;if(g.indexOf(_.index)!=-1)T=_}var c=x.indexOf(T.index);if(c==-1){c=x.length;
|
|
x.push(T.index)}j[Q]=c}var e=[],r=[],B=[];for(var Q=0;Q<x.length;Q++){var F=a.Q.wT(S,S.w$(!0,x[Q]));
|
|
B.push(F);var v=w==3?[F.y,F.Z]:[F.x,F.e];e[Q]=v;r.push(v)}a.c0.agm(r);for(var Q=0;Q<x.length;Q++){var F=B[Q],X=F.x,V=F.y;
|
|
if(w==0)X=b.x;if(w==1)X=b.x+(b.e-F.e)/2;if(w==2)X=b.x+(b.e-F.e);if(w==3)V=e[Q][0];if(w==4)V=b.y;if(w==5)V=b.y+(b.Z-F.Z)/2;
|
|
if(w==6)V=b.y+(b.Z-F.Z);if(w==7)X=e[Q][0];d.push(Math.round(X-F.x),Math.round(V-F.y))}var H=[];for(var Q=0;
|
|
Q<g.length;Q++){var o=j[Q];H[2*Q]=d[2*o];H[2*Q+1]=d[2*o+1]}this.Vb(S,0,0,null,H);var J=w==3||w==7?[20,4,6]:[20,4,w<3?w:w-1];
|
|
this.BB(S,null,p,H,J);S.q=A}else if(I=="disabAuto"){this.AM([!1],null,h)}};a.c0.hy=function(W,h){for(var Q=0;
|
|
Q<h[0].length;Q++){var S=h[0][Q],k=h[1][Q],p=!1;for(var I=0;I<W[0].length;I++){var q=W[0][I],P=W[1][I];
|
|
if(S[0]==q[0]&&S[1]==q[1]&&k==P)p=!0}if(!p){W[0].push(S.slice(0));W[1].push(k)}}};a.c0.prototype.enable=function(W,h,S,k,p){this.Nm=S;
|
|
this.Vi=h;this.hM=p?!0:!1;this.Xt(W);this.Dt("default",h)};a.c0.prototype.disable=function(W,h,S,k){this.wE(W)};
|
|
a.c0.prototype.wE=function(W){if(W==null)return;if(this.yl){this.yl.clear(W);this.yl=null}if(W.L.zN){W.L.zN=null;
|
|
W.Hx=!0}if(W.L.pV){W.L.pV=null;W.Hx=!0}if(W.L.YZ[this.id]){delete W.L.YZ[this.id];W.Hx=!0}if(W.L.uj.length!=0){W.L.uj=[];
|
|
W.Hx=!0}};a.c0.prototype.Mr=function(W,h,S,k){if(S.Kz!=this.id)return;this.Xt(W)};a.c0.prototype.Xt=function(W,h){if(W==null)return;
|
|
var S=this.Vk;this.wE(W);if(!this.hM){var k;if(S.pX||S.zN)k=N.H.No(a.Q.wT(W));if(S.pX&&!k.ZP()){this.yl=new b4([k.x,k.y,k.x+k.e,k.y,k.x+k.e,k.y+k.Z,k.x,k.y+k.Z],!0);
|
|
this.yl.gU(W,this.Nm)}if(S.zN){var p=null,U=null,i=!1;if(W.By()!=-1)p=W.g[W.By()].rp();else p=new gj(0,0,W.e,W.Z);
|
|
W.L.zN={LB:[k],TT:[]};var I=W.L.zN.TT,q=k.x+k.e,P=k.y+k.Z,t=k.x+Math.floor(k.e/2),M=k.y+Math.floor(k.Z/2);
|
|
if(h){var z=W.root.IC(new eC(Math.floor(h.x),Math.floor(h.y)));if(z){U=N.H.No(z.i.LO(W));if(U.NW(k)){i=(U.LH(k)||k.LH(U))&&!k.xX(U);
|
|
if(!i)U=null}}}this.jZ(k,I);if(U!=null){W.L.zN.LB.push(U);var D=U.x+U.e,R=U.y+U.Z,O=U.x+Math.floor(U.e/2),b=U.y+Math.floor(U.Z/2);
|
|
if(i){var w=t,A=M;if(k.LH(U)){w=O;A=b}I.push(k.x,A,U.x,A);I.push(q,A,D,A);I.push(w,k.y,w,U.y);I.push(w,P,w,R)}else{this.jZ(U,I);
|
|
var g=P<U.y||R<k.y,E=q<U.x||D<k.x;if(q<U.x)I.push(q,M,U.x,M);if(D<k.x)I.push(D,M,k.x,M);if(P<U.y)I.push(t,P,t,U.y);
|
|
if(R<k.y)I.push(t,R,t,k.y);if(g&&!E){if(k.x<U.x)I.push(k.x,b,U.x,b);if(U.x<k.x)I.push(U.x,M,k.x,M)}}}else{if(k.y>p.y)I.push(t,p.y,t,k.y);
|
|
if(P<p.y+p.Z)I.push(t,P,t,p.y+p.Z);if(k.x>p.x)I.push(p.x,M,k.x,M);if(q<p.x+p.e)I.push(q,M,p.x+p.e,M)}W.Hx=!0}}if(this.o==2&&this.YX){var j=new gj(0,0,W.e,W.Z),x=W.By();
|
|
if(x!=-1){var d=W.A_(),L=d[1][this.Wu];if(L==-1)L=x;j=W.g[L].rp()}var _=W.r4[this.Wu],T=_[0],c=(T==0?"X":"Y")+": "+N.aX.JL(_[1]-(T==0?j.x:j.y),W.H$,this.Nm,T==0?j.e:j.Z,!0);
|
|
a.vv.UR(Math.round(this.r3.x)+10,Math.round(this.r3.y)-10,[c],W);W.Hx=!0}if(this.o==3&&this.YX){var e=N.H.Fb(this.Z_);
|
|
W.L.YZ[this.id]={i1:e};W.Hx=!0}};a.c0.prototype.jZ=function(W,h){var S=W.e,k=W.Z,p=W.x+Math.floor(S*.2),I=W.y+Math.floor(k*.2);
|
|
h.push(p,W.y,p,W.y+k);h.push(W.x,I,W.x+S,I)};a.c0.prototype.Dt=function(W,h){var S={o:y.D.PS,W0:W},k=new em(y.E.W,!0);
|
|
k.data=S;h.c(k)};a.c0.prototype.rN=function(W){var h=this.Mf.ZN()[0],S=this.kH,k=this.a6a[h];this.Tj(S,k)};
|
|
a.c0.prototype.Ka=function(W){var h=JSON.parse(JSON.stringify(this.Nm.dH));h.VI=this.ix.ZN()[0];var S=new em(y.E.W,!0);
|
|
S.data={o:y.D.XO,nP:f6.ic,kN:h};this.Vi.c(S)};a.c0.prototype.ON=function(W,h,S,k,p){if(this.YX)this.he(W,h,S,k,p);
|
|
this.kH=W;this.Nm=S;this.Vi=h;var I=W.t.wy(p.x,p.y),q;if(a.c0._4(S,p,W.t)){q=this.ix}else{if(this.Mf)this.Mf.removeEventListener("select",this.rN);
|
|
var P=[];W.root.IC(I,P);if(P.length==0)return;var t=[];this.a6a=P;for(var Q=0;Q<P.length;Q++)t.push({name:W.g[P[Q]].getName()});
|
|
q=this.Mf=new jv(t);q.h("select",this.rN,this)}q.parent=h;q._();q.update(W,S);var M=new em(y.E.W,!0);
|
|
M.data={o:y.D.zS,gh:q,x:p.eU+2,y:p.EK+1};h.c(M)};a.c0.prototype.FX=function(W,h,S,k,p){var I=a.c0.Gh(W,p);
|
|
return I!=-1||a.c0._4(S,p,W.t)};a.c0.Gh=function(W,h){if(W==null||W.add.artd==null)return-1;var S=W.t.wy(h.x,h.y),k=12*a.F()/W.t.J;
|
|
for(var Q=0;Q<W.g.length;Q++){var p=W.g[Q];if(!p.jP()||p.add.artb==null)continue;var I=p.rp(),q=new gj(I.x,I.y-1.7*k,k*p.getName().length*.5,k);
|
|
if(q.mA(S))return Q}return-1};a.c0.prototype.Qb=function(W,h,S,k,p){var I=a.c0.Gh(W,p);if(I!=-1){W.w=[I];
|
|
if(S.Kz==a.M2){var q=new em(y.E.W);q.data={o:y.D.fX,b:a.dh};h.c(q)}return}this.r3=p;this.w1.Yh(p.x,p.y);
|
|
this.g0=W.t.wy(p.x,p.y);this.V_=new hY(this.g0);this.CY(W,h,k,S,!0)};a.c0._4=function(W,h,S,k){var p=N.aX.ik,I=S.Vz.Z;
|
|
return W.rx&&(0<h.x&&h.x<p||0<h.y&&h.y<p||k&&0<h.x&&h.x<4*p&&I-p<h.y&&h.y<I)};a.c0.prototype.CY=function(W,h,S,k,p,I){var q,P=this.g0,t=!1;
|
|
if(p){var M=k.H0&&k.dH.r4;if(a.c0._4(k,this.w1,W.t)){q=W.A_();var U=W.A_(),i=null;if(this.w1.x<N.aX.ik){i=[0,P.x]}if(this.w1.y<N.aX.ik){i=[1,P.y]}U[0].push(i);
|
|
U[1].push(W.By());W.O6(U);if(!M){var z=new em(y.E.W);if(!k.dH.r4){z.data={o:y.D.XO,nP:f6.Qc};h.c(z)}if(!k.H0){z.data={o:y.D.XO,nP:f6.z_};
|
|
h.c(z)}M=!0}}var D=this.Ip(W,P);if(M&&D!=null&&!W.O$){this.o=2;this.mF=q?q:W.A_();this.Wu=D;this.YX=!0;
|
|
this.lc=a.Q.wT(W);return}if(W.ye.length!=0){this.o=4;this.lc=W.BS[W.ye[0]].rect.clone();this.YX=!0;return}if(this.yl&&this.yl.fe(P,W.t.J,!0,this.r3)!=null){var z=new em(y.E.W);
|
|
z.data={o:y.D.fX,b:a.Fh,a4e:!0};h.c(z);return}if(W.q&&W.q.rect.mA(P)){var R=Math.round(P.x),O=Math.round(P.y),b=W.q.rect;
|
|
t=W.q.channel[(O-b.y)*b.e+R-b.x]>128}if(!t&&(!this.hM&&this.Vk.Kq||this.hM&&this.Vk.Kq&&(S.j(hW.YS)||W.w.length<2))){var w=this.aqx(W,P,S);
|
|
if(!w){W.w=[];W.sP=null;W.tn=W.pg=!0;this.o=3;this.Z_=new gj;this.YX=!0;return}}if(S.j(hW.OM)&&!t){var A=new em(y.E.u);
|
|
A.b=a.m5;A.data={o:$.T2,a1P:!0};h.c(A)}}if(W.ye.length!=0){this.o=4;this.lc=W.BS[W.ye[0]].rect.clone();
|
|
this.YX=!0;return}this.Wu=W.w$(I==null,I,null,!0);for(var Q=0;Q<this.Wu.length;Q++){var g=W.g[this.Wu[Q]];
|
|
if(g.Ox(2)||g.Ox(31)){alert(dq.get([6,57,0]));return}}if(W.add.artd&&p){var E=this.Wu,j=!1;for(var Q=0;
|
|
Q<E.length;Q++)if(W.g[E[Q]].add.artb)j=!0;if(!j){this.Py=[W,W.g.slice(0),W.w.slice(0),-1];this.Wu.sort(function(r,B){return r-B})}}this.WH=a.c0.a26(W,this.Wu);
|
|
this.o=0;if(W.q&&(!p||t)&&W.w.length==1&&W.xi(!1)){if(!W.Og()){this.YX=!1;return}var x=W.g[W.w[0]],d=S.j(hW.OM);
|
|
this.o=1;var L=W.history[W.nT];if(L.b==this&&L.data.o==1&&L.data.i==W.w[0]&&x.Yi==x.eB.Yi&&!d){this.Ph=L}else{var _=x.eB,T=!1,c;
|
|
if(!x.xw(W,W.q)||d){T=!0;x.dy(W,W.q,d)}if(x.eB.Yi<=0){c=N.U(x.eB.Fm.length>>2);N.sN(x.eB.Fm,c,3)}else c=W.q.channel.slice(0);
|
|
var e={rect:x.eB.lk.clone(),channel:c};this.Ph=new h3(d?[12,53]:[12,54],this);this.Ph.data={o:1,i:W.w[0],eB:x.eB,Qz:_,Qa:T,k8:W.q,mQ:e,Bq:new eC(0,0)};
|
|
W.nh(this.Ph);W.q=e;W.zW=!0}}this.YX=!0;this.lc=a.Q.wT(W)};a.c0.prototype.aqx=function(W,h,S){var k=W.root.IC(new eC(Math.floor(h.x),Math.floor(h.y)));
|
|
if(k){if(k.i.add.vmsk)W.Hx=!0;var p=W.g.indexOf(k.i);if(S.j(hW.YS)){var I=W.w.indexOf(p);if(I==-1)W.w.push(p);
|
|
else if(W.w.length>1)W.w.splice(I,1)}else if(W.w.indexOf(p)==-1){this.Tj(W,p)}}return k!=null};a.c0.prototype.Tj=function(W,h){W.g[h].Yi=0;
|
|
W.w=[h];W.sP=null;W.bO();W.rm=!0;W.tn=!0};a.c0.prototype.Go=function(W,h,S,k,p){this.r3=p;var I=W.t.wy(p.x,p.y),D,R;
|
|
if(this.V_&&this.o<2)I=this.V_.jr(I,k);if(!this.YX){if(S.H0&&S.dH.r4&&W&&!W.O$){var q=this.Ip(W,I),P="default",t=a.c0.Gh(W,p);
|
|
if(q!=null)P=["col-resize","row-resize"][W.r4[q][0]];else if(this.yl){var M=this.yl.fe(I,W.t.J,null,p);
|
|
if(M)P=M}else if(t!=-1){P="pointer"}this.Dt(P,h)}this.Xt(W,I);return}var U=this.g0,i=Math.round(I.x-U.x)-this.K4.x,z=Math.round(I.y-U.y)-this.K4.y;
|
|
if(this.lc){if(this.o==2){I=a.c0.Fy(W,I,S,[!1,W.q?W.q.rect:this.lc,!0])}else{R=this.lc.clone();R.offset(this.K4.x+i,this.K4.y+z);
|
|
D=a.c0.Pp(W,R,S);i+=Math.round(D[0]);z+=Math.round(D[1])}}this.K4.x+=i;this.K4.y+=z;var O=this.Py;if(O&&W==O[0]){W.WV(O[1]);
|
|
W.w=O[2].slice(0);O[3]=-1}this.Vb(W,i,z,I,null,k.j(hW.YS));if(O&&W==O[0]){var b=this.lc.clone();b.offset(this.K4.x,this.K4.y);
|
|
var w=new eC(b.x+b.e/2,b.y+b.Z/2),t=W.By(),A=-1;for(var Q=0;Q<W.g.length;Q++){var g=W.g[Q];if(!g.jP()||g.add.artb==null)continue;
|
|
var E=g.rp();if(E.mA(w))A=Q}if(A!=-1&&A!=t){var j=a.X2.dt(W,this.Wu,A,!0,null,!1);W.WV(j[0]);W.w=j[1];
|
|
O[3]=A}}this.Xt(W,I);if(D)a.c0.Lb(W,R,D)};a.c0.prototype.Ip=function(W,h){var S=a.XQ(W,this.r3);h=[h.x,h.y];
|
|
var k=W.A_(),p=W.By();for(var Q=0;Q<k[0].length;Q++){var I=k[0][Q],q=k[1][Q];if(q!=-1&&q!=p)continue;
|
|
if(Math.abs(I[1]-h[I[0]])<S)return Q}return null};a.c0.prototype.Vb=function(W,h,S,k,p,I){if(this.o==0){if(p)a.c0.F_(W,this.Wu,this.WH,p);
|
|
else a.c0.eg(W,this.Wu,this.WH,h,S)}else if(this.o==1){var q=this.Ph.data;q.Bq.offset(h,S);a.c0.HI(W,q.i,h,S)}else if(this.o==2){var P=1e-5;
|
|
if(I)P=W.t.J<=1?10:1;else if(W.t.J<=1)P=1;var t=P*Math.round(k.x/P),M=P*Math.round(k.y/P),U=[t,M],i=W.r4[this.Wu];
|
|
i[1]=U[i[0]]}else if(this.o==3){var z=this.g0,D=N.H.VL([z.x,z.y,k.x,k.y]);this.Z_=D;var R=[];W.root.D1(D,R);
|
|
if(JSON.stringify(W.w)!=JSON.stringify(R)){W.w=R;W.tn=W.pg=!0}}else if(this.o==4){for(var Q=0;Q<W.ye.length;
|
|
Q++)W.BS[W.ye[Q]].rect.offset(h,S);W.Hx=!0}};a.c0.HI=function(W,h,S,k){var p=W.g[h];W.q.rect.offset(S,k);
|
|
p.RD(W,S,k,W.q);W.zW=!0;W.G()};a.c0.prototype.he=function(W,h,S,k,p,I){this.BB(W,p,S);this.Xt(W);if(Date.now()-this.jv<300&&!I){var q=a.vz.SN(W,W.t.wy(p.x,p.y));
|
|
if(a.c0._4(S,p,W.t,!0)){var P=new em(y.E.W);if(p.y>W.t.Vz.Z-20){P.data={o:y.D.mJ,DG:"doczoom",U0:W.t.J*100,OI:{Y:y.E.u,b:a.vD,R:{o:"pzoom"}}}}else{P.data={o:y.D.mJ,DG:"preferences"}}h.c(P)}else if(q>=0){var t=new em(y.E.u,!0);
|
|
t.b=a.mj;t.data={o:"editCurr",sq:q};h.c(t)}}this.jv=Date.now();a.JY.g$(W)};a.c0.prototype.BB=function(W,h,S,k,p){if(!this.YX)return;
|
|
this.YX=!1;if(this.o==0){if(k){this.Ig(W,null,k,p)}else{if(this.K4.x==0&&this.K4.y==0)return;this.Ig(W,this.K4.clone())}W.WU=!0}else if(this.o==2){var I=0;
|
|
h=[h.x,h.y];var q=this.Wu,P=W.r4[q],iD=this.mF[0].length,t=W.r4.length;if(S.rx&&h[P[0]]<N.aX.ik){var M=W.A_();
|
|
M[0].splice(q,1);M[1].splice(q,1);W.O6(M);I=1;if(iD==t-1)return}if(iD<t)I=2;var U=new h3([[23,2],[23,3],[23,4]][I],this);
|
|
U.data={o:2,mF:this.mF,Ir:W.A_()};W.nh(U)}else if(this.o==4){var U=new h3([12,54],this);U.data={o:4,w:W.ye.slice(0),r:this.K4.clone()};
|
|
W.nh(U)}this.K4.Yh(0,0)};a.c0.prototype.ok=function(W,h,S,k){var p=k.zR();if(W!=null&&(p.x!=0||p.y!=0)){if(k.j(hW.OM)&&W.q==null){var I=new em(y.E.u);
|
|
I.b=a.m5;I.data={o:$.T2,a1P:!0};h.c(I)}this.K4.Yh(p.x,p.y);this.CY(W,h,k,S,!1);if(!this.YX)return;this.Vb(W,p.x,p.y);
|
|
this.BB(W,null,S);this.Xt(W)}var q=k.j(hW.Q9);if(!this.hM&&this.aoy!=q){if(q){this.a25=this.Vk.Kq;this.Vk.Kq=!0}else{this.Vk.Kq=this.a25}this.aoy=q;
|
|
var P=new em(y.E.W,!0);P.data={o:y.D.Sx,b:this.id,n2:this.Vk};h.c(P)}};a.c0.prototype._i=function(W,h){if(W.o==0){var S=W.jf;
|
|
if(S){h.WV(S.bv);h.w=S.Jk.slice(0);h.G();h.tn=!0}a.c0.F_(h,W.w,W.cm,W.KS,!0);a.JY.g$(h)}else if(W.o==2){h.O6(W.mF);
|
|
h.Hx=!0}else if(W.o==4){for(var Q=0;Q<W.w.length;Q++)h.BS[W.w[Q]].rect.offset(-W.r.x,-W.r.y);h.Hx=!0}else{var k=h.g[W.i];
|
|
if(W.Qa){k.vf(h,W.Qz);h.q=W.k8;h.zW=!0;h.G();k.G()}else{a.c0.HI(h,W.i,-W.Bq.x,-W.Bq.y)}}};a.c0.prototype.UN=function(W,h){if(W.o==0){a.c0.F_(h,W.w,W.cm,W.KS);
|
|
var S=W.jf;if(S){h.WV(S.vR);h.w=S.wV.slice(0);h.G();h.tn=!0}a.JY.g$(h)}else if(W.o==2){h.O6(W.Ir);h.Hx=!0}else if(W.o==4){for(var Q=0;
|
|
Q<W.w.length;Q++)h.BS[W.w[Q]].rect.offset(W.r.x,W.r.y);h.Hx=!0}else{var k=h.g[W.i];if(W.Qa){k.eB=W.eB;
|
|
h.q=W.mQ;a.c0.HI(h,W.i,0,0);k.G()}else{a.c0.HI(h,W.i,W.Bq.x,W.Bq.y)}}};a.c0.prototype.Ig=function(W,h,S,k){if(S){var p=!0;
|
|
for(var Q=0;Q<S.length;Q++)if(S[Q]!=0)p=!1;if(p)return}var I=W.history[W.nT],q=this.Py,P=q!=null&&q[3]!=-1&&q[0]==W;
|
|
if(!P&&S==null&&I.data&&I.b==this&&I.data.o==0&&JSON.stringify(I.data.w)==JSON.stringify(this.Wu)&&JSON.stringify(I.data.cm)==JSON.stringify(this.WH)){var t=I.data.KS,M=I.data.a8Y.b4.T.v;
|
|
M.Hrzn.v.val+=h.x;M.Vrtc.v.val+=h.y;for(var Q=0;Q<t.length;Q+=2){t[Q]+=h.x;t[Q+1]+=h.y}}else{if(h==null)h=new eC(S[0],S[1]);
|
|
var U={HP:"move",b4:{classID:"null",null:fP.gj("Lyr",!0),T:{t:"Objc",v:{classID:"Ofst",Hrzn:{t:"UntF",v:{type:"#Rlt",val:h.x}},Vrtc:{t:"UntF",v:{type:"#Rlt",val:h.y}}}}}},i=null;
|
|
if(P)i={bv:q[1],Jk:q[2],vR:W.g.slice(0),wV:W.w.slice(0)};this.Py=null;var z=new h3(k?k:[12,54],this);
|
|
if(S)z.data={o:0,w:this.Wu,cm:this.WH,jf:i,KS:S};else z.data={o:0,w:this.Wu,cm:this.WH,jf:i,KS:a.c0.YJ(this.Wu,h.x,h.y)};
|
|
z.data.a8Y=U;W.nh(z);this.track(U)}};a.c0.YJ=function(W,h,S){var k=[];for(var Q=0;Q<W.length;Q++)k.push(h,S);
|
|
return k};a.c0.eg=function(W,h,S,k,p){a.c0.F_(W,h,S,a.c0.YJ(h,k,p))};a.c0.F_=function(W,h,S,k,p){if(h.length==0)return;
|
|
if(S==null){S=[];for(var Q=0;Q<h.length;Q++){S.push(W.g[h[Q]].B8(W,!0))}}var I=new gj,q=new gj(0,0,W.e,W.Z);
|
|
for(var Q=0;Q<h.length;Q++){var P=k[2*Q],t=k[2*Q+1];if(p){P=-P;t=-t}var M=W.g[h[Q]],U=S[Q];if(M.add.fxrp&&(U.indexOf(0)!=-1||M.rG()))M.add.fxrp.offset(P,t);
|
|
for(var i=0;i<U.length;i++){var z=U[i];if(z==0){M.rect.offset(P,t);if(M.rB()&&M.$U(W))M.$U(W).rect.offset(P,t);
|
|
if(M.add.artb){var D=M.rp();D.offset(P,t);M.Si(D);var R=M.add.artb.guideIndeces;R=R?R.v:[];for(var O=0;
|
|
O<R.length;O++){var b=W.r4[R[O].v];b[1]+=b[0]==0?P:t}}if(M.add.TySh){M.add.TySh.A.translate(P,t);if(M.add.TySh.add){M.add.TySh.add.vmsk.offset(P,t)}}if(M.add.SoLd){var w=new ex(1,0,0,1,P,t),A=M.add.SoLd,g=a.Q.Pw(A.Trnf),E=a.Q.Pw(A.nonAffineTransform);
|
|
N.H.A(g,w,g);N.H.A(E,w,E);A.Trnf=a.Q.m3(g);A.nonAffineTransform=a.Q.m3(E);a.Q.VH(A,w)}}if(z==1)M.kX().rect.offset(P,t);
|
|
if(z==2){M.add.vmsk.offset(P,t);if(M.add.vogk)N.uy.A(M.add.vogk,[1,0,P,0,1,t,0,0],[])}if(z==3){M.$U(W).v.rect.offset(P,t);
|
|
if(U.length==1)M.G()}}if(U.length>0){var j=M.add.GdFl;if(j==null)j=M.add.PtFl;if(M.rG()&&!M.vK()&&M.add.vmsk!=null&&N.$.MB(M.add.vmsk.T)&&M.add.vmsk.T4==255&&(j==null||j.Algn&&j.Algn.v)){M.rect.offset(P,t)}else M.r9(W);
|
|
var x=W.root.v5(M.LO(W),W,h[Q]);if(M.add.artb)x=x.r8(M.rp());I=I.r8(x);x.offset(-P,-t);I=I.r8(x);if(M.bg()&&M.v&&M.v.color==255)I=I.r8(q);
|
|
M.Kl()}}W.G(N.H.No(I))};a.c0.a26=function(W,h){var S=[];for(var Q=0;Q<h.length;Q++){var k=W.g[h[Q]];
|
|
S.push(k.B8(W))}return S};a.c0.Lb=function(W,h,S){var k=W.L.pV={s:[],C:[]},p=h.x+S[0],I=h.y+S[1];if(S[2]!=1e9){k.C.push("M","L");
|
|
k.s.push(S[2],I,S[2],I+h.Z)}if(S[3]!=1e9){k.C.push("M","L");k.s.push(p,S[3],p+h.e,S[3])}W.Hx=!0};a.c0.Fy=function(W,h,S,k){var p=a.c0.J7(W,[[h.x],[h.y]],S,k);
|
|
return new eC(h.x+p[0],h.y+p[1])};a.c0.Pp=function(W,h,S,k,p){var I=p==!0?1:.5,q=a.c0.J7(W,[[h.x,h.x+Math.round(h.e*I),h.x+h.e],[h.y,h.y+Math.round(h.Z*I),h.y+h.Z]],S,k);
|
|
return q};a.c0.J7=function(W,h,S,k){if(k==null)k=[!0,null,!0];var p=[0,0,1e9,1e9];if(!S.j9)return p;
|
|
var I=JSON.parse(JSON.stringify(h));for(var q=0;q<2;q++){var P=1e9,t=h[q],M=0;for(var U=0;U<t.length;
|
|
U++){var i=a.c0.a5Q(W,t[U],I[1-q][U],q,S,k);if(i!=1e9)I[q][U]=i;if(i!=1e9&&Math.abs(i-t[U])<Math.abs(P)){P=i-t[U];
|
|
M=i}}if(P!=1e9){p[q]=P;p[q+2]=M}}return p};a.c0.a5Q=function(W,h,S,k,p,I){var q=1e9,P=p.Xj,t=p.dH,M=[W.root];
|
|
while(M.length!=0&&P[2]){var U=M.pop(),i=U.i,z=i.rect;if(!i.jP())continue;if(U.children)for(var Q=0;
|
|
Q<U.children.length;Q++)M.push(U.children[Q]);if(W.w.indexOf(U.index)!=-1||z.ZP())continue;if(k==0){var D=z.e,R=D>>>1;
|
|
if(Math.abs(z.x-h)<Math.abs(q-h))q=z.x;if(Math.abs(z.x+R-h)<Math.abs(q-h))q=z.x+R;if(Math.abs(z.x+D-h)<Math.abs(q-h))q=z.x+D}else{var O=z.Z,b=O>>>1;
|
|
if(Math.abs(z.y-h)<Math.abs(q-h))q=z.y;if(Math.abs(z.y+b-h)<Math.abs(q-h))q=z.y+b;if(Math.abs(z.y+O-h)<Math.abs(q-h))q=z.y+O}}if(I[0]&&P[0]&&t.r4&&p.H0){var w=W.A_(),A=w[0],g=w[1],E=W.By();
|
|
for(var Q=0;Q<A.length;Q++)if((g[Q]==-1||g[Q]==E)&&A[Q][0]==k&&Math.abs(A[Q][1]-h)<Math.abs(q-h))q=A[Q][1]}if(P[1]&&t.uv&&p.H0){var j=Math.round(N.aX.Hu(t.FE,W.H$,W.e,t.zm));
|
|
if(k==1&&t.KE==1){var x=S*.5*Math.sqrt(4/3),d;j*=Math.sqrt(4/3);d=Math.round((h-x)/j)*j+x;if(Math.abs(d-h)<Math.abs(q-h))q=d;
|
|
d=Math.round((h+x)/j)*j-x;if(Math.abs(d-h)<Math.abs(q-h))q=d}else{var d=Math.round(h/j)*j;if(Math.abs(d-h)<Math.abs(q-h))q=d}}var L=W.BW;
|
|
if(P[3]&&t.BW&&p.H0&&L.length!=0){for(var Q=0;Q<L.length;Q++){if(!I[2]&&W.YP.indexOf(Q)!=-1)continue;
|
|
var _=a.b1.Tr(L,Q);for(var T=0;T<3;T+=2)if(_[T+k]!=h&&Math.abs(_[T+k]-h)<Math.abs(q-h))q=_[T+k]}}if(I[1]){var z=I[1],D=z.e,O=z.Z,c=[z.x,z.y,z.x+(D>>>1),z.y+(O>>>1),z.x+D,z.y+O];
|
|
for(var Q=0;Q<6;Q+=2)if(Math.abs(c[Q+k]-h)<Math.abs(q-h))q=c[Q+k]}if(P[4]){var z=new gj(0,0,W.e,W.Z),E=W.By();
|
|
if(E!=-1)z=W.g[E].rp();var D=z.e,O=z.Z,c=[z.x,z.y,z.x+(D>>>1),z.y+(O>>>1),z.x+D,z.y+O];for(var Q=0;Q<6;
|
|
Q+=2)if(Math.abs(c[Q+k]-h)<Math.abs(q-h))q=c[Q+k]}var e=Math.abs(q-h)<=4*a.F()/W.t.J?q:1e9;return e};
|
|
a.GJ=function(){a.I6.call(this,[10,12],a.oM,"tools/mwand")};a.GJ.prototype=new a.I6;a.GJ.prototype.Dj=a.I6.prototype.afN;
|
|
a.GJ.prototype.AM=a.I6.prototype.a9c;a.GJ.prototype._O=function(W,h,S,k){this.finish(W,h,S,k)};a.GJ.prototype.getSelection=function(W,h,S,k){var p=this.iH,I=a.I6.aec(new eC(Math.floor(p.x),Math.floor(p.y)),this.Vk.wconf,this.Vk.sall);
|
|
return I};a.GJ.iM=function(W,h,S,k,p){if(W.w.length!=1){alert("More than one layer selected.");return null}var I=W.g[W.w[0]],q=null,P;
|
|
if(p)q=I.Yi<=0?null:I.Yi==1?I.kX():I.$U(W).v;if(q==null&&I.add.lsct!=null&&I.add.lsct!=i1.LC){alert("No layer selected.");
|
|
return null}if(h.x<0||h.x>W.e||h.y<0||h.y>W.Z)return null;var t=new gj(0,0,W.e,W.Z);if(k){P=W.jc()}else if(q==null&&t.xX(I.rect))P=I.buffer;
|
|
else{P=N.U(t.n()*4);if(q==null)N.zt(I.buffer,I.rect,P,t);else a.ut.Vu(q.channel,q.rect,q.color,P,t)}var M=a.GJ.h2(P,t,h,null,S),U=N.oA(M,t),i=N.U(U.n());
|
|
N.vG(M,t,i,U);return{rect:U,channel:i}};a.GJ.Wn=function(W,h,S){var k=h.e,p=h.Z,q=0,P=0,t=0,M=0;W=new Uint32Array(W.buffer);
|
|
var I=[],U=S.length;for(var Q=0;Q<U;Q++){var i=S[Q],z=Math.round(i.x-.5-h.x),D=Math.round(i.y-.5-h.y);
|
|
z=Math.max(0,Math.min(k-1,z));D=Math.max(0,Math.min(p-1,D));var R=D*k+z,O=W[R];I.push([O&255,O>>8&255,O>>16&255,O>>>24])}return I};
|
|
a.GJ.h2=function(W,h,S,k,p){W=new Uint32Array(W.buffer);var I=h.e,q=h.Z,P=I*q;if(k==null)k=a.GJ.Wn(W,h,[S]);
|
|
var t=Math.round(S.x-.5-h.x),M=Math.round(S.y-.5-h.y),U=M*I+t,i=Date.now(),z=N.U(I*q),D=p[0],R=1/D,O=p[1]&&D>0?255:0;
|
|
if(p[2]){var b=N.U(z.length),w=new Uint32Array(P),A=1;w[0]=t<<16|M;b[U]=1;while(A>0){var g=w[A-1];A--;
|
|
var E=g>>>16,j=g&65535,Q=j*I+E,x=a.GJ.Cl(W[Q],k);if(x>D){var d=O*(1-Math.max(0,Math.min(1,(x-D)*R)));
|
|
z[Q]=~~d}else{z[Q]=255;if(j!=q-1&&b[Q+I]==0){w[A++]=E<<16|j+1;b[Q+I]=1}if(j!=0&&b[Q-I]==0){w[A++]=E<<16|j-1;
|
|
b[Q-I]=1}if(E!=I-1&&b[Q+1]==0){w[A++]=E+1<<16|j;b[Q+1]=1}if(E!=0&&b[Q-1]==0){w[A++]=E-1<<16|j;b[Q-1]=1}}}}else{for(var Q=0;
|
|
Q<P;Q++){var x=a.GJ.Cl(W[Q],k);if(x<=D)z[Q]=255}for(var j=0;j<q;j++)for(var E=0;E<I;E++){var Q=j*I+E;
|
|
if(z[Q]==0&&(E>0&&(z[Q-1]==255||j>0&&z[Q-I-1]==255||j<q-1&&z[Q+I-1]==255)||E<I-1&&(z[Q+1]==255||j>0&&z[Q-I+1]==255||j<q-1&&z[Q+I+1]==255)||j>0&&z[Q-I]==255||j<q-1&&z[Q+I]==255)){var x=a.GJ.Cl(W[Q],k),d=O*(1-Math.max(0,Math.min(1,(x-D)*R)));
|
|
z[Q]=~~d}}}return z};a.GJ.Cl=function(W,h){var S=h.length,k=a.GJ.DE(W,h[0]),Q=1;while(Q!=S){k=Math.min(k,a.GJ.DE(W,h[Q]));
|
|
Q++}return k};a.GJ.DE=function(W,h){var S=W&255,k=W>>>8&255,p=W>>>16&255,I=W>>>24&255;if(h[3]==0)return I<5?0:255;
|
|
var q=Math.max(Math.abs(S-h[0]),Math.max(Math.abs(k-h[1]),Math.abs(p-h[2])));return I==0?255:q};a.Wv=function(W,h){if(h)a.ut.call(this);
|
|
else if(W)a.ut.call(this,[10,49],a.wn,"tools/camove");else a.ut.call(this,[10,26],a.Z8,"tools/patch");
|
|
this.rF=null;this.BR=null;this.r=null;this.ug=null;this.CQ=new eC;this.ZV=null;this.ZR=null};a.Wv.prototype=new a.ut;
|
|
a.Wv.prototype.Qb=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y);if(W.q&&N.IC(I,W.q.channel,W.q.rect)){var q=new gj(0,0,W.e,W.Z),P=q.r$(W.q.rect);
|
|
if(!W.xi()||P.ZP())return;if(!0){var t=N.U(P.n());N.vG(W.q.channel,W.q.rect,t,P);W.q={channel:t,rect:P}}this.lg(W);
|
|
this.V2(W);this.ug=I;this.CQ=new eC(I.x-W.q.rect.x,I.y-W.q.rect.y);this.ZR=N.U(W.q.rect.n()*4);this.ZR.fill(255);
|
|
if(this.Vk.patch==1){var M=W.g[W.w[0]];M.dy(W,W.q,!0);if(M.eB==null)this.ug=null}this.ZV=W.q.rect.clone()}else{this.BR={s:[I.x,I.y],C:["M"]};
|
|
this.rF=I}};a.Wv.prototype.Go=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y);if(this.ug){if(this.Vk.patch==1){if(W.ye.length==0){var q=W.g[W.w[0]].eB,P=I.x-this.CQ.x,t=I.y-this.CQ.y;
|
|
a.c0.HI(W,W.w[0],Math.round(P-q.lk.x),Math.round(t-q.lk.y))}}else this.j_(W,I,"clone")}if(this.rF){this.BR.C.push("L");
|
|
this.BR.s.push(I.x,I.y);this.rF=I;W.L.i1=this.BR;W.Hx=!0}};a.Wv.prototype.he=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y);
|
|
if(this.ug){var q=W.q.rect.clone();if(this.id==a.wn){var P=W.g[W.w[0]];P.vf(W,P.eB);W.q.rect=this.ZV.clone();
|
|
var t=N.U(W.q.rect.n()*4);N.ce(W.q.channel,t,3);this.m9(W,"sheal",t,W.q.rect,W.q.rect);W.q.rect=q;q=q.r8(this.ZV)}this.j_(W,I,"heal");
|
|
this.finish(W,q,null,null,!0);W.G(q);this.ug=null}if(this.rF){var M=a.I6.io(this.Vk.setop,k.j(hW.YS),k.j(hW.OM)),U=new em(y.E.gg,!0);
|
|
if(this.BR.s.length<=4)U.data=a.I6.tQ();else U.data=a.I6.sQ(this.BR.s,M);h.c(U);this.rF=null;W.L.i1=null;
|
|
W.Hx=!0}};a.Wv.prototype.b9=function(){return this.r};a.Wv.prototype.Fg=function(W,h,S,k,p){a.ut.prototype.Fg.call(this,W,h,S,k,p);
|
|
this.Dt(p,k)};a.Wv.prototype.Dt=function(W,h){var S="auto;";if(h!=null&&h.j(hW.YS)&&!h.j(hW.OM)||this.Vk.setop=="union")S="copy";
|
|
var k=new em(y.E.W,!0);k.data={o:y.D.PS,W0:S};if(this.caller)this.caller.c(k)};a.Wv.prototype.j_=function(W,h,S){var k=new eC(Math.round(this.ug.x-h.x),Math.round(this.ug.y-h.y));
|
|
if(this.Vk.patch==1)k.Yh(-k.x,-k.y);this.r=k;this.m9(W,S,this.ZR,W.q.rect,W.q.rect);this.G(W,W.q.rect)};
|
|
a.GQ=function(){a.Wv.call(this,!0);this.Vk.patch=1};a.GQ.prototype=new a.Wv(!0,!0);a.pC=function(){a.ut.call(this,[10,13],a.agJ,"tools/pbucket");
|
|
this.D_=!1};a.pC.prototype=new a.ut;a.pC.prototype.enable=function(W,h,S,k){var p=new em(y.E.W,!0);p.data={o:y.D.PS,W0:"default"};
|
|
h.c(p)};a.pC.prototype.IF=function(W,h){};a.pC.prototype.Qb=function(W,h,S,k,p){this.D_=!0};a.pC.prototype.he=function(W,h,S,k,p,I){var q=this.D_;
|
|
this.D_=!1;if(!q||I)return;if(this.r1(k,h,p))return;if(!W.xi())return;var P=W.t.wy(p.x,p.y),t=a.GJ.iM(W,P,this.Vk.wconf,this.Vk.sall,!0);
|
|
if(t==null)return;var M=N.U(t.rect.n()*4);N.wM(M,(S.Ps&255)<<16|(S.Ps>>8&255)<<8|(S.Ps>>16&255)<<0);
|
|
N.ce(t.channel,M,3);this.lg(W);this.m9(W,"draw",M,t.rect,t.rect);this.G(W,t.rect);this.finish(W,t.rect)};
|
|
a.TC=function(){a.I6.call(this,[10,14],a.aco,"tools/plasso");this.DQ="crosshair";this.Kh=[];this.$a=null;
|
|
this.BR=null;this.a0T=0};a.TC.prototype=new a.I6;a.TC.prototype.disable=function(W,h,S,k){this.I5(W)};
|
|
a.TC.prototype._O=function(W,h,S,k){this.Kh=[hW.UP,hW.uf]};a.TC.prototype.BQ=function(W){return this.Kh.indexOf(W)!=-1};
|
|
a.TC.prototype.Wi=function(W){return this.BR!=null};a.TC.prototype.y0=function(){return this.BR!=null};
|
|
a.TC.prototype.HV=function(){return this.BR!=null};a.TC.prototype.ZL=function(W,h,S,k){if(this.BR==null)return;
|
|
var p=this.BR,I=p.s,q=I.length-2,P=this.iH;if(this.BE.TE(1)&&S.j(hW.OM)&&k.kK){I.push(0,0);p.C.push("L");
|
|
q+=2}else if(S.j(hW.YS))P=a.z0.fh(new eC(I[q-2],I[q-1]),P);I[q]=P.x;I[q+1]=P.y;W.L.i1=p;W.Hx=!0};a.TC.prototype.p9=function(W,h,S,k){var p=Date.now();
|
|
if(this.BR==null)this.BR={s:[this.iH.x,this.iH.y,this.iH.x,this.iH.y],C:["M","L"]};else{this.ZL(W,h,S,k);
|
|
if(p-this.a0T<250||eC.fa(this.iH,new eC(this.BR.s[0],this.BR.s[1]))<a.XQ(W,k)){this.$a=this.BR;this.finish(W,h,S,k);
|
|
this.I5(W);return}this.BR.C.push("L");this.BR.s.push(this.iH.x,this.iH.y)}this.a0T=p;W.L.i1=this.BR};
|
|
a.TC.prototype.I5=function(W){this.BR=null;this.Kh=[];if(W!=null){W.L.i1=null;W.Hx=!0}};a.TC.prototype.ok=function(W,h,S,k){a.I6.prototype.ok.call(this,W,h,S,k);
|
|
if(k.j(hW.y$)&&this.BR==null&&this.$a&&W.q!=null){var p=new em(y.E.u);p.b=a.pD;p.data={o:"h_stepbck"};
|
|
h.c(p);this._O(W,S,k,null);this.BR=this.$a;return}if(this.BR==null)return;if(k.j(hW.UP)||k.j(hW.uf)){this.BR.s.pop();
|
|
this.BR.s.pop();this.BR.C.pop();this.ZL(W,S,k)}if(k.j(hW.l$)){if(this.BR.s.length>4){this.$a=this.BR;
|
|
this.finish(W,S,k)}this.BR=null}if(k.j(hW.y$)){this.BR=null}W.L.i1=this.BR;W.Hx=!0};a.TC.prototype.getSelection=function(W,h,S,k){return a.I6.sQ(this.BR.s,null,this.Vk.anta)};
|
|
a.R6=function(){a.I6.call(this,[10,10],a.ajt,"tools/mlasso");this.DQ="crosshair";this.Kh=[];this.T=[];
|
|
this.QH=[];this.Sg=[];this.al=null;this.u3=null;this.me=null;this.jv=0;this.Gu=0};a.R6.prototype=new a.I6;
|
|
a.R6.prototype.disable=function(W,h,S,k){this.clear(W)};a.R6.prototype.Wi=function(W){return this.T.length!=0};
|
|
a.R6.prototype.HV=function(){return this.T.length!=0};a.R6.prototype.BQ=function(W){return this.Kh.indexOf(W)!=-1};
|
|
a.R6.prototype._O=function(W,h,S,k){this.Kh=[hW.UP,hW.uf];var p=this.dA(this.yR,W);if(this.T.length!=0&&(eC.fa(p,this.T[0])<a.XQ(W,k)||Date.now()-this.jv<300)){this.b_(W,this.T[0]);
|
|
this.finish(W,h,S);this.clear(W);return}this.jv=Date.now();if(this.T.length!=0)p=this.Xx(p,W);else{var I=W.e,q=W.Z,P=N.U(I*q),t=W.jc(),M=I*q*4;
|
|
for(var Q=0;Q<M;Q+=4)P[Q>>>2]=~~(.5+N.ak(t[Q],t[Q+1],t[Q+2])*(t[Q+3]*(1/255)));this.al=N.IM.ao3(P,I,q);
|
|
this.me=new Uint16Array(P.length)}this.b_(W,p);this.Gu=S.j(hW.OM)?1:0;this.R3(W)};a.R6.prototype.b_=function(W,h){var S=this.T;
|
|
this.QH[S.length]=this.Sg.length;if(S.length!=0){N.IM.KN(this.u3,h.y*W.e+h.x);var k=this.YM(W,h);k.reverse();
|
|
var p=a.R6.iE(W,k);this.Sg=this.Sg.concat(p)}S.push(h);this.p3(W)};a.R6.prototype.p3=function(W){var h=this.T[this.T.length-1],S=h.y*W.e+h.x;
|
|
this.u3=N.IM.aiO(this.al.l7,this.al.kL,S);this.me.fill(0)};a.R6.prototype.dA=function(W,h){return new eC(Math.floor(Math.max(0,Math.min(h.e-1,W.x))),Math.floor(Math.max(0,Math.min(h.Z-1,W.y))))};
|
|
a.R6.prototype.clear=function(W){this.Sg=[];this.T=[];this.QH=[];this.al=null;this.u3=null;this.me=null;
|
|
if(W!=null){W.L.i1=null;W.L.xV=[];W.Hx=!0}this.Kh=[]};a.R6.prototype.ZL=function(W,h,S,k){var p=this.T,I=p.length;
|
|
if(I==0)return;var q=this.Xx(this.dA(this.iH,W),W),P=this.YM(W,q);for(var Q=0;Q<P.length;Q++){var t=P[Q],M=new eC(t%W.e,Math.floor(t/W.e));
|
|
if(this.me[t]>30&&eC.fa(M,p[I-1])>20){this.b_(W,M);return}this.me[t]++}if(this.Gu==1&&k.kK)this.b_(W,q);
|
|
this.R3(W)};a.R6.prototype.R3=function(W){var h=this.T;if(h.length!=0){var S=this.Xx(this.dA(this.iH,W),W),k=this.YM(W,S);
|
|
k.reverse();var p=a.R6.iE(W,k),I=this.Sg.concat(p),q=W.L.i1={s:I,C:["M"]};for(var Q=2;Q<I.length;Q+=2)q.C.push("L")}W.L.xV=[];
|
|
for(var Q=0;Q<h.length;Q++)W.L.xV.push(h[Q].x+.5,h[Q].y+.5);W.Hx=!0};a.R6.prototype.p9=function(W,h,S,k){};
|
|
a.R6.prototype.ok=function(W,h,S,k){if(this.T.length==0)return;if(k.j(hW.UP)||k.j(hW.uf)){this.T.pop();
|
|
this.Sg=this.Sg.slice(0,this.QH[this.T.length]);this.QH.pop();if(this.T.length==0)this.clear(W);else this.p3(W);
|
|
this.R3(W)}if(k.j(hW.l$)){var p=this.dA(this.iH,W);this.b_(W,p);this.finish(W,S,k);this.clear(W)}if(k.j(hW.y$)){this.clear(W)}};
|
|
a.R6.prototype.getSelection=function(W,h,S,k){return a.I6.sQ(this.Sg,null,this.Vk.anta)};a.R6.prototype.YM=function(W,h){var S=this.T[this.T.length-1],k=S.y*W.e+S.x,p=h.y*W.e+h.x;
|
|
if(this.Gu==1)return[p,k];var I=[p];while(p!=k){p=this.u3.e6[p];I.push(p);if(I.length>5e3){console.log(I);
|
|
throw"e"}}return I};a.R6.iE=function(W,h){var S=[],k=W.e;for(var Q=0;Q<h.length;Q++){var p=h[Q];S.push(p%k+.5,Math.floor(p/k)+.5)}return S};
|
|
a.R6.prototype.Xx=function(W,h){var S=h.e,k=h.Z,p=W.clone(),q=3;N.IM.KN(this.u3,W.y*S+W.x);var I=this.u3.nY[W.y*S+W.x];
|
|
for(var P=-q+1;P<q;P++)for(var t=-q+1;t<q;t++){var M=W.x+t,U=W.y+P;if(M<0||M>=S||U<0||U>=k)continue;
|
|
N.IM.KN(this.u3,U*S+M);if(this.u3.nY[U*S+M]<I)p.Yh(M,U)}return p};a.Wt=function(){a.vv.call(this,[10,36],a.lM,"tools/ruler");
|
|
this.Nk=null;this.EU=null;this.C1=null;this.$w=null;this.OD=null};a.Wt.prototype=new a.vv;a.Wt.prototype.Wi=function(W){return W.kK};
|
|
a.Wt.prototype.enable=function(W,h,S,k){a.vv.prototype.enable.call(this,W,h,k,S);if(W)this.Xt(W)};a.Wt.prototype.disable=function(W,h,S,k){if(W)this.I5(W)};
|
|
a.Wt.prototype.ca=function(W,h,S,k,p){this.Nk=this.C1=null;this.Xt(S)};a.Wt.prototype.Qb=function(W,h,S,k,p){var I=a.XQ(W,p),q=W.t.wy(p.x,p.y);
|
|
q.x=Math.round(q.x);q.y=Math.round(q.y);var P=this.Nk;this.EU=P?P.slice(0):null;var t=P&&eC.fa(q,P[0])<I,M=P&&eC.fa(q,P[1])<I,U=P&&P[2]&&eC.fa(q,P[2])<I;
|
|
if(t||M||U){if(k.j(hW.OM)&&P.length==2){if(M){var i=P[0];P[0]=P[1];P[1]=i}P[2]=P[0].clone();this.C1=[2]}else this.C1=[t?0:M?1:2]}else if(P&&a.Wt.alX(P[0],P[1],q)<I&&Math.min(P[0].x,P[1].x)-5<=q.x&&q.x<=Math.max(P[0].x,P[1].x)+5&&Math.min(P[0].y,P[1].y)-5<=q.y&&q.y<=Math.max(P[0].y,P[1].y)+5){this.C1=[];
|
|
this.OD=[];for(var Q=0;Q<P.length;Q++){this.C1.push(Q);this.OD.push(P[Q].clone())}this.$w=q}else{this.Nk=[q.clone(),q.clone()];
|
|
this.C1=[1]}};a.Wt.prototype.Go=function(W,h,S,k,p){if(this.C1==null)return;var I=this.Nk,q=this.C1,P=W.t.wy(p.x,p.y);
|
|
P.x=Math.round(P.x);P.y=Math.round(P.y);if(q.length>1){var t=P.x-this.$w.x,M=P.y-this.$w.y;for(var Q=0;
|
|
Q<I.length;Q++){I[Q]=this.OD[Q].clone();I[Q].offset(t,M)}}else{I[q[0]].Yh(P.x,P.y);if(k.j(hW.YS)){I[q[0]]=a.z0.fh(I[1-q[0]],I[q[0]])}}this.Xt(W);
|
|
this.Wp(h,y.E.W,{o:y.D.Sx,b:this.id,aaD:I[0],mZ:I[1],rS:I[2],H$:W.H$,ajX:W.e})};a.Wt.prototype.he=function(W,h,S,k,p,I){this.C1=null;
|
|
if(I){this.Nk=this.EU.slice(0);this.Xt(W)}};a.Wt.prototype.Wp=function(W,h,S){var k=new em(h,!0);k.data=S;
|
|
W.c(k)};a.Wt.prototype.Xt=function(W){var h=this.Nk;if(h==null)this.I5(W);else{var S=[h[1].x,h[1].y,h[0].x,h[0].y],k=["M","L"];
|
|
if(h.length>2){S.push(h[2].x,h[2].y);k.push("L")}W.L.i1={C:k,s:S};W.L.xV=S}W.Hx=!0};a.Wt.prototype.I5=function(W){W.L.i1=null;
|
|
W.L.xV=[]};a.Wt.alX=function(W,h,S){var k=h.x-W.x,p=h.y-W.y,I=Math.abs(p*S.x-k*S.y+h.x*W.y-h.y*W.x),q=Math.sqrt(k*k+p*p);
|
|
return q==0?0:I/q};a.k7=function(){a.ut.call(this,[10,19],a.WC,"tools/sharpen");this.nu="copy"};a.k7.prototype=new a.ut;
|
|
a.k7.prototype.Qb=function(W,h,S,k,p){var I=this.Vk.pdetail?go.A7:go.WC;if(k.j(hW.OM))I=go.ER;this.Gy(W,S,k,p,this.Vk.strn,I);
|
|
if(this.wx==null)return;this.NJ(W)};a.k7.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);if(this.Ct)this._G(W,S,p);
|
|
if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.Av=function(){a.ut.call(this,[10,24],a.BC,"tools/shbrush");
|
|
this.nu="draw";this.Vk.opacity=.5};a.Av.prototype=new a.ut;a.Av.prototype.Qb=function(W,h,S,k,p){this.Gy(W,S,k,p,1);
|
|
if(this.wx==null)return;this.V2(W);this.NJ(W)};a.Av.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);
|
|
if(this.Ct)this._G(W,S,p);if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.Av.prototype.he=function(W,h,S,k,p){if(this.wx==null)return;
|
|
this.m9(W,"sheal",this.wx.et(),this.wx.wT(),this.wx.Oe(),null);this.G(W,this.wx.Oe());a.ut.prototype.he.call(this,W,h,S,k,p)};
|
|
a.eX=function(){a.ut.call(this,[10,20],a.MF,"tools/smudge");this.nu="copy"};a.eX.prototype=new a.ut;
|
|
a.eX.prototype.Qb=function(W,h,S,k,p){this.Gy(W,S,k,p,this.Vk.strn,go.MF);if(this.wx==null)return;this.NJ(W)};
|
|
a.eX.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);if(this.Ct)this._G(W,S,p);if(this.wx==null)return;
|
|
if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.LS=function(){a.ut.call(this,[10,23],a.Js,"tools/sponge");
|
|
this.nu="sponge"};a.LS.prototype=new a.ut;a.LS.prototype.Qb=function(W,h,S,k,p){this.Gy(W,S,k,p,this.Vk.flow);
|
|
if(this.wx==null)return;this.NJ(W)};a.LS.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);if(this.Ct)this._G(W,S,p);
|
|
if(this.wx==null)return;if(!p.kK)return;this.k$(W,S,k,p);this.NJ(W)};a.xU=function(){a.vv.call(this,[10,17],a.vD,"tools/zoom");
|
|
this.uA=!1;this.R9=!0;this.aK=0;this.t2=null;this.tt=null;this.dL=0;this.hA=null;this.mV=0;this.ix=new jv([{name:[8,0],W2:"Ctrl + +"},{name:[8,1],W2:"Ctrl + -",PO:!0},{name:[20,3],W2:"Ctrl + 0"},{name:["VAR0: 100%",[20,2]],W2:"Ctrl + 1"}],[{Y:y.E.u,b:a.vD,R:{o:"zoom",R9:!0}},{Y:y.E.u,b:a.vD,R:{o:"zoom",R9:!1}},{Y:y.E.u,b:a.vD,R:{o:"adapt",k:"fitscr"}},{Y:y.E.u,b:a.vD,R:{o:"adapt",k:"pixel"}}])};
|
|
a.xU.prototype=new a.vv;a.xU.prototype.ON=function(W,h,S,k,p){var I=this.ix;I._();I.parent=h;I.update(W,S);
|
|
var q=new em(y.E.W,!0);q.data={o:y.D.zS,gh:I,x:p.eU+2,y:p.EK+1};h.c(q)};a.xU.prototype.enable=function(W,h,S,k){this.Zg(h,k);
|
|
if(W&&Date.now()-this.aK<300)this.ca({o:"adapt",k:"pixel"},h,W,k,S);this.aK=Date.now()};a.xU.prototype.Qb=function(W,h,S,k,p){this.tt=new eC(p.x,p.y);
|
|
this.dL=W.t.J;this.hA=W.t.r.clone()};a.xU.prototype.Go=function(W,h,S,k,p){if(this.tt==null)return;var I=Math.exp(Math.log(this.dL)+(p.x-this.tt.x)/64);
|
|
I=Math.max(.02,Math.min(a.xU.Q3[0],I));W.t.J=this.dL;W.t.r=this.hA.clone();this.ca({o:"zoom",J:I,r3:this.tt},h,W,k,S)};
|
|
a.xU.prototype.he=function(W,h,S,k,p){if(eC.fa(this.tt,p)<4){var I=this.oJ(k);this.ca({o:"zoom",R9:I,r3:p},h,W,k,S)}this.tt=null};
|
|
a.xU.Q3=[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];
|
|
a.xU._I=function(W,h,S,k){var p=1;while(W*p*1/2>S||h*p*1/2>k)p*=1/2;if(W*p*2/3>S||h*p*2/3>k)p*=1/2;else if(W*p>S||h*p>k)p*=2/3;
|
|
return p};a.xU.jA=function(W,h){var S=a.xU.a7v(W);if(h&&S==0)return W;if(!h&&S==a.xU.Q3.length-1)return W;
|
|
return a.xU.Q3[h?S-1:S+1]};a.xU.a7v=function(W){var h=0;while(a.xU.Q3[h]>W)h++;return h};a.xU.up=function(W,h,S,k){var p=W.om;
|
|
if(k==0||k==null){k=a.xU.jA(W.J,S);if(k==W.J)return}var I=W.wy(h.x,h.y);if(p.e*k<=W.Vz.e&&p.Z*k<=W.Vz.Z){W.r.Yh(0,0);
|
|
W.J=k}else{var q=W.Er(),P=W.J/k;q.translate(-I.x,-I.y);q.scale(P,P);q.translate(I.x,I.y);W.f1(q)}};a.xU.prototype.ca=function(W,h,S,k,p){if(W.o=="pzoom"){if(typeof W.k=="string")return;
|
|
W={o:"zoom",J:W.k/100}}var I=0,q=!1,P=null;if(W.o=="adapt"){var t=0;if(W.k=="pixel")t=1;if(W.k=="fitscr"){var t=0,M=S.t.Vz.e,U=S.t.Vz.Z,i=p.rx?N.aX.ik+4:8;
|
|
t=Math.min((M-i*2)/S.e,(U-i*2)/S.Z)}P=new eC(Math.round(S.t.Vz.e/2),Math.round(S.t.Vz.Z/2));I=t;a.xU.up(S.t,P,q,I);
|
|
S.WU=!0}if(W.o.startsWith("multi")){function z(d){var L=d[0].x-d[1].x,_=d[0].y-d[1].y;return Math.sqrt(L*L+_*_)}function D(d){return new eC((d[0].x+d[1].x)/2,(d[0].y+d[1].y)/2)}var R=W.ou,O=D(R);
|
|
if(W.o=="multidown"){this.t2=[R,S.t.J,S.t.wy(O.x,O.y)]}else{var b=a.xU.Q3;I=this.t2[1]*z(R)/z(this.t2[0]);
|
|
I=Math.max(b[b.length-1],Math.min(b[0],I));if(I!=S.t.J)a.xU.up(S.t,O,q,I);var w=this.t2[2],A=S.t._c(w.x,w.y),g=S.t.r;
|
|
g.x=Math.round(g.x+O.x-A.x);g.y=Math.round(g.y+O.y-A.y);S.WU=!0}}if(W.o=="scroll"){P=W.r3;this.mV+=W.tm.y;
|
|
var E=14;if(this.mV<-E){q=!0;this.mV=Math.max(this.mV+E,-(E-1))}else if(this.mV>E){q=!1;this.mV=Math.min(this.mV-E,E-1)}else return;
|
|
a.xU.up(S.t,P,q,I);S.WU=!0}if(W.o=="zoom"){P=W.r3?W.r3:new eC(Math.round(S.t.Vz.e/2),Math.round(S.t.Vz.Z/2));
|
|
if(W.J!=null)I=W.J;else q=W.R9;a.xU.up(S.t,P,q,I);S.WU=!0}if(W.o=="mskView"){var j=S.g[S.w[0]];if(j.Yi<=0){j.Yi=1;
|
|
S.tn=!0}var x=j.Yi==3?j.$U(S).v:j.kX();if(W.k==0){S.t.aL=[1,1,1];x.oz=!1}if(W.k==1){S.t.aL=[1,1,1];x.oz=!0}if(W.k==2){S.t.aL=[0,0,0];
|
|
x.oz=!0}for(var Q=0;Q<S.BS.length;Q++)S.BS[Q].oz=!1;S.ye=[];S.Hx=!0}};a.xU.prototype.ok=function(W,h,S,k){if(this.uA!=k.j(hW.OM)){this.uA=k.j(hW.OM);
|
|
var p={o:y.D.Sx,b:this.id,uA:this.uA},I=new em(y.E.W,!0);I.data=p;h.c(I);this.Zg(h,k)}};a.xU.prototype.Zg=function(W,h){var S=new em(y.E.W,!0),k=this.oJ(h);
|
|
S.data={o:y.D.PS,W0:k?"zoom-in":"zoom-out"};W.c(S)};a.xU.prototype.Fg=function(W,h,S,k){this.R9=W.R9;
|
|
this.Zg(h,k)};a.xU.prototype.oJ=function(W){var h=this.R9;if(W.j(hW.zP)&&W.j(hW.Q9))h=!0;if(this.uA)h=!h;
|
|
return h};a.xU.uo=function(W,h){if(W.j(hW.jJ)||W.j(hW.a3q)){h.b=a.vD;h.data={o:"zoom",R9:!0}}if(W.j(hW.wL)){h.b=a.vD;
|
|
h.data={o:"zoom",R9:!1}}if(W.j(hW.dY)){h.b=a.vD;h.data={o:"adapt",k:"fitscr"}}if(W.j(hW.hv)){h.b=a.vD;
|
|
h.data={o:"adapt",k:"pixel"}}};a.C8=function(W,h,S){a.vv.call(this,W,h,S);this.h6=null;this.Nm=null;
|
|
this.Vi=null;this.ah9=0};a.C8.prototype=new a.vv;a.C8.prototype.enable=function(W,h,S,k,p){this.Nm=S;
|
|
var I=new em(y.E.W,!0);I.data={o:y.D.PS,W0:"default"};h.c(I)};a.C8.prototype.ON=function(W,h,S,k,p){var I=W.O4(),q=I[0],P=I[1];
|
|
if(P.length==0)return;var t=q[P[0]],M=t.add.vmsk,U=W.t.wy(p.x,p.y),i=4*a.F()/W.t.J,z=new gj(U.x-i,U.y-i,i*2,i*2),D=N.$.nw(M.T,z)[0];
|
|
if(D.length!=0){M.OU=D;W.Hx=!0}var R=N.$.IC(M.T,U).Kr;if(R!=-1){M.w=[R];W.Hx=!0}var O=new em(y.E.W,!0);
|
|
O.data={o:y.D.Sx,b:this.id,RV:p,Rr:W,MG:S};h.c(O)};a.C8.prototype._T=function(W,h){var S=new em(y.E.W,!0);
|
|
S.data={o:y.D.XO,nP:f6.z_};if(!h.H0)W.c(S);S.data={o:y.D.XO,nP:f6.Da};if(!h.dH.mw)W.c(S)};a.C8.prototype.Mr=function(W,h,S,k){if(S.Kz!=this.id)return;
|
|
if(W.w.length==0)return;var p=W.g[W.w[0]],I=p.add.vmsk,q=p.add.vstk,P=a.C8.VF(W,W.w[0]);this.h6=W;this.Vi=h;
|
|
if(p.rG()&&I!=null&&(JSON.stringify(q)!=JSON.stringify(S.K7)||JSON.stringify(P)!=JSON.stringify(S.BD))){this.ah9=Date.now();
|
|
var t=new em(y.E.W,!0);t.data={o:y.D.XO,nP:f6.ua,k:P};h.c(t);t.data={o:y.D.XO,nP:f6.rQ,k:q};h.c(t)}};
|
|
a.C8.prototype.IF=function(W,h){if(this.h6==null)return;if(h==f6.W8||h==f6.ua||h==f6.rQ){if(Date.now()-this.ah9<50)return;
|
|
var S=h==f6.ua,k=this.h6,p=S?W.BD:W.K7,I=[],q=k.w;for(var Q=0;Q<q.length;Q++){var P=q[Q],t=k.g[P];if(!t.rG()||t.add.vmsk==null)continue;
|
|
I.push(P)}var M=new em(y.E.u,!0);M.b=a.m5;M.data={o:$.IR,Z$:I,hF:S,k:p};if(I.length!=0)this.Vi.c(M)}};
|
|
a.C8.prototype.aqf=function(W){if(typeof W=="number"){var h=new em(y.E.gg,!0);h.data=a.JR.XU(0);h.data.b4.Usng.v.Type.v.Clr.v=N.X.hg({p:W>>>16&255,z:W>>>8&255,S:W>>>0&255});
|
|
this.Vi.c(h)}};a.C8.prototype.ca=function(W,h,S,k,p){this.Vi=h;if(W.o=="newfill"){if(W.ez==0){var I=new em(y.E.W,!0);
|
|
I.data={o:y.D.mJ,DG:"colorpicker",tg:p.Ps,x9:this.aqf.bind(this)};h.c(I)}}else if(W.o=="pathedit"){var q=W.s7,P="",t=S.mw.slice(0),M=S.yQ.slice(0),U=S.mw.slice(0),i=S.yQ.slice(0);
|
|
if(q=="rnm"){var z=-1-W.Kr,D=t[z],R=jg.Bo(W.name,D.add);if(z!=0)U[z]=R;else{i=[U.length];U.push(R);U[0]=jg.Bo("Work Path")}P="Rename"}else if(q=="new"){var R=jg.Bo("Path "+t.length);
|
|
if(W.akr){var O=S.O4(),b=O[0],w=O[1],A=b[w[0]];R.add.vmsk=A.add.vmsk.clone();R.add.vogk=JSON.parse(JSON.stringify(A.add.vogk));
|
|
if(A.Kr==-1){var g=U[i[0]]=jg.Bo("Path "+t.length);g.name=A.name;g.Kr=A.Kr}}U.push(R);i=[U.length-1];
|
|
P="New"}else if(q=="del"){if(i.length==0)return;i.sort(function(r,J){return r-J});if(i[0]==0){U[0]=jg.Bo(t[0].name);
|
|
i=i.slice(1)}var E=0;while(i.length!=0){U.splice(i[0]-E,1);i=i.slice(1);E++}P="Delete"}else if(q=="fromsel"){var j=U[0]=jg.Bo("Work Path");
|
|
i=[0];if(S.q==null)return;var x=S.q.channel.slice(0);for(var Q=0;Q<x.length;Q++)x[Q]=x[Q]>128?2:1;var d=S.q.rect.clone();
|
|
d.x1(1,1);var L=N.U(d.n());N.vG(x,S.q.rect,L,d);var _=gh.S2(L,d.e,d.Z,Math.round(d.n()*5e-4)),b=gh.O4(_),T=new ex(1,0,0,1,-1+S.q.rect.x,-1+S.q.rect.y);
|
|
for(var Q=0;Q<b.length;Q++)N.H.A(b[Q].path.s,T,b[Q].path.s);for(var Q=0;Q<b.length;Q++){var c=b[Q];if(c.color==1&&c.parent==-1)continue;
|
|
var e=N.H.aD(b[Q].path,!1);j.add.vmsk.T=j.add.vmsk.T.concat(e.slice(2))}j.add.vogk=$.lq(j.add.vmsk.T);
|
|
P="Selection to"}var r=new h3(P+" Path",this);r.data={EU:t,MV:M,a0D:U,LY:i};if(q=="fromsel"){r.data.k8=S.q;
|
|
r.data.mQ=null}S.nh(r);this.UN(r.data,S)}else{var B=W.rO,O=S.O4(W.o=="append"),b=O[0],w=O[1],j=b[w[0]],F=j.add.vmsk,v=j.add.vogk,X=F.clone(),V=F.clone(),H=JSON.stringify(v);
|
|
if(W.o=="remove"){if(W.NU&&V.OU.length!=0){V.T=N.$.arU(V.T,V.OU,v);var o=N.$.z2(V.T);for(var Q=0;Q<V.w.length;
|
|
Q++)if(V.w[Q]>=o){V.w.splice(Q,1);Q--}V.OU=[];B="Delete Anchors"}else{if(V.w.length==0)return;var E=0;
|
|
for(var Q=0;Q<V.w.length;Q++){v.splice(V.w[Q]+E,1);E--}V.T=N.$.a51(V.T,V.w);V.w=[];V.OU=[];if(B==null)B="Delete Paths"}}if(W.o=="append"){a.C8.Rx(W.akN,V,v)}this.qh(S,j.Kr,V,v);
|
|
this.Qp(S,B,j.Kr,X,V.clone(),null,H,JSON.stringify(v))}};a.C8.IY=function(W,h){var S=N.$.a5K(W.T,W.w),k=[];
|
|
for(var Q=0;Q<W.w.length;Q++)k.push(JSON.parse(JSON.stringify(h[W.w[Q]])));return[S,k]};a.C8.Rx=function(W,h,S){var k=N.$.z2(h.T),p=N.$.z2(W[0]);
|
|
h.T=h.T.concat(W[0].slice(2));h.w=[];for(var Q=0;Q<p;Q++)h.w.push(k+Q);for(var Q=0;Q<p;Q++)S.push(JSON.parse(JSON.stringify(W[1][Q])))};
|
|
a.C8.prototype.BQ=function(W,h){if(h==null)return!1;var S=h.O4(),k=S[0],p=S[1];if(p.length==0)return!1;
|
|
var I=k[p[0]],q=I.add.vmsk;if(q&&q.w.length+q.OU.length!=0)return[hW.UP,hW.uf].indexOf(W)!=-1};a.C8.prototype.ok=function(W,h,S,k){if(W==null)return;
|
|
var p=W.O4(),I=p[0],q=p[1];if(q.length==0)return;var P=I[q[0]],t=P.add.vmsk;if(k.j(hW.y$)||k.j(hW.l$)){t.OU=[];
|
|
W.Hx=!0}if(t.w.length!=0){var M=k.zR();if(M.x!=0||M.y!=0){var U=t.clone(),i=t.clone(),z=new ex(1,0,0,1,M.x,M.y),D=P.add.vogk,R=JSON.stringify(D);
|
|
N.$.ac(i.T,z,i.w);N.uy.A(D,N.V.xm(z),i.w);this.qh(W,P.Kr,i,D);this.Qp(W,"Move Paths",P.Kr,U,i.clone(),!0,R,JSON.stringify(D))}if(k.j(hW.UP)||k.j(hW.uf))this.ca({o:"remove",NU:this.id==a.FJ},h,W,k,S)}};
|
|
a.C8.prototype.Qp=function(W,h,S,k,p,I,q,P){var t=new h3(h,this);t.data={Cy:S,X1:k,Vp:p,an7:I,a5E:q,Qn:P};
|
|
W.nh(t)};a.C8.prototype.UN=function(W,h){if(W.Cy!=null)this.qh(h,W.Cy,W.Vp.clone(),JSON.parse(W.Qn));
|
|
else{h.mw=W.a0D.slice(0);h.yQ=W.LY.slice(0);h.Hx=h.tn=!0}if(W.k8||W.mQ){h.q=W.mQ;h.zW=!0}};a.C8.prototype._i=function(W,h){if(W.Cy!=null)this.qh(h,W.Cy,W.X1.clone(),JSON.parse(W.a5E));
|
|
else{h.mw=W.EU.slice(0);h.yQ=W.MV.slice(0);h.Hx=h.tn=!0}if(W.k8||W.mQ){h.q=W.k8;h.zW=!0}};a.C8.prototype.qh=function(W,h,S,k){var p=h<0?W.mw[-1-h]:h<1e6?W.g[h]:W.g[h-1e6].add.TySh,I=p.add.vmsk;
|
|
I.channel=null;I.VT=!0;if(I.Yf){I.Yf.channel=null;I.Yf.VT=!0}p.add.vmsk=S;p.add.vogk=k;if(1e6<=h){gf.iv(p);
|
|
var q=W.g[h-1e6],P=p,t=this.Nm,M=new a1(P.MW,t.Tm),U=jE.gY(M,P);q.rect=U.pY;q.buffer=U.vM;q.G();W.G()}else if(0<=h){S.VT=!0;
|
|
p.r9(W);W.G()}W.Hx=W.tn=!0};a.C8.VF=function(W,h){var S=W.g[h],k=S.add.vstk,p=null;if(k&&!k.fillEnabled.v)p={eY:0};
|
|
else if(S.add.SoCo)p={eY:1,EH:S.add.SoCo};else if(S.add.GdFl)p={eY:2,EH:S.add.GdFl};else if(S.add.PtFl)p={eY:3,EH:S.add.PtFl};
|
|
return p};a.C8.a3=function(W,h){var S=W.add.vmsk,k=W.add.vstk,p=h.eY;if(k)k.fillEnabled.v=p!=0;if(p>0){var I=["SoCo","GdFl","PtFl"][p-1];
|
|
for(var Q=0;Q<3;Q++)delete W.add[["SoCo","GdFl","PtFl"][Q]];W.add[I]=h.EH}};a.JR=function(W,h,S,k){a.C8.call(this,W,h,S);
|
|
this.Vk={shape:hv.QE(),pshape:0,binop:0,crad:0,irad:40,length:4,sides:5,width:5,tolr:5,tsiz:300,cstr:{fJ:0},anta:!0,aopts:[!1,!1,50,100,0]};
|
|
this.ady=k;this.TQ=null;this.Vx=null;this.Xi=null;this.BE=new bH};a.JR.prototype=new a.C8;a.JR.prototype.Wi=function(W){return W.kK&&this.id!=a.oR};
|
|
a.JR.prototype.enable=function(W,h,S,k,p){this.Nm=S;var I=new em(y.E.W,!0);I.data={o:y.D.PS,W0:"crosshair"};
|
|
h.c(I)};a.JR.prototype.ok=function(W,h,S,k){a.C8.prototype.ok.call(this,W,h,S,k);this.BE.ok(k);this.sk(h,S)};
|
|
a.JR.prototype.sk=function(W,h){var S=new em(y.E.W,!0);S.data={o:y.D.Sx,b:this.id,nC:this.bA(h)};W.c(S)};
|
|
a.JR.prototype.bA=function(W){var h=this.BE.n7(0),S=this.BE.TE(0),k=a.I6.io(this.Vk.binop,h,S);if(W.NP==1&&k==0)k=1;
|
|
return k};a.JR.prototype.sv=function(W,h,S,k){};a.JR.prototype.Qb=function(W,h,S,k,p){var I=S.NP;if(I!=2)this._T(h,S);
|
|
if(I==2&&!W.xi())return;var q=W.t.wy(p.x,p.y);q=a.c0.Fy(W,q,S);this.Xi=[q.x,q.y];this.TQ=q;this.Vx=new eC(0,0);
|
|
this.BE.Qb(k)};a.JR.prototype.XT=function(W,h,S){var k=[this.TQ.clone(),h.clone()];S=this.BE.n7(1)||this.BE.TE(1)?S:null;
|
|
if(this.ady)k=a.JR._W(k[0],k[1],S,!0,this.Vk.cstr);if(W)W.t.MD=new gj(k[0].x,k[0].y,k[1].x-k[0].x,k[1].y-k[0].y);
|
|
return this.sv(k[0],k[1],this.BE.n7(1),this.Xi)};a.JR.prototype.e2=function(W,h,S){var k=W.t.wy(h.x,h.y),p=this.Vk.cstr;
|
|
if(p.fJ==2){var I=new gj(k.x-p.x,k.y-p.y,p.x,p.y),q=a.c0.Pp(W,I,S);k.x+=q[0];k.y+=q[1];a.c0.Lb(W,I,q)}else k=a.c0.Fy(W,k,S);
|
|
return k};a.JR.prototype.Go=function(W,h,S,k,p){if(this.TQ==null)return;var I=this.Xi,q=I.length,P=p?this.e2(W,p,S):new eC(I[q-2],I[q-1]);
|
|
if(k.j(hW.zP))this.TQ=P.Xy(this.Vx);else this.Vx=P.Xy(this.TQ);I.push(P.x,P.y);if(this.Vk.shape==null)this.Vk.shape=S.Ng[0];
|
|
var t=this.XT(W,P,k)[0],M=N.H.FU(t);W.L.i1=M;if(this.id!=a.oR&&this.id!=a.JO&&this.id!=a.X4)a.vv.XB(p,W.t.MD,W,S);
|
|
W.Hx=!0;this.BE.Go()};a.JR.prototype.ajU=function(W,h,S,k){var p=W[4].clone();if(k){p.x-=h/2;p.y-=S/2}var I=this.sv(p,new eC(p.x+h,p.y+S),!1,this.Xi);
|
|
this.i9(W[0],W[1],W[2],I)};a.JR.prototype.i9=function(W,h,S,k){var p=new em(y.E.gg,!0);p.data=a.JR.Ta(k[1],S);
|
|
h.c(p);if(k[1].v.classID=="customShape"&&k[1].v.Nm.v.startsWith("--")){var I=W.O4(),q=I[0],P=I[1],t=q[P.pop()],M=t.add.vmsk,U=t.add.vogk,i=M.clone();
|
|
i.T=k[0];this.qh(W,t.Kr,i,U)}};a.JR.prototype.he=function(W,h,S,k,p,I){if(this.TQ==null)return;var q=this.e2(W,p,S),P=this.bA(S),t=S.NP,M=this.Xi,U=M.length;
|
|
if(this.id==a.oR&&U<=4){}else if(U<=4){q.x=Math.round(q.x);q.y=Math.round(q.y);var i=new em(y.E.W);i.data={o:y.D.mJ,DG:"createshape",atO:this.ajU.bind(this),aaG:this.name,a5J:[W,h,S,k,q]};
|
|
if(!I)h.c(i)}else if(U!=2){var z=this.XT(W,q,k),D=z[0],R=W.O4(!0),O=R[0],b=R[1],w=b.length-1;if(t==1&&D.length>2||t==0&&P!=0&&w!=-1&&O[b[w]].Kr>=0){D[2].VZ=[1,2,3,0][P-1];
|
|
var A=O[b.pop()],g=A.add.vmsk,E=A.add.vogk,j=g.clone(),x=g.clone(),d=JSON.stringify(E);x.T=x.T.concat(D.slice(2));
|
|
x.w=[N.$.z2(x.T)-1];var L=N.uy.Gt(z[1]);E.push(L?L:N.uy.$o());this.qh(W,A.Kr,x,E);this.Qp(W,this.name,A.Kr,j,x,null,d,JSON.stringify(E))}else if(t==0){this.i9(W,h,S,z)}else if(t==2){var x=new $.CP;
|
|
x.T=x.T.concat(D.slice(2));var _=x.kX();if(!this.Vk.anta)N.round(_.channel);var T=N.U(_.rect.n()*4);
|
|
N.wM(T,(S.Ps&255)<<16|(S.Ps>>8&255)<<8|(S.Ps>>16&255)<<0);N.ce(_.channel,T,3);var c=new em(y.E.u,!0);
|
|
c.b=a.og;c.data={o:"draw",La:{buffer:T,rect:_.rect.clone()},rO:this.name};h.c(c)}}this.TQ=null;W.L.i1=null;
|
|
W.L.pV=null;W.L.uj=[];W.t.MD=null;W.Hx=!0;this.BE.he();this.sk(h,S)};a.JR.prototype.Fg=function(W,h,S,k,p){for(var S in W)this.Vk[S]=W[S]};
|
|
a.JR._W=function(W,h,S,k,p){var I=W.x,q=W.y,P=h.x,t=h.y;if(p&&p.fJ==2){if(k){P=Math.round(P);t=Math.round(t)}I=P-p.x;
|
|
q=t-p.y}else{var M=0;if(p&&p.fJ==1)M=p.y/p.x;else if(S&&S.j(hW.YS))M=1;if(M!=0){if(k){if(I<P)I=Math.floor(I);
|
|
else I=Math.ceil(I);if(q<t)q=Math.floor(q);else q=Math.ceil(q)}var U=Math.abs(P-I),i=Math.abs(t-q),z=U;
|
|
if(i/U<M)z*=i/U/M;P=P>I?I+z:I-z;t=t>q?q+z*M:q-z*M}if(S&&S.j(hW.OM)){I-=P-I;q-=t-q}}var W=new eC(I,q),h=new eC(P,t);
|
|
if(k)a.JR.a0n(W,h);return[W,h]};a.JR.a0n=function(W,h){if(W.x>h.x){var S=W.x;W.x=h.x;h.x=S}if(W.y>h.y){var S=W.y;
|
|
W.y=h.y;h.y=S}W.x=Math.floor(W.x);W.y=Math.floor(W.y);h.x=Math.ceil(h.x);h.y=Math.ceil(h.y)};a.JR.and=function(){return{classID:"Mk",null:{t:"obj ",v:[{t:"Clss",v:{classID:"contentLayer"}}]},Usng:{t:"Objc",v:{classID:"contentLayer",Type:{t:"Objc",v:{}}}}}};
|
|
a.JR.XU=function(W,h){var S=a.JR.and();if(h==null)h=JSON.parse(JSON.stringify(hz.$Z[W]));a.X2.GB(h,S.Usng.v.Type.v,W);
|
|
return{HP:"make",b4:S}};a.JR.Ta=function(W,h){var S=h.BD,k=JSON.parse(JSON.stringify(h.K7));if(S.eY==0)k.fillEnabled.v=!1;
|
|
var p=a.JR.XU(Math.max(0,S.eY-1),S.EH);p.b4.Usng.v.Shp=W;p.b4.Usng.v.strokeStyle={t:"Objc",v:k};return p};
|
|
a.jd=function(){a.C8.call(this,[10,29],a.FJ,"tools/pen");this.eA=null;this.fB=null;this.qM=null;this.abE=0;
|
|
this.Nz=null;this.JI=!1;this._p=!1;this.br=!1;this.x_=!1};a.jd.prototype=new a.C8;a.jd.prototype.Wi=function(W){return this.fB!=null};
|
|
a.jd.prototype.ok=function(W,h,S,k){a.C8.prototype.ok.call(this,W,h,S,k);if(!k.j(hW.OM))this.br=!1};
|
|
a.jd.prototype.Qb=function(W,h,S,k,p){this.eA=p;this._T(h,S);var I=W.t.wy(p.x,p.y),O,b;I.x=Math.round(I.x);
|
|
I.y=Math.round(I.y);var q=a.c0.Fy(W,I,S),P=S.NP,t=this.abE;if(P==2)P=0;var M=W.O4(P==1),U=M[0],i=M[1],z=U[i.pop()],D=z?z.add.vmsk:null;
|
|
if(P==0&&t!=0&&z&&z.Kr>=0)P=1;var R=a.XQ(W,p);if(D)O=N.$.IC(D.T,I,!0,R);var w=k.j(hW.OM);if(P==0&&(D==null||D.OU.length==0&&O.Kr==-1)){var A=new em(y.E.gg,!0),g=N.uy.PT("customShape",[0,0,1,1],null,null,null,"--");
|
|
A.data=a.JR.Ta(g,S);h.c(A);this.x_=!0;M=W.O4(!0);U=M[0];i=M[1];z=U[i.pop()];D=z.add.vmsk;D.T=D.T.slice(0,2)}var E=z.add.vogk;
|
|
this.fB=D.clone();this.qM=JSON.stringify(E);var j=D.T,x=N.$.z2(j);b=N.$.nw(D.T,new gj(I.x-R,I.y-R,R*2,R*2),D.OU);
|
|
O=N.$.IC(D.T,I,!0,R);var d=b[0].length+b[1].length+b[2].length;if(O.Kr!=-1&&b[0].length==0){var L=N.$.rR(j,O.Kr);
|
|
while(j[L].length<=O.f9){O.f9-=j[L].length;L+=j[L].length+1}j[L].length++;j.splice(L+2+O.f9,0,{type:4,bq:q.clone(),M:q.clone(),tk:q.clone()});
|
|
D.OU=[L+2+O.f9]}else if(d!=0&&w){var _=0;for(var Q=0;Q<3;Q++)if(b[Q].length!=0){_=b[Q][0];this._p=Q==1;
|
|
break}if(b[0].length!=0){var T=D.T.length-1,c=D.T[_];c.tk=c.M.clone();var e=c.type>=3?3:0;if(_!=T){c.bq=c.M.clone();
|
|
c.type=e+1;this.br=!0}else c.type=e+2}D.OU=[_]}else if(b[0].length==1&&j[b[0][0]-1]&&j[b[0][0]-1].VZ==null){var _=b[0][0],L=N.$.QQ(j,_);
|
|
L=N.$.rR(j,L);var r=L+j[L].length;if(_!=r){j[L].length--;j.splice(_,1);r--}D.OU=[r]}else{var B=0;if(D.OU.length!=1){D.w=[x];
|
|
j.push({type:3,length:1,VZ:[1,2,3,0][Math.max(0,t-1)],pt:0,eN:0,w9:0});B=j.length;E.push(N.uy.$o())}else{var F=D.OU[0],v=N.$.QQ(j,F),L=N.$.rR(j,v);
|
|
F=L+j[L].length;if(eC.fa(I,j[L+1].M)<R){j[L].type=0;D.OU=[L+1];this.Nz=q;this.JI=!0;this.qh(W,z.Kr,D,E);
|
|
W.Hx=!0;return}j[L].length++;B=F+1;if(F==L+1&&j[L].length!=2)B=L+1}if(k.j(hW.YS)&&j[B-1]&&j[B-1].M)q=a.z0.fh(j[B-1].M,q);
|
|
j.splice(B,0,{type:4,bq:q.clone(),M:q.clone(),tk:q.clone()});D.OU=[B];this.Nz=q}this.qh(W,z.Kr,D,E);
|
|
W.Hx=!0};a.jd.prototype.Go=function(W,h,S,k,p){if(this.fB==null)return;var I=this.eA;if(I&&eC.fa(I,p)<a.XQ({t:{J:1}},p))return;
|
|
this.eA=null;var q=W.t.wy(p.x,p.y),P=a.c0.Fy(W,q,S),t=W.O4(S.NP==1),M=t[0],U=t[1],i=M[U.pop()],z=i.add.vmsk,D=z.T,R=D[z.OU[0]];
|
|
if(k.j(hW.zP)){if(k.j(hW.YS))P=a.z0.fh(this.Nz,P);var O=R.M.Xy(R.tk),b=R.bq.Xy(R.M);R.tk=P;R.M=P.add(O);
|
|
R.bq=R.M.add(b)}else{if(k.j(hW.YS))P=a.z0.fh(R.M,P);if(this._p){var w=R.bq;R.bq=R.tk;R.tk=w}if(this.JI){var A=eC.fa(R.M,P),g=A==0?0:eC.fa(R.M,R.tk)/A;
|
|
R.tk.x=R.M.x+g*(P.x-R.M.x);R.tk.y=R.M.y+g*(P.y-R.M.y)}else R.tk=P;if(k.j(hW.OM)&&!this.br)R.type=5;else{R.type=4;
|
|
R.bq=R.M.add(R.M.Xy(P))}this.Nz=P;if(this._p){var w=R.bq;R.bq=R.tk;R.tk=w}}this.qh(W,i.Kr,z,i.add.vogk);
|
|
W.Hx=!0};a.jd.prototype.he=function(W,h,S,k,p){if(this.fB==null)return;var I=W.O4(S.NP==1),q=I[0],P=I[1],t=q[P.pop()],M=t.add.vmsk,U=t.add.vogk;
|
|
if(this.JI){M.OU=[];this.qh(W,t.Kr,M,t.add.vogk)}var i=this.fB.T.length,z=M.T.length;if(!this.x_)this.Qp(W,this.JI?"Close Path":(i==z?"Move":i<z?"Add":"Delete")+" Anchor Point",t.Kr,this.fB,M.clone(),null,this.qM,JSON.stringify(U));
|
|
this.x_=!1;this.JI=!1;this._p=!1;this.br=!1;this.fB=null};a.jd.prototype.Fg=function(W,h,S,k,p){this.abE=W.binop};
|
|
a.mk=function(){a.JR.call(this,[10,30],a.oR,"tools/fpen",!1)};a.mk.prototype=new a.JR;a.mk.prototype.sv=function(W,h,S,k){return[N.$.un(k,this.Vk.tolr),N.uy.PT("customShape",[0,0,1,1],null,null,null,"--")]};
|
|
a.gC=function(){a.C8.call(this,[10,27],a.ga,"tools/pselect");this.vC=null;this.KU=!1;this.BR=null;this.fB=null;
|
|
this.Gs=null;this.qM=null;this.Zp=null;this.lc=null;this.Ld=null;this.V_=null};a.gC.prototype=new a.C8;
|
|
a.gC.prototype.Wi=function(W){return W.kK};a.gC.prototype.Qb=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y),q=W.O4(),P=q[0],t=q[1],M,U;
|
|
for(var Q=0;Q<t.length;Q++){var i=P[t[Q]],z=i.add.vmsk,D=N.$.IC(z.T,I).Kr;if(D!=-1){this.BR=M=i;U=D}for(var R=0;
|
|
R<z.Nk.length;R++){var O=N.$.YG(z.T,z.Nk[R]);if(O==null)continue;var b=eC.fa(O,I);if(b<4*a.F()/W.t.J){var w=W.g[i.Kr-1e6].add.TySh,A=w.MW.Curve,g=w.A,E=A.Reversed;
|
|
A.Reversed=!1;var A=a1.g3(w.MW.Curve);A.Reversed=E;N.H.A(A[0],g,A[0]);this.Ld=[A,R,g.S4*g.Bq-g.S*g.ZB];
|
|
this.BR=M=i;U=0}}if(this.Ld)break}if(M!=null){var z=M.add.vmsk;z.OU=[];var j=z.w.indexOf(U);if(k.j(hW.YS)){if(j==-1){z.w.push(U);
|
|
this.KU=!0}else z.w.splice(j,1)}else{if(j==-1)z.w=[U];this.KU=!0}this.lc=N.$.E6(z.T,z.w)}this.vC=I;this.V_=new hY(I);
|
|
W.tn=!0;W.Hx=!0};a.gC.prototype.Go=function(W,h,S,k,p){if(this.vC==null)return;var I=W.t.wy(p.x,p.y);
|
|
if(this.KU){I=this.V_.jr(I,k);var q=this.BR;if(this.fB==null){this.fB=this.Gs=q.add.vmsk.clone();this.qM=this.Zp=JSON.stringify(q.add.vogk);
|
|
if(k.j(hW.OM)){var P=this.fB.clone(),t=JSON.parse(this.qM),M=a.C8.IY(P,t);a.C8.Rx(M,P,t);this.Gs=P;this.Zp=JSON.stringify(t)}}var P=this.Gs.clone(),t=JSON.parse(this.Zp);
|
|
if(this.Ld){var U=this.Ld,i=U[0][0],z=N.H.Ge(i,I.x,I.y);P.Nk[U[1]]=U[0][1][z];var D=i[z*2],R=i[z*2+1],O=(i[z*2+2]-D)*(I.y-R)-(i[z*2+3]-R)*(I.x-D);
|
|
if(U[2]<0)O=-O;P.D8=O>0}else{var b=this.lc.clone(),w=b.x,A=b.y;b.offset(I.x-this.vC.x,I.y-this.vC.y);
|
|
b.x=Math.round(b.x);b.y=Math.round(b.y);var g=a.c0.Pp(W,b,S),E=new ex(1,0,0,1,b.x-w+g[0],b.y-A+g[1]);
|
|
N.$.ac(P.T,E,P.w);N.uy.A(t,N.V.xm(E),P.w);a.c0.Lb(W,b,g)}this.qh(W,q.Kr,P,t)}else{var j=this.vC;W.L.i1=N.H.Fb(new gj(j.x,j.y,I.x-j.x,I.y-j.y));
|
|
W.Hx=!0}};a.gC.prototype.he=function(W,h,S,k,p){if(this.vC==null)return;var I=W.t.wy(p.x,p.y),q=this.BR,P=q?q.add.vmsk:null;
|
|
if(this.KU){var t=JSON.stringify(q.add.vogk);if(!this.vC.xX(I))this.Qp(W,"Move Paths",q.Kr,this.fB,P,null,this.qM,t);
|
|
if(W!=null&&W.L.pV){W.L.pV=null;W.Hx=!0}}else{if(P){var M=this.vC,U=new gj(M.x,M.y,I.x-M.x,I.y-M.y),i=N.$.amw(P.T,U);
|
|
if(k.j(hW.YS)){for(var Q=0;Q<i.length;Q++)if(P.w.indexOf(i[Q])==-1)P.w.push(i[Q])}else P.w=i}W.L.i1=null;
|
|
W.Hx=!0}this.vC=null;this.fB=null;this.Ld=null;this.KU=!1;this.V_=null};a.gC.prototype.Mr=function(W,h,S,k){a.C8.prototype.Mr.call(this,W,h,S,k);
|
|
if(S.Kz!=this.id)return;if(W.w.length==0)return;var p=W.O4(),I=p[0],q=p[1];if(q.length==0)return;var P=I[q[0]],t=P.add.vmsk,M=P.add.vstk,U=P.add.vogk,i=new em(y.E.W,!0);
|
|
i.data={o:y.D.Sx,b:this.id,Zr:"main",hn:t?t:null,uy:U};h.c(i)};a.gC.prototype.Fg=function(W,h,S,k,p){var I=W.cM;
|
|
if(I.hn){var q=S.O4(),P=q[0],t=q[1];if(t.length==0)return;var M=P[t[0]],U=M.add.vmsk.clone(),i=JSON.stringify(M.add.vogk),z=I.hn;
|
|
this.qh(S,M.Kr,z,I.uy);var D=[18,5];if(U.T.length==z.T.length)D=U.w[0]==z.w[0]?"Fill Rule":"Path Order";
|
|
this.Qp(S,D,M.Kr,U,z,null,i,JSON.stringify(I.uy))}};a.lB=function(){a.C8.call(this,[10,28],a.Wl,"tools/dselect");
|
|
this.Fu=-1;this.TX=-1;this.rl=null;this.vC=null;this.BR=null;this.fB=null;this.qM=null;this.h6=null;
|
|
this.jv=0;this.aje={psnap:!1};this.V_=null};a.lB.prototype=new a.C8;a.lB.prototype.Wi=function(W){return W.kK};
|
|
a.lB.prototype.Fg=function(W){this.aje=W};a.lB.prototype.ca=function(W,h,S,k,p){if(W.o=="crnr"){if(S==null)return;
|
|
var I=S.O4(),q=I[0],P=I[1];if(P.length==0){alert("No paths selected");return}var t=q[P[0]],M=t.add.vmsk;
|
|
if(M.OU.length==0){alert("No corners selected");return}for(var Q=0;Q<M.OU.length;Q++){var U=M.T[M.OU[Q]];
|
|
if(!U.M.xX(U.tk)||!U.M.xX(U.bq)){alert("Only sharp corners can be rounded");return}}if(this.fB==null){this.fB=t.add.vmsk.clone();
|
|
this.qM=JSON.stringify(t.add.vogk);this.BR=t;this.h6=S}var i=new em(y.E.W,!0);i.data={o:y.D.mJ,DG:"cornerradius",U0:5,oZ:this.a3F.bind(this)};
|
|
h.c(i)}else a.C8.prototype.ca.call(this,W,h,S,k,p)};a.lB.prototype.a3F=function(W){if(W=="confirm"){var h=this.h6,S=this.BR,k=S.add.vmsk,p=S.add.vogk;
|
|
this.Qp(h,[12,94,0],S.Kr,this.fB,k,null,this.qM,JSON.stringify(p));this.I5();return}var k=this.fB.clone(),p=JSON.parse(this.qM),I=k.OU;
|
|
if(W=="cancel"){}else{var q=[];for(var Q=0;Q<I.length;Q++){var P=I[Q],t=N.$.QQ(k.T,P,!0),i=0;if(q.indexOf(t)!=-1)continue;
|
|
q.push(t);var M=N.$.rR(k.T,t,!0),U=k.T[M].length,z=[];for(var D=0;D<U;D++){var R=k.OU.indexOf(M+D+1)==-1?0:W;
|
|
z.push(R);if(R!=0)i++}N.$.Jg(k.T,M,z);for(var D=0;D<I.length;D++)if(I[D]>M+U)I[D]+=i}this.Yz(k,p);k.OU=[]}this.qh(this.h6,this.BR.Kr,k,p);
|
|
if(W=="cancel")this.I5()};a.lB.prototype.disable=function(W,h,S,k){this.YC(W)};a.lB.prototype.Qb=function(W,h,S,k,p){this.YC(W);
|
|
var I=W.t.wy(p.x,p.y),i,z,D;this.rl=I.clone();var q=W.O4(),P=q[0],t=q[1];if(t.length==0)return;var M=a.XQ(W,p),U=new gj(I.x-M,I.y-M,M*2,M*2);
|
|
for(var R=0;R<t.length;R++){i=this.BR=P[t[R]];z=i.add.vmsk;D=N.$.nw(z.T,U);if(D[0].length+D[1].length+D[2].length!=0)break}var O=[!1,!1,!1];
|
|
for(var Q=0;Q<3;Q++){for(var b=0;b<D[Q].length;b++){var w=D[Q][b];if(z.OU.indexOf(w)!=-1||Q==1&&z.OU.indexOf(w-1)!=-1||Q==2&&z.OU.indexOf(w+1)!=-1){D[Q]=[w];
|
|
O[Q]=!0;break}}}if(D[0].length!=0&&(O[0]||!O[1]&&!O[2])){var A=D[0][0],g=z.OU.indexOf(A);if(k.j(hW.YS)){if(g==-1)z.OU.push(A);
|
|
else{z.OU.splice(g,1);W.Hx=!0;return}}else if(g==-1)z.OU=[A];this.Fu=A;this.TX=0}else if(D[1].length!=0&&O[1]){this.Fu=D[1][0];
|
|
this.TX=1}else if(D[2].length!=0&&O[2]){this.Fu=D[2][0];this.TX=2}else{var E=N.$.IC(z.T,I,!0,M);if(E.Kr==-1)this.vC=I;
|
|
else{z.w=[E.Kr];z.OU=[]}}if(this.fB==null){this.fB=i.add.vmsk.clone();this.qM=JSON.stringify(i.add.vogk)}this.V_=new hY(I);
|
|
W.Hx=!0};a.lB.prototype.Go=function(W,h,S,k,p){if(W==null)return;var I=W.t.wy(p.x,p.y),q=this.BR;if(this.Fu!=-1){var P=this.fB.clone(),t=q.add.vogk,M=P.T[this.Fu];
|
|
M=[M.M,M.bq,M.tk][this.TX];if(k.j(hW.YS)){if(this.TX==0){I=this.V_.jr(I,k);I.x+=M.x-this.rl.x;I.y+=M.y-this.rl.y}else I=a.z0.fh(P.T[this.Fu].M,I)}else{if(this.aje.psnap){I.x=Math.round(I.x);
|
|
I.y=Math.round(I.y)}I=a.c0.Fy(W,I,S)}if(this.TX==0){var U=new ex(1,0,0,1,I.x-M.x,I.y-M.y);N.$.ac(P.T,U,null,P.OU)}else{var i=P.T[this.Fu],z=i.bq,D=i.tk;
|
|
if(this.TX==2){z=i.tk;D=i.bq}if(k.j(hW.OM)&&(i.type==1||i.type==4))i.type++;z.Yh(I.x,I.y);if(i.type==1||i.type==4){var R=eC.fa(z,i.M),O=eC.fa(D,i.M);
|
|
if(O!=0){D.x=i.M.x-(z.x-i.M.x)*(O/R);D.y=i.M.y-(z.y-i.M.y)*(O/R)}}}this.Yz(P,t);this.qh(W,q.Kr,P,t)}else if(this.vC!=null){var b=this.vC;
|
|
W.L.i1=N.H.Fb(new gj(b.x,b.y,I.x-b.x,I.y-b.y));W.Hx=!0}else{var w=W.O4(),A=w[0],g=w[1],q,P,x;if(g.length==0)return;
|
|
var E=a.XQ(W,p),j=new gj(I.x-E,I.y-E,E*2,E*2);for(var d=0;d<g.length;d++){q=A[g[d]];P=q.add.vmsk;x=N.$.nw(P.T,j);
|
|
if(x[0].length+x[1].length+x[2].length!=0)break}this.YC(W);for(var Q=0;Q<3;Q++){for(var L=0;L<x[Q].length;
|
|
L++){var _=x[Q][L],T=P.T[_];T=Q==0?T.M:Q==1?T.bq:T.tk;W.L.NY.push(W.L.aa.length>>>1);W.L.aa.push(T.x,T.y);
|
|
W.Hx=!0}}}};a.lB.prototype.YC=function(W){if(W&&W.L.aa.length!=0){W.L.aa=[];W.L.NY=[];W.Hx=!0}};a.lB.prototype.he=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y),q=this.BR,P=q?q.add.vmsk:null,t=q?q.add.vogk:null;
|
|
if(this.Fu!=-1){if(Date.now()-this.jv<300){var M=P.T[this.Fu],U=this.TX,i=null;if(U==0){var z=M.bq.xX(M.M),D=M.tk.xX(M.M);
|
|
if(!z&&!D){i="Anchor Type";if(M.type==1||M.type==4)M.type++;else{M.type--;M.tk=M.M.add(M.M.Xy(M.bq))}}else{i="Add Handles";
|
|
if(z&&D){M.bq.x-=30;M.tk.x+=30}else if(z)M.bq=M.M.add(M.M.Xy(M.tk));else if(D)M.tk=M.M.add(M.M.Xy(M.bq))}}else{i="Remove Handle";
|
|
if(U==1)M.bq.f6(M.M);else M.tk.f6(M.M)}this.Yz(P,t);this.qh(W,q.Kr,P,t);this.Qp(W,i,q.Kr,this.fB,P,null,this.qM,JSON.stringify(t))}else if(!this.rl.xX(I)){this.Qp(W,"Drag Anchors",q.Kr,this.fB,P,null,this.qM,JSON.stringify(t))}this.jv=Date.now()}else if(this.vC!=null){var R=this.vC,O=new gj(R.x,R.y,I.x-R.x,I.y-R.y);
|
|
if(O.e<0)O.x+=O.e;if(O.Z<0)O.y+=O.Z;O.e=Math.abs(O.e);O.Z=Math.abs(O.Z);var b=N.$.nw(P.T,O);P.OU=b[0].concat(k.j(hW.YS)?P.OU:[]);
|
|
W.L.i1=null}this.I5();W.Hx=!0};a.lB.prototype.I5=function(){this.BR=null;this.fB=null;this.vC=null;this.Fu=this.TX=-1;
|
|
this.V_=null};a.lB.prototype.Yz=function(W,h){for(var Q=0;Q<W.OU.length;Q++){var S=N.$.QQ(W.T,W.OU[Q]);
|
|
N.uy.uP(h,S)}};a.lB.prototype.ok=function(W,h,S,k){if(W==null)return;var p=W.O4(),I=p[0],q=p[1];if(q.length==0)return;
|
|
var P=I[q[0]],t=P.add.vmsk;if(t==null||t.OU.length==0)return;var M=P.add.vogk,U=JSON.stringify(M),i=k.zR();
|
|
if(i.x!=0||i.y!=0){var z=t.clone(),D=t.clone(),R=new ex(1,0,0,1,i.x,i.y);N.$.ac(D.T,R,null,D.OU);this.Yz(D,M);
|
|
this.qh(W,P.Kr,D,M);this.Qp(W,"Move Anchors",W.w[0],z,D.clone(),!0,U,JSON.stringify(M))}if(k.j(hW.UP)||k.j(hW.uf))this.ca({o:"remove",NU:!0},h,W,k,S)};
|
|
a.lB.prototype.Qp=function(W,h,S,k,p,I,q,P){var t=W.c_();if(I&&t!=null&&t.b==this&&t.data.an7&&t.data.Cy==S&&JSON.stringify(t.data.X1.OU)==JSON.stringify(k.OU)){t.data.Vp=p;
|
|
t.data.Qn=P}else{var t=new h3(h,this);t.data={Cy:S,X1:k,Vp:p,an7:I,a5E:q,Qn:P};W.nh(t)}};a.Rect=function(){a.JR.call(this,[10,32],a.kQ,"tools/rect",!0)};
|
|
a.Rect.prototype=new a.JR;a.Rect.prototype.sv=function(W,h,S){var k=this.Vk.crad,p=h.x-W.x,I=h.y-W.y;
|
|
return[N.$.Te.Rect(W.x,W.y,p,I,k),N.uy.PT("Rctn",[W.x,W.y,h.x,h.y],[k,k,k,k])]};a.dm=function(){a.JR.call(this,[10,33],a.Zu,"tools/ellipse",!0)};
|
|
a.dm.prototype=new a.JR;a.dm.prototype.sv=function(W,h,S){var k=h.x-W.x,p=h.y-W.y;return[N.$.Te.dm(W.x,W.y,k,p),N.uy.PT("Elps",[W.x,W.y,h.x,h.y])]};
|
|
a.s4=function(){a.JR.call(this,[10,34],a.JO,"tools/pshape",!1);this.Vk.aopts=[!1,!0,50,100,0]};a.s4.prototype=new a.JR;
|
|
a.s4.prototype.sv=function(W,h,S){var k=this.Vk.pshape,p=this.Vk.crad,I=this.Vk.irad/100,q=this.Vk.sides,P=this.Vk.width,t=this.Vk.aopts,M=this.Vk.length,b;
|
|
h=h.clone();if(S){if(Math.abs(h.x-W.x)<Math.abs(h.y-W.y))h.x=W.x;else h.y=W.y}var U=W.x,i=W.y,z=h.x,D=h.y,R=Math.sqrt((z-U)*(z-U)+(D-i)*(D-i)),O=Math.atan2(-D+i,z-U);
|
|
if(k==0)b=N.$.Te.E1(U,i,R,O,q,p);if(k==1)b=N.$.Te.Fk(U,i,R,O,q,p,I);if(k==2)b=N.$.Te.$R(W.x,W.y,h.x,h.y,P,t);
|
|
if(k==3)b=N.$.Te.alu(U,i,R,O,M);return[b,N.uy.PT("customShape",[W.x,W.y,h.x,h.y],null,null,null,"--")]};
|
|
a.s4.prototype.ok=function(W,h,S,k){var p=k.zR(),I=this.Vk,q,P;if(p.y!=0){var t=-p.y,M=I.pshape;if(M<2){q="sides";
|
|
P=Math.max(3,Math.min(100,I.sides+t))}else if(M==2){q="width";P=Math.max(1,Math.min(100,I.width+t))}else if(M==3){q="length";
|
|
P=Math.max(4,Math.min(40,I.length+t))}}if(p.x!=0){q="pshape";P=Math.max(0,Math.min(3,I.pshape+p.x))}if(q){var U=new em(y.E.W,!0),i={};
|
|
i[q]=P;I[q]=P;U.data={o:y.D.Sx,b:this.id,s7:"vals",anp:i};h.c(U);this.Go(W,h,S,k)}};a.W5=function(){a.JR.call(this,[10,35],a.X4,"tools/line",!1)};
|
|
a.W5.prototype=new a.JR;a.W5.prototype.sv=function(W,h,S){var k=this.Vk.width,p=this.Vk.aopts;h=h.clone();
|
|
if(S){h=a.z0.fh(W,h)}return[N.$.Te.$R(W.x,W.y,h.x,h.y,k,p),N.uy.PT("Ln",null,null,[W.x,W.y,h.x,h.y],k,null,p)]};
|
|
a.YL=function(){a.JR.call(this,[10,31],a.SM,"tools/cshape",!0)};a.YL.prototype=new a.JR;a.YL.prototype.sv=function(W,h,S){var k=this.Vk.shape,p=k.zq.e/k.zq.Z,I=$.CP.uW(k.T);
|
|
h=h.clone();if(S){h.y=W.y+(h.x-W.x)/p}var q=h.x-W.x,P=h.y-W.y;N.$.ac(I,new ex(q,0,0,P,W.x,W.y));return[I,N.uy.PT("customShape",[W.x,W.y,h.x,h.y],null,null,null,k.J2)]};
|
|
a.Q=function(W,h,S){a.vv.call(this,W,h,S);this.Pc=0;this.g=null;this.T3=null;this.MG=null;this.Oa=1;
|
|
this.dk=!1;this.cursor=null;this.Qz=null;this.k8=null;this.Qa=!1;this.sl=null;this.agB=0;this.uO=null;
|
|
this.Gu=0;this.Im=null;this.yl=null;this.pS=null;this.zr=null;this.aqJ=null;this.pa=null};a.Q.prototype=new a.vv;
|
|
a.Q._o=function(W,h){var S={classID:"null",null:fP.gj("Dcmn",!0)};if(W)S.Angl={t:"UntF",v:{type:"#Ang",val:h}};
|
|
else S.Axis={t:"enum",v:{Ornt:h}};return{HP:W?"rotateEventEnum":"flip",b4:S}};a.Q.prototype.ON=function(W,h,S,k,p){var I=new em(y.E.W,!0);
|
|
I.data={o:y.D.Sx,b:this.id,RV:p,Rr:W,MG:S};h.c(I);this.Ia=!1};a.Q.prototype.Wi=function(W){return this.yl&&this.yl.PZ()};
|
|
a.Q.prototype.ca=function(W,h,S,k,p){this.MG=p;if(W.o=="again"&&this.uO==null)return;if(!this.m1(S,p))return;
|
|
if(this.yl){this.Vs(W,this.yl.v3());this.V1(S,p,0,!0);this.wH(S);return}this.gO(S,W.i==null,W.i);this.Ne(S);
|
|
this.Vs(W);this.$i(S,h,W.rO,!1)};a.Q.prototype.Vs=function(W,h){var S=this.Im;if(h==null){var k=W.sr!=null?W.sr:4;
|
|
h=this.yl.asP()[k]}var p=h.x,I=h.y;if(W.o=="rot"&&W.k!=Math.PI&&(S.e+S.Z&1)==1){p=Math.floor(p);I=Math.floor(I)}var q=new ex;
|
|
q.translate(-p,-I);if(W.o=="rot")q.rotate(W.k);if(W.o=="scl")q.scale(W.k.x,W.k.y);if(W.o=="mat")q.concat(W.k);
|
|
q.translate(p,I);if(W.o=="again")q=this.uO;var P=this.yl.zk();N.H.A(P,q,P);this.yl.JW(P)};a.Q.prototype.HV=function(){return!0};
|
|
a.Q.prototype.m1=function(W,h){if(W==null)return!1;if(this.id==a.ec)return W.q!=null;var S=W.w$(!0,null,null,!0);
|
|
if(this.id==a.Nv&&W.g[S[0]].rect.ZP()){alert("Layer is empty.");return!1}for(var Q=0;Q<S.length;Q++){var k=W.g[S[Q]];
|
|
if(k.Ox(2)||k.Ox(31)){alert(dq.get([6,57,0]));return!1}if(k.add.artb){alert("You can not transform the whole artboard");
|
|
return!1}if(k.add.TySh)if(!jE.Os(k.add.TySh,h.Tm))return!1;if(k.add.SoLd){if(S.length==1&&!N.DU.xv(k.add.SoLd.warp.v)&&(k.kX()&&k.kX().ln||k.add.vmsk&&k.add.vmsk.ln)){alert("Unlink masks before transforming Smart Object");
|
|
return!1}if(!W.acK(k.add.SoLd.Idnt.v)){alert("Unsupported format of the smart object ("+W.L5(k.add.SoLd.Idnt.v).Is+")");
|
|
return!1}}}if(W.q==null)return!0;if(!W.xi())return!1;return W.Og()};a.Q.prototype.Qb=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y);
|
|
if(this.Gu==1){var q=N.V.uA(N.V.ew(this.yl.zk(),this.Im));I=N.V.AD(q,I)}var P=this.Gu==0?this.yl:this.pS;
|
|
this.dk=P.Qb(W,S,k,I,null,null,p);if(this.dk&&P.bB(I)){if(Date.now()-this.agB<250)this.$i(W,h,null,!0);
|
|
this.agB=Date.now()}};a.Q.prototype.Dt=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.PS,W0:this.cursor};
|
|
W.c(h)};a.Q.prototype.Go=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y);if(this.Gu==1){var q=N.V.uA(N.V.ew(this.yl.zk(),this.Im));
|
|
I=N.V.AD(q,I)}var P=this.Gu==0?this.yl:this.pS;if(!p.kK){var t="default";if(P){var M=P.fe(I,W.t.J,null,p);
|
|
if(M)t=M}if(t!=this.cursor){this.cursor=t;this.Dt(h)}}if(!this.dk)return;P.Go(W,S,k,I);this.V1(W,S,0,!0);
|
|
this.wH(W);this.AS(h)};a.Q.prototype.he=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y);this.yl.he(W,S,k,I);
|
|
this.dk=!1};a.Q.prototype.ok=function(W,h,S,k){if(k.j(hW.l$))this.$i(W,h,null,!0);else if(k.j(hW.y$))this.xa(W,h);
|
|
else{var p=this.yl.ok(W,S,k);if(p){this.V1(W,S,0,!0);this.AS(h)}}};a.Q.prototype.Fg=function(W,h,S,k){if(W.Zr=="commit")this.$i(S,h,null,!0);
|
|
else if(W.Zr=="cancel")this.xa(S,h);else if(W.Zr=="switchWarp"){this.Gu=1-this.Gu;this.a9V();this.wH(S);
|
|
this.AS(h)}else if(W.Zr=="wrp"){this.pS._$(W.aw);this.wH(S);this.V1(S,this.MG,0,!0)}else if(W.Zr=="ctyp"){this.yl.aik(W.gQ);
|
|
this.wH(S);this.AS(h)}else if(W.Zr=="cen"){this.yl.aos(W.fQ);this.wH(S);this.V1(S,this.MG,0,!0);this.AS(h)}else if(W.Zr=="trn"){var p=N.V.xm(W.mN),I=this.Im,q=N.V.ew(this.yl.zk(),this.Im);
|
|
p[6]=q[6],p[7]=q[7];var P=[I.x,I.y,I.x+I.e,I.y,I.x+I.e,I.y+I.Z,I.x,I.y+I.Z];N.V.A(p,P);this.Oa=W.Oa;
|
|
this.yl.JW(P);this.wH(S);this.V1(S,this.MG,0,!0)}};a.Q.prototype.wH=function(W){if(this.Gu==0)this.yl.gU(W,this.MG);
|
|
else{this.pS.gU(W);var h=N.V.ew(this.yl.zk(),this.Im);N.V.A(h,W.L.i1.s);N.V.A(h,W.L.xV)}};a.Q.prototype.$i=function(W,h,S,k){this.V1(W,this.MG,this.Oa);
|
|
var p=new h3(S?S:this.name,this);if(this.Pc==0)p.data={type:this.Pc,g:this.g,sl:this.T3,m$:a.Q.sG(W,this.g)};
|
|
else if(this.Pc==1){var I=W.g[this.g[0]],q;if(I.eB.Yi<=0){q=N.U(I.eB.lk.n());N.sN(I.eB.Fm,q,3)}else q=W.q.channel;
|
|
var P={rect:I.eB.lk.clone(),channel:q};p.data={type:this.Pc,i:this.g[0],k8:this.k8,mQ:P,Qz:this.Qz,Qa:this.Qa,eB:I.eB,sl:this.sl,m$:{pY:I.eB.lk,zz:I.eB.Fm}}}else if(this.Pc==2){p.data={type:this.Pc,k8:this.k8,mQ:{rect:W.q.rect.clone(),channel:W.q.channel.slice(0)}}}W.nh(p);
|
|
var t=this.Im,M=new eC(t.x+t.e/2,t.y+t.Z/2),U=N.V.ew(this.yl.zk(),t),i=N.V.MK(U),z=new ex;z.translate(M.x,M.y);
|
|
z.concat(i);z.translate(-M.x,-M.y);i=z.clone();var D=-Math.atan2(-i.S,i.S4),R=new ex;R.rotate(D);i.concat(R);
|
|
function O(A,g){return{t:"UntF",v:{type:["#Pxl","#Prc","#Ang"][g],val:A}}}var b=fP.gj("Lyr",!0);if(this.id==a.ec)b.v[0]={t:"prop",v:{classID:"Chnl",keyID:"fsel"}};
|
|
var w={classID:"null",null:b,FTcs:{t:"enum",v:{QCSt:"Qcsa"}},Intr:{t:"enum",v:{Intp:"Bcbc"}},Ofst:{t:"Objc",v:{__name:"Offset",classID:"Ofst",Hrzn:O(z.y8,0),Vrtc:O(z.S8,0)}},Skew:{t:"Objc",v:{classID:"Pnt",Hrzn:O(Math.atan(i.ZB)*180/Math.PI,2),Vrtc:O(0,2)}},Wdth:O(i.S4*100,1),Hght:O(i.Bq*100,1),Angl:O(D*180/Math.PI,2)};
|
|
this.Vi=h;this.track({HP:"transform",b4:w});this.escape(W,h,k)};a.Q.prototype.xa=function(W,h){if(this.Pc==0)a.Q.Uy(W,this.g,this.T3);
|
|
else if(this.Pc==1){var S=W.g[this.g[0]];W.q=this.k8;if(!this.Qa){S.eB.lk=this.sl.pY;S.eB.Fm=this.sl.zz;
|
|
S.RD(W,0,0,W.q)}else{S.vf(W,this.Qz)}W.G();W.zW=!0}else if(this.Pc==2){W.q=this.k8;W.zW=!0}this.escape(W,h,!0)};
|
|
a.Q.prototype.escape=function(W,h,S){this.yl.clear(W);this.yl=null;this.pS=null;this.pa=null;this.Gu=0;
|
|
if(S)this.Wp(h,y.E.W,{o:y.D.gw})};a.Q.prototype.UN=function(W,h){if(W.type==0)a.Q.Uy(h,W.g,W.m$);else{if(W.type==1){var S=h.g[W.i];
|
|
if(W.Qa){S.eB=W.eB}else{S.eB.lk=W.m$.pY;S.eB.Fm=W.m$.zz}S.RD(h,0,0,h.q);h.G()}h.q={rect:W.mQ.rect.clone(),channel:W.mQ.channel.slice(0)};
|
|
h.zW=!0}};a.Q.prototype._i=function(W,h){if(W.type==0)a.Q.Uy(h,W.g,W.sl);else{if(W.type==1){var S=h.g[W.i];
|
|
if(W.Qa){S.vf(h,W.Qz)}else{S.eB.lk=W.sl.pY;S.eB.Fm=W.sl.zz;S.RD(h,0,0,h.q)}h.G()}h.q=W.k8;h.zW=!0}};
|
|
a.Q.prototype.gO=function(W,h,S){W.O4();var k=[];if(S==null)for(var Q=0;Q<W.yQ.length;Q++)if(W.mw[W.yQ[Q]].add.vmsk.T.length>2)k.push(-1-W.yQ[Q]);
|
|
var p=[],I=W.t.aL;if(I[0]+I[1]+I[2]==3)if(S!=null||k.length==0||W.sP!=null&&W.sP.length!=0)p=W.w$(h,S,null,!0);
|
|
p=p.concat(k);for(var Q=0;Q<W.ye.length;Q++)p.push(-1e3-W.ye[Q]);this.g=p};a.Q.prototype.enable=function(W,h,S,k,p,I,q){if(this.cursor==null)this.cursor="default";
|
|
this.Dt(h);if(this.yl)return;this.MG=S;this.gO(W,!0);this.Ne(W,I&&I.VS!=null&&I.VS!=-1?I.VS:null,q);
|
|
this.AS(h);this.wH(W);if(I&&I.VS==-1)this.Fg({Zr:"switchWarp"},h,W,k)};a.Q.prototype.AS=function(W){var h={o:y.D.Sx,b:this.id};
|
|
if(this.Gu==0){var S=N.V.ew(this.yl.zk(),this.Im),k=N.V.MK(S);h.mN={tf:k,gQ:this.yl.a4K(),fQ:this.yl.v3(),pY:this.Im.clone()}}else{h.aw=this.pS.mY()}h.a9P=this.pS!=null;
|
|
this.Wp(W,y.E.W,h)};a.Q.prototype.Ne=function(W,h,S){var k=this.id==a.ec,p=!0,I=this.g[0],q=W.g[I],t=null,M=null;
|
|
if(k){this.Pc=2;this.k8=W.q}else if(W.q&&this.g.length==1&&I>=0&&!q.rect.ZP()){this.Pc=1;this.k8=W.q;
|
|
this.Qz=q.eB;this.Qa=!1;if(!q.xw(W,W.q)){this.Qa=!0;q.dy(W,W.q,!1)}this.sl={zz:q.eB.Fm,pY:q.eB.lk}}else{this.Pc=0;
|
|
this.T3=a.Q.sG(W,this.g,null,S);for(var Q=0;Q<this.T3.length;Q++)if(this.T3[Q][3]!=null)p=!1}var P=this.Pc==1;
|
|
if(this.T3&&this.T3.length==1){var U=this.T3[0];if(U[2]!=null&&U[2].uy){var i=U[2].hn.w;if(i.length<2){M=U[2].uy[i.length==0?0:i[0]].v;
|
|
if(!N.uy.Bj(M))M=null}}if(U[3]==null)P=!0;if(U[4]!=null){t=W.g[this.g[0]].add.SoLd;if(U[1]||U[2])P=!1}}var z=k?W.q.rect.clone():a.Q.wT(W,this.g,S);
|
|
this.Im=z;if(!k&&t){var D=a.Q.Pw(t.nonAffineTransform);this.Im=N.H.TA(N.DU.zL(t.warp.v));if(P)this.pS=new cG(t.warp.v);
|
|
this.zr=N.V.ew(D,this.Im);this.yl=new b4(D,!0,!0,p,!1,!1,h)}else{if(P||k)this.pS=new cG(N.DU.U(this.Im));
|
|
this.zr=[1,0,0,0,1,0,0,0];if(this.id==a.Nv)h=3;this.yl=new b4([z.x,z.y,z.x+z.e,z.y,z.x+z.e,z.y+z.Z,z.x,z.y+z.Z],!0,!0,p,!1,!1,h)}this.aqJ=[1,0,0,0,1,0,0,0];
|
|
if(this.id==a.Nv){var R,O;if(this.T3){var b=this.T3[0][0],w=b.T0;R=w[0];O=w[1]}else if(this.sl){R=this.sl.zz;
|
|
O=this.sl.pY}this.pa=N.JH.ahL(R,O.e,O.Z)}};a.Q.wT=function(W,h,S){if(h==null)h=W.w$(!0,null,null,!0);
|
|
var k=new gj,p=new gj;if(W.q&&h.length==1&&h[0]>=0)k=W.q.rect.clone();else for(var Q=0;Q<h.length;Q++){var I=h[Q],q=0<=I?W.g[I]:-1e3<I?W.mw[-1-I]:W.BS[-1e3-I],P=q.add?q.add.vmsk:null,t=0<=I?q.LO(W,h.length==1,!1,S,!0):-1e3<I?N.$.E6(P.T,h.length==1&&P.w.length!=0?P.w:null):q.rect.clone();
|
|
k=k.r8(t);if(I>0&&q.add.artb)p=p.r8(q.rp())}return!p.ZP()?p:k};a.Q.prototype.Wp=function(W,h,S,k){var p=new em(h,!0);
|
|
p.data=S;if(k)p.b=k;W.c(p)};a.Q.sG=function(W,h,S,k){var p=[];for(var Q=0;Q<h.length;Q++){var I=h[Q],q,P;
|
|
if(I>=0){q=W.g[I];P=q.B8(W,S,k)}else if(I>-1e3){q=W.mw[-1-I];P=[2]}else{p.push([null,null,null,null,null,null,null,W.BS[-1e3-I].clone()]);
|
|
continue}var t=[];if(P.indexOf(0)!=-1){var M={T0:[q.buffer.slice(0),q.rect.clone()]};t.push(M);if(q.rB()){var U=q.$U(W);
|
|
M.a5$=U.buffer.slice(0);M.akU=U.rect.clone()}}else t.push(null);if(P.indexOf(1)!=-1)t.push(q.kX().clone());
|
|
else t.push(null);if(P.indexOf(2)!=-1)t.push({hn:q.add.vmsk.clone(),EJ:q.add.vstk?JSON.parse(JSON.stringify(q.add.vstk)):null,EH:q.add.vstk?a.C8.VF(W,I):null,uy:q.add.vogk?JSON.parse(JSON.stringify(q.add.vogk)):null});
|
|
else t.push(null);if(q.add.TySh&&t[0]){gf.iv(q.add.TySh);t.push(q.add.TySh.A.clone())}else t.push(null);
|
|
if(q.add.SoLd&&t[0])t.push(JSON.parse(JSON.stringify(q.add.SoLd)));else t.push(null);if(P.indexOf(3)!=-1)t.push(q.$U(W).v.clone());
|
|
else t.push(null);if(q.add.lmfx)t.push(JSON.stringify(q.add.lmfx));else t.push(null);p.push(t)}return p};
|
|
a.Q.Uy=function(W,h,S){for(var Q=0;Q<h.length;Q++){var k=h[Q],p=0<=k?W.g[k]:-1e3<k?W.mw[-1-k]:W.BS[-1e3-k],I=S[Q];
|
|
if(I[0]){p.rect=I[0].T0[1].clone();p.buffer=I[0].T0[0].slice(0);if(p.rB()){var q=p.$U(W);q.buffer=I[0].a5$.slice(0);
|
|
q.rect=I[0].akU.clone()}}if(I[1]){p.kX().channel=I[1].channel.slice(0);p.kX().rect=I[1].rect.clone();
|
|
p.kX().VT=!0}if(I[2]){p.add.vmsk=I[2].hn.clone();if(I[2].EH)a.C8.a3(p,I[2].EH);if(I[2].EJ)p.add.vstk=JSON.parse(JSON.stringify(I[2].EJ));
|
|
if(I[2].uy)p.add.vogk=JSON.parse(JSON.stringify(I[2].uy))}if(I[3]){p.add.TySh.A=I[3].clone();gf.gP(p.add.TySh)}if(I[4]){p.add.SoLd=JSON.parse(JSON.stringify(I[4]))}if(I[5]){var P=p.$U(W).v;
|
|
P.channel=I[5].channel.slice(0);P.rect=I[5].rect.clone()}if(I[6]){p.add.lmfx=JSON.parse(I[6])}if(I[7]){p.channel=I[7].channel.slice(0);
|
|
p.rect=I[7].rect.clone();p.VT=!0}if(0<=k){p.r9(W);p.G()}}W.G()};a.Q.Nc=function(W){var h=W.clone(),S=Math.atan2(-h.S,h.S4),k=new ex;
|
|
k.rotate(-S);h.concat(k);return(Math.abs(h.S4)+Math.abs(h.Bq))/2};a.Q.bb=function(W,h,S,k,p,I,q,P,t,M){if(typeof I[0]=="number"){var U=[];
|
|
for(var Q=0;Q<S.length;Q++)U[Q]=I;I=U}for(var Q=0;Q<S.length;Q++){var i=I[Q],z=N.V.MK(i),D=a.Q.Nc(z),R=S[Q],O=0<=R?W.g[R]:-1e3<R?W.mw[-1-R]:W.BS[-1e3-R],b=k[Q];
|
|
if(b[0]&&O.add.lmfx&&P)jO.sg(O.add.lmfx,D);if(b[0]&&!b[3]&&!b[4]&&!b[5]){var w=b[0].T0;if(t){var A=t.clone(),g=N.U(A.n()*4);
|
|
N.zt(w[0],w[1],g,A);w=[g,A]}var E=a.Q.us(w,p,i,q,p==0?O.buffer.buffer:null,null,null,M);if(E){O.rect=E.rect;
|
|
O.buffer=E.buffer}}if(b[1]){var j=O.kX();a.Q.tA(W,b[1],j,p,i,q);if(t){var A=O.rect.r$(t),x=N.U(A.n());
|
|
N.vG(j.channel,j.rect,x,A);j.channel=x;j.rect=A}}if(b[2]){var d=q&&!N.DU.xv(q),L=b[2].hn.clone(),_=S.length==1&&L.w.length!=0,T=S.length==1&&L.OU.length>1;
|
|
if(T)_=!1;var c=_?L.w:null,e=T?L.OU:null;if(d){var r=N.DU.zL(q);N.V.A(i,r);N.$.aoM(L.T,r,c,e)}else N.$.ajV(L.T,i,c,e);
|
|
if(O.add.vstk&&P){O.add.vstk.strokeStyleLineWidth.v.val=b[2].EJ.strokeStyleLineWidth.v.val*D;var B=b[2].EH;
|
|
if(B&&B.eY==3){B=JSON.parse(JSON.stringify(B));var F=B.EH.phase.v;B.EH.Scl.v.val=Math.round(B.EH.Scl.v.val*D);
|
|
F.Hrzn.v=Math.round(F.Hrzn.v*D);F.Vrtc.v=Math.round(F.Vrtc.v*D);a.C8.a3(O,B)}}if(O.add.vogk){O.add.vogk=JSON.parse(JSON.stringify(b[2].uy));
|
|
if(d||T)N.uy.a2$(O.add.vogk);else N.uy.A(O.add.vogk,i,S.length>1?[]:L.w,P)}L.JJ*=D;O.add.vmsk=L;if(O.add.vogk)N.uy.ie(O.add.vogk,O.add.vmsk)}if(b[3]){var v=b[3].clone();
|
|
v.concat(z);O.add.TySh.A=v;gf.gP(O.add.TySh);var X=new a1(O.add.TySh.MW,h.Tm),V=jE.gY(X,O.add.TySh);
|
|
O.rect=V.pY;O.buffer=V.vM}if(b[4]){var H=O.add.SoLd,o=a.Q.Pw(b[4].nonAffineTransform);N.V.A(i,o);var J=N.H.VL(o);
|
|
if(b4.$O(o)){if(q){var C=N.H.TA(N.DU.zL(b[4].warp.v)),x=N.V.ew(o,C),Y=N.H.TA(N.DU.zL(q));o=[Y.x,Y.y,Y.x+Y.e,Y.y,Y.x+Y.e,Y.y+Y.Z,Y.x,Y.y+Y.Z];
|
|
N.V.A(x,o);H.warp.v=q}var K=N.V.ew(o),u=o;if(!N.V.kD(K)){K[6]=K[7]=0;u=[0,0,1,0,1,1,0,1];N.V.A(K,u)}H.Trnf=a.Q.m3(u);
|
|
H.nonAffineTransform=a.Q.m3(o);if(H.filterFX)H.filterFX=JSON.parse(JSON.stringify(b[4].filterFX));a.Q.VH(H,z);
|
|
O.KF(W,p==0)}}if(b[5])a.Q.tA(W,b[5],O.$U(W).v,p,i,q);if(b[7])a.Q.tA(W,b[7],O,p,i,q);if(0<=R){if(p!=0)O.Yn();
|
|
O.r9(W);O.G()}}W.G()};a.Q.ry=function(W,h,S,k,p,I){if(S==null)S=!1;return a.Q.us(W,S?0:1,N.V.xm(h),null,k,p,I,S)};
|
|
a.Q.us=function(W,h,S,k,p,I,q,P){if(P==null)P=!1;if(P&&q)throw"e";var t={},z=0,D=.3;if(k&&!N.DU.xv(k)){var M=N.DU.zL(k);
|
|
N.V.A(S,M);t.rect=N.H.VL(M);t.buffer=N.U(t.rect.n()*4);N.hx.drawImage(M,W[0],W[1].e,W[1].Z,t.buffer,t.rect,h==0);
|
|
return t}N.wa(W);var U=W[0],i=W[1],R=i.n()*a.Q.Nc(N.V.MK(S));if(P&&R>4e6)D=R>8e6?2.2:1.2;while(z+3<W.length&&W[z+3].n()>16&&N.V.kD(S)&&a.Q.Nc(N.V.MK(S))<D){z+=2;
|
|
var O=W[z],b=W[z+1],w=i.e/b.e,A=i.Z/b.Z;S=N.V.iq(S,[1,0,i.x,0,1,i.y,0,0]);S=N.V.iq(S,[w,0,0,0,A,0,0,0]);
|
|
S=N.V.iq(S,[1,0,-i.x,0,1,-i.y,0,0]);i=b;U=O}var g=N.V.iq(S,N.V.xm(new ex(i.e,0,0,i.Z,i.x,i.y))),E=[0,0,1,0,1,1,0,1];
|
|
N.V.A(g,E);t.rect=N.H.VL(E);if(q)t.rect=t.rect.r$(q);if(P){while((t.rect.e&3)!=0)t.rect.e++;while((t.rect.Z&3)!=0)t.rect.Z++}if(!b4.$O(E)||t.rect.e>1e5||t.rect.Z>1e5||t.rect.n()>3e4*3e4)return null;
|
|
var j=t.rect.n()*4;if(p&&p.byteLength>=j&&j>=p.byteLength>>2){t.buffer=new Uint8Array(p)}else{t.buffer=N.U(j)}N.V.drawImage(g,U,i.e,i.Z,t.buffer,t.rect,h==0,I,P);
|
|
if(h==2&&t.buffer){var x=t.rect.e,d=t.rect.Z,L;L=[0,-1,0,-1,16,-1,0,-1,0];L=N.pG.Qi(L);var _=t.buffer.slice(0);
|
|
N.pG.kS(_,t.buffer,x,d,L,255,!1,!0)}if(t.buffer)return t};a.Q.tA=function(W,h,S,k,p,I){if(h.color==255)N.uA(h.channel);
|
|
var q=h.rect,P=N.U(q.n()*4);N.ce(h.channel,P,3);var t=a.Q.us([P,q],k,p,I);if(t){S.rect=t.rect;S.channel=N.U(t.rect.n());
|
|
N.sN(t.buffer,S.channel,3);S.VT=!0}if(h.color==255){N.uA(h.channel);if(t)N.uA(S.channel)}};a.Q.VH=function(W,h){var S=W.filterFX;
|
|
if(S)S=S.v.filterFXList;if(S)S=S.v;if(S)for(var k=0;k<S.length;k++){var p=S[k].v.Fltr;if(p==null||p.v.classID!="rigidTransform")continue;
|
|
p=p.v;console.log(p);var I=[];for(var q=0;q<4;q++)I.push(p["PuX"+q].v,p["PuY"+q].v);N.H.A(I,h,I);for(var q=0;
|
|
q<4;q++){p["PuX"+q].v=I[q*2];p["PuY"+q].v=I[q*2+1]}var P=["PinP","posFinalPins"],t=["originalVertexArray","deformedVertexArray"],M=p.puppetShapeList.v;
|
|
for(var U=0;U<M.length;U++){var i=M[U].v;for(var z=0;z<P.length;z++){var D=a.Q.Pw(i[P[z]]);N.H.A(D,h,D);
|
|
i[P[z]]=a.Q.m3(D);var R=new Uint8Array(i[t[z]].v),O=new Float32Array(R.buffer);N.H.A(O,h,O);var b=[];
|
|
for(var w=0;w<R.length;w++)b[w]=R[w];i[t[z]].v=b}}}};a.Q.Pw=function(W){var h=[],S=W.v.length;for(var Q=0;
|
|
Q<S;Q++)h.push(W.v[Q].v);return h};a.Q.m3=function(W){var h={t:"VlLs",v:[]},S=W.length;for(var Q=0;Q<S;
|
|
Q++)h.v.push({t:"doub",v:W[Q]});return h};a.Q.prototype.a9V=function(){var W=N.H.TA(N.DU.zL(this.pS.mY())),h=N.V.ew(this.yl.zk(),this.Im),S=[W.x,W.y,W.x+W.e,W.y,W.x+W.e,W.y+W.Z,W.x,W.y+W.Z];
|
|
N.V.A(h,S);this.yl.JW(S);this.Im=W};a.Q.prototype.V1=function(W,h,S,k){var p=N.V.ew(this.yl.zk(),this.Im);
|
|
p=N.V.iq(p,N.V.uA(this.zr));var I=this.pS?this.pS.mY():null;if(this.Pc==0){var q=this.uO=N.V.MK(p);if(this.id==a.Nv){var P=this.T3[0][0],t=P.T0,M=t[1],U=~~(M.e*Math.max(0,q.S4)),i=~~(M.Z*Math.max(0,q.Bq)),z=new gj(Math.round(q.S4*M.x+q.y8),Math.round(q.Bq*M.y+q.S8),U,i),D=N.JH.A(this.pa,z),R=W.g[this.g[0]];
|
|
R.buffer=D;R.rect=z;R.G();W.G()}else a.Q.bb(W,h,this.g,this.T3,S,p,I,null,null,k)}else if(this.Pc==1){var O=W.g[this.g[0]],M=this.sl.pY;
|
|
if(O.Yi<=0){var b=this.sl.zz,w=this.k8,A=null;if(I&&!N.DU.xv(I)&&!w.rect.xX(M)){var D=N.U(w.rect.n()*4);
|
|
N.zt(b,M,D,w.rect);b=D;M=w.rect}if(this.id==a.Nv){var q=this.uO=N.V.MK(p),U=~~(M.e*Math.max(0,q.S4)),i=~~(M.Z*Math.max(0,q.Bq)),z=new gj(Math.round(q.S4*M.x+q.y8),Math.round(q.Bq*M.y+q.S8),U,i),D=N.JH.A(this.pa,z);
|
|
A={buffer:D,rect:z}}else A=a.Q.us([b,M],S,p,I);if(A){O.eB.Fm=A.buffer;O.eB.lk=A.rect;var g=N.U(A.rect.n());
|
|
N.sN(O.eB.Fm,g,3);W.q={channel:g,rect:O.eB.lk.clone()}}}else{var E=N.U(M.n()*4);N.ce(this.sl.zz,E,3);
|
|
var A=a.Q.us([E,M],S,p,I);if(A){O.eB.Fm=N.U(A.rect.n());N.sN(A.buffer,O.eB.Fm,3);O.eB.lk=A.rect}this.iO(W,S,p,I)}O.RD(W,0,0,W.q);
|
|
if(S!=0){O.Yn();N.Yn(W.q)}W.zW=!0;W.G()}else if(this.Pc==2)this.iO(W,S,p,I)};a.Q.prototype.iO=function(W,h,S,k){var p=this.k8.rect,I=N.U(p.n()*4);
|
|
N.ce(this.k8.channel,I,3);var q=a.Q.us([I,p],h,S,k),P=N.U(q.rect.n());N.sN(q.buffer,P,3);W.q={channel:P,rect:q.rect};
|
|
W.zW=!0};a.Q.prototype.disable=function(W,h,S,k){if(this.yl)this.$i(W,h,null,!0)};a.Lv=function(){a.Q.call(this,[10,16],a.Fh,"tools/transform")};
|
|
a.Lv.prototype=new a.Q;a.Ob=function(){a.Q.call(this,[7,10],a.ec,"tools/transform")};a.Ob.prototype=new a.Q;
|
|
a.nV=function(){a.Q.call(this,[10,48],a.Nv,"tools/transform")};a.nV.prototype=new a.Q;a.nj=function(W,h,S){a.vv.call(this,[10,46],a.Tw,"tools/transform");
|
|
this.eo=[1,1,2,!0];this.CD="rigidTransform";this.os=null;this.abo=null;this.FW=null;this.Fw=null;this.dV=null;
|
|
this.sB=null;this.Ic=[]};a.nj.prototype=new a.vv;a.nj.prototype.HV=function(){return!0};a.nj.zV=function(W){if(W==null)return!1;
|
|
if(W.w.length!=1)return!1;var h=W.g[W.w[0]];return h.add.SoLd||W.xi(!1)};a.nj.prototype.m1=function(W,h){return a.nj.zV(W)};
|
|
a.nj.prototype.enable=function(W,h,S,k,p,I,q){this.abo=I.vX;var P=I.vX,t,O=null;if(P){var M=W.g[P.i];
|
|
if(M.add.SoLd.filterFX!=null){var U=M.add.SoLd.filterFX.v.filterFXList.v;if(U[P.index])t=JSON.parse(JSON.stringify(U[P.index].v.Fltr.v))}}var i=t==null,M=W.g[W.w[0]],z=M.buffer,D=M.rect,R=M.add.SoLd;
|
|
if(R){var b=R.nonAffineTransform.v;O=[];for(var Q=0;Q<4;Q++)O.push(b[Q*2].v,b[Q*2+1].v);if(i)this.p8("edit",h);
|
|
var w=M.$U(W);z=w.buffer;D=w.rect}this.os={buffer:z.slice(0),rect:D.clone(),aei:O};if(i)t=a.nj.zH(this.os,this.eo);
|
|
this.FW=t;this.Fw=a.nj.Y4(this.FW,this.eo);this.ja();this.Xt(W);if(i)this.rD(h);var A=new em(y.E.W,!0);
|
|
A.data={o:y.D.Sx,b:this.id,nP:this.eo};h.c(A);A.data={o:y.D.PS,W0:"default"};h.c(A)};a.nj.prototype.disable=function(W,h,S,k){if(this.Fw)this.$i(W,h,!0)};
|
|
a.nj.prototype.ja=function(W){var h=this.Fw;this.Ic=[];for(var Q=0;Q<h.length;Q++){var S=h[Q];for(var k=0;
|
|
k<S.w.length;k++)this.Ic.push([Q,S.w[Q]]);S.tI=N.aF.TJ(S);if(W)N.aF.WA(S)}};a.nj.prototype.Fg=function(W,h,S,k){if(W.Zr=="commit")this.$i(S,h,!0);
|
|
else if(W.Zr=="cancel")this.xa(S,h,!0);else if(W.Zr=="prm"){var p=!1;for(var Q=0;Q<3;Q++)if(this.eo[Q]!=W.nP[Q])p=!0;
|
|
this.eo=W.nP;if(p){this.FW=a.nj.zH(this.os,this.eo,this.FW);this.Fw=a.nj.Y4(this.FW,this.eo);this.ja(!0);
|
|
this.rD(h)}this.Xt(S)}else if(W.Zr=="moveDepth"){var I=this.Fw;for(var q=0;q<I.length;q++){var P=I[q];
|
|
for(var Q=0;Q<P.w.length;Q++){var t=P.w[Q];P._x[t]+=W.a0l?1:-1}}this.rD(h)}};a.nj.prototype.BQ=function(W,h){return W==hW.UP||W==hW.uf};
|
|
a.nj.prototype.ok=function(W,h,S,k){var p=k.zR();if(k.j(hW.l$))this.$i(W,h,!0);else if(k.j(hW.y$))this.xa(W,h,!0);
|
|
else if(k.j(hW.UP)||k.j(hW.uf)){var I=this.Fw;for(var q=0;q<I.length;q++){var P=I[q];P.w.sort(function(U,i){return i-U});
|
|
for(var Q=0;Q<P.w.length;Q++){var t=P.w[Q],M=t*2;P._x.splice(t,1);P.gG.splice(t,1);P.Ib.splice(t,1);
|
|
P.eH.splice(t,1);P.uG.splice(M,2);P.t6.splice(M,2)}P.w=[];if(P.eH.length==0){P.rH=P.W7.slice(0);P.d8=P.W7.slice(0)}}this.ja(!0);
|
|
this.rD(h);this.Xt(W)}else if(p.x!=0||p.y!=0){this.PR(W,p.x,p.y,h);this.U_=null}};a.nj.prototype.$i=function(W,h,S){this.p8("confirm",h);
|
|
this.escape(W,h,S)};a.nj.prototype.xa=function(W,h,S){this.p8("cancel",h);this.escape(W,h,S)};a.nj.prototype.escape=function(W,h,S){W.L.i1=null;
|
|
W.L.aa=[];W.Hx=!0;this.Fw=null;var k=new em(y.E.W,!0);k.data={o:y.D.gw};if(S)h.c(k)};a.nj.prototype.Qb=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y),q=I.x,P=I.y,t=this.Fw,M=null,U=[0,2,4,1.2,1.2,1.2],i=-1,z=a.XQ(W,p);
|
|
for(var Q=0;Q<t.length;Q++){var D=t[Q],R=N.H.Ge(D.t6,q,P,z);if(R!=-1)M=[Q,R];if(i==-1&&N.aF.Rd.akH(D.d8,D.FB,q,P))i=Q}if(M==null&&i!=-1){var D=t[i];
|
|
a.nj.Lj(D,q,P,q,P,0);M=[i,D.eH.length-1];D.tI=N.aF.TJ(D)}this.dV=I;if(M){var O=t[M[0]].w.indexOf(M[1])!=-1;
|
|
if(k.j(hW.YS)&&!O){t[M[0]].w.push(M[1]);this.Ic.push(M)}else if(!O){t[M[0]].w=[M[1]];this.Ic=[M]}}this.Xt(W)};
|
|
a.nj.Lj=function(W,h,S,k,p,I){var q=N.H.Ge(W.d8,h,S);W.eH.push(q);W.t6.push(k,p);W.uG.push(W.d8[q*2]-h,W.d8[q*2+1]-S);
|
|
W.Ib.push(0);W.gG.push(!1);W._x.push(I)};a.nj.prototype.Go=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y),q=this.dV;
|
|
if(q)this.PR(W,I.x-q.x,I.y-q.y,h)};a.nj.prototype.PR=function(W,h,S,k){var p={},I=this.Ic,q=this.Fw;
|
|
if(this.U_==null){this.U_=[];for(var Q=0;Q<q.length;Q++)this.U_.push(q[Q].t6.slice(0))}for(var Q=0;Q<I.length;
|
|
Q++){var P=this.Ic[Q],t=P[0],M=q[P[0]],U=P[1]*2;M.t6[U+0]=this.U_[t][U+0]+h;M.t6[U+1]=this.U_[t][U+1]+S;
|
|
p[t]=t}for(var t in p)N.aF.WA(this.Fw[p[t]]);this.Xt(W);this.rD(k)};a.nj.prototype.p8=function(W,h){var S=new em(y.E.u,!0);
|
|
S.b=a.Ak;S.data={o:W,vX:this.abo,CD:this.CD,Fv:this.FW};h.c(S)};a.nj.prototype.he=function(W,h,S,k,p){this.dV=null;
|
|
this.U_=null};a.nj.prototype.rD=function(W){a.nj.nM(this.Fw,this.eo,this.FW);this.p8("edit",W)};a.nj.prototype.Xt=function(W){var h=this.Fw,S=this.FW;
|
|
W.L.i1={s:[],C:[]};W.L.aa=[];W.L.NY=[];for(var Q=0;Q<h.length;Q++){var k=h[Q];for(var p=0;p<k.w.length;
|
|
p++)W.L.NY.push((W.L.aa.length>>>1)+k.w[p]);W.L.aa=W.L.aa.concat(k.t6);if(this.eo[3])N.H.concat(W.L.i1,N.H.a1X(k.d8,k.FB))}W.Hx=!0};
|
|
a.nj.zH=function(W,h,S){var k=W.buffer,p=W.rect,I=W.aei,q=hw.QE("rigidTransform");if(I)for(var Q=0;Q<4;
|
|
Q++){q["PuX"+Q].v=I[Q*2];q["PuY"+Q].v=I[Q*2+1]}var P=q.puppetShapeList.v,t=N.aF.a2E(k,p.e,p.Z,h[1],h[2]),M=[];
|
|
for(var U=0;U<t.length;U++){var i={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:[]}};
|
|
i.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 z=t[U];P.push({t:"Objc",v:i});var D=z.W7.slice(0);N.H.A(D,new ex(1,0,0,1,p.x,p.y),D);var R=z.FB;
|
|
for(var Q=0;Q<R.length;Q+=3){var O=R[Q+1];R[Q+1]=R[Q+2];R[Q+2]=O}M.push({FB:R,W7:D,rH:D,d8:D,eH:[],uG:[],t6:[],tI:null,w:[],Ib:[],gG:[],_x:[]})}if(S){var b=a.nj.Y4(S,[]),w=M[0];
|
|
for(var Q=0;Q<b.length;Q++){var A=b[Q];for(var g=0;g<A.w.length;g++)w.w.push((w.t6.length>>>1)+A.w[g]);
|
|
for(var g=0;g<A.eH.length;g++){var E=A.eH[g]*2,j=A.W7[E]-A.uG[g*2],x=A.W7[E+1]-A.uG[g*2+1];a.nj.Lj(w,j,x,A.t6[g*2],A.t6[g*2+1],A._x[g])}}}a.nj.nM(M,h,q);
|
|
return q};a.nj.Y4=function(W,h){var S=a.Q.Pw,k=W.puppetShapeList.v,p=[];for(var I=0;I<k.length;I++){var q=k[I].v;
|
|
h[0]=q.meshRigidity.v-1;h[1]=q.meshQuality.v-1;h[2]=q.meshExpansion.v;var P=q.pinVertexIndices.v.length,t=q.meshBoundaryPath.v.pathComponents.v;
|
|
if(t.length!=0){var M=t[0].v.SbpL.v[0].v.Pts;M.v=[]}var U=new Uint32Array(new Uint8Array(q.indexArray.v).buffer),i=new Float32Array(new Uint8Array(q.originalVertexArray.v).buffer),z=new Float32Array(new Uint8Array(q.deformedVertexArray.v).buffer),D=[],R=[],O=[];
|
|
for(var Q=0;Q<U.length;Q++)D.push(U[Q]);for(var Q=0;Q<i.length;Q++){R.push(i[Q]);O.push(z[Q])}var b=S(q.pinVertexIndices),w=S(q.pinOffsets),A=S(q.posFinalPins),g=S(q.PnRt),E=S(q.PnOv),j=S(q.PnDp),x=S(q.selectedPin);
|
|
p.push({FB:D,W7:R,rH:O.slice(0),d8:O,eH:b,uG:w,t6:A,tI:null,Ib:g,gG:E,_x:j,w:x})}return p};a.nj.nM=function(W,h,S){function k(z,D){var R=[];
|
|
for(var Q=0;Q<z.length;Q++)R.push({t:D,v:z[Q]});return R}function p(z,D,R){var O=new(R?Uint32Array:Float32Array)(z),b=new Uint8Array(O.buffer);
|
|
for(var Q=0;Q<b.length;Q++)D[Q]=b[Q]}var I=S.puppetShapeList.v;for(var q=0;q<I.length;q++){var P=W[q],t=I[q].v;
|
|
t.meshRigidity.v=h[0]+1;t.meshQuality.v=h[1]+1;t.meshExpansion.v=h[2];p(P.FB,t.indexArray.v,!0);p(P.W7,t.originalVertexArray.v);
|
|
p(P.d8,t.deformedVertexArray.v);var M=[];for(var Q=0;Q<P.eH.length;Q++){var U=P.eH[Q]*2,i=Q*2;M[i]=P.W7[U]-P.uG[i];
|
|
M[i+1]=P.W7[U+1]-P.uG[i+1]}t.PinP.v=k(M,"doub");t.pinVertexIndices.v=k(P.eH,"long");t.pinOffsets.v=k(P.uG,"doub");
|
|
t.posFinalPins.v=k(P.t6,"doub");t.PnRt.v=k(P.Ib,"long");t.PnOv.v=k(P.gG,"bool");t.PnDp.v=k(P._x,"doub");
|
|
t.selectedPin.v=k(P.w,"long")}};a.b1=function(W,h,S){a.vv.call(this,W?W:[10,40],h?h:a.It,S?S:"tools/slice");
|
|
this.pv=null;this.Vi=null;this.uV=null;this.aqL=null;this.VU=null;this.ix=null};a.b1.prototype=new a.vv;
|
|
a.b1.IC=function(W,h){var S=-1;for(var Q=0;Q<W.length;Q++){var k=a.b1.Tr(W,Q);if(k[0]<=h.x&&h.x<=k[2]&&k[1]<=h.y&&h.y<=k[3]){S=Q;
|
|
break}}return S};a.b1.prototype.ca=function(W,h,S,k,p){if(S==null)return;this.cd(S);if(W.o=="fromAction"){var I=S.A_(),q=S.By(),P=q==-1?new gj(0,0,S.e,S.Z):S.g[q].rp(),t=[P.x,P.x+P.e],M=[P.y,P.y+P.Z];
|
|
for(var Q=0;Q<I[0].length;Q++){var U=I[0][Q],i=Math.round(U[1]),z=I[1][Q];if(z!=-1&&z!=q)continue;if(U[0]==0&&t.indexOf(i)==-1)t.push(i);
|
|
if(U[0]==1&&M.indexOf(i)==-1)M.push(i)}t.sort(function(d,L){return d-L});M.sort(function(d,L){return d-L});
|
|
for(var D=1;D<M.length;D++)for(var R=1;R<t.length;R++){S.BW.push(a.b1.ED());a.b1.pl(S.BW,S.BW.length-1,[t[R-1],M[D-1],t[R],M[D]]);
|
|
S.Hx=!0}}else if(W.o=="reorder"){if(S.YP.length==0)return;var O=S.BW,b=S.YP;b.sort(function(d,L){return d-L});
|
|
console.log(b);var w=O.slice(0),A=[],g=[];for(var Q=0;Q<b.length;Q++){var E=b[Q],j=O[E];g.push(j);w.splice(w.indexOf(j),1)}var x=Math.max(0,Math.min(w.length,b[0]-W.dir));
|
|
for(var Q=0;Q<g.length;Q++){w.splice(x+Q,0,g[Q]);A.push(x+Q)}S.BW=w;S.YP=A}else if(W.o=="delete"){var O=S.BW.slice(0);
|
|
for(var Q=0;Q<S.YP.length;Q++)S.BW.splice(S.BW.indexOf(O[S.YP[Q]]),1);S.YP=[]}else if(W.o=="deleteAll"){S.BW=[];
|
|
S.YP=[]}else{S.BW[S.YP[0]].v=W;S.Hx=!0}this.M5(S)};a.b1.prototype.enable=function(W,h,S,k,p,I){a.vv.prototype.enable.call(this,W,h,S,k,p,I);
|
|
if(!S.dH.BW){var q=new em(y.E.W,!0);q.data={o:y.D.XO,nP:f6.tU};h.c(q)}};a.b1.prototype.disable=function(){this.pv=null;
|
|
this.Vi=null};a.b1.prototype.ON=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y),q=a.b1.IC(W.BW,I);if(q==-1)return;
|
|
this.pv=W;this.Vi=h;W.YP=[q];W.Hx=!0;if(this.ix==null){this.ix=new jv([{name:[5,4]},{name:[8,11,1],N7:!0}]);
|
|
this.ix.h("select",this.Ka,this)}var P=this.ix;P.parent=h;P._();P.update(W,S);var t=new em(y.E.W,!0);
|
|
t.data={o:y.D.zS,gh:P,x:p.eU+2,y:p.EK+1};h.c(t)};a.b1.prototype.Ka=function(W){var h=this.ix.ZN()[0],S=this.pv;
|
|
if(h==0){this.cd(S);S.BW.splice(S.YP[0],1);S.YP=[];S.Hx=!0;this.M5(S)}if(h==1){var k=new em(y.E.W,!0);
|
|
k.data={o:y.D.mJ,DG:"soptions",k:S.BW[S.YP[0]].v};this.Vi.c(k)}};a.b1.prototype.Qb=function(W,h,S,k,p){if(W==null)return;
|
|
this.cd(W);var I=W.t.wy(p.x,p.y);I=a.c0.Fy(W,I,S,[!0,null,!1]);I.x=Math.round(I.x);I.y=Math.round(I.y);
|
|
this.VU=I;W.BW.unshift(a.b1.ED());W.YP=[0];a.b1.pl(W.BW,0,[I.x,I.y,I.x+20,I.y+20]);W.Hx=!0};a.b1.prototype.Go=function(W,h,S,k,p){if(this.uV==null)return;
|
|
var I=W.t.wy(p.x,p.y),q=this.VU;I=a.c0.Fy(W,I,S,[!0,null,!1]);I.x=Math.round(I.x);I.y=Math.round(I.y);
|
|
var P=[q.x,q.y,I.x,I.y];a.b1.kl(P);a.b1.pl(W.BW,0,P);W.Hx=!0};a.b1.prototype.he=function(W,h,S,k,p){this.M5(W);
|
|
this.VU=null};a.b1.prototype.cd=function(W){this.uV=JSON.stringify(W.BW);this.aqL=JSON.stringify(W.YP)};
|
|
a.b1.prototype.M5=function(W){var h=JSON.stringify(W.BW);if(h!=this.uV){var S=new h3(this.name,this);
|
|
S.data={sl:this.uV,m$:h,a4B:this.aqL,agV:JSON.stringify(W.YP)};W.nh(S)}this.uV=null};a.b1.prototype._i=function(W,h){h.BW=JSON.parse(W.sl);
|
|
h.YP=JSON.parse(W.a4B);h.Hx=!0};a.b1.prototype.UN=function(W,h){h.BW=JSON.parse(W.m$);h.YP=JSON.parse(W.agV);
|
|
h.Hx=!0};a.b1.prototype.BQ=function(W,h){return h!=null&&h.YP.length!=0&&(W==hW.UP||W==hW.uf)};a.b1.prototype.ok=function(W,h,S,k){if(W==null)return;
|
|
if(k.j(hW.UP)||k.j(hW.uf))this.ca({o:"delete"},h,W,k,S);var p=k.zR();if(p.x!=0||p.y!=0){this.cd(W);a.b1.Nj(W,p);
|
|
this.M5(W)}};a.b1.prototype.Fg=function(W,h,S,k,p){};a.b1.atY=function(W,h,S,k){var p=new eC(-h.x,-h.y),I=h.e/S.e,q=h.Z/S.Z,P=[0,0,h.e,h.Z];
|
|
for(var Q=0;Q<W.length;Q++){var t=a.b1.Tr(W,Q);if(k){t[0]=Math.round(t[0]*I);t[1]=Math.round(t[1]*q);
|
|
t[2]=Math.round(t[2]*I);t[3]=Math.round(t[3]*q)}else{a.b1.RQ(t,p);a.b1.aae(t,P)}if(t[0]>=t[2]||t[1]>=t[3]){W.splice(Q,1);
|
|
Q--;continue}a.b1.pl(W,Q,t)}};a.b1.Nj=function(W,h){var S=W.BW;for(var Q=0;Q<W.YP.length;Q++){var k=a.b1.Tr(S,W.YP[Q]);
|
|
a.b1.RQ(k,h);a.b1.pl(S,W.YP[Q],k)}};a.b1.aae=function(W,h){if(W[0]<h[0])W[0]=h[0];if(W[1]<h[1])W[1]=h[1];
|
|
if(h[2]<W[2])W[2]=h[2];if(h[3]<W[3])W[3]=h[3]};a.b1.RQ=function(W,h){W[0]=Math.round(W[0]+h.x);W[2]=Math.round(W[2]+h.x);
|
|
W[1]=Math.round(W[1]+h.y);W[3]=Math.round(W[3]+h.y)};a.b1.pl=function(W,Q,h){var S=W[Q].v.bounds.v;S.Left.v=h[0];
|
|
S.Top.v=h[1];S.Rght.v=h[2];S.Btom.v=h[3]};a.b1.Tr=function(W,Q){var h=W[Q].v.bounds.v;return[h.Left.v,h.Top.v,h.Rght.v,h.Btom.v,Q]};
|
|
a.b1.kl=function(W){if(W[2]<W[0]){var h=W[0];W[0]=W[2];W[2]=h}if(W[2]==W[0])W[2]++;if(W[3]<W[1]){var h=W[1];
|
|
W[1]=W[3];W[3]=h}if(W[3]==W[1])W[3]++};a.b1.TA=function(W,h){var S=1e9,k=-1e9,p=1e9,I=-1e9;for(var Q=0;
|
|
Q<h.length;Q++){var q=a.b1.Tr(W,h[Q]);S=Math.min(S,q[0]);p=Math.min(p,q[1]);k=Math.max(k,q[2]);I=Math.max(I,q[3])}return[S,p,k,I]};
|
|
a.b1.ED=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}}}};
|
|
a.pb=function(){a.b1.call(this,[10,41],a.Ua,"tools/sselect");this.VU=null;this.qW=null;this.e_=null;
|
|
this.sB=null;this.oW=!1};a.pb.prototype=new a.b1;a.pb.prototype.Qb=function(W,h,S,k,p){if(W==null)return;
|
|
var I=W.t.wy(p.x,p.y),q=a.pb.iV(I,4/W.t.J,W.BW,W.YP);q.pop();if(q.length!=0){this.VU=I;this.e_=q;this.cd(W);
|
|
return}var P=W.BW,t=a.b1.IC(P,I);if(t==-1)W.YP=[];else{var M=W.YP.indexOf(t);if(k.j(hW.YS)){if(M==-1)W.YP.push(t);
|
|
else W.YP.splice(M,1)}else{W.YP.sort(function(O,b){return O-b});if(M==-1)W.YP=[t];this.VU=I;this.cd(W);
|
|
this.qW=a.b1.TA(P,W.YP);this.sB=[];for(var Q=0;Q<W.YP.length;Q++)this.sB.push(a.b1.Tr(P,W.YP[Q]));if(k.j(hW.OM)){var U=P.slice(0),i=W.YP,z=[];
|
|
for(var Q=0;Q<i.length;Q++){var t=i[Q],D=U[t],R=P.indexOf(D);z.push(R);P.splice(R,0,JSON.parse(JSON.stringify(D)))}W.YP=z}}}W.Hx=!0};
|
|
a.pb.prototype.Go=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y);if(this.VU==null){var q=a.pb.iV(I,4/W.t.J,W.BW,W.YP),P=q.pop(),t=q.length==0?"default":["ew","nwse","ns","nesw"][P]+"-resize",M=new em(y.E.W,!0);
|
|
M.data={o:y.D.PS,W0:t};h.c(M);return}if(!this.oW&&I.xX(this.VU))return;this.oW=!0;var U=W.BW,q=this.e_;
|
|
if(q){I=a.c0.Fy(W,I,S,[!0,null,!1]);var i=Math.round(I.x),z=Math.round(I.y);for(var Q=0;Q<q.length;Q+=2){var D=a.b1.Tr(U,q[Q]),R=q[Q+1];
|
|
D[R]=(R&1)==0?i:z;a.b1.kl(D);a.b1.pl(U,q[Q],D)}}else{var O=I.Xy(this.VU),b=this.qW.slice(0);a.b1.RQ(b,O);
|
|
var w=new gj(b[0],b[1],b[2]-b[0],b[3]-b[1]),A=a.c0.Pp(W,w,S,[!0,null,!1],!0);a.c0.Lb(W,w,A);O.x+=A[0];
|
|
O.y+=A[1];for(var Q=0;Q<W.YP.length;Q++)a.b1.pl(U,W.YP[Q],this.sB[Q]);a.b1.Nj(W,O)}W.Hx=!0};a.pb.prototype.he=function(W,h,S,k,p){if(this.VU==null)return;
|
|
this.M5(W);W.L.pV=null;W.Hx=!0;this.VU=null;this.e_=null;this.sB=null;this.oW=!1};a.pb.iV=function(W,h,S,k){var p=W.x,I=W.y,q=[],P=-1,t=[];
|
|
for(var Q=0;Q<k.length;Q++){var M=k[Q],U=a.b1.Tr(S,M),i=U[0],z=U[1],D=U[2],R=U[3];if(p<i-h||D+h<p||I<z-h||R+h<I)continue;
|
|
var O=[p<i+h,I<z+h,D-h<p,R-h<I],b=-1;for(var w=0;w<4;w++){if(O[w]&&O[w+1&3])b=1+2*(w&1);if(O[w])q.push(M,w)}if(b==-1){if(O[0]||O[2])b=0;
|
|
if(O[1]||O[3])b=2}if(b!=-1){P=b;t.push(M)}}var A=q.length;for(var Q=0;Q<A;Q+=2){var M=q[Q],g=q[Q+1],E=a.b1.Tr(S,M)[g];
|
|
for(var w=0;w<k.length;w++){var j=k[w];if(t.indexOf(j)!=-1)continue;var U=a.b1.Tr(S,j);if(U[g&1]==E)q.push(j,g&1);
|
|
if(U[2+(g&1)]==E)q.push(j,2+(g&1))}}q.push(P);return q};a.EC=function(){a.I6.call(this,[10,44],a.agO,"tools/oselect");
|
|
this.DQ="crosshair";this.asL=0};a.EC.prototype=new a.I6;a.EC.prototype._O=function(W,h,S,k){if(Math.random()<1/(1+this.asL)){alert("The cross should be fully inside the object.",3500);
|
|
this.asL++}};a.EC.prototype.ZL=function(W,h,S,k){a.tl.e9(W,a.I6.kW,this.Vi);if(!k.kK||!this.ee)return;
|
|
var p=this.wT(W,S,!1),I=p.e,q=p.Z,P=p.x,t=p.y,M=p.x+I,U=p.y+q,i=P+I/2,z=t+q/2,D=a.EC.Be;W.L.i1={s:[P,t,M,t,M,U,P,U,i-I*D,z,i+I*D,z,i,z-q*D,i,z+q*D],C:"M L L L Z M L M L".split(" ")};
|
|
W.Hx=!0};a.EC.Be=.12;a.EC.prototype.p9=function(W,h,S,k){W.L.i1=null;W.Hx=!0;this.finish(W,h,S,k)};a.EC.prototype.getSelection=function(W,h,S,k){if(this.yR.xX(this.iH)||!this.ee)return null;
|
|
var p=this.wT(W,S,!1),I=W.g[W.w[0]];if(p.ZP()||!p.NW(I.rect))return null;return a.I6.hJ("ObSl",p)};a.tl=function(){a.ut.call(this,[10,37],a.MT,"tools/qselect");
|
|
this.nu="qselect"};a.tl.prototype=new a.ut;a.tl.prototype.Qb=function(W,h,S,k,p){this.Gy(W,S,k,p,1);
|
|
if(this.wx==null)return;this.NJ(W)};a.tl.prototype.Go=function(W,h,S,k,p){this.Dl(W,h,S);a.tl.e9(W,a.I6.kW,h);
|
|
if(this.Ct)this._G(W,S,p);if(this.wx==null)return;if(!p.kK)return;var I=this.k$(W,S,k,p);if(I!=1)this.NJ(W)};
|
|
a.tl.e9=function(W,h,S){if(W&&h.key!=a.tl.aG(W)){h.key=a.tl.aG(W);var k=W.g[W.w[0]].rect.n(),I="Image Analysis ...";
|
|
if(k==0)return;var p=k>1e6,q=new em(y.E.W,!0);q.data={o:y.D.$D,Em:I};if(p)S.c(q);setTimeout(function(){var P=a.tl.yx(W);
|
|
for(var t in P)h[t]=P[t];var q=new em(y.E.W,!0);q.data={o:y.D.bc,Em:I};if(p)S.c(q)},30)}};a.tl.aG=function(W){var h=W.w[0],S=W.g[h],k=S.rect,p=k.e,I=k.Z,q=p*I,P=S.buffer;
|
|
return[h,k.x,k.y,p,I,P[0],P[1],P[2],P[3]].join(",")};a.tl.yx=function(W){var h=W.w[0],S=W.g[h],k=S.rect,p=k.e,I=k.Z,q=p*I,P=S.buffer,t=Date.now(),M=N.U(q);
|
|
M.fill(128);var U=N.ps.g1(P,p,I);console.log(Date.now()-t);var i={key:a.tl.aG(W),av:P,rect:k.clone(),s6:p,R_:I,sx:12,a8b:!1,wN:M,Ec:U,q:N.U(q),lt:null,sh:null,Mi:null};
|
|
a.tl.n4(i);return i};a.tl.n4=function(W,h){var S=W.s6,k=W.R_,p=0,I=0,q=Date.now(),P=W.lt!=null&&N.ps.au8(W.Ec.FB,W.lt.FB,W.lt.Yq,W.wN);
|
|
p=Date.now()-q;q=Date.now();if(!P&&!W.a8b){W.lt=N.ps.un(W.Ec,S,k,W.wN,W.sx);if(!N.ps.au8(W.Ec.FB,W.lt.FB,W.lt.Yq,W.wN)){W.a8b=!0;
|
|
console.log("conflict")}W.sh=N.ps.apB(W.av,S,k,W.lt.FB,W.lt.Yq);W.Mi=[W.sh[0].slice(0),[]];I=Date.now()-q;
|
|
q=Date.now()}var q=Date.now();if(h){W.Mi[0].set(W.sh[0]);var t=W.sh[1],M=W.Mi[1];for(var U=0;U<t.length;
|
|
U++)M[U]=t[U].slice(0);N.ps.a4M(W.lt.FB,S,k,W.lt.Yq,W.wN,W.q,W.Mi)}};a.DL=function(){a.vv.call(this,[10,50],a.dh,"tools/artb");
|
|
this.Ca=null;this.asb=!1;this.yl=null;this.l0=!1;this.agv=null;this.kR=100;this.xn=null;this.jv=0};a.DL.prototype=new a.vv;
|
|
a.DL.Ad=function(W,h){var S=W[0],k=0,p=0;if(S==0)p=-1;else if(S==1)k=1;else if(S==2)p=1;else k=-1;return[20/h.l5,W[1]+k*60/h.l5,W[2]+p*60/h.l5]};
|
|
a.DL.prototype.Fg=function(W,h,S,k,p){this.Ca=W.nP;this.jv=Date.now()};a.DL.prototype.Mr=function(W,h,S,k){if(S.Kz!=this.id)return;
|
|
if(W==null||W.w.length!=1){this.I5(W);return}var p=W.w[0],I=W.g[p],q=I.add.artb;if(q==null){this.I5(W);
|
|
return}if(this.l0)return;if(Date.now()-this.jv>50){this.Ca={};var P=["artboardBackgroundType","Clr"];
|
|
for(var Q=0;Q<P.length;Q++)if(q[P[Q]])this.Ca[P[Q]]=JSON.parse(JSON.stringify(q[P[Q]]));var t=new em(y.E.W,!0);
|
|
t.data={o:y.D.Sx,b:this.id,n2:this.Ca};h.c(t)}var M=I.rp(),U=N.H.Fb(M).s,i=this.yl=new b4(U,!0,!1,!1,!0,!1,3,!1);
|
|
i.gU(W,S,!1);var z={s:[1,0],C:["M"]};for(var Q=1;Q<30;Q++){var D=Math.PI*2*Q/30;z.s.push(Math.cos(D),Math.sin(D));
|
|
z.C.push("L")}z.C.push("Z","M","L","M","L");z.s.push(-.5,0,.5,0,0,-.5,0,.5);var R=M.x+M.e/2,O=M.y+M.Z/2,b=this.kR*1.1,w=this.agv=[R,M.y,M.x+M.e,O,R,M.y+M.Z,M.x,O],A=[0,-b,b,0,0,b,-b,0],g=W.root.children;
|
|
W.L.N0=[];for(var Q=0;Q<4;Q++){var E=new eC(w[Q*2]+A[Q*2],w[Q*2+1]+A[Q*2+1]),j=!1;for(var x=0;x<g.length;
|
|
x++){var I=g[x].i;if(I.add.artb==null)continue;var M=I.rp();if(M.mA(E))j=!0}if(j){w[Q*2]=1e9;continue}W.L.N0.push([Q,w[Q*2],w[Q*2+1]])}};
|
|
a.DL.prototype.disable=function(W,h,S,k,p){this.I5(W)};a.DL.prototype.I5=function(W){if(this.yl){this.yl.clear(W);
|
|
this.yl=null;W.L.N0=null}};a.DL.prototype.Qb=function(W,h,S,k,p){this.jv=Date.now();var I=W.t.wy(p.x,p.y),q=this.yl;
|
|
if(q){var P=new em(y.E.u),t=q.a69(null,I,W,p);if(t<9){this.l0=q.Qb(W,S,k,I,null,!0,p);return}else if(q.bB(I)){P.b=a.M2;
|
|
P.data={o:"disabAuto"};h.c(P);var M=new em(y.E.W);M.data={o:y.D.fX,b:a.M2,a4e:!0};h.c(M);return}else{var U=-1,i=W.L.N0;
|
|
for(var Q=0;Q<i.length;Q++){var z=a.DL.Ad(i[Q],W.t);if(eC.fa(I,new eC(z[1],z[2]))<z[0])U=i[Q][0]}if(U!=-1){var D=W.g[W.w[0]].rp(),R=D.clone(),O=(U==0||U==2?D.Z:D.e)+this.kR;
|
|
if(U==0||U==3)O=-O;if(U==0||U==2)D.y+=O;else D.x+=O;if(k.j(hW.OM)){P.b=a.m5;P.data={o:$.T2};h.c(P);a.c0.eg(W,W.w$(null,W.w[0],null,!0),null,D.x-R.x,D.y-R.y);
|
|
a.JY.g$(W)}else this.Rn(W,D,h);return}}}this.xn=a.c0.Fy(W,I,S)};a.DL.prototype.Rn=function(W,h,S){var k=W.g.slice(0),p=[W.g.length+1],I=W.yA();
|
|
I.hq("Artboard "+(W.root.children.length+1));I.add.lsct=i1.wY;I.Si(h);if(this.Ca){var q=I.add.artb,P=this.Ca;
|
|
for(var t in P)q[t]=P[t]}I.oO="pass";I.S5=24;if(W.add.artd||h.r$(new gj(0,0,W.e,W.Z)).ZP())k.push(W.Iq());
|
|
else k.unshift(W.Iq());k.push(I);var M=new em(y.E.u);M.b=a.m5;M.data={o:$.s9,vR:k,mQ:p,rO:"New Artboard"};
|
|
S.c(M)};a.DL.prototype.Go=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y),q=this.yl,P=this.xn;if(q){if(this.l0){q.Go(W,S,k,I)}else{var t=q.fe(I,W.t.J,null,p);
|
|
if(t==null)t="default";var M=new em(y.E.W,!0);M.data={o:y.D.PS,W0:t};h.c(M)}}if(P){var U=this.Tr(W,I,k,S);
|
|
W.L.i1=N.H.Fb(U);W.Hx=!0;a.vv.XB(p,U,W,S)}};a.DL.prototype.he=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y),q=this.xn;
|
|
if(this.l0){this.yl.he(W,S,k,I);this.l0=!1;var P=N.H.VL(this.yl.zk()),t=$._R(P),M=W.g[W.w[0]],U=JSON.parse(JSON.stringify(M.add.artb));
|
|
U.artboardRect.v=t;var i=new em(y.E.u,!0);i.b=a.m5;i.data={o:$.Uf,xD:U};h.c(i)}if(q){var z=this.Tr(W,I,k,S);
|
|
if(z.n()>20)this.Rn(W,z,h);W.L.i1=null;W.Hx=!0;this.xn=null;W.L.uj=[]}};a.DL.prototype.Tr=function(W,h,S,k){var p=this.xn,I=a.c0.Fy(W,h,k),q=a.JR._W(p,I,S,!0);
|
|
p=q[0];I=q[1];return N.H.VL([p.x,p.y,I.x,I.y])};function b4(W,h,S,k,p,I,q,P){this.EU=null;this.Nk=W?W.slice(0):null;
|
|
this.k9=4;this.iH=null;this.OV=null;this.g5=null;this._9=-1;this._K=null;this.a3S=!1;this.aoh=[];for(var Q=0;
|
|
Q<8;Q++)this.aoh.push(hI.aj7(0,PIMG.rotate,-.5,-.5,-45-Q*45));this.acP=h;this.amU=S;this.a6J=k;this.afC=p;
|
|
this.Fp=I;this.VS=q;this.a9O=P==null?1:P}b4.prototype.PZ=function(){return this._9!=-1};b4.prototype.zk=function(){return this.Nk.slice(0)};
|
|
b4.prototype.JW=function(W){this.Nk=W};b4.prototype.asP=function(){return this.rY(this.Nk)};b4.prototype.a4K=function(){return this.k9};
|
|
b4.prototype.aik=function(W){this.k9=W};b4.prototype.v3=function(W){if(W==null)W=this.Nk;if(this.k9==9)return this.iH;
|
|
else return this.rY(W)[this.k9]};b4.prototype.aos=function(W){if(this.k9==9)this.iH=W.clone();else{var h=this.v3(),S=new ex(1,0,0,1,W.x-h.x,W.y-h.y);
|
|
N.H.A(this.Nk,S,this.Nk)}};b4.prototype.fe=function(W,h,S,k){var p=this.wS(null,W,h,k),I;if(p==9)return"default";
|
|
if(p==10){if(S)return null;return!this.acP?"move":null}if(p==-1||p==4)return null;if(p==11){var q=this.v3().Xy(W);
|
|
I=90-Math.atan2(q.y,q.x)*180/Math.PI;var P=Math.round(8*(I/360));P=(P+8)%8;return this.aoh[P]}else{var t=this.o3(W,this.Nk);
|
|
I=[135,90,45,180,0,0,225,270,315][p];var M=N.V.ew(this.Nk);I+=Math.atan2(-M[3],M[0])*180/Math.PI;var U="ew nesw ns nwse ew nesw ns nwse".split(" "),P=Math.round(8*(I/360));
|
|
P=(P+8)%8;return U[P]+"-resize"}};b4.prototype.o3=function(W,h){var S=N.V.uA(N.V.ew(h)),k=new Float64Array(2);
|
|
N.V.Sj(W.x,W.y,S,k);return new eC(k[0],k[1])};b4.prototype.bB=function(W){var h=this.o3(W,this.Nk);return 0<=h.x&&h.x<=1&&0<=h.y&&h.y<=1};
|
|
b4.prototype.Qb=function(W,h,S,k,p,I,q){this.a3S=I;this._K=k;var P=W.t.J,t;if(this.Nk==null)k=a.c0.Fy(W,k,h);
|
|
this.g5=k.clone();if(this.Nk==null){this.g5.offset(1,1);var M=p==null?1:1/p;this.Nk=[k.x,k.y,k.x+1,k.y,k.x+1,k.y+M,k.x,k.y+M];
|
|
t=8}else{t=this.wS(S,k,P,q);if(0<=t&&t<=8)this.g5=this.rY(this.Nk)[t];if(t==9){this.k9=9;this.iH=k.clone()}}this.EU=this.Nk.slice(0);
|
|
this._9=t;this.gU(W,h);this.OV=this.v3();return t!=-1};b4.prototype.a69=function(W,h,S,k){return this.wS(W,h,S.t.J,k)};
|
|
b4.prototype.wS=function(W,h,S,k){var p=-1,I=this.rY(),q=k?a.XQ({t:{J:S}},k):6*a.F()/S;if(p==-1)if(eC.fa(this.v3(),h)<q)p=9;
|
|
if(p==-1)for(var Q=0;Q<I.length;Q++)if(Q!=4&&eC.fa(I[Q],h)<q)p=Q;if(p==-1&&W&&W.j(hW.OM))p=9;if(p==-1||this.VS==4){if(this.bB(h)){if(this.acP)p=10}else{var P=this.o3(h,this.Nk),t=new gj(0,0,1,1);
|
|
t.x1(.2,.2);p=t.mA(P)&&this.VS!=3?11:10}}return p};b4.prototype.Go=function(W,h,S,k){if(this._9==-1)return;
|
|
this._K=k;var p=S.j(hW.YS),I=S.j(hW.OM),q=S.j(hW.Q9),P=W.t.J,t=this.g5,M=this._9,U=this.rY(),i=a.c0.Fy(W,t,h),z=a.c0.Fy(W,k,h),D,R;
|
|
if(M==9){var U=this.rY(),O=-1;for(var Q=0;Q<U.length;Q++)if(eC.fa(U[Q],z)*P<10)O=Q;this.k9=O==-1?9:O;
|
|
this.iH=p?a.z0.fh(i,z):z.clone()}else if(M==10){R=N.H.TA(this.EU);var b=R.x,w=R.y;R.offset(k.x-t.x,k.y-t.y);
|
|
if(this.yC()){R.x=Math.round(R.x);R.y=Math.round(R.y)}D=a.c0.Pp(W,R,h);var A=new ex(1,0,0,1,R.x-b+D[0],R.y-w+D[1]);
|
|
N.H.A(this.EU,A,this.Nk)}else if(M==11){var g=this.v3(this.EU),E=g.Xy(k),j=g.Xy(t),x=Math.atan2(E.y,E.x),d=Math.atan2(j.y,j.x),A=new ex(1,0,0,1,-g.x,-g.y),L=Math.PI/12;
|
|
if(p)A.rotate(Math.round((d-x)/L)*L);else A.rotate(d-x);A.translate(g.x,g.y);N.H.A(this.EU,A,this.Nk)}else{var _,T=this.EU,c=M==0||M==2||M==6||M==8;
|
|
if(this.VS==1){if(c)p=I=q=!0}else if(this.VS==2&&c&&this.a3S!=!0)q=!0;if(this.VS==3)q=!1;if(this.a6J&&c&&q){var Q=[0,0,2,0,0,0,6,0,4,0][M],e=-1,r=z.x,B=z.y;
|
|
if(p){var F=Q+6&7,v=Q+10&7,X=b4.PC(T[Q],T[Q+1],T[F],T[F+1],z.x,z.y),V=b4.PC(T[Q],T[Q+1],T[v],T[v+1],z.x,z.y),H=X[2]<V[2]?X:V;
|
|
r=H[0];B=H[1];if(I)e=X[2]<V[2]?F:v}else if(I)e=Q+4&7;_=T.slice(0);if(e!=-1){var o=T[e],J=T[e+1],C=(T[Q]+o)/2,Y=(T[Q+1]+J)/2;
|
|
_[e]=C-(r-C);_[e+1]=Y-(B-Y)}_[Q]=r;_[Q+1]=B}else if(c&&I){var g=this.OV,K=g.x,u=g.y,f=i.x-K,l=i.y-u,jk=1,hE=1;
|
|
if(Math.abs(f)>=1)jk=(z.x-K)/f;if(Math.abs(l)>=1)hE=(z.y-u)/l;if(p||this.Fp)jk=hE=(jk+hE)/2;var A=new ex;
|
|
A.translate(-K,-u);A.scale(jk,hE);A.translate(K,u);_=T.slice(0);N.H.A(_,A,_)}else{if(this.yC()){z.x=Math.round(z.x);
|
|
z.y=Math.round(z.y)}var Z=[0,1,2,5,8,7,6,3],aQ=Z[(Z.indexOf(M)+4)%8],jC=[];for(var Q=0;Q<3;Q++)for(var e=0;
|
|
e<3;e++)jC.push(new eC(e/2,Q/2));var g=this.OV,eO=this.o3(z,T),iU=this.o3(t,T),gK=I&&(this.k9==4||this.k9==9)?this.o3(g,T):jC[aQ],iM=new ex,i5=new ex,jk=(eO.x-gK.x)/(iU.x-gK.x);
|
|
if(jk==0)jk=1e-4;var hE=(eO.y-gK.y)/(iU.y-gK.y);if(hE==0)hE=1e-4;if(this.afC){jk=Math.max(jk,0);hE=Math.max(hE,0)}if(M==0||M==2||M==6||M==8){if(p||this.Fp)iM.scale(jk,jk);
|
|
else iM.scale(jk,hE)}if(M==1||M==3||M==5||M==7){var fN=this.Fp;if(M==1||M==7)iM.scale(fN?hE:1,hE);else iM.scale(jk,fN?jk:1);
|
|
if(this.amU&&q){if(M==1||M==7)i5.ZB=(eO.x-gK.x)/(eO.y-gK.y);else i5.S=(eO.y-gK.y)/(eO.x-gK.x)}}var A=new ex;
|
|
A.translate(-gK.x,-gK.y);A.concat(iM);A.concat(i5);A.translate(gK.x,gK.y);_=[0,0,1,0,1,1,0,1];N.H.A(_,A,_);
|
|
var H=N.V.ew(T);N.V.A(H,_)}if(b4.$O(_))this.Nk=_}this.gU(W,h);if(D)a.c0.Lb(W,R,D)};b4.PC=function(W,h,S,k,p,I){var q=S-W,P=k-h,t=p-W,M=I-h,U=q*q+P*P,i=t*q+M*P,z=i/U,D=W+z*q,R=h+z*P,O=p-D,b=I-R;
|
|
return[D,R,Math.sqrt(O*O+b*b)]};b4.prototype.yC=function(){var W=this.Nk;return Math.abs(W[1]-W[3])<1e-6&&Math.abs(W[2]-W[4])<1e-6||Math.abs(W[0]-W[2])<1e-6&&Math.abs(W[3]-W[5])<1e-6};
|
|
b4.$O=function(W){return N.H.t4(W)||N.H.t4([W[6],W[7],W[4],W[5],W[2],W[3],W[0],W[1]])};b4.prototype.he=function(W,h,S,k){this._9=-1;
|
|
this._K=null;W.L.pV=null;W.L.uj=[];W.Hx=!0};b4.prototype.ok=function(W,h,S){var k=S.zR();if(k.x||k.y){var p=new ex(1,0,0,1,k.x,k.y);
|
|
N.H.A(this.Nk,p,this.Nk);this.gU(W,h);return!0}return!1};b4.prototype.rY=function(W){if(W==null)W=this.Nk;
|
|
var h=W[6]-W[0],S=W[7]-W[1],k=W[4]-W[2],p=W[5]-W[3],I=[W[0],W[1],W[2],W[3],W[0]+h/2,W[1]+S/2,W[2]+k/2,W[3]+p/2,W[6],W[7],W[4],W[5]],q=[];
|
|
for(var Q=0;Q<3;Q++){var P=Q*4,t=I[P+0],M=I[P+1],U=I[P+2],i=I[P+3];q.push(new eC(t,M));q.push(new eC(t+(U-t)/2,M+(i-M)/2));
|
|
q.push(new eC(U,i))}return q};b4.prototype.gU=function(W,h,S){if(S==null)S=!1;var k=this.rY(),p=k[0],I=k[2],q=k[6],P=k[8];
|
|
W.L.i1={C:[],s:[]};W.L.i1.C.push("M","L","L","L","Z");W.L.i1.s.push(p.x,p.y,I.x,I.y,P.x,P.y,q.x,q.y);
|
|
var t=this.a9O;if(t>1){var M=I.Xy(p),U=q.Xy(p),i=P.Xy(I),z=P.Xy(q);for(var Q=1;Q<t;Q++){W.L.i1.C.push("M","L","M","L");
|
|
var D=Q/t;W.L.i1.s.push(p.x+M.x*D,p.y+M.y*D,q.x+z.x*D,q.y+z.y*D);W.L.i1.s.push(p.x+U.x*D,p.y+U.y*D,I.x+i.x*D,I.y+i.y*D)}}W.t.MD=new gj(0,0,eC.fa(k[0],k[2]),eC.fa(k[0],k[6]));
|
|
if(this._9!=-1&&this._9<9&&this._K){var R=W.t._c(this._K.x,this._K.y);a.vv.XB(R,W.t.MD,W,h)}if(!S){W.L.xV=[];
|
|
for(var Q=0;Q<k.length;Q++)if(Q!=4)W.L.xV.push(k[Q].x,k[Q].y);var O=this.v3();W.L.xV.push(O.x,O.y)}W.Hx=!0};
|
|
b4.prototype.clear=function(W){W.t.MD=null;W.L.pV=null;W.L.i1=null;W.L.xV=[];W.Hx=!0};function cG(W,h){this.DU=null;
|
|
this._9=-1;this._$(W)}cG.prototype.mY=function(){return JSON.parse(JSON.stringify(this.DU))};cG.prototype._$=function(W){this.DU=JSON.parse(JSON.stringify(W))};
|
|
cG.prototype.bB=function(W){return!0};cG.prototype.fe=function(W,h,S,k){var p=this.wS(W,h,k);if(p==-1)return"default";
|
|
return"pointer"};cG.prototype.Qb=function(W,h,S,k,p,I,q){this._9=this.wS(k,W.t.J,q);return this._9!=-1};
|
|
cG.prototype.wS=function(W,h,S){var k=this.pB(),p=-1,I=1e6;for(var Q=0;Q<k.length;Q++){var q=eC.fa(k[Q],W);
|
|
if(q<I){p=Q;I=q}}return I<(S?a.XQ({t:{J:h}},S)*2:20*a.F()/h)?p:-1};cG.prototype.Go=function(W,h,S,k){if(this._9==-1)return;
|
|
var p=W.t.J,I=this._9,q=N.DU.zL(this.DU);q[I*2]=k.x;q[I*2+1]=k.y;N.DU.P0(q,this.DU)};cG.prototype.he=function(W,h,S,k){this._9=-1;
|
|
W.Hx=!0};cG.prototype.ok=function(W,h,S){var k=S.zR();if(k.x||k.y){var p=new ex(1,0,0,1,k.x,k.y);N.H.A(this.Nk,p,this.Nk);
|
|
this.gU(W)}};cG.prototype.pB=function(W){var h=N.DU.zL(this.DU),S=[];for(var Q=0;Q<h.length;Q+=2)S.push(new eC(h[Q],h[Q+1]));
|
|
return S};cG.prototype.gU=function(W){var h=this.pB();W.L.i1={C:[],s:[]};W.L.i1.C.push("M","C","C","C","C");
|
|
var S=[0,1,2,3,7,11,15,14,13,12,8,4,0];for(var Q=0;Q<S.length;Q++)W.L.i1.s.push(h[S[Q]].x,h[S[Q]].y);
|
|
W.L.i1.C.push("M","L","L","M","L","L","M","L","L","M","L","L");S=[4,0,1,2,3,7,11,15,14,13,12,8];for(var Q=0;
|
|
Q<S.length;Q++)W.L.i1.s.push(h[S[Q]].x,h[S[Q]].y);W.L.xV=[];for(var Q=0;Q<h.length;Q++)W.L.xV.push(h[Q].x,h[Q].y);
|
|
W.Hx=!0};cG.prototype.clear=function(W){W.L.i1=null;W.L.xV=[];W.Hx=!0};function bH(){this.K6=!1;this.SB=!1;
|
|
this.a7k=!1;this.a0S=!1;this.qw=!1;this.lH=!1;this.B5=0;this.u0=0}bH.prototype.Qb=function(W){this.K6=!0;
|
|
this.SB=!1;this.qw=W.j(hW.YS);this.lH=W.j(hW.OM);this.B5=this.qw?0:1;this.u0=this.lH?0:1};bH.prototype.ok=function(W){var h=this.a0S=W.j(hW.YS),S=this.a7k=W.j(hW.OM);
|
|
if(this.SB){if(this.B5==0&&!h)this.B5++;if(this.B5==1&&h)this.B5++;if(this.u0==0&&!S)this.u0++;if(this.u0==1&&S)this.u0++}};
|
|
bH.prototype.Go=function(){this.SB=!0};bH.prototype.he=function(){this.K6=!1};bH.prototype.TE=function(Q){if(Q==0)return this.K6?this.lH:this.a7k;
|
|
if(Q==1)return this.SB?this.u0==2:!1};bH.prototype.n7=function(Q){if(Q==0)return this.K6?this.qw:this.a0S;
|
|
if(Q==1)return this.SB?this.B5==2:!1};a.History=function(){a.vv.call(this,"History",a.pD);this.co=!0;
|
|
this.anS=0};a.History.prototype=new a.vv;a.History.prototype.ca=function(W,h,S,k){S.WU=!0;if(W.o=="h_itemchange"){if(W.index<S.nT)for(var Q=S.nT;
|
|
Q>W.index;Q--)this.J1(S);if(W.index>S.nT)for(var Q=S.nT;Q<W.index;Q++)this.d7(S)}if(W.o=="h_stepfwd")this.d7(S);
|
|
if(W.o=="h_stepbck")this.J1(S);if(W.o=="h_undoredo"){var p=this.co||this.anS!=S.nT;if(p){this.J1(S);
|
|
p=!1}else{this.d7(S);p=!0}this.co=p;this.anS=S.nT}else this.co=!0};a.History.prototype.J1=function(W){if(W.nT==0)return;
|
|
var h=W.history[W.nT];h.b._i(h.data,W);W.nT--};a.History.prototype.d7=function(W){if(W.nT==W.history.length-1)return;
|
|
var h=W.history[W.nT+1];h.b.UN(h.data,W);W.nT++};a.X2=function(){a.vv.call(this,"Layers",a.m5);this.Vi=null};
|
|
a.X2.prototype=new a.vv;a.X2.prototype.ca=function(W,h,S,k,p){this.Vi=h;var I=W.o,q=W.i!=null?W.i:S.w.length!=0?S.w[0]:S.g.length-1,P=S.g[q];
|
|
S.tn=!0;var t=k.j(hW.OM),M=k.j(hW.YS),U=k.j(hW.Q9);if(I==$.Tp&&S.q==null&&(S.w.length>1||!S.xi(!1)))I=$.T2;
|
|
if(I==$.c9){var i=new h3([6,33],this),z=P.vc()?["pass"].concat(hd.wl):hd.wl,D=z[W.kN],R=W.i!=null?[W.i]:S.w,O=JSON.stringify(R),b=[];
|
|
for(var Q=0;Q<R.length;Q++)b.push(S.g[R[Q]].oO);i.data={o:I,Z$:O,jY:b,kN:D};S.nh(i);this.UN(i.data,S);
|
|
this.track(fP.cP("Md",{t:"enum",v:{BlnM:hd.iN(D)}}))}if(I==$.Jn){var i,w=S.c_(),R=W.i!=null?[W.i]:S.w,O=JSON.stringify(R);
|
|
if(w&&w.data&&w.data.o==I&&w.data.Z$==O)i=w;else{var A=fP.cP("Opct",{t:"UntF",v:{type:"#Prc",val:0}});
|
|
this.track(A);var b=[];for(var Q=0;Q<R.length;Q++)b.push(S.g[R[Q]].opacity);i=new h3([6,32],this);i.data={o:I,Z$:O,jY:b,kN:W.kN,Fc:A.b4};
|
|
S.nh(i)}i.data.kN=W.kN;i.data.Fc.T.v.Opct.v.val=Math.round(W.kN*100/255);this.UN(i.data,S)}if(I==$.mv){if(P.add.iOpa==null)P.add.iOpa=255;
|
|
var i,w=S.c_();if(w&&w.data&&w.data.o==I&&w.data.i==q)i=w;else{i=new h3("Fill Opacity Change",this);
|
|
i.data={o:I,i:q,jY:P.add.iOpa,kN:W.kN};S.nh(i)}i.data.kN=W.kN;this.UN(i.data,S)}if(I==$.q9){var g=W.kN,E=W.i!=null?[W.i]:S.w.slice(0),j=[],x=[],i;
|
|
for(var d=0;d<E.length;d++){var L=S.g[E[d]];if(L.add.lspf==null)L.add.lspf=0;var b=L.add.lspf,D=b;for(var Q=0;
|
|
Q<g[0].length;Q++){var _=g[1][Q],T=1<<_;if((D&T)==0&&g[0][Q])D^=T;else if((D&T)!=0&&!g[0][Q])D^=T}j.push(b);
|
|
x.push(D)}var w=S.c_(),R=JSON.stringify(E);if(w&&w.data&&w.data.o==I&&JSON.stringify(w.data.Z$)==R){i=w;
|
|
i.data.kN=x}else{var i=new h3([6,57,1],this);i.data={o:I,Z$:R,jY:j,kN:x};S.nh(i)}this.UN(i.data,S)}if(I==$.iP){var c="----",e=W.JC,D=null;
|
|
for(var Q=0;Q<aO.md.zs.length;Q++)if(P.add[aO.md.zs[Q]])c=aO.md.zs[Q];var r=P.add[c];if(e=="TySh")D=gf.hN(50,50,p.YF);
|
|
var i=new h3("Layer Type",this);i.data={o:I,i:q,asU:[c,r],JC:[e,D]};S.nh(i);this.UN(i.data,S)}if(I==$.EO){var E=[];
|
|
if(t){var B=S.c_(),F=B?B.data:null;if(B!=null&&B.b==this&&F.o==$.EO&&F.Z$.length!=1){var v=new em(y.E.u);
|
|
v.b=a.pD;v.data={o:"h_stepbck"};h.c(v);if(F.i==q)return}var X=S.root.rk(q),V=S.w$(null,q);while(X.parent!=S.root){V.push(X.parent.index);
|
|
X=X.parent}for(var Q=0;Q<S.g.length;Q++){var H=S.g[Q],o=H.jP(),J=V.indexOf(Q)!=-1;if(!J&&o)E.push(Q);
|
|
if(Q==q&&!o)E.push(Q)}}else{E.push(q);var o=S.g[q].jP(),A={HP:o?"hide":"show",b4:{classID:o?"Hd":"Shw",null:{t:"VlLs",v:[fP.gj("Lyr",!0)]}}};
|
|
this.track(A)}var i=new h3("Layer visibility",this,!0);i.data={o:I,Z$:E,i:q};S.nh(i);this.UN(i.data,S)}if(I==$.uR){var C=W.a8a,K=W._N,l,escape=!1,aQ=!1;
|
|
if(W.a8Q){if(U&&(K==0||K==1||K==2)){var u=0;if(M)u++;if(t)u+=2;var f=new em(y.E.u,!0);f.b=a.Ck;f.data={o:"fromlayer",cM:[W.i,K,u]};
|
|
h.c(f);return}}var A={HP:"select",b4:{classID:"null",MkVs:{t:"bool",v:!1}}};if(S.t.aL.join("")!="111"){S.t.aL=[1,1,1];
|
|
S.Hx=!0}for(var Q=0;Q<S.g.length;Q++){var H=S.g[Q],jk=H.add.vmsk;if(H.rB()){var hE=H.$U(S);if(hE&&hE.v&&hE.v.oz){hE.v.oz=!1;
|
|
S.Hx=!0}}var Z=H.kX();if(Z&&Z.oz){Z.oz=!1;S.Hx=!0}if(jk){if(jk.w.length!=0)jk.w=[];if(jk.OU.length!=0)jk.OU=[]}}if(k.j(hW.Q9)||W.aem==0){var jC=S.w.indexOf(q);
|
|
if(jC==-1)S.w.push(q);else if(S.w.length>1)S.w.splice(jC,1);S.w.sort(function(i,aw){return i-aw});A.b4.selectionModifier={t:"enum",v:{selectionModifierType:"addToSelection"}};
|
|
l=q}else if(M&&!t&&K>0){I=K==1?$.XE:K==2?$.Ei:$.K3;escape=!0}else if((M||W.aem==1)&&S.w.length>0){var eO=Math.min(q,S.w[0]),iU=Math.max(q,S.w[S.w.length-1]);
|
|
S.w=[];for(var Q=eO;Q<=iU;Q++)if(S.g[Q].add.lsct!=i1.aW)S.w.push(Q);A.b4.selectionModifier={t:"enum",v:{selectionModifierType:"addToSelectionContinuous"}};
|
|
l=q}else{l=q;if(q>=S.g.length)return;var H=S.g[q];if(H&&H.vc()&&W.asB)H.add.lsct=i1.wY;else if(S.w.length==1&&S.w[0]==q&&K==H.Yi){aQ=!0}if(!aQ){S.w=[q];
|
|
S.bO()}}if(!aQ){if(l!=null&&l<S.g.length){A.b4.null={t:"obj ",v:[{t:"name",v:{classID:"Lyr",val:S.g[l].getName()}}]},this.track(A)}if(!escape){console.log("no escape");
|
|
if(S.w.length==1){var gK=S.w[0];for(var Q=0;Q<S.g.length;Q++){if(Q==gK)continue;var L=S.g[Q];L.Yi=0;
|
|
L.AY=!1}var P=S.g[gK];if(K==2){P.AY=!P.AY;S.yQ=[]}else if(P){P.Yi=K<=0?0:K}}else for(var Q=0;Q<S.g.length;
|
|
Q++){var L=S.g[Q];L.Yi=0;L.AY=!1}S.sP=null;S.WU=!0}}if(W.a8Q&&t){if((K==1||K==3)&&C!=null){var f=new em(y.E.u,!0);
|
|
f.b=a.vD;f.data={o:"mskView",k:C!=0?0:M?1:2};h.c(f)}else{this.ca({o:$.Wk,i:W.i},h,S,k,p)}}}if(I==$.XE||I==$.K3){var iM=I==$.XE,i5=iM?P.kX():P.$U(S).v;
|
|
if(i5==null)return;var i=new h3(i5.isEnabled?iM?[6,15]:[6,42]:iM?[6,14]:[6,41],this);i.data={o:I,i:q};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.Ei){var i5=P.add.vmsk;if(i5==null)return;var i=new h3(i5.isEnabled?[6,17]:[6,16],this);
|
|
i.data={o:I,i:q};S.nh(i);this.UN(i.data,S)}if(I==$.pp){var fN=P.add.lsct==i1.wY?i1.O_:i1.wY;if(k.j(hW.Q9)){var dx=S.root.rk(S.g.indexOf(P)).parent;
|
|
for(var Q=0;Q<dx.children.length;Q++){var ai=dx.children[Q].i;if(ai.vc())ai.add.lsct=fN}}else P.add.lsct=fN;
|
|
S.WU=!0}if(I==$.Wk){if(!S.QR(q))return;var i=new h3(P.Vy?[6,19]:[6,18],this);i.data={o:I,i:q};S.nh(i);
|
|
if(W.kN==null||W.kN!=P.Vy)this.UN(i.data,S)}if(I==$.E5){if(P.t0())P.S5-=32;else P.S5+=32;S.WU=!0}if(I==$.ge||I==$.Ce){var i;
|
|
if(I==$.ge)i=new h3(P.add.lmfx.masterFXSwitch.v?[6,30]:[6,29],this);if(I==$.Ce)i=new h3(P.add.SoLd.filterFX.v.enab.v?[6,44]:[6,43],this);
|
|
i.data={o:I,i:q};S.nh(i);this.UN(i.data,S)}if(I==$.X5||I==$.tv){var gK=W.index,i;if(I==$.X5)i=new h3(P.add.lmfx[hz.BN[gK[0]]].v[gK[1]].v.enab.v?[6,30]:[6,29],this);
|
|
if(I==$.tv)i=new h3(P.add.SoLd.filterFX.v.filterFXList.v[gK].v.enab.v?[6,44]:[6,43],this);i.data={o:I,i:q,index:W.index};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.ya){if(W.src==W.AA)return;var hO=S.g[W.src],ff=S.g[W.AA],eP=hO.add.lmfx?JSON.stringify(hO.add.lmfx):"",a0=ff.add.lmfx?JSON.stringify(ff.add.lmfx):"";
|
|
if(ff.add.lmfx==null){ff.add.lmfx=JSON.parse(hz.default);for(var Q=0;Q<hz.order.length;Q++)ff.add.lmfx[hz.BN[Q]]={t:"VlLs",v:[]}}if(W.xL==null){ff.add.lmfx=JSON.parse(eP);
|
|
if(!t)delete hO.add.lmfx}else{var bM=W.xL[0],cV=hz.BN[bM];if(hz.ey.indexOf(hz.order[bM])==-1)ff.add.lmfx[cV].v=[];
|
|
ff.add.lmfx[cV].v.push(hO.add.lmfx[cV].v[W.xL[1]]);if(!t)hO.add.lmfx[cV].v.splice(W.xL[1],1)}var aX=hO.add.lmfx?JSON.stringify(hO.add.lmfx):"",j8=ff.add.lmfx?JSON.stringify(ff.add.lmfx):"";
|
|
if(!ff.t0())ff.S5+=32;var i=new h3("Move Layer Styles",this);i.data={o:I,fw:W.src,v4:W.AA,api:eP,akD:a0,ar1:aX,aiH:j8};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.vH){if(W.src!=null)q=W.src;var L=S.g[q],j3=JSON.stringify(L.add.SoLd),am=JSON.parse(j3),fG=am.filterFX.v.filterFXList.v;
|
|
fG.splice(W.xL,1);var i=new h3([6,53],this);i.data={o:$.Ut,cm:[{Cy:q,en:[j3,JSON.stringify(am)]}]};S.nh(i);
|
|
this.UN(i.data,S)}if(I==$.Fx){var bw=t,hO=S.g[W.src],ff=S.g[W.AA],fz=[];if(hO!=ff&&ff.add.SoLd==null){alert("Target layer is not a smart object!");
|
|
return}if(hO==ff&&!bw&&(W.xL==W.LR||W.xL==-1))return;var c6=hO.$U(S),j3=JSON.stringify(hO.add.SoLd),am=JSON.parse(j3),fG=am.filterFX.v.filterFXList.v;
|
|
if(hO==ff){fG.splice(W.LR,0,fG[W.xL]);if(!bw)fG.splice(W.xL+(W.xL<W.LR?0:1),1);fz.push({Cy:W.src,en:[j3,JSON.stringify(am)]})}else if(W.xL==-1){var hk=am.filterFX;
|
|
if(!bw){delete am.filterFX;fz.push({Cy:W.src,en:[j3,JSON.stringify(am)],xF:[c6,null]})}var as=ff.rB()?ff.$U(S):null,bf=jg.vg(c6),gW=JSON.stringify(ff.add.SoLd),j1=JSON.parse(gW);
|
|
j1.placed.v=bf.id;j1.filterFX=hk;fz.push({Cy:W.AA,en:[gW,JSON.stringify(j1)],xF:[as,bf]})}else{var bZ=fG[W.xL];
|
|
if(!bw){fG.splice(W.xL,1);fz.push({Cy:W.src,en:[j3,JSON.stringify(am)]})}var gW=JSON.stringify(ff.add.SoLd),j1=JSON.parse(gW);
|
|
if(j1.filterFX==null)j1.filterFX=hw.mG();var iL=j1.filterFX.v.filterFXList.v;iL.splice(W.LR,0,bZ);var jI={Cy:W.AA,en:[gW,JSON.stringify(j1)]};
|
|
if(!ff.rB()){var bf=jg.fj(ff.add.SoLd.placed.v);jI.xF=[null,bf]}fz.push(jI)}var i=new h3([6,52],this);
|
|
i.data={o:$.Ut,cm:fz};S.nh(i);this.UN(i.data,S)}if(I==$.fY){var i5=P.kX(),i=new h3(i5.ln?[6,26]:[6,25],this);
|
|
i.data={o:I,i:q};S.nh(i);this.UN(i.data,S);this.track({HP:"set",b4:{classID:"setd",null:{t:"obj ",v:[fP.gj("Lyr",!0)]},T:{t:"Objc",v:{classID:"Lyr",Usrs:{t:"bool",v:i5.ln}}}}})}if(I==$.gp){var i5=P.add.vmsk,i=new h3(i5.ln?[6,28]:[6,27],this);
|
|
i.data={o:I,i:q};S.nh(i);this.UN(i.data,S)}if(I==$.Bz){var e2=[],i;for(var Q=0;Q<S.w.length;Q++){var d=S.w[Q],H=S.g[d];
|
|
if(H.add.vogk)e2.push(d,JSON.stringify(H.add.vogk))}for(var Q=0;Q<S.yQ.length;Q++){var d=S.yQ[Q],H=S.mw[d];
|
|
if(H.add.vogk)e2.push(-1-d,JSON.stringify(H.add.vogk))}N.uy.apW(S,W.k);var dV=[];for(var Q=0;Q<S.w.length;
|
|
Q++){var d=S.w[Q],H=S.g[d];if(H.add.vogk)dV.push(d,JSON.stringify(H.add.vogk))}for(var Q=0;Q<S.yQ.length;
|
|
Q++){var d=S.yQ[Q],H=S.mw[d];if(H.add.vogk)dV.push(-1-d,JSON.stringify(H.add.vogk))}var w=S.c_();if(w&&w.data&&w.data.o==I){var ds=!0;
|
|
for(var Q=0;Q<e2.length;Q+=2)if(e2[Q]!=w.data.$f[Q])ds=!1;if(ds){i=w;i.data.Lg=dV}}if(i==null){var i=new h3([12,91,1],this);
|
|
i.data={o:I,$f:e2,Lg:dV};S.nh(i)}this.UN(i.data,S)}if(I==$.Uf){var ij=JSON.stringify(P.add.artb),dg=JSON.stringify(W.xD),i;
|
|
S.g[q].add.artb=JSON.parse(dg);var iT=new gj(0,0,S.e,S.Z),ej=a.JY.BK(S),w=S.c_();if(w&&w.data&&w.data.o==I&&w.data.i==q){i=w;
|
|
i.data.xD=dg}if(i==null){var i=new h3("Editing Artboard",this);i.data={o:I,i:q,a6j:ij,xD:dg,Im:iT};S.nh(i)}i.data.HF=ej;
|
|
this.UN(i.data,S)}if(I==$.b$){var dV=S.BS.slice(0),eH=S.ye.slice(0),d4=S.q,jy=S.q;if(W.s7=="fromAction"){var iR=W.k.HP,cD=W.k.b4;
|
|
if(iR=="make"||iR=="duplicate"){var cA=dV.length,d5=!1,jl=!1;if(S.bx())cA--;var d_=new $.Kt;d_.name="Alpha "+(cA+1);
|
|
if(iR=="make"){var dm=cD.Nw.v;d_.color=255;eH=[cA];d_.oz=!0;d_.uJ=dm.Opct.v;if(dm.Nm)d_.name=dm.Nm.v;
|
|
if(dm.classID=="SCch"){d5=!0;jy=null;d_.ez=1}}else{var hK=cD.null.v[0].v;if(hK.keyID=="fsel")d5=!0;else{var jj=a.I6.IB(S);
|
|
jy=a.I6.ES(S,jj);d_.color=0;d_.rect=jy.rect;d_.channel=jy.channel}}if(d5){d_.color=0;if(S.q){d_.rect=S.q.rect.clone();
|
|
d_.channel=S.q.channel.slice(0)}if(jl){d_.color=255-d_.color;N.uA(d_.channel)}}dV.splice(cA,0,d_)}else if(iR=="delete"){if(P&&P.kX()&&P.Yi==1){this.ca({o:$.o5},h,S,k,p);
|
|
return}var V=S.ye;V.sort(function(i,aw){return aw-i});if(V.length==0)return;for(var Q=0;Q<V.length;Q++)dV.splice(V[Q],1);
|
|
eH=[]}else if(iR=="hide"){dV[eH[0]]=dV[eH[0]].clone();dV[eH[0]].oz=!1}}if(W.s7=="rnm"){dV[W.Kr]=dV[W.Kr].clone();
|
|
dV[W.Kr].name=W.name}var i=new h3("Channel Edit",this);i.data={o:I,$f:S.BS.slice(0),MV:S.ye.slice(0),Lg:dV,LY:eH,k8:d4,mQ:jy};
|
|
this.UN(i.data,S);S.nh(i)}if(I==$.s9){var cf=new gj(0,0,S.e,S.Z),i=new h3(W.rO,this);i.data={o:$.s9,bv:S.g.slice(0),vR:W.vR,Jk:S.w.slice(0),wV:W.mQ};
|
|
S.nh(i);this.UN(i.data,S);var h5=a.JY.g$(S);if(h5){i.data.Im=cf;i.data.HF=h5}}if(I==$.Xr){var fn=S.w$(null,W.i),gO=1e10;
|
|
if(fn.length==0)return;if(S.g.length==fn.length){alert("Project must have at least 1 layer");return}var bY=[];
|
|
for(var Q=0;Q<S.g.length;Q++)if(fn.indexOf(Q)==-1)bY.push(S.g[Q]);for(var Q=0;Q<fn.length;Q++)gO=Math.min(gO,fn[Q]);
|
|
gO=Math.max(gO-1,0);while(bY[gO].name=="</Layer group>")gO++;this.track({HP:"delete",b4:{classID:"Dlt",null:fP.gj("Lyr",!0)}});
|
|
var i=new h3([6,31],this);i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:[gO]};S.nh(i);this.UN(i.data,S)}if(I==$.pw){if(!k.j(hW.YS))return;
|
|
var i=new h3("Switch Layer Link",this);i.data={o:I,i:W.i};S.nh(i);this.UN(i.data,S)}if(I==$.l4){var V=W.abN?W.abN:S.w,h6=0,jm=!1;
|
|
if(V.length==0)return;if(V.length==1&&S.g[V[0]].RL==0){alert(dq.get([15,7,5]));return}var g4=[];for(var Q=0;
|
|
Q<S.g.length;Q++){var fB=S.g[Q].RL;g4.push(fB);h6=Math.max(h6,fB)}var hh=-1,fv=-1;for(var Q=0;Q<V.length;
|
|
Q++){var fB=S.g[V[Q]].RL;if(fB==0)jm=!0;else if(hh==-1||hh==fB)hh=fB;else fv=fB}if(!jm)for(var Q=0;Q<V.length;
|
|
Q++)S.g[V[Q]].RL=0;else if(hh!=-1&&fv==-1)for(var Q=0;Q<V.length;Q++)S.g[V[Q]].RL=hh;else for(var Q=0;
|
|
Q<V.length;Q++)S.g[V[Q]].RL=h6+1;var ik=[];for(var Q=0;Q<S.g.length;Q++){var fB=S.g[Q].RL;if(ik[fB]==null)ik[fB]=0;
|
|
ik[fB]++}for(var Q=0;Q<S.g.length;Q++){var fB=S.g[Q].RL;if(ik[fB]==1)S.g[Q].RL=0}var gP=g4;g4=[];for(var Q=0;
|
|
Q<S.g.length;Q++){var fB=S.g[Q].RL;g4.push(fB);h6=Math.max(h6,fB)}var i=new h3(jm?[6,54,0]:[6,54,1],this);
|
|
i.data={o:$.l4,ahW:gP,a3Q:g4};S.nh(i);this.UN(i.data,S)}if(I==$.T2&&(W.i!=null||S.w.length!=0)||I==$.H8){var cU=S.Cf(I==$.T2?W.i:q,null,W.a1P),dL;
|
|
if(I==$.H8){var L=cU[0],iR=L.add.SoLd.Idnt.v,es=S.L5(iR).clone();L.add.SoLd.Idnt.v=es.SI=jg.bm()+iR.slice(8);
|
|
S.add.lnk2.push(es)}if(I==$.T2){var i6={HP:"duplicate",b4:{classID:"null",null:fP.gj("Lyr",!0)}};if(W.bZ){cU[0].hq(W.bZ);
|
|
i6.Nm={t:"TEXT",v:W.bZ}}this.track(i6);W.aoD=W.i}I=$.W$;W.g=cU;W.P4=S;W.zp=S}if(I==$.W$){var ap,ix,hT=W.P4,bE=W.zp,fa=0,dP=0,bB=!1,j0=0,he=0;
|
|
if(hT!=bE){console.log("ADDLAYERS different projs");var ap=new gj(0,0,hT.e,hT.Z),ix=new gj(0,0,bE.e,bE.Z),f7=[],b6=[];
|
|
for(var Q=0;Q<W.g.length;Q++){var L=W.g[Q];if(L.add.SoLd==null)continue;var iR=L.add.SoLd.Idnt.v;if(f7.indexOf(iR)==-1){f7.push(iR);
|
|
b6.push(jg.bm()+iR.slice(8))}L.add.SoLd.Idnt.v=b6[f7.indexOf(iR)];var c6=L.$U(hT);if(c6){hT.rw(c6);bE.iI(c6)}}if(f7.length>0){if(bE.add.lnk2==null)bE.add.lnk2=[];
|
|
for(var Q=0;Q<f7.length;Q++){var bJ=hT.L5(f7[Q]),es=bJ.clone();es.SI=b6[Q];bE.add.lnk2.push(es)}}}var d4=bE.w.slice(0);
|
|
d4.sort(function(i,aw){return i-aw});var bY=bE.g.slice(0),jy=[],hu=-1;for(var Q=0;Q<d4.length;Q++)hu=Math.max(hu,d4[Q]);
|
|
if(W.aoD!=null)hu=W.aoD;var aU=hT.By();if(W.cf){hu=W.cf-1;var hf=bE.g[W.cf].rp();fa+=hf.x;dP+=hf.y}if(aU!=-1&&(hT!=bE||W.cf)){var hL=hT.g[aU].rp();
|
|
fa-=hL.x;dP-=hL.y}var ci=bE.A_();hu++;for(var Q=0;Q<W.g.length;Q++){var H=W.g[Q],ia=H.add.artb;bY.splice(hu,0,H);
|
|
jy.push(hu);hu++;if(ia){var hm=ia.guideIndeces;if(hm){hm=hm.v;console.log(hm);for(var f3=0;f3<hm.length;
|
|
f3++){ci[0].push(hT.r4[hm[f3].v].slice(0));ci[1].push(bY.indexOf(H));bB=!0}}}}for(var Q=0;Q<W.g.length;
|
|
Q++){var H=W.g[Q];if(P.add.lsct==i1.aW){if(j0==0)he++;j0++}else if(H.vc())j0--}if(he==1)jy=[hu-1];var i=new h3([6,0],this);
|
|
i.data={o:$.s9,bv:bE.g.slice(0),vR:bY,Jk:d4,wV:jy};if(bB){i.data.WN=[bE.A_(),ci]}bE.nh(i);this.UN(i.data,bE);
|
|
if(fa!=0||dP!=0)a.c0.eg(bE,bE.w$(),null,fa,dP)}if(I==$.D7){var c9=W.i!=null?[W.i]:S.w$(),bY=S.g.slice(0);
|
|
for(var Q=0;Q<c9.length;Q++){var H=S.g[c9[Q]].clone();H.DF(S);bY.splice(c9[Q],1,H)}var i=new h3([6,8],this);
|
|
i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:S.w.slice(0)};S.nh(i);this.UN(i.data,S)}if(I==$.JE){var bY=S.g.slice(0),H=bY[S.w[0]]=bY[S.w[0]].clone(),hC=H.add.lmfx,fl=0;
|
|
delete H.add.lmfx;var ic=N.U(H.rect.n());N.sN(H.buffer,ic,3);var bW=jO.Mt(hC,null,ic,H.rect,S,H.rect).type;
|
|
for(var Q=0;Q<hz.order.length;Q++){var hP=hz.order[Q],aF=bW[hP],j7=Q>7;for(var f3=0;f3<aF.length;f3++){var cz=aF[f3],R=S.yA();
|
|
R.oO=cz.Ah;R.opacity=Math.round(255*cz.nC);R.Vy=!j7;R.buffer=cz.vM;R.rect=cz.iG;R.rect.offset(H.rect.x,H.rect.y);
|
|
R.hq(H.getName()+"'s "+dq.get(hz.names[Q]));bY.splice(S.w[0]+(j7?0:1),0,R);if(j7)fl++}}var i=new h3("Styles to Layers",this);
|
|
i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:[S.w[0]+fl]};S.nh(i);this.UN(i.data,S)}if(I==$.O0){var c9=S.w$(),bY=S.g.slice(0),iO=new gj(0,0,S.e,S.Z);
|
|
for(var Q=0;Q<c9.length;Q++){var jD=S.g[c9[Q]],dy=jD.jP();jD.NN(!0);var iY=S.root.rk(c9[Q]);if(jD.vc())continue;
|
|
if(iY==null)continue;var H=jD.clone();H.DF(S);var jN=iY.wT(S,!0),eB=S.g;S.WV([jD]);S.G();S.f4();H.buffer=N.U(jN.n()*4);
|
|
N.zt(S.jc(),iO,H.buffer,jN);H.rect=jN;H.opacity=255;H.add.iOpa=255;H.oO="norm";H.G();H.zy.$S=!0;S.WV(eB);
|
|
if(H.add.lmfx)delete H.add.lmfx;H.v=H.Yf=null;bY.splice(c9[Q],1,H);H.NN(dy);jD.NN(dy)}var i=new h3([6,34],this);
|
|
i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:S.w.slice(0)};S.nh(i);this.UN(i.data,S)}if(I==$.fP){var c9=S.w$(),bY=S.g.slice(0);
|
|
for(var Q=0;Q<c9.length;Q++){var H=S.g[c9[Q]],gV=H.add.TySh;if(gV==null)continue;var L=new a1(gV.MW,p.Tm),je=N.H.Rc(jE.rK(L,gV));
|
|
for(var bo in je){var gt=je[bo],ai=H.clone();delete ai.add.TySh;ai.S5=ai.S5|1<<4;ai.add.SoCo=JSON.parse(JSON.stringify(hz.$Z[0]));
|
|
var i_=ai.add.SoCo.Clr.v;i_.Rd.v=parseInt(bo.slice(1,3),16);i_.Grn.v=parseInt(bo.slice(3,5),16);i_.Bl.v=parseInt(bo.slice(5,7),16);
|
|
var fF=new $.CP;fF.T=N.H.aD(gt,!1);if(ai.add.vmsk!=null){ai.add.vmsk.a4a();fF.concat(ai.add.vmsk)}ai.add.vmsk=fF;
|
|
ai.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));ai.lq();ai.r9(S);bY.splice(bY.indexOf(H),0,ai)}bY.splice(bY.indexOf(H),1)}var jy=S.w.slice(0);
|
|
for(var Q=jy.length-1;Q>=0;Q--)if(jy[Q]>=bY.length)jy.splice(Q,1);var i=new h3([6,40],this);i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:jy};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.zI){var dQ=S.w.length;if(dQ<2){alert("Select two or more layers.");
|
|
return}if(!S.KO())return;var ai=S.g[S.w[0]].clone(),bY=[];for(var Q=0;Q<S.g.length;Q++)if(S.w.indexOf(Q)==-1)bY.push(S.g[Q]);
|
|
bY.splice(S.w[0],0,ai);for(var Q=1;Q<dQ;Q++)if(S.g[S.w[Q]].rect.n()>2e6){alert("Blended areas are too large.");
|
|
return}for(var Q=1;Q<dQ;Q++){var H=S.g[S.w[Q]],bC=H.rect.clone();bC.x1(1,1);var aw=N.U(bC.n()*4);N.zt(H.buffer,H.rect,aw,bC);
|
|
ai.extend(bC);var e$=N.U(bC.n()*4);N.zt(ai.buffer,ai.rect,e$,bC);var i=N.U(bC.n());N.sN(aw,i,3);N.round(i,200);
|
|
N.ce(i,aw,3);N.a.ha("norm",aw,bC,e$,bC,bC,1);N.Uz.Lh(e$,i,bC);N.zt(e$,bC,ai.buffer,ai.rect)}var i=new h3([2,10,0],this);
|
|
i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:[S.w[0]]};S.nh(i);this.UN(i.data,S)}if(I==$.J_){var bY=S.g.slice(0),eH=S.w.slice(0);
|
|
for(var Q=0;Q<bY.length;Q++){var H=bY[Q],jk=H.add.vmsk;if(H.rG()&&jk&&H.add.vstk.strokeEnabled.v&&!H.add.vstk.fillEnabled.v){var ak=jk.T,fO=0,cX=-1;
|
|
for(var f3=0;f3<ak.length;f3++){if((ak[f3].type==0||ak[f3].type==3)&&ak[f3].VZ!=-1){fO++;if(ak[f3].type==3&&cX==-1){ak[f3].pt=ak[f3].VZ=1;
|
|
cX=f3}}}if(fO>1&&cX!=-1){console.log("separating an open path into a new layer");H=H.clone();jk=H.add.vmsk;
|
|
ak=jk.T;var R=ak[cX].length,jd=H.clone();jd.add.lyid=S.sY();jk.T=ak.slice(0,2).concat(ak.slice(cX,cX+R+1));
|
|
jk.w=[];H.r9(S);H.G();var d8=jd.add.vmsk.T;jd.add.vmsk.T=d8.slice(0,cX).concat(d8.slice(cX+R+1,d8.length));
|
|
jd.add.vmsk.w=[];jd.r9(S);bY[Q]=H;bY.splice(Q+1,0,jd);for(var f3=0;f3<eH.length;f3++)if(eH[f3]>Q)eH[f3]++;
|
|
var ei=eH.indexOf(Q);if(ei!=-1){eH.splice(ei+1,0,Q+1)}}}}if(bY.length!=S.g.length){var i=new h3("Splitting open paths",this);
|
|
i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:eH};S.nh(i);this.UN(i.data,S)}}if(I==$.JT){this.ca({o:$.J_},h,S,k,p);
|
|
var d4=S.w.slice(0),eB=S.g.slice(0),c9=S.w$();if(c9.length==0)return;S.Sy(c9,!1,W.t8);var i=new h3([6,36,0],this);
|
|
i.data={o:$.s9,bv:eB,vR:S.g.slice(),Jk:d4,wV:S.w.slice(0)};S.nh(i);this.UN(i.data,S)}if(I==$.sX){var j3=P.add.SoLd;
|
|
if(j3==null)return;var iR=j3.Idnt.v,ge=S.L5(iR);ge.jc(!1);var fW=ge.xJ[0],bC=ge.xJ[1];if(N.V6(fW)){alert("The smart object contains transparency.");
|
|
return}var i$=hI.J$("jpg").i4([[fW.buffer]],bC.e,bC.Z,[90]);this.ca({o:$.Cb,om:S,data:new Uint8Array(i$),id:iR,t8:"jpg"},h,S,k,p);
|
|
console.log(S.add);return}if(I==$.Cb){var bJ=W.om.L5(W.id),es=bJ.clone();es.raw=W.data;if(W.Is)es.Is=W.Is;
|
|
if(W.t8){es.XS=" ";es.eY=" ";es.Is=es.Is+"."+W.t8}else{es.XS="8BIM";es.eY="8BPB";es.Is=es.Is+".psd"}es.jc(!1);
|
|
bJ.jc(!1);var i=new h3([6,36,1],this);i.data={o:$.Cb,id:W.id,nq:bJ,oP:es};W.om.nh(i);this.UN(i.data,W.om)}if(I==$.iX){var i=new h3([6,36,4],this);
|
|
i.data={o:I,i:q,U0:P.add.SoLd.Impr.v.classID,kN:W.kN};S.nh(i);this.UN(i.data,S)}if(I==$.xR){var dW,hs;
|
|
if(W.Ok){dW=W.om;hs=W.Ok}else{W.om.fG();W.om.nF();W.om.G();W.om.f4();W.om.jc();dW=hI.J$("PSD").i4(W.om,0,0,[!0,!0]);
|
|
hs=W.om.name}if(!(dW instanceof ArrayBuffer))throw"e";dW=new Uint8Array(dW);var jC=W.sq;if(jC==null){if(S.w.length==0)jC=S.w.length;
|
|
else{var hq=S.w[S.w.length-1],R=S.g[hq];jC=R.vc()?hq:hq+1}}var bc=new gj(0,0,S.e,S.Z),bu=S.By();if(bu!=-1)bc=S.g[bu].rp();
|
|
var aN=S.vN(dW,hs,0,0,bc),bY=S.g.slice(0);bY.splice(jC,0,aN);var i=new h3([6,36,2],this);i.data={o:$.s9,bv:S.g.slice(),vR:bY,Jk:S.w.slice(0),wV:[bY.indexOf(aN)]};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.wU&&W.s7=="merge"){var c2=[],al=S.root.children,cW=0;for(var Q=0;Q<al.length;
|
|
Q++){var X=al[Q],H=X.i,fR=X.children,a6=!0;if(!H.vc()||fR.length==0)continue;for(var f3=0;f3<fR.length;
|
|
f3++)if(!fR[f3].i.getName().startsWith("_a_")){a6=!1;break}if(a6)c2.push(S.g.indexOf(H))}var eJ=[];for(var Q=0;
|
|
Q<c2.length;Q++)if(S.w.indexOf(c2[Q])!=-1)eJ.push(c2[Q]);if(eJ.length>=2)c2=eJ;if(c2.length<2){alert("At least two animation folders needed (whose layers start with \"_a_\").",3500);
|
|
return}var bG=[];for(var Q=0;Q<c2.length;Q++)bG.push(S.g[c2[Q]].getName());var aF=[];for(var iW=0;iW<c2.length;
|
|
iW++){var X=S.root.rk(c2[iW]),jI=[[],[],0,iW];aF.push(jI);for(var Q=0;Q<X.children.length;Q++){var d=X.children[Q].index,H=X.children[Q].i,d_=H.getName(),eU=20,fU=d_.split(",");
|
|
if(fU.length>1){var eW=parseInt(fU.pop());if(!isNaN(eW)&&eW!=0)eU=eW}jI[0].push(H);jI[1].push(eU);jI[2]+=eU}}aF.sort(function(i,aw){return aw[2]-i[2]});
|
|
var jJ=aF[0],hH=jJ[2];for(var bj=1;bj<aF.length;bj++){var jI=aF[bj],io=1,is=jI[1].slice(0),de=0;while((io+1)*jI[2]<=jJ[2]){io++;
|
|
is=is.concat(jI[1])}jI[1]=is;jI[2]*=io;var gD=jJ[2]/jI[2];for(var Q=0;Q<jI[1].length;Q++){var gG=Math.floor(jI[1][Q]*gD);
|
|
jI[1][Q]=gG;de+=gG}while(de<hH){de++;jI[1][jI[1].length-1]++}jI[2]=de}var id=[],h_=[],gG=[];for(var Q=0;
|
|
Q<aF.length;Q++){id.push(0);h_.push(0)}while(cW<hH){var en=1e9,cA=-1;for(var Q=0;Q<aF.length;Q++){var iZ=aF[Q][1],dh=id[Q];
|
|
if(dh!=iZ.length&&h_[Q]+iZ[dh]<cW+en){cA=Q;en=h_[Q]+iZ[dh]-cW}}h_[cA]+=aF[cA][1][id[cA]];id[cA]++;if(en!=0){gG.push(en);
|
|
cW+=en}}for(var Q=1;Q<gG.length;Q++){var ef=gG[Q];if(ef<16&&(gG[Q-1]<16||Q<gG.length-1&&16<=gG[Q+1])){gG[Q-1]+=ef;
|
|
gG.splice(Q,1);Q--}}var dy=[],iO=new gj(0,0,S.e,S.Z);for(var Q=0;Q<S.g.length;Q++){dy[Q]=S.g[Q].jP();
|
|
S.g[Q].NN(!1)}var az=S.w.slice(0);S.w=c2;var fn=S.w$();fn.sort(function(i,aw){return i-aw});var bY=[];
|
|
for(var Q=0;Q<S.g.length;Q++){if(fn.indexOf(Q)==-1)bY.push(S.g[Q])}aF.sort(function(i,aw){return i[3]-aw[3]});
|
|
function cp(iZ,j2){var Q=0,hF=0;while(hF+iZ[Q]<=j2){hF+=iZ[Q];Q++}return Q}cW=0;bY.splice(fn[0],0,S.Iq());
|
|
for(var b3=0;b3<gG.length;b3++){var E=[];for(var Q=0;Q<aF.length;Q++){var dh=cp(aF[Q][1],cW)%aF[Q][0].length,H=aF[Q][0][dh];
|
|
E.push(H)}var H=S.yA();for(var Q=0;Q<aF.length;Q++){var da=E[Q],dx=S.g[c2[Q]];da.NN(!0);dx.NN(!0)}S.G();
|
|
S.f4();var fW=S.jc();H.rect=N.ow(fW,iO,2);H.buffer=N.U(H.rect.n()*4);N.zt(fW,iO,H.buffer,H.rect);for(var Q=0;
|
|
Q<aF.length;Q++){var da=E[Q],dx=S.g[c2[Q]];da.NN(!1);dx.NN(!1)}H.NN(b3==0);H.hq("_a_frm"+b3+","+gG[b3]);
|
|
bY.splice(fn[0]+1+b3,0,H);cW+=gG[b3]}var H=S.yA();H.hq(bG.join(" + "));H.oO="pass";H.add.lsct=i1.O_;
|
|
H.S5=24;bY.splice(fn[0]+1+gG.length,0,H);for(var Q=0;Q<S.g.length;Q++)S.g[Q].NN(dy[Q]);var i=new h3([6,12,0],this);
|
|
i.data={o:$.s9,bv:S.g,vR:bY,Jk:az,wV:[fn[0]+1+gG.length]};S.nh(i);this.UN(i.data,S)}if(I==$.JD||I==$.m7||I==$.sA){var eB=S.g.slice(0),d4=S.w.slice(0),fs=!0,aN,jy;
|
|
if(I==$.JD)S.w=[q,q-1];if(I==$.sA){S.w=[];for(var Q=0;Q<S.g.length;Q++)if(S.g[Q].jP())S.w.push(Q)}var c9=S.w$();
|
|
c9.sort(function(i,aw){return i-aw});var gg=new gj,iO=new gj(0,0,S.e,S.Z);for(var Q=0;Q<c9.length;Q++){var d=c9[Q],H=S.g[d];
|
|
fs=fs&&H.rG()&&H.add.vmsk!=null;gg=gg.r8(S.root.rk(d).wT(S,!0))}if(fs){aN=S.g[c9[0]].clone();var jk=aN.add.vmsk;
|
|
for(var Q=1;Q<c9.length;Q++){var R=S.g[c9[Q]],d8=$.CP.uW(R.add.vmsk.T);jk.T=jk.T.concat(d8.slice(2));
|
|
aN.add.vogk=aN.add.vogk.concat(JSON.parse(JSON.stringify(R.add.vogk)))}aN.add.vmsk.VT=!0;aN.r9(S)}else if(iO.LH(gg)){aN=S.yA();
|
|
aN.hq(S.g[c9[c9.length-1]].getName());aN.rect=gg;aN.buffer=N.U(gg.n()*4);var jB=S.jc(c9);N.zt(jB,iO,aN.buffer,gg);
|
|
aN.Yn();aN.G()}else{S.Sy(c9,!0);aN=S.g[S.w[0]];S.g.splice(S.w[0],1);var cS=S.L5(aN.add.SoLd.Idnt.v);
|
|
S.add.lnk2.splice(S.add.lnk2.indexOf(cS),1);delete aN.add.SoLd}var fq=t,ii=-1;if(W.b4&&W.b4.Dplc&&W.b4.Dplc.v)fq=!0;
|
|
if(fq&&I==$.sA&&S.g[d4[0]].p2()&&S.g[d4[0]].rect.ZP()){ii=d4[0]}if(ii!=-1||I==$.JD){var fZ=S.g[ii!=-1?ii:q-1];
|
|
aN.hq(fZ.getName());aN.add.lclr=fZ.add.lclr}var bY=[];for(var Q=0;Q<S.g.length;Q++)if(fq||c9.indexOf(Q)==-1)if(Q!=ii)bY.push(S.g[Q]);
|
|
var h2=c9[c9.length-1],cC=h2==S.g.length-1?null:S.g[h2+1],jG=cC?bY.indexOf(cC):bY.length;bY.splice(jG,0,aN);
|
|
jy=[jG];var i=new h3([6,12,0],this);i.data={o:$.s9,bv:eB,vR:bY,Jk:d4,wV:jy};S.nh(i);this.UN(i.data,S)}if(I==$.lQ){var ai=S.yA();
|
|
ai.rect=new gj(0,0,S.e,S.Z);ai.buffer=N.U(ai.rect.n()*4);N.wM(ai.buffer,4294967295);N.a.ha("norm",S.jc(),ai.rect,ai.buffer,ai.rect,ai.rect,1);
|
|
ai.hq("Background");ai.add.lspf=1<<2;var i=new h3([6,12,1],this);i.data={o:$.s9,bv:S.g.slice(),vR:[ai],Jk:S.w.slice(0),wV:[0]};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.gL||I==$.xP||I==$.yU||I==$.tN||I==$.Tp){var H=I==$.Tp?S.Cf()[0]:S.yA(),dU=dq.get([0,3]),aZ=W.bZ,eo=!1,hQ,bV;
|
|
if(I==$.yU)dU=dq.get([12,76,1]);if(I==$.Tp){if(S.q){var jD=S.g[S.w[0]],h9=jD.if(S,S.q);if(h9==null){alert("Copied area is empty");
|
|
return}H.rect=h9.rect;H.buffer=h9.zz;H.DF(S)}else aZ=H.getName();H.add.lspf=0;H.Vy=!1;if((H.S5&1)!=0)H.S5--}if(I==$.tN){H.rect=a.X2.u8(W.La,S);
|
|
H.buffer=W.La.buffer.slice(0);if(W.Xc&&S.q){H.v=new $.Kt;H.v.rect=S.q.rect;H.v.color=0;H.v.channel=S.q.channel.slice(0)}}if(I==$.gL){this.track({HP:"make",b4:{classID:"Mk",null:fP.gj("Lyr")}})}if(I==$.xP){H.S5|=16;
|
|
var jx=W.b4.Usng.v,c7=jx.Type.v,hy=bS.Sd[c7.classID];dU=dq.get(bS.names[hy]);if(jx.Nm)aZ=jx.Nm.v;H.add[hy]=hw.QE(hy);
|
|
if(H.add[hy]==null)H.add[hy]={};for(var jb in c7)H.add[hy][jb]=JSON.parse(JSON.stringify(c7[jb]));H.v=a.X2.WI(S)}if(I==$.yU){H.S5|=16;
|
|
var cD=W.b4,jx=cD.Usng.v,b$=jx.Type.v,an=jx.Shp;if(jx.Nm)aZ=jx.Nm.v;if(an==null){var ez=S.O4(),je=ez[0],il=ez[1];
|
|
if(il.length!=0){var i7=je[il[0]].add;H.add.vmsk=i7.vmsk.clone();H.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));
|
|
H.add.vogk=JSON.parse(JSON.stringify(i7.vogk));S.yQ=[]}else H.v=a.X2.WI(S)}else{console.log(jx);H.add.vmsk=new $.CP;
|
|
H.add.vstk=JSON.parse(JSON.stringify(jx.strokeStyle?jx.strokeStyle.v:hz.EJ.default));H.add.vogk=[];if(an){var ah=N.uy.Gt(an);
|
|
if(ah){H.add.vogk=[ah];H.add.vmsk.T.push({type:0,VZ:1,length:0});N.uy.ie(H.add.vogk,H.add.vmsk)}else{an=an.v;
|
|
var gN=an.classID;if(gN=="Plgn"){var dv=an.Cntr.v,hL=an.corner.v;dv=new eC(dv.Hrzn.v.val,dv.Vrtc.v.val);
|
|
hL=new eC(hL.Hrzn.v.val,hL.Vrtc.v.val);H.add.vmsk.T=N.$.Te.E1(dv.x,dv.y,Math.sqrt(hL.x*hL.x+hL.y*hL.y),Math.atan2(hL.y,hL.x),an.sides.v,0)}else if(gN=="customShape"){var d1=N.uy.em(an),a_=d1[2]-d1[0],jK=d1[3]-d1[1],gU=p.Ng,bt,iV;
|
|
for(var Q=0;Q<gU.length;Q++)if(gU[Q].J2==an.Nm.v)bt=gU[Q];if(bt){iV=$.CP.uW(bt.T);N.$.ac(iV,new ex(a_,0,0,jK,d1[0],d1[1]))}else iV=N.$.Te.Rect(d1[0],d1[1],a_,jK,0);
|
|
H.add.vmsk.T=iV}H.lq()}}}var co={solidColorLayer:0,gradientLayer:1,patternLayer:2}[b$.classID],c4=["SoCo","GdFl","PtFl"][co];
|
|
H.add[c4]=JSON.parse(JSON.stringify(hz.$Z[co]));a.X2.GB(b$,H.add[c4],co);if(an==null)dU=dq.get([6,48,0,co]);
|
|
if(c4=="PtFl"){var cE=H.add[c4].Ptrn.v,fU=jO.W4(cE,p.n5);cE.Idnt.v=fU.id;S.WX(fU)}H.r9(S)}var dQ=a.X2.mC(S,dU+" ");
|
|
H.hq(dU+" "+(dQ+1));if(aZ)H.hq(aZ);var dc=S.w.length==0?S.g.length-1:S.w[S.w.length-1],hN=S.g[dc];if(I==$.yU&&hN.p2()&&hN.rect.ZP()){eo=!0;
|
|
H.hq(hN.getName());hQ=dc}else{hQ=dc+(I==$.gL&&U&&!M?0:1);if(hN&&hN.add.lsct==i1.wY)hQ--}if(W.adR)hQ=Math.max(0,hQ-1);
|
|
var bY=S.g.slice(0);bY.splice(hQ,eo?1:0,H);var iJ=[5,2];if(I==$.gL)iJ=[6,13];if(I==$.xP)iJ=[6,1];if(I==$.yU){iJ=[6,48,1];
|
|
var an=W.b4.Usng.v.Shp;if(an){var ad={Rctn:[10,32],Ln:[10,35],Elps:[10,33],Plgn:[12,93,0],customShape:[10,31]}[an.v.classID];
|
|
if(ad)iJ=ad}}if(I==$.Tp){iJ=[6,49]}if(I==$.Tp||I==$.yU||I==$.tN)if(S.q)bV=[S.q,null];var i=new h3(iJ,this);
|
|
i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:[hQ],jO:bV};S.nh(i);this.UN(i.data,S);if(I==$.yU&&an==null&&co!=0||I==$.xP){var fI=new em(y.E.W);
|
|
fI.data={o:y.D.QN,DG:bn.zn.a0};h.c(fI)}}if(I==$.fg){var H=S.yA(),dU=dq.get([0,4]),dQ=a.X2.mC(S,dU+" ");
|
|
H.hq(dU+" "+(dQ+1));H.oO="pass";H.add.lsct=i1.wY;H.S5=24;if(W.bZ)H.hq(W.bZ);if(W.uM!=null)H.add.lclr=W.uM;
|
|
var bR=S.Iq(),dc=q,hQ=dc+(U?0:1),bY=S.g.slice(0);bY.splice(hQ,0,bR,H);var i=new h3([6,20],this);i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:[hQ+1]};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.sO||I==$.Ar){var gA=I==$.sO?W.source:S.w[0],gM,cM,d2=S.w.indexOf(gA)!=-1,fJ=t|W.ab8,g7,en=null;
|
|
if(d2)g7=S.w$();else g7=S.RS(gA);g7.sort(function(i,aw){return i-aw});if(I==$.sO){gM=W.target;cM=W.hb>.5}else if(W.target!=null){gM=Math.min(W.target,S.g.length-1);
|
|
cM=W.target<S.g.length;S.rm=!0}else{var bO=W.s7;cM=bO>1;if(bO==0){gM=S.g.length-1}if(bO==1){gM=g7[g7.length-1]+1;
|
|
var R=S.RS(gM);if(R.indexOf(gA)==-1)gM+=R.length-1}if(bO==2){gM=g7[0]-1;var R=S.RS(gM);if(R.indexOf(gA)==-1)gM-=R.length-1}if(bO==3){gM=0}if(gM<0||gM>S.g.length-1)return;
|
|
S.rm=!0}if(g7.indexOf(gM)!=-1&&!fJ)return;var gr=a.X2.dt(S,g7,gM,cM,fJ?S.Cf(d2?null:gA):null,I==$.sO&&W.hb>.8),dX=gr.pop(),eH=gr.pop(),bY=gr.pop(),d3=S.w;
|
|
S.w=[gA];var aU=S.By();S.w=[gM];var gl=S.By();if(gl==gM&&!cM)gl=-1;S.w=d3;if(gA==aU){}else if(aU!=gl){var en=new eC(0,0);
|
|
if(aU!=-1){var bC=S.g[aU].rp();en.x-=bC.x;en.y-=bC.y}if(gl!=-1){var bC=S.g[gl].rp();en.x+=bC.x;en.y+=bC.y}}var i=new h3(fJ?[6,0]:[6,35],this);
|
|
i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:eH,$s:en};S.nh(i);this.UN(i.data,S);var cD={classID:"move",null:fP.gj("Lyr",!0),T:{t:"obj ",v:[{t:"indx",v:{classID:"Lyr",val:dX+(cM?0:1)}}]},Adjs:{t:"bool",v:!1},Vrsn:{t:"long",v:5},Dplc:{t:"long",v:fJ}};
|
|
this.track({HP:"move",b4:cD})}if(I==$.mr){if(W.cU){if(P==null||!P.vc())return;var X=S.root.rk(q),g0=S.g.indexOf(X.au9),bY=S.g.slice(0);
|
|
bY.splice(q,1);bY.splice(g0,1);var eH=[];for(var Q=g0;Q<q-1;Q++)eH.push(Q);var i=new h3("Ungroup Layers",this);
|
|
i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:eH};S.nh(i);this.UN(i.data,S)}else{var H=S.yA(),ho=dq.get([0,4])+" ";
|
|
H.hq(ho+(a.X2.mC(S,ho)+1));H.oO="pass";if(W.bZ)H.hq(W.bZ);if(W.uM!=null)H.add.lclr=W.uM;H.add.lsct=S.w.length==1?i1.wY:i1.O_;
|
|
H.S5=24;var bR=S.Iq(),g7=S.w$();if(g7.length==0)return;g7.sort(function(i,aw){return i-aw});var bY=[];
|
|
for(var Q=0;Q<S.g.length;Q++)if(g7.indexOf(Q)==-1)bY.push(S.g[Q]);var dc=S.w[S.w.length-1]-g7.length;
|
|
bY.splice(dc+1,0,bR);for(var Q=0;Q<g7.length;Q++)bY.splice(dc+2+Q,0,S.g[g7[Q]]);bY.splice(dc+2+g7.length,0,H);
|
|
var i=new h3([6,9],this);i.data={o:$.s9,bv:S.g.slice(0),vR:bY,Jk:S.w.slice(0),wV:[bY.indexOf(H)]};S.nh(i);
|
|
this.UN(i.data,S);var A={HP:"make",AL:!0};A.b4={classID:"Mk",null:fP.gj("layerSection"),From:fP.gj("Lyr",!0),Usng:{t:"Objc",v:{classID:"layerSection",Nm:{t:"TEXT",v:H.getName()}}}};
|
|
this.track(A)}}if(I==$.KJ){if(S.w.length!=1)return;var jC=S.w[0],hV=t;if(S.g[jC].kX()==null&&!k.j(hW.Q9)){I=$.wD;
|
|
W.VS=S.q?!hV?"RvlS":"HdSl":!hV?"RvlA":"HdAl"}else{I=$.pR;W.ad3=!0}}if(I==$.wD){if(S.w.length!=1)return;
|
|
var jC=S.w[0],H=S.g[jC];if(H.add.vmsk&&H.v==null)H.r9(S);var db=H.kX();if(db==null||W.a9U){var i=new h3([6,21],this),aq=new $.Kt,fV=W.VS,jF=fV=="RvlS"||fV=="HdSl";
|
|
if(fV=="RvlS"||fV=="HdAl"||fV=="Trns")aq.color=0;if(jF){aq.channel=S.q.channel.slice(0);aq.rect=S.q.rect.clone();
|
|
if(fV=="HdSl")N.uA(aq.channel)}if(fV=="Trns"){aq.rect=H.rect.clone();aq.channel=N.U(H.rect.n());N.sN(H.buffer,aq.channel,3)}i.data={o:$.Pm,ZZ:[jC,db,aq],jO:jF?[S.q,null]:null};
|
|
S.nh(i);this.UN(i.data,S);S.g[jC].Yi=1;this.track({HP:"make",b4:{__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:fV}}}})}}else if(I==$.dc){var hO=S.g[W.src],ff=S.g[W.AA],i=new h3([6,21],this),jz=hO.kX(),du=ff.kX(),i5=[W.src,jz,null,W.AA,du,jz];
|
|
if(t||M){var d_=jz.clone();if(t)i5=[W.AA,du,d_];else i5[5]=d_;if(M){N.uA(d_.channel);d_.color=255-d_.color}}i.data={o:$.Pm,ZZ:i5};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.o5){if(S.w.length!=1)return;var jC=q,dG=S.g[jC].kX();if(dG!=null){var i=new h3([6,22],this);
|
|
i.data={o:$.Pm,ZZ:[q,dG,null]};S.nh(i);this.UN(i.data,S)}}if(I==$.kw){var eB=S.g.slice(0),ai=P.clone(),Z=ai.kX();
|
|
N.XY(Z.gB(ai.rect),ai.rect,ai.buffer,ai.rect);a.X2.tx(S,ai);ai.Yn();S.g[S.w[0]]=ai;var i=new h3([5,8],this);
|
|
i.data={o:$.s9,bv:eB,vR:S.g.slice(),Jk:S.w.slice(0),wV:S.w.slice(0)};S.nh(i);this.UN(i.data,S)}if(I==$.IZ){if(S.w.length!=1)return;
|
|
var jC=S.w[0];if(S.g[jC].$U(S).v==null){var i=new h3([6,45],this);i.data={o:I,i:jC,v:new $.Kt};S.nh(i);
|
|
this.UN(i.data,S)}}if(I==$.qj){if(S.w.length!=1)return;var jC=S.w[0];if(S.g[jC].$U(S).v!=null){var i=new h3([6,46],this);
|
|
i.data={o:I,i:jC,v:S.g[jC].$U(S).v};S.nh(i);this.UN(i.data,S)}}if(I==$.Wo){if(W.src==null&&S.w.length!=1)return;
|
|
if(W.src!=null)q=W.src;if(S.g[q].rB()){var i=new h3([6,47],this),j3=JSON.stringify(S.g[q].add.SoLd),am=JSON.parse(j3);
|
|
delete am.filterFX;i.data={o:$.Ut,cm:[{Cy:q,en:[j3,JSON.stringify(am)],xF:[S.g[q].$U(S),null]}]};S.nh(i);
|
|
this.UN(i.data,S)}}if(I==$.pR){if(S.w.length!=1)return;if(P.add.vmsk==null){var i=new h3([6,23],this),ak=S.O4(),V=ak[1],ak=ak[0],aq,ah;
|
|
if(W.ad3&&V.length!=0){var i7=ak[V[0]].add;aq=i7.vmsk.clone();ah=i7.vogk}else{aq=new $.CP;ah=[];aq.T[1].all=W.ash?0:1}i.data={o:I,i:q,Or:!0,v:aq,uy:JSON.stringify(ah),EJ:null};
|
|
if(P.rG()){i.data.EJ=JSON.stringify(hz.EJ.default)}S.nh(i);this.UN(i.data,S)}}if(I==$.W3){var hO=S.g[W.src],ff=S.g[W.AA];
|
|
if(ff.add.vmsk)return;var i=new h3([6,23],this),jk=hO.add.vmsk;i.data={i:W.AA,Or:hO.AY,v:jk.clone(),uy:JSON.stringify(hO.add.vogk),EJ:hO.add.vstk?JSON.stringify(hO.add.vstk):null};
|
|
if(t){i.data.o=$.pR}else{i.data.o=I;i.data.src=W.src;i.data.AA=W.AA}S.nh(i);this.UN(i.data,S)}if(I==$.BZ||I==$.OW){if(S.w.length!=1)return;
|
|
var H=S.g[q],jk=H.add.vmsk;if(jk!=null){var aY=I==$.OW,i=new h3(aY?[6,8]:[6,24],this);i.data={o:$.BZ,i:q,Or:H.AY,v:jk,uy:JSON.stringify(H.add.vogk),EJ:H.add.vstk?JSON.stringify(H.add.vstk):null};
|
|
if(aY){i.data.Yf=jk.kX(H.add.vstk)}S.nh(i);this.UN(i.data,S)}}if(I==$.yj){var i=new h3("Metadata",this);
|
|
i.data={o:I,sl:JSON.stringify(S.KC),m$:JSON.stringify(W.m$)};S.nh(i);this.UN(i.data,S)}if(I==$.bC){var br=W.AA?W.AA:S,at=br.name,aZ=W.k+".psd";
|
|
if(at==aZ)return;var i=new h3([6,37],this);i.data={o:I,asH:at,bZ:aZ};if(W.afW!=!0)br.nh(i);this.UN(i.data,br)}if(I==$.wU&&W.s7.endsWith("makeframes")){var aT=[],j4=W.s7.startsWith("make");
|
|
for(var Q=0;Q<S.w.length;Q++){var d=S.w[Q],H=S.g[d],et=H.getName(),eD=et.startsWith("_a_");if(j4==eD||H.add.lsct==i1.aW)continue;
|
|
var f2=j4?"_a_"+et:et.slice(3);aT.push([d,et,f2,H.add.lnsr,null])}var i=new h3([6,37],this);i.data={o:$.NV,nP:aT};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.NV){var at=P.getName(),aZ=W.name.substring(0,255);if(at==aZ)return;
|
|
var i=new h3([6,37],this);i.data={o:I,nP:[[q,at,aZ,P.add.lnsr,null]]};S.nh(i);this.UN(i.data,S);this.track(fP.cP("Nm",{t:"TEXT",v:aZ}))}if(I==$.mI){var jf=S.w$(),gB=[],j9=[];
|
|
for(var Q=0;Q<jf.length;Q++){gB.push(S.g[jf[Q]].add.lclr);j9.push(W.a05)}var i=new h3([6,38],this);i.data={o:I,g:jf,ald:gB,uM:j9};
|
|
S.nh(i);this.UN(i.data,S)}if(I==$.pF){var i=S.history[S.nT];if(i!=null&&i.b==this&&i.data.o==I&&i.data.i==W.L3&&i.data.kN.dw==W.xh.dw)i.data.kN=W.xh;
|
|
else{i=new h3("Mask Density / Feather",this);i.data={o:I,i:W.L3,U0:S.g[W.L3].iK(W.xh.dw),kN:W.xh};S.nh(i)}this.UN(i.data,S)}if(I==$.IR){var jA=JSON.stringify(W.k),af=JSON.parse(jA),i=S.history[S.nT];
|
|
if(i!=null&&i.b==this&&i.data.o==I&&i.data.hF==W.hF&&i.data.Z$.join(",")==W.Z$.join(",")){for(var Q=0;
|
|
Q<W.Z$.length;Q++)i.data.v_[Q]=af;if(i.data.b4&&af.eY!=0)a.X2.GB(af.EH,i.data.b4.T.v,af.eY-1)}else{i=new h3([11,6],this);
|
|
i.data={o:I,Z$:W.Z$,hF:W.hF,asu:[],v_:[]};var hl=!1;for(var Q=0;Q<W.Z$.length;Q++){var d=W.Z$[Q],H=S.g[d],au=W.hF?a.C8.VF(S,d):JSON.parse(JSON.stringify(H.add.vstk));
|
|
i.data.asu.push(au);i.data.v_.push(af);if(JSON.stringify(au)!=jA)hl=!0}if(!hl)return;S.nh(i);if(W.hF&&af.eY>0){var cD=i.data.b4={classID:"setd",null:fP.gj("contentLayer",!0),T:{t:"Objc",v:{}}},c4=["SoCo","GdFl","PtFl"][af.eY-1];
|
|
a.X2.GB(af.EH,cD.T.v,af.eY-1);this.track({HP:"set",b4:cD})}}if(W.hF&&af.eY==3)S.WX(jO.W4(af.EH.Ptrn.v,p.n5));
|
|
if(!W.hF){var bb=af.strokeStyleContent.v;if(bb.classID==hz.EJ.Dn[2])S.WX(jO.W4(bb.Ptrn.v,p.n5))}this.UN(i.data,S)}};
|
|
a.X2.dt=function(W,h,S,k,p,I){var q=W.g[S],P=[];if(p)P=W.g.slice(0);else for(var Q=0;Q<W.g.length;Q++)if(h.indexOf(Q)==-1)P.push(W.g[Q]);
|
|
var t=P.indexOf(q);if(I&&q.vc()&&q.add.lsct==i1.O_)t-=W.RS(S).length-1;var M=[];for(var Q=0;Q<h.length;
|
|
Q++){var U=t+(k?0:1)+Q,i=p?p[Q]:W.g[h[Q]];P.splice(U,0,i);M.push(U)}return[P,M,t]};a.X2.GB=function(W,h,S){var k=[hz.RN,hz.Y1,hz.pd][S];
|
|
if(h.classID==null)h.classID=["solidColorLayer","gradientLayer","patternLayer"][S];for(var Q=0;Q<k.length;
|
|
Q++)if(W[k[Q]])h[k[Q]]=JSON.parse(JSON.stringify(W[k[Q]]))};a.X2.WI=function(W){var h=new $.Kt;if(W.q!=null){h.color=0;
|
|
h.channel=W.q.channel.slice(0);h.rect=W.q.rect.clone()}return h};a.X2.Y9=function(W,h,S,k){var p=k.e/S.e,I=k.Z/S.Z,q=k.e/2,P=k.Z/2,t=N.H.Fb(k).s;
|
|
for(var Q=0;Q<W.g.length;Q++){var M=W.g[Q],U=M.add.SoLd;if(U==null||U.Idnt.v!=h)continue;if(p!=1||I!=1){var i=a.Q.Pw(U.nonAffineTransform),z=N.V.ew(i,k),D=new ex;
|
|
D.translate(-q,-P);D.scale(p,I);D.translate(q,P);var R=N.V.iq(z,N.V.xm(D)),O=t.slice(0);N.V.A(R,O);U.Trnf=a.Q.m3(O);
|
|
U.nonAffineTransform=a.Q.m3(O)}M.KF(W)}W.G()};a.X2.a6I=function(W,h,S){h.color=255-h.color;N.uA(h.channel);
|
|
h.VT=!0;W.r9(S);S.G()};a.X2.prototype._i=function(W,h){var S=W.o,k=h.g[W.i];h.tn=!0;if(S==$.Cb){h.add.lnk2.splice(h.add.lnk2.indexOf(W.oP),1,W.nq);
|
|
a.X2.Y9(h,W.id,W.oP.xJ[1],W.nq.xJ[1])}if(S==$.iX){k.add.SoLd.Impr.v.classID=W.U0;k.KF(h)}if(S==$.c9){var p=JSON.parse(W.Z$);
|
|
for(var Q=0;Q<p.length;Q++)h.g[p[Q]].oO=W.jY[Q];h.G()}if(S==$.Jn){var p=JSON.parse(W.Z$);for(var Q=0;
|
|
Q<p.length;Q++)h.g[p[Q]].opacity=W.jY[Q];h.G()}if(S==$.q9){var p=JSON.parse(W.Z$);for(var Q=0;Q<p.length;
|
|
Q++)if(h.g[p[Q]].add.lsct!=i1.aW)h.g[p[Q]].add.lspf=W.jY[Q]}if(S==$.iP){var I=W.JC,q=W.asU;delete k.add[I[0]];
|
|
if(q[0]!="----")k.add[q[0]]=q[1]}if(S==$.mv){k.add.iOpa=W.jY;h.G()}if(S==$.EO){for(var Q=0;Q<W.Z$.length;
|
|
Q++){var P=h.g[W.Z$[Q]];P.NN(!P.jP())}h.G()}if(S==$.XE){var t=k.kX();t.isEnabled=!t.isEnabled;k.r9(h);
|
|
h.G()}if(S==$.K3){var t=k.$U(h).v;t.isEnabled=!t.isEnabled;k.G();h.G()}if(S==$.Ei){var t=k.add.vmsk;
|
|
t.isEnabled=!t.isEnabled;if(!t.isEnabled){if(k.Yf){k.v=k.Yf;k.Yf=null}else k.v=null}else if(k.v){k.Yf=k.v;
|
|
k.v=null}k.r9(h);h.G()}if(S==$.Wk){k.Vy=!k.Vy;h.G()}if(S==$.ge){k.add.lmfx.masterFXSwitch.v=!k.add.lmfx.masterFXSwitch.v;
|
|
k.zy.$S=!0;h.G()}if(S==$.Ce){k.add.SoLd.filterFX.v.enab.v=!k.add.SoLd.filterFX.v.enab.v;k.k0(h);h.G()}if(S==$.X5){var M=W.index,U=k.add.lmfx[hz.BN[M[0]]].v[M[1]].v;
|
|
U.enab.v=!U.enab.v;k.zy.$S=!0;h.G()}if(S==$.ya){var i=h.g[W.fw],z=h.g[W.v4],D=W.api,R=W.akD;if(D=="")delete i.add.lmfx;
|
|
else i.add.lmfx=JSON.parse(D);if(R=="")delete z.add.lmfx;else z.add.lmfx=JSON.parse(R);i.zy.$S=!0;z.zy.$S=!0;
|
|
h.G()}if(S==$.tv){var O=k.add.SoLd.filterFX.v.filterFXList.v[W.index].v;O.enab.v=!O.enab.v;k.k0(h);h.G()}if(S==$.UU){k.add.SoLd.filterFX.v=JSON.parse(JSON.stringify(W.aeT));
|
|
k.k0(h);h.G()}if(S==$.fY){var t=k.kX();t.ln=!t.ln}if(S==$.gp){var t=k.add.vmsk;t.ln=!t.ln}if(S==$.Bz){var b=W.$f;
|
|
for(var Q=0;Q<b.length;Q+=2){var w=b[Q],P=w>=0?h.g[w]:h.mw[-1-w];P.add.vogk=JSON.parse(b[Q+1]);N.uy.ie(P.add.vogk,P.add.vmsk);
|
|
if(w>=0)P.r9(h)}h.G()}if(S==$.Uf){k.add.artb=JSON.parse(W.a6j);h.G();a.JY.Ew(h,W)}if(S==$.b$){h.q=W.k8;
|
|
h.BS=W.$f.slice(0);h.ye=W.MV.slice(0);h.Hx=h.WU=!0}if(S==$.pw){k.i2=!k.i2}if(S==$.l4){var A=W.ahW;for(var Q=0;
|
|
Q<A.length;Q++)h.g[Q].RL=A[Q]}if(S==$.s9){if(W.$s)a.c0.eg(h,h.w,null,-W.$s.x,-W.$s.y);if(W.Jk)h.w=W.Jk;
|
|
if(W.jO)h.q=W.jO[0];h.sP=null;h.G();h.WV(W.bv);a.JY.Ew(h,W);if(W.WN)h.O6(W.WN[0])}if(S==$.Pm){for(var Q=0;
|
|
Q<W.ZZ.length;Q+=3)a.X2.tx(h,h.g[W.ZZ[Q]],W.ZZ[Q+1]);if(W.jO){var g=W.jO[0];if(g==null)delete h.q;else h.q=g}}if(S==$.IZ){k.$U(h).v=null;
|
|
k.G();h.G()}if(S==$.qj){k.$U(h).v=W.v;k.G();h.G()}if(S==$.Ut){a.X2.NH(h,W.cm,0)}if(S==$.pR){a.X2.KL(h,k,!0)}if(S==$.W3){a.X2.KL(h,h.g[W.AA],W.v.isEnabled);
|
|
a.X2.LW(h,h.g[W.src],W)}if(S==$.BZ){if(W.Yf)a.X2.tx(h,k,null);a.X2.LW(h,k,W)}if(S==$.yj){h.KC=JSON.parse(W.sl)}if(S==$.bC){h.name=W.asH}if(S==$.NV){for(var Q=0;
|
|
Q<W.nP.length;Q++){var E=W.nP[Q],P=h.g[E[0]];P.hq(E[1]);if(E[3])P.add.lnsr=E[3];else delete P.add.lnsr}}if(S==$.mI){for(var Q=0;
|
|
Q<W.g.length;Q++)h.g[W.g[Q]].add.lclr=W.ald[Q]}if(S==$.IR){var j=W.asu;for(var Q=0;Q<W.Z$.length;Q++){var P=h.g[W.Z$[Q]],x=j[Q];
|
|
if(!W.hF)P.add.vstk=JSON.parse(JSON.stringify(x));else a.C8.a3(P,JSON.parse(JSON.stringify(x)));P.jh(h)}h.G()}if(S==$.pF){k.ly(W.U0);
|
|
k.r9(h);h.G()}h.WU=!0};a.X2.prototype.UN=function(W,h){var S=W.o,k=h.g[W.i];h.tn=!0;if(S==$.Cb){h.add.lnk2.splice(h.add.lnk2.indexOf(W.nq),1,W.oP);
|
|
a.X2.Y9(h,W.id,W.nq.xJ[1],W.oP.xJ[1])}if(S==$.iX){k.add.SoLd.Impr.v.classID=W.kN;k.KF(h)}if(S==$.c9){var p=JSON.parse(W.Z$);
|
|
for(var Q=0;Q<p.length;Q++)h.g[p[Q]].oO=W.kN;h.G()}if(S==$.Jn){var p=JSON.parse(W.Z$);for(var Q=0;Q<p.length;
|
|
Q++)h.g[p[Q]].opacity=W.kN;h.G()}if(S==$.q9){var p=JSON.parse(W.Z$);for(var Q=0;Q<p.length;Q++)if(h.g[p[Q]].add.lsct!=i1.aW)h.g[p[Q]].add.lspf=W.kN[Q]}if(S==$.iP){var I=W.asU,q=W.JC;
|
|
delete k.add[I[0]];if(q[0]!="----")k.add[q[0]]=q[1]}if(S==$.mv){k.add.iOpa=W.kN;h.G()}if(S==$.EO){for(var Q=0;
|
|
Q<W.Z$.length;Q++){var P=h.g[W.Z$[Q]];P.NN(!P.jP())}h.G()}if(S==$.XE){var t=k.kX();t.isEnabled=!t.isEnabled;
|
|
k.r9(h);h.G()}if(S==$.K3){var t=k.$U(h).v;t.isEnabled=!t.isEnabled;k.G();h.G()}if(S==$.Ei){var t=k.add.vmsk;
|
|
t.isEnabled=!t.isEnabled;if(!t.isEnabled){if(k.Yf){k.v=k.Yf;k.Yf=null}else k.v=null}else if(k.v){k.Yf=k.v;
|
|
k.v=null}k.r9(h);h.G()}if(S==$.Wk){k.Vy=!k.Vy;h.G()}if(S==$.ge){k.add.lmfx.masterFXSwitch.v=!k.add.lmfx.masterFXSwitch.v;
|
|
k.zy.$S=!0;h.G()}if(S==$.Ce){k.add.SoLd.filterFX.v.enab.v=!k.add.SoLd.filterFX.v.enab.v;k.k0(h);h.G()}if(S==$.X5){var M=W.index,U=k.add.lmfx[hz.BN[M[0]]].v[M[1]].v;
|
|
U.enab.v=!U.enab.v;k.zy.$S=!0;h.G()}if(S==$.ya){var i=h.g[W.fw],z=h.g[W.v4],D=W.ar1,R=W.aiH;if(D=="")delete i.add.lmfx;
|
|
else i.add.lmfx=JSON.parse(D);if(R=="")delete z.add.lmfx;else z.add.lmfx=JSON.parse(R);i.zy.$S=!0;z.zy.$S=!0;
|
|
h.G()}if(S==$.tv){var O=k.add.SoLd.filterFX.v.filterFXList.v[W.index].v;O.enab.v=!O.enab.v;k.k0(h);h.G()}if(S==$.UU){k.add.SoLd.filterFX.v=JSON.parse(JSON.stringify(W.ak0));
|
|
k.k0(h);h.G()}if(S==$.fY){var t=k.kX();t.ln=!t.ln}if(S==$.gp){var t=k.add.vmsk;t.ln=!t.ln}if(S==$.Bz){var b=W.Lg;
|
|
for(var Q=0;Q<b.length;Q+=2){var w=b[Q],P=w>=0?h.g[w]:h.mw[-1-w];P.add.vogk=JSON.parse(b[Q+1]);N.uy.ie(P.add.vogk,P.add.vmsk);
|
|
if(w>=0)P.r9(h)}h.G()}if(S==$.Uf){k.add.artb=JSON.parse(W.xD);h.G();a.JY.xY(h,W)}if(S==$.b$){h.q=W.mQ;
|
|
h.BS=W.Lg.slice(0);h.ye=W.LY.slice(0);h.Hx=h.WU=!0}if(S==$.pw){k.i2=!k.i2}if(S==$.l4){var A=W.a3Q;for(var Q=0;
|
|
Q<A.length;Q++)h.g[Q].RL=A[Q]}if(S==$.s9){var g=W.vR,E=0,j;for(var Q=0;Q<g.length;Q++){var P=g[Q],x=P.add.lsct;
|
|
if(x==i1.aW)E++;else if(x==i1.wY||x==i1.O_)E--;if(P.add.artb&&E!=0)j="Artboards can not be inside folders."}if(j){h.history.pop();
|
|
h.nT--;alert(j);return}a.JY.xY(h,W);if(W.wV)h.w=W.wV;if(W.jO)h.q=W.jO[1];h.sP=null;h.G();h.WV(W.vR);
|
|
if(W.$s)a.c0.eg(h,h.w,null,W.$s.x,W.$s.y);if(W.WN)h.O6(W.WN[1])}if(S==$.Pm){for(var Q=0;Q<W.ZZ.length;
|
|
Q+=3)a.X2.tx(h,h.g[W.ZZ[Q]],W.ZZ[Q+2]);if(W.jO){var d=W.jO[1];if(d==null)delete h.q;else h.q=d}}if(S==$.IZ){k.$U(h).v=W.v;
|
|
k.Yi=0;k.G();h.G()}if(S==$.qj){k.$U(h).v=null;k.Yi=0;k.G();h.G()}if(S==$.Ut){a.X2.NH(h,W.cm,1)}if(S==$.pR){a.X2.LW(h,k,W)}if(S==$.W3){a.X2.KL(h,h.g[W.src],W.v.isEnabled);
|
|
a.X2.LW(h,h.g[W.AA],W)}if(S==$.BZ){a.X2.KL(h,k,W.v.isEnabled);if(W.Yf)a.X2.tx(h,k,W.Yf)}if(S==$.yj){h.KC=JSON.parse(W.m$)}if(S==$.bC){h.name=W.bZ}if(S==$.NV){for(var Q=0;
|
|
Q<W.nP.length;Q++){var L=W.nP[Q],P=h.g[L[0]];P.hq(L[2]);if(L[4])P.add.lnsr=L[4];else delete P.add.lnsr}}if(S==$.mI){for(var Q=0;
|
|
Q<W.g.length;Q++)h.g[W.g[Q]].add.lclr=W.uM[Q]}if(S==$.IR){var _=W.v_;for(var Q=0;Q<W.Z$.length;Q++){var P=h.g[W.Z$[Q]],T=_[Q];
|
|
if(!W.hF)P.add.vstk=JSON.parse(JSON.stringify(T));else a.C8.a3(P,JSON.parse(JSON.stringify(T)));P.jh(h)}h.G()}if(S==$.pF){k.ly(W.kN);
|
|
k.r9(h);h.G()}h.WU=!0};a.X2.mC=function(W,h){var S=0;for(var Q=0;Q<W.g.length;Q++){var k=W.g[Q].getName();
|
|
if(k.startsWith(h)){var p=k.slice(h.length).trim(),I=parseInt(p);if(!isNaN(I)&&I+""==p&&I>S)S=I}}return S};
|
|
a.X2.NH=function(W,h,S){for(var Q=0;Q<h.length;Q++){var k=h[Q],p=W.g[k.Cy];if(k.en){p.add.SoLd=JSON.parse(k.en[S])}if(k.xF){if(k.xF[1-S]!=null)W.rw(k.xF[1-S]);
|
|
if(k.xF[S]!=null)W.iI(k.xF[S]);else p.Yi=0}p.KF(W)}};a.X2.u8=function(W,h){var S=W.K5,k=W.rect.clone();
|
|
if(S!=null&&(S.x!=h.e||S.y!=h.Z)){k.x=Math.floor((h.e-k.e)/2);k.y=Math.floor((h.Z-k.Z)/2)}return k};
|
|
a.X2.a6P=function(W,h){if(h.Yf)h.Yf=null;else h.v=null;h.r9(W);W.G();h.Yi=0};a.X2.tx=function(W,h,S){var k=h.kX();
|
|
if(k==null&&S==null)return;if(k)a.X2.a6P(W,h);if(S==null)return;if(h.v)h.Yf=S;else h.v=S;h.r9(W);W.G()};
|
|
a.X2.KL=function(W,h,S){if(h.Yf&&S){h.v=h.Yf;h.Yf=null}else if(h.v&&S){h.v=null}delete h.add.vogk;delete h.add.vstk;
|
|
delete h.add.vmsk;h.r9(W);h.AY=!1;W.sP=[];W.G()};a.X2.LW=function(W,h,S){h.add.vogk=JSON.parse(S.uy);
|
|
if(S.EJ)h.add.vstk=JSON.parse(S.EJ);else delete h.add.vstk;h.add.vmsk=S.v.clone();if(h.v&&h.add.vmsk.isEnabled)h.Yf=h.v;
|
|
h.r9(W);h.AY=S.Or;W.sP=[W.g.indexOf(h)];W.yQ=[];W.G()};a.Tl=function(){a.vv.call(this,"Layer Styles",a.gk);
|
|
this.rg=null;this.x0=null;this.qC=null;this.Au=[];this.WT=null};a.Tl.prototype=new a.vv;a.Tl.prototype.ca=function(W,h,S,k,p){var I=W.i;
|
|
if(I==null)I=S.w[0];var q=S.g[I],P=W.Kr;if(this.rg==null){this.qC=a.Tl.GL(S,q);this.rg=JSON.stringify(this.qC);
|
|
if(q.add.lmfx)this.x0=JSON.stringify(q.add.lmfx)}if(q.add.lmfx==null){q.add.lmfx=JSON.parse(hz.default);
|
|
for(var Q=0;Q<hz.order.length;Q++)q.add.lmfx[hz.BN[Q]]={t:"VlLs",v:[]}}if(W.o=="scaleeffects"){if(W.k=="confirm"||W.k=="cancel"){this.ca({o:W.k},h,S,k,p);
|
|
return}q.add.lmfx=JSON.parse(this.x0);jO.sg(q.add.lmfx,W.k/100)}else if(W.o=="changeprop"){var t=null;
|
|
if(P!=0){var M=this.Au[P[0]];if(M==null)M=hz.Au[P[0]];M=JSON.parse(M);var U=q.add.lmfx[hz.BN[P[0]]].v;
|
|
if(U[P[1]]==null)U[P[1]]={t:"Objc",v:M};t=U[P[1]].v;for(var i in M)if(t[i]==null)t[i]=M[i]}if(W.o=="changeprop"){if(P==0){this.qC[W.TH].v=W.k;
|
|
a.Tl.ny(S,q,this.qC)}else if(W.TH=="lagl"){if(t.uglg&&t.uglg.v){S.xq(W.k.val);this.qC.ajR=S.NZ()}else t[W.TH].v=W.k}else if(W.TH=="Lald"){if(t.uglg.v){S.RW(W.k.val);
|
|
this.qC.akQ=S.yp()}else t[W.TH].v=W.k}else if((P[0]==3||P[0]==8)&&(W.TH=="Clr"||W.TH=="Grad")){if(W.TH=="Clr"){t.Clr={t:"Objc",v:W.k};
|
|
delete t.Grad}if(W.TH=="Grad"){t.Grad={t:"Objc",v:W.k};delete t.Clr}}else{t[W.TH].v=W.k}if(P!=0)this.Au[P[0]]=JSON.stringify(t)}if(P!=0)if(t.Ptrn)S.WX(jO.W4(t.Ptrn.v,p.n5))}else if(W.o=="setstl"){var z=W.k.Lefx;
|
|
if(z)jO.af1(z,S,p.n5);jO.abF(W.k,q);this.qC=a.Tl.GL(S,q)}else if(W.o=="st_dupsingle"){var D=q.add.lmfx[hz.BN[W.wJ[0]]].v;
|
|
if(D[W.wJ[1]]==null)return;var R=JSON.parse(JSON.stringify(D[W.wJ[1]]));D.splice(W.wJ[1],0,R)}else if(W.o=="st_movsingle"){var O=W.wJ[1],D=q.add.lmfx[hz.BN[W.wJ[0]]].v;
|
|
if(D[W.wJ[1]]==null)return;var b=Math.max(0,Math.min(D.length-1,O+W.aaI)),w=D[b];D[b]=D[O];D[O]=w}else if(W.o=="cancel"){if(this.x0==null)delete q.add.lmfx;
|
|
else q.add.lmfx=JSON.parse(this.x0);a.Tl.ny(S,q,JSON.parse(this.rg));this.rg=null;this.x0=null}else if(W.o=="confirm"){var A=JSON.stringify(q.add.lmfx),g=new h3([11,6],this);
|
|
g.data={g:[I],QB:[this.x0],Lp:[A],K2:[this.rg],ba:[JSON.stringify(this.qC)]};S.nh(g);this.rg=null;this.x0=null;
|
|
if(A!=null){var E=JSON.parse(A);j6.a8(E);E.classID="Lefx";delete E.masterFXSwitch;var j=new em(y.E.gg);
|
|
j._Q=!0;j.data={HP:"set",AL:!0};var x=fP.gj("Lyr",!0);x.v.splice(0,0,{t:"prop",v:{classID:"Prpr",keyID:"Lefx"}});
|
|
j.data.b4={__name:"Set",classID:"setd",null:x,T:{t:"Objc",v:E}};h.c(j)}}else if(W.o=="st_copy"){this.WT=[this.rg,this.x0];
|
|
this.rg=null;this.x0=null}else if(W.o=="st_paste"||W.o=="st_clear"){if(W.o=="st_paste"&&this.WT==null)return;
|
|
var d=W.i!=null?[W.i]:S.w.slice(0),L=[],_=[],T=[],c=[];for(var Q=0;Q<d.length;Q++){var q=S.g[d[Q]],e=a.Tl.GL(S,q);
|
|
L.push(q.add.lmfx?JSON.stringify(q.add.lmfx):null);T.push(JSON.stringify(e));if(W.o=="st_paste"){_.push(this.WT[1]);
|
|
c.push(this.WT[0])}else{_.push(null);e.lrMd.v=0;e.Opct.v.val=100;e.iOpa.v.val=100;e.blIf={v:[]};for(var r=0;
|
|
r<10;r++)e.blIf.v.push(0,0,255,255);c.push(JSON.stringify(e))}}var g=new h3([11,6],this);g.data={g:d,QB:L,Lp:_,K2:T,ba:c};
|
|
this.UN(g.data,S);S.nh(g);this.rg=null;this.x0=null}else{var B=this.qC,E=null;if(W.o=="st_delsingle"){E=JSON.parse(this.x0);
|
|
E[hz.BN[W.wJ[0]]].v.splice(W.wJ[1],1);E=JSON.stringify(E)}if(E==null)delete q.add.lmfx;else q.add.lmfx=JSON.parse(E);
|
|
if(B!=null)a.Tl.ny(S,q,B);var g=new h3([11,6],this);g.data={g:[W.i],QB:[this.x0],Lp:[E],K2:[this.rg],ba:[JSON.stringify(B)]};
|
|
S.nh(g);this.rg=null;this.x0=null}q.zy.$S=!0;S.tn=!0;S.G()};a.Tl.GL=function(W,h){if(h.add.iOpa==null)h.add.iOpa=255;
|
|
if(h.add.brst==null)h.add.brst=[1,1,1];var S=h.vc()?["pass"].concat(hd.wl):hd.wl;return{lrMd:{v:S.indexOf(h.oO)},Opct:{v:{type:"#Prc",val:Math.round(h.opacity*100/255)},t:"UntF"},iOpa:{v:{type:"#Prc",val:Math.round(h.add.iOpa*100/255)},t:"UntF"},blIf:{v:h.z3.slice(0)},brst:{v:h.add.brst},ajR:W.NZ(),akQ:W.yp(),vc:h.vc()}};
|
|
a.Tl.ny=function(W,h,S){var k=h.vc()?["pass"].concat(hd.wl):hd.wl;h.oO=k[S.lrMd.v];h.opacity=Math.round(S.Opct.v.val*255/100);
|
|
h.add.iOpa=Math.round(S.iOpa.v.val*255/100);h.z3=S.blIf.v.slice(0);h.add.brst=S.brst.v.slice(0);W.xq(S.ajR);
|
|
W.RW(S.akQ)};a.Tl.prototype._i=function(W,h){for(var Q=0;Q<W.g.length;Q++){var S=h.g[W.g[Q]],k=W.QB[Q];
|
|
if(k==null)delete S.add.lmfx;else S.add.lmfx=JSON.parse(k);a.Tl.ny(h,S,JSON.parse(W.K2[Q]));S.zy.$S=!0}h.tn=!0;
|
|
h.G()};a.Tl.prototype.UN=function(W,h){for(var Q=0;Q<W.g.length;Q++){var S=h.g[W.g[Q]],k=W.Lp[Q];if(k==null)delete S.add.lmfx;
|
|
else S.add.lmfx=JSON.parse(k);a.Tl.ny(h,S,JSON.parse(W.ba[Q]));S.zy.$S=!0}h.tn=!0;h.G()};a.UI=function(){a.vv.call(this,"Layer Comps",a.fK)};
|
|
a.UI.prototype=new a.vv;a.UI.prototype.ca=function(W,h,S,k){var p=JSON.parse(JSON.stringify(S.S1)),I=JSON.parse(JSON.stringify(S.S1)),q=null,P=null,t=null,M=-1,U=!1;
|
|
if(W.o=="delLC"){var i=a.UI.Wg(S.S1,W.Kr),z=S.S1.lastAppliedComp?S.S1.lastAppliedComp.v:0;I.list.v.splice(i,1);
|
|
if(z==W.Kr)delete I.lastAppliedComp;q="Delete Layer Comp"}if(W.o=="editLC"){var i=a.UI.Wg(S.S1,W.Kr),D=I.list.v[i].v;
|
|
if(W.bZ!=null)D.Nm.v=W.bZ;if(W.a10!=null){var R=W.a10,O=D.capturedInfo.v,b=O&(1<<R)-1;O=O>>R;if((O&1)==1)O--;
|
|
else O++;D.capturedInfo.v=(O<<R)+b}q="Layer Comp properties"}if(W.o=="setLC"){a.UI.O7(S);if(W.Kr==0)delete I.lastAppliedComp;
|
|
else I.lastAppliedComp={t:"long",v:W.Kr};q="Switch Layer Comp";U=!0}if(W.o=="updLC"){a.UI.O7(S);P=a.UI.a40(S,W.Kr);
|
|
t=a.UI.kE(S,W.Kr);I.lastAppliedComp={t:"long",v:W.Kr};q="Update Layer Comp";M=W.Kr;U=!0}if(W.o=="addLC"){a.UI.O7(S);
|
|
var w=1;for(var Q=0;Q<I.list.v.length;Q++)w=Math.max(w,I.list.v[Q].v.compID.v)+1;w+=Math.floor(Math.random()*1e4);
|
|
var A={t:"Objc",v:{classID:"Comp",Nm:{t:"TEXT",v:"New Comp "+(I.list.v.length+1)},compID:{t:"long",v:w},capturedInfo:{t:"long",v:7}}};
|
|
I.list.v.push(A);I.lastAppliedComp={t:"long",v:w};q="New Layer Comp";var g=a.UI.kE(S,w);a.UI.sM(S,g,w)}var E=new h3(q,this);
|
|
E.data={a9o:p,ami:I,acW:P,aaz:t,Kr:M,R3:U};this.UN(E.data,S);S.nh(E)};a.UI.prototype.UN=function(W,h){h.S1=W.ami;
|
|
h.tn=!0;if(W.aaz)a.UI.sM(h,W.aaz,W.Kr);if(W.R3){var S=h.S1.lastAppliedComp?h.S1.lastAppliedComp.v:0,k=a.UI.Wg(h.S1,S),p=k==-1?null:h.S1.list.v[k].v,I=p?p.capturedInfo.v:7;
|
|
a.UI.Hj(h,S,I);h.G()}};a.UI.prototype._i=function(W,h){h.S1=W.a9o;h.tn=!0;if(W.acW)a.UI.sM(h,W.acW,W.Kr);
|
|
if(W.R3){var S=h.S1.lastAppliedComp?h.S1.lastAppliedComp.v:0,k=a.UI.Wg(h.S1,S),p=k==-1?null:h.S1.list.v[k].v,I=p?p.capturedInfo.v:7;
|
|
a.UI.Hj(h,S,I);h.G()}};a.UI.O7=function(W){if(W.S1.lastAppliedComp!=null||!W.Td)return;var h=a.UI.kE(W,0);
|
|
a.UI.sM(W,h,0);W.Td=!1};a.UI.cr=function(W,h,S){W.v.Hrzn.v+=h;W.v.Vrtc.v+=S};a.UI.Wg=function(W,h){var S=W.list.v;
|
|
for(var Q=0;Q<S.length;Q++)if(S[Q].v.compID.v==h)return Q;return-1};a.UI.a7W=function(W){var h=W.layerSettings.v,p=null;
|
|
if(h.length==0)return;var S="compList enab Ofst blendOptions Lefx FXRefPoint imageMask vectorMask layerSpecific".split(" "),k=h[0].v;
|
|
if(k.enab==null)k.enab={t:"bool",v:!0};if(k.Ofst==null)k.Ofst={t:"Objc",v:{classID:"null",Hrzn:{t:"long",v:0},Vrtc:{t:"long",v:0}}};
|
|
for(var Q=0;Q<h.length;Q++){var I=h[Q].v;if(p==null)p=JSON.parse(JSON.stringify(I));else for(var q=0;
|
|
q<S.length;q++){var P=S[q];if(I[P])p[P]=JSON.parse(JSON.stringify(I[P]))}h[Q].v=JSON.parse(JSON.stringify(p))}};
|
|
a.UI.p$=function(W,h){var S=W.add.shmd.cmls,k=S.layerSettings.v;for(var p=0;p<k.length;p++){var I=k[p].v,q=I.compList.v[0].v;
|
|
if(q==h)return p}return-1};a.UI.Iw=function(W,h){var S=a.UI.p$(W,h);return S==-1?null:W.add.shmd.cmls.layerSettings.v[S].v};
|
|
a.UI.Hj=function(W,h,S){for(var Q=0;Q<W.g.length;Q++){var k=W.g[Q],p=k.add.shmd.cmls;if(p==null)continue;
|
|
var I=p.layerSettings.v,q=a.UI.Iw(k,h);if(q==null){k.NN(!1);continue}if((S&1)!=0){if(q.enab)k.NN(q.enab.v);
|
|
else k.NN(!0)}if((S&2)!=0){if(q.Ofst){var P=q.Ofst.v,t=k.LO(W),M=Math.round(P.Hrzn.v-t.x),U=Math.round(P.Vrtc.v-t.y);
|
|
if(M!=0||U!=0)a.c0.eg(W,[Q],null,M,U)}}if((S&4)!=0){if(q.Lefx){var i=JSON.parse(JSON.stringify(q.Lefx.v));
|
|
j6.ph(i);if(JSON.stringify(i)!=JSON.stringify(k.add.lmfx)){k.add.lmfx=i;k.zy.$S=!0}}else delete k.add.lmfx;
|
|
if(q.blendOptions){var z=q.blendOptions.v;if(z.Opct)k.opacity=Math.round(255*z.Opct.v.val/100);if(z.fillOpacity)k.add.iOpa=Math.round(255*z.fillOpacity.v.val/100);
|
|
if(z.Md)k.oO=k.add.lsct==i1.aW?"norm":hd.Gl(z.Md.v.BlnM)}else{k.opacity=255;k.oO=k.vc()?"pass":"norm";
|
|
k.add.iOpa=255}}}};a.UI.a40=function(W,h){var S={};for(var Q=0;Q<W.g.length;Q++){var k=W.g[Q];if(k.add.shmd==null||k.add.shmd.cmls==null)continue;
|
|
S["l"+k.add.lyid]=JSON.parse(JSON.stringify(a.UI.Iw(k,h)))}return S};a.UI.kE=function(W,h){var S={};
|
|
for(var Q=0;Q<W.g.length;Q++){var k=W.g[Q],p=k.add.lyid;S["l"+p]=a.UI.aA(W,k,h)}return S};a.UI.aA=function(W,h,S){var k=h.add.shmd?h.add.shmd.cmls:null,p={classID:"null"},I=h.LO(W),q={t:"Objc",v:{classID:"null",Hrzn:{t:"long",v:I.x},Vrtc:{t:"long",v:I.y}}};
|
|
p.compList={t:"VlLs",v:[{t:"long",v:S}]};p.enab={t:"bool",v:h.jP()};p.Ofst=JSON.parse(JSON.stringify(q));
|
|
p.FXRefPoint=JSON.parse(JSON.stringify(k&&k.origFXRefPoint?k.origFXRefPoint:q));p.blendOptions={t:"Objc",v:{classID:"null",Md:{t:"enum",v:{BlnM:hd.iN(h.oO)}},Opct:{t:"UntF",v:{type:"#Prc",val:100*h.opacity/255}},fillOpacity:{t:"UntF",v:{type:"#Prc",val:h.add.iOpa!=null?100*h.add.iOpa/255:100}}}};
|
|
if(h.add.vmsk){p.vectorMask={t:"Objc",v:{classID:"null"}};p.vectorMask.v.Ofst=JSON.parse(JSON.stringify(q))}if(h.add.lmfx){p.Lefx={t:"Objc",v:JSON.parse(JSON.stringify(h.add.lmfx))};
|
|
j6.a8(p.Lefx.v)}return p};a.UI.abm=function(W,h){var S=h.add.lyid;if(h.add.shmd==null)h.add.shmd={};
|
|
if(h.add.shmd.cmls==null){h.add.shmd.cmls={classID:"null",LyrI:{t:"long",v:S},layerSettings:{t:"VlLs",v:[{t:"Objc",v:a.UI.aA(W,h,0)}]}}}};
|
|
a.UI.sM=function(W,h,S){for(var Q=0;Q<W.g.length;Q++){var k=W.g[Q],p=k.add.lyid;a.UI.abm(W,k);var I=k.add.shmd.cmls,q=I.layerSettings.v,P=h["l"+p];
|
|
if(P!=null)P={t:"Objc",v:JSON.parse(JSON.stringify(P))};var t=a.UI.p$(k,S);if(t==-1){if(P==null)continue;
|
|
else q.push(P)}else{if(P==null)q.splice(t,1);else q[t]=P}}};a.UI.d_=function(W,h){for(var Q=0;Q<W.g.length;
|
|
Q++){var S=W.g[Q],k=S.add.lyid;if(S.add.shmd==null||S.add.shmd.cmls==null)continue;var p=S.LO(W),I=Math.round(p.x),q=Math.round(p.y);
|
|
if(!h){I=-I;q=-q}var P=S.add.shmd.cmls,t=P.layerSettings.v;if(P.origFXRefPoint)a.UI.cr(P.origFXRefPoint,-I,-q);
|
|
for(var M=0;M<t.length;M++){var U=t[M].v;a.UI.cr(U.Ofst,I,q);var i=U.imageMask,z=U.vectorMask;if(i&&i.v.Ofst)a.UI.cr(i.v.Ofst,I,q);
|
|
if(z&&z.v.Ofst)a.UI.cr(z.v.Ofst,I,q)}}};a.Hw=function(){a.vv.call(this,"Adjust Edit",a.AT);this.m$=null;
|
|
this.x7=null};a.Hw.prototype=new a.vv;a.Hw._P=function(W,h,S,k){if(k)h/=4;var p=0,I=0,q=255,P=0,t=0,M=255;
|
|
while(I+W[p]<h){I+=W[p];p++}while(P+W[q]<h){P+=W[q];q--}if(k){p-=Math.round(W[p]/(S/32));q+=Math.round(W[q]/(S/32));
|
|
if(p<0)t=Math.round(-p*255/(q-p));if(q>255)M=255-Math.round((q-255)*255/(q-p))}return[Math.max(p,0),Math.min(q,255),t,M,100]};
|
|
a.Hw.prototype.ca=function(W,h,S,k,p){var I=W.o;if(I=="auto"){var q=W.Np,P=a.Hw.getData(S);for(var Q=0;
|
|
Q<P.length;Q++){var t=P[Q],M;if(q<3){}else{var U=hw.QE("hue2");bU.Dm(U,0,[0,-100,0]);M=bS.wz("hue2",U)}bS.K1(M,t.zz,t.Kf,t.pY)}a.Hw.Ko(S,P);
|
|
a.Hw.my(S,P,q<3?[4,16,q]:[19,7,0],this);S.G()}if(I=="edit_layer")this.ajD(W,h,S,k);if(I=="edit"||I=="confirm"||I=="cancel")this.td(W,h,S,p,!0);
|
|
if(I=="start"){if(S.w.length==0)return;var i=S.g[S.w[0]];if(i.add.SoLd&&i.Yi<=0&&S.ye.length==0){var z=new em(y.E.u,!0);
|
|
z.b=a.Ak;z.data={o:"start",CD:W.dv,Fv:W.Fv};h.c(z);return}if(!S.KO(h,null,!0))return;if(s[W.dv]&&W.Fv==null){if(S.w.length!=1)alert("Will be applied to "+S.w.length+" layers.");
|
|
var z=new em(y.E.W,!0);z.data={o:y.D.mJ,DG:"afw_"+W.dv};h.c(z)}else{this.td({o:"edit",Fv:W.Fv,CD:W.dv},h,S,p);
|
|
this.td({o:"confirm",CD:W.dv},h,S,p)}}};a.Hw.prototype.ajD=function(W,h,S,k){var p=W.o,I=S.w[0],q=S.g[I],P=bS.get(q.add),t=JSON.parse(JSON.stringify(q.add[P])),z;
|
|
for(var M in W.k)t[M]=W.k[M];var U=JSON.parse(JSON.stringify(t));for(var M in bS.Sd)if(bS.Sd[M]==P)U.classID=M;
|
|
var i=S.history[S.nT];if(i&&i.b==this&&i.data.U0!=null&&i.data.i==I)z=i;else{var D=new em(y.E.gg,!0),R={classID:"setd",null:fP.gj("AdjL",!0),T:{t:"Objc",v:U}};
|
|
D.data={AL:!0,HP:"set",b4:R};h.c(D);var z=new h3([6,39],this);z.data={i:I,U0:q.add[P],kN:t,Fc:R};S.nh(z)}z.data.kN=t;
|
|
z.data.Fc.T.v=U;this.UN(z.data,S)};a.Hw.getData=function(W,h,S){var k=[],p=new gj(0,0,W.e,W.Z),I=W.ye.length!=0?[-1-W.ye[0]]:W.w;
|
|
for(var Q=0;Q<I.length;Q++){var q=I[Q],P=q<0?null:W.g[q],t={i:q,gA:q<0?1:P.Yi};k.push(t);var M=W.BS[-1-q];
|
|
if(0<=q)M=P.Yi<=0?null:P.Yi==1?P.kX():P.$U(W).v;var U=M?M.rect:P.rect;if(W.q)t.pY=M!=null?W.q.rect.r$(p):W.q.rect.r$(U);
|
|
else t.pY=h||M!=null?U.r8(p):U.clone();if(S)t.pY=S[Q].pY.clone();var i=t.pY.n();t.zz=N.U(i*4);if(M)a.ut.Vu(M.channel,M.rect,M.color,t.zz,t.pY);
|
|
else N.zt(P.buffer,U,t.zz,t.pY);t.Kf=t.zz.slice(0);if(W.q){t.ZZ=N.U(i);N.vG(W.q.channel,W.q.rect,t.ZZ,t.pY)}}return k};
|
|
a.Hw.acQ=function(W,h,S){if(h==null)return h;var k=bS.wK(W,h),I;if(k==-1)return h;var p=S.length>>>2,q=N.FZ(S),P=.001*p;
|
|
if(k==0||k==2)I=[[0,255,0,255,100],a.Hw._P(q[1],P,p,k==2),a.Hw._P(q[2],P,p,k==2),a.Hw._P(q[3],P,p,k==2)];
|
|
if(k==1)I=[a.Hw._P(q[0],P*.33,p,!1),[0,255,0,255,100],[0,255,0,255,100],[0,255,0,255,100]];var t=hw.QE("levl");
|
|
for(var Q=0;Q<4;Q++)e4.Dm(t,Q,I[Q]);return t};a.Hw.prototype.td=function(W,h,S,k){if(this.m$==null){if(W.CD=="aply")S.g[S.w[0]].extend(new gj(0,0,S.e,S.Z));
|
|
this.m$=a.Hw.getData(S,null,W.CD=="fade"?S.c_().data:null);if(W.CD=="aply")this.m$[0].jj=S.jc()}if(W.o=="edit"){this.x7=[W.CD,W.Fv];
|
|
var p=this.m$[0],I=a.Hw.acQ(W.CD,W.Fv,p.zz),q=bS.wz(W.CD,I);if(W.CD=="fade"||W.CD=="aply")q=W.Fv;if(q!=null){for(var Q=0;
|
|
Q<this.m$.length;Q++){var P=this.m$[Q];if(W.rf)N.WQ(P.zz,P.Kf);else if(W.CD=="fade"){var t=hd.Gl(W.Fv.Md.v.BlnM),M=W.Fv.Opct.v.val/100,U=S.c_().data[Q];
|
|
N.WQ(U.zz,P.Kf);if(t=="norm")N.a.HH(P.zz,P.pY,P.Kf,P.pY,null,null,null,P.pY,M);else{var i=jO.Kn();i.Q8=!0;
|
|
for(var Q=0;Q<U.zz.length;Q+=4)if(U.zz[Q+3]!=P.zz[Q+3]){i=null;break}N.a.ha(t,P.zz,P.pY,P.Kf,P.pY,P.pY,M,i)}}else if(W.CD=="aply"){q=q.With.v;
|
|
var z=q.T.v,D,R;if(z[1].t=="name"){var O=0;for(var b=0;b<S.g.length;b++)if(S.g[b].getName()==z[1].v.val)O=b;
|
|
if(O==P.i){D=P.zz;R=P.pY}else{var w=S.g[O];D=w.buffer;R=w.rect}}else{R=new gj(0,0,S.e,S.Z);D=P.jj}var A=q.Clcl?q.Clcl.v.Clcn:null,t=A?hd.Gl(A):"norm",M=q.Opct?q.Opct.v.val/100:1,g=["RGB","Rd","Grn","Bl","Trsp"].indexOf(z[0].v.enum),I=q.Invr&&q.Invr.v;
|
|
if(I||g!=0){D=D.slice(0);if(I)N.ajM(D);if(g!=0){var E=N.U(R.n());N.sN(D,E,g-1);if(g==4)N.uA(E);for(var b=0;
|
|
b<3;b++)N.ce(E,D,b)}}if(A=="Add"||A=="Sbtr"){var j=1/q.Scl.v,x=q.Ofst.v,d=A=="Add"?1:-1,L=new Uint8ClampedArray(P.Kf.buffer);
|
|
for(var Q=0;Q<D.length;Q+=4){L[Q]=(P.zz[Q]+d*D[Q])*j+x;L[Q+1]=(P.zz[Q+1]+d*D[Q+1])*j+x;L[Q+2]=(P.zz[Q+2]+d*D[Q+2])*j+x}}else{var i=jO.Kn();
|
|
i.Q8=q.PrsT&&q.PrsT.v;P.Kf.fill(0);P.Kf.set(P.zz);N.a.ha(t,D,R,P.Kf,P.pY,P.pY,M,i)}}else bS.K1(q,P.zz,P.Kf,P.pY)}a.Hw.Ko(S,this.m$)}}if(W.o=="cancel"){a.Hw.eO(S,this.m$);
|
|
this.m$=null}if(W.o=="confirm"){var _=W.CD=="fade"?[2,11]:W.CD=="aply"?[2,12]:bS.names[W.CD],T=bS.wK(W.CD,this.x7[1]);
|
|
if(T!=-1)_=[4,16,T];a.Hw.my(S,this.m$,_,this);this.m$=null;if(T==-1)a.Hw.h4(h,this.x7)}S.G()};a.Hw.h4=function(W,h){var S=h[0],k=h[1],p,I;
|
|
if(bS.gV[S]){p=bS.gV[S];if(s[S])I=k}if(hw.gV[S]){p=hw.gV[S];if(s[S])I=k}if(S=="fade"){p="fade";I=k}if(S=="aply"){p="applyImageEvent";
|
|
I=k}if(p==null)return;var q=new em(y.E.gg,!0);q.data={AL:!0,HP:p};if(I){I=JSON.parse(JSON.stringify(I));
|
|
I.classID="null";delete I.__name;q.data.b4=I}W.c(q)};a.Hw.eO=function(W,h){a.Hw.q5(W,h)};a.Hw.my=function(W,h,S,k){for(var Q=0;
|
|
Q<h.length;Q++){var p=h[Q],I=W.g[p.i],q=p.i<0?W.BS[-1-p.i]:p.gA<=0?null:p.gA==1?I.kX():I.$U(W).v;if(q){q.Yn();
|
|
q.VT=!0;if(I)I.r9(W)}else{I.Yn();I.G()}delete p.Kf;delete p.ZZ}var P=new h3(S,k);P.data=h;W.nh(P);W.tn=!0};
|
|
a.Hw.Ko=function(W,h,S){for(var Q=0;Q<h.length;Q++){var k=h[Q],p=W.g[k.i],I=S?k.zz:k.Kf,q=k.pY;if(k.gA==0){p.extend(q);
|
|
if(k.ZZ){N.zt(k.zz,q,p.buffer,p.rect);N.a.HH(I,q,p.buffer,p.rect,k.ZZ,q,0,q,1)}else N.zt(I,q,p.buffer,p.rect)}else{var P=k.i<0?W.BS[-1-k.i]:k.gA==1?p.kX():p.$U(W).v;
|
|
P.extend(q);if(k.ZZ){var t=N.U(q.n()*4);N.WQ(k.zz,t);N.a.HH(I,q,t,q,k.ZZ,q,0,q,1);a.ut.vy(t,q,P)}else a.ut.vy(I,q,P);
|
|
P.VT=!0;if(p)p.r9(W)}if(p)p.G()}if(!S)a.Hw.ag(W,h)};a.Hw.q5=function(W,h){for(var Q=0;Q<h.length;Q++){var S=h[Q],k=W.g[S.i],p=S.pY,I=N.U(p.n()*4);
|
|
if(S.gA==0){N.zt(k.buffer,k.rect,I,p);k.extend(p);N.zt(S.zz,p,k.buffer,k.rect);k.Yn()}else{var q=S.i<0?W.BS[-1-S.i]:S.gA==1?k.kX():k.$U(W).v;
|
|
a.ut.Vu(q.channel,q.rect,q.color,I,p);q.extend(p);a.ut.vy(S.zz,p,q);q.Yn();q.VT=!0;if(k)k.r9(W)}S.zz=I;
|
|
if(k)k.G()}W.tn=!0};a.Hw.ag=function(W,h){var S=a.Hw.IP(W),k=~S;if(S==16777215)return;for(var Q=0;Q<h.length;
|
|
Q++){var p=h[Q],I=W.g[p.i],q=p.pY;if(p.gA!=0)continue;I.extend(q);var P=q.x-I.rect.x,t=q.y-I.rect.y,M=I.rect.e,U=new Uint32Array(p.zz.buffer),i=new Uint32Array(I.buffer.buffer);
|
|
for(var z=0;z<q.Z;z++)for(var D=0;D<q.e;D++){var R=z*q.e+D,O=(z+t)*M+(D+P);i[O]=i[O]&S|U[R]&k}I.Yn();
|
|
I.G()}W.G()};a.Hw.IP=function(W){var h=W.t.aL;return h[2]*16711680|h[1]*65280|h[0]*255};a.Hw.prototype._i=function(W,h){var S=h.g[W.i];
|
|
if(W.U0!=null)S.add[bS.get(S.add)]=W.U0;else a.Hw.q5(h,W);h.G()};a.Hw.prototype.UN=function(W,h){var S=h.g[W.i];
|
|
if(W.U0!=null)S.add[bS.get(S.add)]=W.kN;else a.Hw.q5(h,W);h.G()};a.L7=function(){a.vv.call(this,"Filter Edit",a.Ak);
|
|
this.m$=null;this.Hq=null;this.o=null;this.x7=null};a.L7.prototype=new a.vv;a.L7.prototype.ca=function(W,h,S,k,p){if(W.o=="start"){if(S.w.length==0)return;
|
|
var I=S.g[S.w[0]];if(I.add.SoLd&&I.Yi<=0&&S.ye.length==0){}else if(!S.KO(h,null,!0))return;var q=W.CD;
|
|
if((s[q]||hw.K[q])&&W.Fv==null){if(S.w.length!=1)alert("Will be applied to "+S.w.length+" layers.");
|
|
var P=new em(y.E.W,!0);P.data=a.L7.I3(q,this.XM(S,q));h.c(P)}else{var t={o:"edit",CD:q,Fv:W.Fv,vX:this.XM(S)};
|
|
this.ca(t,h,S,k,p);t.o="confirm";delete t.Fv;this.ca(t,h,S,k,p)}}if(W.o=="edit"||W.o=="cancel"||W.o=="confirm"){if(W.o=="edit")this.x7=[W.CD,W.Fv];
|
|
if(W.vX)this.acX(W,S,p);else this.a8L(W,h,S,p)}if(W.o=="applylast"&&this.x7!=null){var t={o:"edit",CD:this.x7[0],Fv:this.x7[1],vX:this.XM(S)};
|
|
this.ca(t,h,S,k,p);t.o="confirm";delete t.Fv;this.ca(t,h,S,k,p)}};a.L7.I3=function(W,h){var S=hw.K[W];
|
|
if(S)return{o:y.D.fX,b:S,n2:{vX:h}};else return{o:y.D.mJ,DG:"afw_"+W,vX:h}};a.L7.prototype.XM=function(W,h){var S=W.g[W.w[0]],k;
|
|
if(S.add.SoLd&&S.Yi<=0&&W.ye.length==0){k={i:W.w[0],index:0};if(S.add.SoLd.filterFX!=null){var p=S.add.SoLd.filterFX.v.filterFXList.v;
|
|
k.index=p.length;for(var Q=0;Q<p.length;Q++)if(hw.BT(p[Q].v)==h&&hw.K[h])k.index=Q}}return k};a.L7.prototype.acX=function(W,h,S){var k=h.g[W.vX.i],p=W.CD;
|
|
if(W.o=="edit"){if(this.o==null){var I=hw.names[p];if(I==null)I=bS.names[p];if(p=="blendOptions")I=[14,10];
|
|
this.o=new h3(I,this);this.o.data={vX:W.vX,af$:JSON.parse(JSON.stringify(k.add.SoLd))}}if(!k.rB()){k.add.SoLd.filterFX=hw.mG();
|
|
this.o.data.xF=jg.fj(k.add.SoLd.placed.v);h.iI(this.o.data.xF);k.KF(h)}var q=k.add.SoLd.filterFX.v.filterFXList.v;
|
|
if(q[W.vX.index]==null){q.push(hw.gn(p,S))}if(W.Fv){q[W.vX.index].v.enab.v=W.rf!=!0;if(p=="blendOptions")q[W.vX.index].v.blendOptions.v=W.Fv;
|
|
else q[W.vX.index].v.Fltr.v=W.Fv}this.o.data.acD=JSON.parse(JSON.stringify(k.add.SoLd));this.UN(this.o.data,h)}if(W.o=="cancel"){if(this.o)this._i(this.o.data,h);
|
|
this.o=null}if(W.o=="confirm"){if(this.o)h.nh(this.o);this.o=null}};a.L7.prototype.ZU=function(W){return{p:W>>>16,z:W>>>8&255,S:W&255}};
|
|
a.L7.prototype.a8L=function(W,h,S,k){if(this.m$==null){var p=hw.DD(W.CD,W.Fv);this.m$=a.Hw.getData(S,p.x!=0||p.y!=0)}if(W.o=="edit"){var I=JSON.stringify(W.Fv);
|
|
if((W.Fv==null||I!=this.Hq)&&W.rf!=!0)for(var Q=0;Q<this.m$.length;Q++){var q=this.m$[Q],P={rect:q.pY,buffer:q.zz},t={rect:q.pY,buffer:q.Kf};
|
|
if(W.CD=="Avrg"&&q.ZZ){P.buffer=q.zz.slice(0);N.vJ(q.ZZ,P.buffer)}hw.K1(W.CD,P,W.Fv,this.ZU(k.Ps),this.ZU(k.lL),t,[S.add.lnk2?S.add.lnk2:[],S.g[S.w[0]].kX(),S.BS,S.O4()]);
|
|
if(W.CD=="Avrg"&&q.ZZ){var M=q.zz.length;for(var Q=0;Q<M;Q+=4)q.Kf[Q+3]=q.zz[Q+3]}this.Hq=I}a.Hw.Ko(S,this.m$,W.rf)}if(W.o=="cancel"){a.Hw.eO(S,this.m$);
|
|
this.m$=null;this.Hq=null}if(W.o=="confirm"){a.Hw.my(S,this.m$,hw.names[W.CD],this);this.m$=null;this.Hq=null;
|
|
a.Hw.h4(h,this.x7)}S.G();S.tn=!0};a.L7.prototype._i=function(W,h){if(W.vX){var S=h.g[W.vX.i];if(W.xF)h.rw(W.xF);
|
|
S.add.SoLd=JSON.parse(JSON.stringify(W.af$));if(S.rB())S.k0(h);else{S.KF(h);S.Yi=0}}else a.Hw.q5(h,W);
|
|
h.G();h.tn=!0};a.L7.prototype.UN=function(W,h){if(W.vX){var S=h.g[W.vX.i];if(W.xF)h.iI(W.xF);S.add.SoLd=JSON.parse(JSON.stringify(W.acD));
|
|
if(S.rB())S.k0(h);else S.KF(h);if(!S.t0())S.S5+=32}else a.Hw.q5(h,W);h.G();h.tn=!0};var f6={W8:"0",og:"1",$h:"2",sD:"3",xQ:"4",OA:"5",JF:"6",RP:"7",u:"8",$q:"8.5",Z1:"8.8",kh:"9",a5:"10",Z3:"11",ua:"12",rQ:"13",Yk:"14",xC:"15",xT:"16",Ov:"21",gH:"22",z_:"23",ic:"23.0",Qc:"23.1",Vm:"23.2",Da:"23.3",Fe:"23.4",tU:"23.5",ap:"23.6",J3:"30",bt:"31",pN:"40",CI:"41",DR:"42"};
|
|
f6.x6={};f6.x6[f6.og]=["abr","brushes",gH,[9,3]];f6.x6[f6.$h]=["grd","gradients",gZ,[12,37]];f6.x6[f6.sD]=["shc","contours",f8,[12,21]];
|
|
f6.x6[f6.xQ]=["asl","styles",ji,[12,22]];f6.x6[f6.OA]=["pat","patterns",dR,[12,62]];f6.x6[f6.JF]=["csh","shapes",hv,[12,77]];
|
|
f6.x6[f6.RP]=["aco","swatches",fY,[9,8]];f6.x6[f6.u]=["atn","actions",ih,[9,9]];f6.x6[f6.$q]=["tpl","tpresets",aL,[9,12]];
|
|
f6.x6[f6.Z1]=["icc","profiles",hR,"ICCs"];function h3(W,h,S){if(S==null)S=!1;this.name=W;this.b=h;this.jy=S;
|
|
this.data=null;this.ae8=Date.now()}var fP={};fP.gj=function(W,h){var S={t:"Clss",v:{classID:W}};if(h)S={t:"Enmr",v:{classID:W,typeID:"Ordn",enum:"Trgt"}};
|
|
return{t:"obj ",v:[S]}};fP.cP=function(W,h){var S={classID:"Lyr"};S[W]=h;return{HP:"set",b4:{classID:"null",null:fP.gj("Lyr",!0),T:{t:"Objc",v:S}}}};
|
|
fP.a5a=function(W,h,S,k,p){var I=new em(y.E.gg,!0),q=[],Q=0,P=fP.cj(h,S,k,q);while(q.length!=0){var t=q.pop();
|
|
Q++;if(!t.P)continue;console.log(Q-1);if(t.HP=="conditional"){var M=W.g[W.w[0]],U=t.b4.null.v.Cndt,i=!1;
|
|
if(U=="Bckg")i=!1;else if(U=="Pxel"&&W.xi(!1))i=!0;else if(U=="Adjs"&&bS.get(M.add))i=!0;else if(U=="Shp"&&M.add.vogk)i=!0;
|
|
else if(U=="Grup"&&M.vc())i=!0;else if(U=="Opn"&&W!=null)i=!0;else if(U=="32Bt")i=!1;else if(U=="RGB")i=!0;
|
|
var z=t.b4.then,D=t.b4.else;if(i&&z)fP.cj(h,z.v[0].v.val,z.v[1].v.val,q);if(!i&&D)fP.cj(h,D.v[0].v.val,D.v[1].v.val,q)}else if(t.HP=="stop"){if(t.b4.Cntn&&t.b4.Cntn.v==!0)window.confirm(t.b4.Msge.v);
|
|
else{alert(t.b4.Msge.v);break}}else if(t.HP=="play"){var R=t.b4.null.v,O=new em(y.E.W,!0);O.data={o:y.D.se,cM:[R[0].v.val,R[1].v.val]};
|
|
p.c(O)}else{I.data={HP:t.HP,b4:t.b4};p.c(I)}}};fP.cj=function(W,h,S,k){var p;for(var Q=0;Q<W.length;
|
|
Q++){if(W[Q].rO!=S)continue;var I=W[Q].Vz;for(var q=0;q<I.length;q++){if(I[q].rO!=h)continue;p=I[q].Vz}}var P=p.length;
|
|
for(var Q=0;Q<P;Q++)k.push(p[P-1-Q])};fP.aa5=function(W){var h=W.HP,S=W.b4,k,q,P,t,M;if(S&&S.null)k=S.null.v[0];
|
|
if(S&&k==null&&S.At)k=S.At.v[0];if(k&&k.t=="obj ")k=k.v[0];var p=k?k.v.classID:null,I=["purge"];if(I.indexOf(h)!=-1)return h[0].toUpperCase()+h.slice(1);
|
|
if(h=="GEfc")return bh.names[S.GEfk.v.GEft][1];M=bS.gV;for(q in M)if(M[q]==h)P=q;M=hw.gV;for(q in M)if(M[q]==h)t=q;
|
|
if(P){var U=bS.wK(P,S);if(U!=-1)return[4,16,U];return bS.names[P]}if(t)return hw.names[t];var i=fP.vT;
|
|
if(h=="make"){if(k){if(p=="AdjL")return[6,1];else if(p=="layerSection")return S.From?[6,9]:[6,20];else if(p=="Lyr")return[6,13];
|
|
else if(p=="Chnl"&&k.v.enum=="Msk")return[6,2];else if(p=="contentLayer")return[6,48,1];else if(p=="BckL")return"Make Background Layer";
|
|
else if(p=="Path")return"Make Path";else if(p=="TxLr")return"Make Text Layer";else if(p=="slice")return"Make Slices"}if(S.Nw){p=S.Nw.v.classID;
|
|
if(p=="Dcmn")return[11,7];else if(p=="Chnl"||p=="SCch")return"New Channel"}}else if(h=="deselect"){if(p=="Path")return"Deselect current path";
|
|
else throw p}else if(h=="select"){if(p=="Chnl")return"Select "+(k.v.enum=="Msk"?"Mask ":"")+"Channel";
|
|
else if(p=="Mn")return"Select Panel \""+k.v.enum+"\"";else if(p=="Lyr"){if(k.t=="Enmr")return"Select "+{Bckw:"Backward",Frwr:"Forward"}[k.v.enum]+" Layer";
|
|
return"Select Layer \""+k.v.val+"\""}else if(p=="Path")return"Select Path";else if(p=="Brsh")return"Select Brush";
|
|
else if(p=="Dcmn")return"Select Document"}else if(i[h]&&p=="Chnl"){var z=k.v.keyID=="fsel";return i[h]+" "+(z?"Selection":"Channel")}else if(h=="set"){if(p=="Lyr")return"Set Current Layer";
|
|
else if(p=="AdjL")return[6,39];else if(p=="contentLayer")return[6,48,2];else if(p=="Prpr")return[11,6];
|
|
else if(p=="Clr")return"Set "+(k.v.keyID=="FrgC"?"Foreground":"Background")+" color";else if(p=="Brsh")return"Set Brush";
|
|
else console.log(p)}else if(h=="move"){if(p=="Lyr")return"Move Layer"}else if(h=="show"||h=="hide"){var D="";
|
|
if(p=="Lyr")+"Layer";if(p=="Chnl")+"Channel";return(h=="show"?"Show":"Hide")+" "+D}else if(h=="reset"){if(p=="Clr")return"Reset Colors"}else if(h=="exchange"){if(p=="Clr")return[22,7,0]}else if(h=="rotateEventEnum")return[2,5];
|
|
else if(h=="flip"){var R=S.Axis.v.Ornt=="Hrzn";return[[2,6],[22,4,R?2:3]]}if(p=="Chnl"){if(h=="duplicate"){if(k.v.keyID=="fsel")return"Selection to Channel";
|
|
else return"Duplicate Channel"}if(h=="delete")return"Delete Channel"}if(h=="transform")return k&&k.v.keyID=="fsel"?[7,10]:[10,16];
|
|
var O={cut:[5,0],copyEvent:[5,1],copyToLayer:[6,49],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],fill:[2,3],colorRange:[7,8],desaturate:[19,7,0],delete:S?[6,31]:[2,2],align:[20,4,0],applyLocking:[6,57,1],crop:[11,12,1],placedLayerEditContents:"Edit Contents",convertMode:"Convert Mode",newPlacedLayer:[6,7,0],canvasSize:[11,3],imageSize:[11,10],rasterizeLayer:[6,8],revealAll:[11,12,2],conditional:"If"},b=O[h];
|
|
if(b==null)b=fP.SV[h];if(b)return b;return h};fP.SV={border:[7,9],smoothness:[19,3,0],expand:[7,4],contract:[7,5],feather:[7,6],inverse:[7,2]};
|
|
fP.vT={set:"Set",add:"Add Transparency",addTo:"Add To",subtract:"Subtract Transparency",subtractFrom:"Subtract From",interfaceIconFrameDimmed:"Intersect Transparency",interfaceWhite:"Intersect With"};
|
|
fP.a6e=function(W,h,S,k){var p=W.HP,I=W.b4,q=new em(y.E.u,!0),M,U,i,z,R;q.b=a.m5;var P=new em(y.E.W,!0),t=["purge","updatePlacedLayer","convertMode"];
|
|
if(t.indexOf(p)!=-1)return;z=bS.gV;for(M in z)if(z[M]==p)U=M;z=hw.gV;for(M in z)if(z[M]==p)i=M;if(p=="fade")U=p;
|
|
if(p=="applyImageEvent")U="aply";if(U){q.b=a.AT;q.data={o:"start",dv:U,Fv:I}}else if(i){q.b=a.Ak;q.data={o:"start",CD:i,Fv:I}}else if(p=="GEfc"){q.b=a.Ak;
|
|
q.data={o:"start",CD:"GEfc",Fv:I}}else if(p=="imageSize"||p=="canvasSize"||p=="revealAll"||p=="trim"||p=="crop"){q.b=a.ot;
|
|
q.data={o:"fromAction",eS:W}}else if(p=="fill"||p=="stroke"||p=="delete"&&I==null){q.b=a.og;q.data={o:"fromAction",eS:W}}else if(p=="colorRange"){q.b=a.Ck;
|
|
q.data={o:"fromAction",eS:W}}else if(fP.SV[p]||fP.vT[p]&&(!1||I.With&&I.With.v[0].v.keyID=="fsel"||I.From&&I.From.v[0].v.keyID=="fsel"||I.null&&I.null.v[0].v.keyID=="fsel"||I.T.v[0]&&I.T.v[0].v.keyID=="fsel")){q.b=a.Ck;
|
|
q.data={o:"fromAction",eS:W}}var D={copyToLayer:$.Tp,mergeLayersNew:k&&k.w.length==1?$.JD:$.m7,rasterizeLayer:$.D7,mergeVisible:$.sA,flattenImage:$.lQ,newPlacedLayer:$.JT};
|
|
if(D[p])q.data={o:D[p],b4:I};if(q.data){h.c(q);return}if(p=="desaturate"){q.b=a.AT;q.data={o:"auto",Np:3};
|
|
if(k&&k.g[k.w[0]].add.SoLd==null)h.c(q);return}if(p=="close"){if(I.Svng.v.YsN=="Ys"){P.data={o:y.D.qE};
|
|
h.c(P)}P.data={o:y.D.Xp,$x:k};h.c(P);return}if(p=="save"){P.data={o:y.D.qE};h.c(P);return}if(p=="copyMerged"){P.data={o:y.D.Lu,H6:!0,PE:!0};
|
|
h.c(P);return}var D={placedLayerEditContents:y.D.a8u,copyEvent:y.D.Lu,paste:y.D.lR};if(D[p])P.data={o:D[p],PE:!0};
|
|
if(P.data){h.c(P);return}if(I.null||I.At)R=(I.null?I.null:I.At).v;else R=[{t:"----",v:I}];if(R[0].t=="obj "){if(R.length!=1)throw"e";
|
|
R=R[0].v}for(var O=0;O<R.length;O++){var b=R[O],w=b.v.classID;q.data=null;if(p=="make"){if(I.null==null&&I.Nw)w=I.Nw.v.classID;
|
|
if(w=="AdjL"){q.data={o:$.xP,b4:I}}else if(w=="layerSection"){q.data=I.From?{o:$.mr}:{o:$.fg};if(I.Usng){var A=I.Usng.v;
|
|
if(A.Nm)q.data.bZ=A.Nm.v;if(A.Clr)q.data.uM=fP.JQ(A)}}else if(w=="Lyr"){if(I.Usng&&I.Usng.v.length==2)q.data={o:$.JE};
|
|
else{q.data={o:$.gL};if(I.Usng)q.data.bZ=I.Usng.v.Nm.v;if(I.below&&I.below.v)q.data.adR=!0}}else if(w=="Chnl"&&b.v.enum=="Msk"){q.data={o:$.wD,VS:I.Usng.v.UsrM}}else if(w=="Chnl"||w=="SCch"){q.data={o:$.b$,s7:"fromAction",k:W}}else if(w=="contentLayer"){q.data={o:$.yU,b4:I}}else if(w=="BckL"){k.g[k.w[0]].a3Z();
|
|
continue}else if(w=="Dcmn"){var g=I.Nw.v;P.data={o:y.D.Hf,om:jg.a0h(g,S)}}else if(w=="Ptrn")P.data={o:y.D.vI,nP:0};
|
|
else if(w=="Path"){q.b=a.ga;q.data={o:"pathedit",s7:"fromsel"}}else if(w=="TxLr"){q.b=a.mj;q.data={o:"fromAction",eS:W}}else if(w=="slice"){q.b=a.It;
|
|
q.data={o:"fromAction",eS:W}}else if(w=="SnpS"){continue}else{console.log(p,w,I);throw"e"}}else if(p=="deselect"){if(w=="Path"){k.yQ=[];
|
|
k.WU=k.Hx=!0;continue}else throw w}else if(p=="select"){var E={PcTl:a.Q5,PbTl:a.og,magicWandTool:a.oM};
|
|
if(w=="Lyr"){var j=I.selectionModifier,x=j?j.v.selectionModifierType:null,d=fP.jg(k,b);if(d==-1){alert("Layer "+b.v.val+" does not exist.");
|
|
throw"e"}q.data={o:$.uR,i:d,aem:x?["addToSelection","addToSelectionContinuous"].indexOf(x):null,_N:0,asB:!0}}else if(w=="Path"){if(b.v.keyID=="WrPt"){k.yQ=[0];
|
|
k.WU=k.Hx=!0;continue}else throw b}else if(w=="Chnl"){q.data={o:$.uR,i:d,_N:1}}else if(w=="Dcmn"){if(h.o0.length<2)return;
|
|
P.data={o:y.D.a62,dir:I.null.v[0].v.val}}else if(w=="Brsh"){var L=S.zl.list,_;for(var Q=0;Q<L.length;
|
|
Q++){if(L[Q].v.Nm.v==b.v.val)_=L[Q].v}P.data={o:y.D.XO,nP:f6.Yk,_n:_}}else if(E[w]){P.data={o:y.D.fX,b:E[w]}}else throw w}else if((p=="set"||p=="reset"||p=="exchange")&&w=="Clr"){P.data={o:y.D.XO,nP:f6.Ov,s7:p=="reset"?3:2};
|
|
if(p=="set"){P.data.s7=b.v.keyID=="FrgC"?0:1;var T=N.X.iZ(I.T.v);P.data.k=T.p<<16|T.z<<8|T.S}}else if(p=="set"){if(w=="AdjL"){var c=I.T.v.classID;
|
|
c=bS.Sd[c];q.b=a.AT;if(c)q.data={o:"edit_layer",k:I.T.v}}else if(w=="Lyr"){var e=I.T.v,d=fP.jg(k,b);
|
|
if(e.Nm)q.data={o:$.NV,name:e.Nm.v};else if(e.Opct)q.data={o:$.Jn,kN:Math.round(e.Opct.v.val*255/100)};
|
|
else if(e.fillOpacity)q.data={o:$.mv,kN:Math.round(e.fillOpacity.v.val*255/100)};else if(e.Md)q.data={o:$.c9,kN:hd.iR.indexOf(e.Md.v.BlnM)+(k.g[d].vc()?1:0)};
|
|
else if(e.Usrs)q.data={o:$.fY,i:d};else if(e.Blnd){q.b=a.gk;q.data={o:"setstl",i:d,k:{blendOptions:{t:"objc",v:e}}};
|
|
h.c(q);q.data={o:"confirm",i:d}}else if(e.userMaskFeather||e.userMaskDensity){var r=e.userMaskFeather,B=e.userMaskDensity;
|
|
q.b=a.m5;var d=k.w[0],F=k.g[d].iK(0);if(r)F.ib=r.v.val;if(B)F.uX=B.v.val;q.data={o:$.pF,L3:d,xh:F}}else if(e.Clr){var v=fP.JQ(e);
|
|
q.data={o:$.mI,a05:v}}else if(R[0].t=="prop")continue;else{console.log(I);throw"e"}var X=k.g[d];X.a3H()}else if(w=="Prpr"){var e=JSON.parse(JSON.stringify(I.T.v));
|
|
if(b.v.keyID=="TxtS"){var d=fP.jg(k,I.null.v[1]),X=k.g[d],V=X.add.TySh,H=JSON.parse(JSON.stringify(V.MW)),o=gf.x5(H),J=gf.Ql(H,0,o.length-2);
|
|
if(e.Undl&&e.Undl.v.Undl=="underlineOnLeftInVertical")J.D4.Underline=!0;gf.$n(H,0,o.length-1,J);q.b=a.mj;
|
|
q.data={o:"newED",aQ:d,yw:H};O=1e9}else{for(var C in e)if(e[C].v){if(C=="Scl")e[C].v.val=100;if(e[C].v.TrnS&&e[C].v.TrnS.v.Crv==null){e[C].v.TrnS=JSON.parse(hz.Au[9]).TrnS}}j6.ph(e);
|
|
if(e.masterFXSwitch==null)e.masterFXSwitch={t:"bool",v:!0};var d=fP.jg(k,I.null.v[1]);q.b=a.gk;q.data={o:"setstl",i:d,k:{Lefx:{t:"objc",v:e}}};
|
|
h.c(q);q.data={o:"confirm",i:d}}}else if(w=="contentLayer"){var d=fP.jg(k,b),e=I.T.v;if(e.classID=="shapeStyle")e=e.FlCn.v;
|
|
var K={solidColorLayer:0,gradientLayer:1,patternLayer:2}[e.classID],u=a.C8.VF(k,d),i=u.eY==K+1?u.EH:hz.$Z[K];
|
|
i=JSON.parse(JSON.stringify(i));a.X2.GB(e,i,K);q.data={o:$.IR,Z$:[d],hF:!0,k:{eY:K+1,EH:i}}}else if(w=="Brsh"){var _=JSON.parse(JSON.stringify(S.zl.ev)),f=I.T.v;
|
|
if(f.masterDiameter)_.Brsh.v.Dmtr.v.val=f.masterDiameter.v.val;else console.log("unknown brush parameters");
|
|
P.data={o:y.D.XO,nP:f6.Yk,_n:_}}else{console.log(b,I);throw w}}else if(p=="move"){if(w=="Lyr"){var e=I.T.v;
|
|
if(e.classID=="Ofst"){q.data={o:"trsl",GV:e.Hrzn.v.val,qp:e.Vrtc.v.val};q.b=a.M2}else{var l,jk;if(e[0].t=="Enmr"){if(e[0].v.enum=="Frnt")jk=0;
|
|
else if(e[0].v.enum=="Nxt")jk=1;else if(e[0].v.enum=="Prvs")jk=2;else if(e[0].v.enum=="Back")jk=3;else throw"e"}else l=e[0].v.val;
|
|
q.data={o:$.Ar,target:l,s7:jk,ab8:I.Dplc?I.Dplc.v:!1}}}}else if(p=="groupEvent"||p=="ungroup")q.data={o:$.Wk};
|
|
else if(p=="show"||p=="hide"){if(w=="Lyr"){var d=fP.jg(k,b);if(d==-1)continue;var hE=k.g[d].jP();if(p=="show"&&hE||p=="hide"&&!hE)continue;
|
|
q.data={o:$.EO,i:d}}else if(w=="Chnl"){q.data={o:$.b$,s7:"fromAction",k:W}}else if(w=="filterFX"){if(b.v.val!=null)q.data={o:$.tv,index:b.v.val-1};
|
|
q.data={o:$.Ce};R=[R[0]]}}else if(p=="rotateEventEnum"){q.b=a.ot;var Z=I.Angl.v.val;q.data={o:"rot",rO:[2,5],k:-Z*Math.PI/180}}else if(p=="flip"){q.b=a.ot;
|
|
var aQ=I.Axis.v.Ornt=="Hrzn",jC=aQ?new eC(-1,1):new eC(1,-1);q.data={o:"scl",rO:[[2,6],[22,4,aQ?2:3]],k:jC}}else if(p=="transform"){var eO=1,iU=1,gK=0,iM=0,i5=0,fN=0,dx=0;
|
|
if(I.Wdth)eO=I.Wdth.v.val/100;if(I.Hght)iU=I.Hght.v.val/100;if(I.Skew){var ai=I.Skew.v;gK=ai.Hrzn.v.val;
|
|
iM=ai.Vrtc.v.val}if(I.Ofst){var hO=I.Ofst.v;fN=hO.Hrzn.v.val;dx=hO.Vrtc.v.val}if(I.Angl)i5=I.Angl.v.val;
|
|
var ff=new ex;ff.concat(new ex(eO,eO*Math.tan(iM*Math.PI/180),iU*Math.tan(gK*Math.PI/180),iU,0,0));ff.rotate(-i5*Math.PI/180);
|
|
ff.translate(fN,dx);var eP={Qcsa:4,Qcs0:0,Qcs1:2,Qcs2:8,Qcs3:6,Qcs4:1,Qcs5:5,Qcs6:7,Qcs7:3}[I.FTcs.v.QCSt];
|
|
if(eP==null)throw I.FTcs.v.QCSt;var b=I.null;if(b&&b.v instanceof Array)b=b.v[0];var d=b?fP.jg(k,b):null;
|
|
if(d==-1)d=null;q.b=b&&b.v.keyID=="fsel"?a.ec:a.Fh;q.data={o:"mat",sr:eP,k:ff}}else if(w=="Chnl"){q.data={o:$.b$,s7:"fromAction",k:W}}else if(p=="duplicate")q.data={o:$.T2,bZ:I.Nm?I.Nm.v:null};
|
|
else if(p=="delete"){if(w=="filterFX"){if(b.v.val!=null)q.data={o:$.vH,xL:b.v.val-1};else q.data={o:$.Wo}}else q.data={o:$.Xr};
|
|
R=[R[0]]}else if(p=="align"){if(I.Aply&&I.Aply.v.projection=="Auto"){q.b=a.ot;q.data={o:"auto-align"}}else{q.b=a.M2;
|
|
var a0=I.Usng.v.ADSt,U={AdLf:0,AdCH:1,AdRg:2,AdTp:4,AdCV:5,AdBt:6}[a0];if(U==null)throw a0;q.data={o:"algn",k:U}}}else if(p=="applyLocking"){var bM=I.layerLocking.v,cV;
|
|
if(bM.protectTransparency)cV=[[bM.protectTransparency.v],[0]];else if(bM.protectNone)cV=[[!1,!1,!1,!1],[0,1,2,31]];
|
|
else{console.log(bM);throw"e"}q.data={o:$.q9,kN:cV}}if(q.data)h.c(q);else if(P.data)h.c(P);else{console.log(W);
|
|
alert("Unknown action \""+p+"\"");throw"e"}}};fP.JQ=function(W){var h={None:0,Rd:1,Orng:2,Ylw:3,Grn:4,Bl:5,Vlt:6,Gry:7}[W.Clr.v.Clr];
|
|
if(h==null)throw W.Clr.v.Clr;return h};fP.jg=function(W,h){var S=1e6,k=0;for(var Q=0;Q<W.w.length;Q++){S=Math.min(S,W.w[Q]);
|
|
k=Math.max(k,W.w[Q])}var p=h.t,I=-1;if(p=="name"){var q=h.v.val,I=-1;for(var Q=0;Q<W.g.length;Q++)if(W.g[Q].getName()==q){I=Q;
|
|
break}}if(p=="Enmr"&&W.w.length!=0)I=W.w[0];if(p=="Enmr"&&h.v.enum=="Frwr")I=k+1;if(p=="Enmr"&&h.v.enum=="Bckw")I=S-1;
|
|
if(p=="prop"){if(h.v.keyID=="Bckg")I=0}return I};var bS={};bS.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]};
|
|
bS.Zm=["expA","clrL","selc"];bS.cC=[[13,1,1],[13,1,3],[13,1,4],[13,1,11],[13,1,5],[13,1,12]];bS.asE=[[13,1,11],[13,1,12],[13,1,3],[13,1,10]];
|
|
bS.c$=[[13,1,1],[13,1,4],[13,1,5]];bS.wb={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"};
|
|
bS.Sd=function(){var W=JSON.parse(JSON.stringify(bS.wb));delete W.GrMp;W.GdMp="grdm";return W}();bS.gV={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"};
|
|
bS.keys={levl:[hW.Q9,hW.UT],curv:[hW.Q9,hW.mp],hue2:[hW.Q9,hW.OE],nvrt:[hW.Q9,hW.yg],blnc:[hW.Q9,hW.vF]};
|
|
bS.gl=function(W){var h=hw.QE("mixr");h.Mnch={t:"bool",v:W.zM};function S(k,Q){var p={classID:"ChMx"},I={Rd:0,Grn:1,Bl:2,Cnst:4};
|
|
for(var q in I)p[q]={t:"UntF",v:{type:"#Prc",val:k[Q+I[q]]}};return{t:"Objc",v:p}}if(W.zM)h.Gry=S(W.k,0);
|
|
else{h.Rd=S(W.k,0);h.Grn=S(W.k,5);h.Bl=S(W.k,10)}return h};bS.bj=function(W){function h(k,p,Q){var I={Rd:0,Grn:1,Bl:2,Cnst:4};
|
|
for(var q in I)if(k[q])p[Q+I[q]]=k[q].v.val}var S={zM:!1,k:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};
|
|
if(W.Mnch&&W.Mnch.v)S.zM=!0;if(S.zM)h(W.Gry.v,S.k,0);else{h(W.Rd.v,S.k,0);h(W.Grn.v,S.k,5);h(W.Bl.v,S.k,10)}return S};
|
|
bS.get=function(W){for(var h in bS.names)if(W[h]!=null)return h;return null};bS.wz=function(W,h){var S=bS.Df,k;
|
|
if(W=="brit"){var p=h.Brgh?h.Brgh.v:0,I=h.Cntr?h.Cntr.v:0,q=h.useLegacy?h.useLegacy.v:!1;if(q){var P=p/255,t=1+I/100;
|
|
if(t>1)t=1+Math.tan(Math.PI/2*I/101);var M=(1-t)/2,U=N.iD.Yc(P,P,P),i=[t,0,0,M,0,t,0,M,0,0,t,M,0,0,0,1],z=N.iD.multiply(U,i),D=new N.qr(256);
|
|
for(var Q=0;Q<256;Q++)D.p[Q]=Q;N.iD.transform(D,D,z);k={type:S.Ja,vw:D.p,ll:D.p,Ah:D.p,Xh:!1,q4:!1}}else{var R=1024,O=-30+60*(I+100)/200,b=[];
|
|
for(var Q=0;Q<4;Q++)b.push(N.Ey.xA(Q/3*255,Q/3*255,!0));b[1].v.Hrzn.v=64;b[1].v.Vrtc.v=64-O;b[2].v.Hrzn.v=128+64;
|
|
b[2].v.Vrtc.v=128+64+O;b.sort(function(aU,hf){return aU.v.Hrzn.v-hf.v.Hrzn.v});var w=N.Ey.AE(b,R);function A(aU,R){var b=[],g8=3;
|
|
for(var Q=0;Q<g8+1;Q++)b.push(N.Ey.xA(Q/g8*255,Q/g8*255,!0));b[1].v.Hrzn.v=130-aU*26;b[1].v.Vrtc.v=130+aU*51;
|
|
b[2].v.Hrzn.v=233-aU*48;b[2].v.Vrtc.v=233+aU*10;return N.Ey.AE(b,R)}var g=A(Math.abs(p)/100,R);if(p<0){var E=[],j=1/R;
|
|
for(var Q=0;Q<R;Q++){var x=Q*j,d=Q;while(g[d]>x&&d>1)d--;E[Q]=d*j}g=E}var L=new Uint8Array(R);for(var Q=0;
|
|
Q<R;Q++){var _=Math.round((R-1)*g[Q]);L[Q]=Math.round(255*w[_])}k={type:S.Ja,vw:L,ll:L,Ah:L,Xh:!1,q4:!1}}}if(W=="levl"){var T=[],c,e,U,r,B,F;
|
|
for(var Q=0;Q<4;Q++)T.push(e4.mu(h,Q));c=-T[0][0]/255;e=1/(T[0][1]/255-T[0][0]/255);U=N.iD.multiply(N.iD.nb(e,e,e),N.iD.Yc(c,c,c));
|
|
r=N.iD.nb(1/(T[1][1]/255-T[1][0]/255),1/(T[2][1]/255-T[2][0]/255),1/(T[3][1]/255-T[3][0]/255));B=N.iD.Yc(-T[1][0]/255,-T[2][0]/255,-T[3][0]/255);
|
|
F=N.iD.multiply(r,B);var L=new N.qr(256);for(var Q=0;Q<256;Q++)L.p[Q]=L.z[Q]=L.S[Q]=Q;var v=1/(T[0][4]/100),X=1/(T[1][4]/100),V=1/(T[2][4]/100),o=1/(T[3][4]/100);
|
|
N.iD.transform(L,L,F);for(var Q=0;Q<256;Q++){L.p[Q]=Math.round(Math.max(0,Math.min(255,255*Math.pow(L.p[Q]/255,X))));
|
|
L.z[Q]=Math.round(Math.max(0,Math.min(255,255*Math.pow(L.z[Q]/255,V))));L.S[Q]=Math.round(Math.max(0,Math.min(255,255*Math.pow(L.S[Q]/255,o))))}N.iD.transform(L,L,U);
|
|
for(var Q=0;Q<256;Q++){L.p[Q]=Math.round(Math.max(0,Math.min(255,255*Math.pow(L.p[Q]/255,v))));L.z[Q]=Math.round(Math.max(0,Math.min(255,255*Math.pow(L.z[Q]/255,v))));
|
|
L.S[Q]=Math.round(Math.max(0,Math.min(255,255*Math.pow(L.S[Q]/255,v))))}c=T[0][2]/255;e=T[0][3]/255-T[0][2]/255;
|
|
U=N.iD.multiply(N.iD.Yc(c,c,c),N.iD.nb(e,e,e));r=N.iD.nb(T[1][3]/255-T[1][2]/255,T[2][3]/255-T[2][2]/255,T[3][3]/255-T[3][2]/255);
|
|
B=N.iD.Yc(T[1][2]/255,T[2][2]/255,T[3][2]/255);F=N.iD.multiply(B,r);N.iD.transform(L,L,N.iD.multiply(U,F));
|
|
k={type:S.Ja,vw:L.p,ll:L.z,Ah:L.S,Xh:!1,q4:!1}}if(W=="curv"){var J=ht.mu(h,0).length==256?1:0,C=[];if(J==0){var Y=N.Ey.vm(ht.mu(h,0),256);
|
|
for(var Q=1;Q<4;Q++){var K=N.Ey.vm(ht.mu(h,Q),256);C.push(N.Ey.hH(K,Y))}}else{var u=[];for(var Q=0;Q<4;
|
|
Q++){var f=new Uint8Array(256);u.push(f);var l=ht.mu(h,Q);for(var d=0;d<256;d++)f[d]=l[d]}for(var Q=1;
|
|
Q<4;Q++)C.push(N.Ey.hH(u[Q],u[0]))}k={type:S.Ja,vw:C[0],ll:C[1],Ah:C[2],Xh:!1,q4:!1}}if(W=="expA"){var jk=h.Exps,hE=h.Ofst,Z=h.gammaCorrection,aQ=jk?jk.v:0,jC=hE?hE.v:0,eO=Z?Z.v:1,L=new Uint8Array(256);
|
|
for(var Q=0;Q<256;Q++){var h=Q/255,iU=Math.pow(Math.abs(jC),1/(Math.PI/2));if(jC>0){h=Math.max(jC/Math.E,h);
|
|
h=h*Math.exp(jC/1.75+aQ/Math.PI);h=(1-iU)*h+iU*1}else{h=h*Math.exp(-jC*1.75+aQ/Math.PI);h=h+-iU*1.14}h=Math.pow(h,1/eO);
|
|
h=Math.max(0,Math.min(1,h));L[Q]=Math.round(h*255)}k={type:S.Ja,vw:L,ll:L,Ah:L,Xh:!1,q4:!1}}if(W=="vibA"){var gK=(h.vibrance?h.vibrance.v:0)/100,iM=(h.Strt?h.Strt.v:0)/100,iU=1+gK*(gK>0?.25:.5),i5=.8+.2/iU;
|
|
k={type:S.k4,nP:[gK,iM,i5,iU]}}if(W=="hue2"){var fN=[],dx=[],ai=[],hO=h.Clrz?h.Clrz.v:!1;for(var Q=0;
|
|
Q<256;Q++){fN[Q]=Q/255;dx[Q]=0;ai[Q]=0}var ff=bU.mu(h,0),eP=bS.hB(ff[1]/100);if(hO){var a0=ff[0]/360;
|
|
for(var Q=0;Q<256;Q++){fN[Q]=a0;dx[Q]=eP}}else{for(var Q=0;Q<256;Q++){var bM=fN[Q],cV=dx[Q];fN[Q]+=ff[0]/360;
|
|
for(var d=0;d<6;d++){var aX=bU.mu(h,d+1),j8=aX.Ym,j3=aX.Sz,iU=0;for(var am=1;am<4;am++)if(j3[am]<j3[0])j3[am]+=360;
|
|
var fG=j3[0],bw=j3[1],fz=j3[2],c6=j3[3],hk=bM*360;if(hk<j3[0])hk+=360;var as=(hk-fG)/(bw-fG),bf=(hk-fz)/(c6-fz);
|
|
if(as<0)iU=0;else if(as<1)iU=as;else if(bf<0)iU=1;else if(bf<1)iU=1-bf;else iU=0;var t=bS.hB(j8[1]/100);
|
|
fN[Q]+=iU*j8[0]/360;dx[Q]+=iU*t;ai[Q]+=iU*j8[2]/100}}for(var Q=0;Q<256;Q++){dx[Q]=(1+dx[Q])*(1+eP)-1;
|
|
ai[Q]=Math.max(-1,Math.min(1,ai[Q]))}}var gW=new Uint8Array(256),j1=new Uint8Array(256),bZ=new Uint8Array(256);
|
|
for(var Q=0;Q<256;Q++){var iL=fN[Q],iM=dx[Q],jI=ai[Q];if(iL>1)iL--;if(iL<0)iL++;iM=bS.a3B(iM);iM=(1+iM)*.5;
|
|
jI=(1+jI)*.5;gW[Q]=Math.round(255*iL);j1[Q]=Math.round(255*iM);bZ[Q]=Math.round(255*jI)}var e2=ff[2]/100,dV=e2<0?-e2:e2,ds=e2<0?0:1;
|
|
k={type:S.CA,afB:gW,yZ:j1,aso:bZ,ahh:dV*ds,Ag:1-dV,a1n:ff[2]/100,a2G:hO?1:0}}if(W=="nvrt"){var L=new Uint8Array(256);
|
|
for(var Q=0;Q<256;Q++)L[Q]=255-Q;k={type:S.Ja,vw:L,ll:L,Ah:L,Xh:!1,q4:!1}}if(W=="post"){var ij=h.Lvls.v,L=new Uint8Array(256),iU=ij/255.001,dg=255/(ij-1);
|
|
for(var Q=0;Q<256;Q++)L[Q]=Math.floor(Q*iU)*dg;k={type:S.Ja,vw:L,ll:L,Ah:L,Xh:!1,q4:!1}}if(W=="grdm"){var iT=h.Grad.v,ej=h.Rvrs,R=1024,eH;
|
|
if(iT.Clrs){var d4=N.X.V8(iT.Clrs.v,0,0);eH=N.X.C5(iT,d4,R,ej?ej.v:!1)}else{eH=N.X.CC(iT,R,ej?ej.v:!1)}var jy=N.U(R),iR=N.U(R),cD=N.U(R);
|
|
N.sN(eH,jy,0);N.sN(eH,iR,1);N.sN(eH,cD,2);k={type:S.Ja,vw:jy,ll:iR,Ah:cD,Xh:!0,q4:!1}}if(W=="selc"){var cA=new Float32Array(9*3*2),d_=h.LJ,d5=h.Mthd?h.Mthd.v.CrcM=="Absl":!1;
|
|
for(var d=0;d<9;d++){var jl=d*6,dm=ag.mu(h,d),hK=dm[0]/100,jj=dm[1]/100,cf=dm[2]/100,h5=dm[3]/100;if(d5){cA[jl]=cA[jl+1]=cA[jl+2]=1;
|
|
cA[jl+3]=hK*(1+h5)+h5;cA[jl+4]=jj*(1+h5)+h5;cA[jl+5]=cf*(1+h5)+h5}else{cA[jl+0]=(1+hK)*(1+h5);cA[jl+1]=(1+jj)*(1+h5);
|
|
cA[jl+2]=(1+cf)*(1+h5)}}k={type:S.mf,as1:cA}}if(W=="blwh"){var fn="Rd Yllw Grn Cyn Bl Mgnt".split(" "),k=[],g4=0,fB=0;
|
|
for(var Q=0;Q<6;Q++)k.push(h[fn[Q]].v);k.push(h.useTint.v,h.tintColor.v);var aJ=[];for(var Q=0;Q<6;Q++)aJ.push((k[Q]-50)/50);
|
|
var bY=N.X.iZ(k[7]);bY.p/=255;bY.z/=255;bY.S/=255;var gO=N.ZY(bY.p,bY.z,bY.S),jI=N.AN(N.Gm(gO.R_,1,.5)),h6=gO.Nx*gO.Fv;
|
|
if(jI==.5)g4=fB=.5;else{g4=h6*(.5-jI)/(.5/jI-1);fB=1-h6*(.5-jI)-1/(2*(1-jI));fB/=1-1/(2*(1-jI))}k={type:S.zv,aby:aJ,H9:k[6]?1:0,a4_:gO.R_,AN:jI,aqi:h6,ve:g4,a9B:fB}}if(W=="blnc"){var T=[],jm=["ShdL","MdtL","HghL"];
|
|
for(var Q=0;Q<3;Q++){if(h[jm[Q]]==null){T[Q]=[0,0,0];continue}var ij=h[jm[Q]].v,hh=ij[0].v/100,fv=ij[1].v/100,ik=ij[2].v/100,gP=h.PrsL==null||h.PrsL.v?(Math.min(hh,fv,ik)+Math.max(hh,fv,ik))/2:0;
|
|
T[Q]=[hh-gP,fv-gP,ik-gP]}var C=[N.U(256),N.U(256),N.U(256)];for(var d=0;d<3;d++)for(var Q=0;Q<256;Q++){var x=Q*(1/255),cU=0,O=0,dL=0;
|
|
O=T[2][d];dL=Math.abs(O);if(O<0)cU=Math.pow(x,Math.SQRT2);else cU=1.63*(Math.pow(x+.04,.5)-.2);x=dL*cU+(1-dL)*x;
|
|
O=T[1][d];dL=Math.abs(O);if(O<0)cU=Math.pow(x,2);else cU=Math.min(2.35*(Math.pow(x+.09,.5)-.3),Math.pow(x,1/2));
|
|
x=dL*cU+(1-dL)*x;O=T[0][d];dL=Math.abs(O);if(O<0)cU=x<.4?0:Math.pow((x-.4)/.6,Math.SQRT2);else cU=Math.pow(x,Math.SQRT2/2);
|
|
x=dL*cU+(1-dL)*x;x=Math.max(0,Math.min(1,x));C[d][Q]=Math.round(x*255)}k={type:S.Ja,vw:C[0],ll:C[1],Ah:C[2],Xh:!1,q4:!1}}if(W=="phfl"){var es=N.X.iZ(h.Clr.v),i6=[es.p/255,es.z/255,es.S/255],ap=h.Dnst.v/100,C=[N.U(256),N.U(256),N.U(256)];
|
|
for(var d=0;d<3;d++)for(var Q=0;Q<256;Q++){var x=Q*(1/255),ix=x*i6[d];ix=Math.max(0,Math.min(1,ix));
|
|
x=ap*ix+(1-ap)*x;C[d][Q]=Math.round(x*255)}k={type:S.Ja,vw:C[0],ll:C[1],Ah:C[2],Xh:!1,q4:h.PrsL.v}}if(W=="thrs"){var L=N.U(256);
|
|
for(var Q=h.Lvl.v;Q<256;Q++)L[Q]=255;k={type:S.Ja,vw:L,ll:L,Ah:L,Xh:!0,q4:!1}}if(W=="mixr"){var hT=bS.bj(h),z=[];
|
|
for(var Q=0;Q<hT.k.length;Q++)if(Q%5!=3)z.push(hT.k[Q]/100);if(hT.zM){for(var bE=1;bE<3;bE++)for(var x=0;
|
|
x<4;x++)z[bE*4+x]=z[x]}k={type:S.Mq,tf:z}}if(W=="rplc"){var f7=h.Mnm.v,b6=h.Mxm.v;k={type:S.nk,qe:[f7.Lmnc.v,f7.A.v,f7.B.v],uY:[b6.Lmnc.v,b6.A.v,b6.B.v],shift:[h.H.v/360,h.Strt.v/100,h.Lght.v/100],sx:h.Fzns.v/150}}if(W=="clrL"&&h.profile){var bJ=new Uint8Array(h.profile.v),hu=ICC.R(bJ.buffer),fa=[],dP=17,fa=ICC.U.sampleLUT(hu,dP);
|
|
k={type:S.iw,zz:ICC.U.rgba8LUT(fa,dP),aru:fa,l7:dP}}return k};bS.wK=function(W,h){var S=-1;if(W!="levl"||h==null)S=-1;
|
|
else if(h.Auto)S=0;else if(h.AuCo)S=1;else if(h.autoBlackWhite)S=2;return S};bS.Df={Ja:0,CA:1,k4:2,mf:3,zv:4,Mq:5,nk:6,iw:7};
|
|
bS.hB=function(W){if(W<0)return W;return Math.pow(Math.tan(Math.PI/2*W),1.3)};bS.a3B=function(W){if(W<0)return W;
|
|
W=Math.pow(W,1/1.3);return Math.atan2(W,1)/(Math.PI/2)};bS.K1=function(W,h,S,k){var p=bS.Df,I=Date.now();
|
|
if(n.O9&&k.n()>300*300&&W.type!=p.Ja&&W.type!=p.iw){k=k.clone();k.x=k.y=0;var q=n.kO(0,k.e,k.Z);q.set(h);
|
|
n.Wf(q,k);q.rh(k);bS.kf(W,q.LQ,k);q.get(S);return}if(W.type==p.iw){var P=W.aru,t=W.l7;ICC.U.applyLUT(P,t,h,S);
|
|
var M=h.length;for(var Q=0;Q<M;Q+=4)S[Q+3]=h[Q+3]}if(W.type==p.Mq)N.iD.E8(h,S,W.tf);if(W.type==p.zv){var U=W.aqi,i=W.AN,z=W.ve,D=W.a9B,M=h.length;
|
|
for(var Q=0;Q<M;Q+=4){var k=h[Q]*(1/255),R=h[Q+1]*(1/255),O=h[Q+2]*(1/255),b=N.DB(k,R,O),w=0;for(var A=0;
|
|
A<6;A++)w+=Math.min(1,1.7*(1-b.kL))*b.Nx*W.aby[A]*bS.PG(b.R_,A*(1/6));var g=Math.max(0,Math.min(1,b.kL*(1+w)));
|
|
if(W.H9==1){var E=0;if(g<z)E=g*(.5/i);else if(g<D)E=g+U*(.5-i);else E=1-(1-g)*.5/(1-i);b.R_=W.a4_;b.Nx=Math.min(1,U+3*U*Math.abs(g-.5*(z+D)));
|
|
b.kL=E}else{b.R_=0;b.Nx=0;b.kL=g}var j=N.Gm(b.R_,b.Nx,b.kL);S[Q]=Math.round(j.p*255);S[Q+1]=Math.round(j.z*255);
|
|
S[Q+2]=Math.round(j.S*255)}}if(W.type==p.mf){var x=W.as1,M=h.length,d=1/255;for(var Q=0;Q<M;Q+=4){var k=h[Q]*d,R=h[Q+1]*d,O=h[Q+2]*d,b=N.DB(k,R,O),L=Math.max(k,Math.max(R,O)),_=Math.min(k,Math.min(R,O)),T=1-k,c=1-R,e=1-O,r=0,B=0,F=0;
|
|
for(var A=0;A<9;A++){var v=A*6,o=0;if(x[v]==1&&x[v+1]==1&&x[v+2]==1&&x[v+3]==0&&x[v+4]==0&&x[v+5]==0)continue;
|
|
var X=T*x[v]+x[v+3],V=c*x[v+1]+x[v+4],H=e*x[v+2]+x[v+5];if(A<6)o=bS.PG(b.R_,A*(1/6))*b.Nx*2*Math.min(b.kL,1-b.kL);
|
|
else if(A==6)o=Math.max(0,_-.5)*2;else if(A==7)o=1-(Math.abs(L-.5)+Math.abs(_-.5));else o=Math.max(0,.5-L)*2;
|
|
r+=(Math.max(0,Math.min(1,X))-T)*o;B+=(Math.max(0,Math.min(1,V))-c)*o;F+=(Math.max(0,Math.min(1,H))-e)*o}T=Math.max(0,Math.min(1,T+r));
|
|
c=Math.max(0,Math.min(1,c+B));e=Math.max(0,Math.min(1,e+F));k=1-T;R=1-c;O=1-e;S[Q]=Math.round(k*255);
|
|
S[Q+1]=Math.round(R*255);S[Q+2]=Math.round(O*255)}}if(W.type==p.Ja){N.at_(h,S,W.vw,W.ll,W.Ah,W.Xh,W.q4)}if(W.type==p.CA){var J=new Uint32Array(h.buffer),C=new Uint32Array(S.buffer),M=J.length;
|
|
if(bS.L0==null){bS.L0=new Float64Array(256);for(var Q=0;Q<256;Q++)bS.L0[Q]=bS.hB(-1+2*Q/255)}var Y=bS.L0;
|
|
for(var Q=0;Q<M;Q++){var K=J[Q],k=(K&255)*(1/255),R=(K>>>8&255)*(1/255),O=(K>>>16&255)*(1/255),u=K>>>24,f=Math.min(k,R,O),l=Math.max(k,R,O),jk=0,hE=0,Z=0;
|
|
jk=N.DB(k,R,O).R_;var aQ=~~(jk*255+.5),jC=W.afB[aQ]*(1/255),eO=W.yZ[aQ]*(1/255)*2-1,iU=W.aso[aQ]*(1/255)*2-1,w=-iU,gK=f;
|
|
if(0<iU){w=iU;gK=l}var iM=W.ahh+W.Ag*w*gK,i5=W.Ag*(1-w);k=iM+i5*k;R=iM+i5*R;O=iM+i5*O;l=Math.max(k,R,O);
|
|
f=Math.min(k,R,O);Z=(l+f)*.5;if(l!=f){var fN=l-f;hE=Z>.5?fN/(2-(l+f)):fN/(l+f)}var dx=eO;if(W.a2G==0){eO=Y[Math.floor((1+eO)*127.5)];
|
|
dx=Math.min(hE*(1+eO),1)}var j=N.Gm(jC,dx,Z);k=j.p;R=j.z;O=j.S;C[Q]=u<<24|O*255<<16|R*255<<8|k*255}}if(W.type==p.nk){N.WQ(h,S);
|
|
var J=new Uint32Array(h.buffer),C=new Uint32Array(S.buffer),M=J.length,ai=W.sx,hO=1/ai,ff={UT:W.qe[0],S4:W.qe[1],S:W.qe[2]},eP={UT:W.uY[0],S4:W.uY[1],S:W.uY[2]};
|
|
for(var Q=0;Q<M;Q++){var K=J[Q],a0=K&255,bM=K>>>8&255,cV=K>>>16&255,k=a0*(1/255),R=bM*(1/255),O=cV*(1/255),u=K>>>24,aX=N.bJ(a0,bM,cV),j8=N.cG(aX,ff,eP,ai,hO);
|
|
if(j8==0)continue;var b=N.DB(k,R,O),jC=2+b.R_+W.shift[0];b.R_=jC-~~jC;b.Nx=Math.max(0,Math.min(1,b.Nx+W.shift[1]));
|
|
b.kL=Math.max(0,Math.min(1,b.kL+W.shift[2]));var j=N.Gm(b.R_,b.Nx,b.kL);k=(1-j8)*k+j8*j.p;R=(1-j8)*R+j8*j.z;
|
|
O=(1-j8)*O+j8*j.S;C[Q]=u<<24|O*255<<16|R*255<<8|k*255}}if(W.type==p.k4){var J=new Uint32Array(h.buffer),C=new Uint32Array(S.buffer),M=J.length,j3=W.nP[0],am=W.nP[1],fG=W.nP[2],w=W.nP[3],bw=N.iD.zK([.299,.587,.114,-.147,-.289,.436,.615,-.515,-.1]),fz=N.iD.uA(bw),c6=2.4;
|
|
console.log(fz);function t(j1){return Math.max(0,Math.min(1,j1))}function hk(j1){return Math.pow(j1,c6)}function as(j1){return Math.pow(j1,1/c6)}function bf(k,R,O,j1){k=hk(k);
|
|
R=hk(R);O=hk(O);var bZ=N.iD.$z(bw,[k,R,O,1]);bZ[0]*=fG;bZ[1]*=w;bZ[2]*=w;var j=N.iD.$z(fz,bZ);j[0]=as(t(j[0]));
|
|
j[1]=as(t(j[1]));j[2]=as(t(j[2]));return j}for(var Q=0;Q<M;Q++){var K=J[Q],k=(K&255)*(1/255),R=(K>>>8&255)*(1/255),O=(K>>>16&255)*(1/255),u=K>>>24,j=bf(k,R,O,j3);
|
|
k=j[0];R=j[1];O=j[2];var gW=N.DB(k,R,O);gW.Nx=Math.max(0,Math.min(1,gW.Nx*(1+am)));j=N.Gm(gW.R_,gW.Nx,gW.kL);
|
|
k=j.p;R=j.z;O=j.S;C[Q]=u<<24|O*255<<16|R*255<<8|k*255}}};bS.kf=function(W,h,S){n.dv.kf(W,h)};bS.PG=function(W,h){var S=N.AP(h,W)*6;
|
|
return Math.max(0,Math.min(1,S<0?1+S:1-S))};var hw={};hw.BT=function(W){var h=W.filterID.v;return h>16777215?G.al_(h):W.Fltr.v.classID};
|
|
hw.Rw=[{EH:"GEfc"},{EH:"LnCr"},{EH:"LqFy",PO:!0},{Gj:"3D",qQ:["lightFilterGradient"]},{Gj:[24,2],qQ:"Avrg,Blr ,BlrM,boxblur,GsnB,Bokh,MtnB,RdlB,surfaceBlur".split(",")},{Gj:[24,4],qQ:"Dspl,Pnch,Plr ,Rple,Shr ,Sphr,Twrl,Wave,ZgZg".split(",")},{Gj:[24,6],qQ:["AdNs","Dspc","DstS","Mdn ","denoise"]},{Gj:[24,8],qQ:"ClrH,Crst,Frgm,Mztn,Msc ,Pntl".split(",")},{Gj:[24,10],qQ:["Flam","Clds","DfrC","Fbrs","LnsF"]},{Gj:[24,12],qQ:["Shrp","ShrE","ShrM","smartSharpen","UnsM"]},{Gj:[24,14],qQ:"Dfs ,Embs,FndE,oilPaint,Slrz,TrcC,Wnd ".split(",")},{Gj:[24,16],qQ:"HghP,HsbP,Mxm ,Mnm ,Ofst,Rept,Ctoa,Dthr".split(",")},{Gj:"Fourier",qQ:["dDFT","iDFT"]}];
|
|
hw.gV={LqFy:"LqFy",Avrg:"Avrg","Blr ":"blurEvent",BlrM:"blurMethod",boxblur:"boxblur",GsnB:"gaussianBlur",MtnB:"motionBlur",RdlB:"radialBlur",surfaceBlur:"surfaceBlur",lightFilterGradient:"lightFilterGradient",adaptCorrect:"adaptCorrect",Pnch:"pinch","Plr ":"polar",Rple:"ripple","Shr ":"shear",Sphr:"spherize",Twrl:"twirl",Wave:"wave",AdNs:"addNoise",DstS:"dustAndScratches","Mdn ":"median",denoise:"denoise",ClrH:"colorHalftone",Crst:"",Frgm:"",Mztn:"mezzotint","Msc ":"mosaic",Pntl:"",Flam:"",Clds:"clouds",DfrC:"differenceClouds",LnsF:"LnsF",Shrp:"sharpen",ShrM:"sharpenMore",smartSharpen:"smartSharpen",UnsM:"unsharpMask",FndE:"findEdges",oilPaint:"oilPaint",HghP:"highPass","Mxm ":"maximum","Mnm ":"minimum",Ofst:"offset"};
|
|
hw.Jd={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"};
|
|
hw.K={rigidTransform:a.Tw};hw.names={lightFilterGradient:"Normal Map",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:"ZigZag",AdNs:[24,7,0],Dspc:[24,7,1],DstS:[24,7,2],"Mdn ":[24,7,3],denoise:"Reduce Noise",ClrH:[24,9,0],Crst:[24,9,1],Frgm:[24,9,3],Mztn:[24,9,4],"Msc ":[24,9,5],Pntl:[24,9,6],Flam:"Flame",Clds:[24,11,0],DfrC:[24,11,1],Fbrs:"Fibers",LnsF:[24,11,2],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:"Solarize",TrcC:"Trace Contour","Wnd ":"Wind",HghP:[24,17,1],HsbP:"HSB/HSL","Mxm ":[24,17,2],"Mnm ":[24,17,3],Ofst:[24,17,4],Rept:[24,17,5],Ctoa:"Color to Alpha",Dthr:[12,23,3],dDFT:"Fourier Transform",iDFT:"Inverse Fourier Transform",adaptCorrect:["VAR0/VAR1",[19,6,0],[19,6,2]]};
|
|
hw.QE=function(W){var h=null;if(W=="GEfc")h={__name:"Filter Gallery",classID:"GEfc",GEfs:{t:"VlLs",v:[{t:"Objc",v:bh.QE("GlwE")}]}};
|
|
if(W=="LqFy"){var S={s6:5,R_:5,map:new Float32Array(5*5*2)},k=new Uint8Array(hx.I0(S)),p=[];for(var Q=0;
|
|
Q<k.length;Q++)p.push(k[Q]);h={__name:"Liquify",classID:"LqFy",LqMe:{t:"tdta",v:p}}}if(W=="rigidTransform"){h={__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(W=="LnCr")h={__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(W=="adaptCorrect")h={__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(W=="Dfs ")h={__name:"Diffuse",classID:"Dfs",Md:{t:"enum",v:{DfsM:"Nrml"}},FlRs:{t:"long",v:14061024}};
|
|
if(W=="Fbrs")h={__name:"Fibers",classID:"Fbrs",Vrnc:{t:"long",v:10},Strg:{t:"long",v:1},RndS:{t:"long",v:8438429}};
|
|
if(W=="Embs")h={__name:"Emboss",classID:"Embs",Angl:{t:"long",v:45},Hght:{t:"long",v:5},Amnt:{t:"long",v:100}};
|
|
if(W=="oilPaint")h={__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(W=="TrcC")h={__name:"Trace Contour",classID:"TrcC",Lvl:{t:"long",v:128},Edg:{t:"enum",v:{CntE:"Lwr"}}};
|
|
if(W=="Wnd ")h={__name:"Wind",classID:"Wnd",WndM:{t:"enum",v:{WndM:"Wnd"}},Drct:{t:"enum",v:{Drct:"Rght"}}};
|
|
if(W=="lightFilterGradient")h={__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(W=="boxblur")h={__name:"Box Blur",classID:"boxblur",Rds:{t:"UntF",v:{type:"#Pxl",val:15}}};if(W=="GsnB")h={__name:"Gaussian Blur",classID:"GsnB",Rds:{t:"UntF",v:{type:"#Pxl",val:7.2}}};
|
|
if(W=="Bokh")h={__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(W=="MtnB")h={__name:"Motion Blur",classID:"MtnB",Angl:{t:"long",v:0},Dstn:{t:"UntF",v:{type:"#Pxl",val:4}}};
|
|
if(W=="RdlB")h={__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(W=="surfaceBlur")h={__name:"Surface Blur",classID:"surfaceBlur",Rds:{t:"UntF",v:{type:"#Pxl",val:15}},Thsh:{t:"long",v:15}};
|
|
if(W=="denoise")h={__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(W=="Dspl")h={__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(W=="Pnch")h={__name:"Pinch",classID:"Pnch",Amnt:{t:"long",v:-100}};if(W=="Plr ")h={__name:"Polar Coordinates",classID:"Plr",Cnvr:{t:"enum",v:{Cnvr:"RctP"}}};
|
|
if(W=="Rple")h={__name:"Ripple",classID:"Rple",Amnt:{t:"long",v:999},RplS:{t:"enum",v:{RplS:"Mdm"}}};
|
|
if(W=="Shr ")h={__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(W=="Sphr")h={__name:"Spherize",classID:"Sphr",Amnt:{t:"long",v:100},SphM:{t:"enum",v:{SphM:"Nrml"}}};
|
|
if(W=="Twrl")h={__name:"Twirl",classID:"Twrl",Angl:{t:"long",v:90}};if(W=="Wave")h={__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(W=="ZgZg")h={__name:"ZigZag",classID:"ZgZg",Amnt:{t:"long",v:50},NmbR:{t:"long",v:10},ZZTy:{t:"enum",v:{ZZTy:"ArnC"}}};
|
|
if(W=="AdNs")h={__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(W=="DstS")h={__name:"Dust & Scratches",classID:"DstS",Rds:{t:"long",v:2},Thsh:{t:"long",v:26}};if(W=="Mdn ")h={__name:"Median",classID:"Mdn",Rds:{t:"UntF",v:{type:"#Pxl",val:7}}};
|
|
if(W=="ClrH")h={__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(W=="Crst")h={__name:"Crystallize",classID:"Crst",ClSz:{t:"long",v:10},FlRs:{t:"long",v:1554929224}};
|
|
if(W=="Mztn")h={__name:"Mezzotint",classID:"Mztn",MztT:{t:"enum",v:{MztT:"FnDt"}},FlRs:{t:"long",v:204994187}};
|
|
if(W=="Msc ")h={__name:"Mosaic",classID:"Msc",ClSz:{t:"UntF",v:{type:"#Pxl",val:12}}};if(W=="Pntl")h={__name:"Pointillize",classID:"Pntl",ClSz:{t:"long",v:10},FlRs:{t:"long",v:1554929236}};
|
|
if(W=="LnsF")h={__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(W=="Dthr")h={__name:"Dither",classID:"Dthr",Plte:{t:"long",v:0}};if(W=="Adobe Camera Raw Filter")h={__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(W=="smartSharpen")h={__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(W=="UnsM")h={__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(W=="HghP")h={__name:"High Pass",classID:"HghP",Rds:{t:"UntF",v:{type:"#Pxl",val:3}}};if(W=="HsbP")h={__name:"HSB/HSL",classID:"HsbP",Inpt:{t:"enum",v:{ClrS:"RGBC"}},Otpt:{t:"enum",v:{ClrS:"HSBl"}}};
|
|
if(W=="Mxm ")h={__name:"Maximum",classID:"Mxm",Rds:{t:"UntF",v:{type:"#Pxl",val:8}},preserveShape:{t:"enum",v:{preserveShape:"squareness"}}};
|
|
if(W=="Mnm ")h={__name:"Minimum",classID:"Mnm",Rds:{t:"UntF",v:{type:"#Pxl",val:8}},preserveShape:{t:"enum",v:{preserveShape:"squareness"}}};
|
|
if(W=="Ofst")h={__name:"Offset",classID:"Ofst",Hrzn:{t:"long",v:144},Vrtc:{t:"long",v:278},Fl:{t:"enum",v:{FlMd:"Wrp"}}};
|
|
if(W=="Rept")h={__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(W=="Flam")h={__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(W=="Ctoa")h={__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(W=="brit")h={__name:"Brightness/Contrast",classID:"BrgC",Brgh:{t:"long",v:0},Cntr:{t:"long",v:0},useLegacy:{t:"bool",v:!1}};
|
|
if(W=="levl")h={__name:"Levels",classID:"Lvls",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Adjs:{t:"VlLs",v:[]}};
|
|
if(W=="curv")h={__name:"Curves",classID:"Crvs",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Adjs:{t:"VlLs",v:[]}};
|
|
if(W=="expA")h={__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(W=="vibA")h={__name:"Vibrance",classID:"vibrance",vibrance:{t:"long",v:0},Strt:{t:"long",v:0}};if(W=="hue2")h={__name:"Hue/Saturation",classID:"HStr",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Clrz:{t:"bool",v:!1},Adjs:{t:"VlLs",v:[]}};
|
|
if(W=="blnc")h={__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(W=="blwh")h={__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(W=="phfl")h={__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(W=="grdm")h={__name:"Gradient Map",classID:"GrMp",Rvrs:{t:"bool",v:!1},Grad:JSON.parse(hz.Au[6]).Grad};
|
|
if(W=="selc")h={__name:"Selective Color",classID:"SlcC",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Mthd:{t:"enum",v:{CrcM:"Rltv"}},ClrC:{t:"VlLs",v:[]}};
|
|
if(W=="thrs")h={__name:"Threshold",classID:"Thrs",Lvl:{t:"long",v:128}};if(W=="mixr")h={__name:"Channel Mixer",classID:"ChnM",presetKind:{t:"enum",v:{presetKindType:"presetKindDefault"}},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(W=="clrL")h={__name:"Color Lookup",classID:"colorLookup"};if(W=="post")h={__name:"Posterize",classID:"Pstr",Lvls:{t:"long",v:3}};
|
|
if(W=="rplc")h={__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(W=="fade")h={__name:"Fade",classID:"fade",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}};
|
|
if(W=="aply")h={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(W=="blendOptions")h={classID:"blendOptions",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}};
|
|
return h};hw.AC={sFlam:function(W,h){h[0]=W.Type.v;h[1]=W.Leng.v;h[2]=W.RndL.v;h[3]=W.Widt.v;h[4]=W.Angl.v;
|
|
h[5]=W.Intr.v;h[6]=W.Adpt.v;h[7]=W.Clr.v;h[8]=W.Qual.v;h[9]=W.Turb.v;h[10]=W.Jag.v;h[11]=W.Opct.v.val;
|
|
h[12]=W.Lins.v;h[13]=W.Botm.v;h[14]=W.Styl.v;h[15]=W.Shap.v;h[16]=W.RnSh.v;h[17]=W.Arng.v},gFlam:function(W,h){W.Type.v=h[0];
|
|
W.Leng.v=h[1];W.RndL.v=h[2];W.Widt.v=h[3];W.Angl.v=h[4];W.Intr.v=h[5];W.Adpt.v=h[6];W.Clr.v=h[7];W.Qual.v=h[8];
|
|
W.Turb.v=h[9];W.Jag.v=h[10];W.Opct.v.val=h[11];W.Lins.v=h[12];W.Botm.v=h[13];W.Styl.v=h[14];W.Shap.v=h[15];
|
|
W.RnSh.v=h[16];W.Arng.v=h[17]},sAdNs:function(W,h){h[0]=W.Nose.v.val;h[1]=["Gsn","Unfr"].indexOf(W.Dstr.v.Dstr);
|
|
h[2]=W.Mnch.v},gAdNs:function(W,h){W.Nose.v.val=h[0];W.Dstr.v.Dstr=["Gsn","Unfr"][h[1]];W.Mnch.v=h[2]},sDstS:function(W,h){h[0]=W.Rds.v;
|
|
h[1]=W.Thsh.v},gDstS:function(W,h){W.Rds.v=h[0];W.Thsh.v=h[1]},sGsnB:function(W,h){h[0]=W.Rds.v.val},gGsnB:function(W,h){W.Rds.v.val=h[0]},sHghP:function(W,h){h[0]=W.Rds.v.val},gHghP:function(W,h){W.Rds.v.val=h[0]},sHsbP:function(W,h){var S=["RGBC","HSBl","HSLC"];
|
|
h[0]=S.indexOf(W.Inpt.v.ClrS);h[1]=S.indexOf(W.Otpt.v.ClrS)},gHsbP:function(W,h){var S=["RGBC","HSBl","HSLC"];
|
|
W.Inpt.v.ClrS=S[h[0]];W.Otpt.v.ClrS=S[h[1]]},"sMxm ":function(W,h){var S="preserveShape";h[0]=W.Rds.v.val;
|
|
h[1]=W[S]?["squareness","Rndn"].indexOf(W[S].v[S]):0},"gMxm ":function(W,h){var S="preserveShape";W.Rds.v.val=h[0];
|
|
W[S]={t:"enum",v:{preserveShape:["squareness","Rndn"][h[1]]}}},"sMnm ":function(W,h){var S="preserveShape";
|
|
h[0]=W.Rds.v.val;h[1]=W[S]?["squareness","Rndn"].indexOf(W[S].v[S]):0},"gMnm ":function(W,h){var S="preserveShape";
|
|
W.Rds.v.val=h[0];W[S]={t:"enum",v:{preserveShape:["squareness","Rndn"][h[1]]}}},sMtnB:function(W,h){h[0]=[W.Angl.v];
|
|
h[1]=W.Dstn.v.val;console.log(h)},gMtnB:function(W,h){W.Angl.v=typeof h[0]=="number"?h[0]:h[0][0];W.Dstn.v.val=h[1]},sOfst:function(W,h){h[0]=W.Hrzn.v;
|
|
h[1]=W.Vrtc.v;h[2]=["Rpt","Bckg","Wrp"].indexOf(W.Fl.v.FlMd)},gOfst:function(W,h){W.Hrzn.v=h[0];W.Vrtc.v=h[1];
|
|
W.Fl.v.FlMd=["Rpt","Bckg","Wrp"][h[2]]},sPnch:function(W,h){h[0]=W.Amnt.v},gPnch:function(W,h){W.Amnt.v=h[0]},"sPlr ":function(W,h){h[0]=["RctP","PlrR"].indexOf(W.Cnvr.v.Cnvr)},"gPlr ":function(W,h){W.Cnvr.v.Cnvr=["RctP","PlrR"][h[0]]},sRple:function(W,h){h[0]=W.Amnt.v;
|
|
h[1]=["Sml","Mdm","Lrg"].indexOf(W.RplS.v.RplS)},gRple:function(W,h){W.Amnt.v=h[0];W.RplS.v.RplS=["Sml","Mdm","Lrg"][h[1]]},sTwrl:function(W,h){h[0]=W.Angl.v},gTwrl:function(W,h){W.Angl.v=h[0]},sZgZg:function(W,h){h[0]=W.Amnt.v;
|
|
h[1]=W.NmbR.v;h[2]=["ArnC","OtFr","PndR"].indexOf(W.ZZTy.v.ZZTy)},gZgZg:function(W,h){W.Amnt.v=h[0];
|
|
W.NmbR.v=h[1];W.ZZTy.v.ZZTy=["ArnC","OtFr","PndR"][h[2]]},sUnsM:function(W,h){h[0]=W.Amnt.v.val;h[1]=W.Rds.v.val;
|
|
h[2]=W.Thsh.v},gUnsM:function(W,h){W.Amnt.v.val=h[0];W.Rds.v.val=h[1];W.Thsh.v=h[2]}};hw.a7p=function(W){var h=new eC(0,0);
|
|
if(W.enab.v==!1)return h;var S=W.filterFXList.v;for(var Q=0;Q<S.length;Q++){var k=S[Q].v;if(k.enab.v==!1)continue;
|
|
var p=hw.BT(k),I=hw.DD(p,k.Fltr?k.Fltr.v:null);if(I.x>h.x)h.x=I.x;if(I.y>h.y)h.y=I.y}return h};hw.DD=function(W,h){var S=0,k=0;
|
|
if(["GsnB","boxblur","smartSharpen","UnsM","HghP"].indexOf(W)!=-1){var p=h.Rds.v.val;S=k=p*2.57}if(W=="MtnB")S=k=h.Dstn.v.val;
|
|
if("Ofst,Rept,LqFy,Dspl,Pnch,Rple,Shr ,Sphr,Twrl,ZgZg,Wave,RdlB,Clds,DfrC,Plr ,LnCr,Wnd ,lightFilterGradient,rigidTransform,Frgm,Flam".split(",").indexOf(W)!=-1){S=k=1e4}if(W=="GEfc")return bh.DD(h);
|
|
return new eC(Math.ceil(S),Math.ceil(k))};hw.mG=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:[]}}}};
|
|
hw.gn=function(W,h){var S={p:h.Ps>>16,z:h.Ps>>8&255,S:h.Ps&255},k={p:h.lL>>16,z:h.lL>>8&255,S:h.lL&255},p=hw.names[W];
|
|
if(p==null)p=bS.names[W];var I=W;for(var q in bS.wb)if(bS.wb[q]==W)I=q;var P={t:"Objc",v:{classID:"filterFX",Nm:{t:"TEXT",v:dq.get(p)},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:N.X.hg(S)},BckC:{t:"Objc",v:N.X.hg(k)},filterID:{t:"long",v:I.length==4?G.a0z(I):777}}},t=hw.QE(W);
|
|
if(t)P.v.Fltr={t:"Objc",v:t};return P};hw.Qw=function(W,h,S,k){var p=Date.now();if(W<1){var I=Math.round(W*5),q=[1,2,1,2,[40,26,13,6,4,2][I],2,1,2,1];
|
|
q=N.pG.Qi(q);if(!n.O9){N.tr(S);var P=S.slice(0);N.pG.kS(P,S,k.e,k.Z,q,255);N.oY(S)}else{var t=k.e,M=k.Z,U=n.kO(0,t,M);
|
|
U.set(S);var i=n.kO(1,t,M),z=new Float32Array([1/t,1/M]);n.Wf(i);n.filter.kf({type:n.filter.al7,o9:z,a5I:new Float32Array(q)},U.hr);
|
|
i.get(S)}}else{var D=h==N.tO.d1?0:h==N.tO.Z4?1:2,R=[];while(D!=2&&W*[1,2.4][D]>20&&R.length<4){var O=N.yq(S,k);
|
|
R.push(S,k);S=O.vM;k=O.rect;W/=2}var t=k.e,M=k.Z;if(!n.O9||D==2&&W>15){N.tr(S);h(S,k,W);N.oY(S)}else{var U=n.kO(0,t,M);
|
|
U.set(S);var i=n.kO(1,t,M),z=new Float32Array([1/t,1/M]);if(D==0){var b=1;while(b<W)b<<=1;n.Wf(i);n.filter.kf({type:n.filter.ER,o9:z,qg:W,n2:[0,0,b]},U.hr);
|
|
n.Wf(U);n.filter.kf({type:n.filter.ER,o9:z,qg:W,n2:[0,1,b]},i.hr);U.get(S)}else if(D==1){var w=3,A=N.tO.K8(W,w);
|
|
for(var Q=0;Q<w;Q++){var g=A[Q]>>>1,E=1;while(E<g)E<<=1;if(g==0)continue;n.Wf(i);n.filter.kf({type:n.filter.ER,o9:z,qg:g,n2:[0,0,E]},U.hr);
|
|
n.Wf(U);n.filter.kf({type:n.filter.ER,o9:z,qg:g,n2:[0,1,E]},i.hr)}U.get(S)}else{var b=1;while(b<W)b<<=1;
|
|
n.Wf(i);n.filter.kf({type:n.filter.ER,o9:z,qg:W,n2:[0,0,b]},U.hr);i.get(S)}}var j=Date.now();while(R.length!=0){var x=R.pop(),d=R.pop();
|
|
N.scale.ac3(S,k.e,k.Z,d,x.e,x.Z);S=d;k=x}}};hw.asD=function(W,h,S,k){for(var Q=0;Q<W.length;Q++){S[Q]=W[Q]*(1/255);
|
|
k[Q]=0}FFT.fft2d(S,k);var p=h>>>1,I=16384,q=128,t=100;while(q<h){q<<=1;I<<=2}var P=255/Math.log(I),M=-100;
|
|
for(var U=0;U<h;U++)for(var i=0;i<p;i++){var z=h+p+U&h-1,D=S[z*h+i],R=k[z*h+i],O=Math.sqrt(D*D+R*R),b=Math.atan2(R,D);
|
|
W[U*h+i]=Math.round(P*Math.log(O+1));W[U*h+p+i]=Math.round((Math.PI+b)*(255*.5/Math.PI))}};hw.asG=function(W,h,S,k){S.fill(0);
|
|
k.fill(0);var p=h>>>1,I=16384,q=128;while(q<h){q<<=1;I<<=2}var P=255/Math.log(I),t=[],M=[],U=[];for(var Q=0;
|
|
Q<256;Q++){t[Q]=Math.exp(Q/P)-1;var i=Q*(2*Math.PI/255)-Math.PI;M[Q]=Math.sin(i);U[Q]=Math.cos(i)}for(var z=0;
|
|
z<h;z++)for(var D=0;D<p;D++){var R=h+p+z&h-1,O=t[W[z*h+D]],i=W[z*h+p+D],b=O*U[i],w=O*M[i];S[R*h+D]=b;
|
|
k[R*h+D]=w;if(D!=0){var A=R==0?R*h+h-D:(h-R)*h+(h-D);S[A]=b;k[A]=-w}}FFT.ifft2d(S,k);for(var Q=0;Q<W.length;
|
|
Q++){W[Q]=Math.max(0,Math.min(255,~~(.5+255*S[Q])))}};hw.gt=new ArrayBuffer(512);hw.akJ=function(W){var h=hw.gt,S=W.length;
|
|
if(h.byteLength<S)hw.gt=h=new ArrayBuffer(S);var k=new Uint8Array(h);for(var Q=0;Q<S;Q+=4){k[Q]=W[Q];
|
|
k[Q+1]=W[Q+1];k[Q+2]=W[Q+2];k[Q+3]=W[Q+3]}return h};hw.K1=function(W,h,S,k,p,I,q){if(I==null)I={buffer:N.U(h.buffer.length),rect:h.rect.clone()};
|
|
N.WQ(h.buffer,I.buffer);var P=S&&S.RndS?S.RndS.v>>>1:0;if(W=="GEfc"){var t=[];if(S.GEfs){var M=S.GEfs.v;
|
|
for(var Q=0;Q<M.length;Q++){var U=M[Q].v;if(U.GELv&&U.GELv.v==!1)continue;t.push(U)}}else t=[S];for(var Q=0;
|
|
Q<t.length;Q++){var i;if(Q==0)bh.K1(W,h,t[Q],k,p,I,q);else{if(i==null)i={buffer:N.U(h.buffer.length),rect:h.rect.clone()};
|
|
N.WQ(I.buffer,i.buffer);bh.K1(W,i,t[Q],k,p,I,q)}}}if(W=="Adobe Camera Raw Filter"){var z=h.rect,D=z.e,R=z.Z,O=D*R,b=O*4,w=O*3,A=new Float32Array(D*R*3),g=h.buffer;
|
|
for(var Q=0;Q<O;Q++){var E=Q*3,j=Q*4;A[E]=g[j]*(1/255);A[E+1]=g[j+1]*(1/255);A[E+2]=g[j+2]*(1/255)}var x=JSON.parse(JSON.stringify(S));
|
|
delete x.Upri;delete x.GuUr;var L=A.slice(0);A=L;g=I.buffer;for(var Q=0;Q<O;Q++){var E=Q*3,j=Q*4;g[j]=255*Math.max(0,Math.min(1,A[E]));
|
|
g[j+1]=255*Math.max(0,Math.min(1,A[E+1]));g[j+2]=255*Math.max(0,Math.min(1,A[E+2]))}}if(W=="adaptCorrect"){var z=h.rect,D=z.e,R=z.Z,O=D*R,b=O*4,_=S.sdwM.v,T=_.Amnt.v.val/100,c=_.Wdth.v.val/100,e=_.Rds.v,r=S.hglM.v,B=r.Amnt.v.val/100,F=r.Wdth.v.val/100,v=r.Rds.v;
|
|
N.pm.aak(h.buffer,I.buffer,D,R,T,c,e,B,F,v,S.ClrC.v/100,S.Cntr.v/100)}if(W=="denoise"){var z=h.rect,D=z.e,R=z.Z,X=S.channelDenoise.v[0].v;
|
|
N.xM.a6A(h.buffer,D,R,I.buffer,X.Amnt.v/10,X.EdgF.v/100)}if(W=="HsbP"){var V=S.Inpt.v.ClrS,H=S.Otpt.v.ClrS,z=h.rect,D=z.e,R=z.Z,O=D*R;
|
|
for(var Q=0;Q<O;Q++){var j=Q*4,o=h.buffer[j]*(1/255),J=h.buffer[j+1]*(1/255),C=h.buffer[j+2]*(1/255);
|
|
if(V=="RGBC"){}else if(V=="HSLC"){var L=N.Gm(o,J,C);o=L.p;J=L.z;C=L.S}else if(V=="HSBl"){var L=N.a33(o,J,C);
|
|
o=L.p;J=L.z;C=L.S}var Y=o,K=J,u=C;if(H=="RGBC"){}else if(H=="HSLC"){var L=N.DB(o,J,C);Y=L.R_;K=L.Nx;
|
|
u=L.kL}else if(H=="HSBl"){var L=N.apH(o,J,C);Y=L.R_;K=L.Nx;u=L.S}I.buffer[j]=~~(255*Y);I.buffer[j+1]=~~(255*K);
|
|
I.buffer[j+2]=~~(255*u)}}if(W=="Fbrs"){var z=h.rect,D=z.e,R=z.Z;N.I.f3(h.buffer,D,R,I.buffer,[S.Vrnc.v,S.Strg.v,P]);
|
|
var f=N.U(D*R);N.sN(I.buffer,f,0);N.uA(f);bh.xe(f,I.buffer,k,p)}if(W=="Frgm"){var z=h.rect,D=z.e,R=z.Z,l=h.buffer.slice(0);
|
|
N.tr(l);N.I.amq(l,D,R,I.buffer);N.oY(I.buffer)}if(W=="Flam"){var z=h.rect,D=z.e,R=z.Z,jk=S.Clr.v,hE={type:S.Type.v+1,length:S.Leng.v,afx:S.RndL.v,z5:S.Widt.v,arb:S.Angl.v,ab9:S.Intr.v,apZ:S.Adpt.v,color:{p:jk.Rd.v,z:jk.Grn.v,S:jk.Bl.v},E$:S.Qual.v+1,r6:S.Turb.v,mt:S.Jag.v,opacity:S.Opct.v.val,Qq:S.Lins.v,abr:S.Botm.v,style:S.Styl.v+1,shape:S.Shap.v+1,asW:S.RnSh.v,aqh:S.Arng.v,a1w:!1},Z=q[3],aQ=Z[0],jC=Z[1],eO=aQ[jC.length!=0?jC[0]:0];
|
|
if(eO==null){alert("Make a path first");return}var iU=eO.add.vmsk.T,gK=N.$.z2(iU),iM=[];for(var i5=0;
|
|
i5<gK;i5++){var fN=N.$.rR(iU,i5),dx=iU[fN];if(dx.length<2)continue;var ai=[];iM.push(ai);var hO=dx.length-(dx.type==3?1:0);
|
|
for(var ff=0;ff<hO;ff++){var eP=iU[fN+1+ff],a0=ff==dx.length-1?iU[fN+1]:iU[fN+1+ff+1],bM=eP.M,cV=eP.tk,aX=a0.bq,j8=a0.M,j3=Math.round(eC.fa(bM,j8)/5);
|
|
for(var am=0;am<j3;am++){var fG=am/j3,bw=1-fG,fz=bw*bw*bw*bM.x+3*bw*bw*fG*cV.x+3*bw*fG*fG*aX.x+fG*fG*fG*j8.x,c6=bw*bw*bw*bM.y+3*bw*bw*fG*cV.y+3*bw*fG*fG*aX.y+fG*fG*fG*j8.y;
|
|
ai.push(fz,c6)}}}var hk=[iM,hE],as=Date.now(),bf=e3(hk);ip(h.buffer,D,R,I.buffer,bf,hk)}if(W=="Dfs "){var z=h.rect,D=z.e,R=z.Z,gW=["Nrml","DrkO","LghO","anisotropic"].indexOf(S.Md.v.DfsM);
|
|
if(gW<3)N.I.aa_(h.buffer,D,R,I.buffer,[gW]);else{var hk=[1.4,1.6,1,4,!1,2,[0,0,.001]],z=h.rect.clone();
|
|
z.x=z.y=0;N.Xv.filter(h.buffer,z,I.buffer,hk)}}if(W=="TrcC"){var z=h.rect,D=z.e,j1=D<<2,R=z.Z,bZ=S.Lvl.v,iL=S.Edg.v.CntE=="Lwr",jI=h.buffer,e2=I.buffer;
|
|
N.wM(e2,16777215,4278190080);function dV(an,ez){ij(an,ez);ij(an+1,ez+1);ij(an+2,ez+2)}function ds(an,ez){dg(an,ez);
|
|
dg(an+1,ez+1);dg(an+2,ez+2)}function ij(an,ez){var Y=jI[an],K=jI[ez];if(Y>=bZ&&K<bZ)e2[an]=0;if(Y<bZ&&K>=bZ)e2[ez]=0}function dg(an,ez){var Y=jI[an],K=jI[ez];
|
|
if(Y>bZ&&K<=bZ)e2[ez]=0;if(Y<=bZ&&K>bZ)e2[an]=0}if(iL)for(var c6=1;c6<R;c6++)for(var fz=1;fz<D;fz++){var j=c6*D+fz<<2;
|
|
dV(j,j-4);dV(j,j-j1)}else for(var c6=1;c6<R;c6++)for(var fz=1;fz<D;fz++){var j=c6*D+fz<<2;ds(j,j-4);
|
|
ds(j,j-j1)}}if(W=="Embs"){var z=h.rect,D=z.e,R=z.Z,ej=-S.Angl.v*Math.PI/180,eH=S.Hght.v,d4=S.Amnt.v/100;
|
|
eH/=2;var jy=Math.cos(ej)*eH,iR=Math.sin(ej)*eH,jI=h.buffer,e2=I.buffer;e2.fill(0);var cD=new Uint32Array(jI.buffer),L=new Uint8Array(4),cA=new Uint32Array(L.buffer);
|
|
for(var c6=0;c6<R;c6++)for(var fz=0;fz<D;fz++){var d_=0,d5=0,jl=0;if(0<=fz+jy&&fz+jy<D&&0<=c6+iR&&c6+iR<R){N.V.qo(fz+jy+.5,c6+iR+.5,cD,D,R,cA,0,0);
|
|
d_+=L[0]-128;d5+=L[1]-128;jl+=L[2]-128}if(0<=fz-jy&&fz-jy<D&&0<=c6-iR&&c6-iR<R){N.V.qo(fz-jy+.5,c6-iR+.5,cD,D,R,cA,0,0);
|
|
d_-=L[0]-128;d5-=L[1]-128;jl-=L[2]-128}var j=c6*D+fz<<2;e2[j]=Math.max(0,Math.min(255,d_*d4+128));e2[j+1]=Math.max(0,Math.min(255,d5*d4+128));
|
|
e2[j+2]=Math.max(0,Math.min(255,jl*d4+128));e2[j+3]=jI[j+3]}}if(W=="ShrE"){var z=h.rect,D=z.e,R=z.Z;
|
|
N.I.a3L(h.buffer,D,R,I.buffer)}if(W=="Dspc"){var z=h.rect,D=z.e,R=z.Z;N.I.akv(h.buffer,D,R,I.buffer)}if(W=="Slrz"){var dm=I.buffer,hK=128;
|
|
for(var Q=0;Q<dm.length;Q+=4){if(dm[Q]>hK)dm[Q]=255-dm[Q];if(dm[Q+1]>hK)dm[Q+1]=255-dm[Q+1];if(dm[Q+2]>hK)dm[Q+2]=255-dm[Q+2]}}if(W=="Wnd "){var z=h.rect,D=z.e,R=z.Z,jj=["Wnd","Blst","Stgr"],cf=S.WndM.v.WndM;
|
|
N.I.DG(h.buffer,D,R,I.buffer,[jj.indexOf(cf),S.Drct.v.Drct!="Left"])}if(W=="Bokh"){var z=h.rect,D=z.e,R=z.Z,O=D*R,b=O*4,h5=h.buffer.slice(0),fn=S.BkDi.v.BtDi,aJ=S.BkDc,bY=S.BkDs.v,gO=S.BkDp.v/255;
|
|
if(fn=="BeIn")gO=0;var h6=57*(.3+.7*((D+R)/2)/1750)*(S.BkIb.v/100)*(1+.2*Math.pow(gO,.1)),g8=parseInt(S.BkIs.v.BtIs.slice(3)),g4=-S.BkIr.v*Math.PI/180,fB=[];
|
|
for(var Q=0;Q<8;Q++){var jm=g4+Q*(Math.PI*2/g8),hh=g4+(Q+1)*(Math.PI*2/g8),fv=Math.cos(jm),ik=Math.sin(jm),gP=Math.cos(hh),cU=Math.sin(hh),dL=[0,0,0];
|
|
N.tf.SS([[fv,ik,1,0],[gP,cU,1,0],[1,1,1,1]],dL);if(dL[2]>0){dL[0]*=-1;dL[1]*=-1;dL[2]*=-1}fB.push(dL[0],dL[1],dL[2],0)}if(fn=="BeIn"){N.wM(h5,0,16777215);
|
|
gO=1}else if(fn=="BeIt"&&aJ.v.BtDc=="BeCt"){}else{var es;if(fn=="BeIt"&&aJ.v.BtDc=="BeCm")es=q[1];else if(fn=="BeIa")es=q[2][aJ.v];
|
|
if(es==null){N.wM(h5,0,16777215)}else{var i6;if(es.rect.xX(z))i6=es.channel;else i6=es.gB(z);N.ce(i6,h5,3)}}if(bY)for(var Q=0;
|
|
Q<b;Q+=4)h5[Q+3]=255-h5[Q+3];if(n.O9){var ap=h5,ix=D,hT=R,bE=1,f7=(S.BkSb.v==0||S.BkSt.v==255)&&fn=="BeIn";
|
|
if(!f7){var b6=0;for(var Q=0;Q<b;Q+=4)b6+=Math.abs(gO-h5[Q+3]*(1/255));b6=b6/O*h6;var bJ=3.14*b6*b6*D*R/3e6;
|
|
if(bJ>2e3){alert("too large radius");return}}while(f7&&3*(h6/bE)*(h6/bE)*D*R>500*2e3*2e3){var hu=N.fc(h5,new gj(0,0,ix,hT));
|
|
h5=hu.vM;ix=hu.rect.e;hT=hu.rect.Z;bE*=2}var as=Date.now(),fa=n.kO(0,ix,hT);fa.set(h5);var dP=n.kO(1,D,R);
|
|
n.Wf(dP);n.filter.kf({type:n.filter.afH,o9:new Float32Array([1/ix,1/hT]),aoo:gO,CL:h6/bE,ano:new Float32Array([S.BkSb.v/100,S.BkSt.v/255]),ase:new Float32Array([S.BkNa.v/100,S.BkNt.v.BtNt=="BeNu"?0:1,S.BkNm.v?1:0]),ad7:new Float32Array(fB.slice(0,16)),apg:new Float32Array(fB.slice(16))},fa.hr);
|
|
dP.get(I.buffer);var aU=I.buffer;for(var Q=0;Q<b;Q+=4)aU[Q+3]=h.buffer[Q+3]}}if(W=="rigidTransform"){var as=Date.now(),hf=hw.akJ,fa=h.buffer.slice(0),f3=0,j0=0;
|
|
N.tr(fa);N.wM(I.buffer,0);var D=h.rect.e,R=h.rect.Z,hL=S.puppetShapeList.v,ci=[],bB=[],ia=[],hm=[];for(var ff=0;
|
|
ff<hL.length;ff++){var he=hL[ff].v,c9=f3*2,E=j0*3,hC=he.originalVertexArray.v.length>>>2,ic=he.indexArray.v.length>>>2,bW=new Float32Array(hf(he.originalVertexArray.v));
|
|
for(var Q=0;Q<hC;Q++)ci[c9+Q]=bW[Q];var fl=new Float32Array(hf(he.deformedVertexArray.v));for(var Q=0;
|
|
Q<hC;Q++)bB[c9+Q]=fl[Q];var hP=new Uint32Array(hf(he.indexArray.v));for(var Q=0;Q<ic;Q++)ia[E+Q]=f3+hP[Q];
|
|
var aF=[],j7=[],cz=he.PnDp.v;for(var Q=0;Q<cz.length;Q++){aF.push(he.pinVertexIndices.v[Q].v);j7.push(cz[Q].v)}var iO=N.aF.aaL(bW,hP,aF,j7);
|
|
for(var Q=0;Q<iO.length;Q++)hm[f3+Q]=iO[Q];f3+=hC>>>1;j0+=~~(ic/3)}var o=h.rect,D=o.e,R=o.Z;N.aF.gY(fa,D,R,I.buffer,D,R,ci,bB,hm,ia);
|
|
N.oY(I.buffer)}if(W=="lightFilterGradient"){function jD(bM){var hD=1/Math.sqrt(bM[0]*bM[0]+bM[1]*bM[1]+bM[2]*bM[2]);
|
|
bM[0]*=hD;bM[1]*=hD;bM[2]*=hD}var D=h.rect.e,R=h.rect.Z,O=D*R,as=Date.now(),dy=N.U(O),K=.3,u=.7;N.Zi(I.buffer,dy);
|
|
var iY=N.U(O);N.tO.Gp(dy,iY,I.rect,16);var jN=N.U(O);N.tO.Gp(dy,jN,I.rect,8);var eB=dy,gV=new Float32Array(O),je=S.Dtl.v,bo=je[2].v,gt=je[1].v,i_=je[0].v,fF=S.Scl.v*40*S.textureScale.v/(bo+gt+i_);
|
|
bo*=fF;gt*=fF;i_*=fF;for(var Q=0;Q<O;Q++){var dQ=iY[Q]*(1/255),bC=jN[Q]*(1/255),aw=eB[Q]*(1/255);aw=aw*aw;
|
|
gV[Q]=bo*dQ+gt*bC+i_*aw}var e$=S.blur.v;if(e$!=0){var ak=gV.slice(0);N.tO.Am(ak,gV,I.rect,e$)}var fO=D-1,ey=R-1;
|
|
for(var c6=1;c6<ey;c6++)for(var fz=1;fz<fO;fz++){var Q=c6*D+fz,j=Q*4,cX=gV[Q],jy=K*(gV[Q+1]-cX)+u*(cX-gV[Q-1]),iR=K*(gV[Q+D]-cX)+u*(cX-gV[Q-D]),bM=[1,0,jy],cV=[0,1,iR];
|
|
jD(bM);jD(cV);var hh=bM[0],jd=bM[2],d8=cV[1],ei=cV[2],ge=-jd*d8,fW=-hh*ei,i$=hh*d8;I.buffer[j]=~~(127.5+ge*127.5);
|
|
I.buffer[j+1]=~~(127.5+fW*127.5);I.buffer[j+2]=~~(127.5+i$*127.5)}}if(W=="dDFT"||W=="iDFT"){function dW(g8){if(g8==0)return 1;
|
|
g8--;g8|=g8>>1;g8|=g8>>2;g8|=g8>>4;g8|=g8>>8;g8|=g8>>16;return g8+1}var D=h.rect.e,R=h.rect.Z,hs=dW(Math.max(D,R)),hq=hs>>>1,bc=new gj(0,0,hs,hs),bu=new gj(0,0,D,R);
|
|
bu.y=hs-R>>>1;var aN=D>>>1,c2=new gj(0,bu.y,aN,R),al=new N.qr(D*R);N.hc(h.buffer,al);var fR=new Float64Array(hs*hs),a6=new Float64Array(hs*hs),i6=N.U(hs*hs);
|
|
FFT.init(hs);var eJ=[al.p,al.z,al.S];for(var Q=0;Q<3;Q++){var bG=eJ[Q];i6.fill(0);if(W=="dDFT"){N.vG(bG,bu,i6,bc);
|
|
hw.asD(i6,hs,fR,a6);N.vG(i6,bc,bG,bu,c2);c2.x+=aN;bc.x-=hq-aN;N.vG(i6,bc,bG,bu,c2);c2.x-=aN;bc.x+=hq-aN}else{N.vG(bG,bu,i6,bc,c2);
|
|
c2.x+=hq;bu.x+=hq-aN;N.vG(bG,bu,i6,bc,c2);c2.x-=hq;bu.x-=hq-aN;hw.asG(i6,hs,fR,a6);N.vG(i6,bc,bG,bu)}}N.ST(al,I.buffer)}if(W=="Avrg"){var iW=0,eU=0,fU=0,eW=0,jJ=1;
|
|
for(var Q=0;Q<h.buffer.length;Q+=4){var hH=h.buffer[Q+3];fU+=h.buffer[Q]*hH;eU+=h.buffer[Q+1]*hH;iW+=h.buffer[Q+2]*hH;
|
|
eW+=hH}var bj=1/eW;iW=Math.round(jJ*(iW*bj)+(1-jJ)*255);eU=Math.round(jJ*(eU*bj)+(1-jJ)*255);fU=Math.round(jJ*(fU*bj)+(1-jJ)*255);
|
|
N.wM(I.buffer,iW<<16|eU<<8|fU,4278190080)}if(["GsnB","boxblur","smartSharpen","UnsM","HghP"].indexOf(W)!=-1){var io=S.Rds.v.val,is=W=="boxblur"?N.tO.d1:N.tO.Z4;
|
|
hw.Qw(io,is,I.buffer,I.rect);if(W=="UnsM"||W=="smartSharpen"){var d4=S.Amnt.v.val/100,gD=0;if(W=="UnsM")gD=S.Thsh.v;
|
|
else d4*=.75;for(var Q=0;Q<h.buffer.length;Q++){if((Q&3)==3){I.buffer[Q]=h.buffer[Q];continue}var de=h.buffer[Q],gG=I.buffer[Q],cW=d4*(de-gG);
|
|
if(cW>0)cW=Math.max(0,cW-gD);else cW=Math.min(0,cW+gD);I.buffer[Q]=Math.max(0,Math.min(255,de+cW))}}if(W=="HghP")for(var Q=0;
|
|
Q<h.buffer.length;Q++){if((Q&3)==3){I.buffer[Q]=h.buffer[Q];continue}var de=h.buffer[Q],gG=I.buffer[Q];
|
|
I.buffer[Q]=Math.max(0,Math.min(255,128+de-gG))}}if(W=="AdNs"){var id=new Uint8ClampedArray(I.buffer.buffer),h_=255*S.Nose.v.val/100,en;
|
|
if(S.Dstr.v.Dstr=="Gsn")en=function(){return(Math.random()+Math.random()+Math.random()+Math.random()-2)*2};
|
|
else en=function(){return Math.random()*2-1};for(var Q=0;Q<id.length;Q+=4){var o=id[Q],J=id[Q+1],C=id[Q+2],iZ,dh,ef;
|
|
if(S.Mnch.v){iZ=dh=ef=en()}else{iZ=en();dh=en();ef=en()}o+=h_*iZ;J+=h_*dh;C+=h_*ef;id[Q]=o;id[Q+1]=J;
|
|
id[Q+2]=C}}var as=Date.now();if(W=="Mdn "||W=="DstS"||W=="Mxm "||W=="Mnm "||W=="surfaceBlur"){var o=0,az=S.Thsh,he=0;
|
|
if(az)az=az.v;else az=0;if(W=="Mdn "||W=="Mxm "||W=="Mnm "||W=="surfaceBlur")o=S.Rds.v.val;else o=S.Rds.v;
|
|
var cp=S.preserveShape;if(cp&&cp.v.preserveShape=="Rndn")he=1;var D=h.rect.e,R=h.rect.Z,b3=["Mnm ","Mxm ","surfaceBlur"].indexOf(W),da=(he==0?1:.75)*[.73,.73,1][b3]*(D*R*o*o)/1722387,fs=[.73,.9,1.4][b3]*(D*R*Math.sqrt(o))/6500;
|
|
if(n.O9&&b3!=-1&&(da<fs||he==1)&&da<1500){var fa=n.kO(0,D,R);fa.set(h.buffer);var i=n.kO(1,D,R);n.Wf(i);
|
|
n.filter.kf({type:n.filter.adG,o9:new Float32Array([1/D,1/R]),CL:o,asK:az/255,n2:[he,b3,10*Math.ceil(o/10)]},fa.hr);
|
|
i.get(I.buffer)}else{o=Math.round(o);N.y5.Ht=.5;var is=N.y5.Hm;if(W=="Mxm ")is=N.y5.JB;if(W=="Mnm ")is=N.y5.wZ;
|
|
if(W=="surfaceBlur")is=N.y5.cW;N.y5.Tk(h.buffer,I.buffer,D,R,o,is,[az]);if(W=="DstS")for(var Q=0;Q<D*R*4;
|
|
Q++){var gg=Math.abs(h.buffer[Q]-I.buffer[Q]);if(gg<=az)I.buffer[Q]=h.buffer[Q]}}}if(W=="ClrH"){var c2=h.rect.clone();
|
|
c2.x=c2.y=0;var o=S.Rds.v;o=Math.round(o*Math.sqrt(2));var D=c2.e,R=c2.Z,al=new N.qr(D*R);N.hc(h.buffer,al);
|
|
N.uA(al.p);N.uA(al.z);N.uA(al.S);var jB=N.hi(D,R),aU=N.U(D*R*4);for(var cS=0;cS<3;cS++){var i6=cS==0?al.p:cS==1?al.z:al.S,ej=Math.PI*S["Ang"+(cS+1)].v/180,fq=new ex(1/o,0,0,1/o,0,0);
|
|
fq.rotate(ej);N.ce(i6,aU,3);var L=a.Q.ry([aU,c2],fq,!0),bu=L.rect;jB.clearRect(0,0,D,R);var ii=Math.sin(ej),fZ=Math.cos(ej);
|
|
for(var Q=0;Q<bu.Z;Q++)for(var am=0;am<bu.e;am++){var fz=(am+bu.x+.5)*o,c6=(Q+bu.y+.5)*o,h2=fz,cC=c6;
|
|
fz=fZ*h2-ii*cC;c6=ii*h2+fZ*cC;var O=L.buffer[(Q*bu.e+am<<2)+3]*(1/255),io=o*Math.sqrt(O*(1/Math.PI));
|
|
jB.beginPath();jB.arc(fz,c6,io,0,2*Math.PI);jB.fill()}var jG=jB.getImageData(0,0,D,R);N.sN(jG.data,i6,3)}N.uA(al.p);
|
|
N.uA(al.z);N.uA(al.S);N.ST(al,I.buffer)}if(W=="Crst"||W=="Pntl"){var D=h.rect.e,R=h.rect.Z,is=W=="Crst"?N.qx.a8w:N.qx.anj;
|
|
is(h.buffer,D,R,I.buffer,S.ClSz.v,[Math.round(p.p),Math.round(p.z),Math.round(p.S)])}if(W=="Mztn"){var D=h.rect.e,R=h.rect.Z,O=D*R,al=new N.qr(O),dU=[al.p,al.z,al.S];
|
|
N.hc(h.buffer,al);var cf=S.MztT.v.MztT,h9={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]}[cf],as=Date.now(),jx=[];
|
|
for(var Q=0;Q<O;Q++){jx[Q]=Math.random()}var O=D*R,c7=Math.round(O*h9[0]),hy=O-D-1;for(var Q=0;Q<c7;
|
|
Q++){var jb=Math.random(),b$=1;if(jb<.5){b$=D;jb*=2}else jb=2*(jb-.5);var an=Math.floor(jb*hy),ez=an+b$;
|
|
jx[an]=jx[ez]}var il=Math.round(D*h9[1]);for(var c6=0;c6<R;c6++)for(var Q=0;Q<il;Q++){var jb=N.a.Gf(c6*O+Q),an=c6*D+Math.floor(jb*(D-1));
|
|
jx[an]=jx[an+1]}var i7=new Float64Array(256);for(var Q=0;Q<256;Q++){var gN=Q/255,dv=2*(gN<.5?gN:1-gN);
|
|
dv=h9[2]+Math.pow(dv,h9[3])*(1-h9[2]);gN=gN<.5?dv*.5:1-dv*.5;i7[Q]=gN}for(var d1=0;d1<3;d1++){var i6=dU[d1];
|
|
for(var c6=0;c6<R;c6++){for(var fz=0;fz<D;fz++){var Q=c6*D+fz,a_=i6[Q],gN=i7[a_],jb=jx[Q];i6[Q]=jb>gN?0:255}}}N.ST(al,I.buffer)}if(W=="Msc "){var gK=S.ClSz.v.val,D=h.rect.e,R=h.rect.Z,jK=Math.ceil(D/gK),gU=Math.ceil(R/gK),bt=N.U(jK*gU*4);
|
|
N.scale.IU(h.buffer,D,R,bt,jK,gU,1/gK);N.scale.IU(bt,jK,gU,I.buffer,D,R,gK)}if(W=="Clds"||W=="DfrC"){var D=I.rect.e,R=I.rect.Z,O=D*R,iV=N.U(O);
|
|
if(W=="Clds")N.wM(I.buffer,4278190080);var co=N.U(256*4);for(var Q=0;Q<256;Q++){var j=Q<<2,c4=Q/255,hP=1-c4;
|
|
co[j]=Math.round(c4*k.p+hP*p.p);co[j+1]=Math.round(c4*k.z+hP*p.z);co[j+2]=Math.round(c4*k.S+hP*p.S)}N.I.aaC(h.buffer,D,R,iV);
|
|
var cE=I.buffer;for(var Q=0;Q<O;Q++){var j=Q<<2,d1=iV[Q]<<2,o=co[d1],J=co[d1+1],C=co[d1+2];if(W=="Clds"){cE[j]=o;
|
|
cE[j+1]=J;cE[j+2]=C}else{cE[j]=Math.abs(cE[4*Q]-o);cE[j+1]=Math.abs(cE[4*Q+1]-J);cE[j+2]=Math.abs(cE[4*Q+2]-C)}}}if(W=="LnsF"){var D=h.rect.e,R=h.rect.Z,cf=["Zm","Nkn","Nkn1","PnVs"].indexOf(S.Lns.v.Lns),dc=S.FlrC.v,hN=[Math.min(cf,2),S.Brgh.v/100,dc.Hrzn.v,dc.Vrtc.v],as=Date.now();
|
|
N.a0U(h.buffer,D,R,I.buffer,hN)}var eo=["Blr ","BlrM","Shrp","ShrM"].indexOf(W);if(eo!=-1){var hQ=eo>1,D=h.rect.e,R=h.rect.Z,iJ=N.pG.r0[eo],bV=h.buffer.slice(0);
|
|
if(!hQ)N.tr(bV);N.pG.kS(bV,I.buffer,D,R,iJ,255,!1,hQ);if(!hQ)N.oY(I.buffer)}if(W=="MtnB"){var ad=-S.Angl.v*Math.PI/180,fI=S.Dstn.v.val/2,as=Date.now(),D=h.rect.e,R=h.rect.Z,z=h.rect.clone();
|
|
z.x=z.y=0;if(n.O9){var as=Date.now(),bR=I.buffer;bR.set(h.buffer);N.tr(bR);var gA=n.kO(0,D,R);gA.set(bR);
|
|
var jI=N.U(4);jI[0]=Math.round(128+127*Math.cos(ad));jI[1]=Math.round(128+127*Math.sin(ad));new Uint32Array(bR.buffer).fill(new Uint32Array(jI.buffer)[0]);
|
|
var gM=n.kO(1,D,R);gM.set(bR);n.Wf(gA,z);gA.rh(z);n.filter.kf({type:n.filter.bw,gr:gM.hr,o9:new Float32Array([1/D,1/R]),ab$:fI/2,abh:1},gA.LQ);
|
|
gA.get(bR);N.oY(bR)}else{var fq=new ex;fq.rotate(ad);var L=a.Q.ry([h.buffer,h.rect],fq,!1,null,!0);hw.Qw(fI,N.tO.RE,L.buffer,L.rect);
|
|
fq.uA();L=a.Q.ry([L.buffer,L.rect],fq,!1,I.buffer.buffer,!0,I.rect)}console.log(Date.now()-as)}if(W=="RdlB"){var D=h.rect.e,R=h.rect.Z,d4=S.Amnt.v,cM=S.BlrM.v.BlrM=="Zm",cS=S.Cntr.v,d2=cS.Hrzn.v,g7=cS.Vrtc.v,jy=Math.max(d2,1-d2)*D,iR=Math.max(g7,1-g7)*R,io=Math.sqrt(jy*jy+iR*iR),gr=2*Math.PI*io*1.5,dX=Math.round(gr),d3=Math.round(io),c2=new gj(0,0,dX,d3),gl=N.U(dX*d3*4),g0=cM?4:1,ho=cM?.6:8*((D+R)/2)/1400,hV=.1,bE=1,db=1;
|
|
N.V.iA(h.buffer,D,R,gl,dX,d3,d2,g7,g0,hV,bE,db);var fV=cM?N.U(dX*d3*4):null;if(cM){N.V.Vg(gl,fV,dX,d3);
|
|
var fG=fV;fV=gl;gl=fG;c2.e=d3;c2.Z=dX}hw.Qw(ho*d4,N.tO.RE,gl,c2);if(cM){N.V.Vg(gl,fV,d3,dX);var fG=fV;
|
|
fV=gl;gl=fG;c2.e=dX;c2.Z=d3}N.V._H(gl,dX,d3,I.buffer,D,R,d2,g7,g0,hV,bE,db)}if(W=="Plr "){var D=h.rect.e,R=h.rect.Z;
|
|
if(S.Cnvr.v.Cnvr=="RctP")N.V._H(h.buffer,D,R,I.buffer,D,R,.5,.5,1,0,2,D/R);else N.V.iA(h.buffer,D,R,I.buffer,D,R,.5,.5,1,0,2,D/R)}if(W=="FndE"){var D=h.rect.e,R=h.rect.Z;
|
|
N.pG.nO(h.buffer,I.buffer,D,R)}if(W=="oilPaint"){var ej=S.LghD.v*Math.PI/180,jF=[Math.cos(ej),Math.sin(ej),.001],hk=[S.stylization.v,S.cleanliness.v,S.brushScale.v,S.microBrush.v,S.lightingOn.v,S.specularity.v,jF],z=h.rect.clone();
|
|
z.x=z.y=0;N.Xv.filter(h.buffer,z,I.buffer,hk)}if(W=="Ofst"){var D=h.rect.e,R=h.rect.Z,jz=new Uint32Array(h.buffer.buffer),du=new Uint32Array(I.buffer.buffer),h2=S.Hrzn.v,cC=S.Vrtc.v,dG=S.Fl.v.FlMd;
|
|
N.wM(du,0);if(dG=="Bckg"||dG=="Rpt"){var c2=h.rect.clone();c2.offset(h2,cC);N.zt(jz,c2,du,I.rect)}if(dG=="Rpt"){var fv,ik,gP,cU,aY;
|
|
h2=Math.max(-D,Math.min(D,h2));cC=Math.max(-R,Math.min(R,cC));fv=h2>0?h2:0;gP=h2>0?D:D+h2;ik=cC>0?0:cC+R;
|
|
cU=cC>0?cC:R;aY=cC>0?0:D*(R-1);for(var c6=ik;c6<cU;c6++)for(var fz=fv;fz<gP;fz++)du[c6*D+fz]=jz[aY+fz-h2];
|
|
fv=h2>0?0:D+h2;gP=h2>0?h2:D;ik=cC>0?cC:0;cU=cC>0?R:R+cC;aY=h2>0?0:D-1;for(var c6=ik;c6<cU;c6++)for(var fz=fv;
|
|
fz<gP;fz++)du[c6*D+fz]=jz[aY+D*(c6-cC)];if(h2>=0&&cC>=0){fv=0;gP=h2;ik=0;cU=cC;aY=0}if(h2>=0&&cC<0){fv=0;
|
|
gP=h2;ik=R+cC;cU=R;aY=D*(R-1)}if(h2<0&&cC>=0){fv=D+h2;gP=D;ik=0;cU=cC;aY=D-1}if(h2<0&&cC<0){fv=D+h2;
|
|
gP=D;ik=R+cC;cU=R;aY=D*R-1}for(var c6=ik;c6<cU;c6++)for(var fz=fv;fz<gP;fz++)du[c6*D+fz]=jz[aY]}if(dG=="Wrp"){h2=(h2+100*D)%D;
|
|
cC=(cC+100*R)%R;var c2=new gj(h2-D,cC-R,D,R);N.zt(jz,c2,du,I.rect);c2.offset(D,0);N.zt(jz,c2,du,I.rect);
|
|
c2.offset(0,R);N.zt(jz,c2,du,I.rect);c2.offset(-D,0);N.zt(jz,c2,du,I.rect)}}if(W=="Rept"){var br=S.Rsft.v.val/100,at=S.SpcX.v.val/100;
|
|
at=Math.max(at,-.99);var et=S.SpcY.v.val/100;et=Math.max(et,-.99);var bE=S.Scl.v.val/100,fq=new ex;fq.rotate(S.Angl.v*Math.PI/180);
|
|
fq.scale(bE,bE);var ie={buffer:h.buffer,rect:h.rect};N.jo(ie);if(ie.rect.ZP()){ie.buffer=h.buffer;ie.rect=h.rect}var cE=ie.buffer,c2=ie.rect,eD=N.ow(cE,c2,0),f2=new Uint32Array(cE.buffer)[0];
|
|
if(!eD.ZP()&&!eD.xX(c2)){var jf=N.U(eD.n()*4);N.zt(cE,c2,jf,eD);cE=jf;c2=eD}c2.x=c2.y=0;f2=at==0&&et==0||S.SpcC.v?f2:0;
|
|
function gB(fz){return fz<0?Math.ceil(fz):Math.floor(fz)}var j9=fq.xK(new eC(c2.e,0));j9.x=gB(j9.x);
|
|
j9.y=gB(j9.y);var jA=fq.xK(new eC(0,c2.Z));jA.x=gB(jA.x);jA.y=gB(jA.y);var L=a.Q.ry([cE,c2],fq,!1),bu=L.rect,e2=L.buffer,af=Math.round(bu.x),au=Math.round(bu.y),bb=Math.max(I.rect.e,I.rect.Z)/Math.min(c2.e*bE*(1+at),c2.Z*bE*(1+et));
|
|
bb=Math.ceil(bb*1.7);N.wM(I.buffer,f2);for(var c6=-bb;c6<bb;c6++){for(var fz=-bb;fz<bb;fz++){var j2=(fz+c6*br)*(1+at),hF=c6*(1+et);
|
|
bu.x=af+Math.round(j2*j9.x+hF*jA.x);bu.y=au+Math.round(j2*j9.y+hF*jA.y);if(bu.NW(I.rect))N.a.ha("norm",e2,bu,I.buffer,I.rect,bu,1)}}}if(W=="Ctoa"){var p=N.X.iZ(S.Clr.v),az=S.Trsp.v.val/100,c$=S.Opct.v.val/100;
|
|
az=c$==0?0:az/c$;var D=h.rect.e,R=h.rect.Z,dw=~~p.p,dn=~~p.z,cP=~~p.S,aY=h.buffer,cH=I.buffer;for(var c6=0;
|
|
c6<R;c6++)for(var fz=0;fz<D;fz++){var Q=c6*D+fz,j=Q<<2,c2=aY[j],fm=aY[j+1],cE=aY[j+2],js=Math.abs(dw-c2),cy=Math.abs(dn-fm),jQ=Math.abs(cP-cE),gE=Math.max(js,cy,jQ)*(1/255);
|
|
gE=Math.max(0,Math.min(1,gE/c$));var cu=gE==0?0:1/gE,eA=az==1?1:Math.max(0,Math.min(1,(gE-az)/(1-az)));
|
|
cH[j]=Math.max(0,Math.min(255,(c2-dw*(1-gE))*cu));cH[j+1]=Math.max(0,Math.min(255,(fm-dn*(1-gE))*cu));
|
|
cH[j+2]=Math.max(0,Math.min(255,(cE-cP*(1-gE))*cu));cH[j+3]=~~(.5+eA*255)}}if(W=="Dthr"){function g$(fz){return~~(.5+255*N.qY(fz/255))}var ff=S.Plte.v,cn;
|
|
if(ff==0)cn=[4278190080,4294967295];else{var fy=[[1,1,1],[2,2,2],[3,3,2]][ff-1],h0=[1<<fy[0],1<<fy[1],1<<fy[2]],jM=[~~(255/(h0[0]-1)),~~(255/(h0[1]-1)),~~(255/(h0[2]-1))];
|
|
cn=[];for(var o=0;o<h0[0];o++)for(var J=0;J<h0[1];J++)for(var C=0;C<h0[2];C++)cn.push(255<<24|g$(C*jM[2])<<16|g$(J*jM[1])<<8|g$(o*jM[0]))}var D=h.rect.e,R=h.rect.Z,O=D*R,b0=O*4,jl=h.buffer.slice(0),eZ=I.buffer;
|
|
for(var Q=0;Q<b0;Q++)jl[Q]=~~(.5+255*N.qY(jl[Q]/255));var eg=N.U(D*R);UPNG.encode.dither(jl,D,R,cn,eZ,eg);
|
|
for(var Q=0;Q<b0;Q++)eZ[Q]=~~(.5+255*N.HE(eZ[Q]/255))}if("LqFy,Dspl,Pnch,Sphr,Twrl,Rple,Shr ,Wave,LnCr,ZgZg".split(",").indexOf(W)!=-1){var fD=q[0],D=h.rect.e,R=h.rect.Z,i7,dF=0;
|
|
if(W=="LqFy")i7=hx.D9(new Uint8Array(S.LqMe.v).buffer);else{var fT=3;i7={s6:Math.floor(D/fT),R_:Math.floor(R/fT)};
|
|
i7.map=new Float32Array(i7.s6*i7.R_*2);if(W=="LnCr"){var d2=.5*(i7.s6-1),g7=.5*(i7.R_-1),ab=Math.max(Math.abs(0-d2),Math.abs(1-d2)),aE=Math.max(Math.abs(0-g7),Math.abs(1-g7)),c_=Math.sqrt(ab*ab+aE*aE),fe=0,bK=0,ga=-1,f$=2,bE=S.LnSi.v/100,cM=1/bE,dA=S.LnIa.v/100,ba=dA==0?1e-6:dA*4.6,ft=cM/c_;
|
|
for(var c6=0;c6<i7.R_;c6++){for(var fz=0;fz<i7.s6;fz++){var jy=(fz-d2)*ft,iR=(c6-g7)*ft,o=Math.sqrt(jy*jy+iR*iR)*ba,aH=Math.atan(o),b8=dA>0?aH/o:o/aH,db=d2+c_*b8*jy,hr=g7+c_*b8*iR,Q=c6*i7.s6+fz<<1;
|
|
i7.map[Q]=db-fz;i7.map[Q+1]=hr-c6}}}else if(W=="Dspl"&&fD.length!=0){dF=S.UndA.v.UndA=="WrpA"?2:1;var gd=S.DspF.v.pth,hB;
|
|
for(var Q=0;Q<fD.length;Q++)if(fD[Q].SI==gd)hB=fD[Q];if(hB==null)hB=fD[0];hB.jc();var js=hB.xJ[1],eE=N.U(js.n());
|
|
N.Zi(hB.xJ[0],eE);var iA=js.e,bI=js.Z;i7={s6:iA,R_:bI};i7.map=new Float32Array(i7.s6*i7.R_*2);var c8=2.54*S.HrzS.v*iA/D,gw=2.54*S.VrtS.v*bI/R;
|
|
for(var c6=0;c6<i7.R_;c6++){for(var fz=0;fz<i7.s6;fz++){var gg=-.5+eE[c6*iA+fz]*(1/255),Q=c6*i7.s6+fz<<1;
|
|
i7.map[Q]=gg*c8;i7.map[Q+1]=gg*gw}}}else if(W=="Pnch"||W=="Twrl"||W=="Sphr"||W=="ZgZg"){var d4=1,ad=Math.PI,hi=0,hS=1,fr=0,cS=3,gK=1.53,b8=1;
|
|
if(W=="Pnch"||W=="Sphr"||W=="ZgZg")d4=S.Amnt.v/100;if(W=="ZgZg"){hS=S.NmbR.v;fr=["ArnC","OtFr","PndR"].indexOf(S.ZZTy.v.ZZTy)}if(W=="Twrl")ad=S.Angl.v*Math.PI/180;
|
|
if(W=="Sphr")hi=["Nrml","HrzO","VrtO"].indexOf(S.SphM.v.SphM);function is(fz){fz=Math.pow(fz,1-fz*.3-fz*fz*(fz*fz)*.5);
|
|
return-.225*Math.sin(fz*Math.PI)}function b7(R,hD,o,fv,ik,gP,cU,b8){var jy=gP-fv,iR=cU-ik,bp=fv-R,gX=ik-hD,c4=jy*jy+iR*iR,C=2*(jy*bp+iR*gX),cS=bp*bp+gX*gX-o*o,eQ=Math.sqrt(C*C-4*c4*cS),df=b8/(2*c4),dH=(-C+eQ)*df,eI=(-C-eQ)*df;
|
|
return b8*Math.min(dH,eI)}var jK=i7.s6,gU=i7.R_,f_=i7.s6/2,ey=i7.R_/2,eG=1/f_,o=Math.sqrt(cS*cS+1)/cS,bG=cS+Math.sqrt(1/(cS*cS));
|
|
if(d4<0){cS=1.72;o=1;bG=cS;gK=-1;b8=-1}for(var c6=0;c6<gU;c6++){var iR=(c6-ey)/ey;for(var fz=0;fz<jK;
|
|
fz++){var jy=(fz-f_)*eG;if(hi==1)iR=0;else if(hi==2)jy=0;var iS=Math.sqrt(jy*jy+iR*iR);if(iS<1&&iS!=0){var Q=c6*i7.s6+fz<<1;
|
|
if(W=="Pnch"){var hZ=-d4*is(iS)/iS;i7.map[Q]=jy*hZ*f_;i7.map[Q+1]=iR*hZ*ey}else if(W=="Sphr"){var fG=b7(0,bG,o,0,0,iS,cS,b8),ar=gK*d4*(fG-1);
|
|
i7.map[Q]=jy*ar*f_;i7.map[Q+1]=iR*ar*ey}else if(W=="Twrl"){var ej=Math.atan2(iR,jy)-ad*(1-iS)*(1-iS),dt=Math.cos(ej),jn=Math.sin(ej);
|
|
i7.map[Q]=(iS*dt-jy)*f_;i7.map[Q+1]=(iS*jn-iR)*ey}else if(W=="ZgZg"){var dt=0,jn=0,ig=d4*(.5-.5*Math.cos(iS*hS*2*Math.PI))*(1-iS);
|
|
if(fr==0){var ej=Math.atan2(iR,jy)-3.5*ig;dt=iS*Math.cos(ej);jn=iS*Math.sin(ej)}if(fr==1){ig=100/D*ig/iS;
|
|
dt=(1-ig)*jy;jn=(1-ig)*iR}if(fr==2){var gQ=512/D*ig*Math.PI/4;dt=gQ+jy;jn=gQ+iR}i7.map[Q]=(dt-jy)*f_;
|
|
i7.map[Q+1]=(jn-iR)*ey}}}}}else if(W=="Shr "){var iU=JSON.parse(JSON.stringify(S.ShrP.v));N.Ey.A(iU,new ex(0,255/127,255/127,0,-2,0));
|
|
var bi=N.Ey.AE(iU,i7.R_,!0);dF=S.UndA.v.UndA=="WrpA"?2:1;for(var c6=0;c6<i7.R_;c6++){var jy=-bi[c6]*i7.s6;
|
|
for(var fz=0;fz<i7.s6;fz++){var Q=c6*i7.s6+fz<<1;i7.map[Q]=jy}}}else if(W=="Wave"){var fo=S.NmbG.v,a3=S.WLMn.v,bF=S.WLMx.v,ch=S.AmMn.v*(Math.PI/4),e0=S.AmMx.v*(Math.PI/4),fM=S.SclH.v/100,ac=S.SclV.v/100,cf=S.Wvtp.v.Wvtp,ig=Math.sin;
|
|
if(cf=="WvTr")ig=function(fz){fz*=2/Math.PI;return-.5+Math.abs(fz%2-1)};if(cf=="WvSq")ig=function(fz){fz*=2/Math.PI;
|
|
return 1+2*Math.floor(fz%2-1)};var fE=[],iz=new N.a.Yl(S.RndS.v);for(var Q=0;Q<fo;Q++){fE.push(iz.get()*10);
|
|
fE.push(Math.PI*fT/(a3+iz.get()*(bF-a3)));fE.push(fM*(ch+iz.get()*(e0-ch))/fT);fE.push(iz.get()*10);
|
|
fE.push(Math.PI*fT/(a3+iz.get()*(bF-a3)));fE.push(ac*(ch+iz.get()*(e0-ch))/fT)}var jP=[],dN=[],dp=Math.max(i7.s6,i7.R_);
|
|
for(var Q=0;Q<dp;Q++){var jy=0,iR=0;for(var am=0;am<fo;am++){var cd=am*6;jy+=fE[cd+2]*ig(fE[cd]+Q*fE[cd+1]);
|
|
iR+=fE[cd+5]*ig(fE[cd+3]+Q*fE[cd+4])}jP[Q]=iR;dN[Q]=jy}for(var c6=0;c6<i7.R_;c6++){for(var fz=0;fz<i7.s6;
|
|
fz++){var Q=c6*i7.s6+fz<<1;i7.map[Q]=dN[c6];i7.map[Q+1]=jP[fz]}}dF=S.UndA.v.UndA=="WrpA"?2:1}else if(W=="Rple"){dF=1;
|
|
var d4=S.Amnt.v/100,d9=4,ea=[0,-.19,-.29,-.32,.92,.37,.93,.54,-.54,.42,-.29,-.58,-.67,.85,0,.64],fc=1,iq=1,bp=0,iw=["Sml","Mdm","Lrg"].indexOf(S.RplS.v.RplS);
|
|
if(iw==0){fc=1;iq=.2;bp=3}if(iw==2){fc=1;iq=2;bp=-1;ea=ea.reverse()}var cQ=function(fz,c6){var cS=Math.cos,fF=0;
|
|
for(var Q=0;Q<d9;Q++)for(var am=0;am<d9;am++)fF+=ea[Q*d9+am]*cS(fz*(Q+bp)-c6*(am+bp));return fF},bq=Math.floor(50/fT),bz=new Float32Array(bq*bq*2),fC=iq*d4*.5/fT;
|
|
for(var c6=0;c6<bq;c6++)for(var fz=0;fz<bq;fz++){var d2=fc*fz*2*Math.PI/bq,g7=fc*c6*2*Math.PI/bq,fk=cQ(d2,g7),jy=(cQ(d2+.01,g7)-fk)*100,iR=(cQ(d2,g7+.01)-fk)*100,Q=(c6*bq+fz)*2;
|
|
bz[Q]=jy*fC;bz[Q+1]=iR*fC}for(var c6=0;c6<i7.R_;c6++)for(var fz=0;fz<i7.s6;fz++){var jn=c6%bq,dt=fz%bq,Q=c6*i7.s6+fz<<1,bg=jn*bq+dt<<1;
|
|
i7.map[Q]=bz[bg];i7.map[Q+1]=bz[bg+1]}}}N.C2.hY(h.buffer,I.buffer,D,R,null,i7.map,i7.s6,i7.R_,dF)}return I};
|
|
var bh={};bh.uF="BrSm BrsL BrDR BrsW BrbW BrSp".split(" ");bh.y2="LDBt LDBL LDLf LDTL LDTp LDTR LDRg LDBR".split(" ");
|
|
bh.Lc=["ScrC","ScrD","ScrL"];bh.JU=["SDRD","SDHz","SDLD","SDVt"];bh.e5="TxBl TxCa TxFr TxTL TxBr TxBu TxSt".split(" ");
|
|
bh.DX="LPBt LPBL LPLf LPTL LPTp LPTR LPRg LPBR".split(" ");bh.WD="GrnR GrSf GrSr GrnC GrCn GrnE GrSt GrnH GrnV GrSp".split(" ");
|
|
bh.Rw=["Artistic","Brush Strokes",[24,4],"Sketch",[24,14],[12,67]];bh.names={ClrP:[0,"Colored Pencil"],Ct:[0,"Cutout"],DryB:[0,"Dry Brush"],FlmG:[0,"Film Grain"],Frsc:[0,"Fresco"],NGlw:[0,"Neon Glow"],PntD:[0,"Paint Daubs"],PltK:[0,"Palette Knife"],PlsW:[0,"Plastic Wrap"],PstE:[0,"Poster Edges"],RghP:[0,"Rough Pastels"],SmdS:[0,"Smudge Stick"],Spng:[0,"Sponge"],Undr:[0,"Underpainting"],Wtrc:[0,"Watercolor"],AccE:[1,"Accented Edges"],AngS:[1,"Angled Strokes"],Crsh:[1,"Crosshatch"],DrkS:[1,"Dark Strokes"],InkO:[1,"Ink Outlines"],Spt:[1,"Spatter"],SprS:[1,"Sprayed Strokes"],Smie:[1,"Sumi-e"],DfsG:[2,"Diffuse Glow"],Gls:[2,"Glass"],OcnR:[2,"Ocean Ripple"],BsRl:[3,"Bas Relief"],ChlC:[3,"Chalk & Charcoal"],Chrc:[3,"Charcoal"],Chrm:[3,"Chrome"],CntC:[3,"Cont\xE9 Crayon"],GraP:[3,"Graphic Pen"],HlfS:[3,"Halftone Pattern"],NtPr:[3,"Note Paper"],Phtc:[3,"Photocopy"],Plst:[3,"Plaster"],Rtcl:[3,"Reticulation"],Stmp:[3,"Stamp"],TrnE:[3,"Torn Edges"],WtrP:[3,"Water Paper"],GlwE:[4,"Glowing Edges"],Crql:[5,"Craquelure"],Grn:[5,"Grain"],MscT:[5,"Mosaic Tiles"],Ptch:[5,"Patchwork"],StnG:[5,"Stained Glass"],Txtz:[5,"Texturizer"]};
|
|
bh.QE=function(W){var h;if(W=="ClrP")h={Pncl:{t:"long",v:4},StrP:{t:"long",v:8},PprB:{t:"long",v:25}};
|
|
if(W=="Ct")h={NmbL:{t:"long",v:4},EdgS:{t:"long",v:3},EdgF:{t:"long",v:1}};if(W=="DryB")h={BrsS:{t:"long",v:4},BrsD:{t:"long",v:4},Txtr:{t:"long",v:2}};
|
|
if(W=="FlmG")h={Grn:{t:"long",v:4},HghA:{t:"long",v:0},Intn:{t:"long",v:10},FlRs:{t:"long",v:23068185}};
|
|
if(W=="Frsc")h={BrsS:{t:"long",v:2},BrsD:{t:"long",v:8},Txtr:{t:"long",v:1}};if(W=="NGlw")h={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(W=="PntD")h={Sz:{t:"long",v:10},Shrp:{t:"long",v:10},BrsT:{t:"enum",v:{BrsT:"BrSm"}}};if(W=="PltK")h={StrS:{t:"long",v:25},StDt:{t:"long",v:3},Sftn:{t:"long",v:2}};
|
|
if(W=="PlsW")h={HghS:{t:"long",v:20},Dtl:{t:"long",v:4},Smth:{t:"long",v:5}};if(W=="PstE")h={EdgT:{t:"long",v:2},EdgI:{t:"long",v:1},Pstr:{t:"long",v:2}};
|
|
if(W=="RghP")h={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(W=="SmdS")h={StrL:{t:"long",v:2},HghA:{t:"long",v:0},Intn:{t:"long",v:10},FlRs:{t:"long",v:6399750}};
|
|
if(W=="Spng")h={BrsS:{t:"long",v:2},Dfnt:{t:"long",v:12},Smth:{t:"long",v:5},FlRs:{t:"long",v:218877241}};
|
|
if(W=="Undr")h={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(W=="Wtrc")h={BrsD:{t:"long",v:9},ShdI:{t:"long",v:1},Txtr:{t:"long",v:3}};if(W=="AccE")h={EdgW:{t:"long",v:2},EdgB:{t:"long",v:38},Smth:{t:"long",v:5}};
|
|
if(W=="AngS")h={DrcB:{t:"long",v:50},StrL:{t:"long",v:15},Shrp:{t:"long",v:3}};if(W=="Crsh")h={StrL:{t:"long",v:9},Shrp:{t:"long",v:6},Strg:{t:"long",v:1}};
|
|
if(W=="DrkS")h={Blnc:{t:"long",v:5},BlcI:{t:"long",v:6},WhtI:{t:"long",v:2}};if(W=="InkO")h={StrL:{t:"long",v:4},DrkI:{t:"long",v:20},LghI:{t:"long",v:10}};
|
|
if(W=="Smie")h={StrW:{t:"long",v:10},StrP:{t:"long",v:5},Cntr:{t:"long",v:16}};if(W=="Spt")h={SprR:{t:"long",v:10},Smth:{t:"long",v:5},FlRs:{t:"long",v:10738420}};
|
|
if(W=="SprS")h={StrL:{t:"long",v:12},SprR:{t:"long",v:7},SDir:{t:"enum",v:{StrD:"SDRD"}},FlRs:{t:"long",v:893120664}};
|
|
if(W=="DfsG")h={Grns:{t:"long",v:6},GlwA:{t:"long",v:10},ClrA:{t:"long",v:15},FlRs:{t:"long",v:325892160}};
|
|
if(W=="Gls")h={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(W=="OcnR")h={RplS:{t:"long",v:5},RplM:{t:"long",v:15},FlRs:{t:"long",v:64008840}};if(W=="BsRl")h={Dtl:{t:"long",v:11},Smth:{t:"long",v:7},LghD:{t:"enum",v:{LghD:"LDBt"}}};
|
|
if(W=="ChlC")h={ChrA:{t:"long",v:6},ChlA:{t:"long",v:6},StrP:{t:"long",v:1},FlRs:{t:"long",v:314004633}};
|
|
if(W=="Chrc")h={ChAm:{t:"long",v:1},Dtl:{t:"long",v:5},LgDr:{t:"long",v:50},GELv:{t:"bool",v:!0}};if(W=="Chrm")h={Dtl:{t:"long",v:4},Smth:{t:"long",v:4}};
|
|
if(W=="CntC")h={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(W=="GraP")h={StrL:{t:"long",v:7},LgDr:{t:"long",v:50},SDir:{t:"enum",v:{StrD:"SDRD"}},FlRs:{t:"long",v:55993248}};
|
|
if(W=="HlfS")h={HlSz:{t:"long",v:1},Cntr:{t:"long",v:5},ScrT:{t:"enum",v:{ScrT:"ScrD"}}};if(W=="NtPr")h={ImgB:{t:"long",v:25},Grns:{t:"long",v:10},Rlf:{t:"long",v:11},FlRs:{t:"long",v:52642770}};
|
|
if(W=="Phtc")h={Dtl:{t:"long",v:10},Drkn:{t:"long",v:4}};if(W=="Plst")h={ImgB:{t:"long",v:20},Smth:{t:"long",v:2},LghP:{t:"enum",v:{LghP:"LPTp"}}};
|
|
if(W=="Rtcl")h={Dnst:{t:"long",v:12},BlcL:{t:"long",v:40},WhtL:{t:"long",v:5},FlRs:{t:"long",v:301835400}};
|
|
if(W=="Stmp")h={LgDr:{t:"long",v:25},Smth:{t:"long",v:4}};if(W=="TrnE")h={ImgB:{t:"long",v:25},Smth:{t:"long",v:11},Cntr:{t:"long",v:17},FlRs:{t:"long",v:461109340}};
|
|
if(W=="WtrP")h={FbrL:{t:"long",v:15},Brgh:{t:"long",v:60},Cntr:{t:"long",v:80},FlRs:{t:"long",v:83852682}};
|
|
if(W=="GlwE")h={EdgW:{t:"long",v:1},EdgB:{t:"long",v:10},Smth:{t:"long",v:1}};if(W=="Crql")h={CrcS:{t:"long",v:15},CrcD:{t:"long",v:6},CrcB:{t:"long",v:9},FlRs:{t:"long",v:495615720}};
|
|
if(W=="Grn")h={Intn:{t:"long",v:40},Cntr:{t:"long",v:50},Grnt:{t:"enum",v:{Grnt:"GrnR"}},FlRs:{t:"long",v:217582197}};
|
|
if(W=="MscT")h={TlSz:{t:"long",v:12},GrtW:{t:"long",v:3},LghG:{t:"long",v:9},FlRs:{t:"long",v:25445584}};
|
|
if(W=="Ptch")h={SqrS:{t:"long",v:4},Rlf:{t:"long",v:8},FlRs:{t:"long",v:383529723}};if(W=="StnG")h={ClSz:{t:"long",v:10},BrdT:{t:"long",v:4},LghI:{t:"long",v:0},FlRs:{t:"long",v:319935998}};
|
|
if(W=="Txtz")h={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}};
|
|
h.__name="Filter Gallery";h.classID="GEfc";h.GEfk={t:"enum",v:{GEft:W}};h.GELv={t:"bool",v:!0};return h};
|
|
bh.Xh=function(W,h){for(var Q=0;Q<h.length;Q++)~~(h[Q]=(W[4*Q]+W[4*Q+1]+W[4*Q+2])*(1/3))};bh.UK=function(W,h,S,k){var p=UPNG.quantize(W,h);
|
|
p={FB:p.inds,lt:p.plte};var I=Math.floor((S+k)*.015);if(I!=0)N.ps.aj3(p.FB,S,k,I);return p};bh.K1=function(W,h,S,k,p,I,q){W=S.GEfk.v.GEft;
|
|
var P=h.rect,t=P.e,M=P.Z,U=t*M,i=S.FlRs?S.FlRs.v>>>1:0;function z(j){return j.p<<24|j.z<<16|j.S<<8|255}if(W=="ClrP")N.I.a4H(h.buffer,t,M,I.buffer,[S.Pncl.v,S.StrP.v,S.PprB.v]);
|
|
if(W=="Ct"){var D=S.NmbL.v,R=S.EdgS.v,O=bh.UK(h.buffer.buffer,D*2,t,M);for(var Q=0;Q<O.FB.length;Q++)O.FB[Q]++;
|
|
var b=new Uint8Array((t+2)*(M+2));N.vG(O.FB,new gj(1,1,t,M),b,new gj(0,0,t+2,M+2));var w=N.H.P8(b,t+2,M+2,R,!1),A=new ex(1,0,0,1,-1,-1);
|
|
for(var Q=0;Q<w.length;Q++)N.H.A(w[Q].path.s,A,w[Q].path.s);var g=[],E=O.lt;for(var Q=0;Q<E.length;Q++){var j=E[Q].est.q;
|
|
g.push({p:Math.round(255*j[0]),z:Math.round(255*j[1]),S:Math.round(255*j[2]),S4:Math.round(255*j[3])})}var x=N.hi(t,M);
|
|
for(var Q=0;Q<w.length;Q++){var d=w[Q],j=g[d.color-1];if(j.S4==0)continue;x.fillStyle="rgba("+j.p+","+j.z+","+j.S+","+j.S4/255+")";
|
|
x.beginPath();Typr.U.pathToContext({crds:d.path.s,cmds:d.path.C},x);x.fill()}if(!P.ZP()){var L=x.getImageData(0,0,t,M);
|
|
N.WQ(L.data,I.buffer)}}if(W=="DryB")N.I.a7g(h.buffer,t,M,I.buffer,[S.BrsS.v,S.BrsD.v,S.Txtr.v]);if(W=="FlmG")N.I.afM(h.buffer,t,M,I.buffer,[S.Grn.v,S.HghA.v,S.Intn.v,i]);
|
|
if(W=="Frsc")N.I.aq2(h.buffer,t,M,I.buffer,[S.BrsS.v,S.BrsD.v,S.Txtr.v]);if(W=="NGlw")N.I.ahV(h.buffer,t,M,I.buffer,[S.Sz.v,S.Brgh.v,z(N.X.iZ(S.Clr.v)),z(k),z(p)]);
|
|
if(W=="PltK")N.I.apw(h.buffer,t,M,I.buffer,[S.StrS.v,S.StDt.v,S.Sftn.v]);if(W=="PstE")N.I.aeX(h.buffer,t,M,I.buffer,[S.EdgT.v,S.EdgI.v,S.Pstr.v]);
|
|
if(W=="RghP")N.I.a59(h.buffer,t,M,I.buffer,[S.StrL.v,S.StDt.v,bh.e5.indexOf(S.TxtT.v.TxtT),S.Scln.v,S.Rlf.v,bh.y2.indexOf(S.LghD.v.LghD),S.InvT.v]);
|
|
if(W=="SmdS")N.I.afp(h.buffer,t,M,I.buffer,[S.StrL.v,S.HghA.v,S.Intn.v,S.FlRs.v,i]);if(W=="Spng")N.I.aum(h.buffer,t,M,I.buffer,[S.BrsS.v,S.Dfnt.v,S.Smth.v,S.FlRs.v,i]);
|
|
if(W=="Undr")N.I.acf(h.buffer,t,M,I.buffer,[S.BrsS.v,S.TxtC.v,bh.e5.indexOf(S.TxtT.v.TxtT),S.Scln.v,S.Rlf.v,bh.y2.indexOf(S.LghD.v.LghD),S.InvT.v]);
|
|
if(W=="Wtrc")N.I.a9t(h.buffer,t,M,I.buffer,[S.BrsD.v,S.ShdI.v,S.Txtr.v]);if(W=="AccE")N.I.a6Y(h.buffer,t,M,I.buffer,[S.EdgW.v,S.EdgB.v,S.Smth.v]);
|
|
if(W=="AngS")N.I.au0(h.buffer,t,M,I.buffer,[S.DrcB.v,S.StrL.v,S.Shrp.v]);if(W=="Crsh")N.I.amb(h.buffer,t,M,I.buffer,[S.StrL.v,S.Shrp.v,S.Strg.v]);
|
|
if(W=="DrkS")N.I.alk(h.buffer,t,M,I.buffer,[S.Blnc.v,S.BlcI.v,S.WhtI.v]);if(W=="InkO")N.I.auo(h.buffer,t,M,I.buffer,[S.StrL.v,S.DrkI.v,S.LghI.v]);
|
|
if(W=="Smie")N.I.a5z(h.buffer,t,M,I.buffer,[S.StrW.v,S.StrP.v,S.Cntr.v]);if(W=="DfsG")N.I.a2a(h.buffer,t,M,I.buffer,[S.Grns.v,S.GlwA.v,S.ClrA.v,z(p),i]);
|
|
if(W=="CntC")N.I.a8R(h.buffer,t,M,I.buffer,[S.FrgL.v,S.BckL.v,bh.e5.indexOf(S.TxtT.v.TxtT),S.Scln.v,S.Rlf.v,bh.y2.indexOf(S.LghD.v.LghD),S.InvT.v,z(p),z(k)]);
|
|
if(W=="ChlC")N.I.akC(h.buffer,t,M,I.buffer,[S.ChrA.v,S.ChlA.v,S.StrP.v,i,z(p),z(k)]);var _=W=="GraP"||W=="Chrc"||W=="Plst"||W=="Rtcl"||W=="Stmp"||W=="TrnE";
|
|
if(_){var T=N.U(t*M);if(W=="GraP")N.I.aif(h.buffer,t,M,I.buffer,[S.StrL.v,S.LgDr.v,bh.JU.indexOf(S.SDir.v.StrD),i]);
|
|
if(W=="Chrc")N.I.a2v(h.buffer,t,M,I.buffer,[S.ChAm.v,S.Dtl.v,S.LgDr.v]);if(W=="Plst")N.I.agF(h.buffer,t,M,I.buffer,[S.ImgB.v,bh.DX.indexOf(S.LghP.v.LghP),S.Smth.v]);
|
|
if(W=="Rtcl")N.I.ar0(h.buffer,t,M,I.buffer,[S.Dnst.v,S.BlcL.v,S.WhtL.v,i]);if(W=="Stmp")N.I.a6O(h.buffer,t,M,I.buffer,[S.LgDr.v,S.Smth.v]);
|
|
if(W=="TrnE")N.I.a8A(h.buffer,t,M,I.buffer,[S.ImgB.v,S.Smth.v,S.Cntr.v,i]);N.sN(I.buffer,T,0);bh.xe(T,I.buffer,k,p)}if(W=="NtPr")N.I.a0_(h.buffer,t,M,I.buffer,[S.ImgB.v,S.Grns.v,S.Rlf.v,z(k),z(p),i]);
|
|
if(W=="WtrP")N.I.ac$(h.buffer,t,M,I.buffer,[S.FbrL.v,S.Brgh.v,S.Cntr.v,i>>>1]);if(W=="Crql")N.I.alz(h.buffer,t,M,I.buffer,[S.CrcS.v,S.CrcD.v,S.CrcB.v,i]);
|
|
if(W=="Grn")N.I.afv(h.buffer,t,M,I.buffer,[S.Intn.v,bh.WD.indexOf(S.Grnt.v.Grnt),S.Cntr.v,z(k),z(p),i]);
|
|
if(W=="MscT")N.I.a7R(h.buffer,t,M,I.buffer,[S.TlSz.v,S.GrtW.v,S.LghG.v,i]);if(W=="Ptch")N.I.ao4(h.buffer,t,M,I.buffer,[S.SqrS.v,S.Rlf.v,i]);
|
|
if(W=="Phtc"){function c(dV,ds,P,ik){N.tO.vZ(dV,ds,P,ik);for(var Q=0;Q<U;Q++)ds[Q]=Math.max(0,Math.min(255,128+dV[Q]-ds[Q]))}var e=S.Dtl.v,r=S.Drkn.v,B=N.U(U);
|
|
N.Zi(h.buffer,B);var F=N.U(U);c(B,F,P,1);if(e==1){e=2;r=Math.round(r/4)}var v=N.U(U);c(B,v,P,e);for(var Q=0;
|
|
Q<U;Q++)B[Q]=Math.max(0,Math.min(255,255-(F[Q]-v[Q])*r));bh.xe(B,I.buffer,k,p)}if(W=="Spt"||W=="SprS"){var X,V=1,H=1;
|
|
X={s6:Math.floor(t/H),R_:Math.floor(M/H)};X.map=new Float32Array(X.s6*X.R_*2);var o=new N.a.Yl(S.FlRs.v),J=new Float32Array(8192),C=S.SprR.v,Y=C<20?.018*C:.36+(C-20)*.128;
|
|
if(W=="SprS"){Y=.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][C]}for(var Q=0;
|
|
Q<8192;Q++)J[Q]=(-1+2*o.get())*Y*70;for(var K=0;K<M;K++)for(var u=0;u<t;u++){var f=K*t+u<<1;X.map[f]=J[f%7919];
|
|
X.map[f+1]=J[(f+1)%7919]}var l=X.map.slice(0),jk=W=="Spt"?S.Smth.v-1:1;if(W=="Spt"&&jk!=0){bh.ri(X.map,l,t,M,jk);
|
|
bh.s0(l,X.map,t,M,jk)}if(W=="SprS"){var hE=S.StrL.v>>>1,Z=hE==0?2:1;bh.ri(X.map,l,t,M,Z);bh.s0(l,X.map,t,M,Z);
|
|
if(hE!=0){var aQ=bh.JU.indexOf(S.SDir.v.StrD),jC=[1,1,1,0][aQ],eO=[-1,0,1,1][aQ],iU=2*hE+1,gK=1/iU;for(var K=0;
|
|
K<M;K++)for(var u=0;u<t;u++){var f=K*t+u<<1,iM=0,i5=0;for(var Q=0;Q<iU;Q++){var fN=Math.max(0,Math.min(t-1,u-(hE+Q)*jC)),dx=Math.max(0,Math.min(M-1,K-(hE+Q)*eO)),ai=dx*t+fN<<1;
|
|
iM+=X.map[ai];i5+=X.map[ai+1]}l[f]=iM*gK;l[f+1]=i5*gK}X.map=l}}N.C2.hY(h.buffer,I.buffer,t,M,null,X.map,X.s6,X.R_,V)}if(W=="BsRl"||W=="PlsW"||W=="Chrm"){var hO=Date.now(),ff=N.U(U),eP=ff.slice(0);
|
|
N.Zi(h.buffer,ff);var e=S.Dtl.v,a0=S.Smth.v;if(e!=15){N.tO.Gp(ff,eP,P,Math.round((15-e)*.5));N.WQ(eP,ff)}var bM=1.4/t,cV=1.4/M,aX=new Float32Array(U),j8=new Float32Array(U),j3=new Float32Array(I.buffer.buffer);
|
|
for(var K=0;K<M;K++)for(var u=0;u<t;u++){var Q=K*t+u,jC=u==t-1?ff[Q]-ff[Q-1]:ff[Q+1]-ff[Q],eO=K==M-1?ff[Q]-ff[Q-t]:ff[Q+t]-ff[Q],am=u*bM-.7,fG=K*cV-.7;
|
|
aX[Q]=jC==0?am:jC*.4;j8[Q]=eO==0?fG:eO*.4}if(W=="BsRl"){var bw=(2+bh.y2.indexOf(S.LghD.v.LghD))*Math.PI*.25,iM=Math.cos(bw);
|
|
if(Math.abs(iM)<.1)iM=0;iM=Math.sign(iM);var i5=Math.sin(bw);if(Math.abs(i5)<.1)i5=0;i5=Math.sign(i5);
|
|
var fz=1/(iM*iM+i5*i5);for(var K=0;K<M;K++)for(var u=0;u<t;u++){var Q=K*t+u,c6=Math.max(-1,Math.min(1,iM*aX[Q])),hk=Math.max(-1,Math.min(1,i5*j8[Q]));
|
|
eP[Q]=128+127*(c6+hk)*fz}if(a0!=1){N.tO.Gp(eP,ff,P,Math.round((a0-1)*.5));N.WQ(ff,eP)}bh.xe(eP,I.buffer,k,p)}else{if(W=="Chrm")a0=5+a0;
|
|
if(a0>1)bh.Qw(aX,j8,j3,P,a0-1);if(W=="PlsW"){var as=new Uint8Array(aX.buffer);for(var Q=0;Q<U;Q++){var bf=Q<<2,jC=aX[Q],eO=j8[Q],gW=1/(Math.sqrt(1+jC*jC)*Math.sqrt(1+eO*eO)),j1=gW*gW,bZ=j1*j1,j=~~(255*(bZ*bZ*j1));
|
|
as[bf+0]=j;as[bf+1]=j;as[bf+2]=j;as[bf+3]=j}I.buffer.set(h.buffer);N.a.ha("norm",as,P,I.buffer,P,P,S.HghS.v/20)}else if(W=="Chrm"){var iL=I.buffer,jI=t>>>1,e2=M>>>1;
|
|
for(var Q=0;Q<U;Q++){var bf=Q<<2,jC=aX[Q],eO=j8[Q],dV={x:1,y:0,jm:jC};jO.th(dV);var ds={x:0,y:1,jm:eO};
|
|
jO.th(ds);var ij=jO.aj0(dV,ds),dg=1/ij.jm,ej=~~Math.max(0,Math.min(t-1,jI-ij.x*dg*jI)),eH=~~Math.max(0,Math.min(M-1,e2-ij.y*dg*e2)),j=ff[eH*t+ej];
|
|
iL[bf+0]=j;iL[bf+1]=j;iL[bf+2]=j}}}}if(W=="Gls"||W=="OcnR"||W=="Txtz"){var d4=W=="OcnR"?2:bh.e5.indexOf(S.TxtT.v.TxtT),jy=bh.bK(d4),iR=jy[0],ff=jy[1],cD=iR.e,cA=iR.Z,iU=24,fn=0,aJ,bY;
|
|
function d_(hC,ic,bW){return~~(d5*(hC+ic)+8192)&127}var aX=new Float32Array(U),j8=new Float32Array(U),j3=new Float32Array(I.buffer.buffer),d5=W=="OcnR"?1/(1+(S.RplS.v-1)*.1):100/S.Scln.v;
|
|
if(d4==3)d5*=32/22.2;var hO=Date.now(),jl=d5,bM=1.4/t,cV=1.4/M;if(W=="Txtz"){jl*=1/255;iU=256}for(var K=0;
|
|
K<M;K++){var dm=d_(K,P.y,cA),dx=dm+1&127;for(var u=0;u<t;u++){var Q=K*t+u,hK=d_(u,P.x,cD),fN=hK+1&127,jj=0,cf=0,h5=0;
|
|
if(W=="Txtz"){jj=N.V.qz(d5*u,d5*K,ff,128,128);cf=N.V.qz(d5*u,d5*K+1,ff,128,128);h5=N.V.qz(d5*u+1,d5*K,ff,128,128)}else{jj=ff[dm*cD+hK];
|
|
cf=ff[dx*cD+hK];h5=ff[dm*cD+fN]}aX[Q]=Math.max(-iU,Math.min((h5-jj)*jl,iU));j8[Q]=Math.max(-iU,Math.min((cf-jj)*jl,iU))}}if(W=="Txtz")bh.Br(aX,j8,j3,P,6);
|
|
else bh.Qw(aX,j8,j3,P,W=="Txtz"?1:W=="OcnR"?3.5/d5:S.Smth.v);if(W=="Txtz")fn=S.InvT.v?-1:1;else if(W=="Gls"){fn=[1,.4,.5,.5][d4]*(Math.exp(S.Dstr.v*.155)-1);
|
|
if(S.InvT.v)fn=-fn}else{fn=.5*(Math.exp(S.RplM.v*.155)-1)}var iL=I.buffer;if(W=="Txtz"){var bw=(2+bh.y2.indexOf(S.LghD.v.LghD))*Math.PI*.25,iM=Math.cos(bw),i5=Math.sin(bw);
|
|
aJ={x:iM,y:i5,jm:0};jO.th(aJ);bY=S.Rlf.v;bY=bY/4+Math.max(0,(bY-35)*2)}function gO(dV,ds,g4){var ix=N.a.overF(ds,dV,1),hC=(1-g4)*dV+g4*(g4*ds+(1-g4)*ix);
|
|
return hC*255}for(var K=0;K<M;K++)for(var u=0;u<t;u++){var Q=K*t+u,bf=Q<<2,jC=aX[Q],eO=j8[Q],dV={x:1,y:0,jm:jC};
|
|
jO.th(dV);var ds={x:0,y:1,jm:eO};jO.th(ds);var ij=jO.aj0(dV,ds);if(W=="Txtz"){var h6=jO.a3l(ij,aJ)*fn,g4=1,j=1;
|
|
if(h6<0){j=0;h6=-h6}g4=Math.min(1,h6*bY);iL[bf+0]=~~gO(h.buffer[bf]*(1/255),j,g4);iL[bf+1]=~~gO(h.buffer[bf+1]*(1/255),j,g4);
|
|
iL[bf+2]=~~gO(h.buffer[bf+2]*(1/255),j,g4)}else{var dg=fn/ij.jm,ej=~~Math.max(0,Math.min(t-1,u-ij.x*dg)),eH=~~Math.max(0,Math.min(M-1,K-ij.y*dg)),fB=eH*t+ej<<2;
|
|
iL[bf+0]=h.buffer[fB];iL[bf+1]=h.buffer[fB+1];iL[bf+2]=h.buffer[fB+2]}}}if(W=="PntD"){var jm=S.Shrp.v*.4,hh=S.BrsT.v.BrsT,fv={BrSm:[.75],BrsL:[.85],BrDR:[.68],BrsW:[.75],BrbW:[.78],BrSp:[.62]}[hh],ik=Math.round(S.Sz.v*.5);
|
|
N.y5.Ht=fv[0];var gP=N.y5.Hm;N.y5.Tk(h.buffer,I.buffer,t,M,ik,gP,[]);var cU=[-.7,-1,-.7,-1,10,-1,-.7,-1,-.7];
|
|
cU=N.pG.Qi(cU);var dL=I.buffer.slice(0);N.pG.kS(dL,I.buffer,t,M,cU,0);for(var Q=0;Q<h.buffer.length;
|
|
Q++){var es=I.buffer[Q]-dL[Q];I.buffer[Q]=Math.max(0,Math.min(255,dL[Q]+jm*es))}}if(W=="GlwE"){var i6=I.buffer.slice(0);
|
|
N.y5.Ht=.5;var gP=N.y5.Hm;N.y5.Tk(h.buffer,i6,t,M,S.Smth.v>>>1,gP,[]);N.pG.nO(i6,I.buffer,t,M);N.WQ(I.buffer,i6);
|
|
N.uA(i6);N.wM(i6,4278190080,16777215);N.y5.Tk(i6,I.buffer,t,M,S.EdgW.v>>>1,N.y5.JB,[]);var ap=S.EdgB.v/10;
|
|
for(var Q=0;Q<i6.length;Q++){if((Q&3)==3)continue;var ix=I.buffer[Q];I.buffer[Q]=Math.max(0,Math.min(255,ix*ap))}}if(W=="StnG"){N.qx.anb(h.buffer,t,M,I.buffer,S.ClSz.v,[Math.round(k.p),Math.round(k.z),Math.round(k.S)],S.BrdT.v)}if(W=="HlfS"){var hT=S.HlSz.v,bE=hT*2+1,f7=S.Cntr.v,b6=bh.Lc.indexOf(S.ScrT.v.ScrT),U=t*M,bJ=U*4,hu=N.U(U),fa=h.buffer,ci=0,bB=0;
|
|
bh.Xh(fa,hu);var dP=hu.slice(0);N.tO.Wr(dP,hu,P,hT);var aU=Math.PI/bE,hf=new Float64Array(t),iM=new Float64Array(t),hL=new Float64Array(2*t);
|
|
for(var u=0;u<t;u++){var hK=(u-(t>>>1))*aU;hf[u]=hK*hK;iM[u]=Math.cos(hK);var jC=u<<1;hL[jC]=Math.sin(jC*(1/4.5));
|
|
hL[jC+1]=Math.sin((jC+1)*(1/4.5))}for(var K=0;K<M;K++){var dm=(K-(M>>>1))*aU,i5=Math.cos(dm),ia=dm*dm;
|
|
for(var u=0;u<t;u++){var j=i5;if(b6==0){var hm=.5+Math.sqrt(hf[u]+ia)*4.5;j=hL[~~hm]}else if(b6==1){j=iM[u]*i5}var Q=K*t+u,f3=hu[Q]*(.75+.25*j),g4=fa[(Q<<2)+3]*(1/255),j0=Math.max(0,Math.min(255,~~f3));
|
|
ci+=j0*g4,bB+=g4;hu[Q]=j0}}ci/=bB;var he=128+1.26*(ci-128),ap=.08+.25*Math.abs((128-ci)/128),c9=1+ap*f7;
|
|
for(var Q=0;Q<U;Q++){var f3=he+(hu[Q]-he)*c9;hu[Q]=Math.max(0,Math.min(255,~~f3))}if(f7>46)N.round(hu);
|
|
bh.xe(hu,I.buffer,k,p)}for(var Q=0;Q<h.buffer.length;Q+=4)I.buffer[Q+3]=h.buffer[Q+3]};bh.xe=function(W,h,S,k){var p=W.length,I=S.p,q=S.z,P=S.S,t=k.p,M=k.z,U=k.S;
|
|
for(var Q=0;Q<p;Q++){var i=W[Q]*(1/255),z=1-i,D=Q<<2;h[D]=~~(I*z+t*i);h[D+1]=~~(q*z+M*i);h[D+2]=~~(P*z+U*i)}};
|
|
bh.bK=function(W){if(W==6)W=2;var h="blocks canvas frosted tinylens brick burlap".split(" ")[W];if(bh.o_==null)bh.o_=[];
|
|
if(bh.o_[W]==null){var S,k;if(W==2){k=new gj(0,0,128,128);var p=hw.QE("AdNs");p.Mnch.v=!0;p.Dstr.v.Dstr="Gsn";
|
|
p.Nose.v.val=50;var S=N.U(k.n()*4),I=S.slice(0);new Uint32Array(I.buffer).fill(4286611584);hw.K1("AdNs",{buffer:I,rect:k},p,0,0,{buffer:S,rect:k})}else{var q=hI.dB.get("tex/"+h,!0)[0];
|
|
k=q.rc;S=new Uint8Array(q.data)}var P=N.U(k.n());N.sN(S,P,0);bh.o_[W]=[k,P]}return bh.o_[W]};bh.Qw=function(W,h,S,I,q){if(q<=1){q=Math.round(q);
|
|
bh.Br(W,h,S,I,[1,16,4][q]);return}var P=q*.42;if(W){N.tO.Am(W,S,I,P,3);W.set(S)}if(h){N.tO.Am(h,S,I,P,3);
|
|
h.set(S)}};bh.Br=function(W,h,S,I,q){var P=N.pG.Qi([1,2,1,2,q,2,1,2,1]);if(W){S.set(W);N.pG.UJ(W,S,I.e,I.Z,P);
|
|
W.set(S)}if(h){S.set(h);N.pG.UJ(h,S,I.e,I.Z,P);h.set(S)}};bh.DD=function(W){if(W==null)return new eC(0,0);
|
|
var h=0,S=W.GEfs?W.GEfs.v:[{v:W}];for(var Q=0;Q<S.length;Q++){var k=S[Q].v,I=1e4;if(k.GELv&&!k.GELv.v)continue;
|
|
var p=k.GEfk.v.GEft;if(p=="GlwE"||p=="Phtc"||p=="BsRl"||p=="PlsW"||p=="Chrm"||p=="Gls"||p=="OcnR")I=0;
|
|
h=Math.max(h,I)}return new eC(h,h)};bh.Hz=function(W){var h=[0,0,0,0,0,0,0,0,0,0,0,0,0],S=[0,.6,.7,.8,1,1.2,1.4,1.6,1.8,2,2.2,2.6,3,4,5][W];
|
|
for(var Q=0;Q<13;Q++){var k=Q-6;h[Q]=1/(S*Math.sqrt(2*Math.PI))*Math.exp(-.5*(k/S)*(k/S))}return h};
|
|
bh.ri=function(W,h,S,k,p){var I=bh.Hz(p),q=6,P=13;for(var t=0;t<k;t++)for(var M=0;M<S;M++){var U=t*S+M<<1,i=0,z=0;
|
|
for(var Q=0;Q<P;Q++){var D=M+Q-q,R=D<0?0:D>=S?S-1:D,O=(t*S+R)*2,b=I[Q];i+=b*W[O];z+=b*W[O+1]}h[U]=i;
|
|
h[U+1]=z}};bh.s0=function(W,h,S,k,p){var I=bh.Hz(p),q=6,P=13;for(var t=0;t<k;t++)for(var M=0;M<S;M++){var U=t*S+M<<1,i=0,z=0;
|
|
for(var Q=0;Q<P;Q++){var D=t+Q-q,R=D<0?0:D>=k?k-1:D,O=(R*S+M)*2,b=I[Q];i+=b*W[O];z+=b*W[O+1]}h[U]=i;
|
|
h[U+1]=z}};function hd(){}hd.Yu=[2,5,5,7,4,4];hd.wl="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(",");
|
|
hd.iR="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(" ");
|
|
hd.h3=[[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]];
|
|
hd.BX=["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"];
|
|
hd.Gl=function(W){if(W=="passThrough")return"pass";return hd.wl[hd.iR.indexOf(W)]};hd.iN=function(W){if(W=="pass")return"passThrough";
|
|
return hd.iR[hd.wl.indexOf(W)]};hd.getName=function(W){return hd.h3[hd.wl.indexOf(W)]};function $(){this.rect=null;
|
|
this.buffer=null;this.oO="norm";this.opacity=255;this.Vy=!1;this.S5=0;this.RL=0;this.i2=!0;this.z3=[];
|
|
for(var Q=0;Q<10;Q++)this.z3.push(0,0,255,255);this.name=null;this.add={};this.Z0=null;this.aj=null;
|
|
this.v=null;this.Yf=null;this.ap$=30;this.Pd=$._V();this.a9W=$._V();this.akX=$._V();this.agG=$._V();
|
|
this.Yi=0;this.AY=!1;this.eB=null;this.zy=new $.ZK}$._V=function(){var W=document.createElement("canvas");
|
|
W.width=W.height=30;return W.getContext("2d")};$.ZK=function(){this.jM=!0;this.$S=!0;this.nN=N.U(0);
|
|
this.aut=N.U(0);this.V4=null;this.J5={};this.ah5=null;this.S$=null;this.O5=null;this.VW=null;this.kM=null;
|
|
this.k5=null;this._Z=null;this.da=null;this.o$=null;this.ck=null;this.ss=null;this.lo=null;this.Kw=!1};
|
|
$.ZK.prototype._w=function(){this.jM=!1;this.$S=!1;this.V4=null;this.Kw=n.O9};$.ZK.prototype.acG=function(){jO.a4b(this.J5);
|
|
this.nN=N.U(0);this.aut=N.U(0);if(this.VW)this.VW.delete();if(this.kM)this.kM.delete();this.VW=null;
|
|
this.kM=null;var W=[this.k5,this._Z,this.da,this.o$,this.ck,this.ss];for(var Q=0;Q<6;Q++)if(W[Q]!=null&&W[Q]instanceof n.qr)W[Q].delete();
|
|
this.k5=null;this._Z=null;this.da=null;this.o$=null;this.ck=null;this.ss=null};$.prototype.G=function(W){if(W==null)W=this.rect.clone();
|
|
if(this.zy.V4==null)this.zy.V4=W;else this.zy.V4=this.zy.V4.r8(W)};$.prototype.vc=function(){return this.add.lsct==i1.wY||this.add.lsct==i1.O_};
|
|
$.prototype.rG=function(){var W=this.add;return W.SoCo!=null||W.GdFl!=null||W.PtFl!=null};$.prototype.Kl=function(){var W=this.add.lmfx;
|
|
if(W==null)return;var h=["GrFl","patternFill"];for(var Q=0;Q<h.length;Q++){var S=hz.BN[hz.order.indexOf(h[Q])],k=W[S].v;
|
|
if(k.length==0)continue;for(var p=0;p<k.length;p++){var I=k[p].v;if(I.enab.v&&(I.Algn==null||!I.Algn.v))this.zy.$S=!0}}};
|
|
$.prototype.xH=function(){var W=this.v;if(this.rG())W=this.kX();if(!n.O9)return W.Ji();if(this.zy.kM==null||this.zy.jM||n.O9!=this.zy.Kw){if(this.zy.kM)this.zy.kM.delete();
|
|
this.zy.kM=new n.bG(W.wT().e,W.wT().Z);this.zy.kM.set(W.Ji())}return this.zy.kM};$.prototype.j4=function(W){var h=this.rect,S=this.buffer;
|
|
if(!n.O9){var k=this.oc(W,S,h);if(k){S=k.vM;h=k.rect}return S}if(this.zy.V4!=null||n.O9!=this.zy.Kw){var k=this.oc(W,S,h);
|
|
if(k){S=k.vM;h=k.rect}var p=h;if(n.O9!=this.zy.Kw||this.zy.VW==null||this.zy.VW.e!=p.e||this.zy.VW.Z!=p.Z){if(this.zy.VW)this.zy.VW.delete();
|
|
this.zy.VW=new n.qr(p.e,p.Z);this.zy.VW.set(S)}else{var I=this.zy.V4.clone();I.offset(-h.x,-h.y);this.zy.VW.set(S,I)}}return this.zy.VW};
|
|
$.prototype.vK=function(){var W=this.v;if(this.rG())W=this.kX();return W!=null&&W.isEnabled&&(!W.rect.ZP()||W.iZ()!=255)};
|
|
$.prototype.oc=function(W,h,S){if(this.rB()){var k=this.$U(W);if(k.v&&k.v.isEnabled&&(!k.v.rect.ZP()||k.v.color==0)){var p=this.add.SoLd.filterFX.v;
|
|
k.v.T4=p.filterMaskDensity?p.filterMaskDensity.v:255;k.v.JJ=p.filterMaskFeather?p.filterMaskFeather.v:0;
|
|
var I=k.buffer,q=k.rect;if(q.n()<S.n()){q=S;I=N.U(q.n()*4);N.zt(k.buffer,k.rect,I,q)}var P=k.v.gB(S);
|
|
N.uA(P);h=h.slice(0);N.a.HH(I,q,h,S,P,S,0,S,1);return{vM:h,rect:S}}}};$.prototype.a4P=function(){var W={QM:!1,Gn:!1,uw:0,Vh:0};
|
|
if(this.add.vmsk&&this.add.vmsk.isEnabled)W.Gn=!0;if(this.kX()&&this.kX().isEnabled)W.QM=!0;if(W.QM&&W.Gn){W.uw=this.kX().rect.x-this.add.vmsk.kX().rect.x;
|
|
W.Vh=this.kX().rect.y-this.add.vmsk.kX().rect.y}return W};$.prototype.r9=function(W){if(this.add.lsct==i1.aW)return;
|
|
var h=this,S=this.kX()!=null&&this.kX().VT,k=this.add.vmsk!=null&&this.add.vmsk.VT,p=this.a4P(),I=JSON.stringify(p)!=this.zy.ah5||p.QM&&S||p.Gn&&k;
|
|
if(I){if(p.Gn){var q=this.add.vmsk.kX();if(p.QM){this.v=this.kX().iq(q);this.zy.S$=new eC(this.v.rect.x-this.kX().rect.x,this.v.rect.y-this.kX().rect.y)}else this.v=q}if(this.v)this.zy.jM=!0;
|
|
if(this.v)this.zy.O5=new eC(this.rect.x-this.v.rect.x,this.rect.y-this.v.rect.y);if(p.QM)this.kX().VT=!1;
|
|
if(p.Gn)this.add.vmsk.VT=!1;this.G()}else{if(p.QM&&p.Gn){this.v.rect.x=this.kX().rect.x+this.zy.S$.x;
|
|
this.v.rect.y=this.kX().rect.y+this.zy.S$.y}}if(h.rG()){this.jh(W)}if(h.p2()){var P;if(this.v)P=new eC(this.rect.x-this.v.rect.x,this.rect.y-this.v.rect.y);
|
|
if(this.v&&this.v.isEnabled&&(this.zy.O5==null||!P.xX(this.zy.O5))){this.zy.O5=P;this.G();this.zy.jM=!0}}if(bS.get(h.add)!=null)this.zy.jM=!0;
|
|
this.zy.ah5=JSON.stringify(p)};$.prototype.jh=function(W){var h=this,S=h.add.vstk,k=new gj(0,0,W.e,W.Z),p,I=h.add.vmsk?this.add.vmsk.kX():null,t=!0;
|
|
if(I&&I.isEnabled&&I.iZ()==0)p=I.wT().clone();else p=k;var q=h.kX();if(q&&q.isEnabled&&q.iZ()==0)p=p.r$(h.v.wT());
|
|
var P=I&&S;if(S&&(!S.strokeEnabled.v||S.strokeStyleLineWidth.v.val==0))P=!1;if(S&&!S.fillEnabled.v&&P)t=!1;
|
|
var M=N.U(p.n()*4);if(t){if(h.add.SoCo)jO.DS(M,h.add.SoCo.Clr.v);if(h.add.GdFl){var U=I&&I.color==0?N.$.E6(h.add.vmsk.T,null,!0):null;
|
|
jO.A2(h.add.GdFl,M,p,W,null,U)}if(h.add.PtFl)jO.AQ(h.add.PtFl,M,p,W.add.Patt,h.add.fxrp)}if(I){var i=I.T4;
|
|
if(P)I.T4=255;var z=N.U(p.n());if(I.iZ()!=0)z.fill(Math.round(I.iZ()));if(I&&I.isEnabled){var D=I.wT(),R=I.Ji();
|
|
if(D.xX(p))N.WQ(R,z);else N.vG(R,D,z,p)}if(h.add.SoCo&&t){N.ce(z,M,3)}else N.XY(z,p,M,p);if(P)I.T4=i}h.buffer=M;
|
|
h.rect=p;if(P){var O=hz.EJ.tZ.indexOf(S.strokeStyleLineAlignment.v.strokeStyleLineAlignment),b=S.strokeStyleContent.v,w=hz.EJ.Dn.indexOf(b.classID),A=this.add.vmsk.kX(S);
|
|
if(h.rect.xX(k))h.rect=h.rect;else if(O!=0){var g=h.rect.r8(A.wT()),E=N.U(g.n()*4);N.zt(h.buffer,h.rect,E,g);
|
|
h.buffer=E;h.rect=g}var i=A.T4;A.T4=255;var j=A.gB(h.rect);A.T4=i;if(A.color==255)N.uA(j);var x=N.U(h.rect.n()*4);
|
|
if(w==0)jO.DS(x,b.Clr.v);if(w==1)jO.A2(b,x,h.rect,W,null,I.color==0?I.rect:null);if(w==2)jO.AQ(b,x,h.rect,W.add.Patt,h.add.fxrp);
|
|
var d=S.strokeStyleOpacity.v.val/100;if(d!=1)N.G$(j,d);if(A.color==255)O=2-O;if(O<2){N.a.HH(x,h.rect,h.buffer,h.rect,j,h.rect,255,h.rect,1,!1);
|
|
if(O==0)N.vJ(z,h.buffer)}if(O==2){N.vJ(j,x);N.uA(z);N.a.HH(x,h.rect,h.buffer,h.rect,z,p,255,h.rect,1,!1);
|
|
N.uA(z)}if(A.T4!=255){var L=x.slice(0);N.wM(L,4278190080,16777215);N.a.ha("norm",L,h.rect,h.buffer,h.rect,h.rect,1-A.T4/255)}i=I.T4;
|
|
I.T4=255;this.aut=I.gB(h.rect);I.T4=i}this.G()};$.prototype.KF=function(W,h){var S=this,k=S.add.SoLd.Idnt.v,p=S.add.SoLd,I=N.H.TA(a.Q.Pw(p.nonAffineTransform)),q=W.GT(k,p.Crop?p.Crop.v:null,[I.e,I.Z],p.Impr.v.classID);
|
|
if(q==null)return;var P=q.xJ;p.Sz.v.Wdth.v=P[1].e;p.Sz.v.Hght.v=P[1].Z;var t=p.warp.v,M=a.Q.Pw(p.nonAffineTransform),U=N.V.ew(M,P[1]);
|
|
if(t&&!N.DU.xv(t)){var I=N.H.TA(N.DU.zL(t)),i=I.x,z=I.y,D=1/I.e,R=1/I.Z;U=N.V.ew(M);U=N.V.iq(U,[D,0,-i*D,0,R,-z*R,0,0])}var O=a.Q.us(P,h?0:1,U,t,null,null,null,h);
|
|
if(O==null){S.buffer=N.U();S.rect=new gj}else if(S.rB()){var b=S.$U(W);b.buffer=O.buffer;b.rect=O.rect.clone();
|
|
this.k0(W,h)}else{S.buffer=O.buffer;S.rect=O.rect}S.r9(W);S.G();W.G()};$.prototype.k0=function(W,h){if(h==null)h=!1;
|
|
var S=this.$U(W),k=this.add.SoLd.filterFX.v,p=hw.a7p(k),I=new gj(0,0,W.e,W.Z),q=S.rect.r8(I),P=S.rect.clone();
|
|
P.x1(p.x,p.y);var t={buffer:null,rect:q.r$(P)};t.buffer=N.U(t.rect.n()*4);N.zt(S.buffer,S.rect,t.buffer,t.rect);
|
|
if(k.enab.v&&h==!1){var M=k.filterFXList.v;for(var Q=0;Q<M.length;Q++){var U=M[Q].v;if(U.enab.v==!1)continue;
|
|
var i=U.blendOptions.v,z=hd.Gl(i.Md.v.BlnM),D=i.Opct.v.val/100,R=N.X.iZ(U.FrgC.v),O=N.X.iZ(U.BckC.v),b=hw.BT(U),w={buffer:N.U(t.buffer.length),rect:t.rect.clone()},A=U.Fltr?U.Fltr.v:null;
|
|
if(bS.wb[b]!=null){var g=bS.wb[b],E=bS.wz(g,A);if(E)bS.K1(E,t.buffer,w.buffer,t.rect)}else hw.K1(b,t,A,R,O,w,[W.add.lnk2?W.add.lnk2:[],this.kX(),W.BS]);
|
|
if(z=="norm"&&D==1)t=w;else if(z=="norm"){N.a.HH(w.buffer,w.rect,t.buffer,t.rect,null,null,null,t.rect,D)}else{N.a.ha(z,w.buffer,w.rect,t.buffer,t.rect,t.rect,D)}}}this.rect=t.rect;
|
|
this.buffer=t.buffer;this.Yn();this.G();W.G()};$.prototype.dy=function(W,h,S){this.eB=this.Rf(W,h,S)};
|
|
$.prototype.if=function(W,h){var S=this.Rf(W,h,!0);if(S==null)return null;var k={_N:S.Yi,zz:S.Fm,rect:S.lk};
|
|
if(k._N==1||k._N==3){var p=k.rect,I=N.U(p.e*p.Z*4);N.ce(k.zz,I,0);N.ce(k.zz,I,1);N.ce(k.zz,I,2);N.ul(W.q.channel,W.q.rect,I,p);
|
|
k.zz=I}return k};$.prototype.Rf=function(W,h,S){var k,p,I,q,P,t,M;if(this.Yi<=0){var U=N.U(this.rect.n());
|
|
N.sN(this.buffer,U,3);k=N.kn.b0(h,{channel:U,rect:this.rect},3);if(k==null)return null;var i=N.oA(k.channel,k.rect);
|
|
q=k.rect.clone();P=this.rect.clone();p=N.U(q.n()*4);N.zt(this.buffer,P,p,q);N.ce(k.channel,p,3);I=this.buffer.slice(0);
|
|
if(!S){var z=h.channel.slice(0);N.uA(z);N.XY(z,h.rect,I,P)}t=this.buffer.slice(0);M=this.rect.clone()}if(this.Yi==1||this.Yi==3){var D=this.Yi==1?this.kX():this.$U(W).v;
|
|
q=h.rect.clone();P=D.rect.clone();p=D.tu(q);var I=D.channel.slice(0);if(!S)N.a.Dc(D.color==255?N.J4(q.n()):N.$o(q.n()),q,I,P,h.channel,q,1);
|
|
t=D.channel.slice(0);M=D.rect.clone()}return{Yi:this.Yi,Fm:p,lk:q,zq:I,_C:P,eG:t,ov:M}};$.prototype.vf=function(W,h){var S=this.eB;
|
|
if(S.Yi==0){this.rect=S.ov;this.buffer=S.eG;this.G()}if(S.Yi==1||S.Yi==3){var k=S.Yi==1?this.kX():this.$U(W).v;
|
|
k.channel=S.eG;k.rect=S.ov;if(this.Yi==1){k.VT=!0;this.r9(W)}if(this.Yi==3)this.G()}this.eB=h};$.prototype.xw=function(W,h){if(this.Yi<=0&&h.rect.xX(this.rect)){var S=N.U(this.rect.n());
|
|
N.sN(this.buffer,S,3);if(N.xX(W.q.channel,S)){var k=this.rect,p=this.buffer;this.eB={Yi:this.Yi,Fm:p.slice(0),lk:k.clone(),zq:N.U(0),_C:new gj,eG:N.U(0),ov:new gj};
|
|
return!0}}var I=this.eB;if(I==null)return!1;if(I.Yi!=this.Yi)return!1;if(!h.rect.xX(I.lk))return!1;var q=I._C.r8(I.lk);
|
|
if(I.Yi<=0){if(!q.xX(this.rect))return!1;var P=N.U(I.Fm.length>>2);N.sN(I.Fm,P,3);if(!N.xX(h.channel,P))return!1;
|
|
var t=N.U(q.e*q.Z*4);N.zt(I.zq,I._C,t,q);N.a.ha("norm",I.Fm,I.lk,t,q,q,1);return N.xX(t,this.buffer)}if(I.Yi==1||I.Yi==3){var M=I.Yi==1?this.kX():this.$U(W).v;
|
|
if(!q.xX(M.rect))return!1;var U=N.U(q.n());U.fill(M.color);N.vG(I.zq,I._C,U,q);N.a.Dc(I.Fm,I.lk,U,q,h.channel,q,1);
|
|
return N.xX(U,M.channel)}};$.prototype.RD=function(W,h,S,k){var p=this.eB;p.lk.offset(h,S);var I=p._C.r8(p.lk);
|
|
if(p.Yi<=0){var q=N.U(I.n()*4);N.zt(p.zq,p._C,q,I);N.a.ha("norm",p.Fm,p.lk,q,I,I,1);this.buffer=q;this.rect=I;
|
|
this.G()}else{var P=this.Yi==1?this.kX():this.$U(W).v,t=N.U(I.n());t.fill(P.color);N.vG(p.zq,p._C,t,I);
|
|
N.a.Dc(p.Fm,p.lk,t,I,k.channel,I,1);P.channel=t;P.rect=I.clone();if(this.Yi==1){P.VT=!0;this.r9(W)}if(this.Yi==3)this.G()}};
|
|
$.prototype.fA=function(){var W=[-1,0,1,2];if(this.v)W.push(-2);if(this.Yf)W.push(-3);return W};$.prototype.getName=function(){return this.add.luni?this.add.luni:this.name};
|
|
$.prototype.hq=function(g8){this.add.luni=this.name=g8};$.prototype.h1=function(W){var h=this.add.lnsr,S=this.add.TySh;
|
|
if(h=="rend"&&S)this.hq(gf.x5(S.MW).replace(/(?:\r\n|\r|\n)/g," ").slice(0,32))};$.prototype.jP=function(){return(this.S5&1<<1)==0};
|
|
$.prototype.p2=function(){return(this.S5&1<<4)==0};$.prototype.t0=function(){return(this.S5&1<<5)!=0};
|
|
$.prototype.a3Z=function(){var W=this;if(W.add.lnsr!="bgnd"){W.add.lnsr="bgnd";W.hq("Background");W.add.lspf=1<<2}};
|
|
$.prototype.a3H=function(){var W=this;if(W.add.lnsr=="bgnd"){delete W.add.lnsr;W.hq("Layer 0");W.add.lspf=0}};
|
|
$.prototype.Ox=function(W){var h=this.add.lspf;return h==null?!1:(h>>W&1)!=0};$.prototype.NN=function(W){if(W&&!this.jP())this.S5-=2;
|
|
if(!W&&this.jP())this.S5+=2};$.prototype.a9=function(){var W=this.add.lmfx;if(W==null)return!1;for(var h in W){if(h=="masterFXSwitch")continue;
|
|
if(h=="Scl")continue;if(h=="classID")continue;if(W[h].v.length>0)return!0}return!1};$.prototype.rB=function(){return this.add.SoLd!=null&&this.add.SoLd.filterFX!=null};
|
|
$.prototype.bg=function(){var W=this.add.lmfx;if(W==null)return!1;if(!W.masterFXSwitch.v)return!1;for(var h in W){if(h=="masterFXSwitch")continue;
|
|
if(h=="Scl")continue;if(h=="classID")continue;var S=W[h].v;for(var Q=0;Q<S.length;Q++)if(S[Q].v.enab.v)return!0}return!1};
|
|
$.prototype.LO=function(W,h,S,k,p){var I=new gj,q=this.B8(W,S,k);if(q.indexOf(0)!=-1)I=I.r8(this.rect);
|
|
if(q.indexOf(1)!=-1){var P=this.kX(),t=P.wT();I=S&&P.iZ()==0?I.ZP()?t:I.r$(t):I.r8(t)}if(q.indexOf(2)!=-1){var M=this.add.vmsk,U=this.add.vstk,i;
|
|
if(h){if(M.OU.length>1){var z=N.$.kY(M.T,null,M.OU);i=N.H.TA(z)}else i=N.$.E6(M.T,M.w.length!=0?M.w:null)}else i=N.$.E6(M.T);
|
|
if(!p&&U&&U.strokeEnabled.v){var D=U.strokeStyleLineAlignment.v.strokeStyleLineAlignment,R=U.strokeStyleLineJoinType.v.strokeStyleLineJoinType;
|
|
if(D!="strokeStyleAlignInside"){var O=U.strokeStyleLineWidth.v.val;if(R=="strokeStyleMiterJoin")i=new gj(0,0,W.e,W.Z);
|
|
else i.x1(O,O)}}I=I.r8(i)}if(q.indexOf(3)!=-1)I=I.r8(this.$U(W).v.wT());if(q.length==0&&this.rG())I=p?new gj(0,0,0,0):new gj(0,0,W.e,W.Z);
|
|
return I};$.prototype.Rj=function(){var W=this.add.artb,h=W.artboardBackgroundType.v,S=0;if(h==1)S=4294967295;
|
|
else if(h==2)S=4278190080;else if(h==3)S=0;else if(h==4){S=W.Clr.v;S=255<<24|S.Bl.v<<16|S.Grn.v<<8|S.Rd.v}else throw h;
|
|
return S};$.prototype.rp=function(){var W=this.add.artb.artboardRect.v,h=W.Btom.v,S=W.Left.v,k=W.Rght.v,top=W.Top.v;
|
|
return new gj(S,top,k-S,h-top)};$.prototype.Si=function(W){var h=$._R(W);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=h};$._R=function(W){var h={classID:"classFloatRect",Top:{t:"doub",v:0},Left:{t:"doub",v:0},Btom:{t:"doub",v:0},Rght:{t:"doub",v:0}};
|
|
h.Btom.v=W.y+W.Z;h.Left.v=W.x;h.Rght.v=W.x+W.e;h.Top.v=W.y;return h};$.prototype.B8=function(W,h,S){var k=[],p=this,I=this.AY;
|
|
if(!h&&p.AY&&S){k.push(2)}else if(p.Yi<=0||h){if(p.p2())if(!this.rect.ZP())k.push(0);if(p.kX()&&!p.kX().rect.ZP())if(p.kX().ln||h)k.push(1);
|
|
if(p.add.vmsk)if(p.add.vmsk.ln||h)k.push(2);if(p.rB()&&p.$U(W).v&&!p.$U(W).v.rect.ZP())k.push(3)}else if(p.Yi==1){k.push(1);
|
|
if(p.kX().ln&&!p.kX().rect.ZP()){if(p.p2())if(!this.rect.ZP())k.push(0);if(p.add.vmsk)if(p.add.vmsk.ln)k.push(2)}}else if(p.Yi==3&&!p.$U(W).v.rect.ZP())k.push(3);
|
|
if(p.add.artb&&k.indexOf(0)==-1)k.push(0);k.sort();return k};$.prototype.kX=function(){var W=this;return W.Yf?W.Yf:W.add.vmsk&&W.add.vmsk.isEnabled?null:W.v};
|
|
$.prototype.$U=function(W){var h=this.add.SoLd.placed.v,S=W.add.FEid;if(S==null)return null;for(var Q=0;
|
|
Q<S.length;Q++)if(S[Q].id==h)return S[Q];return null};$.prototype.extend=function(W){N.a7a(this,W)};
|
|
$.prototype.Cq=function(W,h,S){var k=W.clone();if(this.bg()){var p=this.add.lmfx,I=h.root.rk(h.g.indexOf(this)),q=p.gradientFillMulti.v,P=!1;
|
|
for(var Q=0;Q<q.length;Q++)if(q[Q].v.enab.v&&q[Q].v.Algn.v)P=!0;if(P)k=k.r8(I.wT(h,!1));var t=jO.a2n(this.add.lmfx,h,S);
|
|
k.offset(t.x,t.y);k.e+=t.e;k.Z+=t.Z}return k};$.prototype.Yn=function(){if(this.p2())N.jo(this);var W=this.kX();
|
|
if(W)W.Yn()};$.prototype.clone=function(){var W=new $;W.rect=this.rect.clone();W.buffer=this.buffer.slice(0);
|
|
W.oO=this.oO;W.opacity=this.opacity;W.Vy=this.Vy;W.S5=this.S5;W.name=this.name;W.z3=this.z3.slice(0);
|
|
if(this.v)W.v=this.v.clone();if(this.Yf)W.Yf=this.Yf.clone();for(var h in this.add)W.add[h]=j6.clone(h,this.add[h]);
|
|
return W};$.prototype.DF=function(W){var h=this;if(h.add.TySh)delete h.add.TySh;if(h.add.SoLd){var S=this.oc(W,this.buffer,this.rect);
|
|
if(S){this.buffer=S.vM;this.rect=S.rect;this.G()}delete h.add.SoLd}if(h.add.SoCo||h.add.GdFl||h.add.PtFl){if(h.add.vogk)delete h.add.vogk;
|
|
if(h.add.SoCo)delete h.add.SoCo;if(h.add.GdFl)delete h.add.GdFl;if(h.add.PtFl)delete h.add.PtFl;if(h.add.vmsk){console.log(h.Yf,h.v);
|
|
delete h.add.vmsk;if(h.Yf==null&&h.v)delete h.v;else if(h.Yf!=null&&h.v!=null){h.v=h.Yf;delete h.Yf}}}if(!h.vc()&&bS.get(h.add)==null&&!this.p2())this.S5-=16};
|
|
$.prototype.iK=function(W){var h=255,S=0;if(W==2){var k=this.add.SoLd.filterFX.v;if(k.filterMaskDensity)h=k.filterMaskDensity.v;
|
|
if(k.filterMaskFeather)S=k.filterMaskFeather.v}else{var p=W==0?this.kX():this.add.vmsk;h=p.T4;S=p.JJ}return{dw:W,uX:h,ib:S}};
|
|
$.prototype.ly=function(W){if(W.dw==2){var h=this.add.SoLd.filterFX.v;if(W.uX==255)delete h.filterMaskDensity;
|
|
else h.filterMaskDensity={t:"long",v:W.uX};if(W.ib==0)delete h.filterMaskFeather;else h.filterMaskFeather={t:"doub",v:W.ib};
|
|
this.G()}else{var S=W.dw==0?this.kX():this.add.vmsk;S.T4=W.uX;S.JJ=W.ib;S.VT=!0}};$.prototype.lq=function(){var W=this,h=W.add.vmsk;
|
|
if(h==null)return;W.add.vogk=$.lq(h.T)};$.lq=function(W){var h=[],S=N.$.z2(W);for(var k=0;k<S;k++)h.push(N.uy.$o());
|
|
return h};var i1={LC:0,wY:1,O_:2,aW:3};$.Kt=function(){this.name="Mask";this.oz=!1;this.tg={p:255,z:0,S:0};
|
|
this.uJ=50;this.ez=0;this.color=255;this.ln=!0;this.isEnabled=!0;this.Rq=!1;this.T4=255;this.JJ=0;this.rect=new gj;
|
|
this.channel=N.U(0);this.eb=null;this.agp=null;this.VT=!0};$.Kt.prototype.iq=function(W){if(!this.isEnabled)return W;
|
|
var h=new $.Kt;h.color=Math.round(this.iZ()*W.iZ()/255);if(this.iZ()==0&&W.iZ()==0)h.rect=this.wT().r$(W.wT());
|
|
else if(W.iZ()==0)h.rect=W.wT().clone();else if(this.iZ()==0)h.rect=this.wT().clone();else h.rect=this.wT().r8(W.wT());
|
|
h.channel=this.gB(h.rect);h.T4=255;h.JJ=0;var S=W.gB(h.rect);N.adx(S,h.rect,h.channel,h.rect);return h};
|
|
$.Kt.prototype.wT=function(){if(this.JJ==0)return this.rect;var W=Math.ceil(this.JJ*2.2),h=this.rect.clone();
|
|
if(h.y==0){if(h.x==0)h.e+=W;else h.x1(W,0);h.Z+=W}else h.x1(W,W);return h};$.Kt.prototype.Ji=function(){if(this.JJ==0&&this.T4==255)return this.channel;
|
|
if(this.JJ==0){var W=this.channel.slice(0);N.uA(W);N.G$(W,this.T4/255);N.uA(W);return W}var h=this.wT(),S=this.tu(h),W=N.U(h.n());
|
|
N.tO.Gp(S,W,h,this.JJ);if(this.T4!=255){N.uA(W);N.G$(W,this.T4/255);N.uA(W)}return W};$.Kt.prototype.iZ=function(){return Math.round(255-(255-this.color)*(this.T4/255))};
|
|
$.Kt.prototype.extend=function(W){N.extend(this,W,this.color)};$.Kt.prototype.Yn=function(){if(this.color==255)N.uA(this.channel);
|
|
N.Yn(this);if(this.color==255)N.uA(this.channel)};$.Kt.prototype.clone=function(){var W=new $.Kt;W.name=this.name;
|
|
W.oz=this.oz;W.tg=this.tg;W.uJ=this.uJ;W.ez=this.ez;W.color=this.color;W.ln=this.ln;W.isEnabled=this.isEnabled;
|
|
W.Rq=this.Rq;W.T4=this.T4;W.JJ=this.JJ;W.rect=this.rect.clone();W.channel=this.channel.slice(0);return W};
|
|
$.Kt.prototype.tu=function(W,h){if(h==null)h=N.U(W.n());h.fill(this.color);N.vG(this.channel,this.rect,h,W);
|
|
return h};$.Kt.prototype.gB=function(W,h){var S=this.wT(),k=this.Ji();if(h==null)h=N.U(W.n());h.fill(this.iZ());
|
|
N.vG(k,S,h,W);return h};$.CP=function(){this.ln=!0;this.isEnabled=!0;this.T4=255;this.JJ=0;this.T=[{type:6},{type:8,all:0}];
|
|
this.Nk=[-3,-3];this.D8=!1;this.Yf=null;this.VT=!0;this.w=[];this.OU=[]};$.CP.prototype.offset=function(W,h){this.Yf=this.kX();
|
|
N.$.ac(this.T,new ex(1,0,0,1,W,h));this.Yf.rect.offset(W,h)};$.CP.prototype.kX=function(W){if(!this.VT&&this.Yf&&W==null){this.Yf.isEnabled=this.isEnabled;
|
|
return this.Yf}var h=N.$.E6(this.T),S="strokeStyleLineAlignment",k="strokeStyleLineJoinType";if(h.n()>3e4*3e4)h=new gj(0,0,100,100);
|
|
if(W&&W[S].v[S]!="strokeStyleAlignInside"){var p=1;if(W[k].v[k]=="strokeStyleMiterJoin"){var I=N.$.ae0(this.T),q=I/2,P=Math.sin(q),t=Math.cos(q);
|
|
t/=P;P=1;var p=Math.sqrt(t*t+P*P);if(isNaN(p)||p<1)p=1}p*=W[S].v[S]=="strokeStyleAlignOutside"?1:.5;
|
|
var M=Math.ceil(W.strokeStyleLineWidth.v.val*p);M=Math.min(M,600);h.x1(M,M)}h=N.H.No(h);var U=new $.Kt;
|
|
U.color=N.$.MB(this.T)?0:255;U.ln=this.ln;U.isEnabled=this.isEnabled;U.Rq=!0;U.rect=h;U.T4=this.T4;U.JJ=this.JJ;
|
|
U.channel=N.U(U.rect.n());if(!h.ZP())N.$.al$(this.T,U.channel,U.rect,W);if(W==null){this.Yf=U;this.VT=!1}return U};
|
|
$.CP.prototype.clone=function(){var W=new $.CP;W.ln=this.ln;W.isEnabled=this.isEnabled;W.T4=this.T4;
|
|
W.JJ=this.JJ;W.T=$.CP.uW(this.T);W.Nk=this.Nk.slice(0);W.D8=this.D8;W.w=this.w.slice(0);W.OU=this.OU.slice(0);
|
|
return W};$.CP.prototype.concat=function(W){var h=W.T.slice(2);if(h.length==0)return;h[0].VZ=3;this.T=this.T.concat(h)};
|
|
$.CP.uW=function(W){var h=[];for(var Q=0;Q<W.length;Q++){var S=W[Q];if(S.type>5||S.type==0||S.type==3)h.push(JSON.parse(JSON.stringify(S)));
|
|
else h.push({type:S.type,bq:S.bq.clone(),M:S.M.clone(),tk:S.tk.clone()})}return h};$.CP.aq7=function(W,h,S){if(W.length!=h.length)return!1;
|
|
for(var Q=2;Q<W.length;Q++){var k=W[Q],p=h[Q];if(k.type!=p.type)return!1;if(k.type==0||k.type==3){if(k.length!=p.length||!S&&k.VZ!=p.VZ)return!1}else if(!k.bq.xX(p.bq)||!k.M.xX(p.M)||!k.tk.xX(p.tk))return!1}return!0};
|
|
$.CP.prototype.a4a=function(){var W=this.T;for(var Q=3;Q<W.length;Q++)if(W[Q].type==0||W[Q].type==3)W[Q].VZ=-1};
|
|
$.Q1=function(){this.type=null;this.l_=2;this.SI=null;this.Is="";this.eY="";this.XS="";this.open=0;this.raw=null;
|
|
this.xJ=null;this.a0j=""};$.Q1.prototype.clone=function(){var W=new $.Q1;W.type=this.type;W.l_=this.l_;
|
|
W.SI=this.SI;W.Is=this.Is;W.eY=this.eY;W.XS=this.XS;W.open=this.open;W.raw=new Uint8Array(this.raw.buffer.slice(0));
|
|
return W};$.Q1.prototype.jc=function(W,h,S){if(S==null)S="none";var k=this,p=hI._e(k.raw.buffer),I=p=="svg"||p=="pdf";
|
|
if(k.xJ){var q=h&&I&&Math.max(k.xJ[1].e,k.xJ[1].Z)<Math.max(h[0],h[1]);if(!q&&S==this.a0j)return}this.a0j=S;
|
|
if(!I)W=0;if(p==null){alert("Unsupported format: "+G.dP(k.raw,0,4));return null}var P=hI.J$(p);if(P.gJ){var t=new jg(name+(p=="psd"?"":"-"+p)+".psd"),M;
|
|
P.uc(k.raw.buffer,t,h);var U=new gj(0,0,t.e,t.Z);if("avrg maxx medn minn rang stdv summ vari".split(" ").indexOf(S)!=-1){var i=[];
|
|
for(var Q=0;Q<t.g.length;Q++){var z=t.g[Q],D=z.buffer;if(!z.rect.xX(U)){D=N.U(U.n()*4);N.zt(z.buffer,z.rect,D,U);
|
|
console.log("resizing")}i.push(D)}M=N.U(U.n()*4);N.stack.stack(i,M,S)}else{for(var Q=0;Q<t.g.length;
|
|
Q++)if(t.g[Q].rG())t.g[Q].r9(t);t.fG();t.G();t.f4();M=t.jc()}k.xJ=[M,U]}else if(P){var R=P.uc(k.raw.buffer)[0];
|
|
k.xJ=[new Uint8Array(R.data),R.rc]}if(k.xJ){if(W==1){var D=k.xJ[0],O=k.xJ[1],b=N.U(O.n());N.sN(D,b,3);
|
|
var w=N.oA(b,O),A=N.U(w.n()*4);N.zt(D,O,A,w);k.xJ=[A,w]}N.wa(k.xJ)}};$.T2="0";$.Xr="2";$.l4="2.5";$.pw="2.6";
|
|
$.JT="3";$.Cb="4";$.iX="4.5";$.sX="4.6";$.xR="5";$.H8="5.5";$.D7="6";$.O0="7";$.JE="7.5";$.JD="8";$.m7="9";
|
|
$.sA="9.3";$.lQ="9.5";$.wU="9.6";$.XE="10";$.Ei="11";$.K3="12";$.wD="13";$.o5="13.1";$.dc="13.2";$.kw="13.3";
|
|
$.Pm="13.4";$.pR="14";$.BZ="14.1";$.W3="14.2";$.OW="14.3";$.fY="17";$.gp="18";$.KJ="19";$.Bz="19.5";
|
|
$.b$="19.6";$.Uf="19.7";$.c9="20";$.Jn="21";$.q9="21.5";$.mv="22";$.iP="22.5";$.EO="23";$.ahR="24";$.uR="25";
|
|
$.pp="26";$.E5="27";$.ge="28";$.X5="29";$.W$="30";$.Wk="31";$.gL="32";$.fg="33";$.xP="34";$.tN="35";
|
|
$.sO="36";$.ya="36.5";$.mr="37";$.Ar="37.5";$.aam="37.6";$.NV="38";$.bC="38.5";$.yj="38.6";$.s9="39";
|
|
$.mI="40";$.fP="41";$.zI="42";$.Ce="50";$.tv="51";$.IZ="52";$.qj="53";$.Wo="54";$.Fx="54.5";$.vH="54.6";
|
|
$.UU="54.7";$.Ut="54.8";$.IR="55";$.yU="56";$.Tp="57";$.pF="58";$.J_="59";function gk(){this.depth=0;
|
|
this.index=-1;this.i=null;this.au9=null;this.Xe=-1;this.children=null;this.parent=null;this.ju=null}gk.prototype.pA=function(W,h){if(this.depth!=0)W.push(this.i.getName());
|
|
if(this.children)for(var Q=0;Q<this.children.length;Q++)this.children[Q].pA(W,h);if(W.length>h.Fv.length)h.Fv=W.slice(0);
|
|
if(this.depth!=0)W.pop()};gk.prototype.a53=function(){var W=0;if(this.i.vc()){for(var Q=0;Q<this.children.length;
|
|
Q++)W+=this.children[Q].a53()}else if(this.i.buffer)W+=this.i.buffer.length;return W};gk.prototype.rk=function(W){var h=this.ju[W];
|
|
return this.ju[W]};gk.prototype.D1=function(W,h){var S=this.i;if(!S.jP()||S.Ox(2)||S.Ox(31))return null;
|
|
if(S.vK()){var k=S.v.rect.NW(W);if(!k&&S.v.color==0)return}if(S.vc()){for(var Q=0;Q<this.children.length;
|
|
Q++){var g8=this.children[Q];g8.D1(W,h)}}else if(S.rect.NW(W))h.push(this.index)};gk.prototype.IC=function(W,h){var S=this.i;
|
|
if(!S.jP()||S.Ox(2)||S.Ox(31))return null;if(S.vK()){if(S.v.rect.mA(W)){if(!N.IC(W,S.v.channel,S.v.rect))return null}else if(S.v.color==0)return null}if(S.vc()){if(S.add.artb&&!S.rp().mA(W))return null;
|
|
for(var Q=this.children.length-1;Q>=0;Q--){var g8=this.children[Q],k=g8.IC(W,h);if(k&&h==null)return k}return null}else if(S.add.TySh&&S.rect.mA(W)||N.ac1(W,S.buffer,S.rect)){if(h==null)return this;
|
|
else h.push(this.index)}return null};gk.prototype.afZ=function(W){var h=this.i;if(!h.jP()||h.Ox(2)||h.Ox(31))return null;
|
|
var S=h.add.vmsk;if(S&&S.isEnabled){var k=N.$.IC(S.T,W).Kr;if(k!=-1)return{adq:this,anc:k}}if(h.vc()){if(h.add.artb&&!h.rp().mA(W))return null;
|
|
for(var Q=this.children.length-1;Q>=0;Q--){var g8=this.children[Q],p=g8.afZ(W);if(p)return p}return null}return null};
|
|
gk.prototype.Yv=function(W,h){W.push(this.index);if(this.i.vc()){W.push(this.Xe);if(h)if(this.i.Yi==1&&this.i.kX().ln==!1)return;
|
|
for(var Q=0;Q<this.children.length;Q++)this.children[Q].Yv(W)}};gk.prototype.qP=function(W,h,S){var k=this.i,p,I;
|
|
if(k.vc()&&k.add.artb!=null)h=k.rp();if(h.e>h.Z){p=S;I=Math.floor(S*(h.Z/h.e))}else{p=Math.floor(S*(h.e/h.Z));
|
|
I=S}if(k.rG()&&k.add.vmsk==null||k.add.TySh)p=I=Math.max(I,16);else{p=Math.max(p,6);I=Math.max(I,6)}var q=I,P=k.rG()&&k.add.vmsk;
|
|
if(P){var t=k.rect.clone(),i,z;if(t.ZP())t=new gj(0,0,20,20);var M=t.e,U=t.Z;if(M>U){i=S;z=Math.floor(S*(U/M))}else{i=Math.floor(S*(M/U));
|
|
z=S}if(i*z==0)i=z=16;N.CS.uD(k.Pd,i,z,t,k.buffer,k.rect,!1);N.CS.apb(k.Pd,i,z);q=z}else if(k.add.TySh){N.CS.a8O(k.Pd,q,q,k.add.TySh)}else if(k.add.SoCo){q=Math.max(16,Math.min(p,I));
|
|
N.CS.ate(k.Pd,q,q,k.add.SoCo)}else if(k.add.GdFl){N.CS.aml(k.Pd,q,q,k.add.GdFl)}else if(k.add.PtFl){N.CS.a6b(k.Pd,q,q,k.add.PtFl,W)}else if(bS.get(k.add)!=null){N.CS.arp(k.Pd,q,q,k.add)}else if(k.add.SoLd){N.CS.uD(k.Pd,p,I,h,k.buffer,k.rect,!1);
|
|
N.CS.a4T(k.Pd,p,I,k.add.SoLd)}else if(k.vc()){q=16}else{if(k.p2())N.CS.uD(k.Pd,p,I,h,k.buffer,k.rect,!1);
|
|
else{N.CS.aqj(k.Pd,q,q)}}var D=k.kX();if(D)N.CS.TN(k.a9W,p,I,h,D);if(k.rB()&&k.$U(W)&&k.$U(W).v){var R=k.$U(W).v;
|
|
N.CS.TN(k.agG,p,I,h,R)}if(!P&&k.add.vmsk){N.CS.TN(k.akX,p,I,h,k.add.vmsk.kX(),!0)}if(k.add.vmsk||D)q=Math.max(q,I);
|
|
k.ap$=Math.max(q,16);if(k.vc())for(var Q=0;Q<this.children.length;Q++)this.children[Q].qP(W,h,S)};gk.prototype.LF=function(W,h,S,k){this.depth=S;
|
|
var p=W[h];if(k==null)k=[];this.ju=k;if(p.add.lsct==i1.aW){this.au9=p;this.Xe=h-1;this.children=[];var Q=h+1;
|
|
while(!0){var I=W[Q];if(I==null)console.log(Q,W.length);if(I.add.lsct==i1.wY||I.add.lsct==i1.O_){if(p.add.lyid==I.add.lyid)p.add.lyid+=16777215;
|
|
this.i=I;this.index=Q-1;k[this.index]=this;k[h-1]=this;break}var q=new gk;q.parent=this;Q=q.LF(W,Q,S+1,k);
|
|
this.children.push(q)}return Q+1}else{this.i=p;this.index=h-1;k[this.index]=this;return h+1}};gk.prototype.v5=function(W,h,S,k){var p=this.rk(S),I=W;
|
|
while(p.parent!=null){I=p.i.Cq(I,h,k);p=p.parent}return I};gk.prototype.wT=function(W,h){var S=this.i,k=new gj;
|
|
if(!S.jP())return k;var p=S.kX();if(S.vc())for(var Q=0;Q<this.children.length;Q++){var I=this.children[Q].wT(W,!0);
|
|
k=k.r8(I)}else if(bS.get(S.add)!=null)k=S.vK()&&S.v.color==0?S.v.wT().clone():new gj(0,0,W.e,W.Z);else if(S.rG()&&S.add.vmsk&&S.add.vmsk.isEnabled&&S.add.vstk){k=S.rect.clone()}else if(S.rG()&&p&&p.isEnabled&&p.iZ()!=0)k=new gj(0,0,W.e,W.Z);
|
|
else{k=S.LO(W,!1,!0);if(S.add.vmsk)k=N.H.No(k)}return h?S.Cq(k,W):k};gk.OE={delete:function(W){if(W&&W.e)W.delete()},U:function(W,h){return n.O9?new n.qr(W,h):N.U(W*h*4)},ub:function(W,h,S){if(n.O9){if(W==null||W.e!=h||W.Z!=S){gk.OE.delete(W);
|
|
return new n.qr(h,S)}}else{if(W==null||!(W instanceof Uint8Array)||W.length!=h*S*4){gk.OE.delete(W);
|
|
return N.U(h*S*4)}}return W},vG:function(W,h,S,k,p){(n.O9?n.M$:N.zt)(W,h,S,k,p)},HH:function(W,h,S,k,p,I,q,P,Q,t,M){(n.O9?n.a.DM:N.a.HH)(W,h,S,k,p,I,q,P,Q,t,M)},ha:function(W,h,S,k,p,I,q,P){if(n.O9)n.a.SK(W,h,S,k,p,I,q,P);
|
|
else N.a.ha(W,h,S,k,p,I,q,P)},wM:function(W,h,S){if(n.O9){n.Wf(W);n.Ds(h,S)}else N.wM(W,h,S)},a2e:function(W,h,S,k,p){if(n.O9){n.a.DM(null,null,k,p,W,h,S,p,1,!1)}else{if(S==255)N.XY(W,h,k,p);
|
|
else{var I=N.U(h.n());N.TV(k,p,I,h);N.Xa(W,I);N.wM(k,0,16777215);N.ul(I,h,k,p)}}},Eh:function(W,h,S,k){if(n.O9)n.a.DM(null,null,S,k,W,h,0,k,1,!1);
|
|
else N.Eh(W,h,S,k)}};gk.prototype.kb=function(W,h,S,k,p,I){var q=typeof I=="number";if(!this.i.vc()&&(q&&this.index>I||!q&&I.indexOf(this.index)==-1)){return}var P=this.i,t=jO.GL(P),M=gk.OE,U=P.rG()?P.kX():P.v;
|
|
if(!P.jP())return;if(P.vK()&&U.rect.ZP()&&U.iZ()==0){return}if(P.add.vstk==null&&this.wT(k,!1).ZP()){return}var i=this.wT(k,!0).r$(S);
|
|
if(!h.xX(S)&&!S.NW(i))return;if(P.vc()&&P.add.artb){var z=P.rp();S=S.r$(z)}var D=gk.bh(P,p,t);if(!D){this.fL(W,h,S,k,p,I);
|
|
return}P.zy.k5=M.ub(P.zy.k5,i.e,i.Z);M.vG(W,h,P.zy.k5,i,S);this.fL(P.zy.k5,i,S,k,p,I);M.HH(P.zy.k5,i,W,h,null,null,0,S,P.opacity/255,P.oO=="diss",t.sn)};
|
|
gk.bh=function(W,h,S){if(S.sn[0]*S.sn[1]*S.sn[2]==0)return!0;return W.opacity!=255&&(h.length!=0||W.vc()||W.bg())};
|
|
gk.akP={zy:{}};gk.prototype.fL=function(W,h,S,k,p,I){var q=this.i,P=jO.GL(q),t=bS.get(q.add)!=null,M=gk.OE,U=gk.bh(q,p,P),i=U?1:q.opacity/255,z=q.rG()?q.kX():q.v,D=q.vc()&&(q.oO=="pass"||q.add.artb)&&!(p.length>0||P.fill!=1||q.bg()),R=!q.vc()&&!t&&!q.bg()&&p.length==0,O=t&&!q.bg()&&p.length==0,j=null,x=null,d=null,e;
|
|
if(D||R||O){var b=W,w=h;if(q.vK()){w=this.wT(k,!1);b=q.zy.o$=M.ub(q.zy.o$,w.e,w.Z);M.vG(W,h,q.zy.o$,w)}if(D)this.Ux(b,w,S,k,I);
|
|
if(R)M.ha(q.oO,q.j4(k),q.rect,b,w,S,i,P);if(O){var A=q.vK()&&z.iZ()==0?z.wT().clone():w.clone(),g=q.zy;
|
|
if(A.xX(new gj(0,0,k.e,k.Z)))g=gk.akP;g.da=this.Fj(b,w,g.da,A,q.add);P.Q8=!0;M.ha(q.oO,g.da,A,b,w,S,i,P)}if(q.vK())M.HH(b,w,W,h,q.xH(),z.wT(),z.iZ(),S,1,q.oO=="diss");
|
|
q.zy._w();return}var E=q.vc()&&q.oO=="pass"&&(p.length>0||P.fill!=1||q.bg()),A=q.rect;if(q.vc()){A=this.wT(k,!1);
|
|
d=q.zy.da=M.ub(q.zy.da,A.e,A.Z);M.wM(d,0);this.Ux(d,A,A,k,I);x=M.ub(q.zy._Z,A.e,A.Z);M.vG(d,A,x,A)}else if(t){A=q.vK()&&z.iZ()==0?z.wT().clone():h.clone();
|
|
x=M.ub(q.zy._Z,A.e,A.Z);M.wM(x,4294967295)}else{A=q.rect;j=q.j4(k);x=M.ub(q.zy._Z,A.e,A.Z);M.vG(j,A,x,A)}q.zy._Z=x;
|
|
if(q.vK())M.a2e(q.xH(),z.wT(),z.iZ(),x,A);if(q.bg())if(q.zy.V4||q.zy.$S||q.zy.Kw!=n.O9||q.zy.jM||q.vc()){var L=q.add.vmsk,_=N.U(A.n());
|
|
if(jO.ajl(q.add.lmfx)){if(n.O9){if(!q.vc()&&q.kX()==null&&q.rect.xX(A)&&L==null)N.sN(q.buffer,_,3);else{var T=N.U(A.n()*4);
|
|
x.get(T);N.sN(T,_,3)}}else N.sN(x,_,3)}if(q.zy.$S||q.zy.Kw!=n.O9||!N.xX(_,q.zy.nN)){var c=null;if(q.rG()&&L&&L.isEnabled&&L.kX().color==0)c=L.kX().rect;
|
|
jO.a4b(q.zy.J5);q.zy.J5=jO.ajw(_,A,q.add.lmfx,q.add.fxrp,k,c);q.zy.nN=_;q.zy.arl=A}}if(q.bg())jO.a6H(q.add.lmfx,q.zy.J5,A,W,h,S);
|
|
if(q.vc()){j=M.ub(q.zy.o$,A.e,A.Z);M.wM(j,0);if(q.oO=="pass")M.vG(W,h,j,A);if(E)M.Eh(d,A,j,A);this.Ux(j,A,S,k,I);
|
|
q.zy.o$=j}if(t){j=q.zy.o$=this.Fj(W,h,q.zy.o$,A,q.add)}if(q.vc()||t)e=j;else{e=M.ub(q.zy.o$,A.e,A.Z);
|
|
M.vG(j,A,e,A,S);q.zy.o$=e}M.wM(e,4278190080,16777215);for(var Q=0;Q<p.length;Q++)p[Q].kb(e,A,S,k,[],I);
|
|
var r=q.zy.ck=M.ub(q.zy.ck,A.e,A.Z);M.vG(W,h,r,A,S);if(t)P.Q8=!0;M.ha(q.oO=="pass"?"norm":q.oO,e,A,r,A,S,1,P);
|
|
if(q.bg()){var B=q.zy.J5.type.FrFX,F=null;if(B.length!=0){F=B[0];for(var Q=0;Q<B.length;Q++)if(B[Q].lI.e>F.lI.e)F=B[Q];
|
|
q.zy.ss=M.ub(q.zy.ss,F.lI.e,F.lI.Z);M.vG(W,h,q.zy.ss,F.lI,S);q.zy.lo=M.ub(q.zy.lo,F.lI.e,F.lI.Z)}jO.asv(q.add.lmfx,q.zy.J5,A,W,h,S,r,q.zy.ss,q.zy.lo,F?F.lI:null)}if(!n.O9){var v=N.U(A.n());
|
|
N.sN(x,v,3);x=v}M.HH(r,A,W,h,x,A,0,S,1,q.oO=="diss");q.zy._w()};gk.prototype.Fj=function(W,h,S,k,p){var I=bS.get(p),q;
|
|
if(I)q=bS.wz(I,p[I]);var P=gk.OE;S=P.ub(S,k.e,k.Z);if(!(n.O9&&h.xX(k)))P.vG(W,h,S,k);if(q){if(n.O9){var t=k.clone();
|
|
t.x=t.y=0;if(h.xX(k)){n.Wf(S,t);bS.kf(q,W.hr,t)}else{n.Wf(S,k);S.rh(k);bS.kf(q,S.LQ,t)}}else bS.K1(q,S,S,k)}return S};
|
|
gk.prototype.Ux=function(W,h,S,k,p){var I=this.children;for(var Q=0;Q<I.length;Q++){var q=[];for(var P=Q+1;
|
|
P<I.length;P++)if(I[P].i.Vy)q.push(I[P]);else break;I[Q].kb(W,h,S,k,q,p);Q+=q.length}};function jg(W){this.df="psd";
|
|
this.lN=!1;this.name=W;this.af=-1;this.qb=null;this.aq=null;this.I7=null;this.SF=null;this.e=0;this.Z=0;
|
|
this.buffer=null;this.g=[];this.A5={};this.add={};this.Kk=4;this.kT=null;this.H$=72;this.KC={};this.w=[];
|
|
this.r4=[];this.O$=!1;this.BW=[];this.YP=[];this.mw=[jg.Bo("Work Path")];this.yQ=[];this.sP=null;this.S1={classID:"CompList",list:{t:"VlLs",v:[]}};
|
|
this.root=null;this.hK=null;this.rd=!1;this.afs=!1;this.ahy=!1;this.Td=!1;this.zW=!1;this.Hx=!1;this.WU=!1;
|
|
this.tn=!1;this.pg=!1;this.rm=!1;this.V4=null;this.tC=null;this.q=null;this.BS=[];this.ye=[];this.L={YZ:{},xV:[],aeY:[],aa:[],NY:[],i1:null,Yr:null,pV:null,zN:null,Iy:[],uj:[],N0:null};
|
|
this.history=[new h3([1,0],null)];this.nT=0;this.XW=0;this.Lz=0;this.t=new iP(this)}jg.prototype.A_=function(){var W=this.r4,h=[];
|
|
for(var Q=0;Q<W.length;Q++)h[Q]=-1;var S=this.root.children;for(var Q=0;Q<S.length;Q++){var k=S[Q],p=k.i.add.artb;
|
|
if(p==null)continue;var I=p.guideIndeces;I=I?I.v:[];for(var q=0;q<I.length;q++)h[I[q].v]=k.index}return[JSON.parse(JSON.stringify(W)),h]};
|
|
jg.prototype.O6=function(W){this.r4=JSON.parse(JSON.stringify(W[0]));var h=W[1],S=this.root.children;
|
|
for(var Q=0;Q<S.length;Q++){var k=S[Q],p=k.i.add.artb;if(p==null)continue;p.guideIndeces={t:"VlLs",v:[]}}for(var Q=0;
|
|
Q<h.length;Q++)if(h[Q]!=-1)this.g[h[Q]].add.artb.guideIndeces.v.push({t:"long",v:Q})};jg.prototype.KK=function(W){var h=this;
|
|
if(W[0])h.add.lnk2=W[0];else delete h.add.lnk2;if(W[1])h.add.FEid=W[1];else delete h.add.FEid;if(W[2])h.add.Patt=W[2];
|
|
else delete h.add.Patt};jg.prototype.a7N=function(W){var h=this,S=[],k=[],p=[],R=null,O=null,b=null;
|
|
for(var Q=0;Q<W.length;Q++){var I=W[Q];if(I.add.SoLd){S.push(I.add.SoLd.Idnt.v);k.push(I.add.SoLd.placed.v)}if(I.add.PtFl)p.push(I.add.PtFl.Ptrn.v.Idnt.v);
|
|
if(I.add.lmfx){for(var q=0;q<hz.BN.length;q++){var P=I.add.lmfx[hz.BN[q]].v;for(var t=0;t<P.length;t++)if(P[t].v.Ptrn){var M=P[t].v;
|
|
if(M.classID=="FrFX"&&M.PntT.v.FrFl!="Ptrn")continue;p.push(M.Ptrn.v.Idnt.v)}}}var U=I.add.vstk;if(U&&U.strokeStyleContent.v.classID=="patternLayer"){p.push(U.strokeStyleContent.v.Ptrn.v.Idnt.v)}}var i=h.add.lnk2,z=h.add.FEid,D=h.add.Patt;
|
|
if(i){R=[];for(var Q=0;Q<i.length;Q++)if(S.indexOf(i[Q].SI)!=-1)R.push(i[Q]);if(R.length==0)R=null}if(z){O=[];
|
|
for(var Q=0;Q<z.length;Q++)if(k.indexOf(z[Q].id)!=-1)O.push(z[Q]);if(O.length==0)O=null}if(D){b=[];for(var Q=0;
|
|
Q<D.length;Q++)if(p.indexOf(D[Q].id)!=-1)b.push(D[Q]);if(b.length==0)b=null}return[R,O,b]};jg.prototype.bx=function(){var W=this.BS,h=this.BS.length;
|
|
if(h!=0&&W[h-1].name=="Quick Mask")return W[h-1]};jg.prototype.rj=function(){return this.df==ca.dJ("% |/!)")||this.df==ca.x4("gP")};
|
|
jg.prototype.xs=function(W){var h=this.add.artd;if(W!=0)this.add.artd={classID:"null",Cnt:{t:"long",v:W},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};jg.prototype.iI=function(W){if(this.add.FEid==null)this.add.FEid=[];if(this.add.FEid.indexOf(W)==-1)this.add.FEid.push(W)};
|
|
jg.prototype.rw=function(W){var h=this.add.FEid.indexOf(W);this.add.FEid.splice(h,1);if(this.add.FEid.length==0)delete this.add.FEid};
|
|
jg.prototype.G=function(W){if(W==null)W=new gj(0,0,this.e,this.Z);if(this.V4==null)this.V4=W;else this.V4=this.V4.r8(W)};
|
|
jg.prototype.amM=function(W){return this.V4!=null};jg.prototype.QR=function(W){var h=this.g[W],S=this.root.rk(W);
|
|
if(S==null)return!1;if(h.vc()||S.parent.children.indexOf(S)==0)return!1;return!0};jg.a0E=function(W){if(W.add.lnk2)for(var Q=0;
|
|
Q<W.add.lnk2.length;Q++){var h=W.add.lnk2[Q].SI;W.add.lnk2[Q].SI=jg.bm()+h.slice(8);for(var S=0;S<W.g.length;
|
|
S++){var k=W.g[S].add.SoLd;if(k&&k.Idnt.v==h)k.Idnt.v=W.add.lnk2[Q].SI}}};jg.prototype.qn=function(W,h,S){W.sort(function(i,z){return i-z});
|
|
var top=W[W.length-1],k=this.g.slice(0),p=this.w.slice(0),I=[],q=[];for(var Q=0;Q<this.g.length;Q++){if(W.indexOf(Q)!=-1)q.push(this.g[Q]);
|
|
else I.push(this.g[Q])}this.WV(q);this.w=[];var P=this.root.wT(this,!0);if(h)P=P.r$(h);if(S)P=P.r8(S);
|
|
if(P.ZP())P=new gj(0,0,100,100);var t=new gj(-P.x,-P.y,this.e,this.Z),M=new Uint8Array(hI.J$("PSD").i4(this,0,0,[!0,!1]));
|
|
this.WV(k);this.w=p;var U=new jg(this.g[top].getName());hI.J$("PSD").uc(M.buffer,U);delete U.add.artd;
|
|
U.BW=[];U.WV(U.g);U.O6([[],[]]);jg.a0E(U);a.JY.ZH(U,P);U.G();U.f4();U.jc();return[U,P,I,top]};jg.prototype.Sy=function(W,h,S){var k=this.qn(W),p=k[0],I=k[1],q=k[2],top=k[3],P;
|
|
if(S=="jpg")P=new Uint8Array(hI.J$("JPG").i4([[p.jc().buffer]],p.e,p.Z,[80]));else P=new Uint8Array(hI.J$("PSD").i4(p,null,null,[!0,!1]));
|
|
if(h)q=this.g.slice(0);var t=this.vN(P,p.name,I.x,I.y);if(top==this.g.length-1)q.push(t);else q.splice(h?top+1:top-W.length+1,0,t);
|
|
this.WV(q);this.w=[q.indexOf(t)]};jg.bm=function(W){if(W==null)W="";var h="";while(h==""||h==W){h="";
|
|
for(var Q=0;Q<8;Q++)h+=Math.floor(Math.random()*16).toString(16)}return h};jg.prototype.WX=function(W){if(W==null)return;
|
|
if(this.add.Patt==null)this.add.Patt=[];var h=this.add.Patt;for(var Q=0;Q<h.length;Q++)if(h[Q].id==W.id)return;
|
|
h.push(W)};jg.prototype.vN=function(W,h,S,k,p){if(this.add.lnk2==null)this.add.lnk2=[];var I=null,i=!1;
|
|
for(var Q=0;Q<this.add.lnk2.length;Q++)if(N.xX(W,this.add.lnk2[Q].raw)){I=this.add.lnk2[Q].SI;break}if(I==null){var q=hI._e(W.buffer);
|
|
I=jg.bm()+"-d71c-11e5-b1ae-a548a96e5f9f";var P=new $.Q1;P.SI=I;P.XS=q=="psd"?"8BIM":" ";P.Is=h+"."+q;
|
|
P.eY=q=="psd"?"8BPB":" ";P.open=0;P.raw=W;P.type="liFD";P.l_=2;this.add.lnk2.push(P)}var t=this.GT(I),M=jg.bm()+"-d71c-11e5-b1ae-a548a96e5f9f",U=this.yA();
|
|
U.hq(h);if(t!=null){var z=0,D=0,R=this.e,O=this.Z;if(p){z=p.x;D=p.y;R=p.e;O=p.Z}var b=U.rect=t.xJ[1].clone();
|
|
b.offset(z+S,D+k);var w=Math.max(b.e/R,b.Z/O),i=p!=null&&w>1.0001;if(i){b.e=Math.round(b.e/w);b.Z=Math.round(b.Z/w);
|
|
b.x=Math.round(z+(R-b.e)/2);b.y=Math.round(D+(O-b.Z)/2)}else if(p!=null&&hI._e(W.buffer)=="pdf"&&this.H$!=144){var w=144/this.H$;
|
|
b.e=Math.round(b.e/w);b.Z=Math.round(b.Z/w);i=!0}U.buffer=N.U(b.n()*4);if(!i)N.WQ(t.xJ[0],U.buffer)}U.add.SoLd={classID:"null",Idnt:{t:"TEXT",v:I},Impr:{t:"Objc",v:{__name:"None",classID:"none"}},placed:{t:"TEXT",v:M},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,warp:{t:"Objc",v:N.DU.U(t?t.xJ[1]:U.rect)},Sz:{t:"Objc",v:{classID:"Pnt",Wdth:{t:"doub",v:U.rect.e},Hght:{t:"doub",v:U.rect.Z}}},Rslt:{t:"UntF",v:{type:"#Rsl",val:72}}};
|
|
var A=N.H.Fb(U.rect).s;U.add.SoLd.Trnf=a.Q.m3(A);U.add.SoLd.nonAffineTransform=a.Q.m3(A);if(i)U.KF(this,!1);
|
|
return U};jg.prototype.jc=function(W){if(W!=null){this.G();this.f4(W);var h=this.buffer;if(n.O9)this.hK.get(h);
|
|
else h=h.slice(0);this.G();this.f4();return h}if(this.V4){this.f4();this.V4=null}if(n.O9&&this.tC){this.hK.get(this.buffer);
|
|
this.tC=null;this.WU=!0}return this.buffer};jg.prototype.ET=function(){for(var Q=0;Q<this.g.length;Q++)this.g[Q].Kl();
|
|
this.G()};jg.prototype.Jy=function(){for(var Q=0;Q<this.g.length;Q++)if(this.g[Q].add.lmfx)this.g[Q].zy.$S=!0};
|
|
jg.prototype.sY=function(){var W=this.A5.r1044;if(W==null){W=this.A5.r1044=new Uint8Array(4);var h=0;
|
|
for(var Q=0;Q<this.g.length;Q++)h=Math.max(h,this.g[Q].add.lyid);G.Cp(W,0,h)}var S=G.d(W,0);G.Cp(W,0,S+1);
|
|
return S+1};jg.prototype.xi=function(W,h,S){if(W==null)W=!0;var k=this;if(k.ye.length!=0)return!0;if(k.w.length!=1){if(W)alert(k.w.length==0?"Select a layer first.":"More than one layer selected.");
|
|
return!1}return this.KO(W,h,S)};jg.prototype.KO=function(W,h,S){if(W==null)W=!0;if(h==null)h=!1;var k=this;
|
|
if(k.ye.length!=0)return!0;for(var Q=0;Q<k.w.length;Q++){var p=k.g[k.w[Q]],I=h||p.Yi<=0;if(p.add.lsct!=null&&p.add.lsct!=i1.LC&&p.Yi!=1){if(W)alert(dq.get([15,7,2]));
|
|
return!1}if(I&&!p.p2()){if(W)alert(dq.get([15,7,2]));return!1}if(I&&p.add.TySh){return this.DW(W,[15,7,3],S)}if(I&&p.add.SoLd){return this.DW(W,[15,7,4],S)}if(p.Ox(1)||p.Ox(31)){if(W)alert(dq.get([6,57,0]));
|
|
return!1}}return!0};jg.prototype.DW=function(W,h,S){if(W&&typeof W=="object"){var k=window.confirm(dq.get(h)+". "+dq.get([6,8])+"?");
|
|
if(k){var p=new em(y.E.gg,!0);p.data={HP:"rasterizeLayer",b4:{classID:"rasterizeLayer",null:fP.gj("Lyr",!0)}};
|
|
W.c(p)}return S?k:!1}if(W)alert(dq.get(h));return!1};jg.prototype.Gr=function(W){var h=this.root.rk(W);
|
|
if(h.parent)return h.i.jP()&&this.Gr(h.parent.index);else return h.i.jP()};jg.prototype.By=function(){var W=this;
|
|
if(W.add.artd&&W.w.length!=0){var h=W.root.rk(W.w[0]);while(h.parent.parent)h=h.parent;if(h.i.add.artb)return h.index}return-1};
|
|
jg.prototype.Og=function(){var W=this.g[this.w[0]];if(W.Yi<=0&&!W.rect.NW(this.q.rect)){alert("Selected area is empty.");
|
|
return!1}if(this.w.length==1&&this.q){var h=N.U(this.q.channel.length);N.TV(W.buffer,W.rect,h,this.q.rect);
|
|
N.Xa(this.q.channel,h);if(N.B4(h,0)){alert("Selected area is empty.");return!1}}return!0};jg.prototype.NZ=function(){if(this.A5["r"+1037]==null)this.xq(30);
|
|
return G.GZ(this.A5["r"+1037],0)};jg.prototype.xq=function(W){if(this.A5["r"+1037]==null)this.A5["r"+1037]=new Uint8Array(4);
|
|
if(G.GZ(this.A5["r"+1037],0)==W)return;G.VJ(this.A5["r"+1037],0,W);this.Jy()};jg.prototype.yp=function(){if(this.A5["r"+1049]==null)this.RW(30);
|
|
return G.GZ(this.A5["r"+1049],0)};jg.prototype.RW=function(W){if(this.A5["r"+1049]==null)this.A5["r"+1049]=new Uint8Array(4);
|
|
if(G.GZ(this.A5["r"+1049],0)==W)return;G.VJ(this.A5["r"+1049],0,W);this.Jy()};jg.prototype.L5=function(W){if(this.add.lnk2==null)return null;
|
|
for(var Q=0;Q<this.add.lnk2.length;Q++)if(this.add.lnk2[Q].SI==W)return this.add.lnk2[Q];return null};
|
|
jg.prototype.acK=function(W){var h=this.L5(W);if(h==null)return!1;var S=hI._e(h.raw.buffer);if(S==null)return!1;
|
|
if(hI.J$(S)!=null||S=="psd")return!0;return!1};jg.prototype.GT=function(W,h,S,k){var p=this.L5(W);if(p==null)return null;
|
|
p.jc(h,S,k);if(p.xJ)return p};jg.prototype.ox=function(){var W=this.e,h=this.Z;if(n.O9&&this.hK==null)this.hK=new n.qr(W,h,!0);
|
|
if(this.buffer==null||this.buffer.length!=W*h*4||n.O9&&(this.hK.e!=W||this.hK.Z!=h)){this.buffer=N.U(W*h*4);
|
|
if(this.hK)this.hK.delete();if(n.O9)this.hK=new n.qr(W,h,!0)}};jg.prototype.abe=function(){this.ox();
|
|
if(n.O9){this.hK.set(this.buffer)}};jg.prototype.f4=function(W){var h=this.e,S=this.Z,k=new gj(0,0,h,S),p=k.r$(this.V4);
|
|
this.ox();if(p.ZP())return;if(!p.xX(k)){if(!n.O9){var I=N.$o(p.n()*4);N.zt(I,p,this.buffer,k)}if(n.O9){n.Wf(this.hK,p);
|
|
n.Ds(0)}}else{if(n.O9){this.hK.set(null)}else{this.buffer.fill(0)}}var q=Date.now(),P=n.O9?this.hK:this.buffer;
|
|
if(W==null)W=1e9;var t=this.root.children;for(var Q=0;Q<t.length;Q++){var M=t[Q].i;if(M.jP()&&M.add.artb){var U=M.rp(),i=p.r$(U),z=M.Rj();
|
|
if(z!=0){if(n.O9){n.Wf(P,i);n.Ds(z);n.Ds(z)}else N.a6B(P,k,i,z)}}}this.root.kb(P,k,p,this,[],W);this.tC=this.V4.clone()};
|
|
jg.prototype.yA=function(W){var h=new $;h.rect=new gj(0,0,0,0);h.buffer=N.U(1);h.add.luni=new eC(0,0);
|
|
if(W!=!0)h.add.lyid=this.sY();h.add.lsct=i1.LC;h.add.lclr=0;h.add.fxrp=new eC(0,0);return h};jg.prototype.Iq=function(W){var h=this.yA(W);
|
|
h.hq("</Layer group>");h.add.lsct=i1.aW;h.S5=24;return h};jg.prototype.Wm=function(){return this.nT!=this.XW};
|
|
jg.prototype.nh=function(W){while(this.history.length>this.nT+1)this.history.pop();if(this.XW>this.nT)this.XW=-1;
|
|
if(W.b.id!=a.fK){this.Td=!0;if(this.S1.lastAppliedComp){delete this.S1.lastAppliedComp;this.WU=!0}}this.history.push(W);
|
|
this.nT++;this.WU=!0;var h=aM.w6()?60:30,S=0;for(var Q=this.history.length-1;Q>=0;Q--){var k=this.history[Q];
|
|
if(k.jy)continue;S++;if(S==h){this.nT-=Q;this.history=this.history.slice(Q);break}}};jg.prototype.c_=function(){if(this.nT!=this.history.length-1)return null;
|
|
return this.history[this.history.length-1]};jg.prototype.w$=function(W,h,S,k){if(W==null)W=!1;var p=h!=null?[h]:this.w.slice(0);
|
|
if(k){var I=[];for(var Q=0;Q<p.length;Q++){var q=this.g[p[Q]],P=q.RL;if(q.i2&&P!=0&&I.indexOf(P)==-1)I.push(P)}if(I.length!=0)for(var Q=0;
|
|
Q<this.g.length;Q++){var q=this.g[Q],P=q.RL;if(q.i2&&P!=0&&I.indexOf(P)!=-1&&p.indexOf(Q)==-1)p.push(Q)}}var t=[];
|
|
for(var Q=0;Q<p.length;Q++){var M=this.RS(p[Q],W);for(var U=0;U<M.length;U++)if(t.indexOf(M[U])==-1)t.push(M[U]);
|
|
if(S){var g8=this.root.rk(p[Q]);while(g8.parent!=null&&g8.parent.parent!=null){g8=g8.parent;if(t.indexOf(g8.index)==-1){t.push(g8.index,g8.Xe)}}}}return t};
|
|
jg.prototype.Cf=function(W,h,S){var k=this,p=k.w$(!1,W,null,S);p.sort(function(g,E){return g-E});var I={};
|
|
for(var q=0;q<k.g.length;q++){var P=k.g[q].getName();I[P]=!0}var t=[];for(var Q=0;Q<p.length;Q++){var M=k.g[p[Q]].clone(),b,w;
|
|
M.add.lyid=k.sY();M.add.lspf=0;if(M.rB()){var U=M.$U(k),i=jg.vg(U);k.iI(i);M.add.SoLd.placed.v=i.id}else if(M.add.SoLd){var z=M.add.SoLd.placed.v;
|
|
M.add.SoLd.placed.v=jg.bm(z.slice(0,8))+z.slice(8)}M.r9(k);var D=M.getName(),R=D.length;while(48<=D.charCodeAt(R-1)&&D.charCodeAt(R-1)<=57)R--;
|
|
var O=parseInt(D.slice(R));if(isNaN(O)){if(D.endsWith(" copy")){O=1;b=D.slice(0,D.length-5)}else{O=0;
|
|
b=D}}else if(D.slice(0,R).endsWith(" copy ")){O=O;b=D.slice(0,R-6)}else{O=0;b=D}O++;while(!0){w=b+" copy"+(O==1?"":" "+O);
|
|
if(I[w]==null)break;O++}var A=p.indexOf(this.root.rk(p[Q]).parent.index)!=-1;if(D=="Background"&&k.g.length==1)w="Layer 1";
|
|
if(h!=!0&&!A)M.hq(w);I[w]=!0;t.push(M)}return t};jg.vg=function(W){return{id:jg.bm(W.id.slice(0,8))+W.id.slice(8),buffer:W.buffer.slice(0),rect:W.rect.clone(),v:W.v?W.v.clone():null}};
|
|
jg.fj=function(W){return{id:W,rect:new gj,buffer:N.U(1),v:new $.Kt}};jg.Bo=function(W,h){if(h==null)h={vmsk:new $.CP};
|
|
if(h.vogk==null){h.vogk=[];var S=N.$.z2(h.vmsk.T);for(var k=0;k<S;k++)h.vogk.push(N.uy.$o())}return{name:W,Kr:0,add:h}};
|
|
jg.prototype.O4=function(W){var h=[],S=[],k=this,I=0;for(var Q=1;Q<k.mw.length;Q++){var p=k.mw[Q];p.Kr=-1-Q;
|
|
h.push(p);if(k.yQ.indexOf(Q)!=-1)S.push(h.length-1)}if(k.mw[0].add.vmsk.T.length>2){var p=k.mw[0];p.Kr=-1;
|
|
h.push(p);if(k.yQ.indexOf(0)!=-1)S.push(h.length-1)}var q=k.sP==null;if(q)k.sP=[];for(var Q=k.w.length-1;
|
|
Q>=0;Q--){var P=k.g[k.w[Q]],t=P.add.TySh;if(P.add.vmsk!=null&&(P.AY||P.rG())){var p=jg.Bo("\""+P.getName()+"\" Shape Path",P.add);
|
|
p.Kr=k.w[Q];h.push(p);if(q)k.sP.push(I);if(k.sP.indexOf(I)!=-1)S.push(h.length-1);I++}if(W!=!0&&t&&t.add&&N.DU.xv(t.ud)){var p=jg.Bo("\""+P.getName().slice(0,10)+"..\" Text Path",t.add);
|
|
p.Kr=1e6+k.w[Q];h.push(p);S.push(h.length-1);I++}}if(S.length==0&&W){k.mw[0].Kr=-1;k.yQ=[0];S.push(h.length);
|
|
h.push(k.mw[0])}return[h,S]};jg.prototype.RS=function(Q,W){var h=[],g8=this.root.rk(Q);if(g8)g8.Yv(h,W);
|
|
return h};jg.prototype.nF=function(){this.root.qP(this,new gj(0,0,this.e,this.Z),32*a.F())};jg.prototype.WV=function(W){for(var Q=0;
|
|
Q<this.g.length;Q++){var h=this.g[Q];if(W.indexOf(h)==-1){h.zy.acG();h.G()}}var S=0;for(var Q=0;Q<W.length;
|
|
Q++)if(W[Q].add.artb)S++;this.xs(S);this.g=W.slice(0);this.fG()};jg.prototype.fG=function(){var W=this.g,h=W.length;
|
|
this.root=new gk;var S=this.yA(!0);S.oO="pass";S.add.lsct=i1.wY;S.hq("");var k=this.Iq(!0),p=[k];for(var Q=0;
|
|
Q<h;Q++)p.push(W[Q]);p.push(S);this.root.LF(p,0,0);if(this.w.length==0)this.w=[h-1]};jg.prototype.bO=function(){if(this.w.length!=1)return;
|
|
var W=this.root.rk(this.w[0]);while(W.parent!=null){var h=W.parent.i;h.add.lsct=i1.wY;W=W.parent}this.Hx=this.af9=!0};
|
|
jg.prototype.ahd=function(){this.fG();var W=[this.root],iD=0;while(W.length!=0){var top=W.pop();iD++;
|
|
if(top.i.add.lsct==i1.wY)for(var Q=0;Q<top.children.length;Q++)W.push(top.children[Q])}if(iD>1e3){var h=this.root.children;
|
|
for(var Q=0;Q<h.length;Q++)if(h[Q].i.add.lsct==i1.wY)h[Q].i.add.lsct=i1.O_}};jg.vU=function(W,h,S,k,p,I,q){var P={__name:"Make",classID:"Mk",Nw:{t:"Objc",v:{classID:"Dcmn",Nm:{t:"TEXT",v:k},artboard:{t:"bool",v:I},Md:{t:"type",v:{classID:"RGBM"}},Wdth:{t:"UntF",v:{type:"#Rlt",val:W}},Hght:{t:"UntF",v:{type:"#Rlt",val:h}},Rslt:{t:"UntF",v:{type:"#Rsl",val:S}},pixelScaleFactor:{t:"doub",v:1},Fl:{t:"enum",v:{Fl:p}},Dpth:{t:"long",v:8},profile:{t:"TEXT",v:"sRGB IEC61966-2.1"}}}};
|
|
if(p=="Clr")P.Nw.v.FlCl={t:"Objc",v:q};return{HP:"make",b4:P}};jg.a0h=function(W,h){var S=0,k=0,p=72,I=h.ap5,q=W.preset&&W.preset.v=="Clipboard";
|
|
if(q){S=I.e;k=I.Z}else{S=W.Wdth.v.val;k=W.Hght.v.val;p=W.Rslt.v.val}var P=new jg((W.Nm?W.Nm.v:dq.get([11,7]))+".psd");
|
|
P.e=S;P.Z=k;P.H$=p;var t=W.Fl?W.Fl.v.Fl:"Wht";if(W.artboard&&W.artboard.v){var M=P.yA();M.hq("Artboard 1");
|
|
M.add.lsct=i1.wY;M.Si(new gj(0,0,S,k));M.add.artb.artboardBackgroundType={t:"long",v:{Wht:1,Blck:2,Trns:3,BckC:1,Clr:4}[t]};
|
|
if(t=="Clr")M.add.artb.Clr={t:"Objc",v:N.X.hg(N.X.iZ(W.FlCl.v))};M.oO="pass";M.S5=24;var U=P.yA();U.hq("Layer 1");
|
|
P.WV([P.Iq(),U,M]);P.xs(1);P.w=[1]}else{var i=P.yA(),z=0;i.hq("Background");P.WV([i]);i.add.lspf=1<<2;
|
|
if(t=="Clr"){z=N.X.iZ(W.FlCl.v);z=255<<24|Math.round(z.S)<<16|Math.round(z.z)<<8|Math.round(z.p)}else{var D=h.lL;
|
|
D=(D&255)<<16|(D>>>8&255)<<8|D>>>16;z={Trns:0,Wht:4294967295,Blck:4278190080,BckC:255<<24|D}[t]}i.rect=new gj(0,0,S,k);
|
|
i.buffer=N.U(S*k*4);N.wM(i.buffer,z)}P.buffer=N.U(S*k*4);return P};function iP(W){this.om=W;this.J=0;
|
|
this.l5=1;this.r=new eC(0,0);this.zU=new eC(0,0);this.j3=0;this.aL=[1,1,1];this.Vz=new gj(0,0,1,1);this.aj4=new gj(0,0,W.e,W.Z);
|
|
this.MD=null;this.pJ=null;this.A9=new Uint32Array(0);this.yt=null;this._8=null;this.xI=N.U(0);this.AZ=null;
|
|
this.Un=null}iP.prototype.Er=function(W){var h=new ex,S=this.Vz,k=this.om,p=W?this.l5:this.J,I=W?this.zU:this.r,q=Math.round((S.e-k.e*p)/2+I.x),P=Math.round((S.Z-k.Z*p)/2+I.y);
|
|
h.translate(-q,-P);h.scale(1/p,1/p);var t=k.e/2,M=k.Z/2;h.translate(-t,-M);h.rotate(this.j3);h.translate(t,M);
|
|
return h};iP.prototype.f1=function(W){var h=this.Vz,S=this.om,k=Math.atan2(-W.S,W.S4),p=S.e/2,I=S.Z/2;
|
|
W.translate(-p,-I);W.rotate(-k);W.translate(p,I);var q=1/W.Nc();W.scale(q,q);var P=-W.y8,t=-W.S8,M=Math.round(P-(h.e-S.e*q)/2),U=Math.round(t-(h.Z-S.Z*q)/2);
|
|
if(Math.abs(q-Math.round(q))<1e-6)q=Math.round(q);this.j3=k;this.J=q;this.r=new eC(M,U)};iP.prototype.wy=function(W,h){var S=this.Er();
|
|
return S.xK(new eC(W,h))};iP.prototype._c=function(W,h){var S=this.Er();S.uA();return S.xK(new eC(W,h))};
|
|
function hz(){}hz.order="ebbl FrFX IrSh IrGl ChFX SoFi GrFl patternFill OrGl DrSh".split(" ");hz.BN="ebblMulti frameFXMulti innerShadowMulti IrGlMulti ChFXMulti solidFillMulti gradientFillMulti patternFillMulti OrGlMulti dropShadowMulti".split(" ");
|
|
hz.names=[[14,4],[14,9],[14,1],[14,3],[14,8],[14,5],[14,6],[14,7],[14,2],[14,0]];hz.ey=["DrSh","IrSh","SoFi","GrFl","FrFX"];
|
|
hz.RN=["Clr"];hz.Y1="Grad Rvrs Type Algn Angl Dthr Scl Ofst".split(" ");hz.pd=["Ptrn","Angl","Scl","Algn","phase"];
|
|
hz.Ma={cI:"{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}}}",Xo:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Grdn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"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\"}}}",ag1:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Grdn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"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}}}]}}}",aek:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Grdn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"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}]}}}",yb:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Ptrn\",\"Nm\":{\"v\":\"orangeslices\",\"t\":\"TEXT\"},\"Idnt\":{\"v\":\"c7acb22a-47a6-11de-919a-bf574370eaaf\",\"t\":\"TEXT\"}}}"};
|
|
hz.Ma.cI="\"Clr\": "+hz.Ma.cI;hz.Ma.X="\"Grad\":"+hz.Ma.Xo+",\"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\"}";
|
|
hz.Ma.yb="\"Ptrn\":"+hz.Ma.yb+",\"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\"}";
|
|
hz.default="{ \"classID\": \"null\", \"Scl\": {\"t\": \"UntF\", \"v\": { \"type\": \"#Prc\",\"val\": 100} }, \"masterFXSwitch\": {\"t\": \"bool\",\"v\": true} }";
|
|
hz.Au=["{\"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\":\"orangeslices\"},\"Idnt\":{\"t\":\"TEXT\",\"v\":\"c7acb22a-47a6-11de-919a-bf574370eaaf\"}}},\"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\"},\"Styl\":{\"v\":{\"FStl\":\"OutF\"},\"t\":\"enum\"},\"PntT\":{\"v\":{\"FrFl\":\"SClr\"},\"t\":\"enum\"},\"Sz\":{\"v\":{\"type\":\"#Pxl\",\"val\":3},\"t\":\"UntF\"},"+hz.Ma.cI+","+hz.Ma.X+","+hz.Ma.yb+"}","{\"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\"},"+hz.Ma.cI+"}","{\"classID\":\"GrFl\", \"enab\":{\"v\":true,\"t\":\"bool\"}, \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+hz.Ma.X+"}","{\"classID\":\"patternFill\",\"enab\":{\"v\":true,\"t\":\"bool\"}, \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+hz.Ma.yb+"}","{\"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.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\"},\"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\xE1rn\xED\",\"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\"}}"];
|
|
hz.X={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]]};
|
|
hz.stroke={types:["InsF","CtrF","OutF"],names:[[19,5,2],[19,5,1],[19,5,0]],_7:["SClr","GrFl","Ptrn"],ag4:[[13,0],[12,37],[12,62]]};
|
|
hz.SH={types:["SfBL","PrBL"],names:[[19,1,0],[19,1,1]],apn:["SrcC","SrcE"],a0o:[[19,5,1],[12,69]]};hz.c2={types:["OtrB","InrB","Embs","PlEb","strokeEmboss"],style:[[19,2,0],[19,2,1],[19,2,2],[19,2,3],[19,2,4]],agM:["SfBL","PrBL","Slmt"],aqK:[[19,3,0],[19,3,1],[19,3,2]],dir:[[19,4,0],[19,4,1]]};
|
|
hz.EJ={zu:["strokeStyleButtCap","strokeStyleRoundCap","strokeStyleSquareCap"],tZ:["strokeStyleAlignInside","strokeStyleAlignCenter","strokeStyleAlignOutside"],join:["strokeStyleMiterJoin","strokeStyleRoundJoin","strokeStyleBevelJoin"],Dn:["solidColorLayer","gradientLayer","patternLayer"],default:{classID:"strokeStyle",strokeStyleVersion:{t:"long",v:2},strokeEnabled:{t:"bool",v:!1},fillEnabled:{t:"bool",v:!0},strokeStyleLineWidth:{t:"UntF",v:{type:"#Pnt",val:4.38}},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\","+hz.Ma.cI+"}")},strokeStyleResolution:{t:"doub",v:72}}};
|
|
hz.$Z=[{classID:"null",Clr:JSON.parse(hz.Au[5]).Clr},{classID:"null",Grad:JSON.parse(hz.Au[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(hz.Au[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 jO={};jO.GH=function(W,h){function S(W,z){if(W==null)return null;var D=W[z].v,R;if(D.length!=0){R=D[0].v;
|
|
if(!R.enab.v)R=null}return R}var k=h.SoCo,p=h.GdFl,I=S(W,"solidFillMulti"),q=S(W,"gradientFillMulti");
|
|
if(I==null&&q==null)return[k,p];var P=jO.ada;if(k&&I&&q==null){var t=JSON.parse(JSON.stringify(k));t.Clr.v=P(I.Clr.v,k.Clr.v,I);
|
|
return[t,null]}if(p&&I&&q==null){var M=JSON.parse(JSON.stringify(p)),U=M.Grad.v.Clrs.v;for(var Q=0;Q<U.length;
|
|
Q++){var i=U[Q].v.Clr;i.v=P(I.Clr.v,i.v,I)}return[null,M]}if(k&&q){var M=JSON.parse(JSON.stringify(q)),U=M.Grad.v.Clrs.v;
|
|
for(var Q=0;Q<U.length;Q++){var i=U[Q].v.Clr;i.v=P(i.v,k.Clr.v,q)}return[null,M]}return[I,q]};jO.ahH={xd:N.U(4),Ek:N.U(4),p:new gj(0,0,1,1)};
|
|
jO.ada=function(W,h,S){var k=hd.Gl(S.Md.v.BlnM),p=S.Opct.v.val/100,I=jO.ahH;W=N.X.iZ(W);h=N.X.iZ(h);
|
|
I.xd[0]=W.p;I.xd[1]=W.z;I.xd[2]=W.S;I.xd[3]=255;I.Ek[0]=h.p;I.Ek[1]=h.z;I.Ek[2]=h.S;I.Ek[3]=255;N.a.ha(k,I.xd,I.p,I.Ek,I.p,I.p,p);
|
|
return{classID:"RGBC",Rd:{t:"doub",v:I.Ek[0]},Grn:{t:"doub",v:I.Ek[1]},Bl:{t:"doub",v:I.Ek[2]}}};jO.abx=function(W,h,S){var k=W;
|
|
W=W.slice(0);var p=hd.wl[hd.iR.indexOf(h.Md.v.BlnM)],I=N.X.iZ(h.Clr.v),q=4278190080|Math.round(I.S)<<16|Math.round(I.z)<<8|Math.round(I.p),P=N.U(S.n()*4);
|
|
N.wM(P,q);N.a.ha(p,P,S,W,S,S,h.Opct.v.val/100);for(var Q=0;Q<W.length;Q+=4)W[Q+3]=k[Q+3];return W};jO.sg=function(W,h){var S=["Sz","blur","Sftn","Dstn"];
|
|
for(var Q=0;Q<hz.order.length;Q++){var k=hz.order[Q],p=W[hz.BN[Q]].v;for(var I=0;I<p.length;I++){var q=p[I].v;
|
|
for(var P=0;P<S.length;P++){var t=q[S[P]];if(t){var M=t.v.val,U=M;U=Math.max(M==0?0:1,U*h);if(k=="ChFX")U=Math.min(U,250);
|
|
if(k=="ebbl"){if(S[P]=="blur")U=Math.min(U,250);if(S[P]=="Sftn")U=Math.min(U,16)}t.v.val=Math.round(U)}}if(k=="ebbl"||k=="patternFill"||k=="FrFX")if(q.Ptrn&&q.Scl)q.Scl.v.val=Math.max(1,Math.min(1e3,q.Scl.v.val*h))}}};
|
|
jO.a2n=function(W,h,S){var k=new gj(-.5,-.5,1,1);for(var Q=0;Q<hz.order.length;Q++){var p=hz.order[Q],I=W[hz.BN[Q]].v;
|
|
for(var q=0;q<I.length;q++){var P=I[q].v,i;if(!P.enab.v)continue;var t=P.blur?P.blur.v.val+1:0,M=P.Ckmt?P.Ckmt.v.val/100:0,U=Math.round(t*M);
|
|
if(p=="DrSh"||p=="IrSh"&&S){i=new gj(-.5,-.5,1,1);i.x1(t,t);jO.HQ(i,P,h,0)}if(p=="OrGl"||p=="IrGl"&&S){i=new gj(-.5,-.5,1,1);
|
|
i.x1(t,t)}if(p=="FrFX"){var z=jO.BJ(P),D=z[1];if(S)D=Math.max(z[0],D);i=new gj(-.5,-.5,1,1);i.x1(Math.ceil(D),Math.ceil(D))}if(p=="ebbl"){var t=P.blur.v.val,R=P.bvlS.v.BESl;
|
|
if(R=="Embs"||R=="PlEb")t/=2;var O=["OtrB","InrB","Embs","PlEb","strokeEmboss"],b=["SfBL","PrBL","Slmt"],w=["In","Out"],A=P.bvlT.v.bvlT!="SfBL"?t:t*.43,g=Math.round(t);
|
|
i=new gj(-g-1,-g-1,2*g+2,2*g+2)}if(S&&p=="ChFX"){i=new gj(-.5,-.5,1,1);i.x1(t,t);var E=i.clone();jO.HQ(i,P,h,0);
|
|
jO.HQ(E,P,h,Math.PI);i=i.r8(E)}if(i)k=k.r8(i)}}if(k.x!=Math.ceil(k.x)){k.x=Math.ceil(k.x);k.e-=1}if(k.y!=Math.ceil(k.y)){k.y=Math.ceil(k.y);
|
|
k.Z-=1}k.e=Math.floor(k.e);k.Z=Math.floor(k.Z);return k};jO.BJ=function(W){var h=0,S=0,k=W.Styl.v.FStl,p=W.Sz.v.val;
|
|
if(k=="OutF")S=p;if(k=="InsF")h=p;if(k=="CtrF")h=S=p/2;return[h,S]};jO.ahe=function(W){if(n.O9&&W.er==null){W.er=new n.qr(W.iG.e,W.iG.Z);
|
|
W.er.set(W.vM);delete W.vM;if(W.qO){W.cn=new n.bG(W.iG.e,W.iG.Z);W.cn.set(W.qO);delete W.qO}if(W.yi){W.Pa=new n.bG(W.iG.e,W.iG.Z);
|
|
W.Pa.set(W.yi);delete W.yi}}};jO.amf=function(W){if(W.er)W.er.delete();if(W.cn)W.cn.delete();if(W.Pa)W.Pa.delete()};
|
|
jO.a4b=function(W){if(W.all==null)return;for(var Q=0;Q<W.all.length;Q++){jO.amf(W.all[Q])}};jO.ajw=function(W,h,S,k,p,I){var q=jO.Mt(S,k,W,h,p,I);
|
|
for(var Q=0;Q<q.all.length;Q++)jO.ahe(q.all[Q]);return q};jO.ajl=function(W){for(var Q=0;Q<hz.order.length;
|
|
Q++){var h=hz.order[Q],S=hz.BN[Q],k=W[S].v;for(var p=0;p<k.length;p++){var I=k[p].v;if(I.enab.v&&["patternFill","GrFl","SoFi"].indexOf(h)==-1)return!0}}return!1};
|
|
jO.Mt=function(W,h,S,k,p,I){if(I==null)I=k;var q=0,P=0;for(var Q=0;Q<hz.order.length;Q++){var t=hz.order[Q],M=hz.BN[Q],U=W[M].v;
|
|
for(var i=0;i<U.length;i++){var z=U[i].v;if(t=="DrSh"&&z.enab.v&&z.Ckmt.v.val>0&&z.blur.v.val>0)q=Math.max(q,Math.ceil(z.Ckmt.v.val*z.blur.v.val/100));
|
|
if(t=="OrGl"&&z.enab.v&&z.Ckmt.v.val>0&&z.blur.v.val>0&&z.GlwT.v.BETE=="SfBL")q=Math.max(q,Math.ceil(z.Ckmt.v.val*z.blur.v.val/100));
|
|
if(t=="OrGl"&&z.enab.v&&z.blur.v.val>0&&z.GlwT.v.BETE=="PrBL")q=Math.max(q,z.blur.v.val);if(t=="FrFX"&&z.enab.v&&z.Sz.v.val>0){if(z.Styl.v.FStl=="OutF")q=Math.max(q,z.Sz.v.val);
|
|
if(z.Styl.v.FStl=="CtrF")q=Math.max(q,Math.ceil(z.Sz.v.val/2));P=Math.max(P,jO.BJ(z)[1])}}}var D=new jO.fW(S,k,q,jO.ajl(W)),R=-k.x,O=-k.y,b={type:{},all:[]};
|
|
for(var w=0;w<hz.order.length;w++){var t=hz.order[w],M=hz.BN[w];b.type[t]=[];for(var A=W[M].v.length-1;
|
|
A>=0;A--){var g=W[M].v[A].v,d;if(!g.enab.v)continue;var E=g.blur?g.blur.v.val:0,j=g.Ckmt?g.Ckmt.v.val/100:0,x=E*j;
|
|
if(t=="DrSh"){var L=D.Um(x,E-x,!0),_=L.bd,c=L.pY;c.offset(R,O);jO.Kg(_,g,!1);jO.HQ(c,g,p,0);var e=N.U(c.n()*4);
|
|
jO.DS(e,g.Clr.v);N.ce(_,e,3);d={vM:e,iG:c,alH:g.layerConceals.v}}else if(t=="IrSh"){var L=D.Um(x,E-x,!1);
|
|
jO.HQ(L.pY,g,p,0);var c=D.rect().clone(),_=N.U(c.n());_.fill(255);N.vG(L.bd,L.pY,_,c);jO.Kg(_,g,!0);
|
|
var e=N.U(c.n()*4);jO.DS(e,g.Clr.v);N.ce(_,e,3);c.offset(R,O);d={vM:e,iG:c}}else if(t=="GrFl"){var e=N.U(D.rect().n()*4);
|
|
jO.A2(g,e,D.rect(),p,null,I);var c=D.rect().clone();c.offset(R,O);d={vM:e,iG:c}}else if(t=="SoFi"){var e=N.U(D.bd().length*4);
|
|
jO.DS(e,g.Clr.v);var c=D.rect().clone();c.offset(R,O);d={vM:e,iG:c}}else if(t=="ebbl"){var r=!1;if(r)console.log(g);
|
|
var B=Date.now(),F=g.bvlS.v.BESl;if(F=="strokeEmboss"){var v=W.frameFXMulti.v;if(v.length==0)continue;
|
|
v=v[0].v;if(!v.enab.v)continue;var X=v.Styl.v.FStl;if(X=="OutF")F="OtrB";if(X=="CtrF")F="Embs";if(X=="InsF")F="InrB"}var E=g.blur.v.val;
|
|
if(E==0)E=.7;if(F=="Embs"||F=="PlEb")E/=2;var V=["OtrB","InrB","Embs","PlEb","strokeEmboss"],H=["SfBL","PrBL","Slmt"],o=["In","Out"],J=g.bvlT.v.bvlT!="SfBL"?E:E*.45,C=Math.round(E),Y=D.rect().clone(),K=Y.clone();
|
|
K.x1(C,C);var u=K.e,f=K.Z,l=u*f,jk=N.U(l);N.vG(D.bd(),Y,jk,K);var hE=new Float64Array(l),Z=new Float64Array(l);
|
|
N.style._f(jk,hE,u,f);N.uA(jk);N.style._f(jk,Z,u,f);if(r)console.log("distTransform computed",Date.now()-B);
|
|
for(var Q=0;Q<l;Q++)Z[Q]=Z[Q]-hE[Q];for(var Q=0;Q<l;Q++){var aQ=Z[Q];if(aQ<-J)Z[Q]=-J;else if(aQ>J)Z[Q]=J}if(r)console.log("summing + cropping",Date.now()-B);
|
|
if(g.bvlT.v.bvlT=="SfBL"){var jC=Math.pow(E*.21,1.22);if(!0)jC=Math.max(jC,2);var eO=N.tO.K8(jC,2);N.tO.$_(Z,hE,K,eO[0]>>>1);
|
|
N.tO.$_(hE,Z,K,eO[1]>>>1)}if(r)console.log("blurring",Date.now()-B);var iU=Z,gK=iU.slice(0);if(g.useShape.v){var iM=Math.min(100,g.Inpr.v.val+1)/100;
|
|
if(F!="OtrB"&&F!="InrB")iM=1;var i5=N.Ey.AE(g.MpgS.v.Crv.v,2e3),fN=Math.round(2e3/iM);i5=N.Ey.aap(i5,fN,F=="InrB");
|
|
var dx=.5/J;for(var Q=0;Q<l;Q++){var ai=iU[Q],hO=.99999*(ai+J)*dx;iU[Q]=-J+2*J*i5[~~(hO*(fN-1))]}if(r)console.log("applying shape",Date.now()-B)}if(g.useTexture.v){var ff=N.U(u*f*4);
|
|
jO.AQ(g,ff,K,p.add.Patt,h);var eP=N.U(u*f);N.Zi(ff,eP);var a0=N.U(u*f);N.tO.Wr(eP,a0,K,1);eP=a0;var bM=E*g.textureDepth.v.val*(1/100)*(1/255);
|
|
if(g.InvT.v)bM=-bM;for(var Q=0;Q<l;Q++)iU[Q]+=-bM*eP[Q];if(r)console.log("applying texture",Date.now()-B)}var cV=(g.bvlT.v.bvlT=="SfBL"?1:.5)*(g.bvlD.v.BESs=="In"?1:-1)*g.srgR.v.val/100;
|
|
for(var Q=0;Q<l;Q++)iU[Q]*=cV;if(r)console.log("scaling",Date.now()-B);var aX=g.uglg&&g.uglg.v?p.NZ():g.lagl.v.val;
|
|
aX=aX*(Math.PI/180);var j8=g.uglg&&g.uglg.v?p.yp():g.Lald.v.val;j8=j8*(Math.PI/180);var j3=Math.cos(aX)*Math.cos(j8),am=-Math.sin(aX)*Math.cos(j8),fG=Math.sin(j8),bw=new Float64Array(l),fz=new Float64Array(l),c6=F=="PlEb";
|
|
for(var hk=0;hk<f;hk++)for(var as=0;as<u;as++){var Q=hk*u+as,bf=0,gW=0,j1=1;if(hk!=0&&hk!=f-1&&as!=0&&as!=u-1){var bZ=iU[Q-u-1],iL=iU[Q-u+1],jI=iU[Q+u-1],e2=iU[Q+u+1];
|
|
bf=-.125*(iL+2*iU[Q+1]+e2-(bZ+2*iU[Q-1]+jI));gW=-.125*(jI+2*iU[Q+u]+e2-(bZ+2*iU[Q-u]+iL))}else{var dV=iU[Q];
|
|
gW=-(hk==0?iU[Q+u]-dV:hk==f-1?dV-iU[Q-u]:.5*(iU[Q+u]-iU[Q-u]));bf=-(as==0?iU[Q+1]-dV:as==u-1?dV-iU[Q-1]:.5*(iU[Q+1]-iU[Q-1]))}var ds=1/Math.sqrt(bf*bf+gW*gW+1);
|
|
bf*=ds;gW*=ds;j1*=ds;var ij=bf*j3+gW*am+j1*fG,dg=ij;if(c6)dg=-bf*j3-gW*am+j1*fG;if(ij>0)bw[Q]=ij;if(dg>0)fz[Q]=dg}if(r)console.log("raycasting",Date.now()-B);
|
|
if(g.Sftn.v.val!=0){N.tO.Am(bw,hE,K,g.Sftn.v.val*.43);var iT=hE,hE=bw,bw=iT;if(c6){N.tO.Am(fz,hE,K,g.Sftn.v.val*.43);
|
|
var iT=hE,hE=fz,fz=iT}else N.WQ(bw,fz)}if(r)console.log("softening",Date.now()-B);var i5=N.Ey.AE(g.TrnS.v.Crv.v,1024);
|
|
for(var Q=0;Q<l;Q++){bw[Q]=i5[~~(bw[Q]*1024)];fz[Q]=i5[~~(fz[Q]*1024)]}if(r)console.log("contour remap",Date.now()-B);
|
|
u=Math.round(u);f=Math.round(f);var ej=N.U(u*f*4);jO.DS(ej,g.hglC.v);var eH=N.U(u*f*4);jO.DS(eH,g.sdwC.v);
|
|
var d4=N.U(u*f*4);jO.DS(d4,g.hglC.v);var jy=N.U(u*f*4);jO.DS(jy,g.sdwC.v);var iR=1/fG,cD=1/(1-fG),dx=1/J,cA=new Float64Array(1e3);
|
|
for(var Q=0;Q<1e3;Q++)cA[Q]=Math.pow(Q*.001,.2);for(var hk=0;hk<f;hk++)for(var as=0;as<u;as++){var Q=hk*u+as,d_=4*Q+3,d5=0,jl=0;
|
|
d5=bw[Q];jl=fz[Q];var dm=Math.max(0,Math.min(.9999,(gK[Q]+J*.993)*dx));dm=cA[Math.floor(dm*1e3)];var hK=dm*(1-Math.min(1,d5*iR)),jj=dm*(1-Math.min(1,(1-d5)*cD)),cf=dm*(1-Math.min(1,jl*iR)),h5=dm*(1-Math.min(1,(1-jl)*cD));
|
|
eH[d_]=Math.round(255*hK);ej[d_]=Math.round(255*jj);jy[d_]=Math.round(255*cf);d4[d_]=Math.round(255*h5)}if(r)console.log("baking textures",Date.now()-B);
|
|
K=D.rect().clone();K.x1(C,C);K.offset(R,O);d={atR:g.bvlS.v.BESl=="strokeEmboss"};var fn=hd.Gl(g.hglM.v.BlnM),aJ=g.hglO.v.val/100,bY=hd.Gl(g.sdwM.v.BlnM),gO=g.sdwO.v.val/100;
|
|
if(["InrB","Embs","PlEb"].indexOf(F)!=-1){d.wk={vM:ej,iG:K,Ah:fn,nC:aJ};d.HB={vM:eH,iG:K,Ah:bY,nC:gO}}if(["OtrB","Embs","PlEb"].indexOf(F)!=-1){d.qL={vM:d4,iG:K,Ah:fn,nC:aJ};
|
|
d.lu={vM:jy,iG:K,Ah:bY,nC:gO}}if(r)console.log(Date.now()-B)}else if(t=="patternFill"){var h6=D.rect(),e=N.U(h6.n()*4);
|
|
jO.AQ(g,e,h6,p.add.Patt,h);var c=h6.clone();c.offset(R,O);d={vM:e,iG:c}}else if(t=="ChFX"){var e=N.U(D.bd().length*4);
|
|
jO.DS(e,g.Clr.v);var E=g.blur.v.val,g4=D.rect().clone();g4.x1(E,E);var fB=N.U(g4.n()),jm=N.U(g4.n());
|
|
N.vG(D.bd(),D.rect(),jm,g4);N.tO.Gp(jm,fB,g4,E*.43);var hh=N.Ey.vm(g.MpgS.v.Crv.v,256,!0);N.YR(fB,hh);
|
|
var fv=N.U(D.bd().length),ik=N.U(D.bd().length),gP=D.rect().clone();jO.HQ(gP,g,p,0);N.vG(fB,g4,fv,gP);
|
|
gP=D.rect().clone();jO.HQ(gP,g,p,Math.PI);N.vG(fB,g4,ik,gP);var cU=fv.length;for(var Q=0;Q<cU;Q++)e[4*Q+3]=Math.abs(fv[Q]-ik[Q]);
|
|
if(g.Invr.v)for(var Q=0;Q<cU;Q++)e[4*Q+3]=255-e[4*Q+3];var c=D.rect().clone();c.offset(R,O);d={vM:e,iG:c}}else if(t=="OrGl"){var L;
|
|
if(g.GlwT.v.BETE=="SfBL")L=D.Um(x,E-x,!0);else L=D.a0B(E,j,!0);var _=L.bd,c=L.pY,dL=_.slice(0);jO.aiB(_,g);
|
|
var e=N.U(c.n()*4);if(g.Grad==null){jO.DS(e,g.Clr.v);jO.Kg(_,g,!1)}else{jO.Kg(_,g,null);var es={kR:_,C9:255,ME:0,zf:c};
|
|
jO.A2(g,e,c,p,es);var i6=g.Nose.v.val/100,ap=c.e;for(var Q=0;Q<dL.length;Q++){var ix=255,hT=dL[Q];if(hT<32){var bE=(hT+dL[Q-1]+dL[Q+1]+dL[Q-ap]+dL[Q+ap])*.2-1;
|
|
ix=Math.min(255,Math.round(Math.max(0,bE)*8))}_[Q]=ix}jO.agS(_,g)}N.ce(_,e,3);c.offset(R,O);d={vM:e,iG:c}}else if(t=="IrGl"){var L;
|
|
if(g.GlwT.v.BETE=="SfBL")L=D.Um(x,E-x,!1);else L=D.a0B(E,j,!1);var _=L.bd,c=L.pY;jO.aiB(_,g);if(g.glwS.v.IGSr=="SrcC")N.uA(_);
|
|
var e=N.U(c.n()*4);if(g.Grad==null){jO.DS(e,g.Clr.v);jO.Kg(_,g,!0)}else{jO.Kg(_,g,null);var es={kR:_,C9:255,ME:0,zf:c};
|
|
jO.A2(g,e,c,p,es);_.fill(255);jO.agS(_,g)}N.ce(_,e,3);c.offset(R,O);d={vM:e,iG:c}}else if(t=="FrFX"){var f7=jO.BJ(g),b6=f7[0],bJ=f7[1],c=D.rect().clone(),hu=null,fa=null;
|
|
c.x1(Math.ceil(P),Math.ceil(P));if(bJ>0){var L=D.Um(bJ,0,!0);fa=L.bd;if(fa.length<c.n()){fa=N.U(c.n());
|
|
N.vG(L.bd,L.pY,fa,c)}}if(b6>0){var L=D.Um(b6,0,!1);hu=N.U(c.n());hu.fill(255);N.vG(L.bd,L.pY,hu,c)}c.offset(R,O);
|
|
var e=N.U(c.n()*4),dP=g.PntT.v.FrFl;if(dP=="SClr")jO.DS(e,g.Clr.v);if(dP=="GrFl")jO.A2(g,e,c,p,D.agQ(b6,bJ));
|
|
if(dP=="Ptrn")jO.AQ(g,e,c,p.add.Patt,h);d={vM:e,iG:c,yi:fa,qO:hu}}b.type[t].push(d);if(t=="ebbl"){if(d.wk)b.all.push(d.wk,d.HB);
|
|
if(d.qL)b.all.push(d.qL,d.lu)}else{d.Ah=hd.Gl(g.Md.v.BlnM);d.nC=g.Opct.v.val/100,b.all.push(d)}}}return b};
|
|
jO.th=function(W){var h=1/Math.sqrt(W.x*W.x+W.y*W.y+W.jm*W.jm);W.x*=h;W.y*=h;W.jm*=h};jO.aj0=function(W,h){return{x:W.y*h.jm-W.jm*h.y,y:W.jm*h.x-W.x*h.jm,jm:W.x*h.y-W.y*h.x}};
|
|
jO.a3l=function(W,h){return W.x*h.x+W.y*h.y+W.jm*h.jm};jO.agS=function(W,h){var S=h.Nose.v.val/100;if(S>0)for(var Q=0;
|
|
Q<W.length;Q++){var k=W[Q];k=Math.min(510-(1+S)*N.style.Gf(Q),k);W[Q]=k}};jO.GL=function(W){var h=jO.Kn(),S=W.z3,k=!1;
|
|
for(var Q=0;Q<32;Q+=8)if(S[Q]+S[Q+1]+S[Q+4]+S[Q+5]!=0||S[Q+2]+S[Q+3]+S[Q+6]+S[Q+7]!=1020)k=!0;if(k){S=S.slice(0);
|
|
for(var Q=0;Q<40;Q+=4){var p=S[Q]/255,I=S[Q+1]/255,q=S[Q+2]/255,P=S[Q+3]/255;S[Q]=p-.001;S[Q+1]=p==I?1e6:1/(I-p);
|
|
S[Q+2]=q==P?-1e6:1/(q-P);S[Q+3]=P+.001}}var t=W.add.iOpa!=null?W.add.iOpa/255:h.fill,M=W.add.vstk;if(M&&!M.fillEnabled.v&&(!M.strokeEnabled.v||M.strokeStyleLineWidth.v.val==0))t=0;
|
|
return{fill:t,n$:k?S:null,sn:W.add.brst!=null?W.add.brst:h.sn,am$:W.add.knko!=null?W.add.knko:h.am$,style:!1,Q8:!1}};
|
|
jO.Kn=function(){return{fill:1,n$:null,sn:[1,1,1],am$:0,style:!1,Q8:!1}};jO.W4=function(W,h){if(h==null)return null;
|
|
var S=W.Idnt.v,k=W.Nm.v;for(var Q=0;Q<h.length;Q++)if(h[Q].id==S)return h[Q];for(var Q=0;Q<h.length;
|
|
Q++)if(h[Q].name==k)return h[Q];return null};jO.af1=function(W,h,S){var k=["patternFillMulti","ebblMulti","frameFXMulti"];
|
|
for(var Q=0;Q<k.length;Q++){var p=W.v[k[Q]].v;for(var I=0;I<p.length;I++)if(p[I].v.Ptrn)h.WX(jO.W4(p[I].v.Ptrn.v,S))}};
|
|
jO.a3e=function(W,h,S){var k=["patternFillMulti","ebblMulti","frameFXMulti"];for(var Q=0;Q<k.length;
|
|
Q++){var p=W.v[k[Q]].v;for(var I=0;I<p.length;I++)if(p[I].v.Ptrn){var q=p[I].v.Ptrn.v,P=jO.W4(q,S),t=jO.W4(q,h.add.Patt);
|
|
if(P==null&&t)S.push(t)}}};jO.AQ=function(W,h,S,k,p){var I=jO.W4(W.Ptrn.v,k);if(I!=null&&!S.ZP()){var q=I.jR,P=q[0],t=q[1],M=0;
|
|
N.wa(q);var U=(W.Scl?W.Scl.v.val:100)/100;while((U<.3||U==.5)&&q[M+2]){U*=t.e/q[M+3].e;M+=2;P=q[M];t=q[M+1]}var i=N.scale.AQ(P,t.e,t.Z),z=W.phase?W.phase.v:{Hrzn:{v:0},Vrtc:{v:0}},D=W.Angl?W.Angl.v.val:0,R=-S.x+z.Hrzn.v-1,O=-S.y+z.Vrtc.v-1;
|
|
if(W.Algn!=null&&!W.Algn.v){}else{R+=p.x;O+=p.y}N.scale.Dk(i,h,S.e,S.Z,U,U,R+1,O+1,D*Math.PI/180)}};
|
|
jO.A2=function(W,h,S,k,p,I){if(I==null)I=S;var q=W.Type?W.Type.v.GrdT:"shapeburst",P=W.Algn&&W.Algn.v?I:new gj(0,0,k.e,k.Z),t=W.Angl?N.X.ma(W,P):[new eC(0,0),new eC(100,0)],M=t[0].x,U=t[0].y,i=t[1].x-M,z=t[1].y-U,D=Math.sqrt(i*i+z*z);
|
|
D=1/(2*D*D);var R=[i*D,z*D,-z*D,i*D],O=W.Rvrs?W.Rvrs.v:!1,b=W.Dthr?W.Dthr.v:!1;N.X.S3(W.Grad.v,h,S,R,M,U,O,hz.X.types.indexOf(q),0,0,p,b)};
|
|
jO.abc=function(W,h,S){for(var Q=0;Q<W.all.length;Q++){var k=W.all[Q];k.lI=k.iG.clone();k.lI.offset(h,S)}};
|
|
jO.a6H=function(W,h,S,k,p,I){var q=n.O9?jO.a6r:jO.ach;jO.abc(h,S.x,S.y);var P=h.type.DrSh;for(var Q=0;
|
|
Q<P.length;Q++)if(!P[Q].alH)q(P[Q],k,p,I)};jO.asv=function(W,h,S,k,p,I,q,P,t,M){var U=S,i=n.O9?jO.a6r:jO.ach,z=n.O9?n.a.DM:N.a.HH,D;
|
|
D=h.type.DrSh;for(var Q=0;Q<D.length;Q++)if(D[Q].alH)i(D[Q],k,p,I);D=h.type.OrGl;for(var Q=0;Q<D.length;
|
|
Q++)i(D[Q],k,p,I);var R="patternFill GrFl SoFi ChFX IrGl IrSh".split(" ");for(var O=0;O<R.length;O++){var D=h.type[R[O]];
|
|
for(var Q=0;Q<D.length;Q++)i(D[Q],q,U,I)}var b=h.type.ebbl[0],w=b!=null&&b.atR;D=h.type.FrFX;for(var Q=0;
|
|
Q<D.length;Q++){var A=D[Q];gk.OE.vG(P,M,t,M,I);i(A,t,M,I);if(w&&Q==D.length-1){if(b.lu)i(b.lu,t,M,I);
|
|
if(b.qL)i(b.qL,t,M,I);if(b.HB)i(b.HB,t,M,I);if(b.wk)i(b.wk,t,M,I)}if(A.qO||A.cn)z(t,M,q,U,n.O9?A.cn:A.qO,A.lI,0,I,1);
|
|
if(A.yi||A.Pa)z(t,M,k,p,n.O9?A.Pa:A.yi,A.lI,0,I,1)}if(!w&&b!=null){if(b.lu)i(b.lu,k,p,I);if(b.qL)i(b.qL,k,p,I);
|
|
if(b.HB)i(b.HB,q,U,I);if(b.wk)i(b.wk,q,U,I)}};jO.ach=function(W,h,S,k){var p=jO.Kn();p.fill=W.nC;p.style=!0;
|
|
N.a.ha(W.Ah,W.vM,W.lI,h,S,k,1,p)};jO.a6r=function(W,h,S,k){var p=jO.Kn();p.fill=W.nC;p.style=!0;n.a.SK(W.Ah,W.er,W.lI,h,S,k,1,p)};
|
|
jO.aiB=function(W,h){var S=1-h.Inpr.v.val/100,k=1+Math.tan(S*(Math.PI/2)),p=W.length;for(var Q=0;Q<p;
|
|
Q++)W[Q]=Math.min(255,Math.round(W[Q]*k))};jO.Kg=function(W,h,S){var k=h.blur.v.val,p=Math.round(k*(h.Ckmt.v.val/100));
|
|
if(k>p){var I=N.Ey.vm(h.TrnS.v.Crv.v,256,!0);N.YR(W,I)}if(S!=null&&h.Nose.v.val>0)N.style.$J(W,h.Nose.v.val/100,S)};
|
|
jO.DS=function(W,h,S){if(S==null)S=255;var k=N.X.iZ(h),p=S<<24|k.S<<16|k.z<<8|k.p,I=new Uint32Array(W.buffer);
|
|
I.fill(p)};jO.HQ=function(W,h,S,k){var p=h.uglg&&h.uglg.v?S.NZ():h.lagl.v.val;p=p*Math.PI/180+k;var I=Math.cos(p)*h.Dstn.v.val,q=Math.sin(p)*h.Dstn.v.val;
|
|
W.x-=Math.round(I);W.y+=Math.round(q)};jO.k1=function(W){if(W==null)return null;var h=W.frameFXMulti.v;
|
|
if(h.length==0)return null;h=h[0].v;var S=JSON.parse(JSON.stringify(hz.EJ.default));jO.a3h(h,S);return S};
|
|
jO.a3h=function(W,h){var S=hz.stroke._7.indexOf(W.PntT.v.FrFl),k=[hz.RN,hz.Y1,hz.pd][S],p=h.strokeStyleContent.v={classID:hz.EJ.Dn[S]};
|
|
for(var Q=0;Q<k.length;Q++)p[k[Q]]=W[k[Q]];h.strokeEnabled=W.enab;h.strokeStyleLineWidth=W.Sz;h.strokeStyleLineAlignment.v.strokeStyleLineAlignment=hz.EJ.tZ[hz.stroke.types.indexOf(W.Styl.v.FStl)];
|
|
h.strokeStyleOpacity=W.Opct;h.strokeStyleBlendMode=W.Md};jO.rq=function(W,h){var S=[];for(var Q=0;Q<W.length;
|
|
Q++)S.push({t:"UntF",v:{type:"#Nne",val:Math.round(W[Q]*h)}});return S};jO.fW=function(W,h,S,k){this.TD=h.clone();
|
|
this.a4F=h.clone();this.a4F.x1(S,S);if(k){this.TD.x1(1,1);this.ls=N.U(this.TD.n());N.vG(W,h,this.ls,this.TD)}else this.ls=W;
|
|
this.HT=null;this.IL=null;this.cg=null};jO.fW.prototype.bd=function(){return this.ls};jO.fW.prototype.rect=function(){return this.TD};
|
|
jO.fW.prototype.X3=function(){return this.a4F};jO.fW.prototype.cU=function(){if(this.HT)return this.HT;
|
|
this.HT=this.bd().slice(0);N.uA(this.HT);return this.HT};jO.fW.prototype.JZ=function(){if(this.IL)return this.IL;
|
|
this.IL=new Float64Array(this.rect().n());N.style._f(this.cU(),this.IL,this.rect().e,this.rect().Z);
|
|
return this.IL};jO.fW.prototype.Ke=function(){if(this.cg)return this.cg;var W=this.X3(),h=N.U(W.n());
|
|
N.vG(this.bd(),this.rect(),h,W);this.cg=new Float64Array(W.n());N.style._f(h,this.cg,W.e,W.Z);return this.cg};
|
|
jO.fW.prototype.agQ=function(W,h){var S={C9:-h,ME:W,zf:null,kR:null};if(h==0){S.zf=this.rect();S.kR=this.JZ();
|
|
return S}var k=this.Ke().slice(0),p=this.X3();S.zf=p;S.kR=k;for(var Q=0;Q<k.length;Q++)k[Q]=-k[Q];if(W==0)return S;
|
|
var I=this.JZ(),q=this.rect();for(var P=0;P<q.Z;P++)for(var t=0;t<q.e;t++){var M=P*q.e+t,U=(P+q.y-p.y)*p.e+t+q.x-p.x;
|
|
k[U]+=I[M]}return S};jO.fW.prototype.Um=function(W,h,S){var k=Math.ceil(W+h),p={pY:this.rect().clone(),bd:null};
|
|
p.pY.x1(k,k);p.bd=N.U(p.pY.n());if(W==0&&h==0)N.WQ(S?this.bd():this.cU(),p.bd);else{var I=N.U(p.pY.n());
|
|
N.vG(this.bd(),this.rect(),I,p.pY);if(!S)N.uA(I);if(W!=0){if(S)N.style.WR(I,p.pY,this.Ke(),this.X3(),W);
|
|
else N.style.WR(I,p.pY,this.JZ(),this.rect(),W)}if(h!=0)N.tO.Gp(I,p.bd,p.pY,Math.max(1,h*.43));else p.bd=I}return p};
|
|
jO.fW.prototype.a0B=function(W,h,S){var k=W*(h-.5),p={pY:this.rect().clone(),bd:null};if(S)p.pY.x1(W,W);
|
|
p.bd=N.U(p.pY.n());var I=p.pY.e,q=p.pY.Z,P=S?this.Ke():this.JZ(),t=S?this.X3():this.rect(),M=p.pY,U=M.r$(t),I=U.e,q=U.Z,i=U.x-M.x,z=U.y-M.y,D=U.x-t.x,R=U.y-t.y,O=1-h*2;
|
|
for(var b=0;b<q;b++)for(var w=0;w<I;w++){var A=P[(b+R)*t.e+w+D],g=A/W;p.bd[(b+z)*M.e+w+i]=Math.max(0,Math.min(255,255-255*((g+O)/(1+O))))}return p};
|
|
jO.abF=function(W,h,S){var k=W.Lefx,p=W.blendOptions;if(k){var I=h.add.lmfx;if(S==null)S=I?I.Scl.v.val:100;
|
|
h.add.lmfx=JSON.parse(JSON.stringify(k.v));if(h.add.lmfx.Scl==null)h.add.lmfx.Scl={t:"UntF",v:{type:"#Prc",val:100}};
|
|
jO.sg(h.add.lmfx,S/h.add.lmfx.Scl.v.val);if(I)h.add.lmfx.Scl.v.val=I.Scl.v.val}else delete h.add.lmfx;
|
|
if(p){p=p.v;if(p.Md)h.oO=hd.Gl(p.Md.v.BlnM);if(p.Opct)h.opacity=Math.round(p.Opct.v.val*255/100);if(p.fillOpacity)h.add.iOpa=Math.round(p.fillOpacity.v.val*255/100);
|
|
if(p.Blnd){var q=[];for(var Q=0;Q<10;Q++)q.push(0,0,255,255);var P=p.Blnd.v,t="SrcB Srcl SrcW Srcm DstB Dstl DstW Dstt".split(" ");
|
|
for(var Q=0;Q<P.length;Q++){var M=P[Q].v,U=8*["Gry","Rd","Grn","Bl"].indexOf(M.Chnl.v[0].v.enum);for(var i=0;
|
|
i<8;i++){q[U+i]=M[t[i]].v}}h.z3=q}}};jO.auu=function(W){var h="SrcB Srcl SrcW Srcm DstB Dstl DstW Dstt".split(" "),S=[],k=W.z3;
|
|
for(var Q=0;Q<4;Q++){var p=Q*8;if(k[p]+k[p+1]+k[p+4]+k[p+5]==0&&k[p+2]+k[p+3]+k[p+6]+k[p+7]==4*255)continue;
|
|
var I={t:"Objc",v:{classID:"Blnd",Chnl:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:["Gry","Rd","Grn","Bl"][Q]}}]}}};
|
|
S.push(I);for(var q=0;q<8;q++)I.v[h[q]]={t:"long",v:k[Q*8+q]}}var P={classID:"blendOptions"};if(W.oO!="norm")P.Md={t:"enum",v:{BlnM:hd.iN(W.oO)}};
|
|
if(W.opacity!=255)P.Opct={t:"UntF",v:{type:"#Prc",val:Math.round(W.opacity*100/255)}};if(W.add.iOpa!=null)P.fillOpacity={t:"UntF",v:{type:"#Prc",val:Math.round(W.add.iOpa*100/255)}};
|
|
if(S.length!=0)P.Blnd={t:"VlLs",v:S};var t={q2:{classID:"null",Idnt:{t:"TEXT",v:jg.bm()+"-bd9f-11d5-b8ba-b73f8571793d"},Nm:{t:"TEXT",v:"Custom Style"}},dS:{classID:"Styl",blendOptions:{t:"Objc",v:P}}},M=W.add.lmfx;
|
|
if(M)t.dS.Lefx={t:"Objc",v:M};return t};function gI(){}gI.aZ=function(W){return JSON.parse(JSON.stringify(W))};
|
|
gI.S0=function(W){var h=gI.aZ(gI.an3),S=h.Brsh.v;if(W!=null){delete S.Hrdn;S.classID="sampledBrush";
|
|
S.Nm={t:"TEXT",v:"layer.png"},S.sampledData={t:"TEXT",v:W}}return h};gI.an3={classID:"brushPreset",Nm:{t:"TEXT",v:"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}};
|
|
gI.th={};gI.th.check=function(W){var h=gI.th.pZ;for(var Q=0;Q<h.length;Q++)if(W[h[Q]]==null)W[h[Q]]=JSON.parse(gI.th.RJ[h[Q]]);
|
|
var S=[];for(var Q=0;Q<h.length;Q++)S.push(h[Q]);var k=gI.th.a61;for(var Q=0;Q<k.length;Q++){var p=k[Q][0],I=k[Q][1],q=!0;
|
|
for(var P=0;P<p.length;P++)q=q&&W[p[P]].v==!0;if(q)for(var P=0;P<I.length;P++){if(W[I[P]]==null)console.log("Missing conditional parameter "+I[P]);
|
|
else S.push(I[P])}}for(var t in W)if(S.indexOf(t)==-1)console.log("Extra parameter "+t);W=W.Brsh.v;h=gI.th._n.pZ;
|
|
for(var Q=0;Q<h.length;Q++)if(W[h[Q]]==null)W[h[Q]]=JSON.parse(gI.th._n.RJ[h[Q]]);S=[];for(var Q=0;Q<h.length;
|
|
Q++)if(W[h[Q]])S.push(h[Q]);else console.log("Missing default parameter "+h[Q]);k=gI.th._n.ab6[W.classID];
|
|
for(var Q=0;Q<k.length;Q++)if(W[k[Q]]==null&&k[Q]!="dtipsGridSize"&&k[Q]!="dtipsErodibleTipHeightMap"&&W.a3R!=1)console.log("Missing conditional parameter "+k[Q]);
|
|
else S.push(k[Q]);for(var t in W)if(S.indexOf(t)==-1)console.log("Extra parameter "+t)};gI.th.hU=function(W){var h=gI.th.a61;
|
|
for(var Q=0;Q<h.length;Q++){var S=h[Q][0],k=h[Q][1],p=!0;for(var I=0;I<S.length;I++)p=p&&W[S[I]]&&W[S[I]].v==!0;
|
|
if(p){for(var I=0;I<k.length;I++)if(W[k[I]]==null){W[k[I]]=JSON.parse(gI.th.RJ[k[I]])}}else for(var I=0;
|
|
I<k.length;I++)if(W[k[I]]!=null){delete W[k[I]]}}};gI.th._n={};gI.th._n.pZ="classID Dmtr Angl Spcn Intr flipX flipY".split(" ");
|
|
gI.th._n.RJ={flipX:"{\"t\":\"bool\",\"v\":false}",flipY:"{\"t\":\"bool\",\"v\":false}"};gI.th._n.ab6={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(" ")};
|
|
gI.th.a61=[[["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"]]];
|
|
gI.th.pZ="classID Nm Brsh useTipDynamics usePaintDynamics useColorDynamics useScatter useTexture useBrushSize useBrushPose Wtdg Nose Rpt dualBrush brushGroup".split(" ");
|
|
gI.th.RJ={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\":2},\"fStp\":{\"t\":\"long\",\"v\":1},\"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\":25},\"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\":25},\"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\":2},\"fStp\":{\"t\":\"long\",\"v\":25},\"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\":25},\"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\":25},\"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\":25},\"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\":25},\"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\":1},\"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\":1},\"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\":25},\"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 hY(W,h){this.aao=W;this.j3=h==null?0:h;this.dir=0}hY.prototype.jr=function(W,h){var S=this.aao,k=new eC(W.x-S.x,W.y-S.y),p=new ex;
|
|
p.rotate(-this.j3);k=p.xK(k);if(this.dir==0&&!S.xX(W))this.dir=Math.abs(k.x)<Math.abs(k.y)?1:2;if(h.j(hW.YS)){if(this.dir==1)k.x=0;
|
|
if(this.dir==2)k.y=0}p.uA();k=p.xK(k);var I=new eC(S.x+k.x,S.y+k.y);return I};var dC=function(){function W(){this.apz={}}W.agg=function(h,S){var k=h.clone();
|
|
k.y8-=Math.floor(k.y8);k.S8-=Math.floor(k.S8);var p=new eC(S,0),I=new eC(0,S),q=k.xK(p),P=k.xK(I),t=new eC(k.y8,k.S8);
|
|
return[q,P,t]};W.amB=function(h,S){var k=eC.fa;return k(h[0],S[0])+k(h[1],S[1])+k(h[2],S[2]);return dsum};
|
|
W.prototype.aq_=function(h){var S=this.apz,k=S[h];if(k==null)k=S[h]={Bp:[],ks:0,n:0,alC:0,a3j:0};k.ks=Date.now();
|
|
while(Object.keys(S).length>3){var p="",I=Date.now();for(var q in S){var P=S[q].ks;if(P<I){I=P;p=q}}delete S[p]}return k};
|
|
W.prototype.aie=function(h,S){var k=h.Bp,p,I=1e6;for(var Q=0;Q<k.length;Q++){var q=k[Q],P=W.amB(q.JJ,S);
|
|
if(P<I){p=q;I=P}}return p};W.prototype.aha=function(h,S){var k=h.Bp;k.push(S);h.n+=S.rect.n();if(k.length>1e3||h.n>100*100*1600){console.log("pruning",h.n,k.length);
|
|
k.sort(function(I,q){return q.ks-I.ks});while(k.length>500||h.n>100*100*800){var p=k.pop();h.n-=p.rect.n()}}};
|
|
return W}();function go(W,h,S,k,p,I,q,P,t){this.jE=h;this.cc=S;this.lL=I;this.cM=k;if(k.po==null)k.po=[!1,!0];
|
|
this.ol=null;this.XF=null;this.Jz=0;this.ae9=0;this.a3_=0;this.Vj=0;this.Ki=t==null?Math.floor(Math.random()*16777215):t;
|
|
this.adk=t==null?Math.floor(Math.random()*16777215):t;this.rc=new gj;this.oC=new gj;if(P!=null){this.vM=P}else{var M=go.ar9;
|
|
if(M.length!=q.n()*4)M=N.U(q.n()*4);else M.fill(0);this.vM=go.ar9=M}this.rect=q.clone();this.$P=[];this.Xz=[];
|
|
this.iH=null;this.Ps=0;this.S=null;this.adn="";this.MX=null;this.aeb(W,p)}go.ar9=N.U(16);go.prototype.aeb=function(W,h){this.Ps=h;
|
|
this.S=W;this.adn=JSON.stringify(W)+JSON.stringify(this.cM.Ow);this.MX=go.a7r(W,this.jE,this.cc)};go.prototype.moveTo=function(W,h,S){S=this.aqP(S);
|
|
this.Jz=S;var k=new eC(W,h),p=this.S.Brsh.v.Dmtr.v.val;this.ol=k.clone();this.XF=k.clone();this.iH=k.clone();
|
|
this.$P=[W,h];this.Xz=[S];var I=this.cM.po;if(this.cM.jW!=go.MF){var q=this.S.angleDynamics,P=q?q.v.bVTy.v==6:!1;
|
|
this.M0(P?new gj:this.a5c(k,this.a0e()*(I[1]?S:1),this.cM.YH*(I[0]?S*.5:1),new eC(0,0)))}this.Vj=k.clone()};
|
|
go.prototype.lineTo=function(W,h,S){S=this.aqP(S);var k=this.$P,p=k.length,I=k[p-2],q=k[p-1];if(W==I&&h==q)return;
|
|
var P=this.S.Brsh.v.Dmtr.v.val,t=Math.ceil(P)+1,M=new gj(Math.round(I),Math.round(q),0,0);M.x1(t,t);
|
|
var U=new gj(Math.round(W),Math.round(h),0,0);U.x1(t,t);this.$P.push(W,h);this.Xz.push(S);p+=2;if(p>=6)this.M0(this.a7q(p))};
|
|
go.prototype.aqP=function(W){if(W==null)W=1;W=Math.max(.05,Math.min(5,W));if(isNaN(W)){alert("Pressure is not a number");
|
|
throw"e"}return W};go.prototype.M0=function(W){this.rc=W;this.oC=this.oC.r8(W)};go.prototype.finish=function(){var W=this.$P,h=W.length,S;
|
|
if(h==4)S=this.acj(W[h-2],W[h-1],this.Xz[(h>>1)-1],!0);if(h>4)S=this.a7q(h+2);if(S)this.M0(S)};go.prototype.wT=function(){return this.rect.clone()};
|
|
go.prototype.IK=function(){return this.rc.r$(this.rect)};go.prototype.Oe=function(){return this.oC.r$(this.rect)};
|
|
go.prototype.et=function(){return this.vM};go.prototype.a7q=function(W){var h=this.$P,S=this.Xz,k=h[W-6],p=h[W-5],I=h[W-4],q=h[W-3],P=S[(W>>1)-3],t=S[(W>>1)-2],M=new eC(0,0),U=new eC(0,0);
|
|
if(8<=W)M=go.akd(h[W-8],h[W-7],k,p,I,q);if(W<=h.length)U=go.akd(h[W-2],h[W-1],I,q,k,p);var i=k+M.x,z=p+M.y,D=I+U.x,R=q+U.y,O=new gj;
|
|
for(var Q=0;Q<10;Q++){var b=(Q+1)*.1,w=1-b,A=w*w*w*k+3*b*w*w*i+3*b*b*w*D+b*b*b*I,g=w*w*w*p+3*b*w*w*z+3*b*b*w*R+b*b*b*q,E=this.acj(A,g,P+b*(t-P));
|
|
O=O.r8(E)}return O};go.akd=function(W,h,S,k,p,I){var q=W-S,P=h-k,t=p-S,M=I-k,U=Math.sqrt(q*q+P*P),i=Math.sqrt(t*t+M*M),z=Math.acos((q*t+P*M)/(U*i))/Math.PI,D=.35,R=.1;
|
|
z=R+z*(D-R);var O=p-W,b=I-h,w=Math.sqrt(O*O+b*b),A=z*i/w;return new eC(O*A,b*A)};go.prototype.acj=function(W,h,S,k){var p=new gj,I=this.cM.a97;
|
|
if(I==null)I=0;if(I==0||k){p=this.amK(W,h,S);return p}var q=this.iH,P=W-q.x,t=h-q.y,M=Math.sqrt(P*P+t*t);
|
|
P/=M;t/=M;if(M>I){var U=q.x+P*(M-I),i=q.y+t*(M-I);p=this.amK(U,i,S);this.iH.Yh(U,i)}return p};go.prototype.amK=function(W,h,S){var k=new gj,p=new eC(W,h),I=this.S.Brsh.v.Dmtr.v.val,q=this.cM.jW,P=p.Xy(this.XF);
|
|
P.normalize(1);var t=eC.fa(this.XF,p),M=-this.ae9,U=this.XF.clone(),i=this.cM.po;while(!0){var z=this.Jz+(S-this.Jz)*(Math.max(0,M)/t),D=this.a0e()*(i[1]?z:1),R=this.a5B()*(D+this.a3_)/2*this.MX.a6k;
|
|
if(q==go.MF)R=1;if(M+R<t){M+=R;var O=new eC(this.XF.x+P.x*M,this.XF.y+P.y*M),A=1;if(q==go.MF){var b=U.clone();
|
|
b.x+=P.x>0?1:-1;var w=U.clone();w.y+=P.y>0?1:-1;if(eC.fa(b,O)<eC.fa(w,O))O=b;else O=w;M=eC.fa(O,this.XF)}if(this.S.useScatter.v==!0){A=this.S.Cnt.v;
|
|
var g=this.S.countDynamics.v.jitter.v.val/100,E=g*(-1+2*this.jl());A+=Math.round(A*E)}for(var Q=0;Q<A;
|
|
Q++){var j=this.a5c(O,D,this.cM.YH*(i[0]?z*.5:1),P);k=k.r8(j)}U=O}else break}this.ae9=t-M;this.XF=p;
|
|
this.Jz=S;return k};go.prototype.a5B=function(){var W=this.S.Brsh.v,h=W.Spcn.v.val,S=Math.max(5,W.Rndn.v.val);
|
|
return S/100*(h/100)};go.prototype.a0e=function(){var W=this.S,h=W.Brsh.v.Dmtr.v.val;if(W.useTipDynamics.v){var S=h*(W.minimumDiameter.v.val/100);
|
|
h=S+(h-S)*(1-this.jl(this.adk)*(W.szVr.v.jitter.v.val/100))}return h};go.prototype.a5c=function(W,h,S,k){S=Math.min(1,S);
|
|
var p=this.S,I=this.S.Brsh.v,q=I.Dmtr.v.val,P=this.cM,t=P.jW,M=P.ajN,U=this.MX.jR[1],i=new ex;i.translate(-U.e/2,-U.Z/2);
|
|
i.scale(1/this.MX.akz,1/this.MX.akz);i.scale(h/q,h/q);i.scale(1,Math.max(5,I.Rndn.v.val)/100);if(p.useTipDynamics.v){var z=p.angleDynamics.v,D=p.minimumRoundness.v.val/100;
|
|
i.scale(1,D+(1-D)*Math.round(100-this.jl()*p.roundnessDynamics.v.jitter.v.val)/100);i.rotate((-.5+this.jl())*4*Math.PI*(z.jitter.v.val/100));
|
|
if(z.bVTy.v==6)i.rotate(Math.atan2(-k.y,k.x))}i.rotate(I.Angl.v.val*(Math.PI/180));if(p.useScatter.v){var R=(-1+2*this.jl())*p.scatterDynamics.v.jitter.v.val/100;
|
|
i.translate(-R*h*k.y,R*h*k.x)}i.translate(W.x,W.y);var O=this.aq5(i,W,h),b=O.rect.clone();if(t==null){var w=this.JQ(p);
|
|
N.wM(O.hW,Math.round(w.S*255)<<16|Math.round(w.z*255)<<8|Math.round(w.p*255)<<0,4278190080);if(this.oC.ZP()&&this.rect.xX(O.rect)&&S==1)this.vM=O.hW.slice(0);
|
|
else N.a.aaW(O.hW,O.rect,this.vM,this.rect,O.rect,S)}if(t==go.MF){var A=new eC(O.rect.x+O.rect.e/2,O.rect.y+O.rect.Z/2),g=Math.round(A.x-this.Vj.x),E=Math.round(A.y-this.Vj.y),j=O.rect.clone();
|
|
j.offset(-g,-E);var x=j.r$(this.rect);x.offset(g,E);N.zt(this.vM,this.rect,O.hW,j);N.a.tW(O.hW,O.rect,this.vM,this.rect,O.wN,O.rect,S)}if(t==go.ER||t==go.WC||t==go.A7){var d=O.rect.r$(this.rect),L;
|
|
if(d.xX(O.rect))L=O.wN;else{L=N.U(d.n());N.vG(O.wN,O.rect,L,d)}var _=N.U(d.n()*4);N.zt(this.vM,this.rect,_,d);
|
|
if(t==go.WC){var T=_.slice(0),c=N.pG.Qi([-1,-1,-1,-1,25,-1,-1,-1,-1]);N.pG.kS(_,T,d.e,d.Z,c,0);N.WQ(T,_)}else if(t==go.A7){var e=hw.QE("UnsM");
|
|
e.Amnt.v.val=15;e.Thsh.v=0;e.Rds.v.val=5;var T=N.U(_.length);hw.K1("UnsM",{buffer:_,rect:d},e,0,0,{buffer:T,rect:d});
|
|
N.WQ(T,_)}else{hw.Qw(1,N.tO.d1,_,d)}N.a.tW(_,d,this.vM,this.rect,L,d,S)}this.a3_=h;this.Vj=A;this.adk++;
|
|
return b};go.prototype.JQ=function(W){var h=go.acO(this.Ps);if(W.useColorDynamics&&W.useColorDynamics.v){var S=1-this.jl()*W.clVr.v.jitter.v.val/100,k=go.acO(this.lL);
|
|
h.p=S*h.p+(1-S)*k.p;h.z=S*h.z+(1-S)*k.z;h.S=S*h.S+(1-S)*k.S;var p=(-.5+this.jl())*W.H.v.val/100,I=(-1+2*this.jl())*W.Strt.v.val/100,q=(-1+2*this.jl())*W.Brgh.v.val/100,P=N.ZY(h.p,h.z,h.S);
|
|
P.R_=(P.R_+p+1)%1;P.Nx=P.Nx+I;if(P.Nx<0)P.Nx=-P.Nx;if(P.Nx>1)P.Nx=1-(P.Nx-1);P.Fv=P.Fv+q;if(P.Fv<0)P.Fv=-P.Fv;
|
|
if(P.Fv>1)P.Fv=1-(P.Fv-1);h=N.qu(P.R_,P.Nx,P.Fv)}return h};go.prototype.th=function(W){return Math.max(0,Math.min(1,W))};
|
|
go.prototype.jl=function(W){if(W==null){W=this.Ki++}return go.hash(W)};go.acO=function(W){return{p:(W>>16&255)/255,z:(W>>8&255)/255,S:(W>>0&255)/255}};
|
|
go.hash=function(W){W=W^61^W>>16;W=W+(W<<3);W=W^W>>4;W=W*668265261;W=W^W>>15;return(W&16777215)/16777215};
|
|
go.acZ=new dC;go.prototype.aq5=function(W,h,S){var k=Math.sqrt(this.MX.jR[1].n()),p=k*W.Nc(),I=p<10?1:p<50?1.5:p<200?3:8,q=go.acZ,P=q.aq_(this.adn),t=this.cM.Ow;
|
|
if(t){W=W.clone();W.y8=Math.floor(W.y8);W.S8=Math.floor(W.S8)}var M=dC.agg(W,k),U=q.aie(P,M);if(U&&dC.amB(U.JJ,M)>I)U=null;
|
|
if(U){U.rect.x=Math.round(U.a5l.x+W.y8);U.rect.y=Math.round(U.a5l.y+W.S8);if(t){U.rect.x=Math.round(h.x-U.rect.e/2);
|
|
U.rect.y=Math.round(h.y-U.rect.Z/2)}U.ks=Date.now()}else{var i=Math.round(this.S.Brsh.v.Dmtr.v.val),z;
|
|
if(t&&i<=3){z={buffer:N.U(i*i*4),rect:new gj(Math.round(h.x-i/2),Math.round(h.y-i/2),i,i)};N.wM(z.buffer,4278190080)}else if(W.S4==1&&W.S==0&&W.ZB==0&&W.Bq==1){z={buffer:this.MX.jR[0],rect:this.MX.jR[1].clone()};
|
|
z.rect.x=Math.round(W.y8);z.rect.y=Math.round(W.S8)}else z=a.Q.ry(this.MX.jR,W);if(t){for(var Q=0;Q<z.buffer.length;
|
|
Q++)z.buffer[Q]=z.buffer[Q]>127?255:0}if(z==null)z={buffer:N.U(0),rect:new gj};U={hW:z.buffer,wN:N.U(z.rect.n()),rect:z.rect,a5l:new eC(z.rect.x-W.y8,z.rect.y-W.S8),JJ:M,ks:Date.now()};
|
|
N.sN(U.hW,U.wN,3);if(P)q.aha(P,U)}return U};go.a7r=function(W,h,S){var k,p,I,q=W.Brsh.v.Dmtr.v.val;if(W.Brsh.v.classID=="computedBrush"){var P=W.Brsh.v.Hrdn.v.val/100,t=1+.55*(1-P);
|
|
p=q<100?1.2:1;I=1;var M=Math.round(p*q*t),U=new gj(0,0,M,M),i=N.U(M*M*4),z=new Uint32Array(i.buffer);
|
|
k=[i,U];var D=M/2,R=t/D,O=Date.now(),b=go.Wn(P),w=Math.round(8e3/D),h=b[0],A=b[1]-w,g=b[2]+w,E=Math.min(M,(M>>>1)+1);
|
|
for(var Q=0;Q<E;Q++){var j=R*(Q-D+.25);j*=j;var x=R*(Q-D+.75);x*=x;var d=Q*M,L=(M-1-Q)*M;for(var _=0;
|
|
_<E;_++){var T=R*(_-D+.25),c=Math.floor(Math.sqrt(T*T+j)*(4e3/1.55));if(g<c)continue;else if(c<A){var e=4278190080;
|
|
while(_<E){var r=M-1-_;z[d+_]=e;z[d+r]=e;z[L+_]=e;z[L+r]=e;_++}break}else{var B=R*(_-D+.75),F=Math.floor(Math.sqrt(B*B+j)*(4e3/1.55)),v=Math.floor(Math.sqrt(T*T+x)*(4e3/1.55)),X=Math.floor(Math.sqrt(B*B+x)*(4e3/1.55)),e=~~(.5+255*.25*(h[c]+h[F]+h[v]+h[X]))<<24,r=M-1-_;
|
|
z[d+_]=e;z[d+r]=e;z[L+_]=e;z[L+r]=e}}}}if(W.Brsh.v.classID=="sampledBrush"){var V;for(var Q=0;Q<h.length;
|
|
Q++)if(h[Q].id==W.Brsh.v.sampledData.v)V=h[Q];k=V.jR;var U=k[1];p=Math.max(U.e,U.Z)/q;I=Math.min(U.e,U.Z)/Math.max(U.e,U.Z)}return{akz:p,a6k:I,jR:k}};
|
|
go.l2=[];go.Wn=function(W){if(go.l2[W])return go.l2[W];var h=Math.pow(W,.55),S=new Float64Array(8e3),k=0,p=8e3;
|
|
for(var Q=0;Q<8e3;Q++){var I=go.aex(Q*(1.55/4e3),h);if(I>=1)k=Q;else if(I<=0&&p==8e3)p=Q;S[Q]=I}var q=[S,k,p];
|
|
go.l2[W]=q;return q};go.aex=function(W,h){var S=W<h?1:go.apN((W-h)/Math.pow(1.001-h,.86));return S};
|
|
go.apN=function(W){var h=W*.85;return Math.exp(-(h*h)*(1/(2*.4*.4)))*(1/(.4*Math.sqrt(2*Math.PI)))};
|
|
go.N=null;go.ds=null;go.qP=function(W,h,S,k,p,I){var q=go.N,P=go.ds;if(q==null){go.N=q=document.createElement("canvas");
|
|
go.ds=P=q.getContext("2d")}if(I==null)I=k;if(q.width!=I||q.height!=p){q.width=I;q.height=p}else P.clearRect(0,0,I,p);
|
|
P.fillStyle="#000000";P.font=Math.floor(10*a.F())+"px sans-serif";var t=W.Brsh.v.Dmtr.v.val,M=""+t,U=P.measureText(M);
|
|
P.fillText(M,(k-U.width)/2,p-2);var i=k,z=p-10*a.F(),D=Math.min(i,z),R=W.Brsh.v.classID;if(R=="computedBrush"){P.translate(i/2,z/2);
|
|
P.rotate(-W.Brsh.v.Angl.v.val*Math.PI/180);P.scale(1,.1+.9*W.Brsh.v.Rndn.v.val/100);var O=Math.min(.95*D/2,t/2)+.5,b=.9*W.Brsh.v.Hrdn.v.val/100,w=P.createRadialGradient(0,0,0,0,0,O);
|
|
w.addColorStop(b,"rgba(0,0,0,1)");w.addColorStop((.5+b)/1.5,"rgba(0,0,0,.5)");w.addColorStop(1,"rgba(0,0,0,0)");
|
|
P.fillStyle=w;P.fillRect(-O,-O,2*O,2*O);P.setTransform(1,0,0,1,0,0)}else if(R=="sampledBrush"){var A,d=0;
|
|
for(var Q=0;Q<h.length;Q++)if(h[Q].id==W.Brsh.v.sampledData.v)A=h[Q];var g=A.jR;N.wa(g);var E=g[0],j=g[1].e,x=g[1].Z;
|
|
while((j>i||x>z)&&g[d+2]){d+=2;E=g[d];j=g[d+1].e;x=g[d+1].Z}if(j*x!=0){var L=new ImageData(new Uint8ClampedArray(E.buffer),j,x);
|
|
P.putImageData(L,Math.round((i-j)/2),Math.round((z-x)/2))}}else{}return q.toDataURL()};go.od=function(W,h,S,k){if(S==0)S=1;
|
|
var p=W.Brsh.v,I=p.Dmtr.v.val,q=p.Dmtr.v.val=Math.min(k!=null?Math.round(k*2.6):3e3,I*S),P=p.Hrdn?p.Hrdn.v.val/100:1,t=k!=null?k:Math.round(q*(1+.55*(1-P)))+4,i;
|
|
t=Math.max(15,Math.min(t,3e3));var M=new gj(0,0,t,t),U=new go(W,h,null,{YH:1},16711712,0,M);p.Dmtr.v.val=I;
|
|
U.moveTo(M.e/2,M.Z/2);var z=U.et(),D=U.wT();if(M.xX(D))i=z;else{i=N.U(M.n()*4);N.zt(z,D,i,M)}return[i,M,q]};
|
|
go.apM=function(W,h,S,k){var p=h.e,I=p>>>1;for(var Q=0;Q<4;Q++){var q=6-Q;W[p*(I-q)+I-1]=k;W[p*(I-q)+I]=S;
|
|
W[p*(I-q)+I+1]=k;W[p*(I+q)+I-1]=k;W[p*(I+q)+I]=S;W[p*(I+q)+I+1]=k;W[p*(I-1)+I-q]=k;W[p*I+I-q]=S;W[p*(I+1)+I-q]=k;
|
|
W[p*(I-1)+I+q]=k;W[p*I+I+q]=S;W[p*(I+1)+I+q]=k}};go.Zt=function(W,h,S,k){var p=go.od(W,h,S),I=p[0].slice(0),q=p[1],P=p[2],t=q.n(),M=N.U(t);
|
|
N.sN(I,M,3);var U=N.U(t);N.q.asR(M,U,q);if(P<3||N.B4(U,0)||k&&P>12){go.apM(U,q,255,0)}var i=[1,2,1,2,8,2,1,2,1];
|
|
i=N.pG.Qi(i);N.pG.gq(U,M,q.e,q.Z,i);N.wM(I,4294967295);N.ce(M,I,3);for(var Q=0;Q<t;Q++)if(U[Q]==255){I[Q<<2]=I[(Q<<2)+1]=I[(Q<<2)+2]=0;
|
|
I[(Q<<2)+3]=255}return{jj:I,pY:q,fQ:new eC(q.e/2,q.Z/2)}};go.MF="0";go.ER="1";go.WC="2";go.A7="3";var jE={};
|
|
jE.gY=function(W,h){var S=W.Mu(),q=0,M;if(S.x==Infinity||S.ZP())return{vM:N.U(0),pY:new gj,Ik:new gj};
|
|
var k=W.Mu(),p=jE.rK(W,h),I=N.H.VL(p.s);for(var Q=0;Q<W.D4.length;Q++){var P=W.D4[Q].js;if(P.StrokeFlag&&P._LineWidth)q=Math.max(q,Math.ceil(P._LineWidth/2))}I.x1(q,q);
|
|
if(I.ZP())return{vM:N.U(0),pY:new gj,Ik:new gj};var t=N.hi(I.e,I.Z);t.translate(-I.x,-I.y);jE.ao2(p,t);
|
|
if(W.D4.length!=0){var U=gf.c4(h),i=t.getImageData(0,0,I.e,I.Z);M=new Uint8Array(i.data.buffer);if(U==0)for(var Q=0;
|
|
Q<M.length;Q+=4)M[Q+3]=M[Q+3]>80?255:0;if(U==3)for(var Q=0;Q<M.length;Q+=4)M[Q+3]=Math.min(255,M[Q+3]*1.5)}else M=N.U(I.n()*4);
|
|
t.resetTransform();t.beginPath();return{vM:M,pY:I,Ik:k}};jE.rK=function(W,h){var S=h.A,k=h.MW,p=gf.c4(h),I=Math.max(S.S*S.S,S.ZB*S.ZB)<1e-9?S:null;
|
|
if(p==3||p==4)I=null;var q={C:[],s:[]};jE.a5R(W,q,I,!0);jE.a5R(W,q,I,!1);q=jE.fz(q,h,W);return q};jE.fz=function(W,h,S){if(W==null)return W;
|
|
if(S&&S.vw)N.H.A(W.s,S.vw,W.s);if(S&&!N.DU.xv(h.ud)){var k=gf.wT(h,S);if(!k.ZP()){if(W.C){W=N.H.bE(W);
|
|
var p=Math.min(k.e,k.Z)/8;if(p<1)p=1;W=N.H.Lq(W,p)}var I=N.DU.zL(h.ud,k);N.hx.A(I,W.s,k)}}var q=h.A;
|
|
N.H.A(W.s,q,W.s);return W};jE.ao2=function(W,h){h.save();h.miterLimit=2;Typr.U.pathToContext({crds:W.s,cmds:W.C},h);
|
|
h.restore()};jE.Os=function(W,h,S){if(!a1.ae_(S))return;var k=W.MW,p=k.ResourceDict.FontSet,I=k.ResourceDict.StyleSheetSet[0].StyleSheetData,q=k.EngineDict.StyleRun.RunLengthArray,P=k.EngineDict.StyleRun.RunArray,t=gf.x5(k),M=!0,U={},i=0;
|
|
for(var Q=0;Q<P.length;Q++){var z=P[Q].StyleSheet.StyleSheetData.Font;if(z==null)z=I.Font;for(var D=0;
|
|
D<q[Q];D++){var R=t.charCodeAt(i+D),O=z+","+(R>128?R:-1);if(U[O]==null){U[O]=1;if(h.I_(p[z].Name,R)==null)M=!1}}i+=q[Q]}return M};
|
|
jE.a5R=function(W,h,S,k){var p=new ex;for(var Q=0;Q<W.MR.length;Q++)jE.aeN(W.D4,W.MR[Q],h,p,S,k)};jE.aeN=function(W,h,S,k,p,I){k.translate(h.ug.x,h.ug.y);
|
|
for(var Q=0;Q<h.Sg.length;Q++){var q={},P=h.Sg[Q];if(!P.N1)break;var t=k.clone();t.translate(P.ug.x,P.ug.y);
|
|
if(p){var M=p.S8+t.S8*p.Bq;t.S8=(Math.round(M)-p.S8)/p.Bq}for(var U=P.start;U<P.end;U++)jE.a8C(W,h.pr[U],h,q,S,t,I)}k.translate(-h.ug.x,-h.ug.y)};
|
|
jE.a7A="()<>[]{}\xAB\xBB\u0F3A\u0F3B\u0F3C\u0F3D\u169B\u169C\u2039\u203A\u2045\u2046\u207D\u207E\u208D\u208E\u2208\u2209\u220A\u220B\u220C\u220D\u2215\u223C\u223D\u2243\u2252\u2253\u2254\u2255\u2264\u2265\u2266\u2267\u2268\u2269\u226A\u226B\u226E\u226F\u2270\u2271\u2272\u2273\u2274\u2275\u2276\u2277\u2278\u2279\u227A\u227B\u227C\u227D\u227E\u227F\u2280\u2281\u2282\u2283\u2284\u2285\u2286\u2287\u2288\u2289\u228A\u228B\u228F\u2290\u2291\u2292\u2298\u22A2\u22A3\u22A6\u22A8\u22A9\u22AB\u22B0\u22B1\u22B2\u22B3\u22B4\u22B5\u22B6\u22B7\u22C9\u22CA\u22CB\u22CC\u22CD\u22D0\u22D1\u22D6\u22D7\u22D8\u22D9\u22DA\u22DB\u22DC\u22DD\u22DE\u22DF\u22E0\u22E1\u22E2\u22E3\u22E4\u22E5\u22E6\u22E7\u22E8\u22E9\u22EA\u22EB\u22EC\u22ED\u22F0\u22F1\u22F2\u22F3\u22F4\u22F6\u22F7\u22FA\u22FB\u22FC\u22FD\u22FE\u2308\u2309\u230A\u230B\u2329\u232A\u2768\u2769\u276A\u276B\u276C\u276D\u276E\u276F\u2770\u2771\u2772\u2773\u2774\u2775\u27C3\u27C4\u27C5\u27C6\u27C8\u27C9\u27CB\u27CD\u27D5\u27D6\u27DD\u27DE\u27E2\u27E3\u27E4\u27E5\u27E6\u27E7\u27E8\u27E9\u27EA\u27EB\u27EC\u27ED\u27EE\u27EF\u2983\u2984\u2985\u2986\u2987\u2988\u2989\u298A\u298B\u298C\u298D\u298E\u298F\u2990\u2991\u2992\u2993\u2994\u2995\u2996\u2997\u2998\u29B8\u29C0\u29C1\u29C4\u29C5\u29CF\u29D0\u29D1\u29D2\u29D4\u29D5\u29D8\u29D9\u29DA\u29DB\u29F5\u29F8\u29F9\u29FC\u29FD\u2A2B\u2A2C\u2A2D\u2A2E\u2A34\u2A35\u2A3C\u2A3D\u2A64\u2A65\u2A79\u2A7A\u2A7D\u2A7E\u2A7F\u2A80\u2A81\u2A82\u2A83\u2A84\u2A8B\u2A8C\u2A91\u2A92\u2A93\u2A94\u2A95\u2A96\u2A97\u2A98\u2A99\u2A9A\u2A9B\u2A9C\u2AA1\u2AA2\u2AA6\u2AA7\u2AA8\u2AA9\u2AAA\u2AAB\u2AAC\u2AAD\u2AAF\u2AB0\u2AB3\u2AB4\u2ABB\u2ABC\u2ABD\u2ABE\u2ABF\u2AC0\u2AC1\u2AC2\u2AC3\u2AC4\u2AC5\u2AC6\u2ACD\u2ACE\u2ACF\u2AD0\u2AD1\u2AD2\u2AD3\u2AD4\u2AD5\u2AD6\u2ADE\u2AE3\u2AE4\u2AE5\u2AEC\u2AED\u2AF7\u2AF8\u2AF9\u2AFA\u2E02\u2E03\u2E04\u2E05\u2E09\u2E0A\u2E0C\u2E0D\u2E1C\u2E1D\u2E20\u2E21\u2E22\u2E23\u2E24\u2E25\u2E26\u2E27\u2E28\u2E29\u3008\u3009\u300A\u300B\u300C\u300D\u300E\u300F\u3010\u3011\u3014\u3015\u3016\u3017\u3018\u3019\u301A\u301B\uFE59\uFE5A\uFE5B\uFE5C\uFE5D\uFE5E\uFE64\uFE65\uFF08\uFF09\uFF1C\uFF1E\uFF3B\uFF3D\uFF5B\uFF5D\uFF5F\uFF60\uFF62\uFF63";
|
|
jE.a8C=function(W,h,S,k,p,I,q){I.translate(h.ug.x,h.ug.y);for(var P=h.Qv;P<=h.KH;P++){var t=S.lG[P],M=t.pY.e,U=W[S.alS+t.bs],i=U.js._FillBackgroundFlag;
|
|
if(U.wW=="\n"||q&&!i)continue;var z=U.js.FontSize/U.FT.head.unitsPerEm,D=I.clone();D.translate(t.ug.x+t.uw*z,t.ug.y-t.Vh*z);
|
|
var R=new ex;R.scale(z,-z);if(U.nU==1&&jE.a7A.indexOf(U.wW)!=-1)R.concat(new ex(-1,0,0,1,M,0));if(U.js.FauxItalic)R.concat(new ex(1,0,-Math.tan(.18),1,0,0));
|
|
R.translate(0,U.B7);R.scale(U.scale.x,U.scale.y);if(U.js.BaselineShift!=null)R.translate(0,-U.js.BaselineShift);
|
|
if(t.j3!=0){R.rotate(-t.j3)}R.concat(D);var O=U.js._LineWidth?U.js._LineWidth:1;if(q){p.C.push(jE.JQ(U.js._FillBackgroundColor));
|
|
var b=1.005*t.pY.Z/z,w=new gj(-t.uw,-b*.27,1.03*t.pY.e/z,b);if(U.js.StrokeFlag)w.x1(O/z,O/z);N.H.concat(p,N.H.Fb(w),R);
|
|
p.C.push("X");continue}if(U.js.FillFlag)p.C.push(jE.JQ(U.js.FillColor));if(U.js.StrokeFlag)p.C.push("O-"+jE.JQ(U.js.StrokeColor)+"-"+O);
|
|
if(t.path.C.length!=0&&U.wW!="\t"){if(U.js.FauxBold){var A=U.js.FontSize/2048*27*U.scale.x;R.y8+=A;N.H.concat(p,t.path,R);
|
|
R.y8-=A+A;N.H.concat(p,t.path,R)}else N.H.concat(p,t.path,R)}if(U.wW!="\n"){if(U.js.Underline){if(k.J0==null)k.J0=U.FT.post.underlineThickness;
|
|
if(k.af2==null)k.af2=U.FT.post.underlinePosition;var g=0,E=k.af2-k.J0/2,j=t.eU*1.05,x=-k.J0;N.H.concat(p,{C:["M","L","L","L","Z"],s:[g,E,g+j,E,g+j,E+x,g,E+x]},R)}if(U.js.Strikethrough){var d=U.FT["OS/2"].yStrikeoutSize,L=U.FT["OS/2"].yStrikeoutPosition,g=0,E=L+d/2,j=t.eU*1.05,x=-d;
|
|
N.H.concat(p,{C:["M","L","L","L","Z"],s:[g,E,g+j,E,g+j,E+x,g,E+x]},R)}}if(U.js.FillFlag)p.C.push("X");
|
|
if(U.js.StrokeFlag)p.C.push("OX")}I.translate(-h.ug.x,-h.ug.y)};jE.JQ=function(W){var h=gf.iZ(W),S=(Math.round(h.p)<<16)+(Math.round(h.z)<<8)+Math.round(h.S);
|
|
return"#"+N.fl(S)};function a1(W,h){var S=gf.SY(W),k,p,I=gf.yK(W),q=W._LineOrientation==2?new ex:null,U;
|
|
if(W.Curve)p=a1.g3(W.Curve);if(S!=0){k=new gj(I[0],I[1],I[2],I[3]);if(q){var P=k.e;k.e=k.Z;k.Z=P;q.translate(0,-I[2])}if(S==2){k.e=p[5]-p[4];
|
|
k.Z=9999}}this.MR=[];this.D4=[];this.ez=S;this.vw=q;var t=this.asQ=gf.x5(W),M=-1;for(var Q=0;Q<t.length;
|
|
Q++){var i=U,z=gf.akZ(W,Q);if(z!=M){M=z;i=U=gf.ahJ(W,Q)}var D={wW:t.charAt(Q),js:i,FT:null,Di:-1,Fq:gf.a8k(W,Q),B7:0,scale:new eC(0,0),rM:0,lineHeight:0,nU:0},R=W.ResourceDict.FontSet[i.Font].Name,O=D.FT=h.I_(R,t.charCodeAt(Q));
|
|
D.scale.x=i.HorizontalScale==null?1:i.HorizontalScale;D.scale.y=i.VerticalScale==null?1:i.VerticalScale;
|
|
var b=O["OS/2"],w=O.hhea;if(i.FontCaps==1&&D.wW!=D.wW.toUpperCase()){var A=b.sxHeight?b.sxHeight/b.sTypoAscender:.76;
|
|
D.scale.x*=A;D.scale.y*=A}var g=1/O.head.unitsPerEm*i.FontSize;if(i.FontBaseline==1){var A=W.ResourceDict.SuperscriptSize;
|
|
D.scale.x*=A;D.scale.y*=A;D.B7-=W.ResourceDict.SuperscriptPosition*i.FontSize}if(i.FontBaseline==2){var A=W.ResourceDict.SubscriptSize;
|
|
D.scale.x*=A;D.scale.y*=A;D.B7+=W.ResourceDict.SubscriptPosition*i.FontSize}D.rM=a1.rM(O,R,i);D.lineHeight=i.FontSize*1.2;
|
|
if(i.AutoLeading==!1)D.lineHeight=i.Leading;if(D.lineHeight==0)D.lineHeight=.01;this.D4.push(D)}var E=this.MR,x=[0];
|
|
for(var Q=0;Q<W.EngineDict.ParagraphRun.RunLengthArray.length;Q++){var d=new a1.Ns(W,h,this.D4,Q,k,x,S==1?p:null);
|
|
E.push(d)}if(q){if(S==0)q.translate(0,E[0].pr[0].rM/2);q.rotate(-Math.PI/2)}if(S==2){var L=W.Curve.Points,_=p[0],T=p[1],c=p[2],e=p[3],r=p[4],B=p[5];
|
|
for(var Q=0;Q<E.length;Q++)for(var F=0;F<E[Q].Sg.length;F++)if(!(Q==0&&F==0))E[Q].Sg[F].N1=!1;var d=E[0],v=d.Sg[0];
|
|
d.ug.Yh(0,0);v.ug.Yh(0,0);for(var F=v.start;F<v.end;F++){var X=d.pr[F],V=X.ug.x;X.ug.x=0;for(var H=X.Qv;
|
|
H<=X.KH;H++){var o=d.lG[H],J=o.pY.e/2;o.ug.x+=V;var C=a1.alT(_,(r+o.ug.x+J)%e);o.ug.x=C[0]-J*C[2];o.ug.y=C[1]-J*C[3];
|
|
o.j3=Math.atan2(C[3],C[2])}}}}a1.rM=function(W,h,S){var k=W["OS/2"],p=W.hhea,I=0,I=0,q=[];q.push(k&&k.sxHeight&&h.toLowerCase().indexOf("capitals")!=-1?k.sxHeight:0);
|
|
q.push(k&&k.sCapHeight?k.sCapHeight:0);q.push(k&&k.sTypoAscender?k.sTypoAscender:0);q.push(p.ascender?p.ascender:0);
|
|
for(var P=0;P<q.length;P++)if(q[P]!=0){I=q[P];break}var t=1/W.head.unitsPerEm*S.FontSize;I=I*t;if(I<S.FontSize*.6)I=S.FontSize*.75;
|
|
return I};a1.prototype.ad6=function(){return!this.apE(0)};a1.prototype.a9x=function(){return this.apE(1)};
|
|
a1.prototype.apE=function(W){var h=this.MR,S=!0,k=0;for(var Q=0;Q<h.length;Q++){var p=h[Q].Sg,I=p.length;
|
|
k+=I;for(var q=0;q<I;q++)S&=p[q].N1}return[S,k][W]};a1.g3=function(W,h){if(h==null)h=.25;var S=W.Points,k=S.length,p=k>>>3,I=W.TextOnPathTRange,q=W.Reversed,i=0,z=0;
|
|
if(q){var P=S.slice(0);for(var Q=0;Q<k;Q+=2){P[Q]=S[k-2-Q];P[Q+1]=S[k-1-Q]}S=P;I=[p-I[1]%p,p-I[0]%p]}var t=[],M=[0],U=[0];
|
|
for(var Q=0;Q<k;Q+=8){var D=S[Q+6]-S[Q+0],R=S[Q+7]-S[Q+1],O=Math.round(1/h*Math.sqrt(D*D+R*R));for(var b=0;
|
|
b<O;b++){var w=b/O,A=1-w,g=A*A*A*S[Q+0]+3*A*A*w*S[Q+2]+3*A*w*w*S[Q+4]+w*w*w*S[Q+6],E=A*A*A*S[Q+1]+3*A*A*w*S[Q+3]+3*A*w*w*S[Q+5]+w*w*w*S[Q+7];
|
|
t.push(g,E);if(Q+b!=0){var D=g-i,R=E-z;U.push(U[U.length-1]+Math.sqrt(D*D+R*R));M.push((Q>>>3)+w)}i=g;
|
|
z=E}}var h=U.length,j=U[h-1],x=a1.hV(I[0]%p,M),d=a1.hV(I[1]%p,M),L=U[x%h],_=U[d%h];if(L>=_)_+=j;return[t,M,U,j,L,_]};
|
|
a1.hV=function(W,h){var Q=0;while(h[Q]<W)Q++;return Q};a1.alT=function(W,h){var S=0,Q=0,k,p,I;while(S<h){k=W[Q+2]-W[Q];
|
|
p=W[Q+3]-W[Q+1];I=Math.sqrt(k*k+p*p);S+=I;Q+=2}return[W[Q],W[Q+1],k/I,p/I]};a1.prototype.a2x=function(W){return this.D4[W]};
|
|
a1.prototype.afY=function(W){for(var h=0;h<this.MR.length;h++){var S=this.MR[h];for(var k=0;k<S.Sg.length;
|
|
k++){var p=S.Sg[k],I=S.pr[p.start].start,q=S.pr[p.end-1].end;if(I<W&&W<q)return[I,q-1]}}return[0,1]};
|
|
a1.prototype.aju=function(W,h){var S=-1,k=this.MR;if(this.ez==2){var p=1e9,I=0,q=k[0],P=q.Sg[0];for(var t=P.start;
|
|
t<P.end;t++){var M=q.pr[t];for(var U=M.Qv;U<=M.KH;U++){var i=q.lG[U],z=i.pY.e,D=W.x-i.ug.x,R=W.y-i.ug.y,O=D*D+R*R;
|
|
if(O<p){p=O;I=i.bs}}}if(I!=0&&this.asQ.codePointAt(I-1)>65535)I--;return I}for(var b=0;b<k.length;b++){var q=k[b];
|
|
for(var w=0;w<q.Sg.length;w++){S++;var P=q.Sg[w],A=q.Sg[w+1];if(A==null&&b<k.length-1)A=k[b+1].Sg[0];
|
|
if(h!=null){if(S!=h)continue}else{if(A!=null&&q.ug.y+P.ug.y<W.y)continue}for(var t=P.start;t<P.end;t++){var M=q.pr[t];
|
|
for(var U=M.Qv;U<=M.KH;U++){var i=q.lG[U],z=i.pY.e,g=q.ug.x+P.ug.x+M.ug.x,E=g+i.ug.x,j=g+(U<M.KH?q.lG[U+1].ug.x:i.ug.x+z);
|
|
if(W.x<=j||t+1==P.end&&U==M.KH){var x=q.alS+i.bs,d=this.D4[x],L=d.nU&1;if(d.wW!="\n"&&(L==0&&W.x>E+z/2||L==1&&W.x<E+z/2))x+=this.asQ.codePointAt(x)>65535?2:1;
|
|
return x}}}}}};a1.prototype.Re=function(W){var h={pY:new gj,n6:0},S=0;for(var k=0;k<this.MR.length;k++){var p=this.MR[k];
|
|
for(var I=0;I<p.Sg.length;I++){var q=p.Sg[I];h.n6=S;S++;for(var P=q.start;P<q.end;P++){var t=p.pr[P];
|
|
for(var M=t.start;M<t.end;M++){if(M==W){var U=this.D4[M],i=U.Di,z=p.lG[i].bs,D=1;while(p.lG[i]!=null&&p.lG[i].bs==z){var R=p.lG[i],O=p.ug.x+q.ug.x+t.ug.x+R.ug.x,b=p.ug.y+q.ug.y+t.ug.y+R.ug.y;
|
|
h.pY=h.pY.r8(new gj(O,b-U.lineHeight,R.pY.e,U.lineHeight));h.j3=R.j3;i+=D}return h}}}}}};a1.prototype.Mu=function(){var W=Infinity,h=Infinity,S=-Infinity,k=-Infinity;
|
|
for(var Q=0;Q<this.MR.length;Q++){var p=this.MR[Q];for(var I=0;I<p.Sg.length;I++){var q=p.Sg[I];if(!q.N1)break;
|
|
for(var P=q.start;P<q.end;P++){var t=p.pr[P];for(var M=t.Qv;M<=t.KH;M++){var U=p.lG[M],i=U.pY,z=p.ug.x+q.ug.x+t.ug.x+U.ug.x,D=p.ug.y+q.ug.y+t.ug.y+U.ug.y;
|
|
W=Math.min(W,z+i.x);h=Math.min(h,D+i.y);S=Math.max(S,z+i.x+i.e);k=Math.max(k,D+i.y+i.Z)}}}}return new gj(W,h,S-W,k-h)};
|
|
a1.Bx=function(W){return 19968<=W&&W<=40959||12288<=W&&W<=12543};a1.aba=function(W,h,S,k,p,I,q){var P=[I],t=0;
|
|
for(var Q=I;Q<q;Q++){if(S[Q]==null)console.log(Q,I,q,S);var M=S[Q].wW,U=M.charCodeAt(0);if(U==32||U==9){P.push(t,Q,1,Q+1);
|
|
t=0}else if(U==3851){P.push(t+1,Q+1);t=0}else if(a1.Bx(U)){P.push(t,Q);t=1}else if(Q!=I&&S[Q].nU!=S[Q-1].nU){P.push(t,Q);
|
|
t=1}else t++}P.push(t);var i=[];for(var Q=0;Q<P.length;Q+=2){var z=P[Q],D=P[Q+1];if(D==0)continue;i.push(new a1.atZ(W,h,S,k,p,z,D))}return i};
|
|
a1.a9D=function(W,h,S,k,p,I,q){var P=[0,h?h.e:1e9],t=[];if(k){var M=W[I].rM,U=p+(p==0?M:W[I].lineHeight),i=U-M*.9,z=N.H.v0(k[0],i),D=z.length,R=N.H.v0(k[0],U),O=R.length;
|
|
if(D!=0&&O!=0){var b=0,w=0;P=[];while(b<D&&w<O){var A=Math.max(z[b],R[w]),g=z[b+1],E=R[w+1],j=Math.min(g,E);
|
|
if(A<j)P.push(A,j);if(g<E)b+=2;else w+=2}}}for(var x=0;x<P.length;x+=2){var d=P[x+1]-P[x],L=0,_=I,T=h?d-S.StartIndent-S.EndIndent-(I==0?S.FirstLineIndent:0):Infinity;
|
|
while(I!=W.length){var c=W[I],e=L==0||(c.sZ||c.dx)||L+c.pY.e<T;if(!e)break;L+=c.pY.e;I++}t.push(I-_)}q[0]=t;
|
|
q[1]=P;q[2]=I};a1.a4q=function(W,h){var S=W.length,k=new Uint32Array(S),p=new Uint8Array(S),I=0;for(var Q=0;
|
|
Q<S;Q++){p[Q]=0;var q=W.charCodeAt(Q);k[Q]=q;if(q>I)I=q}if(I>1424)p=a1.ajZ(k,h);return p};a1.Ns=function(W,h,S,k,p,I,q){this.pr=[];
|
|
this.Sg=[];this.ug=new eC(0,0);this.lG=null;this.pr=null;this.js=gf.a5y(W,k);var P=this.js,i=0,R="",g=0,E=1,K=0;
|
|
if(k!=0){var t=P.SpaceBefore;if(t!=null)I[0]+=t}var M=W.EngineDict.ParagraphRun.RunLengthArray,U=M[k];
|
|
for(var Q=0;Q<k;Q++)i+=M[Q];var z=P._Direction?P._Direction:0;this.alS=i;var D=gf.x5(W).slice(i,i+U);
|
|
for(var O=0;O<D.length;O++){var b=D.charAt(O);R+=S[i+O].js.FontCaps==0?b:b.toUpperCase()}D=R;var w=a1.a4q(D,z),A=[],x=w[Q]&1,d=S[i].FT;
|
|
S[i].nU=w[0];for(var Q=1;Q<D.length;Q++){var b=S[i+Q],L=w[Q];b.nU=L;if(L!=x||b.FT!=d){A.push(g,E);g=Q;
|
|
E=1;x=L;d=b.FT}else E++}A.push(g,E);var _=this.lG=[];for(var Q=0;Q<A.length;Q+=2){var T=A[Q],c=A[Q+1],e=(S[i+T].nU&1)==0,r=D.slice(T,T+c),B=Typr.U.shapeHB(S[i+T].FT,r,e),F=[],V=0;
|
|
for(var O=0;O<B.length;O++){var v=B[O];F.push({z:v.g,bs:v.cl,eU:v.ax,EK:v.ay,uw:v.dx,Vh:v.dy})}B=F;var X=B.slice(0);
|
|
if(!e)X.reverse();for(var O=0;O<r.length;O++){while(V+1<X.length&&X[V+1].bs<=O){V++}while(V>0&&X[V-1].bs==O)V--;
|
|
S[i+T+O].Di=_.length+(e?V:X.length-V-1)}for(var O=0;O<B.length;O++){_.push(B[O]);B[O].bs+=T;var b=S[i+B[O].bs];
|
|
if(b.Fq!=-1){B[O].z=b.Fq;var H=b.FT.hmtx;if(H){var o=Object.keys(H)[0];B[O].eU=H[o][b.Fq]}}if(b.wW=="\n")B[O].eU=0;
|
|
if(b.wW=="\t")B[O].eU=b.FT.head.unitsPerEm*36/b.js.FontSize}}var J=gf.jT(P),C=this.pr=a1.aba(W,h,S,i,_,i,i+U),Y=this.Sg,u=-1,R=[null,null,0];
|
|
while(K<C.length){a1.a9D(C,p,P,q,I[0],K,R);u++;var f={start:K,end:0,pY:new gj,ug:new eC(0,0),N1:!0},ff=0,eP=0;
|
|
Y.push(f);f.end=R[2];var l=f.end==C.length;function jk(X,T,cV){var aX=cV-T>>>1;for(var Q=0;Q<aX;Q++){var j8=X[T+Q];
|
|
X[T+Q]=X[cV-1-Q];X[cV-1-Q]=j8}}for(var hE=1;hE<5;hE++){var Z=-1;for(var Q=f.start;Q<f.end;Q++){var L=S[C[Q].start].nU;
|
|
if(Z==-1&&L>=hE)Z=Q;else if(Z!=-1&&L<hE){jk(C,Z,Q);Z=-1}}var aQ=f.end;if(z==0&&C[aQ-1].sZ)aQ--;if(Z!=-1)jk(C,Z,aQ)}var jC=R[0],eO=R[1],Z=K,iU=K;
|
|
for(var gK=0;gK<jC.length;gK++){var iM=eO[gK*2+1]-eO[gK*2],i5=0;Z=iU;iU+=jC[gK];var fN=this.arj(Z,iU,C,z,p!=null);
|
|
if(p){if(J==1||l&&J==4)i5=fN[1]+(iM-fN[0]);if(J==2||l&&J==5)i5=fN[1]+(iM-fN[0])/2;if(u==0)i5+=P.FirstLineIndent;
|
|
i5+=P.StartIndent}else{if(J==0)i5=P.StartIndent+P.FirstLineIndent;if(J==1)i5=-fN[0]-P.EndIndent;if(J==2)i5=-fN[0]/2}i5+=eO[gK*2];
|
|
if(p&&J>2&&(J==6||!l))this.a2B(Z,iU,C,iM,z,i5);else{var dx=i5;for(var Q=Z;Q<iU;Q++){var ai=C[Q],hO=ai.pY.e;
|
|
ai.ug.x=dx;if(ai.OK=="\t")hO=Math.ceil((dx+4)/36)*36-dx;dx+=hO}}}K=f.end;for(var Q=f.start;Q<f.end;Q++){var a0=C[Q].pY.clone();
|
|
a0.yM(C[Q].ug);f.pY=f.pY.r8(a0);ff=Math.max(ff,C[Q].rM);eP=Math.max(eP,C[Q].lineHeight)}f.ug.y=u==0?0:Y[u-1].ug.y+eP;
|
|
if(u==0){if(k==0&&p)I[0]+=ff;if(k!=0)I[0]+=eP;this.ug.y=I[0]}else I[0]+=eP;if(p)f.N1=this.ug.y+f.ug.y<p.y+p.Z}var bM=P.SpaceAfter;
|
|
if(bM!=null)I[0]+=bM};a1.Ns.prototype.arj=function(W,h,S,k,p){var I=0,q=0;for(var Q=W;Q<h;Q++)I+=S[Q].pY.e;
|
|
if(p){if(k==0)for(var Q=h-1;Q>=W;Q--)if(S[Q].sZ||S[Q].dx)I-=S[Q].pY.e;else break;if(k==1)for(var Q=W;
|
|
Q<h;Q++)if(S[Q].sZ||S[Q].dx){var P=S[Q].pY.e;I-=P;q-=P}else break}return[I,q]};a1.Ns.prototype.a2B=function(W,h,S,k,p,I){var q=0,P=0,t=0,M=0;
|
|
for(var Q=W;Q<h;Q++)if(S[Q].sZ)t++;else{q+=S[Q].pY.e;P++}if(p==0)for(var Q=h-1;Q>=W;Q--)if(S[Q].sZ||S[Q].dx){if(S[Q].sZ){t--}}else break;
|
|
if(p==1)for(var Q=W;Q<h;Q++)if(S[Q].sZ||S[Q].dx){if(S[Q].sZ){t--;M++}}else break;if(P<=1||t==0){if(P==1)S[W].ug.x=I;
|
|
return}var U=(k-q)/t,i=-M*U;for(var Q=W;Q<h;Q++){if(S[Q].sZ)this.lG[S[Q].Qv].pY.e=S[Q].pY.e=U;S[Q].ug.x=I+i;
|
|
i+=S[Q].pY.e}};a1.atZ=function(W,h,S,k,p,I,q){this.OK="";for(var Q=0;Q<q;Q++)this.OK+=S[I+Q].wW;this.sZ=q==1&&(S[I].wW==" "||S[I].wW=="\t");
|
|
this.dx=q==1&&S[I].wW=="\n";this.start=I;this.end=I+q;this.pY=new gj;this.ug=new eC(0,0);this.rM=0;this.lineHeight=0;
|
|
var P=0,t=0;if(q==0){this.lineHeight=S[I].lineHeight;this.rM=S[I].rM;this.pY=new gj(0,-S[I].lineHeight,0,S[I].lineHeight)}var M=S[I].Di,U=S[I+q-1].Di;
|
|
if(U<M){var i=M;M=U;U=i}while(U+1<p.length&&p[U].bs==p[U+1].bs){U++}this.Qv=M;this.KH=U;for(var z=M;
|
|
z<=U;z++){var D=p[z],R=S[k+D.bs],O=W._LineOrientation==2&&(R.js.BaselineDirection!=2||a1.Bx(R.wW.charCodeAt(0))),b=Typr.U.glyphToPath(R.FT,D.z),x=0;
|
|
D.path={C:b.cmds,s:b.crds};var w=R.js.FontSize,A=1/R.FT.head.unitsPerEm*w;if(!R.js.AutoKerning)P+=R.js.Kerning*2*A*R.scale.x;
|
|
D.ug=new eC(P,0);D.j3=0;if(O&&D.path.s.length>0){D.j3=-Math.PI/2;D.ug.x+=w*.83;D.ug.y=-w*.3+D.eU*A/2;
|
|
D.eU=w/A}var g=D.eU*A*R.scale.x;D.pY=new gj(0,-R.lineHeight,g,R.lineHeight);var E=D.pY.clone();E.yM(D.ug);
|
|
if(R.js.Tracking!=null)x=R.js.Tracking*.001*w;if(R.js.FauxBold==!0)x+=.027*w;P+=g+x;if(q==1&&R.wW==" ")E.e+=2*x;
|
|
else if(q==1&&R.wW!=null&&a1.Bx(R.wW.charCodeAt(0)))E.e+=x;this.pY=this.pY.r8(E);this.rM=Math.max(this.rM,R.rM);
|
|
this.lineHeight=Math.max(this.lineHeight,R.lineHeight)}};a1.X7=0;a1.ae_=function(W){if(a1.X7==2)return!0;
|
|
if(a1.X7==1)return!1;a1.X7=1;function h(){fetch("code/ext/fribidi.wasm").then(function(S){return S.arrayBuffer()}).then(function(S){return WebAssembly.instantiate(S)}).then(function(S){var k=S.instance.exports,p=k.memory,I=16,q=256,P=1,t=I|q,M=I|q|P;
|
|
a1.ajZ=function(i,z){var D=i.length,R=D*4+4+D*4+D*4+D;hI.MQ(k,R+D+1e7);var O=new Uint8Array(p.buffer),b=new Uint32Array(p.buffer),w=k.calloc(R,1),A=w+D*4,g=A+4,E=g+D*4,j=E+D*4;
|
|
b.set(i,w>>>2);b[A>>>2]=z==0?t:M;k.fribidi_get_bidi_types(w,D,g);k.fribidi_get_bracket_types(w,D,g,E);
|
|
k.fribidi_get_par_embedding_levels_ex(g,E,D,A,j);var x=O.slice(j,j+D);k.free(w);return x};a1.X7=2;var U=new em(y.E.W,!0);
|
|
U.data={o:y.D.XO,qb:"add",nP:f6.a5,GC:null};W.c(U)})}Typr.U.initHB("code/ext/hb.wasm",h);return!1};function gf(){}gf.aZ=function(W){return JSON.parse(JSON.stringify(W))};
|
|
gf.Uv=function(W,h){for(var S in h)W[S]=h[S]};gf.hN=function(W,h,S){var k=gf.ais();if(S)gf.$n(k,0,0,S);
|
|
var p={A:new ex(1,0,0,1,Math.round(W),Math.round(h)),MW:k};p.nJ=gf.aal();p.ud=N.DU.U();p.Ik=new gj;return p};
|
|
gf.af5=function(W){var h=["CharacterDirection",0];for(var Q=0;Q<h.length;Q+=2){if(W[h[Q]]!=null&&W[h[Q]]!=h[Q+1]){throw"e";
|
|
console.log(h[Q],W[h[Q]])}}if(W instanceof Array)for(var Q=0;Q<W.length;Q++)gf.af5(W[Q]);else if(W instanceof Object)for(var S in W)gf.af5(W[S])};
|
|
gf.jT=function(W,h){if(h==null)h=W.Justification;var S=W._Direction?W._Direction:0;if(S==1){if(h==0||h==3)h++;
|
|
else if(h==1||h==4)h--}return h};gf.iv=function(W){if(W.add==null)return;var h=W.MW,S=h.Curve,k=W.add.vmsk,p=k.T,I=N.H.FU(p,!0).s,q=W.A.clone();
|
|
q.uA();N.H.A(I,q,I);var P=I.slice(0,8);for(var t=8;t<I.length;t+=6)P.push(I[t-2],I[t-1],I[t],I[t+1],I[t+2],I[t+3],I[t+4],I[t+5]);
|
|
S.Points=P;S.TextOnPathTRange=k.Nk.slice(0);S.Reversed=k.D8;if(gf.SY(h)==1){var S=a1.g3(h.Curve),M=N.H.TA(S[0]);
|
|
gf.hz(h,[0,0,M.e,M.Z].map(Math.round));for(var Q=0;Q<P.length;Q+=2){P[Q]-=M.x;P[Q+1]-=M.y}var U=new ex(1,0,0,1,M.x,M.y);
|
|
U.concat(W.A);W.A=U}};gf.gP=function(W){if(W.add==null)return;var h=W.add.vmsk,S=W.MW.Curve,k=S.Points,p={C:["M"],s:[k[0],k[1]]};
|
|
for(var Q=0;Q<k.length;Q+=8){p.C.push("C");p.s.push(k[Q+2],k[Q+3],k[Q+4],k[Q+5],k[Q+6],k[Q+7])}N.H.A(p.s,W.A,p.s);
|
|
var I=N.H.aD(p,!0);h.T=I;h.D8=S.Reversed;h.Nk=S.TextOnPathTRange.slice(0);W.add.vogk=$.lq(I)};gf.iZ=function(W){var h={p:0,z:0,S:0};
|
|
if(W){var S=W.Values;if(W.Type==1)h={p:S[1]*255,z:S[2]*255,S:S[3]*255};else if(W.Type==2){var k={classID:"CMYC",Cyn:{t:"doub",v:S[1]*100},Mgnt:{t:"doub",v:S[2]*100},Ylw:{t:"doub",v:S[3]*100},Blck:{t:"doub",v:S[4]*100}};
|
|
h=N.X.iZ(k)}else console.log("Unknown color type")}return h};gf.aua=function(W){for(var Q=0;Q<W.length;
|
|
Q++){var h=W[Q].StyleSheet.StyleSheetData,S=h.FillColor;if(S&&S.Type==2){var k=gf.iZ(S);S.Type=1;S.Values=[1,k.p/255,k.z/255,k.S/255]}}};
|
|
gf.wT=function(W,h){var S;if(gf.SY(W.MW)==1){var k=gf.yK(W.MW);S=new gj(0,0,k[2]-k[0],k[3]-k[1])}else{S=h.Mu();
|
|
if(h.vw){var p=h.vw.clone(),I=N.H.Fb(S);N.H.A(I.s,p,I.s);S=N.H.TA(I.s)}}return S};gf.iq=function(W){var h=W[0];
|
|
for(var Q=0;Q<W.length;Q++)h=gf.abt(h,W[Q]);return h};gf.abt=function(W,h){var S={};for(var k in W)if(JSON.stringify(W[k])==JSON.stringify(h[k]))S[k]=W[k];
|
|
return S};gf.jq=function(W,h){var S=W.Vt,k=-1;for(var Q=0;Q<S.length;Q++)if(S[Q].Name==h)k=Q;if(k==-1){k=S.length;
|
|
S.push({FontType:1,Name:h,Script:0,Synthetic:0})}W.D4.Font=k};gf.x5=function(W){return W.EngineDict.Editor.Text.replace(/\r/g,"\n").replace(/\u0003/g,"\n")};
|
|
gf.d4=function(W,h){W.EngineDict.Editor.Text=h.replace(/\n/g,"\r")};gf.SY=function(W){return W.Curve&&W.Curve.TextOnPathTRange[0]>=0?2:W.EngineDict.Rendered.Shapes.Children[0].ShapeType};
|
|
gf.fN=function(W,h){var S=W.EngineDict.Rendered.Shapes.Children[0];S.ShapeType=h;var k=S.Cookie.Photoshop;
|
|
k.ShapeType=h;k.Base.ShapeType=h;if(h==0){delete k.BoxBounds;k.PointBase=[0,0]}if(h==1){delete k.PointBase;
|
|
k.BoxBounds=[0,0,1,1]}};gf.yK=function(W){return W.EngineDict.Rendered.Shapes.Children[0].Cookie.Photoshop.BoxBounds};
|
|
gf.hz=function(W,h){W.EngineDict.Rendered.Shapes.Children[0].Cookie.Photoshop.BoxBounds=h};gf.a8k=function(W,h){var S=W.EngineDict.AlternateGlyphRun;
|
|
if(S==null)return-1;var k=gf.VQ(S.RunLengthArray,h).li,p=S.RunArray[k].Glyph;return p==null?-1:p};gf.arQ=function(W,h,S){var k=W.EngineDict.AlternateGlyphRun;
|
|
if(k==null){k=W.EngineDict.AlternateGlyphRun=gf.a3P();k.RunArray.push({});k.RunLengthArray.push(gf.x5(W).length)}var p=gf.VQ(k.RunLengthArray,h),I=p.li,q=h-p.Cu,P=k.RunArray[I],t=JSON.stringify(P),M=k.RunLengthArray[I];
|
|
if(q!=0){k.RunArray.splice(I,0,JSON.parse(t));k.RunLengthArray.splice(I,0,q);k.RunLengthArray[I+1]-=q;
|
|
I++;M-=q;q=0}if(M!=1){k.RunArray.splice(I+1,0,JSON.parse(t));k.RunLengthArray.splice(I+1,0,M-1);k.RunLengthArray[I]=1;
|
|
M=1}P.Glyph=S};gf.ahJ=function(W,h){return gf.asx(W,gf.akZ(W,h))};gf.akZ=function(W,h){var S=W.EngineDict.StyleRun.RunLengthArray;
|
|
return gf.VQ(S,h).li};gf.asx=function(W,h){var S=W.ResourceDict.StyleSheetSet[0].StyleSheetData,k={};
|
|
for(var p in S)k[p]=S[p];var I=W.EngineDict.StyleRun.RunArray[h].StyleSheet.StyleSheetData;gf.Uv(k,I);
|
|
return k};gf.a5y=function(W,h){var S=W.ResourceDict.ParagraphSheetSet[0].Properties,k={};for(var p in S)k[p]=S[p];
|
|
var I=W.EngineDict.ParagraphRun.RunArray[h].ParagraphSheet.Properties;gf.Uv(k,I);var q=["StartIndent","EndIndent","FirstLineIndent"];
|
|
for(var Q=0;Q<3;Q++)if(k[q[Q]]==null)k[q[Q]]=0;return k};gf.XK=function(W,h,S){if(S=="")return;var k=gf.x5(W);
|
|
gf.d4(W,k.substring(0,h)+S+k.substring(h,k.length));var p=W.EngineDict.StyleRun,I=p.RunLengthArray,q=gf.VQ(I,h-1);
|
|
I[q.li]+=S.length;var P=W.EngineDict.AlternateGlyphRun;if(P){var I=P.RunLengthArray,q=gf.VQ(I,h-1);I[q.li]+=S.length}var t=W.EngineDict.ParagraphRun,I=t.RunLengthArray,M=gf.VQ(I,h),U=S.split("\n");
|
|
if(U.length==1){I[M.li]+=S.length;return}I.splice(M.li+1,0,I[M.li]-(h-M.Cu));t.RunArray.splice(M.li+1,0,gf.aZ(t.RunArray[M.li]));
|
|
I[M.li]-=I[M.li+1];I[M.li]+=U[0].length+1;for(var Q=1;Q<U.length-1;Q++){t.RunArray.splice(M.li+Q,0,gf.aZ(t.RunArray[M.li+Q-1]));
|
|
t.RunLengthArray.splice(M.li+Q,0,U[Q].length+1)}I[M.li+U.length-1]+=U[U.length-1].length};gf.Bu=function(W,h,S){var k=gf.x5(W);
|
|
gf.d4(W,k.substring(0,h)+k.substring(S,k.length));gf.zD(W.EngineDict.ParagraphRun,h,S,!0);gf.zD(W.EngineDict.StyleRun,h,S,!1);
|
|
var p=W.EngineDict.AlternateGlyphRun;if(p)gf.zD(p,h,S,!1)};gf.zD=function(W,h,S,k){var p=W.RunLengthArray,I=gf.VQ(p,h),q=gf.VQ(p,S),P=[];
|
|
for(var Q=0;Q<p.length;Q++)for(var t=0;t<p[Q];t++)P.push(Q);P.splice(h,S-h);var M=[];for(var Q=0;Q<p.length;
|
|
Q++)M.push(0);for(var Q=0;Q<P.length;Q++)M[P[Q]]++;for(var Q=0;Q<p.length;Q++){if(M[Q]==0){M.splice(Q,1);
|
|
p.splice(Q,1);W.RunArray.splice(Q,1);Q--}else if(M[Q]<p[Q])p[Q]=M[Q]}if(k&&I.li!=q.li&&I.Cu!=h){p[I.li]+=p[I.li+1];
|
|
p.splice(I.li+1,1);W.RunArray.splice(I.li+1,1)}};gf.$n=function(W,h,S,k){var p=W.EngineDict.Editor.Text.length;
|
|
if(S==p-2)S++;if(k.D4.Font!=null)W.ResourceDict.FontSet=k.Vt.slice(0);if(h<=S)gf.alN(W.EngineDict.StyleRun,k.D4,h,S,!0);
|
|
gf.alN(W.EngineDict.ParagraphRun,k.MR,h,S,!1)};gf.Ql=function(W,h,S){var k={Vt:W.ResourceDict.FontSet.slice(0),D4:[],MR:[]},p=W.EngineDict.StyleRun.RunLengthArray,I=gf.VQ(p,h).li,q=gf.VQ(p,S).li;
|
|
for(var Q=I;Q<=q;Q++){var P=gf.aZ(W.ResourceDict.StyleSheetSet[0].StyleSheetData),t=W.EngineDict.StyleRun.RunArray;
|
|
if(t.length==0)continue;var M=t[Q].StyleSheet.StyleSheetData;gf.Uv(P,M);k.D4.push(P)}var U=W.EngineDict.ParagraphRun.RunLengthArray,i=gf.VQ(U,h).li,z=gf.VQ(U,S).li;
|
|
for(var Q=i;Q<=z;Q++){var D=W.EngineDict.ParagraphRun.RunArray;if(D.length==0)continue;k.MR.push(gf.aZ(D[Q].ParagraphSheet.Properties))}k.D4=k.D4.length==0?{}:gf.iq(k.D4);
|
|
k.MR=k.MR.length==0?{}:gf.iq(k.MR);return k};gf.alN=function(W,h,S,k,p){var I=W.RunLengthArray;if(p){var q=gf.VQ(I,S);
|
|
if(q.Cu!=S){var P=I[q.li];I.splice(q.li,0,S-q.Cu);I[q.li+1]=P-I[q.li];W.RunArray.splice(q.li+1,0,gf.aZ(W.RunArray[q.li]))}var t=gf.VQ(I,k);
|
|
if(t.Cu+I[t.li]-1!=k){var P=I[t.li];I.splice(t.li,0,k-t.Cu+1);I[t.li+1]=P-I[t.li];W.RunArray.splice(t.li+1,0,gf.aZ(W.RunArray[t.li]))}}var q=gf.VQ(I,S),t=gf.VQ(I,k);
|
|
if(p)for(var Q=q.li;Q<=t.li;Q++)gf.Uv(W.RunArray[Q].StyleSheet.StyleSheetData,h);else for(var Q=q.li;
|
|
Q<=t.li;Q++)gf.Uv(W.RunArray[Q].ParagraphSheet.Properties,h)};gf.a7b=function(W,h,S){var k=W.EngineDict.StyleRun.RunLengthArray,p=[],I=0;
|
|
for(var Q=0;Q<k.length;Q++){var q=k[Q];for(var P=0;P<q;P++)if(h<=I+P&&I+P<S)p.push(Q);I+=q}var t=p[0],M=[];
|
|
for(var Q=0;Q<p.length;Q++){var U=p[Q]-t;if(U==M.length)M.push(0);M[U]++}return M};gf.a6U=function(W){var h=W.EngineDict.StyleRun,S=h.RunArray,k=h.RunLengthArray;
|
|
for(var Q=0;Q<k.length-1;Q++){var p=S[Q].StyleSheet.StyleSheetData,I=S[Q+1].StyleSheet.StyleSheetData;
|
|
if(JSON.stringify(p)==JSON.stringify(I)){S.splice(Q+1,1);k[Q]+=k[Q+1];k.splice(Q+1,1);Q--}}};gf.c4=function(W){var h=W.nJ.AntA.v.Annt;
|
|
h=["Anno","antiAliasSharp","AnCr","AnSt","AnSm"].indexOf(h);if(h==-1)h=1;return h};gf.ty=function(W,h){W.nJ.AntA.v.Annt=["Anno","antiAliasSharp","AnCr","AnSt","AnSm"][h]};
|
|
gf.NR=function(W,h){var S,k;S=["FontSize","Leading","BaselineShift"];k=W.D4;for(var Q=0;Q<S.length;Q++)if(k[S[Q]]!=null)k[S[Q]]*=h;
|
|
S=["StartIndent","EndIndent","FirstLineIndent","SpaceBefore","SpaceAfter"];k=W.MR;for(var Q=0;Q<S.length;
|
|
Q++)if(k[S[Q]]!=null)k[S[Q]]*=h};gf.afU=function(){return gf.Ql(gf.atb,0,0)};gf.aal=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}}};
|
|
gf.VQ=function(W,h){var S=0,Q=0;while(S+W[Q]<=h){S+=W[Q];Q++}return{li:Q,Cu:S}};gf.ais=function(){var W=gf.aZ(this.atb);
|
|
return W};gf.aa4={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};
|
|
gf.aph={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};
|
|
gf.a3P=function(){return{RunArray:[],RunLengthArray:[],IsJoinable:2}};gf.atb={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(gf.aa4))},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\u30FC\u2015\u2019\u201D\uFF09\u3015\uFF3D\uFF5D\u3009\u300B\u300D\u300F\u3011\u30FD\u30FE\u309D\u309E\u3005\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\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\u30FD\u30FE\u309D\u309E\u3005",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(gf.aa4))}],StyleSheetSet:[{Name:"Normal RGB",StyleSheetData:JSON.parse(JSON.stringify(gf.aph))}],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 h8={};h8.asS=function(W){var h=h8.ahI(W._0,W._1);h8.adl(h,W._0);return h};h8.ahn=function(W,h,S){var k={};
|
|
k._98={_0:"i7"};k._0=h8.ajA(W,h,S?S._0:null);k._1=h8.a8v(W,h,k._0,S?S._1:null);return k};h8.ajA=function(W,h,S){var k={};
|
|
k._1=h8.a1z(W,S?S._1:null);k._2={_0:[{_0:{_0:"s"}}],_1:[{_0:"i0"}]};k._3=JSON.parse(JSON.stringify(h8.aiS));
|
|
k._4=JSON.parse(JSON.stringify(h8.a9F));k._5=h8.anW(W,k._1._0,S?S._5:null);k._6=h8.aoJ(W,S?S._6:null);
|
|
k._8=h8.aaE(W,h,S?S._8:null);k._9=h8.adu;return k};h8.adl=function(W,h){h8.aes(W,h._5,h._1._0)};h8.a1z=function(W,h){var S=[],k=[];
|
|
for(var Q=0;Q<W.length;Q++){var p=W[Q].ResourceDict.FontSet;for(var I=0;I<p.length;I++){var q=p[I];if(k.indexOf(q.Name)!=-1)continue;
|
|
S.push(q);k.push(q.Name)}}var P={_0:[]};for(var Q=0;Q<S.length;Q++){var t=S[Q],M={_0:{_99:"/CoolTypeFont",_0:{_0:"s"+t.Name,_1:"i"+t.Script,_2:"i"+t.FontType}}};
|
|
if(t.Script==0)delete M._0._0._1;P._0.push(M)}return P};h8.anW=function(W,h,S){var k={_0:[],_1:[]},p={_0:JSON.parse(JSON.stringify(h8.agZ))};
|
|
h8.apT(p._0,W[0].ResourceDict.StyleSheetSet[0],h,W[0].ResourceDict.FontSet);k._0.push(p);k._1.push({_0:"i0"});
|
|
k._0.push({_0:{_0:"sNone",_5:"i0",_6:{}}});k._1.push({_0:"i1"});return k};h8.aes=function(W,h,S){var k=h._0[0];
|
|
for(var Q=0;Q<W.length;Q++)h8.ag_(k._0,W[Q].ResourceDict.StyleSheetSet[0],S,W[Q].ResourceDict.FontSet)};
|
|
h8.aoJ=function(W,h){var S={_0:[],_1:[]},k={_0:JSON.parse(JSON.stringify(h8.Iu))};h8.jX(k._0,W[0].ResourceDict.ParagraphSheetSet[0]);
|
|
S._0.push(k);S._1.push({_0:"i0"});k={_0:JSON.parse(JSON.stringify(h8.Iu))};h8.jX(k._0,W[0].ResourceDict.ParagraphSheetSet[0]);
|
|
k._0._0="sBasic Paragraph";k._0._6="i0";S._0.push(k);S._1.push({_0:"i1"});return S};h8.aaE=function(W,h,S){var k={_0:[]};
|
|
for(var Q=0;Q<W.length;Q++){var p=W[Q].Curve,I={};k._0.push({_0:I});var q=gf.SY(W[Q]);I._2={};I._2._0="i"+q;
|
|
if(W[Q]._LineOrientation==2)I._2._1="i2";if(q==0){I._2._6=["f-1","f-1"];I._2._11={_4:"i-1",_7:!1}}else if(q==1&&p==null){var P=gf.yK(W[Q]),t=P[2],M=P[3];
|
|
I._1={_0:h8.dD("f",[0,0,0,0,t,0,t,0,t,0,t,0,t,M,t,M,t,M,t,M,0,M,0,M,0,M,0,M,0,0,0,0])};I._2._6=["f-2","f-2"];
|
|
I._2._11={_4:"i-2",_7:!1}}else if(q==1){var P=gf.yK(W[Q]),t=P[2],M=P[3];I._1={_0:h8.dD("f",p.Points)};
|
|
I._2._6=["f-3","f-3"];I._2._11={_4:"i-3",_7:!1}}else if(q==2){I._1={_0:h8.dD("f",p.Points)};I._2._6=h8.dD("f",p.TextOnPathTRange);
|
|
I._2._11={_0:p.Reversed,_3:"i0",_5:"f0",_7:!1}}}return k};h8.a8v=function(W,h,S,k){var p={};p._0=JSON.parse(JSON.stringify(h8.aim));
|
|
p._1=h8.ah3(W,h,S,k?k._1:null);p._2=JSON.parse(JSON.stringify(h8.agZ._6));p._3=JSON.parse(JSON.stringify(h8.Iu._5));
|
|
return p};h8.ahI=function(W,h){return h8.aor(W,h._1)};h8.ah3=function(W,h,S,k){var p=[],I=S._1._0;for(var Q=0;
|
|
Q<W.length;Q++){var q=W[Q],P={_0:{}};p.push(P);P._0._0="s"+q.EngineDict.Editor.Text;P._0._0=P._0._0;
|
|
var t=P._0._5={_0:[]},M=q.EngineDict.ParagraphRun;for(var U=0;U<M.RunArray.length;U++){var i={_0:{}};
|
|
t._0.push(i);i._0._0={_0:"s",_5:{},_6:"i1"};h8.jX(i._0._0,M.RunArray[U].ParagraphSheet);i._1="i"+M.RunLengthArray[U]}var z=P._0._6={_0:[]};
|
|
M=q.EngineDict.StyleRun;for(var U=0;U<M.RunArray.length;U++){var D={_0:{}};z._0.push(D);D._0._0={_0:"s",_5:"i1",_6:{}};
|
|
h8.apT(D._0._0,M.RunArray[U].StyleSheet,I,q.ResourceDict.FontSet);D._1="i"+M.RunLengthArray[U]}M=q.EngineDict.AlternateGlyphRun;
|
|
if(M){var R=P._0._9={_0:[]};for(var U=0;U<M.RunArray.length;U++){var O={_0:{}};R._0.push(O);var b=M.RunArray[U];
|
|
if(b.Glyph!=null){O._0._0={_0:"i"+b.Glyph,_1:"e"}}O._1="i"+M.RunLengthArray[U]}}P._0._10={_0:"i4",_2:!0};
|
|
P._1=h8.view.a3D(q,null,Q,null)}return p};h8.aor=function(W,h){var S=[],k=W._1._0;for(var Q=0;Q<h.length;
|
|
Q++){var p=gf.ais();S.push(p);var I=h[Q];p.EngineDict.Editor.Text=I._0._0.slice(1);var q=p.EngineDict.ParagraphRun.RunArray[0],P=p.EngineDict.ParagraphRun,t=I._0._5;
|
|
if(t)for(var M=0;M<t._0.length;M++){var U=t._0[M];P.RunLengthArray[M]=parseInt(U._1.slice(1));P.RunArray[M]=JSON.parse(JSON.stringify(q));
|
|
h8.a6s(U._0._0,P.RunArray[M].ParagraphSheet)}else{P.RunLengthArray[0]=gf.x5(p).length}var i=I._0._6;
|
|
P=p.EngineDict.StyleRun;if(i)for(var M=0;M<i._0.length;M++){var z=i._0[M];P.RunLengthArray[M]=parseInt(z._1.slice(1));
|
|
P.RunArray[M]={StyleSheet:{StyleSheetData:{}}};h8.ag_(z._0._0,P.RunArray[M].StyleSheet,k,p.ResourceDict.FontSet)}else{P.RunLengthArray[0]=gf.x5(p).length;
|
|
P.RunArray[0]={StyleSheet:{StyleSheetData:{}}}}}return S};h8.apT=function(W,h,S,k,p){W._0="s"+(h.Name?h.Name:"");
|
|
var I=W._6,q=p?p._6:null,P=h.StyleSheetData;if(P.Font==null)return;var t=k[P.Font].Name,M=-1;for(var Q=0;
|
|
Q<S.length;Q++)if("s"+t==S[Q]._0._0._0){M=Q;break}I._0="i"+M;if(P.FontSize!=null)I._1="f"+P.FontSize;
|
|
if(P.FauxBold!=null)I._2=P.FauxBold;if(P.FauxItalic!=null)I._3=P.FauxItalic;if(P.AutoLeading!=null)I._4=P.AutoLeading;
|
|
if(P.Leading!=null)I._5="f"+P.Leading;if(P.HorizontalScale!=null)I._6="f"+P.HorizontalScale;if(P.VerticalScale!=null)I._7="f"+P.VerticalScale;
|
|
if(P.Tracking!=null)I._8="i"+P.Tracking;if(P.BaselineShift!=null)I._9="f"+P.BaselineShift;if(P.AutoKerning!=null)I._11="i"+(P.AutoKerning?1:0);
|
|
if(P.FontCaps!=null)I._12="i"+P.FontCaps;if(P.FontBaseline!=null)I._13="i"+P.FontBaseline;if(P.Strikethrough!=null)I._15="i"+(P.Strikethrough?1:0);
|
|
if(P.Underline!=null)I._16="i"+(P.Underline?2:0);if(P.Ligatures!=null)I._18=P.Ligatures;if(P.DLigatures!=null)I._19=P.DLigatures;
|
|
if(P.BaselineDirection!=null)I._35="i"+P.BaselineDirection;if(P.Language!=null)I._38="i"+P.Language;
|
|
if(P.FillColor!=null)I._53=h8.JQ(P.FillColor);if(P.StrokeColor!=null)I._54=h8.JQ(P.StrokeColor);if(P.FillFlag!=null)I._56=P.FillFlag;
|
|
if(P.StrokeFlag!=null)I._57=P.StrokeFlag;if(P._LineWidth!=null)I._63="f"+P._LineWidth;if(P._FillBackgroundColor!=null)I._79=h8.JQ(P._FillBackgroundColor);
|
|
if(P._FillBackgroundFlag!=null)I._80=P._FillBackgroundFlag};h8.JQ=function(W){return{_99:"/SimplePaint",_0:{_0:"i1",_1:h8.dD("f",W.Values)}}};
|
|
h8.ag_=function(W,h,S,k){var p=W._6;if(p==null)return;var I=h.StyleSheetData;if(p._0){var q=parseInt(p._0.slice(1)),P=S[q]._0._0._0.slice(1);
|
|
gf.jq({D4:I,Vt:k},P)}if(p._1!=null)I.FontSize=parseFloat(p._1.slice(1));if(p._2!=null)I.FauxBold=p._2;
|
|
if(p._3!=null)I.FauxItalic=p._3;if(p._4!=null)I.AutoLeading=p._4;if(p._5!=null)I.Leading=parseFloat(p._5.slice(1));
|
|
if(p._6!=null)I.HorizontalScale=parseFloat(p._6.slice(1));if(p._7!=null)I.VerticalScale=parseFloat(p._7.slice(1));
|
|
if(p._8!=null)I.Tracking=parseFloat(p._8.slice(1));if(p._9!=null)I.BaselineShift=parseFloat(p._9.slice(1));
|
|
if(p._11!=null)I.AutoKerning=parseFloat(p._11.slice(1))==1;if(p._12!=null)I.FontCaps=parseFloat(p._12.slice(1));
|
|
if(p._13!=null)I.FontBaseline=parseFloat(p._13.slice(1));if(p._15!=null)I.Strikethrough=parseFloat(p._15.slice(1))==1;
|
|
if(p._16!=null)I.Underline=parseFloat(p._16.slice(1))==1;if(p._18!=null)I.Ligatures=p._18;if(p._19!=null)I.DLigatures=p._19;
|
|
if(p._35!=null)I.BaselineDirection=parseFloat(p._35.slice(1));if(p._38!=null)I.Language=parseFloat(p._38.slice(1));
|
|
if(p._53!=null)I.FillColor=h8.bo(p._53);if(p._54!=null)I.StrokeColor=h8.bo(p._54);if(p._56!=null)I.FillFlag=p._56;
|
|
if(p._57!=null)I.StrokeFlag=p._57;if(p._63!=null)I._LineWidth=parseFloat(p._63.slice(1));if(p._79!=null)I._FillBackgroundColor=h8.bo(p._79);
|
|
if(p._80!=null)I._FillBackgroundFlag=p._80};h8.bo=function(W){var h=W._0._0,S=W._0._1,k=[1,0,0,0],p=[];
|
|
for(var Q=0;Q<S.length;Q++)p[Q]=parseFloat(S[Q].slice(1));if(h=="i0")k[1]=k[2]=k[3]=p[1];else if(h=="i1")k=p;
|
|
else if(h=="i2")k=[1].concat(UDOC.C.cmykToRgb(p.slice(1)));else console.log("unknown color type",h,p);
|
|
return{Type:1,Values:k}};h8.jX=function(W,h){W._0="s"+(h.Name?h.Name:"");var S=W._5,k=h.Properties;if(k.Justification!=null)S._0="i"+k.Justification;
|
|
if(k.FirstLineIndent!=null)S._1="f"+k.FirstLineIndent;if(k.StartIndent!=null)S._2="f"+k.StartIndent;
|
|
if(k.EndtIndent!=null)S._3="f"+k.EndtIndent;if(k.SpaceBefore!=null)S._4="f"+k.SpaceBefore;if(k.SpaceAfter!=null)S._5="f"+k.SpaceAfter;
|
|
if(k.AutoHyphenate!=null)S._9=k.AutoHyphenate;if(k._Direction!=null)S._33="i"+k._Direction;if(k._ComposerEngine!=null)S._35="i"+k._ComposerEngine};
|
|
h8.a6s=function(W,h){var S=W._5;if(S==null)return;var k=h.Properties;if(S._0)k.Justification=parseInt(S._0.slice(1))};
|
|
h8.dD=function(W,h){var S=[];for(var Q=0;Q<h.length;Q++)S.push(W+h[Q]);return S};h8.aiS={_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"}]};
|
|
h8.a9F={_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\u3005\u3009\u300B\u300A\u300F\u3011\u3015\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u309B\u309C\u309D\u309E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u30FB\u30FC\u30FD\u30FE\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\u3005\u3009\u300B\u300A\u300F\u3011\u3015\u309D\u309E\u30FB\u30FD\u30FE\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\u3005\u3009\u300B\u300A\u300F\u3011\u3015\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u309B\u309C\u309D\u309E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u30FB\u30FC\u30FD\u30FE\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\u3005\u3009\u300B\u300A\u300F\u3011\u3015\u309D\u309E\u30FB\u30FD\u30FE\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"}]};
|
|
h8.agZ={_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}};
|
|
h8.Iu={_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"}};
|
|
h8.adu={_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"}]};
|
|
h8.aim={_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 gn={};gn.a7C=function(W){return gn.P1(W,gn.lf,0)};gn.aa2=function(W){return gn.dZ(W,gn.lf)};gn.P1=function(W,h,S){var k;
|
|
if(typeof W=="string")return W;if(W instanceof Array){k=[];for(var Q=0;Q<W.length;Q++)k[Q]=gn.P1(W[Q],h,S+1)}else{k={};
|
|
var p={};for(var I in h){var q=h[I],P="_"+q[0];if(W[P]!=null){k[I]=q[1]?gn.P1(W[P],q[1],S+1):W[P];p[P]=!0}}for(var I in W){if(p[I]==null){if(I.length>3)continue;
|
|
console.log(h,p);console.log(I,W);throw"e"}}}return k};gn.dZ=function(W,h){var S;if(typeof W=="string")return W;
|
|
else if(W instanceof Array){S=[];for(var Q=0;Q<W.length;Q++)S[Q]=gn.dZ(W[Q],h)}else{S={};var k={};for(var p in h){var I=h[p],q="_"+I[0];
|
|
if(W[p]!=null){S[q]=I[1]?gn.dZ(W[p],I[1]):W[p];k[p]=!0}}for(var p in W){if(k[p]==null){console.log(h,k);
|
|
console.log(p,W);throw"e"}}}return S};gn.nc={_Color:[0,{_Type:[0],_Values:[1]}],_CAIKnownStyleID:[5],_StreamTag:[99]};
|
|
gn.iR={_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,gn.nc],_StrokeColor:[54,gn.nc],_Blend:[55,{_1:[1],_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,gn.nc],_FillBackgroundFlag:[80],_UnderlineStyle:[81],_DashedUnderlineGapLength:[82],_DashedUnderlineDashLength:[83],_SlashedZero:[84],_StylisticSets:[85],_CustomFeature:[86,{_StreamTag:[99]}],_MarkYDistFromBaseline:[87],_AutoMydfb:[88],_89:[89],_90:[90]};
|
|
gn.acU={_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,gn.iR],_ParagraphDirection:[33],_JustificationMethod:[34],_ComposerEngine:[35],_ListStyle:[36],_ListTier:[37],_ListSkip:[38],_ListOffset:[39],_KashidaWidth:[40]};
|
|
gn.a2K={_Name:[0],_Features:[5,gn.acU],_Parent:[6],_97:[97]};gn.am_={_Name:[0],_Parent:[5],_Features:[6,gn.iR],_97:[97]};
|
|
gn.lf={_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]}],_97:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_MojiKumiCodeToClassSet:[2,{_Resources:[0,{_Resource:[0,{_Name:[0],_Members:[5],_97:[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]}],_97:[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]}],_97:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_StyleSheetSet:[5,{_Resources:[0,{_Resource:[0,gn.am_]}],_DisplayList:[1,{_Resource:[0]}]}],_ParagraphSheetSet:[6,{_Resources:[0,{_Resource:[0,gn.a2K]}],_DisplayList:[1,{_Resource:[0]}]}],_TextFrameSet:[8,{_Resources:[0,{_Resource:[0,{_0:[0],_Bezier:[1,{_Points:[0]}],_Data:[2,{_Type:[0],_LineOrientation:[1],_FrameMatrix:[2],_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]}],_97:[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],_CaseType:[3],_Bullet:[9],_StreamTag:[99]}],_Font:[6]}],_PredefinedTag:[6],_97:[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,gn.a2K]}],_Length:[1]}]}],_StyleRun:[6,{_RunArray:[0,{_RunData:[0,{_StyleSheet:[0,gn.am_]}],_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]}],_OpticalAlignment:[2]}],_OriginalNormalStyleFeatures:[2,gn.iR],_OriginalNormalParagraphFeatures:[3,gn.acU]}]};
|
|
h8.view={};h8.view.a3D=function(W,h,S,k){var p={},I=gf.SY(W);p._0=[{_0:"i"+S}];return p};function CSS(){}CSS.a8M=function(W,h){var S=W.add,k=S.vmsk,p=S.vstk,I=S.lmfx,q=S.TySh,P=[],t=CSS.a86(I,S);
|
|
if(W.rG()&&k){var M=N.$.E6(k.T);if(!M.ZP()){P.push("width: "+Math.round(M.e)+"px");P.push("height: "+Math.round(M.Z)+"px")}var U=N.$.atj(k.T);
|
|
if(U>0)P.push("border-radius: "+Math.round(U)+"px")}else if(q){var i=q.MW;if(gf.SY(i)==1){var M=gf.yK(i);
|
|
P.push("width: "+Math.round(M[2])+"px");P.push("height: "+Math.round(M[3])+"px")}CSS.alJ(P,gf.Ql(i,0,0),q.A,!1,!1,t[0])}var z=[],D=I?I.dropShadowMulti.v:0;
|
|
for(var Q=0;Q<D.length;Q++){var R=D[Q].v;if(R.enab.v){var O=R.Dstn.v.val,b=R.lagl.v.val*Math.PI/180;
|
|
if(R.uglg&&R.uglg.v)b=h.NZ()*Math.PI/180;var w=O*Math.cos(b),A=O*Math.sin(b);z.push("drop-shadow("+(w==0?"0 ":CSS.JK(-w)+"px ")+(A==0?"0 ":CSS.JK(A)+"px ")+R.blur.v.val/2+"px "+CSS.bp(R.Clr.v,R.Opct.v.val/100)+")")}}if(z.length!=0)P.push("filter: "+z.join(" "));
|
|
if(q==null)CSS.ajf(t,P);if(p==null||!p.strokeEnabled.v)p=jO.k1(I);if(p&&p.strokeEnabled.v){var g=p.strokeStyleContent.v,E=g.classID,x=hz.EJ.zu.indexOf(p.strokeStyleLineCapType.v.strokeStyleLineCapType),d=hz.EJ.join.indexOf(p.strokeStyleLineJoinType.v.strokeStyleLineJoinType),L=p.strokeStyleOpacity.v.val/100,_=p.strokeStyleLineWidth.v.val,T="";
|
|
if(E=="solidColorLayer")T=CSS.bp(g.Clr.v,L);P.push("border: "+_+"px solid "+T)}return P};CSS.a86=function(W,h){var S=jO.GH(W,h),k=S[0],p=S[1],I,q;
|
|
if(k){I=CSS.bp(k.Clr.v,h.iOpa!=null?h.iOpa/255:1)}else if(p){q=CSS.iL(p)}return[I,q]};CSS.ajf=function(W,h){if(W[0])h.push("background-color: "+W[0]);
|
|
if(W[1])h.push("background-image: "+W[1])};CSS._3={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.JK=function(g8){return""+parseFloat(g8.toFixed(3))};CSS.Vo=function(W){if(W==null)return{p:0,z:0,S:0};
|
|
var h=W.indexOf("(");if(h!=-1){var S=W.slice(h+1,W.length-1).split(",");for(var Q=0;Q<S.length;Q++){var k=S[Q].trim();
|
|
S[Q]=parseFloat(k)*(k.endsWith("%")?255/100:1)}return{p:S[0],z:S[1],S:S[2]}}if(W.charAt(0)!="#"){var p=CSS._3;
|
|
if(p[W])W=p[W];else console.log("unknown color "+W)}W=W.slice(1);if(W.length==3)W=W[0]+W[0]+W[1]+W[1]+W[2]+W[2];
|
|
W=parseInt(W,16);return{p:W>>16&255,z:W>>8&255,S:W&255}};CSS.bp=function(W,h){return CSS.Rl(N.X.iZ(W),h)};
|
|
CSS.Rl=function(W,h){if(h==null)h=1;var S=Math.round(W.p),k=Math.round(W.z),p=Math.round(W.S),I=S<<16|k<<8|p;
|
|
return h==1?"#"+N.fl(I):"rgba("+S+","+k+","+p+","+h+")"};CSS.iL=function(W){var h=W.Grad.v;if(h.Clrs==null)return"";
|
|
var S=h.Clrs.v.slice(0),k=h.Trns.v.slice(0),p=W.Ofst.v,I=W.Type.v.GrdT=="Rdl"?1:0,q=(I==1?"radial":"linear")+"-gradient",P=I==0?Math.round(-W.Angl.v.val+90)+"deg":"circle at center",t=W.Rvrs.v;
|
|
if(t){S.reverse();k.reverse()}for(var Q=0;Q<S.length;Q++){var M=S[Q].v,U=Q<k.length?k[Q].v.Opct.v.val/100:1,i=M.Lctn.v/4096;
|
|
if(t)i=1-i;P+=", "+CSS.bp(M.Clr.v,U)+" "+Math.round(i*100)+"%"}return q+"("+P+")"};CSS.alJ=function(W,h,S,k,p,I){var q=h.D4,P=k?1:a.Q.Nc(S),t=Math.round(q.FontSize*P);
|
|
W.push("font-size: "+t+"px");var M=q.Tracking;if(!k&&M!=null&&M!=0)W.push("letter-spacing: "+Math.round(M*t/1e3)+"px");
|
|
if(!q.AutoLeading)W.push("line-height: "+Math.round(q.Leading*P)+"px");if(q.Strikethrough)W.push("text-decoration: line-through");
|
|
if(q.Underline)W.push("text-decoration: underline");var U=gf.iZ(q.FillColor);U=[U.p,U.z,U.S].map(Math.round);
|
|
W.push((k?"fill: ":"color: ")+(I?I:"#"+N.fl(U[0]<<16|U[1]<<8|U[2])));var i=h.Vt[q.Font].Name;if(i){var z=cR.S_.I_(i),D="",R=null,O=null;
|
|
if(z!=null&&i!=cR.gM(z))z=null;if(p&&z)D+="\""+i+"\", ";var b=i.toLowerCase();if(z){R=cR.t7(z)[0];if(z["OS/2"])O=z["OS/2"].usWeightClass}else{R=CSS.ac_(i);
|
|
if(b.indexOf("light")!=-1)O=300;else if(b.indexOf("medium")!=-1)O=500;else if(b.indexOf("black")!=-1||b.indexOf("extrabold")!=-1)O=800;
|
|
else if(b.indexOf("bold")!=-1)O="bold"}if(R!=null)D+="\""+R+"\"";if(O!=null)W.push("font-weight: "+O);
|
|
if(b.indexOf("italic")!=-1||b.indexOf("oblique")!=-1)W.push("font-style: italic");if(D)W.push("font-family: "+D)}var w=h.MR.Justification;
|
|
if(w!=null&&w!=0)if(k){}else W.push("text-align: "+["left","right","center"][w%3])};CSS.ac_=function(W){W=W.split("-")[0];
|
|
while(W.endsWith("MT")||W.endsWith("PS"))W=W.slice(0,W.length-2);var h=!0;for(var Q=0;Q<W.length;Q++){var S=W.charAt(Q);
|
|
if(!h&&S.toLowerCase()!=S){W=W.slice(0,Q)+" "+W.slice(Q);Q++;h=!0}else h=!1}return W};function aO(){}aO.Lk={document:!0,parent:!0,top:!0,eval:!0,postMessage:!0,UTIF:!0,PIMG:!0,LNG:!0,FNTS:!0};
|
|
aO.qJ=function(W,h){var S=Date.now(),k;try{k=acorn.parse(W)}catch(dq){console.log(dq);return}var p=JSON.parse(JSON.stringify(aO.md.b3));
|
|
p.__return=!1;p.__continue=!1;p.__break=!1;p.__throw=!1;p.__fs={};p.__window={};aO.eval(k,h,p);var I=p.__fs;
|
|
if(Object.keys(I).length!=0){var q=UZIP.encode(I);jH.save(q,"output.zip")}};aO.eval=function(W,h,S){var k=W.type;
|
|
if(!1){}else if(k=="Program"||k=="BlockStatement"){var p=W.body;for(var Q=0;Q<p.length;Q++){var I=p[Q].type;
|
|
if(I=="FunctionDeclaration")S[p[Q].id.name]=p[Q]}for(var Q=0;Q<p.length;Q++){var I=p[Q].type,q=aO.eval(p[Q],h,S);
|
|
if(S.__continue){S.__continue=!1;return q}if(S.__return||S.__break||S.__throw)return q}}else if(k=="ReturnStatement"){S.__return=!0;
|
|
return W.argument?aO.a1(W.argument,h,S):null}else if(k=="BreakStatement"){S.__break=!0}else if(k=="ContinueStatement"){S.__continue=!0}else if(k=="VariableDeclaration"){var P=W.declarations;
|
|
for(var Q=0;Q<P.length;Q++)aO.eval(P[Q],h,S)}else if(k=="VariableDeclarator"){S[W.id.name]=W.init?aO.a1(W.init,h,S):null}else if(k=="FunctionDeclaration"){S[W.id.name]=W}else if(k=="MemberExpression"){var t=aO.a1(W.object,h,S),M=W.computed?aO.a1(W.property,h,S):aO.eval(W.property,h,S),q;
|
|
if(t.aL!=null)q=aO.md.TH(t,M,h,S);else if(t==window&&aO.Lk[M]){}else q=t[M];return q}else if(k=="ArrayExpression"){var U=[],i=W.elements;
|
|
for(var Q=0;Q<i.length;Q++)U.push(aO.a1(i[Q],h,S));return U}else if(k=="ObjectExpression"){var U={},i=W.properties;
|
|
for(var Q=0;Q<i.length;Q++){var z=i[Q],D=i[Q].key.name?i[Q].key.name:i[Q].key.value;U[D]=aO.a1(i[Q].value,h,S)}return U}else if(k=="ExpressionStatement"){return aO.eval(W.expression,h,S)}else if(k=="NewExpression"){var R=W.arguments,O=W.callee,b=O.type,w=[],U=null;
|
|
for(var Q=0;Q<R.length;Q++)w.push(aO.a1(R[Q],h,S));if(b=="Identifier")U=aO.md.a5m(O.name,w,h,S);else throw"e";
|
|
if(U==null)throw"new "+O.name;return U}else if(k=="CallExpression"){var R=W.arguments,O=W.callee,b=O.type,A={};
|
|
for(var g in S)A[g]=S[g];var w=[];for(var Q=0;Q<R.length;Q++)w.push(aO.a1(R[Q],h,S));if(b=="Identifier"){var E=O.name,j=S[E];
|
|
if(j){if(j.params){var x=j.params;for(var Q=0;Q<x.length;Q++)A[x[Q].name]=w[Q];return aO.eval(j.body,h,A)}else{return j.apply(null,w)}}else if(aO.md.afG.indexOf(E)!=-1)return aO.md.Bg({aL:"Application"},E,w,h,S);
|
|
else if(window[E]==null)console.log("Unknown function "+E);else if(aO.Lk[E])alert(E+"() not available");
|
|
else{var d=window[E].apply(window,w);return d}}else if(b=="MemberExpression"){var t=aO.a1(O.object,h,S),M=O.computed?aO.a1(O.property,h,S):aO.eval(O.property,h,S);
|
|
if(t==window&&aO.Lk[M])return;if(t.aL!=null)return aO.md.Bg(t,M,w,h,S);else return t[M].apply(t,w)}else if(b=="FunctionExpression"){return aO.eval(O.body,h,S)}else console.log(W)}else if(k=="AssignmentExpression"){var L=W.operator,_=W.left,c=_.type,e=aO.a1(_,h,S),r=aO.a1(W.right,h,S),q=null;
|
|
if(!1){}else if(L=="=")q=r;else if(L=="+=")q=e+r;else if(L=="-=")q=e-r;else if(L=="*=")q=e*r;else if(L=="/=")q=e/r;
|
|
else if(L=="%=")q=e%r;else if(L=="&=")q=e&r;else if(L=="|=")q=e|r;else if(L=="&&=")q=e&&r;else if(L=="||=")q=e||r;
|
|
else console.log(W);if(c=="Identifier"){var B=_.name;if(S.hasOwnProperty(B))S[B]=q;else S.__window[B]=q}else if(c=="MemberExpression"){var F=aO.eval(_.property,h,S),v=aO.a1(_.object,h,S);
|
|
if(v.aL!=null)aO.md.a0C(v,F,q,h,S);else v[F]=q}else console.log(W)}else if(k=="Identifier")return W.name;
|
|
else if(k=="Literal")return W.value;else if(k=="UpdateExpression"){var L=W.operator,X=W.argument.name,U=aO.a1(W.argument,h,S),V=S;
|
|
if(V[X]==null)V=S.__window;if(!1){}else if(L=="++"){V[X]++;return W.prefix?V[X]:V[X]-1}else if(L=="--"){V[X]--;
|
|
return W.prefix?V[X]:V[X]+1}else console.log(W)}else if(k=="UnaryExpression"){var L=W.operator,H=aO.a1(W.argument,h,S);
|
|
if(H.aL=="UnitValue"){if(L=="-")return-H.k;else return aO.a9T(H.k,L)}else return aO.a9T(H,L)}else if(k=="BinaryExpression"||k=="LogicalExpression"){var L=W.operator,_=aO.a1(W.left,h,S),H=aO.a1(W.right,h,S);
|
|
if(_==null||H==null)return aO.Eq(_,H,L);else if(_.aL=="UnitValue"&&H.aL=="UnitValue")return aO.Eq(_.k,H.k,L);
|
|
else if(_.aL=="UnitValue")return aO.Eq(_.k,H,L);else if(H.aL=="UnitValue"){if(L=="-")return-(_-H.k);
|
|
else return aO.Eq(_,H.k,L)}else return aO.Eq(_,H,L)}else if(k=="IfStatement"||k=="ConditionalExpression"){var o=aO.a1(W.test,h,S);
|
|
if(o)return aO.eval(W.consequent,h,S);else if(W.alternate)return aO.eval(W.alternate,h,S)}else if(k=="ForInStatement"){aO.eval(W.left,h,S);
|
|
var J=W.left.declarations[0].id.name,C=aO.a1(W.right,h,S);for(var g in C){S[J]=g;var Y=aO.eval(W.body,h,S);
|
|
if(S.__break)break;if(S.__return)return Y}S.__break=!1}else if(k=="ForStatement"){aO.eval(W.init,h,S);
|
|
while(aO.eval(W.test,h,S)){var Y=aO.eval(W.body,h,S);if(S.__break)break;if(S.__return)return Y;aO.eval(W.update,h,S)}S.__break=!1}else if(k=="DoWhileStatement"){do{var Y=aO.eval(W.body,h,S);
|
|
if(S.__break)break;if(S.__return)return Y}while(aO.eval(W.test,h,S));S.__break=!1}else if(k=="TryStatement"){aO.eval(W.block,h,S);
|
|
if(S.__throw){var K=W.handler;S[K.param.name]=S.__throw;S.__throw=!1;aO.eval(K.body,h,S);delete S[K.param.name]}}else if(k=="EmptyStatement"){}else console.log(W)};
|
|
aO.Eq=function(W,h,S){if(S=="+")return W+h;else if(S=="-")return W-h;else if(S=="*")return W*h;else if(S=="/")return W/h;
|
|
else if(S=="%")return W%h;else if(S=="^")return W^h;else if(S=="&")return W&h;else if(S=="&&")return W&&h;
|
|
else if(S=="|")return W|h;else if(S=="||")return W||h;else if(S=="<")return W<h;else if(S==">")return W>h;
|
|
else if(S=="=="){if(W.aL&&h.aL)return W.k==h.k;return W==h}else if(S=="===")return W===h;else if(S=="<=")return W<=h;
|
|
else if(S==">=")return W>=h;else if(S=="!=")return W!=h;else if(S=="!==")return W!==h;else if(S=="<<")return W<<h;
|
|
else if(S==">>")return W>>h;else console.log(S)};aO.a9T=function(W,h){if(h=="-")return-W;else if(h=="!")return!W;
|
|
else if(h=="~")return~W;else if(h=="+")return W;else console.log(obj)};aO.a1=function(W,h,S){var k=W.type;
|
|
if(k=="Identifier")return aO.amP(W.name,h,S);else return aO.eval(W,h,S)};aO.amP=function(W,h,S){if(W=="undefined")return undefined;
|
|
else if(S.hasOwnProperty(W))return S[W];else if(W=="app")return{aL:"Application"};else if(W=="$")return{aL:"$"};
|
|
else if(aO.md.amF.indexOf(W)!=-1)return aO.md.TH({aL:"Application"},W,h,S);else if(S.__window.hasOwnProperty(W))return S.__window[W];
|
|
else if(window[W]&&!aO.Lk[W])return window[W];else{S[W]=null;return null}};aO.md={};aO.md.a5m=function(W,h,S,k){var p;
|
|
if(W=="SolidColor")p={aL:W,k:[1,0,0,0]};if(W=="RGBColor")p={aL:W,k:[1,0,0,0]};if(W=="Window")p={aL:W,k:new iH(h[0],h[1],h[2])};
|
|
if(W=="ExportOptionsSaveForWeb")p={aL:W,k:{t8:"png",FF:100}};if(W=="JPEGSaveOptions")p={aL:W,k:{t8:"jpg",FF:100}};
|
|
if(W=="PDFSaveOptions")p={aL:W,k:{t8:"pdf",ajd:""}};if(W=="File")p={aL:W,k:h[0]};if(W=="ActionReference")p={aL:W,k:[]};
|
|
if(W=="ActionDescriptor")p={aL:W,k:{}};if(W=="ActionList")p={aL:W,k:[]};if(W=="UnitValue")p={aL:W,k:h.length==0?0:parseFloat(h[0])};
|
|
return p};aO.md.amF="activeDocument documents fonts preferences displayDialogs foregroundColor backgroundColor".split(" ");
|
|
aO.md.afG=["charIDToTypeID","stringIDToTypeID","executeAction","executeActionGet","doAction"];aO.md.TH=function(W,h,S,k){var p=S.kt,I=S.fO();
|
|
if(!1){}else if(h=="typename"){if(W.aL=="Layer")return W.k.vc()?"LayerSet":"ArtLayer";else return W.aL}else if(["Document","Layer"].indexOf(W.aL)!=-1&&["layers","artLayers","layerSets"].indexOf(h)!=-1){var q=I.root,P={aL:"Layers",y9:h,k:[]};
|
|
if(W.aL=="Layer")q=I.root.rk(I.g.indexOf(W.k));if(q.children==null)return null;for(var Q=0;Q<q.children.length;
|
|
Q++){var t=q.children[Q].i,M=t.vc();if(M&&h=="artLayers"||!M&&h=="layerSets")continue;P.k.push({aL:"Layer",k:t})}P.k.reverse();
|
|
return P}else if(W.aL=="Documents"||W.aL=="Layers"||W.aL=="HistoryStates"||W.aL=="LayerComps"){if(!1){}else if(h=="length")return W.k.length;
|
|
else if(Number.isInteger(h))return W.k[h];else console.log(W.aL+": unknown property ",h)}else if(W.aL=="Application"){if(!1){}else if(h=="activeDocument")return{aL:"Document",k:S.fO()};
|
|
else if(h=="documents"){var P={aL:"Documents",k:[]};for(var Q=0;Q<S.o0.length;Q++)P.k.push({aL:"Document",k:S.o0[Q]});
|
|
return P}else if(h=="fonts")return{aL:"TextFonts"};else if(h=="preferences")return{aL:"Preferences"};
|
|
else if(h=="displayDialogs")return{aL:"DialogModes"};else if(h=="foregroundColor"||h=="backgroundColor"){var U=h[0]=="f"?p.Ps:p.lL;
|
|
return{aL:"SolidColor",k:[1,(U>>>16&255)/255,(U>>>8&255)/255,(U>>>0&255)/255]}}else if(h=="UI")return{aL:"UI"};
|
|
else console.log(W,h)}else if(W.aL=="Document"){var I=W.k;if(!1){}else if(h=="activeLayer"){var t=I.g[I.w[0]];
|
|
return{aL:"Layer",k:t}}else if(h=="resolution")return I.H$;else if(h=="width")return I.e;else if(h=="height")return I.Z;
|
|
else if(h=="name")return I.name;else if(h=="saved")return!I.Wm();else if(h=="selection")return{aL:"Selection"};
|
|
else if(h=="activeHistoryState")return{aL:"HistoryState",Kr:I.nT};else if(h=="source")return I.aq;else if(h=="layerComps"){var i=I.S1.list.v,z=[];
|
|
for(var Q=0;Q<i.length;Q++)z.push({aL:"LayerComp",k:Q});return{aL:"LayerComps",k:z}}else if(h=="historyStates"){var D=[];
|
|
for(var Q=0;Q<I.history.length;Q++)D.push({aL:"HistoryState",Kr:Q});return{aL:"HistoryStates",k:D}}else console.log(W,h)}else if(W.aL=="LayerComp"){if(h=="name")return I.S1.list.v[W.k].v.Nm.v;
|
|
else throw h}else if(W.aL=="Layer"){var R={transparentPixelsLocked:0,pixelsLocked:1,positionLocked:2,allLocked:31},t=W.k;
|
|
if(!1){}else if(h=="visible")return t.jP();else if(h=="selected")return I.w.indexOf(I.g.indexOf(t))!=-1;
|
|
else if(h=="grouped")return t.Vy;else if(R[h]!=null)return t.Ox(R[h]);else if(h=="opacity")return t.opacity*100/255;
|
|
else if(h=="blendMode")return t.oO;else if(h=="name")return t.getName();else if(h=="textItem")return{aL:"TextItem",k:t};
|
|
else if(h=="bounds"){var O=a.Q.wT(I,[I.g.indexOf(t)]);return aO.md.as5(O,I)}else if(h=="parent"){var b=S.o0;
|
|
for(var Q=0;Q<b.length;Q++)if(b[Q].g.indexOf(t)!=-1)return{aL:"Document",k:b[Q]}}else if(h=="kind"){var w=aO.md.zs;
|
|
for(var Q=0;Q<w.length;Q++)if(t.add[w[Q]]!=null)return Q;return 0}else console.log(W,h)}else if(W.aL=="Selection"){if(!1){}else if(h=="bounds")return aO.md.as5(S.fO().q.rect,I);
|
|
else console.log(W,h)}else if(W.aL=="TextItem"){var A=W.k.add.TySh,g=A.MW,E=gf.x5(g),x=A.A.Nc(),d=gf.Ql(g,0,Math.max(0,E.length-2));
|
|
if(h=="contents")return E.slice(0,E.length-1).replace(/\n/g,"\r");else if(h=="font")return d.D4.Font!=null?d.Vt[d.D4.Font].Name:null;
|
|
else if(h=="size")return aO.md.zJ(d.D4.FontSize*x,I);else if(h=="leading")return aO.md.zJ(d.D4.Leading*x,I);
|
|
else if(h=="tracking")return aO.md.zJ(d.D4.Tracking);else if(h=="baselineShift")return aO.md.zJ(d.D4.BaselineShift);
|
|
else if(h=="fauxBold")return d.D4.FauxBold;else if(h=="fauxItalic")return d.D4.FauxItalic;else if(h=="kind")return 1-gf.SY(g);
|
|
else if(h=="useAutoLeading")return d.MR.AutoLeading;else if(h=="hyphenation")return d.MR.AutoHyphenate;
|
|
else if(h=="justification")return aO.md.zJ(d.MR.Justification);else if(h=="color")return{aL:"SolidColor",k:d.D4.FillColor.Values.slice(0)};
|
|
else if(h=="width"||h=="height"){var L=gf.yK(g),_=(L[2]-L[0])*x,T=(L[3]-L[1])*x;return aO.md.zJ(h=="width"?_:T,I)}else if(h=="position"){var c=A.A;
|
|
return aO.md.aql([c.y8,c.S8],I)}else if(h=="horizontalScale"||h=="verticalScale"){var e=h[0].toUpperCase()+h.slice(1);
|
|
return Math.round(d.D4[e]*100)}else if(h=="antiAliasMethod")gf.c4(A);else console.log(W,h)}else if(W.aL=="Preferences"){if(h=="rulerUnits")return p.dH.VI;
|
|
else console.log(W,h)}else if(W.aL=="SolidColor"){if(h=="rgb")return{aL:"RGBColor",k:W.k};else console.log(W,h)}else if(W.aL=="RGBColor"){var O=Math.round(255*W.k[1]),r=Math.round(255*W.k[2]),B=Math.round(255*W.k[3]);
|
|
if(!1){}else if(h=="red")return O;else if(h=="green")return r;else if(h=="blue")return B;else if(h=="hexValue")return"#"+N.fl(O<<16|r<<8|B).toUpperCase();
|
|
else console.log(W,h)}else if(W.aL=="UnitValue"){if(h=="value")return W.k;else throw"e"}else if(W.aL=="ExportOptionsSaveForWeb"){if(h=="format")return W.k.t8;
|
|
else if(h=="PNG8"||h=="interlaced")return!1;else if(h=="quality")return W.k.FF;else if(h=="transparency")return!0;
|
|
else throw h}else if(W.aL=="JPEGSaveOptions"||W.aL=="PDFSaveOptions"){return 0}else console.log(W,h)};
|
|
aO.md.as5=function(W,h){return aO.md.aql([W.x,W.y,W.x+W.e,W.y+W.Z],h)};aO.md.aql=function(W,h){var S=[];
|
|
for(var Q=0;Q<W.length;Q++)S.push(aO.md.zJ(W[Q],h));return S};aO.md.a1I=function(W){var h=[];for(var Q=0;
|
|
Q<W.length;Q++)h.push(W[Q].aL?W[Q].k:W[Q]);return h};aO.md.zJ=function(W,h){return{aL:"UnitValue",k:W}};
|
|
aO.md.anJ=function(W,h){if(W.aL=="UnitValue")return W.k;return W};aO.md.a0C=function(W,h,S,k,p){var I=new em(y.E.u,!0),q=new em(y.E.W,!0),P=k.fO(),t=k.kt;
|
|
if(!1){}else if(W.aL=="Application"){if(!1){}else if(h=="activeDocument"){q.data={o:y.D.Hf,om:S.k};k.c(q)}else if(h=="displayDialogs"){}else console.log(W,h,S)}else if(W.aL=="Document"){var M=W.k;
|
|
if(!1){}else if(h=="name"){I.b=a.m5;I.data={o:$.bC,k:S,afW:!0,AA:M};P.WU=!0}else if(h=="source")M.aq=S;
|
|
else if(h=="activeLayer"){M.w=[M.g.indexOf(S.k)]}else if(h=="activeHistoryState"){I.b=a.pD;I.data={o:"h_itemchange",index:S.Kr}}else console.log(W,h)}else if(W.aL=="Layer"){I.b=a.m5;
|
|
var U={transparentPixelsLocked:0,pixelsLocked:1,positionLocked:2,allLocked:31},i=W.k,z=P.g.indexOf(i);
|
|
if(!1){}else if(h=="visible"){if(i.jP()!=S)I.data={o:$.EO,i:z}}else if(h=="opacity"){I.data={o:$.Jn,i:z,kN:Math.round(255*S/100)}}else if(h=="blendMode"){I.data={o:$.c9,i:z,kN:hd.wl.indexOf(S)}}else if(h=="name"){I.data={o:$.NV,i:z,name:S}}else if(U[h]!=null){I.data={o:$.q9,i:z,kN:[[S],[U[h]]]}}else if(h=="kind"){I.data={o:$.iP,i:z,JC:aO.md.zs[S]}}else if(h=="grouped"){I.data={o:$.Wk,i:z,kN:S}}else console.log(W,h,S)}else if(W.aL=="TextItem"){I.b=a.mj;
|
|
var i=W.k,D=i.add.TySh,R=JSON.parse(JSON.stringify(D.MW)),O=D.A.clone(),b=D.A.Nc(),w=gf.x5(R),A=gf.Ql(R,0,w.length-2),g=!1;
|
|
if(!1){}else if(h=="contents"){gf.Bu(R,0,w.length-1);gf.XK(R,0,S.replace(/\r/g,"\n"))}else if(h=="size"){A.D4.FontSize=(S.k!=null?S.k:S)/b;
|
|
g=!0}else if(h=="leading"){A.D4.Leading=(S.k!=null?S.k:S)/b;g=!0}else if(h=="tracking"){A.D4.Tracking=S.k!=null?S.k:S;
|
|
g=!0}else if(h=="baselineShift"){A.D4.BaselineShift=S.k!=null?S.k:S;g=!0}else if(h=="fauxBold"){A.D4.FauxBold=S;
|
|
g=!0}else if(h=="fauxItalic"){A.D4.FauxItalic=S;g=!0}else if(h=="kind"){var E=gf.SY(R);if(E==1&&S==1){var x=new a1(R,k.kt.Tm).MR[0],d=x.Sg[0].end,L=x.pr[d-1].end;
|
|
gf.Bu(R,0,w.length-1);gf.XK(R,0,w.slice(0,L-1))}if(E==S)gf.fN(R,1-S)}else if(h=="useAutoLeading"){A.MR.AutoLeading=S;
|
|
g=!0}else if(h=="hyphenation"){A.MR.AutoHyphenate=S;g=!0}else if(h=="justification"){A.MR.Justification=S;
|
|
g=!0}else if(h=="font"){gf.jq(A,S);g=!0}else if(h=="color"){A.D4.FillColor.Values=S.k.slice(0);g=!0}else if(h=="width"||h=="height"){var _=gf.yK(R).slice(0),T=aO.md.anJ(S);
|
|
if(h=="width")_[2]=Math.round(_[0]+T/b);else _[3]=Math.round(_[1]+T/b);gf.hz(R,_)}else if(h=="position"){O.y8=S[0];
|
|
O.S8=S[1]}else if(h=="horizontalScale"||h=="verticalScale"){var c=h[0].toUpperCase()+h.slice(1);A.D4[c]=S/100;
|
|
g=!0}else if(h=="antiAliasMethod")gf.ty(D,S);else console.log(W,h,S);if(g)gf.$n(R,0,w.length-1,A);I.data={o:"newED",aQ:P.g.indexOf(i),yw:R,A:O}}else if(W.aL=="Preferences"){if(!1){}else if(h=="rulerUnits"){var e=JSON.parse(JSON.stringify(t.dH));
|
|
e.VI=S;q.data={o:y.D.XO,nP:f6.ic,kN:e};k.c(q)}else console.log(W,h,S)}else if(W.aL=="SolidColor"){if(h=="rgb")W.k=S.k;
|
|
else throw h}else if(W.aL=="RGBColor"){if(!1){}else if(h=="red")W.k[1]=S/255;else if(h=="green")W.k[2]=S/255;
|
|
else if(h=="blue")W.k[3]=S/255;else if(h=="hexValue"){var r=N.II(S.slice(1));W.k[1]=(r>>>16&255)/255;
|
|
W.k[2]=(r>>>8&255)/255;W.k[3]=(r>>>0&255)/255}else console.log(W,h)}else if(W.aL=="ExportOptionsSaveForWeb"){if(h=="format")W.k.t8=S;
|
|
else if(h=="PNG8"||h=="transparency"||h=="interlaced"){}else if(h=="quality")W.k.FF=S;else throw h}else if(W.aL=="JPEGSaveOptions"){if(h=="quality")W.k.FF=Math.round(100*S/12)}else if(W.aL=="PDFSaveOptions"){if(h=="preset")W.k.ajd=S}else console.log(W,h,S);
|
|
if(I.data!=null)k.c(I)};aO.md.Bg=function(W,h,S,k,p){var I=W.aL,q=null,P=new em(y.E.u,!0),t=new em(y.E.gg,!0),M=new em(y.E.W,!0),U=k.fO(),i=k.o0;
|
|
if(!1){}else if(I=="Application"){if(!1){}else if(h=="charIDToTypeID"){var z=S[0].trim(),D={slct:"select",Dlt:"delete",Mk:"make"};
|
|
return D[z]?D[z]:z}else if(h=="stringIDToTypeID"){var R=S[0].trim(),D={red:"Rd",blue:"Bl",color:"Clr",RGBColor:"RGBC",type:"Type",using:"Usng"},O=D[R];
|
|
return O==null?R:O}else if(h=="executeAction"){console.log(S);var b;if(S[1]){b=S[1].k;b.classID=S[0]}var w={setd:"set"},A=w[S[0]];
|
|
if(A==null)A=S[0];var g=bS.wb[S[0]];if(g&&bS.gV[g])A=bS.gV[g];t.data={HP:A,b4:b}}else if(h=="executeActionGet"){return{aL:"ActionDescriptor",k:{classID:"null",null:{t:"obj ",v:S[0].k}}}}else if(h=="doAction"){M.data={o:y.D.se,cM:[S[0],S[1]]}}else if(h=="open"){M.data={o:y.D.HY,nP:{url:S[0]}};
|
|
if(S[2]&&i.length!=0)M.data.nP.KX=i.indexOf(U)}else if(h=="echoToOE"){M.data={o:y.D.Yg,nP:S[0]}}else console.log(h)}else if(I=="LayerComp"){if(h=="apply"){P.b=a.fK;
|
|
P.data={o:"setLC",Kr:U.S1.list.v[W.k].v.compID.v}}else throw h}else if(I=="Document"){var U=W.k;if(!1){}else if(h=="crop"){t.data=a.JY.vu(S[0])}else if(h=="trim"){var E=[];
|
|
for(var Q=0;Q<4;Q++)E.push(S[Q+1]!=null?S[Q+1]:!0);t.data=a.JY._u(S[0]!=null?S[0]:0,E)}else if(h=="suspendHistory"){var j=acorn.parse(S[1]);
|
|
aO.eval(j,k,p)}else if(h=="save"){M.data={o:y.D.qE}}else if(h=="saveToOE"){M.data={o:y.D.qE,at3:S}}else if(h=="rotateCanvas"){t.data=a.Q._o(!0,S[0])}else if(h=="resizeImage"||h=="resizeCanvas"){var x=S[0],d=S[1];
|
|
if(typeof x!="number"){x=U.e*parseFloat(x.slice(0,x.length-1))/100;d=U.Z*parseFloat(d.slice(0,d.length-1))/100}if(h=="resizeCanvas")t.data=a.JY.yV(Math.round(x),Math.round(d),S[2]);
|
|
else t.data=a.JY.nK(Math.round(x),Math.round(d),null,1)}else if(h=="paste"){M.data={o:y.D.lR,Xc:S.length!=0&&S[0],PE:!0}}else if(h=="close"){M.data={o:y.D.Xp,$x:U}}else if(h=="exportDocument"||h=="saveAs"){var L=p.__fs,_=S[0].k.replace(":","").replace("~/",""),T=h=="exportDocument"?S[2].k:S[1].k,c=hI.Es(U,T.t8,null,null,T.t8=="pdf"?null:[T.FF],k.kt);
|
|
L[_]=new Uint8Array(c)}else console.log(W,h,S)}else if(I=="Layer"){var e=W.k,r=U.g.indexOf(e);if(!1){}else if(h=="copy"){aO.md.rr(U,k,0);
|
|
M.data={o:y.D.Lu,H6:S[0],Cy:r,PE:!0};k.c(M);delete M.data;aO.md.rr(U,k,1)}else if(h=="clear"){aO.md.rr(U,k,0);
|
|
t.data={HP:"delete"};k.c(t);delete t.data;aO.md.rr(U,k,1)}else if(h=="duplicate"){if(S.length==0){P.data={o:$.T2,i:r};
|
|
P.b=a.m5;k.c(P);P.data=null;q={aL:"Layer",k:U.g[U.w[0]]}}else if(S[0].aL=="Document"){P.data={o:$.W$,g:U.Cf(r),P4:U,zp:S[0].k};
|
|
P.b=a.m5}}else if(h=="merge"||h=="remove"){P.data={o:h=="merge"?$.JD:$.Xr,i:r};P.b=a.m5;if(h!="remove")q={aL:"Layer",k:U.g[U.w[0]]}}else if(h=="move"){P.data={o:$.sO,source:r,target:U.g.indexOf(S[0].k),hb:S[1]!=3?.6:.3};
|
|
P.b=a.m5}else if(h=="rasterize"){t.data={HP:"rasterizeLayer",b4:{classID:"rasterizeLayer",null:fP.gj("Lyr",!0)}}}else if(h=="rotate"){P.data={o:"rot",rO:[2,5],k:-S[0]*Math.PI/180,sr:S[1],i:r};
|
|
P.b=a.Fh}else if(h=="resize"){P.data={o:"scl",rO:[2,4],k:new eC(S[0]/100,S[1]/100),sr:S[2],i:r};P.b=a.Fh}else if(h=="translate"){var B=aO.md.a1I(S);
|
|
P.data={o:"trsl",i:r,GV:B[0],qp:B[1]};P.b=a.M2}else if(h=="link"){P.data={o:$.l4,abN:[r,U.g.indexOf(S[0].k)]};
|
|
P.b=a.m5}else if(h=="invert"){P.b=a.AT;P.data={o:"start",dv:"nvrt"}}else if(h.startsWith("apply")&&hw.Jd[h.slice(5)]){var B=aO.md.a1I(S),F=hw.Jd[h.slice(5)];
|
|
t.data={HP:hw.gV[F]};var b=hw.QE(F);if(b){hw.AC["g"+F](b,B);t.data.b4=b}}else console.log(W,h,S)}else if(I=="Documents"){if(h=="getByName"){for(var Q=0;
|
|
Q<i.length;Q++)if(i[Q].name==S[0])return{aL:"Document",k:i[Q]};return null}else if(h=="add"){var X=S[5];
|
|
if(X==null)X=1;t.data=jg.vU(S[0],S[1],S[2],S[3],["Wht","Trns","BckC"][X],!1)}else throw"e"}else if(I=="Layers"){if(h=="getByName"){for(var Q=0;
|
|
Q<W.k.length;Q++)if(W.k[Q].k.getName()==S[0]){q=W.k[Q];break}if(q==null)p.__throw={message:"No layer with a name "+S[0]}}else if(h=="add"){P.data={o:W.y9=="layerSets"?$.fg:$.gL};
|
|
P.b=a.m5;k.c(P);P.data=null;q={aL:"Layer",k:U.g[U.w[0]]}}else console.log(W,h,S)}else if(W.aL=="Selection"){if(h=="select"){var V=S[0],H=[];
|
|
for(var Q=0;Q<V.length;Q++)H.push(V[Q][0],V[Q][1]);t.data=a.I6.sQ(H)}else if(h=="selectAll"){t.data=a.I6.tQ(!0)}else if(h=="invert"){t.data={HP:"inverse"}}else if(h=="copy"){M.data={o:y.D.Lu}}else if(h=="deselect"){t.data=a.I6.tQ()}else if(h=="fill"){var o=S[0].k;
|
|
o=N.X.hg({p:o[1]*255,z:o[2]*255,S:o[3]*255});t.data=a.ut.XU("Clr",S[1],S[2]==null?1:S[2]/100,o)}else console.log(W,h,S)}else if(W.aL=="Window"){if(h=="show"){M.data={o:y.D.mJ,DG:W.k}}else throw"e"}else if(W.aL=="ActionReference"){if(h=="putProperty"){W.k.push({t:"prop",v:{classID:S[0],keyID:S[1]}})}else if(h=="putClass"){W.k.push({t:"Clss",v:{classID:S[0]}})}else if(h=="putEnumerated"){W.k.push({t:"Enmr",v:{classID:S[0],typeID:S[1],enum:S[2]}})}else if(h=="putName"){W.k.push({t:"name",v:{classID:S[0],val:S[1]}})}else console.log(h,S)}else if(W.aL=="ActionDescriptor"||W.aL=="ActionList"){if(h=="putReference"){W.k[S[0]]={t:"obj ",v:S[1].k}}else if(h=="putDouble"){W.k[S[0]]={t:"doub",v:S[1]}}else if(h=="putUnitDouble"){W.k[S[0]]={t:"UntF",v:{type:S[1],val:S[2]}}}else if(h=="putObject"){if(W.aL=="ActionList"){var J=S[1].k;
|
|
J.classID=S[0];W.k.push({t:"Objc",v:J})}else{var J=S[2].k;J.classID=S[1];W.k[S[0]]={t:"Objc",v:J}}}else if(h=="putList"){W.k[S[0]]={t:"VlLs",v:S[1].k}}else if(h=="putBoolean"){W.k[S[0]]={t:"bool",v:S[1]}}else if(h=="putInteger"){W.k[S[0]]={t:"long",v:S[1]}}else if(h=="putString"){W.k[S[0]]={t:"TEXT",v:S[1]}}else if(h=="putEnumerated"){var C={};
|
|
C[S[1]]=S[2];W.k[S[0]]={t:"enum",v:C}}else if(h=="hasKey"){var K=W.k.null.v;for(var Q=0;Q<K.length;Q++){if(K[Q].v.keyID==S[0]){if(S[0]=="UsrM"){return U.g[U.w[0]].kX()!=null}else throw S}}}else console.log(h,S)}else if(W.aL=="$"){if(h=="writeln"){console.log(S[0])}else throw h}else if(W.aL=="UI"){var u;
|
|
if(h=="zoomIn"||h=="zoomOut"){u={o:"zoom",R9:h=="zoomIn"}}else if(h=="fitTheArea"){u={o:"adapt",k:"fitscr"}}else if(h=="pixelToPixel"){u={o:"adapt",k:"pixel"}}P.b=a.vD;
|
|
P.data=u}else console.log(W,h,S);if(P.data)k.c(P);if(t.data)k.c(t);if(M.data)k.c(M);return q};aO.md.rr=function(W,h,S){var k=new em(y.E.u,!0);
|
|
k.b=a.Ck;var p=new em(y.E.gg,!0);if(S==0){aO.md.aqW=W.q;p.data=a.I6.tQ(!0)}else{var I=aO.md.aqW;if(I)k.data={o:"setsel",rO:"Restore Selection",q:{rect:I.rect.clone(),channel:I.channel.slice(0)}};
|
|
else p.data=a.I6.tQ()}h.c(k.data?k:p)};aO.md.aqW=null;aO.md.b3={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:{RGB:0},NewDocumentMode:{RGB:0},DocumentFill:{WHITE:0,TRANSPARENT:1,BACKGROUNDCOLOR:2},TrimType:{TOPLEFT:0,BOTTOMRIGHT:1,TRANSPARENT:2},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}};
|
|
aO.md.b3.ColorBlendMode=aO.md.b3.BlendMode;aO.md.zs="---- SoLd TySh SoCo GdFl PtFl".split(" ");function b_(){}b_.az={"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":[""]};
|
|
b_.km={"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"};
|
|
b_.a4X=function(W,h){if(h==null)h={};var S=b_.km,k=[],p=[],I="";for(var Q=0;Q<W.length;Q++){var q=W[Q],P=S[q[0]+""];
|
|
if(P&&h[P]==null)h[P]=q[1];else if(q[0]==12)p.push(q[1]);else if(q[0]==25)k.push(q[1]);else if(q[0]==55)I=q[1];
|
|
else if(q[0]==60)I+=";"+q[1]}if(I!=""&&h["exif:DateTimeOriginal"]==null)h["exif:DateTimeOriginal"]=I;
|
|
if(p.length!=0&&h["Iptc4xmpCore:SubjectCode"]==null)h["Iptc4xmpCore:SubjectCode"]=p.join(";");if(k.length!=0&&h["dc:Keywords"]==null)h["dc:Keywords"]=k.join(";");
|
|
return h};b_.att=function(W){var h=b_.km,S=[];for(var k in h)if(W[h[k]])S.push([parseInt(k),W[h[k]]]);
|
|
if(W["Iptc4xmpCore:SubjectCode"]){var p=W["Iptc4xmpCore:SubjectCode"].split(";");for(var Q=0;Q<p.length;
|
|
Q++)S.push([12,p[Q].trim()])}if(W["dc:Keywords"]){var p=W["dc:Keywords"].split(";");for(var Q=0;Q<p.length;
|
|
Q++)S.push([25,p[Q].trim()])}S.sort(function(I,q){return I[0]-q[0]});return S};b_.a57=function(W,h){if(h==null)h={};
|
|
var S=new DOMParser,k=S.parseFromString(W,"image/svg+xml"),p=k.getElementsByTagName("rdf:Description")[0];
|
|
if(p==null)return h;var I=b_.az;for(var q in I){var P=I[q][2];if(P==null)continue;var t=p.getElementsByTagName(P)[0];
|
|
if(t==null)continue;var M=t.getElementsByTagName("rdf:li"),U=[];for(var Q=0;Q<M.length;Q++)U.push(M[Q].textContent);
|
|
h[q]=U.join("; ")}return h};b_.atT=function(W){var h=["<?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#\">"],S=b_.az;
|
|
for(var k in S){var p=W[k],I=S[k][2],q="Seq",P="";if(p==null||I==null)continue;if(I=="dc:title"||I=="dc:description"){q="Alt";
|
|
P=" xml:lang=\"x-default\""}if(I=="dc:subject")q="Bag";h.push("\t<"+I+"><rdf:"+q+">");var t=I=="dc:subject"?p.split(";").join(",").split(","):[p];
|
|
for(var Q=0;Q<t.length;Q++)h.push("\t\t<rdf:li"+P+">"+t[Q].trim()+"</rdf:li>");h.push("\t</rdf:"+q+"></"+I+">")}h.push("</rdf:Description>","</rdf:RDF>","</x:xmpmeta>","<?xpacket end=\"w\"?>");
|
|
return h.join("\n")};b_.a0P=function(W){var h=[];for(var Q=0;Q<W.length;Q++)h[Q]=W[Q][1]==0?0:W[Q][0]/W[Q][1];
|
|
return h};b_.a55=function(W){var h=[];for(var Q=0;Q<W.length;Q++){var S=W[Q],k=1;if(S!=Math.round(S)){k=1e3;
|
|
S=Math.round(S*k)}h[Q]=[S,k]}return h};b_.mW=function(W,h){var S=b_.az;if(h==null)h={};for(var k in S){var p=S[k][1],I="t"+p;
|
|
if(p!=null&&W[I]!=null){var q=W[I];if(p==0)q=q.join(".");else if(p==2||p==4){var P=W["t"+(p-1)];if(P==null)P=[p==2?"N":"E"];
|
|
q=b_.a0P(q).join(",")+P[0]}else if(p==42034)q=b_.a0P(q).join(" ");else if(p==270||p==315){var t=q[0],M=new Uint8Array(t.length);
|
|
G.vq(M,0,t);q=G.Md(M)}else q=q[0];h[k]=q}}if(W.exifIFD)b_.mW(W.exifIFD,h);if(W.gpsiIFD)b_.mW(W.gpsiIFD,h);
|
|
return h};b_.kq=function(W,h,S){var k=b_.az,I=0,P=0;if(h==null)h={};var p={},q={};for(var t in k){if(W[t]==null||k[t][1]==null)continue;
|
|
var M=k[t][1],U="t"+M,i=h;if(t.startsWith("exif:")){i=p;I++;if(t.startsWith("exif:GPS")){i=q;P++}}var z=W[t];
|
|
if(M==0)z=new Uint8Array(z.split(".").map(parseFloat));else if(M==2||M==4){var D=z.length;i["t"+(M-1)]=[z.slice(z.length-1)];
|
|
z=b_.a55(z.split(",").map(parseFloat))}else if(M==42034)z=b_.a55(z.split(" ").map(parseFloat));else if(M==270||M==315){var R=G.cw(z);
|
|
z=[G.dP(R,0,R.length)]}else z=[z];i[U]=z}if(I!=0){h.exifIFD=p;h.t34665=[0]}if(P!=0){h.gpsiIFD=q;h.t34853=[0]}var O=new Date,b=[O.getFullYear(),O.getMonth()+1,O.getDate(),O.getHours(),O.getMinutes(),O.getSeconds()];
|
|
for(var Q=0;Q<6;Q++)b[Q]=(b[Q]+"").padStart(2,"0");h.t305=["Photopea Editor (www.photopea.com)"];if(S!=!0)h.t306=[b[0]+":"+b[1]+":"+b[2]+" "+b[3]+":"+b[4]+":"+b[5]];
|
|
return h};var m={};m.au4=0;m.BT=function(){m.au4++;return m.au4};m.aqQ="uint8";m.a7M=function(){var W=m.a04();
|
|
if(W=="")return 0;if(W!=m.x4("_TXZRPB;d7@;")){var h=m.Qe[ca.LM][ca.bu],S=h.indexOf(String.fromCharCode(35)),k;
|
|
if(S==-1)return 0;try{k=JSON.parse(m.Qe[ca.arY](h.slice(S+1)))}catch(dq){return 0}var p=k[m.x4("bQ[ODL<E<M")];
|
|
if(p==null||p.length<<2!=64)return 0;var I=ca.ks(),q=parseInt(p.slice(3*4).split("").reverse().join(""),16)<<16;
|
|
if(q<I||p!=ca.aop(q,W))return 0;return 2}return 1};m.a04=function(){var W=m.Qe[m.dJ("}$z{2*35")][m.x4("W[\\ZQAJ?")],h=String.fromCharCode(46),S=W.split(h);
|
|
if(S.length<2)return"";var k=S.pop();k=S.pop()+h+k;return k};m.a4S=function(){if(m.Qe[ca.aiy][ca.acF]){var W=new m.Qe[ca.G_];
|
|
W[ca.ta](ca.amt,m.x4("W`]VVykhNKH[;046.,}v@r{v5samc&YgSY\\rRGLw=oaR3+`%|")+m.a04());W[ca.Oq]()}};m.de=function(){if(window.top!=window.self)return!1;
|
|
var W=navigator.userAgent.toLowerCase();if(W.indexOf("android")!=-1)return!1;if(W.indexOf("safari")!=-1&&W.indexOf("chrome")==-1)return!1;
|
|
return window.ClipboardItem!=null};m.Sn=function(W){this.L4=W;this.amc=m.O("img");this.UF=m.O("canvas");
|
|
this.jn=null;this.Pb="";this.Ax=null;this.Ww=new eC(0,0);m.EB(this.L4,this.Uh.bind(this))};m.Sn.prototype.Yo=function(W,h){this.jn=W;
|
|
if(h)this.Pb=h;this.Uh()};m.Sn.prototype.Uh=function(W){if(W)this.Ww=m.DJ(W,this.L4);var h=this.jn,S=typeof h=="string";
|
|
if(!S){var k=m.F(),p=this.Ww,I=h.pY.e,q=h.pY.Z,P=typeof h.jj=="string",t=P?this.amc:this.UF;if(P)t.setAttribute("src",h.jj);
|
|
else{t.width=I;t.height=q;var M=t.getContext("2d"),U=new ImageData(new Uint8ClampedArray(h.jj.buffer),I,q);
|
|
M.putImageData(U,0,0)}t.setAttribute("style"," position:absolute; pointer-events:none;user-select:none;"+"top:"+(p.y-h.fQ.y/k)+"px; left:"+(p.x-h.fQ.x/k)+"px; width:"+I/k+"px; height:"+q/k+"px");
|
|
var i=this.Ax;if(i==null||i!=t){if(i)this.L4.removeChild(i);this.L4.appendChild(t);this.Ax=t}}else if(this.Ax){this.L4.removeChild(this.Ax);
|
|
this.Ax=null}this.L4.setAttribute("style","cursor:"+(S?h:"none")+"; "+this.Pb)};m.Pr=function(W){return W.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'")};
|
|
m.ab=function(W,h){W.U6(dq.get([12,41]).charAt(0)+":");h.U6(dq.get([12,42]).charAt(0)+":")};m.O=function(W,h){var S=document.createElement(W);
|
|
if(h!=null)S.setAttribute("class",h);return S};m.hP=function(W){while(W.firstChild)W.removeChild(W.firstChild)};
|
|
m.dT=function(W,h){var S=W.getAttribute("class");if(S==null)S="";S=S.split(" ");if(S.indexOf(h)==-1)S.push(h);
|
|
W.setAttribute("class",S.join(" "))};m.Eg=function(W,h){var S=W.getAttribute("class");if(S==null)return;
|
|
S=S.split(" ");if(S.indexOf(h)!=-1)S.splice(S.indexOf(h),1);W.setAttribute("class",S.join(" "))};m.oq=function(W){while(!0){if(W==document)return!0;
|
|
if(W==null)return!1;W=W.parentNode}};m.YI=function(W){W.appendChild(m.O("br"))};m.k6=function(W){W.appendChild(m.O("hr"))};
|
|
m.s1=function(W,h,S){var k=new aA([1,12,1],S==null?!0:S,null,!0);if(W)k.h("click",W.CU,W);if(h)h.appendChild(k.m);
|
|
return k};m.Qe=document;m.zF=function(W){var h=0;for(var Q=0;Q<W;Q++)h+=Math.random();return h/W<Math.PI/4};
|
|
m.x4=function(W){var h="";if(!m.zF(28))W+="-3";for(var Q=0;Q<W.length;Q++){var S=W.charCodeAt(Q);if(S<32||126<S)throw"e";
|
|
h+=String.fromCharCode(32+(S-32+17+3*Q)%95)}return h};m.dJ=function(W){var h="";if(!m.zF(28))W+="-1";
|
|
for(var Q=0;Q<W.length;Q++){var S=W.charCodeAt(Q);S-=32;S+=95e4;S-=17+3*Q;S=S%95;h+=String.fromCharCode(32+S)}return h};
|
|
m.qm=function(W){var h=Math.random();m.aqQ="uint"+(3+h);return new W};(function(){var W=window.PointerEvent,h=W?"pointer":"mouse",S=h+"down",k=h+"move",p=h+"up",I=!1;
|
|
m.K$=function(q,P){q.addEventListener(S,P,I);if(!W)q.addEventListener("touchstart",P,I)};m.EB=function(q,P){q.addEventListener(k,P,I);
|
|
if(!W)q.addEventListener("touchmove",P,I)};m.uE=function(q,P){q.addEventListener(p,P,I);if(!W)q.addEventListener("touchend",P,I)};
|
|
m.ai3=function(q,P){q.removeEventListener(S,P,I);if(!W)q.removeEventListener("touchstart",P,I)};m.WF=function(q,P){q.removeEventListener(k,P,I);
|
|
if(!W)q.removeEventListener("touchmove",P,I)};m.TF=function(q,P){q.removeEventListener(p,P,I);if(!W)q.removeEventListener("touchend",P,I)}}());
|
|
m.NO=function(W){W.addEventListener("touchstart",m.q_,!1);W.addEventListener("touchmove",m.q_,!1);W.addEventListener("touchend",m.q_,!1);
|
|
W.addEventListener("gesturestart",m.q_,!1);W.addEventListener("gesturechange",m.q_,!1);W.addEventListener("gestureend",m.q_,!1)};
|
|
m.rE=function(W,h,S,k){var p=m.F();W.width=Math.floor(h*p);W.height=Math.floor(S*p);if(k)k.scale(p,p);
|
|
m.a5O(W)};m.a5O=function(W){var h=m.F();W.style.width=W.width/h+"px";W.style.height=W.height/h+"px"};
|
|
m.cq=function(W,h,S){W.setAttribute("style","width:"+h/m.F()+"px; height:"+S/m.F()+"px")};m.DJ=function(W,h){if(h==null)h=W.currentTarget;
|
|
var S=h.getBoundingClientRect();if(W.touches)W=W.touches.item(0);return{x:W.clientX-S.left,y:W.clientY-S.top}};
|
|
m.F=function(){return window.devicePixelRatio||1};m.j7=function(W){W.addEventListener("keydown",m.a8f,!1)};
|
|
m.a8f=function(W){W.stopPropagation()};m.q_=function(W){W.preventDefault()};m.xa=function(W){W.stopPropagation();
|
|
W.preventDefault()};m.NM=function(W,h,S){S=S?S:"";if(PIMG["__"+W]==null)S+=" gsicon";return"<img src=\""+PIMG[W]+"\" alt=\""+(h?h:"")+"\" class=\""+S+"\" />"};
|
|
m.pL=function(W,h,S,k){var p=W.dataTransfer.getData("text/uri-list");if(p!=null&&p.startsWith("http")){var I=new em(y.E.W,!0);
|
|
I.data={o:y.D.HY,nP:{url:p,KP:!0,KX:S,na:k}};h.c(I)}if(W.dataTransfer.files.length==0)return;if(window.showOpenFilePicker){var q=[],P=W.dataTransfer.items.length,t=W.dataTransfer.files;
|
|
for(var M of W.dataTransfer.items)M.getAsFileSystemHandle().then(function(U){q.push(U);if(q.length==P){var I=new em(y.E.W,!0);
|
|
I.data={o:y.D.i8,data:t,KX:S,na:k,ad0:q};h.c(I)}})}else{var I=new em(y.E.W,!0);I.data={o:y.D.i8,data:W.dataTransfer.files,KX:S,na:k};
|
|
h.c(I)}};if(m.zF(27))m.Qe=window;else m.Qe=m.alV;m.Qe._cwY=m.Qe[m.dJ("t$&!'31")];var hj={};hj.a7U=function(Q){var W=hj.HC[Q],h=document.documentElement.style,k=1;
|
|
h.setProperty("--base","#"+N.fl(W["--base"]));h.setProperty("--bg-panel","#"+N.fl(W["--bg-panel"]));
|
|
h.setProperty("--bg-canvas","#"+N.fl(W["--bg-canvas"]));h.setProperty("--bg-input","#"+N.fl(W["--bg-input"]));
|
|
h.setProperty("--bg-bbtn","#"+N.fl(W["--bg-bbtn"]));h.setProperty("--bg-bbtnOver","#"+N.fl(W["--bg-bbtnOver"]));
|
|
h.setProperty("--brdr","#"+N.fl(W["--brdr"]));h.setProperty("--text-color","#"+N.fl(W["--text-color"]));
|
|
h.setProperty("--brdrLgt","rgba(255,255,255,"+W["--brdrLgt"]+")");h.setProperty("--brdrDrk","rgba( 0, 0, 0,"+W["--brdrDrk"]+")");
|
|
h.setProperty("--alphaDark",""+W["--alphaDark"]);h.setProperty("--gs-invert",""+W["--gs-invert"]);var S=W["--sh-clr"];
|
|
h.setProperty("--sh-clr","rgba("+(S>>16)+","+(S>>8&255)+","+(S&255)+", 0.45)");h.setProperty("--sh-dy",""+W["--sh-dy"]+"px");
|
|
if(1<m.F()&&m.F()<1.5)k=1/m.F();h.setProperty("--img20",20*k+"px");h.setProperty("--img18",18*k+"px");
|
|
if(PIMG!=null){var p="lrs/eye 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 Q=0;Q<p.length;Q++){var I=p[Q],q=I.split("/").pop(),P=PIMG["__"+I]==null?W["--gs-invert"]:"0";
|
|
h.setProperty("--icon_"+q,"url("+PIMG[I]+")");h.setProperty("--icon_"+q+"_invrt",P)}}var t=document.querySelector("meta[name=theme-color]");
|
|
if(t)t.setAttribute("content","#"+N.fl(W["--base"]))};hj.HC=[{name:"Light Grey","--base":14737632,"--bg-panel":9868950,"--bg-canvas":14737632,"--bg-input":16777215,"--bg-bbtn":15921906,"--bg-bbtnOver":16777215,"--brdrLgt":.5,"--brdrDrk":.4,"--alphaDark":.12,"--text-color":3749943,"--gs-invert":.22,"--brdr":7237230,"--sh-clr":16777215,"--sh-dy":1},{name:"Dark Grey","--base":4671303,"--bg-panel":3158064,"--bg-canvas":2434341,"--bg-input":2434341,"--bg-bbtn":6316128,"--bg-bbtnOver":6974058,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":14013909,"--gs-invert":.78,"--brdr":2434341,"--sh-clr":0,"--sh-dy":-1},{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":2434352,"--sh-clr":0,"--sh-dy":-1},{name:"White","--base":16250871,"--bg-panel":14540253,"--bg-canvas":15132390,"--bg-input":16777215,"--bg-bbtn":14737632,"--bg-bbtnOver":14079702,"--brdrLgt":.2,"--brdrDrk":.2,"--alphaDark":.065,"--text-color":0,"--gs-invert":.18,"--brdr":13158600,"--sh-clr":16777215,"--sh-dy":1},{name:"Purple","--base":4931153,"--bg-panel":3287605,"--bg-canvas":2434341,"--bg-input":2435637,"--bg-bbtn":6840430,"--bg-bbtnOver":7694970,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":15790330,"--gs-invert":.88,"--brdr":2434352,"--sh-clr":0,"--sh-dy":-1},{name:"Black","--base":3487029,"--bg-panel":2434341,"--bg-canvas":1710618,"--bg-input":2434341,"--bg-bbtn":5263440,"--bg-bbtnOver":5921370,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":14671839,"--gs-invert":.78,"--brdr":1710618,"--sh-clr":0,"--sh-dy":-1}];
|
|
function hJ(){this.j$={};this.Zl={}}hJ.prototype.a1m=function(W){var h=this.j$[W];if(h==null)return!1;
|
|
return h.length>0};hJ.prototype.addEventListener=function(W,h){this.h(W,h,null)};hJ.prototype.h=function(W,h,S){if(this.j$[W]==null){this.j$[W]=[];
|
|
this.Zl[W]=[]}this.j$[W].push(h);this.Zl[W].push(S)};hJ.prototype.removeEventListener=function(W,h){var S=this.j$[W];
|
|
if(S==null)return;var k=S.indexOf(h);if(k<0)return;var p=this.Zl[W];S.splice(k,1);p.splice(k,1)};hJ.prototype.c=function(W){W.currentTarget=this;
|
|
if(W.target==null)W.target=this;var h=this.j$[W.type];if(h==null)return;var S=this.Zl[W.type];for(var Q=0;
|
|
Q<h.length;Q++){if(S[Q]==null)h[Q](W);else h[Q].call(S[Q],W)}};var em=function(W,h){if(!h)h=!1;this.type=W;
|
|
this.target=null;this.currentTarget=null;this.bubbles=h;this.b=null;this._Q=!1},y={E:{u:"0",W:"1",gg:"1.5",l:"2",UL:"3",ahf:"4"},D:{ar:"10",zS:"11",QV:"12",dp:"13",PS:"14",a2T:"14.1",HY:"15",$u:"16",fs:"17",Az:"18",qE:"19",app:"19.5",a8u:"20",_E:"21",Lu:"22",lR:"23",QN:"24",mJ:"25",tb:"26",Hf:"27",Zj:"28",a1V:"29",i8:"30",fX:"31",gw:"32",Po:"33",Sx:"34",XO:"35",ap4:"35.5",k3:"37",agd:"38",$D:"39",bc:"40",kI:"41",Yg:"41.5",aii:"42",vI:"43",a62:"43.5",Xp:"44",abP:"45",tJ:"46",MY:"47",I2:"48",se:"49",asM:"50",QO:"51"}};
|
|
function eS(){hJ.call(this);this.parent=null;this.m=null;this.s6=0;this.R_=0}eS.prototype=new hJ;eS.prototype.akK=function(W){var g8=this;
|
|
while(g8!=null){if(g8==W)return!0;g8=g8.parent}return!1};eS.prototype.Rv=function(){var W=this.m;return W.offsetWidth+W.clientLeft};
|
|
eS.prototype.agj=function(){var W=this.m;return W.offsetHeight+W.clientTop};eS.prototype.update=function(W){};
|
|
eS.prototype.c=function(W){hJ.prototype.c.call(this,W);if(W.bubbles&&this.parent!=null)this.parent.c(W)};
|
|
eS.prototype._=function(){};eS.prototype.UW=function(W,h){};eS.prototype.lz=function(W){m.dT(this.m,"disabled")};
|
|
eS.prototype.Ze=function(W){m.Eg(this.m,"disabled")};eS.prototype.G2=function(W){if(W)this.Ze();else this.lz()};
|
|
function gu(W){eS.call(this);this.BG=[];this.oj=!1;this.ajC=0;this._K={x:0,y:0,kK:!1};this.pz=W;this.a4p=this._O.bind(this);
|
|
this.mS=this.ZL.bind(this);this.akL=this.p9.bind(this);m.K$(W,this.a4p);m.EB(W,this.mS);W.addEventListener("wheel",this.nE.bind(this),!1);
|
|
W.addEventListener("contextmenu",this.a0t.bind(this),!1);var h=this.aoe.bind(this);W.addEventListener("gesturestart",h,!1);
|
|
W.addEventListener("gesturechange",h,!1);W.addEventListener("gestureend",h,!1);m.NO(W)}gu.prototype=new eS;
|
|
gu.prototype.aoe=function(W){if(W.type=="gesturestart")this.EN=W.scale;if(W.type=="gesturechange"){var h=new em("mouse",!0);
|
|
h.action="scroll";h.Ci=!0;this.Ws(W,h);var S=(this.EN-W.scale)/this.EN;h.tm=new eC(0,100*S);this.EN=W.scale;
|
|
this.c(h)}};gu.prototype.jx=function(W){var h=-1,S=this.BG;for(var Q=0;Q<S.length;Q++)if(S[Q].pointerId==W.pointerId)h=Q;
|
|
return h};gu.mo=function(W){if(W.which==2)return!0;var h=W.pointerType,S=window.__kb;return h=="touch"&&S.j(hW.a8S)};
|
|
gu.prototype._O=function(W){if(gu.mo(W))return;var h=this.jx(W);if(h!=-1)this.BG[h]=W;else this.BG.push(W);
|
|
if(this.BG.length==1){this.ajC=Date.now();var S=W.button!=null&&W.button!=0?"rdown":"down",k=new em("mouse",!0);
|
|
k.action=S;this.Ws(W,k);this.c(k);m.WF(this.pz,this.mS);m.EB(window,this.mS);m.uE(window,this.akL)}if(this.BG.length==2){if(Date.now()-this.ajC<100){var k=new em("mouse",!0);
|
|
k.action="cancellast";this.Ws(W,k);this.c(k)}this.ads("multidown");this.oj=!0}};gu.prototype.ZL=function(W){if(gu.mo(W))return;
|
|
var h=this.jx(W);if(h!=-1)this.BG[h]=W;if(this.BG.length>1){this.ads("multimove")}if(this.oj)return;
|
|
if(this.BG.length==1&&h==-1)return;var S=new em("mouse",!0);S.action="move";this.Ws(W,S);this.c(S)};
|
|
gu.prototype.p9=function(W){if(gu.mo(W))return;var h=this.BG,S=this.jx(W);if(S!=-1)h.splice(S,1);else return;
|
|
if(h.length==0){var k=W.button!=null&&W.button>0?"rup":"up",p=new em("mouse",!0);p.action=k;this.Ws(W,p);
|
|
this.c(p);m.WF(window,this.mS);m.TF(window,this.akL);m.EB(this.pz,this.mS);this.oj=!1}};gu.prototype.nE=function(W){W.preventDefault();
|
|
if(W.deltaX==0&&W.deltaY==0)return;var h=new em("mouse",!0);h.action="scroll";h.Ci=W.ctrlKey;this.Ws(W,h);
|
|
this.c(h)};gu.prototype.a0t=function(W){m.xa(W);var h=W.sourceCapabilities;if(h)h=h.firesTouchEvents;
|
|
if(h){var S=new em("mouse",!0);this.Ws(W,S);S.action="rdown";this.c(S);S.action="rup";this.c(S)}};gu.prototype.ads=function(W){var h=this.BG,S=m.F(),k=[];
|
|
for(var Q=0;Q<h.length;Q++){var p=k[Q]=m.DJ(h[Q],this.pz);p.x*=S;p.y*=S}var I=new em("mouse",!0);I.action=W;
|
|
I.ou=k;if(h.length<=2)this.c(I)};gu.prototype.Ws=function(W,h,S){var k=this.BG.length!=0;if(h.action!="up"){var p=m.F();
|
|
if(S==null)S=m.DJ(W,this.pz);this._K=h.r3={x:p*S.x,y:p*S.y,kK:k};var I=m.DJ(W,document.body);h.r3.eU=I.x;
|
|
h.r3.EK=I.y}else this._K=h.r3={x:this._K.x,y:this._K.y,kK:k};h.r3.uq=.5;if(W.pressure!=null&&W.pressure!=0)h.r3.uq=W.pressure;
|
|
if(W.pointerType=="mouse")h.r3.uq*=2;h.r3.ahN=W.pointerType;if(W.deltaX!=null){var q=W.deltaMode==0?1:40;
|
|
h.tm=new eC(W.deltaX*q,W.deltaY*q)}};function jv(W,h,S){eS.call(this);this.Mh=null;this.a7o=this.p9.bind(this);
|
|
this.anX=this.N4.bind(this);this.a0A=this.aaH.bind(this);this.arx=this.a8Z.bind(this);this.tp=[];this.Ex=[];
|
|
this.uC=[];this.arZ=[];this.m=m.O("div","contextpanel "+(S?"cp_dark":"cp_light"));this.m.addEventListener("contextmenu",m.q_,!1);
|
|
this.eM=null;this.yE=0;this.aok=W;this.l3=h;this.H2=[];for(var Q=0;Q<W.length;Q++){var k=m.O("div","enab");
|
|
this.Ex.push(k);this.m.appendChild(k);if(W[Q].CS){var p=m.O("img","thumb"+(S?" gsicon":""));p.setAttribute("src",PIMG[W[Q].CS]);
|
|
k.appendChild(p)}else{var I=m.O("span","check");this.arZ.push(I);k.appendChild(I)}var q=m.O("span","label");
|
|
q.innerHTML=dq.get(W[Q].name);k.appendChild(q);this.uC.push(q);if(W[Q].PO)this.m.appendChild(m.O("hr"));
|
|
if(W[Q].W2||W[Q].sub){var P=m.O("span","right");k.appendChild(P);if(W[Q].W2)P.innerHTML=hW.sU(W[Q].W2);
|
|
if(W[Q].sub)P.innerHTML="\u25B6"}k.addEventListener("click",this.a7o,!1);k.addEventListener("mouseover",this.anX,!0);
|
|
k.addEventListener("mouseout",this.a0A,!0);if(W[Q].sub){var t=new jv(W[Q].sub,h?h[Q].sub:null);t.parent=this;
|
|
this.H2.push(t);t.h("select",this.a2y,this)}else this.H2.push(null)}}jv.prototype=new eS;jv.prototype.a6V=function(W){m.hP(this.m);
|
|
for(var Q=0;Q<W.length;Q++)if(W[Q]!=0&&W[Q]!=null){this.m.appendChild(this.Ex[Q]);if(W[Q]!=1&&this.H2[Q])this.H2[Q].a6V(W[Q])}};
|
|
jv.prototype._=function(){var W=this.aok;for(var Q=0;Q<W.length;Q++){if(W[Q].title)this.Ex[Q].title=dq.get(W[Q].title);
|
|
this.uC[Q].textContent=dq.get(W[Q].name)+(W[Q].N7?"...":"")}for(var Q=0;Q<this.H2.length;Q++)if(this.H2[Q])this.H2[Q]._()};
|
|
jv.prototype.update=function(W,h){var S=this.aok;for(var Q=0;Q<S.length;Q++){if(S[Q].P){var k=S[Q].P(W,h,Q);
|
|
if(k.P!=null)this.Ex[Q].setAttribute("class",k.P?"enab":"disab");if(k.tM!=null)this.uC[Q].textContent=k.tM;
|
|
if(k.ZX!=null)this.arZ[Q].textContent=k.ZX?"\u2713":"";if(k.R!=null)this.l3[Q]=k.R}}for(var Q=0;Q<this.H2.length;
|
|
Q++)if(this.H2[Q])this.H2[Q].update(W,h)};jv.prototype.ZN=function(){return this.tp};jv.prototype.p9=function(W){if(W.button!=0)return;
|
|
var Q=this.Ex.indexOf(W.currentTarget);if(this.H2[Q]){this.yE=Q;this.a8Z()}else{if(this.l3){var h=this.l3[Q],S=new em(h.Y,!0);
|
|
S.b=h.b;S.data=h.R;this.c(S)}this.Mh=null;this.tp=[Q];this.c(new em("select",!1));var S=new em(y.E.W,!0);
|
|
S.data={o:y.D.dp};this.c(S)}};jv.prototype.N4=function(W){var Q=this.Ex.indexOf(W.currentTarget);if(this.eM){clearTimeout(this.eM);
|
|
this.eM=null}if(this.H2[Q]==null)return;this.yE=Q;this.eM=setTimeout(this.arx,300)};jv.prototype.aaH=function(W){var Q=this.Ex.indexOf(W.currentTarget);
|
|
if(this.eM){clearTimeout(this.eM);this.eM=null}};jv.prototype.a8Z=function(){if(this.eM){clearTimeout(this.eM);
|
|
this.eM=null}var Q=this.yE;if(this.Mh)this.Mh.a1g();this.Mh=this.H2[Q];var W=this.Ex[Q].getBoundingClientRect(),h=new em(y.E.W,!0);
|
|
h.data={o:y.D.zS,gh:this.H2[Q],x:W.left+W.width+2,y:W.top};this.c(h)};jv.prototype.a1g=function(){for(var Q=0;
|
|
Q<this.H2.length;Q++)if(this.H2[Q])this.H2[Q].a1g();var W=new em(y.E.W,!0);W.data={o:y.D.QV,gh:this};
|
|
this.c(W)};jv.prototype.a2y=function(W){var Q=this.H2.indexOf(W.target);this.tp=[Q].concat(W.target.ZN());
|
|
this.c(new em("select",!1))};function dB(W,h,S){eS.call(this);this.m=m.O("span","fitem cbox");if(h==null)h=!0;
|
|
if(S==null)S="flabel";var k="cb"+m.BT();this.Pf=m.O("input","");this.Pf.setAttribute("type","checkbox");
|
|
this.Pf.setAttribute("id",k);this.m.appendChild(this.Pf);this.oT=W;this.Ha=m.O("label",S);if(h)this.Ha.setAttribute("for",k);
|
|
this.m.appendChild(this.Ha);this._();this.Pf.addEventListener("change",this.P9.bind(this),!1)}dB.prototype=new eS;
|
|
dB.prototype.aeM=function(){return this.oT};dB.prototype.U6=function(W){this.Ha.textContent=W};dB.prototype._=function(){var W=this.oT;
|
|
if(typeof W=="string"&&W.startsWith("<"))this.Ha.innerHTML=W;else this.Ha.textContent=dq.get(W)};dB.prototype.$V=function(){this.Pf.checked=!0};
|
|
dB.prototype.UZ=function(){this.Pf.checked=!1};dB.prototype.KB=function(){return this.Pf.checked};dB.prototype.f=function(W){this.Pf.checked=W};
|
|
dB.prototype.B=dB.prototype.KB;dB.prototype.P9=function(W){this.c(new em(y.E.l,!1))};function gs(W,h){eS.call(this);
|
|
this.oT=W;this.m=m.O("span","labelitem fitem"+(h?" spread":""));this._()}gs.prototype=new eS;gs.prototype.f=function(W){this.m.textContent=W};
|
|
gs.prototype.B=function(){return this.m.textContent};gs.prototype.Ze=function(){this.m.removeAttribute("disabled")};
|
|
gs.prototype.lz=function(){this.m.setAttribute("disabled","")};gs.prototype.U6=function(W){this.m.textContent=W};
|
|
gs.prototype._=function(){this.m.textContent=dq.get(this.oT)};gs.prototype.aeM=function(){return this.oT};
|
|
function aA(W,h,S,k,p){eS.call(this);this.m=m.O("button","fitem"+(h?" spread":"")+(k?" bbtn":""));this.oT=W;
|
|
this.qy=S;this._();var I=p&&window.PointerEvent?"pointerup":"click";this.m.addEventListener(I,this.r7.bind(this),!1)}aA.prototype=new eS;
|
|
aA.prototype._=function(){var W=this.m,h=this.oT,S=this.qy,k=dq.get(h);if(k.startsWith("<img")||k.startsWith("<svg"))W.innerHTML=k;
|
|
else W.textContent=k;if(k.startsWith("<img")||k.startsWith("<svg"))W.setAttribute("style","padding:2px");
|
|
if(S){W.setAttribute("title",dq.get(S))}};aA.prototype.abv=function(W){this.m.setAttribute("title",W)};
|
|
aA.prototype.r7=function(W){this.c(new em("click",!1))};aA.prototype.$V=function(){m.dT(this.m,"bactive")};
|
|
aA.prototype.UZ=function(){m.Eg(this.m,"bactive")};aA.prototype.U6=function(W,h){if(W)this.oT=W;if(h)this.qy=h;
|
|
this._()};aA.prototype.f=function(W){if(W)this.$V();else this.UZ()};aA.prototype.KB=function(){return this.m.getAttribute("class").indexOf("bactive")!=-1};
|
|
aA.prototype.B=function(){return this.KB()};function i3(W,h,S,k,p){eS.call(this);var I=m.BT();this.m=m.O("span","fitem tinput");
|
|
if(W){this.oT=W;this.Ha=m.O("label","flabel");this.m.appendChild(this.Ha);this.Ha.setAttribute("for",I);
|
|
this._()}if(p){this.Pf=m.O("span")}else if(k==null){this.Pf=m.O("input");this.Pf.setAttribute("type","text")}else this.Pf=m.O("textarea","scrollable");
|
|
this.Pf.setAttribute("id",I);if(S)this.Pf.setAttribute("style","width:"+S+"em;"+(p?" display:inline-block; margin-left:6px;":""));
|
|
if(k)this.Pf.setAttribute("rows",k);this.m.appendChild(this.Pf);if(h){this.On=m.O("span");this.On.textContent=h;
|
|
this.m.appendChild(this.On)}m.j7(this.Pf);this.Pf.addEventListener("change",this.P9.bind(this),!1);this.Pf.addEventListener("input",this.aaX.bind(this),!1)}i3.prototype=new eS;
|
|
i3.prototype._=function(){if(this.oT)this.Ha.textContent=dq.get(this.oT)+":"};i3.prototype.U6=function(W){this.Ha.textContent=W};
|
|
i3.prototype.f=function(W){var h=this.Pf,S=W==null?"":W,k=h.tagName=="SPAN";if(k){h.textContent=" "+S;
|
|
if(this.On)h.appendChild(this.On)}else h.value=S};i3.prototype.B=function(){return this.Pf.value};i3.prototype.GG=function(){this.Pf.select();
|
|
this.Pf.focus()};i3.prototype.P9=function(W){this.c(new em(y.E.l,!1))};i3.prototype.aaX=function(W){this.c(new em("input",!1))};
|
|
function jq(W,h,S,k,p,I,q,P,t){eS.call(this);if(p==null)p=0;this.m=m.O("span","fitem");var M=m.BT();
|
|
this.oT=W;this.qy=P;this.jn=0;this.ab3=t;this.C9=h;this.ME=S;this.Qd=null;if(k instanceof Array){this.Qd=k;
|
|
k=k[0]}this.wF=k;this.fn=p;this.a3I=I;this.Lt=q;this.s8=0;this.Ha=m.O("label","flabel");this.Ha.innerHTML=W;
|
|
this.Ha.setAttribute("style","cursor:col-resize;");this.H4=m.O("input","");this.H4.setAttribute("type","range");
|
|
if(q){this.H4.min=0;this.H4.max=400}else{this.H4.min=h;this.H4.max=S;if(p!=0)this.H4.step=(S-h)/200}this.Pf=m.O("input","");
|
|
this.Pf.setAttribute("type","text");this.Pf.setAttribute("id",M);this.On=m.O("span","");this.On.innerHTML=k;
|
|
m.j7(this.Pf);this.Pf.addEventListener("change",this.P9.bind(this),!1);this.Pf.addEventListener("keydown",this.Wb.bind(this),!1);
|
|
this.Pf.addEventListener("wheel",this.nE.bind(this),!1);this.H4.addEventListener("input",this.P9.bind(this),!1);
|
|
if(t)this.H4.addEventListener("change",this.P9.bind(this),!1);this.H4.addEventListener("click",this.af0.bind(this),!1);
|
|
this.anr=this.arm.bind(this);this.auq=this.a3c.bind(this);this.ahX=this.aul.bind(this);this.eJ=0;this.$r=0;
|
|
this.Hr=!1;m.K$(this.Ha,this.anr);m.NO(this.Ha)}jq.prototype=new eS;jq.prototype.De=function(W){this.fn=W};
|
|
jq.prototype.U6=function(W){this.Ha.textContent=W};jq.prototype._=function(){var g8=this.oT,W=this.qy;
|
|
if(g8){if(typeof g8=="string"&&g8.startsWith("<"))this.Ha.innerHTML=g8;else this.Ha.textContent=dq.get(g8)+":"}if(W){W=dq.get(W);
|
|
if(g8)this.Ha.setAttribute("title",W);this.Pf.setAttribute("title",W)}};jq.prototype.f=function(W,h){var S=this.C9==this.ME;
|
|
if(!S&&this.C9>=0)W=Math.max(this.C9,W);if(this.fn==0)W=Math.round(W);var k=this.wF;this.jn=W;this.Pf.value=(this.fn!=0?W.toFixed(this.fn):W)+(this.a3I&&k?(k.toLowerCase()==k.toUpperCase()?"":" ")+k:"");
|
|
var p=400*Math.pow((W-this.C9)/(this.ME-this.C9),1/2.7);this.H4.value=this.Lt?p:W;if(h)this.ZJ()};jq.prototype.B=function(){var W=this.jn;
|
|
if(isNaN(W))W=0;return W};jq.prototype.hC=function(){return this.wF};jq.prototype.P9=function(W){var h=0;
|
|
if(W.currentTarget==this.Pf){var S=W.target.value,k=0;h=S==""?0:this.wF?parseFloat(S):eval(S);if(isNaN(h))h=0;
|
|
while(k<S.length&&(S.charAt(k)=="."||48<=S.charCodeAt(k)&&S.charCodeAt(k)<=57))k++;var p=S.slice(k).trim();
|
|
if(this.Qd&&this.Qd.indexOf(p)!=-1)this.wF=p}else{if(Date.now()-this.s8<10)return;h=parseFloat(W.target.value);
|
|
if(this.Lt){h=this.C9+Math.pow(h/400,2.7)*(this.ME-this.C9);h=this.adN(h)}}this.f(h);if(W.type=="input"&&this.ab3)return;
|
|
this.ZJ()};jq.prototype.ZJ=function(){this.c(new em(y.E.l))};jq.prototype.adN=function(W){if(this.ME-this.C9>50&&W>10)W=Math.round(W);
|
|
return W};jq.prototype.Wb=function(W){var h=0;if(hW.IO(W.code,hW.Xd))h=1;if(hW.IO(W.code,hW._g))h=-1;
|
|
if(h!=0)this.ar_(h,W.shiftKey)};jq.prototype.nE=function(W){this.ar_(W.deltaY>0?-1:1,W.shiftKey)};jq.prototype.ar_=function(W,h){var S=this.B(),k=this.fn,p=W*(k==null||k==0||S>5?1:.1);
|
|
if(h)p*=10;var I=S+p;if(!this.Lt&&this.ME!=this.C9)I=Math.min(this.ME,I);this.f(I);this.ZJ()};jq.prototype.af0=function(W){var h=Date.now()-this.s8;
|
|
this.s8=Date.now();if(h>200)return;var S=this.C9,k=this.ME,p=(S+k)/2;if(S<1&&k>1&&k<10)p=1;else if(S<90&&k>110)p=100;
|
|
else if(S<0&&k>0)p=0;this.f(p);this.ZJ()};jq.prototype.arm=function(W){m.EB(document,this.auq);m.uE(document,this.ahX);
|
|
this.eJ=m.DJ(W,document.body).x;this.$r=this.B()};jq.prototype.a3c=function(W){m.xa(W);var h=this.C9==this.ME,S=m.DJ(W,document.body).x,k=(S-this.eJ)*(h?1:1/120*(this.ME-this.C9)),p=this.$r+k;
|
|
if(h)p=Math.round(p);if(!h){if(!0){p=Math.max(this.C9,p);if(p==this.C9){this.eJ=S;this.$r=this.C9}}if(!this.Lt){p=Math.min(this.ME,p);
|
|
if(p==this.ME){this.eJ=S;this.$r=this.ME}}p=this.adN(p)}this.Hr=!0;this.f(p);this.ZJ()};jq.prototype.aul=function(W){if(!this.Hr)this.Pf.focus();
|
|
this.Hr=!1;m.WF(document,this.auq);m.TF(document,this.ahX)};jq.prototype.GG=function(){this.Pf.select();
|
|
this.Pf.focus()};function fA(W,h,S,k,p,I,q,P,t){jq.call(this,W,h,S,k,p,!0,I,t);m.dT(this.m,"rangedropinput");
|
|
this.m.appendChild(this.Ha);this.Pf.setAttribute("style","width:"+(P?P:3.3)+"em");this.m.appendChild(this.Pf);
|
|
this.a9N=m.O("span","rangecont");this.a9N.appendChild(this.H4);this.Op=m.O("button");this.Op.innerHTML="\u25BC";
|
|
m.K$(this.Op,this.ag6.bind(this));if(q!=!0)this.m.appendChild(this.Op);this.ue=new eS;this.ue.m=this.a9N}fA.prototype=new jq;
|
|
fA.prototype.ag6=function(W){if(m.oq(this.ue.m))return;W.stopPropagation();var h=this.m.getBoundingClientRect();
|
|
this.H4.setAttribute("style","width:"+h.width+"px;");var S=new em(y.E.W,!0);S.data={o:y.D.zS,gh:this.ue,x:h.left,y:h.top+h.height};
|
|
this.c(S)};function gY(W,h,S,k,p,I){jq.call(this,W,h,S,k,p,!1,I);this.m.appendChild(this.Ha);var q=m.O("span","rangecont");
|
|
this.m.appendChild(q);q.appendChild(this.H4);this.m.appendChild(this.Pf);this.Pf.setAttribute("style","width:3.3em");
|
|
if(this.wF)this.m.appendChild(this.On)}gY.prototype=new jq;function h1(W,h,S,k,p,I,q,P){jq.call(this,W,h,S,k,p,!0,I,null,q);
|
|
m.dT(this.m,"trangeinput");this.m.appendChild(this.Ha);this.m.appendChild(this.Pf);var t=m.O("span","rangecont");
|
|
if(P!=!0)this.m.appendChild(t);t.appendChild(this.H4);this.H4.setAttribute("style","width:97%;")}h1.prototype=new jq;
|
|
function fx(W,h,S,k){eS.call(this);if(!h)return;if(S==null)S=!1;this.Kb=0;this.any=S;this.oT=W;this.km=null;
|
|
this.aus=k;this._B=[];var p="dd"+m.BT();this.m=m.O("span","fitem ddmenu");if(W&&!S){this.Ha=m.O("label","flabel");
|
|
this.m.appendChild(this.Ha);this.Ha.setAttribute("for",p)}this.p0=m.O("select","bbtn");this.p0.setAttribute("id",p);
|
|
this.m.appendChild(this.p0);this.p0.addEventListener("change",this.P9.bind(this),!1);this.EU=[];this.SU=null;
|
|
this.XZ(h,k);this._()}fx.prototype=new eS;fx.prototype.U6=function(W){this.oT=W;this._()};fx.prototype._=function(){if(this.oT!=null){var W=dq.get(this.oT);
|
|
if(this.any)this.p0.setAttribute("title",W);else this.Ha.textContent=W+":"}if(this.SU)this.XZ(this.SU,this.aus);
|
|
this.f(this.Kb)};fx.prototype.B=function(){return this.Kb};fx.prototype.XZ=function(W,h){m.hP(this.p0);
|
|
var S=[],k=0;if(h){S.push(h[0]);for(var Q=1;Q<h.length;Q++)S.push(S[Q-1]+h[Q])}this.SU=W;this.km=[];
|
|
this.aus=h;for(var Q=0;Q<W.length;Q++){var p=m.O("option");if(this._B.indexOf(Q)!=-1)p.setAttribute("disabled","");
|
|
p.textContent=dq.get(W[Q]);p.setAttribute("value",Q);this.p0.appendChild(p);this.EU.push(p);this.km.push(Q+k);
|
|
if(S.indexOf(Q+1)!=-1&&Q!=W.length-1){var I=m.O("option");I.setAttribute("disabled","");I.textContent="";
|
|
this.p0.appendChild(I);k++}}};fx.prototype.a16=function(Q){var W=this._B,h=W.indexOf(Q);if(h==-1)W.push(Q);
|
|
this._()};fx.prototype.a5T=function(Q){var W=this._B,h=W.indexOf(Q);if(h!=-1)W.splice(h,1);this._()};
|
|
fx.prototype.f=function(W){this.Kb=W;this.p0.selectedIndex=this.km[W]};fx.prototype.P9=function(W){this.Kb=this.km.indexOf(this.p0.selectedIndex);
|
|
this.c(new em(y.E.l,!1))};function g1(W,h,S,k){eS.call(this);if(!h)return;this.Kb=0;this.afw=k;this.m=m.O("span","fitem bbmenu");
|
|
if(W){this.oT=W;this.Ha=m.O("label","flabel");this.Ha.textContent=W+":";this.m.appendChild(this.Ha)}this.EU=[];
|
|
this.SU=null;this.XZ(h,S);this.f(0)}g1.prototype=new eS;g1.prototype.U6=function(W){this.oT=W;this._()};
|
|
g1.prototype._=function(){if(this.oT!=null){this.Ha.textContent=dq.get(this.oT)+": "}for(var Q=0;Q<this.EU.length;
|
|
Q++)this.EU[Q]._()};g1.prototype.B=function(){return this.Kb};g1.prototype.XZ=function(W,h){while(this.EU.length>0)this.m.removeChild(this.EU.pop().m);
|
|
this.SU=W;for(var Q=0;Q<W.length;Q++){var S=new aA(W[Q],!1,h?h[Q]:null,this.afw);S.h("click",this.P9,this);
|
|
this.m.appendChild(S.m);this.EU.push(S)}this._()};g1.prototype.f=function(W){this.Kb=W;for(var Q=0;Q<this.EU.length;
|
|
Q++)this.EU[Q].UZ();this.EU[W].$V()};g1.prototype.P9=function(W){var Q=this.EU.indexOf(W.target);this.f(Q);
|
|
this.c(new em(y.E.l,!1))};g1.GO=function(W,h){if(h==null)h=16;var S=g1.UF,k=S.getContext("2d"),p=h>>>1;
|
|
S.width=S.height=h;var I=[];for(var Q=0;Q<W.length;Q++){if(W[Q][0]=="-")I.push(W[Q].slice(1));else if(W[Q]=="checker"||W[Q].startsWith("#")){if(W[Q]=="checker"){k.fillStyle="white";
|
|
k.fillRect(0,0,h,h);k.fillStyle="#bbbbbb";k.fillRect(p,0,p,p);k.fillRect(0,p,p,p)}else if(W[Q].startsWith("#")){k.fillStyle=W[Q];
|
|
k.fillRect(0,0,h,h)}I.push("<img src=\""+S.toDataURL()+"\" />")}else I.push(m.NM(W[Q],null,"autoscale"))}return I};
|
|
g1.UF=m.O("canvas");function ce(W,h,S,k,p,I){eS.call(this);this.m=m.O("span","fitem mbox");this.asq=S;
|
|
this.ajj=p;if(W){this.oT=W;this.Ha=m.O("label","flabel");this.m.appendChild(this.Ha)}this.ep=h;this.v9=[];
|
|
for(var Q=0;Q<h.length;Q++){var q=S?new aA(h[Q],!1,k?k[Q]:null,!1,I):new dB(h[Q],!0,"");q.h(S?"click":y.E.l,this.P9,this);
|
|
this.v9.push(q);this.m.appendChild(q.m)}this._()}ce.prototype=new eS;ce.prototype.f=function(W){for(var h=0;
|
|
h<this.ep.length;h++)this.v9[h].f(W[h])};ce.prototype.B=function(){var W=[];for(var h=0;h<this.ep.length;
|
|
h++)W[h]=this.v9[h].B();return W};ce.prototype._=function(){if(this.oT)this.Ha.innerHTML=dq.get(this.oT)+": ";
|
|
var W=this.v9;for(var h=0;h<W.length;h++){W[h]._();if(h==W.length-1)W[h].m.style.marginRight="0px"}};
|
|
ce.prototype.P9=function(W){var Q=this.v9.indexOf(W.currentTarget),h=this.v9[Q];if(this.asq)h.f(!h.B());
|
|
if(this.ajj){var S=h.B();for(var Q=0;Q<this.v9.length;Q++)this.v9[Q].f(!1);h.f(S)}this.c(new em(y.E.l,!1))};
|
|
function e1(W,h){eS.call(this);this.WH=[];this.w=[];this.a66=W;this.Gv=h;this.Je=0;this.Fw=null;this.Ww=new eC(0,0);
|
|
if(h!=null){this.R5=new jv([{name:[6,37]},{name:[5,4]}]);this.R5.parent=this;this.R5.h("select",this.rN,this)}this.m=m.O("div","imageset scrollable");
|
|
this.m.addEventListener("contextmenu",m.q_,!1)}e1.prototype=new eS;e1.prototype._=function(){if(this.R5)this.R5._()};
|
|
e1.prototype.rN=function(W){var Q=this.R5.ZN()[0],h=new em(y.E.W,!0),S={o:y.D.XO,nP:this.Gv,FB:this.w.slice(0)};
|
|
if(Q==0){var k=this.Fw[1][this.w[0]];S.qb="rnm";h.data={o:y.D.mJ,DG:"namewindow",U0:k,OI:{Y:y.E.W,R:S}}}else{h.data=S;
|
|
S.qb="del"}this.c(h)};e1.prototype.akp=function(){return this.Je};e1.prototype.KM=function(W){this.Je=W;
|
|
if(this.Fw)this.rD()};e1.prototype.V5=function(W,h,S,k){this.Fw=[W,h,S,k];this.rD()};e1.prototype.rD=function(){var W=this.Fw,h=W[0],S=W[1],k=W[2],p=W[3];
|
|
this.WH=[];this.m.innerHTML="";var I=this.r7.bind(this),q=this.Je;if(q==0)m.dT(this.m,"imageset");else m.Eg(this.m,"imageset");
|
|
for(var Q=0;Q<h.length;Q++){var P=h[Q],t=null;if(P==null){this.WH.push(null);continue}if(typeof P=="string"){t=m.O("img","image");
|
|
t.setAttribute("src",P)}else t=P;if(k)m.cq(t,k,p);if(this.a66)m.dT(t,"gsicon");if(q==0){}else{var M=m.O("div","listitem");
|
|
M.appendChild(t);var U=m.O("span");U.textContent=S?S[Q]:"Item "+(Q+1);U.setAttribute("style","margin-left:4px;");
|
|
M.appendChild(U);t=M}if(S)t.setAttribute("title",S[Q]);t.addEventListener("mousedown",I,!1);this.WH.push(t);
|
|
this.m.appendChild(t)}};e1.prototype.r7=function(W){if(this.Gv==null)W.preventDefault();var h=this.WH.indexOf(W.currentTarget),S=window.__kb,k=this.w,p=k.length;
|
|
if(S.j(hW.YS)){var I=Math.min(k[0],k[k.length-1],h),q=Math.max(k[0],k[k.length-1],h);k=[];for(var Q=I;
|
|
Q<=q;Q++)k.push(Q)}else if(S.j(hW.Q9)){var P=k.indexOf(h);if(P==-1)k.push(h);else k.splice(P,1)}else k=[h];
|
|
k.sort(function(i,z){return i-z});if(W.button==0||p==1)this.f(k);this.Ww=m.DJ(W,W.currentTarget);if(W.button==0)this.c(new em(y.E.l));
|
|
if(W.button==2&&this.R5){var t=this.R5;t.update(null);var M=m.DJ(W,document.body),U=new em(y.E.W,!0);
|
|
U.data={o:y.D.zS,gh:t,x:M.x,y:M.y+2};this.c(U)}};e1.prototype.B=function(){return this.w.slice(0)};e1.prototype.al5=function(){var W=this.Ww;
|
|
return new eC(W.x,W.y)};e1.prototype.f=function(W){this.w=W.slice(0);for(var Q=0;Q<this.WH.length;Q++){var h=this.WH[Q];
|
|
if(h==null)continue;if(W.indexOf(Q)!=-1)m.dT(h,"selected");else m.Eg(h,"selected")}};function bd(W,h,S,k,p,I,q){eS.call(this);
|
|
this.m=m.O("span","fitem "+S);this.v2=new eS;this.v2.m=m.O("div","floatcont");this.v2.m.setAttribute("style","width: "+(k+1.5)+"em;");
|
|
this.v2.parent=this;this.afg=m.O("div");this.v2.m.appendChild(this.afg);this.Co=m.O("div");this.v2.m.appendChild(this.Co);
|
|
if(W){this.oT=W;this.Ha=m.O("label","flabel");this.m.appendChild(this.Ha)}this.o=m.O("button",q?"nopadding":"");
|
|
this.o.setAttribute("style","position:relative;");this.o.addEventListener("click",(h?this.xS:this.y_).bind(this),!1);
|
|
this.m.appendChild(this.o);this.jD=m.O("img",q?"gsicon":"");this.o.appendChild(this.jD);if(h){var P=m.O("button");
|
|
P.textContent="\u25BC";P.addEventListener("click",this.y_.bind(this),!1);this.m.appendChild(P)}else{var t=m.O("span");
|
|
t.textContent="\u25BC";t.setAttribute("style","position:absolute; bottom:2px; right:4px;");this.o.appendChild(t)}var M=m.O("span");
|
|
this.Co.appendChild(M);M.setAttribute("style","display:inline-block; vertical-align:top; width:"+k+"em;");
|
|
this._U=new e1(q,I);M.appendChild(this._U.m);this._U.parent=this.v2;this._U.h(y.E.l,this.BI,this);this._U.m.style.height=p+"em";
|
|
this.Ty=m.O("button");this.Ty.textContent="\u25BC";this.Ty.setAttribute("style","padding:3px");this.Ty.addEventListener("click",this.a2c.bind(this),!1);
|
|
this.Co.appendChild(this.Ty);var U=this.$X(),i=I!=f6.xQ&&I!=f6.JF?I:null,z=I==null?"":f6.x6[I][0].toUpperCase(),D=i?[{name:[12,87]}]:[];
|
|
D=D.concat([{name:["VAR0 / VAR1",[25,3,0],[25,3,1]],PO:!0},{name:[[23,6],"."+(z=="ICC"?"icc .cube .look .3dl":z)]},{name:["VAR0 ."+z,[1,8]]},{name:[6,37]},{name:[5,4],PO:U.length!=0}]);
|
|
for(var Q=0;Q<U.length;Q++)D.push({name:U[Q].split("/").pop()});this.R5=new jv(D);this.R5.parent=this.v2;
|
|
this.R5.h("select",this.rN,this);this.Gv=I;this.amG=i;this.__=null;this.MJ=!0;this.SP=null}bd.prototype=new eS;
|
|
bd.prototype.$X=function(){return[]};bd.prototype.xS=function(){};bd.prototype._=function(){this.R5._();
|
|
this._U._();var W=this.oT;if(W)this.Ha.textContent=dq.get(W)+":"};bd.prototype.U6=function(W){this.Ha.textContent=W};
|
|
bd.prototype.EX=function(W){var h=this.Gv,S=0;if(h==f6.Z1){S=this.__?this.__.length:0;W=W.slice(0)}this.__=W;
|
|
this.MJ=!0;if(m.oq(this._U.m)||h==f6.RP)this.w8();if(h==f6.Z1&&W.length-S==1&&m.oq(this.m)){this.f(W[S]);
|
|
this.MJ=!0;this.w8();this._U.f([S]);this.c(new em(y.E.l))}};bd.prototype.rN=function(W){var h=W.target.ZN()[0];
|
|
if(this.amG==null)h++;var S=new em(y.E.W,!0);if(h==0){var k=this.mm();if(this.Gv==f6.Z1&&k[0].profile==null)return;
|
|
S.data={o:y.D.XO,qb:"add",nP:this.amG,GC:k}}else if(h==1)this._U.KM(1-this._U.akp());else if(h<=5)this.ca(h-2);
|
|
else{var p=this.$X();S.data={o:y.D.HY,nP:{url:"rsrc/"+p[h-6]}}}if(S.data)this.c(S)};bd.prototype.ca=function(W){var h=new em(y.E.W,!0),S=this._U.B(),k={o:y.D.XO,nP:this.Gv,FB:S};
|
|
if(W>1&&S.length==0){alert("No items selected");return}if(W==0)h.data={o:y.D.$u};else if(W==1)h.data={o:y.D.tJ,a6Z:this.Gv,FB:S.length==0?null:S};
|
|
else if(W==2){var p=this._U.Fw[1][S[0]];k.qb="rnm";h.data={o:y.D.mJ,DG:"namewindow",U0:p,OI:{Y:y.E.W,R:k}}}else if(W==3){h.data=k;
|
|
k.qb="del"}this.c(h)};bd.prototype.mm=function(){return[this.B()]};bd.prototype.a2c=function(W){var h=this.R5;
|
|
h._();h.update(null);var S=W.currentTarget.getBoundingClientRect(),k=new em(y.E.W,!0);k.data={o:y.D.zS,gh:h,x:S.left,y:S.top+S.height};
|
|
this.c(k)};bd.prototype.y_=function(W){this.w8();var h=this.o.getBoundingClientRect(),S=new em(y.E.W,!0);
|
|
S.data={o:y.D.zS,gh:this.v2,x:h.left,y:h.top+h.height,b2:!0};this.c(S)};function eT(){eS.call(this);
|
|
this.m=m.O("div");this.jn=!1;this.cA=[new fx([12,19,1],[[13,1,7]].concat(bS.c$)),new hg([17,1]),new hg([12,46])];
|
|
for(var Q=0;Q<3;Q++){var W=this.cA[Q];this.m.appendChild(W.m);W.h(y.E.l,this.Zk,this)}this._()}eT.prototype=new eS;
|
|
eT.prototype._=function(){for(var Q=0;Q<3;Q++)this.cA[Q]._()};eT.prototype.B=function(){return this.jn.slice(0)};
|
|
eT.prototype.f=function(W){this.jn=W.slice(0);var h=this.cA,S=h[0].B();h[1].f(W.slice(S*8,S*8+4),S);
|
|
h[2].f(W.slice(S*8+4,S*8+8),S)};eT.prototype.Zk=function(W){var h=this.cA,S=h.indexOf(W.currentTarget);
|
|
if(S==0)this.f(this.jn);else{var k=h[0].B()*8+(S==1?0:4),p=h[S].B();for(var Q=0;Q<4;Q++)this.jn[k+Q]=p[Q];
|
|
this.c(new em(y.E.l,!1))}};function hg(W){eS.call(this);this.m=m.O("div");this.N=m.O("canvas");this.BV=W;
|
|
this.jn=[0,20,200,255];this.D3=0;this.Fz=-1;this.a7w=[];for(var Q=0;Q<5;Q++){var h=m.O("span");h.setAttribute("style","display:inline-block;width:"+(Q==0?8:Q==2?7:2)+"em");
|
|
this.a7w.push(h);this.m.appendChild(h)}this.Rb=this._O.bind(this);this.pE=this.ZL.bind(this);this.TB=this.p9.bind(this);
|
|
m.NO(this.N);m.K$(this.N,this.Rb);this.m.appendChild(this.N);this.rD()}hg.prototype=new eS;hg.prototype._=function(){this.rD()};
|
|
hg.prototype.f=function(W,h){this.jn=W;this.D3=h;this.rD()};hg.prototype.B=function(){return this.jn.slice(0)};
|
|
hg.prototype._O=function(W){var h=this.jn,S=m.DJ(W,this.N),k=S.x-8,p=-1,I=1e9;for(var Q=0;Q<4;Q++){var q=k-h[Q],P=Math.abs(q);
|
|
if(P<8&&P<I&&((Q&1)==0&&q<0||(Q&1)==1&&q>0)){I=q;p=Q}}if(p==-1)return;this.Fz=p;this.vx=window.__kb.j(hW.OM)||h[(p>>>1)*2]!=h[(p>>>1)*2+1];
|
|
m.EB(window,this.pE);m.uE(window,this.TB)};hg.prototype.ZL=function(W){var h=this.jn,S=this.Fz,k=(S>>>1)*2,p=k+1,I=m.DJ(W,this.N),q=Math.round(Math.max(0,Math.min(255,I.x-8)));
|
|
h[S]=q;if(this.vx&&h[k]>=h[p])this.vx=!1;if(!this.vx)h[k]=h[p]=q;this.rD();this.c(new em(y.E.l,!1))};
|
|
hg.prototype.p9=function(W){m.WF(window,this.pE);m.TF(window,this.TB)};hg.prototype.rD=function(){var W=this.N;
|
|
m.rE(W,255+16,16);var h=W.getContext("2d"),S=W.width,k=W.height,p=Math.round(255*m.F()),I=Math.round(8*m.F());
|
|
h.translate(I,0);var q=h.createLinearGradient(0,0,p,0);q.addColorStop(0,"black");q.addColorStop(1,"#"+["ffffff","ff0000","00ff00","0000ff"][this.D3]);
|
|
h.fillStyle=q;h.fillRect(0,0,p,I);var P=this.a7w,t=dq.get(this.BV)+":";P[0].textContent=t;for(var Q=0;
|
|
Q<4;Q++){var M=this.jn[Q];P[1+Q].textContent=M;var U=Math.round(M*m.F());h.beginPath();h.moveTo(U,I);
|
|
h.lineTo(U,I+I);h.lineTo(U+((Q&1)==0?-1:1)*I,I+I);h.closePath();h.fillStyle=Q<2?"#666666":"#cccccc";
|
|
h.fill();h.strokeStyle="black";h.stroke()}};function b9(W,h,S){eS.call(this);if(S==null)S=!1;this.k=[0,0,1];
|
|
this.a1r=h;this.ahb=S;this.adm=0;var k="ai"+m.BT();this.m=m.O("span","fitem angleinput");if(W){this.Ha=m.O("label","flabel");
|
|
this.oT=W;this.m.appendChild(this.Ha);this.Ha.setAttribute("for",k)}this.qg=S?44:20;this.N=m.O("canvas","gsicon");
|
|
this.ds=this.N.getContext("2d");m.NO(this.N);m.rE(this.N,this.qg*2+1,this.qg*2+1);this.ds.scale(m.F(),m.F());
|
|
this.m.appendChild(this.N);m.K$(this.N,this.Gw.bind(this));this.sf=this.w5.bind(this);this.uZ=this.ci.bind(this);
|
|
var p=this.P9.bind(this),I=m.O("div");I.setAttribute("style","display:inline-block; vertical-align:middle;");
|
|
if(!S)this.m.appendChild(I);this.rT=[];for(var Q=0;Q<2;Q++){var q=m.O("input");this.rT.push(q);q.setAttribute("type","text");
|
|
m.j7(q);if(Q==0)q.setAttribute("id",k);q.addEventListener("change",p,!1);var P=m.O("span");P.textContent="\xB0";
|
|
if(Q==0||h){I.appendChild(q);I.appendChild(P);m.YI(I)}}this.f(this.k)}b9.prototype=new eS;b9.prototype._=function(){if(this.oT)this.Ha.textContent=dq.get(this.oT)+":"};
|
|
b9.prototype.U6=function(W){this.Ha.textContent=W};b9.prototype.B=function(){return this.k.slice(0)};
|
|
b9.prototype.f=function(W,h){var S=this.k;W=W.slice(0);if(W[0]==null)W[0]=S[0];if(W[1]==null)W[1]=S[1];
|
|
if(W[2]==null)W[2]=S[2];this.k=W;var k=W[0],p=W[1],I=W[2],q=this.a1r,P=this.ahb,t=this.qg*.85;if(!q)p=0;
|
|
this.rT[0].value=k;this.rT[1].value=p;var M=this.ds;M.clearRect(0,0,100,100);k=Math.PI*k/180;p=t*(90-p)/90;
|
|
var U=this.qg+.5;M.save();M.translate(U,U);M.rotate(-k);M.strokeStyle="rgba(0,0,0,0.5)";M.beginPath();
|
|
M.ellipse(0,0,t,t*I,0,0,2*Math.PI);if(P){M.moveTo(0,-t*I);M.lineTo(0,t*I);M.moveTo(-p,0)}else M.moveTo(0,0);
|
|
M.lineTo(p,0);M.stroke();var i=this.qg*.15;M.fillStyle="black";M.beginPath();if(P){M.arc(0,-t*I,i*.66,0,2*Math.PI);
|
|
M.arc(0,t*I,i*.66,0,2*Math.PI)}if(q){M.arc(p,0,i*.4,0,2*Math.PI)}else{M.moveTo(U-i,-i*.66);M.lineTo(U,0);
|
|
M.lineTo(U-i,i*.66)}M.fill();M.restore();if(h)this.P9()};b9.prototype.P9=function(W){var h=parseInt(this.rT[0].value);
|
|
if(isNaN(h))h=0;var S=parseInt(this.rT[1].value);if(isNaN(S))S=0;h=h%360;S=S%360;this.f([h,S]);this.c(new em(y.E.l,!1))};
|
|
b9.prototype.Gw=function(W){m.EB(window,this.sf);m.uE(window,this.uZ);var h=m.DJ(W,this.N),U=0,i=1e9;
|
|
h.x-=this.qg;h.y-=this.qg;var S=this.k,k=S[0]*Math.PI/180,p=(90-S[1])/90,I=S[2],q=this.qg*.85,P=Math.sin(-k),t=Math.cos(-k),M=[new eC(t*q,P*q)];
|
|
if(this.ahb)M.push(new eC(-P*q*I,t*q*I),new eC(P*q*I,-t*q*I));for(var Q=0;Q<M.length;Q++){var z=eC.fa(h,M[Q]);
|
|
if(z<i){i=z;U=Q}}this.adm=U;if(U==0)this.w5(W)};b9.prototype.w5=function(W){var h=m.DJ(W,this.N),S=this.adm,k=[],p=h.x-this.qg,I=h.y-this.qg,q=this.qg*.85;
|
|
if(S==0){var P=180*Math.atan2(-I,p)/Math.PI,t=90-90*Math.min(1,Math.sqrt(p*p+I*I)/q);k=[Math.round(P),Math.round(t)]}else k=[null,null,Math.max(.01,Math.min(1,Math.sqrt(p*p+I*I)/q))];
|
|
this.f(k);this.c(new em(y.E.l,!1))};b9.prototype.ci=function(W){this.c(new em(y.E.l,!1));m.WF(window,this.sf);
|
|
m.TF(window,this.uZ)};function dI(W,h){eS.call(this);this.jn=0;this.GX=h;this.m=m.O("span","fitem angleinput");
|
|
if(W){this.Ha=m.O("label","flabel");this.oT=W;this.m.appendChild(this.Ha)}this.N=m.O("canvas","gsicon");
|
|
this.ds=this.N.getContext("2d");m.rE(this.N,h,h);this.m.appendChild(this.N);m.K$(this.N,this.Gw.bind(this));
|
|
this.sf=this.w5.bind(this);this.uZ=this.ci.bind(this);this.f(0)}dI.prototype=new eS;dI.prototype._=function(){if(this.oT)this.Ha.textContent=dq.get(this.oT)+":"};
|
|
dI.prototype.U6=function(W){this.Ha.textContent=W};dI.prototype.B=function(){return this.jn};dI.prototype.abz=function(W){var h=this.jn,S=Math.floor(h/3),k=h-S*3;
|
|
k=Math.max(0,Math.min(2,k+W.x));S=Math.max(0,Math.min(2,S+W.y));this.f(S*3+k)};dI.prototype.f=function(W){this.jn=W;
|
|
var h=this.N.width,S=Math.floor(W/3),k=W-3*S,p=(k+.5)*h/3,I=(S+.5)*h/3,q=this.ds,P=[.5,Math.round(h/3)+.5,Math.round(2*h/3)+.5,h-.5];
|
|
q.clearRect(0,0,h,h);var t=this.GX<30;q.setLineDash([]);q.strokeStyle=t?"rgba(0,0,0,0.5)":"#000000";
|
|
q.beginPath();for(var Q=0;Q<4;Q++){var M=P[Q];q.moveTo(M,0);q.lineTo(M,h);q.moveTo(0,M);q.lineTo(h,M)}q.stroke();
|
|
if(W==9)return;if(!t){q.setLineDash([1,2]);var U=h*.53,i=Math.max(0,Math.min(h-U,p-U/2)),z=Math.max(0,Math.min(h-U,I-U/2));
|
|
q.strokeRect(Math.round(i)+.5,Math.round(z)+.5,Math.round(U),Math.round(U))}q.fillStyle="#000000";q.beginPath();
|
|
q.arc(p,I,h/8,0,Math.PI*2);q.fill()};dI.prototype.Gw=function(W){m.EB(window,this.sf);m.uE(window,this.uZ);
|
|
this.w5(W)};dI.prototype.w5=function(W){var h=m.DJ(W,this.N),S=Math.max(0,Math.min(2,Math.floor(h.x/(this.GX/3)))),k=Math.max(0,Math.min(2,Math.floor(h.y/(this.GX/3))));
|
|
this.f(k*3+S)};dI.prototype.ci=function(W){this.c(new em(y.E.l,!1));m.WF(window,this.sf);m.TF(window,this.uZ)};
|
|
function d0(g8){eS.call(this);this.m=m.O("span","fitem cswatch");this.ans=0;this.q1=[];this.LP=[];var W=this.as3.bind(this);
|
|
for(var Q=0;Q<g8;Q++){this.q1.push(0);var h=m.O("span","colorsample");h.addEventListener("click",W,!1);
|
|
this.LP.push(h);this.m.appendChild(h)}var S=[16711680,65280,255,65535,16711935,16776960,0,8421504,16777215],k=Math.min(g8,S.length);
|
|
for(var Q=0;Q<k;Q++)this.q1[Q]=S[Q];this.n3()}d0.prototype=new eS;d0.prototype.as3=function(W){this.ans=this.LP.indexOf(W.currentTarget);
|
|
this.c(new em(y.E.l))};d0.prototype.B=function(){return this.q1[this.ans]};d0.prototype.f=function(W){var h=this.q1,S=h.indexOf(W);
|
|
if(S!=-1)h.splice(S,1);else h.pop();h.unshift(W);this.n3()};d0.prototype.n3=function(){for(var Q=0;Q<this.q1.length;
|
|
Q++){this.LP[Q].setAttribute("style","background-color:#"+N.fl(this.q1[Q]))}};function ax(W){eS.call(this);
|
|
this.nc={p:0,z:0,S:0};this.yI=W;this.m=m.O("span","fitem colorsample");this.m.addEventListener("click",this.T1.bind(this),!1)}ax.prototype=new eS;
|
|
ax.prototype._=function(){};ax.prototype.T1=function(W){var h=this.nc;this.c(new em("click"));var S=new em(y.E.W,!0);
|
|
S.data={o:y.D.mJ,DG:"colorpicker",tg:h.p<<16|h.z<<8|h.S,x9:this.uS.bind(this),nB:this.yI};this.c(S)};
|
|
ax.prototype.uS=function(W){this.NC(W);this.c(new em(y.E.l))};ax.prototype.aqZ=function(){this.T1(null)};
|
|
ax.prototype.aai=function(){var W=this.nc;return W.p<<16|W.z<<8|W.S};ax.prototype.B=function(){return N.X.hg(this.nc)};
|
|
ax.prototype.NC=function(W){this.nc={p:W>>16&255,z:W>>8&255,S:W&255};this.af3()};ax.prototype.f=function(W){this.nc=N.X.iZ(W);
|
|
this.af3()};ax.prototype.af3=function(){var W=this.nc,h=W.p,S=W.z,k=W.S,p=h<<16|S<<8|k;this.m.setAttribute("style","background-color:#"+N.fl(p))};
|
|
function iN(){eS.call(this);this.va=!1;this.qK=20;this.anB=10;this.rb=0;this.va=!1;this.Ms={p:255,z:0,S:0};
|
|
this.PY={p:0,z:0,S:0};this.m=m.O("canvas");this.rD();m.NO(this.m);m.K$(this.m,this.Rb.bind(this))}iN.prototype=new eS;
|
|
iN.prototype.a2s=function(W){if(this.va==W)return;this.va=W;this.rD()};iN.prototype._=function(){};iN.prototype.a0d=function(W,h){function S(k){return{p:k>>16&255,z:k>>8&255,S:k&255}}if(W!=null)this.Ms=S(W);
|
|
if(h!=null)this.PY=S(h);this.rD()};iN.prototype.Rb=function(W){var h=m.DJ(W,this.m),S=h.x*m.F(),k=h.y*m.F(),p=this.qK,I=this.anB,q=0;
|
|
if(S<I&&k<I){q=0}else if(S>p-I&&k>p-I){q=1}else if(S<I){q=2}else{q=3}var P=new em(y.E.W,!0);if(q>1)P.data={o:y.D.XO,nP:f6.Ov,s7:q};
|
|
else{this.rb=q;var t=q==0?this.Ms:this.PY;P.data={o:y.D.mJ,DG:"colorpicker",tg:t.p<<16|t.z<<8|t.S,x9:this.uS.bind(this)}}this.c(P)};
|
|
iN.prototype.uS=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.XO,nP:f6.Ov,s7:this.rb,k:W};this.c(h)};
|
|
iN.prototype.rD=function(){var W=this.m,h=W.getContext("2d"),S=m.F(),p="#aaaaaa",I=.62;m.rE(W,34,34);
|
|
W.setAttribute("style",W.getAttribute("style")+";cursor:pointer");var k=this.qK=W.width,q=this.anB=Math.round(k*I);
|
|
function P(D,R){var O=D.p,b=D.z,w=D.S;if(R)O=b=w=Math.round(N.ak(O,b,w));var A=O<<16|b<<8|w;return"#"+N.fl(A)}function t(D,R,q,O,b){h.fillStyle=b?b:"black";
|
|
h.fillRect(D,R,q,q);h.fillStyle=O;h.fillRect(D+1,R+1,q-2,q-2)}t(k-q,k-q,q,P(this.PY,this.va));t(0,0,q,P(this.Ms,this.va));
|
|
var M=k-q,U=Math.round(M*I);t(k-U,M-U,U,"white",p);t(k-M,0,U,"black",p);h.save();h.fillStyle=p;h.translate(0,k);
|
|
h.rotate(-Math.PI/2);M=k-q;var i=Math.round(M*.28),z=Math.round(M*.25);for(var Q=0;Q<2;Q++){h.fillRect(i,i,M-i,1);
|
|
h.beginPath();h.moveTo(M-z,i+.5-z);h.lineTo(M,i+.5);h.lineTo(M-z,i+.5+z);h.closePath();h.fill();h.transform(0,1,1,0,0,0)}h.restore()};
|
|
function f5(W){bd.call(this,W,!1,"brushbutton nopadding",19,10,f6.og,!0);var h=this.afg;m.dT(h,"flexrow");
|
|
var S=m.O("div");h.appendChild(S);var k=m.O("div");h.appendChild(k);k.setAttribute("style","margin-left:8px");
|
|
this.t5=new b9(null,null,!0);this.t5.h(y.E.l,this.WO,this);S.appendChild(this.t5.m);this.VV=new h1([12,14,0],1,1e3," px",0,!0);
|
|
this.VV.h(y.E.l,this.WO,this);k.appendChild(this.VV.m);this.Zq=new h1([12,17],0,100,"%");this.Zq.h(y.E.l,this.WO,this);
|
|
k.appendChild(this.Zq.m)}f5.prototype=new bd;f5.prototype.$X=function(){var W=["pencil","trees"];for(var Q=0;
|
|
Q<W.length;Q++)W[Q]="brushes/"+W[Q]+".abr";return W};f5.prototype.y_=function(W){var h=this.m.getBoundingClientRect();
|
|
this.a9e(h.left,h.top+h.height)};f5.prototype.a9e=function(W,h){this.w8();var S=new em(y.E.W,!0);S.data={o:y.D.zS,gh:this.v2,x:W,y:h};
|
|
this.c(S)};f5.prototype.f=function(W,h,S){this.SP=JSON.parse(JSON.stringify(W));var k=Math.floor(20*m.F()),p=Math.floor(36*m.F()),I=Math.floor(24*m.F()),q=go.qP(W,h,S,k,I,p);
|
|
this.jD.setAttribute("src",q);m.cq(this.jD,p,I);var P=W.Brsh.v;this.VV.f(P.Dmtr.v.val);if(P.Hrdn!=null){this.Zq.Ze();
|
|
this.Zq.f(P.Hrdn.v.val)}else this.Zq.lz();if(P.Angl!=null)this.t5.f([P.Angl.v.val]);if(P.Rndn!=null)this.t5.f([null,null,P.Rndn.v.val/100])};
|
|
f5.prototype.mm=function(){return{list:[{t:"Objc",v:this.B()}],jE:[],cc:[]}};f5.prototype.B=function(){return this.SP};
|
|
f5.prototype.w8=function(){if(!this.MJ)return;var W=[],h=[],S=this.__,k=Math.floor(33*m.F()),p=Math.floor(40*m.F());
|
|
for(var Q=0;Q<S.list.length;Q++){var I=S.list[Q].v,q=go.qP(I,S.jE,S.cc,k,p);W.push(q);h.push(I.Nm.v.split("=").pop())}this._U.V5(W,h,k,p);
|
|
this.MJ=!1};f5.prototype.BI=function(W){var h=this.__;this.f(h.list[this._U.B()[0]].v,h.jE,h.cc);this.c(new em(y.E.l))};
|
|
f5.prototype._=function(){bd.prototype._.call(this);this.t5._();this.VV._();this.Zq._()};f5.prototype.WO=function(W){var h=this.__,S=this.SP,k=S.Brsh.v;
|
|
k.Dmtr.v.val=this.VV.B();if(k.Hrdn!=null)k.Hrdn.v.val=this.Zq.B();if(k.Angl!=null)k.Angl.v.val=this.t5.B()[0];
|
|
if(k.Rndn!=null)k.Rndn.v.val=Math.round(this.t5.B()[2]*100);this.f(S,h.jE,h.cc);this.c(new em(y.E.l))};
|
|
function i2(W){bd.call(this,W,!0,"contourbutton",17,10.5,f6.sD)}i2.prototype=new bd;i2.prototype.BI=function(W){this.f(this.__[W.target.B()]);
|
|
this.c(new em(y.E.l))};i2.prototype.xS=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.mJ,DG:"contoureditor",Vz:this.SP,response:this.amJ.bind(this)};
|
|
this.c(h)};i2.prototype.amJ=function(W){this.f(W);this.c(new em(y.E.l))};i2.prototype.w8=function(){if(!this.MJ)return;
|
|
var W=Math.floor(38*m.F()),h=Math.floor(38*m.F()),S=[],k=[],p=this.__;for(var Q=0;Q<p.length;Q++){k.push(p[Q].Nm?p[Q].Nm.v:"");
|
|
S.push(N.Ey.qP(p[Q].Crv.v,W,h))}this._U.V5(S,k,W,h);this.MJ=!1};i2.prototype.f=function(W){this.SP=JSON.parse(JSON.stringify(W));
|
|
var h=this.SP.Crv.v;for(var Q=0;Q<h.length;Q++)if(h[Q].v.Cnty==null)h[Q].v.Cnty={t:"bool",v:!0};this.jz()};
|
|
i2.prototype.jz=function(){var W=Math.floor(30*m.F()),h=Math.floor(30*m.F()),S=N.Ey.qP(this.SP.Crv.v,W,h);
|
|
this.jD.setAttribute("src",S);m.cq(this.jD,W,h)};i2.prototype.B=function(){return JSON.parse(JSON.stringify(this.SP))};
|
|
function bv(W){eS.call(this);this.V7=null;this.Nm=null;this.kH=null;this.Gi=null;this.aq1=[];this.aav=[];
|
|
this.m=m.O("span","fitem fillbutton");this.v2=new eS;this.v2.m=m.O("div","floatcont form");this.v2.m.setAttribute("style","width: 21em;");
|
|
this.v2.parent=this;this.zj=W;this.Ha=this.Ha=m.O("label","flabel");this.m.appendChild(this.Ha);this.N=m.O("canvas");
|
|
this.ds=this.N.getContext("2d");this.a7Y=null;this.m.appendChild(this.N);this.N.addEventListener("click",this.y_.bind(this),!1);
|
|
this.uu=new g1([12,66],["","Color","Grad","Patt"]);this.v2.m.appendChild(this.uu.m);this.uu.h(y.E.l,this.Zk,this);
|
|
this.v2.m.appendChild(m.O("hr"));this.aiM=m.O("span");this.Hd=new ax(!0);this.Hd.parent=this.v2;this.Hd.h(y.E.l,this.Zk,this);
|
|
this.hw=new d0(10);this.hw.h(y.E.l,this.Zk,this);this.K0=m.O("div","marged hiline");this.K0.appendChild(this.Hd.m);
|
|
m.YI(this.K0);this.K0.appendChild(this.hw.m);this.Ju=new im("GrFl",!0);this.Ju.parent=this.v2;this.Ju.h(y.E.l,this.Zk,this);
|
|
this.i3=m.O("div","marged hiline");var h="Grad Type Algn Angl Rvrs Scl Ofst".split(" ");for(var Q=0;
|
|
Q<h.length;Q++){var S=this.Ju.jw[h[Q]].m;this.i3.appendChild(S)}this.NT=new im("patternFill",!0);this.NT.parent=this.v2;
|
|
this.NT.h(y.E.l,this.Zk,this);this.ID=m.O("div","marged hiline");var h=["Ptrn","Angl","Scl","Algn","phase"];
|
|
for(var Q=0;Q<h.length;Q++){var S=this.NT.jw[h[Q]].m;this.ID.appendChild(S)}}bv.prototype=new eS;bv.prototype.IF=function(W,h){if(h==f6.OA){this.aq1=[];
|
|
this.aav=[];if(this.V7)this.f(this.kH,this.B(),this.V7)}this.Nm=W;this.Ju.IF(W,h);this.NT.IF(W,h)};bv.prototype._=function(){this.Ha.textContent=dq.get(this.zj)+": ";
|
|
this.uu._();this.Hd._();this.Ju._();this.NT._()};bv.prototype.Zk=function(W){var h=W.currentTarget;if(h==this.uu){var S=this.uu.B(),k={eY:S,EH:this.V7[S]};
|
|
if(S>0&&k.EH==null)k.EH=JSON.parse(JSON.stringify(hz.$Z[S-1]));if(this.V7)this.f(this.kH,k,this.V7)}if(h==this.hw)this.Hd.NC(h.B());
|
|
this.c(new em(y.E.l,!1))};bv.prototype.y_=function(W){var h=this.N.getBoundingClientRect(),S=new em(y.E.W,!0);
|
|
S.data={o:y.D.zS,gh:this.v2,x:h.left,y:h.top+h.height+4};this.c(S);this.hw.f(this.Hd.aai())};bv.prototype.f=function(W,h,S){this.V7=S;
|
|
this.kH=W;var k=[[13,1,0],[13,0],[12,37],[12,62]],p=this.aq1,I=this.aav,q=!1,U;for(var Q=0;Q<4;Q++){var P={eY:Q,EH:S[Q]},t=bv.acL(P);
|
|
if(I[Q]==t)continue;q=!0;var M=bv.am6(null,P,this.Nm,this.kH,22,22,!1);p[Q]="<img width=\"22\" height=\"22\" src=\""+M+"\" />";
|
|
I[Q]=t}if(q)this.uu.XZ(p,k);this.uu.f(h.eY);var t=bv.acL(h);if(t!=this.a7Y)bv.am6(this.ds,h,this.Nm,this.kH,30,23,!0);
|
|
this.a7Y=t;var i=h.eY;if(i==0){U=this.aiM}if(i==1){this.Hd.f(h.EH.Clr.v);U=this.K0}if(i==2){this.Ju.update(W,h.EH);
|
|
U=this.i3}if(i==3){this.NT.update(W,h.EH);U=this.ID}if(U!=this.Gi){if(this.Gi!=null){this.v2.m.removeChild(this.Gi)}this.v2.m.appendChild(U);
|
|
this.Gi=U}};bv.prototype.B=function(){var W={eY:this.uu.B()};if(W.eY==1){W.EH=JSON.parse(JSON.stringify(hz.$Z[0]));
|
|
W.EH.Clr.v=this.Hd.B()}if(W.eY==2){W.EH=this.Ju.B()}if(W.eY==3){W.EH=this.NT.B()}return W};bv.acL=function(W){var h=W.eY,S=W.EH,k="empty";
|
|
if(h==1){k=N.X.iZ(S.Clr.v);k=k.p+","+k.z+","+k.S}if(h==2)k=JSON.stringify(S.Grad.v);if(h==3)k=S.Ptrn.v.Idnt.v;
|
|
return k};bv.am6=function(W,h,S,k,p,I,q){if(W==null)W=bv.ds;var P=Math.floor(p*m.F()),t=Math.floor(I*m.F()),M=W.canvas,U;
|
|
M.width=P;M.height=t;m.cq(M,P,t);var i=h.eY;if(i==0){W.fillStyle="#ffffff";W.fillRect(0,0,P,t);W.strokeStyle="#ff0000";
|
|
W.lineWidth=2;W.moveTo(0,0);W.lineTo(P,t);W.moveTo(0,t);W.lineTo(P,0);W.stroke()}if(i==1){var z=h.EH.Clr.v;
|
|
z=N.X.iZ(z);W.fillStyle="#"+N.fl(z.p<<16|z.z<<8|z.S);W.fillRect(0,0,P,t)}if(i==2){a.z0.qP(h.EH.Grad.v,P,t,0,S.Ps,S.lL,M)}if(i==3){var D=h.EH.Ptrn.v,R;
|
|
if(k!=null)R=jO.W4(D,k.add.Patt);if(R==null)R=jO.W4(D,S.n5);dd.qP(R,P,t,M)}if(q){W.beginPath();W.strokeStyle="#000000";
|
|
W.fillStyle="#ffffff";W.lineWidth=2;var O=P*.7,b=Math.floor(t*.7),w=7*m.F();W.moveTo(O,b);W.lineTo(O+w,b);
|
|
W.lineTo(O+w/2,b+w/2);W.closePath();W.stroke();W.fill()}if(W==bv.ds)return M.toDataURL()};bv.ds=m.O("canvas").getContext("2d");
|
|
function dd(W){bd.call(this,W,!1,"patternbutton",18,10,f6.OA);this.R8=null}dd.prototype=new bd;dd.prototype.BI=function(W){var h=this.__[this._U.B()];
|
|
this.SP={classID:"Ptrn",Nm:{t:"TEXT",v:h.name},Idnt:{t:"TEXT",v:h.id}};this.c(new em(y.E.l));this.jz()};
|
|
dd.qf=!1;dd.prototype.w8=function(){if(!this.MJ)return;var W=this.__;if(W==null||!dd.qf){var h=new em(y.E.W,!0);
|
|
h.data={o:y.D.HY,nP:{url:"rsrc/basic/basic.pat"}};this.c(h);dd.qf=!0;return}var S=Math.floor(34*m.F()),k=Math.floor(34*m.F()),p=[],I=[];
|
|
for(var Q=0;Q<W.length;Q++){p.push(dd.qP(W[Q],S,k));I.push(W[Q].name)}this._U.V5(p,I,S,k);this.MJ=!1};
|
|
dd.prototype.f=function(W,h){if(this.SP&&W.Idnt.v==this.SP.Idnt.v)return;this.SP=JSON.parse(JSON.stringify(W));
|
|
this.jz(h)};dd.prototype.B=function(){return JSON.parse(JSON.stringify(this.SP))};dd.prototype.mm=function(){return this.R8?[this.R8]:[]};
|
|
dd.prototype.jz=function(W){var h=Math.floor(50*m.F()),S=Math.floor(50*m.F()),k;if(W!=null)k=jO.W4(this.SP,W.add.Patt);
|
|
if(k==null)k=jO.W4(this.SP,this.__);this.R8=k;var p=dd.qP(k,h,S);this.jD.setAttribute("src",p);m.cq(this.jD,h,S)};
|
|
dd.N=m.O("canvas","");dd.qP=function(W,h,S,k){if(k==null)k=dd.N;var p=k.getContext("2d");k.width=h;k.height=S;
|
|
if(W){var I=W.jR[1],q=I.e,P=I.Z,t=W.jR[0],M=Math.min(h/q,S/P),U=M;if(U*q<2)U=2/q;var i=M;if(i*P<2)i=2/P;
|
|
var z=a.Q.ry([t,I],new ex(U,0,0,i,0,0),U>2),D=z.rect.e,R=z.rect.Z,O=p.createImageData(D,R);N.WQ(z.buffer,O.data);
|
|
p.putImageData(O,Math.floor((h-D)/2),Math.floor((S-R)/2))}return k.toDataURL()};function dD(W,h,S){if(h==null)h=24.2;
|
|
if(S==null)S=17;bd.call(this,W,!1,"patternbutton",h,S,f6.xQ);this.rn=""}dD.prototype=new bd;dD.prototype.BI=function(W){this.SP=JSON.parse(JSON.stringify(this.__[0][this._U.B()[0]]));
|
|
this.c(new em(y.E.l))};dD.prototype.w8=function(){var W=this.__;if(W==null||!this.MJ)return;var h=Math.floor(50*m.F()),S=Math.floor(50*m.F()),k=[],p=[];
|
|
for(var Q=0;Q<W[0].length;Q++){k.push(dD.qP(this.__[0][Q].dS,h,S,this.__[1]));p.push(W[0][Q].q2.Nm.v.split("=").pop())}this._U.V5(k,p,h,S);
|
|
this.MJ=!1};dD.prototype.f=function(W,h,S,k){var p=JSON.stringify(W.dS)+","+S+","+k;if(this.rn!=p){this.rn=p;
|
|
this.SP=JSON.parse(JSON.stringify(W));this.jz(h,S,k)}};dD.prototype.B=function(){return JSON.parse(JSON.stringify(this.SP))};
|
|
dD.prototype.jz=function(W,h,S){var k=Math.floor(68*m.F()),p=Math.floor(68*m.F()),I=dD.qP(this.SP.dS,k,p,W?W:this.__[1],h,S);
|
|
this.jD.setAttribute("src",I);m.cq(this.jD,k,p)};dD.qP=function(W,h,S,k,p,I){var q=new jg;q.e=h;q.Z=S;
|
|
q.buffer=N.U(h*S*4);q.add.Patt=k;q.xq(p==null?90:p);q.RW(I==null?30:I);var P=new gj(0,0,Math.round(h*.5),Math.round(S*.5));
|
|
P.x=Math.round((h-P.e)/2);P.y=Math.round((S-P.Z)/2);var t=q.yA();t.rect=P;t.buffer=N.U(P.n()*4);N.wM(t.buffer,4284045657);
|
|
jO.abF(W,t,.5*100);q.g.push(t);q.fG();q.G();var M=n.O9;n.O9=!1;q.f4();var U=q.jc();n.O9=M;var i=hI.EF(U.buffer,q.e,q.Z);
|
|
return i};function g9(W){bd.call(this,null,!1,"tpresetbutton",18,24,f6.$q,!0);m.Eg(this.m,"fitem");this._U.KM(1);
|
|
this.id=W;this.jz();this.o.style.overflow="hidden";this.Of=new dB([15,7,9]);this.Of.f(!0);this.Of.h(y.E.l,this.a5U,this);
|
|
this.Co.appendChild(this.Of.m)}g9.prototype=new bd;g9.prototype.amR=function(W){if(this.id==W)return;
|
|
this.id=W;this.EX(this.__)};g9.prototype.BI=function(W){var h=this.__[this._U.B()],S=new em(y.E.W,!0);
|
|
S.data={o:y.D.XO,qb:"set",nP:f6.$q,GC:h};this.c(S)};g9.prototype._=function(){bd.prototype._.call(this);
|
|
this.Of._()};g9.prototype.a5U=function(){this.MJ=!0;this.w8()};g9.prototype.w8=function(){if(!this.MJ)return;
|
|
var W=Math.floor(16*m.F()),h=Math.floor(16*m.F()),S=[],k=[],p=this.__,I=this.Of.B();for(var Q=0;Q<p.length;
|
|
Q++){var q=a.ym(p[Q]);if(!I||q==this.id){k.push(p[Q][0]?p[Q][0].split("=").pop():"");S.push(q==-1?"":PIMG[a.yP[q][0]])}else{S.push(null);
|
|
k.push(null)}}this._U.V5(S,k,W,h);this.MJ=!1};g9.prototype.jz=function(){var W=this.jD;W.setAttribute("src",PIMG[a.yP[this.id][0]]);
|
|
m.dT(W,"toolicon")};g9.prototype.mm=function(){return null};g9.lf={};g9.qP=function(W,h,S){var k=g9.ds,p=g9.lf,I=N.fl(W.p<<16|W.z<<8|W.S);
|
|
if(p[I])return p[I];if(k==null){var q=m.O("canvas");k=g9.ds=q.getContext("2d")}var q=k.canvas;q.width=h;
|
|
q.height=S;k.fillStyle="#"+I;k.fillRect(0,0,h,S);var P=p[I]=q.toDataURL();return P};function bD(W,h){eS.call(this);
|
|
this.m=m.O("span","fitem curveeditor");this.c3=null;this.a8l=0;this.D3="";this.mode=0;this.N6=W;this.aqX=h;
|
|
this.At=null;this.T5=null;this.a3d=0;this.apQ=0;this.XF=new eC;this.b5=this.w5.bind(this);this.nt=this.ci.bind(this);
|
|
this.GX=256;this.N=m.O("canvas");this.ds=this.N.getContext("2d");m.NO(this.N);this.m.appendChild(this.N);
|
|
this.UW(256,256);m.K$(this.N,this.Gw.bind(this))}bD.prototype=new eS;bD.prototype.UW=function(W,h){this.GX=Math.round(W);
|
|
this.ds.resetTransform();m.rE(this.N,this.GX,this.GX,this.ds);this.ds.scale(this.GX/256,this.GX/256);
|
|
if(this.At)this.R3()};bD.prototype.f=function(W,Q){var h=JSON.stringify(W);if(h==JSON.stringify(this.At))return;
|
|
this.mode=W.length==256?1:0;this.At=JSON.parse(h);if(Q!=null)this.T5=this.At[Q];this.R3()};bD.prototype.sW=function(W,h,S){this.c3=W;
|
|
this.a8l=h;this.D3=S;this.R3()};bD.prototype.B=function(){return JSON.parse(JSON.stringify(this.At))};
|
|
bD.prototype.a9d=function(){return this.At.indexOf(this.T5)};bD.prototype.Gw=function(W){var h=256/this.GX,S=m.DJ(W,this.N);
|
|
S.x*=h;S.y*=h;var k=S.x,p=256-S.y;if(this.N6){var I=k;k=256-p;p=I}this.XF.Yh(k,p);if(this.mode==0){var q=0,P=1e9,z;
|
|
for(var Q=0;Q<this.At.length;Q++){var t=this.At[Q].v,M=t.Hrzn.v-k,U=t.Vrtc.v-p,i=Math.sqrt(M*M+U*U);
|
|
if(i<P){P=i;q=Q}}if(P<15)z=this.At[q];else{z=N.Ey.xA(k,p,!0);this.At.push(z);this.At.sort(function(D,R){return D.v.Hrzn.v-R.v.Hrzn.v})}this.T5=z;
|
|
this.apQ=this.At.slice(0)}m.EB(document.body,this.b5);m.uE(document.body,this.nt);this.w5(W)};bD.prototype.w5=function(W){var h=256/this.GX,S=m.DJ(W,this.N);
|
|
S.x*=h;S.y*=h;var k=S.x,p=256-S.y;if(this.N6){var I=k;k=256-p;p=I}if(this.mode==0){var q=this.At,P=this.T5,t=this.apQ,M=t.indexOf(P),U=q.indexOf(P)!=-1,i=t.length-1,z=k;
|
|
if(M==0){z=Math.max(0,Math.min(t[1].v.Hrzn.v-1,k))}else if(M==i){z=Math.min(255,Math.max(t[i-1].v.Hrzn.v+1,k))}else{var D=k<0||k>255||p<0||p>255;
|
|
if(k<=t[M-1].v.Hrzn.v||k>=t[M+1].v.Hrzn.v)D=!0;if(!D&&!U)q.splice(M,0,P);if(D&&U)q.splice(M,1)}if(!this.aqX)P.v.Hrzn.v=Math.round(z);
|
|
P.v.Vrtc.v=Math.max(0,Math.min(255,Math.round(p)))}else{k=Math.round(k);p=Math.round(p);k=Math.max(0,Math.min(255,k));
|
|
p=Math.max(0,Math.min(255,p));var R=this.XF.x,O=k,b=this.XF.y,w=p;if(k<this.XF.x){O=R;R=k;w=b;b=p}this.At[k]=p;
|
|
if(R!=O)for(var A=R;A<=O;A++)this.At[A]=Math.round(b+(A-R)*(w-b)/(O-R))}this.XF.Yh(k,p);this.R3();this.c(new em(y.E.l))};
|
|
bD.prototype.ci=function(W){m.WF(document.body,this.b5);m.TF(document.body,this.nt);this.c(new em(y.E.l))};
|
|
bD.prototype.R3=function(){var W=this.ds,h=this.N;W.fillStyle="#ffffff";W.fillRect(0,0,256,256);var S=256/h.width;
|
|
if(this.c3){W.save();W.translate(0,256);W.scale(1,-1);eV.a42(W,this.c3,5700/this.a8l,this.D3);W.restore()}W.strokeStyle="#aaaaaa";
|
|
W.lineWidth=1*S;W.beginPath();for(var Q=1;Q<4;Q++){var k=(Math.floor(64*Q/S)+.5)*S;W.moveTo(0,k);W.lineTo(255,k);
|
|
W.moveTo(k,0);W.lineTo(k,255)}W.stroke();if(this.N6){W.save();W.transform(0,1,-1,0,256,0)}if(this.mode==0){var p=this.At,I=N.Ey.vm(p,256);
|
|
W.strokeStyle="#000000";W.beginPath();W.moveTo(0,255.5-I[0]);for(var Q=0;Q<256;Q++)W.lineTo(Q,255.5-I[Q]);
|
|
W.stroke();W.lineWidth=2*S;for(var Q=0;Q<p.length;Q++){var q=p[Q].v;W.fillStyle=this.T5==p[Q]?"#333":"#fff";
|
|
W.beginPath();W.moveTo(q.Hrzn.v,255.5-q.Vrtc.v);W.arc(q.Hrzn.v,255.5-q.Vrtc.v,5*S,0,2*Math.PI);W.stroke();
|
|
W.fill()}}else{var I=this.At;W.strokeStyle="#000000";W.beginPath();W.moveTo(0,255.5-I[0]);for(var Q=0;
|
|
Q<256;Q++)W.lineTo(Q,255.5-I[Q]);W.stroke()}if(this.N6)W.restore()};function eV(W,h){eS.call(this);this.m=m.O("span","");
|
|
this.Bs=new fx([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5],[12,82]]);this.Bs.h(y.E.l,this.rD,this);this.m.appendChild(this.Bs.m);
|
|
m.YI(this.m);this.N=m.O("canvas");var S=this.N;this.m.appendChild(S);S.width=Math.round(W*m.F());S.height=Math.round(100*m.F());
|
|
m.cq(S,S.width,S.height);this.ds=S.getContext("2d");this.c3=null;this.Jf=0;this.afi=null;this.a0f=[];
|
|
this.Jq=[];var k=["Mean:","Pixels:"],p=this.m;for(var Q=0;Q<k.length;Q++){var I=new gs(k[Q]);this.a0f.push(I);
|
|
if(h)p.appendChild(I.m);var q=new gs("hi");this.Jq.push(q);if(h)p.appendChild(q.m);m.YI(p)}}eV.prototype=new eS;
|
|
eV.prototype._=function(){this.Bs._()};eV.prototype.KM=function(W){this.Bs.f(W);this.rD()};eV.prototype.f=function(W,h){this.c3=W;
|
|
this.afi=h;this.rD()};eV.prototype.NC=function(W){if(W==this.Jf)return;this.Jf=W;this.rD()};eV.prototype.rD=function(){if(this.c3==null)return;
|
|
var W=this.N,h=this.ds,S=this.c3,k=this.afi,p=this.Bs.B(),I=6e3/S[4],q="#"+N.fl(this.Jf),P=eV.a42;W.width=W.width;
|
|
h.setTransform(W.width/256,0,0,-W.height/100,0,W.height);h.globalCompositeOperation="lighter";if(p==0)P(h,S[0],I/3,q);
|
|
else if(p<4)P(h,S[p],I,q);else{P(h,S[1],I,"#ff0000");P(h,S[2],I,"#00ff00");P(h,S[3],I,"#0000ff")}h.setTransform(1,0,0,1,0,0);
|
|
if(k!=null){var t=0;for(var Q=0;Q<256;Q++)t+=Q*S[p][Q];if(p==0)t/=3;this.Jq[0].f((t/k).toFixed(1)+"");
|
|
this.Jq[1].f(k+"")}};eV.a42=function(W,h,S,k){W.beginPath();W.moveTo(0,0);for(var p=0;p<256;p++)W.lineTo(p,h[p]*S);
|
|
W.lineTo(256,0);W.closePath();W.fillStyle=k;W.fill()};function i8(W){eS.call(this);this.Ho={p:0,z:0,S:0};
|
|
if(Math.abs(W-256/m.F())<10)W=256/m.F();var h=this.m=m.O("div","flexrow");this.Tt=new eC;this.qH=new eC;
|
|
this.sf=this.ade.bind(this);this.uZ=this.a7f.bind(this);this.N=m.O("canvas","");this.ds=this.N.getContext("2d");
|
|
this.N.width=this.N.height=256;this.a7x=this.ds.getImageData(0,0,256,256);this.adb=-1;m.NO(this.N);m.K$(this.N,this.a8s.bind(this));
|
|
h.appendChild(this.N);this.ahT=this.a8D.bind(this);this.aeg=this.ai7.bind(this);this.bT=m.O("canvas","");
|
|
this.PD=this.bT.getContext("2d");this.bT.width=20;this.bT.height=256;this.a4E=this.PD.getImageData(0,0,20,256);
|
|
i8.a9w(this.a4E.data,20,256);m.NO(this.bT);m.K$(this.bT,this.am4.bind(this));h.appendChild(this.bT);
|
|
this.N.setAttribute("style","width:"+W+"px; height:"+W+"px");this.bT.setAttribute("style","width:16px; height:"+W+"px")}i8.prototype=new eS;
|
|
i8.prototype.UW=function(W,h){this.N.style.width=W-16+"px"};i8.prototype.f=function(W){this.Ho=W;this.update()};
|
|
i8.prototype.B=function(){return JSON.parse(JSON.stringify(this.Ho))};i8.prototype.update=function(){var W=this.Ho,h=N.ZY(W.p,W.z,W.S);
|
|
if(h.Fv==0)h.Nx=this.Tt.x/255;if(h.Nx==0||h.Fv==0)h.R_=(255-this.th(this.qH.y))/255;if(h.Fv!=0)this.Tt.x=h.Nx*255;
|
|
this.Tt.y=(1-h.Fv)*255;this.qH.y=(1-h.R_)*255;var S=this.a7x;if(Math.abs(h.R_-this.adb)>.002){this.a20(S.data,256,256,h.R_);
|
|
this.adb=h.R_}var k=this.ds;k.putImageData(S,0,0);k.strokeStyle="#000000";k.beginPath();k.arc(this.Tt.x+1,this.Tt.y+1,5,0,2*Math.PI);
|
|
k.stroke();k.strokeStyle="#ffffff";k.beginPath();k.arc(this.Tt.x,this.Tt.y,5,0,2*Math.PI);k.stroke();
|
|
S=this.a4E;k=this.PD;k.putImageData(S,0,0);k.strokeStyle="#ffffff";k.beginPath();k.moveTo(0,this.qH.y);
|
|
k.lineTo(20,this.qH.y);k.lineWidth=2;k.stroke()};i8.prototype.a20=function(W,h,S,k){var p=1/h,I=1/S;
|
|
for(var q=0;q<S;q++)for(var P=0;P<h;P++){var t=N.qu(k,P*p,(S-q-1)*I),Q=q*h+P<<2;W[Q+0]=~~(t.p*255);W[Q+1]=~~(t.z*255);
|
|
W[Q+2]=~~(t.S*255);W[Q+3]=255}};i8.a9w=function(W,h,S,k,p){if(k==null)k=1;if(p==null)p=0;var I=new Uint32Array(W.buffer);
|
|
for(var q=0;q<S;q++){var P=N.qu((1+k*(1-q/S)+p)%1,1,1),t=255<<24|P.S*255<<16|P.z*255<<8|P.p*255;for(var M=0;
|
|
M<h;M++)I[q*h+M]=t}};i8.prototype.a8s=function(W){m.EB(window,this.sf);m.uE(window,this.uZ);this.ade(W)};
|
|
i8.prototype.a7f=function(W){m.WF(window,this.sf);m.TF(window,this.uZ)};i8.prototype.ade=function(W){var h=m.DJ(W,this.N);
|
|
h.x=h.x*(256/parseFloat(this.N.style.width));h.y=h.y*(256/parseFloat(this.N.style.height));this.Tt.Yh(this.th(h.x),this.th(h.y));
|
|
this.ZJ()};i8.prototype.ZJ=function(){this.Ho=this.alF();this.c(new em(y.E.l))};i8.prototype.alF=function(){var W=N.qu((255-this.th(this.qH.y))/255,this.fM(this.Tt.x/255),this.fM(1-this.Tt.y/255));
|
|
return{p:W.p,z:W.z,S:W.S}};i8.prototype.am4=function(W){m.EB(window,this.ahT);m.uE(window,this.aeg);
|
|
this.a8D(W)};i8.prototype.ai7=function(W){m.WF(window,this.ahT);m.TF(window,this.aeg)};i8.prototype.a8D=function(W){var h=m.DJ(W,this.bT);
|
|
h.y=h.y*(256/parseFloat(this.bT.style.height));this.qH.Yh(this.th(h.x),this.th(h.y));this.ZJ()};i8.prototype.th=function(W){return Math.max(0,Math.min(255,W))};
|
|
i8.prototype.fM=function(W){return Math.max(0,Math.min(1,W))};function gL(W,h,S,k){var p=g1.GO(h,k);
|
|
g1.call(this,W,p,S)}gL.prototype=new g1;function e_(){eS.call(this);this.MG=null;this.vB=new f0;this.vB.h(y.E.l,this.aq6,this);
|
|
this.vB.parent=this;this.Dx=new fA([12,14,0],1,150,"px",0,!0);this.Dx.h(y.E.l,this.H_,this);this.Dx.parent=this;
|
|
this.Jh=new fA([16,0],.01,100,"px",2,!0,null,5);this.Jh.h(y.E.l,this.H_,this);this.Jh.parent=this;this.mM=new dB("Auto");
|
|
this.mM.h(y.E.l,this.H_,this);this.I1=new fA([16,1],-500,5e3,"%",0,!0);this.I1.h(y.E.l,this.H_,this);
|
|
this.I1.parent=this;this.GY=new fA("\u2B0D",1,300,"%",null,null,null,null,[[2,7],[22,4,3]]);this.GY.h(y.E.l,this.H_,this);
|
|
this.GY.parent=this;this.cQ=new fA("\u2B0C",1,300,"%",null,null,null,null,[[2,7],[22,4,2]]);this.cQ.h(y.E.l,this.H_,this);
|
|
this.cQ.parent=this;this.HM=new fA([16,2],-10,10,"px");this.HM.h(y.E.l,this.H_,this);this.HM.parent=this;
|
|
this.cS=new ax(!0);this.cS.h(y.E.l,this.RM,this);this.cS.parent=this;this.Bw=new ax(!0);this.Bw.h(y.E.l,this.RM,this);
|
|
this.Bw.parent=this;this.Yj=new ax(!0);this.Yj.h(y.E.l,this.RM,this);this.Yj.parent=this;this.LX=new ax(!0);
|
|
this.LX.h(y.E.l,this.RM,this);this.LX.parent=this;this.dU=new dB([2,3]);this.dU.h(y.E.l,this.H_,this);
|
|
this.Y5=new dB([14,9]);this.Y5.h(y.E.l,this.H_,this);this.J9=new dB([12,46]);this.J9.h(y.E.l,this.H_,this);
|
|
this.Oo=new aA("...",null,null,!0);this.Oo.m.style.marginLeft="-8px";this.Oo.h("click",this.a6R,this);
|
|
this.v2=new eS;var W=this.v2.m=m.O("div","floatcont form");this.v2.parent=this;this.$N=new fA([12,41],1,20,"px",0,!0,!0);
|
|
this.$N.m.style.marginLeft="16px";this.$N.h(y.E.l,this.H_,this);this.$N.parent=this.v2;W.appendChild(this.Bw.m);
|
|
W.appendChild(this.dU.m);m.YI(this.v2.m);W.appendChild(this.Yj.m);W.appendChild(this.Y5.m);W.appendChild(this.$N.m);
|
|
m.YI(this.v2.m);W.appendChild(this.LX.m);W.appendChild(this.J9.m);this.h$=new aA("<img src=\""+PIMG["type/bold"]+"\" class=\"autoscale gsicon\" />");
|
|
this.j5=new aA("<img src=\""+PIMG["type/italic"]+"\" class=\"autoscale gsicon\" />");this.lC=new aA("<img src=\""+PIMG["type/caps"]+"\" class=\"autoscale gsicon\" />");
|
|
this.cZ=new aA("<img src=\""+PIMG["type/scaps"]+"\" class=\"autoscale gsicon\" />");this.yo=new aA("<img src=\""+PIMG["type/sub"]+"\" class=\"autoscale gsicon\" />");
|
|
this.Sv=new aA("<img src=\""+PIMG["type/sup"]+"\" class=\"autoscale gsicon\" />");this.ur=new aA("<img src=\""+PIMG["type/under"]+"\" class=\"autoscale gsicon\" />");
|
|
this._5=new aA("<img src=\""+PIMG["type/strike"]+"\" class=\"autoscale gsicon\" />");var h=[this.h$,this.j5,this.lC,this.cZ,this.yo,this.Sv,this.ur,this._5];
|
|
for(var Q=0;Q<h.length;Q++)h[Q].h("click",this.ahp,this);this.G1=new aA("<img src=\""+PIMG["par/left"]+"\" class=\"autoscale gsicon\" />");
|
|
this.NX=new aA("<img src=\""+PIMG["par/right"]+"\" class=\"autoscale gsicon\" />");this.E2=new aA("<img src=\""+PIMG["par/center"]+"\" class=\"autoscale gsicon\" />");
|
|
this.at$=new aA("<img src=\""+PIMG["par/jleft"]+"\" class=\"autoscale gsicon\" />");this.a71=new aA("<img src=\""+PIMG["par/jright"]+"\" class=\"autoscale gsicon\" />");
|
|
this.a3z=new aA("<img src=\""+PIMG["par/jcenter"]+"\" class=\"autoscale gsicon\" />");this.adB=new aA("<img src=\""+PIMG["par/jall"]+"\" class=\"autoscale gsicon\" />");
|
|
this.jH=[this.G1,this.NX,this.E2,this.at$,this.a71,this.a3z,this.adB];for(var Q=0;Q<this.jH.length;Q++)this.jH[Q].h("click",this.H_,this);
|
|
var S=["lind","rind","flind","bind","aind"],k=[];for(var Q=0;Q<5;Q++)k.push("<img src=\""+PIMG["par/"+S[Q]]+"\" class=\"autoscale gsicon\" /> ");
|
|
this.pj=new fA(k[0],-20,20,"px");this.pj.h(y.E.l,this.H_,this);this.pj.parent=this;this.W1=new fA(k[1],-20,20,"px");
|
|
this.W1.h(y.E.l,this.H_,this);this.W1.parent=this;this.oX=new fA(k[2],-20,20,"px");this.oX.h(y.E.l,this.H_,this);
|
|
this.oX.parent=this;this.SJ=new fA(k[3],-20,20,"px");this.SJ.h(y.E.l,this.H_,this);this.SJ.parent=this;
|
|
this.Dq=new fA(k[4],-20,20,"px");this.Dq.h(y.E.l,this.H_,this);this.Dq.parent=this;this.Jr=new g1([12,33],["Abc ...","... \u0623\u064A \u0628\u064A"]);
|
|
this.Jr.h(y.E.l,this.H_,this);this.Jr.parent=this}e_.prototype=new eS;e_.prototype.a6R=function(W){var h=this.Oo.m.getBoundingClientRect(),S=new em(y.E.W,!0);
|
|
S.data={o:y.D.zS,gh:this.v2,x:h.left,y:h.top+h.height+4};this.c(S)};e_.prototype._=function(){this.vB._();
|
|
this.Dx._();this.Jh._();this.I1._();this.HM._();this.GY._();this.cQ._();this.dU._();this.Y5._();this.J9._();
|
|
this.$N._();this.Jr._()};e_.prototype.f=function(W,h,S){this.YF=JSON.parse(JSON.stringify(W));var k=this.YF,p=k.D4,I=k.MR;
|
|
this.h$.f(p.FauxBold!=null?p.FauxBold:!1);this.j5.f(p.FauxItalic!=null?p.FauxItalic:!1);this.lC.f(p.FontCaps==2);
|
|
this.cZ.f(p.FontCaps==1);this.Sv.f(p.FontBaseline==1);this.yo.f(p.FontBaseline==2);this.ur.f(p.Underline);
|
|
this._5.f(p.Strikethrough);this.vB.f(p.Font==null?null:k.Vt[p.Font].Name,h,S);var q=p.FontSize==null?20:p.FontSize;
|
|
this.Dx.f(q);var P=p.Tracking;this.I1.f(P==null?0:P);this.$N.f(p._LineWidth!=null?p._LineWidth:1);this.Jh.f(p.Leading!=null&&p.Leading!=0?p.Leading:q);
|
|
this.mM.f(p.AutoLeading);this.GY.f((p.VerticalScale!=null?p.VerticalScale:0)*100);this.cQ.f((p.HorizontalScale!=null?p.HorizontalScale:0)*100);
|
|
this.HM.f(p.BaselineShift!=null?p.BaselineShift:0);this.dU.f(p.FillFlag!=null?p.FillFlag:!1);this.Y5.f(p.StrokeFlag!=null?p.StrokeFlag:!1);
|
|
this.J9.f(p._FillBackgroundFlag!=null?p._FillBackgroundFlag:!1);this.G6(p.FillColor,this.cS);this.G6(p.FillColor,this.Bw);
|
|
this.G6(p.StrokeColor,this.Yj);this.G6(p._FillBackgroundColor,this.LX);var t=I._Direction!=null?I._Direction:0,M=gf.jT(I);
|
|
for(var Q=0;Q<this.jH.length;Q++)this.jH[Q].f(M==Q);this.Jr.f(t);this.pj.f(I.StartIndent!=null?I.StartIndent:0);
|
|
this.W1.f(I.EndIndent!=null?I.EndIndent:0);this.oX.f(I.FirstLineIndent!=null?I.FirstLineIndent:0);this.SJ.f(I.SpaceBefore!=null?I.SpaceBefore:0);
|
|
this.Dq.f(I.SpaceAfter!=null?I.SpaceAfter:0)};e_.prototype.G6=function(W,h){if(W){var S=gf.iZ(W);h.NC(Math.round(S.p)<<16|Math.round(S.z)<<8|Math.round(S.S))}else h.NC(0)};
|
|
e_.prototype.ZM=function(){var W=new em(y.E.W,!0);W.data={o:y.D.XO,nP:f6.Z3,YF:this.YF};this.c(W);var W=new em(y.E.u,!0);
|
|
W.b=a.mj;W.data={o:"updateStyles"};this.c(W)};e_.prototype.ahp=function(W){var h=this.YF.D4,S=W.target,k=!S.KB();
|
|
if(S==this.h$)h.FauxBold=k;if(S==this.j5)h.FauxItalic=k;if(S==this.lC)h.FontCaps=k?2:0;if(S==this.cZ)h.FontCaps=k?1:0;
|
|
if(S==this.Sv)h.FontBaseline=k?1:0;if(S==this.yo)h.FontBaseline=k?2:0;if(S==this.ur)h.Underline=k;if(S==this._5)h.Strikethrough=k;
|
|
this.ZM()};e_.prototype.H_=function(W){var h=this.YF.D4,S=this.YF.MR,k=W.target;if(k==this.I1){var p=this.I1.B();
|
|
h.Tracking=p}if(k==this.Jh){h.AutoLeading=!1;h.Leading=this.Jh.B()}if(k==this.mM){h.AutoLeading=this.mM.B()}if(k==this.$N)h._LineWidth=k.B();
|
|
if(k==this.Dx)h.FontSize=k.B();if(k==this.GY)h.VerticalScale=k.B()/100;if(k==this.cQ)h.HorizontalScale=k.B()/100;
|
|
if(k==this.HM)h.BaselineShift=k.B();if(k==this.dU)h.FillFlag=k.B();if(k==this.Y5)h.StrokeFlag=k.B();
|
|
if(k==this.J9)h._FillBackgroundFlag=k.B();if(this.jH.indexOf(k)!=-1){S.Justification=gf.jT(S,this.jH.indexOf(k))}if(k==this.pj)S.StartIndent=k.B();
|
|
if(k==this.W1)S.EndIndent=k.B();if(k==this.oX)S.FirstLineIndent=k.B();if(k==this.SJ)S.SpaceBefore=k.B();
|
|
if(k==this.Dq)S.SpaceAfter=k.B();if(k==this.Jr)S._Direction=k.B();this.ZM()};e_.prototype.aq6=function(W){var h=this.YF,S=this.vB.B(),k=-1;
|
|
for(var Q=0;Q<h.Vt.length;Q++)if(h.Vt[Q].Name==S)k=Q;if(k==-1){k=h.Vt.length;var p=JSON.parse(JSON.stringify(h.Vt[0]));
|
|
p.Name=S;h.Vt.splice(k,0,p)}h.D4.Font=k;this.ZM()};e_.prototype.RM=function(W){var h=W.target,S=h.aai(),k={Type:1,Values:[1,(S>>16&255)/255,(S>>8&255)/255,(S>>0&255)/255]};
|
|
for(var Q=0;Q<4;Q++)k.Values[Q]=Math.round(k.Values[Q]*1e3)/1e3;var p=h==this.cS||h==this.Bw?0:h==this.Yj?1:2;
|
|
this.YF.D4[["FillColor","StrokeColor","_FillBackgroundColor"][p]]=k;this.ZM()};function f0(){eS.call(this);
|
|
this.m=m.O("span","fontinput");this.xu=null;this.q6=null;this.bk=null;this.$E="";this.WH={};this.DN=[];
|
|
this.ahl={};this.dR=!1;this.Pv=m.O("button","fitem");this.Pv.setAttribute("style","width:9em;");this.Pv.textContent="Family Name \u25BC";
|
|
this.m.appendChild(this.Pv);m.K$(this.Pv,this.alG.bind(this));this.a6=new eS;this.a6.parent=this;this.a6.m=m.O("div","floatcont");
|
|
this.a6.m.addEventListener("keyup",this.abI.bind(this),!1);this.Ly=new eu(6.8);this.a6.m.appendChild(this.Ly.adw());
|
|
this.Ly.parent=this.a6;this.Ly.h(y.E.l,this.Fs,this);var W=m.O("div","form");this.a6.m.appendChild(W);
|
|
this.VY=new aA(m.NM("tools/cshape",null,"autoscale"),!1,"Show Favorites Only");this.VY.h("click",this.aj2,this);
|
|
W.appendChild(this.VY.m);this.Lw=new i3([12,86],null,8.4);this.Lw.h("input",this.DC,this);W.appendChild(this.Lw.m);
|
|
var h=this.ato=new aA([[23,6],[22,6,0]],!1,"Load OTF / TTF file from your computer",!0);h.h("click",this.ar8,this);
|
|
h.m.style.marginLeft="1.5em";h.m.style.marginRight="0";W.appendChild(h.m);this.ig=m.O("span","fitem imageset scrollable");
|
|
this.ig.style.height="30em";this.a6.m.appendChild(this.ig);this.Qy=m.O("button","fitem");this.Qy.setAttribute("style","width:7em;");
|
|
this.Qy.textContent="SubFamily Name \u25BC";this.m.appendChild(this.Qy);m.K$(this.Qy,this.alG.bind(this));
|
|
this.XH=new eS;this.XH.parent=this;this.XH.m=m.O("div","floatcont");this.Fo=m.O("span","fitem imageset scrollable marged");
|
|
this.XH.m.appendChild(this.Fo)}f0.prototype=new eS;f0.prototype.abI=function(W){var h=0;if(hW.IO(W.code,hW.Xd))h=-1;
|
|
if(hW.IO(W.code,hW._g))h=1;if(h!=0){var S=this.DN,k=S.length,p=this.xu.cN()[this.bk];if(p==null&&k==0)return;
|
|
var I=S.indexOf(p[0]);if(I==-1)return;I=(I+h+k)%k;this.Qg(S[I],null)}};f0.prototype.ar8=function(){var W=new em(y.E.W,!0);
|
|
W.data={o:y.D.$u,anq:".otf,.ttf,.ttc"};this.c(W)};f0.prototype._=function(){this.Ly._();this.ato._();
|
|
this.VY.U6(m.NM("tools/cshape",null,"autoscale"))};f0.prototype.aj2=function(W){this.VY.f(!this.VY.KB());
|
|
this.Fs()};f0.prototype.DC=function(W){this.$E=this.Lw.B().toLowerCase();this.Fs()};f0.prototype.alG=function(W){m.xa(W);
|
|
var h=W.currentTarget,S=h.getBoundingClientRect(),k=h==this.Pv,p=k?this.a6:this.XH;if(m.oq(p.m)){this.atv(p);
|
|
return}if(!k&&this.xu.cN()[this.bk]==null)return;var I=new em(y.E.W,!0);I.data={o:y.D.zS,gh:p,x:S.left,y:S.top+S.height};
|
|
this.c(I);if(k){this.Fs()}};f0.prototype.a9X=function(W){var h=W.currentTarget.firstChild.nextSibling.textContent;
|
|
if(W.target.tagName.toLowerCase()=="button"){var S=this.q6.slice(0),k=S.indexOf(h);if(k==-1){S=S.slice(Math.max(0,S.length-29));
|
|
S.push(h)}else S.splice(k,1);var p=new em(y.E.W,!0);p.data={o:y.D.XO,nP:f6.xC,kN:S};this.c(p);this.dR=!0;
|
|
this.Fs()}else{this.Qg(h,null)}};f0.prototype.amZ=function(W){this.Qg(null,W.currentTarget.firstChild.textContent)};
|
|
f0.prototype.Qg=function(W,h){var S=W==null?this.XH:this.a6,k=this.xu;if(W==null)W=k.cN()[this.bk][0];
|
|
else{var p=k.TM(W),I=k.cN()[this.bk];h=cR.HU(p,I?I[1]:"regular")}var q=k.h0(W,h)[2];this.f(q,k);this.c(new em(y.E.l,!1));
|
|
this.atv(S);this.Fs()};f0.prototype.atv=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.QV,gh:W};this.c(h)};
|
|
f0.prototype.B=function(){return this.bk};f0.prototype.f=function(W,h,S){var k=this.xu;if(W!=null)this.bk=W;
|
|
else W=this.bk;this.xu=h;this.q6=S;if(W!=null){var p=h.cN()[W],I,q;if(p==null){I="- "+W;q="-------"}else{I=p[0];
|
|
q=p[1];var P=h.TM(I);P.sort(cR.aqY);var t=P.indexOf(q),M=this.amZ.bind(this);this.Fo.textContent="";
|
|
for(var Q=0;Q<P.length;Q++){var p=h.h0(I,P[Q]);if(!this.Ly.KQ(p))continue;var U=this.agH(p,p[1],M,!1);
|
|
this.Fo.appendChild(U)}}this.Pv.textContent=I.substring(0,15)+" \u25BC";this.Pv.setAttribute("title",I+", \""+W+"\"");
|
|
this.Qy.textContent=q.substring(0,10)+" \u25BC";this.Qy.setAttribute("title",q)}};f0.prototype.Fs=function(){var W=this.xu.cN()[this.bk],h=this.q6,S=null,k=this.xu.asf(),p=this.a9X.bind(this);
|
|
this.DN=[];for(var I in k){var q=cR.HU(k[I],"regular"),P=this.xu.h0(I,q),t=h.indexOf(I)!=-1,M=!0;if(this.$E.length>0&&P[0].toLowerCase().indexOf(this.$E)==-1)M=!1;
|
|
else if(!this.Ly.KQ(P))M=!1;else if(this.VY.KB()&&!t)M=!1;var U=this.WH[I];if(U==null){var U=this.agH(P,I,p,!0);
|
|
this.WH[I]=U;this.ig.appendChild(U)}if(M)this.DN.push(I);var i=M?"":"display:none; ",z="opacity: "+(t?"1":"0.2");
|
|
if(W&&W[0]==I){i+="background-color:rgba(0,0,0,0.13);";S=U}if(this.ahl[I]!=i+z){U.setAttribute("style",i);
|
|
U.firstChild.setAttribute("style",z);this.ahl[I]=i+z}}if(S&&!this.dR)this.ig.scrollTop=S.offsetTop-210;
|
|
this.dR=!1};f0.prototype.agH=function(W,h,S,k){var p=m.O("div","fontitem"),t="";p.addEventListener("click",S,!1);
|
|
if(k)p.appendChild(m.O("button","star"));var I=m.O("span","label");I.setAttribute("title",h);I.textContent=h;
|
|
p.appendChild(I);var q=m.F(),P=1/q,M=cR.qs*P,U=cR.MO*P;if(1<q&&q<1.5)t="width:"+M+"px; height:"+U+"px;";
|
|
var i=m.O("span","thumb gsicon");if(W.amg){t+="background: url("+W.amg+");";if(1<q&&q<1.5)t+="background-size: "+M+"px "+U+"px;"}else{var z=Math.ceil(FNTS.list.length/cR.cols),D=Math.floor(W.Kr/z),R=W.Kr%z,O=D*cR.qs,b=R*cR.MO;
|
|
if(1<q&&q<1.5){t+="background-size: "+cR.cols*M+"px "+z*U+"px;";O*=P;b*=P}t+="background-position:-"+O+"px -"+b+"px;"}i.setAttribute("style",t);
|
|
p.appendChild(i);return p};function eu(W){eS.call(this);this.m=m.O("button","fitem bbtn");this.m.addEventListener("click",this.akq.bind(this),!1);
|
|
this.v2=new eS;this.v2.m=m.O("div","floatcont");this.v2.parent=this;this.go=m.O("div","flexrow");this.v2.m.appendChild(this.go);
|
|
this._b=[];this.oi=[];var h=this.go,S=m.O("div",""),k=m.O("div","");h.appendChild(S);h.appendChild(k);
|
|
this.Rw=[];for(var Q=0;Q<FNTS.cats.length;Q++)this.Rw.push({name:FNTS.cats[Q],index:Q,N5:0});this.ef=new dB([7,0]);
|
|
this.ef.f(!0);this.ef.h(y.E.l,this.al0,this);S.appendChild(this.ef.m);this.ea=m.O("div","vlist marged scrollable");
|
|
this.ea.setAttribute("style","width:10.3em; height:"+W+"em; ");S.appendChild(this.ea);this.PB=[];for(var Q=0;
|
|
Q<this.Rw.length;Q++){var p=this.Rw[Q],I=new dB(p.name);this.PB.push(I);I.h(y.E.l,this.a9y,this);I.f(!0);
|
|
this.ea.appendChild(I.m);this._b.push(1)}this.am3=new dB([7,0]);this.am3.h(y.E.l,this.ame,this);this.E7=m.O("div","vlist marged scrollable");
|
|
this.E7.setAttribute("style","width:8.6em; height:"+(W+1.5)+"em; ");k.appendChild(this.E7);this.iW=[];
|
|
for(var Q=0;Q<FNTS.subsetNames.length;Q++){var I=new dB(FNTS.subsetNames[Q]);this.iW.push(I);I.h(y.E.l,this.abg,this);
|
|
I.f(!1);this.E7.appendChild(I.m);this.oi.push(0)}}eu.prototype=new eS;eu.prototype.alP=function(W){var h=this.iW;
|
|
for(var Q=0;Q<h.length;Q++){var S=(W>>>Q&1)==1;this.oi[Q]=S;h[Q].f(S)}};eu.prototype.adw=function(){return this.go};
|
|
eu.prototype._=function(){this.m.textContent=dq.get([25,1,0])+" \u25BC";this.ef._();this.am3._()};eu.prototype.akq=function(W){var h=this.m.getBoundingClientRect(),S=new em(y.E.W,!0);
|
|
S.data={o:y.D.zS,gh:this.v2,x:h.left,y:h.top+h.height,b2:!1};this.c(S)};eu.prototype.KQ=function(W){if(this._b[W[4]]==0)return!1;
|
|
else for(var h=0;h<this.oi.length;h++)if(this.oi[h]==1&&(W[3]>>>h&1)==0)return!1;return!0};eu.prototype.al0=function(W){var h=W.target.B(),S=this.PB,k=this._b;
|
|
for(var Q=0;Q<S.length;Q++){S[Q].f(h);k[Q]=h?1:0}this.c(new em(y.E.l,!1))};eu.prototype.ame=function(W){var h=W.target.B(),S=this.iW,k=this.oi;
|
|
for(var Q=0;Q<S.length;Q++){S[Q].f(h);k[Q]=h?1:0}this.c(new em(y.E.l,!1))};eu.prototype.a9y=function(W){var Q=this.PB.indexOf(W.target),h=this.Rw[Q].index;
|
|
this._b[h]=1-this._b[h];this.c(new em(y.E.l,!1))};eu.prototype.abg=function(W){var Q=this.iW.indexOf(W.target);
|
|
this.oi[Q]=1-this.oi[Q];this.c(new em(y.E.l,!1))};function h4(W,h,S){bd.call(this,h,!0,"gradientbutton",18,10,f6.$h);
|
|
this.Ps=-1;this.lL=-1;this.a7H=null;this.ajs=W;this.yI=S}h4.prototype=new bd;h4.prototype.BI=function(W){var h=this.__;
|
|
this.f(h[this._U.B()]);this.c(new em(y.E.l))};h4.prototype.xS=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.mJ,DG:"gradienteditor",X:this.SP,x9:this.au6.bind(this),nB:this.yI};
|
|
this.c(h)};h4.prototype.au6=function(W){this.f(W);this.c(new em(y.E.l))};h4.prototype.w8=function(){if(!this.MJ)return;
|
|
var W=Math.floor(36*m.F()),h=Math.floor(36*m.F()),S=[],k=[],p=this.__;for(var Q=0;Q<p.length;Q++){var I=p[Q];
|
|
k.push(I.Nm?I.Nm.v.split("=").pop():"");var q=a.z0.qP(I,W,h,Math.PI/4,this.Ps,this.lL);S.push(q)}this._U.V5(S,k,W,h);
|
|
this.MJ=!1};h4.prototype.sS=function(W,h){this.ajT(this.SP,W,h)};h4.prototype.f=function(W){this.ajT(W,this.Ps,this.lL)};
|
|
h4.prototype.ajT=function(W,h,S){this.Ps=h;this.lL=S;if(W==null)return;var k=JSON.stringify(W),p=k+h+","+S;
|
|
if(p==this.a7H)return;this.a7H=p;this.SP=JSON.parse(k);var I=Math.floor(80*m.F()),q=Math.floor(16*m.F()),P=a.z0.qP(this.SP,I,q,0,this.Ps,this.lL);
|
|
this.jD.setAttribute("src",P);m.cq(this.jD,I,q)};h4.prototype.B=function(){var W;if(this.ajs)W=a.z0.aqz(this.SP,this.Ps,this.lL);
|
|
else W=JSON.parse(JSON.stringify(this.SP));return W};function b5(W){bd.call(this,W,!1,"swatchbutton",16,8.75,f6.RP)}b5.prototype=new bd;
|
|
b5.prototype.BI=function(W){this.f(this.__[W.target.B()]);this.c(new em(y.E.l))};b5.prototype.w8=function(){if(!this.MJ)return;
|
|
var W=Date.now(),h=Math.floor(10*m.F()),S=Math.floor(10*m.F()),k=[],p=[],I=this.__;for(var Q=0;Q<I.length;
|
|
Q++){p.push(I[Q].Gj?I[Q].Gj.split("=").pop():"");k.push(b5.qP(I[Q],h,S))}this._U.V5(k,p,h,S);this.MJ=!1};
|
|
b5.prototype.f=function(W){this.SP=JSON.parse(JSON.stringify(W));this.jz()};b5.prototype.jz=function(){var W=Math.floor(24*m.F()),h=Math.floor(20*m.F()),S=b5.qP(this.SP,W,h);
|
|
this.jD.setAttribute("src",S);m.cq(this.jD,W,h)};b5.prototype.B=function(){return JSON.parse(JSON.stringify(this.SP))};
|
|
b5.lf={};b5.qP=function(W,h,S){var k=b5.ds,p=b5.lf,I=N.fl(W.p<<16|W.z<<8|W.S);if(p[I])return p[I];if(k==null){var q=m.O("canvas");
|
|
k=b5.ds=q.getContext("2d")}var q=k.canvas;q.width=h;q.height=S;k.fillStyle="#"+I;k.fillRect(0,0,h,S);
|
|
var P=p[I]=q.toDataURL();return P};function av(W,h,S,k,p){if(W==null)W=!1;if(h==null)h=!1;if(S==null)S=!1;
|
|
eS.call(this);this.nH=new eC;this.xh=new eC;this.V9=72;this.c8=72;this.vW=!0;this.m=m.O("span");this.tD=new fA([12,41],0,0,null,0,!1,!0);
|
|
this.m.appendChild(this.tD.m);this.tD.h(y.E.l,this.Zk,this);var I=["px","%"];if(W)I=I.concat(["mm","in"]);
|
|
if(p){I=[[12,76,2],[12,76,6]];if(W)I=I.concat([[12,76,5],[12,76,3]])}this.I9=new fx(null,I);this.m.appendChild(this.I9.m);
|
|
m.YI(this.m);this.I9.h(y.E.l,this.Zk,this);this.nX=new fA([12,42],0,0,null,0,!1,!0);this.m.appendChild(this.nX.m);
|
|
this.nX.h(y.E.l,this.Zk,this);var q=new aA("\u21F5",!1,null,!0);q.h("click",this.a0H,this);this.kV=new aA("<img src=\""+PIMG["lrs/chain"]+"\" class=\"autoscale gsicon\" />",!1,[12,51]);
|
|
this.kV.h("click",this.Zk,this);this.ajx=new gs("");if(h){this.m.appendChild(this.kV.m);this.m.appendChild(this.ajx.m);
|
|
this.kV.$V()}else this.m.appendChild(q.m);this.Mz=new fA("DPI",0,0,null,3,!1,!0,4);if(W&&k==null){m.YI(this.m);
|
|
this.m.appendChild(this.Mz.m)}this.Mz.h(y.E.l,this.Zk,this);this.p4=new dB([12,23,1]);this.p4.h(y.E.l,this.Zk,this);
|
|
if(S){m.YI(this.m);this.m.appendChild(this.p4.m)}m.YI(this.m)}av.prototype=new eS;av.prototype.GG=function(){this.tD.GG()};
|
|
av.prototype.ad4=function(){this.vW=!1;if(this.I9.B()==0){this.I9.f(3);this.X6()}};av.prototype.aaP=function(){this.vW=!0};
|
|
av.prototype.a5F=function(W){this.kV.f(W)};av.prototype._=function(){this.tD._();this.nX._();this.Mz._();
|
|
this.kV._();this.p4._();this.I9._()};av.prototype.a0H=function(W){var h=this.xh.x;this.xh.x=this.xh.y;
|
|
this.xh.y=h;this.X6();this.c(new em(y.E.l,!1))};av.prototype.Zk=function(W){if(W.target==this.I9&&!this.vW&&this.I9.B()==0)this.I9.f(3);
|
|
if(W.target==this.I9||W.target==this.p4){this.X6();return}if(W.target==this.kV)W.target.f(!W.target.B());
|
|
var h=this.nH,S=parseFloat(this.tD.B());if(isNaN(S))S=1;var k=parseFloat(this.nX.B());if(isNaN(k))k=1;
|
|
var p=this.I9.B();if(this.vW){var I=this.c8;if(p==1){S=this.nH.x*(S/100);k=this.nH.y*(k/100)}var q=[1,1,25.4/I,1/I][p];
|
|
S/=q;k/=q;if(this.p4.B()){S+=this.nH.x;k+=this.nH.y}if(W.target==this.Mz){var P=this.Mz.B();if(!0){var t=P/I;
|
|
S*=t;k*=t}I=P}if(this.kV.B()){if(W.target==this.tD)k=S*(h.y/h.x);else S=k*(h.x/h.y)}S=Math.max(Math.abs(S),1);
|
|
k=Math.max(Math.abs(k),1)}else{var I=this.V9;if(W.target==this.Mz)I=this.Mz.B();else{if(this.kV.B()){if(W.target==this.tD)k=S*(h.y/h.x);
|
|
else S=k*(h.x/h.y)}var q=[1,1,25.4/I,1/I][p],M=S/(p==1?100:h.x*q);I=I/M}S=h.x;k=h.y}this.xh=new eC(Math.round(S),Math.round(k));
|
|
this.c8=I;this.X6();this.c(new em(y.E.l,!1))};av.prototype.ahu=function(Q){this.I9.f(Q);this.X6()};av.prototype.f=function(W,h,S){if(S!=!0)this.nH=W.clone();
|
|
this.xh=W.clone();if(h!=null){this.V9=h;this.c8=h}this.X6()};av.prototype.X6=function(){var W=this.xh.x,h=this.xh.y,S=this.c8,k=(W/h).toFixed(3);
|
|
while(k.charAt(k.length-1)=="0")k=k.substring(0,k.length-1);if(k.charAt(k.length-1)==".")k=k.substring(0,k.length-1);
|
|
var p=" "+k+" : 1",I=function(U,i){while(i!=0){var z=i;i=U%i;U=z}return U},q=I(W,h);if(Math.min(W,h)/q<10)p=" "+Math.round(W/q)+" : "+Math.round(h/q);
|
|
this.ajx.f(p);if(this.p4.B()){W-=this.nH.x;h-=this.nH.y}var P=this.I9.B();if(P==1){if(this.vW){W=100*W/this.nH.x;
|
|
h=100*h/this.nH.y}else{W=h=100*this.V9/this.c8}}else{W=Math.round(W);h=Math.round(h)}var t=[1,1,25.4/S,1/S][P];
|
|
W*=t;h*=t;var M=P==1||P==3?2:0;this.tD.De(M);this.nX.De(M);this.tD.f(W);this.nX.f(h);this.Mz.f(S)};av.prototype.B=function(){return this.xh.clone()};
|
|
av.prototype.kk=function(){return this.c8};function iQ(W,h){eS.call(this);var S=W==0?["W","X","H","Y"]:["\u250F","\u2513","\u2517","\u251B"];
|
|
this.Gu=W;this.atE=h;this.gZ=1;this.OY=[1,1,0];var k=this.m=m.O("div","numlist"),p=this.bX=[];for(var Q=0;
|
|
Q<4;Q++){var I=new fA(S[Q],0,0,null,2,!1,!0,4);I.h(y.E.l,this.Zk,this);k.appendChild(I.m);p[Q]=I;if(Q==1||Q==3)m.YI(k)}p[4]=new dB(W==0?[12,51]:[12,91,2]);
|
|
p[4].f(!0);k.appendChild(p[4].m)}iQ.prototype=new eS;iQ.prototype._=function(){var W=this.bX;for(var Q=0;
|
|
Q<5;Q++)W[Q]._();if(this.Gu==0)m.ab(W[0],W[2])};iQ.prototype.f=function(W,h,S){if(h)this.OY=h;h=this.OY;
|
|
var k=S?W:this.Gu==0?[W[2],W[0],W[3],W[1]]:[W[0],W[1],W[3],W[2]];this.gZ=k[0]/k[2];for(var Q=0;Q<4;Q++){var p=this.bX[Q];
|
|
p.De(h[2]==0&&this.atE?0:2);p.f(N.aX.a7E(k[Q],h[0],h[1],h[2]))}};iQ.prototype.B=function(W){var h=[],S=this.OY;
|
|
for(var Q=0;Q<4;Q++){var k=N.aX.Hu(this.bX[Q].B(),S[0],S[1],S[2]);h[Q]=this.atE?Math.round(k):k}return W?h:this.Gu==0?[h[1],h[3],h[0],h[2]]:[h[0],h[1],h[3],h[2]]};
|
|
iQ.prototype.Zk=function(W){var h=this.Gu,S=this.bX.indexOf(W.currentTarget),k=this.B(!0),p=this.bX[4].B();
|
|
if(h==0){k[0]=Math.max(1,k[0]);k[2]=Math.max(1,k[2]);if(p&&S==0)k[2]=k[0]/this.gZ;if(p&&S==2)k[0]=k[2]*this.gZ}if(h==1){k[S]=Math.max(0,k[S]);
|
|
if(p)for(var Q=0;Q<4;Q++)k[Q]=k[S]}this.f(k,null,!0);this.c(new em(y.E.l,!1))};function fX(){eS.call(this);
|
|
this.M4=0;this.Jq=[0,0,1,1,100,100];this.m=m.O("span","fitem");this.Tq=new fx(null,[[12,89,0],[12,89,1],[12,89,2]]);
|
|
this.m.appendChild(this.Tq.m);this.Tq.h(y.E.l,this.Zk,this);this.tD=new fA("W",0,0,null,0,!1,!0);this.m.appendChild(this.tD.m);
|
|
this.tD.h(y.E.l,this.Zk,this);this.nX=new fA("H",0,0,null,0,!1,!0);this.m.appendChild(this.nX.m);this.nX.h(y.E.l,this.Zk,this);
|
|
this.f({fJ:0,x:0,y:0})}fX.prototype=new eS;fX.prototype._=function(){m.ab(this.tD,this.nX);this.Tq._()};
|
|
fX.prototype.Zk=function(W){if(W.target==this.Tq){var h=this.B(),S=this.Jq;S[this.M4*2]=h.x;S[this.M4*2+1]=h.y;
|
|
this.M4=h.fJ;this.f({fJ:h.fJ,x:S[h.fJ*2],y:S[h.fJ*2+1]})}if(this.tD.B()<1)this.tD.f(1);if(this.nX.B()<1)this.nX.f(1);
|
|
this.c(new em(y.E.l,!1))};fX.prototype.f=function(W){this.Tq.f(W.fJ);this.tD.f(W.x);this.nX.f(W.y);if(W.fJ==0){this.tD.lz();
|
|
this.nX.lz()}else{this.tD.Ze();this.nX.Ze()}};fX.prototype.B=function(){return{fJ:this.Tq.B(),x:this.tD.B(),y:this.nX.B()}};
|
|
function c0(W){eS.call(this);this.m=m.O("span","");this.aoW=W;this.GF=new gY("Off X",-100,100,W?"%":"px",0,!1);
|
|
this.Dh=new gY("Off Y",-100,100,W?"%":"px",0,!1);this.GF.h(y.E.l,this.Zk,this);this.Dh.h(y.E.l,this.Zk,this);
|
|
this.m.appendChild(this.GF.m);this.m.appendChild(this.Dh.m)}c0.prototype=new eS;c0.prototype._=function(){this.GF._();
|
|
this.Dh._()};c0.prototype.Zk=function(W){this.c(new em(y.E.l,!1))};c0.prototype.a0s=function(W){this.GF.f(W.x);
|
|
this.Dh.f(W.y)};c0.prototype.aoX=function(){return new eC(this.GF.B(),this.Dh.B())};c0.prototype.f=function(W,h){var S=W.Hrzn.v,k=W.Vrtc.v;
|
|
if(this.aoW){S=S.val;k=k.val}this.GF.f(S);this.Dh.f(k);if(h==!0)this.Zk()};c0.prototype.B=function(){var W=this.GF.B(),h=this.Dh.B();
|
|
if(this.aoW)return{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Prc",val:W}},Vrtc:{t:"UntF",v:{type:"#Prc",val:h}}};
|
|
else return{classID:"Pnt",Hrzn:{v:W,t:"doub"},Vrtc:{v:h,t:"doub"}}};function cj(){eS.call(this);this.m=m.O("span","fitem strokebutton");
|
|
this.RX=[[null,null,null,""],[null,0,null,"4 2"],[1,1,null,"0 2"]];this.Rp=JSON.parse(JSON.stringify(hz.EJ.default));
|
|
this.u$=m.O("button");this.m.appendChild(this.u$);this.u$.addEventListener("click",this.y_.bind(this),!1);
|
|
var W=m.O("canvas","gsicon");this.ds=W.getContext("2d");this.u$.appendChild(W);var h=m.O("span");h.textContent=" \u25BC";
|
|
this.u$.appendChild(h);this.v2=new eS;this.v2.parent=this;this.v2.m=m.O("div","floatcont form");var S=this.v2.m;
|
|
S.setAttribute("style","width: 14em;");this.WH=[new fx([12,40],[[19,5,2],[19,5,1],[19,5,0]]),new g1([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 g1([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 i3([19,9,2])];
|
|
for(var Q=0;Q<this.WH.length;Q++){var k=this.WH[Q];S.appendChild(k.m);var p=Q<4?y.E.l:"click";k.h(p,this.Zk,this)}m.YI(S);
|
|
this.LP=[];var I=this.a39.bind(this);for(var Q=0;Q<this.RX.length;Q++){var q=m.O("button","fitem");this.LP.push(q);
|
|
S.appendChild(q);q.addEventListener("click",I,!1);var W=m.O("canvas","gsicon"),P=W.getContext("2d");
|
|
q.appendChild(W);this.aeQ(P,40,20,this.RX[Q])}}cj.prototype=new eS;cj.prototype.y_=function(W){var h=this.u$.getBoundingClientRect(),S=new em(y.E.W,!0);
|
|
S.data={o:y.D.zS,gh:this.v2,x:h.left,y:h.top+h.height+4};this.c(S)};cj.prototype.Zk=function(W){var h=this.WH,S=h.indexOf(W.target),k=[];
|
|
for(var Q=0;Q<4;Q++)k.push(h[Q].B());this.Rp=this.arT(k);this.c(new em(y.E.l,!1))};cj.prototype.a39=function(W){var h=this.LP.indexOf(W.currentTarget);
|
|
this.f(this.arT(this.RX[h]));this.c(new em(y.E.l,!1))};cj.prototype.arT=function(W){var h=JSON.parse(JSON.stringify(this.Rp)),S=W[0],k=W[1],p=W[2],I=W[3];
|
|
if(S!=null)h.strokeStyleLineAlignment.v.strokeStyleLineAlignment=hz.EJ.tZ[S];if(k!=null)h.strokeStyleLineCapType.v.strokeStyleLineCapType=hz.EJ.zu[k];
|
|
if(p!=null)h.strokeStyleLineJoinType.v.strokeStyleLineJoinType=hz.EJ.join[p];var q=h.strokeStyleLineDashSet.v=[];
|
|
I=I.split(" ");while((I.length&1)!=0)I.pop();for(var Q=0;Q<I.length;Q++)q.push({t:"UntF",v:{type:"#Nne",val:parseInt(I[Q])}});
|
|
return h};cj.prototype._=function(){for(var Q=0;Q<this.WH.length;Q++)this.WH[Q]._()};cj.prototype.f=function(W){this.Rp=JSON.parse(JSON.stringify(W));
|
|
var h=hz.EJ.tZ.indexOf(W.strokeStyleLineAlignment.v.strokeStyleLineAlignment),S=hz.EJ.zu.indexOf(W.strokeStyleLineCapType.v.strokeStyleLineCapType),k=hz.EJ.join.indexOf(W.strokeStyleLineJoinType.v.strokeStyleLineJoinType),p=[],I=W.strokeStyleLineDashSet.v;
|
|
for(var q=0;q<I.length;q++)p.push(I[q].v.val);var P=this.WH;P[0].f(h);P[1].f(S);P[2].f(k);P[3].f(p.join(" "));
|
|
var t=[];for(var Q=0;Q<4;Q++)t.push(P[Q].B());this.aeQ(this.ds,40,16,t)};cj.prototype.B=function(){return JSON.parse(JSON.stringify(this.Rp))};
|
|
cj.prototype.aeQ=function(W,h,S,k){var p=k[0],I=k[1],q=k[2],P=k[3].split(" ").map(parseFloat);m.rE(W.canvas,h,S);
|
|
var t=Math.min(5,this.Rp.strokeStyleLineWidth.v.val);for(var Q=0;Q<P.length;Q++)P[Q]*=t;W.clearRect(0,0,h,S);
|
|
W.setLineDash(P);W.lineCap=["butt","round","square"][I];W.lineJoin=["miter","round","bevel"][q];W.lineWidth=t;
|
|
W.beginPath();W.moveTo(0,S/2);W.lineTo(h*2,S/2);W.stroke()};function e9(W){bd.call(this,W,!1,"contourbutton",34,16,f6.JF,!0);
|
|
this.Lw=new i3([12,86],null,16);this.Lw.h("input",this.DC,this);this.v2.m.appendChild(this.Lw.m);this.lP=null;
|
|
this.$E="";this.Kd=null;this.f(hv.QE())}e9.prototype=new bd;e9.prototype._=function(){bd.prototype._.call(this);
|
|
this.Lw._()};e9.prototype.BI=function(W){this.f(this.lP[W.target.B()[0]]);this.c(new em(y.E.l))};e9.prototype.DC=function(W){this.$E=this.Lw.B().toLowerCase();
|
|
this.a8V()};e9.qf=!1;e9.prototype.w8=function(){if(!this.MJ)return;var W=this.__;if(W==null||!e9.qf){var h=new em(y.E.W,!0);
|
|
h.data={o:y.D.HY,nP:{url:"rsrc/basic/fa_basic.csh"}};this.c(h);e9.qf=!0}else{var S=Math.floor(38*m.F()),k=Math.floor(38*m.F());
|
|
this.Kd=[];for(var Q=0;Q<W.length;Q++)this.Kd.push(e9.at1(W[Q],S,k));this.a8V();this.MJ=!1}};e9.prototype.a8V=function(){var W=Math.floor(38*m.F()),h=Math.floor(38*m.F());
|
|
this.lP=[];var S=[],k=[],p=this.__;for(var Q=0;Q<p.length;Q++){if(p[Q].J2.toLowerCase().indexOf(this.$E)==-1)continue;
|
|
this.lP.push(p[Q]);S.push(this.Kd[Q]);k.push(p[Q].J2)}this._U.V5(S,k,W,h)};e9.prototype.f=function(W){this.SP=e9.clone(W);
|
|
this.jz()};e9.prototype.jz=function(){var W=Math.floor(23*m.F()),h=Math.floor(23*m.F()),S=e9.at1(this.SP,W,h);
|
|
this.jD.setAttribute("src",S);m.cq(this.jD,W,h)};e9.prototype.B=function(){return e9.clone(this.SP)};
|
|
e9.clone=function(W){return{J2:W.J2,q2:W.q2,T:$.CP.uW(W.T),zq:W.zq.clone()}};e9.N=null;e9.tz=null;e9.at1=function(W,h,S){var k=$.CP.uW(W.T),p=W.zq,I=Math.min(h/p.e,S/p.Z)*.9,q=new ex;
|
|
q.translate(-.5,-.5);q.scale(.95,.95);q.translate(.5,.5);q.scale(I*p.e,I*p.Z);N.$.ac(k,q);var P=new $.CP;
|
|
P.T=k;var t=P.kX();t.rect.x=Math.floor((h-t.rect.e)/2);t.rect.y=Math.floor((S-t.rect.Z)/2);var M=N.U(t.rect.n()*4);
|
|
N.ce(t.channel,M,3);var U=e9;if(U.N==null)U.N=m.O("canvas");var i=U.N,z=i.getContext("2d");if(i.width!=h||i.height!=S||U.tz==null){i.width=h;
|
|
i.height=S;U.tz=z.createImageData(h,S)}var D=U.tz;D.data.fill(0);N.zt(M,t.rect,D.data,new gj(0,0,h,S));
|
|
z.putImageData(D,0,0);return i.toDataURL()};function bP(W){bd.call(this,W,!1,"ICCButton",16,12,f6.Z1,!0);
|
|
this._U.KM(1)}bP.prototype=new bd;bP.prototype.$X=function(){var W="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 Q=0;Q<W.length;Q++)W[Q]="luts/"+W[Q]+".CUBE";return W};bP.prototype.BI=function(W){this.f(this.__[W.target.B()]);
|
|
this.c(new em(y.E.l))};bP.prototype.w8=function(){if(!this.MJ)return;var W=Math.floor(1*m.F()),h=Math.floor(1*m.F()),S=[],k=[],p=this.__;
|
|
for(var Q=0;Q<p.length;Q++){var I=p[Q].Nm.v.split("\\").pop().split("/").pop();k.push(I);S.push(bP.qP(p[Q],W,h))}this._U.V5(S,k,W,h);
|
|
this.MJ=!1};bP.prototype.f=function(W){this.SP=JSON.parse(JSON.stringify(W));this.jz()};bP.qP=function(W,h,S){var k=m.O("canvas"),q="ICC / 3DL / look / cube";
|
|
k.width=h;k.height=S;var p=k.getContext("2d"),I=Math.floor(14*m.F());p.font=I+"px sans-serif";if(W.Nm)q=W.Nm.v.split("\\").pop().split("/").pop();
|
|
p.fillText(q,10,I);return k.toDataURL()};bP.prototype.jz=function(){var W=Math.floor(120*m.F()),h=Math.floor(20*m.F());
|
|
this.jD.setAttribute("src",bP.qP(this.SP,W,h));m.cq(this.jD,W,h)};bP.prototype.B=function(){return JSON.parse(JSON.stringify(this.SP))};
|
|
function b2(){eS.call(this);this.Ho=null;this.m=m.O("span","fitem");this.D0=new bv([14,9]);this.AJ=new fA(null,0,150,"px",1,!0,null,null,[19,2,5]);
|
|
this.iu=new cj;this.Yt=[this.D0,this.AJ,this.iu];for(var Q=0;Q<this.Yt.length;Q++){var W=this.Yt[Q];
|
|
this.m.appendChild(W.m);W.parent=this;W.h(y.E.l,this.Zk,this)}}b2.prototype=new eS;b2.prototype._=function(){for(var Q=0;
|
|
Q<this.Yt.length;Q++)this.Yt[Q]._()};b2.prototype.IF=function(W,h){this.D0.IF(W,h)};b2.prototype.Zk=function(W){var h=this.Ho,S=this.D0.B(),k=S.eY;
|
|
h.strokeEnabled.v=k!=0;if(k!=0){h.strokeStyleContent.v=S.EH;S.EH.classID=hz.EJ.Dn[k-1]}h.strokeStyleLineWidth.v.val=this.AJ.B();
|
|
if(W.target==this.iu)h=this.iu.B();this.Ho=h;this.c(new em(y.E.l,!1))};b2.prototype.f=function(W,h,S){this.Ho=JSON.parse(JSON.stringify(h));
|
|
var k=h.strokeEnabled.v,p=h.strokeStyleContent.v,I=k?{eY:1+hz.EJ.Dn.indexOf(p.classID),EH:p}:{eY:0};
|
|
this.D0.f(W,I,S);this.AJ.f(h.strokeStyleLineWidth.v.val);this.iu.f(h)};b2.prototype.B=function(){return JSON.parse(JSON.stringify(this.Ho))};
|
|
function gF(W){var h=[[18,0],[18,1],[18,2],[18,3]],S=g1.GO(["set/front","set/union","set/difference","set/intersection"]);
|
|
g1.call(this,W?[12,36]:null,S,h)}gF.prototype=new g1;function dT(){eS.call(this);this.m=m.O("button","fitem bbtn");
|
|
this.m.textContent="Arrow";this.m.addEventListener("click",this.y_.bind(this),!1);this.v2=new eS;this.v2.m=m.O("div","floatcont form");
|
|
this.v2.m.setAttribute("style","max-width: 200px;");this.v2.parent=this;var W=h1;this.eo=[new dB("Start"),new dB("End"),new W([12,41],0,100,"px",null,!0,null,!0),new W([12,80,0],0,100,"px",null,!0,null,!0),new W("Concavity",-50,50,"%",null,null,null,!0)];
|
|
for(var Q=0;Q<this.eo.length;Q++){var h=this.eo[Q];h.parent=this;h.h(y.E.l,this.ZJ,this);this.v2.m.appendChild(h.m)}this.ata=m.O("div");
|
|
this.v2.m.appendChild(this.ata)}dT.prototype=new eS;dT.prototype.f=function(W){for(var Q=0;Q<5;Q++)this.eo[Q].f(W[Q]);
|
|
this.rD()};dT.prototype.B=function(W){var h=[];for(var Q=0;Q<5;Q++)h[Q]=this.eo[Q].B();return h};dT.prototype._=function(){for(var Q=0;
|
|
Q<this.eo.length;Q++)this.eo[Q]._()};dT.prototype.ZJ=function(W){this.c(new em(y.E.l,!1));this.rD()};
|
|
dT.prototype.rD=function(W){var h=this.B(),S=200,k=60;h[2]/=m.F();h[3]/=m.F();var p=N.$.Te.$R(0,k/2,S,k/2,5,h),I=N.$.y6(p);
|
|
this.ata.innerHTML="<svg width=\""+S+"\" height=\""+k+"\" class=\"gsicon\">\t\t\t<path d=\""+I.Tu+"\" />\t\t\t</svg>"};
|
|
dT.prototype.y_=function(W){var h=this.m.getBoundingClientRect(),S=new em(y.E.W,!0);S.data={o:y.D.zS,gh:this.v2,x:h.left,y:h.top+h.height};
|
|
this.c(S)};function i4(){eS.call(this);this.Fw=[16,!0,!0];this.m=m.O("span","");this.cA=[new fA([12,24],0,255),new dB([12,25,1]),new dB([12,25,0])];
|
|
for(var Q=0;Q<3;Q++){var W=this.cA[Q];W.parent=this;W.f(this.Fw[Q]);this.m.appendChild(W.m);W.h(y.E.l,this.Zk,this)}}i4.prototype=new eS;
|
|
i4.prototype.Zk=function(){for(var Q=0;Q<3;Q++)this.Fw[Q]=this.cA[Q].B();this.c(new em(y.E.l,!1))};i4.prototype.f=function(W){this.Fw=W.slice(0);
|
|
for(var Q=0;Q<3;Q++)this.cA[Q].f(W[Q])};i4.prototype.B=function(){return this.Fw.slice(0)};i4.prototype._=function(){for(var Q=0;
|
|
Q<3;Q++)this.cA[Q]._()};function gv(W,h){eS.call(this);if(h==null)h=!1;this.Kd=[];this.C6=Math.floor(120*m.F());
|
|
this.asp=Math.floor(23*m.F());this.Et=0;this.EG=[];this.h3=[];for(var S in N.DU.type){if(S=="warpCustom"&&!h)continue;
|
|
this.EG.push(S);this.h3.push(N.DU.type[S])}this.m=m.O("span","fitem warpbutton");this.v2=new eS;this.v2.m=m.O("div","floatcont");
|
|
if(W){this.PV=W;this.Ha=m.O("label","flabel");this.m.appendChild(this.Ha)}this.o=m.O("button");this.m.appendChild(this.o);
|
|
this.o.addEventListener("click",this.y_.bind(this),!1);this.gE=new e1(!0);this.v2.m.appendChild(this.gE.m);
|
|
this.gE.h(y.E.l,this.a2l,this);this.v2.m.setAttribute("style","width:"+Math.floor(8+this.C6/m.F())+"px;");
|
|
this._()}gv.prototype=new eS;gv.prototype.U6=function(W){this.Ha.textContent=W};gv.prototype._=function(){if(this.PV)this.Ha.innerHTML=dq.get(this.PV)+":";
|
|
this.jz()};gv.am8={};gv.aaV=function(W,h,S){var k=dq.get(N.DU.type[W]),p=k+"-"+W+"-"+h+"-"+S,I=gv.am8[p];
|
|
if(I)return I;var q=gv.ds;if(P==null){var P=m.O("canvas");q=gv.ds=P.getContext("2d")}var P=q.canvas;
|
|
if(P.width!=h||P.height!=S){P.width=h;P.height=S}q.font=Math.floor(13*m.F())+"px sans-serif";q.lineWidth=1;
|
|
q.strokeStyle="#000000";var t=Math.floor(16*m.F()),M=new gj(0,0,t,t);q.clearRect(0,0,P.width,P.height);
|
|
var U=N.DU.DU(M,W,!0,.3,0,0),i=N.H.Fb(M);i.C.push("M","L","M","L");i.s.push(0,t/2,t,t/2);i.s.push(t/2,0,t/2,t);
|
|
i=N.H.bE(i);i=N.H.Lq(i,t/5);N.hx.A(U,i.s,M);N.H.A(i.s,new ex(1,0,0,1,Math.floor(8*m.F())+.5,Math.floor(3*m.F())+.5),i.s);
|
|
q.beginPath();Typr.U.pathToContext({cmds:i.C,crds:i.s},q);q.stroke();q.fillText(k,Math.floor(40*m.F()),Math.floor(16*m.F()));
|
|
I=gv.am8[p]=P.toDataURL();return I};gv.prototype.y_=function(W){var h=this.C6,S=this.asp;for(var Q=0;
|
|
Q<this.EG.length;Q++)this.Kd[Q]=gv.aaV(this.EG[Q],h,S);this.gE.V5(this.Kd,null,h,S);var k=this.o.getBoundingClientRect(),p=new em(y.E.W,!0);
|
|
p.data={o:y.D.zS,gh:this.v2,x:k.left,y:k.top+k.height+4};this.c(p)};gv.prototype.a2l=function(W){var h=new em(y.E.W,!0);
|
|
h.data={o:y.D.QV,gh:this.v2};this.c(h);this.Et=W.target.B()[0];this.jz();this.c(new em(y.E.l))};gv.prototype.jz=function(){var W=this.C6,h=this.asp;
|
|
this.gE.f([this.Et]);this.o.innerHTML="<img src=\""+gv.aaV(this.EG[this.Et],W,h)+"\" class=\"gsicon\" />";
|
|
m.cq(this.o.firstChild,W,h)};gv.prototype.B=function(){return this.EG[this.Et]};gv.prototype.f=function(W){this.Et=this.EG.indexOf(W);
|
|
this.jz()};function b1(W,h,S){eS.call(this);if(W==null)W=!1;if(h==null)h=!1;if(S==null)S=!1;this.aa8=h;
|
|
this.DU=null;this.KT=new gv([12,22],S);this.KT.parent=this;this.KT.h(y.E.l,this.ZM,this);this.z7=new fx([22,0],[[22,4,0],[22,4,1]]);
|
|
this.z7.h(y.E.l,this.ZM,this);var k=W?fA:h1;this.RH=new k([22,1],-100,100,"%");this.OH=new k("Horizontal Distortion:",-100,100,"%");
|
|
this.EE=new k("Vertical Distortion:",-100,100,"%");this.RH.parent=this.OH.parent=this.EE.parent=this;
|
|
this.RH.h(y.E.l,this.ZM,this);this.OH.h(y.E.l,this.ZM,this);this.EE.h(y.E.l,this.ZM,this)}b1.prototype=new eS;
|
|
b1.prototype._=function(){this.KT._();this.z7._();this.RH._();var W=this.aa8?1:100;this.OH.U6(dq.get([22,2]).substring(0,W)+":");
|
|
this.EE.U6(dq.get([22,3]).substring(0,W)+":")};b1.prototype.ZM=function(){var W=this.DU,h=this.KT.B(),S=W.warpStyle.v.warpStyle;
|
|
if(h=="warpCustom")N.DU.P0(N.DU.zL(W),W);else delete W.customEnvelopeWarp;W.warpStyle.v.warpStyle=this.KT.B();
|
|
W.warpRotate.v.Ornt=["Hrzn","Vrtc"][this.z7.B()];W.warpValue.v=this.RH.B();W.warpPerspective.v=this.OH.B();
|
|
W.warpPerspectiveOther.v=this.EE.B();if(h=="warpNone"||h=="warpCustom"){W.warpValue.v=0;W.warpPerspective.v=0;
|
|
W.warpPerspectiveOther.v=0}else if(S=="warpNone"||S=="warpCustom")W.warpValue.v=50;this.c(new em(y.E.l,!1));
|
|
this.f(W)};b1.prototype.B=function(W){return JSON.parse(JSON.stringify(this.DU))};b1.prototype.f=function(W){this.DU=JSON.parse(JSON.stringify(W));
|
|
this.KT.f(W.warpStyle.v.warpStyle);this.z7.f(W.warpRotate.v.Ornt=="Hrzn"?0:1);this.RH.f(W.warpValue.v);
|
|
this.OH.f(W.warpPerspective.v);this.EE.f(W.warpPerspectiveOther.v);var h=W.warpStyle.v.warpStyle,S=h=="warpNone"||h=="warpCustom",k=[this.z7,this.RH,this.OH,this.EE];
|
|
for(var Q=0;Q<k.length;Q++)if(S)k[Q].lz();else k[Q].Ze()};function iB(W,h){eS.call(this);this.m=m.O("div");
|
|
this.hk=W;this._l=null;this.Ww=new eC(0,0);this.Pb="position:relative;overflow:hidden;";this.fq=null;
|
|
this.Dv=new m.Sn(this.m);this.a6h=h;this.Ev("grab");this.N=m.O("canvas","canv");this.m.appendChild(this.N);
|
|
this.ds=this.N.getContext("2d");this.ajo=null;this.dq=null;this.yh=null;this.vP=0;this.vA=0;this.PU=0;
|
|
this.ahi=this.anL.bind(this);this.abw=null;this.t=new iP({e:1,Z:1});this.g5=null;this.hA=null;this.BG=[];
|
|
this.alr=0;this.$t=0;this.a7I=this._O.bind(this);this.aod=this.ZL.bind(this);this.atc=this.p9.bind(this);
|
|
this.a4x=this.nE.bind(this);this.alM=0;this.DK=null;this.a32(this.N);this.gK(this)}iB.prototype=new eS;
|
|
iB.a4N=function(W){var h=new hW(!0);if(W>=0)h.iT("Space");if(W>=1){h.iT("ControlLeft");if(W==2)h.iT("AltLeft")}return h};
|
|
iB.prototype.ok=function(W){var h=this.fq,S=null;if(W.j(hW.zP)){S="grab";if(W.j(hW.Q9)){S="zoom-in";
|
|
if(W.j(hW.OM))S="zoom-out"}}this._l=S;if(S)h=S;this.Dv.Yo(h,this.Pb);if(W.j(hW.Q9)){var k=0;if(W.j(hW.jJ))k=1;
|
|
if(W.j(hW.wL))k=-1;if(k!=0){this.it(new eC(this.N.width/2,this.N.height/2),k==1)}}};iB.prototype.Ev=function(W){this.fq=W;
|
|
if(this._l)return;this.Dv.Yo(W,this.Pb)};iB.prototype.a32=function(W){m.K$(W,this.a7I);m.NO(W);W.addEventListener("wheel",this.a4x,!1)};
|
|
iB.prototype.gK=function(W){W.h("viewchange",this.ac0,this)};iB.prototype.ac0=function(W){var h=this.t.J,S=W.currentTarget.wd();
|
|
this.t.J=S.J;this.t.r=S.r.clone();if(h!=S.J)this.ae();this.R3()};iB.prototype.wd=function(){return{J:this.t.J,r:this.t.r}};
|
|
iB.prototype.f=function(W,h){var S=W[0].rc;if(this.dq!=null&&this.dq[0].rc.xX(S)){}else{this.t.om={e:S.e,Z:S.Z};
|
|
this.t.r=new eC(0,0);this.t.J=1}this.dq=W;this.ae();this.P$();this.vP=0;this.vA=0;this.PU=h==null?0:h;
|
|
this.anL()};iB.prototype.nE=function(W){W.preventDefault();if(W.deltaY==0||Date.now()-this.alM<100)return;
|
|
var h=m.DJ(W);h.x=m.F()*h.x;h.y=m.F()*h.y;this.alM=Date.now();this.it(h,W.deltaY<0)};iB.prototype.it=function(W,h){a.xU.up(this.t,W,h);
|
|
this.a73()};iB.prototype.Va=function(){var W=this.t,h=W.om;this.t.J=a.xU._I(h.e,h.Z,W.Vz.e,W.Vz.Z);this.a73()};
|
|
iB.prototype.a73=function(){this.ae();this.c(new em("viewchange"));this.c(new em("zoom"))};iB.prototype.ae=function(){this.yh=[];
|
|
var W=this.t.J;if(this.dq==null)return;for(var Q=0;Q<this.dq.length;Q++){var h=this.dq[Q],S=new Uint8Array(h.data),k;
|
|
if(W>=1)k={vM:S,rect:h.rc};else k=N.aaQ(S,h.rc,W);this.yh.push(k)}};iB.prototype.P$=function(){clearTimeout(this.abw)};
|
|
iB.prototype.R3=function(){if(this.dq==null||!m.oq(this.N))return;var W=this.ajo,h=this.N.width,S=this.N.height,R,O;
|
|
if(W==null||W.width!=h||W.height!=S){W=this.ajo=this.ds.createImageData(h,S);console.log("creating image data")}var k=this.dq[this.vP],p=this.yh[this.vP],I=this.t,q=I.om,P=I.Vz,t=P.e,M=P.Z,U=q.e*I.J,i=q.Z*I.J,z=Math.round((t-U)/2+I.r.x),D=Math.round((M-i)/2+I.r.y);
|
|
if(I.J<=1){O=p.rect.clone();O.x=z;O.y=D;U=O.e;i=O.Z;R=p.vM}else{var b=1/I.J,w=new gj(Math.floor((P.x-z)*b),Math.floor((P.y-D)*b),Math.ceil(P.e*b)+1,Math.ceil(P.Z*b)+1),A=new gj(0,0,w.e*I.J,w.Z*I.J);
|
|
A.x=w.x*I.J+z;A.y=w.y*I.J+D;if(I.A9==null||I.A9.length!=w.n()*4){I.A9=N.U(w.n()*4)}if(I.pJ==null||I.pJ.length!=A.n()*4){I.pJ=N.U(A.n()*4)}N.wM(I.A9,0);
|
|
N.zt(p.vM,p.rect,I.A9,w);N.scale.IU(I.A9,w.e,w.Z,I.pJ,A.e,A.Z,I.J);R=I.pJ;O=A}var g=new Uint8Array(W.data.buffer);
|
|
N.LU(g,t,M,8,-z,-D);N.a.ha("norm",R,O,g,P,P,1);var E=this.ds;E.setTransform(1,0,0,1,0,0);E.putImageData(W,0,0);
|
|
E.clearRect(z-1e3,D,1e3,i);E.clearRect(z+U,D,1e3,i);E.clearRect(z-1e3,D-1e3,U+2e3,1e3);E.clearRect(z-1e3,D+i,U+2e3,1e3);
|
|
var j=iB.ah7(I.J,"#ffffff",this.a6h);E.putImageData(j,0,I.Vz.Z-j.height)};iB.a8q={};iB.ah7=function(W,h,S){if(S==null)S=!1;
|
|
var k="z"+W+","+h+","+S,p=iB.a8q[k];if(p)return p;var I=Math.round(50*m.F()),q=Math.round(18*m.F()),P=S?2*q:0,t=m.O("canvas"),M=t.getContext("2d");
|
|
t.width=I+P;t.height=q;M.fillStyle="rgba(1,1,1,1)";M.fillRect(0,0,I+P,q);M.font=Math.round(11*m.F())+"px monospace";
|
|
M.fillStyle=h;var U=W*100;if(U<100)U=U.toFixed(2);else U=Math.round(U);U=U+"%";var i=M.measureText(U).width;
|
|
M.fillText(U,P+(I-i)/2,Math.round(q*.7));p=iB.a8q[k]=M.getImageData(0,0,I+P,q);return p};iB.prototype.anL=function(){var W=this.dq,h=W.length,S=this.vP,k=this.dq[S],p=(S+1)%h;
|
|
this.R3();if(h!=1&&W[p].rc.xX(k.rc)){var I=k.Bd?parseInt(k.Bd.split(",").pop()):30;if(I==0)I=16;if(p==0)this.vA++;
|
|
if(this.PU==0||this.vA<this.PU)this.abw=setTimeout(this.ahi,I)}this.vP=p};iB.prototype.UW=function(W,h){if(W<=0||h<=0)return;
|
|
var S=Math.floor(W*m.F()),k=Math.floor(h*m.F());this.t.Vz=new gj(0,0,S,k);this.N.width=S;this.N.height=k;
|
|
this.N.setAttribute("style","width:"+S/m.F()+"px; height:"+k/m.F()+"px; display:block;");this.R3()};
|
|
iB.prototype.jx=function(W){var h=-1,S=this.BG;for(var Q=0;Q<S.length;Q++)if(S[Q].pointerId==W.pointerId)h=Q;
|
|
return h};iB.prototype._O=function(W){var h=this.jx(W),S=this.BG;if(h!=-1)S[h]=W;else S.push(W);if(S.length==1){this.DK=W.target;
|
|
m.EB(window,this.aod);m.uE(window,this.atc);this.g5=m.DJ(W,this.N);this.g5.x*=m.F();this.g5.y*=m.F();
|
|
this.Ww=this.g5;this.hA=this.t.r.clone();if(this.hk&&this.DK==this.N&&!this._l)this.c(new em("mousedown"))}else this.alr=this.$t=eC.fa(m.DJ(S[0],this.N),m.DJ(S[1],this.N))};
|
|
iB.prototype.ZL=function(W){var h=this.jx(W),S=this.BG;if(h!=-1)S[h]=W;var k=this.t,p=this._l,I=this.dq[this.vP].rc.clone();
|
|
I.e*=k.J;I.Z*=k.J;var q=m.DJ(W,this.N);q.x*=m.F();q.y*=m.F();this.Ww=q;if(this.hk&&this.DK==this.N&&!p)this.c(new em("mousemove"));
|
|
else if((p=="grab"||p==null)&&(S.length>1||!k.Vz.LH(I))){if(S.length>1){var P=m.DJ(S[0],this.N),t=m.DJ(S[1],this.N),M=new eC(m.F()*(P.x+t.x)/2,m.F()*(P.y+t.y)/2),U=eC.fa(P,t),i=null;
|
|
if(U>this.$t+50){this.$t+=50;i=!0}if(U<this.$t-50){this.$t-=50;i=!1}if(i!=null)this.it(M,i);return}else{var z=q.x-this.g5.x,D=q.y-this.g5.y;
|
|
k.r.x=this.hA.x+Math.round(z);k.r.y=this.hA.y+Math.round(D)}this.c(new em("viewchange"))}};iB.prototype.p9=function(W){var h=this.jx(W),S=this.BG;
|
|
S.splice(h,1);if(S.length==0){m.WF(window,this.aod);m.TF(window,this.atc);var k=this._l;if(W.detail>1){this.t.J=1;
|
|
this.t.r.Yh(0,0);this.R3()}if(this.hk&&this.DK==this.N&&!this._l)this.c(new em("mouseup"));else{if(k=="zoom-in"||k=="zoom-out")this.it(this.Ww,k=="zoom-in")}}else{var p=this.g5=m.DJ(S[0],this.N);
|
|
p.x*=m.F();p.y*=m.F()}};iB.prototype.s3=function(){return this.t.wy(this.Ww.x,this.Ww.y)};function dK(){eS.call(this);
|
|
this.$m=null;this.qK=null;this.fv=null;this.$c=null;this.afl="";this.Rt=[];this.yT=0;this.WE=[];this.aK=0;
|
|
this.Nm=null;var W=this.m=m.O("div",""),h=this.ajL=m.O("div","form");h.setAttribute("style","line-height:0; margin-bottom:0.5em;");
|
|
W.appendChild(h);var S=this.PV=m.O("span");h.appendChild(S);S.setAttribute("style","font-size:1.2em; font-weight:bold; margin-right:3em;");
|
|
var k=this.a4O=new dB([25,2,0]);k.f(!0);h.appendChild(k.m);k.h(y.E.l,this.n3,this);var p=this.jN=new dB([25,2,1]);
|
|
p.f(!0);h.appendChild(p.m);p.h(y.E.l,this.n3,this);var I=new gs(" ");h.appendChild(I.m);var q=this.Q$=new i3([25,1,1]);
|
|
h.appendChild(q.m);q.h(y.E.l,this.n3,this);this.Ly=new eu(14);this.Ly.alP(3);h.appendChild(this.Ly.m);
|
|
this.Ly.parent=this;this.Ly.h(y.E.l,this.aeO,this);var P=this.abn=new aA([25,1,2],null,null,!0);h.appendChild(P.m);
|
|
P.h("click",this.d0,this);this.ac7=this.aiz.bind(this);this.LA=m.O("div","svggallery scrollable");W.appendChild(this.LA);
|
|
this.LA.addEventListener("scroll",this.alZ.bind(this))}dK.prototype=new eS;dK.prototype.IF=function(W){this.aoz=W};
|
|
dK.prototype._=function(){this.PV.textContent=dq.get([25,0]);this.Ly._();this.a4O._();this.jN._();this.Q$._();
|
|
this.abn._()};dK.prototype.UW=function(W,h){this.$m=new eC(W,h);this.ajL.setAttribute("style","width:"+W+"px");
|
|
var S=this.ajL.getBoundingClientRect();h-=S.height;this.LA.setAttribute("style","width:"+W+"px; height:"+h+"px");
|
|
if(m.oq(this.m))this.n3()};dK.prototype.f=function(W){this.qK=W;this.n3()};dK.prototype.alZ=function(W){var h=this.LA;
|
|
if(h.scrollTop+h.clientHeight+10>=h.scrollHeight){this.n3(!0)}};dK.prototype.aeO=function(W){this.fv=null;
|
|
this.n3()};dK.prototype.aiz=function(W){if(Date.now()-this.aK<2e3)return;this.aK=Date.now();this.yT=this.WE.indexOf(W.currentTarget);
|
|
var h=this._F(this.qK.x,this.qK.y);if(h[1]){var S=h[1].largeImageURL,k=new XMLHttpRequest;k.responseType="arraybuffer";
|
|
k.open("GET",S,!0);k.onload=this.a1T.bind(this);k.send();return}this.a83(h)};dK.prototype.a1T=function(W){var h=W.target.response,S=hI._e(h),k=hI.J$(S),p=k.uc(h),I=this._F(this.qK.x,this.qK.y,[h,p[0].rc.e,p[0].rc.Z]);
|
|
this.a83(I)};dK.prototype.a83=function(W){var h=W[0],S=hI._e(h),k=hI.J$(S),p=new jg("template.psd");
|
|
k.uc(h,p);var I=new em("tempready",!0);I.data={om:p};this.c(I)};dK.prototype.d0=function(W){var h=W.target;
|
|
this.Rt=[];this.n3()};dK.prototype.abD=function(W){var h=JSON.parse(W.target.response);this.$c=h.hits;
|
|
this.n3()};dK.prototype.n3=function(W){if(this.qK==null||this.$m==null||this.aoz==null)return;if(this.$m.x<=0)return;
|
|
var h=this.qK.x,S=this.qK.y;if(Math.min(h,S)<50)return;if(W!=!0){this.WE=[];m.hP(this.LA);this.LA.scrollTop=0}if(this.WE.length>300)return;
|
|
var k=Math.min(1,300/Math.max(h,S)),p=this.$m.clone();p.x-=20;var I=Math.max(1,Math.floor(p.x/(h*k))),q=Math.max(1,Math.ceil(p.y/(S*k)));
|
|
k=p.x/I/h;var P=I*q;if(this.fv==null){var t=this.aoz.Tm.cN();this.fv=[];for(var M in t){var U=t[M],i=U[3];
|
|
if(!this.Ly.KQ(U))continue;if(U[5]==null||U[5].slice(0,2)=="gf")continue;this.fv.push(U)}if(this.fv.length==0)this.fv.push(t.DejaVuSans)}var z=this.jN.B(),D=this.Q$.B().trim();
|
|
this.Q$.G2(z);if(z&&(this.$c==null||D!=this.afl)){var R=new XMLHttpRequest,O="https://pixabay.com/api/?image_type=photo"+(D==""?"":"&q="+encodeURIComponent(D))+"&per_page=200&page=1&key=10554583-a5eacb61c2e61105fdfb6eb88";
|
|
if(D=="")O+="&safesearch=true";if(D=="")O="plugins/gallery.json";R.open("GET",O,!0);R.onload=this.abD.bind(this);
|
|
R.onerror=function(j){console.log(j.target.response)};R.send();this.afl=D;return}k*=(h*k-5)/(h*k);var b=this.WE.length;
|
|
for(var Q=0;Q<P;Q++){var w=this.yT=b+Q;if(this.Rt[w]==null)this.Rt[w]=Math.floor(Math.random()*4294967295);
|
|
var A=this._F(Math.round(h*k),Math.round(S*k)),g=A[0];g=G.Md(new Uint8Array(g));var E=m.O("span");E.innerHTML=g;
|
|
this.WE.push(E);this.LA.appendChild(E);E.addEventListener("click",this.ac7,!1)}};dK.prototype._F=function(W,h,S){var k=this.jN.B(),p=this.a4O.B(),I=k&&this.$c.length!=0?this.$c:null;
|
|
if(p&&!k)I=null;if(p&&k&&(this.yT&1)==0)I=null;return e6.Te(W,h,this.Rt[this.yT],this.fv,S?S:I)};function jo(){eS.call(this);
|
|
this.m=m.O("div");this.S_=null;this.aud=null;this.yr=-1;this.bS={JPG:[{vo:new h1([12,52,0],0,100,"%",null,null,!0),KY:70},{vo:new dB("attach metadata"),KY:!1}],TIFF:[{vo:new dB("attach metadata"),KY:!1}],WEBP:[{vo:new h1([12,52,0],0,100,"%",null,null,!0),KY:70}],GIF:[{vo:new h1([12,52,0],0,100,"%",null,null,!0),KY:100},{vo:new dB([12,23,3]),KY:!1}],PNG:[{vo:new h1([12,52,0],0,100,"%",null,null,!0),KY:100},{vo:new dB("don't use palettes"),KY:!1}],PDF:[{vo:new i3([12,52,1]),KY:""},{vo:new h1([12,52,0],0,100,"%",null,null,!0),KY:100},{vo:new dB("rasterize all"),KY:!1},{vo:new dB("rasterize text"),KY:!1},{vo:new dB("vectorize text"),KY:!1},{vo:new h1("Add Margin",0,5,"in",2),KY:0}],EMF:[{vo:new i3([12,52,1]),KY:""},{vo:new dB("rasterize all"),KY:!1},{vo:new dB("rasterize text"),KY:!1},{vo:new dB("vectorize text"),KY:!1}],SVG:[{vo:new dB("add raster graphics"),KY:!0},{vo:new dB("add hidden layers"),KY:!1},{vo:new dB("vectorize text"),KY:!1},{vo:new dB("rasterize text"),KY:!1},{vo:new dB("add layer names"),KY:!0},{vo:new dB("pretty-print"),KY:!0}],RAW:[{vo:new g1([12,72],["1","3","4"]),KY:2},{vo:new g1([12,34],["8 Bits","16 Bits"]),KY:0},{vo:new g1("Byte Order",["12-34","34-12"]),KY:0}],DDS:[{vo:new dB("Add Mipmaps"),KY:!0},{vo:new dB("Compression"),KY:!0}],anim:[{vo:new h1("Speed",10,800,"%",null,!0,!0),KY:100},{vo:new fA("Repeat (0 = Forever)",0,10," \xD7",0,!1,!0),KY:0},{vo:new dB("reverse frames"),KY:!1},{vo:new dB("boomerang"),KY:!1}],slcs:[{vo:new dB("As Slices"),KY:!0}],artb:[{vo:new dB("As Artboards"),KY:!0}]};
|
|
for(var W in this.bS){var h=this.bS[W];for(var Q=0;Q<h.length;Q++){h[Q].vo.f(h[Q].KY);h[Q].vo.h(y.E.l,this.G0,this)}}}jo.prototype=new eS;
|
|
jo.prototype.a88=function(){this.yr=-1};jo.prototype._=function(){for(var W in this.bS)for(var Q=0;Q<this.bS[W].length;
|
|
Q++)this.bS[W][Q].vo._()};jo.prototype.G0=function(){this.n3();this.c(new em(y.E.l,!1))};jo.prototype.n3=function(){var W=this.S_,h=W[0],S=W[1],k=W[2],p=W[3],I=this.bS[h];
|
|
if(I==null)I=[];else I=I.slice(0);if(S)I=I.concat(this.bS.anim);if(["GIF","PNG","JPG"].indexOf(h)!=-1&&k)I=I.concat(this.bS.slcs);
|
|
else if(["GIF","PNG","JPG"].indexOf(h)!=-1&&p)I=I.concat(this.bS.artb);if(h+" "+S+" "+p!=this.yr){this.yr=h+" "+S+" "+p;
|
|
m.hP(this.m);for(var Q=0;Q<I.length;Q++){if(h=="PDF"&&!p&&Q==0)continue;this.m.appendChild(I[Q].vo.m);
|
|
m.YI(this.m)}}var q=this.aud=[];for(var Q=0;Q<I.length;Q++)q.push(I[Q].vo.B())};jo.prototype.apr=function(W,h,S,k){this.S_=[W,h,S,k];
|
|
this.n3()};jo.prototype.B=function(){return this.aud.slice(0)};function fS(){eS.call(this);this.m=m.O("span","fitem");
|
|
this.jn=!1;this.EI=new aA("No",!1,"Cancel");this.yB=new aA("Yes",!1,"Confirm");this.m.appendChild(this.EI.m);
|
|
this.m.appendChild(this.yB.m);this.EI.h("click",this.Z6,this);this.yB.h("click",this.Z6,this);this._()}fS.prototype=new eS;
|
|
fS.prototype._=function(){this.EI.U6(m.NM("cross",null,"autoscale"));this.yB.U6(m.NM("checkmark",null,"autoscale"))};
|
|
fS.prototype.Z6=function(W){this.jn=W.target==this.yB;this.c(new UIEvent("click"))};fS.prototype.B=function(){return this.jn};
|
|
function hA(){eS.call(this);var W=this.m=m.O("div","fitem");this.cY=new fx([12,46],[[13,1,8],[13,1,10],[13,1,9],[12,47]]);
|
|
this.cY.h(y.E.l,this.Zk,this);W.appendChild(this.cY.m);this.FV=new ax(!1);this.FV.parent=this;this.FV.NC(16777215);
|
|
this.FV.h(y.E.l,this.Zk,this);W.appendChild(this.FV.m)}hA.prototype=new eS;hA.prototype._=function(){this.cY._();
|
|
this.FV._()};hA.prototype.abC=function(W){var h=[W.artboardBackgroundType.v-1];if(W.Clr)h.push(W.Clr.v);
|
|
this.f(h)};hA.prototype.ac5=function(){var W=this.B();return{classID:"artboard",Clr:{t:"Objc",v:W[1]},artboardBackgroundType:{t:"long",v:W[0]+1}}};
|
|
hA.prototype.f=function(W){this.cY.f(W[0]);if(W[1])this.FV.f(W[1])};hA.prototype.B=function(){return[this.cY.B(),this.FV.B()]};
|
|
hA.prototype.Zk=function(W){if(W.target==this.FV)this.cY.f(3);this.c(new em(y.E.l,!1))};function s(W){eS.call(this);
|
|
this.Ee=W;this.m=m.O("div","");this.jI=[];this.qS=null;this.agL=[]}s.prototype=new eS;s.prototype.YD=function(W){};
|
|
s.prototype.za=function(){return!1};s.prototype.UW=function(W,h){};s.prototype.IF=function(W,h){};s.prototype.sW=function(W){};
|
|
s.prototype.f=function(W,h,S,k,p,I){var q=[],P=this.jI,t=0,M=hw.AC["s"+this.Ee];M?M(W,q,I):this.A4(W,q,I);
|
|
for(var Q=0;Q<P.length;Q++)if(!(P[Q]instanceof gs))P[Q].f(q[t++]);if(W.RndS)this.qS=W.RndS.v};s.prototype.B=function(){var W=hw.QE(this.Ee),h=[],S=this.jI,k=0;
|
|
for(var Q=0;Q<S.length;Q++)if(!(S[Q]instanceof gs))h[k++]=S[Q].B();var p=hw.AC["g"+this.Ee];p?p(W,h):this.oS(W,h);
|
|
if(W.RndS)W.RndS.v=this.qS;return W};s.prototype.ok=function(W){};s.prototype.ZM=function(W){if(W&&W.target instanceof aA){this.qS=Math.floor(Math.random()*4294967295)}var h=this.agL;
|
|
for(var Q=0;Q<h.length;Q+=2){var S=this.jI[h[Q]],k=this.jI[h[Q+1]],p=S.B(),I=k.B();if(W.target==S)k.f(Math.max(p,I));
|
|
else S.f(Math.min(p,I))}this.c(new em(y.E.l))};s.prototype._=function(){for(var Q=0;Q<this.jI.length;
|
|
Q++)this.jI[Q]._();var W=this.abj;if(W)W._()};s.prototype.MZ=function(W){m.dT(this.m,"form");var h=this.jI;
|
|
for(var Q=0;Q<h.length;Q++){var S=h[Q];S.parent=this;S.h(y.E.l,this.ZM,this);this.m.appendChild(S.m);
|
|
if(S instanceof dB&&h[Q+1]instanceof ax)continue;if(W&&W.indexOf(Q)!=-1)m.k6(this.m);else m.YI(this.m)}var k=hw.QE(this.Ee);
|
|
if(k.RndS){var p=this.abj=new aA([25,1,2],null,null,!0);this.m.appendChild(p.m);p.h("click",this.ZM,this)}};
|
|
s.prototype.eh=function(){return!1};s.prototype.Qb=function(W,h,S,k,p){};s.prototype.Go=function(W,h,S,k,p){};
|
|
s.prototype.he=function(W,h,S,k,p){};s.prototype.oS=function(W,h){};s.prototype.A4=function(W,h){};s.prototype.cv=function(W){var h=W.target.B().indexOf(!0)!=-1,S=new em(y.E.W,!0);
|
|
S._Q=!0;S.data={o:h?y.D.fX:y.D.gw,b:a.VE};this.c(S);S=new em(y.E.u,!0);S.b=a.VE;S._Q=!0;S.data={o:"supertool",b:h?this:null};
|
|
this.c(S)};s.alw=function(W){W.eh=function(){return!0};W.Qb=function(h,S,k,p,I){this.K6=!0;this.adg(h,I)};
|
|
W.Go=function(h,S,k,p,I){if(!this.K6)return;this.adg(h,I)};W.he=function(h,S,k,p,I){this.K6=!1};W.adg=function(h,S){var k=h.t.wy(S.x,S.y);
|
|
function p(I,q){return Math.round(Math.max(0,Math.min(100,100*I/q)))}this.jI[2].f(p(k.x,h.e));this.jI[3].f(p(k.y,h.Z));
|
|
this.ZM()}};s.Bokh=function(){s.call(this,"Bokh");this.jI=[new fx("Depth Map",["A","b"]),new h1("Focal Distance",0,255),new dB([4,11]),new fx([12,76,1],["Triangle (3)",["VAR0 (4)",[12,93,3]],"Pentagon (5)","Hexagon (6)","Heptagon (7)","Octagon (8)"]),new h1([12,56],0,100),new h1([12,15],0,360),new h1([12,2],0,100),new h1([4,13],0,255),new h1([24,6],0,100),new g1([12,58],[[12,59,0],[12,59,1]]),new dB([12,60])];
|
|
this.MZ([4,6])};s.Bokh.prototype=new s;s.Bokh.prototype.A4=function(W,h,S){var k=[[22,5,0],[6,5,3],[6,2]],p=W.BkDi.v.BtDi,I=W.BkDc,q=0;
|
|
if(p=="BeIn")q=0;else if(p=="BeIt"&&I.v.BtDc=="BeCt")q=1;else if(p=="BeIt"&&I.v.BtDc=="BeCm")q=2;else q=3+I.v;
|
|
for(var Q=0;Q<S[1].length;Q++)k.push(S[1][Q].name);this.jI[0].XZ(k,[3]);h[0]=q;h[1]=W.BkDp.v;h[2]=W.BkDs.v;
|
|
h[3]=parseInt(W.BkIs.v.BtIs.slice(3))-3;h[4]=W.BkIb.v;h[5]=W.BkIr.v;h[6]=W.BkSb.v;h[7]=W.BkSt.v;h[8]=W.BkNa.v;
|
|
h[9]=W.BkNt.v.BtNt=="BeNu"?0:1;h[10]=W.BkNm.v};s.Bokh.prototype.oS=function(W,h){var S;if(h[0]==0){S="BeIn";
|
|
delete W.BkDc}else if(h[0]<3){S="BeIt";W.BkDc={t:"enum",v:{BtDc:["BeCt","BeCm"][h[0]-1]}}}else{S="BeIa";
|
|
W.BkDc={t:"long",v:h[0]-3}}W.BkDi.v.BtDi=S;W.BkDp.v=h[1];W.BkDs.v=h[2];W.BkIs.v.BtIs="BeS"+(3+h[3]);
|
|
W.BkIb.v=h[4];W.BkIr.v=h[5];W.BkSb.v=h[6];W.BkSt.v=h[7];W.BkNa.v=h[8];W.BkNt.v.BtNt=["BeNu","BeNg"][h[9]];
|
|
W.BkNm.v=h[10]};s.oilPaint=function(){s.call(this,"oilPaint");this.jI=[new h1([12,56],.1,10,"px",!0),new h1("Cleanliness",0,10,"px",!0),new h1([12,38],.1,10,null,!0),new h1("Bristle Detail",0,10,null,!0),new dB("Lighting"),new h1("Shine",0,10,null,!0),new b9([12,15])];
|
|
this.MZ()};s.oilPaint.prototype=new s;s.oilPaint.prototype.A4=function(W,h){var S="stylization cleanliness brushScale microBrush lightingOn specularity".split(" ");
|
|
for(var Q=0;Q<S.length;Q++)h[Q]=W[S[Q]].v;h[6]=[W.LghD.v]};s.oilPaint.prototype.oS=function(W,h){var S="stylization cleanliness brushScale microBrush lightingOn specularity".split(" ");
|
|
for(var Q=0;Q<S.length;Q++)W[S[Q]].v=h[Q];W.LghD.v=h[6][0]};s.TrcC=function(){s.call(this,"TrcC");this.jI=[new h1("Level",0,255),new g1([12,69],[[19,4,1],[19,4,0]])];
|
|
this.MZ()};s.TrcC.prototype=new s;s.TrcC.prototype.A4=function(W,h){h[0]=W.Lvl.v;h[1]=["Lwr","Upr"].indexOf(W.Edg.v.CntE)};
|
|
s.TrcC.prototype.oS=function(W,h){W.Lvl.v=h[0];W.Edg.v.CntE=["Lwr","Upr"][h[1]]};s["Dfs "]=function(){s.call(this,"Dfs ");
|
|
this.jI=[new g1([12,36],[[15,10,0],[15,10,6],[15,10,11],"Anisotropic"])];this.MZ()};s["Dfs "].prototype=new s;
|
|
s["Dfs "].prototype.A4=function(W,h){h[0]=["Nrml","DrkO","LghO","anisotropic"].indexOf(W.Md.v.DfsM)};
|
|
s["Dfs "].prototype.oS=function(W,h){W.Md.v.DfsM=["Nrml","DrkO","LghO","anisotropic"][h[0]]};s.Embs=function(){s.call(this,"Embs");
|
|
this.jI=[new b9([12,15]),new h1([12,42],1,100,"px"),new h1([12,57],1,500,"%")];this.MZ()};s.Embs.prototype=new s;
|
|
s.Embs.prototype.A4=function(W,h){h[0]=[W.Angl.v];h[1]=W.Hght.v;h[2]=W.Amnt.v};s.Embs.prototype.oS=function(W,h){W.Angl.v=h[0][0];
|
|
W.Hght.v=h[1];W.Amnt.v=h[2]};s["Wnd "]=function(){s.call(this,"Wnd ");this.jI=[new g1([12,32],["Wind","Blast","Stagger"]),new g1([12,33],["From the Right","From the Left"])];
|
|
this.MZ()};s["Wnd "].prototype=new s;s["Wnd "].prototype.A4=function(W,h){h[0]=["Wnd","Blst","Stgr"].indexOf(W.WndM.v.WndM);
|
|
h[1]=["Left","Rght"].indexOf(W.Drct.v.Drct)};s["Wnd "].prototype.oS=function(W,h){W.WndM.v.WndM=["Wnd","Blst","Stgr"][h[0]];
|
|
W.Drct.v.Drct=["Left","Rght"][h[1]]};s.denoise=function(){s.call(this,"denoise");this.jI=[new h1([12,64],0,10),new h1([12,65],0,100,"%")];
|
|
this.MZ()};s.denoise.prototype=new s;s.denoise.prototype.A4=function(W,h){var S=W.channelDenoise.v[0].v;
|
|
h[0]=S.Amnt.v;h[1]=S.EdgF.v};s.denoise.prototype.oS=function(W,h){var S=W.channelDenoise.v[0].v;S.Amnt.v=h[0];
|
|
S.EdgF.v=h[1]};s.lightFilterGradient=function(){s.call(this,"lightFilterGradient");this.jI=[new h1([24,3,1],0,100,"px",1,!0),new h1([12,38],0,200,"%"),new dB([4,11]),new h1("High",0,100,"%"),new h1("Medium",0,100,"%"),new h1("Low",0,100,"%")];
|
|
this.MZ()};s.lightFilterGradient.prototype=new s;s.lightFilterGradient.prototype.A4=function(W,h){h[0]=W.blur.v;
|
|
h[1]=W.textureScale.v*100;h[2]=W.Scl.v==-1;var S=W.Dtl.v;h[3]=S[0].v*100;h[4]=S[1].v*100;h[5]=S[2].v*100};
|
|
s.lightFilterGradient.prototype.oS=function(W,h){W.blur.v=h[0];W.textureScale.v=h[1]/100;W.Scl.v=h[2]?-1:1;
|
|
var S=W.Dtl.v;S[0].v=h[3]/100;S[1].v=h[4]/100;S[2].v=h[5]/100};s.Fbrs=function(){s.call(this,"Fbrs");
|
|
this.jI=[new h1("Variance",1,64),new h1([12,64],1,64)];this.MZ()};s.Fbrs.prototype=new s;s.Fbrs.prototype.A4=function(W,h){h[0]=W.Vrnc.v;
|
|
h[1]=W.Strg.v};s.Fbrs.prototype.oS=function(W,h){W.Vrnc.v=h[0];W.Strg.v=h[1]};s.LnsF=function(){s.call(this,"LnsF");
|
|
this.jI=[new h1([12,2],10,300,"%"),new g1([12,44],["Lens 1","Lens 2","Lens 3","Lens 4"]),new h1("Position X",0,100,"%"),new h1("Position Y",0,100,"%")];
|
|
this.MZ()};s.LnsF.prototype=new s;s.LnsF.prototype.A4=function(W,h){h[0]=W.Brgh.v;h[1]=["Zm","Nkn","Nkn1","PnVs"].indexOf(W.Lns.v.Lns);
|
|
var S=W.FlrC.v;h[2]=Math.round(S.Hrzn.v*100);h[3]=Math.round(S.Vrtc.v*100)};s.LnsF.prototype.oS=function(W,h){W.Brgh.v=h[0];
|
|
W.Lns.v.Lns=["Zm","Nkn","Nkn1","PnVs"][h[1]];var S=W.FlrC.v;S.Hrzn.v=h[2]/100;S.Vrtc.v=h[3]/100};s.alw(s.LnsF.prototype);
|
|
s.blendOptions=function(){s.call(this,"blendOptions");this.jI.push(new fx([12,19,0],hd.h3,!1,hd.Yu));
|
|
this.jI.push(new h1([12,0],0,100,"%"));this.MZ()};s.blendOptions.prototype=new s;s.blendOptions.prototype.A4=function(W,h){h[0]=hd.iR.indexOf(W.Md.v.BlnM);
|
|
h[1]=W.Opct.v.val};s.blendOptions.prototype.oS=function(W,h){W.Md.v.BlnM=hd.iR[h[0]];W.Opct.v.val=h[1]};
|
|
s.LnCr=function(){s.call(this,"LnCr");this.jI=[new h1([12,57],-100,100),new h1([12,38],10,150,"%")];
|
|
this.MZ()};s.LnCr.prototype=new s;s.LnCr.prototype.A4=function(W,h){h[0]=W.LnIa.v;h[1]=W.LnSi.v};s.LnCr.prototype.oS=function(W,h){W.LnIa.v=h[0];
|
|
W.LnSi.v=h[1]};s.adaptCorrect=function(){s.call(this,"adaptCorrect");var W=gY;this.jI=[new gs([19,6,0]),new W([12,57],0,100,"%"),new W("Tone",0,100,"%"),new W([12,56],0,200,"px"),new gs([19,6,2]),new W([12,57],0,100,"%"),new W("Tone",0,100,"%"),new W([12,56],0,200,"px"),new gs([3]),new W([13,0],-100,100)];
|
|
this.MZ([3,7])};s.adaptCorrect.prototype=new s;s.adaptCorrect.prototype.A4=function(W,h){var S=W.sdwM.v;
|
|
h[0]=S.Amnt.v.val;h[1]=S.Wdth.v.val;h[2]=S.Rds.v;var S=W.hglM.v;h[3]=S.Amnt.v.val;h[4]=S.Wdth.v.val;
|
|
h[5]=S.Rds.v;h[6]=W.ClrC.v};s.adaptCorrect.prototype.oS=function(W,h){var S=W.sdwM.v;S.Amnt.v.val=h[0];
|
|
S.Wdth.v.val=h[1];S.Rds.v=h[2];var S=W.hglM.v;S.Amnt.v.val=h[3];S.Wdth.v.val=h[4];S.Rds.v=h[5];W.ClrC.v=h[6]};
|
|
s.Flam=function(){s.call(this,"Flam");var W=this.jI=[new fx([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 h1([12,80,0],20,1e3,"px"),new dB("Randomize Length"),new h1([12,41],5,600,"px"),new h1([12,15],0,360,"\xB0"),new h1("Interval",10,200,"px"),new dB("Adapt Interval for Loops"),new ax(!1),new fx([12,52,0],["1: Draft","2: Low","3: Medium","4: High","5: Fine"]),new h1("Turbulent",0,100),new h1("Jag",0,100),new h1([12,0],0,100),new h1("Lines",2,30),new h1("Bottom",0,100),new fx([12,22],["Normal","Violent","Flat"]),new fx([12,76,1],["Parallel","To the center","Spread","Oval","Pointing"]),new dB("Randomize Shape"),new h1("Random Seed",0,100)];
|
|
this.MZ();var h=this.m;m.hP(h);var S=new g1(null,["Basic","Advanced"]);S.h(y.E.l,this.a77,this);h.appendChild(S.m);
|
|
m.k6(h);var k=m.O("div"),p=m.O("div");this.aj1=[k,p];h.appendChild(k);for(var Q=0;Q<W.length;Q++){(Q<9?k:p).appendChild(W[Q].m);
|
|
if(Q==6)m.YI(k)}W[0].h(y.E.l,this.a37,this);this.a37()};s.Flam.prototype=new s;s.Flam.prototype.a37=function(W){var h=this.jI,Q=h[0].B();
|
|
h[1].G2(Q!=0&&Q!=5);h[2].G2(Q!=0&&Q!=5);h[4].G2(Q!=0&&Q!=5&&Q!=1);h[5].G2(Q!=0&&Q!=5);h[6].G2(Q!=0&&Q!=5)};
|
|
s.Flam.prototype.a77=function(W){var Q=W.target.B(),h=this.aj1,S=this.m;S.removeChild(h[1-Q]);S.appendChild(h[Q])};
|
|
s.boxblur=function(){s.call(this,"boxblur");this.jI=[new h1([12,56],1,200," px")];this.MZ()};s.boxblur.prototype=new s;
|
|
s.boxblur.prototype.A4=function(W,h){h[0]=W.Rds.v.val};s.boxblur.prototype.oS=function(W,h){W.Rds.v.val=h[0]};
|
|
s.GsnB=function(){s.call(this,"GsnB");this.jI=[new h1([12,56],.1,400,"px",1,!0)];this.MZ()};s.GsnB.prototype=new s;
|
|
s.MtnB=function(){s.call(this,"MtnB");this.jI=[new b9([12,15]),new h1([12,28],1,100," px")];this.MZ()};
|
|
s.MtnB.prototype=new s;s.RdlB=function(){s.call(this,"RdlB");this.jI=[new h1([12,57],1,100),new g1([12,36],["Spin","Zoom"]),new h1("Position X",0,100,"%"),new h1("Position Y",0,100,"%")];
|
|
this.MZ()};s.RdlB.prototype=new s;s.RdlB.prototype.A4=function(W,h){h[0]=W.Amnt.v;h[1]=["Spn","Zm"].indexOf(W.BlrM.v.BlrM);
|
|
h[2]=W.Cntr.v.Hrzn.v*100;h[3]=W.Cntr.v.Vrtc.v*100};s.RdlB.prototype.oS=function(W,h){W.Amnt.v=h[0];W.BlrM.v.BlrM=["Spn","Zm"][h[1]];
|
|
W.Cntr.v.Hrzn.v=h[2]/100;W.Cntr.v.Vrtc.v=h[3]/100};s.alw(s.RdlB.prototype);s.Dspl=function(){s.call(this,"Dspl");
|
|
this.jI=[new fx([6,36,3],["a","b"]),new h1([22,4,0],-100,100,"px"),new h1([22,4,1],-100,100,"px"),new fx([24,18,0],[[24,18,3],[24,18,2]])];
|
|
this.MZ()};s.Dspl.prototype=new s;s.Dspl.prototype.A4=function(W,h,S){this.a0a=[];this.eR=[];var k=-1,p=S?S[0]:null;
|
|
if(p==null)p=this.aoG;else this.aoG=p;if(p)for(var Q=0;Q<p.length;Q++){var I=p[Q];this.a0a.push(I.Is.trim());
|
|
this.eR.push(I.SI);if(I.SI==W.DspF.v.pth)k=Q}this.jI[0].XZ(this.a0a);h[0]=k==-1?0:k;h[1]=W.HrzS.v;h[2]=W.VrtS.v;
|
|
h[3]=["WrpA","RptE"].indexOf(W.UndA.v.UndA)};s.Dspl.prototype.oS=function(W,h){if(this.eR.length==0)return;
|
|
W.DspF.v.pth=this.eR[h[0]];W.HrzS.v=h[1];W.VrtS.v=h[2];W.UndA.v.UndA=["WrpA","RptE"][h[3]]};s.Pnch=function(){s.call(this,"Pnch");
|
|
this.jI=[new h1([12,57],-100,100,"%")];this.MZ()};s.Pnch.prototype=new s;s["Plr "]=function(){s.call(this,"Plr ");
|
|
this.jI=[new g1(null,["Rect to Polar","Polar to Rect"])];this.MZ()};s["Plr "].prototype=new s;s.Rple=function(){s.call(this,"Rple");
|
|
this.jI=[new h1([12,57],-999,999),new fx([12,14,0],[[19,8,0],[19,8,1],[19,8,2]])];this.MZ()};s.Rple.prototype=new s;
|
|
s["Shr "]=function(){s.call(this,"Shr ");this.jI=[new bD(!0,!0),new fx([24,18,0],[[24,18,3],[24,18,2]])];
|
|
this.MZ()};s["Shr "].prototype=new s;s["Shr "].prototype.A4=function(W,h){var S=new ex(0,255/127,255/127,0,-2,128),k=JSON.parse(JSON.stringify(W.ShrP.v));
|
|
N.Ey.A(k,S);h[0]=k;h[1]=["WrpA","RptE"].indexOf(W.UndA.v.UndA)};s["Shr "].prototype.oS=function(W,h){var S=new ex(0,255/127,255/127,0,-2,128);
|
|
S.uA();N.Ey.A(h[0],S);W.ShrP.v=h[0];W.ShrE.v=h[0].length-1;W.UndA.v.UndA=["WrpA","RptE"][h[1]]};s.Sphr=function(){s.call(this,"Sphr");
|
|
this.jI=[new h1([12,57],-100,100),new fx([12,36],[[15,10,0],[22,4,0],[22,4,1]])];this.MZ()};s.Sphr.prototype=new s;
|
|
s.Sphr.prototype.A4=function(W,h){h[0]=W.Amnt.v;h[1]=["Nrml","HrzO","VrtO"].indexOf(W.SphM.v.SphM)};
|
|
s.Sphr.prototype.oS=function(W,h){W.Amnt.v=h[0];W.SphM.v.SphM=["Nrml","HrzO","VrtO"][h[1]]};s.Dthr=function(){s.call(this,"Dthr");
|
|
this.jI=[new fx("Palette",[[4,7],"RGB 2x2x2","RGB 4x4x4","RGB 8x8x4"])];this.MZ()};s.Dthr.prototype=new s;
|
|
s.Dthr.prototype.A4=function(W,h){h[0]=W.Plte.v};s.Dthr.prototype.oS=function(W,h){W.Plte.v=h[0]};s.Twrl=function(){s.call(this,"Twrl");
|
|
this.jI=[new h1([12,15],-999,999)];this.MZ()};s.Twrl.prototype=new s;s.Wave=function(){s.call(this,"Wave");
|
|
this.agL=[1,2,3,4];this.jI=[new h1("Number of Generators",1,100),new gY("Min Length",1,999),new gY("Max Length",1,999),new gY("Min Ampl.",1,999),new gY("Max Ampl.",1,999),new gY("Scale X",1,100,"%"),new gY("Scale Y",1,100,"%"),new g1([12,44],["Sine","Triangle",[12,93,3]]),new fx([24,18,0],[[24,18,3],[24,18,2]]),new i3("Randomizer Seed")];
|
|
this.MZ()};s.Wave.prototype=new s;s.Wave.prototype.A4=function(W,h){h[0]=W.NmbG.v;h[1]=W.WLMn.v;h[2]=W.WLMx.v;
|
|
h[3]=W.AmMn.v;h[4]=W.AmMx.v;h[5]=W.SclH.v;h[6]=W.SclV.v;h[7]=["WvSn","WvTr","WvSq"].indexOf(W.Wvtp.v.Wvtp);
|
|
h[8]=["WrpA","RptE"].indexOf(W.UndA.v.UndA);h[9]=W.RndS.v};s.Wave.prototype.oS=function(W,h){W.NmbG.v=h[0];
|
|
W.WLMn.v=h[1];W.WLMx.v=h[2];W.AmMn.v=h[3];W.AmMx.v=h[4];W.SclH.v=h[5];W.SclV.v=h[6];W.Wvtp.v.Wvtp=["WvSn","WvTr","WvSq"][h[7]];
|
|
W.UndA.v.UndA=["WrpA","RptE"][h[8]];var S=parseInt(h[9]);if(isNaN(S))S=248325464;S=Math.max(0,Math.min(268435455,S));
|
|
W.RndS.v=S;this.jI[9].f(S)};s.ZgZg=function(){s.call(this,"ZgZg");this.jI=[new h1([12,57],-100,100),new h1("Ridges",0,20),new fx([12,22],["Around Center","Out From Center","Pond Ripples"])];
|
|
this.MZ()};s.ZgZg.prototype=new s;s.surfaceBlur=function(){s.call(this,"surfaceBlur");this.jI=[new h1([12,56],1,200," px"),new h1([4,13],1,255," px")];
|
|
this.MZ()};s.surfaceBlur.prototype=new s;s.surfaceBlur.prototype.A4=function(W,h){h[0]=W.Rds.v.val;h[1]=W.Thsh.v};
|
|
s.surfaceBlur.prototype.oS=function(W,h){W.Rds.v.val=h[0];W.Thsh.v=h[1]};s.AdNs=function(){s.call(this,"AdNs");
|
|
this.jI=[new h1([12,57],0,200," %"),new fx([12,58],[[12,59,1],[12,59,0]]),new dB([12,60])];this.MZ()};
|
|
s.AdNs.prototype=new s;s.DstS=function(){s.call(this,"DstS");this.jI=[new h1([12,56],1,200," px"),new h1([4,13],1,255," px")];
|
|
this.MZ()};s.DstS.prototype=new s;s["Mdn "]=function(){s.call(this,"Mdn ");this.jI=[new h1([12,56],1,200," px")];
|
|
this.MZ()};s["Mdn "].prototype=new s;s["Mdn "].prototype.A4=function(W,h){h[0]=W.Rds.v.val};s["Mdn "].prototype.oS=function(W,h){W.Rds.v.val=h[0]};
|
|
s.ClrH=function(){s.call(this,"ClrH");this.jI=[new h1([12,56],4,100," px")];for(var Q=1;Q<4;Q++)this.jI.push(new h1("Angle "+Q,0,90," \xB0"));
|
|
this.MZ()};s.ClrH.prototype=new s;s.ClrH.prototype.A4=function(W,h){h[0]=W.Rds.v;for(var Q=1;Q<4;Q++)h[Q]=W["Ang"+Q].v};
|
|
s.ClrH.prototype.oS=function(W,h){W.Rds.v=h[0];for(var Q=1;Q<4;Q++)W["Ang"+Q].v=h[Q]};s.ClrH.prototype._=function(){var W=this.jI;
|
|
W[0]._();for(var Q=1;Q<4;Q++)W[Q].U6(dq.get([12,15])+" "+Q)};s.Crst=function(){s.call(this,"Crst");this.jI=[new h1([12,61],3,100," px")];
|
|
this.MZ()};s.Crst.prototype=new s;s.Crst.prototype.A4=function(W,h){h[0]=W.ClSz.v};s.Crst.prototype.oS=function(W,h){W.ClSz.v=h[0]};
|
|
s.Mztn=function(){s.call(this,"Mztn");this.jI.push(new fx([12,44],"Fine Dots,Medium Dots,Grainy Dots,Coarse Dots,Short Lines,Medium Lines,Long Lines,Short Strokes,Medium Strokes,Long Strokes".split(","),null,[4,3,3]));
|
|
this.eR="FnDt MdmD GrnD CrsD ShrL MdmL LngL ShSt MdmS LngS".split(" ");this.MZ()};s.Mztn.prototype=new s;
|
|
s.Mztn.prototype.A4=function(W,h){h[0]=this.eR.indexOf(W.MztT.v.MztT)};s.Mztn.prototype.oS=function(W,h){W.MztT.v.MztT=this.eR[h[0]]};
|
|
s["Msc "]=function(){s.call(this,"Msc ");this.jI=[new h1([12,61],2,200," px")];this.MZ()};s["Msc "].prototype=new s;
|
|
s["Msc "].prototype.A4=function(W,h){h[0]=W.ClSz.v.val};s["Msc "].prototype.oS=function(W,h){W.ClSz.v.val=h[0]};
|
|
s.Pntl=function(){s.call(this,"Pntl");this.jI=[new h1([12,61],3,100," px")];this.MZ()};s.Pntl.prototype=new s;
|
|
s.Pntl.prototype.A4=function(W,h){h[0]=W.ClSz.v};s.Pntl.prototype.oS=function(W,h){W.ClSz.v=h[0]};s.smartSharpen=function(){s.call(this,"smartSharpen");
|
|
this.jI=[new h1([12,57],1,200,"%"),new h1([12,56],0,200,"px",1,!0)];this.MZ()};s.smartSharpen.prototype=new s;
|
|
s.smartSharpen.prototype.A4=function(W,h){h[0]=W.Amnt.v.val;h[1]=W.Rds.v.val};s.smartSharpen.prototype.oS=function(W,h){W.Amnt.v.val=h[0];
|
|
W.Rds.v.val=h[1]};s.UnsM=function(){s.call(this,"UnsM");this.jI=[new h1([12,57],1,200," %"),new h1([12,56],.1,400,"px",1,!0),new h1([4,13],0,255," ")];
|
|
this.MZ()};s.UnsM.prototype=new s;s.HghP=function(){s.call(this,"HghP");this.jI=[new h1([12,56],.1,400,"px",1,!0)];
|
|
this.MZ()};s.HghP.prototype=new s;s.HsbP=function(){s.call(this,"HsbP");this.jI=[new g1("Input",["RGB","HSB","HSL"]),new g1("Output",["RGB","HSB","HSL"])];
|
|
this.MZ()};s.HsbP.prototype=new s;s["Mxm "]=function(){s.call(this,"Mxm ");this.jI=[new h1([12,56],.1,200," px",1,!0),new fx([12,76,1],[[12,93,3],"Circle"])];
|
|
this.MZ()};s["Mxm "].prototype=new s;s["Mnm "]=function(){s.call(this,"Mnm ");this.jI=[new h1([12,56],.1,200," px",1,!0),new fx([12,76,1],[[12,93,3],"Circle"])];
|
|
this.MZ()};s["Mnm "].prototype=new s;s.Ofst=function(){s.call(this,"Ofst");this.jI=[new h1([22,4,0],-1024,1024," px"),new h1([22,4,1],-1024,1024," px"),new fx([24,18,0],[[24,18,2],[24,18,1],[24,18,3]])];
|
|
this.MZ()};s.Ofst.prototype=new s;s.Rept=function(){s.call(this,"Rept");this.jI=[new gY([12,38],1,300," %"),new gY("Row Shift",-50,50," %"),new gY("Space X",-99,200," %"),new gY("Space Y",-99,200," %"),new dB([4,16,2]),new b9([12,15])];
|
|
this.MZ()};s.Rept.prototype=new s;s.Rept.prototype.A4=function(W,h){h[0]=W.Scl.v.val;h[1]=W.Rsft.v.val;
|
|
h[2]=W.SpcX.v.val;h[3]=W.SpcY.v.val;h[4]=W.SpcC.v;h[5]=[W.Angl.v]};s.Rept.prototype.oS=function(W,h){W.Scl.v.val=h[0];
|
|
W.Rsft.v.val=h[1];W.SpcX.v.val=h[2];W.SpcY.v.val=h[3];W.SpcC.v=h[4];W.Angl.v=h[5][0];return W};s.Ctoa=function(){s.call(this,"Ctoa");
|
|
this.jI=[new gs([13,0]),new ax(!0),new h1(["VAR0 VAR1","Transparency",[4,13]],0,100," %"),new h1(["VAR0 VAR1",[12,0],[4,13]],0,100," %")];
|
|
this.MZ()};s.Ctoa.prototype=new s;s.Ctoa.prototype.A4=function(W,h){h[0]=W.Clr.v;h[1]=W.Trsp.v.val;h[2]=W.Opct.v.val};
|
|
s.Ctoa.prototype.oS=function(W,h){W.Clr.v=h[0];W.Trsp.v.val=h[1];W.Opct.v.val=h[2]};s.LqFy=function(){s.call(this,"LqFy");
|
|
this.lH=!1;this.D_=!1;this._K=null;this.aog=null;this.b=0;this.K={hQ:[[{b:{id:0,name:[24,1,0,1,0],P6:"liq/smudge"}}],[{b:{id:1,name:[24,1,0,1,1],P6:"liq/reconstruct"}}],[{b:{id:2,name:[24,1,0,1,2],P6:"liq/smooth"}}],[{b:{id:3,name:[24,1,0,1,3],P6:"liq/twirl"}}],[{b:{id:4,name:[24,1,0,1,4],P6:"liq/shrink"}}],[{b:{id:5,name:[24,1,0,1,5],P6:"liq/blow"}}],[{b:{id:6,name:[24,1,0,1,6],P6:"liq/pleft"}}],[{b:{id:7,name:"Hand",P6:"tools/hand"}}],[{b:{id:8,name:"Zoom In",P6:"zoomIn"}}],[{b:{id:9,name:"Zoom Out",P6:"zoomOut"}}]],keys:[]};
|
|
this.aJ=new gc(this.K,!1);this.aJ.tc(0);this.aJ.h(y.E.W,this.aaf,this);this.PM=gI.S0();this.lf=null;
|
|
this.rU=[];this.FH=-1;this.zf=null;this.anx=null;this.FN=null;this.Uq=null;this.wi=null;var W=m.O("div","flexrow");
|
|
this.L4=W;this.m.appendChild(W);W.appendChild(this.aJ.m);this.view=new iB(!0);this.view.UW(100,100);
|
|
this.view.h("mousedown",this._O,this);this.view.h("mousemove",this.ZL,this);this.view.h("mouseup",this.p9,this);
|
|
this.view.h("zoom",this.Dt,this);W.appendChild(this.view.m);var h=m.O("div","form");W.appendChild(h);
|
|
this.Eo=h;h.style.width="230px";this.v9=[new h1([12,14,0],0,1e3,null,!1,!0),new h1([12,74],0,100,null,!1,!1),new h1([12,84],0,100,null,!1,!1),new dB([12,46]),new h1([12,0],0,100,null,!1,!1),new dB([24,18,5])];
|
|
var S=this.PM.Brsh.v;S.Dmtr.v.val=100;var k=[100,50,100,!1,100,!0];for(var Q=0;Q<this.v9.length;Q++){var p=this.v9[Q];
|
|
p.f(k[Q]);if(Q==4)p.lz();p.h(y.E.l,this.anh,this);h.appendChild(p.m)}var I=this.a6z=new aA([1,12,2],!0,null,!0);
|
|
I.h("click",this.d0,this);h.appendChild(I.m);this.aqv=this.mx.bind(this);this.Dd=new eS;this.Dd.m=m.O("div","floatcont");
|
|
this.Mb=new aA("Menu",!1,null,!0);this.Mb.h("click",this.ahF,this);var q=this.Mb.m;q.setAttribute("style","position:absolute; right:13px; top:47px")};
|
|
s.LqFy.prototype=new s;s.LqFy.prototype.za=function(){return!0};s.LqFy.prototype.YD=function(W){this.Eo.appendChild(W)};
|
|
s.LqFy.prototype.ahF=function(W){var h=this.Mb.m.getBoundingClientRect();this.Dd.m.appendChild(this.Eo);
|
|
var S=new em(y.E.W,!0);S.data={o:y.D.zS,gh:this.Dd,x:h.right+h.width-290,y:h.top+h.height};this.c(S)};
|
|
s.LqFy.prototype.ok=function(W){this.lH=W.j(hW.OM);var h=a.ut.dX(this.PM,W);if(h!=null){this.PM=h;this.Dt();
|
|
this.v9[0].f(h.Brsh.v.Dmtr.v.val)}else if(W.j(hW.Q9)&&W.j(hW.SG)){var S=this.rU;if(W.j(hW.YS)){if(this.FH+1<S.length)this.FH++}else if(this.FH>0)this.FH--;
|
|
this.lf.map=S[this.FH].slice(0);this.rD(null)}else this.view.ok(W)};s.LqFy.prototype.aaf=function(W){if(W.data.o==y.D.fX){var h=this.b=W.data.b;
|
|
this.aJ.tc(this.b);this.view.ok(h>6?iB.a4N(h-7):new hW)}};s.LqFy.prototype.anh=function(W){var h=W.currentTarget,Q=this.v9.indexOf(h),S=this.PM.Brsh.v;
|
|
if(Q==0){S.Dmtr.v.val=h.B();this.Dt()}this.v9[4].G2(this.v9[3].B());if(Q>2)this.rD(null)};s.LqFy.prototype.pQ=function(){var W=this.rU;
|
|
this.FH++;W[this.FH]=this.lf.map.slice(0);while(W.length>this.FH+1)W.pop();while(W.length>50){W=W.slice(1);
|
|
this.FH--}};s.LqFy.prototype._O=function(W){this._K=this.view.s3();this.aog=new eC(0,0);this.D_=!0;window.requestAnimationFrame(this.aqv)};
|
|
s.LqFy.prototype.ZL=function(W){var h=this.view.s3(),S=new eC(h.x-this._K.x,h.y-this._K.y);if(this.b==0||this.b==6)this.adL(S);
|
|
this._K=h};s.LqFy.prototype.p9=function(W){this.pQ();this.D_=!1};s.LqFy.prototype.mx=function(W){if(this.b!=0&&this.b!=6)this.adL(new eC(0,0));
|
|
if(this.D_)window.requestAnimationFrame(this.aqv)};s.LqFy.prototype.adL=function(W){var h=this.lf,S=h.s6/this.zf.e,k=this._K,p=this.PM.Brsh.v,I=p.Dmtr.v.val,q=Date.now(),P=h.s6,t=h.R_,M=Math.sqrt(W.x*W.x+W.y*W.y),U=Math.max(1,Math.ceil(M/2)),i=W.x/U,z=W.y/U,D=k.clone(),R=this.b,O=this.v9[1].B()/100,b=this.v9[2].B()/100,w=[.005,.015,0,0,.2,.2,.01,.01,.05,.35,.1,.1,.005,.015],A=w[R*2],g=w[R*2+1],E=(1-O)*A+O*g,j=I*S/2;
|
|
for(var Q=0;Q<U;Q++){var x=[];D.x+=i;D.y+=z;N.C2.akx(h.map,P,t,R,D.x*S,D.y*S,j,O,b,i*S,z*S,x,this.lH);
|
|
N.C2.ap7(P,t,h.map,x,2*E*b)}var d=new gj(0,0,P,t),L=new gj(k.x*S,k.y*S,0,0);L.x1(I*S*.5,I*S*.5);var _=L.clone();
|
|
_.offset(W.x*S,W.y*S);L=L.r8(_);var T=new gj(L.x/S,L.y/S,L.e/S,L.Z/S);T=N.H.No(T).r$(this.zf);this.v9[5].f(!0);
|
|
this.rD(T)};s.LqFy.prototype.Dt=function(){var W=go.Zt(this.PM,null,this.view.wd().J);this.view.Ev(W)};
|
|
s.LqFy.prototype.f=function(W,h,S,k,p){S=S.clone();if(h==null)return;if(!k.xX(S)){var I=S.r8(k),q=N.U(I.n()*4);
|
|
N.zt(h,S,q,I);h=q;S=I;var P=N.U(I.n()*4);N.zt(p,k,P,I);p=P}S.x=S.y=0;this.FN=h;this.anx=p;this.wi=h.slice(0);
|
|
this.Uq=h.slice(0);this.zf=S;this.lf=hx.D9(new Uint8Array(W.LqMe.v).buffer);var t=S.e,M=S.Z;if(this.lf.s6/t<.22){this.lf={s6:Math.floor(t/4),R_:Math.floor(M/4)};
|
|
this.lf.map=new Float32Array(this.lf.s6*this.lf.R_*2)}this.rU=[];this.FH=-1;this.pQ();this.rD(null);
|
|
this.view.Va();this.Dt()};s.LqFy.prototype.B=function(){var W=hw.QE("LqFy"),h=new Uint8Array(hx.I0(this.lf)),S=[];
|
|
for(var Q=0;Q<h.length;Q++)S.push(h[Q]);W.LqMe.v=S;return W};s.LqFy.prototype.UW=function(W,h){this.aJ.UW(W,h);
|
|
var S=this.Mb.m,k=this.Eo;this.L4.appendChild(k);this.L4.appendChild(S);if(W>450&&W-h>200){k.style.marginLeft="1em";
|
|
this.L4.removeChild(S);this.view.UW(W-238-45,h)}else{k.style.marginLeft="";this.L4.removeChild(k);this.view.UW(W-40,h)}};
|
|
s.LqFy.prototype._=function(){this.aJ._();this.a6z._();for(var Q=0;Q<this.v9.length;Q++)this.v9[Q]._()};
|
|
s.LqFy.prototype.d0=function(){this.lf.map.fill(0);this.pQ();this.rD(null)};s.LqFy.prototype.rD=function(W){var h=this.zf,S=this.FN,k=this.wi,p=this.lf;
|
|
if(this.v9[5].B())N.C2.hY(S,this.Uq,h.e,h.Z,W,p.map,p.s6,p.R_,0);else this.Uq.set(S);if(this.v9[3].KB()){N.zt(this.anx,h,k,h,W?W:h);
|
|
N.a.ha("norm",this.Uq,h,k,h,W?W:h,this.v9[4].B()/100)}else N.WQ(this.Uq,k);this.view.f([{rc:h,data:k.buffer}])};
|
|
s.GEfc=function(){s.call(this,"GEfc");this.GU=0;this.FA=0;this.FN=null;this.wi=null;this.zf=null;this.Nm=null;
|
|
this.xh=null;this.gz=0;var W=m.O("div","flexrow");this.L4=W;this.m.appendChild(W);this.view=new iB(null);
|
|
this.view.UW(100,100);W.appendChild(this.view.m);this.py="";this.Hg=270;var h=this.sd=m.O("div","form scrollable");
|
|
W.appendChild(h);h.setAttribute("style","width:"+this.Hg+"px; margin-left:10px");var S=this.RT=m.O("div","form");
|
|
W.appendChild(S);S.setAttribute("style","width:230px; margin-left:1em");this.ti={};for(var k in bh.names){var p=new s.GEfc.bi(k);
|
|
p.parent=this;this.ti[k]=p;p.h(y.E.l,this.aj8,this)}this.pT=!0;this.Mb=new aA("Menu",null,null,!0);this.Mb.h("click",this.a8p,this);
|
|
W.appendChild(this.Mb.m);this.xB=new aA(">>",null,null,!0);this.xB.h("click",this.a7h,this);S.appendChild(this.xB.m);
|
|
this.qF=m.O("div");this.qF.setAttribute("style","margin-bottom:1.5em; display:inline-block; width:calc(100% - 40px);");
|
|
S.appendChild(this.qF);this.MS=m.O("div");this.MS.style.minHeight="14em";this.MS.style.marginBottom="1em";
|
|
S.appendChild(this.MS);this.uT=m.O("div","lpbody scrollable");this.fE=m.O("div","lpfoot");S.appendChild(this.uT);
|
|
S.appendChild(this.fE);this.h("click",this.abJ,this);this.zd=[];cw.Nq([[5,3],[5,4]],this.zd,this.fE,this.Hc.bind(this))};
|
|
s.GEfc.prototype=new s;s.GEfc.prototype.za=function(){return!0};s.GEfc.prototype.YD=function(W){this.qF.appendChild(W)};
|
|
s.GEfc.prototype.IF=function(W,h){this.Nm=W};s.GEfc.prototype.a7h=function(W){var h=this.sd.style.display!="none";
|
|
this.sd.style.display=h?"none":"";this.xB.U6(h?"<<":">>");this.UW()};s.GEfc.prototype.a8p=function(W){this.pT=!this.pT;
|
|
this.UW()};s.GEfc.prototype.UW=function(W,h){var S=this.sd.style.display!="none";if(W!=null){this.GU=W;
|
|
this.FA=h;if(W<1e3&&S||W>=1e3&&!S){this.a7h();S=!S}this.pT=W>600}else{W=this.GU;h=this.FA}var k=this.pT?240+(S?this.Hg+10:0):0;
|
|
if(m.oq(this.RT)&&!this.pT){this.L4.removeChild(this.sd);this.L4.removeChild(this.RT)}if(!m.oq(this.RT)&&this.pT){this.L4.appendChild(this.sd);
|
|
this.L4.appendChild(this.RT)}this.sd.style.height=h+"px";this.view.UW(W-k,h);this.uT.style.height=h-this.MS.getBoundingClientRect().height-96+"px";
|
|
this.Mb.m.setAttribute("style","position:absolute; top:46px; right:"+(k+16)+"px")};s.GEfc.prototype.a87=function(){var W=hI.dB.get("img/beach",!0)[0],h=W.rc,S=this.sd,k=Math.floor(m.F()*(this.Hg-40)/3),p=~~(k*.7),I=new gj(0,0,k,p),q=N.U(k*p*4),P=q.slice(0),t=Math.round(10*m.F()),M=new ImageData(new Uint8ClampedArray(P.buffer),k,p);
|
|
N.zt(new Uint8Array(W.data),h,q,new gj(Math.round((h.e-k)/2),Math.round((h.Z-p)/2),k,p));var U=m.O("canvas"),i=U.getContext("2d");
|
|
U.width=k;U.height=p+Math.round(t*1.5);i.font=t+"px sans-serif";this.$l={};var z=this.arq.bind(this);
|
|
for(var Q=0;Q<bh.Rw.length;Q++){var D=bh.Rw[Q],R=m.O("div");S.appendChild(R);R.setAttribute("style","background-color:rgba(0,0,0,0.2); padding:0px 8px; margin-bottom:8px");
|
|
R.textContent=dq.get(D);for(var O in bh.names){var b=bh.names[O];if(b[0]!=Q)continue;bh.K1(O,{rect:I,buffer:q},bh.QE(O),{p:0,z:0,S:0},{p:255,z:255,S:255},{rect:I,buffer:P},{});
|
|
i.fillStyle="black";i.fillRect(0,0,500,500);i.putImageData(M,0,0);var w=dq.get(b[1]);i.fillStyle="white";
|
|
i.fillText(w,(k-i.measureText(w).width)/2,p+Math.round(t*1.1));var A=m.O("div");S.appendChild(A);A.setAttribute("style","display:inline-block; cursor:pointer; padding: 5px 5px 0 5px; margin-bottom:5px");
|
|
A.addEventListener("click",z,!1);var R=m.O("img");A.appendChild(R);R.setAttribute("src",U.toDataURL());
|
|
R.setAttribute("style","width:"+k/m.F()+"px; margin-bottom:0px;");this.$l[O]=A}}};s.GEfc.prototype.arq=function(W){var h;
|
|
for(var S in this.$l)if(this.$l[S]==W.currentTarget)this.py=S;this.aj8()};s.GEfc.prototype.Hc=function(W){var h=cw.ng(this.zd,W),S=this.xh.GEfs.v,k=S[this.gz].v;
|
|
if(h==0){S.push(JSON.parse(JSON.stringify(S[this.gz])));this.gz=S.length-1}else if(S.length>1){S.splice(this.gz,1);
|
|
if(this.gz==S.length)this.gz--}this.Cv();this.rD()};s.GEfc.prototype.aj8=function(W){var h=this.py,S;
|
|
if(W==null)S=bh.QE(h);else S=this.ti[h].B();this.xh.GEfs.v[this.gz].v=S;this.Cv();this.rD()};s.GEfc.prototype.f=function(W,h,S,k,p){if(this.$l==null)this.a87();
|
|
W=this.xh=JSON.parse(JSON.stringify(W));if(W.GEfs==null)W=this.xh={__name:"Filter Gallery",classID:"GEfc",GEfs:{t:"VlLs",v:[{t:"Objc",v:W}]}};
|
|
var I=W.GEfs.v;for(var Q=0;Q<I.length;Q++)if(I[Q].v.GELv==null)I[Q].v.GELv={t:"bool",v:!0};this.gz=I.length-1;
|
|
this.Cv();S=S.clone();if(h==null)return;if(!k.xX(S)&&bh.DD(W).x!=0){var q=S.r8(k),P=N.U(q.n()*4);N.zt(h,S,P,q);
|
|
h=P;S=q}S.x=S.y=0;this.FN=h;this.wi=h.slice(0);this.zf=S;this.rD();this.view.Va()};s.GEfc.prototype.abJ=function(W){var h=W.data,Q=h.Kr,S=this.xh.GEfs.v;
|
|
if(h.Ue){S[Q].v.GELv.v=!S[Q].v.GELv.v;this.rD()}else this.gz=Q;this.Cv()};s.GEfc.prototype.Cv=function(){var W=this.xh.GEfs.v,h=W[this.gz].v,S=h.GEfk.v.GEft,k=this.MS;
|
|
if(bh.names[S]==null){alert("Unsupported gallery filter");m.hP(k)}else{this.py=S;for(var p in this.$l)m.Eg(this.$l[p],"selected");
|
|
m.dT(this.$l[S],"selected");var I=this.ti[S];I.f(h);if(k.firstChild!=I.m){m.hP(k);k.appendChild(I.m)}}var q=[];
|
|
for(var Q=0;Q<W.length;Q++){var P=W[Q].v,t=bh.names[P.GEfk.v.GEft],M=new ha(Q,!0,!0,null,t?t[1]:"Filter",Q==this.gz,P.GELv.v);
|
|
M.parent=this;q.push(M.m)}m.hP(this.uT);q.reverse();for(var Q=0;Q<q.length;Q++)this.uT.appendChild(q[Q]);
|
|
this.UW()};s.GEfc.prototype.B=function(){return JSON.parse(JSON.stringify(this.xh))};s.GEfc.prototype.rD=function(W){var h=this.zf,S=this.FN,k=this.wi,p=this.py,I=this.xh,q=this.Nm;
|
|
function P(t){return{p:t>>>16,z:t>>>8&255,S:t&255}}hw.K1("GEfc",{rect:this.zf,buffer:this.FN},I,P(q.Ps),P(q.lL),{rect:this.zf,buffer:this.wi},null);
|
|
this.view.f([{rc:h,data:k.buffer}])};s.GEfc.prototype._=function(){for(var W in this.ti)this.ti[W]._();
|
|
cw.N9(this.zd,["lrs/newlayer","lrs/bin"])};s.GEfc.bi=function(W){eS.call(this);this.Dn=W;this.m=m.O("div");
|
|
this.ra={};var h=bh.QE(W);for(var S in h){var k=null;if(S=="__name"||S=="classID"||S=="GEfk"||S=="GELv"||["FlRs"].indexOf(S)!=-1)continue;
|
|
else if(S=="EdgW")k=new h1("Edge Width",1,14);else if(S=="EdgB")k=new h1("Edge Brightness",0,W=="AccE"?50:20);
|
|
else if(S=="Smth")k=new h1([19,3,3],1,W=="Stmp"?50:15);else if(S=="ClSz")k=new h1([12,61],3,100);else if(S=="BrdT")k=new h1([7,9],1,20);
|
|
else if(S=="HghS")k=new h1([12,64],0,20);else if(S=="HlSz")k=new h1([12,14,0],1,15);else if(S=="Cntr")k=new h1([12,3,0],0,W=="WtrP"?100:50);
|
|
else if(S=="Shrp")k=new h1("Sharpness",0,40);else if(S=="SprR")k=new h1("Spray Radius",0,25);else if(S=="LgDr")k=new h1("Light/Dark Balance",0,W=="Stmp"?50:100);
|
|
else if(S=="Drkn")k=new h1("Darkness",1,50);else if(S=="Dstr")k=new h1("Distortion",0,20);else if(S=="Scln")k=new h1([12,38],50,200);
|
|
else if(S=="Rlf")k=new h1("Relief",0,W=="Ptch"||W=="NtPr"?25:50);else if(S=="ChAm")k=new h1("Thickness",1,7);
|
|
else if(S=="Pncl")k=new h1([19,2,5],1,30);else if(S=="StrP")k=new h1("Stroke Pressure",0,15);else if(S=="PprB")k=new h1("Paper Brightness",0,50);
|
|
else if(S=="BrsS")k=new h1("Brush Size",0,10);else if(S=="BrsD")k=new h1("Brush Detail",0,10);else if(S=="Txtr")k=new h1([12,67],1,3);
|
|
else if(S=="Grn")k=new h1("Grain",0,20);else if(S=="HghA")k=new h1("Highlight Area",0,20);else if(S=="Intn")k=new h1("Intensity",0,10);
|
|
else if(S=="Brgh")k=new h1("Glow Brightness",0,W=="WtrP"?100:50);else if(S=="StrS")k=new h1("Stroke Size",1,50);
|
|
else if(S=="StDt")k=new h1("Stroke Detail",1,3);else if(S=="Sftn")k=new h1("Softness",0,10);else if(S=="EdgT")k=new h1("Edge Thickness",0,10);
|
|
else if(S=="EdgI")k=new h1("Edge Intensity",0,10);else if(S=="Pstr")k=new h1("Posterization",0,6);else if(S=="Dfnt")k=new h1("Definition",0,25);
|
|
else if(S=="TxtC")k=new h1("Texture Coverage",0,50);else if(S=="ShdI")k=new h1("Shadow Intensity",0,10);
|
|
else if(S=="DrcB")k=new h1("Direction Balance",0,100);else if(S=="Strg")k=new h1([12,64],1,3);else if(S=="Blnc")k=new h1("Balance",0,10);
|
|
else if(S=="BlcI")k=new h1("Black Intensity",0,10);else if(S=="WhtI")k=new h1("White Intensity",0,10);
|
|
else if(S=="DrkI")k=new h1("Dark Intensity",0,50);else if(S=="LghI")k=new h1("Light Intensity",0,50);
|
|
else if(S=="StrW")k=new h1("Stroke Width",3,15);else if(S=="Grns")k=new h1("Graininess",0,W=="NtPr"?20:10);
|
|
else if(S=="GlwA")k=new h1("Glow Amount",0,20);else if(S=="ClrA")k=new h1("Clear Amount",0,20);else if(S=="ChrA")k=new h1("Charcoal Area",0,20);
|
|
else if(S=="ChlA")k=new h1("Chalk Area",0,20);else if(S=="FrgL")k=new h1("Foreground Level",1,15);else if(S=="BckL")k=new h1("Background Level",1,15);
|
|
else if(S=="WhtL")k=new h1("Background Level",0,50);else if(S=="BlcL")k=new h1("Foreground Level",0,50);
|
|
else if(S=="ImgB")k=new h1("Image Balance",0,50);else if(S=="Dnst")k=new h1([12,74],0,50);else if(S=="FbrL")k=new h1("Fiber Length",3,50);
|
|
else if(S=="CrcS")k=new h1("Crack Sapcing",2,100);else if(S=="CrcD")k=new h1("Crack Depth",0,10);else if(S=="CrcB")k=new h1("Crack Brightness",0,10);
|
|
else if(S=="TlSz")k=new h1("Tile Size",2,100);else if(S=="GrtW")k=new h1("Grout Width",1,15);else if(S=="LghG")k=new h1("Lighten Grout",0,10);
|
|
else if(S=="SqrS")k=new h1("Square Size",0,10);else if(S=="RplS")k=new h1("Ripple Size",1,15);else if(S=="RplM")k=new h1("Ripple Magnitude",0,20);
|
|
else if(S=="NmbL")k=new h1("Number of Levels",2,8);else if(S=="EdgS")k=new h1("Edge Simplicity",0,10);
|
|
else if(S=="EdgF")k=new h1("Edge Fidelity",1,3);else if(S=="Sz")k=W=="NGlw"?new h1("Glow Size",-24,24):new h1("Brush Size",1,50);
|
|
else if(S=="Dtl")k=W=="Chrc"?new h1("Detail",0,5):new h1("Detail",1,15);else if(S=="StrL")k=W=="InkO"?new h1("Stroke Length",1,50):new h1("Stroke Length",0,20);
|
|
else if(S=="TxtT")k=new fx([12,67],"Blocks,Canvas,Frosted,Tiny Lens,Bricks,Burlap,Sandstone".split(","));
|
|
else if(S=="BrsT")k=new fx("Brush Type","Simple,Light Rough,Dark Rough,Wide Sharp,Wide Blurry,Sparkle".split(","));
|
|
else if(S=="Grnt")k=new fx("Grain Type","Regular Soft Sprinkles Clumped Contrasty Enlarged Stippled Horizontal Vertical Speckle".split(" "));
|
|
else if(S=="SDir")k=new fx([12,33],["Right Diagonal","Horizontal","Left Diagonal","Vertical"]);else if(S=="ScrT")k=new fx([12,62],["Circle","Dot",[10,35]]);
|
|
else if(S=="LghD"||S=="LghP")k=new fx("Light","Bottom,Bottom Left,Left,Top Left,Top,Top Right,Right,Bottom Right".split(","));
|
|
else if(S=="Clr")k=new ax("Glow Color");else if(S=="InvT")k=new dB([4,11]);else console.log(S);k.h(y.E.l,this.ZJ,this);
|
|
k.parent=this;this.ra[S]=k;this.m.appendChild(k.m)}};s.GEfc.bi.prototype=new eS;s.GEfc.bi.prototype.ZJ=function(W){this.c(new em(y.E.l,!1))};
|
|
s.GEfc.agx="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(" ");
|
|
s.GEfc.bi.prototype.f=function(W){for(var h in this.ra){var S;if(s.GEfc.agx.indexOf(h)!=-1)S=W[h].v;
|
|
else if(h=="TxtT")S=bh.e5.indexOf(W[h].v[h]);else if(h=="BrsT")S=bh.uF.indexOf(W[h].v[h]);else if(h=="LghD")S=bh.y2.indexOf(W[h].v[h]);
|
|
else if(h=="LghP")S=bh.DX.indexOf(W[h].v[h]);else if(h=="Grnt")S=bh.WD.indexOf(W[h].v[h]);else if(h=="ScrT")S=bh.Lc.indexOf(W[h].v[h]);
|
|
else if(h=="SDir")S=bh.JU.indexOf(W[h].v.StrD);this.ra[h].f(S)}};s.GEfc.bi.prototype.B=function(){var W=bh.QE(this.Dn);
|
|
for(var h in this.ra){var S=this.ra[h].B();if(s.GEfc.agx.indexOf(h)!=-1)W[h].v=S;else if(h=="TxtT")W[h].v[h]=bh.e5[S];
|
|
else if(h=="BrsT")W[h].v[h]=bh.uF[S];else if(h=="LghD")W[h].v[h]=bh.y2[S];else if(h=="LghP")W[h].v[h]=bh.DX[S];
|
|
else if(h=="Grnt")W[h].v[h]=bh.WD[S];else if(h=="ScrT")W[h].v[h]=bh.Lc[S];else if(h=="SDir")W[h].v.StrD=bh.JU[S]}return W};
|
|
s.GEfc.bi.prototype._=function(){for(var W in this.ra)this.ra[W]._()};s.blnc=function(){s.call(this);
|
|
var W=this.m;this.jn=null;this.Lo=new fx([12,12],[[19,6,0],[19,6,1],[19,6,2]]);this.Lo.h(y.E.l,this.rD,this);
|
|
W.appendChild(this.Lo.m);this.Ym=[];for(var Q=0;Q<3;Q++){var h=new h1(bS.c$[Q],-100,100);h.h(y.E.l,this.ZM,this);
|
|
this.Ym.push(h);W.appendChild(h.m)}this.M_=new dB([13,4]);this.M_.h(y.E.l,this.ZM,this);W.appendChild(this.M_.m)};
|
|
s.blnc.prototype=new s;s.blnc.prototype._=function(){this.Lo._();for(var Q=0;Q<3;Q++)this.Ym[Q]._();
|
|
this.M_._()};s.blnc.prototype.f=function(W){this.jn=JSON.parse(JSON.stringify(W));this.rD()};s.blnc.prototype.B=function(W){var h=["ShdL","MdtL","HghL"],S=this.jn[h[this.Lo.B()]].v;
|
|
for(var Q=0;Q<3;Q++)S[Q].v=this.Ym[Q].B();this.jn.PrsL.v=this.M_.B();return JSON.parse(JSON.stringify(this.jn))};
|
|
s.blnc.prototype.rD=function(W){var h=["ShdL","MdtL","HghL"],S=this.jn[h[this.Lo.B()]].v;for(var Q=0;
|
|
Q<3;Q++)this.Ym[Q].f(S[Q].v);this.M_.f(this.jn.PrsL.v)};s.brit=function(){s.call(this,"brit");this.jI.push(new h1([12,2],-150,150,""));
|
|
this.jI.push(new h1([12,3,0],-100,100,""));this.jI.push(new dB([12,3,1]));this.MZ()};s.brit.prototype=new s;
|
|
s.brit.prototype.A4=function(W,h){h[0]=W.Brgh?W.Brgh.v:0;h[1]=W.Cntr?W.Cntr.v:0;h[2]=W.useLegacy?W.useLegacy.v:!1};
|
|
s.brit.prototype.oS=function(W,h){W.Brgh.v=h[0];W.Cntr.v=h[1];W.useLegacy.v=h[2]};s.curv=function(){s.call(this);
|
|
this.value=null;this.Bp=null;var W=this.m;this.am=new fx([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5]]);
|
|
this.am.h(y.E.l,this.R3,this);W.appendChild(this.am.m);this.Tq=new fx(null,["Spline","Sketch"]);this.Tq.h(y.E.l,this.ad2,this);
|
|
W.appendChild(this.Tq.m);m.YI(W);this._h=new bD;this._h.h(y.E.l,this.ND,this);W.appendChild(this._h.m);
|
|
this.r5=null;this.a1x=0;this.Cn=0;m.YI(W);this.Y0=new ce("Sample from image",g1.GO(["-\u2195","#000000","#888888","#ffffff"]),!0,null,!0);
|
|
this.Y0.h(y.E.l,this.cv,this);this.Y0.m.style.marginRight="0";W.appendChild(this.Y0.m)};s.curv.prototype=new s;
|
|
s.curv.prototype.UW=function(W,h){this._h.UW(W,h)};s.curv.prototype._=function(){this.am._()};s.curv.prototype.ad2=function(W){var h=ht.mu(this.value,0),S=h.length==256?1:0,k=this.Tq.B();
|
|
if(S==k)return;var p=hw.QE("curv");if(k==1){var I=[];for(var Q=0;Q<256;Q++)I.push(Q);ht.Dm(p,0,I)}this.f(p);
|
|
this.ZM()};s.curv.prototype.ND=function(){ht.Dm(this.value,this.am.B(),this._h.B());this.ZM()};s.curv.prototype.R3=function(){var W=this.am.B(),h=ht.mu(this.value,W),S=h.length==256?1:0;
|
|
this.Tq.f(S);if(this.Bp)this._h.sW(this.Bp[W],this.Bp[4]*[1,.33,.33,.33][W],["#ccc","#fcc","#cfc","#ccf"][W]);
|
|
this._h.f(h)};s.curv.prototype.eh=function(){return!0};s.curv.prototype.Qb=function(W,h,S,k,p){var I=this.value;
|
|
this.value=hw.QE("curv");this.ZM();var q=a.vQ.Le(W,p,1),P=this.r5=[q>>>16&255,q>>>8&255,q&255];this.a1x=p.y;
|
|
var t=this.Y0.B().indexOf(!0);if(t==0){var M=(P[0]+P[1]+P[2])/3,U=this.am.B(),i=ht.mu(I,U),z=U==0?M:P[U-1],D=-1;
|
|
for(var Q=0;Q<i.length;Q++)if(i[Q].v.Hrzn.v==z)D=Q;if(D==-1){var R=JSON.parse(JSON.stringify(i[0]));
|
|
R.v.Hrzn.v=z;R.v.Vrtc.v=z;i.push(R);i.sort(function(O,b){return O.v.Hrzn.v-b.v.Hrzn.v});ht.Dm(I,U,i);
|
|
this.Cn=i.indexOf(R)}else this.Cn=D}this.f(I);this.ZM()};s.curv.prototype.Go=function(W,h,S,k,p){if(this.r5==null)return;
|
|
if(this.Y0.B().indexOf(!0)==0){var I=this.value,q=this.am.B(),P=ht.mu(I,q),t=P[this.Cn];t.v.Vrtc.v=Math.max(0,Math.min(255,Math.round(t.v.Hrzn.v+(this.a1x-p.y))));
|
|
ht.Dm(I,q,P);this.f(I);this.ZM()}};s.curv.prototype.he=function(W,h,S,k,p){var I=this.value,q=this.r5,P=(q[0]+q[1]+q[2])/3,t=this.Y0.B().indexOf(!0)-1;
|
|
if(t<=-1){}else for(var Q=0;Q<3;Q++){var M=ht.mu(I,1+Q);if(t==0)M[0].v.Hrzn.v=q[Q];if(t==1){var U=Math.log(q[Q]/255)/Math.log(P/255),i=Math.min(999,Math.max(10,Math.round(100*U)));
|
|
if(M.length==2)M.splice(1,0,JSON.parse(JSON.stringify(M[0])));M[1].v.Hrzn.v=127-Math.log(i/100)*127;
|
|
M[1].v.Vrtc.v=127}if(t==2)M[M.length-1].v.Hrzn.v=q[Q];ht.Dm(I,1+Q,M)}this.f(I);this.ZM();this.r5=null};
|
|
s.curv.prototype.f=function(W){this.value=W;this.R3()};s.curv.prototype.sW=function(W){this.Bp=W;this.R3()};
|
|
s.curv.prototype.B=function(W){return JSON.parse(JSON.stringify(this.value))};s.expA=function(){s.call(this,"expA");
|
|
this.jI.push(new h1([12,5],-20,20,null,3));this.jI.push(new h1([12,6],-.5,.5,null,3));this.jI.push(new h1([12,7],.01,6.99,null,3));
|
|
this.MZ()};s.expA.prototype=new s;s.expA.prototype.A4=function(W,h){h[0]=W.Exps.v;h[1]=W.Ofst?W.Ofst.v:0;
|
|
h[2]=W.gammaCorrection?W.gammaCorrection.v:1};s.expA.prototype.oS=function(W,h){W.Exps={t:"doub",v:h[0]};
|
|
W.Ofst={t:"doub",v:h[1]};W.gammaCorrection={t:"doub",v:h[2]}};s.grdm=function(){s.call(this,"grdm");
|
|
this.jI.push(new h4(!0,null,!0));this.jI.push(new dB([12,23,0]));this.MZ()};s.grdm.prototype=new s;s.grdm.prototype.A4=function(W,h){h[0]=W.Grad.v;
|
|
h[1]=W.Rvrs?W.Rvrs.v:!1};s.grdm.prototype.oS=function(W,h){W.Grad.v=h[0];W.Rvrs={t:"bool",v:h[1]}};s.grdm.prototype.IF=function(W,h){this.jI[0].sS(W.Ps,W.lL);
|
|
if(h==f6.W8||h==f6.Ov||h==f6.$h)this.jI[0].EX(W.e7)};s.selc=function(){s.call(this);var W=this.m;this.kr=[];
|
|
this.RB=null;this.Lo=new fx([12,82],bS.cC.concat([[13,1,8],[13,1,13],[13,1,10]]));this.Lo.h(y.E.l,this.ZJ,this);
|
|
W.appendChild(this.Lo.m);m.YI(W);for(var Q=0;Q<4;Q++){var h=new h1(bS.asE[Q],-100,100,"%");h.h(y.E.l,this.ZJ,this);
|
|
this.kr.push(h);W.appendChild(h.m)}this.W9=new dB([13,3]);W.appendChild(this.W9.m);this.W9.h(y.E.l,this.ZJ,this)};
|
|
s.selc.prototype=new s;s.selc.prototype._=function(){this.Lo._();this.W9._();for(var Q=0;Q<4;Q++)this.kr[Q]._()};
|
|
s.selc.prototype.f=function(W){this.RB=JSON.parse(JSON.stringify(W));this.rD()};s.selc.prototype.B=function(W){return JSON.parse(JSON.stringify(this.RB))};
|
|
s.selc.prototype.ZJ=function(W){if(W.target!=this.Lo){var h=this.RB,S=[];for(var Q=0;Q<4;Q++)S[Q]=this.kr[Q].B();
|
|
ag.Dm(h,this.Lo.B(),S);h.Mthd={t:"enum",v:{CrcM:this.W9.B()?"Absl":"Rltv"}}}this.rD();this.ZM()};s.selc.prototype.rD=function(){var W=this.RB,h=ag.mu(W,this.Lo.B());
|
|
for(var Q=0;Q<4;Q++)this.kr[Q].f(h[Q]);this.W9.f(W.Mthd?W.Mthd.v.CrcM=="Absl":!1)};s.blwh=function(){s.call(this,"blwh");
|
|
this.jI.push(new dB([12,11]));this.jI.push(new ax(!0));for(var Q=0;Q<6;Q++)this.jI.push(new h1(bS.cC[Q],-200,300));
|
|
this.MZ()};s.blwh.prototype=new s;s.blwh.prototype.A4=function(W,h){h[0]=W.useTint.v;h[1]=W.tintColor.v;
|
|
var S="Rd Yllw Grn Cyn Bl Mgnt".split(" ");for(var Q=0;Q<6;Q++)h[2+Q]=W[S[Q]].v};s.blwh.prototype.oS=function(W,h){W.useTint.v=h[0];
|
|
W.tintColor.v=h[1];var S="Rd Yllw Grn Cyn Bl Mgnt".split(" ");for(var Q=0;Q<6;Q++)W[S[Q]].v=h[2+Q]};
|
|
s.hue2=function(){s.call(this);this.value=null;this.GF=null;this.a07=null;this.Th=[[0,0,0],[0,50,0]];
|
|
var W=this.m;this.Y0=new ce(null,["\u2194"],!0,["Click and drag in image to change saturation"],!0);
|
|
this.Y0.h(y.E.l,this.akY,this);this.Y0.h(y.E.l,this.cv,this);W.appendChild(this.Y0.m);this.Lo=new fx([12,12],["Master"].concat(bS.cC));
|
|
this.Lo.h(y.E.l,this.R3,this);W.appendChild(this.Lo.m);this.JN=new h1([12,8],-180,180);this.JN.h(y.E.l,this.FG,this);
|
|
W.appendChild(this.JN.m);this.CR=new h1([12,9],-100,100);this.CR.h(y.E.l,this.FG,this);W.appendChild(this.CR.m);
|
|
this.ml=new h1([12,10],-100,100);this.ml.h(y.E.l,this.FG,this);W.appendChild(this.ml.m);this.q$=new dB([12,11]);
|
|
this.q$.h(y.E.l,this.FG,this);W.appendChild(this.q$.m);this.c1=new ce("Sample Hue",["<img src=\""+PIMG["tools/eyedropper"]+"\" class=\"autoscale gsicon\" />","+","-"],!0,null,!0);
|
|
this.c1.h(y.E.l,this.akY,this);this.c1.h(y.E.l,this.cv,this);this.c1.m.style.marginLeft="20px";W.appendChild(this.c1.m);
|
|
this.V3=m.O("div");W.appendChild(this.V3);this.b5=this.w5.bind(this);this.nt=this.ci.bind(this);this.N=m.O("canvas");
|
|
this.ds=this.N.getContext("2d");this.Fz=null;m.NO(this.N);m.rE(this.N,282,18);W.appendChild(this.N);
|
|
m.K$(this.N,this.Gw.bind(this))};s.hue2.prototype=new s;s.hue2.prototype.UW=function(W,h){m.rE(this.N,Math.round(W),18);
|
|
if(this.value)this.R3()};s.hue2.prototype.akY=function(W){var h=W.target.B().indexOf(!0);if(h==-1)return;
|
|
if(W.target==this.Y0)this.c1.f([!1,!1,!1]);else this.Y0.f([!1,!1,!1])};s.hue2.prototype.Gw=function(W){if(this.Lo.B()==0||this.q$.B())return;
|
|
var h=m.DJ(W,this.N).x/(this.N.width/m.F()),I=1e6;function S(i,z,D){return i<z&&z<D||D<i&&(i<z||z<D)}var k=this.UO(),p=-1;
|
|
for(var Q=0;Q<4;Q++){var q=Math.abs(h-(k[Q]+Q*1e-5));if(q<I){I=q;p=Q}}if(I>.025){p=-1;var P=k[0],t=k[1],M=k[2],U=k[3];
|
|
if(S(P,h,t))p=4;if(S(t,h,M))p=5;if(S(M,h,U))p=6}if(p==-1)return;this.Fz=p;m.EB(document.body,this.b5);
|
|
m.uE(document.body,this.nt)};s.hue2.prototype.w5=function(W){var h=m.DJ(W,this.N).x/(this.N.width/m.F()),S=this.UO(),k=this.Fz;
|
|
for(var Q=1;Q<4;Q++)if(S[Q]<S[Q-1]){S[Q]+=1}if(k<4){var p=1e6,I=0;for(var Q=-20;Q<20;Q++){var q=Math.abs(S[k]-(h+Q));
|
|
if(q<p){p=q;I=Q}}h+=I;S[k]=h;for(var Q=k+1;Q<4;Q++)if(S[Q]<S[Q-1]){S[Q]=S[Q-1]}for(var Q=k-1;Q>=0;Q--)if(S[Q]>S[Q+1]){S[Q]=S[Q+1]}}else{var P=h-(S[k-4]+S[k-3])/2;
|
|
if(P<-.5)P+=1;if(k==4){S[0]+=P;S[1]+=P;S[2]=Math.max(S[1],S[2]);S[3]=Math.max(S[1],S[3])}if(k==5)for(var Q=0;
|
|
Q<4;Q++)S[Q]+=P;if(k==6){S[2]+=P;S[3]+=P;S[0]=Math.min(S[0],S[2]);S[1]=Math.min(S[1],S[2])}}for(var Q=1;
|
|
Q<4;Q++)if(S[Q]<S[Q-1])throw"e";this.a6p(S);this.R3();this.ZM()};s.hue2.prototype.ci=function(W){m.WF(document.body,this.b5);
|
|
m.TF(document.body,this.nt)};s.hue2.prototype._=function(){this.JN._();this.CR._();this.ml._();this.q$._();
|
|
this.Lo._()};s.hue2.prototype.FG=function(W){var h=this.value.Clrz.v=this.q$.B();if(h)this.Lo.f(0);if(W&&W.target==this.q$){var S=h?1:0;
|
|
this.Th[1-S]=bU.mu(this.value,0);var k=this.Th[S];bU.Dm(this.value,0,k);if(this.Lo.B()==0){this.JN.f(k[0]);
|
|
this.CR.f(k[1]);this.ml.f(k[2])}}var p=this.Lo.B(),I=bU.mu(this.value,p),k=p==0?I:I.Ym;k[0]=this.JN.B();
|
|
var q=this.CR.B();k[1]=h?Math.max(0,q):q;k[2]=this.ml.B();bU.Dm(this.value,p,I);this.R3();this.ZM()};
|
|
s.hue2.prototype.R3=function(){var W=this.Lo.B(),h=this.value.Clrz?this.value.Clrz.v:!1;this.q$.f(h);
|
|
this.Lo.G2(!h);this.c1.G2(!h&&W!=0);var S=bU.mu(this.value,W),k=W==0?S:S.Ym;this.JN.f(k[0]);this.CR.f(k[1]);
|
|
this.ml.f(k[2]);var p=this.N.width,I=this.N.height,q=this.ds;q.clearRect(0,0,p,I);if(h||W==0){this.V3.innerHTML="";
|
|
return}var P=S.Sz;this.V3.innerHTML=P[0]+"\xB0 / "+P[1]+"\xB0<span style=\"float:right\">"+P[2]+"\xB0 \\ "+P[3]+"\xB0</span>";
|
|
var t=N.U(p*4);i8.a9w(t,1,p,-1,.5);var M=new ImageData(new Uint8ClampedArray(t.buffer),p,1),U=Math.round(I/4);
|
|
for(var Q=0;Q<U;Q++)q.putImageData(M,0,Q);function i(w,A,g){q.fillStyle=g;var E=U*2;if(w<=A)q.fillRect(w*p,E,(A-w)*p,U);
|
|
else{q.fillRect(0,E,A*p,U);q.fillRect(w*p,E,(1-w)*p,U)}}var z=this.UO();i(z[0],z[1],"#888888");i(z[1],z[2],"#cccccc");
|
|
i(z[2],z[3],"#888888");q.fillStyle="#ffffff";q.lineWidth=1;q.beginPath();var D=U+.5,R=4*U+.5;for(var Q=0;
|
|
Q<4;Q++){var O=Math.floor(p*z[Q])+.5,b=(Q<2?-1:1)*U*(Q==1||Q==2?1:2);q.moveTo(O,D);q.lineTo(O,R);q.lineTo(O+b,R);
|
|
q.lineTo(O+b,U+U+.5);q.closePath()}q.fill();q.stroke()};s.hue2.prototype.UO=function(){var W=this.Lo.B(),h=bU.mu(this.value,W).Sz;
|
|
for(var Q=0;Q<4;Q++)h[Q]=(1000.5+h[Q]/360)%1;return h};s.hue2.prototype.a6p=function(W){var h=this.Lo.B(),S=bU.mu(this.value,h);
|
|
for(var Q=0;Q<4;Q++)S.Sz[Q]=Math.round(36e3+(W[Q]-.5)*360)%360;bU.Dm(this.value,h,S)};s.hue2.prototype.eh=function(){return!0};
|
|
s.hue2.prototype.a7n=function(){var W=this.Y0.B().indexOf(!0),h=this.c1.B().indexOf(!0);return W!=-1?W:h!=-1?h+1:-1};
|
|
s.hue2.prototype.Qb=function(W,h,S,k,p){var I=this.a7n();if(I==-1)return;var q=this.value;this.value=hw.QE("hue2");
|
|
this.ZM();var P=a.vQ.Le(W,p,1);this.f(q);var t=[P>>>16&255,P>>>8&255,P&255],M=N.ZY(t[0]/255,t[1]/255,t[2]/255);
|
|
if(I==0){this.Lo.f(1+Math.round(M.R_*6)%6)}else{var U=this.UO(),i=.5+M.R_,z=1/12,D=U[1],R=U[2];if(R<D){R++;
|
|
if(i<D&&i+1-R<D-i)i++}var O=D<=i&&i<=R;if(I==1){D=i-z/2;R=i+z/2}else if(I==2&&!O){D=Math.min(i,D);R=Math.max(i,R)}else if(I==3&&O){if(i-D<R-i)D=i;
|
|
else R=i}U=[D-z,D,R,R+z];this.a6p(U)}this.ZM();this.GF=p.x;this.a07=this.CR.B()};s.hue2.prototype.Go=function(W,h,S,k,p){var I=this.a7n();
|
|
if(I==-1)return;if(I==0){if(this.GF!=null){var q=p.x-this.GF;q=Math.max(-100,Math.min(100,this.a07+.5*q));
|
|
this.CR.f(q);this.FG()}}};s.hue2.prototype.he=function(W,h,S,k,p){this.GF=null};s.hue2.prototype.f=function(W){this.value=JSON.parse(JSON.stringify(W));
|
|
var h=this.value.Clrz?this.value.Clrz.v:!1;this.Th[h?1:0]=bU.mu(this.value,0);this.R3()};s.hue2.prototype.B=function(W){return JSON.parse(JSON.stringify(this.value))};
|
|
s.levl=function(){function W(){s.call(this);this.value=null;this.Bp=null;this.rF=[new eC(0,0),new eC(0,0),new eC(0,0),new eC(0,0),new eC(0,0)];
|
|
this.HS=-1;this.b5=this.w5.bind(this);this.nt=this.ci.bind(this);var h=this.m;this.am=new fx([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5]]);
|
|
this.am.h(y.E.l,this.R3,this);h.appendChild(this.am.m);var S=m.O("div","");h.appendChild(S);var k=m.O("div","");
|
|
h.appendChild(k);this.N=m.O("canvas");S.appendChild(this.N);this.ds=this.N.getContext("2d");this.Uo=new eC(256,120);
|
|
this.N.setAttribute("style","display:block");m.rE(this.N,this.Uo.x,this.Uo.y,this.ds);m.NO(this.N);m.K$(this.N,this.Gw.bind(this));
|
|
this.bT=m.O("canvas","");k.appendChild(this.bT);this.PD=this.bT.getContext("2d");this.RY=new eC(this.Uo.x,40);
|
|
this.bT.setAttribute("style","display:block");m.rE(this.bT,this.RY.x,this.RY.y,this.PD);m.NO(this.bT);
|
|
m.K$(this.bT,this.alj.bind(this));var p=this.at9=[];for(var Q=0;Q<5;Q++){var I=new i3(null,null,3);p.push(I);
|
|
I.h(y.E.l,this.aqw,this);(Q<2||Q==4?S:k).appendChild(I.m)}S.appendChild(p[1].m);p[4].m.setAttribute("style","margin: 0 4.7em");
|
|
p[3].m.setAttribute("style","margin:0 0 0 13em");this.Y0=new ce("Sample from image",g1.GO(["#000000","#888888","#ffffff"]),!0,null,!0);
|
|
this.Y0.h(y.E.l,this.cv,this);h.appendChild(this.Y0.m)}W.prototype=new s;W.prototype._=function(){this.am._()};
|
|
W.prototype.aqw=function(h){var S=[];for(var Q=0;Q<5;Q++){var k=255,p=1;if(Q==4){k=999;p=100}var I=parseFloat(this.at9[Q].B());
|
|
S[Q]=Math.max(0,Math.min(k,I*p))}e4.Dm(this.value,this.am.B(),S);this.R3();this.ZM()};W.prototype.R3=function(h){var S=this.Uo.x,k=this.Uo.y,p=this.am.B(),I=this.ds;
|
|
I.clearRect(0,0,S,k);I.fillStyle="#cccccc";I.fillRect(8,8,S-16,k-16-8);if(this.Bp){if(p==0){this.Bp[0].fill(0);
|
|
var q=JSON.parse(JSON.stringify(this.value));e4.Dm(q,0,[0,255,0,255,100]);var P=bS.wz("levl",q),t=[P.vw,P.ll,P.Ah];
|
|
for(var M=0;M<3;M++){var U=this.Bp[1+M],i=t[M];for(var Q=0;Q<256;Q++)this.Bp[0][i[Q]]+=U[Q]}}var z=this.Bp[p],D=0;
|
|
for(var Q=0;Q<z.length;Q++)D+=z[Q];I.fillStyle="#333333";I.beginPath();I.moveTo(8,k-16);for(var Q=0;
|
|
Q<256;Q++){var R=55*z[Q]/D;I.lineTo(8+Q/256*(S-16),Math.max(8,k-16-k*R))}I.lineTo(S-8,k-16);I.closePath();
|
|
I.fill()}var O=e4.mu(this.value,p);for(var Q=0;Q<5;Q++)this.at9[Q].f(O[Q]/(Q==4?100:1));this.rF[0].Yh(8+O[0]/255*(S-16),k-14);
|
|
this.rF[1].Yh(8+O[1]/255*(S-16),k-14);var b=Math.log(O[4]/100)/Math.log(9.99);b=.5-b/2;this.rF[4].Yh(this.rF[0].x+b*(this.rF[1].x-this.rF[0].x),k-14);
|
|
this.Nh(I,this.rF[0],"#000000");this.Nh(I,this.rF[1],"#ffffff");this.Nh(I,this.rF[4],"#777777");var S=this.RY.x,k=this.RY.y;
|
|
I=this.PD;I.clearRect(0,0,S,k);var w=I.createLinearGradient(0,0,S-16,0);w.addColorStop(0,"black");w.addColorStop(1,"white");
|
|
I.fillStyle=w;I.fillRect(8,8,S-16,16);this.rF[2].Yh(8+O[2]/255*(S-16),k-14);this.rF[3].Yh(8+O[3]/255*(S-16),k-14);
|
|
this.Nh(I,this.rF[2],"#000000");this.Nh(I,this.rF[3],"#ffffff")};W.prototype.Nh=function(h,S,k){h.fillStyle=k;
|
|
h.fillRect(S.x-5,S.y,10,10)};W.prototype.Gw=function(h){var S=m.DJ(h,this.N),k=this.abH([0,1,4],S);if(k!=-1)this.HS=k;
|
|
this.aeG()};W.prototype.alj=function(h){var S=m.DJ(h,this.bT),k=this.abH([2,3],S);if(k!=-1)this.HS=k;
|
|
this.aeG()};W.prototype.abH=function(h,S){var k=-1,p=1e9;for(var Q=0;Q<h.length;Q++){var I=Math.abs(this.rF[h[Q]].x-S.x);
|
|
if(I<p){p=I;k=h[Q]}}return p<16?k:-1};W.prototype.aeG=function(h){if(this.HS==-1)return;m.EB(document.body,this.b5);
|
|
m.uE(document.body,this.nt)};W.prototype.w5=function(h){var S=e4.mu(this.value,this.am.B()),k=m.DJ(h,this.HS==2&&this.HS==3?this.bT:this.N),p=255*(k.x-8)/(this.Uo.x-16);
|
|
p=Math.max(0,Math.min(255,p));if(this.HS==0)p=Math.min(p,S[1]-2);if(this.HS==1)p=Math.max(p,S[0]+2);
|
|
if(this.HS!=4)S[this.HS]=Math.round(p);else{var I=(p-S[0])/(S[1]-S[0]);I=1-2*I;I=Math.pow(9.99,I);S[4]=Math.min(999,Math.max(10,Math.round(I*100)))}e4.Dm(this.value,this.am.B(),S);
|
|
this.R3();this.ZM()};W.prototype.ci=function(h){m.WF(document.body,this.b5);m.TF(document.body,this.nt);
|
|
this.HS=-1};W.prototype.eh=function(){return!0};W.prototype.he=function(h,S,k,p,I){var q=this.value,P=this.Y0.B().indexOf(!0);
|
|
if(P==-1)return;this.value=hw.QE("levl");this.ZM();var t=a.vQ.Le(h,I,1),M=[t>>>16&255,t>>>8&255,t&255];
|
|
for(var Q=0;Q<3;Q++){var U=e4.mu(q,1+Q);if(P==0)U[0]=M[Q];if(P==1){var i=Math.log(M[Q]/255)/Math.log((M[0]+M[1]+M[2])*.333/255);
|
|
U[4]=Math.min(999,Math.max(10,Math.round(100*i)))}if(P==2)U[1]=M[Q];e4.Dm(q,1+Q,U)}this.f(q);this.ZM()};
|
|
W.prototype.f=function(h){this.value=h;this.R3()};W.prototype.sW=function(h){this.Bp=h;this.R3()};W.prototype.B=function(h){return JSON.parse(JSON.stringify(this.value))};
|
|
return W}();s.phfl=function(){s.call(this,"phfl");this.jI.push(new ax);this.jI.push(new h1([12,74],0,100,"%"));
|
|
this.jI.push(new dB([13,4]));this.MZ()};s.phfl.prototype=new s;s.phfl.prototype.A4=function(W,h){h[0]=W.Clr.v;
|
|
h[1]=W.Dnst.v;h[2]=W.PrsL.v};s.phfl.prototype.oS=function(W,h){var S=N.X.iZ(h[0]),k=W.Clr.v,p=N.bJ(S.p,S.z,S.S);
|
|
k.Lmnc.v=p.UT;k.A.v=p.S4;k.B.v=p.S;W.Dnst.v=h[1];W.PrsL.v=h[2]};s.vibA=function(){s.call(this,"vibA");
|
|
this.jI.push(new h1([12,13],-100,100,null));this.jI.push(new h1([12,9],-100,100,null));this.MZ()};s.vibA.prototype=new s;
|
|
s.vibA.prototype.A4=function(W,h){h[0]=W.vibrance?W.vibrance.v:0;h[1]=W.Strt?W.Strt.v:0};s.vibA.prototype.oS=function(W,h){W.vibrance.v=h[0];
|
|
W.Strt.v=h[1]};s.thrs=function(){s.call(this,"thrs");this.jI.push(new h1([4,13],1,255,null));this.MZ()};
|
|
s.thrs.prototype=new s;s.thrs.prototype.A4=function(W,h){h[0]=W.Lvl.v};s.thrs.prototype.oS=function(W,h){W.Lvl.v=h[0]};
|
|
s.mixr=function(){s.call(this);var W=this.m;this.kr=[];this.RB=null;this.Lo=new fx([12,4],[[13,1,1],[13,1,4],[13,1,5]]);
|
|
this.Lo.h(y.E.l,this.ZJ,this);W.appendChild(this.Lo.m);m.YI(W);this.zM=new dB([12,60]);W.appendChild(this.zM.m);
|
|
this.zM.h(y.E.l,this.ZJ,this);for(var Q=0;Q<4;Q++){var h=new h1([[13,1,1],[13,1,4],[13,1,5],[13,2]][Q],-200,200,"%");
|
|
h.h(y.E.l,this.ZJ,this);this.kr.push(h);W.appendChild(h.m)}};s.mixr.prototype=new s;s.mixr.prototype._=function(){this.Lo._();
|
|
this.zM._();for(var Q=0;Q<4;Q++)this.kr[Q]._()};s.mixr.prototype.f=function(W){this.RB=JSON.parse(JSON.stringify(W));
|
|
this.rD()};s.mixr.prototype.B=function(W){return JSON.parse(JSON.stringify(this.RB))};s.mixr.prototype.ZJ=function(W){if(W.target!=this.Lo){var h=bS.bj(this.RB);
|
|
if(W.target==this.zM){h.zM=this.zM.B();if(h.zM)h.k=[40,40,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];else h.k=[100,0,0,0,0,0,100,0,0,0,0,0,100,0,0,0,0,0,0,0]}else{var S=(h.zM?0:this.Lo.B())*5,Q=this.kr.indexOf(W.target);
|
|
h.k[S+(Q<3?Q:4)]=W.target.B()}this.RB=bS.gl(h)}this.rD();this.ZM()};s.mixr.prototype.rD=function(){var W=bS.bj(this.RB);
|
|
this.zM.f(W.zM);var h=(W.zM?0:this.Lo.B())*5;for(var Q=0;Q<4;Q++)this.kr[Q].f(W.k[h+(Q<3?Q:4)])};s.post=function(){s.call(this,"post");
|
|
this.jI.push(new h1([4,1],2,255,null));this.MZ()};s.post.prototype=new s;s.post.prototype.A4=function(W,h){h[0]=W.Lvls.v};
|
|
s.post.prototype.oS=function(W,h){W.Lvls.v=h[0]};s.clrL=function(){s.call(this,"clrL");this.jI.push(new bP("LUTs"));
|
|
this.MZ()};s.clrL.prototype=new s;s.clrL.prototype.A4=function(W,h){h[0]=W};s.clrL.prototype.oS=function(W,h){var S=h[0];
|
|
for(var k in S)W[k]=S[k]};s.clrL.prototype.IF=function(W,h){if(h==f6.W8||h==f6.Z1)this.jI[0].EX(W.acx)};
|
|
s.rplc=function(){s.call(this,"rplc");this.jI.push(new h1([12,92],0,200));this.jI.push(new ax);this.jI.push(new h1([12,8],-180,180));
|
|
this.jI.push(new h1([12,9],-100,100));this.jI.push(new h1([12,10],-100,100));this.MZ()};s.rplc.prototype=new s;
|
|
s.rplc.prototype.A4=function(W,h){h[0]=W.Fzns.v;h[1]=W.Mxm.v;h[2]=W.H.v;h[3]=W.Strt.v;h[4]=W.Lght.v};
|
|
s.rplc.prototype.oS=function(W,h){function S(p,I){I.Lmnc.v=p.UT;I.A.v=p.S4;I.B.v=p.S}W.Fzns.v=h[0];W.H.v=h[2];
|
|
W.Strt.v=h[3];W.Lght.v=h[4];var k=N.X.iZ(h[1]),p=N.bJ(k.p,k.z,k.S);S(p,W.Mnm.v);S(p,W.Mxm.v)};s.fade=function(){s.call(this,"fade");
|
|
this.jI.push(new h1([12,0],0,100,"%"));this.jI.push(new fx([12,19,0],hd.h3,!1,hd.Yu));this.MZ()};s.fade.prototype=new s;
|
|
s.fade.prototype.A4=function(W,h){h[0]=W.Opct.v.val;h[1]=hd.iR.indexOf(W.Md.v.BlnM)};s.fade.prototype.oS=function(W,h){W.Opct.v.val=h[0];
|
|
W.Md.v.BlnM=hd.iR[h[1]]};s.aply=function(){var W=hd.iR.concat(["Add","Sbtr"]);W.splice(21,1);var h=hd.h3.concat(["Add",[15,10,21]]);
|
|
h.splice(21,1);var S=hd.Yu.slice(0);S[4]--;function k(){s.call(this,"aply");this.jI.push(new fx([0,3],[]));
|
|
this.jI.push(new fx([12,4],["RGB"].concat(bS.c$).concat(["Transparency"])));this.jI.push(new dB([4,11]));
|
|
this.jI.push(new fx([12,19,0],h,!1,S));this.jI.push(new h1([12,0],0,100,"%"));this.jI.push(new fA([12,38],1,2,null,2));
|
|
this.jI.push(new fA([12,6],-255,255));this.jI.push(new dB("Preserve Transparency"));this.MZ([2]);this.Na=null}k.prototype=new s;
|
|
k.prototype.A4=function(p,I,q){if(q){var P=q[2].g,t=this.Na=[];for(var Q=0;Q<P.length;Q++)t.push(P[Q].getName());
|
|
t.reverse();this.jI[0].XZ([[5,7]].concat(t),[1,t.length])}else var t=this.Na;p=p.With.v;var M=p.T.v;
|
|
I[0]=M[1].t=="name"?1+t.indexOf(M[1].v.val):0;I[1]=["RGB","Rd","Grn","Bl","Trsp"].indexOf(M[0].v.enum);
|
|
I[2]=p.Invr.v;var U=p.Clcl.v.Clcn;I[3]=W.indexOf(U);I[4]=p.Opct.v.val;I[5]=p.Scl.v;I[6]=p.Ofst.v;I[7]=p.PrsT.v};
|
|
k.prototype.oS=function(p,I){p=p.With.v;var q=p.T.v;if(I[0]==0)q[1]={t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Mrgd"}};
|
|
else q[1]={t:"name",v:{classID:"Lyr",val:this.Na[this.Na.length-I[0]]}};q[0].v.enum=["RGB","Rd","Grn","Bl","Trsp"][I[1]];
|
|
p.Invr.v=I[2];var P=p.Clcl.v.Clcn=W[I[3]];p.Opct.v.val=I[4];p.Scl.v=I[5];p.Ofst.v=I[6];p.PrsT.v=I[7];
|
|
var t=P=="Add"||P=="Sbtr";this.jI[5].G2(t);this.jI[6].G2(t)};return k}();function aB(W,h){eS.call(this);
|
|
if(W==null)return;this.id=h;this.rX=W;this.mH=null;this.m=m.O("div","window "+h);this.alb=null;this.a7=m.O("div","whead");
|
|
this.abU=m.O("span","wname");this.a7.appendChild(this.abU);this.m.appendChild(this.a7);this.Rb=this.a78.bind(this);
|
|
this.pE=this.aaK.bind(this);this.TB=this.ajh.bind(this);m.NO(this.a7);m.K$(this.a7,this.Rb);this.oN=m.O("span","cross");
|
|
this.a7.appendChild(this.oN);aB.prototype._.call(this);m.uE(this.oN,this.amj.bind(this));this.body=m.O("div","body");
|
|
this.m.appendChild(this.body)}aB.prototype=new eS;aB.prototype.HV=function(){return!1};aB.prototype.eh=function(){return!1};
|
|
aB.prototype._=function(){if(this.rX==null)return;this.abU.textContent=dq.get(this.rX);var W=PIMG.__cross==null?"filter:invert(1);":"";
|
|
this.oN.setAttribute("style","background-image:url("+PIMG.cross+");"+W)};aB.prototype.Qb=function(W,h,S,k,p){};
|
|
aB.prototype.Pt=function(W,h,S,k,p){};aB.prototype.Go=function(W,h,S,k,p){};aB.prototype.he=function(W,h,S,k,p){};
|
|
aB.prototype.ON=function(W,h,S,k,p){};aB.prototype.ok=function(W,h,S,k){if(k.j(hW.l$)&&this.CU)this.CU();
|
|
if(k.j(hW.Q9)){var p=new em(y.E.u);p._Q=!0;a.xU.uo(k,p);if(p.data)h.c(p)}};aB.prototype.BQ=function(W){return!1};
|
|
aB.prototype.Ra=function(W,h){return!0};aB.prototype.Yo=function(W,h,S,k){};aB.prototype.IF=function(W,h){};
|
|
aB.prototype.X0=function(W,h){return null};aB.prototype.a6E=function(W){return this.alb};aB.prototype.UW=function(){};
|
|
aB.prototype.close=function(){this.c(new em(y.E.UL))};aB.prototype.a78=function(W){this.mH=m.DJ(W,this.m);
|
|
m.EB(window,this.pE);m.uE(window,this.TB)};aB.prototype.aaK=function(W){var h=this.m.parentNode,S=m.DJ(W,h),k=Math.round(S.x-this.mH.x),p=h.offsetTop+Math.max(0,Math.min(window.innerHeight-36,Math.round(S.y-this.mH.y)));
|
|
this.alb=new eC(k,p);this.m.style.left=k+"px";this.m.style.top=p+"px"};aB.prototype.ajh=function(W){m.WF(window,this.pE);
|
|
m.TF(window,this.TB)};aB.prototype.amj=function(W){this.c(new em("closebtn"));this.close()};function ee(){aB.call(this,"About Photopea","aboutpp");
|
|
var W=m.O("div","flexrow");this.body.appendChild(W);var h=this.aaY=m.O("img");W.appendChild(h);this.body.setAttribute("style","margin:0; padding:0");
|
|
var S=this.ae3=m.O("div");S.innerHTML=ee.xz;W.appendChild(S);var k=this.BV=m.O("span");k.innerHTML="<big style=\"text-shadow: 2px 2px 3px #000000;\">Ivan holding Photopea in Prague</big>";
|
|
this.body.appendChild(k)}ee.prototype=new aB;ee.prototype.X0=function(W,h){return new eC(0,0)};ee.prototype.UW=function(W,h){var S=this.aaY,k=this.ae3,p=this.BV,I=(W+h-42-42)/110;
|
|
I=Math.sqrt((W-42)*(h-42))/50;S.setAttribute("style","width:"+W/2+"px; height:"+h+"px; display:block; object-fit:cover;");
|
|
k.setAttribute("style","width:"+(W/2-42)+"px; height:"+(h-42)+"px; padding:20px; font-size:"+I+"px;");
|
|
p.setAttribute("style","position:absolute; bottom:10px; right:"+(W/2+10)+"px")};ee.prototype._=function(){};
|
|
ee.prototype.Yo=function(W,h,S,k){this.aaY.setAttribute("src","promo/ivan_pp.webp")};ee.xz="\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 fL(){aB.call(this,[0,13,0],"account");this.D5=m.O("div","form scrollable");this.body.appendChild(this.D5);
|
|
this.body.style.padding="0";this.Ru=[new fL.o7,new fL.z9("::privacy.html"),new fL.z9(fL.a1y)];for(var Q=0;
|
|
Q<this.Ru.length;Q++)this.Ru[Q].parent=this;this.h("showpage",this.a7d,this)}fL.prototype=new aB;fL.prototype.UW=function(W,h){this.D5.setAttribute("style","width:"+Math.min(W-40,600)+"px; height:"+(h-38)+"px; padding:1.5em;");
|
|
this.Ru[0].UW(W,h)};fL.prototype.X0=function(W,h){return new eC(Math.max(0,Math.min(150,(W-600)/2)),Math.max(0,Math.min(100,(h-500)/2)))};
|
|
fL.prototype.a7d=function(W){m.hP(this.D5);this.D5.scrollTop=0;this.D5.appendChild(this.Ru[W.data.Kr].m)};
|
|
fL.prototype._=function(){aB.prototype._.call(this);for(var Q=0;Q<this.Ru.length;Q++)this.Ru[Q]._()};
|
|
fL.prototype.Yo=function(W,h,S){m.hP(this.D5);var k=this.Ru[0];this.D5.appendChild(k.m);k.Yo();this._()};
|
|
fL.prototype.IF=function(W,h){this.Yo(null,null,null)};fL.o7=function(){eS.call(this);this.m=m.O("div");
|
|
var W=this.m,h,S,k="background-color: #00aa00; text-shadow:none; padding:3px 7px; font-size:1.2em; font-weight:bold; color:#ffffff; cursor:pointer; margin:4px 0;";
|
|
this.um=m.O("div");W.appendChild(this.um);this.v7=new aA([0,11],!1,null,!0);this.v7.m.setAttribute("style","background-color: rgba(200,0,0,1); color:#ffffff; margin:4px 6px 4px 0;");
|
|
this.v7.h("click",this.g6,this);W.appendChild(this.v7.m);this.Ga=new aA([0,13,1],!1,null,!0);this.Ga.h("click",this.a5X,this);
|
|
W.appendChild(this.Ga.m);this.uK=new aA("Business Terms",!1,null,!0);this.uK.h("click",this.a3u,this);
|
|
W.appendChild(this.uK.m);h=m.O("h2");h.innerHTML="Account types";W.appendChild(h);S=m.O("table");S.innerHTML="\t\t\t<table>\t\t\t\t<tr> <th class=\"left\"></th><th>Free</th><th>Premium</th> </tr>\t\t\t\t<tr> <td class=\"left\">All Features</td><td class=\"yes\">\u2713</td><td class=\"yes\">\u2713</td> </tr>\t\t\t\t<tr> <td class=\"left\">No Ads</td><td class=\"no\"> </td><td class=\"yes\">\u2713</td> </tr>\t\t\t\t<tr> <td class=\"left\">Steps in History</td><td class=\"no\" style=\"font-size:1.3em\">30</td><td class=\"yes\">60</td> </tr>\t\t\t\t<!--<tr class=\"lastrow\"> <td class=\"left\">Cost</td><td>Free</td><td><big>$5</big> per month</td> </tr>-->\t\t\t</table>\t\t";
|
|
W.appendChild(S);var p=this.agw=[[9,30,1],[10,90,1],[40,365,1],[15,30,5],[30,90,5],[120,365,5],[50,30,20],[100,90,20],[400,365,20],[40,30,1e3],[80,90,1e3],[300,365,1e3],[100,30,5e3],[200,90,5e3],[700,365,5e3],[200,30,2e4],[400,90,2e4],[1400,365,2e4]];
|
|
this.BA=[];for(var Q=0;Q<p.length;Q++)this.BA.push(new aA("Buy: $"+p[Q][0],!1,null,!0));for(var Q=0;
|
|
Q<this.BA.length;Q++){this.BA[Q].m.setAttribute("style",k);this.BA[Q].h("click",this.a4l,this)}h=m.O("h2");
|
|
h.innerHTML="Go Premium";W.appendChild(h);this.gW=new aA("...",!0);this.gW.m.setAttribute("style",k);
|
|
W.appendChild(this.gW.m);S=this.adM(3,["Single user",this.BA[0],this.BA[1],this.BA[2],"Team of 5",this.BA[3],this.BA[4],this.BA[5],"Team of 20",this.BA[6],this.BA[7],this.BA[8]]);
|
|
W.appendChild(S);this.ao5=new dB("I accept",!0,"");W.appendChild(this.ao5.m);this.a_=new aA([0,13,1],!1,null,!0);
|
|
this.a_.h("click",this.a5X,this);W.appendChild(this.a_.m);this.o8=new aA("I have a key",!1,null,!0);
|
|
this.o8.m.setAttribute("style",k+" float:right;");this.o8.h("click",this.a4l,this);W.appendChild(this.o8.m);
|
|
h=m.O("h2");h.textContent="Team Settings";W.appendChild(h);this.Ry=new dB("Join a team");W.appendChild(this.Ry.m);
|
|
this.Ry.h(y.E.l,this.a5f,this);this.Ix=new i3("Email of a leader",null,14);W.appendChild(this.Ix.m);
|
|
m.YI(W);this.ho=new dB("Start a team");W.appendChild(this.ho.m);this.ho.h(y.E.l,this.a5f,this);var I=new gs("Emails of other members:");
|
|
W.appendChild(I.m);m.YI(W);this.Ep=m.O("textarea");m.j7(this.Ep);this.Ep.setAttribute("rows",3);this.Ep.setAttribute("style","display:block;tab-size:4; width:100%");
|
|
W.appendChild(this.Ep);var q=new aA("Save Team Settings",!1,null,!0);W.appendChild(q.m);q.h("click",this.atK,this);
|
|
var P=this.a2F=new aA("More about Teams",!1,null,!0);W.appendChild(P.m);P.h("click",this.ane,this);h=m.O("h2");
|
|
h.innerHTML="Distributor Account";W.appendChild(h);this.Ch=new aA("...",!0);this.Ch.m.setAttribute("style",k);
|
|
W.appendChild(this.Ch.m);S=this.adM(3,["1000 views/ month",this.BA[9],this.BA[10],this.BA[11],"5000 views/ month",this.BA[12],this.BA[13],this.BA[14],"20000 views/ month",this.BA[15],this.BA[16],this.BA[17]]);
|
|
W.appendChild(S);this.tH=new i3("Domain name (e.g. domain.com)",null,14);W.appendChild(this.tH.m);m.YI(W);
|
|
var q=new aA("Save Domain Settings",!1,null,!0);q.$V();W.appendChild(q.m);q.h("click",this.aig,this);
|
|
var P=new aA("More about Distributors",!1,null,!0);W.appendChild(P.m);P.h("click",this.ane,this)};fL.o7.prototype=new eS;
|
|
fL.o7.prototype.UW=function(W,h){var S=W<500?"$":"Buy: $",k=this.agw;for(var Q=0;Q<k.length;Q++)this.BA[Q].U6(S+k[Q][0])};
|
|
fL.o7.prototype.a5X=function(W){var h=new em("showpage",!0);h.data={Kr:1};this.c(h)};fL.o7.prototype.a3u=function(W){var h=new em("showpage",!0);
|
|
h.data={Kr:2};this.c(h)};fL.o7.prototype._=function(){this.v7.U6(aM.lZ()?dq.get([0,11]):dq.get([0,10]));
|
|
this.a_._();this.Ga._();this.uK._()};fL.o7.prototype.ane=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.k3,link:"https://www.photopea.com/api/accounts#"+(W.target==this.a2F?"teams":"distributors")};
|
|
this.c(h)};fL.o7.prototype.a5f=function(W){var h=W.currentTarget==this.Ry;this.Ry.f(h);this.ho.f(!h)};
|
|
fL.o7.prototype.atK=function(W){var h=this.Ry.B(),S=this.Ix.B().trim().toLowerCase(),k=this.Ep.value.trim().toLowerCase();
|
|
if(S.length>60){alert("Too long email address");return}if(k.length>600){alert("Too many team members");
|
|
return}k=k.split(",").join(" ").trim();k=k.replace(/\s+/g," ");if(k=="")k=[];else k=k.split(" ");var p=aM.YE();
|
|
if(p==null)p={};if(p.acc==null)p.acc={};p.acc.team={jin:h,ldr:S,mmb:k};aM.WW(p,this.Zb.bind(this));alert("Saved!");
|
|
this.Yo()};fL.o7.prototype.aig=function(W){var h=this.tH.B().trim();if(!aM.lZ()){alert("You have to log in first.");
|
|
return}if(aM.VK().distrib=="0"){alert("Order a distributor account first.");return}var S=aM.YE();if(S==null)S={};
|
|
if(S.acc==null)S.acc={};if(h=="")delete S.acc.dname;else S.acc.dname=h;aM.WW(S,this.Zb.bind(this));alert("Saved!");
|
|
this.Yo()};fL.o7.prototype.Yo=function(){if(aM.lZ()){var W=aM.VK();if(W==null)return;this.um.innerHTML="<span style=\"font-size:1.5em; margin-right:0.7em;\">"+W.name+"</span> "+W.email+" <br/>"}else{}var h=aM.lZ()&&aM.w6();
|
|
this.gW.m.style.display=h?"block":"none";if(h){var S=parseInt(W[m.x4("_^NSLUJ")])-Date.now()*(1/1e3),k=parseInt(W.ptype),p;
|
|
if(k==-1)p="member of a team";else if(k==1)p="Single user";else p="Team of "+k;this.gW.U6("Premium active for "+Math.round(S/(60*60*24))+" more days! ("+p+")")}var I=aM.lZ()&&W.distrib*1e3>Date.now();
|
|
this.Ch.m.style.display=I?"block":"none";if(I){var S=parseInt(W.distrib)-Date.now()/1e3,k=parseInt(W.ptype);
|
|
this.Ch.U6("Distributor active for "+Math.round(S/(60*60*24))+" more days! ("+k+" visitos)")}var q=aM.YE();
|
|
if(q&&q.acc&&q.acc.team){var P=q.acc.team;this.Ry.f(P.jin);this.ho.f(!P.jin);this.Ix.f(P.ldr);this.Ep.value=P.mmb.join(", ")}else{this.Ry.f(!0);
|
|
this.ho.f(!1);this.Ix.f("");this.Ep.value=""}if(q&&q.acc&&q.acc.dname)this.tH.f(q.acc.dname);else this.tH.f("")};
|
|
fL.o7.prototype.adM=function(W,h){var S=m.O("table");S.innerHTML="\t\t\t\t<table>\t\t\t\t\t<tr> <th class=\"left\"></th><th>30 days</th><th>90 days</th> "+(W==3?"<th>365 days</th>":"")+" </tr>\t\t\t\t</table>\t\t\t";
|
|
for(var Q=0;Q<h.length;Q+=W+1){var k=m.O("tr"),p;S.appendChild(k);p=m.O("td","left");k.appendChild(p);
|
|
p.innerHTML="<b>"+h[Q]+"</b>";for(var I=0;I<W;I++){p=m.O("td");k.appendChild(p);p.appendChild(h[Q+1+I].m)}}return S};
|
|
fL.o7.prototype.a4l=function(W){var h=this.BA.indexOf(W.currentTarget),k=30,p=1;if(!aM.lZ()){alert("You must log in before buying Premium");
|
|
return}if(this.ao5.B()==!1&&h<9){alert("You must accept Terms of Service");return}var S=aM.lZ()&&aM.w6();
|
|
if(h!=-1){var I=this.agw[h];k=I[1];p=I[2]}if(S&&p<1e3){alert("You already have premium.");return}if(h==-1){var q=prompt("Please enter your key");
|
|
if(q!=null){aM.ah1(q,this.Zb.bind(this));this.CV()}return}if(k==30&&p==1){var P=confirm("You can have a 90 days version for $10. Do you still want a 30 days version for $9?");
|
|
if(!P)return}aM.order(k,p,this.Zb.bind(this));this.CV()};fL.o7.prototype.Zb=function(W){if(aM.lZ()&&aM.VK().msg)alert(aM.VK().msg);
|
|
this.Yo();this.CV()};fL.o7.prototype.g6=function(W){if(aM.lZ()){aM.eW();this.CV();this.Yo(null,null,null)}else aM.g6(this.a8P.bind(this))};
|
|
fL.o7.prototype.a8P=function(){var W=new em(y.E.W,!0);W.data={o:y.D.aaZ};this.c(W)};fL.o7.prototype.CV=function(){var W=new em(y.E.W,!0);
|
|
W.data={o:y.D.agd};this.c(W)};fL.z9=function(W){eS.call(this);this.m=m.O("div");var h=this.m,S=this.a9E=new aA([0,13,2],!1,null,!0),k;
|
|
S.h("click",this.a5N,this);h.appendChild(S.m);if(W.startsWith("::")){k=m.O("iframe");k.setAttribute("style","width:100%;height:1700px; background-color:white;");
|
|
k.setAttribute("src",W.slice(2))}else{k=m.O("div");k.innerHTML=W}h.appendChild(k)};fL.z9.prototype=new eS;
|
|
fL.z9.prototype.a5N=function(W){var h=new em("showpage",!0);h.data={Kr:0};this.c(h)};fL.z9.prototype._=function(){this.a9E._()};
|
|
fL.a1y="\t\t<h1>Contact</h1>\t\t<p>Photopea.com is operated by Ivan Kuckir (I\u010C 04498411, Tax ID CZ9011014309).</p>\t\t<ul>\t\t\t<li><b>Address</b>: H\xE1lkova 483, 517 41 Kostelec nad Orlic\xED, 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\u010D\xE1rova t\u0159\xEDda 1754 / 48b, Hradec Kr\xE1lov\xE9</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\" />\t";
|
|
function eN(){aB.call(this,[11,14],"addguides");this.pv;this.Nm={dH:{VI:0}};this.vi=null;var W=m.O("div","form");
|
|
this.body.appendChild(W);this.nX=new i3([22,4,0],null,16);this.nX.h(y.E.l,this.g4,this);this.TO=new i3([22,4,1],null,16);
|
|
this.TO.h(y.E.l,this.g4,this);this.nx=new fx(null,N.aX.DA);this.nx.h(y.E.l,this.g4,this);W.appendChild(this.nX.m);
|
|
W.appendChild(this.nx.m);m.YI(W);W.appendChild(this.TO.m);this.yB=m.s1(this,W);this.h("closebtn",this.a74,this)}eN.prototype=new aB;
|
|
eN.prototype.Ra=function(W,h){return W!=null};eN.prototype.HV=function(){return!0};eN.prototype._=function(){aB.prototype._.call(this);
|
|
this.nX._();this.TO._();this.nx._();this.yB._()};eN.prototype.IF=function(W,h){var S=W.dH.VI;this.Nm.dH.VI=S;
|
|
this.nx.f(S)};eN.prototype.Yo=function(W,h){this.pv=W;this.vi=JSON.stringify(W.A_());this.n3()};eN.prototype.n3=function(){var W=this.pv,h=W.r4,S=function(k,p,W,I,q){var P=[];
|
|
for(var Q=0;Q<k.length;Q++)if(k[Q][0]==p)P.push(N.aX.JL(k[Q][1],W.H$,I,q));P.sort(function(t,M){return t-M});
|
|
return P.join(", ")};this.nX.f(S(h,0,W,this.Nm,W.e));this.TO.f(S(h,1,W,this.Nm,W.Z))};eN.prototype.g4=function(W){if(W&&W.currentTarget==this.nx)this.Nm.dH.VI=this.nx.B();
|
|
else{var h=this.ahr(),S=this.pv;S.O6(h);S.Hx=!0}this.n3()};eN.prototype.ahr=function(){var W=[],h=[];
|
|
for(var S=0;S<2;S++){var k=S==0?this.nX:this.TO,p=S==0?this.pv.e:this.pv.Z,I=k.B().replace(/,/g," ").replace(/ +/g," ").trim(),q=I==""?[]:I.split(" ");
|
|
for(var Q=0;Q<q.length;Q++){W.push([S,N.aX.a4V(q[Q],this.pv.H$,this.Nm,p)]);h.push(-1)}}return[W,h]};
|
|
eN.prototype.a74=function(W){var h=this.pv;h.O6(JSON.parse(this.vi));h.Hx=!0;this.pv=null};eN.prototype.CU=function(W){this.g4(W);
|
|
var h=new em(y.E.u,!0);h.b=a.M2;h.data={o:"gids",mF:JSON.parse(this.vi),Ir:this.pv.A_()};this.pv=null;
|
|
this.close();this.c(h)};function f4(W){var h=hw.names[W];if(h==null)h=bS.names[W];if(W=="aply")h=[2,12];
|
|
if(W=="fade")h=[2,11];if(W=="blendOptions")h=[14,10];aB.call(this,h,"afw_"+W);this.CD=W;this.vX=null;
|
|
this.Qs=null;this._h=new s[W];this._h.h(y.E.l,this.ZM,this);this._h.parent=this;this.body.appendChild(this._h.m);
|
|
this.e6=new dB([24,18,5]);this.e6.f(!0);this.e6.h(y.E.l,this.ZM,this);this.pc=new aA([1,12,2],!0,null,!0);
|
|
this.pc.h("click",this.d0,this);this.yB=m.s1(this);if(this.EL())this._h.YD(this.yB.m);else{m.dT(this._h.m,"form");
|
|
m.dT(this.body,"flexrow");this._h.m.setAttribute("style","width:312px");var S=m.O("div");this.body.appendChild(S);
|
|
S.setAttribute("style","width:8em; margin-left:1em; line-height:2.3em");S.appendChild(this.yB.m);S.appendChild(this.pc.m);
|
|
S.appendChild(this.e6.m)}this.h("closebtn",this.hL,this)}f4.prototype=new aB;f4.prototype.HV=function(){return!0};
|
|
f4.prototype.EL=function(){return this._h!=null&&this._h.za()};f4.prototype.X0=function(){return this.EL()?new eC(0,0):aB.prototype.X0()};
|
|
f4.prototype.eh=function(){return this._h.eh()};f4.prototype.Qb=function(W,h,S,k,p){this._h.Qb(W,h,S,k,p)};
|
|
f4.prototype.Go=function(W,h,S,k,p){this._h.Go(W,h,S,k,p)};f4.prototype.he=function(W,h,S,k,p){this._h.he(W,h,S,k,p)};
|
|
f4.prototype.Ra=function(W,h){if(this.CD=="fade")return f4.aab(W);return!0};f4.prototype.d0=function(W){this._h.f(hw.QE(this.CD));
|
|
this.ZM()};f4.prototype.ZM=function(W){this.VB({o:"edit",Fv:this._h.B(),rf:!this.e6.B()})};f4.prototype.hL=function(W){this.VB({o:"cancel"})};
|
|
f4.prototype.CU=function(W){if(!this.e6.B()){this.e6.f(!0);this.ZM()}this.Qs=this._h.B();if(this.EL())this.ZM();
|
|
this.VB({o:"confirm"});this.close()};f4.prototype._=function(){aB.prototype._.call(this);this.e6._();
|
|
if(this._h)this._h._();this.yB._()};f4.prototype.IF=function(W,h){if(this._h)this._h.IF(W,h)};f4.prototype.ok=function(W,h,S,k){if(this.EL())this._h.ok(k);
|
|
else aB.prototype.ok.call(this,W,h,S,k)};f4.prototype.Yo=function(W,h,S,k){this.vX=h.vX;var p=W.add.lnk2?W.add.lnk2:[],I,q,P=new gj(0,0,W.e,W.Z),t=W.g[W.w[0]],M=null;
|
|
I=t.buffer;q=t.rect;if(this.EL())M=W.jc(W.w[0]-1);var U=hw.QE(this.CD),i=[p,W.BS,W];if(h.vX==null){this._h.f(U,I,q,P,M,i);
|
|
if(bS.names[this.CD]){if(k.j(hW.OM)&&this.Qs)this._h.f(this.Qs);var z=a.Hw.getData(W),D=N.FZ(z[0].zz);
|
|
this._h.sW(D)}}else{var R=!1,t=W.g[this.vX.i];if(t.rB()){var O=t.$U(W);I=O.buffer;q=O.rect;var b=t.add.SoLd.filterFX.v.filterFXList.v;
|
|
if(b[this.vX.index]){var w=b[this.vX.index].v;this._h.f(this.CD=="blendOptions"?w.blendOptions.v:w.Fltr.v,I,q,P,M,i);
|
|
this._h.sW(N.FZ(I));R=!0}}if(!R){this._h.f(U,I,q,P,M,i);this._h.sW(N.FZ(I))}}if(!this.EL())this.ZM()};
|
|
f4.prototype.VB=function(W){var h=new em(y.E.u,!0);W.CD=this.CD;W.vX=this.vX;h.data=W;h.b=hw.names[this.CD]||this.vX?a.Ak:a.AT;
|
|
h._Q=!0;this.c(h)};f4.prototype.UW=function(W,h){if(!this._h.za()){}else{this.body.style.padding="0";
|
|
this._h.UW(W,h)}};f4.aab=function(W){if(W==null)return!1;var h=W.c_();if(h==null||!(h.data instanceof Array)||h.data.length!=W.w.length)return!1;
|
|
for(var Q=0;Q<h.data.length;Q++){var S=h.data[Q];if(S.i<0&&W.BS[-1-S.i])return!0;if(S.i==null||W.g[S.i]==null||W.g[S.i].Yi!=S.gA)return!1;
|
|
if(W.w.indexOf(S.i)==-1)return!1}return!0};function bX(){aB.call(this,[11,0],"camera");this.data=null;
|
|
this.X8=new eC(1,1);this.a0G=[];var W=m.O("div","form hbar");this.body.appendChild(W);this.anK=new fx(null,[]);
|
|
this.C0=new fx([21,0],[[21,2],[21,1]]);W.appendChild(this.C0.m);this.U5=new fx(null,[]);this.U5.h(y.E.l,this.a0O,this);
|
|
W.appendChild(this.U5.m);this.OC=new aA([11,0],!1,null,!0);this.OC.h("click",this.anN,this);W.appendChild(this.OC.m);
|
|
this.XI=new gs("");W.appendChild(this.XI.m);this.stream=null;this.yz=m.O("video","");this.yz.setAttribute("autoplay","true");
|
|
this.body.appendChild(this.yz);this.apx=this.agi.bind(this);this.a9m=this.am0.bind(this);this.afO=this.a7j.bind(this);
|
|
this.h("closebtn",this.al4,this)}bX.prototype=new aB;bX.prototype._=function(){aB.prototype._.call(this);
|
|
this.C0._();this.OC._();this.UW(this.s6,this.R_)};bX.prototype.jc=function(){var W=this.yz.videoWidth,h=this.yz.videoHeight,S=m.O("canvas","");
|
|
S.width=W;S.height=h;var k=S.getContext("2d");k.drawImage(this.yz,0,0,W,h);var p=k.getImageData(0,0,W,h);
|
|
return{rc:new gj(0,0,W,h),data:p.data.buffer}};bX.prototype.anN=function(W){if(this.C0.B()==0)this.ah2();
|
|
else this.atC()};bX.prototype.atC=function(){var W=this.jc(),h={buffer:new Uint8Array(W.data),rect:W.rc},S=new em(y.E.u,!0);
|
|
S._Q=!0;S.b=a.m5;S.data={o:$.tN,La:h};this.c(S);alert(dq.get([21,4]))};bX.prototype.ah2=function(){var W=this.jc(),h=hI.RO("camera",[W]),S=new em(y.E.W,!0);
|
|
S.data={o:y.D.Hf,om:h};this.c(S);alert(dq.get([21,5]))};bX.prototype.Yo=function(W,h,S){navigator.mediaDevices.enumerateDevices().then(this.af_.bind(this))};
|
|
bX.prototype.af_=function(W){var h=this.a0G=[],S=[];for(var Q=0;Q<W.length;Q++)if(W[Q].kind=="videoinput"){h.push(W[Q]);
|
|
S.push("Camera "+h.length)}this.U5.XZ(S);this.U5.f(0);this.a0O()};bX.prototype.a0O=function(W){this.al4();
|
|
var h={video:{deviceId:this.a0G[this.U5.B()].deviceId,width:{ideal:8e3},height:{ideal:8e3}}};if(navigator.mediaDevices.getUserMedia)navigator.mediaDevices.getUserMedia(h).then(this.apx).catch(this.a9m);
|
|
else navigator.webkitGetUserMedia(h,this.apx,this.a9m)};bX.prototype.agi=function(W){this.stream=W;this.yz.srcObject=W;
|
|
this.yz.addEventListener("loadedmetadata",this.afO,!1)};bX.prototype.a7j=function(W){this.yz.play();
|
|
this.UW(this.s6,this.R_)};bX.prototype.X0=function(W,h){return new eC(0,0)};bX.prototype.UW=function(W,h){var S=this.yz.videoWidth,k=this.yz.videoHeight;
|
|
this.XI.f(S+" x "+k+" px");this.XI.m.setAttribute("style","position:absolute; left:14px; bottom:10px; z-index:1;");
|
|
this.X8.Yh(S,k);this.s6=W;this.R_=h;var p=W-28,I=h-28-30,q=this.X8.x/this.X8.y;if(p/I>q)p=I*q;else I=p/q;
|
|
this.yz.setAttribute("style","display: block; width: "+Math.round(p)+"px; height:"+Math.round(I)+"px;")};
|
|
bX.prototype.am0=function(W){console.log("error",W);alert(dq.get([21,6]));this.close()};bX.prototype.al4=function(W){if(this.stream!=null){var h=this.stream.getTracks();
|
|
for(var Q=0;Q<h.length;Q++)h[Q].stop();this.stream=null}};function bl(){aB.call(this,[7,8],"crange");
|
|
this.pv=null;this.K_={UT:73,S4:4.45,S:4};this.X_={UT:73,S4:4.45,S:4};this.body.style.width="20em";this.Gu=new fx([0,5],["Sampled Colors",[19,6,0],[19,6,1],[19,6,2]]);
|
|
this.Gu.h(y.E.l,this.an$,this);this.body.appendChild(this.Gu.m);this.xz=m.O("div","form");this.body.appendChild(this.xz);
|
|
var W=this.a4n=2,h=this.cA=[new h1([12,92],0,200),new g1([12,36],[[18,0],"\uFF0B","\u2014"]),new h1([12,92],0,100,"%"),new fA("Min",0,255),new fA("Max",0,255)];
|
|
h[0].f(40);h[W].f(40);for(var Q=0;Q<h.length;Q++){h[Q].h(y.E.l,this.rD,this);h[Q].parent=this}this.N=m.O("canvas");
|
|
this.body.appendChild(this.N);this.yB=m.s1(this,this.body)}bl.prototype=new aB;bl.prototype.Ra=function(W,h){return W!=null};
|
|
bl.prototype.eh=function(){return!0};bl.prototype.HV=function(){return!0};bl.prototype.an$=function(W){var h=this.Gu.B(),S=this.cA,k=this.xz,p=0,I=S.length,q=this.a4n;
|
|
if(h==0)I=q;else{p=q;S[p+1].f([0,100,190][h-1]);S[p+1].G2(h!=1);S[p+2].f([60,150,255][h-1]);S[p+2].G2(h!=3)}m.hP(k);
|
|
for(var Q=p;Q<I;Q++){k.appendChild(S[Q].m)}this.rD()};bl.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();this.Gu._();for(var Q=0;Q<this.cA.length;Q++)this.cA[Q]._()};bl.prototype.Qb=function(W,h,S,k,p){var I=W.t.wy(p.x,p.y);
|
|
this.a8N(I.x,I.y)};bl.prototype.a8N=function(W,h){var S=Math.min,k=Math.max,p=this.pv,I=k(0,S(p.e-1,Math.floor(W))),q=k(0,S(p.Z-1,Math.floor(h))),P=p.jc(),t=(q*p.e+I)*4,M=P[t],U=P[t+1],i=P[t+2],z=N.bJ(M,U,i),D=this.cA[1].B(),R=this.K_,O=this.X_;
|
|
if(D==0){this.K_=JSON.parse(JSON.stringify(z));this.X_=z}else if(D==1){R.UT=S(R.UT,z.UT);R.S4=S(R.S4,z.S4);
|
|
R.S=S(R.S,z.S);O.UT=k(O.UT,z.UT);O.S4=k(O.S4,z.S4);O.S=k(O.S,z.S)}else if(D==2){var b=(R.UT+O.UT)/2,w=(R.S4+O.S4)/2,A=(R.S+O.S)/2;
|
|
if(z.UT<b)R.UT=k(R.UT,z.UT+10);else O.UT=S(O.UT,z.UT-10);if(z.S4<w)R.S4=k(R.S4,z.S4+1);else O.S4=S(O.S4,z.S4-1);
|
|
if(z.S<A)R.S=k(R.S,z.S+1);else O.S=S(O.S,z.S-1)}this.rD()};bl.prototype.CU=function(W){var h=this.Gu.B(),S=this.cA,k={__name:"Color Range",classID:"ClrR",colorModel:{t:"long",v:0}};
|
|
if(h==0){var p=this.K_,I=this.X_;k.Mnm={t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:p.UT},A:{t:"doub",v:p.S4},B:{t:"doub",v:p.S}}};
|
|
k.Mxm={t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:I.UT},A:{t:"doub",v:I.S4},B:{t:"doub",v:I.S}}};k.Fzns={t:"long",v:S[0].B()}}else{h--;
|
|
var q=["shadows","midtones","highlights"][h];k.Clrs={t:"enum",v:{Clrs:["Shdw","Mdtn","Hghl"][h]}};if(0<h)k[q+"LowerLimit"]={t:"long",v:S[3].B()};
|
|
if(h<2)k[q+"UpperLimit"]={t:"long",v:S[4].B()};k[q+"Fuzziness"]={t:"long",v:S[2].B()}}this.close();var P=new em(y.E.gg,!0);
|
|
P.data={HP:"colorRange",b4:k};this.c(P)};bl.prototype.Yo=function(W,h){this.pv=W;this.a8N(0,0);this.an$()};
|
|
bl.prototype.rD=function(){var W=this.pv,h=this.Gu.B(),S=this.K_,k=this.X_,p=this.cA,I=p[0].B()/200,q=!1;
|
|
if(h>0){S=p[3].B();k=p[4].B();if(S>=k)S=k-1;q=!0;I=p[2].B()/100}var P=a.I6.Wd(W,S,k,I,q),t=P.rect,M=P.channel,U=this.N,i=U.getContext("2d"),z=Math.floor(230*m.F()),D=Math.floor(z*(t.Z/t.e));
|
|
U.width=z;U.height=D;m.cq(U,z,D);var R=N.U(M.length*4);N.wM(R,4294967295);for(var Q=0;Q<3;Q++)N.ce(M,R,Q);
|
|
var O=a.Q.ry([R,t],new ex(z/t.e,0,0,D/t.Z,0,0)),b=O.rect,w=new ImageData(new Uint8ClampedArray(O.buffer.buffer),b.e,b.Z);
|
|
i.putImageData(w,0,0)};function jL(){aB.call(this,[12,76,1],"createshape");this.Fw=null;var W=m.O("div","form");
|
|
W.setAttribute("style","width:20em");this.body.appendChild(W);this.tD=new fA([12,41],0,0,null,0,!1,!0);
|
|
W.appendChild(this.tD.m);m.YI(W);this.nX=new fA([12,42],0,0,null,0,!1,!0);W.appendChild(this.nX.m);m.YI(W);
|
|
this.aY=new dB([19,5,3]);W.appendChild(this.aY.m);this.tD.f(100);this.nX.f(100);this.yB=m.s1(this,W)}jL.prototype=new aB;
|
|
jL.prototype.CU=function(W){this.Fw.atO(this.Fw.a5J,this.tD.B(),this.nX.B(),this.aY.B());this.close()};
|
|
jL.prototype._=function(){if(this.Fw)this.rX=dq.get([5,3])+": "+dq.get(this.Fw.aaG);aB.prototype._.call(this);
|
|
this.yB._();this.tD._();this.nX._();this.aY._()};jL.prototype.Yo=function(W,h){this.Fw=h;this._()};function dJ(){aB.call(this,[11,1],"colorpicker");
|
|
this.Jp=null;this.Ho=null;this.fy=null;this.lX=!1;this.yI=!1;var W=m.O("div","flexrow"),I,q;this.body.appendChild(W);
|
|
this.Ye=new i8(256);this.Ye.h(y.E.l,this.wG,this);W.appendChild(this.Ye.m);var h=m.O("div","form");h.setAttribute("style","width:14.5em; margin-left:1em;");
|
|
W.appendChild(h);this.a1a=m.O("div","full");h.appendChild(this.a1a);this.afj=m.O("div","full");h.appendChild(this.afj);
|
|
var S=m.O("div","flexrow");h.appendChild(S);var k=m.O("div"),p=m.O("div");S.appendChild(k);S.appendChild(p);
|
|
I=["R","G","B"];q=k;this.d5=[];for(var Q=0;Q<3;Q++){var P=new fA(I[Q]+":",0,255,null,0,!1,!0);this.d5.push(P);
|
|
P.h(y.E.l,this.a0W,this);q.appendChild(P.m)}I=["H","S","B"];q=p;this.tE=[];for(var Q=0;Q<3;Q++){var t=0,M=360,U="\xB0";
|
|
if(Q!=0){M=100;U="%"}var P=new fA(I[Q]+":",t,M,U,0,!1,!0);this.tE.push(P);P.h(y.E.l,this.ab7,this);q.appendChild(P.m)}this.nX=new i3("Hex",null,6);
|
|
this.nX.h(y.E.l,this.Yp,this);h.appendChild(this.nX.m);this.eT=m.O("input","fitem");this.eT.setAttribute("type","color");
|
|
this.eT.setAttribute("style","width:50px");this.eT.addEventListener("change",this.Yp.bind(this),!1);
|
|
h.appendChild(this.eT);this.f5=new d0(9);this.f5.h(y.E.l,this.Yp,this);h.appendChild(this.f5.m);this.yB=m.s1(this,h);
|
|
this.h("closebtn",this.hL,this);this.Qu=!1}dJ.prototype=new aB;dJ.prototype.eh=function(){return!0};
|
|
dJ.prototype.X0=function(W,h){return new eC(Math.max(0,Math.min(150,(W-484)/2)),Math.max(0,Math.min(150,(h-316)/2)))};
|
|
dJ.prototype.UW=function(W,h){this.Ye.UW(Math.min(256,W-226),h)};dJ.prototype._=function(W,h){aB.prototype._.call(this);
|
|
this.yB._()};dJ.prototype.wG=function(W){this.Ho=this.Ye.B();this.update()};dJ.prototype.Qb=function(W,h,S,k,p){this.Qu=!0;
|
|
this.aqq(W,p)};dJ.prototype.Go=function(W,h,S,k,p){if(!this.Qu)return;this.aqq(W,p)};dJ.prototype.he=function(W,h,S,k,p){this.Qu=!1};
|
|
dJ.prototype.aqq=function(W,h){var S=a.vQ.Le(W,h,1),k=S&255,p=S>>8&255,I=S>>16&255;this.Ho={p:I/255,z:p/255,S:k/255};
|
|
this.update()};dJ.prototype.a0W=function(W){var h=this.d5,S=this.th(parseInt(h[0].B())),k=this.th(parseInt(h[1].B())),p=this.th(parseInt(h[2].B()));
|
|
this.Ho={p:S/255,z:k/255,S:p/255};this.update()};dJ.prototype.ab7=function(W){var h=this.tE,S=this.fM(parseInt(h[0].B())/360),k=this.fM(parseInt(h[1].B())/100),p=this.fM(parseInt(h[2].B())/100);
|
|
this.Ho=N.qu(S,k,p);this.update()};dJ.prototype.Yp=function(W){var h;if(W.currentTarget==this.f5)h=this.f5.B();
|
|
else{h=W.currentTarget==this.nX?this.nX.B():this.eT.value;if(h.charAt(0)=="#")h=h.slice(1);if(h.length==3)h=h[0]+h[0]+h[1]+h[1]+h[2]+h[2];
|
|
h=N.II(h)}this.Ho={p:(h>>16&255)/255,z:(h>>8&255)/255,S:(h&255)/255};this.update()};dJ.prototype.x8=function(W){var h=W.p,S=W.z,k=W.S;
|
|
return Math.round(h*255)<<16|Math.round(S*255)<<8|Math.round(k*255)};dJ.prototype.CU=function(W){this.a5r();
|
|
var h=this.x8(this.Ho);this.fy(h);this.close();this.yI=!1;this.Ho=null};dJ.prototype.hL=function(W){this.a5r();
|
|
if(this.lX)this.fy(this.x8(this.Jp));this.yI=!1;this.Ho=null};dJ.prototype.a5r=function(W){var h=new em(y.E.W,!0);
|
|
h.data={o:y.D.a2T};this.c(h)};dJ.prototype.IF=function(W,h){if(h!=f6.Ov)return;var S=W.Ps;this.f5.f(S);
|
|
if(this.Ho!=null){this.Ho={p:(S>>16&255)/255,z:(S>>8&255)/255,S:(S>>0&255)/255};this.update()}};dJ.prototype.Yo=function(W,h){var S=h.tg,k={p:(S>>16&255)/255,z:(S>>8&255)/255,S:(S>>0&255)/255};
|
|
if(this.Ho==null){var p=new em(y.E.W,!0);p.data={o:y.D.PS,W0:"crosshair",push:!0};this.c(p);this.Qu=!1;
|
|
this.fy=h.x9;this.lX=!1;this.yI=h.nB;this.Jp=JSON.parse(JSON.stringify(k));this.afj.setAttribute("style","height:3em;background-color:#"+N.fl(S)+";")}this.Ho=k;
|
|
this.update()};dJ.prototype.update=function(){var W=this.Ho,h=this.x8(W),S=this.d5;S[0].f(Math.round(W.p*255));
|
|
S[1].f(Math.round(W.z*255));S[2].f(Math.round(W.S*255));this.nX.f(N.fl(h));this.eT.value="#"+N.fl(h);
|
|
this.a1a.setAttribute("style","height:3em;background-color:#"+N.fl(h)+";");var k=N.ZY(W.p,W.z,W.S);S=this.tE;
|
|
S[0].f(Math.round(k.R_*360));S[1].f(Math.round(k.Nx*100));S[2].f(Math.round(k.Fv*100));this.Ye.f(W);
|
|
if(this.yI){this.fy(this.x8(this.Ho));this.lX=!0}};dJ.prototype.th=function(W){return Math.max(0,Math.min(255,W))};
|
|
dJ.prototype.fM=function(W){return Math.max(0,Math.min(1,W))};function fh(){aB.call(this,[11,2],"contoureditor");
|
|
this.ag8=null;this.IM=null;this.response=null;this.jV=m.O("div","cell");this.body.appendChild(this.jV);
|
|
this.ix=m.O("div","cell padded");this.body.appendChild(this.ix);var W=m.O("div","bordered padded vmargin");
|
|
this.jV.appendChild(W);this._h=new bD;this._h.h(y.E.l,this.ND,this);W.appendChild(this._h.m);this.yB=m.s1(this,this.ix);
|
|
this.coords=m.O("div","");this.coords.setAttribute("style","width:250px");this.jV.appendChild(this.coords);
|
|
this.Ie=new i3("X (in)","%",4);this.Se=new i3("Y (out)","%",4);this._k=new dB([19,3,0]);this.Ie.h(y.E.l,this.Gc,this);
|
|
this.Se.h(y.E.l,this.Gc,this);this._k.h(y.E.l,this.Gc,this);this.coords.appendChild(this.Ie.m);this.coords.appendChild(this._k.m);
|
|
this.coords.appendChild(this.Se.m);this.h("closebtn",this.xa,this)}fh.prototype=new aB;fh.prototype.CU=function(){this.close()};
|
|
fh.prototype._=function(){aB.prototype._.call(this);this.yB._();this._k._()};fh.prototype.ND=function(W){this.IM.Crv.v=this._h.B();
|
|
this.response(this.IM);this.FP()};fh.prototype.xa=function(W){this.response(this.ag8)};fh.prototype.Yo=function(W,h){this.ag8=JSON.parse(JSON.stringify(h.Vz));
|
|
this.IM=h.Vz;this.response=h.response;this._h.f(this.IM.Crv.v);this.FP()};fh.prototype.FP=function(){var Q=this._h.a9d();
|
|
this.coords.setAttribute("class",Q==-1?"disabled":"");if(Q==-1)return;var W=this.IM.Crv.v[Q].v;this.Ie.f(Math.round(W.Hrzn.v*(100/255)));
|
|
this.Se.f(Math.round(W.Vrtc.v*(100/255)));this._k.f(W.Cnty.v)};fh.prototype.Gc=function(W){var Q=this._h.a9d(),h=this.IM.Crv.v[Q];
|
|
h.v.Hrzn.v=parseFloat(this.Ie.B())*(255/100);h.v.Vrtc.v=parseFloat(this.Se.B())*(255/100);h.v.Cnty.v=this._k.B();
|
|
this.IM.Crv.v.sort(function(S,k){return S.v.Hrzn.v-k.v.Hrzn.v});this._h.f(this.IM.Crv.v,this.IM.Crv.v.indexOf(h));
|
|
this.FP();this.response(this.IM)};function cJ(){aB.call(this,[11,3],"csize");this.E0=0;this.D5=m.O("div","form");
|
|
this.D5.setAttribute("style","width:22em");this.body.appendChild(this.D5);this.IS=new av(!0,!0,!0,!0,!0);
|
|
this.IS.a5F(!1);this.D5.appendChild(this.IS.m);this.ZG=new g1("Align with",[[8,7],[12,6]]);this.ZG.h(y.E.l,this.as9,this);
|
|
this.ih=new dI([12,23,2],41);this.D5.appendChild(this.ih.m);this.ih.f(4);this.Nd=new c0(!1);this.Nd.a0s(new eC(0,0));
|
|
this.yB=m.s1(this,this.body)}cJ.prototype=new aB;cJ.prototype.Ra=function(W,h){return W!=null};cJ.prototype.HV=function(){return!0};
|
|
cJ.prototype.BQ=function(W){return[hW.My,hW.AO,hW.Xd,hW._g].indexOf(W)!=-1};cJ.prototype.ok=function(W,h,S,k){this.ih.abz(k.zR())};
|
|
cJ.prototype.as9=function(){var W=[this.ih.m,this.Nd.m];this.D5.removeChild(W[this.E0]);this.E0=this.ZG.B();
|
|
this.D5.appendChild(W[this.E0])};cJ.prototype._=function(){aB.prototype._.call(this);this.IS._();this.ZG._();
|
|
this.ih._();this.Nd._();this.yB._()};cJ.prototype.CU=function(W){var h=this.IS.B(),S=h.x,k=h.y,p=new em(y.E.gg,!0);
|
|
p.data=a.JY.yV(S,k,this.ih.B());this.close();this.c(p)};cJ.prototype.Yo=function(W,h){this.IS.f(new eC(W.e,W.Z),W.H$);
|
|
this.IS.GG()};function d7(){aB.call(this,[11,4],"duplinto");this.$x=null;this.e$=null;this.NQ=null;var W=m.O("div","form");
|
|
W.setAttribute("style","max-width:26em");this.body.appendChild(W);this.LT=new fx([12,43],["abc","def"]);
|
|
this.LT.h(y.E.l,this.ZJ,this);W.appendChild(this.LT.m);m.YI(W);this.dG=new fx("Artboard",["abc","def"]);
|
|
this.dG.h(y.E.l,this.ZJ,this);W.appendChild(this.dG.m);m.YI(W);this.jL=new i3([12,48],null,14);W.appendChild(this.jL.m);
|
|
this.yB=m.s1(this,W)}d7.prototype=new aB;d7.prototype.HV=function(){return!0};d7.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();this.LT._();this.jL._()};d7.prototype.ZJ=function(W){if(W&&W.target==this.dG)return;var h=this.LT.B(),S=this.e$[h],k=this.$x,p=S!=null&&S.add.artd!=null;
|
|
for(var Q=0;Q<k.w.length;Q++)if(k.g[k.w[Q]].add.artb)p=!1;this.jL.G2(h==this.e$.length);this.dG.G2(p);
|
|
if(p){var I=S.root.children,q=[],P=this.NQ=[];for(var Q=0;Q<I.length;Q++){var t=I[Q].i;if(t.add.artb)q.push(t.getName());
|
|
P.push(I[Q].index)}this.dG.XZ(q);this.dG.f(0)}else this.NQ=null};d7.prototype.Yo=function(W,h,S){this.$x=W;
|
|
this.e$=S;this.jL.f(W.w.length==0?"Layer":W.g[W.w[0]].getName());var k=[];for(var Q=0;Q<S.length;Q++)k.push(S[Q].name);
|
|
k.push([11,7]);this.LT.XZ(k);this.LT.f(S.indexOf(W));this.ZJ(null)};d7.prototype.CU=function(W){var h=this.LT.B();
|
|
if(h==this.e$.length){var S=new jg(this.jL.B()+".psd"),k=this.$x.e,p=this.$x.Z,I=this.$x.By();if(I!=-1){var q=this.$x.g[I].rp();
|
|
k=q.e;p=q.Z}S.e=k;S.Z=p;S.buffer=N.U(S.e*S.Z*4);var P=S.yA();P.hq("Background");S.WV([P]);var t=new em(y.E.W,!0);
|
|
t._Q=!0;t.data={o:y.D.Hf,om:S};this.c(t)}var M=this.$x.Cf(null,this.$x!=this.e$[h]),t=new em(y.E.u,!0);
|
|
t.data={o:$.W$,g:M,P4:this.$x,zp:this.e$[h]};if(this.NQ)t.data.cf=this.NQ[this.dG.B()];t.b=a.m5;t._Q=!0;
|
|
this.c(t);this.close()};function dZ(){aB.call(this,[1,9],"eassets");this.Nm=null;this.h6=null;var W=m.O("div","form");
|
|
W.setAttribute("style","width:32em");this.body.appendChild(W);this.Em=m.O("span");W.appendChild(this.Em);
|
|
m.YI(W);this.U_=[new dB("Only layers / folders, whose name starts with \"-e-\""),new dB("Remove parts outside the canvas"),new dB("Trim transparent parts")];
|
|
for(var Q=0;Q<3;Q++){var h=this.U_[Q];h.f(!0);h.h(y.E.l,this.n3,this);W.appendChild(h.m);m.YI(W)}this._v=new ce([12,14,0],["1x","2x","3x","4x"]);
|
|
this._v.f([!0,!1,!1,!1]);W.appendChild(this._v.m);m.k6(W);this.Rm=["PNG","JPG","SVG"];this.Fr=new fx([12,50],this.Rm);
|
|
this.Fr.h(y.E.l,this.atx,this);W.appendChild(this.Fr.m);this.ne=new jo;W.appendChild(this.ne.m);this.yB=new aA([1,9],!0,null,!0);
|
|
this.yB.h("click",this.CU,this);W.appendChild(this.yB.m);this.h("closebtn",this.uh,this)}dZ.prototype=new aB;
|
|
dZ.prototype.atx=function(W){this.ne.apr(this.Rm[this.Fr.B()])};dZ.prototype.uh=function(W){this.h6=null};
|
|
dZ.prototype._=function(){aB.prototype._.call(this);this.Fr._();this._v._();this.yB._();this.ne._()};
|
|
dZ.prototype.Yo=function(W,h,S){this.h6=W;this.n3()};dZ.prototype.n3=function(W){var h=this.amE(),S="- - - "+h.length+" exportable layers";
|
|
this.Em.textContent=S;this.atx(null)};dZ.prototype.amE=function(){var W=this.U_[0].B(),h=[],S=this.h6;
|
|
for(var Q=0;Q<S.g.length;Q++){var k=S.g[Q],p=k.getName();if(!W&&!k.vc()&&!k.rect.ZP()||p.startsWith("-e"))h.push(Q)}return h};
|
|
dZ.prototype.IF=function(W,h){this.Nm=W};dZ.prototype.CU=function(W){var h=this.h6,S=[this.Rm[this.Fr.B()]],k=[this.ne.B()],p=this._v.B(),I={},q={},P=this.amE();
|
|
if(P.length==0){alert("No layers to export.");return}var t=[this.U_[1].B(),this.U_[2].B()];for(var Q=0;
|
|
Q<P.length;Q++){var M=P[Q],U=h.g[M],i=U.getName();if(q[i]!=null){q[i]++;i+=" "+q[i]}else q[i]=1;var z=U.jP();
|
|
U.NN(!0);for(var D=0;D<p.length;D++){if(!p[D])continue;var R=D+1,O=a.c0.ZT(h,S,R,this.Nm,M,k,t);for(var b=0;
|
|
b<S.length;b++){var w=S[b],A=i.slice(i.startsWith("-e-")?3:0)+(R==1?"":"-"+R+"x")+"."+w.toLowerCase();
|
|
if(O[b])I[A]=new Uint8Array(O[b])}}U.NN(z)}var g=UZIP.encode(I),E=new em(y.E.W,!0);E.data={o:y.D.tb,data:g,name:"assets.zip"};
|
|
this.c(E)};function ib(){aB.call(this,"Export Color Lookup Tables","exlut");this.Nm=null;this.h6=null;
|
|
var W=m.O("div","form");W.setAttribute("style","width:20em");this.body.appendChild(W);this.U_=[new fA("Grid Points",1,256),new g1([12,50],[".CUBE"])];
|
|
var h=[16,0];for(var Q=0;Q<this.U_.length;Q++){var S=this.U_[Q];S.f(h[Q]);S.parent=this;S.h(y.E.l,this.n3,this);
|
|
W.appendChild(S.m);m.YI(W)}this.yB=m.s1(this,W);this.h("closebtn",this.uh,this)}ib.prototype=new aB;
|
|
ib.prototype.Ra=function(W,h){if(Math.min(W.e,W.Z)<16){alert("The document must be at least 16 x 16 pixels.",3200);
|
|
return!1}if(W.g.length<2){alert("There must be a background layer and some adjustment layers.",3200);
|
|
return!1}return!0};ib.prototype.uh=function(W){this.h6=null};ib.prototype.IF=function(W,h){this.Nm=W};
|
|
ib.prototype.Yo=function(W,h,S){this.h6=W};ib.prototype.CU=function(){var W=this.h6,h=this.U_[0].B(),S=[],k=new gj(0,0,W.e,W.Z),p=N.U(h*h*4),I=p.slice(0),q=new gj(W.e-h>>>1,W.Z-h>>>1,h,h),P=W.g[0],t=P.buffer,M=P.rect;
|
|
P.rect=q;P.buffer=p;for(var U=0;U<h;U++){this.aja(h,U,p);P.G(q);W.G(q);var i=W.jc();N.zt(i,k,I,q);for(var z=0;
|
|
z<h;z++)for(var D=0;D<h;D++){var R=z*h+D<<2;S.push(I[R]/255,I[R+1]/255,I[R+2]/255)}}var O=hR.a1s(S,h,W.name);
|
|
jH.save(O,W.name.split(".")[0]+".CUBE");P.buffer=t;P.rect=M;P.G();W.G()};ib.prototype.aja=function(W,h,S){var k=255/(W-1),p=Math.round(h*k);
|
|
for(var I=0;I<W;I++)for(var q=0;q<W;q++){var P=I*W+q<<2;S[P]=Math.round(q*k);S[P+1]=Math.round(I*k);
|
|
S[P+2]=p;S[P+3]=255}};ib.prototype._=function(){aB.prototype._.call(this);for(var Q=0;Q<this.U_.length;
|
|
Q++)this.U_[Q]._();this.yB._()};function hc(){aB.call(this,[1,14],"finfo");this.Zs=null;this.lf=null;
|
|
this.Q7=null;this.D5=m.O("div","form scrollable label12");this.D5.setAttribute("style","width:35em; height:38em; margin-bottom:8px");
|
|
this.body.appendChild(this.D5);var W=m.O("div","form");this.body.appendChild(W);this.Qh=new fx(null,["Hello"]);
|
|
W.appendChild(this.Qh.m);this.aun=new aA("Add Parameter",!1,null,!0);W.appendChild(this.aun.m);this.aun.h("click",this.cY,this);
|
|
this.XR=new aA("=== S A V E ===",!1,null,!0);W.appendChild(this.XR.m);this.XR.h("click",this.yF,this);
|
|
this.arX=""}hc.prototype=new aB;hc.prototype.X0=function(W,h){return W<450||h<450?new eC(0,0):new eC(150,100)};
|
|
hc.prototype.cY=function(W){if(this.Q7.length==0)return;var h=this.Q7[this.Qh.B()],S=this.BH();S[h]=b_.az[h][0];
|
|
this.mP(S);this.lf[h].m.scrollIntoView();this.lf[h].GG()};hc.prototype.Ij=function(W){var h=this.BH();
|
|
delete h[W.currentTarget.a1$];this.mP(h)};hc.prototype.yF=function(W){var h=this.BH(),S=this.Zs,k=!0;
|
|
for(var p in S)if(JSON.stringify(S[p])!=JSON.stringify(h[p]))k=!1;for(var p in h)if(JSON.stringify(S[p])!=JSON.stringify(h[p]))k=!1;
|
|
if(k)return;var I=new em(y.E.u,!0);I.b=a.m5;I.data={o:$.yj,m$:h};this.c(I);this.Zs=h;this.mP(h)};hc.a1h=function(W){function h(p){var I=p.toLowerCase();
|
|
return p==I}var S=W.split(":").pop();for(var k=1;k<S.length-1;k++){if(S[k]==S[k].toUpperCase()&&(h(S[k+1])||h(S[k-1]))){S=S.slice(0,k)+" "+S.slice(k);
|
|
k++}}return S};hc.prototype.Yo=function(W,h){this.Zs=W.KC;this.mP(W.KC)};hc.prototype.mP=function(W){var h=this.D5,p=0;
|
|
m.hP(h);var S=this.lf={},k=["tiff","exif","exif:GPS"],I=this.Q7=[],q=[];for(var P in b_.az){var t=hc.a1h(P),M=0,U=15,i=null;
|
|
if(W[P]==null){if(b_.az[P].length!=1){I.push(P);q.push(t)}continue}for(var Q=0;Q<k.length;Q++)if(P.startsWith(k[Q]))M=Q;
|
|
if(M!=p){m.k6(h);p=M}if(P=="tiff:ImageDescription"||P=="dc:Keywords"){U=18.5;i=3}var z=new i3(t,null,U,i);
|
|
S[P]=z;var D=W[P];if(D instanceof Array)D=D[1]==0?"---":D[0]+"/"+D[1];var R=new aA("\u2716",null,dq.get([5,4]));
|
|
h.appendChild(R.m);R.h("click",this.Ij,this);R.a1$=P;z.f(D);h.appendChild(z.m);m.YI(h);if(P=="exif:GPSLongitude"&&W["exif:GPSLatitude"]){this.arX=hc.a0L(W["exif:GPSLatitude"])+","+hc.a0L(W["exif:GPSLongitude"]);
|
|
var O=new aA("Show on map",!1,null,!0);h.appendChild(O.m);m.YI(h);O.h("click",this.aeW,this)}}this.Qh.XZ(q);
|
|
this.Qh.f(0)};hc.prototype.BH=function(){var W=this.lf,h=b_.az,S={};for(var k in h){var p=h[k][0],I=typeof p;
|
|
if(p==null||W[k]==null)continue;var q=W[k].B(),P="The value of \""+hc.a1h(k)+"\" must ";if(I=="number"){q=parseFloat(q);
|
|
if(isNaN(q)){alert(P+"be a number.");q=p}}else if(p instanceof Array&&p.length==2){if(q.indexOf("/")==-1){alert(P+"be a fraction.");
|
|
q=p.slice(0)}else{q=q.split("/").map(parseFloat);if(isNaN(q[0])||isNaN(q[1])){q=p.slice(0)}}}S[k]=q}return S};
|
|
hc.a0L=function(W){var h=W.length,S=W.slice(0,h-1).split(",").map(parseFloat),k=W.slice(h-1),p=S[0]+S[1]/60+S[2]/3600;
|
|
if(k!="N"&&k!="E")p=-p;return p};hc.prototype.aeW=function(W){window.open("https://maps.google.com?q="+this.arX,"Map")};
|
|
function fQ(){aB.call(this,[11,5],"gradienteditor");this.Jp=null;this.Ho=null;this.Hy=null;this.fy=null;
|
|
this.lX=!1;this.yI=!1;this.gS=null;this.QI=null;this.An=-1;this.U$=-1;this.s8=0;this.b5=this.w5.bind(this);
|
|
this.nt=this.ci.bind(this);this.N=m.O("canvas");this.ds=this.N.getContext("2d");this.N.setAttribute("style","display:block");
|
|
this.Zo=null;m.NO(this.N);m.K$(this.N,this.Gw.bind(this));this.pU=m.O("div","form");this.aoa=m.O("div");
|
|
this.Kp=m.O("div","form");this.ah4=m.O("div");this._s=new fx([12,44],[[15,10,0],[24,6]]);this._s.h(y.E.l,this.lS,this);
|
|
this.body.appendChild(this._s.m);m.k6(this.body);var W=this.pU;this.vL=new fA([19,3,3],0,100,"%");this.vL.h(y.E.l,this.lS,this);
|
|
this.vL.parent=this;W.appendChild(this.vL.m);m.YI(W);this.Fd=new gs([12,0]);W.appendChild(this.Fd.m);
|
|
this.Xb=m.O("div","bordered padded noalign");W.appendChild(this.Xb);this.YH=new fA([12,0],0,100,"%");
|
|
this.YH.parent=this;this.YH.h(y.E.l,this.lS,this);this.Xb.appendChild(this.YH.m);this.qa=new fA([12,40],0,100,"%");
|
|
this.qa.parent=this;this.qa.h(y.E.l,this.lS,this);this.Xb.appendChild(this.qa.m);this.jB=new aA([5,4],!1,null,!0);
|
|
this.jB.h("click",this.aeE,this);this.Xb.appendChild(this.jB.m);W.appendChild(this.aoa);this.aaA=new gs([13,0]);
|
|
W.appendChild(this.aaA.m);this._j=m.O("div","bordered padded noalign");W.appendChild(this._j);this.k9=new fx([12,44],[[12,45],[12,46],[12,47]]);
|
|
this.k9.h(y.E.l,this.lS,this);this._j.appendChild(this.k9.m);this.eE=new ax(!0);this.eE.parent=this;
|
|
this.eE.h(y.E.l,this.lS,this);this._j.appendChild(this.eE.m);this.i5=new fA([12,40],0,100,"%");this.i5.parent=this;
|
|
this.i5.h(y.E.l,this.lS,this);this._j.appendChild(this.i5.m);this.RG=new aA([5,4],!1,null,!0);this.RG.h("click",this.a5Z,this);
|
|
this._j.appendChild(this.RG.m);var W=this.Kp;this.E4=new fA("Roughness",0,100,"%");this.E4.h(y.E.l,this.lS,this);
|
|
this.E4.parent=this;W.appendChild(this.E4.m);W.appendChild(this.ah4);this.jl=new aA([25,1,2],!1,null,!0);
|
|
this.jl.h("click",this.lS,this);W.appendChild(this.jl.m);this.yB=m.s1(this);this.h("closebtn",this.hL,this)}fQ.prototype=new aB;
|
|
fQ.prototype.hL=function(W){if(this.lX)this.fy(this.Jp)};fQ.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();this.vL._();this.Fd._();this.aaA._();this.jB._();this.RG._();this.YH._();this.qa._();this.k9._();
|
|
this.i5._();this.jl._()};fQ.prototype.IF=function(W,h){this.Hy=W};fQ.prototype.Yo=function(W,h){this.Ho=JSON.parse(JSON.stringify(h.X));
|
|
this.Jp=JSON.parse(JSON.stringify(h.X));this.gS=this.QI=null;this.fy=h.x9;this.lX=!1;this.yI=h.nB;this.R3();
|
|
this.rI()};fQ.prototype.CU=function(W){var h=this.Ho;this.fy(h);this.close()};fQ.prototype.BQ=function(W){return W==hW.UP||W==hW.uf};
|
|
fQ.prototype.ok=function(W,h,S,k){if(k.j(hW.UP)||k.j(hW.uf)){if(this.QI)this.aeE();if(this.gS)this.a5Z()}};
|
|
fQ.prototype.aeE=function(W){var h=this.Ho.Trns.v;if(this.QI==null||h.length==1)return;h.splice(h.indexOf(this.QI),1);
|
|
this.QI=null;this.R3();this.rI()};fQ.prototype.a5Z=function(W){var h=this.Ho.Clrs.v;if(this.gS==null||h.length==1)return;
|
|
h.splice(h.indexOf(this.gS),1);this.gS=null;this.R3();this.rI()};fQ.prototype.R3=function(){var W=this.N,h=this.ds,S=m.F();
|
|
W.width=Math.floor(410*S);W.height=Math.floor(70*S);m.cq(W,W.width,W.height);W.style.marginTop="8px";
|
|
this.Zo=new gj(0,0,Math.floor(380*S),Math.floor(32*S));this.Zo.x=Math.floor((W.width-this.Zo.e)/2);this.Zo.y=Math.floor((W.height-this.Zo.Z)/2);
|
|
var k=this.Zo,p=k.e,I=k.Z,q=k.x,P=k.y,t=new gj(0,0,p,I),M=h.getImageData(0,0,p,I),U=new Uint8Array(M.data.buffer);
|
|
N.LU(U,p,I,8);var i=N.U(p*I*4);N.X.S3(this.Ho,i,t,[1/p,0,0,1/I],p/2,I/2,!1,0,this.Hy.Ps,this.Hy.lL);
|
|
N.a.ha("norm",i,k,U,k,k,1);h.clearRect(0,0,W.width,W.height);h.putImageData(M,q,P);var z=this.Ho;if(z.Clrs){var D=z.Trns.v,R=z.Clrs.v,O=N.X.V8(R,this.Hy.Ps,this.Hy.lL),b=Math.round(6*m.F()),w=Math.round(14*m.F()),A=this.QI?this.QI.v:null,g=this.gS?this.gS.v:null;
|
|
for(var Q=0;Q<D.length;Q++){var E=D[Q].v,j=Math.round(255-255*E.Opct.v.val/100);if((E==A||D[Q-1]&&D[Q-1].v==A||Q==this.U$)&&Q!=0){h.fillStyle="#000000";
|
|
h.fillRect(q-3+p*(D[Q-1].v.Lctn.v+(E.Lctn.v-D[Q-1].v.Lctn.v)*E.Mdpn.v/100)/4096,P-6-2,6,6)}if(E==A){h.fillStyle="#ffffff";
|
|
h.fillRect(q-b+p*(E.Lctn.v/4096)-2,P-2-w-2,2*b+4,w+4)}h.fillStyle="rgb("+j+","+j+","+j+")";h.fillRect(q-b+p*(E.Lctn.v/4096),P-2-w,2*b,w)}for(var Q=0;
|
|
Q<R.length;Q++){var x=R[Q].v,d=O[Q];if((x==g||R[Q-1]&&R[Q-1].v==g||Q==this.An)&&Q!=0){h.fillStyle="#000000";
|
|
h.fillRect(q-3+p*(R[Q-1].v.Lctn.v+(x.Lctn.v-R[Q-1].v.Lctn.v)*x.Mdpn.v/100)/4096,P+I+2,6,6)}if(x==g){h.fillStyle="#ffffff";
|
|
h.fillRect(q-b+p*(x.Lctn.v/4096)-2,P+I+2-2,2*b+4,w+4)}h.fillStyle="rgb("+Math.round(d.p)+", "+Math.round(d.z)+","+Math.round(d.S)+")";
|
|
h.fillRect(q-b+p*(x.Lctn.v/4096),P+I+2,2*b,w)}}if(this.yI){this.fy(this.Ho);this.lX=!0}};fQ.prototype.rI=function(){var W=this.Ho,h=W.Clrs?0:1;
|
|
this._s.f(h);if(m.oq(this.pU))this.body.removeChild(this.pU);if(m.oq(this.Kp))this.body.removeChild(this.Kp);
|
|
(h==0?this.aoa:this.ah4).appendChild(this.N);if(h==0){this.body.appendChild(this.pU);this.vL.f(Math.round(100*W.Intr.v/4096));
|
|
var S=W.Trns.v,k=W.Clrs.v,p=this.QI!=null,I=this.U$!=-1;this.YH.G2(p);this.qa.G2(p||I);this.jB.G2(p);
|
|
if(p){this.Xb.setAttribute("style","");var q=this.QI.v;this.qa.f(Math.round(100*q.Lctn.v/4096));this.YH.f(q.Opct.v.val)}if(I)this.qa.f(S[this.U$].v.Mdpn.v);
|
|
var p=this.gS!=null,I=this.An!=-1;this.k9.G2(p);this.eE.G2(p);this.i5.G2(p||I);this.RG.G2(p);if(p){this._j.setAttribute("style","");
|
|
var P=this.gS.v;this.i5.f(Math.round(100*P.Lctn.v/4096));var t=P.Type.v.Clry;this.k9.f(["FrgC","BckC","UsrS"].indexOf(t));
|
|
if(t=="FrgC")this.eE.NC(this.Hy.Ps);if(t=="BckC")this.eE.NC(this.Hy.lL);if(t=="UsrS")this.eE.f(P.Clr.v)}if(I)this.i5.f(k[this.An].v.Mdpn.v)}else{this.body.appendChild(this.Kp);
|
|
this.E4.f(Math.round(100*W.Smth.v/4096))}this.body.appendChild(this.yB.m)};fQ.prototype.lS=function(W){var h=this.Ho,S=h.Clrs?0:1;
|
|
if(W.target==this._s){var k=S==0?JSON.parse(hz.Ma.aek).v:hw.QE("grdm").Grad.v;this.Ho=k;this.rI();this.R3();
|
|
return}if(S==0){h.Intr.v=Math.round(4096*this.vL.B()/100);var p=h.Trns.v,I=h.Clrs.v;if(this.QI!=null){var q=this.QI.v;
|
|
q.Lctn.v=Math.round(4096*(this.qa.B()/100));q.Opct.v.val=this.YH.B()}if(this.gS!=null){var P=this.gS.v;
|
|
P.Lctn.v=Math.round(4096*(this.i5.B()/100));if(W.target==this.eE)this.k9.f(2);var t=this.k9.B();P.Type.v.Clry=["FrgC","BckC","UsrS"][t];
|
|
if(t==2)P.Clr={t:"Objc",v:this.eE.B()};else if(P.Clr)delete P.Clr}if(this.U$!=-1)p[this.U$].v.Mdpn.v=this.qa.B();
|
|
if(this.An!=-1)I[this.An].v.Mdpn.v=this.i5.B()}else{h.Smth.v=Math.round(4096*this.E4.B()/100);if(W.target==this.jl)h.RndS.v=Math.floor(Math.random()*4294967295)}this.R3()};
|
|
fQ.prototype.Gw=function(W){var h=m.DJ(W,this.N),S=this.Zo,k=(h.x*m.F()-S.x)/S.e,p=(h.y*m.F()-S.y)/S.Z,I=this.Ho.Trns.v,q=this.Ho.Clrs.v,P=null,t=null,M=-1,U=-1;
|
|
if(p<1)for(var Q=0;Q<I.length;Q++){var i=I[Q].v;if(Math.abs(i.Lctn.v/4096-k)<.02)P=I[Q];if(Q>0)if(Math.abs((I[Q-1].v.Lctn.v+(i.Lctn.v-I[Q-1].v.Lctn.v)*i.Mdpn.v/100)/4096-k)<.01)M=Q}if(p>0)for(var Q=0;
|
|
Q<q.length;Q++){var z=q[Q].v;if(Math.abs(z.Lctn.v/4096-k)<.02)t=q[Q];if(Q>0)if(Math.abs((q[Q-1].v.Lctn.v+(z.Lctn.v-q[Q-1].v.Lctn.v)*z.Mdpn.v/100)/4096-k)<.01)U=Q}if(t==null&&P==null&&M==-1&&U==-1){if(p<0){var i={t:"Objc",v:{classID:"TrnS",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Lctn:{t:"long",v:0},Mdpn:{t:"long",v:50}}};
|
|
i.v.Lctn.v=Math.round(k*4096);I.push(i);I.sort(this._t);P=i}if(p>1){var q=this.Ho.Clrs.v,D=N.X.V8(q,this.Hy.Ps,this.Hy.lL),R=N.X.a1(this.Ho,D,k),z={t:"Objc",v:{classID:"Clrt",Clr:{t:"Objc",v:N.X.hg({p:R&255,z:R>>8&255,S:R>>16&255})},Type:{t:"enum",v:{Clry:"UsrS"}},Lctn:{t:"long",v:0},Mdpn:{t:"long",v:50}}};
|
|
z.v.Lctn.v=Math.round(k*4096);q.push(z);q.sort(this._t);t=z}}if(t!=null)U=-1;if(P!=null)M=-1;if(t!=null||P!=null||M>-1||U>-1){this.QI=P;
|
|
this.gS=t;this.U$=M;this.An=U;this.rI();this.R3();m.EB(window,this.b5);m.uE(window,this.nt)}};fQ.prototype.w5=function(W){var h=m.DJ(W,this.N),S=this.Zo,k=(h.x*m.F()-S.x)/S.e,p=(h.y*m.F()-S.y)/S.Z;
|
|
k=Math.max(0,Math.min(1,k));var I=this.Ho.Trns.v,q=this.Ho.Clrs.v;if(this.QI!=null){var P=this.QI.v;
|
|
P.Lctn.v=Math.round(4096*k);var t=I.indexOf(this.QI);if(t!=-1&&p<-1&&I.length>1)I.splice(t,1);if(t==-1&&p>-1)I.push(this.QI);
|
|
I.sort(this._t)}if(this.gS!=null){var M=this.gS.v;M.Lctn.v=Math.round(4096*k);var U=q.indexOf(this.gS);
|
|
if(U!=-1&&p>2&&q.length>1)q.splice(U,1);if(U==-1&&p<2)q.push(this.gS);q.sort(this._t)}if(this.U$>-1){var P=I[this.U$].v;
|
|
P.Mdpn.v=Math.max(5,Math.min(95,Math.round(100*(k*4096-I[this.U$-1].v.Lctn.v)/(P.Lctn.v-I[this.U$-1].v.Lctn.v))))}if(this.An>-1){var M=q[this.An].v;
|
|
M.Mdpn.v=Math.max(5,Math.min(95,Math.round(100*(k*4096-q[this.An-1].v.Lctn.v)/(M.Lctn.v-q[this.An-1].v.Lctn.v))))}if(this.QI!=null||this.gS!=null||this.U$>-1||this.An>-1){this.rI();
|
|
this.R3()}};fQ.prototype.ci=function(W){m.WF(window,this.b5);m.TF(window,this.nt);if(Date.now()-this.s8<300){if(this.An!=-1||this.U$!=-1){var h=(this.An!=-1?this.Ho.Clrs.v[this.An]:this.Ho.Trns.v[this.U$]).v;
|
|
h.Mdpn.v=50;this.rI();this.R3()}else if(this.gS!=null)this.eE.aqZ()}this.s8=Date.now()};fQ.prototype._t=function(W,h){return W.v.Lctn.v-h.v.Lctn.v};
|
|
function f1(){aB.call(this,[11,10],"isize");this.D5=m.O("div","form");this.D5.setAttribute("style","width:20em");
|
|
this.body.appendChild(this.D5);this.IS=new av(!0,!0,null,null,!0);this.D5.appendChild(this.IS.m);this.h9=new dB("Resample");
|
|
this.h9.f(!0);this.D5.appendChild(this.h9.m);this.h9.h(y.E.l,this.a29,this);this.Tq=new fx([12,14,1],[[12,14,2],[12,14,3],"Bicubic Sharper"]);
|
|
this.Tq.f(1);this.D5.appendChild(this.Tq.m);this.yB=m.s1(this,this.body)}f1.prototype=new aB;f1.prototype.Ra=function(W,h){return W!=null};
|
|
f1.prototype.HV=function(){return!0};f1.prototype.a29=function(W){var h=this.h9.B(),S=this.IS,k=this.Tq;
|
|
if(h)k.Ze();else k.lz();if(h)S.aaP();else S.ad4()};f1.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();this.Tq._();this.IS._()};f1.prototype.CU=function(W){this.close();var h=this.IS.B(),S=h.x,k=h.y,p=this.Tq.B();
|
|
if(!this.h9.B())p=null;var I=new em(y.E.gg,!0);I.data=a.JY.nK(S,k,this.IS.kk(),p);this.c(I)};f1.prototype.Yo=function(W,h){this.IS.f(new eC(W.e,W.Z),W.H$);
|
|
this.IS.GG()};function aR(){aB.call(this,"Import RAW","importraw");var W=m.O("div","flexrow"),h=m.O("div");
|
|
h.setAttribute("style","margin-bottom: 1em");this.body.appendChild(W);this.body.appendChild(h);var S=m.O("div","form");
|
|
S.setAttribute("style","width:18em");W.appendChild(S);var k=m.O("div","form");k.setAttribute("style","width:15em");
|
|
W.appendChild(k);this.Fw=null;this.aoY=null;this.jD=null;this.qG=null;this.arn=[];var p=[];for(var Q=0;
|
|
Q<aR.hO.length;Q++)p.push(aR.hO[Q]+" Bits");var I=this.eo=[new av(!0,null,null,!0),new fA([12,72],1,8),new dB("Last one is Transparency"),new g1([12,34],p),new g1("Byte Order",["12-34","34-12"]),new fx("Guesses",[])];
|
|
for(var Q=0;Q<I.length;Q++){var q=I[Q];q.parent=this;q.h(y.E.l,Q==5?this.aqt:this.ZJ,this);var P=Q==0?S:Q==5?h:k;
|
|
P.appendChild(q.m)}this.N=m.O("canvas");this.ds=this.N.getContext("2d");this.body.appendChild(this.N);
|
|
this.yB=m.s1(this,this.body)}aR.prototype=new aB;aR.prototype._=function(){aB.prototype._.call(this);
|
|
var W=this.eo;this.yB._();for(var Q=0;Q<W.length;Q++)W[Q]._()};aR.prototype.CU=function(W){this.close();
|
|
var h=this.eo[0].B(),S=hI.RO(this.aoY,[{data:this.jD,rc:new gj(0,0,h.x,h.y)}]);if(this.qG)S.BS=this.qG;
|
|
var k=new em(y.E.W,!0);k.data={o:!0?y.D.Hf:y.D.Zj,om:S};this.c(k)};aR.hO=[8,16];aR.prototype.Yo=function(W,h){this.Fw=new Uint8Array(h.KG);
|
|
this.aoY=h.Is;var S=this.Fw.length,k=[1,3,4],p=0,I=0,q=1,P=1,t=this.arn=[];for(var M=0;M<3;M++){for(var U=0;
|
|
U<2;U++){var i=aR.hO[U],z=k[M],D=z*i,R=Math.round(S*8/D);if(R!=S*8/D)continue;for(var O=0;O<=4e3;O++)for(var b=0;
|
|
b<=4e3;b++)if(O*b==R){var w=0;if(O==b)w+=64;if(Math.round(O/100)==O/100&&Math.round(b/100)==b/100)w+=32;
|
|
if(Math.round(O/10)==O/10&&Math.round(b/10)==b/10)w+=16;if(Math.round(O/2)==O/2&&Math.round(b/2)==b/2)w+=8;
|
|
t.push([O,b,z,i,w])}}}var A=function(x,d){if(d[4]!=x[4])return d[4]-x[4];var L=Math.max(x[0],x[1])/Math.min(x[0],x[1]),_=Math.max(d[0],d[1])/Math.min(d[0],d[1]);
|
|
if(L!=_)return L-_;return d[0]-x[0]};t.sort(A);var g=this.eo,E=[];for(var Q=0;Q<t.length;Q++){var j=t[Q];
|
|
E.push(j[0]+" x "+j[1]+", "+j[2]+"ch, "+j[3]+"-bit")}g[5].XZ(E);g[5].f(0);this.aqt(null)};aR.prototype.aqt=function(W){var h=this.eo,S=this.arn[this.eo[5].B()];
|
|
h[0].f(new eC(S[0],S[1]),72);h[1].f(S[2]);h[3].f(aR.hO.indexOf(S[3]));this.ZJ()};aR.prototype.ZJ=function(W){var h=this.eo,S=h[0].B(),k=S.x,p=S.y,I=aR.hO[h[3].B()],q=this.Fw;
|
|
if(I==16&&h[4].B()==1){q=q.slice(0);for(var Q=0;Q<q.length;Q+=2){var P=q[Q];q[Q]=q[Q+1];q[Q+1]=P}}var t=this.jD=this.uc(q,k,p,h[1].B(),I,h[2].B()),M=this.N,U=this.ds,i=[t,new gj(0,0,k,p)];
|
|
N.wa(i);for(var Q=0;Q<i.length;Q+=2)if(i[Q+1].Z<300){t=i[Q];k=i[Q+1].e;p=i[Q+1].Z;break}M.width=k;M.height=p;
|
|
m.cq(M,k,p);var z=new ImageData(new Uint8ClampedArray(t.buffer),k,p);U.putImageData(z,0,0)};aR.prototype.uc=function(W,h,S,k,p,I){this.qG=null;
|
|
var q=[],P=h*S;for(var t=0;t<k;t++){var M=N.U(P);q.push(M);if(p==8)for(var Q=0;Q<P;Q++)M[Q]=W[Q*k+t];
|
|
else if(p==16)for(var Q=0;Q<P;Q++)M[Q]=Math.round((W[(Q*k+t)*2]<<8|W[(Q*k+t)*2+1])*(255/65535))}var U=N.U(P*4);
|
|
new Uint32Array(U.buffer).fill(4278190080);if(I){N.ce(q.pop(),U,3);k--}if(k==0){}else if(k==1)N.yS(q[0],U);
|
|
else{N.ce(q[0],U,0);N.ce(q[1],U,1);if(k>2){N.ce(q[2],U,2);if(k>3){this.qG=[];for(var Q=3;Q<k;Q++){var i=new $.Kt;
|
|
i.name="Alpha "+(Q-2);i.rect=new gj(0,0,h,S);i.channel=q[Q];this.qG.push(i)}}}}return U};function im(W,h,S){eS.call(this);
|
|
this.m=m.O("div","");this.iR=W;this.jw=null;this.Bb=h==null?!1:h;this.qt=null;this.pe=S;this.wO=[];this.m_=[];
|
|
this.Xf=[];this.WH=[];this.xN=0;this.jw=this.akf(im.WH[W]);this.MZ();this.eA=null;this.a7J;this.a54}im.prototype=new eS;
|
|
im.prototype.Qb=function(W,h,S,k,p){this.eA=p;this.a7J=JSON.parse(JSON.stringify(this.qt));if(this.jw.lagl)this.a54=this.jw.lagl.B()[0]};
|
|
im.prototype.Go=function(W,h,S,k,p){var I=this.eA,q=this.iR,P=this.a7J;if(I==null)return;var t=(p.x-I.x)/W.t.J,M=(p.y-I.y)/W.t.J;
|
|
if(q=="GrFl"){var U=JSON.parse(JSON.stringify(P.Ofst.v));U.Hrzn.v.val+=t*.5;U.Vrtc.v.val+=M*.5;this.jw.Ofst.f(U,!0)}if(q=="patternFill"){var U=JSON.parse(JSON.stringify(P.phase.v));
|
|
U.Hrzn.v+=t;U.Vrtc.v+=M;this.jw.phase.f(U,!0)}if(q=="DrSh"||q=="IrSh"||q=="ChFX"){var i=P.Dstn.v.val,z=this.a54*Math.PI/180,D=-Math.cos(z)*i+t,R=Math.sin(z)*i+M;
|
|
this.jw.Dstn.f(Math.sqrt(D*D+R*R),!0);this.jw.lagl.f([Math.atan2(R,-D)*180/Math.PI],!0)}};im.prototype.he=function(W,h,S,k,p){this.eA=null};
|
|
im.prototype.aqF=function(){for(var Q=0;Q<this.WH.length;Q++){m.Eg(this.WH[Q],"selected");if(this.Xf[Q]instanceof dB)this.Xf[Q].f(!1)}};
|
|
im.prototype.a2t=function(W){var h=this.aoF.bind(this);for(var Q=0;Q<this.Xf.length;Q++){var S=m.O("div","listitem");
|
|
this.WH.push(S);if(Q>0)S.textContent="\u2003";S.appendChild(this.Xf[Q].m);if(hz.ey.indexOf(this.iR)!=-1){var k=new aA("+");
|
|
k.$V();k.m.style.float="right";S.appendChild(k.m);var p=new aA("\u2B0D");p.$V();p.m.style.float="right";
|
|
p.m.style["margin-right"]="2px";S.appendChild(p.m)}S.addEventListener("click",h,!1);W.appendChild(S)}};
|
|
im.I$=function(W,h){var S=h.getBoundingClientRect();return(W.clientY-S.top)/S.height};im.prototype.aoF=function(W){var h=W.target.tagName.toLowerCase();
|
|
if(h=="input"){return}if(h=="button"){var S=new em(y.E.u,!0),k=W.target.textContent=="+",p=k?0:im.I$(W,W.target)<.5?-1:1;
|
|
if(k)S.data={o:"st_dupsingle",i:this.parent.data.i,wJ:this.pe};else S.data={o:"st_movsingle",i:this.parent.data.i,wJ:this.pe,aaI:p};
|
|
S.b=a.gk;S._Q=!0;this.c(S);S=new em("redrawall",!0);S.data={aaI:p};this.c(S);return}m.xa(W);this.yv();
|
|
this.xN=this.WH.indexOf(W.currentTarget);this.c(new em("showme"))};im.prototype.yv=function(){if(this.jw.enab&&this.jw.enab.B()==!1)this.VB({TH:"enab",k:!0})};
|
|
im.prototype.atG=function(){var W=this.WH[this.xN];if(W)m.dT(W,"selected");return this.m_[this.xN]};
|
|
im.prototype.akf=function(W){var h={};for(var Q=0;Q<W.length;Q++){var S=W[Q],k=null;if(S=="----")k={m:m.O("hr")};
|
|
if(S=="\n")k={m:m.O("br")};if(S=="blOptions")k=new gs([14,10]);if(S=="brst")k=new ce([12,72],["R","G","B"]);
|
|
if(S=="knko")k=new fx("Knockout",[[13,1,0],"Shallow","Deep"]);if(S=="enab")k=new dB(hz.names[hz.order.indexOf(this.iR)]);
|
|
if(S=="lrMd"||S=="Md")k=new fx([12,19,0],hd.h3,!1,hd.Yu);if(S=="Opct")k=new gY([12,0],0,100,"%");if(S=="iOpa")k=new gY([12,26],0,100,"%");
|
|
if(S=="blIf")k=new eT;if(S=="ShdN")k=new gY([12,68],0,100,"%");if(S=="lagl"||S=="Angl")k=new b9([12,15],this.iR=="ebbl");
|
|
if(S=="uglg")k=new dB([12,27]);if(S=="Dstn")k=new gY([12,28],0,200,"px");if(S=="Ckmt")k=new gY([12,29],0,100,"%");
|
|
if(S=="blur")k=new gY([12,14,0],0,200,"px");if(S=="TrnS"||S=="MpgS")k=new i2([12,21]);if(S=="Nose")k=new gY([12,30],0,100,"%");
|
|
if(S=="layerConceals")k=new dB([12,31]);if(S=="AntA"||S=="antialiasGloss")k=new dB([12,25,1]);if(S=="GlwT")k=new fx([12,32],hz.SH.names);
|
|
if(S=="glwS")k=new fx([12,70],hz.SH.a0o);if(S=="Inpr")k=new gY([12,12],1,100,"%");if(S=="bvlS")k=new fx([12,22],hz.c2.style);
|
|
if(S=="bvlT")k=new fx([12,32],hz.c2.aqK);if(S=="bvlD")k=new fx(null,hz.c2.dir);if(S=="srgR")k=new gY([12,34],0,1e3,"%");
|
|
if(S=="Sftn")k=new gY([12,35],0,20,"px");if(S=="Lald")k=h.lagl;if(S=="hglM"||S=="sdwM")k=new fx([12,36],hd.h3,!1,hd.Yu);
|
|
if(S=="hglC"||S=="sdwC")k=new ax;if(S=="hglO"||S=="sdwO")k=new gY([12,0],0,100,"%");if(S=="Invr"||S=="InvT")k=new dB([4,11]);
|
|
if(S=="Sz")k=new gY([12,14,0],1,200,"px");if(S=="Styl")k=new fx([12,40],hz.stroke.names);if(S=="PntT")k=new fx([12,66],hz.stroke.ag4);
|
|
if(S=="Clr")k=new ax(!0);if(S=="Grad"){k=new h4(!0,[12,37],!0);k.f(JSON.parse(hz.Ma.Xo).v)}if(S=="Rvrs")k=new dB([12,23,0]);
|
|
if(S=="Dthr")k=new dB([12,23,3]);if(S=="Type")k=new fx([12,22],hz.X.names.slice(0,this.iR=="FrFX"?6:5));
|
|
if(S=="Ptrn")k=new dd([12,62]);if(S=="Scl")k=new gY([12,38],10,500,"%",0,!0);if(S=="Algn")k=new dB([12,39]);
|
|
if(S=="Ofst")k=new c0(!0);if(S=="phase")k=new c0(!1);if(S=="useShape")k=new dB([12,21]);if(S=="useTexture")k=new dB([12,67]);
|
|
if(S=="textureDepth")k=new gY([12,34],-300,300,"%");var p=S=="----"||S=="\n"?S+Q:S;if(k!=null)h[p]=k}return h};
|
|
im.prototype.a9A=function(W){var h=this.m_[this.xN];for(var Q=0;Q<W.length;Q++){var S=this.jw[W[Q]];
|
|
if(S&&h.contains(S.m))h.removeChild(S.m)}};im.prototype.a5x=function(W){var h=this.m_[this.xN];for(var Q=0;
|
|
Q<W.length;Q++){var S=this.jw[W[Q]];if(S&&!h.contains(S.m))h.appendChild(S.m)}};im.prototype.IF=function(W,h){if(this.jw==null)return;
|
|
var S=h==f6.W8;if(this.jw.Grad){this.jw.Grad.sS(W.Ps,W.lL);if(S||h==f6.Ov||h==f6.$h)this.jw.Grad.EX(W.e7)}if(this.jw.Ptrn){if(S||h==f6.OA)this.jw.Ptrn.EX(W.n5)}if(this.jw.TrnS){if(S||h==f6.sD)this.jw.TrnS.EX(W.G7)}if(this.jw.MpgS){if(S||h==f6.sD)this.jw.MpgS.EX(W.G7)}};
|
|
im.prototype._=function(){for(var Q=0;Q<this.wO.length;Q++)this.wO[Q]._();for(var W in this.jw)if(this.jw[W]instanceof eS)this.jw[W]._()};
|
|
im.prototype.MZ=function(){for(var W in this.jw){var h=this.jw[W];h.parent=this;if(h instanceof eS)h.h(y.E.l,this.afK,this);
|
|
if(this.m_.length==0||W=="useShape"||W=="useTexture"){var S=new gs(h.aeM()),k=m.O("div","bordered padded");
|
|
if(this.Bb==!1){k.appendChild(S.m);k.appendChild(m.O("hr",""))}this.wO.push(S);this.m_.push(k);this.Xf.push(h)}else this.m_[this.m_.length-1].appendChild(h.m)}};
|
|
im.prototype.update=function(W,h){if(this.jw==null)return;this.qt=JSON.parse(JSON.stringify(h));for(var S in h){if("Opct iOpa hglO sdwO Dstn Ckmt blur Nose Scl Sz Inpr srgR Sftn textureDepth ShdN".split(" ").indexOf(S)!=-1)this.jw[S].f(h[S].v.val);
|
|
if("enab brst knko Clr hglC sdwC uglg Grad TrnS MpgS Rvrs Dthr Algn Invr InvT Ptrn layerConceals useShape useTexture Ofst phase blIf".split(" ").indexOf(S)!=-1){this.jw[S].f(h[S].v,W)}if(["Md","hglM","sdwM"].indexOf(S)!=-1)this.jw[S].f(hd.iR.indexOf(h[S].v.BlnM));
|
|
if(S=="lrMd"){var k=(h.vc?[[15,10,27]]:[]).concat(hd.h3),p=(h.vc?[1]:[]).concat(hd.Yu);this.jw[S].XZ(k,p);
|
|
this.jw[S].f(h[S].v)}if(S=="Angl")this.jw[S].f([h[S].v.val]);if(S=="lagl"){var I=h.uglg&&h.uglg.v?W.NZ():h.lagl.v.val;
|
|
this.jw[S].f([I])}if(S=="Lald"){var I=h.uglg&&h.uglg.v?W.yp():h.Lald.v.val;this.jw[S].f([null,I])}if(S=="Type")this.jw[S].f(hz.X.types.indexOf(h.Type.v.GrdT));
|
|
if(S=="Styl")this.jw[S].f(hz.stroke.types.indexOf(h.Styl.v.FStl));if(S=="PntT"){var q=hz.stroke._7.indexOf(h.PntT.v.FrFl);
|
|
this.jw[S].f(q);if(!this.Bb){this.a9A(hz.RN.concat(hz.Y1.concat(hz.pd)));this.a5x([hz.RN,hz.Y1,hz.pd][q])}}if(S=="GlwT")this.jw[S].f(hz.SH.types.indexOf(h.GlwT.v.BETE));
|
|
if(S=="glwS")this.jw[S].f(hz.SH.apn.indexOf(h.glwS.v.IGSr));if(S=="bvlS")this.jw[S].f(hz.c2.types.indexOf(h.bvlS.v.BESl));
|
|
if(S=="bvlT")this.jw[S].f(hz.c2.agM.indexOf(h.bvlT.v.bvlT));if(S=="bvlD")this.jw[S].f(["In","Out"].indexOf(h.bvlD.v.BESs))}};
|
|
im.prototype.afK=function(W){for(var h in this.jw){if(this.jw[h]!=W.target)continue;var S=null,k=!1;
|
|
if("Opct iOpa hglO Nose Scl sdwO Inpr srgR textureDepth ShdN".split(" ").indexOf(h)!=-1)S={type:"#Prc",val:W.target.B()};
|
|
if(["Dstn","Ckmt","blur","Sz","Sftn"].indexOf(h)!=-1)S={type:"#Pxl",val:W.target.B()};if(["Angl","lagl"].indexOf(h)!=-1)S={type:"#Ang",val:W.target.B()[0]};
|
|
if("enab brst knko Clr hglC sdwC Grad TrnS MpgS Rvrs Dthr Algn Invr InvT Ptrn layerConceals lrMd useShape useTexture AntA antialiasGloss Ofst phase blIf".split(" ").indexOf(h)!=-1)S=W.target.B();
|
|
if(["Md","hglM","sdwM"].indexOf(h)!=-1)S={BlnM:hd.iR[W.target.B()]};if(h=="uglg"){S=W.target.B();k=!0}if(h=="PntT"){S={FrFl:hz.stroke._7[W.target.B()]};
|
|
k=!0}if(h=="Lald")S={type:"#Ang",val:W.target.B()[1]};if(h=="Type")S={GrdT:hz.X.types[W.target.B()]};
|
|
if(h=="Styl")S={FStl:hz.stroke.types[W.target.B()]};if(h=="GlwT")S={BETE:hz.SH.types[W.target.B()]};
|
|
if(h=="glwS")S={IGSr:hz.SH.apn[W.target.B()]};if(h=="bvlS")S={BESl:hz.c2.types[W.target.B()]};if(h=="bvlT")S={bvlT:hz.c2.agM[W.target.B()]};
|
|
if(h=="bvlD")S={BESs:["In","Out"][W.target.B()]};this.VB({TH:h,k:S});if(k){if(this.Bb)this.update(null,this.qt);
|
|
else{var p=this.parent,I=p.om,q=this.pe,P=I.g[p.data.i].add.lmfx[hz.BN[q[0]]].v[q[1]].v;this.update(I,P)}}}};
|
|
im.prototype.VB=function(W){if(this.qt&&this.qt[W.TH])this.qt[W.TH].v=W.k;if(this.Bb){this.c(new em(y.E.l))}else{W.o="changeprop";
|
|
W.i=this.parent.data.i;W.Kr=this.pe;var h=new em(y.E.u,!0);h.data=W;h.b=a.gk;h._Q=!0;this.c(h);this.c(new em("afterchange",!0))}};
|
|
im.prototype.B=function(){return JSON.parse(JSON.stringify(this.qt))};im.WH={bops:"blOptions lrMd Opct ---- iOpa brst ---- blIf".split(" "),DrSh:"enab Md Clr Opct lagl uglg Dstn Ckmt blur TrnS Nose layerConceals".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(hz.RN),GrFl:["enab","Md","Opct"].concat(hz.Y1),patternFill:["enab","Md","Opct"].concat(hz.pd),ChFX:"enab Md Clr Opct lagl Dstn blur MpgS Invr".split(" "),FrFX:["enab","Sz","Styl","\n","Md","Opct","PntT","\n"].concat(hz.RN.concat(hz.Y1.concat(hz.pd)))};
|
|
function g2(){aB.call(this,[11,6],"layerstyle");this.a8X=-1;this.data={};this.om=null;this.Nm=null;this.FC=[];
|
|
this.JX=[];m.dT(this.body,"flexrow");this.jV=m.O("div","bordered");this.jV.setAttribute("style","min-width:13em;");
|
|
this.body.appendChild(this.jV);this.Mf=m.O("div","");this.Mf.setAttribute("style","width:25em; padding-left: 1em;");
|
|
this.body.appendChild(this.Mf);this.ix=m.O("div","form");this.ix.setAttribute("style","padding-left: 1em; width:7em;");
|
|
this.body.appendChild(this.ix);this.yB=m.s1(this,this.ix);this.ax=new aA([12,87],!0,null,!0);this.ax.h("click",this.aj6,this);
|
|
this.ix.appendChild(this.ax.m);this.Aj=new dD;this.Aj.parent=this;this.Aj.h(y.E.l,this.aac,this);this.ix.appendChild(this.Aj.m);
|
|
this.h("closebtn",this.hL,this);this.h("redrawall",this.acv,this)}g2.prototype=new aB;g2.prototype.HV=function(){return!0};
|
|
g2.prototype.eh=function(){return!0};g2.prototype.Qb=function(W,h,S,k,p){var I=this.PK();if(I)I.Qb(W,h,S,k,p)};
|
|
g2.prototype.Go=function(W,h,S,k,p){var I=this.PK();if(I)I.Go(W,h,S,k,p)};g2.prototype.he=function(W,h,S,k,p){var I=this.PK();
|
|
if(I)I.he(W,h,S,k,p)};g2.prototype.PK=function(W){if(W==null)W=this.data.index;return W==null?null:W==0?this.FC[0]:this.JX[W[0]][W[1]]};
|
|
g2.prototype.aac=function(W){var h=this.Aj.B();this.VB({o:"setstl",k:h.dS});this.acv(null)};g2.prototype.aj6=function(W){var h=this.om,S=this.data.i;
|
|
if(S==null)S=h.w[0];var k=this.om.g[S],p=jO.auu(k),I=new em(y.E.W,!0);I.data={o:y.D.XO,qb:"add",nP:f6.xQ,GC:[JSON.parse(JSON.stringify(p))]};
|
|
this.c(I)};g2.prototype.a5e=function(W){this.data.index=W.currentTarget.pe;this.lJ(W.currentTarget.pe)};
|
|
g2.prototype.acv=function(W){this.Yo(this.om,this.data)};g2.prototype.lJ=function(W,h){m.hP(this.Mf);
|
|
for(var Q=0;Q<this.FC.length;Q++)this.FC[Q].aqF();var S=this.PK(W);this.Mf.appendChild(S.atG());if(h)S.yv();
|
|
var k=this.om;if(k){var p=k.g[this.data.i];this.FC[0].update(k,a.Tl.GL(k,p));var I=p.add.lmfx;if(I==null)return;
|
|
for(var Q=0;Q<hz.order.length;Q++){var q=I[hz.BN[Q]].v;for(var P=0;P<q.length;P++)this.JX[Q][P].update(k,q[P].v)}}if(h)S.yv()};
|
|
g2.prototype._=function(){aB.prototype._.call(this);this.ax._();this.Aj._();this.yB._();for(var Q=0;
|
|
Q<this.FC.length;Q++)this.FC[Q]._()};g2.prototype.Yo=function(W,h){var S=h.i==null;this.data.i=h.i;this.data.index=h.index;
|
|
h=this.data;this.om=W;if(S)h.i=W.w.length==0?W.g.length-1:W.w[0];m.hP(this.jV);var k=W.g[h.i].add.lmfx;
|
|
this.sE();this.FC=[new im("bops",!1,0)];this.JX=[];for(var Q=0;Q<hz.order.length;Q++){this.JX.push([]);
|
|
var p=k==null?[]:k[hz.BN[Q]].v;for(var I=0;I<p.length;I++){var q=new im(hz.order[Q],!1,[Q,I]);this.FC.push(q);
|
|
this.JX[Q].push(q)}if(p.length==0){var q=new im(hz.order[Q],!1,[Q,0]);this.FC.push(q);this.JX[Q].push(q)}}this._();
|
|
this.aiV(this.Nm,f6.W8);for(var Q=0;Q<this.FC.length;Q++){this.FC[Q].parent=this;this.FC[Q].a2t(this.jV);
|
|
this.FC[Q].h("showme",this.a5e,this)}if(h.index==null||h.index==0||!S&&k[hz.BN[h.index[0]]].v.length==0){this.lJ(0)}else this.lJ(h.index,S);
|
|
this.h("afterchange",this.sE,this)};g2.prototype.sE=function(W){var h=this.om,S=this.data.i;if(S==null)S=h.w[0];
|
|
var k=this.om.g[S],p=jO.auu(k);this.Aj.f(p,h.add.Patt?h.add.Patt:[],h.NZ(),h.yp())};g2.prototype.IF=function(W,h){this.Nm=W;
|
|
this.aiV(W,h);if(h==f6.xQ||h==f6.W8){this.Aj.EX([W.J5,W.n5])}if(h==f6.JF){}};g2.prototype.aiV=function(W,h){for(var Q=0;
|
|
Q<this.FC.length;Q++)this.FC[Q].IF(W,h)};g2.prototype.hL=function(W){this.VB({o:"cancel"})};g2.prototype.CU=function(W){this.VB({o:"confirm"});
|
|
this.close()};g2.prototype.VB=function(W){W.i=this.data.i;var h=new em(y.E.u,!0);h.data=W;h.b=a.gk;h._Q=!0;
|
|
this.c(h);this.sE()};g2.Jx=function(W){var h=[{name:[14,10],PO:!0}];for(var Q=0;Q<hz.names.length;Q++)h.push({name:hz.names[Q]});
|
|
if(W){h[h.length-1].PO=!0;h.push({name:"Scale Effects",P:function(S){return{P:S!=null&&S.w.length!=0&&S.g[S.w[0]].a9()}}});
|
|
h.push({name:["VAR0 VAR1",[12,49],[9,1]],P:function(S){return{P:S!=null&&S.w.length!=0&&S.g[S.w[0]].add.lmfx!=null}}})}return h};
|
|
g2.XL=function(W){var h=[{Y:y.E.W,R:{o:y.D.mJ,DG:"layerstyle"}}];for(var Q=0;Q<hz.names.length;Q++)h.push({Y:y.E.W,R:{o:y.D.mJ,DG:"layerstyle",index:[Q,0]}});
|
|
if(W){h.push({Y:y.E.W,R:{o:y.D.mJ,DG:"scaleeffects",U0:100,OI:{Y:y.E.u,b:a.gk,R:{o:"scaleeffects"}}}});
|
|
var S={classID:"Mk",null:fP.gj("Lyr"),Usng:{t:"obj ",v:[{t:"prop",v:{classID:"Prpr",keyID:"Lefx"}},{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Trgt"}}]}};
|
|
h.push({Y:y.E.gg,R:{HP:"make",b4:S}})}return h};g2.a5b=function(W){var h=[];if(W)h.push({name:[6,48,0,0],N7:!0},{name:[6,48,0,1],N7:!0},{name:[6,48,0,2],N7:!0,PO:!0});
|
|
for(var S in bS.names)h.push({name:bS.names[S],PO:bS.Zm.indexOf(S)!=-1,N7:s[S]!=null});return h};g2.Yy=function(W){var h=[];
|
|
if(W){h.push({Y:y.E.u,b:a.kQ,R:{o:"newfill",ez:0}});for(var Q=1;Q<3;Q++)h.push({Y:y.E.gg,R:a.JR.XU(Q)})}for(var S in bS.names){var k=hw.QE(S);
|
|
if(k==null)k={};for(var p in bS.Sd)if(bS.Sd[p]==S)k.classID=p;var I={HP:"make",b4:{classID:"Mk",null:fP.gj("AdjL"),Usng:{t:"Objc",v:{classID:"AdjL",Type:{t:"Objc",v:k}}}}};
|
|
h.push({Y:y.E.gg,R:I})}return h};function ek(){aB.call(this,"Merge Channels","mergechannels");this.TU=null;
|
|
var W=m.O("div","form");this.body.appendChild(W);this.eo=[];for(var Q=0;Q<3;Q++){var h=new fx(bS.c$[Q],[]);
|
|
this.eo.push(h);W.appendChild(h.m);m.YI(W)}this.yB=m.s1(this,W)}ek.prototype=new aB;ek.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();for(var Q=0;Q<3;Q++)this.eo[Q]._()};ek.prototype.Yo=function(W,h,S,k){this.TU=S;var p=[];
|
|
for(var Q=0;Q<S.length;Q++)p.push(S[Q].name);for(var Q=0;Q<3;Q++){var I=this.eo[Q];I.XZ(p);I.f(Math.min(Q,S.length-1))}};
|
|
ek.prototype.CU=function(W){var h=this.TU,S=h[0],k=new em(y.E.gg,!0);k.data=jg.vU(S.e,S.Z,S.H$,"Merged Document","Wht",!1);
|
|
this.c(k);var p=[];for(var Q=0;Q<3;Q++)p.push(h[this.eo[Q].B()].jc());var S=h[h.length-1],I=S.g[0],q=I.buffer;
|
|
for(var Q=0;Q<q.length;Q+=4){q[Q]=p[0][Q];q[Q+1]=p[1][Q];q[Q+2]=p[2][Q]}I.G();S.G();this.close()};function fg(){aB.call(this,[1,10],"script");
|
|
var W=m.O("div","form");W.setAttribute("style","width:44em");this.body.appendChild(W);this.Nm=null;this.LP=[];
|
|
this.Y7=[];this.adv;var h=this.XR=new aA([1,2],!1,null,!0);h.h("click",this.yF,this);W.appendChild(h.m);
|
|
var S=new aA("JS Reference",!1,null,!0);S.h("click",this.aoK,this);W.appendChild(S.m);W.appendChild(new gs("Demos:").m);
|
|
this.a7z=[];var k=fg.yH;for(var Q=0;Q<k.length;Q++){var p=new aA(k[Q].Vp,!1,null,!0);this.a7z.push(p);
|
|
W.appendChild(p.m);p.h("click",this.ajz,this)}this.Ep=m.O("textarea");m.j7(this.Ep);this.Ep.setAttribute("rows",16);
|
|
this.Ep.setAttribute("style","display:block;tab-size:4; font-family:monospace;width:100%;");W.appendChild(this.Ep);
|
|
var I=new aA("Run",!0,null,!0);I.h("click",this.CU,this);W.appendChild(I.m);this.aih=m.O("div");W.appendChild(this.aih)}fg.prototype=new aB;
|
|
fg.prototype._=function(){this.XR._()};fg.prototype.yF=function(){var W=this.adv;if(W==null)W="script.jsx";
|
|
var h=new em(y.E.W,!0);h.data={o:y.D.mJ,DG:"namewindow",U0:W.slice(0,W.length-4),oZ:this.ab_.bind(this)};
|
|
this.c(h)};fg.prototype.ab_=function(W){var h=this.Ep.value,S=G.cw(h),k=new em(y.E.W,!0);k.data={o:y.D.MY,KG:S.buffer,ft:W+".jsx",an5:!0};
|
|
this.c(k)};fg.prototype.agE=function(W){var Q=this.LP.indexOf(W.target),h=this.adv=this.Y7[Q],S=this.Nm.tX.o6[h],k=new Uint8Array(S),p=G.Md(k,0,k.length);
|
|
this.Ep.value=p};fg.prototype.Yo=function(W,h,S){this.Ep.value=fg.yH[0].UE;this.aqy()};fg.prototype.aqy=function(){var W=this.Nm.tX,h=this.aih;
|
|
m.hP(h);this.LP=[];this.Y7=[];h.textContent="Saved scripts: ";for(var S in W.o6){if(S.endsWith(".jsx")){var k=new aA(S,!1,null,!0);
|
|
this.LP.push(k);this.Y7.push(S);k.h("click",this.agE,this);h.appendChild(k.m)}}};fg.prototype.IF=function(W,h){this.Nm=W;
|
|
if(h==f6.DR)this.aqy()};fg.prototype.aoK=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.k3,link:"https://www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-javascript-ref-2019.pdf"};
|
|
this.c(h)};fg.prototype.CU=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.kI,ff:this.Ep.value};this.c(h)};
|
|
fg.prototype.ajz=function(W){var h=this.a7z.indexOf(W.currentTarget);this.Ep.value=fg.yH[h].UE};fg.yH=[{Vp:"Hello",UE:"\nalert(\"Hello Photopea!\");\n"},{Vp:"Process Layers",UE:"\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}"},{Vp:"Clone Layers",UE:"\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 ct(){aB.call(this,[11,7],"newproject");this.data=null;this.TU=null;var W=m.O("div","flexrow");
|
|
this.xz=W;this.body.appendChild(W);var h=m.O("div","form");this.D5=h;W.appendChild(h);this.jL=new i3([12,48],null,10);
|
|
h.appendChild(this.jL.m);m.YI(h);this.IS=new av(!0,null,null,null,!0);this.IS.f(new eC(1280,720),72);
|
|
this.IS.h(y.E.l,this.f8,this);h.appendChild(this.IS.m);this.Sb=new hA;this.Sb.parent=this;h.appendChild(this.Sb.m);
|
|
this.W6=new dB("Artboards");h.appendChild(this.W6.m);this.yB=new aA([12,49],!0,null,!0);this.yB.h("click",this.CU,this);
|
|
h.appendChild(this.yB.m);var S=ct.Fw,k=[];for(var Q=0;Q<S.length;Q++)k.push(S[Q].name);this.gF=new g1(null,k);
|
|
this.gF.h(y.E.l,this.aiv,this);h.appendChild(this.gF.m);this.gF.m.style["margin-top"]="1em";this.at=new e1(!0);
|
|
this.at.h(y.E.l,this.a01,this);h.appendChild(this.at.m);this.aiv();this.Rg=new dK;this.Rg.parent=this;
|
|
this.Rg.m.setAttribute("style","margin-left:1em");this.Rg.h("tempready",this.ah$,this)}ct.prototype=new aB;
|
|
ct.prototype.IF=function(W,h){this.Rg.IF(W)};ct.prototype.X0=function(W,h){return new eC(Math.max(0,Math.min(70,(W-690)/2)),W>h?Math.max(0,Math.min(50,(h-400)/2)):0)};
|
|
ct.prototype.UW=function(W,h){this.D5.setAttribute("style","width:"+Math.min(W-24,338)+"px");this.at.m.style.height=h-248+"px";
|
|
var S=this.Rg.m,k=S.parentNode;if(W<500){if(k!=null)this.xz.removeChild(S)}else{if(k==null)this.xz.appendChild(S);
|
|
this.Rg.UW(W-378,h-28)}};ct.prototype.f8=function(){this.Rg.f(this.IS.B())};ct.prototype.a01=function(W){var h=this.at.B()[0],S=ct.Fw[this.gF.B()].Ym[h],k=S[4];
|
|
if(k==0)k=72;var p=S[1],I=S[2],q=["px","%","mm","in"].indexOf(S[3]),P=[1,1,25.4/k,1/k][q];p/=P;I/=P;
|
|
this.IS.f(new eC(Math.round(p),Math.round(I)),k);this.IS.ahu(q);this.f8()};ct.prototype.aiv=function(W){var h=ct.Fw[this.gF.B()].Ym,S=[],k=[],p=Math.round(106*m.F()),I=Math.round(106*m.F()),q=0;
|
|
for(var Q=0;Q<h.length;Q++)q=Math.max(q,h[Q][1],h[Q][2]);for(var Q=0;Q<h.length;Q++){var P=h[Q],t=P[1]+" x "+P[2]+" "+P[3];
|
|
if(P[3]=="in")t=(P[1]*25.4).toFixed(0)+" x "+(P[2]*25.4).toFixed(0)+" mm";if(P[3]=="mm")t=(P[1]/25.4).toFixed(1)+" x "+(P[2]/25.4).toFixed(1)+" in";
|
|
if(P[4])t=t+" @ "+P[4]+" ppi";k.push(t);S.push(ct.qP(P,p,I,q))}this.at.V5(S,k,p,I)};ct.qP=function(W,h,S,k){var p=m.O("canvas",""),I=p.getContext("2d");
|
|
p.width=h;p.height=S;var q=Math.round(h/8),P=Math.floor(11*m.F()),t=W[1],M=W[2];I.fillStyle="#000000";
|
|
I.font=Math.round(P*.9)+"px \"Open Sans\", Sans-Serif";var U=t+" x "+M+" "+W[3],i=I.measureText(U);I.fillText(U,Math.round((h-i.width)/2),S-Math.round(q/2));
|
|
if(W[0]!=null){I.font="bold "+P+"px \"Open Sans\", Sans-Serif";var U=W[0],i=I.measureText(U);I.fillText(U,Math.round((h-i.width)/2),S-Math.round(q/2)-Math.round(P*1.3))}S-=Math.round(2.5*P);
|
|
var z=Math.min((h-q)/t,(S-q)/M);z*=.5+.5*(Math.max(t,M)/k);var D=(h-t*z)/2,R=(S-M*z)/2;I.strokeRect(Math.round(D)+.5,Math.round(R)+.5,Math.round(t*z),Math.round(M*z));
|
|
return p.toDataURL()};ct.prototype._=function(){aB.prototype._.call(this);this.IS._();this.jL._();this.Sb._();
|
|
this.yB._();this.jL.f(dq.get([11,7]));this.gF._();this.W6._();this.Rg._()};ct.prototype.CU=function(W){var h=this.IS.B(),S=h.x,k=h.y;
|
|
this.close();var p=this.Sb.B(),I=new em(y.E.gg,!0);I.data=jg.vU(S,k,this.IS.kk(),this.jL.B(),["Wht","Blck","Trns","Clr"][p[0]],this.W6.B(),p[1]);
|
|
this.c(I);this.agq()};ct.prototype.ah$=function(W){var h=W.data.om;h.H$=this.IS.kk();var S=new em(y.E.W,!0);
|
|
S.data={o:y.D.Hf,om:h};this.c(S);this.close();this.agq()};ct.prototype.agq=function(){var W=this.TU[this.TU.length-1],h=this.data.amN;
|
|
if(h)a5.jG(function(){var S=new XMLHttpRequest,k="https://www.googleapis.com/drive/v3/files?"+a5.Ay();
|
|
S.open("POST",k,!0);S.setRequestHeader("Content-Type","application/json");S.addEventListener("load",function(p){var I=JSON.parse(p.target.response);
|
|
W.SF={file:I,r_:"psd"};alert(W.name+" created in Google Drive")});S.send(JSON.stringify({name:W.name,apv:[h]}))})};
|
|
ct.prototype.Yo=function(W,h,S,k){this.TU=S;if(W!=null&&W.q!=null){var p=new gj(0,0,W.e,W.Z).r$(W.q.rect);
|
|
this.IS.f(new eC(p.e,p.Z))}this.data=h;this.f8();if(m.de())jH.afr(this.akT.bind(this))};ct.prototype.akT=function(W){if(W=="granted")jH.TZ(this,this.aqa.bind(this))};
|
|
ct.prototype.aqa=function(W,h){this.IS.f(new eC(h.e,h.Z))};ct.Fw=[{name:"Social",Ym:[["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 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],Ym:[["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],Ym:[["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],Ym:[["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],Ym:[["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],Ym:[["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\u1D3A",Ym:[[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 dr(W,h,S){aB.call(this,h,"sel_"+W);this.o=W;var k=m.O("div","form");this.body.appendChild(k);
|
|
this.jL=new fA(h,0,255,null,0,!1,!0);k.appendChild(this.jL.m);this.jL.f(1);var p=m.O("span");p.textContent=S;
|
|
k.appendChild(p);m.YI(k);this.ahY=new dB("Apply at canvas bounds");if(W!="border")k.appendChild(this.ahY.m);
|
|
this.yB=m.s1(this,k)}dr.prototype=new aB;dr.prototype.Ra=function(W,h){if(W==null)return;if(W.q==null)alert("No selection!");
|
|
return W.q!=null};dr.prototype.CU=function(W){var h=new em(y.E.gg,!0);h.data=a.I6.as6(this.o,this.jL.B(),this.ahY.B());
|
|
h._Q=!0;this.c(h);this.close()};dr.prototype._=function(){aB.prototype._.call(this);this.yB._();if(this.jL)this.jL._()};
|
|
dr.prototype.Yo=function(W,h){};function cl(W,h,S,k,p,I){aB.call(this,S,h);this.a4D=I;this.yI=p;this.Fw=null;
|
|
this.D5=m.O("div","form");this.body.appendChild(this.D5);this.jL=W==0?new i3(S,null,10):new gY(S,0,500,k,1);
|
|
this.jL.h(y.E.l,this.G0,this);this.D5.appendChild(this.jL.m);this.yB=m.s1(this,this.D5);this.h("closebtn",this.hL,this)}cl.prototype=new aB;
|
|
cl.prototype.HV=function(){return this.a4D};cl.prototype.G0=function(W){var h=this.jL.B();if(this.yI)this.Nw(h)};
|
|
cl.prototype.hL=function(W){if(this.yI)this.Nw("cancel")};cl.prototype.CU=function(W){if(this.yI)this.Nw("confirm");
|
|
else this.Nw(this.jL.B());this.close()};cl.prototype.Nw=function(W){if(this.Fw.oZ)this.Fw.oZ(W);else if(this.Fw.OI){var h=this.Fw.OI,S=new em(h.Y,!0);
|
|
S.b=h.b;S.data=h.R;S.data.k=W;S._Q=!0;this.c(S)}};cl.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();if(this.jL)this.jL._()};cl.prototype.Yo=function(W,h){this.Fw=h;this.jL.f(h.U0);this.jL.GG();
|
|
this.G0(null)};function aW(){aB.call(this,[1,5],"open_from_url");this.KX=null;var W=m.O("div","form");
|
|
this.body.appendChild(W);this.gf=new i3("URL",null,22);W.appendChild(this.gf.m);m.YI(W);this.au=new g1([21,0],[[21,2],[21,1]]);
|
|
W.appendChild(this.au.m);this.yB=m.s1(this,W)}aW.prototype=new aB;aW.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();this.au._()};aW.prototype.Yo=function(W,h,S){this.gf.GG();this.KX=null;if(W&&S.indexOf(W)!=-1)this.KX=S.indexOf(W)};
|
|
aW.prototype.CU=function(W){var h=new em(y.E.W,!0),S=this.gf.B();h.data={o:y.D.HY,nP:{url:S,KP:!0,KX:this.au.B()==1?this.KX:null}};
|
|
this.c(h);this.close()};function cr(){aB.call(this,[12,79],"preferences");this.Nm=null;var W=m.O("div","form");
|
|
this.body.appendChild(W);this.WH=[new dB([8,2]),new dB([8,4]),new fx([12,80,3],[[12,93,3],[12,80,4]]),new gY([12,80,5],1,100,null,2),new fx(null,N.aX.DA),new fx([12,80,6],N.aX.DA),new dB("Remind me to save")];
|
|
for(var Q=0;Q<this.WH.length;Q++){var h=this.WH[Q];W.appendChild(h.m);if(Q!=3)m.YI(W);h.h(y.E.l,this.g4,this)}}cr.prototype=new aB;
|
|
cr.prototype._=function(){aB.prototype._.call(this);for(var Q=0;Q<this.WH.length;Q++)this.WH[Q]._()};
|
|
cr.prototype.Yo=function(W,h,S){};cr.prototype.IF=function(W,h){this.Nm=W;this.WH[0].f(W.dH.r4);this.WH[1].f(W.dH.uv);
|
|
this.WH[2].f(W.dH.KE);this.WH[3].f(W.dH.FE);this.WH[4].f(W.dH.zm);this.WH[5].f(W.dH.VI);this.WH[6].f(W.qi==1)};
|
|
cr.prototype.g4=function(W){var h=this.WH;if(W.target==h[6])this.Nm.qi=1-this.Nm.qi;var S=JSON.parse(JSON.stringify(this.Nm.dH));
|
|
S.r4=h[0].B();S.uv=h[1].B();S.KE=h[2].B();S.FE=h[3].B();S.zm=h[4].B();S.VI=h[5].B();if(S.zm!=4)S.FE=Math.round(S.FE);
|
|
var k=new em(y.E.W,!0);k.data={o:y.D.XO,nP:f6.ic,kN:S};this.c(k)};function di(){aB.call(this,[11,8],"saveforweb");
|
|
this.ag9="";this.h("closebtn",function(){this.oV.P$()},this);this.GX=new eC(512,512);this.om=null;this.yu=null;
|
|
this.ahx=null;this.Nm=null;m.dT(this.body,"flexrow");var W=m.O("div"),h=m.O("div");this.body.appendChild(W);
|
|
this.body.appendChild(h);this._j=m.O("div","imgcont");W.appendChild(this._j);this.oV=new iB;this.oV.UW(this.GX.x,this.GX.y);
|
|
this.m6=m.O("span");W.appendChild(this.m6);this.D5=m.O("div","form cell");this.D5.setAttribute("style","width:15em; padding-left:1em;");
|
|
h.appendChild(this.D5);this.Me=new fx([12,50],hI.rz());this.D5.appendChild(this.Me.m);this.Me.h(y.E.l,this.n3,this);
|
|
this.IS=new av(!0,!0,!1,!0);this.IS.h(y.E.l,this.n3,this);this.D5.appendChild(this.IS.m);this.ne=new jo;
|
|
this.ne.h(y.E.l,this.n3,this);this.D5.appendChild(this.ne.m);this.SZ=new aA([1,2],!0,null,!0);this.SZ.h("click",this.CU,this);
|
|
this.D5.appendChild(this.SZ.m)}di.prototype=new aB;di.prototype.Ra=function(W,h){return W!=null};di.prototype._=function(){aB.prototype._.call(this);
|
|
this.IS._();this.Me._();this.ne._();this.SZ._()};di.prototype.CU=function(W){var h=this.om.name,S=h.lastIndexOf("."),h=S==-1?h:h.slice(0,S),k=hI.rz()[this.Me.B()],p=k=="JPG"||k=="PNG"||k=="GIF",I=hI.J$(k),q="."+k.toLowerCase(),P=this.yu,t=h+q,M=this.om,U=M.BW;
|
|
if(U.length!=0&&p&&this.ne.B().pop()){var i="<!DOCTYPE html>\n<html>\n<style>div {position:absolute;}</style>\n<head></head>\n<body>\n",z=[],D={},R=new gj(0,0,M.e,M.Z),O=M.jc();
|
|
for(var Q=0;Q<U.length;Q++)z.push(a.b1.Tr(U,Q));z.reverse();var b=N.rect.WS([0,0,M.e,M.Z],z);for(var Q=0;
|
|
Q<b.length;Q++){var w=b[Q],A=new gj(w[0],w[1],w[2]-w[0],w[3]-w[1]),g=w.length==5?U[w[4]].v:null,E=N.U(A.n()*4);
|
|
N.zt(O,R,E,A);var j="img/img"+(Q+1)+q;D[j]=new Uint8Array(I.i4([[E.buffer,0]],A.e,A.Z,this.ne.B()));
|
|
i+="<div style=\"background-image:url('"+j+"'); left:"+A.x+"px; top:"+A.y+"px; width:"+A.e+"px; height:"+A.Z+"px\">";
|
|
if(g&&g.url.v!="")i+="\n\t<a href=\""+g.url.v+"\" target=\""+g.null.v+"\" style=\"display:block;width:100%;height:100%;\"></a>\n";
|
|
i+="</div>\n"}i+="</body>\n</html>\n";var x=N.U(Math.round(i.length*1.5)),d=G.hX(i,x,0);D["index.html"]=x.slice(0,d);
|
|
P=UZIP.encode(D);t=h+".zip"}else if(M.add.artd&&M.add.artd.Cnt.v>1&&p&&this.ne.B().pop()){var D={},R=new gj(0,0,M.e,M.Z),O=M.jc(),L=M.root.children;
|
|
for(var Q=0;Q<L.length;Q++){var _=L[Q].i;if(_.add.artb==null||!_.jP())continue;var T=_.rp(),c=N.U(T.n()*4);
|
|
N.zt(O,R,c,T);D[_.getName()+q]=new Uint8Array(I.i4([[c.buffer,0]],T.e,T.Z,this.ne.B()))}P=UZIP.encode(D);
|
|
t=h+".zip"}if(M.lN){var e=new XMLHttpRequest;e.open("GET","/papi/img/update.php?act=1&id="+M.lN+"&rnd="+Math.random());
|
|
e.send()}var r=new em(y.E.W,!0);r.data={o:y.D.tb,data:P,name:t};this.c(r);this.oV.P$();this.close()};
|
|
di.prototype.Yo=function(W,h){if(h.t8!=null)this.Me.f(h.t8);this.om=W;var S=W.e+","+W.Z;if(S!=this.ag9){this.ag9=S;
|
|
this.IS.f(new eC(W.e,W.Z),W.H$)}this.ne.a88();if(h.aaF){this.IS.ahu(3);this.ne.bS.PDF[2].vo.f(!0)}this.n3(null,!0)};
|
|
di.prototype.X0=function(W,h){return new eC(Math.max(0,Math.min(150,(W-770)/2)),Math.max(0,Math.min(150,(h-590)/2)))};
|
|
di.prototype.UW=function(W,h){this.s6=W;this.R_=h;this.GX.x=Math.min(512,W-26-214);this.GX.y=Math.min(512,h-45);
|
|
if(this.om==null)return;var S=this.IS.B(),W=S.x,h=S.y,k=hI.rz()[this.Me.B()],p=hI.J$(k),i="<span style=\"width:",z="display:inline-block; text-align:right;\">";
|
|
if(p.gJ){var I=W,q=h,P;if(k=="PDF"||p.rf){I=this.GX.x;q=this.GX.y}else{I=Math.min(W+20,this.GX.x);q=Math.min(h+20,this.GX.y)}this._j.firstChild.setAttribute("style","display:block; width:"+I+"px; height:"+q+"px;")}else{if(p.rf){I=this.GX.x;
|
|
q=this.GX.y}else{var t=this.ahx,M=t[0].rc,I=M.e,q=M.Z;this.oV.UW(Math.max(50,Math.min(I/m.F(),this.GX.x)),Math.max(50,Math.min(q/m.F(),this.GX.y)))}}var U=this.yu.byteLength,D=k+":"+i+64+"px;"+z+di.lT(U)+"</span>";
|
|
if(this.GX.x>200)D+=i+90+"px; opacity:"+.5+";"+z+U.toLocaleString()+" B</span>";this.m6.innerHTML=D};
|
|
di.lT=function(W){var h=W.toString(2),S=0;while(S+10<h.length)S+=10;var k=(W/Math.pow(2,S)).toFixed(1),p="B KB MB GB TB PB".split(" ")[Math.floor(S/10)];
|
|
return k+" "+p};di.prototype.IF=function(W,h){this.Nm=W};di.prototype.n3=function(W,h){var S=this.om,k=this.IS.B(),p=k.x,I=k.y,q=this.Me.B(),P=hI.rz()[q],t=hI.yk(S)[0].length,M=["GIF","PNG","WEBP"].indexOf(P)!=-1&&t>1,O="";
|
|
if(M&&h&&(t>4&&p*I>1024*1024||p*I*t>800*800*50)){var U=1;while(Math.max(p>>>U,I>>>U)>800)U++;var i=window.confirm("Your animation is large ("+p+" x "+I+" px). Press \"OK\" to scale it to "+(100>>>U)+"%. Press \"Cancel\" to keep the size.");
|
|
if(i){this.IS.f(new eC(p>>>U,I>>>U),null,!0);p=p>>>U;I=I>>>U}}var z=S.add.artd,D=z!=null&&z.Cnt.v>1;
|
|
this.ne.apr(P,M,S.BW.length!=0,D);var R=this.ne.B();this.yu=hI.Es(S,P,p,I,R,this.Nm);if(this.yu==null){this.om=null;
|
|
return}m.hP(this._j);this.oV.P$();var b=hI.J$(P);if(b.rf){this._j.innerHTML="<div></div>";O+="width:0px"}else if(b.gJ){var w=p,A=I,g;
|
|
if(P=="PDF"){g=URL.createObjectURL(new Blob([this.yu],{type:"application/pdf"}))}else{g=URL.createObjectURL(new Blob([this.yu],{type:"image/svg+xml"}))}this._j.innerHTML="<iframe src=\""+g+"\"></iframe>"}else{var E=this.ahx=b.uc(this.yu),j=E[0].rc,w=j.e,A=j.Z;
|
|
this.oV.f(E,E.length>1?R[R.length-3]:0);this._j.appendChild(this.oV.m);O="background: rgba(0,0,0,0);"}this._j.setAttribute("style","display:block; background-size:"+16/m.F()+"px;"+O);
|
|
this.UW(this.s6,this.R_)};function cv(){aB.call(this,[11,13],"shortcuts");var W=this.xz=m.O("div","scrollable");
|
|
W.setAttribute("style","min-width:700px; max-height:500px; padding:1.5em");this.body.appendChild(W);
|
|
this.aoQ()}cv.prototype=new aB;cv.prototype._=function(){aB.prototype._.call(this);this.aoQ()};cv.prototype.aoQ=function(){var W="<div style=\"line-height:1.4em; column-count:3; column-gap:3em; column-rule-width:1px;\" class=\"\">",h="",S=hW,k=S.Q9,p=S.YS,I=S.OM;
|
|
h+="<h2 style=\"margin-top:0;\">Main Menu</h2>";h+=W;h+=this.g2([[0,0],"---",[1,0],[k,S.ij],[1,2],[k,S.mL],[1,3],[p,k,S.mL],[1,8],[I,p,k,S.mL],[0,1],"---",[2,0],[p,k,S.SG],[2,1],[k,S.SG],[5,0],[k,S.a4],[5,1],[k,S.ZU],[5,2],[k,S.BP],[2,2],"Delete",[2,3],[I,S.uf],[10,16],[I,k,S.zy],[12,79],[k,S.Yq],[3],"---",[4,1],[k,S.UT],[4,2],[k,S.mp],[4,5],[k,S.OE],[4,11],[k,S.yg],[0,3],"---",[6,0],[k,S.an],[6,6,0],[I,k,S.lj],[6,9],[k,S.lj],[6,10],[k,S.E],[0,5],"---",[7,0],[k,S.D],[7,1],[k,S.nS],[7,2],[p,k,S.yg],[0,7],"---",[8,0],[k,S.jJ],[8,1],[k,S.wL],[8,3],[k,S.zn],[8,2],[k,S.ob],[8,4],[k,S.NF],[11,13],"?"]);
|
|
h+="</div>";h+="<h2 style=\"margin-top:1.5em;\">Navigation</h2>";h+=W;h+=this.g2(["Vertical scroll","Wheel","Horizontal scroll",[k,"Wheel"],"Zooming",[I,"Wheel"]]);
|
|
h+="</div>";h+="<h2 style=\"margin-top:1.5em;\">Quick tools (press to enable, release to disable)</h2>";
|
|
h+=W;h+=this.g2([[10,11],[k],[10,7],"Space",[10,17],[k,S.zP]]);h+="</div>";h+="<h2 style=\"margin-top:1.5em;\">Tools</h2>";
|
|
h+=W;var q=cv.K,P=[];for(var Q=0;Q<q.length;Q+=3)if(q[Q+1])P.push(q[Q],q[Q+1]);P=P.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","}"]);
|
|
h+=this.g2(P);h+="</div>";this.xz.innerHTML=h};cv.prototype.g2=function(W){var h="",S=!0;for(var Q=0;
|
|
Q<W.length;Q+=2){var k=W[Q],p=hW.sU(W[Q+1]);if(p==null){S=!1;continue}var I=m.Pr(dq.get(k));if(p=="---"){if(!S)h+="<br/>";
|
|
h+="<div style=\"font-weight:bold; border-bottom: 1px solid;\">"+I+"</div>"}else h+="<div>"+I+" <span style=\"float:right; font-weight:bold;\">"+p+"</span> </div>";
|
|
S=!1}return h};cv.K=[[10,11],"V",0,[10,50],"V",70,[10,15],"M",1,[10,4],"M",2,[10,9],"L",5,[10,14],"L",6,[10,10],"L",7,[10,44],"W",3,[10,37],"W",8,[10,12],"W",9,[10,2],"C",10,[10,39],"C",11,[10,40],"C",12,[10,41],"C",13,[10,5],"I",14,[10,36],"I",16,[10,24],"J",18,[10,25],"J",19,[10,26],"J",20,[10,43],"J",22,[10,0],"B",23,[10,38],"B",24,[10,42],"B",25,[10,1],"S",27,[10,3],"E",31,[10,45],"E",32,[10,6],"G",34,[10,13],"G",35,[10,18],null,36,[10,19],null,37,[10,20],null,38,[10,21],"O",39,[10,22],"O",40,[10,23],"O",41,[10,8],"T",47,[10,29],"P",42,[10,30],"P",43,[10,27],"A",51,[10,28],"A",52,[10,32],"U",54,[10,33],"U",55,[10,35],"U",57,[10,34],"U",56,[10,31],"U",58,[10,7],"H",59,[10,17],"Z",61];
|
|
function gb(){aB.call(this,[8,11,1],"soptions");this.xh=null;var W=m.O("div","form");W.style.width="20em";
|
|
this.body.appendChild(W);this.Ab={Nm:[12,48],url:"URL",null:[12,71]};this.WH={};for(var h in this.Ab){var S=new i3(this.Ab[h],null,15);
|
|
this.WH[h]=S;W.appendChild(S.m)}this.yB=m.s1(this,W)}gb.prototype=new aB;gb.prototype.Yo=function(W,h,S){var k=h.k;
|
|
this.xh=JSON.stringify(k);for(var p in this.Ab){if(k[p])this.WH[p].f(k[p].v)}};gb.prototype.CU=function(W){var h=JSON.parse(this.xh);
|
|
for(var S in this.Ab){var k=this.WH[S].B();h[S]={t:"TEXT",v:k}}var p=new em(y.E.u,!0);p.b=a.It;p.data=h;
|
|
p._Q=!0;this.c(p);this.close()};gb.prototype._=function(){aB.prototype._.call(this);this.yB._()};function eM(){aB.call(this,[2,3],"fill");
|
|
this.Nm=null;this.pv=null;var W=m.O("div","form padded");W.style.width="22em";this.body.appendChild(W);
|
|
this.E9="FrgC BckC Clr Blck Gry Wht contentAware Ptrn".split(" ");this.uu=new fx([2,3],[[12,45],[12,46],[12,47],[13,1,10],[13,1,7],[13,1,8],[6,48,0,3],[12,62]],null,[3,3,2]);
|
|
this.uu.h(y.E.l,this.apI,this);W.appendChild(this.uu.m);this._j=m.O("span");W.appendChild(this._j);this.cI=new ax;
|
|
this.cI.parent=this;this.cI.NC(0);this.cc=new dd;this.cc.parent=this;this.jK=new fx([12,19,0],hd.h3,!1,hd.Yu);
|
|
W.appendChild(this.jK.m);this.iB=new gY([12,0],0,100,"%",0,!1);this.iB.f(100);W.appendChild(this.iB.m);
|
|
this.dg=new dB("Preserve Transparency");this.dg.f(!1);W.appendChild(this.dg.m);this.yB=m.s1(this,this.body)}eM.prototype=new aB;
|
|
eM.prototype.Ra=function(W,h){return W!=null};eM.prototype.HV=function(){return!0};eM.prototype.apI=function(){var W=this.uu.B(),h=this.cI.m,S=this.cc.m,k=this._j;
|
|
if(W==2)k.appendChild(h);else if(k.contains(h))k.removeChild(h);if(W==7)k.appendChild(S);else if(k.contains(S))k.removeChild(S)};
|
|
eM.prototype._=function(){aB.prototype._.call(this);this.uu._();this.jK._();this.iB._();this.yB._()};
|
|
eM.prototype.CU=function(W){if(!this.pv.xi())return;var h=new em(y.E.gg,!0),S=this.uu.B();h.data=a.ut.XU(this.E9[S],hd.wl[this.jK.B()],this.iB.B()/100,this.cI.B(),this.dg.B(),this.cc.B());
|
|
this.close();this.c(h)};eM.prototype.Yo=function(W,h){this.pv=W};eM.prototype.IF=function(W,h){this.Nm=W;
|
|
if(h==f6.W8||h==f6.OA){this.cc.EX(W.n5);this.cc.f({classID:"Ptrn",Nm:{v:"orangeslices",t:"TEXT"},Idnt:{v:"c7acb22a-47a6-11de-919a-bf574370eaaf",t:"TEXT"}})}};
|
|
function dj(){aB.call(this,[14,9],"stroke");this.Nm=null;this.D5=m.O("div","form");this.D5.setAttribute("style","width:24em");
|
|
this.body.appendChild(this.D5);this.iu=new im("FrFX",!0);this.iu.parent=this;var W=["Sz","Styl","Md","Opct"].concat(hz.RN);
|
|
for(var Q=0;Q<W.length;Q++){var h=this.iu.jw[W[Q]].m;this.D5.appendChild(h)}this.NI=!1;this.yB=m.s1(this,this.body)}dj.prototype=new aB;
|
|
dj.prototype.Ra=function(W,h){return W!=null};dj.prototype.HV=function(){return!0};dj.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();this.iu._()};dj.prototype.CU=function(W){var h=new em(y.E.u,!0);h.b=a.VG;h.data={o:"stroke",a7O:this.iu.B()};
|
|
this.close();this.c(h)};dj.prototype.Yo=function(W,h){if(!this.NI){var S=hz.Au[hz.order.indexOf("FrFX")];
|
|
S=JSON.parse(S);this.iu.update(W,S);this.NI=!0}var S=this.iu.B(),k=this.Nm.Ps;S.Clr.v=N.X.hg({p:k>>16&255,z:k>>8&255,S:k&255});
|
|
this.iu.update(W,S)};dj.prototype.IF=function(W,h){this.Nm=W};function dl(){aB.call(this,[11,9],"textwarp");
|
|
this.WH=new b1;this.WH.h(y.E.l,this.ZM,this);this.WH.parent=this;this.D5=m.O("div","form");this.D5.setAttribute("style","width:20em");
|
|
this.body.appendChild(this.D5);this.D5.appendChild(this.WH.KT.m);this.D5.appendChild(this.WH.z7.m);this.D5.appendChild(this.WH.RH.m);
|
|
this.D5.appendChild(this.WH.OH.m);this.D5.appendChild(this.WH.EE.m);this.yB=m.s1(this,this.D5);this.h("closebtn",this.hL,this)}dl.prototype=new aB;
|
|
dl.prototype.HV=function(){return!0};dl.prototype._=function(){aB.prototype._.call(this);this.yB._();
|
|
this.WH._()};dl.prototype.ZM=function(W){var h=this.WH.B();this.Nw({o:"warp",DU:h})};dl.prototype.Nw=function(W){var h=new em(y.E.u,!0);
|
|
h.b=a.mj;h.data=W;h._Q=!0;this.c(h)};dl.prototype.hL=function(W){this.Nw({o:"warpCancel"})};dl.prototype.CU=function(W){this.Nw({o:"warpConfirm"});
|
|
this.close()};dl.prototype.Yo=function(W,h){var S=W.g[W.w[0]];this.WH.f(S.add.TySh.ud)};function c5(){aB.call(this,[11,12,0],"trim");
|
|
var W=this.D5=m.O("div","form");this.D5.setAttribute("style","width:22em");this.body.appendChild(this.D5);
|
|
var h=new gs("Color To Trim:");W.appendChild(h.m);this.Gu=new ce(null,["Top Left Pixel Color","Bottom Right Pixel Color",[13,1,9]],null,null,!0);
|
|
this.Gu.f([!0]);this.D5.appendChild(this.Gu.m);var h=new gs("Sides:");W.appendChild(h.m);this.Q4=new ce(null,["Top","Left","Bottom","Right"]);
|
|
this.Q4.f([!0,!0,!0,!0]);this.D5.appendChild(this.Q4.m);this.yB=m.s1(this,this.body)}c5.prototype=new aB;
|
|
c5.prototype.Ra=function(W,h){return W!=null};c5.prototype.HV=function(){return!0};c5.prototype._=function(){aB.prototype._.call(this);
|
|
this.Gu._();this.Q4._();this.yB._()};c5.prototype.CU=function(W){var h=this.Gu.B().indexOf(!0),S=this.Q4.B(),k=new em(y.E.gg,!0);
|
|
k.data=a.JY._u(h,S);this.close();this.c(k)};function jw(){aB.call(this,"Raw Photopea","rawpea");this.jD=null;
|
|
this.mT=null;this.sV=null;this.EN=0;this.RK=null;this.Y6=null;this.a4w=500;this.asF=500;this.ajH=0;this.h("closebtn",this.I5,this);
|
|
m.dT(this.body,"flexrow");var W=m.O("div"),h=m.O("div"),k="<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>";
|
|
h.setAttribute("style","padding-left: 1em");this.body.appendChild(W);this.body.appendChild(h);this.N=m.O("canvas");
|
|
W.appendChild(this.N);this.c3=new eV(225);this.c3.KM(4);h.appendChild(this.c3.m);this.D5=m.O("div");
|
|
this.D5.setAttribute("style","width:18em;");h.appendChild(this.D5);this.acB=new gs("Hi",!0);this.D5.appendChild(this.acB.m);
|
|
this.ra=[new h1("Temperature",2e3,13e3),new h1("Tint",-150,150),new h1([4,3],-4,4,null,!0),new h1([12,3,0],-100,100)];
|
|
for(var Q=0;Q<this.ra.length;Q++){var S=this.ra[Q];S.f(0);S.h(y.E.l,this.rD,this);this.D5.appendChild(S.m);
|
|
if(Q==1)this.D5.appendChild(m.O("hr"))}this.yB=new aA([1,0],!0,null,!0);this.yB.h("click",this.CU,this);
|
|
this.D5.appendChild(this.yB.m);this.p_=new aA(k+" JPG",!0,null,!0);this.p_.h("click",this.a58,this);
|
|
this.D5.appendChild(this.p_.m);this.p_.m.style.marginTop="6px"}jw.prototype=new aB;jw.prototype.X0=function(){return new eC(0,0)};
|
|
jw.prototype.UW=function(W,h){this.a4w=W-274;this.asF=h-32;if(this.jD)this.ahP()};jw.prototype._=function(){aB.prototype._.call(this);
|
|
this.yB._();for(var Q=0;Q<this.ra.length;Q++)this.ra[Q]._()};jw.prototype.a58=function(W){var h=this.jD,S=this.mT,k=N.U(h.width*h.height*4);
|
|
N.wM(k,4294967295);N.raw.d$(S,k,h,this.ew());var p=hI.J$("JPG").i4([[k.buffer]],S.F0,S.AF,[85]),I=new em(y.E.W,!0);
|
|
I.data={o:y.D.tb,data:p,name:"photo.jpg"};this.c(I)};jw.prototype.CU=function(W){var h=this.jD,S=this.mT,k=N.U(h.width*h.height*4);
|
|
N.wM(k,4294967295);N.raw.d$(S,k,h,this.ew());var p=b_.mW(h),h={rc:new gj(0,0,S.F0,S.AF),data:k.buffer,KC:p},I=hI.RO("Raw Photo",[h]),q=new em(y.E.W,!0);
|
|
q.data={o:y.D.Hf,om:I};this.c(q);this.I5();this.close()};jw.prototype.I5=function(){this.jD=null;this.mT=null;
|
|
this.RK=null;this.Y6=null};jw.prototype.Yo=function(W,h,S,k){this.jD=h.jj;this.mT=N.raw.aoN(this.jD);
|
|
var p=this.mT;this.acB.f(p.F0+" x "+p.AF+", "+(p.F0*p.AF/1e6).toFixed(1)+" MPx");var I=N.raw.acE(h.jj);
|
|
this.sV=c3.O2(I);this.ra[0].f(this.sV.iy);this.ra[1].f(this.sV.H9);for(var Q=2;Q<this.ra.length;Q++)this.ra[Q].f(0);
|
|
this.ahP()};jw.prototype.IF=function(W,h){this.c3.NC(hj.HC[W.cF]["--text-color"])};jw.prototype.ahP=function(){var W=this.mT,h=W.F0,S=W.AF,k=1;
|
|
while(h/k>this.a4w*m.F()||S/k>this.asF*m.F())k++;if(this.ajH==k&&this.RK)return;this.ajH=k;var p=Math.floor(h/k),I=Math.floor(S/k);
|
|
this.RK={vM:new Float32Array(p*I*3),F0:p,AF:I};var q=this.N.getContext("2d");this.Y6=N.U(p*I*4);N.wM(this.Y6,4294967295);
|
|
var P=1/(k*k);for(var t=0;t<I;t++)for(var M=0;M<p;M++){var U=0,i=0,z=0,D=(M+1)*k,R=(t+1)*k;for(var O=t*k;
|
|
O<R;O++)for(var b=M*k;b<D;b++){var w=(O*h+b)*3;U+=this.mT.vM[w];i+=this.mT.vM[w+1];z+=this.mT.vM[w+2]}var A=(t*p+M)*3;
|
|
this.RK.vM[A]=U*P;this.RK.vM[A+1]=i*P;this.RK.vM[A+2]=z*P}this.rD()};jw.prototype.rD=function(){var W=this.jD,h=this.RK.F0,S=this.RK.AF,k=h*S,p=this.N,I=p.getContext("2d");
|
|
p.width=h;p.height=S;m.cq(p,h,S);N.raw.d$(this.RK,this.Y6,W,this.ew());I.putImageData(new ImageData(new Uint8ClampedArray(this.Y6.buffer),h,S),0,0);
|
|
var q=N.FZ(this.Y6);for(var Q=0;Q<4;Q++)for(var P=1;P<256;P++)if(q[Q][P]==0)q[Q][P]=q[Q][P-1];for(var Q=0;
|
|
Q<4;Q++)for(var P=1;P<256;P++)if(q[Q][P]==0)q[Q][P]=q[Q][P-1];this.c3.f(q)};jw.prototype.ew=function(){var W=[];
|
|
for(var Q=0;Q<this.ra.length;Q++)W.push(this.ra[Q].B());return W};function gz(W){aB.call(this,W?[11,11]:"Reduce Colors",W?"vbitmap":"rcolors");
|
|
this.Fw=null;this.nv=null;this.T9=null;this.C7=null;this.fr=null;this.amX=null;this.h6=null;this.eo="";
|
|
this.G3=W;this._0=this.R3.bind(this);this.body.style.padding="0";this.D5=m.O("div","form hbar padded");
|
|
this.body.appendChild(this.D5);var h=this.rT={cnum:new fA([12,82],2,50,null),nois:new dB([12,81]),mode:new fx(null,["Cartoon","Photo"]),segm:new dB("Segmentize"),poly:new dB("Polygon"),polE:new fA("Roughness",2,30,null),ok:m.s1(this,null,!1)},I=16;
|
|
for(var S in h){var k=h[S];k.parent=this;if(S!="ok")k.h(y.E.l,this.R3,this)}var p=this.rJ=m.O("div","flexrow");
|
|
this.body.appendChild(p);this.u2=new iB;this.u2.h("viewchange",this.i_,this);this.w3=new iB;this.N=m.O("canvas");
|
|
this.N.setAttribute("style","margin:0 0 0 1px; padding:0; cursor:grab;");this.ds=this.N.getContext("2d");
|
|
var q=N.U(16*16*4);N.LU(q,I,I,8);this.y3=N.scale.AQ(q,I,I);this.u2.a32(this.N);this.u2.gK(this.w3);this.w3.gK(this.u2);
|
|
p.appendChild(this.u2.m);if(W)p.appendChild(this.N);else p.appendChild(this.w3.m)}gz.prototype=new aB;
|
|
gz.prototype.X0=function(){return new eC(0,0)};gz.prototype.HV=function(){return!0};gz.prototype.UW=function(W,h){this.s6=W;
|
|
this.R_=h;h=h-44;if(W<600)h-=29;if(this.Fw==null)return;var S=this.Fw.rc,k=ew.aeh(W,h,S.e,S.Z);if(k==1)h-=3;
|
|
if(k==0){W=Math.floor(W/2);m.dT(this.rJ,"flexrow")}else{h=Math.floor(h/2);m.Eg(this.rJ,"flexrow")}m.rE(this.N,W,h);
|
|
this.u2.UW(W,h);if(this.G3)this.i_();else this.w3.UW(W,h)};gz.prototype.ok=function(W,h,S,k){this.u2.ok(k)};
|
|
gz.prototype._=function(){aB.prototype._.call(this);for(var W in this.rT)this.rT[W]._()};gz.prototype.Yo=function(W,h){this.h6=W;
|
|
this.fr=null;var S=W.g[W.w[0]],k=N.ps.zC(S.buffer.buffer,S.rect.e,S.rect.Z).atP,p=k/((S.rect.e-2)*(S.rect.Z-2)),I=this.rT;
|
|
I.cnum.f(20);I.nois.f(p<.75);I.mode.f(p<.75?1:0);I.segm.f(!1);I.poly.f(!1);I.polE.f(1);var q=S.rect.clone();
|
|
q.x=q.y=0;this.Fw={rc:q,data:S.buffer.buffer.slice(0)};this.nv=null;this.UW(this.s6,this.R_);this.u2.f([this.Fw]);
|
|
this.u2.Va();setTimeout(this._0,20)};gz.prototype.R3=function(){var W=!0,h=Date.now(),S=this.Fw,k=this.rT,p=k.cnum.B(),I=k.nois.B(),q=k.mode.B(),P=k.segm.B(),t=k.poly.B(),M=k.polE.B(),d=null;
|
|
if(q==0)P=t=!1;var U=["cnum","nois","mode"];if(q==1){U.push("segm");if(this.G3){U.push("poly");if(t)U.push("polE")}}U.push("ok");
|
|
m.hP(this.D5);for(var Q=0;Q<U.length;Q++)this.D5.appendChild(k[U[Q]].m);if(W)console.log("---------------------------------------");
|
|
var i=I||P,z=I+","+P;if(i&&(this.nv==null||this.eo!=z)){this.eo=z;var D=new Uint8Array(S.data),R=S.rc.e,O=S.rc.Z;
|
|
if(I){if(this.fr==null){this.fr=D.slice(0);N.y5.Tk(this.fr,this.fr,R,O,15,N.y5.cW,[35]);if(W){console.log("denoise",Date.now()-h);
|
|
h=Date.now()}}D=this.fr.slice(0)}else D=D.slice(0);if(P){var b=N.ps.g1(D,R,O,40,10),w=b.Yq,A=new Uint8Array(w*4);
|
|
for(var Q=0;Q<w;Q++){var g=Q*4,E=Q*6,j=1/b.v1[E+5];A[g]=b.v1[E]*j;A[g+1]=b.v1[E+1]*j;A[g+2]=b.v1[E+2]*j}for(var Q=0;
|
|
Q<D.length;Q+=4){var x=b.FB[Q>>>2]*4;D[Q]=A[x];D[Q+1]=A[x+1];D[Q+2]=A[x+2]}if(W){console.log("segm",Date.now()-h);
|
|
h=Date.now()}}this.nv={rc:S.rc.clone(),data:D.buffer}}if(i)S=this.nv;var D=new Uint8Array(S.data),R=S.rc.e,O=S.rc.Z;
|
|
for(var Q=0;Q<D.length;Q+=4){if(D[Q+3]<10)D[Q]=D[Q+1]=D[Q+2]=D[Q+3]=0}if(q==0){d=N.ps.a34(D,R,O,p,i?.1:2e-4);
|
|
if(W){console.log("quantize",Date.now()-h);h=Date.now()}}else{d=bh.UK(D.buffer,p,R,O)}if(this.G3){var L=d.FB.slice(0);
|
|
for(var Q=0;Q<L.length;Q++)L[Q]++;var _=new Uint8Array((R+2)*(O+2));N.vG(L,new gj(1,1,R,O),_,new gj(0,0,R+2,O+2));
|
|
if(!t){var T=Math.round((R+2)*(O+2)/1e4),c=gh.S2(_.slice(0),R+2,O+2,Math.min(12,T)),e=gh.O4(c);if(W){console.log("trace smooth",Date.now()-h);
|
|
h=Date.now()}}else{var e=N.H.P8(_,R+2,O+2,M,W)}var r=e.length,B=new ex(1,0,0,1,-1,-1);for(var Q=0;Q<r;
|
|
Q++)N.H.A(e[Q].path.s,B,e[Q].path.s);this.C7=e;this.T9=d;for(var Q=0;Q<r;Q++){var F=e[Q];for(var v=Q+1;
|
|
v<r;v++){var X=e[v];if(X.parent==Q&&d.lt[X.color-1].est.q[3]<.05){var V=X.path.C.slice(1);V.reverse();
|
|
V=["M"].concat(V);var H=[],c=X.path.s.length;for(var o=0;o<c;o+=2){H[o]=X.path.s[c-2-o];H[o+1]=X.path.s[c-2-o+1]}N.H.concat(F.path,{s:H,C:V})}}}if(W){console.log("finding holes",Date.now()-h);
|
|
h=Date.now()}for(var Q=0;Q<e.length;Q++){var F=e[Q],J=d.lt[F.color-1].est.q;if(J[3]<=.05){e.splice(Q,1);
|
|
Q--;continue}}for(var Q=1;Q<e.length;Q++){var C=e[Q-1],F=e[Q];if(C.color==F.color){N.H.concat(C.path,F.path);
|
|
e.splice(Q,1);Q--;continue}}this.i_()}else{var Y=new Uint32Array(R*O),K=R*O;for(var Q=0;Q<K;Q++){var u=d.lt[d.FB[Q]];
|
|
Y[Q]=u.est.rgba}this.amX=new Uint8Array(Y.buffer);this.w3.f([{rc:S.rc,data:Y.buffer}])}};gz.prototype.i_=function(W){if(this.C7==null)return;
|
|
var h=this.Fw.rc.e,S=this.Fw.rc.Z,k=this.C7,p=this.T9.lt,I=this.N,q=this.ds,P=this.u2.wd();q.setTransform(1,0,0,1,0,0);
|
|
q.clearRect(0,0,I.width,I.height);q.translate(I.width/2,I.height/2);q.scale(P.J,P.J);q.translate(P.r.x/P.J-h/2,P.r.y/P.J-S/2);
|
|
q.scale(1/P.J,1/P.J);q.fillStyle=this.y3;q.fillRect(0,0,h*P.J,S*P.J);q.scale(P.J,P.J);var t=[];for(var Q=0;
|
|
Q<p.length;Q++){var M=p[Q].est.q;t.push({p:Math.round(255*M[0]),z:Math.round(255*M[1]),S:Math.round(255*M[2]),S4:Math.round(255*M[3])})}for(var Q=0;
|
|
Q<k.length;Q++){var U=k[Q],M=t[U.color-1];if(M.S4==0)continue;q.fillStyle="rgba("+M.p+","+M.z+","+M.S+","+M.S4/255+")";
|
|
q.beginPath();Typr.U.pathToContext({crds:U.path.s,cmds:U.path.C},q);q.fill()}};gz.prototype.CU=function(W){var h=this.h6,S=h.w[0],k=h.g[S],p=new em(y.E.u,!0);
|
|
p._Q=!0;p.b=a.m5;if(this.G3){var I=this.C7,q=I.length==1,P=h.g.slice(0,S);if(!q)P.push(h.Iq());for(var Q=0;
|
|
Q<I.length;Q++){var t=I[Q],M=this.T9.lt[t.color-1].est.q;N.H.A(t.path.s,new ex(1,0,0,1,k.rect.x,k.rect.y),t.path.s);
|
|
var U=h.yA();U.hq("Path "+Q);P.push(U);U.opacity=Math.round(M[3]*255);U.S5|=16;U.add.SoCo={classID:"null",Clr:{t:"Objc",v:N.X.hg({p:255*M[0],z:255*M[1],S:255*M[2]})}};
|
|
U.add.vmsk=new $.CP;U.add.vstk=JSON.parse(JSON.stringify(hz.EJ.default));U.add.vmsk.T=N.H.aD(t.path,!1);
|
|
U.add.vogk=[];U.lq();U.r9(h)}var i=P[P.length-1];if(!q){var U=h.yA();U.hq(k.getName());U.add.lsct=i1.wY;
|
|
U.oO="pass";U.S5=24;P.push(U);i=U}var z=k.add.lmfx;if(z)i.add.lmfx=JSON.parse(JSON.stringify(z));for(var Q=S+1;
|
|
Q<h.g.length;Q++)P.push(h.g[Q]);p.data={o:$.s9,vR:P,mQ:[S+I.length+(q?-1:1)],rO:[11,11]}}else{var P=h.g.slice(0),U=h.yA();
|
|
U.hq(k.getName());P.splice(h.w[0]+1,0,U);U.rect=k.rect.clone();U.buffer=this.amX;U.G();p.data={o:$.s9,vR:P,mQ:[h.w[0]+1],rO:"Reduce Colors"}}this.c(p);
|
|
this.close()};function ew(W){aB.call(this,[[7,11],[7,13]][W],["redge","magiccut"][W]);this.Gu=W;this.Fw={};
|
|
this.wx=null;this.MG=null;this.h6=null;this.iQ=null;this.dV=null;this.body.style.padding="0";this.rU=[];
|
|
this.FH=-1;this.D5=m.O("div","form hbar padded");this.body.appendChild(this.D5);this.qW=new f5;this.qW.parent=this;
|
|
this.qW.h(y.E.l,this.Dt,this);this.D5.appendChild(this.qW.m);var h=W==0?["#ffffff","#888888","#000000"]:["#00dd00","#888888","#ff0000"];
|
|
h=h.concat("tools/hand","zoomIn","zoomOut");var S=W==0?[[12,45],"Unknown",[12,46]]:[[12,45],"Erase",[12,46]];
|
|
this.ZD=new gL(null,h,S,28);this.ZD.h(y.E.l,this.ok,this);this.D5.appendChild(this.ZD.m);this.hd=new fA([7,9],0,50,null);
|
|
this.hd.parent=this;this.hd.h(y.E.l,[this.ae6,this.R3][W],this);this.D5.appendChild(this.hd.m);var k=this.a3G=new aA([2,2],!1,null,!0);
|
|
k.h("click",this.I5,this);this.D5.appendChild(k.m);var p=this.a2J=m.O("span","form");this.D5.appendChild(p);
|
|
var I=this.a1E=new aA([12,90],!1,null,!0);I.h("click",function(t){alert(W==0?dq.get([15,7,1]):"Mark the object with Green, background with Red. Two colors should never touch.",5e3)},this);
|
|
p.appendChild(I.m);var q=new aA("Tutorial",!1,null,!0);q.h("click",this.aiK,this);p.appendChild(q.m);
|
|
this.ML=new gL([12,46],["checker","#ffffff","#000000"]);this.ML.h(y.E.l,this.aa1,this);p.appendChild(this.ML.m);
|
|
this.Eu=new fx(null,[[6,13],[6,2],[17,2]]);p.appendChild(this.Eu.m);this.yB=m.s1(this,p,!1);var P=this.rJ=m.O("div","flexrow");
|
|
this.body.appendChild(P);this.C_=new iB(!0);this.fZ=new iB;this.C_.gK(this.fZ);this.fZ.gK(this.C_);this.C_.h("mousedown",this._O,this);
|
|
this.C_.h("mousemove",this.ZL,this);this.C_.h("mouseup",this.p9,this);this.C_.h("zoom",this.Dt,this);
|
|
this.fZ.h("zoom",this.Dt,this);P.appendChild(this.C_.m);P.appendChild(this.fZ.m)}ew.prototype=new aB;
|
|
ew.prototype.Ra=function(W,h){var S=W!=null&&!W.g[W.w[0]].rect.ZP();if(!S)alert("The layer is empty.");
|
|
return S};ew.prototype.X0=function(){return new eC(0,0)};ew.prototype.HV=function(){return!0};ew.prototype.UW=function(W,h){this.s6=W;
|
|
this.R_=h;h=h-12-33;if(W<900){this.a2J.setAttribute("style","display:block; text-align:right;");h-=29}else{this.a2J.setAttribute("style","position:absolute; right:0px")}var S=this.Fw.rect;
|
|
if(S){var k=ew.aeh(W,h,S.e,S.Z);if(k==0){W=Math.floor(W/2);m.dT(this.rJ,"flexrow")}else{h=Math.floor(h/2);
|
|
m.Eg(this.rJ,"flexrow")}this.C_.UW(W,h);this.fZ.UW(W,h)}};ew.aeh=function(W,h,S,k){var p=W/2,I=h/2,q=Math.min(p/S,h/k),P=Math.min(W/S,I/k);
|
|
return q>P?0:1};ew.prototype._=function(){aB.prototype._.call(this);this.qW._();this.hd._();this.yB._();
|
|
this.ML._();this.Eu._();this.a3G._();this.a1E._()};ew.prototype.aiK=function(W){window.open("//www.photopea.com/"+["learn/refine-edge","tuts/magic-cut-remove-image-background-online"][this.Gu],"_blank")};
|
|
ew.prototype.IF=function(W,h){this.MG=W;if(h==f6.og||h==f6.W8){this.qW.EX(W.zl);this.qW.f(gI.S0(),W.zl.jE,W.zl.cc)}};
|
|
ew.prototype.ok=function(W,h,S,k){var p=this.ZD.B();if(k==null){this.C_.ok(iB.a4N(p-3));return}this.iQ=k;
|
|
var I=a.ut.dX(this.qW.B(),k);if(I!=null){this.qW.f(I);this.Dt()}else if(k.j(hW.Q9)&&k.j(hW.SG)){var q=this.rU,P=0;
|
|
if(k.j(hW.YS)){if(this.FH+1<q.length)P=1}else if(this.FH>0)P=-1;if(P!=0){this.FH+=P;var t=this.FH,M=this.Fw;
|
|
if(P==1)N.zt(q[t][2],q[t][0],M.IX,M.rect);else N.zt(q[t+1][1],q[t+1][0],M.IX,M.rect);M.vt=M.rect;this.R3()}}else if(p<3)this.C_.ok(k)};
|
|
ew.prototype.pQ=function(W){var h=this.Fw,S=this.rU,k=N.U(W.n()*4);N.zt(h.oQ,h.rect,k,W);h.oQ=null;var p=N.U(W.n()*4);
|
|
N.zt(h.IX,h.rect,p,W);this.FH++;S[this.FH]=[W.clone(),k,p];while(S.length>this.FH+1)S.pop();while(S.length>50){S=S.slice(1);
|
|
this.FH--}};ew.prototype.Dt=function(){var W=this.MG,h=go.Zt(this.qW.B(),W.zl.jE,this.C_.wd().J);this.C_.Ev(h)};
|
|
ew.prototype._O=function(W){var h=this.MG,S=this.Fw,k=this.iQ,p=this.qW.B(),I=this.C_.s3(),q=[16777215,8421504,0][this.ZD.B()];
|
|
this.wx=new go(p,h.zl.jE,h.zl.cc,{YH:1,Ow:!0},q,h.lL,S.rect);S.oQ=S.IX.slice(0);if(k!=null&&k.j(hW.YS)&&this.dV){this.wx.moveTo(this.dV.x,this.dV.y);
|
|
this.wx.lineTo(I.x,I.y)}else this.wx.moveTo(I.x,I.y);this.aof()};ew.prototype.ZL=function(W){var h=this.Fw,S=this.C_.s3();
|
|
this.wx.lineTo(S.x,S.y);this.aof()};ew.prototype.p9=function(W){this.dV=this.C_.s3();this.pQ(this.wx.Oe());
|
|
this.R3()};ew.prototype.aof=function(){var W=this.Fw,h=this.wx,S=h.IK();if(S.ZP())return;W.vt=S;N.a.ha("norm",h.et(),h.wT(),W.IX,W.rect,S,1);
|
|
this.a1o()};ew.prototype.I5=function(W){var h=this.Fw;h.oQ=h.IX.slice(0);h.vt=h.rect;N.wM(h.IX,[4278190080,4292730333][this.Gu]);
|
|
this.pQ(h.rect);this.R3()};ew.prototype.Yo=function(W,h){this.h6=W;var S=W.g[W.w[0]],k=S.rect.clone(),p=k.e,I=k.Z;
|
|
this.hd.f(this.Gu==0?3:p*I<3e6?3:0);this.ZD.f(W.q==null?0:1);this.hd.lz();if(this.Gu==0&&W.q!=null||this.Gu==1)this.hd.Ze();
|
|
var q=this.Gu,P=N.U(k.n()),t=new Float32Array(k.n());if(q==0&&W.q){N.vG(W.q.channel,W.q.rect,P,k);var M=N.U(k.n());
|
|
for(var U=0;U<I;U++)for(var i=0;i<p;i++){var Q=U*p+i,z=P[Q];if(i>0&&P[Q-1]!=z||i<p-1&&P[Q+1]!=z||U>0&&P[Q-p]!=z||U<I-1&&P[Q+p]!=z)M[Q]=255}N.style._f(M,t,p,I)}else t.fill(1e9);
|
|
k.x=k.y=0;this.Fw={rect:k,vM:S.buffer,k8:P,zN:t,k5:N.U(k.n()*4),_Z:N.U(k.n()*4),IX:N.U(k.n()*4),oQ:null,I4:null,vt:k,aqM:{}};
|
|
if(q==0)this.ae6();else{this.Fw.aqM=a.tl.yx(W);var D=this.Fw.IX;N.wM(D,4287137928);var R=N.LD.getSelection(S.buffer,p,I),O=Math.round(p/60),b=Math.round(.7*I);
|
|
for(var U=0;U<I;U++)for(var i=0;i<p;i++){var w=(U*p+i)*4,A=R[w>>>2];A=A>128?255:128;if(U<O||U<b&&(i<O||i>p-1-O))A=0;
|
|
D[w]=D[w+1]=D[w+2]=A}this.R3()}this.rU=[1];this.FH=0;var g=this.qW.B();g.Brsh.v.Dmtr.v.val=Math.round(k.e/(q==0?10:20));
|
|
this.qW.f(g);this.Dt();this.UW(this.s6,this.R_);this.C_.Va()};ew.prototype.ae6=function(){var W=this.Fw,h=W.rect.n(),S=this.hd.B(),k=W.k8.slice(0);
|
|
for(var Q=0;Q<h;Q++)if(W.zN[Q]<S)k[Q]=128;N.wM(W.IX,4294967295);N.ce(k,W.IX,0);N.ce(k,W.IX,1);N.ce(k,W.IX,2);
|
|
W.vt=W.rect;this.R3()};ew.prototype.R3=function(){var W=this.Fw,p,P,t=0,M=0,U=0;this.a1o();var h=W.rect,S=h.e,k=h.Z,I=N.U(h.n()),q=W.vM;
|
|
N.sN(W.IX,I,0);for(var Q=0;Q<I.length;Q++){if(q[(Q<<2)+3]!=255)continue;var i=I[Q];if(i==0)t++;else if(i==255)M++;
|
|
else U++}if(t*M*U!=0){if(this.Gu==0)P=N.Yb.Yb(h,q,I);else{var z=this.ZD.B();for(var D=1;D<k;D++)for(var R=1;
|
|
R<S;R++){var Q=D*S+R,O=I[Q],b=I[Q-1];if(O==0&&b==255||O==255&&b==0){p="The Red and Green should never touch! Erase it with Grey.";
|
|
break}}var w=Date.now(),A=this.Fw.aqM;N.WQ(I,A.wN);a.tl.n4(A,!0);var g=Math.ceil(this.hd.B()/2);if(g==0){P=q.slice(0);
|
|
N.ce(A.q,P,3)}else{var E=A.q.slice(0),j=A.q.slice(0);for(var x=0;x<g;x++){for(var D=1;D<k-1;D++)for(var R=1;
|
|
R<S-1;R++){var Q=D*h.e+R,d=E[Q];if(E[Q-S]!=d||E[Q-1]!=d||E[Q+1]!=d||E[Q+S]!=d)j[Q]=128;else j[Q]=d}var L=E;
|
|
E=j;j=L}P=N.Yb.Yb(h,q,E,20,!1)}}}else{P=q.slice(0);N.ce(I,P,3)}for(var Q=3;Q<P.length;Q+=4)if(P[Q]>q[Q])P[Q]=q[Q];
|
|
if(h.xX(W.rect))W.I4=P;else N.zt(P,h,W.I4,W.rect);this.aa1();if(p)alert(p,4e3)};ew.prototype.a1o=function(W){var h=this.Fw,S=h.vt;
|
|
N.zt(h.vM,h.rect,h.k5,h.rect,S,!0);var k=h.IX;if(this.Gu==1){var p=new Uint32Array(256);p[0]=4278190335;
|
|
p[255]=4278255360;var I=h.rect.n();k=k.slice(0);var q=new Uint32Array(k.buffer);for(var Q=0;Q<I;Q+=2){q[Q]=p[q[Q]&255];
|
|
q[Q+1]=p[q[Q+1]&255]}}N.a.ha("norm",k,h.rect,h.k5,h.rect,S,.3);this.C_.f([{rc:h.rect,data:h.k5.buffer}])};
|
|
ew.prototype.aa1=function(W){var h=this.Fw;N.wM(h._Z,[0,4294967295,4278190080][this.ML.B()]);N.a.ha("norm",h.I4,h.rect,h._Z,h.rect,h.rect,1);
|
|
this.fZ.f([{rc:h.rect,data:h._Z.buffer}])};ew.prototype.CU=function(W){var h=this.h6,S=this.Fw,k=this.Eu.B(),p=h.g[h.w[0]],I=new em(y.E.u,!0);
|
|
I._Q=!0;var q=p.rect.clone();if(k==0&&p.jP()||k!=0&&!p.jP()){I.b=a.m5;I.data={o:$.EO,i:h.w[0]};this.c(I)}if(h.q!=null){I.b=a.Ck;
|
|
I.data={o:"fromAction",eS:a.I6.tQ()};this.c(I)}if(k==0){var P=h.g.slice(0),t=h.yA();t.hq(p.getName());
|
|
P.splice(h.w[0]+1,0,t);t.rect=q;t.buffer=S.I4;t.G();I.b=a.m5;I.data={o:$.s9,vR:P,mQ:[h.w[0]+1],rO:[7,11]};
|
|
this.c(I)}if(k==1){var M=p.kX();I.b=a.m5;I.data={o:$.wD,a9U:!0};this.c(I);var U=p.kX();U.channel=N.U(q.n());
|
|
U.rect=q;U.color=0;U.VT=!0;N.sN(S.I4,U.channel,3);if(M){var i=U.iq(M);U.rect=i.rect;U.channel=i.channel;
|
|
U.color=i.color}U.Yn();p.r9()}if(k==2){var z={rect:q,channel:N.U(q.n())};N.sN(S.I4,z.channel,3);I.b=a.Ck;
|
|
I.data={o:"setsel",q:z,rO:this.rX};this.c(I)}this.close()};function e7(){aB.call(this,[1,13],"locstor");
|
|
this.Nm=null;this.EG=[];var W=this.body,h=m.O("p");h.textContent="These files are loaded every time you start Photopea.";
|
|
W.appendChild(h);this.ahZ=0;this.lF=m.O("span");W.appendChild(this.lF);this.lF.setAttribute("style","display:inline-block; width:12em; font-weight:bold;");
|
|
var S=m.O("span","form");W.appendChild(S);this.Ij=new aA([5,4],!1,null,!0);this.Ij.h("click",this.a1G,this);
|
|
S.appendChild(this.Ij.m);this.aqp=new aA("Get all as ZIP",!1,null,!0);this.aqp.h("click",this.yF,this);
|
|
S.appendChild(this.aqp.m);this.w0=new e1(!0);this.w0.parent=this;this.w0.KM(1);W.appendChild(this.w0.m);
|
|
this.w0.m.setAttribute("style","width: 40em; height: 25em")}e7.prototype=new aB;e7.prototype._=function(){aB.prototype._.call(this);
|
|
this.lF.textContent=dq.get([13,2])+": "+di.lT(this.ahZ);this.Ij._()};e7.prototype.IF=function(W,h){this.Nm=W;
|
|
if(h==f6.DR)this.Yo()};e7.prototype.Yo=function(W,h){var S=this.Nm.tX.o6,t=0;this.EG=[];for(var k in S)this.EG.push(k);
|
|
this.EG.sort(function(U,i){U=U.split(".");i=i.split(".");return U[1]==i[1]?U[0]<i[0]?-1:1:U[1]<i[1]?-1:1});
|
|
var p=Math.floor(100*m.F()),I=Math.floor(16*m.F()),q=[],P=[];for(var Q=0;Q<this.EG.length;Q++){var k=this.EG[Q],M=e7.qP(k,S[k],p,I);
|
|
q.push(M);P.push(k);t+=S[k].byteLength}this.w0.V5(q,P,p,I);this.ahZ=t;this._()};e7.prototype.a1G=function(W){var h=this.w0.B();
|
|
if(h.length==0){alert("Select a file first.");return}this.w0.f([]);var S=this.Nm.tX.o6;for(var Q=0;Q<h.length;
|
|
Q++)delete S[this.EG[h[Q]]];var k=new em(y.E.W,!0);k.data={o:y.D.XO,nP:f6.DR};this.c(k)};e7.prototype.yF=function(W){var h=this.Nm.tX.o6,S={};
|
|
for(var k in h)S[k]=new Uint8Array(h[k]);var p=UZIP.encode(S);jH.save(p,"resources.zip")};e7.qP=function(W,h,S,k){var p=m.O("canvas"),P=0;
|
|
p.width=S;p.height=k;var I=p.getContext("2d"),q=W.split(".").pop().toLowerCase();for(var Q=0;Q<q.length;
|
|
Q++)P+=q.charCodeAt(Q)*613<<8*Q;I.fillStyle="#"+N.fl(P&16777215);I.fillRect(0,0,20,k);var t=Math.floor(14*m.F());
|
|
I.fillStyle="#000000";I.font="bold "+t+"px sans-serif";var M=(k-t)/2,U=di.lT(h.byteLength),i=I.measureText(U);
|
|
I.fillText(U,S-12-i.width,k-M);return p.toDataURL()};function hG(){aB.call(this,"Preset Manager","pmanager");
|
|
this.Nm=null;this.Bs=new fx([12,44],[[9,3],[12,37],[12,62],[11,6],[12,77],[12,21]]);this.Bs.h(y.E.l,this.Yo,this);
|
|
this.body.appendChild(this.Bs.m);var W=m.O("div","flexrow");this.body.appendChild(W);var h=this.agn=m.O("div");
|
|
W.appendChild(h);var S=m.O("div","form");W.appendChild(S);S.setAttribute("style","width:140px; margin-left:12px");
|
|
this.aeP=[f6.og,f6.$h,f6.OA,f6.xQ,f6.JF,f6.sD];this.LP=[new f5,new h4,new dd,new dD,new e9,new i2];for(var Q=0;
|
|
Q<this.LP.length;Q++)this.LP[Q].parent=this;this.Ii=[];for(var Q=0;Q<4;Q++){var k=new aA("Hello",!0,null,!0);
|
|
k.h("click",this.Qx,this);this.Ii.push(k);S.appendChild(k.m)}this.Yo()}hG.prototype=new aB;hG.prototype.BQ=function(W){return W==hW.UP||W==hW.uf};
|
|
hG.prototype.Qx=function(W){var Q=this.Ii.indexOf(W.target);this.LP[this.Bs.B()].ca(Q)};hG.prototype._=function(){aB.prototype._.call(this);
|
|
this.Bs._();for(var Q=0;Q<this.LP.length;Q++)this.LP[Q]._();var W=this.Ii,h=this.Bs.B(),S=f6.x6[this.aeP[h]],k=S[0].toUpperCase();
|
|
W[0].U6([[23,6],"."+k]);W[1].U6(["VAR0 ."+k,[1,8]]);W[2].U6([6,37]);W[3].U6([5,4])};hG.prototype.IF=function(W,h){this.Nm=W;
|
|
this.Yo()};hG.prototype.Yo=function(W,h){if(!m.oq(this.m))return;this._();m.hP(this.agn);this.agn.appendChild(this.LP[this.Bs.B()].Co);
|
|
var S=this.LP,k=this.Nm;if(k==null)return;S[0].EX(k.zl);S[1].sS(k.Ps,k.lL);S[1].EX(k.e7);S[2].EX(k.n5);
|
|
S[3].EX([k.J5,k.n5]);S[4].EX(k.Ng);S[5].EX(k.G7)};function iH(W,h,S){aB.call(this,h,"cwindow");this.a7S=new eC(S[0],S[1]-33);
|
|
this.D5=m.O("div","form");this.D5.setAttribute("style","width:"+(S[2]-S[0])+"px; height:"+(S[3]-S[1])+"px");
|
|
this.body.appendChild(this.D5)}iH.prototype=new aB;iH.prototype.X0=function(W,h){return this.a7S.clone()};
|
|
function fK(){aB.call(this,["PSD VAR0",[25,0]],"templates");this.as2=null;this.LA=null;this.qD=0;this.f_=null;
|
|
this.body.setAttribute("style","padding:0");this.s_=new aA("Add Templates",null,null,!0);this.body.appendChild(this.s_.m);
|
|
this.s_.h("click",this.ak9,this);this.s_.m.setAttribute("style","position:absolute; margin-top: -28px; margin-left:150px");
|
|
this.a9I=new aA("New Template",null,null,!0);this.a9I.h("click",this.ao7,this);this.asX=new aA("Upload Current Document as a Template",null,null,!0);
|
|
this.asX.h("click",this.a4R,this);this.LI=m.O("iframe","scrollable");this.LI.setAttribute("style","border:none; margin:0; padding:0;");
|
|
this.vh=m.O("div","form scrollable padded");this._h=m.O("div","form scrollable padded label12");var W=[],h=fK.Rw;
|
|
this.K9=[];for(var S in h){var k=parseInt(S.slice(1)),p=k%10==0?"":"\u2800\u2800- ";W.push(p+h[S]);this.K9.push(k)}this.Dy=[new i3("Name",null,30),new i3("Description",null,30,4),new i3("File"," www.Photopea.com#i...",17),new i3("Thumbnail URL","* Use Imgur.com etc., ratio 3:2",17),new fx("Category",W),new aA("<< Back",null,null,!0),new aA("Save",null,null,!0),new gs("Publish your PSD: File - Publish Online - PSD. Use that URL as \"File\"."),new gs("Get a Thumbnail URL: File - Publish Online - JPG. At Imgur.com, right-click your image and choose \"Copy Image Address\".")];
|
|
for(var Q=0;Q<this.Dy.length;Q++){var I=this.Dy[Q];this._h.appendChild(I.m);I.parent=this;if(Q!=5)m.YI(this._h);
|
|
if(I instanceof aA)I.h("click",this.a2I,this)}this.body.appendChild(this.LI)}fK.prototype=new aB;fK.prototype.X0=function(W,h){return new eC(0,0)};
|
|
fK.prototype.UW=function(W,h){this.s6=W;this.R_=h;this.pv=null;h=h-4;W=W;var S=this.vh;S.style.width=W-12+"px";
|
|
S.style.height=h-12+"px";var S=this._h;S.style.width=W-12+"px";S.style.height=h-12+"px";var S=this.LI;
|
|
S.style.width=W+"px";S.style.height=h+"px";this.ky()};fK.prototype._=function(){aB.prototype._.call(this)};
|
|
fK.prototype.Yo=function(W,h,S,k){this.pv=W;this.ak9(null,!1)};fK.prototype.ak9=function(W,h){var S=h!=null?h:m.oq(this.LI);
|
|
if(S){if(!aM.lZ()){alert("You need to log in first!");return}var k=aM.YE();this.LA=k.tpl?k.tpl.list:[];
|
|
this.ky()}else{this.LI.setAttribute("src","");this.LI.setAttribute("src","plugins/tpls")}this.body.removeChild(this.body.children[this.body.children.length-1]);
|
|
this.body.appendChild(S?this.vh:this.LI);this.s_.U6(S?"All Templates":"Add Templates")};fK.prototype.ky=function(){var W=this.LA,p=450;
|
|
if(W==null)return;var h=this.vh;m.hP(h);var S=m.O("h1");S.textContent="Share your PSD templates with the world!";
|
|
var k=m.O("h3");k.textContent="Users won't be able to download a PSD, they can only export a JPG or a PNG after editing.";
|
|
h.appendChild(S);h.appendChild(k);h.appendChild(this.a9I.m);h.appendChild(this.asX.m);m.YI(h);p=(this.s6-20)/Math.max(1,Math.floor(this.s6/p))-42;
|
|
var I="display:inline-block; width:"+p+"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 Q=W.length-1;Q>=0;Q--){var q=W[Q],P=m.O("div");h.appendChild(P);P.setAttribute("style",I);var t=m.O("img");
|
|
P.appendChild(t);t.setAttribute("src",q.thmb);t.setAttribute("style","float:left; height:10em; width:10em; object-fit: contain; margin-right: 1em; margin-bottom:1em;");
|
|
var M=m.O("h3");P.appendChild(M);M.textContent=q.name;M.setAttribute("style","margin:0 0 10px 0");var U=m.O("p");
|
|
P.appendChild(U);U.textContent=q.desc;U.setAttribute("style","height:76px; overflow:hidden; margin-bottom: 6px;");
|
|
for(var i=0;i<2;i++){var z=new aA(i==0?"Edit":"Delete",null,null,!0);z.agK=Q;z.t3=i==0;z.h("click",this.agk,this);
|
|
P.appendChild(z.m)}}};fK.prototype.a4R=function(W){if(this.pv==null){alert("No document opened.");return}var h=confirm("Your document will be uploaded to Photopea.com and a preview to Imgur.com. Proceed?");
|
|
if(!h)return;var S=new em(y.E.W,!0);S.data={o:y.D.Az,t8:"psd",o4:this.a5C.bind(this)};this.c(S)};fK.prototype.a5C=function(W){this.as2=W;
|
|
var h=new em(y.E.W,!0);h.data={o:y.D.Az,t8:"jpg",o4:this.acI.bind(this)};this.c(h)};fK.prototype.acI=function(W){this.f_={catg:0,desc:"",file:this.as2.split("#i").pop(),name:this.pv.name.split(".")[0],thmb:W,utme:""};
|
|
this.t3()};fK.prototype.ao7=function(W){this.f_={catg:0,desc:"",file:"",name:"",thmb:"",utme:""};this.t3()};
|
|
fK.prototype.agk=function(W){this.qD=W.target.agK;if(!W.target.t3){this.LA.splice(this.qD,1);this.yF();
|
|
this.ky();return}this.t3()};fK.prototype.t3=function(){this.body.removeChild(this.vh);this.body.appendChild(this._h);
|
|
var W=["name","desc","file","thmb"],h=this.f_?this.f_:this.LA[this.qD];for(var Q=0;Q<4;Q++){var S=h[W[Q]];
|
|
if(S!=""&&Q==2)S="https://photopea.com#i"+S;this.Dy[Q].f(S)}this.Dy[4].f(this.K9.indexOf(h.catg))};fK.prototype.a2I=function(W){if(this.Dy.indexOf(W.target)==6){var h=this.Dy[3].B().trim(),S=h.startsWith("http")&&(h.endsWith(".jpeg")||h.endsWith(".jpg")||h.endsWith(".png"));
|
|
if(!S){alert("Thumbnail URL is incorrect.");return}var k=new XMLHttpRequest,p="mirror.php?url="+encodeURIComponent(h);
|
|
k.open("GET",p);k.responseType="arraybuffer";k.onload=this.ak5.bind(this);k.send()}else this.I5()};fK.prototype.ak5=function(W){var h=W.target.response,S=h.byteLength;
|
|
if(S>2e5){alert("Thumbnail is too large ("+di.lT(S)+"). Make it under 200 kB.");return}var k=["name","desc","file","thmb"],p=this.f_?this.f_:this.LA[this.qD];
|
|
for(var Q=0;Q<4;Q++){var I=this.Dy[Q].B().trim();if(I.length==0){alert("One of values is empty.");return}if(Q==2){var q=I.split("#i");
|
|
if(q.length!=2||q[1].length!=8){alert("File ID is incorrect.");return}I=q.pop()}p[k[Q]]=I}p.catg=this.K9[this.Dy[4].B()];
|
|
if(p.utme.length==0)p.utme=""+Math.round(Date.now()/1e3);if(this.f_)this.LA.push(this.f_);this.yF();
|
|
this.I5()};fK.prototype.I5=function(){this.f_=null;this.body.removeChild(this._h);this.body.appendChild(this.vh);
|
|
this.ky()};fK.prototype.yF=function(){var W=aM.YE();if(this.LA.length==0)delete W.tpl;else W.tpl={list:JSON.parse(JSON.stringify(this.LA))};
|
|
aM.WW(W,function(){alert("Saved.")})};fK.Rw={c0:"Mockups",c1:"Mobile & Web",c2:"Print",c3:"Product",c10:"Social Media",c11:"Youtube",c12:"Instagram",c13:"Facebook",c14:"Memes",c15:"Signs",c20:"Print",c21:"Cards",c22:"Invitations",c23:"Brochures",c30:"Mobile",c40:"Websites",c50:"Presentations",c60:"Other"};
|
|
function aj(){aB.call(this,"Make Selection","makesel");this.Nm=null;var W=m.O("div","form");this.body.appendChild(W);
|
|
this.Wq=new dB([12,25,1]);this.Wq.f(!0);W.appendChild(this.Wq.m);m.YI(W);this.MP=new gF(!0);W.appendChild(this.MP.m);
|
|
this.yB=m.s1(this,this.body)}aj.prototype=new aB;aj.prototype._=function(){aB.prototype._.call(this);
|
|
this.MP._();this.Wq._();this.yB._()};aj.prototype.CU=function(W){var h=new em(y.E.u,!0);h.b=a.Ck;h.data={o:"frompath",cM:[null,0,this.MP.B(),!this.Wq.B()]};
|
|
this.close();this.c(h)};function ao(){aB.call(this,["VAR0 PSD/PSB",[1,2]],"savepsb");this.pv=null;this.Ma=null;
|
|
this.Y3=null;var W=this.aps=m.O("div","form");W.setAttribute("style","width:20em");this.body.appendChild(W);
|
|
this.rL=new g1([12,50],["PSD","PSB"]);this.rL.h(y.E.l,this.n3,this);W.appendChild(this.rL.m);m.k6(W);
|
|
var h=new gs("Minify the file");W.appendChild(h.m);m.YI(W);var S=["Blank preview image","ZIP for pixel data","Remove Smart Object pixels","Put the file into ZIP"];
|
|
this.t1=[];for(var Q=0;Q<S.length;Q++){var k=new dB(S[Q]);this.t1.push(k);W.appendChild(k.m);k.h(y.E.l,this.n3,this)}m.k6(W);
|
|
this.fw=new gs("aa.psd");this.v4=new gs("10 kB");W.appendChild(this.v4.m);this.a6K=new gs("1000 B");
|
|
W.appendChild(this.a6K.m);this.yB=new aA([1,2],!0,null,!0);this.yB.h("click",this.CU,this);W.appendChild(this.yB.m);
|
|
this.D6=new aA(["VAR0 (Google Drive)",[1,2]],!0,null,!0);this.D6.h("click",this.CU,this);W.appendChild(this.D6.m);
|
|
this.h("closebtn",this.hL,this)}ao.prototype=new aB;ao.prototype.Yo=function(W,h,S,k){var p=m.oq(this.D6.m),I=W.SF!=null&&W.SF.r_=="psd";
|
|
if(I&&!p)this.aps.appendChild(this.D6.m);if(!I&&p)this.aps.removeChild(this.D6.m);for(var Q=0;Q<this.t1.length;
|
|
Q++)this.t1[Q].f(!1);this.pv=W;this.n3()};ao.prototype.CU=function(W){if(W.target==this.yB)jH.save(this.Ma,this.Y3);
|
|
else{if(this.t1[3].B()){alert("You should not save a ZIP as a PSD to Google Drive.");return}eX.abV(this.pv,this.Ma)}};
|
|
ao.prototype.hL=function(){this.pv=null;this.Ma=null};ao.prototype.n3=function(){var W=this.pv,h=[!1,!1,!1,!1];
|
|
for(var Q=0;Q<3;Q++)h[Q]=this.t1[Q].B();var S=this.t1[3].B(),k=h[3]=this.rL.B()==1,p=W.name.slice(0,W.name.length-3),I=this.Ma=hI.J$("PSD").i4(W,0,0,h),g8=this.Y3=p+"ps"+(k?"b":"d");
|
|
if(S){var q={};q[g8]=new Uint8Array(I);I=this.Ma=UZIP.encode(q);g8=this.Y3=p+"zip"}this.fw.f(g8);this.v4.f(di.lT(I.byteLength));
|
|
this.v4.m.style["font-size"]="2em";this.a6K.f(" \u2001 "+I.byteLength+" B");this.yB.U6(dq.get([1,2])+" \""+g8+"\"")};
|
|
ao.prototype._=function(){aB.prototype._.call(this);this.yB._();this.D6._()};function bn(W,h,S,k){eS.call(this);
|
|
this.name=W;this.ag7=S;this.bP=k;this.Ub=m.O("div","");this.Ub.setAttribute("draggable","true");this.Ls=m.O("div","pbody");
|
|
this.Za=new aA("",!1,"");this.Za.parent=this;this.a8K=m.O("span","cross");this.zj=m.O("span","label");
|
|
var p=this.a6G.bind(this);this.Ub.addEventListener("mousedown",this.an2.bind(this),!1);this.Ub.addEventListener("contextmenu",p,!1);
|
|
this.Za.m.addEventListener("contextmenu",p,!1);this.a8K.addEventListener("mousedown",this.uh.bind(this),!1);
|
|
this.Ub.appendChild(this.zj);if(h)this.Ub.appendChild(this.a8K);this.Kb=!1;this.Mn=new jv([{name:[1,12,0]}]);
|
|
this.Mn.h("select",this.uh,this);this.zj.textContent=W}bn.prototype=new eS;bn.prototype.w4=function(){return null};
|
|
bn.prototype._=function(){var W=dq.get(this.name),h=this.s6==0?22:Math.round(2+this.s6/50),S=W.length>h;
|
|
this.zj.textContent=S?W.slice(0,h-2):W;if(S)for(var k=0;k<2;k++){var p=m.O("span");p.textContent=W.charAt(h-2+k);
|
|
p.setAttribute("style","opacity:"+(.6-k*.4));this.zj.appendChild(p)}var I=W.split(" "),q=I.length==2?I[0].substring(0,2)+I[1][0]:W.substring(0,3);
|
|
if(q.charCodeAt(0)>=11776)q=q.substring(0,1);var P=this.ag7;if(P==null)this.Za.U6(q,W);else{var t;if(P.startsWith("---"))t="<img src=\""+PIMG[P.slice(3)]+"\" class=\"autoscale gsicon\" style=\"margin:2px 4px;\"/>";
|
|
else if(P.indexOf("\"")==-1)t="<img src=\""+P+"\" alt=\""+W+"\" height=\"18\" width=\"18\" loading=\"lazy\" style=\"margin:1px 3px;\" />";
|
|
this.Za.U6(t,W)}};bn.prototype.enable=function(){this.Ls.setAttribute("class","pbody")};bn.prototype.disable=function(){this.Ls.setAttribute("class","pbody disabled")};
|
|
bn.prototype.IF=function(W,h){};bn.prototype.Yo=function(W,h,S){};bn.prototype.B_=function(W){};bn.prototype.UW=function(W,h){};
|
|
bn.prototype.sm=function(W){this.name=W;this._()};bn.prototype.cR=function(){};bn.prototype.an2=function(W){if(W.button==0)this.c(new em("select",!1))};
|
|
bn.prototype.a6G=function(W){m.xa(W);if(this.bP!=null&&isNaN(this.bP))return;var h=m.DJ(W,document.body),S=this.Mn;
|
|
S.update(null);S._();S.parent=this;var k=new em(y.E.W,!0);k.data={o:y.D.zS,gh:S,x:h.x+1,y:h.y+1};this.c(k)};
|
|
bn.prototype.Us=function(){this.uh({})};bn.prototype.uh=function(W){if(W.stopPropagation)W.stopPropagation();
|
|
if(this.bP!=null&&!isNaN(this.bP)){var h=new em(y.E.W,!0);h.data={o:y.D.QV,gh:this.Mn};this.c(h);h.data={o:y.D.XO,nP:f6.kh,k:parseFloat(this.bP),qb:"del"};
|
|
this.c(h)}else if(this.a9L())this.c(new em(y.E.UL,!1))};bn.prototype.a9L=function(W){return!0};bn.prototype.Qb=function(W,h,S,k,p){};
|
|
bn.prototype.Go=function(W,h,S,k,p){};bn.prototype.he=function(W,h,S,k,p){};bn.AR=function(W,h){if(W.childElementCount!=0)return;
|
|
var S=W.textContent;this.IV=this.a76.bind(this);this.a0F=this.a27.bind(this);this.A3=h;this.pz=W;this.akw=S;
|
|
var k=m.O("input","");k.setAttribute("type","text");k.setAttribute("size","10");k.setAttribute("value",S);
|
|
m.hP(W);W.appendChild(k);k.select();k.focus();m.j7(W);W.addEventListener("keyup",this.IV,!1);document.body.addEventListener("mousedown",this.a0F,!1)};
|
|
bn.AR.prototype.a76=function(W){var h=hW.IO,S=h(W.code,hW.l$);if(h(W.code,hW.y$)||S)this.agW(S)};bn.AR.prototype.a27=function(W){var h=W.target;
|
|
if(h.tagName&&h.tagName.toLowerCase()=="input")return;this.agW(!0)};bn.AR.prototype.agW=function(W){var h=this.pz,S=h.firstChild.value;
|
|
h.removeEventListener("keyup",this.IV);document.body.removeEventListener("mousedown",this.a0F);if(W&&S!=""){this.A3(S)}else{m.hP(h);
|
|
h.textContent=this.akw}};bn.zn={pD:"0",a5p:"1",m5:"2",aed:"3",asJ:"4",a0:"5",CSS:"6",og:"7",amC:"8",a7B:"9",ajS:"10",adI:"11",aqD:"12",Ov:"13",$q:"14",a9j:"15",anD:"16",Da:"17",abu:"18",a2Z:"19",a49:"20",xQ:"21"};
|
|
function cY(){bn.call(this,[9,9],!1,"---panels/actions",bn.zn.adI);this.Nm=null;this.Pe=[0,0];this.S_=m.O("div","padded scrollable");
|
|
this.S_.setAttribute("style","width:260px; height:260px");this.Ls.appendChild(this.S_);this.h(y.E.l,this.G0,this);
|
|
this.fE=m.O("div","lpfoot");this.Ls.appendChild(this.fE);this.LP=[];var W="<svg class=\"gsicon\" viewBox=\"0 0 14 18\" width=\"14\" height=\"18\" fill=\"black\">",h="</svg>",S=W+"<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\" />"+h,k=W+"<path d=\"M0,2 L14,9 L0,16 Z\" />"+h;
|
|
this.agr=W+"<circle cx=\"7\" cy=\"9\" r=\"6\" />"+h;this.afE=W+"<path d=\"M2,4 L12,4 L12,14 L2,14 Z\" />"+h;
|
|
var p=[this.agr,k,"lrs/folder","lrs/newlayer","lrs/bin",S],I=[[15,8,0],[5,8],[15,8,1],[15,8,2],[5,4],[1,2]];
|
|
for(var Q=0;Q<p.length;Q++){var q=p[Q];if(1<Q&&Q!=p.length-1)q="<img src=\""+PIMG[p[Q]]+"\" class=\"gsicon\" />";
|
|
var P=new aA(q,!1,I[Q]);P.h("click",this.ahs,this);this.fE.appendChild(P.m);this.LP.push(P)}}cY.prototype=new bn("");
|
|
cY.prototype._=function(){bn.prototype._.call(this);for(var Q=0;Q<this.LP.length;Q++)this.LP[Q]._()};
|
|
cY.prototype.ahs=function(W){var Q=this.LP.indexOf(W.currentTarget),h=this.Pe,S=this.Nm,k=S.bI;if(Q==0){var p,I=S.Qm;
|
|
if(k.length==0){alert("Create an Action Set first.");return}if(h.length<2){alert("Select a target action first.");
|
|
return}if(I==null){p=this.afE;I=this.Pe}else{p=this.agr;I=null}this.LP[0].U6(p);S.Qm=I}else if(Q==1)this.aq0();
|
|
else if(Q==2||Q==3){var q={rO:"Action Set "+k.length,Vz:[],exp:!0};if(Q==2||k.length==0){h=[k.length];
|
|
k.push(q)}if(Q==3){var P=k[h[0]].Vz;h=[h[0],P.length];P.push({rO:"Action "+P.length,color:0,Vz:[],a4$:!1,shift:!1,exp:!0,Kr:P.length})}this.Pe=h;
|
|
this.rD()}else if(Q==4){var t;if(h.length==1)t=k;else if(h.length==2)t=k[h[0]].Vz;else t=k[h[0]].Vz[h[1]].Vz;
|
|
var M=h.length-1;t.splice(h[M],1);if(t.length==0)h.pop();else while(h[M]>=t.length)h[M]--;if(h.length==0)h.push(0);
|
|
this.rD()}else if(Q==5){if(k.length==0){alert("No Actions Present.");return}var U=new em(y.E.W,!0);U.data={o:y.D.tJ,a6Z:f6.u,wJ:h[0]};
|
|
this.c(U)}};cY.prototype.G0=function(W){var h=this.Nm.bI,S=W.data.o,k=W.data.c7;if(S=="sel")this.Pe=k;
|
|
if(S=="fold"){if(k.length==1)h[k[0]].exp=!h[k[0]].exp;else h[k[0]].Vz[k[1]].exp=!h[k[0]].Vz[k[1]].exp}if(S=="enab"){var p=h[k[0]].Vz[k[1]].Vz[k[2]];
|
|
p.P=!p.P}if(S=="nchange"){if(k.length==1)h[k[0]].rO=W.data.bZ;else h[k[0]].Vz[k[1]].rO=W.data.bZ}this.rD()};
|
|
cY.prototype.IF=function(W,h){this.Nm=W;if(h==f6.u||h==f6.W8)this.rD()};cY.prototype.rD=function(){if(this.Nm==null)return;
|
|
m.hP(this.S_);var W=this.Nm.bI;if(W.length==0)return;var h=JSON.stringify(this.Pe);for(var Q=0;Q<W.length;
|
|
Q++){var S=W[Q],k=new cY.KI([Q],h,S.exp,S.rO.split("=").pop());k.parent=this;this.S_.appendChild(k.m);
|
|
if(!S.exp)continue;for(var p=0;p<S.Vz.length;p++){var I=S.Vz[p],k=new cY.KI([Q,p],h,I.exp,I.rO.split("=").pop());
|
|
k.parent=this;this.S_.appendChild(k.m);if(!I.exp)continue;for(var q=0;q<I.Vz.length;q++){var P=I.Vz[q],k=new cY.KI([Q,p,q],h,null,dq.get(fP.aa5(P)),P.P);
|
|
k.parent=this;this.S_.appendChild(k.m)}}}};cY.prototype.aq0=function(){var W=this.Nm.bI,h=this.Pe;if(W.length==0){alert("No Actions Present");
|
|
return}if(h.length==1){alert("Select an Action first");return}if(this.Nm.Qm!=null){alert("You can not apply actions while recording actions");
|
|
return}if(h.length==1)h.push(0);var S=W[h[0]],k=S.Vz[h[1]],p=new em(y.E.W,!0);p.data={o:y.D.se,cM:[k.rO,S.rO]};
|
|
this.c(p)};cY.KI=function(W,h,S,k,p){eS.call(this);this.c7=W;var I=this.c7.length-1;this.m=m.O("div","layeritem"+(JSON.stringify(W)==h?" selected":""));
|
|
this.a7=m.O("div","head");this.m.appendChild(this.a7);this.a7.setAttribute("style","height:24px");this.YT=m.O("div","headL");
|
|
this.a7.appendChild(this.YT);if(I!=0){var q=m.O("div");q.style.width=I*20+"px";this.YT.appendChild(q)}if(S!=null){var P=this.ahD=m.O("div",S?"open":"closed");
|
|
this.YT.appendChild(P)}else{var t=this.atB=m.O("div","cmark");t.setAttribute("style","background-size:12px 12px; opacity:"+(p?1:.3));
|
|
this.YT.appendChild(t)}if(I==0){var M=m.O("div","folder");this.YT.appendChild(M)}var U=this.zj=m.O("div","label");
|
|
U.textContent=k;this.YT.appendChild(U);this.m.addEventListener("mouseup",this.sL.bind(this),!1)};cY.KI.prototype=new eS;
|
|
cY.KI.prototype.sL=function(W){if(W.detail==1&&W.target.tagName.toLowerCase()!="input"){var h="sel";
|
|
if(W.target==this.ahD)h="fold";if(W.target==this.atB)h="enab";var S=new em(y.E.l,!0);S.data={o:h,c7:this.c7};
|
|
this.c(S)}else if(this.c7.length<3)var k=new bn.AR(this.zj,this.A3.bind(this))};cY.KI.prototype.A3=function(W){var h=new em(y.E.l,!0);
|
|
h.data={o:"nchange",bZ:W,c7:this.c7};this.c(h)};function cF(){bn.call(this,[3],!1,"---lrs/adj",bn.zn.abu);
|
|
this.Ls.setAttribute("style","text-align:center; padding:6px; min-width:220px");this.LP=[];var Q=0;
|
|
for(var W in bS.names){var h=new aA("<img src=\""+PIMG["adj/"+W]+"\" class=\"autoscale gsicon\" style=\"margin:4px 4px;\"/>",!1,bS.names[W]);
|
|
h.h("click",this.aku,this);this.LP.push(h);this.Ls.appendChild(h.m);if(Q==4||Q==10)m.YI(this.Ls);Q++}}cF.prototype=new bn("");
|
|
cF.prototype._=function(){bn.prototype._.call(this);for(var Q=0;Q<this.LP.length;Q++)this.LP[Q]._()};
|
|
cF.prototype.aku=function(W){var h=this.LP.indexOf(W.target),S=g2.Yy()[h],k=new em(S.Y,!0);k.data=S.R;
|
|
this.c(k)};function aP(){bn.call(this,[12,22],!1,null,bn.zn.xQ);this.S_=m.O("div","padded");this.Ls.appendChild(this.S_);
|
|
this.Aj=new dD(null,17.7,10);this.Aj.parent=this;this.Aj.h(y.E.l,this.Zk,this);this.S_.appendChild(this.Aj.Co)}aP.prototype=new bn("");
|
|
aP.prototype.Zk=function(W){var h=this.Aj.B(),S=new em(y.E.u,!0);S.data={o:"setstl",k:h.dS};S.b=a.gk;
|
|
this.c(S);S.data={o:"confirm"};this.c(S)};aP.prototype.IF=function(W,h){if(h==f6.xQ||h==f6.W8){this.Aj.EX([W.J5,W.n5])}};
|
|
var hU=function(){function W(){bn.call(this,[9,3],!1,"---panels/brush",bn.zn.og);this.__=null;this._n=null;
|
|
this.Nm=null}W.prototype=new bn("");W.prototype.FY=function(){var q=m.O("div","");this.Ls.appendChild(q);
|
|
this.jV=m.O("div","bordered cell");this.jV.setAttribute("style","width:10em; height:28.5em;");q.appendChild(this.jV);
|
|
this.WH=[];this.Zh=null;this.KA=[];var P=this.a6v.bind(this);this.FC=[new S,new k,new p,new I];for(var Q=0;
|
|
Q<this.FC.length;Q++){var t=m.O("div","listitem"),M=this.FC[Q].Ok,U=null;if(Q==0){this.Zh=new gs(M);
|
|
t.appendChild(this.Zh.m)}else{U=new dB(M,!1);U.h(y.E.l,this.ar7,this);t.appendChild(U.m)}this.KA.push(U);
|
|
this.jV.appendChild(t);this.WH.push(t);t.addEventListener("click",P,!1)}this.Mf=m.O("div","cell padded");
|
|
q.appendChild(this.Mf);for(var Q=0;Q<this.FC.length;Q++)this.FC[Q].h("brushchange",this.aci,this);this.setItem(0);
|
|
this.N=m.O("canvas");this.N.height=10;q.appendChild(this.N);this.ds=this.N.getContext("2d");this.R3()};
|
|
W.prototype.UW=function(q,P){if(this.s6==q)return;this.s6=q;this.R_=P;this.R3()};W.prototype.cR=function(){if(!m.oq(this.Ls))return;
|
|
if(this.jV){this.R3();return}this.FY();this._();this.IF(this.Nm,f6.W8)};W.prototype._=function(){bn.prototype._.call(this);
|
|
if(this.jV==null)return;this.Zh._();for(var Q=1;Q<this.KA.length;Q++)this.KA[Q]._();for(var Q=0;Q<this.FC.length;
|
|
Q++)this.FC[Q]._()};W.prototype.aci=function(q){var P=this.FC.indexOf(q.currentTarget),t=JSON.parse(JSON.stringify(this.FC[P]._n)),M=new em(y.E.W,!0);
|
|
M.data={o:y.D.XO,nP:f6.Yk,_n:t};this.c(M)};W.prototype.ar7=function(q){this.aff(this.KA.indexOf(q.currentTarget),q.currentTarget.KB())};
|
|
W.prototype.a6v=function(q){var Q=this.WH.indexOf(q.currentTarget);if(q.target.tagName.toLowerCase()=="input")return;
|
|
if(this.KA[Q]&&!this.KA[Q].KB()){this.KA[Q].$V();this.aff(Q,!0)}this.setItem(Q)};W.prototype.aff=function(q,P){this.FC[q].kP(P)};
|
|
W.prototype.setItem=function(q){for(var Q=0;Q<this.FC.length;Q++)this.WH[Q].setAttribute("class","listitem");
|
|
if(this.Mf.firstChild)this.Mf.removeChild(this.Mf.firstChild);this.WH[q].setAttribute("class","listitem selected");
|
|
this.Mf.appendChild(this.FC[q].m)};W.prototype.IF=function(q,P){this.Nm=q;if(this.jV==null)return;if(P==f6.og||P==f6.W8){this.__=q.zl;
|
|
for(var Q=0;Q<this.FC.length;Q++)this.FC[Q].EX(this.__)}if(P==f6.Yk||P==f6.W8){this._n=q.zl.ev;this.R3()}if(P==f6.Ov)this.R3()};
|
|
W.prototype.R3=function(){if(this._n)this.enable();else{this.disable();return}if(!m.oq(this.Ls))return;
|
|
var q=this.Nm;for(var Q=0;Q<this.FC.length;Q++){this.FC[Q].f(this._n);if(this.KA[Q])this.KA[Q].f(this.FC[Q].KB())}var P=JSON.parse(JSON.stringify(this._n));
|
|
P.Brsh.v.Dmtr.v.val=Math.min(P.Brsh.v.Dmtr.v.val,50);m.rE(this.N,this.s6,80);var t=new gj(0,0,this.N.width,this.N.height),M=new go(P,this.__?this.__.jE:null,this.__?this.__.cc:null,{YH:1},q.Ps,q.lL,t,null,0),U=t.Z/2,i=t.e-U*2;
|
|
M.moveTo(U,U);for(var Q=0;Q<=i;Q+=10)M.lineTo(U+Q,U+20*Math.sin(2*Math.PI*Q/i));M.finish();var z=this.ds.createImageData(t.e,t.Z);
|
|
N.zt(M.et(),M.wT(),z.data,t);this.ds.putImageData(z,0,0)};function h(q){eS.call(this);this.Ok=q;this.m=m.O("div","");
|
|
this._n=null}h.prototype=new eS;h.prototype.EX=function(q){};h.prototype.f=function(q){this._n=JSON.parse(JSON.stringify(q));
|
|
this.m.setAttribute("class",this.KB()?"":"disabled");this.R3()};h.prototype.kP=function(q){};h.prototype.KB=function(){return!1};
|
|
h.prototype._=function(){};h.prototype.R3=function(){};h.prototype.Bn=function(){this.c(new em("brushchange"))};
|
|
function S(){h.call(this,[15,0]);this.__=null;this.a3s=null;this.pi=new e1(!0);this.m.appendChild(this.pi.m);
|
|
this.pi.h(y.E.l,this.a3C,this);this.pi.m.style.height="10.7em";this.kd=new h1([12,14,0],1,1e3," px",0,!0);
|
|
this.kd.h(y.E.l,this.asY,this);this.hj=new h1([12,15],0,359," \xB0");this.hj.h(y.E.l,this.a7c,this);
|
|
this.fi=new h1([12,16],0,100," %");this.fi.h(y.E.l,this.ags,this);this.oH=new h1([12,17],0,100," %");
|
|
this.oH.h(y.E.l,this.atu,this);this.dl=new h1([12,18],1,300," %");this.dl.h(y.E.l,this.apS,this);this.WH=[this.kd,this.hj,this.fi,this.oH,this.dl]}S.prototype=new h;
|
|
S.prototype._=function(){this.kd._();this.hj._();this.fi._();this.oH._();this.dl._()};S.prototype.KB=function(){return!0};
|
|
S.prototype.EX=function(q){this.__=q;var P=[],t=Math.floor(30*m.F()),M=Math.floor(40*m.F());for(var Q=0;
|
|
Q<q.list.length;Q++){var U=q.list[Q].v,i=go.qP(U,q.jE,q.cc,t,M);P.push(i)}this.pi.V5(P,null,t,M)};S.prototype.R3=function(){var q=this._n.Brsh.v,P=q.classID!=this.a3s;
|
|
this.a3s=q.classID;if(P)for(var Q=0;Q<this.WH.length;Q++)if(this.m.contains(this.WH[Q].m))this.m.removeChild(this.WH[Q].m);
|
|
this.kd.f(q.Dmtr.v.val);if(P)this.m.appendChild(this.kd.m);this.hj.f(q.Angl.v.val);if(P)this.m.appendChild(this.hj.m);
|
|
if(q.classID=="computedBrush"||q.classID=="sampledBrush"){this.fi.f(q.Rndn.v.val);if(P)this.m.appendChild(this.fi.m)}if(q.classID=="computedBrush"){this.oH.f(q.Hrdn.v.val);
|
|
if(P)this.m.appendChild(this.oH.m)}this.dl.f(q.Spcn.v.val);if(P)this.m.appendChild(this.dl.m)};S.prototype.a3C=function(q){this._n=this.__.list[this.pi.B()[0]].v;
|
|
this.Bn()};S.prototype.asY=function(q){this._n.Brsh.v.Dmtr.v.val=q.target.B();this.Bn()};S.prototype.a7c=function(q){this._n.Brsh.v.Angl.v.val=q.target.B();
|
|
this.Bn()};S.prototype.ags=function(q){this._n.Brsh.v.Rndn.v.val=q.target.B();this.Bn()};S.prototype.atu=function(q){this._n.Brsh.v.Hrdn.v.val=q.target.B();
|
|
this.Bn()};S.prototype.apS=function(q){this._n.Brsh.v.Spcn.v.val=q.target.B();this.Bn()};function k(){h.call(this,[15,1]);
|
|
this.Hl=new h1([15,4,0],0,100,"%");this.Hl.h(y.E.l,this.aoV,this);this.m.appendChild(this.Hl.m);this.IW=new h1([15,4,1],0,100,"%");
|
|
this.IW.h(y.E.l,this.ak6,this);this.m.appendChild(this.IW.m);this.Oy=new h1([15,4,2],0,100,"%");this.Oy.h(y.E.l,this.a46,this);
|
|
this.m.appendChild(this.Oy.m);this.zY=new fx("Control",["Off","Direction"]);this.zY.h(y.E.l,this.a7$,this);
|
|
this.m.appendChild(this.zY.m);this.fF=new h1([15,4,3],0,100,"%");this.fF.h(y.E.l,this.apK,this);this.m.appendChild(this.fF.m);
|
|
this.sb=new h1([15,4,4],1,100,"%");this.sb.h(y.E.l,this.alv,this);this.m.appendChild(this.sb.m)}k.prototype=new h;
|
|
k.prototype._=function(){this.Hl._();this.IW._();this.Oy._();this.fF._();this.sb._()};k.prototype.KB=function(){return this._n.useTipDynamics.v};
|
|
k.prototype.kP=function(q){this._n.useTipDynamics.v=q;gI.th.hU(this._n);this.Bn()};k.prototype.R3=function(){var q=this._n;
|
|
if(q.useTipDynamics.v==!1)return;this.Hl.f(q.szVr.v.jitter.v.val);this.IW.f(q.minimumDiameter.v.val);
|
|
this.Oy.f(q.angleDynamics.v.jitter.v.val);this.zY.f(q.angleDynamics.v.bVTy.v==0?0:1);this.fF.f(q.roundnessDynamics.v.jitter.v.val);
|
|
this.sb.f(q.minimumRoundness.v.val)};k.prototype.aoV=function(q){this._n.szVr.v.jitter.v.val=q.target.B();
|
|
this.Bn()};k.prototype.ak6=function(q){this._n.minimumDiameter.v.val=q.target.B();this.Bn()};k.prototype.a46=function(q){this._n.angleDynamics.v.jitter.v.val=q.target.B();
|
|
this.Bn()};k.prototype.a7$=function(q){this._n.angleDynamics.v.bVTy.v=q.target.B()==0?0:6;this.Bn()};
|
|
k.prototype.apK=function(q){this._n.roundnessDynamics.v.jitter.v.val=q.target.B();this.Bn()};k.prototype.alv=function(q){this._n.minimumRoundness.v.val=q.target.B();
|
|
this.Bn()};function p(){h.call(this,[15,2]);this.Kc=new h1([15,5,0],0,1e3," %");this.Kc.h(y.E.l,this.adp,this);
|
|
this.m.appendChild(this.Kc.m);this.St=new h1([15,5,1],1,20);this.St.h(y.E.l,this.a6D,this);this.m.appendChild(this.St.m);
|
|
this.BO=new h1([15,5,2],0,100," %");this.BO.h(y.E.l,this.ar$,this);this.m.appendChild(this.BO.m)}p.prototype=new h;
|
|
p.prototype._=function(){this.Kc._();this.St._();this.BO._()};p.prototype.KB=function(){return this._n.useScatter.v};
|
|
p.prototype.kP=function(q){this._n.useScatter.v=q;gI.th.hU(this._n);this.Bn()};p.prototype.R3=function(){var q=this._n;
|
|
if(q.useScatter.v==!1)return;this.Kc.f(q.scatterDynamics.v.jitter.v.val);this.St.f(q.Cnt.v);this.BO.f(q.countDynamics.v.jitter.v.val)};
|
|
p.prototype.adp=function(q){this._n.scatterDynamics.v.jitter.v.val=q.target.B();this.Bn()};p.prototype.a6D=function(q){this._n.Cnt.v=q.target.B();
|
|
this.Bn()};p.prototype.ar$=function(q){this._n.countDynamics.v.jitter.v.val=q.target.B();this.Bn()};
|
|
function I(){h.call(this,[15,3]);this.Bf=new h1([15,6,0],0,100," %");this.Bf.h(y.E.l,this.a6C,this);
|
|
this.m.appendChild(this.Bf.m);this.JN=new h1([15,6,1],0,100," %");this.JN.h(y.E.l,this.ati,this);this.m.appendChild(this.JN.m);
|
|
this.mg=new h1([15,6,2],0,100," %");this.mg.h(y.E.l,this.a2h,this);this.m.appendChild(this.mg.m);this.OG=new h1([15,6,3],0,100," %");
|
|
this.OG.h(y.E.l,this.ahC,this);this.m.appendChild(this.OG.m)}I.prototype=new h;I.prototype._=function(){this.Bf._();
|
|
this.JN._();this.mg._();this.OG._()};I.prototype.KB=function(){return this._n.useColorDynamics.v};I.prototype.kP=function(q){this._n.useColorDynamics.v=q;
|
|
gI.th.hU(this._n);this.Bn()};I.prototype.R3=function(){var q=this._n;if(q.useColorDynamics.v==!1)return;
|
|
this.Bf.f(q.clVr.v.jitter.v.val);this.JN.f(q.H.v.val);this.mg.f(q.Strt.v.val);this.OG.f(q.Brgh.v.val)};
|
|
I.prototype.a6C=function(q){this._n.clVr.v.jitter.v.val=q.target.B();this.Bn()};I.prototype.ati=function(q){this._n.H.v.val=q.target.B();
|
|
this.Bn()};I.prototype.a2h=function(q){this._n.Strt.v.val=q.target.B();this.Bn()};I.prototype.ahC=function(q){this._n.Brgh.v.val=q.target.B();
|
|
this.Bn()};return W}();function g_(){bn.call(this,[9,0],!1,null,bn.zn.pD);this.Ls.setAttribute("style","min-width:200px;");
|
|
this.L4=m.O("div","hpbody scrollable");this.L4.style.height="160px";this.Ls.appendChild(this.L4);this.ao9=-1;
|
|
this.Z9=[];this.Gf=""}g_.prototype=new bn("");g_.prototype.Yo=function(W){if(W==null){m.hP(this.L4);
|
|
this.Gf="";return}m.hP(this.L4);var h=0;for(var Q=0;Q<W.history.length;Q++)if(Q<=W.nT&&!W.history[Q].jy)h=Q;
|
|
for(var Q=0;Q<W.history.length;Q++){var S=W.history[Q];if(S.jy)continue;var k=new cc(S,Q,h);k.parent=this;
|
|
this.L4.appendChild(k.m);this.Z9.push(k)}if(W.nT==W.history.length-1)this.cR()};g_.prototype.cR=function(){this.L4.scrollTop=this.L4.scrollHeight};
|
|
g_.prototype._=function(){bn.prototype._.call(this);for(var Q=0;Q<this.Z9.length;Q++)this.Z9[Q]._()};
|
|
function cc(W,Q,h){eS.call(this);this.index=Q;this.m=m.O("div",Q==h?"listitem selected":"listitem");
|
|
this.oT=W.name;this._();if(Q>h)this.m.style.opacity=.4;this.m.addEventListener("click",this.Qb.bind(this),!1)}cc.prototype=new eS;
|
|
cc.prototype._=function(){this.m.textContent=dq.get(this.oT)};cc.prototype.Qb=function(W){if(this.index==this.parent.ao9)return;
|
|
this.VB({o:"h_itemchange",index:this.index})};cc.prototype.VB=function(W){var h=new em(y.E.u,!0);h.data=W;
|
|
h.b=a.pD;this.c(h)};function bk(){bn.call(this,[9,10],!1,"---panels/histogram",bn.zn.asJ);var W=m.O("div","padded");
|
|
this.Ls.appendChild(W);this.c3=new eV(256,!0);W.appendChild(this.c3.m);this.pv=null}bk.prototype=new bn("");
|
|
bk.prototype.Yo=function(W){this.pv=W;this.rD()};bk.prototype.rD=function(){var W=this.pv;if(!m.oq(this.Ls))return;
|
|
if(W==null||W.w.length==0){this.c3.f(N.FZ(N.U(4)));return}var h=W.jc(),S=new gj(0,0,W.e,W.Z),k=S.n();
|
|
if(W.q){var p=W.q.rect,I=N.U(p.n()*4);N.zt(h,S,I,p);N.vJ(W.q.channel,I);h=I;S=p;var q=W.q.channel;k=0;
|
|
for(var Q=0;Q<q.length;Q++)k+=q[Q];k=Math.round(k/255)}var P=N.FZ(h);P[0][255]+=3*(k-P[5]);for(var Q=1;
|
|
Q<4;Q++)P[Q][255]+=k-P[5];this.c3.f(P,k)};bk.prototype.IF=function(W,h){this.c3.NC(hj.HC[W.cF]["--text-color"])};
|
|
bk.prototype._=function(){bn.prototype._.call(this);this.c3._()};bk.prototype.cR=function(){this.rD()};
|
|
function iy(){bn.call(this,[9,8],!1,null,bn.zn.a5p);this.S_=m.O("div","padded");this.Ls.appendChild(this.S_);
|
|
this.x7=new d0(10);this.S_.appendChild(this.x7.m);this.S_.appendChild(m.O("hr"));this.L6=new b5;this.L6.parent=this;
|
|
this.S_.appendChild(this.L6.Co);this.x7.h(y.E.l,this.aep,this);this.L6.h(y.E.l,this.aep,this)}iy.prototype=new bn("");
|
|
iy.prototype.aep=function(W){var h;if(W.target==this.x7)h=this.x7.B();else{var S=this.L6.B();h=Math.round(S.p)<<16|Math.round(S.z)<<8|Math.round(S.S)}var k=new em(y.E.W,!0);
|
|
k.data={o:y.D.XO,nP:f6.Ov,s7:0,k:h};this.c(k)};iy.prototype.IF=function(W,h){var S=W.Ps,k=h==f6.W8;if(h==f6.Ov||k){this.x7.f(S);
|
|
this.L6.f({p:S>>>16&255,z:S>>>8&255,S:S>>>0&255,Gj:"Color #"+N.fl(S)})}if(h==f6.RP||k){var p=W.a1M;this.L6.EX(p)}};
|
|
function cw(){bn.call(this,[12,72],!1,"---adj/mixr",bn.zn.anD);this.rZ=null;this.kH=null;this.L4=m.O("div","lpbody scrollable");
|
|
this.fE=m.O("div","lpfoot");this.Ls.appendChild(this.L4);this.Ls.appendChild(this.fE);this.JS=[];this.h("click",this.Io,this);
|
|
this.zd=[];cw.Nq([[17,2],"Save Selection as Channel",[5,3],[5,4]],this.zd,this.fE,this.Hc.bind(this),this.B0.bind(this));
|
|
this.vn=new jv([{name:"Merge Channels",N7:!0}]);this.vn.h("select",this.rN,this)}cw.prototype=new bn("");
|
|
cw.prototype.rN=function(W){if(this.kH==null)return;var h=new em(y.E.W,!0);h.data={o:y.D.mJ,DG:"mergechannels"};
|
|
this.c(h)};cw.prototype.w4=function(){return this.vn};cw.Nq=function(W,h,S,k,p){for(var Q=0;Q<W.length;
|
|
Q++){var I=new aA("W",!1,W[Q]);h.push(I);m.K$(I.m,k);S.appendChild(I.m);var q=I.m;q.addEventListener("drop",p,!1);
|
|
q.addEventListener("dragover",function(P){P.preventDefault()},!1);q.addEventListener("dragenter",m.xa,!1)}};
|
|
cw.ng=function(W,h){for(var Q=0;Q<W.length;Q++)if(W[Q].m==h.currentTarget)return Q};cw.prototype.Hc=function(W){var h=cw.ng(this.zd,W);
|
|
if(h==0)this.c(ha.IT(!0,null,W));else{h--;var S=new em(y.E.gg,!0),k={classID:"null"};if(h==0)k.null={t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]};
|
|
else if(h==1)k.Nw={t:"Objc",v:{classID:"Chnl",ClrI:{t:"enum",v:{MskI:"SlcA"}},Opct:{t:"long",v:50}}};
|
|
else k.null=fP.gj("Chnl",!0);S.data={HP:["duplicate","make","delete"][h],b4:k};this.c(S)}};cw.prototype.B0=function(W){var h=cw.ng(this.zd,W);
|
|
if(h==2){var S=new em(y.E.gg,!0),k={classID:"null"};k.null=fP.gj("Chnl",!0);S.data={HP:"duplicate",b4:k};
|
|
this.c(S)}else this.Hc(W)};cw.prototype._V=function(Q){var W=this.JS,h=W[Q];if(h==null){var S=m.O("canvas");
|
|
h=S.getContext("2d");W.push(h)}return h};cw.prototype.Io=function(W){var h=this.rZ.slice(0),S=W.data.Kr,k=h[0]+h[1]+h[2],p=this.kH;
|
|
if(-5<S&&S<0){var I=-S-1;if(W.data.Ue){if(I==0)h=k==3?[0,0,0]:[1,1,1];else{if(h[I-1]==0)h[I-1]=1;else if(!0)h[I-1]=0}}else{if(I==0)h=[1,1,1];
|
|
else{h=[0,0,0];h[I-1]=1}p.ye=[]}var q=new em(y.E.u,!0);q.b=a.N$;q.data={o:"setcls",aL:h};this.c(q);return}if(-1<S){var P=p.g[S],t=P.Yi==1?P.kX():P.$U(p).v;
|
|
if(W.data.Ue)t.oz=!t.oz;else{for(var Q=0;Q<p.BS.length;Q++)p.BS[Q].oz=!1;p.ye=[]}}else{var M=-S-5,t=p.BS[M];
|
|
if(W.data.Ue)t.oz=!t.oz;else{for(var Q=0;Q<p.BS.length;Q++)p.BS[Q].oz=!1;t.oz=!0;p.ye=[M]}}p.Hx=p.WU=!0};
|
|
cw.prototype.cR=function(){this.n3()};cw.prototype.Yo=function(W){this.kH=W;this.n3()};cw.prototype.n3=function(){var W=this.kH,h=this.L4,P=34,t=34,D=4;
|
|
m.hP(h);if(W==null||!m.oq(h))return;var S=W.e,k=W.Z,p=new gj(0,0,S,k),I=this.rZ=W.t.aL.slice(0),q=I[0]+I[1]+I[2];
|
|
if(S>k)t=Math.round(t*k/S);else P=Math.round(P*S/k);var M=["RGB"].concat(bS.c$);for(var Q=0;Q<4;Q++){var U=this._V(Q);
|
|
N.CS.uD(U,P,t,p,W.jc(),p,!1,Q==0?null:Q-1);var i=Q==0?q==3:I[Q-1]==1,z=new ha(-1-Q,!0,!0,U,M[Q],i,i);
|
|
z.parent=this;h.appendChild(z.m)}for(var Q=0;Q<W.w.length;Q++){var R=W.g[W.w[Q]],O=R.Yi;if(O!=1&&O!=3)continue;
|
|
var b=O==1?R.kX():R.$U(W).v,U=this._V(D+Q);D++;N.CS.TN(U,P,t,p,b);var z=new ha(W.w[Q],!0,!0,U,R.getName()+(O==1?"":" Filter")+" Mask",!0,b.oz);
|
|
z.parent=this;h.appendChild(z.m)}for(var Q=0;Q<W.BS.length;Q++){var b=W.BS[Q],U=this._V(D+Q);N.CS.TN(U,P,t,p,b);
|
|
var z=new ha(-5-Q,!0,b.name=="Quick Mask",U,b.name,W.ye.indexOf(Q)!=-1,b.oz,a.m5,{o:$.b$,s7:"rnm",Kr:Q});
|
|
z.parent=this;h.appendChild(z.m)}};cw.prototype.UW=function(W,h){this.L4.style.height=h-9-26+"px";this.L4.style.width=W+"px"};
|
|
cw.prototype._=function(){bn.prototype._.call(this);this.n3();cw.N9(this.zd,["lrs/makesel","lrs/mask","lrs/newlayer","lrs/bin"])};
|
|
cw.N9=function(W,h){var h=g1.GO(h);for(var Q=0;Q<W.length;Q++)W[Q].U6(h[Q])};function ha(W,h,S,k,p,I,q,P,t){eS.call(this);
|
|
this.m=m.O("div","layeritem");this.a8W=W;this.aca=h;this.ds=k;this.af8=P;this.a6n=t;this.a7=m.O("div",I?"head selected":"head");
|
|
this.a7.setAttribute("style","height: "+40+"px");var M=m.O("div","headL"),U=m.O("div","headR"),i=15;
|
|
this.m.appendChild(this.a7);this.a7.appendChild(M);this.a7.appendChild(U);this.ux=m.O("div","eye");if(1<m.F()&&m.F()<1.5)i=i/m.F();
|
|
this.ux.setAttribute("style","background-size: "+i+"px "+i+"px;");this.ux.style.opacity=q?1:.2;if(h)M.appendChild(this.ux);
|
|
this.m4=m.O("div","thumb");if(k)this.m4.appendChild(k.canvas);M.appendChild(this.m4);this.Sq=m.O("div","label");
|
|
if(S)this.Sq.style.fontStyle="italic";this.Sq.textContent=dq.get(p);M.appendChild(this.Sq);var z=this.a7;
|
|
z.setAttribute("draggable","true");this.a7.addEventListener("mousedown",this.a7s.bind(this),!1);if(!S)this.a7.addEventListener("mouseup",this.aln.bind(this),!1)}ha.prototype=new eS;
|
|
ha.prototype.A3=function(W){var h=new em(y.E.u,!0);h.b=this.af8;h.data=this.a6n;h.data.name=W;this.c(h)};
|
|
ha.prototype.a7s=function(W){var h=W.ctrlKey||W.metaKey,S=this.a8W;if(h&&W.target==this.ds.canvas){this.c(ha.IT(this.aca,S,W))}else{var k=new em("click",!0);
|
|
k.data={Kr:S,Ue:W.target==this.ux,Ci:h};this.c(k)}};ha.prototype.aln=function(W){if(W.detail==2&&W.target==this.Sq){var h=new bn.AR(this.Sq,this.A3.bind(this))}};
|
|
ha.IT=function(W,h,S){var k=0;if(S.shiftKey)k++;if(S.altKey)k+=2;var p=new em(y.E.u,!0);p.b=a.Ck;if(W){if(-5<h&&h<0){p=new em(y.E.gg,!0);
|
|
p.data=a.I6.wc(k,["RGB","Rd","Grn","Bl"][-1-h])}else p.data={o:"fromchannel",cM:[h,0,k]}}else p.data={o:"frompath",cM:[h,0,k]};
|
|
return p};function ep(){bn.call(this,[8,9],!1,"---panels/paths",bn.zn.Da);this.rZ=null;this.kH=null;
|
|
this.L4=m.O("div","lpbody scrollable");this.fE=m.O("div","lpfoot");this.Ls.appendChild(this.L4);this.Ls.appendChild(this.fE);
|
|
this.Ls.addEventListener("click",this.aeD.bind(this),!1);this.JS=[];this.h("click",this.Io,this);this.zd=[];
|
|
cw.Nq(["Fill Path","Stroke Path with Brush",[17,2],"Selection to Path",[5,3],[5,4]],this.zd,this.fE,this.Hc.bind(this),this.B0.bind(this))}ep.prototype=new bn("");
|
|
ep.prototype.Hc=function(W,h){var S=cw.ng(this.zd,W),k;if(S<2){var p={t:"obj ",v:[{t:"prop",v:{classID:"Path",keyID:"WrPt"}}]},I=S==0?{classID:"null",null:p,WhPt:{t:"bool",v:!0}}:{classID:"Strk",null:p,Usng:{t:"type",v:{classID:"PbTl"}},__name:"Stroke"};
|
|
k=new em(y.E.gg,!0);k.data={HP:S==0?"fill":"stroke",b4:I}}else if(S==2)k=ha.IT(!1,null,W);else if(S==3){k=new em(y.E.gg,!0);
|
|
k.data={HP:"make",b4:{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(S>3){var k=new em(y.E.u,!0);
|
|
k.b=a.ga;k.data={o:"pathedit",s7:["new","del"][S-4],akr:h}}this.c(k)};ep.prototype.B0=function(W){this.Hc(W,!0)};
|
|
ep.prototype._V=function(Q){var W=this.JS,h=W[Q];if(h==null){var S=m.O("canvas");h=S.getContext("2d");
|
|
W.push(h)}return h};ep.prototype.aeD=function(W){if(W.target==this.L4){var h=this.kH;h.yQ=[];h.sP=[];
|
|
h.WU=!0;h.Hx=!0}};ep.prototype.Io=function(W){var h=W.data.Kr,S=this.kH,k=W.data.Ci,p=0,I,q;if(h<0){p=-1-h;
|
|
I=S.yQ;q=S.sP}else{var P=S.O4()[0];for(var Q=0;Q<P.length;Q++){var t=P[Q].Kr;if(t==h)break;if(t>=0)p++}I=S.sP;
|
|
q=S.yQ}if(k){var M=I.indexOf(p);if(M==-1)I.push(p);else I.splice(M,1)}else{while(I.length!=0)I.pop();
|
|
while(q.length!=0)q.pop();I.push(p)}S.WU=!0;S.Hx=!0};ep.prototype.cR=function(){this.n3()};ep.prototype.Yo=function(W){this.kH=W;
|
|
this.n3()};ep.prototype.n3=function(){var W=this.kH,h=this.L4,P=34,t=34;m.hP(h);if(W==null||!m.oq(h))return;
|
|
var S=W.e,k=W.Z,p=new gj(0,0,S,k),I=this.rZ=W.t.aL.slice(0),q=I[0]+I[1]+I[2];if(S>k)t=Math.round(t*k/S);
|
|
else P=Math.round(P*S/k);var M=W.O4(),U=M[0];for(var Q=0;Q<U.length;Q++){var i=U[Q],z=this._V(Q);N.CS.aev(z,P,t,p,i.add.vmsk);
|
|
var D=new ha(i.Kr,!1,i.Kr>=0,z,i.name,M[1].indexOf(Q)!=-1,!1,a.ga,{o:"pathedit",s7:"rnm",Kr:i.Kr});D.parent=this;
|
|
h.appendChild(D.m)}};ep.prototype.UW=function(W,h){this.L4.style.height=h-9-26+"px";this.L4.style.width=W+"px"};
|
|
ep.prototype._=function(){bn.prototype._.call(this);this.n3();cw.N9(this.zd,"-\u2B24 -\u25EF lrs/makesel lrs/makepath lrs/newlayer lrs/bin".split(" "))};
|
|
function gp(W){bn.call(this,[9,W?4:5],!1,"---panels/"+(W?"character":"paragraph"),W?bn.zn.a7B:bn.zn.ajS);
|
|
this.Ls.setAttribute("style","min-width:240px;");this.a8x=W;this.tT=null;this.Nm=null}gp.prototype=new bn("");
|
|
gp.prototype.FY=function(){this.tT=new e_;var W=this.tT,h=this.Ls;W.parent=this;if(this.a8x){var S=m.O("div","marged");
|
|
h.appendChild(S);S.appendChild(W.vB.m);h.appendChild(m.O("hr"));var k=m.O("div","marged");h.appendChild(k);
|
|
k.appendChild(W.Dx.m);k.appendChild(W.I1.m);var p=m.O("div","marged");h.appendChild(p);p.appendChild(W.Jh.m);
|
|
p.appendChild(W.mM.m);h.appendChild(m.O("hr"));var I=m.O("div","marged");h.appendChild(I);I.appendChild(W.GY.m);
|
|
I.appendChild(W.cQ.m);var q=m.O("div","marged");h.appendChild(q);q.appendChild(W.HM.m);q.appendChild(W.cS.m);
|
|
q.appendChild(W.Oo.m);h.appendChild(m.O("hr"));var P=m.O("div","marged");h.appendChild(P);P.appendChild(W.h$.m);
|
|
P.appendChild(W.j5.m);P.appendChild(W.lC.m);P.appendChild(W.cZ.m);P.appendChild(W.Sv.m);P.appendChild(W.yo.m);
|
|
P.appendChild(W.ur.m);P.appendChild(W._5.m)}else{var S=m.O("div","marged");h.appendChild(S);S.appendChild(W.G1.m);
|
|
S.appendChild(W.E2.m);S.appendChild(W.NX.m);S.appendChild(W.at$.m);S.appendChild(W.a3z.m);S.appendChild(W.a71.m);
|
|
S.appendChild(W.adB.m);h.appendChild(m.O("hr"));var k=m.O("div","marged");h.appendChild(k);k.appendChild(W.pj.m);
|
|
k.appendChild(W.W1.m);k.appendChild(W.oX.m);h.appendChild(m.O("hr"));var p=m.O("div","marged");h.appendChild(p);
|
|
p.appendChild(W.SJ.m);p.appendChild(W.Dq.m);p.appendChild(W.Jr.m)}};gp.prototype.cR=function(){if(!m.oq(this.Ls))return;
|
|
if(this.tT==null){this.FY();var W=this.Nm;if(W)this.tT.f(W.YF,W.Tm,W.bD);this.tT._()}};gp.prototype._=function(){bn.prototype._.call(this);
|
|
if(this.tT)this.tT._()};gp.prototype.IF=function(W,h){this.Nm=W;if(h!=f6.W8&&h!=f6.Z3&&h!=f6.a5&&h!=f6.xC)return;
|
|
if(this.tT)this.tT.f(W.YF,W.Tm,W.bD)};function cx(){bn.call(this,[9,13],!1,"---panels/glyphs",bn.zn.a2Z);
|
|
this.tT=new e_;this.tT.parent=this;this.Nm=null;this.apo=null;this.aol=null;this._6=null;this.a50=null;
|
|
this.yc=Math.round(290*m.F());this.N2=45;this.anZ=4;this.a6L=this.rD.bind(this);this.a6T=0;this.Kj=new fx(null,["Hi","Hello"]);
|
|
this.Kj.h(y.E.l,this.rD,this);var W=this.C9=new aA("-",null,null,!0);W.h("click",this.ajB,this);var h=this.aub=new aA("+",null,null,!0);
|
|
h.h("click",this.ajB,this);this._U=new e1(!1);this._U.h(y.E.l,this.T1,this);this._U.m.style.height=250+"px";
|
|
var S=this.BE=m.O("div","form padded");this.Ls.appendChild(S);S.appendChild(this.tT.vB.m);m.YI(S);S.appendChild(this.Kj.m);
|
|
S.appendChild(W.m);S.appendChild(h.m);this.Ls.appendChild(this._U.m)}cx.prototype=new bn("");cx.prototype.UW=function(W,h){if(this.s6==W)return;
|
|
this.s6=W;this.yc=Math.floor((W-13)*m.F());this.BE.setAttribute("style","width:"+this.yc/m.F()+"px;");
|
|
this._U.m.style.height=h-73+"px";this.rD()};cx.prototype.T1=function(W){var h=this.a2Y(),S=Math.round(this.yc/h);
|
|
h/=m.F();var k=this._U.B()[0]*S*this.anZ,p=this._U.al5();k+=Math.floor(p.y/h)*S;k+=Math.floor(p.x/h);
|
|
var I=this._6[this.Kj.B()];if(k>=I.length)return;var q=I[k],P=this.a50[q],t=new em(y.E.u,!0);t.b=a.mj;
|
|
if(P.v$.length==0)t.data={o:"insertGlyph",k:k+1};else t.data={o:"insertText",k:String.fromCodePoint(P.v$[0])};
|
|
this.c(t)};cx.prototype.ajB=function(W){var h=1.2;if(W.target==this.C9){if(this.N2>20)this.N2/=h}else{if(this.N2<100)this.N2*=h}this.rD()};
|
|
cx.prototype.cR=function(){this.IF(this.Nm)};cx.prototype.IF=function(W,h){this.Nm=W;if(!m.oq(this.Ls))return;
|
|
this.tT.f(W.YF,W.Tm,W.bD);var S=W.YF,k=S.D4.Font,t=0;if(k==null)return;var p=S.Vt[k].Name;if(this.apo==p)return;
|
|
var k=W.Tm.I_(p);if(k==null)return;var I=k.maxp.numGlyphs,q=this.a50=new Array(I);for(var Q=0;Q<I;Q++)q[Q]={v$:[]};
|
|
var P=Date.now(),M=new Uint8Array(1048575);for(var Q=0;Q<1048575;Q++){var U=Typr.U.codeToGlyph(k,Q);
|
|
if(U!=0&&U<I){M[Q]=1;if(q[U].v$.length==0)t++;q[U].v$.push(Q)}}var i=cx.Rw,z=[];for(var Q=0;Q<i.length;
|
|
Q++)z.push([]);for(var U=1;U<I;U++){z[0].push(U);var D=q[U].v$[0];if(D==null){continue}for(var R=1;R<i.length;
|
|
R++){var O=i[R].nr;for(var Q=0;Q<O.length;Q+=2)if(O[Q]<=D&&D<=O[Q+1]){z[R].push(U);break}}}this._6=z;
|
|
var b=[];for(var Q=0;Q<i.length;Q++)b.push(i[Q].Vp+" ("+z[Q].length+")");var w=this.Kj.B();this.Kj.XZ(b);
|
|
this.Kj.f(w);this.apo=p;this.aol=k;this.rD()};cx.prototype.a2Y=function(W){var h=Math.floor(this.yc/this.N2);
|
|
return Math.floor(this.yc/h)};cx.prototype.rD=function(W){if(!m.oq(this.Ls)||this._6==null)return;var h=this._6[this.Kj.B()],S=h.length,k=this.aol,p=Typr.U,I=this.a2Y(),q=I,P=q*.8,t=q*.8/k.head.unitsPerEm,M=[],U=Math.floor(this.yc/I),i=Math.ceil(S/U),z=this.anZ,D=Date.now();
|
|
for(var R=0;R<i;R+=z){var O=m.O("canvas"),b=O.getContext("2d");O.width=I*U;O.height=q*z;b.strokeStyle="rgba(0,0,0,0.3)";
|
|
b.fillStyle="white";b.fillRect(0,0,U*I,q*z);for(var w=0;w<z;w++){for(var A=0;A<U;A++){var Q=h[(R+w)*U+A];
|
|
if(Q==null)break;var g=p.glyphToPath(k,Q),E=N.H.TA(g.crds);if(!E.ZP()){b.fillStyle="#252525";b.beginPath();
|
|
var j=A*I+(I-E.e*t)*.5-E.x*t,x=w*q+P;b.translate(j,x);b.scale(t,-t);p.pathToContext(g,b);b.scale(1/t,-1/t);
|
|
b.translate(-j,-x);b.fill()}}}b.beginPath();for(var A=0;A<U;A++){var d=A*I+I+.5;b.moveTo(d,0);b.lineTo(d,q*z)}for(var w=0;
|
|
w<z;w++){var L=w*q+q+.5;b.moveTo(0,L);b.lineTo(U*I,L)}b.stroke();M.push(O)}this._U.V5(M,null,I*U,q*z)};
|
|
cx.Rw=[{Vp:"All Glyphs"},{Vp:"Basic Latin, Latin 1",nr:[0,127,128,143]},{Vp:"Latin Extended-A",nr:[256,383]},{Vp:"Latin Extended-B",nr:[384,591]},{Vp:"Punctuations",nr:[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]},{Vp:"Greek",nr:[880,1023]},{Vp:"Cyrillic",nr:[1024,1279]},{Vp:"Hebrew",nr:[1424,1535]},{Vp:"Arabic",nr:[1536,1791]},{Vp:"Emoji",nr:[9728,10095,127744,129535]}];
|
|
function ja(){bn.call(this,[13,0],!1,null,bn.zn.Ov);this.gI=0;this.abW=0;this.Nm=null;var W=m.O("div","flexrow padded");
|
|
this.Ls.appendChild(W);var h=m.O("div");W.appendChild(h);this.LE=[];for(var Q=0;Q<2;Q++){var S=new ax;
|
|
this.LE.push(S);S.h("click",this.alp,this);h.appendChild(S.m)}this.Ye=new i8(192);this.Ye.h(y.E.l,this.wG,this);
|
|
W.appendChild(this.Ye.m)}ja.prototype=new bn("");ja.prototype.alp=function(W){this.gI=this.LE.indexOf(W.currentTarget);
|
|
this.rD()};ja.prototype.wG=function(W){var h=this.Ye.B();this.Ye.f(h);var S=Math.round(h.p*255)<<16|Math.round(h.z*255)<<8|Math.round(h.S*255),k=new em(y.E.W,!0);
|
|
k.data={o:y.D.XO,nP:f6.Ov,s7:this.gI,k:S};this.c(k);this.abW=Date.now()};ja.prototype.rD=function(){var W=this.Nm,h=this.gI,S=[W.Ps,W.lL];
|
|
for(var Q=0;Q<2;Q++){var k=this.LE[Q],p=k.m.style;k.NC(S[Q]);if(Q==h)p.filter="drop-shadow(0 0 1px #000000)"}var I=S[h];
|
|
if(Date.now()-this.abW>100)this.Ye.f({p:(I>>>16)/255,z:(I>>>8&255)/255,S:(I&255)/255})};ja.prototype.IF=function(W,h){this.Nm=W;
|
|
if(h==f6.W8||h==f6.Ov)this.rD()};ja.prototype.cR=function(){this.rD()};function cL(){bn.call(this,"CSS",!1,"---panels/css",bn.zn.CSS);
|
|
this.pv=null;var W=m.O("div","padded");this.Ls.appendChild(W);this.Ep=m.O("textarea");m.j7(this.Ep);
|
|
W.appendChild(this.Ep)}cL.prototype=new bn("");cL.prototype.UW=function(W,h){if(this.s6==W)return;this.s6=W;
|
|
this.Ep.setAttribute("style","display:block;tab-size:4; margin:0; font-family:monospace; width:"+(W-10)+"px; height:"+(h-10)+"px")};
|
|
cL.prototype.Yo=function(W){this.pv=W;this.rD()};cL.prototype.IF=function(W,h){if(h==f6.a5)this.rD()};
|
|
cL.prototype.rD=function(){var W=this.pv;if(W==null||W.w.length==0)return;if(!m.oq(this.Ls))return;var h=W.g[W.w[0]],S=CSS.a8M(h,W);
|
|
if(S.length!=0)this.Ep.value=S.join(";\n")+";";else this.Ep.value=""};cL.prototype.cR=function(){this.rD()};
|
|
function cI(){bn.call(this,[9,6],!1,"---panels/info",bn.zn.aed);this.Ls.setAttribute("style","min-width:240px;");
|
|
this.pv=null;this.Nm=null;var W=m.O("div","marged row");this.Ls.appendChild(W);var h=m.O("div","cell");
|
|
h.setAttribute("style","width:10em");W.appendChild(h);var S=m.O("div","cell");S.setAttribute("style","width:10em");
|
|
W.appendChild(S);this.aqO=[];for(var Q=0;Q<4;Q++){var k=new gs("");this.aqO.push(k);h.appendChild(k.m);
|
|
m.YI(h)}this.Ls.appendChild(m.O("hr",""));var p=m.O("div","marged row");this.Ls.appendChild(p);var h=m.O("div","cell");
|
|
h.setAttribute("style","width:10em");var S=m.O("div","cell");S.setAttribute("style","width:10em");p.appendChild(h);
|
|
p.appendChild(S);this.Ie=new gs("");h.appendChild(this.Ie.m);m.YI(h);this.Se=new gs("");h.appendChild(this.Se.m);
|
|
this.tD=new gs("");S.appendChild(this.tD.m);m.YI(S);this.nX=new gs("");S.appendChild(this.nX.m);this.Ie.f("X: 100 px");
|
|
this.Se.f("Y: 100 px");this.tD.f("W: 0");this.nX.f("H: 0")}cI.prototype=new bn("");cI.prototype.Go=function(W,h,S,k,p){if(!m.oq(this.Ls)||W==null)return;
|
|
var I=W.t.wy(p.x,p.y),q=new eC(Math.floor(I.x),Math.floor(I.y));if(!p.kK){var P=0,t=0,M=0,U=0,i=this.aqO;
|
|
if(!p.kK&&!W.amM()&&new gj(0,0,W.e-1,W.Z-1).mA(q)){var z=W.jc(),Q=W.e*q.y+q.x<<2;P=z[Q+0];t=z[Q+1];M=z[Q+2];
|
|
U=z[Q+3]}i[0].f("R: "+P);i[1].f("G: "+t);i[2].f("B: "+M);i[3].f("A: "+U)}this.Ie.f("X: "+N.aX.JL(q.x,W.H$,S,W.e));
|
|
this.Se.f("Y: "+N.aX.JL(q.y,W.H$,S,W.Z));this.st()};cI.prototype.st=function(){var W=this.pv,h=this.Nm,S=0,k=0;
|
|
if(W&&h){if(W.t.MD){S=W.t.MD.e;k=W.t.MD.Z}else if(W.q){S=W.q.rect.e;k=W.q.rect.Z}S=N.aX.JL(Math.abs(S),W.H$,h,W.e);
|
|
k=N.aX.JL(Math.abs(k),W.H$,h,W.Z)}this.tD.f(dq.get([12,41]).charAt(0)+": "+S);this.nX.f(dq.get([12,42]).charAt(0)+": "+k)};
|
|
cI.prototype._=function(){bn.prototype._.call(this);this.st()};cI.prototype.Yo=function(W,h,S){this.pv=W;
|
|
this.Nm=S;this.st()};function jc(){bn.call(this,[9,1],!1,"---panels/layers",bn.zn.m5);this.Xg=null;this.om=null;
|
|
this.e$=null;this.a7=m.O("div","lphead");this.L4=m.O("div","lpbody scrollable");this.fE=m.O("div","lpfoot");
|
|
this.gm=new dB([0,6]);this.gm.h(y.E.l,this.cJ,this);this.a7.appendChild(this.gm.m);this.xl=m.O("span","disabled");
|
|
this.xl.setAttribute("style","display:inline-block; height:26px");this.a7.appendChild(this.xl);this.Cs=new fx(null,["Kind",[12,48]],!1,[]);
|
|
this.Cs.h(y.E.l,this.cJ,this);var W=this.A1=[new ce(null,["<img src=\""+PIMG.pix_layer+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["lrs/adj"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["tools/htype"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.shape_layer+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.so_layer+"\" class=\"autoscale gsicon\" />"],!0,[[12,76,2],[3,0],[12,44],[12,77],[6,7,1]]),new i3(null,null,8)];
|
|
W[0].h(y.E.l,this.cJ,this);W[1].h("input",this.cJ,this);this.a0$();this.DH=new fx(null,hd.h3,!1,hd.Yu);
|
|
this.DH.h(y.E.l,this.a5n,this);this.a7.appendChild(this.DH.m);this.cb=new fA([12,0],0,100,"%",0);this.cb.h(y.E.l,this.aqs,this);
|
|
this.cb.parent=this;this.a7.appendChild(this.cb.m);this.pP=new ce([6,57,2],["<img src=\""+PIMG.trsp3+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["tools/brush"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.pos+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["lrs/lock"]+"\" class=\"autoscale gsicon\" />"],!0,["Transparency",[12,76,2],[12,40],[7,0]]);
|
|
this.pP.h(y.E.l,this.aly,this);this.a7.appendChild(this.pP.m);this.sc=new fA([12,26],0,100,"%",0);this.sc.h(y.E.l,this.a2H,this);
|
|
this.sc.parent=this;this.a7.appendChild(this.sc.m);this.zd=[];this.Nq();this.Ls.appendChild(this.a7);
|
|
this.Ls.appendChild(this.L4);this.L4.addEventListener("dragover",function(k){k.preventDefault()},!1);
|
|
this.L4.addEventListener("dragenter",m.xa,!1);this.L4.addEventListener("drop",this.a2_.bind(this),!1);
|
|
this.Ls.appendChild(this.fE);this.Ls.addEventListener("contextmenu",m.xa,!1);var h=g2.Jx(!0),S=g2.XL(!0);
|
|
this.a7P=new jv(h,S);var h=[{name:[14,10]},{name:[14,11],PO:!0},{name:[6,0]},{name:[11,4]},{name:[5,4],PO:!0},{name:[6,7,0]},{name:"New Smart Obj. via Copy",P:function(k){return{P:k.g[k.w[0]].add.SoLd!=null}},PO:!0},{name:[6,8],P:jc.alg},{name:[6,34],P:function(k){var p=k.g[k.w[0]];
|
|
return{P:p.add.lmfx!=null&&!p.vc()}}},{name:[6,40],PO:!0,P:function(k){var p=k.g[k.w[0]];return{P:p.add.TySh!=null}}},{name:"",PO:!0,P:function(k){var p=k.g[k.w[0]],I=p.add.TySh,q=I?I.MW:null;
|
|
return{P:I!=null&&q.Curve==null,tM:dq.get(I&&gf.SY(q)==0?[16,3,1]:[16,3,0])}}},jc.afd(!1),{name:[11,6],PO:!0,sub:[{name:[5,1],P:function(k){var p=k.g[k.w[0]];
|
|
return{P:p.add.lmfx!=null}}},{name:[5,2]},{name:[2,2],P:function(k){var p=k.g[k.w[0]];return{P:p.add.lmfx!=null}}}]},{name:[6,10],P:function(k){return{P:k.w.length==1&&k.w[0]!=0&&!k.g[k.w[0]].vc()}}},{name:[6,12,0],P:function(k){return{P:k.w.length>1||k.g[k.w[0]].vc()}}},{name:[6,12,1],PO:!0},{name:[13,0],sub:function(){var k=[[13,1,0],[13,1,1],[13,1,2],[13,1,3],[13,1,4],[13,1,5],[13,1,6],[13,1,7]],p=[];
|
|
for(var Q=0;Q<k.length;Q++)p.push({name:k[Q]});return p}()}],S=[{Y:y.E.W,R:{o:y.D.mJ,DG:"layerstyle"}},{Y:y.E.u,b:a.Ck,R:{o:"fromlayer",cM:[null,0,0]}},{Y:y.E.u,b:a.m5,R:{o:$.T2}},{Y:y.E.W,R:{o:y.D.mJ,DG:"duplinto"}},{Y:y.E.u,b:a.m5,R:{o:$.Xr}},{Y:y.E.gg,R:{HP:"newPlacedLayer"}},{Y:y.E.u,b:a.m5,R:{o:$.H8}},{Y:y.E.gg,R:{HP:"rasterizeLayer",b4:{classID:"rasterizeLayer",null:fP.gj("Lyr",!0)}}},{Y:y.E.u,b:a.m5,R:{o:$.O0}},{Y:y.E.u,b:a.m5,R:{o:$.fP}},{Y:y.E.u,b:a.mj,R:{o:"switchPntPrgr"}},{Y:y.E.u,b:a.m5,R:{o:$.Wk}},{sub:[{Y:y.E.u,b:a.gk,R:{o:"st_copy"}},{Y:y.E.u,b:a.gk,R:{o:"st_paste"}},{Y:y.E.u,b:a.gk,R:{o:"st_clear"}}]},{Y:y.E.u,b:a.m5,R:{o:$.JD}},{Y:y.E.u,b:a.m5,R:{o:$.m7}},{Y:y.E.u,b:a.m5,R:{o:$.lQ}},{sub:function(){var k=[];
|
|
for(var Q=0;Q<8;Q++)k.push({Y:y.E.u,b:a.m5,R:{o:$.mI,a05:Q}});return k}()}];this.Mf=new jv(h,S);var h=[{name:[6,45],P:function(k){var p=k.g[k.w[0]];
|
|
return{P:p.$U(k).v==null}}},{name:[6,47]}],S=[{Y:y.E.u,b:a.m5,R:{o:$.IZ}},{Y:y.E.u,b:a.m5,R:{o:$.Wo}}];
|
|
this.acR=new jv(h,S);var h=[{name:"enab/disab",P:function(k){return{tM:dq.get(k.g[k.w[0]].kX().isEnabled?[6,15]:[6,14])}}},{name:[6,22]},{name:[5,8],P:function(k){return{P:k.xi(!1,!0)}}}],S=[{Y:y.E.u,b:a.m5,R:{o:$.XE}},{Y:y.E.u,b:a.m5,R:{o:$.o5}},{Y:y.E.u,b:a.m5,R:{o:$.kw}}];
|
|
this.a4m=new jv(h,S);var h=[{name:"enab/disab",P:function(k){return{tM:dq.get(k.g[k.w[0]].$U(k).v.isEnabled?[6,42]:[6,41])}}},{name:[6,46]}],S=[{Y:y.E.u,b:a.m5,R:{o:$.K3}},{Y:y.E.u,b:a.m5,R:{o:$.qj}}];
|
|
this.ah0=new jv(h,S);var h=[{name:"enab/disab",P:function(k){return{tM:dq.get(k.g[k.w[0]].add.vmsk.isEnabled?[6,17]:[6,16])}}},{name:[6,24]},{name:[6,8]}],S=[{Y:y.E.u,b:a.m5,R:{o:$.Ei}},{Y:y.E.u,b:a.m5,R:{o:$.BZ}},{Y:y.E.u,b:a.m5,R:{o:$.OW}}];
|
|
this.a02=new jv(h,S);this.arN=new jv(g2.a5b(!0),g2.Yy(!0));this.aeR=new jv(g2.Jx(),g2.XL());this.h("rclick",this.anM,this)}jc.prototype=new bn("");
|
|
jc.prototype.ap6=function(){if(this.gm.B()){var W=this.Cs.B(),h=this.A1[W].B();if(W==0)return h.indexOf(!0)!=-1;
|
|
if(W==1)return h!=""}return!1};jc.afd=function(W){var h=function(k){var p=k!=null&&k.w.length!=0&&k.g[k.w[0]].Vy;
|
|
return{ZX:p,P:k!=null&&k.QR(k.w[0]),R:{Y:y.E.gg,R:{HP:p?"ungroup":"groupEvent",b4:{classID:p?"Ungr":"GrpL",null:fP.gj("Lyr",!0)}}}}},S={name:[6,6,0],PO:!0,P:h};
|
|
if(W)S.W2=[hW.OM,hW.Q9,hW.lj];return S};jc.alg=function(W,h){if(W)for(var Q=0;Q<W.w.length;Q++){var S=W.g[W.w[Q]];
|
|
if(S.add.TySh||S.add.SoLd||S.add.SoCo||S.add.GdFl||S.add.PtFl)return{P:!0}}return{P:!1}};jc.prototype.a2_=function(W){m.xa(W);
|
|
var h=W.dataTransfer.getData("Text"),S=1,k=0;if(h==""){m.pL(W,this,this.e$.indexOf(this.om),k+(S>.5?0:1))}else if(h!="--panel"){var h=JSON.parse(h),p=h.ez;
|
|
if(p=="l")this.VB({o:$.sO,source:h.wJ,target:k,hb:S})}};jc.prototype.anM=function(W){var h=this.om,S=W.data,p;
|
|
if(h.w.indexOf(S.i)==-1){var k={o:$.uR,i:W.target.pz.index,_N:S.Yi};this.VB(k)}if(h.w.indexOf(S.i)==-1)return;
|
|
if(S.Yi==1){p=this.a4m}else if(S.Yi==2){p=this.a02}else if(S.Yi==3){p=this.ah0}else if(S.Yi==4){p=this.acR}else if(S.Yi==5){p=this.a7P}else{p=this.Mf}p._();
|
|
p.update(h);p.parent=this;var I=new em(y.E.W,!0);I.data={o:y.D.zS,gh:p,x:S.o2.x+1,y:S.o2.y+1};this.c(I)};
|
|
jc.prototype._=function(){bn.prototype._.call(this);this.DH._();this.cb._();this.pP._();this.sc._();
|
|
if(this.om)this.Yo(this.om);var W="lrs/link lrs/fx lrs/adj lrs/mask lrs/folder lrs/newlayer lrs/bin".split(" ");
|
|
for(var Q=0;Q<this.zd.length;Q++){var h=this.zd[Q];h.U6(m.NM(W[Q]))}};jc.prototype.Yo=function(W,h){if(W&&!W.tn)return;
|
|
if(W==null)m.dT(this.Ls,"disabled");else m.Eg(this.Ls,"disabled");this.om=W;this.e$=h;if(this.Xg!=null){this.L4.removeChild(this.Xg.L4);
|
|
this.Xg=null}if(W==null)return;var S=!1;for(var Q=0;Q<W.BS.length;Q++)if(W.BS[Q].oz)S=!0;this.Xg=new jr(W.root,this,W,{tg:0},{aa3:S,a1D:this.ap6()});
|
|
this.L4.appendChild(this.Xg.L4);if(W.w.length==0||W.g[W.w[0]]==null)m.dT(this.a7,"disabled");else{m.Eg(this.a7,"disabled");
|
|
if(W.w.length==1&&W.rm)this.Xg.adF(W.w);var k=W.g[W.w[0]];if(k.vc()){this.DH.XZ([[15,10,27]].concat(hd.h3),[1].concat(hd.Yu));
|
|
var p=hd.wl.indexOf(k.oO);this.DH.f(p+1)}else{this.DH.XZ(hd.h3,hd.Yu);var p=hd.wl.indexOf(k.oO);this.DH.f(p)}this.cb.f(Math.round(100*k.opacity/255));
|
|
this.pP.f([k.Ox(0),k.Ox(1),k.Ox(2),k.Ox(31)]);this.sc.f(Math.round(100*(k.add.iOpa!=null?k.add.iOpa/255:1)))}};
|
|
jc.prototype.UW=function(W,h){var S=this.a7.getBoundingClientRect().height,k=59;if(S>70)k=84;if(S>100)k=108;
|
|
var p=h-(k+37);this.L4.style.height=p+"px";this.L4.style.width=W+"px"};jc.prototype.a5n=function(W){this.VB({o:$.c9,kN:this.DH.B()})};
|
|
jc.prototype.aqs=function(W){this.VB({o:$.Jn,kN:Math.round(255*this.cb.B()/100)})};jc.prototype.aly=function(W){this.VB({o:$.q9,kN:[this.pP.B(),[0,1,2,31]]})};
|
|
jc.prototype.a2H=function(W){this.VB({o:$.mv,kN:Math.round(255*this.sc.B()/100)})};jc.prototype.cJ=function(W){if(W.target==this.Cs)this.a0$();
|
|
var h=this.gm.B();if(h)m.Eg(this.xl,"disabled");else m.dT(this.xl,"disabled");this._();this.om.tn=!0;
|
|
this.Yo(this.om);this.om.tn=!1};jc.prototype.a0$=function(){m.hP(this.xl);this.xl.appendChild(this.Cs.m);
|
|
this.xl.appendChild(this.A1[this.Cs.B()].m)};jc.prototype.a5D=function(W){this.aa9(W,this.arN)};jc.prototype.aiP=function(W){this.aa9(W,this.aeR)};
|
|
jc.prototype.aa9=function(W,h){var S=W.currentTarget;if(m.oq(h.m))return;W.stopPropagation();var k=S.getBoundingClientRect();
|
|
h._();h.update(this.om);h.parent=this;var p=new em(y.E.W,!0);p.data={o:y.D.zS,gh:h,x:k.left,y:k.top,a43:!0};
|
|
this.c(p)};jc.prototype.aqB=function(W){this.VB({o:$.KJ})};jc.prototype.aqH=function(W){this.VB({o:this.om.w.length>1?$.mr:$.fg})};
|
|
jc.prototype.a2Q=function(W){this.VB({o:$.gL})};jc.prototype.a0p=function(W){var h=this.om;if(h.w.length==0)return;
|
|
var S=h.g[h.w[0]],k=S.Yi;this.VB({o:k<=0?S.AY?$.BZ:$.Xr:k==3?$.qj:$.o5})};jc.prototype.apR=function(W){this.VB({o:$.l4})};
|
|
jc.prototype.VB=function(W){var h=new em(y.E.u,!0);h.data=W;h.b=a.m5;this.c(h)};jc.prototype.Nq=function(){var W=[[6,54,0],[11,6],[6,1],[6,21],[6,20],[6,13],[5,4]],h=[this.apR,this.aiP,this.a5D,this.aqB,this.aqH,this.a2Q,this.a0p],S=this.adT.bind(this);
|
|
for(var Q=0;Q<W.length;Q++){var k=new aA("W",!1,W[Q]);this.zd.push(k);m.K$(k.m,h[Q].bind(this));this.fE.appendChild(k.m);
|
|
if(Q>=W.length-3){var p=k.m;p.addEventListener("drop",S,!1);p.addEventListener("dragover",function(I){I.preventDefault()},!1);
|
|
p.addEventListener("dragenter",m.xa,!1)}}};jc.prototype.adT=function(W){m.xa(W);var h=0,S=this.zd;while(S[h].m!=W.currentTarget)h++;
|
|
S[h].UZ();var k=W.dataTransfer.getData("Text");if(k=="")return;var k=JSON.parse(k);if(k.ez=="l"){var p={o:[$.mr,$.T2,$.Xr][h-4]};
|
|
if(this.om.w.indexOf(k.wJ)==-1)p.i=k.wJ;this.VB(p)}if(h!=6)return;if(k.ez=="sm"||k.ez=="s"){var I=new em(y.E.u,!0);
|
|
I.b=a.gk;I.data={o:k.ez=="sm"?"st_clear":"st_delsingle",i:k.wJ,wJ:k.xL};this.c(I)}if(k.ez=="fm"||k.ez=="f"){this.VB({o:k.ez=="fm"?$.Wo:$.vH,src:k.wJ,xL:k.xL})}if(k.ez=="m"||k.ez=="vm"){this.VB({o:k.ez=="m"?$.o5:$.BZ,i:k.wJ})}};
|
|
function jr(W,h,S,k,p){eS.call(this);this.parent=h;this.pz=W;this.y1=[];this.m=m.O("div","layeritem");
|
|
var I=p.a1D&&!this.amS(),q=W.i,P=S.w.indexOf(W.index)!=-1,x=15,l=!1;this.a7=m.O("div",P?"head selected":"head");
|
|
if(W.i.add.artb!=null)m.dT(this.a7,"artb");var t="height: "+(q.vc()?26:Math.floor(10+q.ap$/m.F()))+"px;";
|
|
if(P&&p.aa3)t+="background-color:rgba(255,50,50,0.4);";this.a7.setAttribute("style",t);var M=m.O("div","headL"),U=m.O("div","headR"),i=m.O("div","lpineck");
|
|
this.L4=m.O("div","lpibody");this.a7.appendChild(M);this.a7.appendChild(U);if(!I){this.m.appendChild(this.a7);
|
|
if(q.a9()||q.rB())if(q.t0())this.m.appendChild(i)}var z=this.a7;z.setAttribute("draggable","true");z.addEventListener("dragstart",this.oG.bind(this),!1);
|
|
z.addEventListener("drop",this.ue.bind(this),!1);z.addEventListener("dragover",this.SL.bind(this),!1);
|
|
z.addEventListener("dragenter",m.xa,!1);z.addEventListener("dragleave",this.Jl.bind(this),!1);var D=[],R=[null,null,null,null],O=m.O("div");
|
|
this.ux=m.O("div","eye");O.appendChild(this.ux);var b=m.O("div","space");this.Sq=m.O("div","label");
|
|
this.Sq.setAttribute("style","max-width:calc(100% - "+(96+W.depth*20)+"px)");this.Sq.textContent=q.getName();
|
|
this.VN=m.O("div","lock");this.aot=m.O("div","lrfx");this.T8=m.O("div","arfx");var w=this.aix.bind(this),A=this.ah8.bind(this);
|
|
this.a7.addEventListener("click",A,!1);this.a7.addEventListener("contextmenu",w,!1);var g=[0,16711680,16748544,16763904,4513024,22015,11141375,7829367],E=q.add.lclr==null?0:g[q.add.lclr];
|
|
if(E==0)E=k.tg;var j=[E>>16,E>>8&255,E&255];for(var Q=0;Q<3;Q++){j[Q]=Math.round(.5*j[Q]+.5*220)}if(1<m.F()&&m.F()<1.5)x=x/m.F();
|
|
O.setAttribute("style","background-color:rgba("+j.join(",")+","+(E==0?0:1)+");");this.ux.setAttribute("style","background-size: "+x+"px "+x+"px;");
|
|
var d=this.a1v.bind(this);O.addEventListener("mousedown",d,!1);O.addEventListener("mouseover",d,!1);
|
|
this.Sq.addEventListener("pointerup",this.aen.bind(this),!1);this.T8.addEventListener("click",this.atf.bind(this),!1);
|
|
D[0]=O;D[1]=b;D[10]=this.Sq;function L(aQ,jC,z){var eO=jC.canvas;m.a5O(eO);if(z)aQ.setAttribute("draggable","true");
|
|
aQ.appendChild(eO);eO.setAttribute("style",eO.getAttribute("style")+"; pointer-events:none")}if(q.vc()){var _=m.O("div","arrow"),T=m.O("div","folder");
|
|
_.addEventListener("click",this.aqo.bind(this),!1);D[2]=_;D[3]=T;if(q.add.lsct==i1.wY||p.a1D){for(var Q=W.children.length-1;
|
|
Q>=0;Q--){var c=new jr(W.children[Q],h,S,{tg:E},p);this.y1.push(c);this.L4.appendChild(c.m)}this.m.appendChild(this.L4)}_.setAttribute("class",q.add.lsct==i1.wY?"open":"closed")}else{this.m4=m.O("div","thumb");
|
|
D[5]=this.m4;L(this.m4,q.Pd);if(bS.get(q.add))m.dT(q.Pd.canvas,"gsicon")}var e=q.kX();if(e){this.OT=m.O("div","chain");
|
|
this.lb=m.O("div","thumb");L(this.lb,W.i.a9W,!0);this.OT.style.opacity=e.ln?1:0;this.OT.addEventListener("click",this.ace.bind(this),!1)}var r=q.rG()&&q.add.vmsk;
|
|
if(q.add.vmsk&&!r){this.tw=m.O("div","chain");this.dM=m.O("div","thumb");L(this.dM,W.i.akX,!0);this.tw.style.opacity=q.add.vmsk.ln?1:0;
|
|
this.tw.addEventListener("click",this.a9a.bind(this),!1)}if(q.rB()&&q.$U(S).v){this.kp=m.O("div","thumb");
|
|
L(this.kp,W.i.agG,!1);this.kp.addEventListener("click",A,!1);this.kp.addEventListener("contextmenu",w,!1)}if(q.a9()){this.acq=i;
|
|
i.addEventListener("contextmenu",w,!1);var B=new jc.zh(dq.get([12,1]),"sm","layerstyle",W.depth,0,null);
|
|
B.parent=this;i.appendChild(B.m);var F=q.add.lmfx,v=F.masterFXSwitch.v;B.NN(v);for(var Q=0;Q<hz.order.length;
|
|
Q++){var X=F[hz.BN[Q]].v;if(X.length==0)continue;for(var V=0;V<X.length;V++){var B=new jc.zh(dq.get(hz.names[Q]),"s","layerstyle",W.depth,1,[Q,V]);
|
|
B.NN(v&&X[V].v.enab.v);B.parent=this;i.appendChild(B.m)}}}if(q.rB()){var B=new jc.zh(dq.get([12,55]),"fm",null,W.depth,0,-1,q.$U(S).v?this.kp:null);
|
|
B.parent=this;i.appendChild(B.m);this.aa$=B.m;this.aa$.addEventListener("contextmenu",w,!1);var F=q.add.SoLd.filterFX.v,H=F.filterFXList.v,v=F.enab.v;
|
|
B.NN(v);for(var Q=H.length-1;Q>=0;Q--){var o=H[Q].v,J=hw.BT(o);if(bS.wb[J])J=bS.wb[J];var C=o.Nm.v;if(hw.names[J])C=dq.get(hw.names[J]);
|
|
if(bS.names[J])C=dq.get(bS.names[J]);var Y="afw_"+J,B=new jc.zh(C,"f",Y,W.depth,1,Q);B.NN(v&&o.enab.v);
|
|
B.parent=this;i.appendChild(B.m)}}if(W.index==S.w[0]){var K=q.Yi,u;if(K<=0)u=this.m4;else if(K==1)u=this.lb;
|
|
else if(K==3)u=this.kp;if(u)u.setAttribute("class","thumb active");if(q.AY&&this.dM)this.dM.setAttribute("class","thumb active")}O.style.opacity=q.jP()?1:.25;
|
|
b.setAttribute("style","width:"+Math.max(0,W.depth-1)*18+"px");var f=q.add.lspf!=null&&q.add.lspf!=0;
|
|
this.VN.style.opacity=q.Ox(31)?1:.5;D[4]=q.Vy?m.O("div","clipp"):null;D[6]=e?this.OT:null;D[7]=e?this.lb:null;
|
|
D[8]=q.add.vmsk&&!r?this.tw:null;D[9]=q.add.vmsk&&!r?this.dM:null;var jk=q.RL,hE=S.w;if(jk!=0)for(var Q=0;
|
|
Q<hE.length;Q++)if(S.g[hE[Q]].RL==jk){l=!0;break}if(l){R[0]=m.O("div",q.i2?"link":"linkX");R[0].addEventListener("click",this.asT.bind(this),!1)}R[1]=f?this.VN:null;
|
|
R[2]=q.a9()?this.aot:null;R[3]=q.a9()||q.rB()?this.T8:null;this.T8.setAttribute("class",q.t0()?"arfx open gsicon":"arfx closed gsicon");
|
|
var Z=D;for(var Q=0;Q<Z.length;Q++)if(Z[Q])M.appendChild(Z[Q]);Z=R;for(var Q=0;Q<Z.length;Q++)if(Z[Q])U.appendChild(Z[Q])}jr.prototype=new eS;
|
|
jr.prototype.adF=function(W){var h=this.pz.index;if(W.indexOf(h)!=-1){if(this.m.scrollIntoView)this.m.scrollIntoView({block:"nearest"})}for(var Q=0;
|
|
Q<this.y1.length;Q++)this.y1[Q].adF(W)};jr.I$=function(W,h){var S=h.getBoundingClientRect();return(W.clientY-S.top)/S.height};
|
|
jr.prototype.oG=function(W){W.stopPropagation();var h=W.target==this.lb?"m":W.target==this.dM?"vm":"l";
|
|
W.dataTransfer.setData("Text",JSON.stringify({ez:h,wJ:this.pz.index}))};jr.prototype.Jl=function(W){m.xa(W);
|
|
this.TL()};jr.prototype.ue=function(W){m.xa(W);this.TL();var h=W.dataTransfer.getData("Text"),S=this.parent.om,k=jr.I$(W,this.a7),p=this.pz.index;
|
|
if(k>.8){var I=!0,q=S.root.rk(p);while(q.parent!=null){var P=q.parent,t=P.children;if(t.indexOf(q)!=0)I=!1;
|
|
q=q.parent}if(I){p=0;k=1}}if(h==""){m.pL(W,this,this.parent.e$.indexOf(S),p+(k>.5?0:1))}else if(h!="--panel"){var h=JSON.parse(h),M=h.ez;
|
|
if(M=="l")this.VB({o:$.sO,source:h.wJ,target:p,hb:k});else if(M=="m"||M=="vm")this.VB({o:M=="m"?$.dc:$.W3,src:h.wJ,AA:p});
|
|
else jr.ait(W,h,this)}};jr.ait=function(W,h,S,k){var p=h.ez,I=S.pz.index,q=h.wJ;if(p=="s"||p=="sm")S.VB({o:$.ya,src:q,AA:I,xL:h.xL});
|
|
if(p=="f"||p=="fm")S.VB({o:$.Fx,src:q,AA:I,xL:h.xL,LR:k==null?0:k})};jr.prototype.SL=function(W){m.xa(W);
|
|
var h=jr.I$(W,this.a7),S=this.pz.i.vc()&&.5<h&&h<.8;this.TL();var k="inset 0 "+(S?0:h>.5?-3:3)+"px "+(S?"5px black":"0 rgba(0,0,0,0.5)");
|
|
this.a7.style.boxShadow=k};jr.prototype.TL=function(W){this.a7.style.boxShadow=""};jr.ai1=-1;jr.SC=!1;
|
|
jr.a2b=function(W){jr.SC=!1;document.body.removeEventListener("mouseup",jr.a2b)};jr.prototype.a1v=function(W){if(W.button!=0)return;
|
|
if(W.type=="mousedown"){jr.SC=!0;document.body.addEventListener("mouseup",jr.a2b,!1)}if(W.type=="mouseover"&&(!jr.SC||jr.ai1==this.pz.index))return;
|
|
m.xa(W);this.VB({o:$.EO,i:this.pz.index});jr.ai1=this.pz.index};jr.prototype.aqo=function(W){m.xa(W);
|
|
this.VB({o:$.pp,i:this.pz.index})};jr.prototype.ace=function(W){this.VB({o:$.fY,i:this.pz.index})};jr.prototype.a9a=function(W){this.VB({o:$.gp,i:this.pz.index})};
|
|
jr.aK=0;jr.prototype.aen=function(W){var h=jr.aK;jr.aK=Date.now();if(Date.now()-h>300)return;W.preventDefault();
|
|
W.stopPropagation();this.a7.setAttribute("draggable","false");var S=new bn.AR(this.Sq,this.A3.bind(this))};
|
|
jr.prototype.A3=function(W){this.VB({o:$.NV,i:this.pz.index,name:W})};jr.prototype.atf=function(W){this.VB({o:$.E5,i:this.pz.index})};
|
|
jr.prototype.asT=function(W){this.VB({o:$.pw,i:this.pz.index})};jr.prototype.aix=function(W){var h=W.sourceCapabilities;
|
|
if(h)h=h.firesTouchEvents;if(W.button!=2&&h!=!0)return;var S=this.Yi(W);if(S!=3&&W.currentTarget==this.aa$)S=4;
|
|
if(W.target==this.aot||W.currentTarget==this.acq)S=5;var k=new em("rclick",!0);k.data={i:this.pz.index,Yi:S,o2:m.DJ(W,document.body)};
|
|
this.c(k)};jr.prototype.Yi=function(W){var h=W.target,S=h;return S==this.dM?2:S==this.lb?1:S==this.m4?0:S==this.kp?3:-1};
|
|
jr.prototype.ah8=function(W){var h=W.target,U;if(h==this.ux||h==this.T8||h==this.OT||h==this.tw||h.tagName&&h.tagName.toLowerCase()=="input")return;
|
|
var S=this.Yi(W),k=this.parent.om,p=this.pz.index,I=k.g[p];if(h==this.VN){this.VB({o:$.q9,i:p,kN:[[!1,!1,!1,!1,!1],[0,1,2,3,31]]});
|
|
return}if(W.button==0&&W.detail==2){if(h==this.Sq)return;var q=new em(y.E.u,!0),P=new em(y.E.W,!0),t=new em(y.E.gg,!0);
|
|
if(S==0&&I.add.SoCo){var M=N.X.iZ(I.add.SoCo.Clr.v);P.data={o:y.D.mJ,DG:"colorpicker",tg:M.p<<16|M.z<<8|M.S,x9:function(D){var R=N.X.hg({S:D&255,z:D>>>8&255,p:D>>16&255});
|
|
R={classID:"null",Clr:{t:"Objc",v:R}};var O=new em(y.E.u,!0);O.b=a.m5;O.data={o:$.IR,Z$:[p],hF:!0,k:{eY:1,EH:R}};
|
|
this.c(O)}.bind(this),nB:!0}}else if(S==0&&(bS.get(I.add)||I.add.SoCo||I.add.GdFl||I.add.PtFl))P.data={o:y.D.QN,DG:bn.zn.a0};
|
|
else if(S!=0&&S!=-1)P.data={o:y.D.QN,DG:bn.zn.a0};else if(S==0&&I.add.SoLd)t.data={HP:"placedLayerEditContents",b4:{classID:"placedLayerEditContents"}};
|
|
else if(S==0&&I.add.TySh){q.b=a.mj;q.data={o:"editCurr",sq:p}}else P.data={o:y.D.mJ,DG:"layerstyle",i:p};
|
|
this.c(t.data?t:P.data?P:q);return}if(W.button!=0)return;if(S==1||S==3){var i=S==3?I.$U(k).v:I.kX();
|
|
U=i.oz?k.t.aL.join("")=="111"?1:2:0}var z={o:$.uR,i:p,_N:S,a8a:U,a8Q:!0};this.VB(z)};jr.prototype.VB=function(W){var h=new em(y.E.u,!0);
|
|
h.data=W;h.b=a.m5;this.c(h)};jr.prototype.amS=function(){var W=this.pz.i,h=W.add,S=this.parent.Cs.B(),k=this.parent.A1[S].B();
|
|
if(S==0){if(k[0]&&h.SoLd==null&&h.TySh==null&&W.p2())return!0;if(k[1]&&bS.get(h)!=null)return!0;if(k[2]&&h.TySh!=null)return!0;
|
|
if(k[3]&&h.vstk!=null)return!0;if(k[4]&&h.SoLd!=null)return!0;return!1}if(S==1)return W.getName().toLowerCase().indexOf(k.toLowerCase())!=-1};
|
|
jc.zh=function(W,h,S,k,p,I,q){eS.call(this);this.atz=h;this.Zy=S;this.index=I;this.m=m.O("div","styleitem");
|
|
this.a7=m.O("div","head");this.aeF=null;if(h=="f"){var P=this.aeF=m.O("div","headR");P.textContent="\u2699";
|
|
this.a7.appendChild(P)}this.wI=m.O("div","eye gsicon");this.Sq=m.O("div","label");this.m.appendChild(this.a7);
|
|
this.a7.appendChild(this.wI);if(q){this.lb=q;this.a7.appendChild(this.lb);this.a7.setAttribute("style","height: "+(q.firstChild.height/m.F()+10)+"px")}this.Sq.innerHTML=W;
|
|
this.m.setAttribute("style","margin-left: "+(24+k*16+p*22)+"px");this.a7.appendChild(this.Sq);this.wI.addEventListener("click",this.aaj.bind(this),!1);
|
|
var t=this.m;t.setAttribute("draggable","true");t.addEventListener("dragstart",this.oG.bind(this),!1);
|
|
if(!0){t.addEventListener("drop",this.ue.bind(this),!1);t.addEventListener("dragover",this.SL.bind(this),!1);
|
|
t.addEventListener("dragenter",m.xa,!1);t.addEventListener("dragleave",this.Jl.bind(this),!1)}this.m.addEventListener("click",this.he.bind(this),!1)};
|
|
jc.zh.prototype=new eS;jc.zh.prototype.oG=function(W){W.stopPropagation();W.dataTransfer.setData("Text",JSON.stringify({ez:this.atz,wJ:this.parent.pz.index,xL:this.index}))};
|
|
jc.zh.prototype.Jl=function(W){m.xa(W);this.TL()};jc.zh.prototype.ue=function(W){m.xa(W);this.TL();var h=W.dataTransfer.getData("Text");
|
|
if(h=="")return;var h=JSON.parse(h);jr.ait(W,h,this.parent,this.index+(jr.I$(W,this.a7)>.5?0:1))};jc.zh.prototype.SL=function(W){m.xa(W);
|
|
var h=jr.I$(W,this.a7)>.5;this.TL();var S="border-"+(h?"bottom":"top");this.a7.style[S]="0.2em solid rgba(0,0,0,0.5)"};
|
|
jc.zh.prototype.TL=function(W){this.a7.style.border="none"};jc.zh.prototype.NN=function(W){var h=15;
|
|
if(1<m.F()&&m.F()<1.5)h=h/m.F();this.wI.setAttribute("style","background-size: "+h+"px "+h+"px;");this.wI.style.opacity=W?1:.2};
|
|
jc.zh.prototype.he=function(W){if(W.target==this.wI)return;var h=this.parent.pz.index;if(W.detail!=1&&this.Zy!=null){var h=this.parent.pz.index,S=new em(y.E.W,!0);
|
|
if(this.Zy.indexOf("afw_")==0){var k=this.Zy.slice(4),p=s[k]||hw.K[k],I=W.target==this.aeF;if(!I&&!p)return;
|
|
S.data=a.L7.I3(I?"blendOptions":k,{i:h,index:this.index})}else S.data={o:y.D.mJ,DG:this.Zy,i:h,index:this.index};
|
|
this.c(S)}else{if(W.target.getAttribute("class")!="thumb")this.parent.VB({o:$.uR,i:h,_N:0})}};jc.zh.prototype.aaj=function(W){var h={fm:$.Ce,f:$.tv,sm:$.ge,s:$.X5}[this.atz];
|
|
this.parent.VB({o:h,i:this.parent.pz.index,index:this.index})};function e5(){bn.call(this,"Guide Guy",!1,"---panels/guideguy",bn.zn.a9j);
|
|
this.pv=null;this.v9=[];var W=m.O("div","form padded");this.Ls.appendChild(W);W.setAttribute("style","width:200px");
|
|
this.Ls.appendChild(W);var h=m.O("canvas"),S=h.getContext("2d");h.width=h.height=160;var k=[32,0,16,160,0,32,160,16,0,112,160,16],p="Margin Left,Margin Top,Margin Right,Margin Bottom,Column Count,Row Count,Column Width,Row Height,Column Gap,Row Gap".split(","),I=[0,0,0,0,0,0,0,0,0,0];
|
|
for(var Q=0;Q<10;Q++){S.clearRect(0,0,160,160);S.setTransform(1,0,0,1,80,80);S.rotate((Q&3)*Math.PI/2);
|
|
S.translate(-80,-80);S.fillStyle="rgba(0,0,0,0.3)";if(Q<4){for(var q=0;q<12;q+=4){S.fillStyle=q==0?"#000000":"rgba(0,0,0,0.3)";
|
|
S.fillRect(k[q],k[q+1],k[q+2],k[q+3])}}else if(Q<6){var P=8*6;S.fillRect(0,0,P,160);S.fillRect(8*7,0,P,160);
|
|
S.fillStyle="#000000";S.fillRect(8*14,0,P,160)}else if(Q<8){S.fillRect(0,0,16,160);S.fillRect(160-16,0,16,160);
|
|
S.fillRect(32,0,160-64,160);S.fillStyle="#000000";S.fillRect(32,80-8,160-64,8*1)}else{S.fillRect(0,0,8*7,160);
|
|
S.fillRect(8*13,0,160,160);S.fillStyle="#000000";S.fillRect(8*7,80-8,8*6,8*1)}var t="<img src=\""+h.toDataURL()+"\" class=\"autoscale gsicon\" /> ",M=new fA(t,0,200,Q==4||Q==5?null:"px",null,null,null,4,p[Q]);
|
|
M.parent=this;M.h(y.E.l,this.aow,this);M.f(I[Q]);M._();this.v9.push(M);W.appendChild(M.m)}var U=[[11,14],[11,15,0]];
|
|
this.LP=[];for(var Q=0;Q<U.length;Q++){var i=new aA(U[Q],!0,null,!0);this.LP.push(i);i.h("click",this.Qx,this);
|
|
W.appendChild(i.m)}for(var Q=0;Q<6;Q++){S.setTransform(1,0,0,1,80,80);S.rotate(Math.floor(Q/3)*Math.PI/2);
|
|
S.translate(-80,-80);S.clearRect(0,0,160,160);S.fillStyle="rgba(0,0,0,0.3)";S.fillRect(0,0,160,160);
|
|
S.clearRect(16,16,128,128);S.fillStyle="#000000";var z=Q%3;S.fillRect([0,9,18][z]*8,0,16,160);var t="<img src=\""+h.toDataURL()+"\" class=\"autoscale gsicon\" /> ",i=new aA(t,!1,null,!1);
|
|
this.LP.push(i);i.h("click",this.Qx,this);W.appendChild(i.m)}}e5.prototype=new bn("");e5.prototype._=function(){bn.prototype._.call(this);
|
|
for(var Q=0;Q<this.LP.length;Q++)this.LP[Q]._()};e5.prototype.aow=function(W){var h=this.v9,S=h.indexOf(W.target),k=Math.floor(S/2),p=S&1,I=[];
|
|
for(var Q=0;Q<4;Q++)I.push(h[2*Q+p].B());var q=-1;if(k==2&&I[2]!=0&&I[3]!=0&&I[4]!=0)q=4;if(k==3&&I[3]!=0&&I[2]!=0&&I[4]!=0)q=4;
|
|
if(k==4&&I[4]!=0&&I[2]!=0&&I[3]!=0)q=3;if(q!=-1)h[2*q+p].f(0)};e5.prototype.Qx=function(W){var h=this.pv,S=this.LP.indexOf(W.target),k=[[],[]];
|
|
if(h==null)return;var p=h.q?h.q.rect:new gj(0,0,h.e,h.Z),I=p.e,q=p.Z;if(S==0){var P=[[],[]];for(var Q=0;
|
|
Q<this.v9.length;Q++)P[Q&1].push(this.v9[Q].B());var t=[e5.alo(P[0],p.x,p.x+I),e5.alo(P[1],p.y,p.y+q)];
|
|
k=e5.ai6(t);a.c0.hy(k,h.A_())}else if(S==1){}else{S-=2;var M=Math.floor(S/3),t=[[],[]];t[M].push([p.x,p.x+I/2,p.x+I,p.y,p.y+q/2,p.y+q][S]);
|
|
k=e5.ai6(t);a.c0.hy(k,h.A_())}this.ahg(k)};e5.ai6=function(W){var h=[],S=[];for(var k=0;k<2;k++)for(var Q=0;
|
|
Q<W[k].length;Q++){h.push([k,W[k][Q]]);S.push(-1)}return[h,S]};e5.prototype.abb=function(W){var h=this.adQ.indexOf(W.target)};
|
|
e5.prototype.ahg=function(W){var h=new em(y.E.u,!0);h.b=a.M2;h.data={o:"gids",Ir:W};this.c(h)};e5.alo=function(W,h,S){var k=[],p=W[2],I=W[3],q=W[4],P=0;
|
|
if(p==0)P++;if(I==0)P++;if(q==0)P++;if(P>1&&p==0&&I==0){if(W[0]!=0)k.push(h+W[0]);if(W[1]!=0)k.push(S-W[1]);
|
|
return k}var t=S-h-W[0]-W[1];if(p==0){if(q==0){p=Math.floor(t/I);q=(t-p*I)/(p-1)}else{p=1;while(I*p+q*(p-1)+I+q<=t)p++}}else if(p!=0&&I!=0){if(p*I>t)p=Math.floor(t/I);
|
|
q=(t-p*I)/(p-1)}k.push(h+W[0],S-W[1]);var I=(t-q*(p-1))/p;for(var Q=1;Q<p;Q++){if(q==0)k.push(h+W[0]+Q*I);
|
|
else k.push(h+W[0]+Q*I+(Q-1)*q,h+W[0]+Q*I+Q*q)}return k};e5.prototype.Yo=function(W){this.pv=W};function eq(){bn.call(this,[9,2],!1,"---panels/properties",bn.zn.a0);
|
|
this.abR=null;this.h6=null;this.Nm=null;this.a41=-1;this.S_=null}eq.prototype=new bn("");eq.prototype.UW=function(W,h){this.s6=W;
|
|
this.R_=h;W=W-16;h=h-12;var S=this.S_;if(S){S.style.width=W+"px";S.style.height=h+"px";for(var Q=0;Q<3;
|
|
Q++)this.D$[Q].UW(W-12,h)}};eq.prototype.FY=function(){this.S_=m.O("div","padded scrollable");this.Ls.appendChild(this.S_);
|
|
var W=m.O("span");this.S_.appendChild(W);this.OR=[new aA([0,3]),new aA([12,73]),new aA([12,91,0])];for(var Q=0;
|
|
Q<this.OR.length;Q++){var h=this.OR[Q];h.h("click",this.aue,this);W.appendChild(h.m);if(Q==2)h.m.style.marginRight="0"}this.S_.appendChild(m.O("hr"));
|
|
this.U7=new eq.b7;this.U7.parent=this;this.gy=new eq.IN;this.gy.parent=this;this.qT=new eq.M6;this.qT.parent=this;
|
|
this.D$=[this.U7,this.gy,this.qT];this.S_.appendChild(this.U7.m);this.UW(this.s6,this.R_)};eq.prototype.aue=function(W){var Q=this.OR.indexOf(W.currentTarget);
|
|
this.Mj(Q);this.ar4(Q==1?this.gy.f0:-1)};eq.prototype.Mj=function(W){for(var Q=0;Q<3;Q++){this.OR[Q].UZ();
|
|
var h=this.D$[Q].m;if(h.parentNode==this.S_&&Q!=W)this.S_.removeChild(h);if(h.parentNode!=this.S_&&Q==W)this.S_.appendChild(h)}this.OR[W].$V()};
|
|
eq.prototype.ar4=function(W){var h=this.h6.w[0],S=this.h6.g[h],k=W+1;if(W==1&&S.AY)return;var p=new em(y.E.u,!0);
|
|
p.b=a.m5;if(W!=1&&S.AY){p.data={o:$.uR,i:h,_N:2};this.c(p)}p.data={o:$.uR,i:h,_N:k};this.c(p)};eq.prototype._=function(){bn.prototype._.call(this);
|
|
if(this.S_==null)return;this.Yo(this.h6);for(var Q=0;Q<3;Q++){this.OR[Q]._();this.D$[Q]._()}};eq.prototype.cR=function(){if(!m.oq(this.Ls))return;
|
|
if(this.S_==null){this.FY();this.IF(this.Nm,f6.W8);this.Yo(this.abR);this._()}};eq.prototype.Yo=function(W){this.abR=W;
|
|
if(this.S_==null)return;this.U7.Yo(W);this.gy.Yo(W);this.qT.Yo(W);if(W==null||W.w.length==0||W.g[W.w[0]]==null){m.dT(this.Ls,"disabled");
|
|
this.h6=null;return}else m.Eg(this.Ls,"disabled");var h=W.w[0],S=W.g[h],k=W.O4(),p=k[0],I=k[1];if(I.length!=0){var q=p[I[0]],P=q.add.vogk,t=!1;
|
|
if(P)for(var Q=0;Q<P.length;Q++){var M=P[Q].v;if(!N.uy.Bj(M))continue;t=!0;h=q.Kr}}h+=","+t;if(W!=this.h6||this.a41!=h){this.h6=W;
|
|
this.a41=h;if(t)this.Mj(2);else if(S.Yi<1&&!S.AY)this.Mj(0);else this.Mj(1)}this.OR[1].G2(this.gy.f0!=-1);
|
|
this.OR[2].G2(t)};eq.prototype.IF=function(W,h){this.Nm=W;if(this.U7)this.U7.IF(W,h);if(this.qT)this.qT.IF(W,h)};
|
|
eq.b7=function(){eS.call(this);this.m=m.O("div","form");this.anw=new gs("Hello");this.pc=new aA([1,12,2],null,null,!0);
|
|
this.pc.m.style.ank="right";this.pc.h("click",this.d0,this);this.m.appendChild(this.anw.m);this.m.appendChild(this.pc.m);
|
|
this.fu=null;this.WZ=null;this.h6=null;this.Nm=null;this.a0R=-1;this.a8m=null;this.Hd=new ax(!0);this.Hd.parent=this;
|
|
this.Hd.h(y.E.l,this.a6W,this);this.K0=m.O("div","marged hiline");this.K0.appendChild(this.Hd.m);this.Ju=new im("GrFl",!0);
|
|
this.Ju.parent=this;this.Ju.h(y.E.l,this.a0V,this);this.i3=m.O("div","marged hiline");var W="Grad Rvrs Type Algn Angl Dthr Scl Ofst".split(" ");
|
|
for(var Q=0;Q<W.length;Q++){var h=this.Ju.jw[W[Q]].m;this.i3.appendChild(h)}this.NT=new im("patternFill",!0);
|
|
this.NT.parent=this;this.NT.h(y.E.l,this.aht,this);this.ID=m.O("div","marged hiline");var W=["Ptrn","Angl","Scl","Algn","phase"];
|
|
for(var Q=0;Q<W.length;Q++){var h=this.NT.jw[W[Q]].m;this.ID.appendChild(h)}this.z6={};for(var S in bS.names){if(s[S]==null)continue;
|
|
this.z6[S]=new s[S];this.z6[S].h(y.E.l,this.a8B,this);this.z6[S].parent=this}var k=this.ad8=m.O("div","marged hiline");
|
|
this.ze=new iQ(0,!0);k.appendChild(this.ze.m);this.ze.h(y.E.l,this.xk,this);this.ahB=null;this.FV=new hA;
|
|
this.FV.parent=this;this.FV.h(y.E.l,this.xk,this);k.appendChild(this.FV.m)};eq.b7.prototype=new eS;eq.b7.prototype.UW=function(W,h){var S=this.z6;
|
|
for(var k in S)S[k].UW(W,h)};eq.b7.prototype.d0=function(W){var h=this.h6,S=h.g[h.w[0]],k=bS.get(S.add);
|
|
this.WZ.f(hw.QE(k));this.a8B()};eq.b7.prototype._=function(){for(var W in this.z6)this.z6[W]._();this.Ju._();
|
|
this.NT._();this.FV._();this.ze._();this.pc._()};eq.b7.prototype.xk=function(W){var h=new em(y.E.u,!0),S=this.ze.B(),k=this.ahB;
|
|
if(W.target==this.ze&&S[2]==k[2]&&S[3]==k[3]){h.b=a.M2;h.data={o:"trsl",GV:S[0]-k[0],qp:S[1]-k[1]}}else{var p=$._R(new gj(S[0],S[1],S[2],S[3])),I=this.FV.ac5();
|
|
I.artboardRect={t:"Objc",v:p};h.b=a.m5;h.data={o:$.Uf,xD:I}}this.c(h)};eq.b7.prototype.a6W=function(W){var h=this.h6,S=h.w[0];
|
|
if(h.g[S].add.SoCo==null)return;var k=JSON.parse(JSON.stringify(h.g[S].add.SoCo));k.Clr.v=this.Hd.B();
|
|
this.Xk({eY:1,EH:k})};eq.b7.prototype.a0V=function(W){var h=this.h6,S=h.w[0];if(h.g[S].add.GdFl==null)return;
|
|
this.Xk({eY:2,EH:this.Ju.B()})};eq.b7.prototype.aht=function(W){this.Xk({eY:3,EH:this.NT.B()})};eq.b7.prototype.Xk=function(W){this.ak_(a.m5,{o:$.IR,Z$:[this.h6.w[0]],hF:!0,k:W})};
|
|
eq.b7.prototype.a8B=function(W){this.ak_(a.AT,{o:"edit_layer",k:this.WZ.B()})};eq.b7.prototype.ak_=function(W,h){var S=new em(y.E.u,!0);
|
|
S.b=W;S.data=h;this.c(S)};eq.b7.prototype.Yo=function(W,h){var S=dq.get([0,3]),k=!1,p=null;this.h6=W;
|
|
if(W&&W.g.length>0&&W.w.length!=0&&W.g[W.w[0]]){var I=W.g[W.w[0]],q=bS.get(I.add);if(q!=null&&this.z6[q]!=null){p=this.z6[q].m;
|
|
this.WZ=this.z6[q];this.z6[q].f(JSON.parse(JSON.stringify(I.add[q])));if(W.w[0]!=this.a0R){var P=W.jc(W.w[0]-1);
|
|
this.a8m=N.FZ(P)}this.z6[q].sW(this.a8m);S=dq.get(bS.names[q]);k=!0}if(I.add.SoCo){p=this.K0;this.Hd.f(I.add.SoCo.Clr.v);
|
|
S=dq.get([6,48,0,0])}if(I.add.GdFl){p=this.i3;this.Ju.update(W,I.add.GdFl);S=dq.get([6,48,0,1])}if(I.add.PtFl){p=this.ID;
|
|
this.NT.update(W,I.add.PtFl);S=dq.get([6,48,0,2])}if(I.add.artb){var t=I.add.artb,M=I.rp();p=this.ad8;
|
|
this.FV.abC(t);var U=this.ahB=[M.x,M.y,M.e,M.Z];this.ze.f(U,[W.H$,W.e,this.Nm.dH.VI]);S="Artboard"}this.a0R=W.w[0]}if(p!=this.fu){if(this.fu)this.m.removeChild(this.fu);
|
|
if(p!=null)this.m.appendChild(p);this.fu=p}this.anw.f(S);this.pc.m.style.display=k?"":"none"};eq.b7.prototype.IF=function(W,h){this.Nm=W;
|
|
this.Ju.IF(W,h);this.NT.IF(W,h);if(h==f6.ic)this.Yo(this.h6,W);for(var S in this.z6)this.z6[S].IF(W,h)};
|
|
eq.IN=function(){eS.call(this);this.m=m.O("div","form");this.h6=null;this.f0=0;var W=m.O("span","fitem");
|
|
this.m.appendChild(W);this.OR=[new aA([6,2]),new aA([6,3]),new aA([6,50])];for(var Q=0;Q<this.OR.length;
|
|
Q++){var h=this.OR[Q];h.h("click",this.a3k,this);W.appendChild(h.m)}this.uX=new h1([12,74],0,255);this.uX.h(y.E.l,this.ZJ,this);
|
|
this.m.appendChild(this.uX.m);this.ib=new h1([7,6],0,500,"px",2,!0);this.ib.h(y.E.l,this.ZJ,this);this.m.appendChild(this.ib.m);
|
|
this.Hs=new aA([4,11],null,null,!0);this.Hs.h("click",this.aer,this)};eq.IN.prototype=new eS;eq.IN.prototype.aer=function(){var W=new em(y.E.u,!0);
|
|
W.b=a.AT;W.data={o:"start",dv:"nvrt"};this.c(W)};eq.IN.prototype.ZJ=function(W){var h=this.uX.B(),S=this.ib.B(),k=new em(y.E.u,!0);
|
|
k.b=a.m5;k.data={o:$.pF,L3:this.h6.w[0],xh:{dw:this.f0,uX:h,ib:S}};this.c(k)};eq.IN.prototype._=function(){for(var Q=0;
|
|
Q<this.OR.length;Q++)this.OR[Q]._();this.uX._();this.ib._();this.Hs._()};eq.IN.prototype.Yo=function(W){this.h6=W;
|
|
this.n3()};eq.IN.prototype.a3k=function(W){this.n3(this.OR.indexOf(W.currentTarget));this.parent.ar4(this.f0)};
|
|
eq.IN.prototype.n3=function(W){var h=this.h6,S=this.OR;for(var Q=0;Q<3;Q++){var k=S[Q];k.UZ();k.lz()}if(h==null||h.g.length==0||h.w.length==0||h.g[h.w[0]]==null)return;
|
|
var p=-1,I=h.g[h.w[0]];if(I.rB()&&I.$U(h).v!=null){S[2].Ze();p=2}if(I.add.vmsk){S[1].Ze();p=1}if(I.kX()){S[0].Ze();
|
|
p=0}if(W!=null)p=W;else if(I.AY)p=1;else if(I.Yi==3)p=2;else if(I.Yi==1)p=0;this.f0=p;if(p==-1){this.uX.lz();
|
|
this.ib.lz();return}var q=I.iK(p);this.uX.Ze();this.ib.Ze();this.uX.f(q.uX);this.ib.f(q.ib);S[p].$V();
|
|
var P=this.Hs.m;if(p==0)this.m.appendChild(P);else if(P.parentNode==this.m)this.m.removeChild(P)};eq.M6=function(){eS.call(this);
|
|
this.m=m.O("div","form");this.pv=null;this.Nm=null;this.x7=-1;this.qW=new iQ(0,!1);this.UQ=new h1([12,15],-180,180,"\xB0",2);
|
|
this.ah=new iQ(1,!0);this.MH=new h1([12,94,0],0,100,null,2);this.Gq=new h1([12,78],3,30);this.qW.h(y.E.l,this.Kv,this);
|
|
this.UQ.h(y.E.l,this.Kv,this);this.ah.h(y.E.l,this.Kv,this);this.MH.h(y.E.l,this.Kv,this);this.Gq.h(y.E.l,this.Kv,this)};
|
|
eq.M6.prototype=new eS;eq.M6.prototype._=function(){this.qW._();this.UQ._();this.ah._();this.MH._();
|
|
this.Gq._()};eq.M6.prototype.Kv=function(W){var h=this.pv,S=N.uy.ew(h),k=W.target.B(),p=[this.qW,this.UQ,this.ah,this.MH,this.Gq].indexOf(W.target);
|
|
if(p==0){var I=[];I[0]=k[0];I[1]=k[1];I[2]=I[0]+k[2];I[3]=I[1]+k[3];k=I}if(p==1)k=k*Math.PI/180;var q={0:1,1:2,2:3,3:3,4:4}[p];
|
|
S[q]=k;var P=new em(y.E.u,!0);P.b=a.m5;P.data={o:$.Bz,k:S};this.c(P)};eq.M6.prototype.Yo=function(W){var h=this.m;
|
|
this.pv=W;if(W==null)return;var S=this.Nm,k=[W.H$,W.e,S.dH.VI],p=N.uy.ew(W),I=p[0],q=p[1];if(q==null)return;
|
|
var P=I!=this.x7;this.x7=I;if(P)m.hP(h);if(P)h.appendChild(this.qW.m);if(P)h.appendChild(this.UQ.m);
|
|
this.qW.f([q[0],q[1],q[2]-q[0],q[3]-q[1]],k);this.UQ.f(p[2]*180/Math.PI);if(I==2){if(P)h.appendChild(this.ah.m);
|
|
var t=p[3];this.ah.f(t,k)}if(I==7||I==8){if(P)h.appendChild(this.MH.m);this.MH.f(p[3])}if(I==8){if(P)h.appendChild(this.Gq.m);
|
|
this.Gq.f(p[4])}};eq.M6.prototype.IF=function(W,h){this.Nm=W;this.Yo(this.pv)};function ju(W){bn.call(this,W.name,!0);
|
|
this.om=W;this.MG=null;this.uH=document.createElement("canvas");this.vp=this.uH.getContext("2d");this.Bc=document.createElement("canvas");
|
|
this.Vz=this.Bc.getContext("2d");var h=16,S=N.U(16*16*4);N.LU(S,h,h,8);this.y3=N.scale.AQ(S,h,h);this.lK=new gu(this.Ls);
|
|
this.lK.parent=this;this.T$=0;this.arF="";this.Kw=4}ju.prototype=new bn;ju.prototype.a9L=function(){if(this.om.Wm())return window.confirm(dq.get([22,6,3])+" "+this.om.name+". "+dq.get([22,6,4]));
|
|
return!0};ju.prototype.IF=function(W,h){this.MG=W};ju.prototype.Yo=function(W){this.cR();this.rD()};
|
|
ju.prototype.UW=function(W,h){if(W<=0||h<=0)return;this.s6=W;this.R_=h;var S=this.om,k=m.F();S.t.Vz.e=Math.floor(W*k);
|
|
S.t.Vz.Z=Math.floor(h*k);m.rE(this.Bc,W,h);m.rE(this.uH,W,h);m.rE(n.hi(),W,h);if(S.t.J==0)S.t.J=a.xU._I(S.e,S.Z,W*k,h*k);
|
|
this.rD()};ju.prototype.cR=function(){var W=this.Ls.firstChild;if(!n.O9&&W==n.hi()||n.O9&&W==this.Bc)this.Ls.removeChild(W);
|
|
var h=n.O9?n.hi():this.Bc;if(!m.oq(h))this.Ls.appendChild(h)};ju.prototype.rD=function(){if(n.O9!=this.Kw){this.T$=0;
|
|
this.arF=""}this.Kw=n.O9;if(this.MG==null)return;if(n.O9)this.a5L();else this._0();var W=this.om;this.T$=W.t.J;
|
|
this.arF=JSON.stringify(W.t.aL)};ju.prototype.a5L=function(){if(n.O9&&ju.apt==null)ju.apt=new ju.MU(!1);
|
|
if(n.O9&&ju.aax==null)ju.aax=[new ju.MU(!0,2),new ju.MU(!0,8),new ju.MU(!0,32),new ju.MU(!0,128)];var W=this.om,M,z=0;
|
|
if(W.hK==null)return;var h=W.t,S=h.Vz.e,k=h.Vz.Z,p=n.ds;this.Vz.clearRect(0,0,S,k);var I=this.agR(W);
|
|
if(h.Un==null)h.Un=new n.qr(S,k);if(I)h.Un.set(this.Bc);else{n.Wf(h.Un);n.Ds(1)}var q=h._c(0,0),P=new ex;
|
|
P.scale(S,k);P.concat(h.Er(!0));P.scale(1/W.e,1/W.Z);var t=[P.S4,P.S,0,P.ZB,P.Bq,0,P.y8,P.S8,1];if(ju.a70==null)ju.a70=new Float32Array(4*1024);
|
|
var U=[0,0,0,0],i=ju.a70;if(W.add.artd){i.fill(0);U=ju.c6(W);var D=W.e,R=W.Z,A=0;for(var Q=0;Q<W.g.length;
|
|
Q++){var O=W.g[Q],b=O.add.artb;if(b==null||!O.jP())continue;var w=O.rp();i[z]=w.x/D;i[z+1]=w.y/R;i[z+2]=w.e/D;
|
|
i[z+3]=w.Z/R;z+=4;if(z==i.length)break}if(z>2*4)A++;if(z>8*4)A++;if(z>32*4)A++;M=ju.aax[A];i=new Float32Array(i.buffer,0,[2,8,32,128][A]*4)}else M=ju.apt;
|
|
n.H3(S,k);n.Ds(0);n.H3(S,k);M.Gz();M.B6(h.Un.hr,W.hK.hr,new Float32Array(t),new Float32Array([S/8,k/8,q.x/S,q.y/k]),W.e,W.Z,1/W.t.J,S,k,new Float32Array(U),i,new Float32Array(N.iD.Vg(N.iD.fT(h.aL))));
|
|
p.drawArrays(p.TRIANGLES,0,6)};ju.c6=function(W){return[0,0,0,0]};ju.a65=function(W){var h=N.X.iZ(W.v),S=[h.p/255,h.z/255,h.S/255,1];
|
|
for(var Q=0;Q<4;Q++)S[Q]=Math.min(1,S[Q]);return S};ju.av=function(W,h){var S=W[2]*255;if(n.O9)S=h?0:Math.max(1,S);
|
|
return"rgba("+W[0]*255+","+W[1]*255+","+S+","+W[3]+")"};ju.VR=function(W){if(n.O9)for(var Q=0;Q<W.length;
|
|
Q+=4){if(W[Q+2]==0)W[Q+2]=3}};ju.prototype._0=function(){var W=this.om;if(W.buffer==null)return;var h=W.t,S=h.Vz,k=S.e,p=S.Z,I=new gj(0,0,W.e,W.Z);
|
|
this.vp.clearRect(0,0,k,p);this.Vz.clearRect(0,0,k,p);var q=h.Er(!0),P=q.clone();P.uA();if(W.add.artd==null){this.Vz.save();
|
|
var t=P.xK(new eC(0,0));P.translate(-t.x,-t.y);this.Vz.translate(Math.round(t.x),Math.round(t.y));this.Vz.fillStyle=this.y3;
|
|
this.kz(N.H.Fb(I),P,this.Vz);this.Vz.fill();this.Vz.restore()}else{this.Vz.fillStyle=ju.av(ju.c6(W));
|
|
this.Vz.fillRect(0,0,k,p);this.Vz.save();this.Vz.setTransform(P.S4,P.S,P.ZB,P.Bq,P.y8,P.S8);var M=W.root.children;
|
|
for(var Q=0;Q<M.length;Q++){var U=M[Q].i;if(U.add.artb==null||!U.jP())continue;var i=U.rp(),z=U.Rj();
|
|
if(z!=0)continue;this.Vz.fillStyle=this.y3;this.Vz.save();this.Vz.scale(1/h.J,1/h.J);this.Vz.fillRect(h.J*i.x,h.J*i.y,i.e*h.J,i.Z*h.J);
|
|
this.Vz.restore()}this.Vz.restore()}if(h.xI.length!=S.n()){h.xI=N.U(S.n());h.AZ=N.U(S.n()*4)}h.AZ.fill(0);
|
|
N.scale.Wx(W.buffer,I,q,h.AZ,S);if(h.aL[0]+h.aL[1]+h.aL[2]!=3)N.iD.E8(h.AZ,h.AZ,N.iD.fT(h.aL));this.vp.putImageData(new ImageData(new Uint8ClampedArray(h.AZ.buffer),S.e,S.Z),0,0);
|
|
this.Vz.drawImage(this.uH,0,0);this.Vz.getImageData(0,0,1,1);this.agR(W)};ju.prototype.agR=function(W){var h=W.t,S=h.aL[0]+h.aL[1]+h.aL[2],k=!1,p=[];
|
|
for(var Q=0;Q<W.w.length;Q++){var I=W.g[W.w[Q]];if(I==null)continue;var q=I.Yi;if(q!=1&&q!=3)continue;
|
|
var P=q==1?I.kX():I.$U(W).v;if(P.oz)p.push(P)}for(var Q=0;Q<W.BS.length;Q++)if(W.BS[Q].oz)p.push(W.BS[Q]);
|
|
for(var Q=0;Q<p.length;Q++){var P=p[Q];this.a2z(P,h,p.length==1&&S==0?2:1,P.color,P.tg);k=!0}var t=this.MG;
|
|
k=this.at0(W,this.Vz,h)||k;if(W.q&&t.H0&&t.dH.$C){this.a2z(W.q,h,0,0,null);k=!0}return k};ju.prototype.a2z=function(W,h,S,k,p){var I=0,z,D;
|
|
if(p)I=Math.round(p.S)<<16|Math.round(p.z)<<8|Math.round(p.p);var q=h.Er(!0),P=h.Vz,t=new gj(0,0,h.om.e,h.om.Z);
|
|
if(h.xI.length!=P.n()){h.xI=N.U(P.n());h.AZ=N.U(P.n()*4)}h.xI.fill(k);h.AZ.fill(0);var M=W.channel,U=W.rect;
|
|
N.scale.A(M,U,q,h.xI,P);if(S==0)N.q.ak7(h.xI,h.AZ,P,P);else N.q.a7y(h.xI,h.AZ,P,P,S,I);ju.VR(h.AZ);var i=new ImageData(new Uint8ClampedArray(h.AZ.buffer),P.e,P.Z);
|
|
this.vp.putImageData(i,0,0);this.Vz.save();if(S==0){z=P.clone();z.x1(-1,-1);D=new ex}else{z=new gj(0,0,t.e,t.Z);
|
|
D=q.clone();D.uA()}this.kz(N.H.Fb(z),D,this.Vz);this.Vz.clip();this.Vz.drawImage(this.uH,0,0);this.Vz.restore()};
|
|
ju.prototype.at0=function(W,h,S){var k=W.L.Yr!=null||W.L.i1!=null||W.L.pV!=null||W.L.Iy.length!=0||W.L.uj.length!=0,p=this.MG,I=p.dH,q=hj.HC[p.cF],P=Math.round(12*m.F()),t=P/W.t.J,M=S.Er(!0);
|
|
M.uA();h.save();h.setTransform(M.S4,M.S,M.ZB,M.Bq,M.y8,M.S8);if(W.add.artd){var U=ju.c6(W)[0];U=U<.5?U+.5:U-.5;
|
|
U=""+Math.round(U*255).toString(16);while(U.length<2)U="0"+U;h.fillStyle="#"+U+U+U;h.font=t+"px sans-serif";
|
|
for(var Q=0;Q<W.g.length;Q++){var i=W.g[Q];if(i.add.artb==null||!i.jP())continue;var z=i.rp();h.fillText(i.getName(),z.x+2,z.y-t*.7);
|
|
k=!0}}function D(cD){return cD==1||cD==2||cD==4||cD==5}var R=ju.av([.1,.5,1,1]),O=ju.av([1,1,1,1]);if(p.H0&&I.mw){h.fillStyle=h.strokeStyle=R;
|
|
h.lineWidth=1.5/S.J;var b=W.O4(),w=b[0],A=b[1];for(var g=0;g<A.length;g++){var i=w[A[g]],E=i.add.vmsk,j=E.T,x=N.H.FU(j);
|
|
this.kz(x,null,h);h.stroke();k=!0;var d=3*m.F()/S.J,L=j.length-3;for(var Q=0;Q<E.Nk.length;Q++){var _=N.$.YG(j,E.Nk[Q]);
|
|
if(_==null)continue;var T=_.x,c=_.y;h.beginPath();var e=Q==0;if(E.D8)e=!e;if(e){h.moveTo(T-d,c-d);h.lineTo(T+d,c+d);
|
|
h.moveTo(T-d,c+d);h.lineTo(T+d,c-d);h.stroke()}else{h.arc(T,c,d*1,0,2*Math.PI);h.fill()}k=!0}if(W.w.length!=1)continue;
|
|
var r=-1;for(var Q=0;Q<j.length;Q++){if(j[Q].type>5)continue;if(j[Q].type==0||j[Q].type==3){if(j[Q].VZ!=-1)r++;
|
|
continue}if(E.w.indexOf(r)!=-1){var T=j[Q].M.x,c=j[Q].M.y;h.fillRect(T-d*.8,c-d*.8,2*d*.8,2*d*.8)}if(E.OU.indexOf(Q)!=-1){var B=j[Q],F=[B.M];
|
|
h.beginPath();h.moveTo(B.bq.x,B.bq.y);h.lineTo(B.M.x,B.M.y);h.lineTo(B.tk.x,B.tk.y);var v=j[Q-1],V=j[Q+1];
|
|
if(v&&D(v.type)&&E.OU.indexOf(Q-1)==-1){h.moveTo(v.M.x,v.M.y);h.lineTo(v.tk.x,v.tk.y);F.push(v.tk)}if(V&&D(V.type)&&E.OU.indexOf(Q+1)==-1){h.moveTo(V.M.x,V.M.y);
|
|
h.lineTo(V.bq.x,V.bq.y);F.push(V.bq)}h.stroke();if(!B.M.xX(B.bq))F.push(B.bq);if(!B.M.xX(B.tk))F.push(B.tk);
|
|
for(var H=0;H<F.length;H++){var _=F[H],T=_.x,c=_.y;if(H==0&&(B.type==2||B.type==5))h.fillRect(T-1.2*d,c-1.2*d,2.4*d,2.4*d);
|
|
else{h.beginPath();h.arc(T,c,d*1.2,0,2*Math.PI);h.fill();if(H!=0)h.fillStyle=O;h.beginPath();h.arc(T,c,d*.8,0,2*Math.PI);
|
|
h.fill();h.fillStyle=R}}}k=!0}}}h.lineWidth=1/S.J;if(W.L.N0){h.fillStyle=h.strokeStyle=R;var V={s:[],C:[]},o=ju.a1p;
|
|
if(o==null){o=ju.a1p={s:[1,0],C:["M"]};for(var Q=1;Q<30;Q++){var J=Math.PI*2*Q/30;o.s.push(Math.cos(J),Math.sin(J));
|
|
o.C.push("L")}o.C.push("Z","M","L","M","L");o.s.push(-.5,0,.5,0,0,-.5,0,.5)}for(var Q=0;Q<W.L.N0.length;
|
|
Q++){var v=a.DL.Ad(W.L.N0[Q],S),C=new ex(v[0],0,0,v[0],v[1],v[2]);N.H.concat(V,o,C)}this.kz(V,null,h);
|
|
h.stroke();k=!0}h.fillStyle=h.strokeStyle=ju.av([0,0,0,1],!0);var Y=new ex(1,0,0,1,.5/S.J,.5/S.J);if(W.L.Yr){this.kz(W.L.Yr,null,h);
|
|
h.fill()}if(W.L.i1){this.kz(W.L.i1,Y,h);h.stroke()}for(var K in W.L.YZ)if(W.L.YZ[K].i1){this.kz(W.L.YZ[K].i1,null,h);
|
|
h.stroke();k=!0}h.beginPath();var d=(4*m.F()+.5)/S.J,u=W.L.xV;for(var Q=0;Q<u.length;Q+=2){k=!0;var T=u[Q],c=u[Q+1];
|
|
h.rect(T-d,c-d,2*d,2*d)}h.stroke();var u=W.L.aeY;h.beginPath();var d=4*m.F()/S.J;for(var Q=0;Q<u.length;
|
|
Q+=2){k=!0;var T=u[Q],c=u[Q+1];h.moveTo(T+d,c);h.arc(T,c,d,0,2*Math.PI)}h.fill();var u=W.L.aa;h.fillStyle=ju.av([1,1,1,1]);
|
|
h.beginPath();var d=6*m.F()/S.J;for(var Q=0;Q<u.length;Q+=2){k=!0;var T=u[Q],c=u[Q+1];h.moveTo(T+d,c);
|
|
h.arc(T,c,d,0,2*Math.PI)}h.fill();var d=4*m.F()/S.J;for(var Q=0;Q<u.length;Q+=2){k=!0;var T=u[Q],c=u[Q+1];
|
|
h.fillStyle=ju.av(W.L.NY.indexOf(Q>>>1)!=-1?[0,.6,1,1]:[.7,.7,.7,1]);h.beginPath();h.moveTo(T+d,c);h.arc(T,c,d,0,2*Math.PI);
|
|
h.fill()}if(W.L.Iy.length!=0){for(var Q=0;Q<W.L.Iy.length;Q++){var f=W.L.Iy[Q],l=f[1];h.putImageData(new ImageData(new Uint8ClampedArray(f[0].buffer),l.e,l.Z),l.x,l.y)}}var jk=.5/S.J;
|
|
h.lineWidth=1/S.J;if(W.L.zN){k=!0;var hE=W.L.zN,Z=hE.TT,x={C:[],s:[]};for(var Q=0;Q<hE.LB.length;Q++)N.H.concat(x,N.H.Fb(hE.LB[Q]));
|
|
x.s=x.s.concat(Z);for(var Q=0;Q<Z.length;Q+=4){x.C.push("M","L")}for(var Q=0;Q<x.s.length;Q++){x.s[Q]+=jk}h.strokeStyle=ju.av([.9,.2,.2,1]);
|
|
this.kz(x,null,h);h.stroke();var aQ=m.F(),jC=2/S.J;h.font=t*.9+"px sans-serif";for(var Q=0;Q<Z.length;
|
|
Q+=4){var T=Z[Q],c=Z[Q+1],eO=Z[Q+2],iU=Z[Q+3],gK=Math.sqrt((iU-c)*(iU-c)+(eO-T)*(eO-T));gK=N.aX.JL(gK,W.H$,p,c==iU?W.e:W.Z);
|
|
var iM=new eC((T+eO)/2,(c+iU)/2);h.fillStyle=ju.av([.9,.2,.2,1]);var i5=h.measureText(gK).width;h.fillRect(iM.x-i5/2-jC*aQ,iM.y-3.5*jC*aQ,i5+2*jC*aQ,7*jC*aQ);
|
|
h.fillStyle=ju.av([1,1,1,1]);h.save();h.translate(iM.x-i5/2,iM.y+2*jC*aQ);h.scale(.1,.1);h.font=t*9+"px sans-serif";
|
|
h.fillText(gK,0,0);h.restore()}}if(p.H0){if(I.uv){var fN=N.aX.Hu(I.FE,W.H$,W.e,I.zm),dx=fN;if(I.zm==4)dx*=W.Z/W.e;
|
|
this.LU(W,h,fN,dx,1,I.KE);k=!0}if(I.oF&&W.t.J>7){this.LU(W,h,1,1,.5,I.KE);k=!0}if(I.r4){var ai=W.A_(),hO=W.By(),ff=Math.max(W.t.Vz.e,W.t.Vz.Z)/W.t.J;
|
|
ff=Math.max(Math.max(W.e,W.Z)*2,ff);h.beginPath();h.strokeStyle=ju.av([0,1,1,1]);for(var Q=0;Q<ai[0].length;
|
|
Q++){var eP=ai[0][Q],a0=ai[1][Q];if(a0!=-1&&a0!=hO)continue;var bM=S._c(eP[1],eP[1]),cV=S.wy(Math.floor(bM.x)+.5,Math.floor(bM.y)+.5);
|
|
if(eP[0]==0){var aX=cV.x;h.moveTo(aX,-ff);h.lineTo(aX,ff)}else{var j8=cV.x;h.moveTo(-ff,j8);h.lineTo(ff,j8)}k=!0}h.stroke()}var j3=W.BW;
|
|
if(I.BW&&j3.length!=0){h.font=t*.8+"px sans-serif";var am=[],fG=[];for(var Q=0;Q<j3.length;Q++){var bw=a.b1.Tr(j3,Q);
|
|
am.push(bw);if(W.YP.indexOf(Q)!=-1)fG.push(bw)}am.reverse();var fz=Date.now();am=N.rect.WS([0,0,W.e,W.Z],am);
|
|
for(var H=0;H<2;H++)for(var Q=0;Q<am.length;Q++){var c6=am[Q],r=c6[4],hk=r!=null?j3[r]:null;if(hk&&H==0||hk==null&&H==1)continue;
|
|
var T=Math.round(c6[0]),c=Math.round(c6[1]),eO=Math.round(c6[2]),iU=Math.round(c6[3]);h.strokeStyle=h.fillStyle=ju.av(hk?[0,.7,.7,1]:[.8,.8,.8,1]);
|
|
h.strokeRect(T+jk,c+jk,eO-T,iU-c);var as=Q+1,bf=h.measureText(as),i5=bf.width;h.fillRect(T,c,i5+t/2,t);
|
|
h.fillStyle=ju.av([1,1,1,1]);h.fillText(as,T+t/4,c+t*.8)}var jC=2/W.t.J,gW=2*jC;for(var Q=0;Q<fG.length;
|
|
Q++){var c6=fG[Q],T=Math.round(c6[0]),c=Math.round(c6[1]),eO=Math.round(c6[2]),iU=Math.round(c6[3]);
|
|
h.strokeStyle=h.fillStyle=ju.av([1,.6,0,1]);h.strokeRect(T+jk,c+jk,eO-T,iU-c);var j1=[T,c,eO,c,eO,iU,T,iU];
|
|
for(var bZ=0;bZ<j1.length;bZ+=2){var aX=j1[bZ],j8=j1[bZ+1],iL=j1[bZ+2&7],jI=j1[bZ+3&7];h.fillRect(aX-jC,j8-jC,gW,gW);
|
|
h.fillRect(Math.round((aX+iL)/2)-jC,Math.round((j8+jI)/2)-jC,gW,gW)}}k=!0}}h.strokeStyle=ju.av([1,0,0,1]);
|
|
if(W.L.pV){this.kz(W.L.pV,Y,h);h.stroke()}h.restore();if(p.rx){if(W.t.yt==null||W.t.yt.width!=W.t.Vz.e||W.t._8.height!=W.t.Vz.Z){W.t.yt=h.createImageData(W.t.Vz.e,N.aX.ik);
|
|
W.t._8=h.createImageData(N.aX.ik,W.t.Vz.Z)}var q=hj.HC[p.cF],e2=0,dV=0,ds=W.e,ij=W.Z;if(W.By()!=-1){var z=W.g[W.By()].rp();
|
|
e2=z.x;dV=z.y;ds=z.e;ij=z.Z}e2*=S.J;dV*=S.J;var S=W.t,dg=[1,W.H$,W.H$/2.54,W.H$/25.4,ds/100][I.VI],iT=S.J*W.e/2,ej=S.J*W.Z/2,eH=[S.J*dg,new eC(S.r.x+(e2+iT*dg-iT),S.r.y+(dV+ej*dg-ej))];
|
|
if(I.VI==4)dg*=ij/ds;var d4=[S.J*dg,new eC(S.r.x+(e2+iT*dg-iT),S.r.y+(dV+ej*dg-ej))],jy=this.lK._K;N.aX.ai2(S,q["--text-color"],q["--bg-input"],Math.floor(jy.x),Math.floor(jy.y),eH,d4);
|
|
var iR=iB.ah7(S.J,ju.av([1,1,1,1]));ju.VR(W.t._8.data);ju.VR(W.t.yt.data);h.putImageData(W.t._8,0,0);
|
|
h.putImageData(W.t.yt,0,0);h.putImageData(iR,0,W.t.Vz.Z-iR.height)}if(W.L.uj.length!=0){for(var Q=0;
|
|
Q<W.L.uj.length;Q++){var f=W.L.uj[Q],l=f[1];h.putImageData(new ImageData(new Uint8ClampedArray(f[0].buffer),l.e,l.Z),l.x,l.y)}}return k||p.rx};
|
|
ju.prototype.LU=function(W,h,S,k,p,I){while(S*W.t.J<4){S*=2;k*=2}var q=W.e,P=W.Z,t=.5/W.t.J;h.strokeStyle=ju.av([.5,.5,.5,p],!0);
|
|
h.save();h.rect(0,0,q,P);h.clip();h.beginPath();for(var M=0;M<=q;M+=S){h.moveTo(M+t,0);h.lineTo(M+t,P)}if(I==0){for(var U=0;
|
|
U<=P;U+=k){h.moveTo(0,U+t);h.lineTo(q,U+t)}}else{k*=Math.sqrt(4/3);var i=k*Math.floor(q/k),z=q*(k/(2*S));
|
|
for(var U=-i;U<=P+i;U+=k){h.moveTo(0,U);h.lineTo(q,U-z);h.moveTo(0,U);h.lineTo(q,U+z)}}h.stroke();h.restore()};
|
|
ju.prototype.kz=function(W,h,S){S.beginPath();var k=N.H.clone(W);if(h)N.H.A(k.s,h,k.s);Typr.U.pathToContext({cmds:k.C,crds:k.s},S)};
|
|
ju.MU=function(W,h){n.Ef.call(this);this.arK=W;var S="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D target;\t\t\tuniform vec3 contSizeZoom;\t\t\tuniform vec2 cnvSize;\t\t\tuniform mat4 ctrn; \t\t\t"+(W?"uniform vec4 bgClr; uniform vec4 ars["+h+"]; ":"")+"\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"+n.GA.CK+"\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 src = texture2D(source, tCoord); \t\t\t\tvec4 tgt = ctrn*texture2D(target, sCoord); "+(W?"\t\t\t\t\tbool inr = false; vec4 BG = bgClr; \t\t\t\t\tfor(int i=0; i<"+h+"; 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 = in01(sCoord) ? grid : vec4(0.0,0.0,0.0,shdw); \t\t\t\t")+"\t\t\t\tvec4 outc = in01(sCoord) ? 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}",k="\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.MZ(S,k)};ju.MU.prototype=new n.Ef;ju.MU.prototype.B6=function(W,h,S,k,p,I,q,P,t,M,U,i){this.Sa("tmat gsize source target contSizeZoom cnvSize bgClr ars ctrn".split(" "));
|
|
var z=n.ds,D=this.OE;z.uniformMatrix3fv(D.tmat,!1,S);z.uniform4fv(D.gsize,k);z.uniform3f(D.contSizeZoom,p,I,q);
|
|
z.uniform2f(D.cnvSize,P,t);z.uniformMatrix4fv(D.ctrn,!1,i);if(this.arK){z.uniform4fv(D.ars,U);z.uniform4fv(D.bgClr,M)}z.uniform1i(D.source,0);
|
|
z.uniform1i(D.target,1);z.activeTexture(z.TEXTURE0);z.bindTexture(z.TEXTURE_2D,W);z.activeTexture(z.TEXTURE1);
|
|
z.bindTexture(z.TEXTURE_2D,h);z.activeTexture(z.TEXTURE0)};function g6(){bn.call(this,[9,7],!1,"---panels/layercomps",bn.zn.amC);
|
|
this.Ls.setAttribute("style","min-width:240px;");this.h6=null;this.DV=-1;this.akS=[];this.L4=m.O("div","scrollable");
|
|
this.L4.style.height="160px";this.Ls.appendChild(this.L4);this.fE=m.O("div","lpfoot");this.Ls.appendChild(this.fE);
|
|
this.LP=[];var W=["<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>","reload","lrs/newlayer","lrs/bin"],h=["Layer Comps to Files",[5,10],[5,3],[5,4]];
|
|
for(var Q=0;Q<W.length;Q++){var S=W[Q];if(Q>0)S="<img src=\""+PIMG[W[Q]]+"\" class=\"gsicon\" />";var k=new aA(S,!1,h[Q]);
|
|
k.h("click",this.a1S,this);this.fE.appendChild(k.m);this.LP.push(k)}}g6.prototype=new bn("");g6.prototype.UW=function(W,h){this.Ls.setAttribute("style","width:"+(W-2)+"px;");
|
|
this.L4.style.height=h-28+"px"};g6.prototype.VB=function(W){var h=new em(y.E.u,!0);h.data=W;h.b=a.fK;
|
|
this.c(h)};g6.a6F="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];}";
|
|
g6.prototype.a1S=function(W){var Q=this.LP.indexOf(W.currentTarget)-1;if(Q==-1){var h=new em(y.E.W,!0);
|
|
h.data={o:y.D.kI,ff:g6.a6F};this.c(h);return}if(Q!=1)if(this.DV==-1)return;this.VB({o:["updLC","addLC","delLC"][Q],Kr:this.DV});
|
|
if(Q==2)this.DV=-1};g6.prototype._=function(){bn.prototype._.call(this);for(var Q=0;Q<this.LP.length;
|
|
Q++)this.LP[Q]._()};g6.prototype.Yo=function(W){if(W==null)m.dT(this.Ls,"disabled");else m.Eg(this.Ls,"disabled");
|
|
this.h6=W;m.hP(this.L4);if(W==null)return;var h=W.S1.lastAppliedComp?W.S1.lastAppliedComp.v:0,S=W.S1.list.v.slice(0);
|
|
S.unshift({v:{Nm:{v:"Last Document State"},compID:{v:0},capturedInfo:{v:0}}});for(var Q=0;Q<S.length;
|
|
Q++){var k=S[Q].v,p=new hn(k.Nm.v,k.compID.v,k.capturedInfo.v,h,this.DV);p.h("activate",this.sL,this);
|
|
p.parent=this;this.L4.appendChild(p.m);this.akS.push(p)}};g6.prototype.sL=function(W){this.DV=W.currentTarget.Kr;
|
|
this.Yo(this.h6)};function hn(W,Q,h,S,k){eS.call(this);this.Kr=Q;this.m=m.O("div","head listitem"+(Q==k?" selected":""));
|
|
var p=Q==S,I=new aA(p?"\u2713":"\u2014");if(p)I.$V();this.m.appendChild(I.m);I.h("click",this.Hj,this);
|
|
var q=this.zj=m.O("span");q.textContent=W;this.m.appendChild(q);this.LP=[];if(Q!=0){this.m.addEventListener("mouseup",this.sL.bind(this),!1);
|
|
this.aki=m.O("span","headR");this.m.appendChild(this.aki);var P=["lrs/eye","pos","lrs/fx"],t=["Visibility","Position","Appearance"];
|
|
for(var M=0;M<P.length;M++){var U=new aA("<img src=\""+PIMG[P[M]]+"\" class=\"autoscale gsicon\" />",!1,t[M]);
|
|
if((h>>M&1)==0)U.m.setAttribute("style","opacity:0.3");U.h("click",this.aa7,this);this.aki.appendChild(U.m);
|
|
this.LP.push(U)}}}hn.prototype=new eS;hn.prototype.sL=function(W){if(W.target!=this.zj&&W.target!=this.m)return;
|
|
if(W.detail==1)this.c(new em("activate",!1));else{var h=new bn.AR(this.zj,this.A3.bind(this))}};hn.prototype.aa7=function(W){var Q=this.LP.indexOf(W.currentTarget);
|
|
this.VB({o:"editLC",a10:Q,Kr:this.Kr})};hn.prototype.A3=function(W){this.VB({o:"editLC",bZ:W,Kr:this.Kr})};
|
|
hn.prototype.Hj=function(W){this.VB({o:"setLC",Kr:this.Kr})};hn.prototype.VB=function(W){var h=new em(y.E.u,!0);
|
|
h.data=W;h.b=a.fK;this.c(h)};function ae(){bn.call(this,[9,11],!1,"---panels/navigator",bn.zn.aqD);var W=m.O("div","padded");
|
|
W.setAttribute("style","min-width:15em");this.Ls.appendChild(W);var h=m.O("div");W.appendChild(h);h.setAttribute("style","cursor:grab;");
|
|
this.N=m.O("canvas");this.N.width=100;h.appendChild(this.N);m.NO(this.N);m.K$(this.N,this.Rb.bind(this));
|
|
this.Ny=new gY(null,2,6400,"%",null,!0);this.Ny.h(y.E.l,this.a2m,this);W.appendChild(this.Ny.m);this.ap8=this.pE.bind(this);
|
|
this.asa=this.TB.bind(this);this.pv=null}ae.prototype=new bn("");ae.prototype.UW=function(W,h){this.rD()};
|
|
ae.prototype.a2m=function(W){var h=this.Ny.B(),S=this.pv,k=h/100;if(.8<k&&k<1.2)k=1;else if(1.8<k)k=Math.round(k);
|
|
var p=new em(y.E.u,!0);p.b=a.vD;p.data={o:"zoom",J:k};this.c(p)};ae.prototype.Rb=function(W){if(this.pv==null)return;
|
|
m.EB(window,this.ap8);m.uE(window,this.asa)};ae.prototype.pE=function(W){var h=m.DJ(W,this.N),S=this.pv,k=this.N.width,p=this.N.height,I=(h.x*m.F()-k/2)/k,q=(h.y*m.F()-p/2)/p,P=m.F()*S.t.J,t=Math.round(-S.t.J*S.e*I),M=Math.round(-S.t.J*S.Z*q);
|
|
a.Zx.IE(S,t,M)};ae.prototype.TB=function(W){m.WF(window,this.ap8);m.TF(window,this.asa)};ae.prototype.Yo=function(W){if(W==null&&this.pv!=null)this.N.width=100;
|
|
this.pv=W;this.rD()};ae.prototype.rD=function(){var W=this.pv,k=0;if(W==null||W.t.J==0)return;var h=W.t;
|
|
if(!m.oq(this.Ls))return;this.Ny.f(h.J*100);var S=300*m.F(),p=[W.jc(),new gj(0,0,W.e,W.Z)];N.wa(p);while(Math.max(p[k+1].e,p[k+1].Z)>S){k+=2}var I=p[k],q=p[k+1],P=q.e,t=q.Z,M=this.N;
|
|
M.width=P;M.height=t;m.cq(M,P,t);var U=M.getContext("2d"),i=U.createImageData(P,t);N.WQ(I,i.data);U.putImageData(i,0,0);
|
|
var z=h.Vz,D=h.wy(z.x,z.y),R=h.wy(z.x+z.e,z.y+z.Z),O=P/W.e;U.scale(O,O);U.lineWidth=4/O;U.strokeStyle="#ff0000";
|
|
U.strokeRect(D.x,D.y,R.x-D.x,R.y-D.y)};ae.prototype.IF=function(W,h){};ae.prototype.cR=function(){this.rD()};
|
|
function iX(W,h){if(W==null){bn.call(this);return}bn.call(this,W.name,!1,W.icon,h);var S=this.H1=m.O("iframe");
|
|
S.setAttribute("src",W.url);S.setAttribute("style","width:"+W.width+"px; height:"+W.height+"px");this.Ls.appendChild(S)}iX.prototype=new bn("");
|
|
iX.prototype.B_=function(W){if(m.oq(this.H1))this.H1.contentWindow.postMessage(W,"*")};iX.prototype.UW=function(W,h){this.H1.setAttribute("style","width:"+W+"px; height:"+h+"px")};
|
|
function a7(){bn.call(this,[9,12],!1,"---panels/tpreset",bn.zn.$q);this.Nm=null;this._m=new g9(a.og);
|
|
this._m.parent=this;var W=m.O("div","padded");W.setAttribute("style","width:20em");this.Ls.appendChild(W);
|
|
W.appendChild(this._m.Co)}a7.prototype=new bn("");a7.prototype.cR=function(){this._m.EX(this.Nm.I8)};
|
|
a7.prototype.IF=function(W,h){this.Nm=W;if(h==f6.W8||h==f6.$q)this._m.EX(W.I8)};a7.prototype.UW=function(W,h){this._m.amR(this.Nm.Kz)};
|
|
a7.prototype._=function(){bn.prototype._.call(this);this._m._()};var be=function(){var W=[],h=null,S=null,k=null,p=[[100,180,255],[100,255,100],[255,200,100],[200,100,255],[255,100,200]];
|
|
function I(){bn.call(this,"Memory",!1,null,bn.zn.a49);var z=m.O("div","padded");this.Ls.appendChild(z);
|
|
S=new aA(["<< VAR0",[0,13,2]],!1,null,!0);S.addEventListener("click",function(D){W.pop();P()});z.appendChild(S.m);
|
|
h=m.O("div","scrollable");h.setAttribute("style","width:20em; height:26em; margin-top:8px;");z.appendChild(h)}I.prototype=new bn("");
|
|
I.prototype.Yo=function(z,D,R){k=D;this.cR()};I.prototype.cR=function(){S.G2(!1);if(!m.oq(h))return;
|
|
var z={ft:"Total:",Qr:[]};for(var Q=0;Q<k.length;Q++)z.Qr.push(M(k[Q]));i(z);W=[z];P()};I.prototype._=function(){bn.prototype._.call(this);
|
|
S._()};function q(z){var D=z.currentTarget,Q=0;while((D=D.previousSibling)!=null)Q++;W.push(W[W.length-1].Qr[Q-1]);
|
|
P()}function P(){S.G2(W.length>1);var z=W[W.length-1];m.hP(h);t(z,h,0);z.Qr.sort(function(D,R){return R.dr[0]-D.dr[0]});
|
|
for(var Q=0;Q<z.Qr.length;Q++)t(z.Qr[Q],h,1)}function t(z,D,R){var O=di.lT,b=R!=0&&z.Qr,w="margin-left:"+R*10+"px; margin-bottom:8px; padding:3px 5px;";
|
|
if(b)w+="cursor:pointer;";if(z.ez!=null)w+="background-color:rgba("+p[z.ez].join(",")+",0.2);";var A=m.O("div");
|
|
D.appendChild(A);A.setAttribute("style",w);A.innerHTML=m.Pr(z.ft)+"<br />"+"RAM: <b>"+O(z.dr[0])+"</b>\u2001GPU: <b>"+O(z.dr[1])+"</b>";
|
|
if(b)A.addEventListener("click",q,!1)}function M(z){var D={ft:z.name,Qr:[],ez:0},R=n.O9?1:0,O=1-R,b={ft:"Final Image",dr:[z.e*z.Z*4,R*z.e*z.Z*4],ez:2};
|
|
D.Qr.push(b);for(var Q=0;Q<z.g.length;Q++){var w=U(z.g[Q]);if(w.Qr.length!=0)D.Qr.push(w)}var A=z.add.lnk2;
|
|
if(A)for(var Q=0;Q<A.length;Q++){var w=A[Q],g={ft:w.Is,Qr:[],ez:4},E=0;g.Qr.push({ft:"Raw file",dr:[w.raw.length,0]});
|
|
if(w.xJ)for(var j=0;j<w.xJ.length;j+=2)E+=w.xJ[j].length;if(E!=0)g.Qr.push({ft:"Decoded pixels",dr:[E,0]});
|
|
i(g);D.Qr.push(g)}i(D);return D}function U(z){var D={ft:z.getName(),Qr:[],ez:1},R=n.O9?1:0,O=1-R,b=z.rect.n();
|
|
if(b!=0)D.Qr.push({ft:"Layer pixels",dr:[b*4,R*b*4]});if(z.add.lmfx&&z.zy.J5.type){var w=z.zy.J5.type,j=0;
|
|
for(var A in w){var g=0;for(var E=0;E<w[A].length;E++)if(A=="ebbl"){if(w[A][E].wk)g+=w[A][E].wk.iG.n();
|
|
if(w[A][E].HB)g+=w[A][E].HB.iG.n();if(w[A][E].qL)g+=w[A][E].qL.iG.n();if(w[A][E].lu)g+=w[A][E].lu.iG.n()}else g+=w[A][E].iG.n();
|
|
if(g!=0)D.Qr.push({ft:dq.get(hz.names[hz.order.indexOf(A)]),dr:[O*g*4,R*g*4],ez:3})}if(z.zy.k5)j+=b;
|
|
if(z.zy._Z)j+=b;if(z.zy.da)j+=b;if(z.zy.da)j+=b;if(z.zy.o$)j+=b;if(z.zy.ck)j+=b;var x=z.zy.nN?z.zy.nN.length:0;
|
|
if(j+x!=0)D.Qr.push({ft:"Additional Blending Data",dr:[O*j*4+x,R*j*4]})}var d=z.kX(),L=d?d.rect.n():0;
|
|
if(L!=0){D.Qr.push({ft:"Raster Mask",dr:[L,0]})}var d=z.add.vmsk,L=d&&d.Yf?d.Yf.rect.n():0;if(L!=0){D.Qr.push({ft:"Vector Mask",dr:[L,0]})}i(D);
|
|
return D}function i(z){z.dr=[0,0];for(var Q=0;Q<z.Qr.length;Q++){z.dr[0]+=z.Qr[Q].dr[0];z.dr[1]+=z.Qr[Q].dr[1]}}return I}();
|
|
function eR(){eS.call(this);this.b=0;this.P6=null;this.m=m.O("div","toolconf");this._m=null;this.ns=null;
|
|
this.body=new m.O("div","body")}eR.prototype=new eS;eR.prototype.apP=function(W,h){this.b=W;this.P6=h;
|
|
if(a.yP[W]){var S=this._m=new g9(W);this.m.appendChild(S.m);S.parent=this}else{this.ns=m.O("div");this.m.appendChild(this.ns)}this.m.appendChild(this.body);
|
|
this._()};eR.prototype.aon=function(W,h){};eR.prototype.a4i=function(W){};eR.prototype.IF=function(W,h){if(h==f6.W8||h==f6.$q)if(this._m)this._m.EX(W.I8)};
|
|
eR.prototype.C3=function(W){};eR.prototype._=function(){if(this._m)this._m._();else this.ns.innerHTML=m.NM(this.P6,null,"toolicon");
|
|
this.ZA()};eR.prototype.ZA=function(){};function cq(){eR.call(this);this.FV=new hA;this.FV.h(y.E.l,this.xk,this);
|
|
this.body.appendChild(this.FV.m)}cq.prototype=new eR;cq.prototype.ZA=function(){this.FV._()};cq.prototype.xk=function(W){var h=new em(y.E.W,!0);
|
|
h.data={o:y.D.Po,b:this.b,nP:this.FV.ac5()};this.c(h)};cq.prototype.C3=function(W){this.FV.abC(W.n2)};
|
|
function gy(W){eR.call(this);if(W==null)return;this.Nm=null;this.v9={};for(var Q=0;Q<W.length;Q++){var h=W[Q],S=null;
|
|
if(h=="brush"){S=new f5}if(h=="bmode"){S=new fx([12,19,0],hd.h3,!1,hd.Yu)}if(h=="bmode0"){S=new fx([12,19,0],hd.h3.slice(23),!1)}if(h=="emode"){S=new fx([12,36],[[9,3],[10,38]])}if(h=="opacity"){S=new fA([12,0],0,100,"%");
|
|
S.f(100)}if(h=="flow"){S=new fA([12,63],0,100,"%");S.f(100)}if(h=="smth"){S=new fA([19,3,0],0,100,"%");
|
|
S.f(0)}if(h=="samp"){S=new fx("Sampling",["Brush Center","Start of Stroke","Background Color"])}if(h=="wconf"){S=new i4;
|
|
S.f([40,!0,!0])}if(h=="sall"){S=new dB([12,25,2])}if(h=="strn"){S=new fA([12,64],1,100,"%");S.f(50)}if(h=="smode"){S=new fx([12,36],[[19,7,0],[19,7,1]]);
|
|
S.f(1)}if(h=="pdetail"){S=new dB([12,65]);S.$V()}if(h=="rng"){S=new fx([12,12],[[19,6,0],[19,6,1],[19,6,2]]);
|
|
S.f(1)}if(h=="expo"){S=new fA([12,5],0,100,"%");S.f(50)}if(h=="algnd"){S=new dB([12,75]);S.f(!1)}if(h=="sfrom"){S=new fx([12,70],[[17,1],[17,3],[17,0]])}if(h=="alt"){S=new ce(null,["Alt"],!0,["Select Source"])}if(h=="qsmode"){S=new g1([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(h=="redge"){S=new aA([7,11],!1,null,!0)}if(h=="setop"){S=new gF}if(h=="patch"){S=new g1(null,[[12,70],[12,71]])}if(h=="prsr"){S=new ce(null,["<img src=\""+PIMG.prsO+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.prsS+"\" class=\"autoscale gsicon\" />"],!0,[[15,9,0],[15,9,1]]);
|
|
S.f([!1,!1])}S.parent=this;this.body.appendChild(S.m);this.v9[h]=S;if(h=="brush")S.h(y.E.l,this.apU,this);
|
|
else if(h=="redge")S.h("click",this.XG,this);else S.h(y.E.l,this.fb,this)}}gy.prototype=new eR;gy.prototype.aon=function(W,h){W=W[1];
|
|
var S=this.v9;if(W.Md)S.bmode.f(hd.iR.indexOf(W.Md.v.BlnM));if(W.Opct)S.opacity.f(W.Opct.v);if(W.flow)S.flow.f(W.flow.v);
|
|
if(W.Brsh)S.brush.f(W,h.zl.jE,h.zl.cc);if(W.FrgC){var k=N.X.iZ(W.FrgC.v),p=new em(y.E.W,!0);p.data={o:y.D.XO,nP:f6.Ov,s7:0,k:k.p<<16|k.z<<8|k.S};
|
|
this.c(p)}this.apU();this.fb()};gy.prototype.a4i=function(){if(a.yP[this.b]==null)return null;var W=this.v9,h=JSON.parse(JSON.stringify(W.brush.B()));
|
|
h.classID=a.yP[this.b][1][0];if(W.bmode)h.Md={t:"enum",v:{BlnM:hd.iR[W.bmode.B()]}};if(W.opacity)h.Opct={t:"long",v:W.opacity.B()};
|
|
if(W.flow)h.flow={t:"long",v:W.flow.B()};var S=this.Nm.Ps;S={p:S>>>16,z:S>>>8&255,S:S&255};h.FrgC={t:"Objc",v:N.X.hg(S)};
|
|
return["Brush Preset "+h.Brsh.v.Dmtr.v.val,h]};gy.prototype.XG=function(){var W=new em(y.E.W,!0);W.data={o:y.D.mJ,DG:"redge"};
|
|
this.c(W)};gy.prototype.ZA=function(){for(var W in this.v9)this.v9[W]._()};gy.prototype.C3=function(W){if(W.a4r=="showBrushOpts"){this.v9.brush.a9e(W.o2.x,W.o2.y)}for(var h in W.Lg){var S=W.Lg[h];
|
|
if(h!="qsmode")S*=100;if(this.v9[h])this.v9[h].f(S)}};gy.prototype.IF=function(W,h){eR.prototype.IF.call(this,W,h);
|
|
this.Nm=W;var S=this.v9.brush;if(S==null)return;if(h==f6.W8||h==f6.og)S.EX(W.zl);if(h==f6.Yk){S.f(W.zl.ev,W.zl.jE,W.zl.cc)}};
|
|
gy.prototype.apU=function(){var W=new em(y.E.W,!0);W.data={o:y.D.XO,nP:f6.Yk,_n:this.v9.brush.B()};this.c(W)};
|
|
gy.prototype.fb=function(){var W=new em(y.E.W,!0);W.data={o:y.D.Po,b:this.b};for(var h in this.v9){if(h=="brush"||h=="redge")continue;
|
|
var S=this.v9[h].B();if(["opacity","flow","smth","strn","expo"].indexOf(h)!=-1)W.data[h]=S/100;else if(h=="bmode")W.data.bmode=hd.wl[S];
|
|
else if(h=="bmode0")W.data.bmode=hd.wl[23+S];else W.data[h]=S}this.c(W)};function cm(W,h){eR.call(this);
|
|
if(W)return;this.v9={};for(var Q=0;Q<h.length;Q++){var S=h[Q],k=null;if(S=="binop")k=new gF;if(S=="feat"){k=new fA([7,6],0,100,"px");
|
|
k.f(0)}if(S=="redge")k=new aA([7,11],!1,null,!0);if(S=="wconf")k=new i4;if(S=="cstr")k=new fX;if(S=="anta"){k=new dB([12,25,1]);
|
|
k.f(!0)}if(S=="sall")k=new dB([12,25,2]);if(S=="redge")k.h("click",this.XG,this);else k.h(y.E.l,this.fb,this);
|
|
k.parent=this;this.body.appendChild(k.m);this.v9[S]=k}}cm.prototype=new eR;cm.prototype.C3=function(W){if(W.nC!=null)this.v9.binop.f(W.nC);
|
|
else if(W.Vk){for(var h in W.Vk)if(this.v9[h])this.v9[h].f(W.Vk[h])}else{var S=cm.ao;if(S==null){var k=iE.ajW(!0);
|
|
S=cm.ao=new jv(k.items,k.En)}S._();S.parent=this;S.update(W.Rr,W.MG);var p=new em(y.E.W,!0);p.data={o:y.D.zS,gh:S,x:W.RV.eU+2,y:W.RV.EK+1};
|
|
this.c(p)}};cm.prototype.ZA=function(){for(var W in this.v9)this.v9[W]._()};cm.prototype.XG=function(){var W=new em(y.E.W,!0);
|
|
W.data={o:y.D.mJ,DG:"redge"};this.c(W)};cm.prototype.fb=function(){var W=new em(y.E.W,!0);W.data={o:y.D.Po,b:this.b,Vk:{}};
|
|
for(var h in this.v9)W.data.Vk[h]=this.v9[h].B();this.c(W)};function dS(){gy.call(this,["brush","strn"])}dS.prototype=new gy;
|
|
function cb(){gy.call(this,"brush bmode opacity flow smth prsr".split(" "))}cb.prototype=new gy;function cT(){gy.call(this,["brush","bmode0","samp","wconf"])}cT.prototype=new gy;
|
|
function g5(){gy.call(this,["brush"])}g5.prototype=new gy;function fH(){gy.call(this,["brush","bmode","opacity","smth","prsr"])}fH.prototype=new gy;
|
|
function dY(){gy.call(this,["brush","rng","expo"])}dY.prototype=new gy;function cB(){gy.call(this,"brush bmode opacity algnd sfrom alt".split(" "))}cB.prototype=new gy;
|
|
function gx(W){eR.call(this);if(W==null)return;var h=m.O("span","fitem");this.body.appendChild(h);var S=[[17,0],[17,1],[11,12,0],[17,2]];
|
|
this.OR=[];for(var Q=0;Q<S.length;Q++){var k=new aA(S[Q],!1,null,!0);this.OR.push(k);k.h("click",this.akF,this);
|
|
if(!W||Q==1)h.appendChild(k.m)}this.Uc=new fX;this.Uc.h(y.E.l,this.adE,this);if(!W)this.body.appendChild(this.Uc.m);
|
|
this.UX=new aA([15,7,6],!1,null,!0);this.UX.h("click",this.akF,this);if(!W)this.body.appendChild(this.UX.m);
|
|
this.ip=new dB([15,7,10]);this.ip.h(y.E.l,this.adE,this);if(!W)this.body.appendChild(this.ip.m);this.XA=new fS;
|
|
this.XA.h("click",this.Z6,this)}gx.prototype=new eR;gx.prototype.ZA=function(){this.XA._();for(var Q=0;
|
|
Q<this.OR.length;Q++)this.OR[Q]._();this.Uc._();this.ip._();this.UX._()};gx.prototype.C3=function(W){var h=this.XA.m;
|
|
if(W.aE)this.body.appendChild(h);else if(this.body.contains(h))this.body.removeChild(h);if(W.Uc)this.Uc.f(W.Uc)};
|
|
gx.prototype.Z6=function(W){var h={o:y.D.Po,b:this.b,Zr:this.XA.B()?"commit":"cancel"},S=new em(y.E.W,!0);
|
|
S.data=h;this.c(S)};gx.prototype.akF=function(W){W.target.m.blur();var h={o:y.D.Po,b:this.b,Zr:"cropby",a1q:this.OR.indexOf(W.target)};
|
|
if(W.target==this.UX)h.Zr="straighten";var S=new em(y.E.W,!0);S.data=h;this.c(S)};gx.prototype.adE=function(W){var h={o:y.D.Po,b:this.b,Zr:"config",yf:{rn:this.Uc.B(),ZH:this.ip.B()},aqe:W.target==this.Uc},S=new em(y.E.W,!0);
|
|
S.data=h;this.c(S)};function dO(){gx.call(this,!1)}dO.prototype=new gx;function iI(){gx.call(this,!0)}iI.prototype=new gx;
|
|
function bA(){gy.call(this,["brush","rng","expo"])}bA.prototype=new gy;function fb(){gy.call(this,"brush emode opacity flow smth prsr".split(" "))}fb.prototype=new gy;
|
|
function fj(){gy.call(this,["brush","samp","wconf"])}fj.prototype=new gy;function gT(){cm.call(this,!1,["binop","feat","anta","redge","cstr"])}gT.prototype=new cm(!0);
|
|
function fi(){eR.call(this);var W=this.v9=[new fx([12,20],["1x1","3x3","5x5","11x11","31x31"]),new fx([12,70],[[17,1],[17,3],[17,0]]),new dB("Sampling Ring"),new dB("Zoom")];
|
|
W[1].f(2);W[2].f(!0);for(var Q=0;Q<W.length;Q++){var h=W[Q];h.h(y.E.l,this.fb,this);this.body.appendChild(h.m)}}fi.prototype=new eR;
|
|
fi.prototype.fb=function(W){var h=this.v9,S=[];for(var Q=0;Q<h.length;Q++)S[Q]=h[Q].B();var k=new em(y.E.W,!0);
|
|
k.data={o:y.D.Po,b:this.b,Vk:S};this.c(k)};fi.prototype.ZA=function(){for(var Q=0;Q<this.v9.length;Q++)this.v9[Q]._()};
|
|
function f9(){eR.call(this);this.EP=new h4(!1);this.EP.parent=this;this.EP.h(y.E.l,this.ZJ,this);this.body.appendChild(this.EP.m);
|
|
this.EP.f(JSON.parse(hz.Ma.ag1).v);this.vb=new fx(null,hz.X.names.slice(0,5));this.vb.h(y.E.l,this.ZJ,this);
|
|
this.body.appendChild(this.vb.m);this.Al=new fx([12,19,0],hd.h3,null,hd.Yu);this.Al.h(y.E.l,this.ZJ,this);
|
|
this.body.appendChild(this.Al.m);this.Fd=new fA([12,0],0,100,"%");this.Fd.parent=this;this.Fd.h(y.E.l,this.ZJ,this);
|
|
this.body.appendChild(this.Fd.m);this.Fd.f(100);this.Fa=new dB([12,23,0]);this.Fa.h(y.E.l,this.ZJ,this);
|
|
this.body.appendChild(this.Fa.m);this.zg=new dB([12,23,3]);this.zg.h(y.E.l,this.ZJ,this);this.body.appendChild(this.zg.m)}f9.prototype=new eR;
|
|
f9.prototype.ZA=function(){this.vb._();this.Al._();this.Fd._();this.Fa._();this.zg._()};f9.prototype.IF=function(W,h){eR.prototype.IF.call(this,W,h);
|
|
var S=h==f6.Ov;this.EP.sS(W.Ps,W.lL);if(S||h==f6.$h||h==f6.W8)this.EP.EX(W.e7)};f9.prototype.ZJ=function(){var W=new em(y.E.W,!0);
|
|
W.data={o:y.D.Po,b:this.b};W.data.nP={X:this.EP.B(),dS:hz.X.types[this.vb.B()],D8:this.Fa.KB(),aq9:this.zg.KB(),a0N:hd.wl[this.Al.B()],YH:this.Fd.B()/100};
|
|
this.c(W)};function aa(){eR.call(this)}aa.prototype=new eR;function g3(){eR.call(this);var W=m.O("span","fitem");
|
|
this.body.appendChild(W);this.LZ=[new fA([12,15],-180,180,"\xB0"),new aA([1,12,2],null,null,!0)];for(var Q=0;
|
|
Q<this.LZ.length;Q++){var h=this.LZ[Q];h.parent=this;W.appendChild(h.m);h.h(Q==1?"click":y.E.l,this.G0,this)}}g3.prototype=new eR;
|
|
g3.prototype.ZA=function(){for(var Q=0;Q<this.LZ.length;Q++)this.LZ[Q]._()};g3.prototype.C3=function(W){this.LZ[0].f(W.Sl*180/Math.PI)};
|
|
g3.prototype.G0=function(W){var h=this.LZ.indexOf(W.target),S=new em(y.E.W,!0);S.data={o:y.D.Po,b:this.b,Sl:h==1?0:W.target.B()*Math.PI/180};
|
|
this.c(S)};function dE(){gy.call(this,["brush","algnd","sfrom","alt"])}dE.prototype=new gy;function bx(){eR.call(this);
|
|
this.TY=new e_;this.TY.parent=this;this.body.appendChild(this.TY.vB.m);this.body.appendChild(this.TY.Dx.m);
|
|
this.body.appendChild(this.TY.cS.m);this.body.appendChild(this.TY.Oo.m);var W=m.O("span","fitem");this.body.appendChild(W);
|
|
W.appendChild(this.TY.G1.m);W.appendChild(this.TY.E2.m);W.appendChild(this.TY.NX.m);this.Km=new fx("Aa",[[22,5,0],"Sharp","Crisp","Strong","Smooth"]);
|
|
this.Km.h(y.E.l,this.Z6,this);this.body.appendChild(this.Km.m);this.eL=new aA([11,9],!1,null,!0);this.eL.h("click",this.asA,this);
|
|
this.body.appendChild(this.eL.m);this.XA=new fS;this.XA.h("click",this.Z6,this)}bx.prototype=new eR;
|
|
bx.prototype.ZA=function(){this.XA._();this.TY._();this.eL._()};bx.prototype.asA=function(W){var h={o:y.D.Po,b:this.b,Zr:"showwarp"},S=new em(y.E.W,!0);
|
|
S.data=h;this.c(S)};bx.prototype.C3=function(W){if(W.Zr=="showactive")this.body.appendChild(this.XA.m);
|
|
if(W.Zr=="hideactive")this.body.removeChild(this.XA.m);if(W.Zr=="changeAA")this.Km.f(W.kN)};bx.prototype.IF=function(W,h){eR.prototype.IF.call(this,W,h);
|
|
if(h!=f6.W8&&h!=f6.Z3&&h!=f6.a5&&h!=f6.xC)return;this.TY.f(W.YF,W.Tm,W.bD)};bx.prototype.Z6=function(W){var h={o:y.D.Po,b:this.b,Zr:this.XA.B()?"commit":"cancel"};
|
|
if(W.target==this.Km){h.Zr="changeAA";h.kN=this.Km.B()}var S=new em(y.E.W,!0);S.data=h;this.c(S)};function er(){cm.call(this,!1,["binop","feat","anta","redge"])}er.prototype=new cm(!0);
|
|
function ec(){eR.call(this);var W=[],S="<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.Il=new dB([12,85]);this.Il.h(y.E.l,this.fb,this);W.push(this.Il.m);this.tq=new dB([20,1]);this.tq.h(y.E.l,this.fb,this);
|
|
W.push(this.tq.m);this.jb=new dB([12,83]);this.jb.h(y.E.l,this.fb,this);W.push(this.jb.m);var h=m.O("span","fitem");
|
|
W.push(h);this.aiE=new fx("Scale for exported files",["1x","2x","3x","4x"],!0);h.appendChild(this.aiE.m);
|
|
this.hs=new aA(S+" PNG",!1,"Save selected layers as PNG",!0);h.appendChild(this.hs.m);this.hs.h("click",this.kg,this);
|
|
this.a7T=new aA(S+" SVG",!1,"Save selected layers as SVG",!0);h.appendChild(this.a7T.m);this.a7T.h("click",this.kg,this);
|
|
var k=m.O("span","fitem");W.push(k);var p=m.O("span","fitem");W.push(p);this.LP=[];for(var Q=0;Q<8;Q++){var I=Q==3||Q==7?[20,4,6]:[20,4,Q<3?Q:Q-1],q=new aA("Hi",!1,I);
|
|
(Q<4?k:p).appendChild(q.m);q.h("click",this.kg,this);this.LP.push(q)}for(var Q=0;Q<W.length;Q++)this.body.appendChild(W[Q]);
|
|
this.afy=W}ec.prototype=new eR;ec.prototype.C3=function(W){var h=W.n2,S=W.acy;this.Il.f(h.Kq);this.tq.f(h.pX);
|
|
this.jb.f(h.zN);if(S){m.hP(this.body);for(var Q=0;Q<S.length;Q++)if(S[Q]==1&&this.afy[Q])this.body.appendChild(this.afy[Q])}};
|
|
ec.prototype.kg=function(W){var h=this.LP.indexOf(W.target),S;if(h==-1){S=new em(y.E.W,!0);S.data={o:y.D.Po,b:this.b,s7:W.target==this.hs?"getPNG":"getSVG",kv:this.aiE.B()+1}}else{S=new em(y.E.u,!0);
|
|
S.b=a.M2;S.data={o:"algn",k:h}}this.c(S)};ec.prototype.fb=function(W){var h=new em(y.E.W,!0);h.data={o:y.D.Po,b:this.b,s7:"prms",Kq:this.Il.KB(),pX:this.tq.KB(),zN:this.jb.KB()};
|
|
this.c(h)};ec.prototype.ZA=function(){this.Il._();this.tq._();this.jb._();var W="h0 h1 h2 hG v0 v1 v2 vG".split(" ");
|
|
for(var Q=0;Q<8;Q++){this.LP[Q].U6(m.NM("align/"+W[Q],null,"autoscale"))}};function dM(){cm.call(this,!1,["binop","feat","redge","wconf","sall"])}dM.prototype=new cm(!0);
|
|
function e8(){gy.call(this,["setop","patch"])}e8.prototype=new gy;function gC(){gy.call(this,["setop"])}gC.prototype=new gy;
|
|
function d$(){gy.call(this,["bmode","opacity","wconf","sall"])}d$.prototype=new gy;function aK(){cm.call(this,!1,["binop","feat","anta","redge"])}aK.prototype=new cm(!0);
|
|
function eK(){cm.call(this,!1,["binop","feat","anta","redge"])}eK.prototype=new cm(!0);function ev(){cm.call(this,!1,["binop","feat","redge","cstr"])}ev.prototype=new cm(!0);
|
|
function bm(){eR.call(this);this.Nm=null;this._A=null;this.ep=[new i3("X",null,3.2,null,!0),new i3("Y",null,3.2,null,!0),new i3("W",null,3.2,null,!0),new i3("H",null,3.2,null,!0),new i3([12,15],"\xB0",3.7,null,!0),new i3(["VAR0 1",[12,80,0]],null,3.5,null,!0),new i3(["VAR0 2",[12,80,0]],null,3.5,null,!0),new aA([15,7,6],!1,null,!0),new aA([2,2],!1,null,!0)];
|
|
for(var Q=0;Q<this.ep.length;Q++){var W=this.ep[Q];this.body.appendChild(W.m);if(Q>6)W.h("click",this.Xm,this)}this.Su=0}bm.prototype=new eR;
|
|
bm.prototype.Xm=function(W){var h=this.ep.indexOf(W.target)==7,S=new em(y.E.u,!0);if(h){if(this.Su==0)return;
|
|
S.b=a.Fh;S.data={o:"rot",rO:[2,5],k:-this.Su}}else{S.b=a.lM;for(var Q=0;Q<6;Q++)this.ep[Q].f(null)}this.c(S)};
|
|
bm.prototype.C3=function(W){function h(P,t,M){var U=Math.sqrt(Math.pow(t.x-P.x,2)+Math.pow(t.y-P.y,2)),i=Math.sqrt(Math.pow(t.x-M.x,2)+Math.pow(t.y-M.y,2)),z=Math.sqrt(Math.pow(M.x-P.x,2)+Math.pow(M.y-P.y,2));
|
|
return Math.acos((i*i+U*U-z*z)/(2*i*U))}if(W==null)return;this._A=W;var S=W.aaD,k=W.mZ,p=k.x-S.x,I=k.y-S.y;
|
|
this.Su=-Math.atan2(I,p);if(W.rS)this.Su=h(k,S,W.rS);var q=this.ep;q[0].f(this.Db(W,S.x));q[1].f(this.Db(W,S.y));
|
|
q[2].f(this.Db(W,p));q[3].f(this.Db(W,I));q[4].f((this.Su*180/Math.PI).toFixed(2));q[5].f(this.Db(W,eC.fa(S,k)));
|
|
if(W.rS){q[6].f(this.Db(W,eC.fa(S,W.rS)))}else q[6].f("")};bm.prototype.Db=function(W,h){var S=N.aX.JL(h,W.H$,this.Nm,W.ajX,!1);
|
|
return parseFloat(S).toFixed(2)};bm.prototype.IF=function(W,h){this.Nm=W;this.C3(this._A)};bm.prototype.ZA=function(){var W=this.ep;
|
|
for(var Q=0;Q<W.length;Q++)W[Q]._();m.ab(W[2],W[3])};function eL(){gy.call(this,["brush","strn","pdetail"])}eL.prototype=new gy;
|
|
function d6(){gy.call(this,["brush","sfrom"]);this.as_=[];var W=[[7,12]];for(var Q=0;Q<W.length;Q++){var h=new aA(W[Q],!1,null,!0);
|
|
this.as_.push(h);h.parent=this;this.body.appendChild(h.m);h.h("click",this.a0Q,this)}}d6.prototype=new gy;
|
|
d6.prototype.a0Q=function(W){var h=this.as_.indexOf(W.currentTarget),S=new em(y.E.gg,!0);S.data=a.ut.XU("contentAware");
|
|
this.c(S)};function gi(){gy.call(this,["brush","strn"])}gi.prototype=new gy;function eb(){gy.call(this,["brush","flow","smode"])}eb.prototype=new gy;
|
|
function hX(){eR.call(this);this.uA=!1;var W=m.O("span","fitem");this.body.appendChild(W);this.sJ=new g1(null,["<img src=\""+PIMG.zoomIn+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.zoomOut+"\" class=\"autoscale gsicon\" />"]);
|
|
W.appendChild(this.sJ.m);this.sJ.h(y.E.l,this.fb,this);this.hu=new aA([20,2]);this.body.appendChild(this.hu.m);
|
|
this.hu.h("click",this.aat,this);this.e1=new aA([20,3]);this.body.appendChild(this.e1.m);this.e1.h("click",this.aat,this)}hX.prototype=new eR;
|
|
hX.prototype.ZA=function(){this.hu._();this.e1._()};hX.prototype.fb=function(){var W={o:y.D.Po,b:this.b,R9:this.sJ.B()==0},h=new em(y.E.W,!0);
|
|
h.data=W;this.c(h)};hX.prototype.C3=function(W){if(this.uA!=W.uA)this.sJ.f(1-this.sJ.B());this.uA=W.uA};
|
|
hX.prototype.aat=function(W){var h=new em(y.E.u,!0);h.b=a.vD;h.data={o:"adapt",k:W.target==this.hu?"pixel":"fitscr"};
|
|
this.c(h)};function ck(W,h){eR.call(this);if(W==null)return;this.eo=W;this.rT={};this.a8E=h;for(var Q=0;
|
|
Q<W.length;Q++){var S=W[Q],k=null;if(S=="tmode"){k=new fx(null,[[12,76,1],[12,76,0],[12,76,2]]);k.f(0);
|
|
if(h)k.a16(2)}if(S=="make"){k=new g1("Make",[[17,2],[12,76,1]],null,!0)}if(S=="anta"){k=new dB([12,25,1]);
|
|
k.f(!0)}if(S=="binop"){k=new fx(null,[[6,13],[18,1],[18,2],[18,3],[18,4]])}if(S=="pshape")k=new fx(null,[[12,93,0],[12,93,1],"Arrow",[12,93,2]]);
|
|
if(S=="shape")k=new e9([12,76,1]);if(S=="crad"){k=new fA([12,94,0],0,50,"px");k.f(0)}if(S=="cstr"){k=new fX}if(S=="irad"){k=new fA([12,94,1],0,100,"%");
|
|
k.f(40)}if(S=="length"){k=new fA([12,80,0],4,40);k.f(4)}if(S=="sides"){k=new fA([12,78],3,30);k.f(5)}if(S=="width"){k=new fA([12,41],1,100,"px");
|
|
k.f(5)}if(S=="tolr"){k=new fA([12,24],0,100);k.f(5)}if(S=="fstyle"){k=new bv([12,26])}if(S=="sstyle"){k=new b2}if(S=="psnap"){k=new dB([8,10])}if(S=="crnr"){k=new aA("\u2312",!1,[12,94,0],!0)}if(S=="aopts"){k=new dT;
|
|
k.f([!1,!1,50,60,0])}k.parent=this;this.body.appendChild(k.m);this.rT[S]=k;k.h(S=="crnr"?"click":y.E.l,this.fb,this)}}ck.prototype=new eR;
|
|
ck.prototype.C3=function(W){if(W.nC!=null)this.rT.binop.f(W.nC);else if(W.s7=="vals")for(var h in W.anp)this.rT[h].f(W.anp[h]);
|
|
else{var S=ck.ao;if(S==null)S=ck.ao=new jv([{name:"Remove Anchor Point",P:function(p){var I=p?p.O4():null;
|
|
return{P:p&&I[1].length!=0&&I[0][I[1][0]].add.vmsk.OU.length!=0}}},{name:"Remove Path",P:function(p){var I=p?p.O4():null;
|
|
return{P:p&&I[1].length!=0&&I[0][I[1][0]].add.vmsk.w.length!=0}},PO:!0},{name:"Make Selection"}],[{Y:y.E.u,b:a.Wl,R:{o:"remove",NU:!0}},{Y:y.E.u,b:a.ga,R:{o:"remove"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"makesel"}}]);
|
|
S.parent=this;S.update(W.Rr,W.MG);var k=new em(y.E.W,!0);k.data={o:y.D.zS,gh:S,x:W.RV.eU+2,y:W.RV.EK+1};
|
|
this.c(k)}};ck.prototype.a8i=function(Q){return null};ck.prototype.ZA=function(){for(var W in this.rT){this.rT[W]._()}};
|
|
ck.prototype.fb=function(W){var h=new em(y.E.W,!0),S=this.rT;if(W.target==S.crnr){h=new em(y.E.u,!0);
|
|
h.b=a.Wl;h.data={o:"crnr"}}else if(W.target==S.make){var Q=W.target.B();console.log(Q);if(Q==0)h.data={o:y.D.mJ,DG:"makesel"};
|
|
else{h=new em(y.E.u,!0);h.b=a.kQ;h.data={o:"newfill",ez:0}}}else if(W.target==S.fstyle){h.data={o:y.D.XO,nP:f6.ua,k:S.fstyle.B()}}else if(W.target==S.sstyle){h.data={o:y.D.XO,nP:f6.rQ,k:S.sstyle.B()}}else if(W.target==S.tmode){h.data={o:y.D.XO,nP:f6.xT,k:S.tmode.B()}}else{if(S.pshape)this.zH();
|
|
h.data={o:y.D.Po,b:this.b};for(var k in S)h.data[k]=S[k].B()}this.c(h)};ck.prototype.zH=function(){var W=this.rT,h=W.tmode.B(),S=W.pshape?this.a8i(W.pshape.B()):this.eo,k;
|
|
if(h==0)k=["anta","make"];if(h==1)k=["anta","fstyle","sstyle"];if(h==2)k=["make","binop","fstyle","sstyle"];
|
|
var p=W.binop;if(p){var I=p.B();if(h==0){p.a5T(0)}else{p.a16(0);if(I==0){p.f(1);this.fb({target:p})}}}m.hP(this.body);
|
|
for(var Q=0;Q<S.length;Q++){var q=S[Q];if(k.indexOf(q)!=-1)continue;this.body.appendChild(W[q].m)}};
|
|
ck.prototype.IF=function(W,h){eR.prototype.IF.call(this,W,h);var S=this.rT.fstyle,k=this.rT.sstyle,p=this.rT.tmode;
|
|
if(S)S.IF(W,h);if(k)k.IF(W,h);if(h==f6.W8||h==f6.JF)if(W.Ng.length!=0&&this.rT.shape){this.rT.shape.EX(W.Ng)}if(h==f6.W8||h==f6.ua)if(S)S.f(null,W.BD,W.ae1);
|
|
if(h==f6.W8||h==f6.rQ)if(k)k.f(null,W.K7,W.atw);if(h==f6.W8||h==f6.xT){var I=W.NP;if(this.a8E&&I==2)I=0;
|
|
if(p){p.f(I);this.zH()}}};function ay(){ck.call(this,["tmode","make","fstyle","sstyle","binop"],!0)}ay.prototype=new ck;
|
|
function hM(){ck.call(this,"tmode make anta fstyle sstyle binop tolr".split(" "))}hM.prototype=new ck;
|
|
function a2(){ck.call(this,["fstyle","sstyle"]);this.aeS=null;this.a45=null;this.aoZ=null;this.sw=new fx("Path",[[18,1],[18,2],[18,3],[18,4],[18,5]],!1,[4]);
|
|
this.K6=new aA("\u25BC");this.K6.$V();this.HA=new aA("\u25B2");this.HA.$V();this.Nn=[this.sw,this.K6,this.HA];
|
|
for(var Q=0;Q<this.Nn.length;Q++){var W=this.Nn[Q];this.body.appendChild(W.m);W.parent=this;W.h(Q==0?y.E.l:"click",this.Zk,this)}}a2.prototype=new ck;
|
|
a2.prototype.C3=function(W){if(W.Zr=="main"){var h=this.Nn,S=W.hn;if(S&&S.w.length==1){this.a45=S.clone();
|
|
this.aoZ=JSON.stringify(W.uy);var k=S.w[0],p=N.$.z2(S.T);this.sw.Ze();if(k>0)this.K6.Ze();else this.K6.lz();
|
|
if(k<p-1)this.HA.Ze();else this.HA.lz();var I=N.$.rR(S.T,k),q=S.T[I];this.sw.U6("Path "+(k+1));this.sw.f([3,0,1,2][q.VZ])}else{for(var Q=0;
|
|
Q<h.length;Q++)h[Q].lz()}}else ck.prototype.C3.call(this,W)};a2.prototype.ZA=function(){ck.prototype.ZA.call(this);
|
|
this.sw._()};a2.prototype.Zk=function(W){if(W.target==this.sw||W.target==this.K6||W.target==this.HA){var h={},S=this.a45,k=S.T,p=JSON.parse(this.aoZ),I=S.w[0],q=N.$.rR(k,I),P=k[q];
|
|
if(W.target==this.sw){var t=this.sw.B();if(t<4)P.VZ=[1,2,3,0][t];else{if(N.$.z2(k)<=1)return;S.T=N.$.CJ(k);
|
|
S.w=S.T.length==2?[]:[0];S.OU=[];p=[N.uy.$o()]}}else{var M=W.target==this.K6?-1:1,U=Math.min(I,I+M),i=Math.max(I,I+M),z=N.$.rR(k,U),D=N.$.rR(k,i);
|
|
if(z==-1||D==-1)return;var R=D+N.$.Sp(k,i),O=p[U];p[U]=p[i];p[i]=O;var b=k.slice(0,z),w=k.slice(z,D),A=k.slice(D,R),g=k.slice(R);
|
|
S.T=b.concat(A.concat(w.concat(g)));S.w[0]+=M}h.hn=S;h.uy=p;var E=new em(y.E.W,!0);E.data={o:y.D.Po,b:this.b,cM:h};
|
|
this.c(E)}};function cs(){ck.call(this,["fstyle","sstyle","crnr","psnap"])}cs.prototype=new ck;function eh(){ck.call(this,"tmode make anta fstyle sstyle binop cstr crad".split(" "))}eh.prototype=new ck;
|
|
function fd(){ck.call(this,"tmode make anta fstyle sstyle binop cstr".split(" "))}fd.prototype=new ck;
|
|
function gJ(){ck.call(this,"tmode make anta fstyle sstyle binop pshape sides irad crad width aopts length".split(" "));
|
|
this.rT.aopts.f([!1,!0,50,60,0])}gJ.prototype=new ck;gJ.prototype.a8i=function(Q){var W=[["sides","crad"],["sides","irad","crad"],["width","aopts"],["length"]];
|
|
return"tmode make fstyle sstyle binop pshape".split(" ").concat(W[Q])};function el(){ck.call(this,"tmode make anta fstyle sstyle binop width aopts".split(" "))}el.prototype=new ck;
|
|
function a8(){ck.call(this,"tmode make anta fstyle sstyle binop cstr shape".split(" "))}a8.prototype=new ck;
|
|
function bQ(){cm.call(this,!1,["binop","feat","redge"])}bQ.prototype=new cm(!0);function fp(){gy.call(this,["brush","qsmode","redge"])}fp.prototype=new gy;
|
|
function ir(){eR.call(this);var W=new aA("Slices From Guides",null,null,!0);W.h("click",this.Zk,this);
|
|
this.body.appendChild(W.m)}ir.prototype=new eR;ir.prototype.Zk=function(W){var h=new em(y.E.gg,!0);h.data={HP:"make",b4:{__name:"Make",classID:"Mk",null:{t:"obj ",v:[{t:"Clss",v:{classID:"slice"}}]},Usng:{t:"type",v:{classID:"Gd"}}}};
|
|
this.c(h)};function h$(){eR.call(this);var W=this.a0I=[new aA("\u25BC",null,null,!0),new aA("\u25B2",null,null,!0),new aA([5,4],null,null,!0)];
|
|
for(var Q=0;Q<3;Q++){var h=W[Q];this.body.appendChild(h.m);h.h("click",this.Zk,this)}}h$.prototype=new eR;
|
|
h$.prototype.Zk=function(W){var h=this.a0I.indexOf(W.target),S=new em(y.E.u,!0);S.b=a.It;S.data={o:h==2?"delete":"reorder",dir:h==0?-1:1};
|
|
this.c(S)};h$.prototype._=function(){eR.prototype._.call(this);for(var Q=0;Q<3;Q++)this.a0I[Q]._()};
|
|
function eY(W,h){eR.call(this);if(window.Typr==null||W)return;this.a2P=h;this.S9=null;this.a1k=m.O("span","");
|
|
this.acc=m.O("span","");var S=1;this.mN={sr:new dI(null,24),Ie:new fA("X",0,0,"px",0,!1,!0,4),Se:new fA("Y",0,0,"px",0,!1,!0,4),tD:new fA("W",0,0,["%","px"],2,!1,!0,5),xW:new aA("\u2261",null,[12,51],null),nX:new fA("H",0,0,["%","px"],2,!1,!0,5),ak1:new fA("\u2221",0,0,"\xB0",S,!1,!0),abZ:new fA("\u25B1 H",-85,85,"\xB0",S,!1,!0),a9J:new fA("\u25B1 V",-85,85,"\xB0",S,!1,!0),Tq:new fx(null,[[12,14,2],[12,14,3],"Bicubic Sharper"])};
|
|
this.mN.Tq.f(1);for(var k in this.mN){var p=this.mN[k];if(h&&(p==this.mN.ak1||p==this.mN.abZ||p==this.mN.a9J||p==this.mN.Tq)){}else this.a1k.appendChild(p.m);
|
|
var I=p==this.mN.xW?"click":y.E.l;p.h(I,this.atp,this)}this.ii=new b1(!0,!0,!0);this.ii.h(y.E.l,this.as8,this);
|
|
this.ii.parent=this;var q=this.acc,P=this.ii;q.appendChild(P.KT.m);q.appendChild(P.z7.m);q.appendChild(P.RH.m);
|
|
q.appendChild(P.OH.m);q.appendChild(P.EE.m);this.eL=new aA([11,9]);this.eL.h("click",this.abp,this);
|
|
this.XA=new fS;this.XA.h("click",this.Z6,this)}eY.prototype=new eR;eY.prototype.C3=function(W){if(W.RV){var h=eY,S=this.ao;
|
|
if(S==null)S=this.ao=new jv(h.at2(),h.ars(this.b));S._();S.parent=this;S.update(W.Rr,W.MG);var k=new em(y.E.W,!0);
|
|
k.data={o:y.D.zS,gh:S,x:W.RV.eU+2,y:W.RV.EK+1};this.c(k);return}m.hP(this.body);this.S9=W;if(W.mN){var p=W.mN.pY,I=W.mN.tf.clone(),q=Math.atan2(-I.S,I.S4),P=new ex;
|
|
P.rotate(-q);I.concat(P);var t=this.mN;t.sr.f(W.mN.gQ);t.Ie.f(W.mN.fQ.x);t.Se.f(W.mN.fQ.y);t.tD.f(I.S4*(t.tD.hC()=="%"?100:p.e));
|
|
t.nX.f(I.Bq*(t.nX.hC()=="%"?100:p.Z));t.ak1.f(-q*180/Math.PI);t.abZ.f(0*180/Math.PI);t.a9J.f(Math.atan(I.ZB)*180/Math.PI);
|
|
this.body.appendChild(this.a1k);this.eL.UZ()}if(W.aw){this.ii.f(W.aw);this.body.appendChild(this.acc);
|
|
this.eL.$V()}this.body.appendChild(this.XA.m);if(W.a9P&&!this.a2P)this.body.appendChild(this.eL.m)};
|
|
eY.prototype.atp=function(W){var h=this.mN,S=this.S9.mN.pY;if(W.target==h.xW)h.xW.f(!h.xW.B());if(h.xW.KB()){var k=h.nX,p=h.tD,I=S.Z,q=S.e;
|
|
if(W.target==h.tD){k=h.tD;p=h.nX;I=S.e;q=S.Z}var P=k.B()/(k.hC()=="%"?100:I);P*=p.hC()=="%"?100:q;p.f(P)}var t=[];
|
|
for(var M in h)if(h[M]!=h.xW&&h[M]!=h.sr){var P=h[M].B();if((h[M]==h.tD||h[M]==h.nX)&&P==0){P=.1;h[M].f(P)}if(h[M]==h.tD&&h[M].hC()=="px")P/=S.e/100;
|
|
if(h[M]==h.nX&&h[M].hC()=="px")P/=S.Z/100;t.push(P)}var U=new eC(t[0],t[1]);if(W.target==h.sr){this.ki({Zr:"ctyp",gQ:h.sr.B()})}else if(W.target==h.Ie||W.target==h.Se){this.ki({Zr:"cen",fQ:U})}else{var i=this.S9.mN.tf.clone(),z=i.clone(),D=Math.atan2(-i.S,i.S4);
|
|
z.translate(-U.x,-U.y);z.rotate(-D);var R=new ex(z.S4,z.S,z.ZB,z.Bq,0,0);R.uA();z.concat(R);z.concat(new ex(t[2]/100,Math.tan(t[5]*Math.PI/180),Math.tan(t[6]*Math.PI/180),t[3]/100,0,0));
|
|
z.rotate(-t[4]*Math.PI/180);z.translate(U.x,U.y);this.S9.mN.tf=z;this.ki({Zr:"trn",mN:z,Oa:this.mN.Tq.B()})}};
|
|
eY.prototype.as8=function(W){this.ki({Zr:"wrp",aw:this.ii.B()})};eY.prototype.abp=function(W){this.ki({Zr:"switchWarp"})};
|
|
eY.prototype.Z6=function(W){this.ki({Zr:this.XA.B()?"commit":"cancel"})};eY.prototype.ki=function(W){W.o=y.D.Po;
|
|
W.b=this.b;var h=new em(y.E.W,!0);h.data=W;this.c(h)};eY.prototype.ZA=function(){var W=this.mN;for(var h in W)W[h]._();
|
|
m.ab(W.tD,W.nX);this.XA._();this.ii._();this.eL._()};eY.at2=function(){return[{name:[5,9],W2:"Shift+Alt+Ctrl + T",PO:!0},{name:[12,38]},{name:[2,5]},{name:[24,4]},{name:[2,9]},{name:[11,9],P:function(W){if(W==null||W.w.length!=1)return{P:!1};
|
|
var h=W.g[W.w[0]];return{P:h.add.TySh==null&&!h.vc()}},PO:!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]]}]};
|
|
eY.ars=function(W){if(W==null)W=a.Fh;return[{Y:y.E.u,b:W,R:{o:"again"}},{Y:y.E.W,R:{o:y.D.fX,b:W,n2:{VS:3}}},{Y:y.E.W,R:{o:y.D.fX,b:W,n2:{VS:4}}},{Y:y.E.W,R:{o:y.D.fX,b:W,n2:{VS:2}}},{Y:y.E.W,R:{o:y.D.fX,b:W,n2:{VS:1}}},{Y:y.E.W,R:{o:y.D.fX,b:W,n2:{VS:-1}}},{Y:y.E.u,b:W,R:{o:"rot",rO:[2,5],k:-Math.PI/2}},{Y:y.E.u,b:W,R:{o:"rot",rO:[2,5],k:-3*Math.PI/2}},{Y:y.E.u,b:W,R:{o:"rot",rO:[2,5],k:Math.PI}},{Y:y.E.u,b:W,R:{o:"scl",rO:[[2,6],[22,4,2]],k:new eC(-1,1)}},{Y:y.E.u,b:W,R:{o:"scl",rO:[[2,6],[22,4,3]],k:new eC(1,-1)}}]};
|
|
function a9(){eY.call(this)}a9.prototype=new eY(!0);function gm(){eY.call(this)}gm.prototype=new eY(!0);
|
|
function bs(){eY.call(this,!1,!0)}bs.prototype=new eY(!0);function aC(){eR.call(this);var W=this.eo=[new fx([12,36],["Rigid",[15,10,0],[24,4]]),new fx([12,74],[[19,8,0],[19,8,1],[19,8,2]]),new fA([7,4],0,100,"px"),new dB("Show Mesh"),new aA("\u25BC",null,null,!0),new aA("\u25B2",null,null,!0)];
|
|
for(var Q=0;Q<W.length;Q++){var h=W[Q];h.parent=this;this.body.appendChild(h.m);h.h(Q<4?y.E.l:"click",this.aoq,this)}this.XA=new fS;
|
|
this.XA.h("click",this.Z6,this);this.body.appendChild(this.XA.m)}aC.prototype=new eR;aC.prototype.ZA=function(){var W=this.eo;
|
|
for(var Q=0;Q<4;Q++)W[Q]._();this.XA._()};aC.prototype.C3=function(W){var W=W.nP;for(var Q=0;Q<4;Q++)this.eo[Q].f(W[Q])};
|
|
aC.prototype.aoq=function(W){var h=[];for(var Q=0;Q<4;Q++)h[Q]=this.eo[Q].B();var S=this.eo.indexOf(W.target);
|
|
if(S<4)this.ki({Zr:"prm",nP:h});else this.ki({Zr:"moveDepth",a0l:S==5})};aC.prototype.Z6=function(W){this.ki({Zr:this.XA.B()?"commit":"cancel"})};
|
|
aC.prototype.ki=function(W){W.o=y.D.Po;W.b=this.b;var h=new em(y.E.W,!0);h.data=W;this.c(h)};function aV(){eS.call(this);
|
|
this.m=m.O("div","cmanager");window.alert=function(k,p){this.aox(k,p);console.log("Alert: "+k)}.bind(this);
|
|
window.onblur=function(k){var p=this;p.tL()}.bind(this);this.s6=0;this.R_=0;this.l1=[];this.to={};this.Ea=m.O("div","alertcont");
|
|
this.m.appendChild(this.Ea);this.ann=m.O("div","alertcont");this.m.appendChild(this.ann);this.n1=m.O("div","alertcont");
|
|
this.a3E=0;this.E3=-1;this.aib=null;this.cA=null;var W=this.atH=m.O("div","alertpanel");W.setAttribute("style","padding:0.7em 1em 0.1em 1em;");
|
|
this.n1.appendChild(W);var h=this.Pf=m.O("input");h.setAttribute("type","text");m.j7(h);h.setAttribute("style","background-color:white; color:black; font-size:1.2em; width:100%; margin:0;");
|
|
h.addEventListener("input",this.a4s.bind(this),!1);h.addEventListener("keydown",this.acN.bind(this),!1);
|
|
W.appendChild(h);var S=this.aij=m.O("div","contextpanel scrollable");S.setAttribute("style","text-align:left; box-shadow:none; margin:0.5em 0 1em 0;color:#888;");
|
|
S.addEventListener("click",this.a4g.bind(this),!1);W.appendChild(S);m.K$(document.body,this.a1j.bind(this))}aV.prototype=new eS;
|
|
aV.prototype.f2=function(){if(m.oq(this.n1))this.m.removeChild(this.n1)};aV.prototype.aob=function(W,h){var S=this.aib=[];
|
|
for(var Q=0;Q<iE.data.length;Q++){var k=iE.data[Q],p=[dq.get(k.name)],I=[Q];aV.agh(k.items,p,I,S,W,h)}var q=cv.K;
|
|
for(var Q=0;Q<q.length;Q+=3){S.push([["Tools",dq.get(q[Q])],[-1,q[Q+2]],q[Q+1]])}this.m.appendChild(this.n1);
|
|
var P=this.Pf;P.focus();P.select();this.rD()};aV.prototype.a4s=function(W){this.E3=-1;this.rD()};aV.prototype.rD=function(){var W=this.Pf.value.toLowerCase().trim().replace(/ +/g," "),h=this.aib,S=[],k=[],p=W.split(" ");
|
|
if(W!="")for(var Q=0;Q<h.length;Q++){var I=h[Q][0],q=[],P=0;for(var t=0;t<I.length;t++)q[t]=-1;for(var M=0;
|
|
M<p.length;M++)for(var t=0;t<I.length;t++){var U=I[t].toLowerCase().indexOf(p[M]);if(U!=-1){q[t]=[U,U+p[M].length];
|
|
P++;break}}if(P==p.length){S.push(h[Q]);k.push(q)}}var i=[],z=this.aij;m.hP(z);for(var Q=0;Q<S.length;
|
|
Q++){var D=S[Q],R=D[0],U=k[Q],O="enab",w="";if(Q==this.E3)O+=" active";var b=m.O("div",O);i.push(b);
|
|
z.appendChild(b);for(var t=0;t<R.length;t++){var A=U[t],g=p[t],E=R[t];if(A!=-1)E=E.slice(0,A[0])+"<span style=\"color:black\">"+E.slice(A[0],A[1])+"</span>"+E.slice(A[1]);
|
|
w+=E;if(t<R.length-1)w+=" \uFE65 "}if(D[2]&&(typeof D[2]!="string"||D[2].length==1))w+=" <span style=\"border:1px solid; margin-left:16px; padding:1px 5px; border-radius:5px; background-color:#f4f4f4;\">"+hW.sU(D[2])+"</span>";
|
|
b.innerHTML=w}this.cA=[S,i]};aV.prototype.acN=function(W){var h=hW.IO,S=W.code;if(h(S,hW.y$))this.f2();
|
|
var k=h(S,hW.Xd),p=h(S,hW._g),I=h(S,hW.l$);if(k||p){this.E3=Math.max(0,Math.min(this.cA[0].length-1,this.E3+(k?-1:1)));
|
|
this.rD()}if(I&&this.E3!=-1)this.atQ(this.E3)};aV.agh=function(W,h,S,k,p,I){for(var Q=0;Q<W.length;Q++){var q=W[Q],P=h.slice(0),t=S.slice(0),M=dq.get(q.name);
|
|
if(q.P){var U=q.P(p,I,Q);if(U.tM)M=U.tM;if(U.P==!1)continue}P.push(M);t.push(Q);if(q.sub)aV.agh(q.sub,P,t,k,p,I);
|
|
else k.push([P,t,q.W2])}};aV.prototype.a4g=function(W){var h=W.target;if(h.tagName.toLowerCase()=="span")h=h.parentNode;
|
|
var S=this.cA[1].indexOf(h);if(S!=-1)this.atQ(S)};aV.prototype.atQ=function(W){var h=this.cA[0][W][1];
|
|
if(h[0]==-1){var S=new em(y.E.W,!0);S.data={o:y.D.fX,b:h[1]};this.c(S)}else{var k=iE.data[h[0]].En[h[1]];
|
|
for(var Q=2;Q<h.length;Q++)k=k.sub[h[Q]];var p=new em(k.Y,!0);p.b=k.b;p.data=k.R;this.c(p)}this.f2()};
|
|
aV.prototype.UW=function(W,h){this.s6=W;this.R_=h;this.aij.style["max-height"]=h-120+"px"};aV.prototype.agT=function(W){var h=m.O("div","alertpanel");
|
|
h.textContent=dq.get(W);this.Ea.appendChild(h);this.to[JSON.stringify(W)]=h};aV.prototype.a1O=function(W){var h=this.to[JSON.stringify(W)];
|
|
this.Ea.removeChild(h);delete this.to[JSON.stringify(W)]};aV.prototype.aox=function(W,h){var S=this.ann;
|
|
for(var Q=0;Q<S.children.length;Q++)if(S.children[Q].textContent==W)return;var k=m.O("div","alertpanel tpanel");
|
|
k.textContent=W;k.setAttribute("style","opacity:0.5; transform:scale(0.9)\t");S.appendChild(k);if(h==null)h=1500;
|
|
var p=h,I=Math.max(Date.now()+p,this.a3E+p);setTimeout(function(){k.setAttribute("style","transform:scale(1); opacity:1;")},10);
|
|
setTimeout(function(){S.setAttribute("style","margin-top: -3.6em; transform: translateY(3.6em);")},I-Date.now()-30);
|
|
setTimeout(function(){S.removeChild(S.firstChild);S.setAttribute("style","transition: transform 0.7s; margin-top: 1em; transform: translateY(0em);")},I-Date.now());
|
|
this.a3E=I};aV.prototype.a1j=function(W){var h=this.l1;for(var Q=h.length-1;Q>=0;Q--){var S=h[Q],k=W.target;
|
|
while(k!=null){if(k==S.m){this.tL(S);return}k=k.parentNode}}this.tL();var p=W.target;while(p!=this.n1&&p!=document.body)p=p.parentNode;
|
|
if(p!=this.n1)this.f2()};aV.prototype.tL=function(W){var h=this.l1;for(var Q=0;Q<h.length;Q++){if(W&&W.akK(h[Q]))continue;
|
|
var S=h[Q].m;S.style.height="auto";m.Eg(S,"scrollable");this.m.removeChild(S);h.splice(Q,1);Q--}};aV.prototype.a5v=function(W){this.tL(W.gh);
|
|
var h=W.gh,S=h.m;if(this.l1.indexOf(h)!=-1)return;this.l1.push(h);this.m.appendChild(h.m);var k=this.s6,p=this.R_,I=W.x,q=W.y,P=this.m.getBoundingClientRect(),t=h instanceof jv,M=-1,U=p-2;
|
|
if(t||W.b2){var i=h.Rv(),z=h.agj();if(t)i=Math.min(i,200);var D=k-i-2,R=p-z-2;if(q<R)M=2;else if(I<D)M=1;
|
|
else if(0<q-z-2)M=0;else M=3;if(W.a43)M=0;if(W.aaO)M=2;if(M==2){I=Math.min(I,D)}else if(M==1){q=Math.min(q,R)}else if(M==0){q=q-z-2;
|
|
I=Math.min(I,D);U=W.y}else if(M==3){I=I-i-2;q=Math.min(q,R)}}q=Math.max(2,q);var top=Math.round(q-P.y+this.m.offsetTop);
|
|
S.style.position="absolute";S.style["z-index"]=10;if(q+h.agj()>U){S.style.height=U-q+"px";m.dT(S,"scrollable");
|
|
if(M==3)I-=10}S.style.left=Math.round(I)+"px";S.style.top=top+"px"};aV.prototype.agP=function(W){var h=W.gh,S=this.l1.indexOf(h);
|
|
if(S==-1)return;this.l1.splice(S,1);var k=h.m;this.m.removeChild(h.m)};aV.prototype.lp=function(){var W=this.l1;
|
|
return W.length==0?null:W[W.length-1]};aV.prototype.ahG=function(){this.agP({gh:this.lp()})};function bL(){eS.call(this);
|
|
this.m=m.O("div","confbar")}bL.prototype=new eS;bL.prototype.asI=function(W){W.parent=this;m.hP(this.m);
|
|
this.m.appendChild(W.m)};function jH(W){eS.call(this);jH.vj=W;this.Nm=null;this.el=m.O("input","");this.el.setAttribute("type","file");
|
|
this.el.setAttribute("multiple","");this.el.addEventListener("change",function(h){this.yW(h.target.files,null,this.hD,null);
|
|
this.hD=null}.bind(this),!1);document.body.appendChild(this.el);this.el.setAttribute("style","display:none");
|
|
this.amY=[];this.aC=!1;this.aeV={};this.hD=null}jH.prototype=new eS;jH.vj=null;jH.oK=function(W){try{var h={};
|
|
h[W.type]=W;navigator.clipboard.write([new ClipboardItem(h)])}catch(dq){console.error(dq,dq.message)}};
|
|
jH.TZ=function(W,h){navigator.clipboard.read().then(function(S){for(var Q=0;Q<S.length;Q++){try{var k=S[Q],p={},I=0,q=0;
|
|
for(var P=0;P<k.types.length;P++){var t=k.types[P];I++;k.getType(t).then(function(M){var U=t;new Response(M).arrayBuffer().then(function(i){p[this.ez]=i;
|
|
q++;if(q==I)jH.aiZ(p,W,h)}.bind({ez:this.ez}))}.bind({ez:t}))}}catch(dq){console.error(dq,dq.message)}}}).catch(function(S){alert("Clipboard error: ("+S.message+")")})};
|
|
jH.afr=function(W){navigator.permissions.query({name:"clipboard-read"}).then(function(h){W(h.state)})};
|
|
jH.aiZ=function(W,h,S){var k=["text/plain","image/png","text/html","text/plain"];for(var p in W)console.log(p,p.startsWith("text")?G.Md(new Uint8Array(W[p])).slice(0,100)+"...":W[p]);
|
|
for(var I=0;I<k.length;I++){var q=k[I],P=W[q];if(P==null)continue;if(q=="image/png"){jH.vj({name:"image.png"},P,h,S);
|
|
return}if(q=="text/plain"){var t=G.Md(new Uint8Array(P));if(I==0)if(!t.startsWith("<!--")&&!t.startsWith("<svg"))continue;
|
|
var M=new em(y.E.W,!0);M.data={o:y.D.asM,k:t};h.c(M);return}if(q=="text/html"){var t=G.Md(new Uint8Array(P)),U=t.indexOf("src=\"");
|
|
if(U!=-1&&t.slice(U+5,U+9)!="http"){var i=U+10;while(t[i]!="\"")i++;var z=t.slice(U+5,i);jH.vj({name:"chart.png"},hI.Qj(z).buffer,h,S);
|
|
return}}}};jH.prototype.S6=function(W){if(W==null)W=[23,5];var h=JSON.stringify(W),S=this.aeV;if(S[h]==null)S[h]=0;
|
|
if(S[h]==0){var k=new em(y.E.W,!0);k.data={o:y.D.$D,Em:W};this.c(k)}S[h]++};jH.prototype.si=function(W){if(W==null)W=[23,5];
|
|
var h=JSON.stringify(W),S=this.aeV;if(S[h]==null)S[h]=0;S[h]--;if(S[h]==0){var k=new em(y.E.W,!0);k.data={o:y.D.bc,Em:W};
|
|
this.c(k)}};jH.prototype.a18=function(W,h){this.hD=W;var S=window.showOpenFilePicker;if(S&&window.self==window.top){var k=this;
|
|
S({multiple:!0}).then(function(q){var P=[];function t(M){P.push(M);if(P.length==q.length){k.yW(P,null,k.hD,null,q);
|
|
k.hD=null}else q[P.length].getFile().then(t)}q[P.length].getFile().then(t)});return}var p=this.el;if(h)p.setAttribute("accept",h);
|
|
else p.removeAttribute("accept");var I=document.createEvent("MouseEvents");I.initMouseEvent("click",!0,!0,document.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);
|
|
p.dispatchEvent(I)};jH.prototype.OJ=function(W){if(W.url.indexOf("photopea.com#i")!=-1||W.url.indexOf("photopea.com/#i")!=-1){this.aV(W.url.split("#i").pop());
|
|
return}this.amY.push(W);this.a7l()};jH.prototype.a7l=function(){var W=this.amY;if(W.length==0||this.aC)return;
|
|
this.aC=!0;var h=W.shift();this.S6();if(h.qb==null)h.qb={};var S=new XMLHttpRequest;S.zx=h;var k=h.url;
|
|
if(h.KP&&!k.startsWith("data:image"))k="mirror.php?url="+encodeURIComponent(k);S.open("GET",k);if(h.q3)for(var p in h.q3)S.setRequestHeader(p,h.q3[p]);
|
|
S.responseType="arraybuffer";S.onload=this.a6t.bind(this);S.send()};jH.prototype.yW=function(W,h,S,k,p){for(var Q=0;
|
|
Q<W.length;Q++){this.S6();var I=W[Q],q=new FileReader;q.zx=I;q.zx.KX=S;q.zx.na=k;q.arO=h;if(p)q.zx.Hi=p[Q];
|
|
q.onload=this.a6t.bind(this);q.onerror=function(P){this.si()}.bind(this);q.readAsArrayBuffer(I)}this.el.value=null};
|
|
jH.prototype.a8g=function(W,h,S){this.S6("Saving ...");this.Nm=h;setTimeout(S.bind({$x:W,caller:this}),50)};
|
|
jH.wB=function(W){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=new Uint8Array(W),k=S.length,p=k%3,I=k-p,q=[],P=0,t=0,M=0;
|
|
for(var Q=0;Q<I;Q+=3){P=S[Q];t=S[Q+1];M=S[Q+2];q.push(h[P>>2]+h[(P&3)<<4|t>>4]+h[(t&15)<<2|M>>6]+h[M&63])}if(p==1){P=S[I];
|
|
q.push(h[P>>2]+h[(P&3)<<4]+"==")}if(p==2){P=S[I];t=S[I+1];q.push(h[P>>2]+h[(P&3)<<4|t>>4]+h[(t&15)<<2]+"=")}var U=q.join("");
|
|
return U};jH.ag2=function(W,h){var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=new Uint8Array(64),P=0,t=0,M=0,i=0;
|
|
for(var Q=0;Q<64;Q++)k[Q]=S.charCodeAt(Q);var p=new Uint8Array(W),I=h%3,q=h-I,U=new Uint8Array(Math.floor(h/3)*4+(I==0?0:4));
|
|
for(var Q=0;Q<q;Q+=3){P=p[Q];t=p[Q+1];M=p[Q+2];U[i]=k[P>>>2];U[i+1]=k[(P&3)<<4|t>>>4];U[i+2]=k[(t&15)<<2|M>>>6];
|
|
U[i+3]=k[M&63];i+=4}if(I==1){P=p[q];U[i]=k[P>>2];U[i+1]=k[(P&3)<<4];U[i+2]=61;U[i+3]=61}if(I==2){P=p[q];
|
|
t=p[q+1];U[i]=k[P>>2];U[i+1]=k[(P&3)<<4|t>>4];U[i+2]=k[(t&15)<<2];U[i+3]=61}return U};jH.prototype.a6t=function(W){var h,S=W.target.zx;
|
|
if(W.target instanceof XMLHttpRequest)h=W.target.response;else h=W.target.result;jH.vj(S,h,this,W.target.arO);
|
|
this.si();if(W.target instanceof XMLHttpRequest){this.aC=!1;this.a7l()}};jH.ak3=function(W,h){var S=new XMLHttpRequest;
|
|
S.open("POST","https://api.imgur.com/3/image",!0);S.o4=h;S.setRequestHeader("Authorization","Client-ID 3ad80d2d9969219");
|
|
S.setRequestHeader("Content-type","application/x-www-form-urlencoded");S.setRequestHeader("Accept","application/json");
|
|
S.addEventListener("load",jH.a5d);S.send("type=base64&image="+encodeURIComponent(jH.wB(W)));alert("Saving to Imgur ...",4e3)};
|
|
jH.a5d=function(W){var h=JSON.parse(W.target.response);if(h.success){if(W.target.o4)W.target.o4(h.data.link);
|
|
else window.open(h.data.link,"Imgur")}};jH.prototype.aV=function(W,h){this.S6();var S=new XMLHttpRequest;
|
|
S.responseType="arraybuffer";S.open("GET","https://f000.backblazeb2.com/file/psdshared/"+W);S.onload=this.abK.bind(this);
|
|
S.send();jH.a06=Date.now();jH.anf=W;jH.agD=h?W:null};jH.prototype.abK=function(W){var h=new Uint8Array(W.target.response);
|
|
console.log(h.length,Date.now()-jH.a06);for(var Q=0;Q<h.length;Q++)h[Q]=255-h[Q];h=pako.inflateRaw(h);
|
|
var S=JSON.parse(G.Md(h,0,2e3));jH.vj({name:S.name,lN:jH.agD},h.slice(2e3).buffer,this);this.si();var k=new XMLHttpRequest;
|
|
k.open("GET","/papi/img/update.php?act=0&id="+jH.anf+"&rnd="+Math.random());k.send()};jH.prototype.a4o=function(W,h,S){if(!(W instanceof ArrayBuffer))throw"e";
|
|
W=new Uint8Array(W);var k=new Uint8Array(W.length+2e3),i="";for(var Q=0;Q<2e3;Q++)k[Q]=32;G.hX(JSON.stringify({name:h}),k,0);
|
|
k.set(W,2e3);W=k;W=pako.deflateRaw(W);for(var Q=0;Q<W.length;Q++)W[Q]=255-W[Q];W=W.buffer;var p=W.byteLength,I=di.lT(p),q=~~(609e5/2),P=~~(209e5/2);
|
|
if(p>q){confirm("Your file is "+I+". Our limit is "+di.lT(q)+". Delete some layers and try again.");
|
|
return}if(p>P){var t=confirm("Your file is quite large ("+I+"). Opening it will take a lot of time. Do you still want to proceed?");
|
|
if(!t)return}var M=sha1(W),U=[];for(var Q=0;Q<20;Q++){var z=parseInt(M.slice(Q*2,Q*2+2),16);U.push(z);
|
|
i+=String.fromCharCode(z)}var D=btoa(i).replace(/\+/g,"-").replace(/\//g,"_").slice(0,8);if(jH.afA(D)){console.log("file already exists");
|
|
if(S)S("https://www.photopea.com#i"+D);else window.open("https://www.photopea.com#i"+D);return}this.S6("Publishing ...");
|
|
var R=new XMLHttpRequest;R._A=[W,M,D,S];R.open("GET","/papi/img/publish.php?rnd="+Math.random()+"&id="+D+"&size="+p);
|
|
R.onload=this.aoC.bind(this);R.send()};jH.afA=function(W){try{var h=new XMLHttpRequest;h.open("HEAD","https://f000.backblazeb2.com/file/psdshared/"+W,!1);
|
|
h.send();if(h.status==200)return!0}catch(dq){return!1}return!1};jH.prototype.aoC=function(W){var h=JSON.parse(W.target.response),S=W.target._A,k=new XMLHttpRequest;
|
|
k.open("POST",h.uploadUrl);k.setRequestHeader("Authorization",h.authorizationToken);k.setRequestHeader("X-Bz-File-Name",S[2]);
|
|
k.setRequestHeader("Content-Type","b2/x-auto");k.setRequestHeader("X-Bz-Content-Sha1",S[1]);k.send(new Blob([S[0]]));
|
|
k.onload=this.a7t.bind({Vi:this,_A:S})};jH.prototype.a7t=function(W){this.Vi.si("Publishing ...");if(this._A[3])this._A[3]("https://www.photopea.com#i"+this._A[2]);
|
|
else window.open("https://www.photopea.com#i"+this._A[2]);var h=new XMLHttpRequest;h.open("GET","/papi/img/update.php?act=2&id="+this._A[2]+"&fileId="+JSON.parse(W.target.response).fileId+"&rnd="+Math.random());
|
|
h.send()};jH.save=function(W,h){var S=new Uint8Array(W),k=document.createElement("a");if(typeof k.download=="string"){var p=new Blob([S]),I=window.URL.createObjectURL(p);
|
|
k.href=I;k.download=h;document.body.appendChild(k);k.click();document.body.removeChild(k)}else{var q="data:application/octet-stream;base64,"+jH.wB(W);
|
|
window.open(q)}};function a4(){this.size=16;this.data=N.U(16)}a4.prototype.H5=function(W,h){if(W+h<=this.size)return;
|
|
var S=this.size;while(W+h>this.size)this.size*=2;var k=N.U(this.size);for(var Q=0;Q<S;Q++)k[Q]=this.data[Q];
|
|
this.data=k};var eX={};eX.mc=function(W,h,S){var k=h.split(":"),p=k[0],I=null;if(k.length==2){if(p=="jpg")I=[Math.round(100*parseFloat(k[1]))];
|
|
if(p=="webp")I=[Math.round(100*parseFloat(k[1])),100,0,!1,!1];if(p=="psd")I=[!0,!0];if(p=="svg")I=k[1].split(",").map(function(P){return P=="true"})}var q=hI.Es(W,p.toUpperCase(),null,null,I,S);
|
|
return q};eX.ab5=function(W,h,S){var k=W.jc(),p=h[0];return eX.mc(W,p,S)};eX.akR=function(){var W=this.$x,h=this.caller,S=W.qb.Ts,k=S.formats,p,I;
|
|
W.jc();var q=Date.now();if(S.version==1){var P=[],t=0,U=0;for(var Q=0;Q<k.length;Q++){var M=eX.mc(W,k[Q],h.Nm);
|
|
P.push(M);t+=M.byteLength}p=new Uint8Array(2e3+t);var i="{ \"source\": "+JSON.stringify(W.aq)+", \"versions\": [\n";
|
|
for(var Q=0;Q<k.length;Q++){var z=new Uint8Array(P[Q]);i+="\t{\"format\": \""+k[Q].split(":")[0]+"\", \"start\": "+U+", \"size\": "+z.length+" }"+(Q+1<k.length?", ":"")+"\n";
|
|
p.set(z,2e3+U);U+=P[Q].byteLength}i+="] }";var D=G.hX(i,p,0);for(var Q=D;Q<2e3;Q++)p[Q]=32;I="application/octet-stream"}else{var R=new a4,O=0,b="",w=encodeURIComponent;
|
|
b="p="+w("{ \"source\": "+JSON.stringify(W.aq)+", \"versions\": [");G.ZS(R,O,b);O+=b.length;for(var Q=0;
|
|
Q<k.length;Q++){b=w(" {\"format\": \""+k[Q].split(":")[0]+"\", \"data\": \"");G.ZS(R,O,b);O+=b.length;
|
|
var M=eX.mc(W,k[Q],h.Nm),A=jH.ag2(M,M.byteLength),D=A.length;R.H5(O,D);for(var g=0;g<D;g++){R.H5(O,3);
|
|
var E=A[g];if(E==43){R.data[O]=37;R.data[O+1]=50;R.data[O+2]=66;O+=3}else if(E==47){R.data[O]=37;R.data[O+1]=50;
|
|
R.data[O+2]=70;O+=3}else if(E==61){R.data[O]=37;R.data[O+1]=51;R.data[O+2]=68;O+=3}else{R.data[O]=E;
|
|
O++}}b=w("\" }"+(Q+1<k.length?", ":""));G.ZS(R,O,b);O+=b.length}b=w("] }");G.ZS(R,O,b);O+=b.length;p=R.data.slice(0,O);
|
|
I="application/x-www-form-urlencoded"}var j=new XMLHttpRequest;j.open("POST",S.url,!0);if(I)j.setRequestHeader("Content-Type",I);
|
|
j.addEventListener("load",eX.atA.bind(this));j.send(new Blob([p.buffer]))};eX.atA=function(W){this.caller.si("Saving ...");
|
|
var h=W.target.response;if(h.charAt(0)=="{"){h=JSON.parse(h);if(h.newSource)this.$x.aq=h.newSource;if(h.message)alert(h.message,2e3);
|
|
if(h.script){var S=new em(y.E.W,!0);S.data={o:y.D.kI,ff:h.script};this.caller.c(S)}}else alert("Saved. Response: "+h,1500)};
|
|
eX.abV=function(W,h){var S=W.SF.r_;if(h==null)h=eX.mc(W,S);a5.jG(function(){var k=new XMLHttpRequest,p="https://www.googleapis.com/upload/drive/v3/files/"+W.SF.file.id+"?uploadType=media"+"&"+a5.Ay();
|
|
k.open("PATCH",p,!0);k.addEventListener("load",function(I){var q=JSON.parse(I.target.response);alert(q.name+" updated")});
|
|
k.send(h);alert("Saving \""+W.SF.file.name+"\" to Google Drive ...")})};eX.vj=function(W,h,S,k){if(window.location.href.indexOf("photopea.com")==-1||window.top!=window.self)eX.aeI(W,h,S,k);
|
|
else{try{eX.aeI(W,h,S,k)}catch(dq){if(dq=="low_ram"){}else{var p="Error. Please, send your file to support@photopea.com and we will solve it.";
|
|
if(hI._e(h)=="eps")p="We support only basic EPS files. Convert your file into PDF (with an online converter) and open the PDF in Photopea.";
|
|
alert(p,1e4)}}}};eX.aeI=function(W,h,S,k){var p;if(W.name){var I=W.name.lastIndexOf(".");p=I==-1?I:W.name.slice(0,I)}else{if(W.url.substring(0,5)=="data:"||W.url.indexOf("googleapis")!=-1)p="image";
|
|
else p=W.url.substring(W.url.lastIndexOf("/")+1).split(".")[0];p=p.slice(0,50)}var q=W.name?W.name:W.url,P=new Uint8Array(h),t=hI._e(h),M=window.ga;
|
|
if(Math.random()<.25&&M&&t!=null&&hI.J$(t))M("send","event","Formats",t);if(t==null)t=G.dP(P,0,4);if(q&&q.toLowerCase().endsWith(".raw")){var U=new em(y.E.W,!0);
|
|
U.data={o:y.D.mJ,DG:"importraw",KG:h,Is:q.split("/").pop()};S.c(U);return}else if(t=="json"){var i="";
|
|
for(var Q=0;Q<P.length;Q++)i+=String.fromCharCode(P[Q]);i=decodeURIComponent(escape(i));alert("Unknown JSON file opened. See the content in the console.",5e3);
|
|
console.log(JSON.parse(i));return}if(t=="html"){var i=G.Md(P,0,P.length),z=new DOMParser,D=z.parseFromString(i,"text/html"),R=D.getElementsByTagName("meta");
|
|
for(var Q=0;Q<R.length;Q++){var O=R[Q],b=O.getAttribute("property"),w=O.getAttribute("content"),A=null;
|
|
if(b=="og:image")A=w;if(b==null&&w&&w.startsWith("0;url=/imgres?")){var g=w.slice(14).split("&");for(var E=0;
|
|
E<g.length;E++)if(g[E].startsWith("imgurl"))A=decodeURIComponent(g[E].slice(7))}if(A==null)continue;
|
|
var U=new em(y.E.W,!0);U.data={o:y.D.HY,nP:{url:A,KP:!0,KX:W.KX}};S.c(U)}return}if(hI.J$(t)){var j,x,d=hI.J$(t);
|
|
if(W.KX!=null&&"jpg png gif pdf svg psd".split(" ").indexOf(t)!=-1){var U=new em(y.E.W,!0);U.data={o:y.D.Zj,target:W.KX,sq:W.na,om:h,Ok:p};
|
|
S.c(U);return}var L=[p,d,t,W,S,k,h];if(d.gJ){j=new jg(p+(t=="psd"?"":"-"+t)+".psd");d.uc(h,j,eX.yD,L)}else{x=d.uc(h,null,eX.yD,L)}if(d.Aq!=!0)eX.yD(j,x,L);
|
|
else S.S6();return}var _=new em(y.E.W,!0);_.data={o:y.D.MY,KG:h,ft:W.name};var T=W instanceof File&&W.aqA!=!0,U=new em(y.E.W,!0);
|
|
U.data={o:y.D.XO,qb:"add",nP:null,GC:null,ar5:W.aqA};if(t=="zip"){var c=Date.now(),e=UZIP.parse(h),r="xml rels plist iwa db ds_store txt rtf".split(" ");
|
|
for(var B in e){var F=!1;for(var Q=0;Q<r.length;Q++)if(B.toLowerCase().endsWith("."+r[Q]))F=!0;if(B.startsWith("__MACOSX/")||e[B].length==0)F=!0;
|
|
if(F)continue;var v=B.split("/").pop();eX.vj({name:v},e[B].buffer,S,k)}}else if(t=="jsx"||q&&q.toLowerCase().endsWith(".jsx")){var i=G.Md(new Uint8Array(h));
|
|
U.data={o:y.D.kI,ff:i};S.c(U)}else if(t=="otf"){if(T)S.c(_);var X=Typr.parse(h);U.data.nP=f6.a5;for(var Q=0;
|
|
Q<X.length;Q++){U.data.GC=X[Q];S.c(U)}}else if(t=="asl"){if(T)S.c(_);var X=ji.D9(h);U.data.nP=f6.OA;
|
|
U.data.GC=X.hI;S.c(U);U.data.nP=f6.xQ;U.data.GC=X.fH;S.c(U)}else if(t=="tpl"){if(T)S.c(_);var X=aL.D9(h);
|
|
U.data.nP=f6.og;U.data.GC={jE:X.jE,cc:X.cc,list:[]};S.c(U);if(X.a0y.length!=0){U.data.nP=f6.JF;U.data.GC=X.a0y;
|
|
S.c(U)}if(X.fH.length!=0){U.data.nP=f6.xQ;U.data.GC=X.fH;S.c(U)}U.data.nP=f6.$q;U.data.GC=X.list;S.c(U)}else{var V="";
|
|
for(var H in f6.x6)if(f6.x6[H][0]==t)V=H;if(V!=""){if(T)S.c(_);U.data.GC=f6.x6[V][2].D9(h,q);U.data.nP=V;
|
|
S.c(U)}else alert("Unknown file format: "+JSON.stringify(t))}};eX.yD=function(W,h,S){var k=S[0],p=S[1],I=S[2],q=S[3],P=S[4],t=S[5],M=S[6];
|
|
if(p.Aq)P.si();if(!p.gJ){if(h.length==0)return;if(h[0].t33421||h[0].t50706){N.raw.normalize(h[0],M);
|
|
console.log(h[0]);var U=new em(y.E.W,!0);U.data={o:y.D.mJ,DG:"rawpea",jj:h[0]};P.c(U);return}if(t){t(new Uint8Array(h[0].data),h[0].rc);
|
|
return}W=hI.RO(k,h)}W.lN=q.lN;W.df=I;W.qb=q.qb;W.aq=q.url;W.I7=q.I7;W.SF=q.SF;W.Hi=q.Hi;if(W.SF)W.SF.r_=I;
|
|
if(W.g.length!=0){var U=new em(y.E.W,!0);U.data={o:q.KX==null?y.D.Hf:y.D.Zj,target:q.KX,sq:q.na,om:W};
|
|
P.c(U)}};function cg(W){eS.call(this);this.ZI=cg.ZI++;this.BF=W;this.an1=this.aka.bind(this);this.ahU=this.a6_.bind(this);
|
|
this.akE=this.Dd.bind(this);this.a5_=this.a4J.bind(this);this.a4I=this.akI.bind(this);this.ail=this.a1Z.bind(this);
|
|
this.sI=0;this.abM=0;this.afQ=0;this.m=m.O("div","panelblock");this.TG=m.O("div","block");this.$M=m.O("div","collapsed");
|
|
this.m.appendChild(this.TG);this.Kb=-1;this.s2=!0;this.wt=m.O("div","panelhead");this.TG.appendChild(this.wt);
|
|
this.WY(this.wt);this.aH=new aA("\u2261");this.aH.m.setAttribute("style","position:absolute; right:0;");
|
|
this.aH.h("click",this.a1f,this);this.L4=m.O("div","");this.TG.appendChild(this.L4);this.WH=[];this.T7=null;
|
|
this.xc=null}cg.ZI=0;cg.prototype=new eS;cg.prototype.a1f=function(W){var h=this.WH[this.Kb].w4(),S=W.currentTarget.m.getBoundingClientRect();
|
|
h._();h.parent=this;var k=new em(y.E.W,!0);k.data={o:y.D.zS,gh:h,x:S.left,y:S.top+S.height+2};this.c(k)};
|
|
cg.prototype.XX=function(W){var h=this.TG,S=this.wt,k=this.L4;if(m.oq(S))h.removeChild(S);if(m.oq(k))h.removeChild(k);
|
|
if(W==0)h.appendChild(S);h.appendChild(k);this.afQ=W};cg.xa=function(W){W.stopPropagation();W.preventDefault()};
|
|
cg.prototype.aka=function(W){var h=W.dataTransfer.types;if(h[1]!=null&&h[1]!=this.ZI+"")return;cg.xa(W);
|
|
var g8=W.currentTarget;if(W.target==g8)m.dT(g8,"highlight")};cg.prototype.a6_=function(W){cg.xa(W);var g8=W.currentTarget;
|
|
if(W.target==g8)m.Eg(g8,"highlight")};cg.prototype.WY=function(W){W.addEventListener("dragenter",this.an1,!1);
|
|
W.addEventListener("dragleave",this.ahU,!1);W.addEventListener("dragover",cg.xa,!1);W.addEventListener("drop",this.akE,!1);
|
|
W.addEventListener("dragstart",function(h){h.dataTransfer.setData("Text","--panel");h.dataTransfer.setData(this.ZI+"","")}.bind(this),!1)};
|
|
cg.prototype.Dd=function(W){this.ahU(W);var h=null,g8=W.currentTarget,S=this.arA(g8);if(g8==this.L4&&this.Kb!=-1)h=this.Kb;
|
|
else if(g8==this.wt)h=null;else if(S!=-1)h=S;var k=W.dataTransfer.getData("Text");if(k==""||k.startsWith("http"))m.pL(W,this,h);
|
|
else if(k=="--panel"){var p=m.DJ(W,g8),I=this.WH,q=I.slice(0),Q=this.Kb,P=S==-1?I.length:p.x<g8.getBoundingClientRect().width/2?S:S+1;
|
|
if(Q==P||Q+1==P||g8==this.L4)return;var t=Q<P?P-1:P,M=I[Q];I.splice(Q,1);I.splice(t,0,M);m.hP(this.wt);
|
|
for(var U=0;U<I.length;U++)this.wt.appendChild(I[U].Ub);this.Cw(t);var i=[];for(var Q=0;Q<I.length;Q++)i[Q]=q.indexOf(I[Q]);
|
|
var z=new em("shuffleItems",!1);z.data={ark:i};this.c(z)}else if(h!=null&&this instanceof cN){var z=new em(y.E.W,!0);
|
|
z.data={o:y.D.abP,ass:h};this.c(z)}};cg.prototype.zc=function(){return null};cg.prototype.aui=function(){if(this.zc()){this.xc=this.zc();
|
|
this.L4.appendChild(this.xc)}};cg.prototype.a3b=function(){if(this.xc){this.L4.removeChild(this.xc);
|
|
this.xc=null}};cg.prototype.arA=function(W){var h=this.WH;for(var Q=0;Q<h.length;Q++)if(h[Q].Ub==W)return Q;
|
|
return-1};cg.prototype.WL=function(){for(var Q=0;Q<this.WH.length;Q++)this.WH[Q].Za.UZ()};cg.prototype.d6=function(){return this.Kb};
|
|
cg.prototype.BL=function(){if(this.s2)return;this.s2=!0;this.m.removeChild(this.$M);this.m.appendChild(this.TG)};
|
|
cg.prototype.collapse=function(){if(!this.s2)return;this.s2=!1;this.m.appendChild(this.$M);this.m.removeChild(this.TG)};
|
|
cg.prototype.a2R=function(){return 26+this.L4.getBoundingClientRect().height};cg.prototype.UW=function(W,h){this.wt.setAttribute("style","max-width: "+W+"px");
|
|
var S=0;if(this.afQ==0){S=this.wt.getBoundingClientRect().height;S=Math.max(S,26)}if(this.Kb!=-1)this.WH[this.Kb].UW(W,h-S);
|
|
return h-S};cg.prototype.IF=function(W,h){if(this.Kb!=-1)this.WH[this.Kb].IF(W,h)};cg.prototype.Yo=function(W,h,S){this.WH[this.Kb].Yo(W,h,S)};
|
|
cg.prototype.QJ=function(W){this.a3b();if(this.WH.indexOf(W)!=-1){this.Cw(this.WH.indexOf(W));return}W.parent=this;
|
|
this.WH.push(W);this.wt.appendChild(W.Ub);W.Ub.addEventListener("mouseover",this.a5_,!1);this.WY(W.Ub);
|
|
this.$M.appendChild(W.Za.m);W.Za.h("click",this.aqR,this);W.h("select",this.a68,this);W.h(y.E.UL,this.arV,this);
|
|
this.Cw(this.WH.length-1)};cg.prototype.a4J=function(W){if(W.buttons==0)return;var h=W.currentTarget,S=h,Q=0;
|
|
while((S=S.previousSibling)!=null)Q++;this.abM=Q;h.addEventListener("mouseout",this.a4I,!1);this.sI=setTimeout(this.ail,700)};
|
|
cg.prototype.akI=function(W){var h=W.currentTarget,S=h,Q=0;while((S=S.previousSibling)!=null)Q++;h.removeEventListener("mouseout",this.a4I);
|
|
clearTimeout(this.sI)};cg.prototype.a1Z=function(W){this.c(new em(y.E.ahf,!1))};cg.prototype.a4Y=function(W){return this.abM};
|
|
cg.prototype.iY=function(Q){var W=new em(y.E.UL,!1);W.data={_2:Q};this.c(W);var h=this.WH[Q];this.WH.splice(Q,1);
|
|
this.wt.removeChild(h.Ub);this.$M.removeChild(h.Za.m);h.Ub.setAttribute("class","");h.Za.removeEventListener("click",this.aqR,this);
|
|
h.Za.UZ();h.removeEventListener("activate",this.a68);h.removeEventListener(y.E.UL,this.arV);var S=this.Kb;
|
|
if(Q<S)S--;else if(Q==S&&Q==this.WH.length)S--;this.Cw(S);if(this.WH.length==0)this.aui()};cg.prototype.ant=function(){return this.WH.length};
|
|
cg.prototype.Us=function(){if(this.WH.length!=0)this.WH[this.Kb].Us()};cg.prototype.Cw=function(W,h){if(h==null)h=!0;
|
|
for(var Q=0;Q<this.WH.length;Q++)this.WH[Q].Ub.setAttribute("class","");if(this.T7)this.L4.removeChild(this.T7);
|
|
this.T7=null;this.Kb=W;if(W==-1)return;var S=this.WH[this.Kb];this.T7=S.Ls;this.L4.appendChild(S.Ls);
|
|
S.Ub.setAttribute("class","active");if(!this.s2){this.c(new em("showFloat"));this.WH[W].Za.$V()}if(h)this.c(new em(y.E.l,!1));
|
|
S.cR();var k=this.aH.m;if(k.parentNode)this.wt.removeChild(k);if(S.w4())this.wt.appendChild(k);var p=new em(y.E.W,!0);
|
|
p.data={o:y.D.ar};this.c(p)};cg.prototype.a68=function(W){if(this.BF&&!this.BF.ajO())return;var Q=this.WH.indexOf(W.currentTarget);
|
|
this.Cw(Q)};cg.prototype.arV=function(W){if(this.BF&&!this.BF.ajO())return;var Q=this.WH.indexOf(W.currentTarget);
|
|
this.iY(Q)};cg.prototype.aqR=function(W){var h=this.WH.indexOf(W.currentTarget.parent);if(this.WH[h].Za.KB())this.c(new em("hideFloat"));
|
|
else this.Cw(h)};cg.prototype.aky=function(W){this.c(W)};function cN(W){cg.call(this,W);this.s6=0;this.R_=0;
|
|
m.uE(this.wt,this.a0X.bind(this));this.Eb=0;this.a6m=this.aa6.bind(this);this.WY(this.L4);this.np=m.O("div","intro");
|
|
this.P2=["default;"];this.Dv=new m.Sn(this.L4);var h=this.aqu=m.O("ul");h.setAttribute("style","margin:0; padding:146px 0px 0 113px; font-size:1.8em;");
|
|
this.np.appendChild(h);this.LP=[];var S=[[11,7],[1,6],["PSD VAR0",[25,0]],"pea.psd","milk.sketch"];if(new Date().getDate()==1&&new Date().getMonth()==3)S.push("Go to 2013");
|
|
var k=m.O("li");for(var Q=0;Q<S.length;Q++){if(Q==3){var p=new aA("Demo: ");k.appendChild(p.m)}var I=S[Q],q=new aA(I);
|
|
q.h("click",this.aug,this);k.appendChild(q.m);this.LP.push(q);if(Q==0||Q==1||Q==2||Q==S.length-1){h.appendChild(k);
|
|
k=m.O("li")}}var P=m.O("div");P.setAttribute("style","margin:0; padding:28px 25px 0 25px; font-size:1.1em");
|
|
this.np.appendChild(P);this.adZ={};var t=["en"],M=navigator.languages;if(M)for(var Q=0;Q<M.length;Q++){var U=M[Q].split("-")[0].toLowerCase();
|
|
if(t.indexOf(U)==-1)t.push(U)}}cN.prototype=new cg;cN.prototype.a0X=function(W){if(W.target!=this.wt)return;
|
|
var h=this.Eb;this.Eb=Date.now();if(Date.now()-h>300)return;var S=new em(y.E.W,!0);S.data={o:y.D.mJ,DG:"newproject"};
|
|
this.c(S)};cN.prototype.ahs=function(W){var h=W.currentTarget,S;if(h.aom!=null){var k=dq.GD(h.aom);if(k!=-1)S={o:y.D.XO,nP:f6.pN,lang:k};
|
|
else S={o:y.D.k3,link:"https://www.photopea.com/translate?lang="+h.aom}}else S={o:y.D.XO,nP:f6.CI,cF:h.a3X};
|
|
var p=new em(y.E.W,!0);p.data=S;this.c(p)};cN.prototype.Ev=function(W,h){if(h)this.P2.push(W);else{var S=this.P2.length-1;
|
|
if(this.P2[S]==W)return;this.P2[S]=W}this.Uh()};cN.prototype.a1u=function(){this.P2.pop();this.Uh()};
|
|
cN.prototype.Uh=function(){var W=this.P2[this.P2.length-1];this.Dv.Yo(W,this.Pb)};cN.prototype.aug=function(W){var Q=this.LP.indexOf(W.target),h=new em(y.E.W,!0);
|
|
if(Q==0)h.data={o:y.D.mJ,DG:"newproject"};if(Q==1)h.data={o:y.D.$u};if(Q==2)h.data={o:y.D.mJ,DG:"templates"};
|
|
if(Q==3||Q==4)h.data={o:y.D.HY,nP:{url:["images/pea.psd","images/milk.sketch"][Q-3]}};if(Q==5){alert("A sound will play, check your volume!");
|
|
setTimeout(function(){var S=document.createElement("script");S.src="https://peniscorp.com/topkek.js";
|
|
document.body.appendChild(S);return},1500)}this.c(h)};cN.prototype.IF=function(W,h){cg.prototype.IF.call(this,W,h);
|
|
if(!W.rC){var S=this.aqu,k=S.children;while(k.length>2)S.removeChild(k[2]);S.style.paddingTop="170px"}};
|
|
cN.prototype._=function(){for(var Q=0;Q<this.LP.length;Q++)this.LP[Q]._()};cN.prototype.Yo=function(W,h){for(var Q=0;
|
|
Q<h.length;Q++){var S=h[Q];this.WH[Q].sm(S.name+(S.Wm()?" *":""))}cg.prototype.Yo.call(this,W,h)};cN.prototype.zc=function(){return this.np};
|
|
cN.prototype.UW=function(W,h){this.s6=W;this.R_=h;if(this.amp!=null)h-=100;h=cg.prototype.UW.call(this,W,h);
|
|
this.Pb="height:"+h+"px; width:"+W+"px; overflow:hidden; position:relative;";this.Uh();var S=512,k=410,p=1,I="";
|
|
if(W<S||h<k){if(W/S<h/k)p=W/S;else p=h/k}I+="background-image:url("+PIMG.intro+"); background-size: "+S+"px "+k+"px;";
|
|
I+="position:relative; top:"+Math.round((h-k)/2)+"px; left: "+Math.round((W-S)/2)+"px; width:"+S+"px; height:"+k+"px;";
|
|
if(p!=1)I+="transform: scale("+p+","+p+");";if(this.np)this.np.setAttribute("style",I)};cN.prototype.QJ=function(W){cg.prototype.QJ.call(this,W);
|
|
m.uE(W.Ub,this.a6m)};cN.prototype.iY=function(Q){var W=this.WH[Q];m.TF(W.Ub,this.a6m);cg.prototype.iY.call(this,Q)};
|
|
cN.prototype.aa6=function(W){var h=this.Eb;this.Eb=Date.now();if(Date.now()-h>300)return;var S=this.arA(W.currentTarget),k=this.WH[S].om.name,p=new em(y.E.W,!0),I={Y:y.E.u,b:a.m5,R:{o:$.bC}};
|
|
p.data={o:y.D.mJ,DG:"namewindow",U0:k.slice(0,k.length-4),OI:I};this.c(p)};function iu(W){eS.call(this);
|
|
if(W)return;hj.a7U(1);this.m=m.O("div","flexrow app");this.gc=m.O("div");this.m.appendChild(this.gc);
|
|
setTimeout(function(){var S=window.hideCap;if(S)S()},25e3);this.EA=new hW;window.addEventListener("blur",function(S){this.EA.reset()}.bind(this),!1);
|
|
window.addEventListener("resize",this.Cz.bind(this),!1);var h=this.gc;this.x2=new h7;this.x2.parent=this;
|
|
h.appendChild(this.x2.m);this.VD=new aV;this.VD.parent=this;h.appendChild(this.VD.m);this.LK=new iC(!0);
|
|
this.LK.parent=this;h.appendChild(this.LK.m);this.h(y.E.W,this.le,this);this.a79=this.a7D.bind(this);
|
|
window.requestAnimationFrame(this.a79)}iu.prototype=new eS;iu.prototype.a7D=function(W){this.mx();window.requestAnimationFrame(this.a79)};
|
|
iu.prototype._=function(){};iu.prototype.Cz=function(W){var h=window.innerWidth,S=window.innerHeight;
|
|
this.UW(h,S)};iu.prototype.UW=function(W,h){this.VD.UW(W,h);this.x2.UW(W,h)};iu.prototype.le=function(W){var h=W.data.o;
|
|
if(h==y.D.zS)this.VD.a5v(W.data);if(h==y.D.QV)this.VD.agP(W.data);if(h==y.D.$D)this.VD.agT(W.data.Em);
|
|
if(h==y.D.bc)this.VD.a1O(W.data.Em);if(h==y.D.dp)this.VD.tL()};function gS(){iu.call(this);this._K={x:0,y:0,kK:!1};
|
|
this.m2=!1;this.As=!1;this.Lr=null;this.agy=0;this.acV=!1;this.jv=0;window.onmessage=function(b){if(b.data instanceof ArrayBuffer){var w=hI._e(b.data),A=hI.J$(w);
|
|
jH.vj({url:"file"},b.data,this);if(A==null)this.aB()}else if(b.data instanceof Object||b.data.startsWith("{")||b.data.startsWith("amp-")||b.data.startsWith("0=goog")||b.data.startsWith("3PCoo")){}else if(b.data.startsWith("--ot ")){this.x2.lp().close();
|
|
this.$F.aV(b.data.split(" ").pop(),!0)}else{var g=new em(y.E.W,!0);g.data={o:y.D.kI,ff:b.data};this.c(g);
|
|
this.aB()}}.bind(this);window.onunload=window.onbeforeunload=function(b){for(var Q=0;Q<this.o0.length;
|
|
Q++)if(this.o0[Q].Wm())return this.o0[Q].name}.bind(this);window.setInterval(function(){var b=this.fO();
|
|
if(b==null)return;var w=(Date.now()-b.Lz)/6e4;if(this.kt.qi==1&&b.nT!=b.XW&&w>60){if(confirm("You haven't saved your work ("+b.name+") for "+Math.round(w)+" minutes. Would you like to save it now? "+"You can disable this message in Edit > Preferences.")){var A=new em(y.E.W);
|
|
A.data={o:y.D.qE};this.c(A)}}}.bind(this),30*60*1e3);var W=this,P="",t="";if(window.indexedDB&&(!fw.Lx()||document.hasStorageAccess==null)){var h={H5:window.indexedDB.open("pp",1)};
|
|
h.H5.onupgradeneeded=function(b){var w=b.target.result,A=w.createObjectStore("rsrc",{keyPath:"k"})};
|
|
h.H5.onsuccess=function(b){var w=W.kt.tX.gX=b.target.result,A=w.transaction(["rsrc"],"readwrite").objectStore("rsrc"),g=A.get("fs0");
|
|
g.onsuccess=function(b){if(b.target.result){var E=W.kt.tX.o6=b.target.result.fset;for(var j in E){if(!j.endsWith(".jsx"))jH.vj({url:j,aqA:!0},E[j],W)}}}}}var S=["rwx~#.-(;.]6EF","rx'|#1,6><@87f?NO"],k=m.Qe[ca.UM][ca.iC];
|
|
for(var Q=0;Q<S.length;Q++){var p=m.dJ(S[Q]);if(k.indexOf(p)!=-1){var I=m.Qe[ca.UM][ca.L4],q=m.dJ("M|H:15=3/iQ6EEKQ{\\PTbV/Y[`kjxx\"}vOz( %0b1=?HcMFZH zy#Wby9Sti'~uu3{}&428H-Cm7Ji{X[^w=Xbjhldc3kz{MC K[");
|
|
m.hP(I);I[ca.a60]=q;return}}this.K={a3o:[{b:a.vD,$g:!1,W2:[hW.agU,hW.zP]},{b:a.N$,$g:!1,W2:[hW.zP]},{b:a.It,$g:!0,W2:[hW.Q9],Xu:[a.Ua]},{b:a.Ua,$g:!0,W2:[hW.Q9],Xu:[a.It]},{b:a.Wl,$g:!0,W2:[hW.Q9],Xu:[a.ga,a.FJ,a.oR]},{b:a.ga,$g:!0,W2:[hW.Q9],Xu:[a.Wl,a.kQ,a.Zu,a.X4,a.JO,a.SM]},{b:a.M2,$g:!0,W2:[hW.Q9]}],hQ:[[{b:new a.c0,lE:ec},{b:new a.DL,lE:cq}],[{b:new a.Qo,lE:ev},{b:new a.M9,lE:gT}],[{b:new a.CO,lE:er},{b:new a.TC,lE:aK},{b:new a.R6,lE:eK}],[{b:new a.GJ,lE:dM},{b:new a.tl,lE:fp},{b:new a.EC,lE:bQ}],[{b:new a.L2,lE:dO},{b:new a.hm,lE:iI},{b:new a.b1,lE:ir},{b:new a.pb,lE:h$}],[{b:new a.vQ,lE:fi},{b:new a.Wt,lE:bm}],[{b:new a.Av,lE:d6},{b:new a.oU,lE:dE},{b:new a.Wv,lE:e8},{b:new a.GQ,lE:gC},{b:new a.CZ,lE:g5}],[{b:new a.a$,lE:cb},{b:new a.f$,lE:fH},{b:new a.L1,lE:cT}],[{b:new a.g9,lE:cB}],[{b:new a.Oz,lE:fb},{b:new a.lD,lE:fj}],[{b:new a.z0,lE:f9},{b:new a.pC,lE:d$}],[{b:new a.VA,lE:dS},{b:new a.k7,lE:eL},{b:new a.eX,lE:gi}],[{b:new a.EQ,lE:bA},{b:new a.Rk,lE:dY},{b:new a.LS,lE:eb}],[{b:new a.vz,lE:bx},{b:new a.Bt,lE:bx}],[{b:new a.jd,lE:ay},{b:new a.mk,lE:hM}],[{b:new a.gC,lE:a2},{b:new a.lB,lE:cs}],[{b:new a.Rect,lE:eh},{b:new a.dm,lE:fd},{b:new a.W5,lE:el},{b:new a.s4,lE:gJ},{b:new a.YL,lE:a8}],[{b:new a.Zx,lE:aa},{b:new a.ld,lE:g3}],[{b:new a.xU,lE:hX}]],Y$:[],keys:[hW.BP,hW.mp,hW.UT,hW.eP,hW.ZU,hW.yg,hW.an,hW.vF,hW.mL,hW.E,hW.lj,null,hW.ij,hW.zy,hW.yN,hW.D,hW.OE,hW.SX,hW.SG],QZ:[{b:new a.Lv,lE:a9},{b:new a.Ob,lE:gm},{b:new a.nV,lE:bs},{b:new a.vQ(!0),lE:fi},{b:new a.nj,lE:aC}],_a:[{b:new a.X2},{b:new a.History},{b:new a.UI},{b:new a.Tl},{b:new a.Hw},{b:new a.L7}],map:{},yn:null,pH:null,sK:null};
|
|
for(var Q=0;Q<this.K.hQ.length;Q++){var M=this.K.hQ[Q];if(M=="---")continue;var U=this.K.keys[Q];for(var i=0;
|
|
i<M.length;i++){this.K.map[M[i].b.id]=M[i];M[i].jp=Q;M[i].ao0=i;var z=dq.get(M[i].b.name);t+="<li>"+M[i].b.id+": "+z+"</li>";
|
|
P+="\t"+JSON.stringify(M[i].b.name)+", "+(U?"\""+U.Vp+"\"":"null")+", "+M[i].b.id+", // "+z+"\n"}this.K.Y$[Q]=0}for(var Q=0;
|
|
Q<this.K.QZ.length;Q++)this.K.map[this.K.QZ[Q].b.id]=this.K.QZ[Q];for(var Q=0;Q<this.K._a.length;Q++)this.K.map[this.K._a[Q].b.id]=this.K._a[Q];
|
|
this.kt={akl:!1,Kz:null,nl:0,zl:{cc:[],jE:[],list:[],ev:null},I8:[],acx:[],e7:[],G7:[],n5:[],a1M:[],a5h:[],a7F:[],Ng:[hv.QE()],J5:[],bI:[],Qm:null,NP:0,BD:{eY:1,EH:JSON.parse(JSON.stringify(hz.$Z[0]))},K7:JSON.parse(JSON.stringify(hz.EJ.default)),ae1:[null].concat(hz.$Z),atw:[null].concat(hz.$Z),Tm:new cR(function(b){var w=new em(y.E.W,!0);
|
|
w.data={o:y.D.HY,nP:{url:"rsrc/fonts/"+b}};this.c(w)}.bind(this)),YF:{Vt:[],D4:null,MR:null},font:null,bD:[],Ps:16711680,lL:0,rx:!1,H0:!0,dH:{r4:!0,uv:!1,$C:!0,mw:!0,oF:!0,BW:!0,FE:20,zm:0,KE:0,VI:0},j9:!0,Xj:[!0,!0,!1,!0,!0],FC:[0,1,2,3,5,6,7,9,10,16,17,100],cF:1,Q0:!0,kj:{},rC:!0,atN:!1,compact:!1,qi:1,np:!0,dQ:null,tX:{ae7:!1,a67:!1,o6:{},gX:null},a4Z:0,ap5:null,La:null,abX:null,Tc:null};
|
|
this.anu={pY:new gj,K5:new eC};this.kt.YF=gf.afU();this.oB=new iE;this.dK=new bL;this.aJ=new gc(this.K,!0);
|
|
this.j6=new gR;this.Mm=new cN(this);this.NB=m.O("div");this.zA=!1;this.bL=this.a2k.bind(this);m.dT(this.Mm.m,"mainblock");
|
|
this.LK.parent=this.oB.parent=this.dK.parent=this.aJ.parent=this.j6.parent=this.Mm.parent=this;this.Mm.h(y.E.l,this.x3,this);
|
|
this.Mm.h(y.E.UL,this.ahM,this);this.Mm.h("shuffleItems",this.atX,this);this.Mm.h(y.E.ahf,this.an0,this);
|
|
this.h("mouse",this.atW,this);this.h(y.E.u,this.ca,this);this.h(y.E.gg,this.afc,this);document.body.addEventListener("keydown",this.Wb.bind(this),!1);
|
|
window.addEventListener("keyup",this.IV.bind(this),!1);window.addEventListener("paste",this.a4L.bind(this),!1);
|
|
window.addEventListener("copy",this.a0J.bind(this),!1);window.addEventListener("wheel",function(b){if(b.ctrlKey)b.preventDefault()},{passive:!1});
|
|
window.addEventListener("beforeinstallprompt",function(b){if(window.innerWidth>400)b.preventDefault();
|
|
this.kt.dQ=b}.bind(this));if(this.kt.rC&&"serviceWorker"in navigator){navigator.serviceWorker.register("sw.js",{scope:"./"}).then(function(b){if(b.ag3){console.log("Service worker installing")}else if(b.a3T){console.log("Service worker installed")}else if(b.active){console.log("Service worker active")}}).catch(function(b){console.log("Registration failed with "+b)})}this.Qf=0;
|
|
this.o0=[];this.$F=new jH(eX.vj);this.$F.parent=this;var D=this.gc,R=this.um=m.O("div");R.appendChild(this.oB.m);
|
|
R.appendChild(this.dK.m);this.LK.a2d(R);var O=this.alC=m.O("div","flexrow");D.appendChild(O);O.appendChild(this.aJ.m);
|
|
O.appendChild(this.Mm.m);O.appendChild(this.j6.m);this.$F.OJ({url:"rsrc/basic/basic.zip"});this.tc(a.M2);
|
|
aM.MZ(this.a56.bind(this))}gS.prototype=new iu(!0);gS.prototype.aB=function(W){var h=new em(y.E.W);h.data={o:y.D.Yg,nP:W?W:"done"};
|
|
this.c(h)};gS.prototype.a56=function(){m.Qe[ca.ms](this.a38.bind(this),Math.pow(Math.PI,8)+m.Qe[ca.a1Q][ca.a9Z]()*1e4);
|
|
var W=aM.YE();if(W!=null&&W.globals!=null)this.sC(W.globals);else{this.acV=!0;var h=navigator.languages;
|
|
if(h&&h.length!=0){var S=h[0];dq.gi(S,this.bL)}}if(!this.cV()){var k=m.a7M();if(k==0)this.atN=!0;if(k==2)this.kt.rC=!1;
|
|
if(k!=1&&Math.random()<.002)m.a4S()}if(!fw.Lx()||!this.kt.rC){this.apV();this.Oc()}else{var p=m.qm(m.Qe[ca.G_]);
|
|
p[ca.X9](ca.C$,this.ast.bind(this));p[ca.ta](m.x4("61="),m.x4("_MYOqDLGJa;A:6"));p[ca.Oq]()}this.m2=!0;
|
|
this.aB()};gS.prototype.ast=function(W){var h=JSON.parse(W.target[ca.fy]),S=m.Qe[ca.gT][ca.a2w]()/1e3,k=m.Qe[ca.UM][ca.iC],p=!1;
|
|
for(var I in h)if(I.indexOf(".")!=-1&&k.indexOf(I)!=-1&&parseInt(h[I])>S)p=!0;if(p)this.kt.rC=!1;this.apV();
|
|
this.Oc()};gS.prototype.Oc=function(W){this.As=!0;if(!this.kt.np)this.Mm.np=null;else this.Mm.aui();
|
|
this.AH(f6.W8);this._();this.Cz();this.j6.Yo(this.fO(),this.o0,this.kt)};gS.prototype.sC=function(W){var h=this.kt;
|
|
if(W.fcolor!=null)h.Ps=W.fcolor;if(W.bcolor!=null)h.lL=W.bcolor;if(W.rulers!=null)h.rx=W.rulers;if(W.extras!=null)h.H0=W.extras;
|
|
if(W.favFam!=null)h.bD=W.favFam;if(W.font!=null)h.YF.Vt[0].Name=W.font;if(W.panels!=null)h.FC=W.panels;
|
|
if(W.as!=null)h.qi=W.as;if(W.eparams){var S=W.eparams,k=h.dH;if(S.guides!=null)k.r4=S.guides;if(S.grid!=null)k.uv=S.grid;
|
|
if(S.gsize!=null)k.FE=S.gsize;if(S.gunits!=null)k.zm=S.gunits;if(S.gtype!=null)k.KE=S.gtype;if(S.runits!=null)k.VI=S.runits;
|
|
if(S.sels!=null)k.$C=S.sels;if(S.paths!=null)k.mw=S.paths;if(S.pgrid!=null)k.oF=S.pgrid;if(S.slices!=null)k.BW=S.slices}if(W.lang!=null)dq.gi(W.lang,this.bL);
|
|
if(W.theme!=null)h.cF=W.theme;if(W.topt||h.zb){var p=W.topt?W.topt:{},I=h.zb?h.zb:{};for(var q in this.K.map){if(q>=100)continue;
|
|
var P="t"+q;if(p[P]||I[P])this.K.map[q].b.AM(p[P],I[P],this)}}};gS.prototype.apV=function(){if(this.kt.akl)return;
|
|
this.kt.akl=!0;var W=null,h=window.location.href,S=h.indexOf("="),k=h.indexOf("#");if(S!=-1)W=h.substring(h.indexOf("?")+1,S);
|
|
if(k!=-1&&k!=h.length-1){W="p";S=k}if(k!=-1&&h[k+1]=="i"){this.$F.aV(h.slice(k+2))}else if(k!=-1&&h[k+1]=="t"){this.$F.aV(h.slice(k+2).split("").reverse().join(""),!0)}else if(W=="p"||W=="state"){var p=h.substring(S+1,h.length);
|
|
p=JSON.parse(decodeURI(p));if(W=="p"){if(p.script)a1.ae_();if(p.server)this.Lr=p.server;if(p.resources)for(var Q=0;
|
|
Q<p.resources.length;Q++)this.$F.OJ({url:p.resources[Q]});if(p.files)for(var Q=0;Q<p.files.length;Q++)this.$F.OJ({url:p.files[Q],qb:{Ts:p.server,a4y:p.script}});
|
|
var I=p.environment;if(I==null)I={};if(I.plugins!=null)this.j6.alU(I.plugins);if(I.localsave!=null)this.kt.Q0=I.localsave;
|
|
if(I.customIO!=null)this.kt.kj=I.customIO;if(I.vmode!=null){var q=I.vmode;if(q==1)this.kt.compact=!0;
|
|
if(q==2)this.XX(1)}if(I.intro!=null)this.kt.np=I.intro;if(I.menus!=null)this.kt.a1_=I.menus;if(I.tmnu!=null)this.kt.zb=I.tmnu;
|
|
if(I.panels!=null)this.kt.FC=I.panels;if(I.showtools!=null){var P=I.showtools,t=P.indexOf(this.kt.Kz);
|
|
this.kt.asd=P;if(t==-1)this.tc(P[0])}if(I.phrases!=null)dq.ai$(I.phrases);if(I.autosave!=null){window.setInterval(function(){var i=new em(y.E.W);
|
|
i.data={o:y.D.qE};this.c(i)}.bind(this),I.autosave*1e3)}if(I.icons!=null){for(var M in I.icons)if(I.icons[M].indexOf("\"")==-1){if(M=="in"+"tro"&&this.kt.rC)continue;
|
|
PIMG[M]=I.icons[M];PIMG["__"+M]=!0}}this.sC(I);if(p.files==null&&p.script){aO.qJ(p.script,this);this.aB()}}else if(W=="state"){var U=this.$F;
|
|
if(p.action=="create"){var i=new em(y.E.W);i.data={o:y.D.mJ,DG:"newproject",amN:p.folderId};this.c(i)}if(p.action=="open"){for(var Q=0;
|
|
Q<p.ids.length;Q++)a5.jG(function(){var D="https://www.googleapis.com/drive/v3/files/"+this.a9k,R=new XMLHttpRequest;
|
|
R.open("GET",D);R.setRequestHeader("Authorization",a5.wm());R.send();R.onload=function(O){var b=JSON.parse(O.target.response);
|
|
U.OJ({url:D+"?alt=media",name:b.name,SF:{file:b,r_:""},q3:{Authorization:a5.wm()}})}}.bind({a9k:p.ids[Q]}));
|
|
alert("Loading files from Google Drive ...")}}}else{var z=window.launchQueue;if(z){var U=this.$F;z.setConsumer(function(D){var R=D.files;
|
|
console.log(R);for(var Q=0;Q<R.length;Q++){var O=R[Q];O.getFile().then(function(b){U.yW([b],null,null,null,[O])})}})}}};
|
|
gS.prototype._=function(){var W=document.getElementById("cap"),h=window.innerWidth<500;if(W){var S=W.getElementsByTagName("h1")[0],I=0,P=0,t=0;
|
|
S.textContent=h?"Photopea":dq.get([0,17,0]);var k=W.getElementsByTagName("p"),p=m.Pr(dq.get([0,17,1])),q=["PSD","XCF","Sketch","XD","CDR"];
|
|
for(var Q=0;Q<q.length;Q++)p=p.replace(q[Q],"<b>"+q[Q]+"</b>");if(!h)p+=" (<b>Adobe Photoshop</b>, <b>GIMP</b>, <b>Sketch App</b>, <b>Adobe XD</b>, <b>CorelDRAW</b>).";
|
|
k[0].innerHTML=p;p=dq.get([0,17,2])+" "+dq.get([0,17,3]);for(var Q=0;Q<p.length;Q++){var M=p[Q];if(M=="<")P++;
|
|
if(M==">")t++}if(!h&&P*t==9){var U=["//github.com/photopea/photopea/issues","//www.facebook.com/photopea/","//blog.photopea.com/introduction.html"];
|
|
for(var Q=0;Q<3;Q++){var i=p.indexOf("<",I),z=p.indexOf(">",I),D=p.slice(0,i)+"<a href=\""+U[Q]+"\" target=\"_blank\">"+p.slice(i+1,z)+"</a>";
|
|
I=D.length;p=D+p.slice(z+1)}k[1].innerHTML=p}else k[1].innerHTML=dq.get([0,17,2])}var R=document.getElementById("sponsors");
|
|
if(R)R.textContent=dq.get([0,17,4]);this.LK._();this.oB._();this.j6._();this.aJ._();this.x2._();this.Mm._();
|
|
for(var O in this.K.map)if(this.K.map[O].Hy)this.K.map[O].Hy._()};gS.prototype.cV=function(){return m.Qe[ca.LM][ca.bu].indexOf("8887")!=-1};
|
|
gS.prototype.UW=function(W,h){W=Math.floor(W);h=Math.floor(h);var S=m.x4("WUMK&AM"),k=ca.iR,p=m.Qe[ca.UM],I=Math.max(W,window.screen.width),q=Math.max(h,window.screen.height),i=0;
|
|
if(this.Ug==null)this.Ug=Math.min(I,q)<500||I<750?0:I<1600?1:2;var P=this.Ug,t=!this.As||this.cV()||!this.kt.rC||aM.w6()||P==0;
|
|
if(!t&&fw.Lx()){if(this.apk==null)this.apk=Math.random()<.5;t=this.apk}if(t){if(P!=0&&m.Qe[S]&&this.As)m.Qe[S]()}else{if(P==0)h-=60;
|
|
else W-=P==1?180:320}iu.prototype.UW.call(this,W,h);if(t&&this.zA){this.m[ca.Kx](this.NB);m.hP(this.NB);
|
|
this.zA=!1}if(!t&&!this.zA){if(Math.random()<.002){var M=function(R){aM.event(R||fw.zQ()?"gota_0":"gota_1")};
|
|
fw.asl(M)}this.adz(W,h);var U=P==0?p[ca.L4]:this.m;U.appendChild(this.NB);this.NB[ca.rv](k,m.x4("_MMJLNDfKCAg")+(P==0?10:10)+m.x4("_d$ebOS?I:==Ba-+# }$M"));
|
|
this.NB[k][m.x4("_MMJLND&<:E")]=(P==0?0:19)+m.x4("_d");this.NB[k][m.x4("i5WJHX")]=P==0?0:1;this.zA=!0}if(m.oq(this.oB.m))i+=31;
|
|
if(m.oq(this.dK.m))i+=32;this.LK.a30=this.kt.rC&&this.As;this.LK.UW(W,i);var z=h-i,D=m.x4("_d");this.NB[k][ca.ao1]=(P==0?100>>>1:h-11)+D;
|
|
this.NB[k][ca.hT]=(P==0?W:6*Math.pow(10,2))+D;this.aJ.UW(W,z);this.j6.UW(W,z);this.Mm.UW(W-this.aJ.Rv()-this.j6.Rv(),z)};
|
|
gS.prototype.adz=function(W,h){var S=function(){var k=new em(y.E.W);k.data={o:y.D.mJ,DG:"account"};this.c(k)}.bind(this);
|
|
fw.aiC(W,h,this.NB,S,this.Ug)};gS.prototype.a0J=function(W){console.log("systemCopy")};gS.prototype.a4L=function(W){if(m.de())return;
|
|
console.log("systemPaste");if(!W.clipboardData)return;var h=W.target.tagName.toLowerCase(),S=W.clipboardData.items;
|
|
if(S==null)return;var k=this.asn.bind(this);for(var Q=0;Q<S.length;Q++){var p=S[Q],I=p.getAsFile();if(p.type.indexOf("text")!=-1){p.getAsString(this.ap2.bind(this))}if(p.type.indexOf("image")!=-1){if(I.size==this.kt.a4Z)return;
|
|
this.kt.a4Z=I.size;if(I){I.name="image.png";this.$F.yW([I],k)}}}};gS.prototype.ap2=function(W){if(W.startsWith("http")){if(W==this.kt.acn)return;
|
|
this.kt.acn=W;var h=new em(y.E.W,!0);h.data={o:y.D.HY,nP:{url:W,KP:!0}};this.c(h)}};gS.prototype.asn=function(W,h){var S={buffer:W,rect:h},k=this.kt;
|
|
if(m.de()){var p=this.anu,I=p.pY;if(I.e==h.e&&I.Z==h.Z){S.rect=I;S.K5=p.K5}}else{if(k.La){var q=new em(y.E.u,!0);
|
|
q.b=a.pD;q.data={o:"h_stepbck"};this.c(q)}}k.La=S;var q=new em(y.E.W,!0);q.data={o:y.D.lR,ahc:!0};this.c(q)};
|
|
gS.prototype.a2p=function(){if(this.x2.lp()!=null)alert(dq.get([15,7,8]));else alert("Escape or Confirm the current action (in the top menu).")};
|
|
gS.prototype.ca=function(W){var h=this.fO();if(h==null){alert(dq.get([15,7,7]));return}var S=W.b==a.N$||W.b==a.vD;
|
|
if(this.x2.HV()&&W._Q!=!0&&!S){this.a2p();return}var k=this.K,p=this.kt.Kz,I=W.b;if(I==a.mj&&p==a.Bm)I=a.Bm;
|
|
if(p!=I&&k.map[p].b.HV()&&!S&&!(p==a.Tw&&I==a.Ak)){console.log("disabling",p);k.map[p].b.disable(h,this,this.kt,this.EA)}var q=this.K.map[I].b;
|
|
q.ca(W.data,this,h,this.EA,this.kt)};gS.prototype.afc=function(W){var h=this.kt;if(W.data.AL!=!0)fP.a6e({HP:W.data.HP,b4:W.data.b4},this,h,this.fO());
|
|
var S=h.Qm,k=h.bI;if(S==null)return;var p={a9u:!1,e4:"Step",a1R:0,P:!0,exp:!1,HP:W.data.HP};if(S[2]==null)S[2]=k[S[0]].Vz[S[1]].Vz.length-1;
|
|
if(W.data.b4)p.b4=JSON.parse(JSON.stringify(W.data.b4));k[S[0]].Vz[S[1]].Vz.splice(S[2]+1,0,p);S[2]++;
|
|
this.AH(f6.u)};gS.prototype.le=function(W){if(this.atN){W.data=0;return W.type}iu.prototype.le.call(this,W);
|
|
var h=W.data.o;if(h==y.D.se)fP.a5a(this.fO(),this.kt.bI,W.data.cM[0],W.data.cM[1],this);if(h==y.D.abP){this.atm(W.data.ass)}if(h==y.D.agd){this._();
|
|
this.Cz()}if(h==y.D.ar)this.Cz();if(h==y.D.aii)if(this.kt.dQ){this.kt.dQ.prompt();this.kt.dQ=null}if(h==y.D.PS)this.Mm.Ev(W.data.W0,W.data.push);
|
|
if(h==y.D.a2T)this.Mm.a1u();if(h==y.D.a62)this.x3(null,W.data.dir);if(h==y.D.Xp)this.Mm.iY(this.o0.indexOf(W.data.$x));
|
|
if(h==y.D.QO){if(W.data.gx&&document.fullscreenEnabled){if(document.fullscreenElement)document.exitFullscreen();
|
|
else document.body.requestFullscreen()}if(W.data.k!=null)this.XX(W.data.k)}if(h==y.D.ap4){if(W.data.kK)this.EA.iT(W.data.aiD);
|
|
else this.EA.Wz(W.data.aiD);this.ok(W.data.kK?"down":"up")}if(h==y.D.vI){var S=this.fO(),k=S.jc().slice(0),p=S.g[S.w[0]],I=new gj(0,0,S.e,S.Z),q=jg.bm()+"-d71c-11e5-b1ae-a548a96e5f9f",P=new em(y.E.W,!0);
|
|
if(W.data.nP==0){var t={name:S.name.split(".")[0],id:q,jR:[k,I]};P.data={o:y.D.XO,qb:"add",nP:f6.OA,GC:[t]};
|
|
this.c(P)}if(W.data.nP==1){var M=N.U(I.n()*4);N.wM(M,4294967295);N.a.ha("norm",k,I,M,I,I,1);var U=N.U(I.n());
|
|
N.Zi(M,U);N.uA(U);var i=N.oA(U,I);if(i.ZP())i=I;var z=N.U(i.n());N.vG(U,I,z,i);var D=N.U(i.n()*4);N.ce(z,D,3);
|
|
var R={pY:i,id:q,jR:[D,i]},O=gI.S0(q),b=O.Brsh.v;b.Dmtr.v.val=i.e;b.Spcn.v.val=10;P.data={o:y.D.XO,qb:"add",nP:f6.og,GC:{list:[{t:"Objc",v:O}],jE:[R],cc:[]}};
|
|
this.c(P);P.data={o:y.D.XO,nP:f6.Yk,_n:O};this.c(P)}if(W.data.nP==2){var w=S.O4(),A=w[0][w[1][0]],g={J2:p.getName(),q2:q,T:A.add.vmsk.clone().T},E=N.$.E6(g.T),j=new ex(E.e,0,0,E.Z,E.x,E.y);
|
|
j.uA();N.$.ac(g.T,j);E.x=E.y=0;g.zq=E.clone();P.data={o:y.D.XO,qb:"add",nP:f6.JF,GC:[g]};this.c(P)}}if(h==y.D.HY)this.$F.OJ(W.data.nP);
|
|
if(h==y.D.$u){var x=W.data.a8I;if(x!=!0&&this.bn("open"))return;this.$F.a18(x?this.Mm.d6():null,W.data.anq)}if(h==y.D.tJ){var d=W.data.a6Z,L=W.data.FB,_=this.ku(d);
|
|
if(L){var T=d==f6.og,c=[];for(var Q=0;Q<L.length;Q++)c.push((T?_.list:_)[L[Q]]);_=T?{cc:_.cc,jE:_.jE,list:c}:c}if(d==f6.xQ){var I=new jg;
|
|
for(var Q=0;Q<_.length;Q++){var e=_[Q].dS.Lefx;if(e)jO.af1(e,I,this.kt.n5)}_={hI:I.add.Patt?I.add.Patt:[],fH:_}}if(d==f6.$q){var r=this.kt.zl;
|
|
_={jE:[],cc:[],list:_};console.log(_)}if(d==f6.u)_=_[W.data.wJ];var B=f6.x6[d],k=B[2].m0(_);jH.save(k,B[1]+"."+B[0])}if(h==y.D.MY){var F=this.kt.tX,v=W.data.an5;
|
|
if(F.gX&&!F.ae7&&!v){F.a67=window.confirm("Load \""+W.data.ft+"\" also next time you use the editor?\nManage it in Edit - Local Storage.");
|
|
F.ae7=!0}if((F.a67||v)&&F.gX){F.o6[W.data.ft]=W.data.KG;var P=new em(y.E.W);P.data={o:y.D.XO,nP:f6.DR};
|
|
this.c(P)}}if(h==y.D.app){var S=this.fO(),H="<!DOCTYPE HTML>";if(S==null)return;var X=hI.EF(S.jc().buffer,S.e,S.Z),V=window.open();
|
|
H+="<head><script>setTimeout(function() {window.print();}, 10);</script></head>";H+="<body><img src=\""+X+"\" /></body>";
|
|
H+="</html>";V.document.write(H)}if(h==y.D.Az){if(this.bn("publishOnline"))return;var o=W.data.t8!="psd",S=this.fO();
|
|
if(S==null)return;if(!o&&S.lN)return;var J="Your picture will be published at "+(o?"Imgur":"Photopea")+".com under a public URL (known only to you). Proceed?";
|
|
if(!o)J+=" We guarantee 6 months of storage (or more, if your file is opened often).";var C=W.data.o4?!0:confirm(J);
|
|
if(C){if(!o){var P=new em(y.E.u,!0);P.b=a.m5;P.data={o:$.J_};this.c(P);var K=new gj(0,0,S.e,S.Z);for(var Q=0;
|
|
Q<S.g.length;Q++){var p=S.g[Q];if(p.rect.ZP()||p.vc()||p.kX()||p.bg()||p.rG()||p.add.TySh||p.add.vmsk||p.add.SoLd)continue;
|
|
var u=K.r$(p.rect);if(!u.xX(p.rect)&&!u.ZP()){var f=N.U(u.n()*4);N.zt(p.buffer,p.rect,f,u);p.buffer=f;
|
|
p.rect=u}if(!N.qR(p.buffer,p.rect.e,p.rect.Z))continue;var l=p.jP(),jk=p.opacity,hE=p.oO,Z=p.Vy;p.NN(!0);
|
|
p.opacity=255;p.oO="norm";S.w=[Q];P.data={o:$.JT,t8:"jpg"};this.c(P);var aQ=S.g[Q];p.NN(l);aQ.NN(l);
|
|
p.opacity=aQ.opacity=jk;p.oO=aQ.oO=hE,p.Vy=aQ.Vy=Z}}if(S.V4){S.f4()}var jC;if(W.data.t8=="psd")jC=hI.Es(S,"psd",0,0,[!0,!0,!0]);
|
|
else if(W.data.t8=="png")jC=hI.Es(S,"png");else{var eO=hI.Es(S,"png"),iU=hI.Es(S,"jpg");jC=eO.byteLength<iU.byteLength?eO:iU}if(o)jH.ak3(jC,W.data.o4);
|
|
else this.$F.a4o(jC,S.name,W.data.o4)}}if(h==y.D.qE){var S=this.fO(),gK=!1;if(S==null)return;if(S.V4){S.f4()}if(W.data.at3){if(!this.WJ(S))return;
|
|
var k=eX.ab5(S,W.data.at3,this.kt);this.aB(k);gK=!0}else if(S.I7){if(this.o0.indexOf(S.I7.P4)!=-1){var k=new Uint8Array(hI.J$("PSD").i4(S,null,null,[!0,!1])),P=new em(y.E.u,!0);
|
|
P.data={o:$.Cb,om:S.I7.P4,data:k,id:S.I7.aj$,Is:S.name};P.b=a.m5;this.c(P);alert("Smart Object updated")}gK=!0}else if(this.bn("save")){gK=!0}else if(S.SF){eX.abV(S);
|
|
gK=!0}else if(S.qb&&S.qb.Ts){if(!this.WJ(S))return;this.$F.a8g(S,this.kt,eX.akR);gK=!0}else if(S.Hi&&S.df=="psd"){var P=new em(y.E.W,!0);
|
|
P.data={o:y.D.fs,AK:!0};this.c(P);return}if(gK){S.XW=S.nT;S.Lz=Date.now();S.Hx=!0}else{var P=new em(y.E.W,!0);
|
|
P.data={o:y.D.fs};this.c(P)}}if(h==y.D.fs){if(!this.kt.Q0){alert("function is disabled");return}if(this.bn("saveAsPSD"))return;
|
|
var S=this.fO(),fN=null;if(S==null||S.lN)return;if(!this.WJ(S))return;var P=new em(y.E.u,!0);P.data={o:$.J_};
|
|
P.b=a.m5;this.c(P);if(S.g.length>8e3&&!confirm("Your document has "+S.g.length+" layers."+" Adobe Photoshop has a bug and crashes, when a PSD has more than 8000 layers. Do you want to proceed?"))return;
|
|
var iM={Fv:[]};S.root.pA([],iM);var i5=iM.Fv;if(i5.length>11&&!confirm("One layer is nested "+(i5.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: "+i5.join(" \uD83E\uDC1A ")+"."))return;
|
|
if(fN&&!W.data.AK){var dx={suggestedName:S.name,types:[{description:"PSD Files",accept:{"image/psd":[".psd"]}}]};
|
|
fN(dx).then(function(W){S.Hi=W;S.name=W.name;S.WU=!0;var P=new em(y.E.W,!0);P.data={o:y.D.fs,AK:!0};
|
|
this.c(P)}.bind(this));return}var ai=window.ga,hO=m.dJ("%y&~I&:,8A[xEKI@VXs^YVhZb7pukvu% ").split(",");
|
|
if(S.rj()&&ai)ai(hO[0],hO[1],hO[2],S.df+":"+m.dJ(aM.w6()?"\"'|('61":"w'| "));if(S.V4){S.f4()}var k=hI.J$("PSD").i4(S);
|
|
if(W.data.AK){S.Hi.createWritable().then(function(W){W.write(k);return W}).then(function(W){W.close()})}else jH.save(k,S.name);
|
|
S.XW=S.nT;S.Lz=Date.now();S.Hx=!0}if(h==y.D.k3)window.open(W.data.link,"_blank");if(h==y.D.a8u){if(this.x2.HV()){this.a2p();
|
|
return}var S=this.fO(),p=S.g[S.w[0]],ff=S.L5(p.add.SoLd.Idnt.v);for(var Q=0;Q<this.o0.length;Q++){var eP=this.o0[Q].I7;
|
|
if(eP!=null&&eP.aj$==ff.SI&&eP.P4==S){this.Mm.Cw(Q);return}}jH.vj({name:ff.Is,I7:{aj$:p.add.SoLd.Idnt.v,P4:S}},ff.raw.buffer,this)}if(h==y.D._E){this.adV()}if(h==y.D.Lu){this.ahw(W.data.H6,W.data.Cy,W.data.PE)}if(h==y.D.lR){this.a0w(W.data.ahc,W.data.Xc,W.data.PE)}if(h==y.D.asM){var a0=W.data.k;
|
|
if(a0.startsWith("vcb;")){var bM=JSON.parse(a0.slice(4));bM[0]=hv.a90(bM[0]);var P=new em(y.E.u,!0);
|
|
P.b=a.ga;P.data={o:"append",rO:"Paste Paths",akN:bM};this.c(P)}else if(a0.startsWith("lrs;")){var cV=a0.split(";"),aX=this.o0[parseInt(cV[1])];
|
|
if(aX==null)return;var j8=this.fO(),j3=aX.w;aX.w=JSON.parse(cV[2]);var am=aX.Cf(null,aX!=j8),P=new em(y.E.u,!0);
|
|
P.data={o:$.W$,g:am,P4:aX,zp:j8};P.b=a.m5;this.c(P);aX.w=j3}else if(a0.startsWith("<!--")||a0.startsWith("<svg")){var fG=G.cw(a0),bw=hI.J$("svg"),I=new jg("image.psd");
|
|
bw.uc(fG.buffer,I);if(this.o0.length!=0){var fz=I.g;if(fz.length==3&&fz[0].getName()=="</Layer group>"&&fz[2].vc())fz=[fz[1]];
|
|
var P=new em(y.E.u,!0);P.b=a.m5;P.data={o:$.W$,g:fz,P4:I,zp:this.fO()};this.c(P)}else this.adK(I)}}if(h==y.D.kI){aO.qJ(W.data.ff,this)}if(h==y.D.Yg){if(window.parent!=window)window.parent.postMessage(W.data.nP,"*");
|
|
this.j6.B_(W.data.nP)}if(h==y.D.QN){var c6=parseFloat(W.data.DG);if(this.kt.FC.indexOf(c6)==-1){var P=new em(y.E.W,!0);
|
|
P.data={o:y.D.XO,nP:f6.kh,k:c6,qb:"add"};this.c(P)}this.j6.afo(W.data.DG)}if(h==y.D.I2){this.VD.aob(this.fO(),this.kt)}if(h==y.D.mJ){var hk="open_from_url openFromURL camera takePic templates showTemplates newproject new eassets exportLayers".split(" ");
|
|
for(var Q=0;Q<hk.length;Q+=2)if(W.data.DG==hk[Q]&&this.bn(hk[Q+1]))return;if(!this.kt.Q0&&W.data.window=="saveforweb"){alert("function is disabled");
|
|
return}this.x2.a8J(W.data.DG,this.fO(),W.data,this.o0,this.EA)}if(h==y.D.tb)jH.save(W.data.data,W.data.name);
|
|
if(h==y.D.Hf){if(!this.x2.HV()||W._Q)this.adK(W.data.om)}if(h==y.D.Zj){this.Mm.Cw(W.data.target);var P=new em(y.E.u,!0);
|
|
P.data={o:$.xR,om:W.data.om,Ok:W.data.Ok,sq:W.data.sq};P.b=a.m5;this.c(P);this.tc(a.Fh)}if(h==y.D.a1V){n.O9=!n.O9;
|
|
if(this.o0.length>0)this.fO().G()}if(h==y.D.aaZ){var as=aM.YE();if(as!=null&&as.globals!=null)this.sC(as.globals);
|
|
this.Oc()}if(h==y.D.i8){this.$F.yW(W.data.data,null,W.data.KX,W.data.na,W.data.ad0)}if(h==y.D.fX){if(!this.x2.lp()!=null)this.tc(W.data.b,W.data.n2);
|
|
if(W.data.a4e)this.vO().Qb(this.fO(),this,this.kt,this.EA,this._K)}if(h==y.D.gw){if(this.K.yn)this.tc(this.K.yn)}if(h==y.D.Po){var bf=this.K.map[W.data.b].b,S=this.fO();
|
|
bf.Fg(W.data,this,S,this.EA,this.kt);if(S)S.tn=!0;this.a11()}if(h==y.D.Sx){var gW=this.K.map[W.data.b];
|
|
this.a5q(gW);gW.Hy.C3(W.data)}if(h==y.D.XO){var S=this.fO(),j1=W.data.nP,bZ=W.data.GC,iL=this.kt;if(W.data.qb=="set"){var jI=a.ym(bZ);
|
|
if(iL.Kz!=jI)this.tc(jI);this.K.map[jI].Hy.aon(bZ,iL)}if(W.data.qb=="add"){var B=f6.x6[j1];if(j1==f6.kh){iL.FC.push(W.data.k);
|
|
iL.FC.sort(function(jl,dm){return jl-dm})}else if(B==null){if(bZ)iL.Tm.aoL(bZ,W.data.ar5)}else{var e2=this.ku(j1);
|
|
if(j1==f6.og){e2.jE=e2.jE.concat(bZ.jE);e2.cc=e2.cc.concat(bZ.cc);e2=e2.list;bZ=bZ.list}if(j1==f6.xQ&&S){for(var Q=0;
|
|
Q<bZ.length;Q++){var e=bZ[Q].dS.Lefx;if(e)jO.a3e(e,S,iL.n5)}}if(j1==f6.$q&&bZ==null){var I=this.K.map[iL.Kz].Hy.a4i();
|
|
if(I==null)return;bZ=[I]}for(var Q=0;Q<bZ.length;Q++)e2.push(bZ[Q]);if(W.data.ar5!=!0)if(e2.length!=bZ.length||j1==f6.RP||j1==f6.xQ||j1==f6.u)alert(dq.get(B[3])+" "+dq.get([23,1])+".")}}if(W.data.qb=="del"){if(j1==f6.kh){iL.FC.splice(iL.FC.indexOf(W.data.k),1)}else{var B=f6.x6[j1],L=W.data.FB,e2=this.ku(j1);
|
|
if(j1==f6.og)e2=e2.list;for(var Q=0;Q<L.length;Q++)e2[L[Q]]=null;for(var Q=0;Q<e2.length;Q++)if(e2[Q]==null){e2.splice(Q,1);
|
|
Q--}alert(dq.get(B[3])+" deleted.")}}if(W.data.qb=="rnm"){var B=f6.x6[j1],e2=this.ku(j1);if(j1==f6.og)e2=e2.list;
|
|
if(e2[W.data.FB[0]]==null)return;B[2].sm(e2[W.data.FB[0]],W.data.k)}if(j1==f6.ua){var dV=W.data.k;iL.BD=dV;
|
|
iL.ae1[dV.eY]=dV.EH}if(j1==f6.rQ){var dV=W.data.k;iL.K7=dV;var ds=dV.strokeEnabled.v,ij=dV.strokeStyleContent.v,dg=ds?{eY:1+hz.EJ.Dn.indexOf(ij.classID),EH:ij}:{eY:0};
|
|
iL.atw[dg.eY]=dg.EH}if(j1==f6.xT){iL.NP=W.data.k}if(j1==f6.Z3){iL.YF=W.data.YF}if(j1==f6.Yk){iL.zl.ev=W.data._n}if(j1==f6.xC){iL.bD=W.data.kN}if(j1==f6.Ov){var iT,ej="Clrs";
|
|
if(W.data.s7<2){var eH=W.data.k,d4=W.data.s7==0,iR=N.X.hg({p:eH>>>16,z:eH>>>8&255,S:eH&255});if(d4)iL.Ps=eH;
|
|
else iL.lL=eH;ej=d4?"FrgC":"BckC";iT={HP:"set",b4:{__name:"Set",classID:"setd",T:{t:"Objc",v:iR}}}}if(W.data.s7==2){var cD=iL.Ps;
|
|
iL.Ps=iL.lL;iL.lL=cD;iT={HP:"exchange",b4:{__name:"Exchange",classID:"Exch"}}}if(W.data.s7==3){iL.Ps=0;
|
|
iL.lL=16777215;if(S!=null&&S.w.length!=0&&S.g[S.w[0]].Yi==1){var cD=iL.Ps;iL.Ps=iL.lL;iL.lL=cD}iT={HP:"reset",b4:{__name:"Reset",classID:"Rset"}}}if(iT){iT.b4.null={t:"obj ",v:[{t:"prop",v:{classID:"Clr",keyID:ej}}]};
|
|
var gW=this.vO();gW.Vi=this;gW.track(iT)}}if(j1==f6.gH){iL.rx=!iL.rx;this.Cz()}if(j1==f6.z_){iL.H0=!iL.H0;
|
|
this.Cz()}var cA=iL.dH;if(j1==f6.ap){cA.$C=!cA.$C;this.Cz()}if(j1==f6.Da){cA.mw=!cA.mw;this.Cz()}if(j1==f6.Qc){cA.r4=!cA.r4;
|
|
this.Cz()}if(j1==f6.Vm){cA.uv=!cA.uv;this.Cz()}if(j1==f6.Fe){cA.oF=!cA.oF;this.Cz()}if(j1==f6.tU){cA.BW=!cA.BW;
|
|
this.Cz()}if(j1==f6.ic){iL.dH=W.data.kN;this.Cz()}if(j1==f6.J3){iL.j9=!iL.j9;this.Cz()}if(j1==f6.bt){iL.Xj[W.data.jY]=!iL.Xj[W.data.jY];
|
|
this.Cz()}if(j1==f6.pN){dq.vr(W.data.lang,this.bL)}if(j1==f6.CI){iL.cF=W.data.cF;this._()}if(j1==f6.DR&&iL.tX.gX){var d_=iL.tX.gX.transaction(["rsrc"],"readwrite").objectStore("rsrc"),d5=d_.put({k:"fs0",fset:iL.tX.o6});
|
|
d5.onerror=function(W){console.log(W);alert("Storing failed. Browser says: "+W.target.error.message,7e3)}}this.AH(j1)}};
|
|
gS.prototype.a2k=function(){this._();this.Cz()};gS.prototype.bn=function(W){var h=this.kt.kj[W];if(h){var S=new em(y.E.W,!0);
|
|
S.data={o:y.D.kI,ff:h};this.c(S)}return h!=null};gS.prototype.WJ=function(W){var h=W.rj()||W.I7&&W.I7.P4.rj(),p=15;
|
|
if(this.cV())h=!1;var S=new m.Qe[ca.gT],k=(S[m.dJ("xy,b-66:")]()&1)*60+S[m.x4("VQ]3LNRN<G")]();if(h&&!aM.w6()&&k>p){var I=m.Qe[m.dJ("}$z{2*35")][m.dJ("y'|!")],q=m.x4("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+");
|
|
q+="\n\n"+m.x4("6Q]eD_-L<A:C8G&%\"+.$'/4ouu qb\\sf\\WQRKSA=U430/:7II:''1&lqy\"")+(-k+120)+m.x4("nYRTXTBMd");
|
|
if(I.indexOf(m.dJ("\"|'/-1)(W0?@"))==-1)q=dq.get([0,11+6,3+2]);m.Qe._cwY(q);return!1}return!0};gS.prototype.ku=function(W){var h=this.kt,S=[f6.og,f6.$h,f6.sD,f6.OA,f6.JF,f6.xQ,f6.RP,f6.u,f6.$q,f6.Z1],k=[h.zl,h.e7,h.G7,h.n5,h.Ng,h.J5,h.a1M,h.bI,h.I8,h.acx];
|
|
return k[S.indexOf(W)]};gS.prototype.adV=function(){var W=this.ahw(),h=this.fO();if(h==null||h.w.length==0)return;
|
|
var S=h.g[h.w[0]],k=new em(y.E.u);if(W==1){k.b=a.ga;k.data={o:"remove",rO:"Cut Paths"}}else{k=new em(y.E.gg);
|
|
k.data={HP:"delete"}}this.c(k)};gS.prototype.ahw=function(W,h,S){if(W==null)W=!1;var k=this.kt;console.log("doCopy",W,h);
|
|
var p=this.fO();if(p==null||p.w.length==0)return;var I=p.g[h==null?p.w[0]:h],q=p.O4(),P=q[0],t=q[1],M=P[t[0]];
|
|
if(!W&&M!=null&&M.add.vmsk.w.length!=0){var U=a.C8.IY(M.add.vmsk,M.add.vogk);if(m.de()){U[0]=hv.afq(U[0]);
|
|
var i="vcb;"+JSON.stringify(U);jH.oK(new Blob([i],{type:"text/plain"}))}else k.Tc=U;return 1}else if(p.q==null){if(m.de()){var i="lrs;"+this.o0.indexOf(p)+";"+JSON.stringify(p.w);
|
|
jH.oK(new Blob([i],{type:"text/plain"}))}}else{var z,D;if(W){var R=new gj(0,0,p.e,p.Z);D=R.r$(p.q.rect);
|
|
z=N.U(D.n()*4);N.zt(p.jc(),R,z,D);N.XY(p.q.channel,p.q.rect,z,D)}else if(p.ye.length!=0){D=p.q.rect.clone();
|
|
z=N.U(D.n()*4);var O=p.BS[p.ye[0]],b=O.gB(D);N.yS(b,z);N.ce(p.q.channel,z,3)}else{var w=I.if(p,p.q);
|
|
if(w==null){alert("Copied area is empty");return}z=w.zz;D=w.rect}var A=p.t.aL,g=A[0]+A[1]+A[2];if(g==1){var E=A.indexOf(1);
|
|
for(var Q=0;Q<z.length;Q+=4)z[Q]=z[Q+1]=z[Q+2]=z[Q+E]}var j=new eC(p.e,p.Z);if(m.de()&&S!=!0){var x=hI.J$("PNG").aad(z.buffer,D.e,D.Z);
|
|
jH.oK(new Blob([new Uint8Array(x)],{type:"image/png"}));this.anu={pY:D,K5:j}}else k.La={buffer:z,rect:D,K5:j};
|
|
k.ap5=D.clone();k.Tc=null}};gS.prototype.a0w=function(W,h,S){if(h)this.aiL=!0;console.log("doPaste");
|
|
var k=this.kt,p=k.La,t;if(this.o0.length==0){if(!W&&m.de()){jH.TZ(this,null);return}if(p){var I=hI.RO("image.psd",[{data:p.buffer.buffer,rc:p.rect}]),q=new em(y.E.W);
|
|
q.data={o:y.D.Hf,om:I};this.c(q)}return}var I=this.fO(),P=I.g[I.w.length==0?I.g.length-1:I.w[0]];if(k.Tc){var M=I.O4(!0),U=M[0],i=M[1];
|
|
t=U[i[0]]}var q=new em(y.E.u,!0);if(k.Tc!=null&&t!=null){q.b=a.ga;q.data={o:"append",rO:"Paste Paths",akN:k.Tc}}else if(!W&&m.de()&&S!=!0){jH.TZ(this,this.asn.bind(this));
|
|
return}else{if(p==null)return;if(I.xi(!1)&&(I.t.aL.join("")!="111"||I.ye.length!=0||P.Yi>0||P.rect.ZP())){q.b=a.og;
|
|
q.data={o:"draw",aiQ:!0,rO:[5,2]}}else{q.b=a.m5;q.data={o:$.tN,Xc:this.aiL};this.aiL=!1}q.data.La=p}this.c(q)};
|
|
gS.prototype.afa=function(){for(var Q=0;Q<this.o0.length;Q++){var W=this.o0[Q],h=!0;for(var S=0;S<W.g.length;
|
|
S++){var k=W.g[S],p=k.add.TySh;if(p!=null&&!jE.Os(p,this.kt.Tm,this))h=!1}if(!h)continue;if(W.rd)for(var S=0;
|
|
S<W.g.length;S++){var k=W.g[S],p=k.add.TySh;if(p!=null&&jE.Os(p,this.kt.Tm,this)){var I=new a1(p.MW,this.kt.Tm),q=jE.gY(I,p);
|
|
k.rect=q.pY;k.buffer=q.vM;k.G();W.G()}}if(W.ahy)continue;W.ahy=!0;if(W.qb&&W.qb.a4y)aO.qJ(W.qb.a4y,this);
|
|
this.aB();var P=new em(y.E.u);P.b=a.Ak;P.data={o:"start",CD:"GEfc"};var t=new em(y.E.W);t.data={o:y.D.mJ,DG:"saveforweb",t8:2}}};
|
|
gS.prototype.AH=function(W){var h=this.kt,S=h.Kz,q=!1;if(W==f6.Yk){if(this.K.map[S].Hy)this.K.map[S].Hy.IF(h,W)}else for(var k in this.K.map)if(this.K.map[k].Hy)this.K.map[k].Hy.IF(h,W);
|
|
if(W==f6.a5){if(S!=a.mj)this.K.map[a.mj].b.IF(h,W);this.afa()}this.Mm.IF(h,W);this.aJ.IF(h,W);this.x2.IF(h,W);
|
|
this.vO().IF(h,W);this.j6.IF(h,W);this.oB.IF(h,W);if(W==f6.CI||W==f6.W8){hj.a7U(h.cF);this.update(!0)}var p=h.YF,I=p.D4.Font;
|
|
if(W==f6.Z3&&I!=null&&p.Vt[I].Name!=h.font){h.font=p.Vt[I].Name;q=!0}if([f6.kh,f6.xC,f6.Ov,f6.gH,f6.z_,f6.ic,f6.Qc,f6.Vm,f6.ap,f6.Da,f6.Fe,f6.tU,f6.pN,f6.CI].indexOf(W)!=-1||q)this.a11()};
|
|
gS.prototype.a11=function(){if(!this.m2)return;var W={},h=this.K.map;for(var S in h){var k=h[S].b;if(k.Dj&&k.Dj()!=null)W["t"+S]=k.Dj()}var p=this.kt,I=p.dH,q={fcolor:p.Ps,bcolor:p.lL,rulers:p.rx,extras:p.H0,favFam:p.bD,panels:p.FC,eparams:{guides:I.r4,grid:I.uv,sels:I.$C,paths:I.mw,pgrid:I.oF,slices:I.BW,gsize:I.FE,gunits:I.zm,gtype:I.KE,runits:I.VI},lang:dq.U3(),theme:p.cF,as:p.qi,topt:W};
|
|
if(p.font!=null)q.font=p.font;var P=aM.YE();if(P==null)P={};P.globals=q;aM.WW(P)};gS.prototype.aty=function(){var W=this.EA,h=this._K,S=this.kt.Kz,k=this.K.map[S].b,p=null,I=!1;
|
|
for(var Q=0;Q<this.K.a3o.length;Q++){var q=this.K.a3o[Q],P=!0;for(var t=0;t<q.W2.length;t++){var M=q.W2[t];
|
|
if(!W.j(M))P=!1}if(P&&(!q.$g||!k.HV())&&(q.Xu==null||q.Xu.indexOf(S)!=-1)){p=q.b;I=q.$g;break}}if((!h.kK||S==a.dj)&&this.K.pH!=p&&(p!=S||!I)){var U=this.fO();
|
|
if(this.K.pH!=null&&p==null)this.vO().disable(U,this,this.kt,W,!0);this.K.pH=p;this.vO().enable(U,this,this.kt,W,p!=null&&p!=S)}};
|
|
gS.prototype.Gk=function(W){var h=this.kt.Kz,S=this.fO();if(h!=null){this.K.map[h].b.disable(S,this,this.kt,this.EA)}};
|
|
gS.prototype.a5q=function(W){if(W.Hy==null){W.Hy=new W.lE;W.Hy.apP(W.b.id,W.b.P6);W.Hy.IF(this.kt,f6.W8);
|
|
W.Hy._()}};gS.prototype.tc=function(W,h){if(W==a.Fh&&this.x2.lp())return;var S=this.fO(),k=this.kt;if(this.K.map[W].b.m1(S,k)){this.Gk();
|
|
var p=[a.FJ,a.oR,a.kQ,a.Zu,a.JO,a.X4,a.SM,a.ga,a.Wl].indexOf(k.Kz)!=-1;if(W!=k.Kz)this.K.yn=k.Kz?k.Kz:a.M2;
|
|
k.Kz=W;this.aJ.Yo(this.K,this.kt);var I=this.K.map[W];this.K.Y$[I.jp]=I.ao0;this.a5q(I);this.dK.asI(I.Hy);
|
|
var q=I.b;q.enable(S,this,this.kt,this.EA,!1,h,p);if(S)S.tn=!0;this.Cz()}};gS.prototype.vO=function(W){var h=this.K,S=h.sK,k=h.pH,p=this.kt.Kz;
|
|
if(S)p=S;else if(k&&W==null)p=k;return h.map[p].b};gS.prototype.adK=function(W){var h=this.kt,S=this.o0.indexOf(W);
|
|
if(S!=-1){this.Mm.Cw(S);return}if(this.Lr&&(W.qb==null||W.qb.Ts==null)){W.qb={Ts:this.Lr}}if(W.aq==null){W.aq="local,"+this.agy+","+W.name;
|
|
this.agy++}W.Lz=Date.now();if(fw.zQ()!=0&&!this.acV&&m.Qe[m.dJ("t$&!'31")].toString().indexOf(m.dJ(" u,$4&"))==-1){alert(m.dJ("j$--=#66A@5EU`KQaFVjSih\\hpirt2,x&5&+#++A4<8SFOO_FUMQ|"));
|
|
return}for(var Q=0;Q<W.g.length;Q++){var k=W.g[Q];if(k.add.SoLd!=null){var p=Date.now()}if(k.add.TySh!=null)jE.Os(W.g[Q].add.TySh,h.Tm,this)}var I=W.g.length,q=ca.ks(),P=Math.PI*(5158<<14)+(m.zF(31)?20:10)*7e7;
|
|
if(q>P){var I=W.g.length;W.g=[];return I}if(n.O9)n.a6f(Math.max(W.e,W.Z));W.fG();W.nF();if(W.afs)W.abe();
|
|
else W.G();W.afs=!1;this.o0.push(W);this.Mm.QJ(new ju(W));W.tn=!0;W.Hx=!0;this.afa();var t=new em(y.E.u);
|
|
t.b=a.AT;t.data={o:"auto",Np:2}};gS.prototype.fO=function(){return this.o0[this.Qf]};gS.prototype.ajO=function(){return this.x2.lp()==null};
|
|
gS.prototype.x3=function(W,h){this.Gk();var S=this.o0.length;if(h!=null)this.Mm.Cw((this.Mm.d6()+h+S)%S);
|
|
this.Qf=this.Mm.d6();var k=this.fO();this.oB.akk(k,this.kt);this.j6.Yo(k,this.o0,this.kt);this.Cz();
|
|
if(k)k.tn=!0};gS.prototype.ahM=function(W){this.Gk();this.o0.splice(W.data._2,1);if(this.o0.length==0){this.x3(W);
|
|
if(n.O9)n.hi().parentNode.removeChild(n.hi())}};gS.prototype.atX=function(W){var h=[],S=W.data.ark;for(var Q=0;
|
|
Q<S.length;Q++)h[Q]=this.o0[S[Q]];this.o0=h;this.Qf=this.Mm.d6()};gS.prototype.an0=function(W){var h=this.Mm,S=h.a4Y(),k=this.vO(),p=this.fO();
|
|
if(S==h.d6()||!k.iJ())return;this.atm(S,k)};gS.prototype.atm=function(W,h){var S=this.kt,k=this.Mm,p=this.fO(),I=this.o0[W],q=new em(y.E.u,!0);
|
|
q.b=a.m5;q.data={o:$.W$,g:p.Cf(null,!0),P4:p,zp:I};this.c(q);var P=this._K,t=S.rx;S.rx=!1;P=p.t.wy(P.x,P.y);
|
|
if(h)h.yG(p,this,S,this.EA);k.Cw(W);P=I.t._c(P.x,P.y);P.x+=49;P.y+=112;if(h)h.Qb(I,this,S,this.EA,P);
|
|
S.rx=t};gS.prototype.atW=function(W){var h=this.fO(),S=this.EA,k=this.kt,p=W.r3;if(p)this._K=p;if(W.action.startsWith("multi")){var I=new em(y.E.u,!0);
|
|
I.data={o:W.action,ou:W.ou};I.b=a.vD;this.c(I);return}var q=this.K.map[a.M2].b;if((W.action=="down"||W.action=="rdown")&&k.Kz!=a.M2&&this.K.pH!=a.M2&&q.FX(h,this,k,S,p)){this.K.sK=a.M2;
|
|
q.enable(h,this,k,S,!0)}var P=this.x2.lp(),t=P!=null&&P.eh()&&this.K.pH==null?P:this.vO();if(P!=null&&t!=P&&this.x2.HV()&&t.id!=a.N$&&t.id!=a.vD)return;
|
|
if(W.action=="down")t.Qb(h,this,k,S,p);if(W.action=="rdown")t.Pt(h,this,k,S,p);if(W.action=="move")t.Go(h,this,k,S,p);
|
|
if(W.action=="up"||W.action=="cancellast")t.he(h,this,k,S,p,W.action=="cancellast");if(W.action=="rup")t.ON(h,this,k,S,p);
|
|
if(W.action=="cancellast"){if(h&&h.history.length!=0&&Date.now()-h.history[h.history.length-1].ae8<200){var M=new em(y.E.u);
|
|
M.b=a.pD;M.data={o:"h_stepbck"};this.c(M)}}var U=this.j6;if(W.action=="down")U.Qb(h,this,k,S,p);if(W.action=="move")U.Go(h,this,k,S,p);
|
|
if(W.action=="up")U.he(h,this,k,S,p);if(W.action=="down"||W.action=="up"){this.aty()}if(W.action=="down"||W.action=="up"||W.action=="ctx"){h.tn=!0}if((W.action=="up"||W.action=="rup")&&this.K.sK){this.K.sK=null;
|
|
q.disable(h,this,k,S)}if(W.action=="scroll"){var i=!S.j(hW.Q9)&&W.Ci,I=new em(y.E.u,!0);I.data={o:"scroll",tm:W.tm.clone(),r3:p};
|
|
I.b=S.j(hW.OM)||i?a.vD:a.N$;this.c(I)}};gS.prototype.mx=function(W){var h=this.fO(),S=this._K;if(h&&this.vO().Wi(S,this.EA)){var k=h.t,p=k.Vz.e,I=k.Vz.Z,q=0,P=0,t=16;
|
|
if(S.x<t)q=t-S.x;if(S.x>p-t)q=S.x-(p-t);if(S.y<t)P=t-S.y;if(S.y>I-t)P=S.y-(I-t);if((q!=0||P!=0)&&(h.e*k.J>p||h.Z*k.J>I)){q=Math.min(5,q*.5);
|
|
P=Math.min(5,P*.5);if(!(S.x<t||S.y<t)){q=-q;P=-P}k.r.x+=q;k.r.y+=P;this.atW({r3:this._K,action:"move"});
|
|
h.WU=!0}}this.update()};gS.prototype.update=function(W){var h=this.fO();if(h==null)return;if(h.tn){var S=this.K.map;
|
|
for(var k in S){if(S[k].b.Mr)S[k].b.Mr(h,this,this.kt,this.EA)}}if(h.V4){h.f4()}var p=h.t,I=this.jv,q=this.jv=Date.now();
|
|
if(h.V4||h.zW||h.Hx||h.WU||W||p.l5!=p.J||!p.zU.xX(p.r)){var P=p.l5;if(p.l5!=p.J){var t=a.xU.jA(p.J,p.l5>p.J),M=.12;
|
|
if(p.l5<p.J&&p.l5<t)p.l5=t;if(p.l5>p.J&&p.l5>t)p.l5=t;var U=Math.abs(p.J-t)*(q-I)*.001/M;if(p.l5<p.J)p.l5=Math.min(p.J,p.l5+U);
|
|
else p.l5=Math.max(p.J,p.l5-U)}var i=P==p.J?0:(p.l5-p.J)/(P-p.J);p.zU.x=p.r.x+i*(p.zU.x-p.r.x);p.zU.y=p.r.y+i*(p.zU.y-p.r.y);
|
|
this.Mm.IF(this.kt,null);this.Mm.Yo(h,this.o0)}if((h.V4||h.WU||h.tn)&&(!this._K.kK||h.pg)){if(h.tn)h.nF();
|
|
this.j6.Yo(h,this.o0,this.kt);this.aJ.a2g(h,this.EA);h.rm=!1}h.pg=!1;h.tn=!1;h.V4=null;h.zW=h.Hx=h.WU=!1};
|
|
gS.prototype.Wb=function(W){var h=W.target.tagName.toLowerCase(),S=W.target.getAttribute("type"),k=hW,p=k.IO(W.code,k.l$);
|
|
if(!((h=="input"||h=="select"||h=="button")&&k.IO(W.code,k.A6))){if(k.ys(W)){W.preventDefault()}this.EA.iT(k.TK(W));
|
|
this.ok("down")}};gS.prototype.IV=function(W){if(W.key==" ")this.EA.hh();if(hW.IO(W.code,hW.LN))this.EA.reset();
|
|
this.EA.Wz(hW.TK(W));var h=W.target.tagName.toLowerCase();if(hW.ys(W)){W.preventDefault()}this.ok("up")};
|
|
gS.prototype.ok=function(W){var h=this.EA,S=this.fO(),k=S!=null&&S.w.length!=0;if(this.VD.lp()!=null){if(h.j(hW.y$)){this.VD.ahG()}return}this.aty();
|
|
var p=this.Nu(hW.Q9),I=h.j(hW.OM),q=h.j(hW.YS);if(p&&h.j(hW.SG)&&W=="down"){var P=new em(y.E.u),t=new em(y.E.W);
|
|
P.b=a.pD;if(q){P.data={o:"h_stepfwd"}}else{P.data={o:"h_stepbck"}}if(this.x2.lp()!=null&&this.x2.lp().HV()){}else this.c(P)}if(p){var P=new em(y.E.u),M=new em(y.E.gg),t=new em(y.E.W);
|
|
if(!I&&W=="down")for(var U in bS.keys){var i=bS.keys[U],z=!0;for(var Q=0;Q<i.length;Q++)if(!h.j(i[Q]))z=!1;
|
|
if(z){P.b=a.AT;if(U=="hue2"&&q)P.data={o:"auto",Np:3};else P.data={o:"start",dv:U}}}if(h.j(hW.D)){M.data=a.I6.tQ(!0)}if(h.j(hW.ZU)){if(I)t.data={o:y.D.mJ,DG:"csize"};
|
|
else t.data={o:y.D.Lu,H6:q}}if(h.j(hW.nS)){M.data=a.I6.tQ()}if(h.j(hW.E)&&W=="down"){P.b=a.m5;if(q)P.data={o:$.sA};
|
|
else{if(S&&S.w.length==1&&S.w[0]!=0&&!S.g[S.w[0]].vc())P.data={o:$.JD};else P.data={o:$.m7}}}if(h.j(hW.bY)){if(q&&this.kt.Kz!=a.Fh)t.data={o:y.D.mJ,DG:"afw_fade"};
|
|
else if(I){P.b=a.Ak;P.data={o:"applylast"}}else t.data={o:y.D.I2}}if(h.j(hW.lj)){if(I&&S&&S.QR(S.w[0])){P.b=a.m5;
|
|
P.data={o:$.Wk}}else{P.b=a.m5;P.data={o:$.mr,cU:q}}}if(h.j(hW.SX)){t.data={o:y.D.XO,nP:f6.z_}}if(h.j(hW.yg)){if(q){P.data=null;
|
|
if(I)t.data={o:y.D.mJ,DG:"finfo"};else M.data={HP:"inverse"}}else if(I)t.data={o:y.D.mJ,DG:"isize"}}if(h.j(hW.an)){P.b=a.m5;
|
|
P.data={o:$.Tp}}if(h.j(hW.Yq)){t.data={o:y.D.mJ,DG:"preferences"}}if(h.j(hW.l7)){if(q){P.b=a.m5;P.data={o:$.gL}}else t.data={o:y.D.mJ,DG:"newproject"}}if(h.j(hW.ij)){t.data={o:y.D.$u};
|
|
h.reset()}if(h.j(hW.yN)){t.data={o:y.D.app};h.reset()}if(h.j(hW.zn)){t.data={o:y.D.XO,nP:f6.gH}}if(h.j(hW.mL)&&W=="down"){if(q){if(I)t.data={o:y.D.mJ,DG:"saveforweb"};
|
|
else t.data={o:y.D.fs}}else t.data={o:y.D.qE}}if(h.j(hW.zy)){if(q){P.b=a.Fh;P.data={o:"again"}}else t.data={o:y.D.fX,b:a.Fh}}if(h.j(hW.BP)){t.data={o:y.D.lR}}if(h.j(hW.eP)){this.Mm.Us()}if(h.j(hW.a4)){t.data={o:y.D._E}}if(h.j(hW.vs)||h.j(hW.Ni)){P.b=a.m5;
|
|
P.data={o:$.Ar,s7:0};if(h.j(hW.vs))P.data.s7=q?3:2;else P.data.s7=q?0:1}if(h.j(hW.l$)&&S){var D=0;if(q)D++;
|
|
if(I)D+=2;P.b=a.Ck;P.data={o:"frompath",cM:[null,0,D]}}if(h.j(hW.ek)){M.data=a.JY._u(0)}if(h.j(hW.A6)){var R=this.o0.length;
|
|
if(R>1)this.Mm.Cw((this.Mm.d6()+1)%R)}if(h.j(hW.ob)){t.data={o:y.D.XO,nP:f6.Qc}}if(h.j(hW.NF)){t.data={o:y.D.XO,nP:f6.Vm}}a.xU.uo(h,P);
|
|
if(this.x2.lp()!=null&&this.x2.lp().HV()){}else{if(P.data)this.c(P);if(M.data)this.c(M);if(t.data)this.c(t)}}if(S&&S.w.length!=0){var O=S.g[S.w[0]],b=O.Yi;
|
|
if(b==1||b==3||p){var P=new em(y.E.u),w=b==3?O.$U(S).v:O.kX();if(w){var A=w.oz?S.t.aL.join("")=="111"?1:2:0;
|
|
P.b=a.vD;if(w&&h.j(hW.y$)&&A!=0){P.data={o:"mskView",k:0}}if(w&&h.j(hW.ad1)){P.data={o:"mskView",k:A==1?0:1}}if(w&&h.j(hW.a22)){P.data={o:"mskView",k:A==2?0:2}}if(P.data)this.c(P)}}}if(!h.j(hW.Q9)&&!I&&W=="down"){var P=new em(y.E.u),t=new em(y.E.W),g=this.K.map[this.kt.Kz],E=-1;
|
|
for(var Q=0;Q<this.K.keys.length;Q++)if(this.K.keys[Q]&&this.Nu(this.K.keys[Q]))E=Q;if(E!=-1){var j=null;
|
|
if(g.jp!=E)j=this.K.Y$[E];if(g.jp==E&&q)j=(g.ao0+1)%this.K.hQ[E].length;if(j!=null){var x=this.K.hQ[E][j].b.id,d=this.kt.asd;
|
|
if((d==null||d.indexOf(parseInt(x))!=-1)&&!this._K.kK)t.data={o:y.D.fX,b:x}}}if(h.j(hW.a4))t.data={o:y.D.XO,nP:f6.Ov,s7:2};
|
|
if(h.j(hW.nS))t.data={o:y.D.XO,nP:f6.Ov,s7:3};if(t.data)this.c(t);if(h.j(hW.a9h)&&S&&S.w.length==1){var O=S.g[S.w[0]];
|
|
P.b=a.m5;var L=O.Ox(0)||O.Ox(1)||O.Ox(2)||O.Ox(31);P.data={o:$.q9,kN:L?[[!1,!1,!1,!1],[0,1,2,31]]:[[!0],[31]]};
|
|
this.c(P)}var _=h.U1();if(k&&_!=-1&&this.Nu(hW.Pl[_])){var T=S.w[0],O=S.g[T],c=hW.kU(Math.round(100*O.opacity/255),_);
|
|
P.b=a.m5;P.data={o:$.Jn,kN:Math.round(255*c/100)};this.c(P)}var e=this.kt.nl;if(h.j(hW.A6)){t.data={o:y.D.QO,k:e==0?1:0};
|
|
this.c(t)}if(h.j(hW.bY)||h.j(hW.y$)&&e==2){var r=document.fullscreenElement!=null==(e==2);t.data={o:y.D.QO,k:e==0?2:0,gx:r};
|
|
this.c(t)}if(h.j(hW.OZ)&&!this._K.kK){P.b=a.Ck;P.data={o:"qmask"};this.c(P)}}if(!h.j(hW.Q9)&&!I&&q){var P=new em(y.E.u),t=new em(y.E.W);
|
|
if(h.j(hW.a6u))t.data={o:y.D.mJ,DG:"shortcuts"};if(h.j(hW.lO))t.data={o:y.D.mJ,DG:"fill"};if(h.j(hW.a8G))t.data={o:y.D.mJ,DG:"sel_feather"};
|
|
if(k&&(h.j(hW.jJ)||h.j(hW.wL))){var T=S.w[0],O=S.g[T],B=hd.wl,F=B.length,v=B.indexOf(O.oO);P.b=a.m5;
|
|
P.data={o:$.c9,kN:(v+F+(h.j(hW.jJ)?1:-1))%F};this.c(P)}if(t.data)this.c(t)}var P=new em(y.E.u),X=W=="down"&&(this.Nu(hW.UP)||this.Nu(hW.uf));
|
|
if((p||I)&&X){P=new em(y.E.gg);P.data=a.ut.XU(p?"BckC":"FrgC");this.c(P)}else if(S&&X&&!this._K.kK){if(S.q!=null){P=new em(y.E.gg);
|
|
P.data={HP:"delete"}}else if(S.w.length!=0){var O=S.g[S.w[0]];if(O.Yi==1)P.data={o:$.o5};else if(O.Yi==3)P.data={o:$.qj};
|
|
else P.data={o:$.Xr};P.b=a.m5}this.c(P)}if(this.x2.lp()!=null){if(h.j(hW.y$)){this.x2.lp().amj()}else{this.x2.lp().ok(S,this,this.kt,h)}}if(this.kt.Kz==null)return;
|
|
var g=this.vO();if(this.x2.lp()==null||this.K.pH)g.ok(S,this,this.kt,h)};gS.prototype.Nu=function(W){var h=this.EA,S=this.K.map[this.kt.Kz].b,top=this.x2.lp(),k=this.fO();
|
|
return h.j(W)&&!S.BQ(W,k)&&(top==null||!top.BQ(W,k))};gS.prototype.XX=function(W){var h=this.alC,S=this.gc;
|
|
this.kt.nl=W;var k=m.oq,p=this.oB.m;if(k(p))this.um.removeChild(p);var I=this.dK.m;if(k(I))this.um.removeChild(I);
|
|
var q=this.aJ.m;if(k(q))h.removeChild(q);var P=this.Mm.m;if(k(P))h.removeChild(P);var t=this.j6.m;if(k(t))h.removeChild(t);
|
|
if(W==0){this.um.appendChild(p);this.um.appendChild(I);S.appendChild(h);h.appendChild(q);h.appendChild(P);
|
|
h.appendChild(t)}if(W==1){this.um.appendChild(p);h.appendChild(P)}if(W==2){h.appendChild(P)}this.Mm.XX(W==2?1:0);
|
|
this.Cz()};gS.prototype.a38=function(W){if(this.cV())return 1;if(m.a7M()==0){this.kt={};this.UW=function(h,S){return Math.sqrt(h*S)}}return-1};
|
|
function hp(W){eS.call(this);if(W==null)return;this.s6=null;this.R_=null;this.m=m.O("div","sbar"+" "+W);
|
|
this.pO=new m.O("div","top");this.pO.innerHTML="> <";this.m.appendChild(this.pO);this.kC=1;this.pO.addEventListener("click",this.aoi.bind(this),!1)}hp.prototype=new eS;
|
|
hp.prototype.aoi=function(W){if(this.s6!=null&&this.s6<500&&this.kC==0)return;if(this.kC==0)this.BL(!0);
|
|
else this.collapse(!0)};hp.prototype.atr=function(W){this.kC=W;this.pO.innerHTML=this.kC==0?"< >":"> <"};
|
|
hp.prototype.alq=function(){var W=new em(y.E.W,!0);W.data={o:y.D.ar};this.c(W)};hp.prototype.BL=function(W){this.atr(1);
|
|
if(W)this.alq()};hp.prototype.collapse=function(W){this.atr(0);if(W)this.alq()};hp.prototype._Y=function(){return this.kC==1};
|
|
function dz(W,h){hp.call(this,"vcolumn");this.SA=W;this.a2U=h;this.we();this.xz=m.O("div");this.xz.setAttribute("style","cursor:default;");
|
|
this.art=this.a9$.bind(this);this.as4=this.apf.bind(this);this.a7G=this.ab4.bind(this);m.K$(this.m,this.art);
|
|
this.m.appendChild(this.xz);this.Pz=m.O("div");this.xz.appendChild(this.Pz);this.hf=-1;this.TS=m.O("div","float");
|
|
var S=this.cl=m.O("canvas"),k=12;S.width=S.height=k;var p=S.getContext("2d");p.fillStyle="rgba(0,0,0,0.5)";
|
|
p.moveTo(0,0);p.lineTo(k,k);p.lineTo(0,k);p.fill();this.cl.setAttribute("style","position:absolute; bottom:0; left:0; cursor:nesw-resize;");
|
|
m.NO(this.cl);m.K$(this.cl,this.art);this.i0=[];this.Oi=[];this.a96=null;this.O8=null;this.amD=0}dz.prototype=new hp;
|
|
dz.prototype.a9$=function(W){var h=W.target==this.cl;if(!h){if(W.target!=this.m)return;if(!this._Y())return}else{var S=this.i0[this.hf].TG;
|
|
S.style.pointerEvents="none";var k=S.getBoundingClientRect();this.a96=[k.width,k.height];this.Oi[this.hf]=[k.width,k.height]}W.stopPropagation();
|
|
this.O8=m.DJ(W,document.body);this.amD=this.SA;m.EB(document,this.as4);m.uE(document,this.a7G)};dz.prototype.apf=function(W){var h=m.DJ(W,document.body);
|
|
if(this._Y()){this.SA=this.amD+this.O8.x-h.x;this.we()}else{var S=this.Oi[this.hf],k=this.a96;S[0]=k[0]+this.O8.x-h.x;
|
|
S[1]=k[1]+h.y-this.O8.y}var p=new em(y.E.W,!0);p.data={o:y.D.ar};this.c(p)};dz.prototype.ab4=function(W){if(!this._Y()){var h=this.i0[this.hf].TG;
|
|
h.style.pointerEvents="auto"}m.WF(document,this.as4);m.TF(document,this.a7G)};dz.prototype.ap3=function(W){W.h("showFloat",this.abS,this);
|
|
W.h("hideFloat",this.Vw,this);this.i0.push(W);W.parent=this;this.xz.appendChild(W.m)};dz.prototype.ajm=function(Q){var W=this.i0[Q];
|
|
W.removeEventListener("showFloat",this.abS,this);W.removeEventListener("hideFloat",this.Vw,this);this.i0.splice(Q,1);
|
|
W.parent=null;this.xz.removeChild(W.m)};dz.prototype.a4u=function(){return this.i0.length};dz.prototype.WL=function(){for(var Q=0;
|
|
Q<this.i0.length;Q++)this.i0[Q].WL()};dz.prototype.abS=function(W){this.Vw(W);this.Pz.appendChild(this.TS);
|
|
this.hf=this.i0.indexOf(W.currentTarget);var h=this.i0[this.hf].TG;this.TS.appendChild(h);this.TS.appendChild(this.cl);
|
|
this.UW(this.s6,this.R_)};dz.prototype.Vw=function(W){this.WL();if(this.hf!=-1){this.Pz.removeChild(this.TS);
|
|
var h=this.i0[this.hf];if(h)this.TS.removeChild(h.TG);this.hf=-1}};dz.prototype.we=function(){this.m.setAttribute("style","width: "+this.SA+"px; padding-left:3px; cursor:ew-resize;")};
|
|
dz.prototype.BL=function(W){this.we();this.Vw();for(var Q=0;Q<this.i0.length;Q++)this.i0[Q].BL();hp.prototype.BL.call(this,W)};
|
|
dz.prototype.collapse=function(W){this.m.removeAttribute("style");for(var Q=0;Q<this.i0.length;Q++)this.i0[Q].collapse();
|
|
hp.prototype.collapse.call(this,W)};dz.prototype.UW=function(W,h){this.s6=W;this.R_=h;h-=6;var S=this.i0.length,k=this._Y();
|
|
if(S==0)return;W=this.SA;var p=h<400?h:400+(h-400)*.5,I=h;for(var Q=0;Q<S;Q++){var q=this.i0[Q],P=q.a2R(),t=this.Oi[Q];
|
|
q.UW(!k&&t?t[0]:W,k?Q==S-1?I:P:t?t[1]:p);I-=P}};function iC(W){eS.call(this);this.m=m.O("div");this.xz=null;
|
|
this.GU=0;this.FA=0;this.a5o=W;this.a8j=this._O.bind(this);this.abA=this.ZL.bind(this);this.apG=this.p9.bind(this);
|
|
this.sB=null;this.$j=null;this.Mp=null;m.K$(this.m,this.a8j);var h=this.m,k="<svg class=\"gsicon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">";
|
|
h.addEventListener("touchmove",m.q_,!1);this.a30=!0;this.LP=[];var S=this.aoE=m.O("div");S.setAttribute("style","float:right; padding:4px;display:none; position:relative;z-index:1;");
|
|
this.m.appendChild(S);var p=[[0,13,3],[0,13,4],[0,13,5],"Blog","API",k+"<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\"/>",k+"<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>",k+"<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 Q=0;Q<p.length;Q++){var I=new aA(p[Q]);this.LP.push(I);I.m.setAttribute("style","margin-left:"+(Q<7?4:0)+"px;cursor:pointer;");
|
|
I.h("click",this.Qx,this)}}iC.prototype=new eS;iC.prototype._=function(){var W=this.aoE;m.hP(W);for(var Q=0;
|
|
Q<this.LP.length;Q++){var h=this.LP[Q];if(Q<5)h._();W.appendChild(h.m)}};iC.prototype.Qx=function(W){var Q=this.LP.indexOf(W.currentTarget);
|
|
if(Q==0){if(window.showCap)window.showCap();return}var h=" issues learn blog api twitter facebook".split(" "),S=" //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(" "),k=window.ga;
|
|
if(k)k("send","event","Links",h[Q]);var p=new em(y.E.W,!0);p.data={o:y.D.k3,link:S[Q]};this.c(p)};iC.prototype._O=function(W){if(W.asj){W.preventDefault();
|
|
W.stopPropagation()}var h=window;m.EB(h,this.abA);m.uE(h,this.apG);h=this.xz;this.sB=new eC(parseInt(h.style.left),parseInt(h.style.top));
|
|
this.$j=m.DJ(W,this.m);this.Mp=h.getBoundingClientRect()};iC.prototype.ZL=function(W){var h=m.DJ(W,this.m),S=this.sB.x+h.x-this.$j.x,k=this.sB.y+h.y-this.$j.y,p=this.GU-this.Mp.width,I=this.FA-this.Mp.height;
|
|
if(this.a5o)this.xz.style.left=Math.min(0,Math.max(p,S))+"px";else this.xz.style.top=Math.min(0,Math.max(I,k))+"px";
|
|
if(S-10>0){this.$j.x=h.x-10;this.sB.x=0}if(S+10<p){this.$j.x=h.x+10;this.sB.x=p}};iC.prototype.p9=function(W){var h=window;
|
|
m.WF(h,this.abA);m.TF(h,this.apG)};iC.prototype.a2d=function(W){if(this.xz){this.m.removeChild(this.xz)}this.xz=W;
|
|
this.m.appendChild(W);W.style.position="absolute";if(this.a5o)W.style.left=0;else W.style.top=0};iC.prototype.UW=function(W,h){this.GU=W;
|
|
this.FA=h;this.m.setAttribute("style","position:relative; width: "+W+"px; height: "+h+"px; overflow:hidden; white-space: nowrap; ");
|
|
this.xz.style.left="0";this.xz.style.top="0";var S=this.xz.firstChild,k=this.aoE,p=S?S.firstChild.getBoundingClientRect().width+80:1e9,I=450,q=this.a30&&W>p+I,P=m.x4("SU\\VOAV"),t=k[ca.iR][P]=q?"":m.x4("][WK")};
|
|
function gR(){eS.call(this);this.Nm=null;this.jk=gR.yN;this.arE="";this.m=m.O("div","rightbar");this.Zv=[new dz(300),new dz(265,!0)];
|
|
this.i0=[new cg,new cg,new cg,new cg,new cg,new cg,new cg];this.aez=[]}gR.prototype=new eS;gR.prototype._=function(){var W=this.jk;
|
|
for(var Q=0;Q<W.length;Q++)W[Q].gh._()};gR.yN=[{gh:new cY,r2:3},{gh:new cF,r2:1},{gh:new hU,r2:4},{gh:new cw,r2:2},{gh:new gp(!0),r2:5},{gh:new ja,r2:0},{gh:new cx,r2:5},{gh:new bk,r2:3},{gh:new g_,r2:0},{gh:new cI,r2:3},{gh:new jc,r2:2},{gh:new g6,r2:4},{gh:new ae,r2:3},{gh:new gp(!1),r2:5},{gh:new ep,r2:2},{gh:new eq,r2:3},{gh:new aP,r2:1},{gh:new iy,r2:0},{gh:new a7,r2:5},{gh:new cL,r2:6,cX:!0},{gh:new e5,r2:6,cX:!0},{gh:new be,r2:6,cX:!0}];
|
|
(function(){var W=[{id:bn.zn.amx,name:"Gallery",url:"plugins/gallery.html",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACABAMAAAAxEHz4AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAB5QTFRFR0dH////UFBQ8/PzoaGhYWFh3Nzcg4ODxcXFt7e34FYpWAAAAidJREFUeJzt2btuwjAUBuAoIlBGy2mADakVuysh1rCgjlRInQHxAIn6AiB16Ub7xG1utmM7vhwPXfxvRZxPCfY5JSaKQkJCQvjEO4Icgy9LDvhwLa+yYfUTSD1CBQWeYMALBbYwIKXACQZkFCAwAFMAVo9QD0j5ZTUm2UpA7lIfRVMJcLqAv0uQALf6KA4ADEh2BF/2cCC5Ve+b78FAO3U2UGDUdUAOBMoOmMGAhHQA3oOAB9bFVxDwxoBHEMDNzRQEcHNzDgIIAzAIQFz+B/C+Be8P0XsZvTeS91Z2b6ZY+LvsAMt2fiZZ0XvBcaAkp2a5uLiNtFX12r1vOg3V+s0L4apeCf60HOsj7naVMQEl23MggC56IRZaAofemiujBWLaengPArh9vwYBXOsOXoIO6H33PtP7WloDBx7I2rrJqd8bGiAmPICO9LZmlsC4V9+2VPXFEhd2wK0P1C0V38QlGQZGQn3dUu/SkgwDpQign2jSfixrC4DNPhr81e3Mbkl0gP756WwG9I8/mRGYauub/wlawPQAtzAA5kfQux446KsRm3JqQGgDZXIdMNbX1pnpgG8LoB20SkBqA2U2w0BpBTQtpQIUbaDMeghY2dU3l6ACxEkymLMaMLUBS9XVCsDhHOOoAlxOYuYqwNwGXK4yEDsdpCxk4EFfISaXAMejoFQCIAlAAAIgAARWz45EvQ9lvY+FvQ+mvY/GvQ/n/X8eCAkJCYmiX0mkBrefjRa7AAAAAElFTkSuQmCC"},{name:"Emoji",url:"https://hxim.github.io/TwemojiPlugin/twemoji3.html",icon:"https://hxim.github.io/TwemojiPlugin/icon.svg"},{name:"QR Code Maker",url:"https://hxim.github.io/TwemojiPlugin/qrcode/qrcode.html",icon:"https://hxim.github.io/TwemojiPlugin/qrcode/icon.png"},{name:"3D Depth Viewer",url:"plugins/depth",icon:"---panels/3D"},{name:"3D Elements",url:"https://yikuansun.github.io/photopea-3delements/",icon:"https://yikuansun.github.io/photopea-3delements/icon.png"},{name:"Particle System",url:"https://yikuansun.github.io/photopea-particlesystem",icon:"https://yikuansun.github.io/photopea-particlesystem/icon.svg"}];
|
|
for(var Q=0;Q<W.length;Q++)gR.yN.push({gh:new iX(W[Q],100+Q),r2:6,cX:!0})}());gR.prototype.alU=function(W){for(var Q=0;
|
|
Q<W.length;Q++){var h=W[Q],S=new iX(h,"plg_"+h.name);this.jk.push({gh:S,r2:6});this.aez.push(S.bP)}this.rD()};
|
|
gR.prototype.IF=function(W,h){this.Nm=W;var S=this.jk;for(var Q=0;Q<S.length;Q++)S[Q].gh.IF(W,h);if(h==f6.kh||h==f6.W8)this.rD()};
|
|
gR.prototype.B_=function(W){var h=this.jk;for(var Q=0;Q<h.length;Q++)h[Q].gh.B_(W)};gR.prototype.UW=function(W,h){this.s6=W;
|
|
this.R_=h;this.rD();this.Zv[0].UW(W,h);this.Zv[1].UW(W,h)};gR.prototype.rD=function(){var W=this.Nm,h=this.s6,S=this.R_;
|
|
if(W==null||h==0)return;var k=W.FC.concat(this.aez),p=h<500||h<700&&h<S,I=JSON.stringify(k)+","+p;if(I!=this.arE){this.arE=I;
|
|
m.hP(this.m);var q=[];for(var Q=0;Q<this.Zv.length;Q++){var P=this.Zv[Q];q[Q]=P._Y();while(P.a4u()!=0)P.ajm(0);
|
|
P.BL()}var t=[];for(var Q=0;Q<this.i0.length;Q++){var M=this.i0[Q];M.BL();while(M.ant()!=0)M.iY(0);t.push(0)}for(var Q=0;
|
|
Q<k.length;Q++){var U=this.ag5(k[Q].toString());this.i0[U.r2].QJ(U.gh);this.i0[U.r2].Cw(0);t[U.r2]++}var i=[];
|
|
for(var Q=0;Q<t.length;Q++){if(t[Q]==0)continue;var z=Q<3||p?1:0,P=this.Zv[z];P.parent=this;P.ap3(this.i0[Q]);
|
|
i[z]=!0}for(var Q=0;Q<this.Zv.length;Q++)if(i[Q])this.m.appendChild(this.Zv[Q].m);this.Zv[0].collapse();
|
|
if(h<700||this.Nm.compact||!q[1]){this.Zv[1].collapse()}var D=new em(y.E.W,!0);D.data={o:y.D.ar};this.c(D)}};
|
|
gR.prototype.ag5=function(W){for(var Q=0;Q<this.jk.length;Q++)if(this.jk[Q].gh.bP==W)return this.jk[Q]};
|
|
gR.prototype.afo=function(W){var h=this.ag5(W);this.i0[h.r2].QJ(h.gh)};gR.prototype.Yo=function(W,h,S){var k=this.jk;
|
|
for(var Q=0;Q<k.length;Q++)k[Q].gh.Yo(W,h,S)};gR.prototype.Qb=function(W,h,S,k,p){var I=this.jk;for(var Q=0;
|
|
Q<I.length;Q++)I[Q].gh.Qb(W,h,S,k,p)};gR.prototype.Go=function(W,h,S,k,p){var I=this.jk;for(var Q=0;
|
|
Q<I.length;Q++)I[Q].gh.Go(W,h,S,k,p)};gR.prototype.he=function(W,h,S,k,p){var I=this.jk;for(var Q=0;
|
|
Q<I.length;Q++)I[Q].gh.he(W,h,S,k,p)};function gc(W,h){hp.call(this,"toolbar");this.ZO=null;this.ro=m.O("div","tools");
|
|
this.m.appendChild(this.ro);this.Vk=null;this.akB=h;this.iQ=null;this.a6q=-1;this.aan={};this.K=null;
|
|
this.WH=null;this.e8=null;this.Ff=null;this.PW(W);this.vn=new iN;this.vn.m.style.marginTop="5px";this.vn.m.style.marginBottom="3px";
|
|
this.vn.parent=this;this.bx=new aA(m.NM("lrs/mask"),!1,[6,6,1]);this.bx.h("click",function(I){var q=new em(y.E.u,!0);
|
|
q.b=a.Ck;q.data={o:"qmask"};this.c(q)},this);var S=new ce(null,["Ctrl","Alt","Shift","No Touch"],!0,null,null,!0);
|
|
S.h(y.E.l,this.apu,this);var k=m.O("span","rangecont form padded");k.appendChild(S.m);var p=document.body;
|
|
this.a99=[!1,!1,!1,!1];this.Hv=new aA("\u2328",!1,"Virtual Keys");this.Hv.h("click",function(I){var q=this.Hv.m.getBoundingClientRect();
|
|
k.setAttribute("style","position:absolute; top:"+(q.top-40)+"px; left: "+(q.left+q.width+4)+"px; width:120px; z-index:2; ");
|
|
if(m.oq(k))p.removeChild(k);else p.appendChild(k)},this)}gc.prototype=new hp;gc.prototype.apu=function(W){var h=W.target.B();
|
|
this.Hv.f(h[0]||h[1]||h[2]||h[3]);var S=new em(y.E.W,!0);for(var Q=0;Q<4;Q++){if(h[Q]!=this.a99[Q]){S.data={o:y.D.ap4,kK:h[Q],aiD:["ControlLeft","AltLeft","ShiftLeft","NoTouch"][Q]};
|
|
this.c(S)}}this.a99=h.slice(0)};gc.prototype.a2g=function(W,h){this.iQ=h;if(W==null||W.w.length==0||W.g[W.w[0]]==null)return;
|
|
var S=W.bx()!=null,k=W.t.aL,p=W.g[W.w[0]].Yi,I=p==1||p==3||S||k[0]+k[1]+k[2]==1;this.vn.a2s(I);this.bx.f(S)};
|
|
gc.prototype.anv=function(W,h){var S=W.length,k=[];for(var Q=0;Q<S;Q++)k[Q]=W[Q].slice(0);W=k;var p=[1,2,4,5,7,8,7,9,11,12,14,15,14,16,10,11,1,3,17,18,7,6,13,14],I=Math.min(p.length/2,S-h);
|
|
for(var Q=0;Q<I;Q++){var q=p[2*Q],P=p[2*Q+1];W[q]=W[q].concat(W[P]);W[P]=null}for(var Q=0;Q<W.length;
|
|
Q++)if(W[Q]==null){W.splice(Q,1);Q--}return W};gc.prototype.a4U=function(W,h){for(var Q=0;Q<h.length;
|
|
Q++)for(var S=0;S<h[Q].length;S++)if(h[Q][S].b.id==W)return Q};gc.prototype.PW=function(W,h){this.ZO=W;
|
|
this.WH=[];this.e8=[];this.Ff=[];this.K=[];var S=W.hQ;if(h!=null&&this.akB)S=this.anv(S,h);if(this.Vk){var k=[],p=this.Vk.asd;
|
|
for(var Q=0;Q<S.length;Q++){var I=[];for(var q=0;q<S[Q].length;q++){var P=S[Q][q];if(p==null||p.indexOf(parseInt(P.b.id))!=-1)I.push(P)}if(I.length>0)k.push(I)}S=k}for(var Q=0;
|
|
Q<S.length;Q++){var t=[],M=this.WH.length,U=null,i=-1;for(var q=0;q<S[Q].length;q++){var P=S[Q][q].b,z=this.a4U(P.id,W.hQ),D=W.keys[z];
|
|
this.K.push(P);var R=new aI(P.name,D,P.P6,this.WH.length,Q,S[Q].length>1);this.WH.push(R);var O=this.aan[P.id];
|
|
if(O==null)O=0;if(O>i){i=O;U=R}R.h(y.E.l,this.P9,this);R.h("mover",this.N4,this);t.push({name:P.name,CS:P.P6,W2:D?D.Vp:""})}this.e8.push(U);
|
|
if(t.length==1)this.Ff.push(null);else{var b=new jv(t,null,!0);b.adY=M;b.jp=Q;this.Ff.push(b);b.h("select",this.a7V,this);
|
|
b.parent=this}}};gc.prototype.UW=function(W,h){var S=this.R_=h-11,k=32;if(1<m.F()&&m.F()<1.5)k=18+14*(1/m.F());
|
|
var p=39+23,I=Math.floor((S-p)/k),q=this.Vk;if(q==null)return;if(I!=this.a6q){this.a6q=I;this.PW(this.ZO,I);
|
|
this.tc(q.Kz)}var P=this.e8.length*k+p,t=Math.min(1,S/P);if(.75<=t){this.ro.setAttribute("style","width:34px; transform-origin: top left; transform: scale("+t+","+t+");");
|
|
this.m.setAttribute("style","height:"+(h-2)+"px; overflow:hidden;")}else{S-=4;this.ro.setAttribute("style","height: "+S+"px; width:"+Math.ceil(P/S)*34+"px");
|
|
this.m.setAttribute("style","")}};gc.prototype._=function(){for(var Q=0;Q<this.WH.length;Q++)this.WH[Q]._();
|
|
for(var Q=0;Q<this.Ff.length;Q++)if(this.Ff[Q])this.Ff[Q]._()};gc.prototype.P9=function(W){var h=new em(y.E.W,!0);
|
|
h.data={o:y.D.fX,b:this.K[W.id].id};this.c(h)};gc.prototype.a7V=function(W){var h=W.target.adY+W.target.ZN()[0];
|
|
this.WH[h].p9(null)};gc.prototype.N4=function(W){var h=this.iQ,S=new em(y.E.W,!0);S.data={o:y.D.dp};
|
|
this.c(S);var k=W.target,p=this.Ff[k.jp];if(p==null)return;var I=k.m.getBoundingClientRect(),S=new em(y.E.W,!0);
|
|
S.data={o:y.D.zS,gh:p,x:I.left+I.width+8,y:I.top};if(h==null||!(h.j(hW.zP)||h.j(hW.Q9)))this.c(S)};gc.prototype.tc=function(W){this.aan[W]=Date.now();
|
|
var h=-1;for(var Q=0;Q<this.K.length;Q++)if(this.K[Q].id==W)h=Q;for(var Q=0;Q<this.WH.length;Q++){var S=this.WH[Q];
|
|
S.apX(h==Q)}if(h==-1)return;this.e8[this.WH[h].jp]=this.WH[h];m.hP(this.ro);var k=this.e8;for(var Q=0;
|
|
Q<k.length;Q++){this.ro.appendChild(k[Q].m)}if(!this.akB)return;this.ro.appendChild(this.vn.m);if(this.R_>640)this.ro.appendChild(this.bx.m);
|
|
this.ro.appendChild(this.Hv.m)};gc.prototype.Yo=function(W,h){this.tc(h.Kz)};gc.prototype.IF=function(W,h){this.Vk=W;
|
|
if(h==f6.W8){this.PW(this.ZO);this.tc(W.Kz)}this.vn.a0d(W.Ps,W.lL)};function aI(W,h,S,k,p,I){eS.call(this);
|
|
this.sI=0;this.lK=this.ac4.bind(this);this.jp=p;this.c7=k;this.oT=W;this.a5k=h;this.ari=I;this.P6=S;
|
|
this.m=m.O("button","");this.m.innerHTML=m.NM(this.P6);if(this.ari){var q=m.O("img","gsicon");q.setAttribute("src",PIMG["tools/corner"]);
|
|
q.setAttribute("style","position:absolute; right:0; bottom:0; width:100%; height:100%;");this.m.appendChild(q)}this._();
|
|
m.K$(this.m,this._O.bind(this));this.m.addEventListener("click",this.p9.bind(this),!1);this.m.addEventListener("contextmenu",aI.xa,!1)}aI.prototype=new eS;
|
|
aI.xa=function(W){W.stopPropagation();W.preventDefault();return!1};aI.prototype._=function(){var W=this.a5k?" ("+this.a5k.Vp+")":"";
|
|
this.m.setAttribute("title",dq.get(this.oT)+W)};aI.prototype._O=function(W){this.sI=setTimeout(this.lK,160)};
|
|
aI.prototype.p9=function(W){clearTimeout(this.sI);var h=new em(y.E.l,!1);h.target=this;h.id=this.c7;
|
|
this.c(h)};aI.prototype.ac4=function(W){var h=new em("mover",!1);h.target=this;h.id=this.c7;this.c(h)};
|
|
aI.prototype.apX=function(W){this.m.setAttribute("class",W?"toolbtn active":"toolbtn")};function iE(){eS.call(this);
|
|
this.m=m.O("div","topbar");this.s5=m.O("span","");this.asZ=0;this.m.appendChild(this.s5);this.kH=null;
|
|
this.uB=null;this.Ex=[];this.FC=[];var W=this._O.bind(this);for(var Q=0;Q<iE.data.length;Q++){var h=m.O("button");
|
|
this.Ex.push(h);this.s5.appendChild(h);h.addEventListener("mouseover",W,!1);m.K$(h,W)}this.Lf=new aA([0,13,0],!1,null,!0);
|
|
this.Lf.h("click",this.RU,this);this.m.appendChild(this.Lf.m);this.z8=new aA(m.NM("tools/zoom",null,"autoscale"),!1,[12,86]);
|
|
this.z8.h("click",this.RU,this);this.m.appendChild(this.z8.m);this.Wc=new aA("<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.Wc.h("click",this.RU,this);this.m.appendChild(this.Wc.m)}iE.prototype=new eS;iE.prototype.ak2=function(){if(this.FC.length!=0)return;
|
|
for(var Q=0;Q<iE.data.length;Q++){var W=iE.data[Q],h=new jv(W.items,W.En);h.parent=this;this.FC.push(h)}this._()};
|
|
iE.prototype._=function(){this.Lf._();this.z8._();this.Wc._();for(var Q=0;Q<this.Ex.length;Q++)this.Ex[Q].textContent=dq.get(iE.data[Q].name);
|
|
this.atn();for(var Q=0;Q<this.FC.length;Q++)this.FC[Q]._()};iE.prototype.RU=function(W){var h=new em(y.E.W,!0);
|
|
if(W.target==this.Lf)h.data={o:y.D.mJ,DG:"account"};else if(W.target==this.z8)h.data={o:y.D.I2};else h.data={o:y.D.QO,gx:!0};
|
|
this.c(h)};iE.prototype.akk=function(W,h){this.kH=W;this.uB=h};iE.prototype.IF=function(W,h){this.uB=W;
|
|
if(h==f6.W8){var S=W.a1_;m.hP(this.s5);for(var Q=0;Q<this.Ex.length;Q++){if(S==null||S[Q]==1||S[Q]instanceof Array)this.s5.appendChild(this.Ex[Q]);
|
|
if(S!=null&&S[Q]instanceof Array){this.ak2();this.FC[Q].a6V(S[Q])}}this.m.removeChild(this.Lf.m);this.m.removeChild(this.z8.m);
|
|
this.m.removeChild(this.Wc.m);if(W.rC)this.m.appendChild(this.Lf.m);this.m.appendChild(this.z8.m);this.m.appendChild(this.Wc.m)}this.atn()};
|
|
iE.prototype.atn=function(W,h){var S=this.Lf,k=12255232;if(aM.VK())k=aM.w6()?43520:16755200;S.m.setAttribute("style","color:#ffffff; background-color:#"+N.fl(k))};
|
|
iE.prototype._O=function(W){this.ak2();var Q=this.Ex.indexOf(W.currentTarget),h=this.FC[Q];if(W.type=="mouseover"&&!m.oq(this.FC[this.asZ].m))return;
|
|
if(m.oq(h.m))return;W.asj=!0;this.asZ=Q;for(var Q=0;Q<iE.data.length;Q++)this.FC[Q].update(this.kH,this.uB);
|
|
var S=W.target.getBoundingClientRect(),k=new em(y.E.W,!0);k.data={o:y.D.zS,gh:h,x:S.left,y:S.top+S.height+2,aaO:!0};
|
|
this.c(k)};iE.ajW=function(W){var h=hW,S=h.Q9,k=h.YS,p=h.OM,I={name:[0,5],items:[{name:[7,0],W2:[S,h.D]},{name:[7,1],W2:[S,h.nS],P:function(P){return{P:P!=null&&P.q!=null}}},{name:[7,2],W2:[k,S,h.yg],P:function(P){return{P:P!=null&&P.q!=null}},PO:!0},{name:[7,11],N7:!0,P:function(P){return{P:P!=null&&P.w.length!=0&&!P.g[P.w[0]].rect.ZP()}}},{name:[7,13],N7:!0,P:function(P){return{P:P!=null&&P.w.length!=0&&!P.g[P.w[0]].rect.ZP()}},PO:!0},{name:[7,8],N7:!0},{name:[7,3],PO:!0,sub:[{name:[7,9],N7:!0,P:function(P){return{P:P!=null&&P.q!=null}}},{name:[19,3,0],N7:!0,P:function(P){return{P:P!=null&&P.q!=null}}},{name:[7,4],N7:!0,P:function(P){return{P:P!=null&&P.q!=null}}},{name:[7,5],N7:!0,P:function(P){return{P:P!=null&&P.q!=null}}},{name:[7,6],N7:!0,P:function(P){return{P:P!=null&&P.q!=null}},W2:"Shift+F6"}]},{name:[7,10],P:function(P){return{P:P!=null&&P.q!=null}},PO:!0},{name:[6,6,1],P:function(P){return{P:P!=null,ZX:P!=null&&P.bx()!=null}},W2:[h.OZ],PO:!0},{name:["VAR0 VAR1",[1,2],[17,2]]}],En:[{Y:y.E.gg,R:a.I6.tQ(!0)},{Y:y.E.gg,R:a.I6.tQ()},{Y:y.E.gg,R:{HP:"inverse"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"redge"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"magiccut"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"crange"}},{sub:[{Y:y.E.W,R:{o:y.D.mJ,DG:"sel_border"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"sel_smoothness"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"sel_expand"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"sel_contract"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"sel_feather"}}]},{Y:y.E.W,R:{o:y.D.fX,b:a.ec}},{Y:y.E.u,b:a.Ck,R:{o:"qmask"}},{Y:y.E.gg,R:{HP:"duplicate",b4:{classID:"null",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}}}]};
|
|
if(W){var q=I.items.length-1;I.items.splice(q-2,0,{name:[6,49],W2:[S,h.an],PO:!0});I.En.splice(q-2,0,{Y:y.E.u,b:a.m5,R:{o:$.Tp}});
|
|
I.items.splice(q-1,0,{name:[10,16],W2:[p,S,h.zy]});I.En.splice(q-1,0,{Y:y.E.W,R:{o:y.D.fX,b:a.Fh}})}return I};
|
|
iE.data=function(){var W=hW,h=W.Q9,S=W.YS,k=W.OM,p=function(U){return{P:U!=null&&U.w.length!=0}},I=function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].add.SoLd!=null}},q=[],P=[],t="none maxx avrg medn minn rang stdv summ vari".split(" "),M=[[22,5,0],[24,17,2],[24,3,0],[24,7,3],[24,17,3],[12,12],"Standard Deviation","Summation","Variance"];
|
|
for(var Q=0;Q<t.length;Q++){q.push({name:M[Q]});P.push({Y:y.E.u,b:a.m5,R:{o:$.iX,kN:t[Q]}})}return[{name:[0,0],items:[{name:[5,3],W2:[k,h,W.l7],title:[11,7],N7:!0},{name:[1,0],W2:[h,W.ij],N7:!0},{name:[1,11],N7:!0,P:function(U,i){return{P:U!=null}}},{name:["VAR0 VAR1",[1,0],[0,14]],PO:!0,sub:[{name:[1,5],N7:!0},{name:[11,0],N7:!0},{name:["PSD VAR0",[25,0]],N7:!0}]},{name:[1,1],PO:!0,sub:[{name:"PNG",W2:"Imgur.com",P:function(U,i){return{P:U!=null&&i.Q0}}},{name:"JPG",W2:"Imgur.com",P:function(U,i){return{P:U!=null&&i.Q0}}},{name:"PSD",W2:"Photopea.com",P:function(U,i){return{P:U!=null&&i.Q0&&!U.lN}}}]},{name:"Save ...",W2:[h,W.mL],P:function(U,i){var z=dq.get([1,2])+(U==null?"":U.I7?" ("+dq.get([6,7,1])+")":U.SF?" (Google Drive)":"");
|
|
return{P:U!=null&&(U.Hi!=null&&U.df=="psd"||U.I7!=null||U.qb!=null&&U.qb.Ts!=null||U.SF!=null||i.kj.save!=null),tM:z}}},{name:[1,3],P:function(U,i){return{P:U!=null&&!U.lN&&i.Q0}}},{name:["VAR0 PSD/PSB",[1,2]],N7:!0,P:function(U,i){return{P:U!=null&&!U.lN&&i.Q0}}},{name:[1,8],sub:function(){var U=hI.rz(0),i=[];
|
|
for(var Q=0;Q<U.length;Q++)i.push({name:U[Q],W2:"."+U[Q].toLowerCase()});i.push({name:[0,14],sub:function(){var U=hI.rz(1),i=[];
|
|
for(var Q=0;Q<U.length;Q++)i.push({name:U[Q],W2:"."+U[Q].toLowerCase()});return i}()});return i}()},{name:[1,4],N7:!0,P:function(U,i){return{P:U!=null}},PO:!0},{name:[1,9],N7:!0,P:function(U,i){return{P:U!=null}}},{name:"Export Color Lookup",N7:!0,P:function(U,i){return{P:U!=null}},PO:!0},{name:[1,14],N7:!0,P:function(U,i){return{P:U!=null}},PO:!0},{name:[1,10]}],En:[{Y:y.E.W,R:{o:y.D.mJ,DG:"newproject"}},{Y:y.E.W,R:{o:y.D.$u}},{Y:y.E.W,R:{o:y.D.$u,a8I:!0}},{sub:[{Y:y.E.W,R:{o:y.D.mJ,DG:"open_from_url"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"camera"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"templates"}}]},{sub:[{Y:y.E.W,R:{o:y.D.Az,t8:"png"}},{Y:y.E.W,R:{o:y.D.Az,t8:"jpg"}},{Y:y.E.W,R:{o:y.D.Az,t8:"psd"}}]},{Y:y.E.W,R:{o:y.D.qE}},{Y:y.E.W,R:{o:y.D.fs}},{Y:y.E.W,R:{o:y.D.mJ,DG:"savepsb"}},{sub:function(){var U=hI.rz(0),i=[];
|
|
for(var Q=0;Q<U.length;Q++)i.push({Y:y.E.W,R:{o:y.D.mJ,DG:"saveforweb",t8:Q}});i.push({sub:function(){var z=hI.rz(0).length,U=hI.rz(1),i=[];
|
|
for(var Q=0;Q<U.length;Q++)i.push({Y:y.E.W,R:{o:y.D.mJ,DG:"saveforweb",t8:z+Q}});return i}()});return i}()},{Y:y.E.W,R:{o:y.D.mJ,DG:"saveforweb",t8:4,aaF:!0}},{Y:y.E.W,R:{o:y.D.mJ,DG:"eassets"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"exlut"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"finfo"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"script"}}]},{name:[0,1],items:[{name:[2,8]},{name:[2,0],W2:[S,h,W.SG]},{name:[2,1],W2:[h,W.SG],PO:!0},{name:[2,11],W2:[S,h,W.bY],PO:!0,N7:!0,P:function(U,i){return{P:f4.aab(U)&&i.Kz!=a.Fh}}},{name:[5,0],W2:[h,W.a4]},{name:[5,1],W2:[h,W.ZU]},{name:[5,7],W2:[S,h,W.ZU]},{name:[5,2],W2:[h,W.BP],P:function(U,i){return{P:m.de()||i.La!=null||i.Tc!=null||i.acn!=null}}},{name:[2,2],P:function(U){return{P:U!=null&&U.q!=null}},W2:"Delete",PO:!0},{name:[2,3],P:function(U){return{P:U!=null}},N7:!0,W2:[S,W.lO]},{name:[14,9],P:function(U){return{P:U!=null}},N7:!0,PO:!0},{name:[10,48],P:function(U){return{P:U!=null&&U.xi(!1)}}},{name:[10,46],P:function(U){return{P:a.nj.zV(U)}}},{name:[10,16],W2:[k,h,W.zy]},{name:[2,4],sub:eY.at2()},{name:[2,10,1]},{name:[2,10,0],PO:!0},{name:[12,87],sub:[{name:[12,62],P:function(U){return{P:U!=null}}},{name:[9,3],P:function(U){return{P:U!=null}}},{name:[10,31],P:function(U){return{P:U!=null&&U.O4()[1].length!=0}}}]},{name:"Preset Manager",N7:!0},{name:[12,79],N7:!0,W2:[h,W.Yq]},{name:[1,13],N7:!0}],En:[{Y:y.E.u,b:a.pD,R:{o:"h_undoredo"}},{Y:y.E.u,b:a.pD,R:{o:"h_stepfwd"}},{Y:y.E.u,b:a.pD,R:{o:"h_stepbck"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"afw_fade"}},{Y:y.E.W,R:{o:y.D._E}},{Y:y.E.W,R:{o:y.D.Lu}},{Y:y.E.W,R:{o:y.D.Lu,H6:!0}},{Y:y.E.W,R:{o:y.D.lR}},{Y:y.E.gg,R:{HP:"delete"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"fill"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"stroke"}},{Y:y.E.W,R:{o:y.D.fX,b:a.Nv}},{Y:y.E.u,b:a.Ak,R:{o:"start",CD:"rigidTransform"}},{Y:y.E.W,R:{o:y.D.fX,b:a.Fh}},{sub:eY.ars()},{Y:y.E.gg,R:{HP:"align",b4:{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}}}},{Y:y.E.u,b:a.m5,R:{o:$.zI}},{sub:[{Y:y.E.W,R:{o:y.D.vI,nP:0}},{Y:y.E.W,R:{o:y.D.vI,nP:1}},{Y:y.E.W,R:{o:y.D.vI,nP:2}}]},{Y:y.E.W,R:{o:y.D.mJ,DG:"pmanager"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"preferences"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"locstor"}}]},{name:[0,2],items:[{name:[3],sub:function(){var U=[];
|
|
for(var i in bS.names){U.push({name:bS.names[i],N7:s[i]!=null,W2:bS.keys[i],PO:bS.Zm.indexOf(i)!=-1});
|
|
if(i=="selc"){U.push({name:["VAR0/VAR1",[19,6,0],[19,6,2]],N7:!0,PO:!0});U.push({name:[19,7,0],W2:[h,S,W.OE],P:function(i){return{P:i&&i.w.length!=0&&i.g[i.w[0]].add.SoLd==null}}})}}return U}()},{name:[4,16,0],P:function(U){return{P:U!=null&&U.xi(!1)}}},{name:[4,16,1],P:function(U){return{P:U!=null&&U.xi(!1)}}},{name:[4,16,2],P:function(U){return{P:U!=null&&U.xi(!1)}},PO:!0},{name:"Reduce Colors",P:function(U){return{P:U!=null&&U.xi(!1)}}},{name:[11,11],P:function(U){return{P:U!=null&&U.xi(!1)}},PO:!0},{name:[11,3],N7:!0,W2:[k,h,W.ZU]},{name:[11,10],N7:!0,W2:[k,h,W.yg]},{name:[2,4],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],P:function(U){return{P:U!=null&&U.q!=null}}},{name:[11,12,0],P:function(U){return{P:U!=null}},W2:[h,W.ek],N7:!0},{name:[11,12,2],P:function(U){return{P:U!=null}},PO:!0},{name:[2,12],P:function(U){return{P:U!=null&&U.xi(!1)}},N7:!0}],En:[{sub:function(){var U=[];
|
|
for(var i in bS.names){U.push({Y:y.E.u,b:a.AT,R:{o:"start",dv:i}});if(i=="selc"){U.push({Y:y.E.u,b:a.Ak,R:{o:"start",CD:"adaptCorrect"}});
|
|
U.push({Y:y.E.gg,R:{HP:"desaturate"}})}}return U}()},{Y:y.E.gg,R:{HP:"levels",b4:{classID:"Lvls",Auto:{t:"bool",v:!0}}}},{Y:y.E.gg,R:{HP:"levels",b4:{classID:"Lvls",AuCo:{t:"bool",v:!0}}}},{Y:y.E.gg,R:{HP:"levels",b4:{classID:"Lvls",autoBlackWhite:{t:"bool",v:!0},autoNeutrals:{t:"bool",v:!0}}}},{Y:y.E.W,R:{o:y.D.mJ,DG:"rcolors"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"vbitmap"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"csize"}},{Y:y.E.W,R:{o:y.D.mJ,DG:"isize"}},{sub:[{Y:y.E.gg,R:a.Q._o(!0,90)},{Y:y.E.gg,R:a.Q._o(!0,-90)},{Y:y.E.gg,R:a.Q._o(!0,-180)},{Y:y.E.gg,R:a.Q._o(!1,"Hrzn")},{Y:y.E.gg,R:a.Q._o(!1,"Vrtc")}]},{Y:y.E.u,b:a.ot,R:{o:"cropbysel",ajy:0}},{Y:y.E.W,R:{o:y.D.mJ,DG:"trim"}},{Y:y.E.gg,R:{HP:"revealAll",b4:{classID:"RvlA"}}},{Y:y.E.u,b:a.AT,R:{o:"start",dv:"aply"}}]},{name:[0,3],items:[{name:[5,3],sub:[{name:[0,3]},{name:[0,4]},{name:[6,49],W2:[h,W.an]}]},{name:[6,0],P:p,W2:[h,W.an]},{name:[11,4],P:p},{name:[5,4],P:p,PO:!0},{name:[11,6],PO:!0,P:p,sub:g2.Jx(!0)},{name:[6,48,1],sub:[{name:[6,48,0,0]},{name:[6,48,0,1]},{name:[6,48,0,2]}]},{name:[6,1],PO:!0,sub:g2.a5b()},{name:[6,2],sub:[{name:[6,4],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].kX()==null}}},{name:[6,5,0],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].kX()==null}}},{name:[6,5,1],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].kX()==null&&U.q!=null}}},{name:[6,5,2],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].kX()==null&&U.q!=null}}},{name:[6,5,3],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].kX()==null}},PO:!0},{name:[5,4],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].kX()!=null}}},{name:[5,8],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].kX()!=null&&U.xi(!1,!0)}}},{name:["VAR0/VAR1",[5,5],[5,6]],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].kX()!=null}}}]},{name:[6,3],sub:[{name:[6,4],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].add.vmsk==null}}},{name:[6,5,0],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].add.vmsk==null}}},{name:"Current Path",P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].add.vmsk==null}},PO:!0},{name:[5,4],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].add.vmsk!=null}}},{name:["VAR0/VAR1",[5,5],[5,6]],P:function(U){return{P:U!=null&&U.w.length!=0&&U.g[U.w[0]].add.vmsk!=null}}}]},jc.afd(!0),{name:[6,7,1],PO:!0,sub:[{name:[6,7,0]},{name:[6,36,4],P:I,sub:q},{name:[1,0],P:I,PO:!0},{name:"Turn into JPG"}]},{name:[6,8],P:jc.alg},{name:[6,34],PO:!0,P:function(U){if(U==null||U.w.length==0)return{P:!1};
|
|
var i=U.g[U.w[0]];return{P:i.add.lmfx!=null&&!i.vc()}}},{name:[6,9],PO:!0,W2:[h,W.lj]},{name:[6,55],PO:!0,sub:[{name:[6,56,0],W2:[S,h,W.Ni]},{name:[6,56,1],W2:[h,W.Ni]},{name:[6,56,2],W2:[h,W.vs]},{name:[6,56,3],W2:[S,h,W.vs]}]},{name:[6,58],sub:[{name:["Make Frames"]},{name:["Unmake Frames"]},{name:[18,5]}]},{name:[6,10],P:function(U){return{P:U!=null&&U.w.length==1&&U.w[0]!=0&&!U.g[U.w[0]].vc()}},W2:[h,W.E]},{name:[6,12,0],P:function(U){return{P:U!=null&&U.w.length!=0&&(U.w.length>1||U.g[U.w[0]].vc())}}},{name:[6,12,1]}],En:[{sub:[{Y:y.E.u,b:a.m5,R:{o:$.gL}},{Y:y.E.u,b:a.m5,R:{o:$.fg}},{Y:y.E.u,b:a.m5,R:{o:$.Tp}}]},{Y:y.E.u,b:a.m5,R:{o:$.T2}},{Y:y.E.W,R:{o:y.D.mJ,DG:"duplinto"}},{Y:y.E.u,b:a.m5,R:{o:$.Xr}},{sub:g2.XL(!0)},{sub:[{Y:y.E.u,b:a.kQ,R:{o:"newfill",ez:0}},{Y:y.E.gg,R:a.JR.XU(1)},{Y:y.E.gg,R:a.JR.XU(2)}]},{sub:g2.Yy()},{sub:[{Y:y.E.u,b:a.m5,R:{o:$.wD,VS:"RvlA"}},{Y:y.E.u,b:a.m5,R:{o:$.wD,VS:"HdAl"}},{Y:y.E.u,b:a.m5,R:{o:$.wD,VS:"RvlS"}},{Y:y.E.u,b:a.m5,R:{o:$.wD,VS:"HdSl"}},{Y:y.E.u,b:a.m5,R:{o:$.wD,VS:"Trns"}},{Y:y.E.u,b:a.m5,R:{o:$.o5}},{Y:y.E.u,b:a.m5,R:{o:$.kw}},{Y:y.E.u,b:a.m5,R:{o:$.XE}}]},{sub:[{Y:y.E.u,b:a.m5,R:{o:$.pR,ash:!1}},{Y:y.E.u,b:a.m5,R:{o:$.pR,ash:!0}},{Y:y.E.u,b:a.m5,R:{o:$.pR,ad3:!0}},{Y:y.E.u,b:a.m5,R:{o:$.BZ}},{Y:y.E.u,b:a.m5,R:{o:$.Ei}}]},{Y:y.E.u,b:a.m5,R:{o:$.Wk}},{sub:[{Y:y.E.gg,R:{HP:"newPlacedLayer"}},{sub:P},{Y:y.E.gg,R:{HP:"placedLayerEditContents",b4:{classID:"placedLayerEditContents"}}},{Y:y.E.u,b:a.m5,R:{o:$.sX}}]},{Y:y.E.gg,R:{HP:"rasterizeLayer",b4:{classID:"rasterizeLayer",null:fP.gj("Lyr",!0)}}},{Y:y.E.u,b:a.m5,R:{o:$.O0}},{Y:y.E.u,b:a.m5,R:{o:$.mr}},{sub:[{Y:y.E.u,b:a.m5,R:{o:$.Ar,s7:0}},{Y:y.E.u,b:a.m5,R:{o:$.Ar,s7:1}},{Y:y.E.u,b:a.m5,R:{o:$.Ar,s7:2}},{Y:y.E.u,b:a.m5,R:{o:$.Ar,s7:3}}]},{sub:[{Y:y.E.u,b:a.m5,R:{o:$.wU,s7:"makeframes"}},{Y:y.E.u,b:a.m5,R:{o:$.wU,s7:"unmakeframes"}},{Y:y.E.u,b:a.m5,R:{o:$.wU,s7:"merge"}}]},{Y:y.E.u,b:a.m5,R:{o:$.JD}},{Y:y.E.u,b:a.m5,R:{o:$.m7}},{Y:y.E.gg,R:{HP:"flattenImage"}}]},iE.ajW(!1),function(){var U={name:[0,6],items:[{name:[24,18,4],W2:[k,h,W.bY],PO:!0}],En:[{Y:y.E.u,b:a.Ak,R:{o:"applylast"}}]};
|
|
for(var Q=0;Q<hw.Rw.length;Q++){var i=hw.Rw[Q];if(i.EH!=null){U.items.push({name:hw.names[i.EH],N7:!0,PO:i.PO});
|
|
U.En.push({Y:y.E.u,b:a.Ak,R:{o:"start",CD:i.EH}});continue}var z={name:i.Gj,sub:[]};U.items.push(z);
|
|
var D={sub:[]};U.En.push(D);for(var R=0;R<i.qQ.length;R++){var O={name:hw.names[i.qQ[R]],N7:hw.QE(i.qQ[R])!=null};
|
|
z.sub.push(O);var b={Y:y.E.u,b:a.Ak,R:{o:"start",CD:i.qQ[R]}};D.sub.push(b)}}return U}(),{name:[0,7],items:[{name:[8,0],W2:[h,W.jJ]},{name:[8,1],W2:[h,W.wL]},{name:[20,3],W2:[h,W.dY]},{name:[20,2],W2:[h,W.hv],PO:!0},{name:"Screen Mode",PO:!0,sub:[{name:"Fullscreen",P:function(U,i){return{ZX:document.fullscreenElement!=null}},PO:!0},{name:"Standard",P:function(U,i){return{ZX:i.nl==0}}},{name:"Menu Bar and Canvas",P:function(U,i){return{ZX:i.nl==1}}}]},{name:[8,13],W2:[h,W.SX],P:function(U,i){return{ZX:i.H0}}},{name:[8,12],PO:!0,sub:[{name:[17,2],P:function(U,i){return{P:i.H0,ZX:i.dH.$C}}},{name:[8,9],P:function(U,i){return{P:i.H0,ZX:i.dH.mw}}},{name:[8,2],P:function(U,i){return{P:i.H0,ZX:i.dH.r4}},W2:[h,W.ob]},{name:[8,4],P:function(U,i){return{P:i.H0,ZX:i.dH.uv}},W2:[h,W.NF]},{name:[8,8],P:function(U,i){return{P:i.H0,ZX:i.dH.oF}}},{name:[8,11,0],P:function(U,i){return{P:i.H0,ZX:i.dH.BW}}}]},{name:[8,3],P:function(U,i){return{ZX:i.rx}},W2:[h,W.zn],PO:!0},{name:[8,5],P:function(U,i){return{ZX:i.j9}}},{name:[8,6],PO:!0,sub:[{name:[8,2],P:function(U,i){return{ZX:i.Xj[0]}}},{name:[8,4],P:function(U,i){return{ZX:i.Xj[1]}}},{name:[9,1],P:function(U,i){return{ZX:i.Xj[2]}}},{name:[8,11,0],P:function(U,i){return{ZX:i.Xj[3]}}},{name:[8,7],P:function(U,i){return{ZX:i.Xj[4]}}}]},{name:[11,15,2],P:function(U,i){return{P:U!=null,ZX:U!=null&&U.O$}}},{name:[11,15,0],P:function(U,i){return{P:U!=null}}},{name:[11,14],P:function(U,i){return{P:U!=null}},N7:!0},{name:[11,15,1],P:function(U,i){return{P:U!=null&&U.w.length!=0}},PO:!0},{name:[8,11,2],P:function(U,i){return{P:U!=null&&U.BW.length!=0}}}],En:[{Y:y.E.u,b:a.vD,R:{o:"zoom",R9:!0}},{Y:y.E.u,b:a.vD,R:{o:"zoom",R9:!1}},{Y:y.E.u,b:a.vD,R:{o:"adapt",k:"fitscr"}},{Y:y.E.u,b:a.vD,R:{o:"adapt",k:"pixel"}},{sub:[{Y:y.E.W,R:{o:y.D.QO,gx:!0}},{Y:y.E.W,R:{o:y.D.QO,k:0}},{Y:y.E.W,R:{o:y.D.QO,k:1}},{Y:y.E.W,R:{o:y.D.QO,k:2}}]},{Y:y.E.W,R:{o:y.D.XO,nP:f6.z_}},{sub:[{Y:y.E.W,R:{o:y.D.XO,nP:f6.ap}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.Da}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.Qc}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.Vm}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.Fe}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.tU}}]},{Y:y.E.W,R:{o:y.D.XO,nP:f6.gH}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.J3}},{sub:[{Y:y.E.W,R:{o:y.D.XO,nP:f6.bt,jY:0}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.bt,jY:1}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.bt,jY:2}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.bt,jY:3}},{Y:y.E.W,R:{o:y.D.XO,nP:f6.bt,jY:4}}]},{Y:y.E.u,b:a.M2,R:{o:"lockguides"}},{Y:y.E.u,b:a.M2,R:{o:"gids",Ir:[[],[]]}},{Y:y.E.W,R:{o:y.D.mJ,DG:"addguides"}},{Y:y.E.u,b:a.M2,R:{o:"gidsFromLayer"}},{Y:y.E.u,b:a.It,R:{o:"deleteAll"}}]},function(){var U={name:[0,8],items:[{name:[0,14],PO:!0,sub:[]}],En:[{sub:[]}]};
|
|
for(var Q=0;Q<gR.yN.length;Q++){var i=gR.yN[Q],z=function(){var D=i.gh.bP;return function(R,O){return{ZX:O.FC.indexOf(parseInt(D))!=-1}}}();
|
|
(i.cX?U.items[0].sub:U.items).push({name:i.gh.name,P:z});(i.cX?U.En[0].sub:U.En).push({Y:y.E.W,R:{o:y.D.QN,DG:i.gh.bP}})}return U}(),function(){var U={name:[0,14],items:[],En:[]},i={name:[0,9],sub:[]};
|
|
U.items.push(i);var z={sub:[]};U.En.push(z);var D=dq.a2N();for(var Q=0;Q<D.length;Q++){var R=D[Q],O=R.code,b=dq.GD(O);
|
|
i.sub.push({name:R.name,W2:O,P:function(w,A){return{ZX:this.W2==dq.U3()}}});z.sub.push({Y:y.E.W,R:{o:y.D.XO,nP:f6.pN,lang:b}})}i.sub.push({name:[0,12]});
|
|
z.sub.push({Y:y.E.W,R:{o:y.D.k3,link:"https://www.photopea.com/translate/"}});var i={name:[0,15],sub:[]};
|
|
U.items.push(i);var z={sub:[]};U.En.push(z);for(var Q=0;Q<hj.HC.length;Q++){i.sub.push({name:hj.HC[Q].name,P:function(w,A){return{ZX:this.name==hj.HC[A.cF].name}}});
|
|
z.sub.push({Y:y.E.W,R:{o:y.D.XO,nP:f6.CI,cF:Q}})}U.items.push({name:[0,17,6],P:function(w,A){return{P:A.dQ!=null}}});
|
|
U.En.push({Y:y.E.W,R:{o:y.D.aii}});U.items.push({name:[11,13]});U.En.push({Y:y.E.W,R:{o:y.D.mJ,DG:"shortcuts"}});
|
|
U.items.push({name:[0,16],P:function(w){return{ZX:n.O9,P:n.Cr}},PO:!0});U.En.push({Y:y.E.W,R:{o:y.D.a1V}});
|
|
U.items.push({name:"",P:function(w,A){return A.rC?{tM:"About Photopea",P:!0}:{tM:"",P:!1}}});U.En.push({Y:y.E.W,R:{o:y.D.mJ,DG:"aboutpp"}});
|
|
return U}()]}();function h7(){eS.call(this);this.m=m.O("div","");this.GU=0;this.FA=0;this.Nm=null;this.r2=m.O("div","");
|
|
this.r2.setAttribute("style","width:200em; height:100em; position:absolute;");this.eu=[];this.m8=[];
|
|
this.NI={}}h7.prototype=new eS;h7.prototype.FY=function(W){var h=Date.now(),S=[];if(W=="-")S=[new fL,new eN,new hc,new ek,new di,new gb,new ct,new aW,new fg,new bX,new cr,new cv,new dJ,new fQ,new fh,new g2,new cJ,new f1,new c5,new aR,new d7,new dl,new bl,new jw,new eM,new dj,new gz(!1),new gz(!0),new ew(0),new ew(1),new dZ,new ib,new jL,new e7,new hG,new fK,new aj,new ao,new ee,new dr("border",[7,9],"px"),new dr("smoothness",[19,3,0],"px"),new dr("expand",[7,4],"px"),new dr("contract",[7,5],"px"),new dr("feather",[7,6],"px"),new cl(0,"namewindow",[12,48]),new cl(1,"cornerradius",[12,94,0],"px",!0,!0),new cl(1,"scaleeffects","Scale Effects","%",!0),new cl(1,"doczoom","Zoom","%",!0)];
|
|
else S=[new f4(W.slice(4))];this.agX(S);this.NI[W]=!0};h7.prototype.agX=function(W){var h=this.Nm;for(var Q=0;
|
|
Q<W.length;Q++){var S=W[Q];S.parent=this;this.m8.push(S);this.aT(S);S._();if(h)S.IF(h,f6.W8);S.h(y.E.UL,this.IG,this)}};
|
|
h7.prototype.UW=function(W,h){this.GU=W;this.FA=h;for(var Q=0;Q<this.m8.length;Q++)this.aT(this.m8[Q])};
|
|
h7.prototype._=function(){for(var Q=0;Q<this.m8.length;Q++)this.m8[Q]._()};h7.prototype.lp=function(){return this.eu.length==0?null:this.eu[this.eu.length-1]};
|
|
h7.prototype.HV=function(){for(var Q=0;Q<this.eu.length;Q++)if(this.eu[Q].HV())return!0;return!1};h7.prototype.a8J=function(W,h,S,k,p){var I=W.startsWith("afw_"),q=null;
|
|
if(!I&&!this.NI["-"])this.FY("-");if(I&&!this.NI[W])this.FY(W);if(typeof W=="object"){q=W;if(!q.a1m(y.E.UL,this.IG))q.h(y.E.UL,this.IG,this);
|
|
q.parent=this}else for(var Q=0;Q<this.m8.length;Q++)if(this.m8[Q].id==W)q=this.m8[Q];if(this.HV()&&q.HV()){alert("Finish the current action first");
|
|
return}if(!q.Ra(h))return;if(this.eu.indexOf(q)!=-1){if(W=="colorpicker")q.Yo(h,S,k,p);return}var P=this.eu.length-1;
|
|
if(P>=0)m.dT(this.eu[P].m,"wdisabled");this.m.appendChild(q.m);this.eu.push(q);this.aT(q);q.Yo(h,S,k,p)};
|
|
h7.prototype.aT=function(W){var h=this.GU,S=this.FA,k=W.X0(h,S),p;if(k!=null){p=k}else{k=new eC(0,0);
|
|
p=W.a6E();if(p==null){var I=this.eu.indexOf(W)+1;if(h<450||S<450)p=new eC(0,0);else p=new eC(I*150,I*150)}}W.m.style.left=p.x+"px";
|
|
W.m.style.top=this.m.offsetTop+p.y+"px";W.UW(this.GU-k.x*2,this.FA-k.y*2-34)};h7.prototype.IF=function(W,h){this.Nm=W;
|
|
for(var Q=0;Q<this.m8.length;Q++)this.m8[Q].IF(W,h)};h7.prototype.IG=function(W){var h=this.eu.pop();
|
|
this.m.removeChild(h.m);var S=this.eu.length-1;if(S>=0)m.Eg(this.eu[S].m,"wdisabled");if(this.r2.parentNode==this.m)this.m.removeChild(this.r2)};
|
|
window.onload=function(){document.body.appendChild(new gS().m)}}()) |