poly.js 32.6 KB
google.maps.__gjsload__('poly', 'var Hy="setPaths",Iy="depth";\nfunction Jy(a,b,c){for(var d=a[Hp],a=a.qb,e=[],f=a?[]:j,g=d[0]==d[d[B]-2]&&d[1]==d[d[B]-1],h=0,m=d[B]-2;h<m;h+=2){var p=d[h],r=d[h+1],v=d[h+2],z=d[h+3],C,J;a&&(C=a[h/2],J=a[h/2+1]);var V,ha;switch(b){case 0:V=p>=c;ha=v>=c;break;case 1:V=p<=c;ha=v<=c;break;case 2:V=r>=c;ha=z>=c;break;case 3:V=r<=c,ha=z<=c}!h&&V&&(e[q](p,r),a&&f[q](C));if(V!=ha){var xa;switch(b){case 0:case 1:xa=(c-p)/(v-p);e[q](c,r+xa*(z-r));break;case 2:case 3:xa=(c-r)/(z-r),e[q](p+xa*(v-p),c)}a&&f[q](C+xa*(J-C))}ha&&(e[q](v,z),a&&\nf[q](J))}g&&e[B]&&!(e[0]==e[e[B]-2]&&e[1]==e[e[B]-1])&&(e[q](e[0],e[1]),a&&f[q](a[a[B]-1]));return{path:e,qb:f}}\nfunction Ky(a,b,c,d){for(var e=j,f=c*c,g=0,h=d[B];g<h;++g){var m;m=a;var p=b,r=c,v=d[g],z=v[B];if(!z||0>=r)m=j;else{var C=0,J=1.01*r*r,V=[0,0],ha=ba,xa=ba,ya=ba,Y=ba,ta=ba,Cb=ba,Y=v[C++]-m,ta=v[C++]-p,Cb=(Y<-r?1:0)|(Y>r?2:0)|(ta<-r?4:0)|(ta>r?8:0),Hb=Y*Y+ta*ta;!Cb&&Hb<=J&&(J=Hb,V[0]=Y,V[1]=ta);for(;C<z;)if(ha=Y,xa=ta,ya=Cb,Y=v[C++]-m,ta=v[C++]-p,Cb=(Y<-r?1:0)|(Y>r?2:0)|(ta<-r?4:0)|(ta>r?8:0),!(ya&Cb)){Hb=Y*Y+ta*ta;!Cb&&Hb<=J&&(J=Hb,V[0]=Y,V[1]=ta);var ya=Y-ha,Jc=ta-xa,sb=ya*ya+Jc*Jc;if(!(1.0E-12>\nsb)){var Kd=Y*ya+ta*Jc;0>Kd||Kd>sb||(Hb-=Kd*Kd/sb,Hb<=J&&(J=Hb,sb=1-Kd/sb,V[0]=ha+ya*sb,V[1]=xa+Jc*sb))}}V[0]+=m;V[1]+=p;V[2]=J;m=J<=r*r?V:j}m&&m[2]<=f&&(f=m[2],e=m)}return e}function Ly(a,b,c){for(var d=0,e=0,f=c[B];e<f;++e)d+=Dr(a,b,c[e]);return!!(d&1)}function My(a){var b=a[B];b&&!(a[0]==a[b-2]&&a[1]==a[b-1])&&(a[q](a[0]),a[q](a[1]))}var Ny="toolbar";function Oy(a,b){for(var c=[],d=K(a),e=0;e<d;++e)c[q](b(a[e],e));return c}\nfunction Py(){var a=new Eh({clickable:k,fillOpacity:0});a[t]("map",this);a[t]("strokeColor",this);a[t]("strokeOpacity",this);a[t]("strokeWeight",this);a[t]("zIndex",this);this.j=a;var b=["center","freeVertexPosition","freeVertexIsCenter"],c=new Go(b,"return",Qy);Xq(c,b,this);a[t]("center",c,"return");this.e=c;b=["center","radius","planetRadius","freeVertexPosition","freeVertexIsCenter"];c=new Go(b,"return",P(this,this.b));Xq(c,b,this);a[t]("radius",c,"return");this.n=c}L(Py,W);\nPy[D].S=function(){this.j[Aj]();this.e[Aj]();this.n[Aj]()};function Qy(a,b,c){return c&&b||a}Py[D].b=function(a,b,c,d,e){return!e&&d&&a?uq(d,a,c):b};function Ry(a){this.b=a}L(Ry,W);mp(Ry[D],function(){var a=this.get("position");this.get("rawPosition")!=a&&this.set("rawPosition",a)});Ry[D].rawPosition_changed=function(){var a=this.get("rawPosition"),b=this.get("referencePosition");if(a&&b){var c=2==this.b?b.x:a.x,a=1==this.b?b.y:a.y,b=this.get("position");(!b||b.x!=c||b.y!=a)&&this.set("position",new T(c,a))}else this.get("position")!=a&&this.set("position",a)};function Sy(a,b,c,d,e,f){var g=this,h=$("div",a);Pi(h[F],X(c));$l(h);f&&lm(h,0.5);var f=new U(9,9),a=$("div",h),m=$("div",a);Vg(m,f);Pq(m,"#FFFFFF");lm(m,1);var p=$("div",m);Vg(p,f);lm(p,0);bj(m[F],"0");bj(p[F],"0");var r=new Ry(e);r[t]("position",g);e=new lr(h);e[t]("position",r,"rawPosition");e[t]("containerPixelBounds",g,"mapPixelBounds");e[t]("panningEnabled",g);e.set("draggableCursor",d);g.j=h;g.B=a;g.n=p;g.b=b;g.Fa=c;g.A=r;g.e=e;var v;g.U=[R[G](e,jl,function(){r.set("referencePosition",g.get("position"))}),\nR[G](e,hl,function(){r.set("referencePosition",j);r.set("rawPosition",r.get("position"))}),R[G](e,tl,function(){v=[R[E](b,sl,h),R[E](b,rl,h)];b.set("draggableCursor",d);b.set("active",i)}),R[G](e,rl,function(){b.set("active",k);v&&(O(v,R[jb]),v=j)}),R[E](e,ml,g),R[E](e,jl,g),R[E](e,hl,g),R[sc](h,Bk,function(){lm(p,0.3)}),R[sc](h,Ak,function(){lm(p,0)})]}L(Sy,W);Sy[D].S=function(){Wq(this.j);O(this.U,R[jb]);La(this.U,0);this.e[Aj]();this.e.S();this.A[Aj]();this.b.set("active",k)};\nmp(Sy[D],function(){var a=this.get("position");if(a){var b=5+this.Fa;cm(this.j,new T(a.x-b,a.y-b))}});Sy[D].color_changed=function(){var a=this.get("color");a&&(ij(this.B[F],X(1)+" solid "+a),Pq(this.n,a))};function Ty(a,b,c,d,e,f,g){function h(){m.j||R[s](m,Ny,{Na:k})}var m=this;m.L=a;m.B=b;m.A=c;m.O=$("div",e,of);m.j=d;R[sc](m.O,sl,Ud);this.b=f;m.Fa=g;m.e=[];a[zb](P(m,m.n));m.C=[R[G](a,Kf,function(b){m.n(a[bc](b),b);Uy(m,b+1);h()}),R[G](a,Lf,function(a){var b=m.e[a];m.e[Bc](a,1);m.F(b);Uy(m,a);h()}),R[G](a,Jf,function(b){m.e[b].Zb.set("latLngPosition",a[bc](b));h()})]}L(Ty,W);Ty[D].S=function(){O(this.C,R[jb]);La(this.C,0);O(this.e,P(this,this.F));La(this.e,0);R[Lb](this.O);Wq(this.O)};\nTy[D].zIndex_changed=function(){var a=this.get("zIndex")||0;this.j&&--a;jm(this.O,a)};\nTy[D].n=function(a,b){function c(a){var b={position:f.get("pixelPosition"),index:e[Sp]};R[s](d,a,b)}var d=this,e={};e.index=b;d.e[Bc](b,0,e);var f=new Cr;f[t]("projection",d);f[t]("zoom",d);f[t]("center",d,"projectionCenterQ");f[t]("offset",d);f.set("latLngPosition",a);e.Zb=f;var g=new Sy(d.O,d.b,d.Fa,d.B[b%d.B[B]],d.A[b%d.A[B]],d.j);g[t]("position",f,"pixelPosition");g[t]("color",d);g[t]("panningEnabled",d);g[t]("mapPixelBounds",d);e.b=g;g=[R[G](g,jl,function(){d[t]("freeVertexPosition",f,"latLngPosition");\nc(jl)}),R[G](g,hl,function(){d.L[wc](e[Sp],f.get("latLngPosition"));c(hl)}),R[E](g,ml,d)];e.Ga=g};Ty[D].F=function(a){a.b[Aj]();a.b.S();a.Zb[Aj]();O(a.Ga,R[jb]);La(a.Ga,0)};function Uy(a,b){for(var c=a.e[B];b<c;++b)a.e[b].index=b};function Vy(a,b,c){this.Fa=a;this.n=b;this.b=c;this.j=j;this.zc=k;this.e=new Mf;R[A](this.e,Jf,this,this.Xh)}L(Vy,W);var Wy=["pointer","row-resize","row-resize","col-resize","col-resize"],Xy=[0,2,2,1,1];I=Vy[D];I.S=function(){this.n.set("map",j);Yy(this);R[Lb](this.e)};ip(I,function(){Yy(this);this.j=Zy(this)});\nI.il=function(){var a=this.e;a[Fj]();var b=this.get("center"),c=this.get("radius");if(b&&N(c)){var d=this.get("planetRadius"),e=Dd(c/d),f;f=M(b.lat());if(d=c/d){var c=o.cos(d),d=o.sin(d),g=o.sin(f);f=o[xb](o.sin(o.acos((1-c)/d*o.tan(f)))*d*o.cos(f),c-g*g)}else f=0;f=Dd(f);a[q](b);c=b.lat()+e;90>c&&a[q](new Q(c,b.lng()));e=b.lat()-e;-90<e&&a[q](new Q(e,b.lng()));180>=f&&(e=b.lng()+f,f=b.lng()-f,a[q](new Q(b.lat(),e)),a[q](new Q(b.lat(),f)));this.zc||R[s](this,Ny,{Na:k})}};\nna(I,Vy[D].radius_changed=Vy[D].planetRadius_changed=Vy[D].il);\nfunction Zy(a){var b=a.get("panes");if(!b)return j;b=new Ty(a.e,Wy,Xy,k,b[op],a.b,a.Fa);b[t]("projection",a);b[t]("zoom",a);b[t]("projectionCenterQ",a);b[t]("panningEnabled",a);b[t]("mapPixelBounds",a);b[t]("color",a);b[t]("zIndex",a);b[t]("offset",a);var c=a.n;c[t]("freeVertexPosition",b);var d,e;R[G](b,jl,function(b){d=a.get("center");e=a.get("radius");c.set("freeVertexIsCenter",0==b[Sp]);c.set("map",a.get("map"))});R[G](b,hl,function(b){c.set("map",j);R[s](a,Ny,{Na:i,position:b[Qj],$c:function(){a.set("center",\nd);a.set("radius",e)}})});R[E](b,jl,a);R[E](b,hl,a);R[E](b,ml,a);return b}function Yy(a){var b=a.j;b&&(b[Aj](),b.S(),R[Lb](b),a.j=j)}I.Xh=function(a){var b=this.e[bc](a);if(0==a)zl(this,function(){this.zc=i;this.set("center",b);this.zc=k},0);else{var c=uq(this.get("center"),b,this.get("planetRadius"));zl(this,function(){this.zc=i;this.set("radius",c);this.zc=k},0)}};function $y(a){var b=new kr([sl,rl]);Xq(b,["offset","panes","projectionTopLeft","size"],a);R[G](b,sl,Ud);R[G](b,rl,Ud);return b};function az(a,b,c){function d(){a.get("editable")?bz(a,b,c):(cz(a),R[s](a,Ny,{Na:k}))}a.editable_changed=d;d()}\nfunction bz(a,b,c){if(!a.j){var d=new or(a,i);a.n=d;var e=new Py;e[t]("strokeColor",d);e[t]("strokeOpacity",d,"ghostStrokeOpacity");e[t]("strokeWeight",d);e[t]("center",a);e[t]("radius",a);e[t]("planetRadius",c);e[t]("zIndex",a);a.A=e;var f=b.N();a.e=$y(f);e=new Vy(Wl()?9:0,e,a.e);e.set("map",b);e[t]("center",a);e[t]("radius",a);e[t]("planetRadius",c);e[t]("panes",f);e[t]("projection",b);e[t]("zoom",f);e[t]("projectionCenterQ",f);e[t]("panningEnabled",b,"draggable");e[t]("mapPixelBounds",f,"pixelBounds");\ne[t]("offset",f);e[t]("color",d,"strokeColor");e[t]("zIndex",a);a.j=e;R[G](e,jl,function(){a.set("capturing",i)});R[G](e,hl,function(){a.set("capturing",k)});R[E](e,ml,f);R[E](e,Ny,a)}}function cz(a){var b=a.j;b&&(b[Aj](),b.S(),R[Lb](b),delete a.j,a.e.S(),delete a.e,a.set("capturing",k),a.A[Aj](),a.A.S(),delete a.A,a.n.S(),delete a.n)};function dz(){var a=this;Ug[ic](a);var b=a.e=new Gh;b[t]("capturing",a);b[t]("cursor",a);b[t]("map",a);b[t]("strokeColor",a);b[t]("strokeOpacity",a);b[t]("strokeWeight",a);b[t]("fillColor",a);b[t]("fillOpacity",a);b[t]("clickable",a);b[t]("zIndex",a);b[t]("suppressUndo",a);var c=this.b=[];O(hr,function(d){c[q](R[E](b,d,a))});c[q](R[E](a,Ny,b))}L(dz,Ug);I=dz[D];na(I,Ug[D].P);I.radius_changed=Ug[D].P;I.planetRadius_changed=Ug[D].P;\nI.Z=function(){var a=this.e;if(a){var b=this.get("radius"),c=this.get("center");if(N(b)&&c)b/=this.get("planetRadius"),a[Hy](ez(c,b));else a[Hy]([])}};\nfunction ez(a,b){var c=fa(500),d=[c],e=M(a.lat()),f=M(a.lng()),g=o.cos(b),h=o.sin(b),m=o.cos(e),p=o.sin(e);if(1.0E-6<m)for(var r=0;500>r;++r){var v=2*o.PI*r/500,z=p*g+m*h*o.cos(v),C=o[zc](z),v=f+o[xb](o.sin(v)*h*m,g-p*z),v=Bd(v,-o.PI,o.PI);c[r]=new Q(Dd(C),Dd(v))}else{r=Dd(b);f=0<a.lat()?a.lat()-r:a.lat()+r;for(r=0;500>r;++r)c[r]=new Q(f,360*r/500)}e-b<-o.PI/2&&(c=[new Q(-90,-200,i),new Q(90,-200,i),new Q(90,-100,i),new Q(90,0,i),new Q(90,100,i),new Q(90,200,i),new Q(-90,200,i),new Q(-90,100,i),new Q(-90,\n0,i),new Q(-90,-100,i),new Q(-90,-200,i)],d[q](c));return d}I.S=function(){for(var a=this.b,b=0,c=a[B];b<c;++b)R[jb](a[b]);delete this.b;this.e[Aj]();delete this.e};function fz(a){var b=a.pe;b.b||(b.b=function(b){var d=b.vl=new Go(["mapType"],"planetRadius",Dh);d[t]("mapType",a.N());var e=b.Ag=new dz;e.set("map",a);e[t]("radius",b);e[t]("center",b);e[t]("capturing",b);e[t]("clickable",b);e[t]("cursor",b);e[t]("fillColor",b);e[t]("fillOpacity",b);e[t]("strokeColor",b);e[t]("strokeOpacity",b);e[t]("strokeWeight",b);e[t]("zIndex",b);e[t]("suppressUndo",b);e[t]("planetRadius",d);b.Ga=[];O(hr,function(a){b.Ga[q](R[E](e,a,b))});b.Ga[q](R[E](b,Ny,e));az(b,a,d)},gp(b,\nfunction(a){var b=a.Ag;b[Aj]();b.set("map",j);b.S();delete a.Ag;O(a.Ga,R[jb]);delete a.Ga;delete a.editable_changed;cz(a)}))};function gz(a,b,c,d){a.capturing_changed=function(){if(a.get("capturing"))if(a.get("clickable")==k){var e=a.A=new pr;e[t]("draggableCursor",a,"cursor");e.set("active",i);b[t]("cursor",e);rq(d,e)}else d.b=c,d.f=a;else a.A?(Dk(d.j,a.A),a.A[Aj](),b[mb]("cursor"),b.set("cursor",""),delete a.A):d.b==c&&d.f==a&&(d.b=j,d.f=j)}};function hz(a,b,c,d){var e=this;e.D=b;e.n=c;e.A=d;e.e={};e.f={};e.j=function(a){iz(e,this,a)};a.b=function(a){var b=a.Xc={style:jz(e.n,a),vc:kz(a)};lz(e,a);Fa(a,e.j);e.D.X(b)};gp(a,function(a){e.Ha(a)})}function iz(a,b,c){var d=Df(b);c in mz?(a.f[d]=b,nz(b)):a.e[d]=b;oz(a)}hz[D].Ha=function(a){var b=a.Xc;delete a.Xc;this.D[tb](b);delete a[Jb];nz(a);a=Df(a);delete this.e[a];delete this.f[a]};\nfunction oz(a){a.b||(a.b=Yd(function(){delete a.b;var b=a.e;a.e={};for(var c in b){var d=b[c],e=d.Xc;e.style=jz(a.n,d);e.Td&&e.Td()}b=a.f;a.f={};var f=a.D;for(c in b)d=b[c],e=d.Xc,f[tb](e),e.vc=kz(d),f.X(e),lz(a,d)}))}function lz(a,b){function c(){iz(e,b,"latLngs")}var d=b.get("latLngs");if(d){for(var e=a,f=d[oc](),g=0,h=f[B];g<h;++g){var m=f[g];m.kc=m.mc=m.lc=c}d.mc=d.lc=function(a,b){delete b.kc;delete b.lc;delete b.mc;c()};d.kc=c}}\nfunction nz(a){if(a=a.get("latLngs")){delete a.kc;delete a.mc;delete a.lc;for(var a=a[oc](),b=0,c=a[B];b<c;++b){var d=a[b];delete d.kc;delete d.mc;delete d.lc}}}var mz={latLngs:1,geodesic:1,symbols:1};function pz(){var a=this.b=$("div");jm(a,-202);im(a,"pointer");$l(a);Qq(a);this.n=Lq(qz,a,rz,sz);R[A](this,Ny,this,this.ej);R.T(a,Le,this,this.hj);R[sc](a,Bk,P(this,this.jd,tz));R[sc](a,Ak,P(this,this.jd,rz));R.T(a,tl,this,function(a){Wd(a);this.jd(uz)});R[sc](a,sl,Wd);R[sc](a,rl,Wd)}L(pz,W);I=pz[D];ip(I,function(){var a=this.b,b=this.get("panes");b?b[mj][Va](a):a[yc]&&Wq(a)});I.dd=function(){Qq(this.b);this.e=this.j=j};Fa(I,pz[D].dd);\nI.ej=function(a){if(a.Na){var b=a[Qj],c=a.$c,a=a.$b;this.jd(rz);cm(this.b,new T(b.x+vz.x,b.y+vz.y));this.j=c;this.e=a;fm(this.b)}else a.$b==this.e&&this.dd()};I.hj=function(a){Td(a);this.j();this.dd()};I.jd=function(a){Kq(this.n,sz,a)};var qz=El("undo_poly"),sz=new U(30,27),rz=of,tz=new T(30,0),uz=new T(60,0),vz=new T(10,-11);function wz(a){var b=this;b.b=a;R[G](a,Jf,function(c){R[s](b,Jf,c);var d=a[$b]();0==c&&1<d&&R[s](b,Jf,d)});R[G](a,Kf,function(c){R[s](b,Kf,c);var d=a[$b]();2==d?R[s](b,Kf,2):0==c&&1<d&&R[s](b,Jf,d)});R[G](a,Lf,function(c){R[s](b,Lf,c);var d=a[$b]();1==d?R[s](b,Lf,1):0==c&&1<d&&R[s](b,Jf,d)})}wz[D].getLength=function(){var a=this.b[$b]();1<a&&++a;return a};wz[D].getAt=function(a){this.b[$b]()==a&&1<a&&(a=0);return this.b[bc](a)};function xz(a,b,c){this.e=a;this.j=b;this.b=c;R[A](a,Jf,this,this.si);R[A](a,Kf,this,this.ag);R[A](a,Lf,this,this.ri);b=0;for(a=a[$b]();b<a;++b)this.ag(b)}L(xz,W);I=xz[D];I.gl=function(){var a=this.get("projection"),b=this.j;if(a)for(var c=this.e,d=c[$b](),e=this.get("geodesic"),f=0;f<d-1;++f)b[wc](f,yz(c[bc](f),c[bc](f+1),e,a,this.b));else b[Fj]()};I.geodesic_changed=Ni(xz[D],xz[D].gl);I.si=function(a){zz(this,k,a)};I.ag=function(a){zz(this,i,a)};\nfunction zz(a,b,c){var d=a.get("projection");if(d){var e=a.e,f=e[bc](c),g=a.j,h=a.get("geodesic");0<c&&g[wc](c-1,yz(e[bc](c-1),f,h,d,a.b));c<e[$b]()-1&&(a=yz(f,e[bc](c+1),h,d,a.b),b?g[fc](c,a):g[wc](c,a))}}I.ri=function(a){var b=this.get("projection");if(b){var c=this.e,d=this.j,e=this.get("geodesic");a<c[$b]()?(0<a&&d[wc](a-1,yz(c[bc](a-1),c[bc](a),e,b,this.b)),d[Ib](a)):0<a&&d[Ib](a-1)}};\nfunction yz(a,b,c,d,e){c?d=e(a,b,0.5):(180<o.abs(a.lng()-b.lng())&&(a=new Q(a.lat(),Bd(a.lng(),b.lng()-180,b.lng()+180),i)),a=d[ab](a),b=d[ab](b),d=d[Dj](new T((a.x+b.x)/2,(a.y+b.y)/2)));return d};function Az(a,b,c,d){this.Fa=a;this.A=b;this.b=c;this.C=d;this.j=[];this.e=[];this.B=[]}L(Az,W);Az[D].S=function(){this.A.set("map",j);Bz(this)};\nip(Az[D],Az[D].paths_changed=Az[D].suppressGhostControlPoints_changed=function(){var a=this;Bz(a);var b=a.get("paths"),c=a.get("panes");if(b&&c){var d=c[op];b[zb](function(b){a.j[q](Cz(a,b,d));a.get("suppressGhostControlPoints")||a.e[q](Dz(a,b,d))});var e=function(){R[s](a,Ny,{Na:k})};e();c=a.B;c[q](R[G](b,Kf,function(c){var g=a.get("suppressGhostControlPoints"),h=b[bc](c);a.j[Bc](c,0,Cz(a,h,d));g||a.e[Bc](c,0,Dz(a,h,d));e()}));c[q](R[G](b,Lf,function(b){var c=a.get("suppressGhostControlPoints");\na.n(a.j[b]);a.j[Bc](b,1);c||(a.n(a.e[b]),a.e[Bc](b,1));e()}));c[q](R[G](b,Jf,function(c){var g=a.get("suppressGhostControlPoints");a.n(a.j[c]);var h=b[bc](c);a.j[c]=Cz(a,h,d);g||(a.n(a.e[c]),a.e[c]=Dz(a,h,d));e()}))}});\nfunction Cz(a,b,c){var d=Ez(a,b,c,k),e=a.A,f;R[G](d,jl,function(c){var h=c[Sp];f=b[bc](h);var m=b[oc](),p=a.C,r=m[B];2>r?e.set("anchors",[]):(c=m[p&&0==h?r-1:h-1],h=m[p&&h==r-1?0:h+1],m=[],c&&m[q](c),h&&m[q](h),e.set("anchors",m));e[t]("freeVertexPosition",d);e.set("map",a.get("map"))});R[G](d,hl,function(c){e.set("map",j);R[s](a,Ny,{Na:i,position:c[Qj],$c:function(){b[wc](c[Sp],f)}})});return d}\nfunction Dz(a,b,c){var d=new Mf,e=a.C?new wz(b):b;S(ue,function(b){b=new xz(e,d,b.interpolate);b[t]("geodesic",a);b[t]("projection",a)});var f=Ez(a,d,c,i),g=a.A;R[G](f,jl,function(b){b=b[Sp];b=[e[bc](b),e[bc](b+1)];g.set("anchors",b);g[t]("freeVertexPosition",f);g.set("map",a.get("map"))});R[G](f,hl,function(c){var e=c[Sp];b[fc](e+1,d[bc](e));g.set("map",j);R[s](a,Ny,{Na:i,position:c[Qj],$c:function(){b[Ib](e+1)}})});return f}\nfunction Ez(a,b,c,d){b=new Ty(b,["pointer"],[0],d,c,a.b,a.Fa);b[t]("projection",a);b[t]("zoom",a);b[t]("projectionCenterQ",a);b[t]("panningEnabled",a);b[t]("mapPixelBounds",a);b[t]("color",a);b[t]("zIndex",a);b[t]("offset",a);R[E](b,jl,a);R[E](b,hl,a);R[E](b,ml,a);R[E](b,Ny,a);return b}Az[D].n=function(a){a[Aj]();a.S();R[Lb](a)};function Bz(a){var b=P(a,a.n);O(a.j,b);O(a.e,b);La(a.j,0);La(a.e,0);O(a.B,R[jb]);La(a.B,0)};function Fz(a,b,c){this.x=a;this.y=b;this.b=c}function Gz(a,b){return a.x*b.x+a.y*b.y+a.b*b.b}function Hz(a,b,c){c.x=a.y*b.b-a.b*b.y;c.y=a.b*b.x-a.x*b.b;c.b=a.x*b.y-a.y*b.x}Aa(Fz[D],function(a){return this.x==a.x&&this.y==a.y&&this.b==a.b});function Iz(a,b){var c=M(a[0]),d=M(a[1]),e=o.cos(c);b.x=o.cos(d)*e;b.y=o.sin(d)*e;b.b=o.sin(c)}function Jz(a,b){var c=o[xb](a.y,a.x);b[0]=Dd(o[xb](a.b,o[Bb](a.x*a.x+a.y*a.y)));b[1]=Dd(c)}\nfunction Kz(a,b,c){c.x=a.x+b.x;c.y=a.y+b.y;c.b=a.b+b.b;a=o[Bb](Gz(c,c));1.0E-12>a||(c.x/=a,c.y/=a,c.b/=a)};function Lz(a,b,c){function d(){g[J++]=m.qa[0];g[J++]=m.qa[1];f&&(h[v++]=m.Lc);p=m}var e=a[Hp],f=a.qb;if(!e[B])return a;var g=fa(e[B]),h=f?fa(f[B]):j,a=[],m,p=Mz();g[0]=p.qa[0]=e[0];g[1]=p.qa[1]=e[1];f&&(h[0]=p.Lc=f[0]);p.depth=0;Iz(p.qa,p.oc);for(var r=1,v=1,z=[],C=2,J=2;C<e[B]||z[B];)if(z[B]?m=z.pop():(m=Mz(),m.depth=0,m.qa[0]=e[C++],m.qa[1]=e[C++],f&&(m.Lc=f[r++]),Iz(m.qa,m.oc)),12<=od(p[Iy],m[Iy]))d();else{var V=new qf;V.H=pd(p.qa[0],m.qa[0]);V.I=od(p.qa[0],m.qa[0]);V.G=pd(p.qa[1],m.qa[1]);V.K=\nod(p.qa[1],m.qa[1]);if(cl(b,V)){var ha=Mz();Kz(p.oc,m.oc,ha.oc);Jz(ha.oc,ha.qa);ha.depth=od(p[Iy],m[Iy])+1;f&&(ha.Lc=(p.Lc+m.Lc)/2);var xa=V.G-1.0E-6,ya=V.K+1.0E-6,V=ha.qa;V[1]=Nz(xa,ya,V[1]);Oz(p.qa,m.qa,a);od(ld(ha.qa[0]-a[0]),ld(ha.qa[1]-a[1]))<=c?d():(z[q](m),z[q](ha))}else d()}return{path:g,qb:h}}function Oz(a,b,c){c[0]=(a[0]+b[0])/2;c[1]=(a[1]+b[1])/2}function Nz(a,b,c){for(;c<a;)c+=360;for(;c>b;)c-=360;return c}function Mz(){return{qa:[0,0],oc:new Fz(0,0,0)}};function Pz(a,b,c,d){b-=1;if(!(0>b)){var e=a[B],f=0;for(d(0);f<b;){var g=1<<e,h=e?a[e-1][f/g]:0,m=f+g;m>=b&&(m=b);e&&c(f,m,h)?--e:(d(m),f=m,f&g||++e)}}};function Qz(a,b,c){return function(d,e){if(0==d)return i;var f=a[d],g=a[e];return c?o[fb]((f-b)/c)!=o[fb]((g-b)/c):f<b&&b<=g}};var Rz={Al:"px",zl:"%"};function Sz(a){if(!a)return j;if("0"==a)return{value:0,Fd:"px"};for(var b in Rz){var c=Rz[b],d=la("(\\\\d+(?:\\\\.\\\\d+)?)"+c)[Za](a);if(d)return{value:Ei(d[1]),Fd:c}}return j};function Tz(a,b){var c=b[ab](new Q(0,-180,i)),d=b[ab](new Q(0,180,i)),e=360/o[Bb](Yq(c,d));return function(b,c){var d;"px"==b.Fd?d=b[wp]/a*e:(d=K(c),d=!d?0:b[wp]/100*c[d-1]);return d}};function Uz(a,b,c,d){var e=a.H,f=a.G,g=a.I,h=a.K;return function(a,p,r){var v=d[2*a],z=d[2*a+1],a=d[2*p],p=d[2*p+1],C=o.min(v,a)-r,J=o.min(z,p)-r,V=o.max(v,a)+r,ha=o.max(z,p)+r;C<=g&&e<=V&&J<=h&&f<=ha?r>b?r=i:(C=c[ab](new Q(v,z,i)),J=c[ab](new Q(a,p,i)),C=c[Dj](new T((C.x+J.x)/2,(C.y+J.y)/2),i),z=(z+p)/2,v=(v+a)/2-C.lat(),a=z-C.lng(),r=o[Bb](v*v+a*a)+r>b):r=k;return r}};function Vz(a,b,c,d){var e=Tz(c,d);return function(c,g,h,m){var p=c[Hp],r=c.qb,v=Uz(a,b,d,p),c=v;if(r)var h=e(h,r),m=e(m,r),z=Qz(r,h,m),c=function(a,b,c){return v(a,b,c)||z(a,b)};var C=[],J=r?[]:j;Pz(g,p[B]/2,c,function(a){C[q](p[2*a],p[2*a+1]);r&&J[q](r[a])});return{path:C,qb:J}}};function Wz(a,b,c){var d=a[Dj](c),a=a[Dj](new T(c.x+b,c.y+b));return o.min(ld(d.lat()-a.lat()),ld(d.lng()-a.lng()))};function Xz(a,b,c){b=this.D=1<<b;this.j=c;var d=rf((256*a.x-10)/b,(256*a.y-10)/b,(256*(a.x+1)+10)/b,(256*(a.y+1)+10)/b),a=new T(d.H,d.G),d=new T(d.I,d.K),e=c[Dj](a,i),f=c[Dj](d,i),g=pd(e.lat(),f.lat()),h=od(e.lat(),f.lat()),m=pd(e.lng(),f.lng()),e=od(e.lng(),f.lng()),f=(m+e)/2,p=Bd(f,-180,180),m=m+(p-f),e=e+(p-f),f=rf(g,m,h,e),g=new Q(g,m,i);c[ab](g,a);h=new Q(h,e,i);c[ab](h,d);d=new qf([a,d]);this.f=f;this.b=d;this.e=o.min(Wz(c,0.5/b,new T(this.b.H,this.b.G)),Wz(c,0.5/b,new T(this.b.I,this.b.K)));\nthis.n=Vz(this.f,this.e,b,c)}Ea(Xz[D],Rc("f"));\nfunction Yz(a,b,c,d,e){for(var f=[],g=0,h=b[B];g<h;++g){var m=b[g],m=m.f?a.n(m.b,m.f,d,e):{path:Nd(m.b[Hp]),qb:m.b.qb};if(m[Hp][B]){c&&(m=Lz(m,a.f,a.e));for(var p=a.j,r=m[Hp],v=new Q(0,0),z=new T(0,0),C=0,J=r[B];C<J;C+=2)Q[ic](v,r[C],r[C+1],i),z=p[ab](v,z),r[C]=z.x,r[C+1]=z.y;p=a.b;m=Jy(m,0,p.H);m=Jy(m,1,p.I);m=Jy(m,2,p.G);m=Jy(m,3,p.K);p=m[Hp];if(p[B]){f[q](m);p=m[Hp];m=a.D;r=a.b.H;v=a.b.G;z=0;for(C=p[B];z<C;z+=2)p[z]=(p[z]-r)*m-10,p[z+1]=(p[z+1]-v)*m-10}}}return f};function Zz(a,b,c){this.b=a;this.f=b;this.e=c}\nZz[D].n=function(a,b){var c=a.ta,d=j,e=new T(0,0),f=new T(0,0),g;this.b[zb](function(a){if(!d){g=1<<a[sk];var b=a.oa.y;f.x=256*Bd(a.oa.x,0,g);f.y=256*b;var b=e.x=c.x*g-f.x,h=e.y=c.y*g-f.y;0<=b&&256>b&&0<=h&&256>h&&(d=a)}});if(!d)return j;var h=[],m=d.pa,p;for(p in m)h[q](m[p]);h.reverse();h[kk](function(a,b){return b[Mp]-a[Mp]||0});m=j;p=b?15:0;for(var r=0,v=h[B];r<v;++r){var z=h[r],C=z.f;if(C[Xp]!=k){var J=z.e.Vd,V=Ky(e.x,e.y,C.hitStrokeWeight/2+p,z.b);if(V){m=J;c=a.ta=new T((V[0]+f.x)/g,(V[1]+f.y)/\ng);a.latLng=this.e(c);break}if(C.j&&!b&&Ly(e.x,e.y,z.b)){m=J;break}}}return m};Zz[D].j=function(a,b,c){if(a==Ak)this.f.set("cursor","");else if(a==sl){var d=c.get&&c.get("cursor");Gd(d)||(d="pointer");this.f.set("cursor",d)}R[s](c,a,new bl(b.latLng,b.b))};Vi(Zz[D],3);function $z(a,b,c){function d(){R[s](c,Ny,{Na:k,$b:a})}function e(){a.get("editable")?aA(a,b):(d(),bA(a))}a.editable_changed=e;e();a.L=R[G](a,Ny,function(b){a.get("suppressUndo")||(b.$b=a,R[s](c,Ny,b))});a.F=R[G](a,"suppressundo_changed",function(){a.get("suppressUndo")&&d()})}\nfunction aA(a,b){if(!a.C){var c=new or(a,a.j);a.n=c;var d=new qr;d[t]("strokeColor",c);d[t]("strokeOpacity",c,"ghostStrokeOpacity");d[t]("strokeWeight",c);d[t]("geodesic",a);d[t]("zIndex",a);a.B=d;var e=b.N();a.e=$y(e);d=new Az(Wl()?9:0,d,a.e,a.j);d.set("map",b);d[t]("paths",a,"latLngs");d[t]("panes",e);d[t]("projection",b);d[t]("zoom",e);d[t]("projectionCenterQ",e);d[t]("panningEnabled",b,"draggable");d[t]("mapPixelBounds",e,"pixelBounds");d[t]("offset",e);d[t]("color",c,"strokeColor");d[t]("zIndex",\na);d[t]("geodesic",a);d[t]("suppressGhostControlPoints",a);a.C=d;R[G](d,jl,function(){a.set("capturing",i)});R[G](d,hl,function(){a.set("capturing",k)});R[E](d,ml,e);R[E](d,Ny,a)}}function bA(a){var b=a.C;b&&(b[Aj](),b.S(),R[Lb](b),delete a.C,a.e.S(),delete a.e,a.set("capturing",k),a.B[Aj](),a.B.S(),delete a.B,a.n.S(),delete a.n)};function cA(a,b){this.b=a;this.e=b}L(cA,W);I=cA[D];aj(I,j);Qa(I,30);Ca(I,new U(256,256));Ja(I,function(a,b,c){c=c[wb]("div");Vg(c,this[Eb]);Ia(c[F],"hidden");var d=this.get("projection"),d=new Xz(a,b,d),e=d.getBounds(),f=this.e(c),g={};g.ga=e;g.oa=a;g.ea=c;g.f=f;g.pa={};g.e=d;Ua(g,b);c.ia=g;this.b.X(g);return c});Pa(I,function(a){var b=a.ia;a.ia=j;this.b[tb](b);Ki(a,"")});function dA(a,b,c,d){this.O=a;this.b=d;a[x]("dir","ltr");Ia(a[F],"hidden");c&&Vg(a,new U(b[u]-1,b[H]-1))}dA[D].Uf=function(a){var b=a.element=rr("gm_v:shape",this.O);this.b(b);Vg(b,new U(1,1));b.coordsize="1 1";b.coordorigin="0 0";var c=b[F];Yi(c,"absolute");c.top=bp(c,"0px");for(var c=a.b,d=[],e=0,f=c[B];e<f;++e)for(var g=c[e],h=0,m=g[B];h<m;h+=2)d[q](h?"l":"m"),d[q](o[w](g[h]),o[w](g[h+1]));d[q]("e");dp(b,d[Dc](" "));this.se(a)};dA[D].Hf=function(a){var b=a[kq];delete a[kq];Wq(b)};\ndA[D].se=function(a){var b=a.f,a=a[kq];Vi(a[F],N(b[Mp])?b[Mp]:"");if(b[qp]){var c;(c=a[Ob]("FILL")[0])||(c=rr("gm_v:fill",a));$o(c,b[qp]);$i(c,b[Qp])}else(c=a[Ob]("FILL")[0])&&Wq(c),a.filled=k;c=a[Ob]("STROKE")[0];c||(c=rr("gm_v:stroke",a),c.joinstyle="bevel");a=c;b[yp]&&b[Zp]?($o(a,b[yp]),$i(a,b[Op]),a.weight=X(b[Zp])):a.on=k};function eA(a,b){this.O=a;var c=this.b=bm(a)[wb]("canvas");qa(c,b[u]);Ta(c,b[H]);var d=c[F];Yi(d,"absolute");d.top=bp(d,"0px");c=this.e=c.context=c[Ip]("2d");c.lineCap="round";c.lineJoin="round";this.f={}}I=eA[D];I.Uf=function(a){this.f[Df(a)]=a;this.P()};I.Hf=function(a){delete this.f[Df(a)];this.P()};I.se=function(){this.P()};I.P=function(){var a=this;a.j||(a.j=Yd(function(){delete a.j;a.Z()}))};\nI.Z=function(){var a=fA(this);if(a[B]){this.b[yc]||this.O[Va](this.b);var b=this.e;b[Cp](0,0,256,256);for(var c=0,d;d=a[c];++c){var e=d.b;b[Dp]();for(var f=0,g;g=e[f];++f)if(g[B]){b[Gp](o[w](g[0]),o[w](g[1]));for(var h=2,m=g[B];h<m;)b[sp](o[w](g[h++]),o[w](g[h++]))}d=d.f;d[Qp]&&(fp(b,d[qp]),b.globalAlpha=d[Qp],b[Np]());d[Zp]&&(np(b,d[Zp]),ap(b,d[yp]),b.globalAlpha=d[Op],b[Lp]())}}else this.b[yc]&&this.O[ec](this.b)};\nfunction fA(a){var b=[],a=a.f,c;for(c in a)b[q](a[c]);b[kk](function(a,b){return a[Mp]-b[Mp]});return b};function gA(a,b,c){this.j=a;this.b=b;this.f=c}gA[D].e=function(a){switch(this.j){case 1:return new eA(a,this.b);case 2:return new dA(a,this.b,k,this.f);case 3:return new dA(a,this.b,i,this.f);default:return j}};function hA(a,b,c,d){var e=this;e.j=a;e.f=b;e.b=c;e.e=d;a.b=function(a){iA(e,a)};gp(a,function(a){delete a.Td;e.f[tb](a.ga);var a=a.vc,b=a.pa,c;for(c in b){var d=b[c],f=d.ia;f.f.Hf(d);delete f.pa[Df(d)]}a.pa={}});c.b=function(a){jA(e,a)};gp(c,function(a){e.e[tb](a.ga);var b=a.pa,c;for(c in b){var d=b[c];delete d.e.pa[Df(d)]}a.pa={}});var a=a.wa,f;for(f in a)iA(e,a[f]);c=c.wa;for(f in c)jA(e,c[f])}\nfunction iA(a,b){b.Td=function(){var a=b.vc.pa,c;for(c in a){var d=a[c];d.f=b[F];Vi(d,b[F][Mp]);d.ia.f.se(d)}};var c=b.vc.ga;c.$b=b;b.ga=c;a.f.X(c);for(var c=a.e[cq](c),d=0,e=c[B];d<e;++d)kA(b,c[d].ie)}function jA(a,b){var c=b.ga;c.ie=b;a.e.X(c);for(var c=a.f[cq](b.ga),d=0,e=c[B];d<e;++d)kA(c[d].$b,b)}function kA(a,b){var c=a.vc,d=Yz(b.e,c.b,c.geodesic,c.f,c.e),e=[];O(d,function(a){e[q](a[Hp])});if(e[B]){d={};d.b=e;d.f=a[F];Vi(d,a[F][Mp]);d.ia=b;d.e=c;var f=Df(d);c.pa[f]=d;b.pa[f]=d;b.f.Uf(d)}};function lA(a,b){return!a?j:Oy(a,function(a){var d={};if(50<=a[B]){for(var e=[],f=a[B]-2,g,h=2;h<f;h<<=1){for(var m=a[0],p=a[1],r=o[eb](f/(2*h)),v=fa(r),z=0,C=0,J=a[B]-1-h;z<J;){var z=z+h,V=a[z],ha=a[z+1],z=z+h;z>a[B]-2&&(z=a[B]-2);var xa=a[z],ya=a[z+1],Y=V-m,ta=ha-p,m=xa-m,Cb=ya-p,Hb=Y*m+ta*Cb,p=m*m+Cb*Cb;Hb>=p?(V=xa-V,ha=ya-ha,ha=V*V+ha*ha):0>=Hb?ha=Y*Y+ta*ta:(ha=Y*Cb-ta*m,ha*=ha,ha/=p+1.0E-16);ha=o[Bb](ha);g&&(ha+=o.max(g[2*C],g[2*C+1]||0));v[C++]=ha;m=xa;p=ya}C<r&&(v[C]=g?g[2*C]:0);g=v;e[q](v)}d.f=\ne}if(b){e=0;f=[0];g=2;for(h=a[B];g<h;g+=2)r=a[g]-a[g-2],v=a[g+1]-a[g-1],e+=o[Bb](r*r+v*v),f[q](e);e=f}else e=j;d.b={path:a,qb:e};e=g=ea;f=h=-ea;r=0;for(v=a[B];r<v;)z=a[r++],e=o.min(e,z),f=o.max(f,z),z=a[r++],g=o.min(g,z),h=o.max(h,z);a=new qf;a.H=e;a.I=f;a.G=g;a.K=h;d.ga=a;return d})};function mA(a){a[B]&&(a=nA(a,oA),a=nA(a,pA));return a}function nA(a,b){var c=[],d=new Fz(0,0,0),e=new Fz(0,0,0),f=new Fz(0,0,0),g=fa(a[B]);g[0]=a[0];g[1]=a[1];Iz(a,d);for(var h=2,m=2;h<a[B];){c[0]=a[h];c[1]=a[h+1];Iz(c,f);b(d,f,e)&&(Jz(e,c),g[m++]=c[0],g[m++]=c[1]);g[m++]=a[h++];g[m++]=a[h++];var p=d,d=f,f=p}return g}var qA=new Fz(0,0,1),rA=new Fz(0,0,0),sA=new Fz(0,0,0);\nfunction oA(a,b,c){if(0<a.b==0<b.b)return k;Hz(a,b,rA);Hz(rA,qA,c);c.b=0;if(1.0E-12>Gz(c,c))return k;0>Gz(c,a)+Gz(c,b)&&(c.x=-c.x,c.y=-c.y);return i}function pA(a,b,c){Hz(a,b,rA);Hz(qA,rA,sA);Hz(rA,sA,c);if(1.0E-12>Gz(c,c)||0<Gz(a,sA)==0<Gz(b,sA))return k;0>Gz(c,a)+Gz(c,b)&&(c.x=-c.x,c.y=-c.y,c.b=-c.b);return i};function tA(a,b,c){if(!b)return j;var d=[];b[zb](function(a){d[q](uA(a))});a&&O(d,My);if(c){a=0;for(b=d[B];a<b;++a)d[a]=mA(d[a])}O(d,function(a){if(a[B])for(var b=a[1],c=1;c<a[B]/2;++c){var d=a[2*c+1];if(180<o.abs(b-d)){var m=d<b?1:-1,p=a[2*(c-1)],r=a[2*c];a[Bc](2*c,0,r,d+360*m,r,d+450*m,90,d+450*m,90,b-450*m,p,b-450*m,p,b-360*m);c+=6}b=d}});return d}function uA(a){for(var a=a.b,b=a[B],c=fa(2*b),d=0,e=0;d<b;++d){var f=a[d];c[e++]=f.lat();c[e++]=f.lng()}return c};function vA(){}function kz(a){var b={},c=a.get("symbols"),d=!a.j&&!!c;d&&(b.f=Sz(c.offset)||wA,b.e=Sz(c.repeat)||xA);c=b.geodesic=a.get("geodesic");c=tA(a.j,a.get("latLngs"),c);d=b.b=lA(c,d);if(1==d[B])c=d[0].ga;else for(var c=new qf,e=0,f=d[B];e<f;++e){var g=c,h=d[e].ga;h&&(g.H=pd(g.H,h.H),g.I=od(g.I,h.I),g.G=pd(g.G,h.G),g.K=od(g.K,h.K))}b.ga=c;b.Vd=a;b.pa={};return b}var wA={value:100,Fd:"%"},xA={value:0,Fd:"px"};function yA(){var a=jr;this.f=ir;this.b=a}function jz(a,b){var c={},d=b.j,e=d?a.b:a.f;yd(d?zA:AA,function(a){c[a]=Fd(b.get(a),e[a])});c.j=d;d=b.get("zIndex")||0;Vi(c,1E3*d+Df(b)%1E3);c.strokeWeight=pd(c[Zp],20);c.hitStrokeWeight=c.hitStrokeWeight||c[Zp];if(d=b.get("symbols"))c.b=d.symbol,c.f=Fd(d.color,c[yp]),c.D=Fd(d.weight,c[Zp]),c.e=Fd(d[Zb],c[Op]);return c}var AA={clickable:1,hitStrokeWeight:1,strokeColor:1,strokeOpacity:1,strokeWeight:1},zA={fillColor:1,fillOpacity:1};xd(zA,AA);function BA(a){var b=a.ke;if(!b.b){var c=a.N(),d=new Ff;new hz(b,d,new yA,new vA);var e=rf(-100,-200,100,200),f=new Ff;new hA(d,new vr(e),f,new vr(e));var d=CA(),d=new gA(d,new U(256,256),km),d=P(d,d.e),g=new cA(f,d);g[t]("projection",a);var h=new Zz(f,c,function(b){return a[wj]()[Dj](b)});rq(a.n,h);S(ze,function(b){b.dc(a,g,"overlayLayer",3)});var m=new pz;m[t]("panes",c);m[t]("projection",a);m[t]("zoom",c);m[t]("projectionCenterQ",c);m[t]("offset",c);R[A](a,Le,m,m.dd);R[G](b,Re,function(b){$z(b,\na,m);gz(b,c,h,a.n)});R[G](b,Se,function(a){delete a.editable_changed;bA(a);R[s](m,Ny,{Na:k,$b:a});R[jb](a.L);delete a.L;R[jb](a.F);delete a.F;a.set("capturing",k);delete a.capturing_changed})}}function CA(){var a=0;Eq()?a=1:tr()&&(a=2==Z[y]&&8<=Z[lj]?3:2);return a};function DA(a,b,c){if(!a||!b||!c)return j;var d=c.lat(),e=c.lng(),c=b&1?d:a.$.b,f=b&2?e:a.aa.b,d=b&4?d:a.$.f,g=b&8?e:a.aa.f;if(c>d)var h=c,c=d,d=h;if(b&10&&!a.aa[uc](e)&&(h=ce(e,a.aa.b),a=ce(a.aa.f,e),b&2?h>a:a>h))h=f,f=g,g=h;return wl(c,f,d,g)};function EA(){var a=new Ih({clickable:k,fillOpacity:0});a[t]("map",this);a[t]("strokeColor",this);a[t]("strokeOpacity",this);a[t]("strokeWeight",this);a[t]("zIndex",this);this.e=a;var b=new Go(["bounds","freeControlPoint","freeVertexPosition"],"return",DA);b[t]("bounds",this);b[t]("freeControlPoint",this);b[t]("freeVertexPosition",this);a[t]("bounds",b,"return");this.b=b}L(EA,W);EA[D].S=function(){this.e[Aj]();this.b[Aj]()};function FA(a,b,c){this.Fa=a;this.C=b;this.b=c;this.n=this.B=j;this.j=new Mf;R[A](this.j,Jf,this,this.Eh);this.A=new Mf;R[A](this.A,Jf,this,this.Fh);this.e=k}L(FA,W);var GA=[12,6,9,3],HA=[1,2,4,8],IA=["ne-resize","nw-resize","se-resize","sw-resize"],JA=["row-resize","col-resize"],KA=[0],LA=[2,1];I=FA[D];I.S=function(){this.C.set("map",j);MA(this.B);this.get("suppressGhostControlPoints")||MA(this.n);R[Lb](this.j)};\nip(I,FA[D].suppressGhostControlPoints_changed=function(){MA(this.B);MA(this.n);this.n=j;var a=this.get("panes");a&&(this.B=NA(this,a,i),this.get("suppressGhostControlPoints")||(this.n=NA(this,a,k)))});\nlp(I,function(){var a=this.j,b=this.A,c=this.get("bounds");if(c){this.e=i;a[wc](0,c[ob]());a[wc](1,new Q(c.$.f,c.aa.b,i));a[wc](2,new Q(c.$.b,c.aa.f,i));a[wc](3,c[ac]());var a=c.$.sb(),d=c.aa.sb();b[wc](0,new Q(c.$.b,d));b[wc](1,new Q(a,c.aa.b));b[wc](2,new Q(c.$.f,d));b[wc](3,new Q(a,c.aa.f));this.e=k;R[s](this,Ny,{Na:k})}else a[Fj](),b[Fj]()});\nfunction NA(a,b,c){var d;d=c?new Ty(a.j,IA,KA,k,b[op],a.b,a.Fa):new Ty(a.A,JA,LA,i,b[op],a.b,a.Fa);d[t]("projection",a);d[t]("zoom",a);d[t]("projectionCenterQ",a);d[t]("panningEnabled",a);d[t]("mapPixelBounds",a);d[t]("color",a);d[t]("zIndex",a);d[t]("offset",a);var e=a.C,f=c?GA:HA,g;R[G](d,jl,function(b){g=a.get("bounds");b=b[Sp];e[t]("freeVertexPosition",d);e.set("freeControlPoint",f[b]);e.set("map",a.get("map"))});R[G](d,hl,function(b){e.set("map",j);R[s](a,Ny,{Na:i,position:b[Qj],$c:function(){a.set("bounds",\ng)}})});R[E](d,jl,a);R[E](d,hl,a);R[E](d,ml,a);return d}function MA(a){a&&(a[Aj](),a.S(),R[Lb](a))}I.Eh=function(a){OA(this,GA[a],this.j[bc](a))};I.Fh=function(a){OA(this,HA[a],this.A[bc](a))};function OA(a,b,c){a.e||(a.e=i,a.set("bounds",DA(a.get("bounds"),b,c)),a.e=k)};function PA(a,b){function c(){a.get("editable")?QA(a,b):(RA(a),R[s](a,Ny,{Na:k}))}a.editable_changed=c;c()}\nfunction QA(a,b){if(!a.B){var c=new or(a,i);a.n=c;var d=new EA;d[t]("strokeColor",c);d[t]("strokeOpacity",c,"ghostStrokeOpacity");d[t]("strokeWeight",c);d[t]("bounds",a);d[t]("zIndex",a);a.A=d;var e=b.N();a.e=$y(e);d=new FA(Wl()?9:0,d,a.e);d.set("map",b);d[t]("bounds",a);d[t]("panes",e);d[t]("projection",b);d[t]("zoom",e);d[t]("projectionCenterQ",e);d[t]("panningEnabled",b,"draggable");d[t]("mapPixelBounds",e,"pixelBounds");d[t]("offset",e);d[t]("color",c,"strokeColor");d[t]("zIndex",a);d[t]("suppressGhostControlPoints",\na);a.B=d;R[G](d,jl,function(){a.set("capturing",i)});R[G](d,hl,function(){a.set("capturing",k)});R[E](d,ml,e);R[E](d,Ny,a)}}function RA(a){var b=a.B;b&&(b[Aj](),b.S(),R[Lb](b),delete a.B,a.e.S(),delete a.e,a.set("capturing",k),a.A[Aj](),a.A.S(),delete a.A,a.n.S(),delete a.n)};function SA(){var a=this,b=a.e=new Gh;b[t]("capturing",a);b[t]("cursor",a);b[t]("map",a);b[t]("strokeColor",a);b[t]("strokeOpacity",a);b[t]("strokeWeight",a);b[t]("fillColor",a);b[t]("fillOpacity",a);b[t]("clickable",a);b[t]("zIndex",a);b[t]("suppressUndo",a);var c=this.b=[];O(hr,function(d){c[q](R[E](b,d,a))});c[q](R[E](a,Ny,b))}L(SA,W);\nlp(SA[D],function(){var a=this.e;if(a){var b=this.get("bounds");if(b){var c=b[ac](),d=b[ob](),b=b[oj]();a[Hy]([new Q(d.lat(),d.lng()),new Q(d.lat(),b.lng()),new Q(d.lat(),c.lng()),new Q(c.lat(),c.lng()),new Q(c.lat(),b.lng()),new Q(c.lat(),d.lng())])}else a[Hy]([])}});SA[D].S=function(){for(var a=this.b,b=0,c=a[B];b<c;++b)R[jb](a[b]);delete this.b;this.e[Aj]();delete this.e};function TA(a){var b=a.qe;b.b||(b.b=function(b){var d=b.Dg=new SA;d.set("map",a);d[t]("bounds",b);d[t]("capturing",b);d[t]("cursor",b);d[t]("clickable",b);d[t]("fillColor",b);d[t]("fillOpacity",b);d[t]("strokeColor",b);d[t]("strokeOpacity",b);d[t]("strokeWeight",b);d[t]("suppressUndo",b);d[t]("zIndex",b);var e=b.Ga=[];O(hr,function(a){e[q](R[E](d,a,b))});e[q](R[E](b,Ny,d));PA(b,a)},gp(b,function(a){var b=a.Dg;b[Aj]();b.set("map",j);b.S();delete a.Dg;O(a.Ga,R[jb]);delete a.Ga;delete a.editable_changed;\nRA(a)}))};function UA(){}UA[D].b=function(a){a.b&&a.b.pe[tb](a);var b=a.b=a[jc]();b&&a[gb]()!=k&&(fz(b),b.pe.X(a))};UA[D].f=function(a){a.b&&a.b.ke[tb](a);var b=a.b=a[jc]();b&&a[gb]()!=k&&(BA(b),b.ke.X(a))};UA[D].e=function(a){a.b&&a.b.qe[tb](a);var b=a.b=a[jc]();b&&a[gb]()!=k&&(TA(b),b.qe.X(a))};var VA=new UA;ff[Ee]=function(a){eval(a)};jf(Ee,VA);\n')