/*! * mantle - NAVER Maps API v3.10.5 - 2026-10-20 15:17:16 * * Copyright(c) 2026, NAVER corp, Team mantle */ !function(d,p){var l=d.document,_={},i=null;function R(){}R.prototype={constructor:R,__export:function(){return _}},(i=new R).onJSContentLoaded=null,i.jsContentLoaded=!1;for(var B="3.10.5",N=null,V=/map-latest\.js\b/,Z=/openapi\/maps3(\.max)?\.js\b/,F=l.getElementsByTagName("script"),Y="",U=F.length-1;0<=U;U--){var X=F[U].src;if(V.test(X)||Z.test(X)){Y=X;break}}if(F=null,Y=(Y||"").split("?")[1])for(var j=(Y=Y.split("&")).length-1;0<=j;j--)0===Y[j].indexOf("language=")&&(N=Y[j].replace("language=","").toLowerCase());function G(t){if(!Ft)if(Yt++,-1<["internal-dev","internal-test"].indexOf("production"))Ft=!0,Ut.length=0;else{var e=[[108,111,99,97,108,104,111,115,116],[49,50,55,46,48,46,48,46,49],[110,97,118,101,114,46,99,111,109],[109,111,100,111,111,46,97,116],[108,105,110,101,40,45,41,63,40,40,97,108,112,104,97,41,124,40,98,101,116,97,41,124,40,114,99,41,41,63,92,46,109,101],[110,97,118,101,114,99,111,114,112,46,99,111,109],[110,97,118,101,114,104,97,110,100,115,46,99,111,109],[108,105,110,101,99,111,114,112,46,99,111,109],[110,104,110,99,111,114,112,46,99,111,109],[110,104,110,110,101,120,116,46,111,114,103],[110,104,110,115,121,115,116,101,109,46,99,111,109],[115,112,97,99,101,99,108,111,117,100,46,107,114],[103,114,97,102,111,108,105,111,46,99,111,109],[99,111,110,110,101,99,116,46,111,114,46,107,114],[110,102,114,97,46,105,111],[119,104,97,108,101,115,112,97,99,101,46,105,111],[110,97,118,101,114,108,97,98,115,46,99,111,109],[110,98,112,45,99,111,114,112,46,99,111,109],[110,97,118,101,114,105,110,115,46,99,111,109],[110,116,115,45,99,111,114,112,46,99,111,109],[115,110,111,119,99,111,114,112,46,99,111,109],[110,105,116,115,45,99,111,114,112,46,99,111,109],[99,112,97,114,116,110,101,114,115,45,99,111,114,112,46,99,111,109],[105,110,45,99,111,109,109,115,46,99,111,46,107,114],[103,119,101,98,115,99,111,114,112,46,99,111,109],[115,101,97,114,99,104,115,111,108,117,116,105,111,110,115,46,99,111,46,107,114],[110,97,118,101,114,102,111,117,110,100,97,116,105,111,110,46,111,114,103],[116,101,99,104,45,115,116,97,114,116,117,112,46,107,114],[100,101,118,105,101,119,46,107,114],[110,97,118,101,114,122,45,99,111,114,112,46,99,111,109],[108,105,102,101,105,115,99,111,109,105,99,46,99,111,109],[107,114,101,97,109,99,111,114,112,46,99,111,109],[107,114,101,97,109,112,97,121,99,111,114,112,46,99,111,109],[109,117,110,112,105,97,99,111,114,112,46,99,111,109],[109,117,110,112,105,97,46,99,111,109],[97,114,116,105,99,108,101,46,109,101],[115,116,117,100,105,111,108,105,99,111,46,99,111,109],[110,115,98,99,46,99,111,46,107,114],[98,97,110,100,46,117,115],[49,48,46,49,55,55,46,49,54,49,46,49,52,55],[110,97,118,101,114,45,105,110,110,111,118,97,116,105,111,110,46,110,101,116],[119,111,114,107,115,109,111,98,105,108,101,46,99,111,109],[98,97,108,97,100,121,112,108,117,115,46,115,97],[119,97,121,115,49,46,99,111,109],[116,114,97,110,115,105,116,115,111,108,117,116,105,111,110,46,99,111,46,107,114]],i=!1,n=e,o=void 0;if(n){o=o||lt;for(var s=0,r=n.length;s (https://www.ncloud.com/support/question)"],ANDROID_ERROR_GUIDE:["\uc548\ub4dc\ub85c\uc774\ub4dc 9 \uc774\uc0c1\uc5d0\uc11c\ub294 HTTP \ud3c9\ubb38 \ud1b5\uc2e0\uc774 \uae30\ubcf8\uc801\uc73c\ub85c \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.","\uc571\uc5d0\uc11c \ub124\ud2b8\uc6cc\ud06c \ubcf4\uc548 \uad6c\uc131 (https://developer.android.com/training/articles/security-config) \uc744 \ud1b5\ud574 *.map.naver.com, *.map.naver.net \uc5d0 \ub300\ud55c \ud3c9\ubb38 \ud1b5\uc2e0\uc744 \ud5c8\uc6a9\ud574 \uc8fc\uc138\uc694."]},de={DEFAULT_TWO_LINE:["font-family:helvetica,dotum; font-size:14px;color:green;","font-family:helvetica,dotum; font-size:14px;"]},ge={NORMAL:"normal",TERRAIN:"terrain",SATELLITE:"satellite",HYBRID:"hybrid",DARK:"dark",DARK_TERRAIN:"dark_terrain"},fe=(_.TILE_TYPES=t,_.GET_STYLE_MAP_METADATA_URLS=function(t){var e=t?pt?"https://map.pstatic.net/nrb/styles/":"http://nrb.map.naver.net/styles/":pt?"https://nrbe.pstatic.net/styles/":"http://nrbe.map.naver.net/styles/",i=[e+"basic"+Gt+".json?fmt="+Wt,e+Ht+Gt+".json?fmt="+Wt,e+qt+Gt+".json?fmt="+Wt];return t&&(i.push(e+"dbasic"+Gt+".json?fmt="+Wt),i.push(e+Jt+Gt+".json?fmt="+Wt)),i},_.SSL=pt,_.IS_IN_HOUSE=!0,_.SOUTH_KOREA_AREA=[[123.97,38.05],[124.74,38.02],[125.17,37.64],[126.1,37.73],[126.35,37.86],[126.59,37.79],[127.13,38.35],[128.13,38.35],[128.51,38.72],[131.47,38.22],[132.06,37.7],[132.43,37.14],[131.72,37.02],[131.58,36.46],[131.65,36.21],[131.49,36.08],[130.04,35.44],[128.93,34.7],[128.36,33.62],[127.53,33.49],[125.34,32.01],[124.79,32.1],[122.78,35.72],[124.31,37.42],[123.97,38.05]],d.console||{info:function(t){},log:function(t){},warn:function(t){},error:function(t){}}),y={noop:function(){},isDefined:function(t){return t!==p},isNumber:function(t){return"number"==typeof t},isFloat:function(t){return Number(t)===t&&t%1!=0},isString:function(t){return"string"==typeof t},isFunction:function(t){return"function"==typeof t},isNull:function(t){return null===t},isElement:function(t){return!(!t||1!=t.nodeType)},hasValue:function(t){return y.isDefined(t)&&null!==t&&""!==t},isArray:Array.isArray?function(t){return Array.isArray(t)}:function(t){return t&&t instanceof Array&&t.constructor===Array},isEmptyObject:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},nearRange:function(t,e,i){return Math.max(Math.min(t,i),e)},forEach:function(t,e){if(t&&e)if(y.isArray(t))for(var i=0,n=t.length;i=p&&c.height>=u&&!(nr&&(a.length=r),a.lengtha.length;)a.push(h);a.unshift(_.console.headerStyle),s=t+s,Me?(i=s.split("%c"),fe.log(i.join(""))):fe.log.apply(fe,[s].concat(a))}catch(t){fe.log(o?e.join(" "):e)}}}};s.getMembers=function(t){var i={};return y.forEach(t.prototype,function(t,e){"constructor"!==e&&(i[e]=t)}),i},y.ClassExtend=s,_.easing={linear:function(t,e,i){return t*i+e},easeInQuad:function(t,e,i){return i*t*t+e},easeOutQuad:function(t,e,i){return-i*t*(t-2)+e},easeInCubic:function(t,e,i){return i*t*t*t+e},easeOutCubic:function(t,e,i){return i*(--t*t*t+1)+e},easeOutBounce:function(t,e,i){return t<1/2.75?i*(7.5625*t*t)+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e}},_.TransitionQueue=(r=[],Ee=null,{getQueue:function(){return r},addJob:function(t){return 1===r.push(t)&&this._run(),t},pop:function(){var t=r.pop();return 0===r.length&&this._stop(),t},removeJob:function(t){var e=_.getIndexOfElement(r,t);return-1=this.minY()&&t<=this.maxY()&&i<=e&&e<=n},hasBounds:function(t){var e=(t=_.box(t,b)).getMin(),t=t.getMax();return!(!this.hasPoint(e)||!this.hasPoint(t))},intersects:function(t){t=_.box(t,b);var e=this.minX(),i=this.maxX(),n=t.minX(),o=t.maxX();return this.minY()<=t.maxY()&&this.maxY()>=t.minY()&&e<=o&&n<=i},isInsidePolygon:function(t){for(var e,i=this.minX(),n=this.maxX(),o=this.minY(),s=this.maxY(),r=[new M(i,o),new M(i,s),new M(n,s),new M(n,o)],a=[],h=0,l=t.length;h=this.minY()&&t<=this.maxY();return t=t&&(i<=n?i<=e&&e<=n:n<=e&&e<=i)},hasLatLng:function(t){return t=_.box(t,E),this.hasPoint(t)},intersects:function(t){t=_.box(t,S);var e=this.minX(),i=this.maxX(),i=i=t.minY()&&e<=o&&n<=i},getCenter:function(){var t=this.minY()+Math.abs(this.maxY()-this.minY())/2,e=this.minX()+Math.abs((this.minX()>this.maxX()?360:0)+this.maxX()-this.minX())/2;return _.LatLng(t,e)},equals:function(t){return t=_.box(t,S),this.getMin().equals(t.getMin())&&this.getMax().equals(t.getMax())},getSW:function(){return this.getMin()},getNE:function(){return this.getMax()},minX:function(){return this._sw.lng()},minY:function(){return this._sw.lat()},maxX:function(){return this._ne.lng()},maxY:function(){return this._ne.lat()},south:function(){return this.minY()},west:function(){return this.minX()},north:function(){return this.maxY()},east:function(){return this.maxX()},extend:function(t){t=_.box(t,E);var e=this._sw,i=this._ne,n=t;return e._lat=this._min.y=Math.min(n.y,e.y),e._lng=this._min.x=Math.min(n.x,e.x),i._lat=this._max.y=Math.max(t.y,i.y),i._lng=this._max.x=Math.max(t.x,i.x),e.isEmpty()&&(this._sw=this._min=i.clone()),this},union:function(t){t=_.box(t,S);function e(t,e){var i=Math.abs(e.maxX()-t.minX());return 0=Math.max(e.x,i.x)||n.y<=Math.min(e.y,i.y)||n.y<=Math.min(e.y,i.y))&&(n.x<=Math.min(g.x,f.x)||n.x>=Math.max(g.x,f.x)||n.y<=Math.min(g.y,f.y)||n.y<=Math.min(g.y,f.y))?null:n);_&&l.push(_)}return l},gi=function(t,e,i,n){for(var o=0,s=[],r=[],a=t.length,h=0;h=t.minX&&e.maxY>=t.minY}function Pi(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function wi(t,e,i,n,o){for(var s,r,a=[e,i];a.length;)i=a.pop(),e=a.pop(),i-e<=n||(s=e+Math.ceil((i-e)/n/2)*n,function t(e,i,n,o,s){for(;ne.y!=n.y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o);return o}},_.RBush=function(t){this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},_.RBush.prototype={search:function(t){var e=this.data,i=[];if(Si(t,e))for(var n,o=this.toBBox,s=[];e;){for(var r=0;rthis._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(i,n,e)},_split:function(t,e){var i=t[e],n=i.children.length,o=this._minEntries,o=(this._chooseSplitAxis(i,o,n),this._chooseSplitIndex(i,o,n)),n=Pi(i.children.splice(o,i.children.length-o));n.height=i.height,n.leaf=i.leaf,yi(i,this.toBBox),yi(n,this.toBBox),e?t[e-1].children.push(n):this._splitRoot(i,n)},_splitRoot:function(t,e){this.data=Pi([t,e]),this.data.height=t.height+1,this.data.leaf=!1,yi(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,o,s,r,a=1/0,h=1/0,l=e;l<=i-e;l++){var c=vi(t,0,l,this.toBBox),p=vi(t,l,i,this.toBBox),u=(o=c,u=p,d=r=s=void 0,s=Math.max(o.minX,u.minX),r=Math.max(o.minY,u.minY),d=Math.min(o.maxX,u.maxX),o=Math.min(o.maxY,u.maxY),Math.max(0,d-s)*Math.max(0,o-r)),d=bi(c)+bi(p);ut||this.get("mapTypeMinZoom")>t||this.get("userMaxZoom")this._maxScale?(e=n-o,t=Math.pow(2,e)):sn.width)&&(t.x=t.x%n.width,t.x<0)&&(t.x=n.width+t.x),s.centerPoint)&&(s.centerPoint=t.clone()),s.projectionTopLeft=t.clone().sub(p,l),s.projectionBottomRight=t.clone().add(p,l)),this._fireEvents(s,o)},_fireEvents:function(t,e){var i,n=["projectionTopLeft","containerTopLeft","center","centerPoint","zoom"];t.centerPoint&&_.isDefined(t.zoom)&&this.set("bounds",this.calcBoundsBy(t.centerPoint,t.zoom),!0);for(var o=0;ot.width||e.y>t.height},panTo:function(t,i){var e,n,o,s,r;this.get("center").equals(t)||(o=this.get("mapSystemProjection"),e=this._trans.panto,n=o.fromPointToOffset(this.get("centerPoint")),o=o.fromCoordToOffset(t),(s=this).stopTransition(),this.__isFar(t)?(this._mapModel.setCenter(t),i.complete&&i.complete(),s.triggerIdle()):(O.trigger(this,"panning"),e||(e=new _.Transition({easing:"easeOutCubic"}),this._trans.panto=e),r=n.clone().round(),e.clearListeners(),e.addListener({progress:function(t){var e=M(t.progress.x,t.progress.y);e.sub(r).round(),s.set("instantTiling",!0),s.panBy(e),r.add(e),i.progress&&i.progress(t)},complete:function(){s._mapModel.setCenter(t),s.set("instantTiling",!1),i.complete&&i.complete(),s.triggerIdle()}}),e.run({x:n.x,y:n.y},{x:o.x,y:o.y},i||{})))},panToBounds:function(t,e,i){var n=this._mapModel.getFitZoomAndCenter(t);if(i){var o=this._mapModel.calcBoundsBy(n.centerPoint,n.zoom),s=this._mapModel.getBoundsWithMargin(t,i,n.zoom);for(n.center=s.getCenter(),n.centerPoint=this.get("mapSystemProjection").fromCoordToPoint(n.center);!1===o.hasBounds(s)&&(--n.zoom,o=this._mapModel.calcBoundsBy(n.centerPoint,n.zoom),!(n.zoom<=this.get("mapTypeMinZoom")||o.hasBounds(s))););}this.morph(n.center,n.zoom,e)},morph:function(t,e,i){i=i||{};var n=this.get("zoom"),o={duration:500,easing:"easeOutCubic"},n=(e=_.hasValue(e)?this._mapModel.getValidZoom(e-n):e)-n;if(e===p||0==n)return this.panTo(t,T(o,i));var e=this.get("mapSystemProjection"),s=Math.pow(2,n)-1,r=this.get("centerPoint").clone(),t=e.fromCoordToPoint(t),r=r.sub(t).div(s,s),t=t.clone().sub(r),r=e.fromPointToOffset(t);s<1&&(o.easing="eastInCubic"),this.zoomBy(n,r,T(o,i))},kineticPan:function(t,e){if(!t||!e)return this.stopKineticPan();var i,n,o,s=this._trans.kinetic;s&&(t=M(t.x-e.x,t.y-e.y),i=parseInt(Math.sqrt(t.x*t.x+t.y*t.y),10),i=_.nearRange(12*i,500,800),n=e.clone(),o=this,t.mul(5,5),t.x=_.nearRange(t.x,-500,500),t.y=_.nearRange(t.y,-500,500),n.sub(t),this.stopKineticPan(),this.stopTransition(),s.addListener({progress:function(t){t=M(t.progress.x,t.progress.y);o.panBy(e.clone().sub(t)),e=t.clone()},complete:function(){o.triggerIdle()}}),s.run({x:e.x,y:e.y},{x:n.x,y:n.y},{duration:i}))},stopKineticPan:function(){var t=this._trans.kinetic;t&&(t.isRunning()&&(t.stop(),this.triggerIdle()),t.clearListeners())},disableKineticPan_changed:function(t){this.stopKineticPan(),!1===t?this._trans.kinetic||(this._trans.kinetic=new _.Transition({easing:"easeOutCubic"})):this._trans.kinetic&&(this._trans.kinetic=null,delete this._trans.kinetic)},setZoom:function(t,e){t=Math.round(t);var i,n=this.get("zoom"),o=this._mapModel.getValidDeltaZoom(t-n);return!((t=n+o)===n||!this._mapModel.isValidZoom(t)||(e?((n=this._getZoomOrigin()||this._eventOrigin_px)||(n=this._mapModel.getCenterPixel(),this._eventOrigin_px=n),O.once(i=this,"zoomend",function(){i._eventOrigin_px=null,delete i._eventOrigin_px}),this.zoomBy(o,n,e)):(this.set("instantTiling",!0),t=this._getZoomOrigin()||this._mapModel.getCenterPixel(),this.zoomBy(o,t,!1)),0))},mapTypeMinZoom_changed:function(){var t;this._mapModel&&!1!==(t=this._mapModel.getFittableMinZoom())&&this.setZoom(t,!0)},mapTypeMaxZoom_changed:function(){var t;this._mapModel&&!1!==(t=this._mapModel.getFittableMaxZoom())&&this.setZoom(t,!0)},_onBeginDispatch:function(t){this._listeningEvents[t]=!0,(x.mobile&&"tap"===t||"click"===t)&&(this._listeningEvents.tap=!0,this._listeningEvents.click=!0)},_onStopDispatch:function(t){this._listeningEvents[t]=null,delete this._listeningEvents[t],(x.mobile&&"tap"===t||"click"===t)&&(this._listeningEvents.tap=null,delete this._listeningEvents.tap,this._listeningEvents.click=null,delete this._listeningEvents.click)},listenView:function(i){function t(t,e){return O.addListener(i,t,e?v(e,n):o)}var n=this,o=v(n.handleEvent,n);i.listen(),n._viewListeners=[t("click",n._onClick),t("rightclick",n._onRightClick),t("mousedown",n._onDown),t("mousemove"),t("mouseup",n._onUp),t("dblclick",n._onDblClick),t("mouseover",n._onOver),t("mouseout",n._onOut),t("dragready",n._onDragReady),t("drag",n._onDrag),t("dragend",n._onDragEnd),t("mousewheel",n._onWheel),t("keydown"),t("keytransition",n._onKeyTransition),t("keytransitionend",n._onKeyTransitionEnd),t("keyup"),t("touchstart"),t("touchmove"),t("touchend"),t("pinchstart",n._onPinchStart),t("pinch",n._onPinch),t("pinchend",n._onPinchEnd),t("twofingertap",n._onTwoFingerTap),t("doubletap",n._onDoubleTap),t("longtap",n._onLongTap),t("tiltstart",n._onTiltStart),t("tilt",n._onTilt),t("tiltend",n._onTiltEnd)]},unlistenView:function(){O.removeListener(this._viewListeners)},_onDown:function(t){this._mapView.toggleHand("closed"),this.handleEvent(t,"mousedown")},_onUp:function(t){this._mapView.toggleHand("open"),this.handleEvent(t,"mouseup")},_onClick:function(t){this.handleEvent(t,"click")},_onRightClick:function(t){this.handleEvent(t,"rightclick")},_initDrag:function(){this._down=null,this._curPoint=null,this._prevPoint=null,this._isMapDragging=null},_firePanning:function(t,e){var i=M(0,0),n=this._curPoint||this._startPoint;i.x=n.x-t.x,i.y=n.y-t.y,this._curPoint=t,this.panBy(i,e)},_onDragReady:function(t){t.which===L.MOUSE_RBUTTON||this._prevPinch||this.isTranRunning("pinch")||(this.kineticPan(null),t=t.pos(),this._down&&this._initDrag(),this._startPoint=M(t.pageX,t.pageY),this._prevPoint=[this._startPoint],this._down=!0)},_onDrag:function(t){if(this._down){var e=t.pos(),e=M(e.pageX,e.pageY);if(!this._isMapDragging){if(_.Math.distance(this._startPoint,e)<4)return;this._isMapDragging=!0,this.handleEvent(t,"dragstart")}2===this._prevPoint.length&&this._prevPoint.shift(),this._prevPoint.push(this._curPoint),this._firePanning(e,!!x.mobile),this.handleEvent(t,"drag")}},_onDragEnd:function(t){var e,i,n;this._down&&(e=t.pos(),e=M(e.pageX,e.pageY),n=(i=0===t.type.indexOf("touch")&&0===e.x&&0===e.y?(e=this._prevPoint.pop()||this._startPoint,this._prevPoint.pop()||this._startPoint):this._prevPoint.pop())?i.clone().sub(e):M(0,0),this._isMapDragging&&(-1===t.type.indexOf("touch")&&this._mapView.toggleHand("open"),this.get("disableKineticPan")||0===n.x&&0===n.y?(this._firePanning(e,!!x.mobile),x.mobile&&this._mapModel.update(null,this.get("centerPoint"),null),this.handleEvent(t,"dragend"),this.triggerIdle()):(this.handleEvent(t,"dragend"),this.kineticPan(i.clone(),e.clone()))),this._initDrag())},_getZoomOriginByPoint:function(t){var t=t.clone(),e=this._mapView.getContainerDivOffset(),i=w.getOffset(this._mapView.getElement());return t.sub(e).sub(i),t},_getZoomOriginByOption:function(){var t=this.get("zoomOrigin");return t&&this.get("bounds").hasPoint(t)?this.get("mapSystemProjection").fromCoordToOffset(t):null},_getZoomOrigin:function(t){return this._getZoomOriginByOption()||(t?this._getZoomOriginByPoint(M(t.pageX,t.pageY)):null)},_onDblClick:function(t){this.handleEvent(t,"dblclick"),this.get("disableDoubleClickZoom")||(t=this._getZoomOrigin(t),this.zoomBy(1,t,!0))},_onOver:function(t){this._isMapDragging&&this._overMap||(this._overMap=!0,this.handleEvent(t,"mouseover"))},_onOut:function(t){this._overMap=!1,this.handleEvent(t,"mouseout")},_onWheel:function(t){if(this.handleEvent(t,"mousewheel"),!this.get("scrollWheel")||L.isTouchStarted())return!1;t.stop();var e=_.now(),i=null!==this._wheelTime&&e-this._wheelTime<100,n="wheelDeltaY"in t?t.wheelDeltaY:"wheelDelta"in t?t.wheelDelta:null,n=null!==n&&Math.abs(n)<=6;i||n||(this._wheelTime=e,i=0e/2&&(o.x=-1*(e-o.x)):-o.x>e/2&&(o.x=+(e+o.x)),0n/2&&(o.y=-1*(n-o.y)):-o.y>n/2&&(o.y=+(n+o.y)),i.sub(o),t.startX_px=i.x,t.startY_px=i.y,this._basePx.x=i.x,this._basePx.y=i.y),t},_removeHiddenTiles:function(t,e){if(!(t.getLength()<=0))for(var i,n=e.length-1;0<=n;n--)i=e[n].tileIndex,t.getAt(i)&&t.removeAt(i)},_addShowingTiles:function(t,e){for(var i,n=0,o=e.length;ne.endXIndex,r=t.startYIndex;r<=t.endYIndex;r++){var a=re.endYIndex;s||a?(a=(o-t.startXIndex)*n+(r-t.startYIndex),i.push({tileIndex:a,xIndex:o,yIndex:r})):s||r!==e.startYIndex||(r=e.endYIndex)}return i},_isCoveredByDst:function(t,e){return t.startXIndex>=e.startXIndex&&t.startYIndex>=e.startYIndex&&t.endXIndex<=e.endXIndex&&t.endYIndex<=e.endYIndex},getIndexesRange:function(t,e){var i=this.get("mapSystemProjection"),n=this.get("containerTopLeft").clone().round(),o=(this.get("scale"),_.round(this.get("tileSpare"))),s=this._tileSize,r=s.width,s=s.height,a=this._halfSize.width,h=this._halfSize.height,l=_.floor(i.scaleUp(t.x,e)),i=_.floor(i.scaleUp(t.y,e)),t=_.floor(l/r),e=_.floor(i/s),c=a,p=a,u=h,d=h,a=(2*a%2==1&&(c-=.5,p+=.5),2*h%2==1&&(u-=.5,d+=.5),this._getCenterGap(l,"width")),h=this._getCenterGap(i,"height"),c=Math.round(c-a),p=Math.round(p-(r-a)),a=Math.round(u-h),u=Math.round(d-(s-h)),d=Math.max(_.round(o/2),0),h=Math.max(o-d,0),o={centerXIndex:t,centerYIndex:e,startXIndex:this._getEdgeIndex(t,c,-1,"width"),startYIndex:this._getEdgeIndex(e,a,-1,"height"),endXIndex:this._getEdgeIndex(t,p,1,"width"),endYIndex:this._getEdgeIndex(e,u,1,"height"),cx_px:l,cy_px:i};return 0!==d&&(o.startXIndex-=d,o.startYIndex-=d),0!==h&&(o.endXIndex+=d,o.endYIndex+=d),o.startX_px=_.round((o.startXIndex-t)*r+c-n.x),o.startY_px=_.round((o.startYIndex-e)*s+a-n.y),o},_getCenterGap:function(t,e){return(t%=this._tileSize[e])<0&&(t+=this._tileSize[e]),t},_getEdgeIndex:function(t,e,i,n){var o=this._divideAndCeil(e,this._tileSize[n]),e=this._needsExtraTile(e,o,n)?1:0;return Math.round(t+o*i+e*i)},_divideAndCeil:function(t,e){return t<0?0:Math.ceil(t/e)},_needsExtraTile:function(t,e,i){return e*this._tileSize[i]-t<("width"===i?this._baseForExtraTile_px.x:this._baseForExtraTile_px.y)},forEach:function(t){this.get("indexes").forEach(t)},getAt:function(t){return this.get("indexes").getAt(t)},getLength:function(){return this.get("indexes").getLength()},getArray:function(){return this.get("indexes").getArray()},getRange:function(){return this._oldRange},getTileCount:function(){return{x:Math.abs(this.get("endXIndex")-this.get("startXIndex")),y:Math.abs(this.get("endYIndex")-this.get("startYIndex"))}}}),_.TileIndexPane=function(t,e){this._paneName=t||_.guid(),this._options=T({overlayMap:!0},e),this._pool=new _.TilePool,this.set("paneElement",w.createElement("div",yt)),this.set("tileopacity",1),this._options.overlayMap&&this.set("spareElement",w.createElement("div",yt))},s(_.TileIndexPane,_.KVO,{setMap:function(t){var e,i,n,o=!this._options.overlayMap;null===t?(this._unlistenSwap(),this._unlistenTile(),this._removeAllTiles(),this.unbindAll(),this.get("view").removeTilePane(this),o?this.get("view").removePane(this._paneName):(w.removeElement(this.getElement()),w.removeElement(this.getSpareElement())),this.set("model",null),this.set("action",null),this.set("view",null),this._tileIndexArray=null):(e=t.getMapModel(),i=t.getMapView(),t=t.getMapAction(),2!==e.get("renderMode")&&(i.addTilePane(this),n=e.get("tileIndexArray"),this.set("model",e),this.set("action",t),this.set("view",i),this.bindTo(["tileTransition","instantTiling","zoom","tileSize","padding"],e),this.bindTo(["tilePane","zoomPane"],i),this.bindTo("tileszooming",t),this.bindTo(["startXIndex","startYIndex","startX_px","startY_px"],n),this._tileIndexArray=n,this._listenSwap(i),this._initTiles(),o?i.addPane(this._paneName,this.getElement()):w.addElement(this.getElement(),this.get("tilePane"))))},setMapTypeRegistry:function(t){this._mapTypes=t,this.bindTo("selectedMapType",t)},tileSize_changed:function(){},_initTiles:function(){this._pool.init(),this._listenTile(this._tileIndexArray),this._addAllTiles(this._tileIndexArray)},_listenTile:function(t){this._unlistenTile(),this._relationArray=[O.addListener(t,"insert_at",v(this._addTileAt,this)),O.addListener(t,"remove_at",v(this._removeTileAt,this)),O.addListener(t,"resized",v(this._rearrangeTiles,this)),O.addListener(this.get("model"),"refresh",v(this.refresh,this))]},_listenSwap:function(t){this._swapRelation=[O.addListener(t,"before_tilepane_swap",v(this._beforeTilePaneSwap,this)),O.addListener(t,"tilepane_swapped",v(this._onTilePaneSwapped,this))]},_unlistenTile:function(){O.removeListener(this._relationArray),this._relationArray=null},_unlistenSwap:function(){O.removeListener(this._swapRelation),O.removeListener(this._tsL),this._swapRelation=null,this._tsL=null},_getTile:function(t,e,i){var n,o=this.get("selectedMapType"),s=null;return o?(n=this.get("tileopacity"),(s=(s=o.getTile(t,e,i))instanceof _.Tile?s:new _.Tile(s,{tileIndex:{xIndex:t,yIndex:e},size:this.get("tileSize")})).setOpacity(n),s.getTileIndex()||s.setTileIndex({xIndex:t,yIndex:e}),s.addListener("loaded",v(this._onLoadTile,this)),s):null},_getTileOffset:function(t,e){"number"!=typeof t&&"string"!=typeof t&&(e=t.y||t.yIndex||0,t=t.x||t.xIndex||0);var i=this.get("tileSize"),t=(t-this.get("startXIndex"))*i.width+this.get("startX_px"),e=(e-this.get("startYIndex"))*i.height+this.get("startY_px");return M(t,e)},_addTileAt:function(t,e){var i=e.xIndex,e=e.yIndex,n=this._getTile(i,e,this.get("zoom")),i=this._getTileOffset(i,e);this._pool.add(n),n.load({offset:i,pane:this.get("paneElement"),transition:this.get("tileTransition")&&!this.get("instantTiling")})},_addAllTiles:function(){var i=this,n=i._tileIndexArray,t=n.getRotatedIndexes();i._pool.clearState(),_.forEach(t,function(t){var e=n.getAt(t);i._addTileAt(t,e)})},_rearrangeTiles:function(){var i=this;this._pool.forEach(function(t){var e=t.getTileIndex(),e=i._getTileOffset(e);t.setOffset(e)})},_removeTileAt:function(t,e){this._pool.remove(e)},_removeAllTiles:function(){this._pool.removeAll()},refresh:function(t){t&&this.set("instantTiling",!0);var e=this.get("selectedMapType");e&&this._pool.reset(e,this.get("zoom"),{transition:!t})},_onLoadTile:function(t){t=t.getTileIndex();this._pool.markAt(t,!0),this._pool.getLoadedCount()===(this._tileIndexArray&&this._tileIndexArray.getLength())&&O.trigger(this,"tilesloaded")},getMinZoom:function(){var t=this.get("selectedMapType");return t?t.minZoom:0},getMaxZoom:function(){var t=this.get("selectedMapType");return t?t.maxZoom:0},getElement:function(){return this.get("paneElement")},getSpareElement:function(){return this.get("spareElement")||null},selectedMapType_changed:function(t){var e,i;this.get("model")&&(i=(e=(e=this._mapTypes).get(e.getPreviousTypeId()))?e.constructor:null,(e=!e||!1)||(e=i!==t.constructor,i===Object&&(e=!0)),e?(this._pool.clearState(),this._removeAllTiles(),this._addAllTiles()):this.refresh(!0),this.get("zoomPane").style.display="none")},_swapPane:function(){var t,e=this.getSpareElement();e&&(e.parentNode||this.get("tilePane").appendChild(e),t=this.get("paneElement"),e.innerHTML="",this.set("paneElement",e),this.set("spareElement",t))},_beforeTilePaneSwap:function(){this._unlistenTile()},_onTilePaneSwapped:function(){var t=this,e=t._pool,i=t._options.overlayMap;i&&(t._swapPane(),e.swap()),O.removeListener(t._tsL),t._tsL=O.once(t.get("action"),"zoomend",function(){i||e.removeAll(),t._initTiles(),t._tsL=null,delete t._tsL})},getSwapped:function(){return this._pool.getSwapped()},setOpacity:function(t){t=Math.min(Math.max(t,0),1)||(0===t?0:1);this.set("tileopacity",t)},getOpacity:function(){var t=this.get("tileopacity");return t===p?1:t},tileopacity_changed:function(e){this._pool.forEach(function(t){t.setOpacity(e)})},tileszooming_changed:function(t){t&&this.get("tileTransition")&&!this.get("instantTiling")&&this._pool.forEach(function(t){t.cancelFadeIn()})}}),_.ZoomEffector=function(t,e){var i=this;i.csszoom=x.browser.csszoom,i._topLeft=null,i._curTopLeft=null,i._origin=null,i._containerDiv=t.get("containerDiv"),i._zoomPane=t.get("zoomPane"),i._tilePane=t.get("tilePane"),i._panes=t.get("panes"),i._overlayPane=t.get("overlayPane"),i.listen(e),i.set("tileszooming",!1),i._working=!1,i._view=t},s(_.ZoomEffector,_.KVO,{listen:function(t){O.addListener(t,"tilesloaded",v(this._onTilesloaded,this)),O.addListener(t,"zoomstart",v(this._onZoomStart,this)),O.addListener(t,"zoomend",v(this._onZoomEnd,this)),this.bindTo("tileSize",t),this.bindTo("ef_overlay",t),this.bindTo("ef_overlaylayer",t),this.bindTo("ef_overlayimage",t),this.bindTo("ef_floatpane",t)},_onTilesloaded:function(){var t;this._working&&(this.clearPanePosition(),this._zoomPane.style.display="none",this._tilePane.style.display="",this._working=!1,t=this.get("ef_overlay"))&&this._showPane(t)},_onZoomStart:function(t){!1===this.get("tileszooming")&&(w.willChange(this._tilePane,"transform"),w.backfaceVisibility(this._tilePane,"hidden"),this._hidePane(this.get("ef_overlay")),this.set("tileszooming",!0)),this.start(t)},_onZoomEnd:function(){var t;!1!==this.get("tileszooming")&&(this.set("tileszooming",!1),this.finish(),(t=this.get("ef_overlay"))||this._showPane(t),w.backfaceVisibility(this._zoomPane,"visible"),w.willChange(this._zoomPane,"auto"))},_hidePane:function(i){var n=this;_.forEach(this._panes,function(t,e){i&&n.get("ef_"+e.toLowerCase())||w.visible(t,!1)})},_showPane:function(i){var n=this;_.forEach(this._panes,function(t,e){i&&n.get("ef_"+e.toLowerCase())||w.visible(t,!0)})},clearOverlayPanePosition:function(){var t;this.get("ef_overlay")&&(t=this._overlayPane,w.transform(t,1,0,0,{x:0,y:0}),w.setOffset(t,0,0))},isZooming:function(){return this.get("tileszooming")},clearPanePosition:function(){var t=this._zoomPane,e=this._tilePane,t=(w.transform(t,1,0,0,{x:0,y:0}),w.transform(e,1,0,0,{x:0,y:0}),w.setOffset(t,0,0),w.setOffset(e,0,0),this.clearOverlayPanePosition(),this._tiles);t&&(_.forEach(t,function(t){t.setOffset(t.offsetSnapShot)}),this._tiles.length=0,this._tiles=[]),O.trigger(this,"clearpaneposition")},_swap:function(){var t=this._view;t.swapTilePane(),this._tilePane=t.get("tilePane"),this._zoomPane=t.get("zoomPane"),this._zoomPane.style.display="",this._tilePane.style.display="none",this._working=!0},start:function(t){this._topLeft=t.get("containerTopLeft_px"),this._origin=t.get("transformOrigin_px"),this._curTopLeft=this._topLeft.clone(),this._swap(),this.csszoom&&this._prepareIEZoom(),this.bindTo("scale",t),this.bindTo("transformOrigin_px",t),this.bindTo("containerTopLeft_px",t)},_prepareIEZoom:function(){var e=[];this._view.getTilePanes().forEach(function(t){t=t.getSwapped();_.forEach(t,function(t){t.offsetSnapShot=t.getOffset().clone(),e.push(t)})}),this._tiles=e},scale_changed:function(t){1!==t&&(this._curTopLeft=this._topLeft.clone(),this._curScale=t,this._scaleZoomPane(t))},_scaleZoomPane:function(i){var t,e,n,o=this._zoomPane,s=this._overlayPane,r=this._origin.clone()||M(0,0);this.csszoom?(t=this._tiles,e=r.clone().mul(i,i).sub(r).mul(-1,-1),n=this.get("tileSize").clone().mul(i,i).ceil(),w.setOffset(o,e),_.forEach(t,function(t){var e=t.offsetSnapShot.clone().mul(i,i).ceil();t.setSize(n),t.setOffset(e)})):(w.setScale(o,i,r,!0),this.get("ef_overlay")&&w.setScale(s,i,r,!0)),O.trigger(this,"scale",i)},transformOrigin_px_changed:function(t){this._origin=t},containerTopLeft_px_changed:function(t){this._topLeft=t},_teardown:function(){w.transform(this._containerDiv,1,0,0,{x:0,y:0});var t=this._curTopLeft,e=this._zoomPane,i=this._overlayPane,n=this._curScale;w.isSupportedCSS3Style("transform")||(x.browser.msie||t.div(n,n),t.add(w.getRawOffset(e))),w.setOffset(e,t),this.get("ef_overlay")&&w.setOffset(i,t),this._tilePane.style.display=""},finish:function(){this.unbind(["scale","transformOrigin_px","containerTopLeft_px"]),this._teardown(),this._topLeft=null,this._origin=null,this._curTopLeft=null,this._curScale=1},tileszooming_changed:function(t){t&&this.clearPanePosition()}}),_.MapPicker=function(t){this.CACHE_SIZE=256,this.LAYER_PRIORITY=["PANORAMA","TRANSIT","POI"],this._map=t,this._cache={},this._cacheOrders=[],this._features=[],this._tree=new _.RBush,this._listen(),this._update()},_.MapPicker.prototype={destroy:function(){this._unlisten(),this._cache={},this._cacheOrders=[],this._features=[],this._tree.clear(),this._tree=null},queryFeatures:function(t){var e=this._tree,i=this.LAYER_PRIORITY,n=this._features,o=e.search({minX:t.x,minY:t.y,maxX:t.x,maxY:t.y})||[];if(0===o.length)return[];for(var s=[],r=[],a=0,h=o.length;ac&&(t=p.shift(),delete l[t]),n(null,e)})},function(t,e){if(!t){var i=[],n=[];d._tree.clear();for(var o=0,s=e.length;oi?t.x=t.x%i:t.x<0&&(t.x=i+t.x%i),t.y>e?t.y=t.y%e:t.y<0&&(t.y=e+t.y%e)):(t.x=Math.min(Math.max(t.x,0),i),t.y=Math.min(Math.max(t.y,0),i)),t}});var Bi=_.Math.fromRadiansToDegrees,Ni=_.Math.fromDegreesToRadians,Vi=1.5707963267948966;function Zi(t,e,i,n,o){return t*o-e*Math.sin(2*o)+i*Math.sin(4*o)-n*Math.sin(6*o)}function Fi(t){return t<0?-1:1}function Yi(t){return Math.abs(t)<3.141592653589793?t:t-6.283185307179586*Fi(t)}function Ui(){}var C={name:"UTMK",datum:"GRS80",lat0:38,lng0:127.5,a:6378137,b:6356752.314140356,falseNorthing:2e6,falseEasting:1e6,scaleFactor:.9996,minX:340901120,maxX:359494656,minY:141928960,maxY:157454848,TILE_SIZE:256,BASE_X:90112,BASE_Y:668608,POINT_UNIT_PER_METER:8192};function Xi(){}C.lat0=Ni(C.lat0),C.lng0=Ni(C.lng0),C.a2=C.a*C.a,C.b2=C.b*C.b,C.es=(C.a2-C.b2)/C.a2,C.e=Math.sqrt(C.es),C.ep2=(C.a2-C.b2)/C.b2,C.e0=1-.25*(t=C.es)*(1+t/16*(3+1.25*t)),C.e1=.375*(t=C.es)*(1+.25*t*(1+.46875*t)),C.e2=.05859375*(t=C.es)*t*(1+.75*t),C.e3=(t=C.es)*t*t*(35/3072),C.ml0=C.a*Zi(C.e0,C.e1,C.e2,C.e3,C.lat0),s(Ui,Ci,{name:"UTMK",minZoom:-1,fromCoordToUTMK:function(t){return this.fromLatLngToUTMK(t)},fromLatLngToUTMK:function(t){return this._fromCoordToPlane("LATLNG_TO_UTMK",t)},fromUTMKToPoint:function(t){return this._fromCoordToPlane("UTMK_TO_POINT",t)},fromCoordToPoint:function(t){return this.fromLatLngToPoint(t)},fromLatLngToPoint:function(t){return this._fromCoordToPlane("LATLNG_TO_POINT",t)},fromPointToUTMK:function(t){return this._fromPlaneToCoord("POINT_TO_UTMK",t)},fromUTMKToCoord:function(t){return this.fromUTMKToLatLng(t)},fromUTMKToLatLng:function(t){return this._fromPlaneToCoord("UTMK_TO_LATLNG",t)},fromPointToCoord:function(t){return this.fromPointToLatLng(t)},fromPointToLatLng:function(t){return this._fromPlaneToCoord("POINT_TO_LATLNG",t)},fromLatLngToCoord:function(t){return t.clone()},fromCoordToLatLng:function(t){return t.clone()},pointPerMeter:C.POINT_UNIT_PER_METER,getDistance:function(t,e){t=this.fromCoordToPoint(t),e=this.fromCoordToPoint(e);return _.Math.distance(t,e)*C.POINT_UNIT_PER_METER*C.TILE_SIZE},getDestinationCoord:function(t,e,i){e=(e||0)-90,t=this.fromCoordToPoint(t),i/=C.POINT_UNIT_PER_METER*C.TILE_SIZE,e*=_.Math.radianPerDegree,t=t.clone();return t.add(i*Math.cos(e),i*Math.sin(e)),this.fromPointToCoord(t)},_fromCoordToPlane:function(t,e){var i,n,o,s,r,a,h,l,c;return"UTMK_TO_POINT"!==t&&(i=Ni(e.x),n=Ni(e.y),o=Yi(i-C.lng0),l=Math.sin(n),o=(r=Math.cos(n))*o,s=Math.pow(o,2),r=C.ep2*Math.pow(r,2),a=Math.tan(n),h=Math.pow(a,2),l=1-C.es*Math.pow(l,2),l=C.a/Math.sqrt(l),c=C.a*Zi(C.e0,C.e1,C.e2,C.e3,n),i=C.scaleFactor*l*o*(1+s/6*(1-h+r+s/20*(5-18*h+Math.pow(h,2)+72*r-58*C.ep2)))+C.falseEasting,n=C.scaleFactor*(c-C.ml0+l*a*(s*(.5+s/24*(5-h+9*r+4*Math.pow(r,2)+s/30*(61-58*h+Math.pow(h,2)+600*r-330*C.ep2)))))+C.falseNorthing,i=parseFloat(i),n=parseFloat(n)),"LATLNG_TO_UTMK"===t?M(parseFloat(i.toFixed(1)),parseFloat(n.toFixed(1))):("UTMK_TO_POINT"===t&&(i=e.x,n=e.y),i=(i-C.BASE_X)/C.POINT_UNIT_PER_METER,n=1.25*C.TILE_SIZE-(n-C.BASE_Y)/C.POINT_UNIT_PER_METER,M(i/=C.TILE_SIZE,n/=C.TILE_SIZE))},_fromPlaneToCoord:function(t,e){var i,n,o;if(e="UTMK_TO_LATLNG"!==t?(f=e.x*C.TILE_SIZE,e.y*C.TILE_SIZE):(f=e.x,e.y),"UTMK_TO_LATLNG"!==t&&(f=f*C.POINT_UNIT_PER_METER+C.BASE_X,e=(1.25*C.TILE_SIZE-e)*C.POINT_UNIT_PER_METER+C.BASE_Y),"POINT_TO_UTMK"===t)return M(parseFloat(f.toFixed(1)),parseFloat(e.toFixed(1)));var s,r,a,h,l,c,p,u,d,g,f;for(f-=C.falseEasting,i=p=(C.ml0+(e-=C.falseNorthing)/C.scaleFactor)/C.a,o=0;i+=n=(p+C.e1*Math.sin(2*i)-C.e2*Math.sin(4*i)+C.e3*Math.sin(6*i))/C.e0-i,!(Math.abs(n)<=1e-10);o++)if(6<=o)return!1;return e=Math.abs(i)i.get("zoom")&&i.setZoom(t,!0)}),O.addListener(e,"maxZoom_changed",function(t){e.set("userMaxZoom",t),t{{name}}",n=["",'',"{{name}}",""].join(""),s=this._mapTypeScheme,r=e.name||(e.getName?e.getName():t),a=this._getParentMapTypeId(e),h=null,l=null;(a&&a!==t?(a=this._getParentMapTypeId(e),h=w.createElement("li",i.replace("float:left;","")),n=n.replace(/\{\{name\}\}/g,r),"naver:satellite:hybrid"===e.uid&&(n=n.replace("-unchecked","-checked")),h.innerHTML=n,h.style.display="none",(l=h.getElementsByTagName("a")[0]).style.position="relative",l.style.paddingLeft="25px",l.__mapTypeId=t,l.onclick=v(this._preventLink,this),s[a]||(s[a]={element:null,listElement:null,uid:null,subs:{}}),s[a].subs[t]={element:l,listElement:h},this._updateSubMapTypeStyle(s[a].subs),this._subMapTypeWrap):((h=w.createElement("li",i)).style.borderRight="0 none",h.innerHTML=o.replace("{{name}}",r),(l=h.getElementsByTagName("a")[0]).style.padding="0 7px",l.__mapTypeId=t,l.onclick=v(this._preventLink,this),s[t]?(s[t].element=l,s[t].uid=e.uid):s[t]={element:l,listElement:h,uid:e.uid,subs:{}},this._mapTypeWrap)).appendChild(h)},_removeMapTypeButton:function(t,e){var e=this._getParentMapTypeId(e),i=this._mapTypeScheme[e||t];if(e===t){w.removeElement(i.element.parentNode),i.element=null;var n=!1;if(i.subs)for(var o in i.subs)if(i.subs.hasOwnProperty(o)&&i.subs[o]){n=!0;break}n||(i.uid=null)}else w.removeElement(i.subs[t].listElement),i.subs[t]=null,delete i.subs[t],this._updateSubMapTypeStyle(i.subs)},_getParentMapTypeId:function(t){var e,i=this._mapTypeScheme,t=t.uid.split(":"),n=t[0]+":"+t[1],o=null;for(e in i)if(i.hasOwnProperty(e)&&i[e].uid===n){o=e;break}return o},_getButtonElement:function(t){if("A"===t.tagName&&t.__mapTypeId)return t;for(;t&&"A"!==t.tagName&&"DIV"!==t.tagName;)t=t.parentNode;return t&&t.__mapTypeId?t:null},_hideCheckbox:function(t){var t=t||0,i=this._subMapTypeWrap,n=i.getElementsByTagName("li");function e(){for(var t=0,e=n.length;t"+n+'\ud3bc\uce58\uae30',s.href="#",s.title="\uc9c0\ub3c4 \uc720\ud615 \ubcc0\uacbd",s.onclick=v(this._preventLink,this),i.appendChild(s),this._mapTypeNameWrap=s.getElementsByTagName("span")[0],this._dropDownArrow=s.getElementsByTagName("img")[0],this._mapTypeListWrap=o,this._mapTypeScheme={},v(this._addMapTypeList,this));_.forEach(t,function(t){r(t,e.get(t))}),this._element.appendChild(i),this._element.appendChild(o),this._domListeners=[O.addDOMListener(s,"mousedown",v(this._onToggleList,this)),O.addDOMListener(o,"mousedown",v(this._onDownListItem,this)),O.addDOMListener(o,"mouseover",v(this._onOverListItem,this)),O.addDOMListener(o,"mouseout",v(this._onOutListItem,this))]},_addMapTypeList:function(t,e){var i=this._mapTypeScheme,n=e.name||(e.getName?e.getName():t),o=w.createElement("li","display:block;margin:0;padding:0;list-style:none;background-color:#fff;border:solid 1px #444;box-sizing:content-box !important;"),n=(o.innerHTML="{{name}}".replace("{{name}}",n),o.style.borderTop="0 none",o.style.borderBottom="0 none",o.getElementsByTagName("a")[0]);n.__mapTypeId=t,n.onclick=v(this._preventLink,this),i[t]={element:n,uid:e.uid,listElement:o},this._mapTypeListWrap.appendChild(o)},_removeMapTypeList:function(t,e){var i=this._mapTypeScheme[t];w.removeElement(i.listElement),this._mapTypeScheme[t]=null,delete this._mapTypeScheme[t]},_toggleList:function(t){var e="-down",i="-up";t||(e="-up",i="-down"),w.visible(this._mapTypeListWrap,t),this._dropDownArrow.src=this._dropDownArrow.src.replace(e,i)},_onToggleList:function(){this._toggleList(!1===w.visible(this._mapTypeListWrap))},_onDownListItem:function(t){var t=L.fix(t),t=this._getButtonElement(t.target);t&&(t=t.__mapTypeId,this.setMapTypeId(t),this._toggleList(!1))},_onOverListItem:function(t){t=L.fix(t),t=this._getButtonElement(t.target);t&&(t.style.backgroundColor="#f6f6f6")},_onOutListItem:function(t){t=L.fix(t),t=this._getButtonElement(t.target);t&&t.__mapTypeId!==this._registry.getSelectedTypeId()&&(t.style.backgroundColor="#fff")},_preventLink:function(t){L.fix(t).preventDefault()},setMapTypeId:function(t){t!==this._registry.getSelectedTypeId()&&this._registry.setSelectedTypeId(t)},mapTypeIds_changed:function(t){var i,n=this;n._registry&&(i=n._registry,t=t||i.getTypeIds(),n._clearMapType(),n._lazyMapTypeId=i.getSelectedTypeId(),_.forEach(t,function(t){var e=i.get(t);n._onAddMapType(t,e)}))},_removeDOMEvents:function(){_.forEach(this._domListeners,function(t){O.removeDOMListener(t)}),this._domListeners.length=0},style_changed:function(t){this._element&&(this._style!==t&&(this._removeDOMEvents(),L.endTouch(),this._prepareDOM(this._registry)),this._style=t)},_getHideTime:function(){return Math.max(parseInt(this.getOptions("hideTime"),10),150)}});var Hi=[["\ubd80\ub3d9\uc0b0",17],["\uac70\ub9ac",15],["\uc74d,\uba74,\ub3d9",13],["\uc2dc,\uad70,\uad6c",10],["\uc2dc,\ub3c4",7],["\uad6d\uac00",5]];if(_.ZoomControl=function(t){this.DEFAULT_OPTIONS={position:u.TOP_LEFT,style:g.LARGE,legendDisabled:!1},this.__LEGEND_SCHEME__=Hi,this.SCALER_GAP=10,this._domListeners=[],this.set("legendAllowed",!0),_.CustomControl.apply(this,[t])},s(_.ZoomControl,_.CustomControl,{_beforeSetMap:function(t){t?t instanceof naver.maps.Map&&!t.isReady||(this._prepareDOM(),this._bindDOMEvent()):(this._unbindDOMEvent(),this._destroyDOM())},_afterSetMap:function(t){var e;t?t instanceof naver.maps.Map&&!t.isReady||(e=t.getMapModel(),this.bindTo("minZoom",e,"userMinZoom"),this.bindTo("maxZoom",e,"userMaxZoom"),this.bindTo("mapTypeMinZoom",e),this.bindTo("mapTypeMaxZoom",e),this.bindTo("zoom",t),this.bindTo("mapType",t),this._adjustLegend()):(this.unbind("minZoom"),this.unbind("maxZoom"),this.unbind("mapTypeMinZoom"),this.unbind("mapTypeMaxZoom"),this.unbind("zoom"),this.unbind("mapType",t))},_addControl:function(t,e){_.CustomControl.prototype._addControl.apply(this,arguments),this._adjustLegend(e)},_prepareDOM:function(){function t(t,e,i){return t=w.createElement(t,e),i&&(t.innerHTML=i),t}function e(t,e){for(var i=0,n=e.length;i'.replace(/{{(\w+)}}/g,function(t,e){return o[e]})}var n="position:relative;z-index:2;width:28px;height:22px;cursor:pointer;display:block;overflow:hidden;box-sizing:content-box !important;",o="position:absolute;top:7px;bottom:7px;left:12px;width:4px;height:100%;display:block;",s=t("div","position:relative;z-index:0;width:28px;margin:10px;border:solid 1px #444;box-sizing:content-box !important;"),r=t("a",n+"border-bottom:solid 1px #cacdd1;",i("in-large-normal.png",28,22,"\uc9c0\ub3c4 \ud655\ub300")),a=t("div","position:relative;width:28px;height:118px;overflow:hidden;margin:0;padding:7px 0;background-color:#fff;cursor:pointer;box-sizing:content-box !important;"),h=t("div",o+"background-color:#2F87EC;"),o=t("div",o+"background-color:#CACDD1;"),l=t("a","position:absolute;left:4px;width:18px;height:10px;top:27px;border:solid 1px #444;cursor:move;display:block;overflow:hidden;box-sizing:content-box !important;",i("handle.png",18,10,"\uc9c0\ub3c4 \ud655\ub300/\ucd95\uc18c \uc2ac\ub77c\uc774\ub354")),n=t("a",n+"border-top:solid 1px #cacdd1;",i("out-large-normal.png",28,22,"\uc9c0\ub3c4 \ucd95\uc18c")),c=t("div","position:absolute;top:22px;width:44px;height:0;overflow:visible;display:none;"),p=t("div","display:block;margin:0;padding:0;");w.disableSelection(s),r.href="#",n.href="#",l.href="#",e(a,[h,o,l]),e(s,[r,a,n]),c.appendChild(p),s.appendChild(c),this._doms={wrap:s,zoomIn:r,zoomOut:n,zoomInImg:r.getElementsByTagName("img")[0],zoomOutImg:n.getElementsByTagName("img")[0],scaler:a,scalerOn:h,scalerOff:o,slider:l,legend:c,legendInner:p},this.style_changed(this.get("style")||g.LARGE),this._element.appendChild(s),this._drawLegend()},_createLegendItem:function(t,e){var i=this.SCALER_GAP,n=this.get("maxZoom")||21,o=w.createElement("div","position:absolute;top:0;left:0;z-index:0;margin:0;padding:0;border:solid 0 transparent;display:block;box-sizing:content-box !important;width:44px;height:17px;overflow:hidden;"),t=t||"",e=e||1,n=(n-21)*i+3,s=w.createElement("img",mt+vt+"width:44px;height:17px;"),r=w.createElement("span",_t+"font-family:"+ft+";position:relative;z-index:2;line-height:17px;color:#fff;font-size:11px;padding:0 4px 0 0;text-align:center;letter-spacing:-1px;");return s.src=f+"/zoom-legend-left-normal.png",s.alt="",r.innerHTML=t,o.appendChild(s),o.appendChild(r),o.style.top=n+i*(21-e)+"px",{zoom:e,element:o,imgEl:s,textEl:r}},_drawLegend:function(){var n=this._doms.legendInner,o=[],s=v(this._createLegendItem,this);n.innerHTML='

\uc9c0\ub3c4 \ucee8\ud2b8\ub864\ub7ec \ubc94\ub840

',_.forEach(this.__LEGEND_SCHEME__,function(t,e){var i=t[0],t=t[1],i=s(i,t);0===e&&(i.imgEl.src=i.imgEl.src.replace("-normal","-on")),i.zoom=t,o.push(i),n.appendChild(i.element)}),this.__legends__=o,this._adjustLegend()},_bindDOMEvent:function(){this.get("map");function t(t){L.stop(t)}var e=this._doms,i=e.zoomIn,n=e.zoomOut,o=e.scaler,e=e.slider,s=O.addDOMListener;this._domListeners=[s(i,"click",t),s(n,"click",t),s(i,"mousedown",v(this._onClickZoomIn,this)),s(n,"mousedown",v(this._onClickZoomOut,this)),s(o,"mouseover",v(this._onMouseOver,this)),s(o,"mouseout",v(this._onMouseOut,this)),s(o,"mousedown",v(this._onMouseDownScaler,this)),s(e,"mousedown",v(this._onMouseDownSlider,this)),s(e,"click",t)]},_unbindDOMEvent:function(){O.removeDOMListener(this._domListeners),this._domListeners.length=0,this._domListeners=[]},_onClickZoomIn:function(t){L.stop(t);var t=this.getMap(),e=t.getZoom()+1;t.setZoom(e,!0)},_onClickZoomOut:function(t){L.stop(t);var t=this.getMap(),e=t.getZoom()-1;t.setZoom(e,!0)},_onMouseOver:function(){!this.get("legendDisabled")&&this.get("legendAllowed")&&(this._doms.legend.style.display="")},_onMouseOut:function(){!this.get("legendDisabled")&&this.get("legendAllowed")&&(this._doms.legend.style.display="none")},_onMouseDownScaler:function(t){(t=L.fix(t)).stop();var e=t.target||t.srcElement,t=t.pos(),i=this._doms.scaler,t=t.pageY-w.getOffset(i).y;e!==this._doms.slider&&(i=Math.floor(t/this.SCALER_GAP),t=(e=this.getMap()).getZoom(),(i=this.get("maxZoom")-i)!==t)&&e.setZoom(i,!0)},_onMouseDownSlider:function(t){(t=L.fix(t)).stop();var i=this,n=this._doms.scaler,o=this.getMap(),e=[O.addDOMListener(l,"mousemove",function(t){(t=L.fix(t)).stop();var e=t.target||t.srcElement,t=t.pos().pageY-w.getOffset(n).y;e!==n&&e.parentNode!==n||(e=Math.floor((2+t)/i.SCALER_GAP),o.setZoom(i.get("maxZoom")-e,!0))}),O.addDOMListener(l,"mouseup",function(t){O.removeDOMListener(e),e=null})]},zoom_changed:function(t){var e,i,n,o,s,r,a,h,l,c=this.get("maxZoom");c!==p&&(n=c-t),t===p||c===p||n<0||(e=this._doms,this.getMap(),i=this.get("minZoom"),n=n*this.SCALER_GAP+4,o=e.zoomIn,s=e.zoomOut,r=e.zoomInImg,a=e.zoomOutImg,h="-dimmed",l="-normal",t===i?(s.style.cursor="default",r.src=r.src.replace(h,l),a.src=a.src.replace(l,h)):(t===c?(o.style.cursor="default",r.src=r.src.replace(l,h)):(o.style.cursor="pointer",s.style.cursor="pointer",r.src=r.src.replace(h,l)),a.src=a.src.replace(h,l)),e.slider.style.top=n+"px",e.scalerOff.style.height=n+"px")},minZoom_changed:function(){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},maxZoom_changed:function(){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapTypeMinZoom_changed:function(t){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapTypeMaxZoom_changed:function(t){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapType_changed:function(t){t=!t||t.vendor!==Ct||t.projection!==_.EPSG3857;this.get("legendAllowed")===t&&this.set("legendAllowed",!t)},legendAllowed_changed:function(t){this._doms&&!t&&this.get("legendDisabled")&&w.visible(this._doms.legend,!1)},style_changed:function(t){var e,i,n,o,s,r,a,h,l,c=this._doms;c&&c.wrap&&(e=c.scaler,i=c.zoomIn,n=c.zoomInImg,o=c.zoomOut,c=c.zoomOutImg,s=22,r="block",a="solid 1px #cacdd1",h="-small",l="-large",t===g.SMALL&&(r="none",a="0 none",s=28,h="-large",l="-small"),e.style.display=r,i.style.height=s+"px",i.style.borderBottom=a,n.style.height=s+"px",n.height=s,n.src=n.src.replace(h,l),o.style.height=s+"px",c.style.height=s+"px",c.height=s,c.src=c.src.replace(h,l))},_setScalerHeight:function(){var t=this.get("minZoom"),e=this.get("maxZoom"),i=this.get("mapTypeMaxZoom");e!==p&&t!==p&&i!==p&&(i=(e-t)*this.SCALER_GAP+6,this._doms.scaler.style.height=i+"px",this._doms.scalerOn.style.height=i+"px",this._adjustLegend())},_adjustLegend:function(t){var e=this.getMap();if(!(!e||e.isCustomMapType&&e.isCustomMapType())){var e=t||this.get("position"),i=this.get("minZoom"),n=this.get("maxZoom"),t=(_.forEach(this.__legends__,function(t){var e=t.zoom,t=t.element;t.style.visibility=n',this._logoImg=i.getElementsByTagName("img")[0],i},mapType_changed:function(t){t&&(t.darktheme?this._logoImg.src=this._logoImg.src.replace("-normal.png","-dark.png"):this._logoImg.src=this._logoImg.src.replace("-dark.png","-normal.png"))}}),_.MapDataControl=function(t){this.DEFAULT_OPTIONS={position:u.BOTTOM_RIGHT},this.POPUP_PADDING=15,this._providers={},_.CustomControl.apply(this,arguments)},s(_.MapDataControl,_.CustomControl,{_afterSetMap:function(t){t?(this.bindTo("mapType",t),this.bindTo("size",t),this._listeners=[O.addListener(t,"addLayer",v(this._onAddLayer,this)),O.addListener(t,"removeLayer",v(this._onRemoveLayer,this)),O.addListener(t,"idle",v(this._onIdle,this))],t.getElement().appendChild(this._popupEl),this._syncToLayers(t.layers)):(this.unbind("mapType"),this.unbind("size"),O.removeListener(this._listeners),this._popupEl.parentElement.removeChild(this._popupEl))},_onIdle:function(){_.forEach(this._providers,function(t,e){t.checkValid()})},_createElement:function(){var e=this;(s=w.createElement("div","margin:0;padding:0 0 2px 10px;height:19px;line-height:19px;color:#444;font-family:"+ft+";font-size:11px;clear:both;white-space:nowrap;pointer-events:none;")).className="map_copyright";var i,t,n,o,s;return e._viewMoreAnchor=((t=w.createElement("a","font-family:"+ft+";font-size:11px;line-height: 19px;margin:0 0 0 5px;padding:0;color:#444;float:left;pointer-events:auto;text-decoration:underline;display:none;")).setAttribute("href","#"),w.setText(t,"\ub354\ubcf4\uae30"),O.addDOMListener(t,"click",function(t){L.preventDefault(t),e._toggleViewMoreEl()}),t),e._popupEl=(i=w.createElement("div","border:1px solid #292930;background:#fff;padding:"+e.POPUP_PADDING+"px;color:#333;position:absolute;font-size:11px;max-width:350px !important;line-height:1.5;max-height:300px !important;clear:both;display:none"),t=w.createElement("h5","font-size: 12px;margin-top: 0px;margin-bottom: 10px;"),n=w.createElement("a","position:absolute;top:8px;right:8px;width:14px;height:14px;font-size:14px;line-height:14px;display:block;overflow:hidden;color:#444;text-decoration:none;font-weight:bold;text-align:center;"),o=w.createElement("div"),w.setText(t,"\uc9c0\ub3c4 \ub370\uc774\ud130"),n.setAttribute("href","#"),w.setText(n,"x"),O.addDOMListener(n,"click",function(t){L.stop(t),w.visible(i,!1)}),i.appendChild(t),i.appendChild(n),i.appendChild(o),i),s.appendChild(this._viewMoreAnchor),s},size_changed:function(t){this._layout(t),this._updatePopupSize()},mapType_changed:function(t){var e;this.getMap()&&((e=this._providers.basemap)?e.setMapType(this.get("mapType")):this._providers.basemap=new _.MapDataProvider(this),this._adjColor(t),this._layout())},_adjColor:function(t){var i="#444";t.darktheme&&(i="#fff"),this._element.style.color=i,this._viewMoreAnchor.style.color=i,_.forEach(this._providers,function(t,e){t.setColor(i)})},_syncToLayers:function(e){var n=this,o=e.getLayerNames();_.forEach(this._providers,function(t,e){var i;"basemap"!==e&&((i=_.getIndexOfElement(o,e))<0?n._removeProvider(e):o.splice(i,1))}),_.forEach(o,function(t){n._addProvider(e.get(t))}),this._layout()},_addProvider:function(t){var e=t.get("name");this._providers[e]||(this._providers[e]=new _.MapDataProvider(this,t.getLayerType()))},_removeProvider:function(t){this._providers[t]&&(this._providers[t].setMapType(null),this._providers[t]=null,delete this._providers[t])},_onAddLayer:function(t){this._addProvider(t),this._layout()},_onRemoveLayer:function(t){this._removeProvider(t)},_layout:function(){var i=this.getMap().getSize().width<300;w.visible(this._viewMoreAnchor,i),_.forEach(this._providers,function(t,e){t.setVisible(!i)})},_toggleViewMoreEl:function(){w.toggle(this._popupEl),this._updatePopupSize()},_updatePopupSize:function(){var t,e,i;w.visible(this._popupEl)&&(i=this.getMap().getSize(),t=4*this.POPUP_PADDING,this._popupEl.style.width=_.round(i.width-t)+"px",t=w.getSize(this._popupEl),e=i.height/2-t.height/2,i=i.width/2-t.width/2,w.setOffset(this._popupEl,M(_.round(i),_.round(e))))},getElement:function(){return this._element},getPopupElement:function(){return this._popupEl}}),_.MapDataProvider=function(t,e){this._isBasemap=!1,this._items=[],this._control=t,e||(this._isBasemap=!0,e=t.get("mapType")),this._createElement(),this.setMapType(e)},s(_.MapDataProvider,_.KVO,{_createElement:function(){var t=this._control.getElement();this._isBasemap&&(this._vendorElement=w.createElement("div","float:left"),t.insertBefore(this._vendorElement,t.firstChild)),this._element=w.createElement("div","float:left"),t.appendChild(this._element)},setMapType:function(t){this.set("mapType",t)},setVisible:function(t){w.visible(this._element,t)},setColor:function(e){_.forEach(this._items,function(t){t.el.style.color=e}),this._vendorElement&&(this._vendorElement.firstChild.style.color=e)},mapType_changed:function(t){t?(this._isBasemap&&this._removeItemElements(),this._create(t),this.checkValid()):this._destroy()},_create:function(t){var e=t,s=l.createDocumentFragment(),r=l.createDocumentFragment(),i=this._control.getPopupElement().getElementsByTagName("div")[0];_.forEach(e.provider,v(function(t,e){var i=this._createItemElements(t),n=t.bounds&&[],o=t.area||null;t.bounds&&(!_.getLiteralType(t.bounds)&&t.bounds.length?_.forEach(t.bounds,function(t){n.push(_.box(t))}):n=[_.box(t.bounds)]),this._items.push({el:i[0],cloneEl:i[1],area:o,bounds:n,exclude:t.exclude}),s.appendChild(i[0]),r.appendChild(i[1])},this)),this._isBasemap?(e=this._createItemElements({title:t.vendor||""}),this._items.push({el:e[0],cloneEl:e[1]}),this._vendorElement.appendChild(e[0]),r.insertBefore(e[1],r.firstChild),i.insertBefore(r,i.firstChild)):i.appendChild(r),this._element.appendChild(s)},_createItemElements:function(t){var e,i;return t.link?((e=w.createElement("a","pointer-events:auto;white-space:pre;")).setAttribute("target","_blank"),e.setAttribute("href",t.link)):e=w.createElement("span","white-space:pre;"),x.browser.msie&&(e.style.opacity="0.99"),(i=e.cloneNode()).style.color="#444",i.style.float="left",w.setText(e,t.title),w.setText(i,t.title),[e,i]},_removeItemElements:function(){_.forEach(this._items,function(t){w.removeElement(t.el),w.removeElement(t.cloneEl)}),this._items.length=0,this._items=[]},checkValid:function(){var o=this._control.getMap().getBounds();_.forEach(this._items,function(i){var t,n=!1;(i.bounds||i.area)&&(i.area?(t=o.isInsidePolygon(i.area),n=i.exclude?!t:t):_.forEach(i.bounds,function(t){var e=null,e=t instanceof S?b.bounds(t.getSW(),t.getNE()):t;n=i.exclude?!e.hasBounds(o):e.intersects(o)}),w.visible(i.el,n),w.visible(i.cloneEl,n))})},_destroy:function(){this._removeItemElements(),w.removeElement(this._element),this._isBasemap&&w.removeElement(this._vendorElement),this._items=null,delete this._items}}),_.ScaleControl=function(t){this._IMG_SCALE=[f+"/new-scale-normal-l.png",f+"/new-scale-normal-b.png",f+"/new-scale-normal-r.png"],this._SCALE_SIZE=50,this._MAX_SCALE_SIZE=100,this._textEl=null,this._textShadowCss="-1px 0 rgba(255, 255, 255, 0.8), 0 1px rgba(255, 255, 255, 0.8), 1px 0 rgba(255, 255, 255, 0.8), 0 -1px rgba(255, 255, 255, 0.8)",this.DEFAULT_OPTIONS={position:u.BOTTOM_RIGHT},_.CustomControl.apply(this,arguments)},s(_.ScaleControl,_.CustomControl,{getScaleText:function(){var t=this._textEl;return t?t.innerHTML:""},_afterSetMap:function(t){var e,i;t?(e=t.getMapModel(),i=2===t.get("renderMode"),this.bindTo(["mapTypeMinZoom","mapTypeMaxZoom","mapSystemProjection","projection","tileSize"],e),this.bindTo(["zoom","center","mapType"],t),i&&(this._listeners=[O.addListener(t,"idle",v(this._update,this))])):(this.unbind(["mapTypeMinZoom","mapTypeMaxZoom","projection","tileSize","zoom","center","mapType"]),this._listeners&&O.removeListener(this._listeners))},zoom_changed:function(){var t=this.get("map");t&&2===t.get("renderMode")||this._update()},center_changed:function(){var t=this.get("map"),e=this.get("projection");t&&2===t.get("renderMode")||e.pointPerMeter||this._update()},projection_changed:function(){this.get("mapSystemProjection")&&(this._calcPointPerMeter(),this._update())},tileSize_changed:function(){this.get("mapSystemProjection")&&(this._calcPointPerMeter(),this._update())},mapType_changed:function(t){if(t){var e="#222225",i=this._textShadowCss,n="-dark-",o="-normal-";t.darktheme&&(e="#fff",i=i.replace(/rgba\(255, 255, 255, 0\.8/g,"rgba(48, 48, 51, 0.8"),n="-normal-",o="-dark-"),this._textEl.style.color=e;try{this._textEl.style.textShadow=i}catch(t){}_.forEach(this._barEls,function(t){t.src=t.src.replace(n,o)})}},_calcPointPerMeter:function(t,e){var t=t||this.get("projection"),e=e||this.get("tileSize");t&&e&&(!t.name||-1",'','',''].join(""),this._textEl=n.getElementsByTagName("span")[0],n.getElementsByTagName("img"));return this._barEls=[e[1],e[0],e[2]],n}}),_.DrawingUtil={getDrawingType:function(){var t;return this._drawingType||(t="NONE",this.isSupportedSVG()?t="SVG":this.isSupportedVML()&&(t="VML"),this._drawingType=t),this._drawingType},isSupportedSVG:function(){return l.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")},isSupportedVML:function(){var t;return this.__isSupportedVML===p&&((t=l.createElement("div")).innerHTML='',(t=t.firstChild).style.behavior="url(#default#VML)",this.__isSupportedVML=!t||"object"==typeof t.adj),this.__isSupportedVML},isSupportedCanvas:function(){var t;return this.__isSupportedCanvas===p&&(t=l.createElement("canvas"),this.__isSupportedCanvas=!(!t.getContext||!t.getContext("2d"))),this.__isSupportedCanvas},getBounds:function(t){for(var e,i,n=t.length,o=1/0,s=1/0,r=-1/0,a=-1/0,h=0;he&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,e=e.y-t.y;return i*i+e*e},_sqClosestPointOnSegment:function(t,e,i,n){var o=e.x,e=e.y,s=i.x-o,r=i.y-e,a=s*s+r*r;return 0=o.width-s,r=r<=0+s,o=t>=o.height-s,t=t<=0+s;e[39]=a,e[37]=r,e[40]=o,e[38]=t,!n&&(a||r||o||t)&&i.run({weight:1},{weight:40},{infinity:!0}),!n||a||r||o||t||i.stop()},_getXFactor:function(){var t=0,e=this._keyInfo;return e[37]&&--t,e[39]&&(t+=1),t},_getYFactor:function(){var t=0,e=this._keyInfo;return e[38]&&--t,e[40]&&(t+=1),t},_onPanningTransition:function(t){var t=t.progress,e=this._getXFactor(),i=this._getYFactor(),t=t.weight,e=M(e*t,i*t);this.getMap().panBy(e)},_isMoved:function(t){return 5<=_.Math.distance(this._startPageXY,t)},_getDraggablePointerEvent:function(t){var e=t.pos(),e=M(e.pageX,e.pageY),e=this._calcNewMarkerCoordinates(e),t=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t;return{offset:e.offset,point:e.point,coord:e.coord,pointerEvent:t,domEvent:t,originalEvent:t,overlay:this}},_calcNewMarkerCoordinates:function(t){var e=this.getProjection(),t=t.sub(this.getMapOffset()).sub(this.get("containerTopLeft")),t=e.fromOffsetToPoint(t),i=this.getPosition(),i=e.fromCoordToPoint(i),t=t.sub(this._startMousePoint),i=i.add(t);return{offset:e.fromPointToOffset(i),point:i,coord:e.fromPointToCoord(i)}}},_.Marker=function(t){this.OVERLAY_TYPE="Marker",this.DEFAULT_OPTIONS={icon:null,shape:null,cursor:"pointer",clickable:!0,draggable:!1,position:null,map:null,title:"",visible:!0,zIndex:null,simplifyLevel:1,animation:null},this._wrapper=this._createWrapper(),this.set("_nmarker_id","nmarker-"+_.guid()),this.setOptions(T({},this.DEFAULT_OPTIONS,t))},s(_.Marker,_.OverlayView,[_.MarkerAnimation,_.MarkerDraggble],{setOptions:function(t){var e,i,n,o=this;"string"==typeof t?(e=t,i=arguments[1],n="set"+_.capitalize(e),"shadow"===t?_.console.once("[DEPRECATED] The 'shadow' option of naver.maps.Marker is DEPRECATED.\nnaver.maps.Marker\uc758 'shadow' \uc635\uc158\uc740 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4."):o[n]?o[n](i):o.set(e,i)):(_.forEach(t,function(t,e){"map"!==e&&o.setOptions(e,t)}),t.map&&this.setMap(t.map))},setShadow:function(){_.console.info("[DEPRECATED] The 'setShadow' method is DEPRECATED.\n'setShadow' \uba54\uc11c\ub4dc\ub294 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.")},getShadow:function(){_.console.info("[DEPRECATED] The 'getShadow' method is DEPRECATED.\n'getShadow' \uba54\uc11c\ub4dc\ub294 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.")},getOptions:function(t){var i=this,n={};return t?this.get(t):(_.forEach(this.DEFAULT_OPTIONS,function(t,e){n[e]=i.get(e)}),n)},setPosition:function(t){this.set("position",_.box(t)),this._updateGL()},setIcon:function(t){this.set("icon",t)},getDrawingRect:function(){var t,e=this._icon.size,i=this._icon.anchor,n=this._toPixelPoint(this.position);return e?(t=new M(n.x-i.x,n.y-i.y),e=new M(n.x+e.width-i.x,n.y+e.height-i.y),b.bounds(t,e)):b.bounds(n.clone(),n.clone())},toGeometry:function(){return{type:At,coordinates:_.DataUtil.toPoint(this.getPosition()),mantle_properties:this._getMantleProperties()}},getWrapElement:function(){return this._wrapper},getElement:function(){return this._wrapper},_toPixelPoint:function(t){return this.getProjection().fromCoordToPixelPoint(t)},getAnchor:function(){if(this._icon)return this._icon.anchor},getSize:function(){if(this._icon)return this._icon.size},onAdd:function(){var t=this._getPaneName(),t=this.getPanes()[t],e=this.getMap().getMapAction();t.appendChild(this._wrapper),this._addWrapListener(this._wrapper),this._addListener(this.eventTarget),this.bindTo("ef_overlayImage",e),this._onAddGL()},onRemove:function(){this.unbind("ef_overlayImage"),this._removeListener(),this._removeWrapListener(this._wrapper),w.removeElement(this._wrapper),this.stopTransition(),this._onRemoveGL()},_zIndex_changed:function(t){0!==t&&!t||w.setZIndex(this._wrapper,t)},_visible_changed:function(t){w.visible(this._wrapper,!!t)},_position_changed:function(){this.draw()},_title_changed:function(t){this._wrapper.title=t},_clickable_changed:function(t){this.eventTarget&&(this._wrapper.__clickable=!!t,this.eventTarget.__clickable=!!t,this._icon.getElement().__clickable=!!t,this.set("cursor",this.cursor))},_cursor_changed:function(t){var e,i;this.eventTarget&&(t=this._getCursorState(t||"pointer"),e=this._icon.getElement(),i="inherit",this._icon.isSymbol?(this._wrapper.style.cursor=i,this.eventTarget.style.cursor=t,e.style.cursor=t):(this._wrapper.style.cursor=i,e.style.cursor=i,this.eventTarget.style.cursor=t))},_draggable_changed:function(t){this._updateDraggable(t)},_shape_changed:function(t){this.updateShape(t)},_equalsIgnoreKey:function(t,e,i){for(var n in t)if(t.hasOwnProperty(n)){if(n===i)continue;var o=t[n],n=e?e[n]:p;if(o&&o.equals){if(!1===o.equals(n))return!1}else if(!1===y.equals(o,n))return!1}return!0},_icon_changed:function(t){var e,t=_.boxToIcon(t);if(!_.equals(t,this._beforeBoxedIcon)){if(this._icon&&this._icon.type===Et.image)if(!_.equals(t.origin,this._beforeBoxedIcon.origin)&&this._equalsIgnoreKey(t,this._beforeBoxedIcon,"origin"))return e=t.origin?t.origin.clone().mul(-1,-1):_.Point(0,0),w.setOffset(this._icon.getElement(),e),void(this._beforeBoxedIcon=t);this._icon&&this._icon.type===Et[t.type]||(this._icon&&(this._removeFromWrapper(this._icon.getElement()),this._icon.destroy()),this._icon=new _[_.capitalize(t.type)+"Icon"]),this._beforeBoxedIcon=t,this._icon.update(t,_.bind(this._icon_loaded,this))}},_icon_loaded:function(){this._icon.type===Et.html?this._wrapper.style.overflow="visible":(w.setSize(this._wrapper,this._icon.size),this._wrapper.style.overflow="hidden"),this._transformOriginX=this._icon.anchor.x/this._icon.size.width*100,this._transformOriginY=this._icon.anchor.y/this._icon.size.height*100,this.draw(),this._addToWrapper(this._icon.getElement()),this.updateShape(this.shape),this._updateGL(),O.trigger(this,"icon_loaded",this)},draw:function(){var t,e;this.map&&this.position&&this._icon.anchor&&!this._dragStarted&&(e=this.getProjection(),t=this.position,(e=e.fromCoordToOffset(t))&&e instanceof M&&e.round(),this.stopTransition(),this.animation?this.startTransition(this._wrapper,e,this._icon.anchor,this.animation):w.setOffsetWithAnchor(this._wrapper,e,this._icon.anchor),this.get("ef_overlayimage"))&&w.transform(this._wrapper,1,0,0,{x:0,y:0})},scale:function(t){this.getMap()&&this.get("ef_overlayimage")&&this._transformOriginX&&this._transformOriginY&&w.setScaleByPercent(this._wrapper,1/t,{x:this._transformOriginX,y:this._transformOriginY},!0)},updateShape:function(t){this._icon.getElement()&&((t=this.icon||this.shape?t:St)?(this._updateMaskTarget(),this._updateMask(t),this._updateAccessibility(),this._setEventTarget(this._mask.childNodes[0])):(this._removeMaskTarget(),this._removeMask(),this._icon.isSymbol?this._setEventTarget(this._icon.getShapeElement()):this._setEventTarget(this._icon.getElement())))},_updateMaskTarget:function(){this._dummImg||(this._dummImg=this._createDummImg()),this._addToWrapper(this._dummImg),w.setSize(this._dummImg,this._icon.size),this._dummImg.useMap="#"+this._nmarker_id},_updateMask:function(t){this._mask||(this._mask=this._createShapeMap(t),this._addToWrapper(this._mask));var e=this._mask.getElementsByTagName("area")[0];e.shape=t.type,e.coords=t.coords},_updateAccessibility:function(){this._mask.getElementsByTagName("area")[0].alt="\ub9c8\ucee4\uc758 \uacbd\uc704\ub3c4\ub294 "+_.DataUtil.toPoint(this.getPosition())+" \uc785\ub2c8\ub2e4."},_removeMaskTarget:function(){this._removeFromWrapper(this._dummImg),this._dummImg=null},_removeMask:function(){this._mask&&(this._removeFromWrapper(this._mask),delete this._mask)},_addToWrapper:function(t){this._wrapper&&this._wrapper.appendChild(t)},_removeFromWrapper:function(t){if(this._wrapper)try{this._wrapper.removeChild(t)}catch(t){}},_setEventTarget:function(t){this.eventTarget!==t&&(this.eventTarget=t,this.set("clickable",this.clickable),this._removeListener(),this._addListener(this.eventTarget),this._updateDraggable(this.draggable))},_updateDraggable:function(t){t?this._enableDrag():this._disableDrag()},_getCursorState:function(t){return t=t||this.cursor,this.clickable?t||"pointer":"inherit"},_createWrapper:function(){var t=["position:absolute;","overflow:hidden;","box-sizing:content-box !important"].join("");return w.createElement("div",t)},_createDummImg:function(){var t=w.createElement("img","position:absolute;border:0;left:0px;top:0px;"+vt);return w.disableSelection(t),t.src=gt,t.alt="",t},_createShapeMap:function(t){var e=w.createElement("map"),i=w.createElement("area","display: block"),n=this;return e.name=this._nmarker_id,i.href="#",i.onclick=function(t){return L.preventDefault(t),!1},(x.browser.msie||x.browser.edge)&&(i.onmouseover=function(t){n.__hover||n._getListener("mouseenter")(t),n._dummImg.style.cursor=n._getCursorState()},i.onmouseout=function(t){n._getListener("mouseleave")(t),n._dummImg.style.cursor=""}),e.appendChild(i),e},_addListener:function(t){if(t&&(this.clickable||this.draggable))for(var e,i=0,n=H.length;ii&&((e=e.cloneNode(!0)).style.width=i+"px",n=w.calculateSize(e,t),w.removeElement(e),e=null),this.set("contentSize",n)},getElement:function(t){return t||this.element?(t=this.element||t.getMapView().getInfoWindowElement(),this.element=t):null},getWrapElement:function(){return this.wrapper},getContentElement:function(){return this.contentElement},setOptions:function(t){function i(t,e){"position"===t&&(e=_.box(e)),"anchorSize"===t&&(e=_.box(e,_.Size)),"pixelOffset"===t&&(e=_.box(e,_.Point)),n.set(t,e)}var n=this;"string"==typeof t?i(t,arguments[1]):_.forEach(t,function(t,e){i(e,t)}),this._disabled=!1,this._resizeRequired?this.resize():this._drawRequired&&this.draw(),this._resizeRequired=!1,this._drawRequired=!1},getOptions:function(t){var i=this,n={};return t!==p?this.get(t):(_.forEach(i.DEFAULT_OPTIONS,function(t,e){n[e]=i.get(e)}),n)},open:function(t,e){if(!t)throw new Error("unassigned map");var i;if(e&&(i=e.getPosition?e.getPosition().clone():_.box(e),this._iconAnchor=e.getAnchor&&e.getAnchor()?e.getAnchor().clone():M(0,0),this.set("position",i,!0)),!this.get("position"))throw new Error("position or anchor should be assigned.");this.getContent()||this.setContent(""),this.setMap(t),!1===this.get("disableAutoPan")&&this._panToVisible()},close:function(){this.setMap(null)},_panToVisible:function(){var t,e,i,n,o,s,r,a,h,l,c,p,u,d;!this.getMap()||(t=this.getMap()).getMapAction().isTranRunning()||(h=t.getMapModel(),i=(e=this.getProjection()).fromCoordToOffset(t.getCenter()),n=t.getSize(),l=this._boundary,h=h.get("containerTopLeft"),o=M(0,0),s=h.x+l.x,r=h.y+l.y,a=h.x+l.x+l.w,h=h.y+l.y+l.h,l=s<0,c=r<0,p=a>n.width,u=h>n.height,d=this.get("autoPanPadding"),l&&!p?o.x+=s-d.x:!l&&p&&(o.x+=a-n.width+d.x),c&&!u?o.y+=r-d.y:!c&&u&&(o.y+=h-n.height+d.y),0===o.x&&0===o.y)||(0<\/script>')}),e()},_async:function(t,e){function i(){n<=++o&&e()}for(var n=t.length,o=0,s=l.body||l.getElementsByTagName("head")[0],r=0,a=n;r