/* Copyright (C) NAVER corp. Licensed under LGPL v2. @see https://github.com/naver/smarteditor2/blob/master/LICENSE.md */ void 0===window.nhn&&(window.nhn={}),nhn.husky||(nhn.husky={}),function(){var d=/^\$(LOCAL|BEFORE|ON|AFTER)_/,r=/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/,c=[],a={};nhn.husky.HuskyCore=jindo.$Class({name:"HuskyCore",aCallerStack:null,bMobile:jindo.$Agent().navigator().mobile||jindo.$Agent().navigator().msafari,$init:function(e){this.htOptions=e||{},c.push(this),this.htOptions.oDebugger&&(nhn.husky.HuskyCore.getCore=function(){return c},this.htOptions.oDebugger.setApp(this)),this.messageQueue=[],this.oMessageMap={},this.oDisabledMessage={},this.oLazyMessage={},this.aPlugins=[],this.appStatus=nhn.husky.APP_STATUS.NOT_READY,this.aCallerStack=[],this._fnWaitForPluginReady=jindo.$Fn(this._waitForPluginReady,this).bind(),this.registerPlugin(this)},setDebugger:function(e){(this.htOptions.oDebugger=e).setApp(this)},exec:function(e,t,i){if(this.appStatus==nhn.husky.APP_STATUS.NOT_READY)return this.messageQueue[this.messageQueue.length]={msg:e,args:t,event:i},!0;this.exec=this._exec,this.exec(e,t,i)},delayedExec:function(e,t,i,n){var o=jindo.$Fn(this.exec,this).bind(e,t,n);setTimeout(o,i)},_exec:function(e,t,i){return(this._exec=this.htOptions.oDebugger?this._execWithDebugger:this._execWithoutDebugger).call(this,e,t,i)},_execWithDebugger:function(e,t,i){this.htOptions.oDebugger.log_MessageStart(e,t);var n=this._doExec(e,t,i);return this.htOptions.oDebugger.log_MessageEnd(e,t),n},_execWithoutDebugger:function(e,t,i){return this._doExec(e,t,i)},_doExec:function(e,t,i){var n=!1;if(this.oLazyMessage[e]){var o=this.oLazyMessage[e];return this._loadLazyFiles(e,t,i,o.aFilenames,0),!1}if(!this.oDisabledMessage[e]){var s=[];if(t&&t.length)for(var r=t.length,a=0;ae.nodeValue.length&&(t=e.nodeValue.length):t>nhn.DOMFix.childNodes(e).length&&(t=nhn.DOMFix.childNodes(e).length),t},setEnd:function(e,t,i,n){i||(t=this._endsNodeValidation(e,t)),this.endContainer=e,this.endOffset=t,n||(this.startContainer&&-1==this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)?this._updateRangeInfo():this.collapse(!1))},setEndAfter:function(e,t){if(!e)throw new Error("INVALID_NODE_TYPE_ERR in setEndAfter");"BODY"!=e.tagName?this.setEnd(nhn.DOMFix.parentNode(e),this._getPosIdx(e)+1,!0,t):this.setEnd(e,nhn.DOMFix.childNodes(e).length,!0,t)},setEndBefore:function(e,t){if(!e)throw new Error("INVALID_NODE_TYPE_ERR in setEndBefore");"BODY"!=e.tagName?this.setEnd(nhn.DOMFix.parentNode(e),this._getPosIdx(e),!0,t):this.setEnd(e,0,!0,t)},setStart:function(e,t,i,n){i||(t=this._endsNodeValidation(e,t)),this.startContainer=e,this.startOffset=t,n||(this.endContainer&&-1==this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)?this._updateRangeInfo():this.collapse(!0))},setStartAfter:function(e,t){if(!e)throw new Error("INVALID_NODE_TYPE_ERR in setStartAfter");"BODY"!=e.tagName?this.setStart(nhn.DOMFix.parentNode(e),this._getPosIdx(e)+1,!0,t):this.setStart(e,nhn.DOMFix.childNodes(e).length,!0,t)},setStartBefore:function(e,t){if(!e)throw new Error("INVALID_NODE_TYPE_ERR in setStartBefore");"BODY"!=e.tagName?this.setStart(nhn.DOMFix.parentNode(e),this._getPosIdx(e),!0,t):this.setStart(e,0,!0,t)},surroundContents:function(e){e.appendChild(this.extractContents()),this.insertNode(e),this.selectNode(e)},toString:function(){var e=this._document.createElement("DIV");return e.appendChild(this.cloneContents()),e.textContent||e.innerText||""},fixCommonAncestorContainer:function(){jindo.$Agent().navigator().ie&&(this.commonAncestorContainer=this._getCommonAncestorContainer())},_isBlankTextNode:function(e){return 3==e.nodeType&&""==e.nodeValue},_isAllChildBlankText:function(e){for(var t=0,i=e.childNodes.length;t=n.nodeValue.length?e:0===o?e:(n.splitText(o),{oStartContainer:t,iStartOffset:i,oEndContainer:n,iEndOffset:o}):e},_getNodesInRange:function(){if(this.collapsed)return[];var e=this._getActualStartNode(this.startContainer,this.startOffset),t=this._getActualEndNode(this.endContainer,this.endOffset);return this._getNodesBetween(e,t)},_getActualStartNode:function(e,t){var i=e;return 3==e.nodeType?t>=e.nodeValue.length?"BODY"==(i=this._getNextNode(e)).tagName&&(i=null):i=e:t)$/i,_rxTextAlign:/text-align:[^"';]*;?/i,setWindow:function(e){this.reset(e||window)},$init:function(e){this.HUSKY_BOOMARK_START_ID_PREFIX="husky_bookmark_start_",this.HUSKY_BOOMARK_END_ID_PREFIX="husky_bookmark_end_",this.sBlockElement="P|DIV|LI|H[1-6]|PRE",this.sBlockContainer="BODY|TABLE|TH|TR|TD|UL|OL|BLOCKQUOTE|FORM",this.rxBlockElement=new RegExp("^("+this.sBlockElement+")$"),this.rxBlockContainer=new RegExp("^("+this.sBlockContainer+")$"),this.rxLineBreaker=new RegExp("^("+this.sBlockElement+"|"+this.sBlockContainer+")$"),this.rxHasBlock=new RegExp("(?:<(?:"+this.sBlockElement+"|"+this.sBlockContainer+").*?>|style=[\"']?[^>]*?(?:display\\s?:\\s?block)[^>]*?[\"']?)","i"),this.setWindow(e)},select:function(){try{this.oBrowserSelection.selectRange(this)}catch(e){}},setFromSelection:function(e){this.setRange(this.oBrowserSelection.getRangeAt(e),!0)},setRange:function(e,t){this.reset(this._window),this.setStart(e.startContainer,e.startOffset,t,!0),this.setEnd(e.endContainer,e.endOffset,t)},setEndNodes:function(e,t){this.reset(this._window),this.setEndAfter(t,!0),this.setStartBefore(e)},splitTextAtBothEnds:function(){this._splitTextEndNodesOfTheRange()},getStartNode:function(){return this.collapsed?3==this.startContainer.nodeType?0===this.startOffset?null:this.startContainer.nodeValue.length<=this.startOffset?null:this.startContainer:null:3==this.startContainer.nodeType?this.startOffset>=this.startContainer.nodeValue.length?this._getNextNode(this.startContainer):this.startContainer:this.startOffset>=nhn.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):nhn.DOMFix.childNodes(this.startContainer)[this.startOffset]},getEndNode:function(){return this.collapsed?this.getStartNode():3==this.endContainer.nodeType?0===this.endOffset?this._getPrevNode(this.endContainer):this.endContainer:0===this.endOffset?this._getPrevNode(this.endContainer):nhn.DOMFix.childNodes(this.endContainer)[this.endOffset-1]},getNodeAroundRange:function(e,t){return this.collapsed?this.startContainer&&3==this.startContainer.nodeType?this.startContainer:(n=this.startOffset>=nhn.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):nhn.DOMFix.childNodes(this.startContainer)[this.startOffset],i=0===this.endOffset?this._getPrevNode(this.endContainer):nhn.DOMFix.childNodes(this.endContainer)[this.endOffset-1],e?(o=i)||t||(o=n):(o=n)||t||(o=i),o):this.getStartNode();var i,n,o},_getXPath:function(e){for(var t="";e&&1==e.nodeType;)t="/"+e.tagName+"["+this._getPosIdx4XPath(e)+"]"+t,e=nhn.DOMFix.parentNode(e);return t},_getPosIdx4XPath:function(e){for(var t=0,i=e.previousSibling;i;i=i.previousSibling)i.tagName==e.tagName&&t++;return t},_evaluateXPath:function(e,t){for(var i=(e=e.substring(1,e.length-1)).split(/\//),n=t.body,o=2;o/g,">").replace(/ /g," ").replace(/"/g,"""))},pasteHTML:function(e,t){var i=this._document.createElement("DIV");if(i.innerHTML=e,i.firstChild){var n=this.cloneRange(),o=n.placeStringBookmark(),s=n.getLineInfo(),r=s.oStart,a=s.oEnd;if(r.oLineBreaker&&"P"===r.oLineBreaker.nodeName&&(t||n.rxHasBlock.test(e))){var l=r.oLineBreaker.parentNode,h=r.oLineBreaker.nextSibling;if(n.deleteContents(),r.oLineBreaker===a.oLineBreaker){var d=n.getStringBookmark(o);n.setEndNodes(d,a.oLineBreaker);var c=n.extractContents(),_=c.firstChild;h?l.insertBefore(c,h):l.appendChild(c),h=_}i.style.cssText=r.oLineBreaker.style.cssText.replace(this._rxTextAlign,""),i.align=r.oLineBreaker.align,h?l.insertBefore(i,h):l.appendChild(i),n.removeStringBookmark(o),this._removeEmptyP(this._getPrevElement(i));var p=this._getNextElement(i);if(p){var E=this._getNextElement(p);E&&this._removeEmptyP(p)&&(p=E)}else(p=this._document.createElement("P")).style.cssText=r.oLineBreaker.style.cssText,p.align=r.oLineBreaker.align,l.appendChild(p);""===p.innerHTML&&(p.innerHTML=jindo.$Agent().navigator().ie&&8"+e.innerHTML+"":"line-through"===t&&(e.innerHTML=""+e.innerHTML+"")},_checkTextDecoration:function(e){if("SPAN"===e.tagName){var t=!1,i=!1,n=null;for(oChildNode=e.firstChild;oChildNode;){if(1===oChildNode.nodeType&&(t=t||"U"===oChildNode.tagName,i=i||"S"===oChildNode.tagName||"STRIKE"===oChildNode.tagName),t&&i)return;oChildNode=oChildNode.nextSibling}for(n=nhn.DOMFix.parentNode(e);n&&"BODY"!==n.tagName;)if(1===n.nodeType){if(!t&&this._hasTextDecoration(n,"underline")&&(t=!0,this._setTextDecoration(e,"underline")),!i&&this._hasTextDecoration(n,"line-through")&&(i=!0,this._setTextDecoration(e,"line-through")),t&&i)return;n=nhn.DOMFix.parentNode(n)}else n=nhn.DOMFix.parentNode(n)}},styleRange:function(e,t,i,n,o){var s=this.aStyleParents=this._getStyleParentNodes(i,n);if(!(s.length<1)){for(var r,a,l=0;lc.nodeValue.length&&c.nextSibling;)p-=c.nodeValue.length,c=c.nextSibling;c.nodeValue;t&&c.nextSibling&&3==c.nextSibling.nodeType&&p==c.nodeValue.length&&(p-=c.nodeValue.length,c=c.nextSibling),n=c,o=p}else n=i.parentElement(),o=l;return{oContainer:n,iOffset:o}}},nhn.DOMFix=new(jindo.$Class({$init:function(){jindo.$Agent().navigator().ie||jindo.$Agent().navigator().opera?(this.childNodes=this._childNodes_Fix,this.parentNode=this._parentNode_Fix):(this.childNodes=this._childNodes_Native,this.parentNode=this._parentNode_Native)},_parentNode_Native:function(e){return e.parentNode},_parentNode_Fix:function(e){if(!e)return e;for(;e.previousSibling;)e=e.previousSibling;return e.parentNode},_childNodes_Native:function(e){return e.childNodes},_childNodes_Fix:function(e){var t=null,i=0;if(e){t=[];for(e=e.firstChild;e;)e=(t[i++]=e).nextSibling}return t}})),nhn.husky.CorePlugin=jindo.$Class({name:"CorePlugin",htLazyLoadRequest_plugins:{},htLazyLoadRequest_allFiles:{},htHTMLLoaded:{},$AFTER_MSG_APP_READY:function(){this.oApp.exec("EXEC_ON_READY_FUNCTION",[])},$ON_ADD_APP_PROPERTY:function(e,t){this.oApp[e]=t},$ON_REGISTER_BROWSER_EVENT:function(e,t,i,n,o){this.oApp.registerBrowserEvent(e,t,i,n,o)},$ON_DISABLE_MESSAGE:function(e){this.oApp.disableMessage(e,!0)},$ON_ENABLE_MESSAGE:function(e){this.oApp.disableMessage(e,!1)},$ON_LOAD_FULL_PLUGIN:function(e,t,i,n,o){n.$this;var s=e[0];this.htLazyLoadRequest_plugins[s]||(this.htLazyLoadRequest_plugins[s]={nStatus:1,sContents:""}),2===this.htLazyLoadRequest_plugins[s].nStatus?this.oApp.exec("MSG_FULL_PLUGIN_LOADED",[s,t,i,n,o,!1]):this._loadFullPlugin(e,t,i,n,o,0)},_loadFullPlugin:function(e,t,i,n,o,s){jindo.LazyLoading.load(nhn.husky.SE2M_Configuration.LazyLoad.sJsBaseURI+"/"+e[s],jindo.$Fn(function(e,t,i,n,o,s){e[s];var r=e[0];if(s==e.length-1)return this.htLazyLoadRequest_plugins[r].nStatus=2,void this.oApp.exec("MSG_FULL_PLUGIN_LOADED",[e,t,i,n,o]);this._loadFullPlugin(e,t,i,n,o,s+1)},this).bind(e,t,i,n,o,s),"utf-8")},$ON_MSG_FULL_PLUGIN_LOADED:function(aFilenames,sClassName,sMsgName,oThisRef,oArguments,oRes){for(var oPluginRef=oThisRef.$this||oThisRef,sFilename=aFilenames,i=0,nLen=oThisRef._huskyFLT.length;ili>button"))},$LOCAL_BEFORE_FIRST:function(e){var t=jindo.$$(">ul>li[class*="+this.sUIClassPrefix+"]>button",this.elTextTool),i=t.length;this.elFirstToolbarItem=this.elFirstToolbarItem||t[0],this.elLastToolbarItem=t[i-1],this.oApp.registerBrowserEvent(this.toolbarArea,"keydown","NAVIGATE_TOOLBAR",[])},$init:function(e,t){this._htOptions=t||{},this.htUIList={},this.htWrappedUIList={},this.aUICmdMap={},this._assignHTMLElements(e)},$ON_MSG_APP_READY:function(){this.oApp.bMobile?this.oApp.registerBrowserEvent(this.toolbarArea,"touchstart","EVENT_TOOLBAR_TOUCHSTART"):(this.oApp.registerBrowserEvent(this.toolbarArea,"mouseover","EVENT_TOOLBAR_MOUSEOVER"),this.oApp.registerBrowserEvent(this.toolbarArea,"mouseout","EVENT_TOOLBAR_MOUSEOUT")),this.oApp.registerBrowserEvent(this.toolbarArea,"mousedown","EVENT_TOOLBAR_MOUSEDOWN"),this.oApp.exec("ADD_APP_PROPERTY",["getToolbarButtonByUIName",jindo.$Fn(this.getToolbarButtonByUIName,this).bind()]),this._htOptions.aDisabled&&(this._htOptions._sDisabled=","+this._htOptions.aDisabled.toString()+",",this.oApp.exec("DISABLE_UI",[this._htOptions.aDisabled]))},$ON_NAVIGATE_TOOLBAR:function(e){e.element==this.elLastToolbarItem&&9==e.key().keyCode&&(e.key().shift||(this.elFirstToolbarItem.focus(),e.stopDefault())),e.element==this.elFirstToolbarItem&&9==e.key().keyCode&&e.key().shift&&(e.stopDefault(),this.elLastToolbarItem.focus())},$ON_TOGGLE_TOOLBAR_ACTIVE_LAYER:function(e,t,i,n,o,s){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[e,"MSG_TOOLBAR_LAYER_SHOWN",[e,t,i,n],o,s])},$ON_MSG_TOOLBAR_LAYER_SHOWN:function(e,t,i,n){this.oApp.exec("POSITION_TOOLBAR_LAYER",[e,t]),i&&this.oApp.exec(i,n)},$ON_SHOW_TOOLBAR_ACTIVE_LAYER:function(e,t,i,n){this.oApp.exec("SHOW_ACTIVE_LAYER",[e,t,i]),this.oApp.exec("POSITION_TOOLBAR_LAYER",[e,n])},$ON_ENABLE_UI:function(e){this._enableUI(e)},$ON_DISABLE_UI:function(e){if(e instanceof Array)for(var t,i=0;t=e[i];i++)this._disableUI(t);else this._disableUI(e)},$ON_SELECT_UI:function(e){var t=this.htWrappedUIList[e];t&&(t.removeClass("hover"),t.addClass("active"))},$ON_DESELECT_UI:function(e){var t=this.htWrappedUIList[e];t&&t.removeClass("active")},$ON_TOGGLE_UI_SELECTED:function(e){var t=this.htWrappedUIList[e];t&&(t.hasClass("active")?t.removeClass("active"):(t.removeClass("hover"),t.addClass("active")))},$ON_ENABLE_ALL_UI:function(e){if(1!==this.nUIStatus){var t;e=e||{};var i=jindo.$A(e.aExceptions||[]);for(t in this.htUIList)t&&!i.has(t)&&this._enableUI(t);this.nUIStatus=1}},$ON_DISABLE_ALL_UI:function(e){if(2!==this.nUIStatus){var t;e=e||{};var i=jindo.$A(e.aExceptions||[]),n=e.bLeaveActiveLayer||!1;for(t in n||this.oApp.exec("HIDE_ACTIVE_LAYER"),this.htUIList)t&&!i.has(t)&&this._disableUI(t);this.nUIStatus=2}},$ON_MSG_STYLE_CHANGED:function(e,t){"@^"===t?this.oApp.exec("SELECT_UI",[e]):this.oApp.exec("DESELECT_UI",[e])},$ON_POSITION_TOOLBAR_LAYER:function(e,t){var i,n,o,s;e=jindo.$(e),t=t||{};var r=jindo.$(t.elBtn),a=t.sAlign;if(e){r&&r.tagName&&"BUTTON"==r.tagName&&r.parentNode.appendChild(e);var l=jindo.$Element(e);"right"!=a?(e.style.left="0",n=(i=l.offset().left)+e.offsetWidth,(s=(o=this.welToolbarArea.offset().left)+this.toolbarArea.offsetWidth)this.oApp.elEditingAreaContainer.offsetHeight&&(e.style.top="number"==typeof t?i-e.offsetHeight-t+"px":this.oApp.elEditingAreaContainer.offsetHeight-e.offsetHeight+"px"),parseInt(e.style.left,10)+e.offsetWidth>this.oApp.elEditingAreaContainer.offsetWidth&&(e.style.left=this.oApp.elEditingAreaContainer.offsetWidth-e.offsetWidth+"px")},$ON_EVENT_EDITING_AREA_KEYDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_EVENT_EDITING_AREA_MOUSEDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_EVENT_EDITING_AREA_SCROLL:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},_setEditingAreaDimension:function(e){e=e||this.oActivePlugin,this._fitElementInEditingArea(e.elEditingArea)},_fitElementInEditingArea:function(e){e.style.height=this.elEditingAreaContainer.offsetHeight+"px"},attachDocumentEvents:function(e){this.oApp.registerBrowserEvent(e,"click","EVENT_EDITING_AREA_CLICK"),this.oApp.registerBrowserEvent(e,"dblclick","EVENT_EDITING_AREA_DBLCLICK"),this.oApp.registerBrowserEvent(e,"mousedown","EVENT_EDITING_AREA_MOUSEDOWN"),this.oApp.registerBrowserEvent(e,"mousemove","EVENT_EDITING_AREA_MOUSEMOVE"),this.oApp.registerBrowserEvent(e,"mouseup","EVENT_EDITING_AREA_MOUSEUP"),this.oApp.registerBrowserEvent(e,"mouseout","EVENT_EDITING_AREA_MOUSEOUT"),this.oApp.registerBrowserEvent(e,"mousewheel","EVENT_EDITING_AREA_MOUSEWHEEL"),this.oApp.registerBrowserEvent(e,"keydown","EVENT_EDITING_AREA_KEYDOWN"),this.oApp.registerBrowserEvent(e,"keypress","EVENT_EDITING_AREA_KEYPRESS"),this.oApp.registerBrowserEvent(e,"keyup","EVENT_EDITING_AREA_KEYUP"),this.oApp.registerBrowserEvent(e,"scroll","EVENT_EDITING_AREA_SCROLL")},$ON_GET_COVER_DIV:function(e,t){this.elEditingAreaCover&&(t[e]=this.elEditingAreaCover)},$ON_SHOW_LOADING_LAYER:function(){this.elLoadingLayer.style.display="block"},$ON_HIDE_LOADING_LAYER:function(){this.elLoadingLayer.style.display="none"},getIR:function(){return this.oActivePlugin?this.oActivePlugin.getIR():""},setIR:function(e,t){this.oApp.exec("SET_IR",[e,t])},getRawContents:function(){return this.oActivePlugin?this.oActivePlugin.getRawContents():""},getContents:function(){this._convertLastBrToNbsp();var e,t=this.oApp.getIR();return e=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_DB",t,this.oApp.getWYSIWYGDocument()):t,e=this._cleanContents(e)},_convertLastBrToNbsp:function(){for(var e,t,i,n,o,s,r,a,l,h,d,c=this.oApp.getWYSIWYGDocument().body,_=document.createTextNode(" "),p=0,E=(e=jindo.$$("br:last-child",c,{oneTimeOffCache:!0})).length;p]*>)"+unescape("%uFEFF"),"ig"),"$1")},setContents:function(e,t){var i;i=this.oApp.applyConverter?this.oApp.applyConverter("DB_TO_IR",e,this.oApp.getWYSIWYGDocument()):e,this.oApp.exec("SET_IR",[i,t])},getEditingMode:function(){return this.oActivePlugin.sMode},getEditingAreaWidth:function(){return this.elEditingAreaContainer.offsetWidth},getEditingAreaHeight:function(){return this.elEditingAreaContainer.offsetHeight}});var nSE2Version="4a256db";function fontProperty(e,t,i,n,o){this.fontId=e,this.fontName=t,this.defaultSize=i,this.fontURL=n,this.fontCSSURL=o,this.displayName=t,this.isLoaded=!0,this.fontFamily=this.fontId,""!=this.fontCSSURL?(this.displayName+=""+i,this.fontFamily+="_"+i,this.isLoaded=!1,this.loadCSS=function(e){this.isLoaded||(this._importCSS(e),this.isLoaded=!0)},this.loadCSSToMenu=function(){this._importCSS(document)},this._importCSS=function(e){var t=e.styleSheets.length,i=e.styleSheets[t-1];(0===t||30this.nBodyMinHeight?(i=this.oApp.getCurrentStyle(),(n=this._getStyleSize(i))this.nBodyMinHeight?(i=this.oApp.getCurrentStyle(),(n=this._getStyleSize(i))=t.nTop&&e.nBottom<=t.nBottom},_scrollIntoView:function(e){var t,i=this._getElementVerticalPosition(e),n=this._getVisibleVerticalPosition();this._isElementVisible(i,n)||(0<(t=i.nBottom-n.nBottom)?this.getWindow().scrollTo(0,n.nTop+t):this.getWindow().scrollTo(0,i.nTop))},$BEFORE_MSG_EDITING_AREA_RESIZE_STARTED:function(){if(!jindo.$Agent().navigator().ie){var e=null;e=this.oApp.getSelection(),this.sBM=e.placeStringBookmark()}},$AFTER_MSG_EDITING_AREA_RESIZE_ENDED:function(e,t,i){if(this.oApp.getEditingMode()===this.sMode&&!jindo.$Agent().navigator().ie){var n=this.oApp.getEmptySelection();n.moveToBookmark(this.sBM),n.select(),n.removeStringBookmark(this.sBM)}},$ON_CLEAR_IE_BACKUP_SELECTION:function(){this._oIERange=null},$ON_RESTORE_IE_SELECTION:function(){if(this._oIERange)try{this._oIERange.select(),this._oPrevIERange=this._oIERange,this._oIERange=null}catch(e){}},$ON_EVENT_EDITING_AREA_PASTE:function(e){this.oApp.delayedExec("EVENT_EDITING_AREA_PASTE_DELAY",[e],0)},$ON_EVENT_EDITING_AREA_PASTE_DELAY:function(e){this._replaceBlankToNbsp(e.element)},_replaceBlankToNbsp:function(e){var t=this.oApp.oNavigator;if(t.ie&&9===t.nativeVersion&&7===document.documentMode&&1===e.nodeType&&"BR"!==e.tagName){var i=jindo.$$("p:empty()",this.oApp.getWYSIWYGDocument().body,{oneTimeOffCache:!0});jindo.$A(i).forEach(function(e,t,i){e.innerHTML=" "})}},_pageUp:function(e){var t,i=this._getEditorHeight(),n=jindo.$Document(this.oApp.getWYSIWYGDocument()).scrollPosition();t=n.top<=i?0:n.top-i,this.oApp.getWYSIWYGWindow().scrollTo(0,t),e.stop()},_pageDown:function(e){var t,i=this._getEditorHeight(),n=jindo.$Document(this.oApp.getWYSIWYGDocument()).scrollPosition(),o=this._getBodyHeight();t=n.top+i>=o?o-i:n.top+i,this.oApp.getWYSIWYGWindow().scrollTo(0,t),e.stop()},_getEditorHeight:function(){return this.oApp.elEditingAreaContainer.offsetHeight-this.nTopBottomMargin},_getBodyHeight:function(){return parseInt(this.getDocument().body.scrollHeight,10)},initIframe:function(){try{if(!this.iframe.contentWindow.document||!this.iframe.contentWindow.document.body||"about:blank"===this.iframe.contentWindow.document.location.href)throw new Error("Access denied");var e=nhn.husky.SE2M_Configuration.SE2M_CSSLoader&&nhn.husky.SE2M_Configuration.SE2M_CSSLoader.sCSSBaseURI?nhn.husky.SE2M_Configuration.SE2M_CSSLoader.sCSSBaseURI:"";if(nhn.husky.SE2M_Configuration.SE_EditingAreaManager.sCSSBaseURI&&(e=nhn.husky.SE2M_Configuration.SE_EditingAreaManager.sCSSBaseURI),e){var t=e,i=this.oApp&&this.oApp.htOptions.I18N_LOCALE;i&&(t+="/"+i),t+="/smart_editor2_in.css";var n=this.getDocument(),o=n.getElementsByTagName("head")[0],s=n.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=jindo.$Fn(function(){this.oApp&&this.oApp.getEditingMode&&this.oApp.getEditingMode()===this.sMode&&this.oApp.exec("RESET_STYLE_STATUS"),s.onload=null},this).bind(),o.appendChild(s)}this._enableWYSIWYG(),this.status=nhn.husky.PLUGIN_STATUS.READY}catch(e){if(!(0";if(""===(t=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+this.sMode,e,this.oApp.getWYSIWYGDocument()):e).replace(/[\r\n\t\s]*/,"")&&("BR"!==this.oApp.sLineBreaker&&(n="

"+n+"

"),t=n),this.iframe.contentWindow.document.body.innerHTML=t,i&&this.oApp.getEditingMode()===this.sMode)for(var o=this.oApp.getWYSIWYGDocument().body.getElementsByTagName("P"),s=0,r=o.length;s"!==e.toLowerCase()&&"

 

"!==e.toLowerCase()&&"


"!==e.toLowerCase()&&"

"!==e.toLowerCase()||(e="");var t=jindo.$Agent().navigator();t.ie&&11==t.nativeVersion&&11==document.documentMode&&(e=e.replace(/(

$)/,""));var i=e;this.oApp.applyConverter&&(i=this.oApp.applyConverter("IR_TO_"+this.sMode,i,this.oApp.getWYSIWYGDocument())),this.setRawContents(i)},setRawContents:function(e){void 0!==e&&(this.elEditingArea.value=e)},getRawContents:function(){return this.elEditingArea.value},focus:function(){this.elEditingArea.focus()}}),void 0===window.TextRange&&(window.TextRange={}),TextRange=function(e,t){this._o=e,this._oDoc=t||document},TextRange.prototype.getSelection=function(){var e=this._o,t=[-1,-1];if(isNaN(this._o.selectionStart)){e.focus();var i=this._oDoc.body.createTextRange(),n=null;n=this._oDoc.selection.createRange().duplicate(),i.moveToElementText(e),n.collapse(!0),i.setEndPoint("EndToEnd",n),t[0]=i.text.length,n=this._oDoc.selection.createRange().duplicate(),i.moveToElementText(e),n.collapse(!1),i.setEndPoint("EndToEnd",n),t[1]=i.text.length,e.blur()}else t[0]=e.selectionStart,t[1]=e.selectionEnd;return t},TextRange.prototype.setSelection=function(e,t){var i=this._o;if(void 0===t&&(t=e),i.setSelectionRange)i.setSelectionRange(e,t);else if(i.createTextRange){var n=i.createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t-e),n.select(),i.blur()}},TextRange.prototype.copy=function(){var e=this.getSelection();return this._o.value.substring(e[0],e[1])},TextRange.prototype.paste=function(e){var t=this._o,i=this.getSelection(),n=t.value,o=n.substr(0,i[0]);n=o+e+n.substr(i[1]),t.value=n;var s=0;if(void 0===this._oDoc.body.style.maxHeight){var r=o.match(/\n/gi);s=null!==r?r.length:0}this.setSelection(i[0]+e.length-s)},TextRange.prototype.cut=function(){var e=this.copy();return this.paste(""),e},nhn.husky.SE_EditingArea_TEXT=jindo.$Class({name:"SE_EditingArea_TEXT",sMode:"TEXT",sRxConverter:"@[0-9]+@",bAutoResize:!1,nMinHeight:null,$init:function(e){this.elEditingArea=jindo.$(e)},$BEFORE_MSG_APP_READY:function(){this.oNavigator=jindo.$Agent().navigator(),this.oApp.exec("REGISTER_EDITING_AREA",[this]),this.oApp.exec("ADD_APP_PROPERTY",["getTextAreaContents",jindo.$Fn(this.getRawContents,this).bind()])},$ON_MSG_APP_READY:function(){this.oApp.getEditingAreaHeight&&(this.nMinHeight=this.oApp.getEditingAreaHeight())},$ON_REGISTER_CONVERTERS:function(){this.oApp.exec("ADD_CONVERTER",["IR_TO_TEXT",jindo.$Fn(this.irToText,this).bind()]),this.oApp.exec("ADD_CONVERTER",["TEXT_TO_IR",jindo.$Fn(this.textToIr,this).bind()])},$ON_CHANGE_EDITING_MODE:function(e){e==this.sMode?(this.elEditingArea.style.display="block",this.elEditingArea.style.position="absolute",this.elEditingArea.style.top="0px"):(this.elEditingArea.style.display="none",this.elEditingArea.style.position="",this.elEditingArea.style.top="")},$AFTER_CHANGE_EDITING_MODE:function(e,t){e!=this.sMode||t||new TextRange(this.elEditingArea).setSelection(0,0)},irToText:function(e){var t,i=e,n=i.match(new RegExp(this.sRxConverter));return null!==n&&(i=i.replace(new RegExp(this.sRxConverter),"")),-1<(t=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=i.replace(/\r/g,"")).replace(/[\n|\t]/g,"")).replace(/[\v|\f]/g,"")).replace(/


<\/p>/gi,"\n")).replace(/

 <\/P>/gi,"\n")).replace(//gi,"\n")).replace(//gi,"\n")).replace(/<\/p(\s[^\/]*)?>/gi,"\n")).replace(/<\/li(\s[^\/]*)?>/gi,"\n")).replace(/<\/tr(\s[^\/]*)?>/gi,"\n")).lastIndexOf("\n"))&&"\n"==i.substring(t)&&(i=i.substring(0,t)),i=jindo.$S(i).stripTags().toString(),i=this.unhtmlSpecialChars(i),null!==n&&(i=n[0]+i),i},textToIr:function(e){if(e){var t,i=e;return null!==(t=i.match(new RegExp(this.sRxConverter)))&&(i=i.replace(t[0],"")),i=this.htmlSpecialChars(i),i=this._addLineBreaker(i),null!==t&&(i=t[0]+i),i}},_addLineBreaker:function(e){if("BR"===this.oApp.sLineBreaker)return e.replace(/\r?\n/g,"
");for(var t=new StringBuffer,i=e.split("\n"),n=i.length,o="",s=0;s"),t.append(i[s]),t.append("

")):jindo.$Agent().navigator().ie?t.append("

 

"):t.append("


");return t.toString()},startAutoResize:function(){var e={nMinHeight:this.nMinHeight,wfnCallback:jindo.$Fn(this.oApp.checkResizeGripPosition,this).bind()};this.oNavigator.msafari&&(e.wfnCallback=function(){}),this.bAutoResize=!0,this.AutoResizer=new nhn.husky.AutoResizer(this.elEditingArea,e),this.AutoResizer.bind()},stopAutoResize:function(){this.AutoResizer.unbind()},getIR:function(){var e=this.getRawContents();return this.oApp.applyConverter&&(e=this.oApp.applyConverter(this.sMode+"_TO_IR",e,this.oApp.getWYSIWYGDocument())),e},setIR:function(e){var t=e;this.oApp.applyConverter&&(t=this.oApp.applyConverter("IR_TO_"+this.sMode,t,this.oApp.getWYSIWYGDocument())),this.setRawContents(t)},setRawContents:function(e){void 0!==e&&(this.elEditingArea.value=e)},getRawContents:function(){return this.elEditingArea.value},focus:function(){this.elEditingArea.focus()},htmlSpecialChars:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/ /g," ")},unhtmlSpecialChars:function(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/ /g," ").replace(/&/g,"&")}}),nhn.husky.SE_EditingAreaVerticalResizer=jindo.$Class({name:"SE_EditingAreaVerticalResizer",oResizeGrip:null,sCookieNotice:"bHideResizeNotice",nEditingAreaMinHeight:null,htConversionMode:null,$init:function(e,t){this.htConversionMode=t,this._assignHTMLElements(e)},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["isUseVerticalResizer",jindo.$Fn(this.isUseVerticalResizer,this).bind()])},$ON_MSG_APP_READY:function(){this.oApp.bMobile?(this.oResizeGrip.disabled=!0,this.oResizeGrip.style.height="0"):(this.oApp.exec("REGISTER_HOTKEY",["shift+esc","FOCUS_RESIZER"]),this.isUseVerticalResizer()?(this.oResizeGrip.style.display="block",this.welNoticeLayer&&!Number(jindo.$Cookie().get(this.sCookieNotice))&&(this.welNoticeLayer.delegate("click","BUTTON.bt_clse",jindo.$Fn(this._closeNotice,this).bind()),this.welNoticeLayer.show()),this.$FnMouseDown=jindo.$Fn(this._mousedown,this),this.$FnMouseMove=jindo.$Fn(this._mousemove,this),this.$FnMouseUp=jindo.$Fn(this._mouseup,this),this.$FnMouseOver=jindo.$Fn(this._mouseover,this),this.$FnMouseOut=jindo.$Fn(this._mouseout,this),this.$FnMouseDown.attach(this.oResizeGrip,"mousedown"),this.$FnMouseOver.attach(this.oResizeGrip,"mouseover"),this.$FnMouseOut.attach(this.oResizeGrip,"mouseout")):(this.oResizeGrip.style.display="none",this.oApp.isUseModeChanger()||(this.elModeToolbar.style.display="none"))),this.oApp.exec("ADD_APP_PROPERTY",["checkResizeGripPosition",jindo.$Fn(this.checkResizeGripPosition,this).bind()]),this.oApp.getEditingAreaHeight&&(this.nEditingAreaMinHeight=this.oApp.getEditingAreaHeight())},$ON_DISABLE_ALL_UI:function(){this.oResizeGrip.style.cursor="default",this.welConversionMode.addClass("off"),this.oResizeGrip.disabled=!0},$ON_ENABLE_ALL_UI:function(){this.oResizeGrip.style.cursor="n-resize",this.welConversionMode.removeClass("off"),this.oResizeGrip.disabled=!1},isUseVerticalResizer:function(){return void 0===this.htConversionMode||void 0===this.htConversionMode.bUseVerticalResizer||!0===this.htConversionMode.bUseVerticalResizer},checkResizeGripPosition:function(e){var t=jindo.$Document(),i=jindo.$Element(this.oResizeGrip).offset().top-t.scrollPosition().top+25-t.clientSize().height;i<=0||(e&&(this.nEditingAreaMinHeight>this.oApp.getEditingAreaHeight()-i&&(i=-1*(this.nEditingAreaMinHeight-this.oApp.getEditingAreaHeight())),this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED"),this.oApp.exec("RESIZE_EDITING_AREA_BY",[0,-1*i]),this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED")),this.oApp.exec("STOP_AUTORESIZE_EDITING_AREA"))},$ON_FOCUS_RESIZER:function(){this.oApp.exec("IE_HIDE_CURSOR"),this.oResizeGrip.focus()},_assignHTMLElements:function(e,t){this.oResizeGrip=jindo.$$.getSingle("BUTTON.husky_seditor_editingArea_verticalResizer",e),this.elModeToolbar=jindo.$$.getSingle("DIV.se2_conversion_mode",e),this.welNoticeLayer=jindo.$Element(jindo.$$.getSingle("DIV.husky_seditor_resize_notice",e)),this.welConversionMode=jindo.$Element(this.oResizeGrip.parentNode)},_mouseover:function(e){e.stopBubble(),this.welConversionMode.addClass("controller_on")},_mouseout:function(e){e.stopBubble(),this.welConversionMode.removeClass("controller_on")},_mousedown:function(e){this.iStartHeight=e.pos().clientY,this.iStartHeightOffset=e.pos().layerY,this.$FnMouseMove.attach(document,"mousemove"),this.$FnMouseUp.attach(document,"mouseup"),this.iStartHeight=e.pos().clientY,this.oApp.exec("HIDE_ACTIVE_LAYER"),this.oApp.exec("HIDE_ALL_DIALOG_LAYER"),this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])},_mousemove:function(e){var t=e.pos().clientY-this.iStartHeight;this.oApp.exec("RESIZE_EDITING_AREA_BY",[0,t])},_mouseup:function(e){this.$FnMouseMove.detach(document,"mousemove"),this.$FnMouseUp.detach(document,"mouseup"),this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])},_closeNotice:function(){this.welNoticeLayer.hide(),jindo.$Cookie().set(this.sCookieNotice,1,3650)}}),nhn.husky.SE_WYSIWYGEnterKey=jindo.$Class({name:"SE_WYSIWYGEnterKey",$init:function(e){this.sLineBreaker="BR"==e?"BR":"P",this.htBrowser=jindo.$Agent().navigator(),this.htBrowser.opera&&"P"==this.sLineBreaker&&(this.$ON_MSG_APP_READY=function(){}),this.htBrowser.ie?this._addCursorHolder=this._addCursorHolderSpace:(this._addExtraCursorHolder=function(){},this._addBlankText=function(){})},$ON_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["sLineBreaker",this.sLineBreaker]),this.oSelection=this.oApp.getEmptySelection(),this.tmpTextNode=this.oSelection._document.createTextNode(unescape("%u00A0")),jindo.$Fn(this._onKeyDown,this).attach(this.oApp.getWYSIWYGDocument(),"keydown")},_onKeyDown:function(e){var t=e.key();t.shift||t.enter&&("BR"==this.sLineBreaker?this._insertBR(e):this._wrapBlock(e))},$ON_REGISTER_CONVERTERS:function(){this.oApp.exec("ADD_CONVERTER",["IR_TO_DB",jindo.$Fn(this.onIrToDB,this).bind()])},onIrToDB:function(e){var t=e,i=/(]*>)(?:\s*)(<\/p>)/gi;return t=this.htBrowser.ie&&this.htBrowser.version<11?t.replace(i,"$1 $2"):t.replace(i,"")},_addBlankText:function(e){var t,i,n,o,s,r=e.getNodes();for(t=0,i=r.length;t"),t||(t=this._getStyleNode(e)),t},_addCursorHolderSpace:function(e){var t;if(this._addSpace(e),""==(t=this._getStyleNode(e)).innerHTML&&"param"!=t.nodeName.toLowerCase())try{t.innerHTML=unescape("%uFEFF")}catch(e){}return t},_getBlockEndNode:function(e,t){return e?"BR"===e.nodeName?e:e===t?t:this._getBlockEndNode(e.nextSibling,t):t},_convertHeadSpace:function(e){if(e&&3===e.nodeType){for(var t,i=e.nodeValue,n="",o=0;(t=i[o])&&" "===t;o++)n+=" ";0"),t.collapseToEnd())}}t.insertNode(this.oApp.getWYSIWYGDocument().createTextNode("")),t.select()}}),nhn.husky.SE2M_EditingModeChanger=jindo.$Class({name:"SE2M_EditingModeChanger",htConversionMode:null,$init:function(e,t){this.htConversionMode=t,this._assignHTMLElements(e)},_assignHTMLElements:function(e){e=jindo.$(e)||document,this.elWYSIWYGButton=jindo.$$.getSingle("BUTTON.se2_to_editor",e),this.elHTMLSrcButton=jindo.$$.getSingle("BUTTON.se2_to_html",e),this.elTEXTButton=jindo.$$.getSingle("BUTTON.se2_to_text",e),this.elModeToolbar=jindo.$$.getSingle("DIV.se2_conversion_mode",e),this.welWYSIWYGButtonLi=jindo.$Element(this.elWYSIWYGButton.parentNode),this.welHTMLSrcButtonLi=jindo.$Element(this.elHTMLSrcButton.parentNode),this.welTEXTButtonLi=jindo.$Element(this.elTEXTButton.parentNode)},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["isUseModeChanger",jindo.$Fn(this.isUseModeChanger,this).bind()])},$ON_MSG_APP_READY:function(){this.oApp.htOptions.bOnlyTextMode?(this.elWYSIWYGButton.style.display="none",this.elHTMLSrcButton.style.display="none",this.elTEXTButton.style.display="block",this.oApp.exec("CHANGE_EDITING_MODE",["TEXT"])):(this.oApp.registerBrowserEvent(this.elWYSIWYGButton,"click","EVENT_CHANGE_EDITING_MODE_CLICKED",["WYSIWYG"]),this.oApp.registerBrowserEvent(this.elHTMLSrcButton,"click","EVENT_CHANGE_EDITING_MODE_CLICKED",["HTMLSrc"]),this.oApp.registerBrowserEvent(this.elTEXTButton,"click","EVENT_CHANGE_EDITING_MODE_CLICKED",["TEXT",!1]),this.showModeChanger(),!1===this.isUseModeChanger()&&!1===this.oApp.isUseVerticalResizer()&&(this.elModeToolbar.style.display="none"))},showModeChanger:function(){this.isUseModeChanger()?(this.elWYSIWYGButton.style.display="block",this.elHTMLSrcButton.style.display="block",this.elTEXTButton.style.display="block"):(this.elWYSIWYGButton.style.display="none",this.elHTMLSrcButton.style.display="none",this.elTEXTButton.style.display="none")},isUseModeChanger:function(){return void 0===this.htConversionMode||void 0===this.htConversionMode.bUseModeChanger||!0===this.htConversionMode.bUseModeChanger},$ON_EVENT_CHANGE_EDITING_MODE_CLICKED:function(e,t){if("TEXT"==e){if(0]*)?>(?:.|\r|\n)*?<\/style>/gi,_rxStyleTagStrip:/<\/?style(?:\s+[^>]*)?>/gi,_rxClassSelector:/\w*\.\w+/g,_rxClassSelectorStart:/\w*\./g,$init:function(){},_getTmpDocument:function(){if(!this._oTmpDoc){var e=document.createElement("IFRAME");e.style.display="none",document.body.appendChild(e);var t=e.contentWindow.document;t.open(),t.write(""),t.close(),this._oTmpDoc=t}return this._oTmpDoc},_getCSSStyleRule:function(e){for(var t,i={},n=0;t=e[n];n++)t.type===CSSRule.STYLE_RULE&&(i[t.selectorText]=t.style);return i},_extractStyle:function(e){if(e){var t=(e.match(this._rxStyleTag)||[]).join("\n");t=t.replace(this._rxStyleTagStrip,"");var i=this._getTmpDocument(),n=i.getElementsByTagName("HEAD")[0],o=i.createElement("STYLE");o.innerHTML=t,n.appendChild(o),this._htStyleRule=this._getCSSStyleRule(o.sheet.cssRules),o.parentNode.removeChild(o)}},_applyInlineStyle:function(e,t,i){for(var n,o=0,s=t.length;oo.nRecursiveCount&&(i=!0):i=!0}}i&&this._insertDummyParagraph_IE(e)},_insertDummyParagraph_IE:function(e){this._elDummyParagraph=document.createElement("P"),e.appendChild(this._elDummyParagraph)},_removeDummyParagraph_IE:function(){this._elDummyParagraph&&this._elDummyParagraph.parentNode&&this._elDummyParagraph.parentNode.removeChild(this._elDummyParagraph)},$ON_EXECCOMMAND:function(e,t,i){var n={},o=this.oApp.getSelection();if(t=!(""!=t&&!t)&&t,i=!(""!=i&&!i)&&i,this.oApp.exec("IS_SELECTED_TD_BLOCK",["bIsSelectedTd",n]),n.bIsSelectedTd)"indent"==e?this.oApp.exec("SET_LINE_BLOCK_STYLE",[null,jindo.$Fn(this._indentMargin,this).bind()]):"outdent"==e?this.oApp.exec("SET_LINE_BLOCK_STYLE",[null,jindo.$Fn(this._outdentMargin,this).bind()]):this._setBlockExecCommand(e,t,i);else switch(e){case"indent":case"outdent":this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",[e]);var s=o.placeStringBookmark();"indent"===e?this.oApp.exec("SET_LINE_STYLE",[null,jindo.$Fn(this._indentMargin,this).bind(),{bDoNotSelect:!0,bDontAddUndoHistory:!0}]):this.oApp.exec("SET_LINE_STYLE",[null,jindo.$Fn(this._outdentMargin,this).bind(),{bDoNotSelect:!0,bDontAddUndoHistory:!0}]),o.moveToStringBookmark(s),o.select(),o.removeStringBookmark(s),setTimeout(jindo.$Fn(function(e){this.oApp.exec("RECORD_UNDO_AFTER_ACTION",[e])},this).bind(e),25);break;case"justifyleft":case"justifycenter":case"justifyright":case"justifyfull":var r=this._extendBlock();this.oEditingArea.execCommand(e,t,i),r&&r.select(),this.oNavigator.ie&&this._removeElementAlign("table");break;default:if(o.collapsed&&this._rxCmdInline.test(e)){var a=o.placeStringBookmark(),l=o.getStringBookmark(a).previousSibling;l&&"​"===l.nodeValue||(l=this.oApp.getWYSIWYGDocument().createTextNode("​"),o.insertNode(l)),o.removeStringBookmark(a),o.selectNodeContents(l),o.select(),this.oEditingArea.execCommand(e,t,i),o.collapseToEnd(),o.select();var h=this._findSingleNode(l);h&&o._hasCursorHolderOnly(h.nextSibling)&&h.parentNode.removeChild(h.nextSibling)}else this.oEditingArea.execCommand(e,t,i)}this._countClickCr(e)},_findSingleNode:function(e){return e?1===e.parentNode.childNodes.length?this._findSingleNode(e.parentNode):e:null},$AFTER_EXECCOMMAND:function(e,t,i,n){this.elP1&&this.elP1.parentNode&&this.elP1.parentNode.removeChild(this.elP1),this.elP2&&this.elP2.parentNode&&this.elP2.parentNode.removeChild(this.elP2),/^insertorderedlist|insertunorderedlist$/i.test(e)&&(this._removeDummyParagraph_IE(),this._fixCorruptedBlockQuote("insertorderedlist"===e?"OL":"UL"),this.oNavigator.bGalaxyBrowser&&this._removeBlockQuote()),/^justify*/i.test(e)&&this._fixAlign("justifyfull"===e?"justify":e.substring(7)),"indent"!=e&&"outdent"!=e||(n||(n={}),n.bDontAddUndoHistory=!0),n&&n.bDontAddUndoHistory||this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_AFTER_ACTION",[e,this.oUndoOption]),this.oApp.exec("CHECK_STYLE_CHANGE",[])},_removeElementAlign:function(e){for(var t=this.oApp.getSelection().getNodes(),i=null,n=new RegExp("^"+e+"$","i"),o=0,s=t.length;o 

",this.oApp.getWYSIWYGDocument()),t.parentNode.insertBefore(this.elP1,t),this.elP2=jindo.$("

 

",this.oApp.getWYSIWYGDocument()),t.parentNode.insertBefore(this.elP2,t.nextSibling);break}t=t.parentNode}if(!this.elP1&&!this.elP2){var i=(t=1!==(t=e.commonAncestorContainer).nodeType?t.parentNode:t).previousSibling,n=t.nextSibling;i&&"BLOCKQUOTE"===i.tagName&&(this.elP1=jindo.$("

 

",this.oApp.getWYSIWYGDocument()),i.parentNode.insertBefore(this.elP1,i.nextSibling)),n&&"BLOCKQUOTE"===n.tagName&&(this.elP1=jindo.$("

 

",this.oApp.getWYSIWYGDocument()),n.parentNode.insertBefore(this.elP1,n))}},_fixCorruptedBlockQuote:function(e){var t,i,n,o,s,r,a,l,h,d=this.oApp.getWYSIWYGDocument().getElementsByTagName(e);for(s=0,r=d.length;s',$init:function(e){this.elAppContainer=e},$ON_MSG_APP_READY:function(){},_assignHTMLElements:function(e){var t=nhn.husky.SE2M_Configuration.SE2M_ColorPalette;t&&(this.bUseRecentColor=t.bUseRecentColor||!1,this.URL_COLOR_ADD=t.addColorURL||"http://api.se2.naver.com/1/colortable/TextAdd.nhn",this.URL_COLOR_UPDATE=t.updateColorURL||"http://api.se2.naver.com/1/colortable/TextUpdate.nhn",this.URL_COLOR_LIST=t.colorListURL||"http://api.se2.naver.com/1/colortable/TextList.nhn"),this.elColorPaletteLayer=jindo.$$.getSingle("DIV.husky_se2m_color_palette",e),this.elColorPaletteLayerColorPicker=jindo.$$.getSingle("DIV.husky_se2m_color_palette_colorpicker",this.elColorPaletteLayer),this.elRecentColorForm=jindo.$$.getSingle("form",this.elColorPaletteLayerColorPicker),this.elBackgroundColor=jindo.$$.getSingle("ul.husky_se2m_bgcolor_list",e),this.elInputColorCode=jindo.$$.getSingle("INPUT.husky_se2m_cp_colorcode",this.elColorPaletteLayerColorPicker),this.elPreview=jindo.$$.getSingle("SPAN.husky_se2m_cp_preview",this.elColorPaletteLayerColorPicker),this.elCP_ColPanel=jindo.$$.getSingle("DIV.husky_se2m_cp_colpanel",this.elColorPaletteLayerColorPicker),this.elCP_HuePanel=jindo.$$.getSingle("DIV.husky_se2m_cp_huepanel",this.elColorPaletteLayerColorPicker),this.elCP_ColPanel.style.position="relative",this.elCP_HuePanel.style.position="relative",this.elColorPaletteLayerColorPicker.style.display="none",this.elMoreBtn=jindo.$$.getSingle("BUTTON.husky_se2m_color_palette_more_btn",this.elColorPaletteLayer),this.welMoreBtn=jindo.$Element(this.elMoreBtn),this.elOkBtn=jindo.$$.getSingle("BUTTON.husky_se2m_color_palette_ok_btn",this.elColorPaletteLayer),this.bUseRecentColor&&(this.elColorPaletteLayerRecent=jindo.$$.getSingle("DIV.husky_se2m_color_palette_recent",this.elColorPaletteLayer),this.elRecentColor=jindo.$$.getSingle("ul.se2_pick_color",this.elColorPaletteLayerRecent),this.elDummyNode=jindo.$$.getSingle("ul.se2_pick_color > li",this.elColorPaletteLayerRecent)||null,this.elColorPaletteLayerRecent.style.display="none")},$LOCAL_BEFORE_FIRST:function(){this._assignHTMLElements(this.elAppContainer),this.elDummyNode&&jindo.$Element(jindo.$$.getSingle("ul.se2_pick_color > li",this.elColorPaletteLayerRecent)).leave(),this.bUseRecentColor&&this._ajaxRecentColor(this._ajaxRecentColorCallback),this.oApp.registerBrowserEvent(this.elColorPaletteLayer,"click","EVENT_CLICK_COLOR_PALETTE"),this.oApp.bMobile||(this.oApp.registerBrowserEvent(this.elBackgroundColor,"mouseover","EVENT_MOUSEOVER_COLOR_PALETTE"),this.oApp.registerBrowserEvent(this.elColorPaletteLayer,"mouseover","EVENT_MOUSEOVER_COLOR_PALETTE"),this.oApp.registerBrowserEvent(this.elBackgroundColor,"mouseout","EVENT_MOUSEOUT_COLOR_PALETTE"),this.oApp.registerBrowserEvent(this.elColorPaletteLayer,"mouseout","EVENT_MOUSEOUT_COLOR_PALETTE"))},$ON_EVENT_MOUSEOVER_COLOR_PALETTE:function(e){for(var t=e.element;t&&t.tagName&&"li"!=t.tagName.toLowerCase();)t=t.parentNode;t&&t.nodeType&&9!=t.nodeType&&(""!=t.className&&t.className&&void 0!==t.className||jindo.$Element(t).addClass("hover"))},$ON_EVENT_MOUSEOUT_COLOR_PALETTE:function(e){for(var t=e.element;t&&t.tagName&&"li"!=t.tagName.toLowerCase();)t=t.parentNode;t&&"hover"==t.className&&jindo.$Element(t).removeClass("hover")},$ON_EVENT_CLICK_COLOR_PALETTE:function(e){for(var t=e.element;"SPAN"==t.tagName;)t=t.parentNode;if(t.tagName&&"BUTTON"==t.tagName){if(t==this.elMoreBtn)return void this.oApp.exec("TOGGLE_COLOR_PICKER");this.oApp.exec("APPLY_COLOR",[t])}},$ON_APPLY_COLOR:function(e){var t=this.elInputColorCode.value,i=null;if(-1==t.indexOf("#")&&(t="#"+t,this.elInputColorCode.value=t),e==this.elOkBtn)return this._verifyColorCode(t)?void this.oApp.exec("COLOR_PALETTE_APPLY_COLOR",[t,!0]):(this.elInputColorCode.value="",alert(this.oApp.$MSG("SE_Color.invalidColorCode")),void this.elInputColorCode.focus());i=jindo.$Element(e.parentNode.parentNode.parentNode),t=e.title,i.hasClass("husky_se2m_color_palette")?this.oApp.exec("COLOR_PALETTE_APPLY_COLOR",[t,!1]):i.hasClass("husky_se2m_color_palette_recent")&&this.oApp.exec("COLOR_PALETTE_APPLY_COLOR",[t,!0])},$ON_RESET_COLOR_PALETTE:function(){this._initColor()},$ON_TOGGLE_COLOR_PICKER:function(){"none"==this.elColorPaletteLayerColorPicker.style.display?this.oApp.exec("SHOW_COLOR_PICKER"):this.oApp.exec("HIDE_COLOR_PICKER")},$ON_SHOW_COLOR_PICKER:function(){this.elColorPaletteLayerColorPicker.style.display="",this.cpp=new nhn.ColorPicker(this.elCP_ColPanel,{huePanel:this.elCP_HuePanel});var e=jindo.$Fn(function(e){this.elPreview.style.backgroundColor=e.hexColor,this.elInputColorCode.value=e.hexColor},this).bind();this.cpp.attach("colorchange",e),this.$ON_SHOW_COLOR_PICKER=this._showColorPickerMain,this.$ON_SHOW_COLOR_PICKER()},$ON_HIDE_COLOR_PICKER:function(){this.elColorPaletteLayerColorPicker.style.display="none",this.welMoreBtn.addClass("se2_view_more"),this.welMoreBtn.removeClass("se2_view_more2")},$ON_SHOW_COLOR_PALETTE:function(e,t){this.sCallbackCmd=e,this.oLayerContainer=t,this.oLayerContainer.insertBefore(this.elColorPaletteLayer,null),this.elColorPaletteLayer.style.display="block",this.oApp.delayedExec("POSITION_TOOLBAR_LAYER",[this.elColorPaletteLayer.parentNode.parentNode],0)},$ON_HIDE_COLOR_PALETTE:function(){this.elColorPaletteLayer.style.display="none"},$ON_COLOR_PALETTE_APPLY_COLOR:function(e,t){t=t||!1,e=this._getHexColorCode(e),this.bUseRecentColor&&t&&this.oApp.exec("ADD_RECENT_COLOR",[e]),this.oApp.exec(this.sCallbackCmd,[e])},$ON_EVENT_MOUSEUP_COLOR_PALETTE:function(e){var t=e.element;t.style.backgroundColor&&this.oApp.exec("COLOR_PALETTE_APPLY_COLOR",[t.style.backgroundColor,!1])},$ON_ADD_RECENT_COLOR:function(e){var t=0===this.aRecentColor.length;this._addRecentColor(e),t?this._ajaxAddColor():this._ajaxUpdateColor(),this._redrawRecentColorElement()},_verifyColorCode:function(e){return this.rxColorPattern.test(e)},_getHexColorCode:function(e){if(this.rxRGBColorPattern.test(e)){function t(e){var t=parseInt(e,10).toString(16);return t.length<2&&(t="0"+t),t.toUpperCase()}e="#"+t(RegExp.$1)+t(RegExp.$2)+t(RegExp.$3)}return e},_addRecentColor:function(e){var t=jindo.$A(this.aRecentColor);(t=t.refuse(e)).unshift(e),t.length()>this.nLimitRecentColor&&t.length(this.nLimitRecentColor),this.aRecentColor=t.$value()},_redrawRecentColorElement:function(){var e,t=[],i=this.aRecentColor.length;if(0!==i){for(e=0;ethis.nLimitRecentColor&&t.length(this.nLimitRecentColor),i=0,n=(o=t.reverse().$value()).length;i'+i+"":''+i+"")},$BEFORE_MSG_APP_READY:function(){var e=nhn.husky.SE2M_Configuration.SE2M_Hyperlink;if(e&&!1===e.bAutolink){this.$ON_REGISTER_CONVERTERS=null,this.$ON_DISABLE_MESSAGE=null,this.$ON_ENABLE_MESSAGE=null;try{this.oApp.getWYSIWYGDocument().execCommand("AutoUrlDetect",!1,!1)}catch(e){}}},$ON_MSG_APP_READY:function(){this.bLayerShown=!1,jindo.$Agent().os().mac?this.oApp.exec("REGISTER_HOTKEY",["meta+k","TOGGLE_HYPERLINK_LAYER",[]]):this.oApp.exec("REGISTER_HOTKEY",["ctrl+k","TOGGLE_HYPERLINK_LAYER",[]]),this.oApp.exec("REGISTER_UI_EVENT",["hyperlink","click","TOGGLE_HYPERLINK_LAYER"]),this.oApp.registerLazyMessage(["TOGGLE_HYPERLINK_LAYER","APPLY_HYPERLINK"],["hp_SE2M_Hyperlink$Lazy.js"])},$ON_REGISTER_CONVERTERS:function(){this.oApp.exec("ADD_CONVERTER_DOM",["IR_TO_DB",jindo.$Fn(this.irToDb,this).bind()])},$LOCAL_BEFORE_FIRST:function(e){if(e.match(/(REGISTER_CONVERTERS)/))return this.oApp.acceptLocalBeforeFirstAgain(this,!0),!0;this._assignHTMLElements(this.oApp.htOptions.elAppContainer),this.sRXATagMarker=this.sATagMarker.replace(/\//g,"\\/").replace(/\./g,"\\."),this.oApp.registerBrowserEvent(this.oBtnConfirm,"click","APPLY_HYPERLINK"),this.oApp.registerBrowserEvent(this.oBtnCancel,"click","HIDE_ACTIVE_LAYER"),this.oApp.registerBrowserEvent(this.oLinkInput,"keydown","EVENT_HYPERLINK_KEYDOWN")},$ON_EVENT_HYPERLINK_KEYDOWN:function(e){e.key().enter&&(this.oApp.exec("APPLY_HYPERLINK"),e.stop())},$ON_DISABLE_MESSAGE:function(e){if("TOGGLE_HYPERLINK_LAYER"===e){try{this.oApp.getWYSIWYGDocument().execCommand("AutoUrlDetect",!1,!1)}catch(e){}this._bDisabled=!0}},$ON_ENABLE_MESSAGE:function(e){if("TOGGLE_HYPERLINK_LAYER"===e){try{this.oApp.getWYSIWYGDocument().execCommand("AutoUrlDetect",!1,!0)}catch(e){}this._bDisabled=!1}},irToDb:function(t){if(!this._bDisabled){var i=t.cloneNode(!0);try{i.innerHTML}catch(e){i=jindo.$(t.outerHTML)}for(var e,n,o=this.oApp.getEmptySelection(),s=o._getFirstRealChild(i),r=o._getLastRealChild(i),a=jindo.$A(o._getNodesBetween(s,r)),l=a.filter(function(e){return e&&3===e.nodeType}).$value(),h=l,d=this.oApp.getWYSIWYGDocument().createElement("DIV"),c="@"+(new Date).getTime()+"@",_=new RegExp(c,"g"),p=0,E=l.length;p'),this.oApp.welEditingAreaContainer.prepend(this.welEditingAreaCover),jindo.$Fn(this._onMouseupCover,this).attach(this.welEditingAreaCover.$value(),"mouseup")}},_onFocusWYSIWYGBody:function(e){this._wfOnFocusWYSIWYGBody.detach(this.oApp.getWYSIWYGDocument().body,"focus"),this._loadAllBaseFont()},_onPasteWYSIWYGBody:function(e){this._wfOnPasteWYSIWYGBody.detach(this.oApp.getWYSIWYGDocument().body,"paste"),this._loadAllBaseFont()},_onMouseupCover:function(e){e.stop(),this.welEditingAreaCover&&this.welEditingAreaCover.leave();var t,i=e.mouse(),n=this.oApp.getWYSIWYGDocument().body,o=jindo.$Element(n);if((t=this.oApp.getEmptySelection()).selectNode(n),t.collapseToStart(),t.select(),o.fireEvent("mousedown",{left:i.left,middle:i.middle,right:i.right}),o.fireEvent("mouseup",{left:i.left,middle:i.middle,right:i.right}),this.oApp.oNavigator.ie&&document.documentMode<11&&"WYSIWYG"===this.oApp.getEditingMode())"

"==this.oApp.getWYSIWYGDocument().body.innerHTML&&(this.oApp.getWYSIWYGDocument().body.innerHTML='

',(t=this.oApp.getSelection()).moveToStringBookmark("INIT"),t.select(),t.removeStringBookmark("INIT"));else if(this.oApp.oNavigator.ie&&11==this.oApp.oNavigator.nativeVersion&&11==document.documentMode&&"WYSIWYG"===this.oApp.getEditingMode()&&"


"==this.oApp.getWYSIWYGDocument().body.innerHTML){var s=jindo.$$.getSingle("br",n);t.setStartBefore(s),t.setEndBefore(s),t.select()}},$ON_EVENT_TOOLBAR_MOUSEDOWN:function(){this.htBrowser.nativeVersion<9||document.documentMode<9||this.welEditingAreaCover&&this.welEditingAreaCover.leave()},_loadAllBaseFont:function(){var e,t;if(this.htBrowser.ie){if(this.htBrowser.nativeVersion<9)for(e=0,t=this.aBaseFontList.length;e").css("overflow","hidden"),this.canvasType=jindo.$(e).filters?"Filter":jindo.$("").getContext?"Canvas":null,!this.canvasType)return!1;for(var i in this.option({huePanel:null,huePanelType:"horizontal"}),this.option(t),this.option("huePanel")&&(this.huePanel=jindo.$Element(this.option("huePanel")).empty()),this._hsvColor=this._hsv(0,100,100),this)/^_on[A-Z][a-z]+[A-Z][a-z]+$/.test(i)&&(this[i+"Fn"]=jindo.$Fn(this[i],this));this._onDownColorFn.attach(this.elem,"mousedown"),this.huePanel&&this._onDownHueFn.attach(this.huePanel,"mousedown"),this.paint()},rgb:function(e){this.hsv(this._rgb2hsv(e.r,e.g,e.b))},hsv:function(e){if(void 0===e)return this._hsvColor;var t=null,i=this.elem.width(),n=this.elem.height(),o=this.cursor.width(),s=this.cursor.height(),r=0,a=0;if(this.huePanel)t=this._hsv2rgb(e.h,100,100),this.elem.css("background","#"+this._rgb2hex(t.r,t.g,t.b)),r=e.s/100*i,a=(100-e.v)/100*n;else{var l=i/2;r=e.v>e.s?(e.v=100,e.s/100*l):((e.s=100)-e.v)/100*l+l,a=e.h/360*n}r=Math.max(Math.min(r-1,i-o),1),a=Math.max(Math.min(a-1,n-s),1),this.cursor.css({left:r+"px",top:a+"px"}),this._hsvColor=e,t=this._hsv2rgb(e.h,e.s,e.v),this.fireEvent("colorchange",{type:"colorchange",element:this,currentElement:this,rgbColor:t,hexColor:"#"+this._rgb2hex(t.r,t.g,t.b),hsvColor:e})},paint:function(){this.huePanel?(this["_paintColWith"+this.canvasType](),this["_paintHueWith"+this.canvasType]()):this["_paintOneWith"+this.canvasType](),this.cursor.appendTo(this.elem),this.cursor.css({position:"absolute",top:"1px",left:"1px",background:"white",border:"1px solid black"}).width(3).height(3),this.hsv(this._hsvColor)},_paintColWithFilter:function(){jindo.$Element("
").css({position:"absolute",top:0,left:0,width:"100%",height:"100%",filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=1,StartColorStr='#FFFFFFFF',EndColorStr='#00FFFFFF')"}).appendTo(this.elem),jindo.$Element("
").css({position:"absolute",top:0,left:0,width:"100%",height:"100%",filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#00000000',EndColorStr='#FF000000')"}).appendTo(this.elem)},_paintColWithCanvas:function(){var e=jindo.$Element("").css({width:"100%",height:"100%"});e.appendTo(this.elem.empty());var t=e.attr("width",e.width()).attr("height",e.height()).$value().getContext("2d"),i=null,n=e.width(),o=e.height();(i=t.createLinearGradient(0,0,n,0)).addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=i,t.fillRect(0,0,n,o),(i=t.createLinearGradient(0,0,0,o)).addColorStop(0,"rgba(0,0,0,0)"),i.addColorStop(1,"rgba(0,0,0,1)"),t.fillStyle=i,t.fillRect(0,0,n,o)},_paintOneWithFilter:function(){for(var e,t,i,n,o,s,r=this.elem.height(),a=1;a<7;a++)e=Math.floor((a-1)/6*r),t=Math.floor(a/6*r),i=this._hsv2rgb((a-1)/6*360,100,100),n=this._hsv2rgb(a/6*360,100,100),o="#FF"+this._rgb2hex(i.r,i.g,i.b),s="#FF"+this._rgb2hex(n.r,n.g,n.b),jindo.$Element("
").css({position:"absolute",left:0,width:"100%",top:e+"px",height:t-e+"px",filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='"+o+"',EndColorStr='"+s+"')"}).appendTo(this.elem);jindo.$Element("
").css({position:"absolute",top:0,left:0,width:"50%",height:"100%",filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=1,StartColorStr='#FFFFFFFF',EndColorStr='#00FFFFFF')"}).appendTo(this.elem),jindo.$Element("
").css({position:"absolute",top:0,right:0,width:"50%",height:"100%",filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=1,StartColorStr='#00000000',EndColorStr='#FF000000')"}).appendTo(this.elem)},_paintOneWithCanvas:function(){var e={r:0,g:0,b:0},t=jindo.$Element("").css({width:"100%",height:"100%"});t.appendTo(this.elem.empty());for(var i=t.attr("width",t.width()).attr("height",t.height()).$value().getContext("2d"),n=t.width(),o=t.height(),s=i.createLinearGradient(0,0,0,o),r=0;r<7;r++)e=this._hsv2rgb(r/6*360,100,100),s.addColorStop(r/6,"rgb("+e.join(",")+")");i.fillStyle=s,i.fillRect(0,0,n,o),(s=i.createLinearGradient(0,0,n,0)).addColorStop(0,"rgba(255,255,255,1)"),s.addColorStop(.5,"rgba(255,255,255,0)"),s.addColorStop(.5,"rgba(0,0,0,0)"),s.addColorStop(1,"rgba(0,0,0,1)"),i.fillStyle=s,i.fillRect(0,0,n,o)},_paintHueWithFilter:function(){var e,t,i,n,o,s,r="vertical"==this.option().huePanelType,a=this.huePanel.width(),l=this.huePanel.height(),h=null,d=parseInt(this.huePanel.css("borderWidth"),10);isNaN(d)&&(d=0),a-=2*d;for(var c=1;c<7;c++){e=Math.floor((c-1)/6*(r?l:a)),t=Math.floor(c/6*(r?l:a)),i=this._hsv2rgb((c-1)/6*360,100,100),n=this._hsv2rgb(c/6*360,100,100),o="#FF"+this._rgb2hex(i.r,i.g,i.b),s="#FF"+this._rgb2hex(n.r,n.g,n.b);var _=t-e+1;(h=jindo.$Element("
").css({position:"absolute",filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType="+(r?0:1)+",StartColorStr='"+o+"',EndColorStr='"+s+"')"})).appendTo(this.huePanel),h.css(r?"left":"top",0).css(r?"width":"height","100%"),h.css(r?"top":"left",e+"px").css(r?"height":"width",_+"px")}},_paintHueWithCanvas:function(){var e,t="vertical"==this.option().huePanelType,i=jindo.$Element("").css({width:"100%",height:"100%"});i.appendTo(this.huePanel.empty());for(var n=i.attr("width",i.width()).attr("height",i.height()).$value().getContext("2d"),o=n.createLinearGradient(0,0,t?0:i.width(),t?i.height():0),s=0;s<7;s++)e=this._hsv2rgb(s/6*360,100,100),o.addColorStop(s/6,"rgb("+e.join(",")+")");n.fillStyle=o,n.fillRect(0,0,i.width(),i.height())},_rgb2hsv:function(e,t,i){var n=0,o=0,s=Math.max(e,t,i),r=s-Math.min(e,t,i);return(o=s?r/s:0)&&(e==s?n=60*(t-i)/r:t==s?n=120+60*(i-e)/r:i==s&&(n=240+60*(e-t)/r),n<0&&(n+=360)),n=Math.floor(n),o=Math.floor(100*o),s=Math.floor(s/255*100),this._hsv(n,o,s)},_hsv2rgb:function(e,t,i){e=e%360/60,t/=100,i/=100;var n=0,o=0,s=0,r=Math.floor(e),a=e-r,l=i*(1-t),h=i*(1-t*a),d=i*(1-t*(1-a));switch(r){case 0:n=i,o=d,s=l;break;case 1:n=h,o=i,s=l;break;case 2:n=l,o=i,s=d;break;case 3:n=l,o=h,s=i;break;case 4:n=d,o=l,s=i;break;case 5:n=i,o=l,s=h}return n=Math.floor(255*n),o=Math.floor(255*o),s=Math.floor(255*s),this._rgb(n,o,s)},_rgb2hex:function(e,t,i){return 1==(e=e.toString(16)).length&&(e="0"+e),1==(t=t.toString(16)).length&&(t="0"+t),1==(i=i.toString(16)).length&&(i="0"+i),e+t+i},_hex2rgb:function(e){var t=e.match(/#?([0-9a-f]{6}|[0-9a-f]{3})/i);return t=3==t[1].length?t[1].match(/./g).filter(function(e){return e+e}):t[1].match(/../g),{r:Number("0x"+t[0]),g:Number("0x"+t[1]),b:Number("0x"+t[2])}},_rgb:function(e,t,i){var n=[e,t,i];return n.r=e,n.g=t,n.b=i,n},_hsv:function(e,t,i){var n=[e,t,i];return n.h=e,n.s=t,n.v=i,n},_onDownColor:function(e){if(!e.mouse().left)return!1;var t=e.pos();this._colPagePos=[t.pageX,t.pageY],this._colLayerPos=[t.layerX,t.layerY],this._onUpColorFn.attach(document,"mouseup"),this._onMoveColorFn.attach(document,"mousemove"),this._onMoveColor(e)},_onUpColor:function(e){this._onUpColorFn.detach(document,"mouseup"),this._onMoveColorFn.detach(document,"mousemove")},_onMoveColor:function(e){var t=this._hsvColor,i=e.pos(),n=this._colLayerPos[0]+(i.pageX-this._colPagePos[0]),o=this._colLayerPos[1]+(i.pageY-this._colPagePos[1]),s=this.elem.width(),r=this.elem.height();if(n=Math.max(Math.min(n,s),0),o=Math.max(Math.min(o,r),0),this.huePanel)t.s=t[1]=n/s*100,t.v=t[2]=(r-o)/r*100;else{t.h=o/r*360;var a=s/2;n]*class=['"]?(se2_quote[0-9]+)['"]?[^>]*>/gi,"<$1 class=$2>")},this).bind()]),this.oApp.exec("ADD_CONVERTER",["IR_TO_DB",jindo.$Fn(function(e){var n=this.htQuoteStyles_view;return e=e.replace(/<(blockquote)[^>]*class=['"]?(se2_quote[0-9]+)['"]?[^>]*>/gi,function(e,t,i){return"<"+t+" class="+i+' style="'+n[i]+'">'})},this).bind()]),this.htSE1toSE2Map={"01":"1","02":"2","03":"6","04":"8","05":"9","07":"3","08":"5"}},$LOCAL_BEFORE_FIRST:function(){this._assignHTMLElements(),this.oApp.registerBrowserEvent(this.elDropdownLayer,"click","EVENT_SE2_BLOCKQUOTE_LAYER_CLICK",[]),this.oApp.delayedExec("SE2_ATTACH_HOVER_EVENTS",[this.aLI],0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["quote","click","TOGGLE_BLOCKQUOTE_LAYER"]),this.oApp.registerLazyMessage(["TOGGLE_BLOCKQUOTE_LAYER"],["hp_SE2M_Quote$Lazy.js"])},$ON_EVENT_EDITING_AREA_KEYDOWN:function(e){var t,i;"WYSIWYG"===this.oApp.getEditingMode()&&8===e.key().keyCode&&((t=this.oApp.getSelection()).fixCommonAncestorContainer(),(i=this._findParentQuote(t.commonAncestorContainer))&&this._isBlankQuote(i)&&(e.stop(jindo.$Event.CANCEL_DEFAULT),t.selectNode(i),t.collapseToStart(),jindo.$Element(i).leave(),t.select()))},$ON_EVENT_EDITING_AREA_KEYUP:function(e){var t,i,n;if("WYSIWYG"===this.oApp.getEditingMode()&&46===e.key().keyCode){if((t=this.oApp.getSelection()).fixCommonAncestorContainer(),!(i=this._findParentQuote(t.commonAncestorContainer)))return!1;i.nextSibling||(e.stop(jindo.$Event.CANCEL_DEFAULT),(n=t._document.createElement("P")).innerHTML=" ",jindo.$Element(i).after(n),setTimeout(jindo.$Fn(function(e){var t=e.placeStringBookmark();e.select(),e.removeStringBookmark(t)},this).bind(t),0))}},_isBlankQuote:function(e){function t(e){return""===(e=e.replace(/[\r\n]/gi,"").replace(unescape("%uFEFF"),""))||(" "===e||" "===e)}var i,n,o,s,r,a,l=this.oApp.oNavigator.chrome,h=this.oApp.oNavigator.safari;if(t(e.innerHTML)||"
"===e.innerHTML)return!0;if(l||h){var d,c=jindo.$$("TABLE",e),_=c.length;for(o=0;o<_;o++)d=c[o],r=d,0===jindo.$$("tr",r).length&&jindo.$Element(d).leave()}for(o=0,s=(n=e.childNodes).length;o"!==a.innerHTML))return!1;return!0},_findParentQuote:function(e){return this._findAncestor(jindo.$Fn(function(e){if(!e)return!1;if("BLOCKQUOTE"!==e.tagName)return!1;if(!e.className)return!1;var t=e.className;return!!this.htQuoteStyles_view[t]},this).bind(),e)},_findAncestor:function(e,t){for(;t&&!e(t);)t=t.parentNode;return t}}),nhn.husky.SE2M_TableCreator=jindo.$Class({name:"SE2M_TableCreator",_sSETblClass:"__se_tbl",nRows:3,nColumns:4,nBorderSize:1,sBorderColor:"#000000",sBGColor:"#000000",nBorderStyleIdx:3,nTableStyleIdx:1,nMinRows:1,nMaxRows:20,nMinColumns:1,nMaxColumns:20,nMinBorderWidth:1,nMaxBorderWidth:10,rxLastDigits:null,sReEditGuideMsg_table:null,oSelection:null,$ON_MSG_APP_READY:function(){this.sReEditGuideMsg_table=this.oApp.$MSG("SE2M_ReEditAction.reEditGuideMsg.table"),this.oApp.exec("REGISTER_UI_EVENT",["table","click","TOGGLE_TABLE_LAYER"]),this.oApp.registerLazyMessage(["TOGGLE_TABLE_LAYER"],["hp_SE2M_TableCreator$Lazy.js"])},$ON_REGISTER_CONVERTERS:function(){this.oApp.exec("ADD_CONVERTER_DOM",["IR_TO_DB",jindo.$Fn(this.irToDbDOM,this).bind()]),this.oApp.exec("ADD_CONVERTER_DOM",["DB_TO_IR",jindo.$Fn(this.dbToIrDOM,this).bind()])},irToDbDOM:function(e){var n=[],t=jindo.$$("table[class=__se_tbl]",e,{oneTimeOffCache:!0});if(jindo.$A(t).forEach(function(e,t,i){jindo.$Element(e).attr("attr_no_border_tbl")&&n.push(e)},this),!(n.length<1))for(var i,o=[],s=0,r=n.length;str>td",i),jindo.$A(o).forEach(function(e,t,i){jindo.$Element(e).css({border:"",borderTop:"",borderRight:""})})},dbToIrDOM:function(e){var n=[],t=jindo.$$("table[class=__se_tbl]",e,{oneTimeOffCache:!0});if(jindo.$A(t).forEach(function(e,t,i){jindo.$Element(e).attr("attr_no_border_tbl")&&n.push(e)},this),!(n.length<1))for(var i,o=[],s=0,r=n.length;str>td",i),jindo.$A(o).forEach(function(e,t,i){jindo.$Element(e).css({border:"1px dashed #c7c7c7",borderTop:0,borderRight:0})})}}),nhn.husky.SE2M_TableBlockStyler=jindo.$Class({name:"SE2M_TableBlockStyler",nSelectedTD:0,htSelectedTD:{},aTdRange:[],$init:function(){},$LOCAL_BEFORE_ALL:function(){return"WYSIWYG"==this.oApp.getEditingMode()},$ON_MSG_APP_READY:function(){this.oDocument=this.oApp.getWYSIWYGDocument()},$ON_EVENT_EDITING_AREA_MOUSEUP:function(e){"WYSIWYG"==this.oApp.getEditingMode()&&this.setTdBlock()},$ON_IS_SELECTED_TD_BLOCK:function(e,t){return 0 

":i.firefox&&(e+="

\ufeff

"),r.selectNode(n),r.pasteHTML(e),s=r.getNodes()||[];for(var a=0;a",sDefaultXPath:"/HTML[0]/BODY[0]",$init:function(){this.aUndoHistory=[],this.oCurStateIdx={nIdx:0,nStep:0},this.nHardLimit=this.nMaxUndoCount+this.nAfterMaxDeleteBuffer},$LOCAL_BEFORE_ALL:function(e){if(e.match(/_DO_RECORD_UNDO_HISTORY_AT$/))return!0;try{if("WYSIWYG"!=this.oApp.getEditingMode())return!1}catch(e){return!1}return!0},$BEFORE_MSG_APP_READY:function(){this._historyLength=0,this.oApp.exec("ADD_APP_PROPERTY",["getUndoHistory",jindo.$Fn(this._getUndoHistory,this).bind()]),this.oApp.exec("ADD_APP_PROPERTY",["getUndoStateIdx",jindo.$Fn(this._getUndoStateIdx,this).bind()]),this.oApp.exec("ADD_APP_PROPERTY",["saveSnapShot",jindo.$Fn(this._saveSnapShot,this).bind()]),this.oApp.exec("ADD_APP_PROPERTY",["getLastKey",jindo.$Fn(this._getLastKey,this).bind()]),this.oApp.exec("ADD_APP_PROPERTY",["setLastKey",jindo.$Fn(this._setLastKey,this).bind()]),this._saveSnapShot(),this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[this.oCurStateIdx,"","","",null,this.sDefaultXPath])},_getLastKey:function(){return this.sLastKey},_setLastKey:function(e){this.sLastKey=e},$ON_MSG_APP_READY:function(){var e=jindo.$Agent().navigator();this.bIE=e.ie,this.bFF=e.firefox,this.oApp.exec("REGISTER_UI_EVENT",["undo","click","UNDO"]),this.oApp.exec("REGISTER_UI_EVENT",["redo","click","REDO"]),jindo.$Agent().os().mac?(this.oApp.exec("REGISTER_HOTKEY",["meta+z","UNDO"]),this.oApp.exec("REGISTER_HOTKEY",["meta+y","REDO"])):(this.oApp.exec("REGISTER_HOTKEY",["ctrl+z","UNDO"]),this.oApp.exec("REGISTER_HOTKEY",["ctrl+y","REDO"]))},$ON_UNDO:function(){if(this._doRecordUndoHistory("UNDO",{nStep:0,bSkipIfEqual:!0,bMustBlockContainer:!0}),!(this.oCurStateIdx.nIdx<=0)){var e=this.aUndoHistory[this.oCurStateIdx.nIdx].oUndoCallback[this.oCurStateIdx.nStep],t=this.aUndoHistory[this.oCurStateIdx.nIdx].sParentXPath[this.oCurStateIdx.nStep];if(e&&this.oApp.exec(e.sMsg,e.aParams),0=this.aUndoHistory.length)){var e=this.aUndoHistory[this.oCurStateIdx.nIdx];if(!(this.oCurStateIdx.nIdx==this.aUndoHistory.length-1&&this.oCurStateIdx.nStep>=e.nTotalSteps-1)){this.oCurStateIdx.nStepthis.nHardLimit&&(this.aUndoHistory.splice(0,this.nAfterMaxDeleteBuffer),e.nIdx-=this.nAfterMaxDeleteBuffer),this.oCurStateIdx.nIdx=e.nIdx,this.oCurStateIdx.nStep=e.nStep},_saveSnapShot:function(){this.oSnapShot={oBookmark:this.oApp.getSelection().getXPathBookmark()}},_getTargetXPath:function(e,t){var i=this.sDefaultXPath,n=e[0].sXPath.split("/"),o=e[1].sXPath.split("/"),s=[],r=n.length]+)?",rxDateFormat:/^(?:\d{4}\.)?\d{1,2}\.\d{1,2}$/,_rxTable:/^(?:CAPTION|TBODY|THEAD|TFOOT|TR|TD|TH|COLGROUP|COL)$/i,_rxSpaceOnly:/^\s+$/,_rxFontStart:/]*)?>/i,_htFontSize:{1:"7pt",2:"10pt",3:"12pt",4:"13.5pt",5:"18pt",6:"24pt"},isInvalidNodeInTable:function(e){if(e&&!this._rxTable.test(e.nodeName)){var t;if((t=e.previousSibling)&&this._rxTable.test(t.nodeName))return!0;if((t=e.nextSibling)&&this._rxTable.test(t.nodeName))return!0}return!1},removeInvalidNodeInTable:function(e){this.isInvalidNodeInTable(e)&&e.parentNode&&e.parentNode.removeChild(e)},removeInvalidFont:function(e){e&&(this._removeInvalidFontInTable(e),this._removeEmptyFont(e))},_removeInvalidFontInTable:function(e){for(var t,i=jindo.$$("table font",e),n=0;t=i[n];n++)this.removeInvalidNodeInTable(t)},_removeEmptyFont:function(e){for(var t,i=jindo.$$("font",e),n=0;t=i[n];n++)(t.innerHTML||"").replace(this._rxSpaceOnly,"")||t.parentNode.removeChild(t)},convertFontToSpan:function(e){if(e)for(var t,i,n,o=e.ownerDocument||document,s=jindo.$$("font",e),r=0;t=s[r];r++)("SPAN"!==(i=t.parentNode).tagName||1]*))","i").exec(e);if(!i)return"";var n=i[1]||i[2]||i[3];return n&&(n=n.replace(/[\"]/g,"")),n},iframeAlignConverter:function(e,t){var i=e.tagName.toUpperCase();if("DIV"==i||"P"==i){if(null===e.parentNode)return;var n=t,o=jindo.$Element(e),s=o.html(),r=jindo.$Element(e).attr("align")||jindo.$Element(e).css("text-align"),a=jindo.$Element(jindo.$("
",n));a.html(s).attr("align",r),o.replace(a)}},getJsonDatafromXML:function(e){function g(e){return void 0===e?"":e.replace(/&[a-z]+;/g,function(e){return"string"==typeof i[e]?i[e]:e})}function f(e){for(var t in e)if(e.hasOwnProperty(t)){if(Object.prototype[t])continue;return!1}return!0}var t={},A=/^[0-9]+(?:\.[0-9]+)?$/,S=/^\s+$/g,i={"&":"&"," ":" ",""":'"',"<":"<",">":">"},T={tags:["/"],stack:[t]};return(e=e.replace(/<(\?|\!-)[^>]*>/g,"")).replace(/\s*<(\/?[\w:\-]+)((?:\s+[\w:\-]+\s*=\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'))*)\s*((?:\/>)|(?:><\/\1>|\s*))|\s*\s*|\s*>?([^<]*)/gi,function(e,t,i,n,o,s){var r,a="",l=T.stack.length-1;if("string"==typeof t&&t)if("/"!=t.substr(0,1)){var h="string"==typeof i&&i,d="string"==typeof n&&n,c=!h&&d?"":{};if(void 0===(r=T.stack[l])[t])r[t]=c,r=T.stack[1+l]=r[t];else if(r[t]instanceof Array){var _=r[t].length;r[t][_]=c,r=T.stack[1+l]=r[t][_]}else r[t]=[r[t],c],r=T.stack[1+l]=r[t][1];h&&function(e,o){e.replace(/([\w\:\-]+)\s*=\s*(?:"((?:\\"|[^"])*)"|'((?:\\'|[^'])*)')/g,function(e,t,i,n){o[t]=g((i?i.replace(/\\"/g,'"'):void 0)||(n?n.replace(/\\'/g,"'"):void 0))})}(i,r),T.tags[1+l]=t,d&&(T.tags.length--,T.stack.length--)}else T.tags.length--,T.stack.length--;else"string"==typeof o&&o?a=o:"string"==typeof s&&s.replace(S,"")&&(a=g(s));if(0/g,">"):""},restoreSpecialChar:function(e){return"string"==typeof e?e.replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"):""}},nhn.husky.AutoResizer=jindo.$Class({welHiddenDiv:null,welCloneDiv:null,elContainer:null,$init:function(e,t){var i=["lineHeight","textDecoration","letterSpacing","fontSize","fontFamily","fontStyle","fontWeight","textTransform","textAlign","direction","wordSpacing","fontSizeAdjust","paddingTop","paddingLeft","paddingBottom","paddingRight","width"],n=i.length,o={position:"absolute",top:-9999,left:-9999,opacity:0,overflow:"hidden",wordWrap:"break-word"};for(this.nMinHeight=t.nMinHeight,this.wfnCallback=t.wfnCallback,this.elContainer=e.parentNode,this.welTextArea=jindo.$Element(e),this.welHiddenDiv=jindo.$Element("
"),this.wfnResize=jindo.$Fn(this._resize,this),this.sOverflow=this.welTextArea.css("overflow"),this.welTextArea.css("overflow","hidden");n--;)o[i[n]]=this.welTextArea.css(i[n]);this.welHiddenDiv.css(o),this.nLastHeight=this.welTextArea.height()},bind:function(){this.welCloneDiv=jindo.$Element(this.welHiddenDiv.$value().cloneNode(!1)),this.wfnResize.attach(this.welTextArea,"keyup"),this.welCloneDiv.appendTo(this.elContainer),this._resize()},unbind:function(){this.wfnResize.detach(this.welTextArea,"keyup"),this.welTextArea.css("overflow",this.sOverflow),this.welCloneDiv&&this.welCloneDiv.leave()},_resize:function(){var e,t=this.welTextArea.$value().value,i=!1;t!==this.sContents&&(this.sContents=t.replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\n/g,"
"),this.sContents+="
",this.welCloneDiv.html(this.sContents),(e=this.welCloneDiv.height()) .bx",this.elDropdownLayer),this.oFindInputSet=jindo.$$.getSingle(".husky_se2m_find_ui",this.elDropdownLayer),this.oReplaceInputSet=jindo.$$.getSingle(".husky_se2m_replace_ui",this.elDropdownLayer),this.elTitle=jindo.$$.getSingle("H3",this.elDropdownLayer),this.oFindInput_Keyword=jindo.$$.getSingle("INPUT",this.oFindInputSet),t=jindo.$$("INPUT",this.oReplaceInputSet),this.oReplaceInput_Original=t[0],this.oReplaceInput_Replacement=t[1],this.oFindNextButton=jindo.$$.getSingle("BUTTON.husky_se2m_find_next",this.elDropdownLayer),this.oReplaceFindNextButton=jindo.$$.getSingle("BUTTON.husky_se2m_replace_find_next",this.elDropdownLayer),this.oReplaceButton=jindo.$$.getSingle("BUTTON.husky_se2m_replace",this.elDropdownLayer),this.oReplaceAllButton=jindo.$$.getSingle("BUTTON.husky_se2m_replace_all",this.elDropdownLayer),this.aCloseButtons=jindo.$$("BUTTON.husky_se2m_cancel",this.elDropdownLayer)},$LOCAL_BEFORE_FIRST:function(e){this._assignHTMLElements(),this.oFindReplace=new nhn.FindReplace(this.oEditingWindow);for(var t=0;t=this.nMaxLevel))return n;t=t.nextSibling}return n};return o(e)>=this.nMaxLevel},_unwrapBlock:function(e){for(var t=this.oApp.getSelection(),i=t.commonAncestorContainer;i&&i.tagName!=e;)i=i.parentNode;if(i){this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["CANCEL BLOCK QUOTE",{sSaveTarget:"BODY"}]);var n=t.commonAncestorContainer;if(3!==n.nodeType){var o=t.getTextNodes()||"",s=o.length-1;n=-1LI",t)},$LOCAL_BEFORE_FIRST:function(e){this.bIE=jindo.$Agent().navigator().ie,this._assignHTMLObjects(this.oApp.htOptions.elAppContainer),this.charSet=[],this.charSet[0]=unescape("FF5B FF5D 3014 3015 3008 3009 300A 300B 300C 300D 300E 300F 3010 3011 2018 2019 201C 201D 3001 3002 %B7 2025 2026 %A7 203B 2606 2605 25CB 25CF 25CE 25C7 25C6 25A1 25A0 25B3 25B2 25BD 25BC 25C1 25C0 25B7 25B6 2664 2660 2661 2665 2667 2663 2299 25C8 25A3 25D0 25D1 2592 25A4 25A5 25A8 25A7 25A6 25A9 %B1 %D7 %F7 2260 2264 2265 221E 2234 %B0 2032 2033 2220 22A5 2312 2202 2261 2252 226A 226B 221A 223D 221D 2235 222B 222C 2208 220B 2286 2287 2282 2283 222A 2229 2227 2228 FFE2 21D2 21D4 2200 2203 %B4 FF5E 02C7 02D8 02DD 02DA 02D9 %B8 02DB %A1 %BF 02D0 222E 2211 220F 266D 2669 266A 266C 327F 2192 2190 2191 2193 2194 2195 2197 2199 2196 2198 321C 2116 33C7 2122 33C2 33D8 2121 2668 260F 260E 261C 261E %B6 2020 2021 %AE %AA %BA 2642 2640").replace(/(\S{4})/g,function(e){return"%u"+e}).split(" "),this.charSet[1]=unescape("%BD 2153 2154 %BC %BE 215B 215C 215D 215E %B9 %B2 %B3 2074 207F 2081 2082 2083 2084 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 FFE6 %24 FFE5 FFE1 20AC 2103 212B 2109 FFE0 %A4 2030 3395 3396 3397 2113 3398 33C4 33A3 33A4 33A5 33A6 3399 339A 339B 339C 339D 339E 339F 33A0 33A1 33A2 33CA 338D 338E 338F 33CF 3388 3389 33C8 33A7 33A8 33B0 33B1 33B2 33B3 33B4 33B5 33B6 33B7 33B8 33B9 3380 3381 3382 3383 3384 33BA 33BB 33BC 33BD 33BE 33BF 3390 3391 3392 3393 3394 2126 33C0 33C1 338A 338B 338C 33D6 33C5 33AD 33AE 33AF 33DB 33A9 33AA 33AB 33AC 33DD 33D0 33D3 33C3 33C9 33DC 33C6").replace(/(\S{4})/g,function(e){return"%u"+e}).split(" "),this.charSet[2]=unescape("3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 326A 326B 326C 326D 326E 326F 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 327A 327B 24D0 24D1 24D2 24D3 24D4 24D5 24D6 24D7 24D8 24D9 24DA 24DB 24DC 24DD 24DE 24DF 24E0 24E1 24E2 24E3 24E4 24E5 24E6 24E7 24E8 24E9 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 246A 246B 246C 246D 246E 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 320A 320B 320C 320D 320E 320F 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 321A 321B 249C 249D 249E 249F 24A0 24A1 24A2 24A3 24A4 24A5 24A6 24A7 24A8 24A9 24AA 24AB 24AC 24AD 24AE 24AF 24B0 24B1 24B2 24B3 24B4 24B5 2474 2475 2476 2477 2478 2479 247A 247B 247C 247D 247E 247F 2480 2481 2482").replace(/(\S{4})/g,function(e){return"%u"+e}).split(" "),this.charSet[3]=unescape("3131 3132 3133 3134 3135 3136 3137 3138 3139 313A 313B 313C 313D 313E 313F 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 314A 314B 314C 314D 314E 314F 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 315A 315B 315C 315D 315E 315F 3160 3161 3162 3163 3165 3166 3167 3168 3169 316A 316B 316C 316D 316E 316F 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 317A 317B 317C 317D 317E 317F 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 318A 318B 318C 318D 318E").replace(/(\S{4})/g,function(e){return"%u"+e}).split(" "),this.charSet[4]=unescape("0391 0392 0393 0394 0395 0396 0397 0398 0399 039A 039B 039C 039D 039E 039F 03A0 03A1 03A3 03A4 03A5 03A6 03A7 03A8 03A9 03B1 03B2 03B3 03B4 03B5 03B6 03B7 03B8 03B9 03BA 03BB 03BC 03BD 03BE 03BF 03C0 03C1 03C3 03C4 03C5 03C6 03C7 03C8 03C9 %C6 %D0 0126 0132 013F 0141 %D8 0152 %DE 0166 014A %E6 0111 %F0 0127 I 0133 0138 0140 0142 0142 0153 %DF %FE 0167 014B 0149 0411 0413 0414 0401 0416 0417 0418 0419 041B 041F 0426 0427 0428 0429 042A 042B 042C 042D 042E 042F 0431 0432 0433 0434 0451 0436 0437 0438 0439 043B 043F 0444 0446 0447 0448 0449 044A 044B 044C 044D 044E 044F").replace(/(\S{4})/g,function(e){return"%u"+e}).split(" "),this.charSet[5]=unescape("3041 3042 3043 3044 3045 3046 3047 3048 3049 304A 304B 304C 304D 304E 304F 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 305A 305B 305C 305D 305E 305F 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 306A 306B 306C 306D 306E 306F 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 307A 307B 307C 307D 307E 307F 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 308A 308B 308C 308D 308E 308F 3090 3091 3092 3093 30A1 30A2 30A3 30A4 30A5 30A6 30A7 30A8 30A9 30AA 30AB 30AC 30AD 30AE 30AF 30B0 30B1 30B2 30B3 30B4 30B5 30B6 30B7 30B8 30B9 30BA 30BB 30BC 30BD 30BE 30BF 30C0 30C1 30C2 30C3 30C4 30C5 30C6 30C7 30C8 30C9 30CA 30CB 30CC 30CD 30CE 30CF 30D0 30D1 30D2 30D3 30D4 30D5 30D6 30D7 30D8 30D9 30DA 30DB 30DC 30DD 30DE 30DF 30E0 30E1 30E2 30E3 30E4 30E5 30E6 30E7 30E8 30E9 30EA 30EB 30EC 30ED 30EE 30EF 30F0 30F1 30F2 30F3 30F4 30F5 30F6").replace(/(\S{4})/g,function(e){return"%u"+e}).split(" ");var t=jindo.$Fn(this.oApp.exec,this.oApp).bind("INSERT_SCHARACTERS",[this.oTextField.value]);jindo.$Fn(t,this).attach(this.oInsertButton,"click"),this.oApp.exec("SET_SCHARACTER_LIST",[this.charSet]);for(var i=0;i"),this.bIE?(t=jindo.$("