"use strict";try{window.MODULE||void 0}catch(e){void 0}!function(){void 0,void 0;var e=[MODULE.core.name],e=(window.$$__isEditTool&&e.push("angularSpectrumColorpicker"),MODULE.$set(MODULE.tool,e));void 0,void 0,void 0,e.run(["$injector","$notice","$busy","$toast","$import","$preview","$richEditor","FileSystem",function(o,e,t,n,i,l,a,r){var c="."+MODULE.tool.project+" .applicationContainer";e.parentSelector=c,t.parentSelector=c,n.parentSelector=c,i.parentSelector=c,window.debugMode&&(window.$data={application:o.get("$applications"),project:o.get("$projects"),document:o.get("$documents"),element:o.get("$elements"),select:o.get("$selects"),asset:o.get("$assets"),group:o.get("$groups"),component:o.get("$components"),template:o.get("$templates"),fs:r,history:o.get("$history"),app:function(){return this._get("$applications")},e:function(){return this._get("$elements")},d:function(){return this._get("$documents")},p:function(){return this._get("$projects")},s:function(){return this._get("$selects")},a:function(){return this._get("$assets")},g:function(){return this._get("$groups")},c:function(){return this._get("$components")},t:function(){return this._get("$templates")},h:function(){return this._get("$history")},_get:function(e){var t=o.get(e);if(!(t.$$_length<1)){if("$applications"===e)return t.get().$$_original;if("$history"===e)return t.get();var n,i={};for(n in t.$$_data)i[n]=t.get(n).$$_original;return i}}},void 0,void 0,void 0)}])}(),MODULE.tool.instance.config(["$routeProvider","$ariaProvider","$locationProvider","$mdInkRippleProvider",function(e,t,n,i){void 0,t.config({bindKeydown:!1}),i&&i.disableInkRipple&&i.disableInkRipple(),window.$$__isEditTool&&(e.when("/tool",{templateUrl:"tool.html"}).otherwise({redirectTo:"/tool"}),n.html5Mode({enabled:!1}))}]),function(){var e=MODULE.tool.instance;e.value("ContentViewName",{CONFIG:"Configuration",PROPERTY:"Property",EVENT:"Event",LAYER:"Layer",LAYOUT:"Layout",INFO:"Info",BASIC:"Basic",IMAGE:"Image",BACKGROUND:"Background",COMPONENT:"Component",TEMPLATE:"Template"}),e.value("ContentViewLabel",{CONFIG:"출판설정",PROPERTY:"속성",EVENT:"이벤트",LAYER:"레이어",LAYOUT:"레이아웃",INFO:"기타 정보",BASIC:"아이템",IMAGE:"이미지",BACKGROUND:"배경",COMPONENT:"컴포넌트",TEMPLATE:"템플릿"}),e.value("EventPrototype",window.$$__EventPrototype),e.value("ActionPrototype",window.$$__ActionPrototype)}(),MODULE.tool.instance.controller("AuthController4",["$scope","$element","$attrs","$toolBootstrap","$auth","$util","$externalAPI","FileSystem","$busy","$notice","$sce","$newApplicationMacro","$bundleFontHelper","CommandParam","$command","$version","$store","$timeout","$applicationSettingMacro","$applications",function(i,e,t,o,l,n,a,r,c,s,u,d,p,g,m,f,v,h,y,b){function x(i,t){var o=l.getAuth();s.open({isTop:!0,templateUrl:"popup/alert.html",controller:["$scope","$notice","originalConfig",function(e,t,n){e.close=function(e){void 0,t.close(e)},e.config={modal:!0,title:"사용자 인증"+(o.testMode?" (test)":""),yes:"확인",content:u.trustAsHtml(i)},e.$on("$destroy",function(){e.config=null}),n.enterValue=1,t.registNotice(e,n)}]}).then(function(e){t()},function(){t()})}o.clear(),function n(){var e=b.uid(),e=Boolean(e),t=[];e||t.push(function(e){var t;t=e,c.message("Application을 시작합니다."),e=new g({useExitProcess:!0,useConfiguration:!0}),e=d.getProcess(e),m.execute(e,function(e){h(function(){t()})})}),t.push(function(e){var t;t=e,l.check({isAppStart:!0},function(e){e?x(e=e||"등록 실패하였습니다.",function(){t()}):t()})}),t.push(function(e){var t=e;l.isSuccess()?t():(a.setTitle(f.project()+"를 시작합니다."),i.showRegist=!0,i.registComplete=function(e){l.isSuccess()?t():x(e=e||"등록 실패하였습니다.",function(){})})}),t.push(function(e){var t;t=e,l.isSuccess()?l.user({},function(e){e?x(e=e||"사용자 정보를 조회할 수 없습니다.",function(){t()}):t()}):t("로그인 상태가 아닙니다. 사용자 정보를 조회할 수 없습니다.")}),e||t.push(function(e){var t,n;l.isSuccess()?(c.message("Application 구성 요소를 설정합니다."),t=e,n=new g({bundleFontLoad:!0}),n=y.getProcess(n),m.execute(n,function(e){h(function(){t()})})):e()}),async.waterfall(t,function(e){var t=l.isSuccess();return e?(c.close(),void x(e,function(){t||n()})):t?void o.goApplication():(c.close(),void n())})}(),i.$on("$destroy",function(){})}]),MODULE.tool.instance.controller("GuideRulerController",["$scope","$element","$attrs","$projects",function(t,e,n,i){t.ingroupArea,t.ingroupOffset={axisX:0,axisY:0,scale:1},t.mouse={},t.enable=!1;var o=t.$watch(function(){var e=i.get();if(!e)return!1;e=e.getNoneCopyValue("documents");return!(!e||e.length<1)},function(e){t.enable=e});t.$on("$destroy",function(){t.ingroupArea=null,t.mouse=null,o()})}]),MODULE.tool.instance.controller("RootController",["$scope","$element","$attrs","$applications","$version","$store","$auth",function(n,e,t,i,o,l,a){n.isDemoVersion=o.isDemoVersion();var r=n.$watch(function(){return i.power},function(){n.applicationPower=i.power}),c=(n.colorTheme,n.$watch(function(){var e=i.get();return e?e.value("colorTheme"):""},function(e,t){e?n.colorTheme=e:(e=l.data("application","colorTheme"),n.colorTheme=e||"blue")})),s=(n.hasAuth=a.isSuccess(),n.$watch(function(){return a.isSuccess()},function(e,t){n.hasAuth=e}));n.$on("$destroy",function(){c(),r(),s()})}]),MODULE.tool.instance.controller("ScreenContainerController",["$scope","$element","$attrs","$key","$screenZoom","$selects","$projects","$applications","$timeout","Touch","$commandController","Default","$autoBackup","$richEditor",function(c,s,M,a,r,u,d,p,g,n,i,m,f,v){function o(e){var t=function(){var e=d.get();if(!e)return!1;e=e.getNoneCopyValue("documents");return!(!e||e.length<1)}();c.cursor=(e=t?e:"")||"","space"===c.cursor?c.cursorText="화면 이동":"ctrlSpace"===c.cursor||"ctrlAltSpace"===c.cursor?c.cursorText="확대/축소":c.cursorText="",c.protect=""!==c.cursor||E,c.$applyAsync(),(e?function(){C&&C.deleteEvent();(C=n.instance(I))._mouse_slop=0,C.createEvent(s,{start:y,move:b,end:$,click:w},this)}:l)(),c.$applyAsync()}function l(){n.remove(I),I=null,C&&C.deleteEvent()}function h(){A=T=D=!1,d.get().getNoneCopyValue("app").$$temp_zoomCenter=null,c.tempZoomStyle=null,r.clear()}function y(e){h(),D=!1,e.preventDefault(),S=null}function b(e,t){e.preventDefault();var n,i,o,l=a.spaceFlag;if(D)return T?(x(s.scrollLeft()-t.dx,s.scrollTop()-t.dy),void c.$applyAsync()):void(A&&void 0!==(t=function(e){var t=e.dx,e=e.dy,t=Math.abs(t),n=Math.abs(e);if((0!==t||0!==n)&&0!==n)return e=0t.width?l/2:e,l=i>t.height?o/2:e;S={x:n,y:l},L=!0,c.$applyAsync()},c.$on("jjScreenSizeChange",function(e){k()}),c.$watch(function(){var e=u.get(c.uid);return e?e.value("editingUID"):""},function(e){c.editingUID=e,k()}));c.$on("$destroy",function(){k(),s.off("scroll",e),U(),F(),l(),t&&t()})}]),MODULE.tool.instance.controller("ToolController",["$scope","$element","$attrs","$toolBootstrap","$openWorkspace","$status","$timeout","$externalAPI","$applications","$projects","$documents","$selects","ContentViewName","$richEditor","$elements","ElementType","$commandController","$rootScope","$import","$shortcuts","$notice","$busy","$clipboard","FileSystem","$fsWatch","$fsTree","$projectWatcher","$autoBackup",function(n,M,U,e,t,F,i,o,r,c,s,l,a,u,d,p,g,m,N,f,B,v,h,y,b,x,$,R){function w(){S&&(i.cancel(S),S=null),S=i(function(){i.cancel(S),S=null,j()},250)}function j(){var e;!window.document.body||(e=r.get())&&((e=e.temp()).applicationWidth=window.document.documentElement.clientWidth,e.applicationHeight=window.document.documentElement.clientHeight,g.zoomStep({direction:"fit"}))}function _(){void 0,b.close(I),x.unregistWatcher(),$.remove(),I=null}function k(){P<1?C():P<100||(P<200?v.open({message:L,noDelay:!0,modal:!1}):(v.isOpened()||v.open({message:L,noDelay:!0,modal:!1}),v.progress(O,P,L)))}function C(){r.elementCreationComplete()||(void 0,void 0,void 0,O=0,n.elementCreationComplete=!0,r.elementCreationComplete(!0),n.$applyAsync(),v.close(-1))}e.ready(function(e){Boolean(c.uid())||t.isOpen()||e||t.open()}),n.ContentViewName=a,n.openPublishSetting=function(){g.publishSetting()};var S,E,I,D,T=n.$watch(function(){return r.power},function(){n.applicationPower&&j()}),A=(angular.element(window).on("resize",w),n.$watch(function(){return r.uid()},function(e){j(),f.application(e)})),V=(n.project="",n.projectData={},n.$watch(function(){return c.uid()},function(e,t){f.project(e),e?(r.safetyCall(n,function(){n.project=e}),E=e?E||h.watch(n):(E&&E(),null)):n.project=e})),z=(n.document="",n.$watch(function(){return s.uid()},function(e,t){f.document(e),n.document=e,O=0,P=n.document?s.get(n.document).getNoneCopyValue("elements").length:0,n.elementCreationComplete=!1,r.elementCreationComplete(!1),void 0,k(),n.$applyAsync()})),H=n.$watch(function(){var e=l.get();return e?e.getLength():0},function(e,t){f.select(0!==e)}),G=n.$watch(function(){return r.projectIsOpen()},function(e,t){D&&i.cancel(D),D=i(function(){(n.projectIsOpen=e)?(void 0,(I=y.pathToActual(y.WORK_OPS_FOLDER))&&!b.hasWatch(I)&&(x.registWatcher(),v.open({message:"프로젝트 폴더내 파일 목록 탐색...",modal:!1}),b.open(I,{},function(){setTimeout(function(){$.create(I,function(){v.close()})})}))):_()},e?500:1e3)}),W=n.$watch(function(){var e=c.get();return e?e.getNoneCopyValue("subject"):""},function(t,e){r.safetyCall(n,function(){var e;n.projectData.subject=t||"",e=n.projectData.subject,o.setTitle(e=e||"제목 없음")})}),K=(n.editProtecting=!1,n.isTextEditing=!1,n.isRichtextEditing=!1,n.editorConfig=null,n.$watch(function(){var e=l.get(n.document);return e?e.value("editingUID"):""},function(e){var t;n.protect=Boolean(e),n.editProtecting=Boolean(e),n.isTextEditing=!1,n.isRichtextEditing=!1,n.editorConfig=null,e&&(t=d.get(e),n.isTextEditing=!!t&&t.type()===p.TEXT,n.isRichtextEditing=n.isTextEditing&&t.option().useRichtext||!1,n.isRichtextEditing&&(n.editorConfig=u.setEditorConfig({uid:e})))})),q=(n.appProtect=!1,n.$watch(function(){return r.protect},function(e,t){n.appProtect=e,m.inputAllow(e?0:1)})),P=(n.elementCreationComplete=!1,-1),O=-1,L="HTML 요소를 생성중입니다.";n.$on("$createElementContainer",function(e,t){var n,i,o,l,a;r.elementCreationComplete()||(++O,k(),O===P&&(C(),(a=c.get()).tooldata("layer",angular.merge({},(o=i=!(n=!0),((l=s.get())?l.getNoneCopyValue("elements"):[]).forEach(function(e){e=d.get(e);e.isGroupContainer()&&n&&!e.layer("isFold")&&(n=!1),!i&&e.layer("isLock")&&(i=!0),!o&&e.layer("isHide")&&(o=!0)}),{isFold:n,isLock:i,isHide:o}))),void 0))}),n.$on("$destroy",function(){_(),angular.element(window).off("resize",w),n.projectData=null,E&&E(),E=null,T(),A(),V(),z(),H(),W(),K(),G(),q()})}]),MODULE.tool.instance.controller("TopInfoController",["$scope","$element","$attrs","$selects","$groups","$documents","$elements","$commandController","$applications",function(i,e,t,o,l,n,a,r,c){i.ingroupDepths=[];var s=i.$watchCollection(function(){var e;if(c.power)return e=o.get(),e?e.getNoneCopyValue("inGroup"):null},function(e){var n,t;e=e,!(t=o.get())||!e||!(e=t.getNoneCopyValue("inGroup"))||e.length<1?i.ingroupDepths=[]:(n=[],e.forEach(function(e){var t=l.get(e).value("owner"),t=a.get(t).name();n.unshift({name:t,group:e})}),n.unshift({name:"그룹 편집 나가기",group:""}),i.ingroupDepths=n)}),u=(i.onClick_depth=function(e){void 0;e={document:n.uid(),group:e.group};r.moveEditGroup(e)},i.$watch(function(){var e=o.get();return e?e.value("editingUID"):""},function(e){i.protect=Boolean(e)}));i.$on("$destroy",function(){s(),u()})}]),function(){function e(){function e(e,t,n){function i(e){t.hasClass("disable")&&(void 0,e.stopImmediatePropagation())}t.on("click",i),e.$on("$destroy",function(){t.off("click",i)})}return{restrict:"A",scope:!(e.$inject=["$scope","$element","$attrs"]),controller:e}}var t=MODULE.tool.instance;t.directive("iconField",e),t.directive("subIconField",e)}(),function(){function e(o,l){return{restrict:"A",scope:!1,link:function(e,t,n){function i(e){var t=n.jjClipboard;t&&l.copyTo(t,e.target)&&o.message("클립보드에 복사되었습니다.",{delay:o.SHORTEST})}t.on("click",i),e.$on("$destroy",function(){t.off("click",i)})}}}e.$inject=["$toast","$clipboard"],MODULE.tool.instance.directive("jjClipboard",e)}(),function(){function e(i){return{restrict:"A",scope:!1,link:function(t,n,e){t.$watch(function(){return t.$eval(e.ngBindHtml)},function(e){i(n.children())(t)})}}}e.$inject=["$compile"],MODULE.tool.instance.directive("jjDynamicContent",e)}(),function(){function e(o){function e(e,t,n){function i(e){var t=n.jjLink;t&&o.weblink(t)}t.on("click",i),e.$on("$destroy",function(){t.off("click",i)})}return{restrict:"AE",scope:!(e.$inject=["$scope","$element","$attrs"]),controller:e}}e.$inject=["$util"],MODULE.tool.instance.directive("jjLink",e)}(),function(){function e(i,e){return{restrict:"A",compile:function(){return function(e,t,n){new(i.get(e,t,n).extend("Scroller",{setUnitHeight:function(){return t.find("[ng-repeat]:first").outerHeight()}}));e.$on("$destroy",function(){0})}}}}e.$inject=["ScrollerBase","$projects"],MODULE.tool.instance.directive("jjScroller",e)}(),function(){function e(a,r){return{priority:100,restrict:"A",scope:!1,link:function(e,t,n){function i(e){return r.getAvailableSRC(e)}var o,l="ngSrc";o=i(n[l]),n.$set(l,a.getTrustedMediaUrl(o)),n.$observe(l,function(e){e&&(e=i(e),n.$set("src",e))})}}}e.$inject=["$sce","FileSystem"],MODULE.tool.instance.directive("ngSrc",e)}(),function(){function e(t,i,o,l){return{get:function(a,r,e){return t.create("ScrollerBase",{unitHeight:void 0,setUnitHeight:function(){return 0},init:function(){var t=this,e=(a.scrollView={initialize:!1,min:0,max:r[0].clientHeight,unitHeight:this.unitHeight||0,scroll:0,scrollHeight:r[0].scrollHeight},a.$applyAsync(function(){t.onUpdateRange()}),this.scrollWatcher()),n=this.scrollHeightWatcher(),i=this.windowResizingWatcher(),o=this.setWatch(),l=this.itemChangedListener();a.autoScrollSelectedItem=function(e){t.autoScrollSelectedItem(e)},a.autoScrollSelectChanged=function(e){t.selectChanged(e)},a.autoScrollReset=function(e){t.reset(e)},a.$on("$destroy",function(){l(),e&&e(),n&&n(),i&&i(),o&&o(),a.scrollView=null,t.selects=null})},setWatch:function(){},setRange:function(){var e,t,n,i;null!==a.scrollView&&((isNaN(this.unitHeight)||this.unitHeight<1)&&(this.unitHeight=this.setUnitHeight()),n=(e=r[0].scrollHeight)-(t=r[0].clientHeight),i=r.scrollTop(),a.scrollView.initialize=0=o.scrollView.max?"deactivate":"activate",o.state!==i&&(o.state=i,s(),"activate"===o.state&&(t=a.itemRef||"jj-tree-item",e=a.dnd,t="
"),o.alert({title:"속성 도움말",content:e,ok:"확인"}).then(function(e){},function(){}))},this.setIsPreview(),this.setModelOptions(),this.config())},setIsPreview:function(){throw new Error("오버라이딩 안함")},setModelOptions:function(){r.modelOptions={allowInvalid:!0,updateOn:"blur"}},config:function(){var t=this;this.unwatch_schema=r.$watch(function(){return r.schema},function(e){t.schemaItemChanged(e)},!0)},schemaItemChanged:function(e){l.setEditorType(r,e),r.isPrimitiveDataType=!r.useComplexEditor,r.isLine=!1,e.value=this.valueTypeCheck(e),this.setItem(e),r.placeholder=this.getPlaceholder(),this.setReadOnly();var t=this.userValueTypeCheck();r.user={value:this.deepCopy(t)},this.setWatch_userValue(),this.setItemEditor(e),r.$applyAsync()},valueTypeCheck:function(e){var t=e.type,e=e.value;return i.toPrimitiveType(e,t,{defaultNumber:0})},userValueTypeCheck:function(){var e=r.copyItem.type,t=this.getUserValue();return i.toPrimitiveType(t,e,{defaultNumber:""})},getPlaceholder:function(){return r.copyItem.editor.placeholder||""},setItem:function(e){throw new Error("오버라이딩 안함")},setReadOnly:function(){var e,t=r.copyItem.editorType,n=r.copyItem.editor,i=r.copyItem.value,o=n.readOnly,l=n.readOnlyKey,a=n.readOnlyValue;void 0===o&&void 0===l&&void 0===a&&(a=l=o=!1),"editor"===t?"array"===(e=r.copyItem.type)?r.readOnlyValue=o:"object"===e?(r.readOnlyKey=l,r.readOnlyValue=a):"list"===e&&(r.readOnlyValue=o):(r.readOnly=o,r.isReadOnlyTextType=["text","number","textarea"].includes(t),r.isReadOnlyTextType?r.labelForReadOnly=i:"checkbox"===t&&(r.labelForReadOnly=i?n.label:""))},deepCopy:function(e){return e&&"object"==typeof e?JSON.parse(JSON.stringify(e)):e},getDefaultSettingValue:function(){return r.schema.value||""},getUserValue:function(){throw new Error("오버라이딩 안함")},setWatch_userValue:function(){this.unwatch_userValue&&(this.unwatch_userValue(),this.unwatch_userValue=null);var n=this,e=l.isComplexDataType(r.copyItem.type);this.unwatch_userValue=r.$watch(function(){return r.user.value},function(e,t){e!==t&&(n.checkMultiselectError(),n.modifyValues())},e)},modifyValues:function(){throw new Error("오버라이딩 안함")},setItemEditor:function(e){r.styleOption={lineBreak:r.copyItem.editor.lineBreak?"flex":"inline-flex"},r.isListEditorType&&(this.checkMultiselectError(),this.setMultiselectList())},checkMultiselectError:function(){var e=r.copyItem.editor.multiSelect;if(void 0===e)return r.isError=!1,void r.$applyAsync();var t=r.user.value;r.isError=!e&&1e;n&&i.category.protectDocument&&(e=!0),t&&i.category.protectGroup&&(e=!0),i.activate=e?"disable":"enable",i.contentView.name==i.category.name&&(i.contentView.enable=!e)}i.activate="disable";var o=i.$watch("contentView.isDocument",function(e,t){n()}),l=i.$watch("contentView.isGroup",function(e,t){n()}),a=i.$watch("contentView.level",function(e,t){n()}),r=(i.state="normal",i.$watch("contentView.name",function(e,t){e===i.category.name?i.state="selected":i.state="normal",n()}));i.onClick=function(e){!0!==e&&"disable"===i.activate||(i.state="selected",i.contentView.name!==i.category.name&&i.changeContentView(i.category.name))},i.$on("$destroy",function(){o(),l(),a(),r(),i.category=null,i.contentView=null})}return l.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-category-menu-item.html",replace:!0,scope:!0,controller:l}}e.$inject=["$commandController","$projects","$status","MessageType","$timeout"],MODULE.tool.instance.directive("jjCategoryMenuItem",e)}(),function(){function e(p,g,e,m,f,t,n,i,v,h,y,b,x,$){function o(u,e,t){function n(){var e,t;u.dataName=r.MASTER,e={folder:g.BUNDLE_RESOURCE+g.resourceMasterFolder,getContent:i},t=u.dataName,u.data[t].loaded=f.dataLoaded(t),u.data[t].loaded?o(t):(e.dataName=t,e.iterate=function(o){return function(e,t){var n=g.pathToActual(o.folder),i=(i=t.pathString.replace(n,""),g.parsePath(i)),i={bundle:!0,categoryPath:i.folder,categoryName:i.folderName,label:i.fileName,dataName:e,baseFolder:n,source:t.pathString,uid:m.ASSET+"-"+t.uid},n=g.parsePath(i.source);return e===r.MASTER&&n.file===g.MASTER_DELETE_FILE_NAME&&(i.source=null,i.label=" 배경 없음"),i}}(e),f.loadItems(e,function(){null!==u.data&&(u.data[t].loaded=f.dataLoaded(t),u.$applyAsync())}))}function i(e,t){return{type:p.MASTER,source:t.source,uid:t.uid}}function o(e){var t;switch(u.listViewMode.background){case"tree":t=f.getTree(e);break;case"list":t=f.getItems(e).map(function(e){return f.getInfo(e)});break;default:t=f.getItems(e).map(function(e){return f.getInfo(e)})}u.data[e].items=t;var n=e,i=u.data[n].items,o=u.slider,l=u.sliderEextendAll;"tree"===u.listViewMode.background&&(i=i.children);var a,r,c={};for(a in i){var s=i[a].categoryPath||"/";s in o||(o[s]=l),c[s]=!0}for(r in o)r in c||delete o[r];d()}function d(){var e,t=u.slider,n=!1;for(e in t)if(t[e]){n=!0;break}u.sliderEextendAll=n}function l(){h.get().isChanged(!0),v.execute({ignoreCapture:!0})}u.companyNotSupport=x.companyLimit(),u.viewName=y.BACKGROUND,u.viewLabel=b.BACKGROUND,u.listViewMode=h.get().getNoneCopyValue("listViewMode"),u.slider=h.get().getNoneCopyValue("sliderCategory").background,u.sliderEextendAll=!1;var a,r={MASTER:"master"},c=(u.data={},a=r.MASTER,u.data[a]||(u.data[a]={loaded:!1,items:null}),n(),u.$watchCollection(function(){return f.getItems(r.MASTER)},function(e,t){e&&o(r.MASTER)})),s=$.$on("listViewModeChanged",function(e,t){u.listViewModeChanged(t)});u.listViewModeChanged=function(e){u.listViewMode.background!==e&&(u.listViewMode.background=e,o(u.dataName),l()),u.$applyAsync()},u.toggleSliderExtendAll=function(e){u.sliderEextendAll=!u.sliderEextendAll;var t,n=u.slider;for(t in n)n[t]=u.sliderEextendAll;l()},u.changeSliderExtend=function(e,t,n){u.slider[e]=t,d(),l()},u.$on("$destroy",function(){c(),u.data=null,u.slider=null,s()})}return o.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-background.html",replace:!0,scope:!0,controller:o}}e.$inject=["ElementType","FileSystem","Default","UIDType","$contentAssetSetting2","$contentTemplateSetting","$commandController","$templates","$autoBackup","$applications","ContentViewName","ContentViewLabel","$version","$rootScope"],MODULE.tool.instance.directive("jjViewContentBackground",e)}(),function(){function e(o,l,e,t,n,a,r,c,i,s){function u(e,t,n){e.companyNotSupport=c.companyLimit(),e.viewName=a.BASIC,e.viewLabel=r.BASIC;var i=[l.getSetting(o.TEXT),l.getSetting(o.INPUT),l.getSetting(o.VIDEO),l.getSetting(o.AUDIO),l.getSetting(o.IMAGE),l.getSetting(o.MASK)];c.companyLimit()||(i=i.concat([l.getSetting(o.HTML),l.getSetting(o.WEB)])),e.elementItems=i,e.$on("$destroy",function(){e.elementItems=null})}return u.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-basic.html",replace:!0,scope:!0,controller:u}}e.$inject=["ElementType","$contentItemSetting","$componentLoader","$contentComponentSetting","$commandController","ContentViewName","ContentViewLabel","$version","$applications","$autoBackup"],MODULE.tool.instance.directive("jjViewContentBasic",e)}(),function(){function e(e,u,f,d,p,v,h,y,b,x){function t(g,e,t){function n(){l(),r=g.$watch(function(){return f.getSetting()},i,!0),g.installComplete||d.installComponent(function(e,t){void 0,g.$applyAsync()})}function i(e){var t,n=[],i=[];for(t in e){var o=e[t];(o.bundle?i:n).push(o)}var l=u.installed();l.bundle?(g.bundleComponentItems=i,a("bundle")):g.bundleComponentItems=null,l.user?(g.userComponentItems=n,a("user")):g.userComponentItems=null}function a(e){var t,n,i="user"===e,o=i?g.listViewMode.userComponent:g.listViewMode.component,l=i?g.userComponentItems:g.bundleComponentItems;switch(o){case"tree":n=e,f.setTree(n,angular.copy(l)),t=f.getTree(n);break;case"list":t=l;break;default:t=l}i?g.userData=t:g.bundleData=t;var o=e,i="user"===o,a=i?g.userData:g.bundleData,r=i?g.slider_user:g.slider,c=i?g.sliderEextendAll_user:g.sliderEextendAll;"tree"===(i?g.listViewMode.userComponent:g.listViewMode.component)&&(a=a.children);var s,u,d={};for(s in a){var p=a[s].categoryPath||"/";p in r||(r[p]=c),d[p]=!0}for(u in r)u in d||delete r[u];m(o)}function m(e){var t,e="user"===e,n=e?g.slider_user:g.slider,i=!1;for(t in n)if(n[t]){i=!0;break}e?g.sliderEextendAll_user=i:g.sliderEextendAll=i}function o(){y.get().isChanged(!0),b.execute({ignoreCapture:!0})}function l(){g.bundleComponentItems=null,g.userComponentItems=null,g.userData=null,g.bundleData=null,r&&r(),r=null}g.companyNotSupport=h.companyLimit(),g.viewName=p.COMPONENT,g.viewLabel=v.COMPONENT,g.installComplete=u.installComplete(),n();var r,c=g.$watch(function(){return u.installed()},function(e,t){g.installComplete=u.installComplete(),g.installComplete&&c(),i(f.getSetting())},!0),s=(g.listViewMode=y.get().getNoneCopyValue("listViewMode"),g.userData=null,g.bundleData=null,x.$on("listViewModeChanged",function(e,t){g.listViewModeChanged(t)}));g.listViewModeChanged=function(e,t){t&&"user"!==t||g.listViewMode.userComponent!==e&&(g.listViewMode.userComponent=e,a("user"),o()),t&&"bundle"!==t||g.listViewMode.component!==e&&(g.listViewMode.component=e,a("bundle"),o()),g.$applyAsync()},g.importComponent=function(){d.importComponent()},g.exportComponent=function(){d.exportComponent()},g.slider=y.get().getNoneCopyValue("sliderCategory").component,g.sliderEextendAll=!0,g.slider_user=y.get().getNoneCopyValue("sliderCategory").userComponent,g.sliderEextendAll_user=!1,g.toggleSliderExtendAll=function(e){var t,n="user"===e,i=(n?g.sliderEextendAll_user=!g.sliderEextendAll_user:g.sliderEextendAll=!g.sliderEextendAll,n?g.slider_user:g.slider);for(t in i)i[t]=n?g.sliderEextendAll_user:g.sliderEextendAll;o()},g.changeSliderExtend=function(e,t,n){("user"===n?g.slider_user:g.slider)[e]=t,m(n),o()},g.$on("$destroy",function(){s(),c&&c(),g.installComplete=!1,g.slider=null,g.slider_user=null,l()})}return t.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-component.html",replace:!0,scope:!0,controller:t}}e.$inject=["ElementType","$componentLoader","$contentComponentSetting","$commandController","ContentViewName","ContentViewLabel","$version","$applications","$autoBackup","$rootScope"],MODULE.tool.instance.directive("jjViewContentComponent",e)}(),function(){function e(i,o,l,a){function e(t,e,n){t.viewName=o.CONFIG,t.viewLabel=l.CONFIG,t.slider=i.get().getNoneCopyValue("slider"),t.toggleSlider=function(e){t.slider[e]=!t.slider[e],i.get().isChanged(!0),a.execute({ignoreCapture:!0})},t.$on("$destroy",function(){})}return e.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-config.html",replace:!0,scope:!0,controller:e}}e.$inject=["$applications","ContentViewName","ContentViewLabel","$autoBackup"],MODULE.tool.instance.directive("jjViewContentConfig",e)}(),function(){function e(s,u,e,t,n,i,o,d,p,l,g,a){function r(l,a,e){l.viewName=i.EVENT,l.viewLabel=o.EVENT;var r,c,t=l.$watch(function(){var e=s.get();return e?e.getNoneCopyValue("select"):null},function(e,t){var n,i,o=s.get(),o=o?o.get():[];(o=o).length<1?(i=d.DOCUMENT,l.protect=!1):1
'),(n=l.$new(!1)).type=i,p(o)(n),i=a.find("[element-event]"),r&&(r.remove(),r=null),c&&(c.$destroy(),c=null),i.append(o),r=o,c=n},!0);l.submit=function(e,t){g.submit(e,t,function(){void 0})},l.$on("$destroy",function(){r=r&&null,c&&(c.$destroy(),c=null),t()})}return r.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-event.html",replace:!0,scope:!0,controller:r}}e.$inject=["$selects","$elements","$documents","$applications","$timeout","ContentViewName","ContentViewLabel","ElementType","$compile","$commandController","$propertyManager","$animate"],MODULE.tool.instance.directive("jjViewContentEvent",e)}(),function(){function e(p,g,m,f,v,e,t,n,h,y,b,x,$,w){function i(u,e,t){function n(){var e,t;u.dataName=r.IMAGE,e={folder:g.BUNDLE_RESOURCE+g.resourceImagesFolder,getContent:i},t=u.dataName,u.data[t].loaded=v.dataLoaded(t),u.data[t].loaded?o(t):(e.dataName=t,e.iterate=function(o){return function(e,t){var n=g.pathToActual(o.folder),i=(i=t.pathString.replace(n,""),g.parsePath(i)),i={bundle:!0,categoryPath:i.folder,categoryName:i.folderName,label:i.fileName,dataName:e,baseFolder:n,source:t.pathString,uid:f.ASSET+"-"+t.uid},n=g.parsePath(i.source);return e===r.MASTER&&n.file===g.MASTER_DELETE_FILE_NAME&&(i.source=null,i.label=" 배경 없음"),i}}(e),v.loadItems(e,function(){null!==u.data&&(u.data[t].loaded=v.dataLoaded(t),u.$applyAsync())}))}function i(e,t){return{type:p.IMAGE,css:{width:m.element.width,height:m.element.height,minWidth:m.element.minWidth,minHeight:m.element.minHeight},option:{useCacheImage:!0,_$$flexibleSize:!1,_$$editable:!0,layout:angular.copy(m.layout)},source:t.source,uid:t.uid}}function o(e){var t;switch(u.listViewMode.image){case"tree":t=v.getTree(e);break;case"list":t=v.getItems(e).map(function(e){return v.getInfo(e)});break;default:t=v.getItems(e).map(function(e){return v.getInfo(e)})}u.data[e].items=t;var n=e,i=u.data[n].items,o=u.slider,l=u.sliderEextendAll;"tree"===u.listViewMode.image&&(i=i.children);var a,r,c={};for(a in i){var s=i[a].categoryPath||"/";s in o||(o[s]=l),c[s]=!0}for(r in o)r in c||delete o[r];d()}function d(){var e,t=u.slider,n=!1;for(e in t)if(t[e]){n=!0;break}u.sliderEextendAll=n}function l(){y.get().isChanged(!0),h.execute({ignoreCapture:!0})}u.companyNotSupport=$.companyLimit(),u.viewName=b.IMAGE,u.viewLabel=x.IMAGE,u.listViewMode=y.get().getNoneCopyValue("listViewMode"),u.slider=y.get().getNoneCopyValue("sliderCategory").image,u.sliderEextendAll=!1;var a,r={IMAGE:"image"},c=(u.data={},a=r.IMAGE,u.data[a]||(u.data[a]={loaded:!1,items:null}),n(),u.$watchCollection(function(){return v.getItems(r.IMAGE)},function(e,t){e&&o(r.IMAGE)})),s=w.$on("listViewModeChanged",function(e,t){u.listViewModeChanged(t)});u.listViewModeChanged=function(e,t){u.listViewMode.image!==e&&(u.listViewMode.image=e,o(u.dataName),l()),u.$applyAsync()},u.toggleSliderExtendAll=function(e){u.sliderEextendAll=!u.sliderEextendAll;var t,n=u.slider;for(t in n)n[t]=u.sliderEextendAll;l()},u.changeSliderExtend=function(e,t,n){u.slider[e]=t,d(),l()},u.$on("$destroy",function(){c(),u.data=null,u.slider=null,s()})}return i.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-image.html",replace:!0,scope:!0,controller:i}}e.$inject=["ElementType","FileSystem","Default","UIDType","$contentAssetSetting2","$contentTemplateSetting","$commandController","$templates","$autoBackup","$applications","ContentViewName","ContentViewLabel","$version","$rootScope"],MODULE.tool.instance.directive("jjViewContentImage",e)}(),function(){function e(i,o,e,l,a,r,t,c){function n(e,t,n){e.viewName=l.INFO,e.viewLabel=a.INFO,e.version=i.version(),e.openShortcutsPage=function(){o.openShortcutsPage()},e.$on("$destroy",function(){}),e.getDefaultValue=function(e,t,n){if(t in r)return r[t]},e.watch_property=function(e,t,n){return t in r?r[t]:""},e.itemChange=function(e,t,n){void 0,e in r&&(n=e,e=t.value,r[n]=e,c.data("defaultValue",n,e,!0),c.save())}}return n.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-info.html",replace:!0,scope:!0,controller:n}}e.$inject=["$version","$commandController","$menuCall","ContentViewName","ContentViewLabel","Default","$defaultProperty","$store"],MODULE.tool.instance.directive("jjViewContentInfo",e)}(),function(){function e(b,x,$,w,j,_,k,C,S,E,I){function e(i,o,e){function t(){p&&(n(g=p=!1),C.customKeyContext(m,!0))}function n(e){void 0!==e?S.isMultiSelecting=e:(e=i.selects,S.isMultiSelecting=e&&0"),i=angular.element(n),o=c.$new(!1),n=(j(i)(o),l.find("[element-property]").append(i),a=i,r=o,e);s&&s(),u&&u(),d&&d(),1==n.length&&(t=n[0])?(s=c.$watch(function(){var e=v.get(t);return e?e.value("currentState"):""},function(e,t){c.status.state=e}),u=c.$watch(function(){var e=v.get(t);return!!e&&e.value("overStateEnabled")},function(e,t){c.status.overStateEnabled=e}),d=c.$watch(function(){var e=v.get(t);return!!e&&e.value("downStateEnabled")},function(e,t){c.status.downStateEnabled=e})):(c.status.state="",c.status.overStateEnabled=!1,c.status.downStateEnabled=!1)}function i(){var e=!1;"over"===c.status.state?e=!c.status.overStateEnabled:"down"===c.status.state&&(e=!c.status.downStateEnabled),c.status.protect=e}c.viewName=b.PROPERTY,c.viewLabel=x.PROPERTY,c.status={protect:!1,state:"",overStateEnabled:!1,downStateEnabled:!1},c.stateEnableChanged=function(e){function t(e){if(!e)return!0;for(var t in e)return!1;return!0}var n=f.get();if(n){n=n.isSingleSelected();if(n){var i=v.get(n);if(i){var o={};if("over"==e)a="overStateEnabled",l=c.status.overStateEnabled;else{if("down"!=e)return;a="downStateEnabled",l=c.status.downStateEnabled}o[a]=l;var l,a={},i=i.value("state"),r=t(i[e].css)||t(i[e].option)||t(i[e].style),i=(l&&r&&(l=i[e],r=i.normal,t(l.css)&&((l=l||{}).css=angular.copy(r.css)),t(l.style)&&((l=l||{}).style=angular.copy(r.style)),t(l.option)&&((l=l||{}).option=angular.copy(r.option)),a[e]=l,o.state=a),{document:h.uid(),elements:[{element:n,data:o}]});_.modifyElement(i)}}}},c.stateChange=function(e){var t=f.get().isSingleSelected();t?(t={ignoreCapture:!0,ignoreBackup:!0,document:h.uid(),elements:[{element:t,data:{currentState:c.status.state}}]},_.modifyElement(t)):c.status.state=""},c._refreshContentPanel=!1;var a,r,s,u,d,t=c.$watch("_refreshContentPanel",function(e,t){c._refreshContentPanel&&(c._refreshContentPanel=!1,C(function(){n()},0))}),o=c.$watch(function(){var e=f.get();return e?e.getNoneCopyValue("currentGroup"):""},function(e,t){c._refreshContentPanel=!0,c.$applyAsync()}),p=c.$watch(function(){var e=f.get();return e?e.getNoneCopyValue("select"):null},function(e,t){c._refreshContentPanel=!0,c.$applyAsync()},!0),g=(c.slider=y.get().getNoneCopyValue("slider"),c.toggleSlider=function(e){c.slider[e]=!c.slider[e],y.get().isChanged(!0),$.execute({ignoreCapture:!0})},c.$watch(function(){var e=!1;return"over"===c.status.state?e=!c.status.overStateEnabled:"down"===c.status.state&&(e=!c.status.downStateEnabled),e},function(e,t){i()})),m=c.$watch(function(){var e=f.get(c.uid);return e?e.value("editingUID"):""},function(e){i()});c.getCurrentPropertyValue=function(e,t,n){e=v.get(e);return(e&&e[t]()||{})[n]},c.submit=function(e,t){k.submit(e,t,function(){void 0})},c.$on("$destroy",function(){a=a&&null,r&&(r.$destroy(),r=null),t(),p(),o(),g(),m(),s&&s(),u&&u(),d&&d()})}return e.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-property.html",replace:!0,scope:!0,controller:e}}e.$inject=["$selects","$elements","$documents","$applications","ContentViewName","ContentViewLabel","$autoBackup","ElementType","$compile","$commandController","$propertyManager","$timeout"],MODULE.tool.instance.directive("jjViewContentProperty",e)}(),function(){function e(e,u,f,d,p,v,h,y,b,x){function t(g,e,t){function n(){l(),r=g.$watch(function(){return f.getSetting()},i,!0),g.installComplete||d.installTemplate(function(e,t){void 0,g.$applyAsync()})}function i(e){var t,n=[],i=[];for(t in e){var o=e[t];(o.bundle?i:n).push(o)}var l=u.installed();l.bundle?(g.bundleTemplateItems=i,a("bundle")):g.bundleTemplateItems=null,l.user?(g.userTemplateItems=n,a("user")):g.userTemplateItems=null}function a(e){var t,n,i="user"===e,o=i?g.listViewMode.userTemplate:g.listViewMode.template,l=i?g.userTemplateItems:g.bundleTemplateItems;switch(o){case"tree":n=e,f.setTree(n,angular.copy(l)),t=f.getTree(n);break;case"list":t=l;break;default:t=l}i?g.userData=t:g.bundleData=t;var o=e,i="user"===o,a=i?g.userData:g.bundleData,r=i?g.slider_user:g.slider,c=i?g.sliderEextendAll_user:g.sliderEextendAll;"tree"===(i?g.listViewMode.userTemplate:g.listViewMode.template)&&(a=a.children);var s,u,d={};for(s in a){var p=a[s].categoryPath||"/";p in r||(r[p]=c),d[p]=!0}for(u in r)u in d||delete r[u];m(o)}function m(e){var t,e="user"===e,n=e?g.slider_user:g.slider,i=!1;for(t in n)if(n[t]){i=!0;break}e?g.sliderEextendAll_user=i:g.sliderEextendAll=i}function o(){y.get().isChanged(!0),b.execute({ignoreCapture:!0})}function l(){g.bundleTemplateItems=null,g.userTemplateItems=null,g.userData=null,g.bundleData=null,r&&r(),r=null}g.companyNotSupport=h.companyLimit(),g.viewName=p.TEMPLATE,g.viewLabel=v.TEMPLATE,g.installComplete=u.installComplete(),n();var r,c=g.$watch(function(){return u.installed()},function(e,t){g.installComplete=u.installComplete(),g.installComplete&&c(),i(f.getSetting())},!0),s=(g.listViewMode=y.get().getNoneCopyValue("listViewMode"),g.userData=null,g.bundleData=null,x.$on("listViewModeChanged",function(e,t){g.listViewModeChanged(t)}));g.listViewModeChanged=function(e,t){t&&"user"!==t||g.listViewMode.userTemplate!==e&&(g.listViewMode.userTemplate=e,a("user"),o()),t&&"bundle"!==t||g.listViewMode.template!==e&&(g.listViewMode.template=e,a("bundle"),o()),g.$applyAsync()},g.importTemplate=function(){d.importTemplate()},g.exportTemplate=function(){d.exportTemplate()},g.slider=y.get().getNoneCopyValue("sliderCategory").template,g.sliderEextendAll=!1,g.slider_user=y.get().getNoneCopyValue("sliderCategory").userTemplate,g.sliderEextendAll_user=!1,g.toggleSliderExtendAll=function(e){var t,n="user"===e,i=(n?g.sliderEextendAll_user=!g.sliderEextendAll_user:g.sliderEextendAll=!g.sliderEextendAll,n?g.slider_user:g.slider);for(t in i)i[t]=n?g.sliderEextendAll_user:g.sliderEextendAll;o()},g.changeSliderExtend=function(e,t,n){("user"===n?g.slider_user:g.slider)[e]=t,m(n),o()},g.$on("$destroy",function(){s(),c&&c(),g.installComplete=!1,g.slider=null,g.slider_user=null,l()})}return t.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/jj-view-content-template.html",replace:!0,scope:!0,controller:t}}e.$inject=["ElementType","$templateLoader","$contentTemplateSetting","$commandController","ContentViewName","ContentViewLabel","$version","$applications","$autoBackup","$rootScope"],MODULE.tool.instance.directive("jjViewContentTemplate",e)}(),function(){function e(e,t,n,i,o,l,r,c,a,s,u,d,p,g){function m(a,e,t){a.companyNotSupport=p.companyLimit(),a.viewName=u.TEMPLATE,a.viewLabel=d.TEMPLATE,a.importTemplate=function(){r.importTemplate()},a.templateLoaded=c.installed(),a.templateLoaded||r.installTemplate(function(e){null!==a.templateItems&&(void 0,a.templateLoaded=c.installed(),a.$applyAsync())});var n=a.$watch(function(){return l.getSetting()},function(e,t){var n,i,o=[];for(n in e){var l=e[n];o.push(l)}0t[i]?1:0})),a.templateItems=o},!0);a.$on("$destroy",function(){n(),a.templateItems=null,a.templateLoaded=!1})}return m.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"content/__jj-view-content-template.html",replace:!0,scope:!0,controller:m}}e.$inject=["ElementType","FileSystem","Default","UIDType","$contentAssetSetting2","$contentTemplateSetting","$commandController","$templates","$autoBackup","$applications","ContentViewName","ContentViewLabel","$version","$timeout"],MODULE.tool.instance.directive("__jjViewContentTemplate",e)}(),function(){function e(o,t,d,n){function e(){}return e.prototype={_setConfiguration:function(e){e=e||{};var e=angular.merge({title:"",yes:"",cancel:"",hasBackdrop:!0,clickOutsideToClose:!1,uid:n.uid(),root:d.createUID(),style:{},options:{}},e),t=(e.showButton=Boolean(e.yes||e.no||e.cancel),e.style||{});return e.title||e.showButton||void 0===t.borderRadius&&(t.borderRadius=0),e.style=t,e},openExplorer:function(e,n){e=this._setConfiguration(e),e=angular.merge(e,{template:'
'});t.open(e,function(e,t){e&&void 0,n&&n(t)})},_droplistStyle:function(e){e=e.style||{};return void 0===e.left&&void 0===e.top||void 0===e.position&&(e.position="absolute"),void 0===e.minWidth&&(e.minWidth=450),void 0===e.maxWidth&&(e.maxWidth=450),void 0===e.minHeight&&(e.minHeight=200),void 0===e.maxHeight&&(e.maxHeight="70%"),e},openDroplist:function(e,n){function t(e){var t;-1===e&&(t={isCancel:!0}),n&&n(t,c)}var r,c,i=(e=e||{}).target,s=(i&&(delete e.target,r=angular.element(i).offset()),this._setConfiguration(e)),u=!1,i=this._droplistStyle(s);"absolute"===i.position&&(u=!0),s.style=i,o.open({isTop:!0,hasBackdrop:s.hasBackdrop,clickOutsideToClose:s.clickOutsideToClose,templateUrl:s.templateUrl||"explorer/explorer-droplist.html",controller:["$scope","$notice","originalConfig","$explorerTree","$timeout",function(i,o,e,n,l){var a;i.close=function(e){var t;void 0,1===e&&(t=n.get(s.root).getSelects(),t=n.getSelectInfomation(t),c=t),o.close(e)},i.$on("$destroy",function(){i.config=null}),e.enterValue=1,o.registNotice(i,e),u?(a=s.uid,delete s.uid,i.config=s,i.$applyAsync(function(){var e,t=angular.element(o.parentSelector).find('[explorer-tree-container="'+s.root+'"]'),n=r?(e=r.left-15,r.top-t.height()-15):(e=(r=t.offset()).left,r.top-t.height()),t=d.position(t,{left:e,top:n});i.config.style.left=t.left,i.config.style.top=t.top,l(function(){i.config.uid=a,i.$applyAsync()},300)})):i.config=s}]}).then(function(e){t(e)},function(){void 0,t(-1)})}},new e}e.$inject=["$notice","$import","$util","$documents"],MODULE.tool.instance.service("$explorerPopup",e)}(),function(){function e(e,t,n,i,o,l,a,r){function c(e,t,n){this._uid=e,this._options=angular.merge({},u,t||{}),this._filters=angular.merge({},d,n||{}),this._tree={},this._selects=[]}function s(){this._map={}}var u={selectAndClose:!1,multiSelect:!1,multiSelectInGroup:!1,selectToggle:!1,showRoot:!0,rootLabel:"",rootSelectable:!0,showLabelDetail:!1,hideHeader:!0,keepHierarchy:!0},d={selectable:"all",checkbox:"none",fold:"none",display:"all",disable:[],highlight:[]};return c.prototype={_uid:void 0,_options:void 0,options:function(e,t){return arguments.length<1?this._options:arguments.length<2?this._options[e]:void(this._options[e]=t)},_filters:void 0,setFilters:function(e,t){var n;e in this._filters&&("selectable"===e&&this._unselectAll(),t=t||d[e],n=new RegExp("\\b"+i.GROUP+"\\b","g"),t=t.replace(n,i.MASK),this._filters[e]=t)},getFilters:function(e){if(!(e in this._filters))return null;var t,e=this._filters[e]||d[e];return"string"==typeof e&&(t=new RegExp("\\b"+i.GROUP+"\\b","g"),e=e.replace(t,i.MASK)),e},hasFilter:function(e,t){var n=this.getFilters(e);if(!n)return!1;if("string"==typeof n){if(-1<(n=n.split(" ")).indexOf("all"))return!0;if(-1"+e,{delay:a.LONG})):i.error(""),1===t.result&&((n=i.value("property")).content=t.input,i.value("property",n)),l&&l(e,t)}))}function _(e,t){var n,i=(e._global?d.get(T.project):p.get(T.document)).files(),o=e.uid;if(e._enable){if(-1js 파일 및 폰트("+E+") 파일만 추가할 수 있습니다.";e.type=i}(e||{});n?o.push(n):(n=function(e){var i,t,o=e.path;for(t in S)if(S[t].some(function(e,t,n){return e.path===o&&(i={index:t,item:e},!0)}),i)return i}(e))?(t=i(n.item,e),c.push(t),a=a+"
  • "+e.property.label+"
  • "):(t=i({_global:!1,_enable:!1,uid:void 0,type:void 0,path:void 0,property:{label:"이름 없음",template:void 0},error:void 0},e),l.push(t))}),[]);n.push(function(t){if(c.length<1)return t();a='
      '+a+"
    ",r.confirm({content:'같은 이름의 파일이 이미 등록되어 있습니다.
    교체 하시겠습니까?
    '+a+"
    ",title:"등록된 파일",ok:"예",cancel:"아니오",isTop:!0,closeButton:!1}).then(function(e){0 (* debug : 파일 카운터가 잘못된 경우입니다.)":(n="프로젝트의 전체 문서에 적용되고 있는 파일입니다.

    이 파일을 삭제하면 다른 문서에서도 파일을 사용할 수 없습니다.
    목록에서 삭제 하시겠습니까?

    ",o=!0):1===e?n="어떤 문서에서도 사용되지 않고 있는 파일입니다.
    목록에서 삭제 하시겠습니까?":a._enable&&2===e?n="현재 문서에만 사용중입니다.
    목록에서 삭제 하시겠습니까?":(n="이 파일을 사용중인 다른 페이지가 있습니다.

    이 파일을 삭제하면 사용중인 페이지에서도 이 파일을 사용할 수 없습니다.
    모든 페이지에서 사용을 해지하고 목록에서 삭제 하시겠습니까?

    ",o=!0),[]),l=!1;(i=n)&&e.push(function(t){var n={content:i,title:"삭제",ok:"예",cancel:"아니오",modal:!0,isTop:!0,closeButton:!1,checkboxLabel:"파일도 함께 삭제",checkboxValue:!1};r.confirm(n).then(function(e){l=n.checkboxValue,t(null,e)},function(){void 0,t(null,-1)})}),e.push(function(e,t){if(1!==e)return t("취소");void 0;e={};c(!(e[a.uid]=void 0),{fileMap:e},null,function(){t()})}),o&&e.push(function(e){var t,n=a.uid,i=p.getDatas();for(t in void 0,i){var o=i[t],l=o.getNoneCopyValue("files");l.indexOf(n)<0||(o.$removeFile(n),g.remove(n),void 0,void 0,-1"+e+""}),e={isTop:!0,closeButton:!1,content:n="

    실행 도중 다음과 같은 문제가 발생하였습니다.

      "+n+"
    ",ok:"확인"},void y.alert(e).then(function(){i&&i(t)},function(){i&&i(t)});i&&i(t)})}function o(){f.$_isEditing(!1),l()}function l(){t(!0),s(),u&&u(),u=null,d&&d(),d=null,p&&p(),p=null,a.config=null,a.projectFiles=null,a.documentFiles=null,a.disableFiles=null,a.backup=null,a.input=null}a.showDetail=function(){y.alert({isTop:!0,closeButton:!1,title:"편집 화면에서 파일 적용 제한",content:'편집 화면에서는 외부 파일 설정으로 가져오기한 JS, CSS를 로드(적용)하지 않습니다.

    JS, CSS 파일은 내용에 따라 저작도구의 기능에 심각한 영향을 미칠 수 있으므로 편집 화면에서는 적용되지 않습니다.
    편집 화면에서 CSS 파일 적용 옵션은 필요한 경우에 제한적으로 사용하길 권장합니다.


    썸네일 추출 과정에서는 CSS 파일은 기본으로 적용되지만 JS 파일은 여전히 허용되지 않습니다
    설정된 외부 JS 파일 실행을 허용하여 썸네일을 추출하고 싶다면 출판 옵션에서 페이지 이미지 추출 기능을 사용하시기 바랍니다.',ok:"확인"}).then(function(){},function(){})},a.selectDocument=function(e){a.document=e,n(),a.$applyAsync()},a.allowExternalCSS_inEditor=m.get().value("allowExternalCSS_inEditor");var c,s=a.$watch("allowExternalCSS_inEditor",function(e,t){e!==t&&(e={data:{allowExternalCSS_inEditor:a.allowExternalCSS_inEditor}},x.modifyProject(e))}),u=(t(!1),a.config.id=a.config.id||"FileListEditorDialogBox",a.config.title="외부 파일 설정",a.config.yes="확인",c=(c=m.get())?c.documents():[],a.documents=c,a.document=v.uid(),a.$applyAsync(function(){var e,t,n;!(n=a.documents)||n.length<1||(!(t=a.document)||(n=n.indexOf(t))<0||(t=i.find(".treeItemContainer")[0])&&(t=t.offsetHeight,n=t*n,e=i.find("[jj-scroller]")[0],t=(e.clientHeight-t)/2,e.scrollTop=n-t))}),a._listChanged=!1,a.$watchCollection(function(){var e=m.get();return e?e.getNoneCopyValue("files"):[]},function(e,t){a._listChanged=!0,a.$applyAsync()})),d=a.$watchCollection(function(){var e=v.get(a.document);return e?e.getNoneCopyValue("files"):[]},function(e,t){a._listChanged=!0,a.$applyAsync()}),p=a.$watch("_listChanged",function(e,t){e&&(n(),a._listChanged=!1,a.$applyAsync())});a.input={url:""},a.addURL=function(){r({url:a.input.url},function(e){e&&(a.input.url="",a.$applyAsync())})},a.openFileDialogBox=function(l){var e="*",t="";"JS"===l&&(e=".js",t="importJS"),"FONT"===l&&(e=".ttf,.woff,.eot",t="importFONT"),"CSS"===l&&(e=".css",t="importCSS"),g.getOpenInformation({accept:e,multiple:!0,task:t},function(e){var i,o;!e||!e.path||e.path.length<1?void 0:(i="",o=[],e.path.forEach(function(e){var t=b.parsePath(e.path),n=f._getType(t.ext);l===n.toUpperCase()?o.push({type:l,path:e.path}):(e='
  • "'+n+'" 파일은 "'+l+'" 타입의 파일이 아닙니다.

    '+t.file+"

  • ",i+=e)}),i&&(i="
      "+i+"
    ",y.alert({modal:!0,title:"파일 가져오기 취소",content:i,ok:"확인"}).then(function(){},function(){})),o.length<1||(void 0,r(o,function(e){}),a.$applyAsync()))})},a.enterKey=a.close=function(){a.callback&&(a.callback(null,"확인"),o(),a.$applyAsync())},f.$_isEditing(!0),a.escKey=a.cancel=function(){a.callback&&(a.callback(null,"취소"),o(),a.$applyAsync())},a.$on("$destroy",function(){l()})}return{restrict:"EA",templateUrl:"fileListEditor/jj-file-list-editor-dialog-box.html",replace:!0,scope:!(e.$inject=["$scope","$element","$attrs"]),controller:e}}e.$inject=["$externalAPI","$projects","$fileListDataService","$documents","$applications","$notice","FileSystem","$commandController"],MODULE.tool.instance.directive("jjFileListEditorDialogBox",e)}(),function(){function e(b,x,w,j,_,k,C,S,E){function e(o,i,l){function a(e){if(arguments.length<1)return b.dndData();b.dndData(e)}function r(e){if(e.dataTransfer.files[0])e.preventDefault();else{e=a();if(e&&e.id===l.dropId){if(b.sortByCategory)if(e.data.item._global!==o.data.item._global)return;return e.data}}}function e(){y&&(i.off("dragstart",t),i.off("dragend",n))}function t(e){var t,n;(e=e.originalEvent||e).stopPropagation(),e.target instanceof HTMLElement?(a({id:l.dragId,data:o.data}),t=i[0].cloneNode(!0),$(t).find("[notghost]").remove(),n="drag_drop_jj-file-list-item"+(o.data.item._global?" global":""),$(t).addClass(n),document.body.appendChild(t),e.dataTransfer.setDragImage(t,t.offsetWidth/2,t.offsetHeight/2),o.isDragging=!0,o.$apply()):e.preventDefault()}function n(e){(e=e.originalEvent||e).stopPropagation(),void 0,w.triggerHandler("mouseup"),o.isDragging=!1,angular.element(".drag_drop_jj-file-list-item").remove(),a(null),o.$apply()}function c(){i.off("dragenter",s),i.off("dragleave",g),i.off("dragover",u),i.off("drop",p)}function s(e){(e=e.originalEvent||e).preventDefault(),e.stopPropagation(),r(e)?o.dropDirection=e.offsetY',mode:i.type,title:"코드 편집",autoformatButton:!0,save:"임시 저장",yes:"저장",read:function(t){var n,e=j.get(i.uid);n=function(e){return"css"===i.type&&_.useLess?(e=(e=(e=(e=e.replace(/(\[jj(-render)?-paper\] \[jj(-render)?-page\] \[jj(-render)?-element-container\],?\s?)/gim,"")).replace(/(.+),\n\1/gim,"$1")).replace(/\/\* Generated Jik-ji\. Do not erase it\. \*\/\n+?/gim,"")).replace(/^\{(.|\s)+?\n?\}\n+?/gim,""),S.open("

    하위 버전 보정

    0.5.11 이하 버전에서 import된 CSS 파일은 데이터가 일부 변형되었을 수도 있습니다.
    예상과 다르게 동작할 경우 원본을 다시 import하여 사용해 보시기 바랍니다.

    "),void t(e)):t(e)},e=(e=e).path(),C.readFile(e,{encoding:"utf8"},function(e,t){e&&(void 0,S.message("내용을 로드하지 못하였습니다.",{warn:!0})),n&&n(t)})},write:function(e,n){e=e||"";var t=j.get(i.uid).path();"css"===i.type&&_.useLess?b.cssToFile({content:e||"",dest:t},i,function(e,t){n&&n(Boolean(e))}):C.outputFile(t,e,{encoding:"utf8"},function(e){e&&(void 0,S.message("저장에 실패했습니다.",{warn:!0})),n&&n(Boolean(e))})},codeTest:!0};k.open(e,function(e,t){if(e)return void 0})}}return e.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"fileListEditor/jj-file-list-item.html",replace:!0,scope:{key:"@"},controller:e}}e.$inject=["$fileListDataService","$device","$document","$assets","Default","$import","$externalAPI","$toast","FileSystem"],MODULE.tool.instance.directive("jjFileListItem",e)}(),MODULE.tool.instance.directive("jjInsertTemplateCheck",function(){return{restrict:"EA",templateUrl:"fileListEditor/jj-insert-template-check.html",replace:!0,scope:!1,compile:function(){return function(t,e,n){function i(){t.config=null}t.config.id=t.config.id||"InsertTemplateCheck",t.config.title="중복되는 파일",t.config.ok="예",t.config.cancel="아니요",t.config.closeButton=!0,t.escKey=function(){t.close(-1)},t.enterKey=function(){t.close(1)},t.close=function(e){t.callback(null,e),i()},t.$on("$destroy",function(){i()})}}}}),function(){function e(n,c,e,t,s,i){function u(e,t){return i.sortByLikeWindowExplorer(e,t)}function a(e,t){var n=e.match(/\//g),n=n?n.length:0,i=t.match(/\//g),i=i?i.length:0;return n
    ")+"
    ",o='선택한 경로의 모든 파일(폴더)을 삭제합니다.
    정말로 삭제하시겠습니까?
    '+o+"
    ",i=this.fsTree.root(),e=n.map(function(e){return i+e}),void 0,a.remove({path:e},{confirm:{content:o}},function(e){e||n.forEach(function(e){e=t.fsTree.find(e,!0);e&&l.remove(i,e.info.fsid,e.info.path,!0)})}))},getSelect:function(e){var t=l.getSelect(i.uid),n=(e=e||{}).detail,e=e.exceptRoot;return n?t:l.duplicateFolderFilter(t,e)},clearSelect:function(){l.unselect(i.uid)},getFocus:function(){return l.getFocus(i.uid)}}));i.$on("$destroy",function(){0})}return t.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"fsWatch/jj-fs-tree-container.html",replace:!0,scope:{uid:"@",root:"@",options:"=",onSelectChanged:"&selectChanged",onFocusChanged:"&focusChanged",onLoadComplete:"&loadComplete"},controller:t}}e.$inject=["FsTreeContainerBase","$fsTree","$externalAPI","$fsWatch","$toast"],MODULE.tool.instance.directive("jjFsTreeContainer",e)}(),function(){function e(E,I,e,D,T,t,n,i,o,A,P,O){function l(l,o,n){function e(){w=l.info;var o=k.getOptions();l.showDescription=!!o.description,l.showButtons=function(){var e,t={},n=o.showButtons||{},i=k.find(w.path,!0);for(e in n)"function"==typeof n[e]?t[e]=n[e](i,k):t[e]=n[e];return t}(),w&&!j&&(j=!!i()&&l.uid+":"+w.fsid),t(l.activate),l.$applyAsync()}function i(){return k.getOptions().dnd&&!w.filters.disable}function t(e){var t;t=e,l.isDropable=!1,j&&(w.isRoot||a(),u(),E.remove(j),t&&(E.create(j),w.isRoot||(l.dragId=n.dragId||"File system D&D id undefined.",a(l.dragId)),l.dropId=n.dropId||"File system D&D id undefined.",u(l.dropId))),t=e,l.showDescription&&(l.description="",t&&(t=k.getOptions(),e=k.find(w.path,!0),t=t.description(e,k),l.description=t||""))}function a(e){e?(E.addDragEvent(j,{id:e,element:o,dragStart:r,dragEnd:c,ghostName:"ghost-fs-tree-container"}),l.contentEditable&&E.disable(j,!0)):E.removeDragEvent(j)}function r(e,t){var n;(n=t).selects=angular.copy(w),n.selects.id||(n.selects.id=j),t.ghostOffset={x:-(20*w.depth+40)},l.$applyAsync()}function c(e,t){s(),l.$applyAsync()}function s(){l.isDropable=!1}function u(e){e?E.addDropEvent(j,{id:e,element:o,dragEnter:p,dragOver:g,dragLeave:m,isDropAllowed:d,drop:f}):E.removeDropEvent(j)}function d(e){return e&&e.selects&&!e.selects.isRoot}function p(e,t){l.$applyAsync()}function g(e,t){var n;_||(n=v(t),l.isDropable=!n.error,t.error=n.error,l.$applyAsync())}function m(e,t){delete t.path,s(),l.$applyAsync()}function f(e,t){var n,i,o;i=(t=t).selects,o=w,void 0!==i.path&&(_&&(n=v(t),l.isDropable=!n.error,t.error=n.error),(n=t.error)?k.getOptions().dndSilent&&!_||P.alert({modal:!0,isTop:!0,content:n,title:"이동 중지",ok:"확인",closeButton:!1}).then(function(e){},function(){}):l.moveItem(i,o)),s(),l.$applyAsync()}function v(e){function t(e){var t=i.isFolder?"원본 폴더: ":"원본 파일: ",n=(t+=i.isFolder&&"."===i.path?"/":i.path,"대상 폴더: "+o);return(e=e||"이동 대상 폴더가 원본(파일) 폴더와 같거나 하위 폴더입니다.")+'

    '+t+"
    "+n+"

    "}var i=e.selects;if(i.isRoot)return{error:"이동 대상 폴더가 원본(파일) 폴더와 같거나 하위 폴더입니다."};var e=w,n=k.getSelfFolder(i),o=k.getSelfFolder(e);if(i.isFolder){var l=k.parentFolder(n)||"/";if(n===o||l===o)return{error:t("이동 대상 폴더가 원본 폴더와 같습니다.")};if(0<=k.comparePath(n,o))return{error:t()}}else if(n===o)return{error:t("이동 대상 폴더가 원본 폴더와 같습니다.")};return{path:e.path}}function h(){C.removeAttr("contenteditable"),o.off("keydown",l.onKeydown),D.clearSelection(),C.blur(),l.$applyAsync(),w.name!==C.text()&&b(w,C.text(),function(e){e&&(A.message(e.toString(),{warn:!0}),C.text(w.name),l.$applyAsync())})}function y(){l.contentEditable=!1,E.disable(j,!1),document.removeEventListener("mousedown",x,!0),document.removeEventListener("mouseup",$,!0),l.$applyAsync()}function b(e,t,n){var i,o,l,a;t||(l="이름을 지정하지 않았습니다."),(l=D.pattern.folderName.test(t)?l:(e.isFolder?"폴더 ":"파일 ")+S)?n&&n(l):(t=t.trim(),e.name.trim()!==t&&"."!==e.path&&(l=k.parentFolder(e.path),i=(l="."===l?"":l)+"/"+t,l={src:(o=k.root())+e.path,dest:o+i},void 0,_||(a=k.find(e.path,!0),T.move([l],null,function(e){e?n&&n(e):(void 0,void 0,I.move(o,a.info.fsid,i,!0))}))))}function x(t){var e,n=C[0],i=o[0];(e=t.target===i.parentElement?e:function(){for(var e=t.target;e;){if(e===n)return!0;if(e===i)return!0;if(e===document.body||e===document)return;e=e.parentNode}}())&&(t.stopPropagation(),t.stopImmediatePropagation()),t.target!==n&&h()}function $(e){C[0].hasAttribute("contenteditable")||(e.stopPropagation(),e.stopImmediatePropagation(),y())}var w,j,_=!1,k=I.getInstance(l.uid),C=(l.childCreated?l.childCreated(e):l.$applyAsync(function(){l.childCreated(e)}),l.$on("$destroy",function(){t(!1),E.remove(j),l.showButtons=null,w=null}),l.onClick_foldButton=function(e){var t;e.stopPropagation(),w.isFolder&&(e=!w.isFold,k.getOptions().collapse=void 0,l.$applyAsync(),e?w.isFold=!0:((t=k.getStatus()).loading=!0,O(function(){w.isFold=!1,t.loading=!1},0)))},l.onFocus=function(e){e.stopPropagation(),I.focusChange(l.uid,w.fsid),l.$applyAsync()},l.onSelect=function(e){l.contentEditable?e.stopImmediatePropagation():k.useCheckbox()||(I.select(l.uid,{fsid:w.fsid,isSelect:!w.isSelect}),l.$applyAsync())},l.onCheckbox=function(e){e.stopPropagation(),I.select(l.uid,{fsid:w.fsid,isSelect:1!==w.checkbox}),l.$applyAsync()},l.showInfoItem=function(e){e.stopPropagation();e={type:w.isFolder?"폴더":"파일",root:k.root(),path:w.path,name:w.name};I.showInfoPopup(e)},l.modifyItem=function(e){e.stopPropagation();e={name:w.name,pattern:D.pattern.folderName};I.showModifyPopup(e,function(e,t){e<1||b(w,t.name)})},l.moveItem=function(e,t){var n,i=e.path,t=t.isFolder?t.path:k.parentFolder(t.path),o=("."===t?"":t)+"/"+e.name,l=k.root(),t={src:l+i,dest:l+o};void 0,_||(n=k.find(i,!0),T.move([t],{confirm:function(e){e="이동할 경로에 같은 이름의 "+(n.info.isFolder?"폴더가":"파일이")+' 이미 있습니다.

    '+e+"

    ";return{title:"이동",content:e+="덮어 쓰시겠습니까?",checkboxLabel:"이후 같은 옵션을 적용합니다.",checkboxValue:!1}}},function(e){e||(void 0,void 0,I.move(l,n.info.fsid,o,!0))}))},l.deleteItem=function(e){var t,n,i;e.stopPropagation(),w.path&&"."!==w.path&&(t=k.root(),n=t+w.path,e=w.isFolder,void 0,_||(i="다음 경로의 "+(e?"폴더를":"파일을")+' 삭제합니다.

    '+n+"

    ",e&&(i+="해당 폴더의 모든 항목이 삭제됩니다.
    "),e={confirm:{title:"삭제",content:i+="정말로 삭제하시겠습니까?"}},T.remove({path:n},e,function(e){e||(void 0,void 0,I.remove(t,w.fsid,w.path,!0))})))},o.find("[labeleditor]")),S=(l.contentEditable=!1,'이름에는 다음 문자를 사용할 수 없습니다.
    / : * ? " < > |');l.editContent=function(e){var t;!w.isRoot&&i()&&(o.on("keydown",l.onKeydown),document.addEventListener("mousedown",x,!0),document.addEventListener("mouseup",$,!0),E.disable(j,!0),C.attr("contenteditable",!0),l.contentEditable=!0,C.focus(),t=C[0],D.selectAllContents(t),l.$applyAsync())},l.onKeydown=function(e){var t,n=e.keyCode||e.which;return 13===n?(e.preventDefault(),h(),y(),void l.$applyAsync()):27===n?(e.preventDefault(),C.text(w.name),h(),y(),void l.$applyAsync()):(t=(w.isFolder?"폴더 ":"파일 ")+S,220===n||191===n?(e.preventDefault(),A.message(t),void l.$applyAsync()):void(!e.shiftKey||186!==n&&56!==n&&191!==n&&222!==n&&188!==n&&190!==n&&220!==n||(e.preventDefault(),A.message(t),l.$applyAsync())))}}return{restrict:"EA",templateUrl:"fsWatch/jj-fs-tree-item.html",replace:!0,scope:!(l.$inject=["$scope","$element","$attrs"]),controller:l}}e.$inject=["$fsTreeItemDragNDrop","$fsTree","$fsWatch","$util","$externalAPI","FileSystem","$status","MessageType","StatusIcon","$toast","$notice","$timeout"],MODULE.tool.instance.directive("jjFsTreeItem",e)}(),function(){function e(i,e){function t(e,t,n){new(i.get(e,t,n).extend("FsTreeScroller",{unitHeight:20,setUnitHeight:function(){return 20}}));this.getScrollView=function(){return e.scrollView},this.getRect=function(){return t[0].getBoundingClientRect()},e.$on("$destroy",function(){0})}return t.$inject=["$scope","$element","$attrs"],{restrict:"A",controller:t}}e.$inject=["ScrollerBase","$timeout"],MODULE.tool.instance.directive("jjFsTreeScroller",e)}(),function(){function e(n,r,i,c,s,u){function e(){}return e.prototype={gridSize:1,magneticSize:10,_boundarys:void 0,_guideLines:void 0,_magneticLines:void 0,_centerSnap:!0,clear:function(){this._boundarys=null,this._guideLines=null,this._magneticLines=null},filter:function(e,t,n,i){1===arguments.length&&"object"==typeof arguments[0]&&(e=arguments[0].x||arguments[0].left,t=arguments[0].y||arguments[0].top,n=arguments[0].w||arguments[0].width,i=arguments[0].h||arguments[0].height);var o={},l=(this._snapBoundary(o,e,t,n,i),this._snapGuideLine(o,e,t,n,i),1"),s.message(e,{warn:!0,delay:0})),n&&n(t))},500)},this.option.pdf);o.convert(t,e)},getPageSize:function(e,t){this._super.getPageSize.apply(this,arguments)},getSearchText:function(e,i){window[n]=function(e,t,n){i&&i.onProgress&&i.onProgress(e,t,n)};var e=e.map(function(e){return e.num-1}),t=this.option.pdf;o.getPdfText(t,{pageIndexes:e,onProgress:n},function(e,t){e&&void 0,delete window[n],u(function(){t.warn&&(e=t.warn),(e=t.error?t.error:e)&&(e=e.replace(/\n/g,"
    "),s.message(e,{warn:!0,delay:0}),void 0);var e=t.data;i&&i.onComplete&&i.onComplete(e)},500)})}}))}e.$inject=["ImportPages","$externalAPI","Default","FileSystem","$toast","$busy","$timeout"],MODULE.tool.instance.service("$importPDF",e)}(),function(){function e(l,a,r,c,s,u,d,p){return{open:function(e,n){function i(e){function t(){d.close(),n&&n(e)}d.open({message:"파일 목록을 갱신합니다."}),p.isPaused()?p.resume(t):t()}function t(e,t){var n;e?(n={pages:e,paper:t.paper,isCreateProjectProcess:!0,ignorePreviewReload:!0,useSaveProject:!0},d.open({message:"변환된 문서를 추가합니다.",noDelay:!0}),u.power=!1,d.lock=!0,c(function(){r.importDocuments(n,function(e){u.power=!0,d.lock=!1,o&&s.$apply(),c(function(){r.zoomStep({direction:"fit"},function(){i(e)})})})})):i()}var o=!!(e=e||{}).isCreateProjectProcess;a.open({isTop:!0,templateUrl:"popup/import-confirm.html",controller:["$scope","$notice","originalConfig",function(e,t,n){e.close=function(e){t.close(e)},e.config={title:"페이지 유형 선택",closeButton:!0},e.$on("$destroy",function(){e.config=null}),t.registNotice(e,n)}]}).then(function(e){e?l.open({useEscKey:!1,useEnterKey:!1,pageImportType:e,usePositionSetting:!o,template:'
    '},t):i()},function(e){i()})}}}e.$inject=["$import","$notice","$commandController","$timeout","$rootScope","$applications","$busy","$projectWatcher"],MODULE.tool.instance.service("$openImportPages",e)}(),function(){function e(e,n,u,d,p,g,i,m){var f="$$pdf2xxx.thumbnail..onProgress";return e.create("Import",{loader:null,progress:null,selector:null,option:null,destroy:function(){this.selector=null,this.loader=null,this.progress=null,this.option=null,delete window[f]},initialize:function(){this.selector={pages:[],isSelectAll:!1},this.loader={pages:null,complete:!1},this.progress={total:0,current:0,percent:0,message:""},this.option={}},updateProgress:function(e,t,n){this.progress.current=e,this.progress.total=t,this.progress.percent=Math.ceil(e/t*100),n&&(this.progress.message=n)},getTotalPageNum:function(){return this.loader.pages&&this.loader.pages.length||0},getPageItem:function(e){return arguments.length<1?this.loader.pages:this.loader.pages[e]},setPageItem:function(e,t){t=t||{num:void 0,id:void 0,image:void 0,ext:void 0,fileName:void 0,width:void 0,height:void 0,thumbnail:void 0,_info:void 0};return angular.merge(t,e),t},setSelectAllState:function(){var e=this.getTotalPageNum()||0;this.selector.isSelectAll=this.selector.pages.length===e},getSelectPages:function(){return this.selector.pages},selectAllChanged:function(e){for(var t=[],n=this.selector.isSelectAll,i=this.getTotalPageNum(),o=0;o"),p.message(e,{warn:!0,delay:0}));var i=n.success;g(function(){var e,t;d.close(),e=i,t=n.data,void 0,e&&s.setThumbnailItems(o,t),s.progress.message=e?"썸네일이 준비되었습니다.":"썸네일 추출에 실패 하였습니다.",l&&l.onComplete&&l.onComplete(e)},500)}))},getThumbnailParameters:function(e){return e.map(function(e){var t=e._info.path;return{num:e.num,image:t,fileName:e.fileName,ext:u.EXT_THUMBNAIL_MASTER}})},setThumbnailItems:function(e,i){e.forEach(function(e){var t=i[e.num],n=(e.num!=t.pageNumber&&void 0,t.path=t.path.replace(/\\/g,"/"),u.noneCachePath(t.path));e.thumbnail={num:t.pageNumber,id:t.id,image:n,ext:t.ext,fileName:t.fileName,width:t.width,height:t.height}})},convertCancel:function(){this._notOverriding("convertCancel")},convertStart:function(e,t){this.progress.message="준비중 입니다.";var n=this.getChangingItems(e);if(n.length<1)return!(this.progress.message="완료되었습니다.");var i=this;return g(function(){i._callConverter(n,e,t)},500),!0},getChangingItems:function(e){for(var t=[],n=0;n=e.bottom),c())}function c(){if(w)return w.updateView&&w.updateView(i.activate),void i.$applyAsync();var e,t;s(),i.activate&&(e="
    (경로) "+n,b.alert({content:t,title:"알림",ok:"확인",isTop:!0}).then(function(){},function(){}))})},toggleLabel:function(e){e={data:{showLabel:e=void 0===e?!i.get().value("showLabel"):e}};o.modifyApplication(e)},toggleOutline:function(e){e={data:{outline:e=void 0===e?!i.get().value("outline"):e}};o.modifyApplication(e)},showAllElement:function(e){k("isHide",l.get().tooldata("layer").isHide=e)},unlockAllElement:function(e){k("isLock",l.get().tooldata("layer").isLock=e)},listViewModeChanged:function(e){x.$broadcast("listViewModeChanged",e);var t,n=i.get().getNoneCopyValue("listViewMode");for(t in n)n[t]=e},align:function(e){var t=c.get(),t=t?t.get():null;t&&("page"===i.get().getNoneCopyValue("alignOption").sortByPage?0
    ',controller:["$scope","$notice","originalConfig",function(e,t,n){e.close=function(e){t.close(e)},n.enterValue=1,t.registNotice(e,n)}]}).then(function(e){},function(e){})},userInfo:function(n){v.user(null,function(){n&&n();var i,e=v.getAuth(),e={info:v.userDisplayFilter(e.user)},t=function(e,t){if(!(t<1))return 1===t?v.logout():2===t?v.changeUserInfo():void 0};t=t||function(){},e&&e.info?(i=e.info,b.open({isTop:!0,templateUrl:"user/info.html",controller:["$scope","$notice","originalConfig",function(e,t,n){e.close=function(e){t.close(e)},e.config={title:"사용자 정보",logout:"로그아웃",changeInfo:"정보 변경",closeButton:!0,info:i},e.$on("$destroy",function(){e.config=null}),n.enterValue=1,t.registNotice(e,n)}]}).then(function(e){t(null,e)},function(e){t(e,-1)})):t(null,-1)})}},new j}e.$inject=["$commandController","$workspaceDialog","$openWorkspace","$applications","$projects","$documents","$elements","$selects","$externalAPI","$preview","$explorerPopup","$mask","$arrange","$align","$updater","$util","$auth","$toast","$status","$notice","$rootScope","FileSystem","$timeout"],MODULE.tool.instance.service("$menuCall",e)}(),function(){function e(p,g,m,f,v,h,y,b,x,$,w,j,_,k,C,S,e,E,I,D){function t(){}return t.prototype={icon:function(e){return'[icon-menu="'+e+'"]'},update:function(){var o=p.get(),e=g.get(),t=m.get(),n=h.get(),i=(this.selectedProject=!!e,this.selectedDocument=!!t,this.selectedElement=Boolean(n&&0"+a[0]+""),r="marker-"+n++,o=(a.attr("marker-id",r),s.markText(o,l,{replacedWith:a[0]}));c._markers[r]=o}c._addToButtonEvent(),c._updateDelayID=null},100)},_addToButtonEvent:function(){var e="."+this._markerOption.className,t=this._eventConfig.type;t&&angular.element(this._markerParent).find(e).on(t,this._bindHandler._toButtonHandler)},_removeToButtonEvent:function(){for(var e in this._markers)this._markers[e].clear();this._markers={};var t="."+this._markerOption.className,n=this._eventConfig.type;n&&angular.element(this._markerParent).find(t).off(n,this._bindHandler._toButtonHandler)},_toButtonHandler:function(e){var t,n,i,o,l=this._eventConfig.handler;l&&(t=(i=angular.element(e.currentTarget)).text(),i=i.attr("marker-id"),i=(n=this._markers[i]).find(),(o=this._instance.getSearchCursor(t,i.from)).findNext()&&l(e,function(e){e&&(void 0,e.replace&&(o.replace(e.replace),n.changed()))}))}},{_map:{},set:function(e,t,n){var n=n||o.createUID(),i=new a(n);return i.set(e,t),this._map[n]=i},get:function(e){return this._map[e]},destroy:function(e){var t=this._map[e];delete this._map[e],t&&t.destroy()},openKeymap:function(){e.open("",{template:"toast-code-editor-keymap-info.html",className:"code-editor-keymap-info",hasBackdrop:!0,clickOutsideToClose:!0}).then(function(e){})},openExplorerPopup:function(e,n){var t=(e=e||{}).target;delete e.target,(e=angular.merge({style:{},options:{selectAndClose:!0},clickOutsideToClose:!0,filters:{selectable:"group element asset",display:"group element asset"}},e||{})).target=t,l.openDroplist(e,function(e,t){e||n&&n(t)})}}}e.$inject=["Default","$util","$toast","$explorerPopup"],MODULE.tool.instance.service("$codeEditor",e)}(),function(){function e(u,d,p,g,e){var m="";return{restrict:"EA",templateUrl:"popup/jj-autocopy-asset-popup.html",replace:!0,scope:!1,link:function(l,e,t){function a(){var e=(l.item.file||"").trim(),t=(l.item.folder||"").trim();return(t=(t=(t=u.normalize(t))&&0===t.indexOf("/")?t.substring(1):t)&&t.lastIndexOf("/")===t.length-1?t.substring(0,t.length-1):t)||e?{root:c,folder:t=t&&"/"+t,file:e=e&&"/"+e,fullPath:c+t+e}:""}function r(n,i){d.exist(n,function(e){if(void 0,!(l.item.conflict=e))return l.item.needCopy=!0,void i();var t;e=n,t=function(e,t){e?(l.item.needCopy=!1,i(!0)):(l.item.needCopy=t,i(!1))},e=u.shortPathString(n,u.opsFolder),p.confirm({content:'복사할 경로에 같은 이름의 파일이 이미 있습니다.

    '+e+"

    새 파일로 덮어 쓰시겠습니까?",title:"중복 파일",ok:"예",cancel:"취소",optionButton:"아니오",isTop:!0,modal:!0,closeButton:!1}).then(function(e){if(0===e)return t("cancel");t(null,1===e)},function(){void 0,t("cancel")})},{async:!0})}function n(n){var e=a(),e={template:'
    ',title:"폴더 선택",content:"선택한 폴더로 파일이 복사됩니다.",ok:"확인",cancel:"취소",popupStyle:{maxHeight:800,height:"80%"},root:e.root,select:e.folder||"."};g.open(e,function(e,t){!e&&t&&("/"===(e="."===(e=t[0])?"/":e)[0]&&(e=e.substring(1)),void 0,n(e))})}l.escKey=function(){l.close(0)},l.enterKey=function(){l.close(1)},l.$on("$destroy",function(){l.config=null}),l.submit=function(){l.close(1)};var i,o,c=l.config.root||u.WORK_OPS_FOLDER,s=c.replace(u.WORK_FOLDER,"");l.close=function(e){function t(){var e={path:n,conflict:l.item.conflict,needCopy:l.item.needCopy},t=(void 0!==l.item.skipConflict&&(e.skipConflict=l.item.skipConflict),void 0!==l.config.applyAll&&(e.applyAll=l.config.applyAll),u.parsePath(i));m=t.folder.replace(c,""),o&&o(e)}var n,i,o=l.callback;e<1?o&&o("cancel"):l.form.$invalid?void 0:(n=a(),i=n.fullPath,l.item.conflict=!1,l.item.needCopy=!0,l.item.skipConflict?t():(r(i,function(e){e||t()}),l.$applyAsync()))},o=u.parsePath(l.config.path),l.item={folder:m||"",file:o.file,folderPattern:/^[^:*?"<>|]+$/,filePattern:/^[^\\/:*?"<>|]+$/},void 0===l.config.skipConflict&&(l.config.skipConflict=!1),o=l.config.skipConflict,l.item.skipConflict=o,l.displayFolderPath="",l.displayFilePath="",i=l.$watch(function(){return l.item.folder+"/"+l.item.file},function(e){var t=a();l.displayFolderPath=s+t.folder,l.displayFilePath=t.file}),l.findFolders=function(){n(function(e){void 0!==e&&(l.item.folder=e,l.$applyAsync())})},l.$on("$destroy",function(){i(),l.item=null})}}}e.$inject=["FileSystem","$externalAPI","$notice","$import","$util"],MODULE.tool.instance.directive("jjAutocopyAssetPopup",e)}(),function(){function e(d,p,g,m,f){function e(n,e,t){function i(e,t){if(e&&!(e.length<1))return e.map(function(e){return{isSelect:t,path:e}})}n.$on("$destroy",function(){n.config=null,n.fsTree=null}),n.close=function(e){var t;0편집창에서 Error 내용을 확인하세요.",{warn:!0}),u()}function u(){o.config=null,o.showLog={},d&&(d.get().off("changes",n),v.destroy(d.uid())),d=null}o.config.id=o.config.id||"CodeEditorDialogBox",o.config.title=o.config.title||"내용 편집",o.config.yes=o.config.yes||"확인",o.config.no=o.config.no||"취소",o.config.save=o.config.write?o.config.save||"저장":"",o.config.codeTest&&!o.config.test&&(o.config.test={});var d,p,g,m=o.config.placeholder||"Content goes here...";p=o.config,(d=v.set(e.find("#code")[0],h.codeEditor[p.mode])).toButton({parent:e,eventName:"click",eventHandler:r}),(g=d.get()).setOption("placeholder",m),i(p.value),g.getDoc().clearHistory(),o.isSaved=!0,p.read?(f.open({delay:400,message:"내용을 로드합니다."}),p.read(function(e){p.value=e||"",i(p.value),g.getDoc().clearHistory(),f.close(),o.isSaved=!0,g.on("changes",n),o.$applyAsync()})):g.on("changes",n),d.addKeys({"Ctrl-S":function(e){o.save()}}),o.$applyAsync(),o.showLog={line:-1,log:"",code:"",open:!1},o.openEditorKeymap=function(){v.openKeymap()},o.reformatCode=function(){d.autoFormatSelection()},o.enterKey=o.close=function(){var e;o.callback&&(e=l(),o.save(function(){o.callback(null,e),s()}),o.$applyAsync())},o.save=function(e){c({message:"내용을 저장합니다.",value:l()},e)},o.escKey=o.cancel=function(){o.callback&&(o.isSaved=!1,c({message:"편집된 내용을 취소합니다.",value:o.config.value||""},function(){o.callback(null),s(),o.$applyAsync()}))},o.$on("$destroy",function(){u()})}}}}e.$inject=["$busy","$codeEditor","Default","$toast","$test_html","$test_css","$test_js"],MODULE.tool.instance.directive("jjCodeEditorDialogBox",e)}(),function(){function e(d,p){return{restrict:"EA",template:'',scope:{uid:"@",config:"=",save:"&?",changed:"&?",created:"&?"},compile:function(){return function(n,i,e){function t(e){var t;r=angular.extend({},p.codeEditor[e.type],{readOnly:e.readOnly}),c=angular.extend({},{value:"",placeholder:""},e),s?((t=s.get()).setOption("placeholder",c.placeholder),t.setValue(c.value),t.getDoc().clearHistory()):((s=d.set(i.find("textarea")[0],r,n.uid)).toButton({parent:i,eventName:"click",eventHandler:l}),(t=s.get()).setOption("placeholder",c.placeholder),t.setValue(c.value),t.getDoc().clearHistory(),t.on("changes",o),s.addKeys({"Ctrl-S":function(e){a()},"Ctrl-R":function(e){a()},F12:function(e){}}),n.created({type:n.config.type,codeEditor:s}))}function o(){var e=n.config.type,t=s.get().getValue();n.changed({type:e,result:t}),n.$applyAsync()}function l(e,t){var n=angular.element(e.currentTarget).text(),n={style:{left:e.clientX,top:e.clientY},selects:[n],target:e.target};d.openExplorerPopup(n,function(e){e[0]&&(e=e[0],t&&t({replace:e.target}))})}function a(){var e=n.config.type,t=s.get().getValue();n.save({type:e,result:t})}var r,c,s,u=n.$watch("config",function(e){e&&t(e)},!0);n.$on("$destroy",function(){u(),n.config=null,s&&(s.get().off("changes",o),d.destroy(s.uid())),s=null})}}}}e.$inject=["$codeEditor","Default"],MODULE.tool.instance.directive("jjCommonEditor",e)}(),function(){function e(p,g,m,e,t,n,i,o,l,f,a,r,v,h,y){return{restrict:"EA",templateUrl:"popup/jj-content-editor-dialog-box.html",replace:!0,scope:!1,compile:function(){return function(n,e,t){function i(e){y.power=e}function o(){return e.find("#editor")[0].contentWindow}function l(){return o().$$getData()}function a(e){o().$$setData(e||[])}function r(){i(!0),n.config=null}function c(e){var e=angular.element(e),t="nav[epub\\:type",n=e.filter(t+'="toc"]'),u=((n=n.length<1?e.find(t+'="toc"]'):n).length<1&&(n=e.filter(t+"]")).length<1&&(n=e.find(t+"]")),0);return function e(t){if(t&&!(t.length<1)){var n=t.children().filter("ol"),i=n.length;if(!(i<1)){for(var o=[],l=0;lt.component?1:0}function o(){i(!0),n.config=null,n.userItems=null,n.result=null,n.item=null}i(!1),n.config.id=n.config.id||"ExportComponentDialogBox",n.config.title="컴포넌트 배포",n.config.yes="확인",n.config.no="취소";var a,r=u.getSetting(),c=[];for(a in r){var s=r[a];s.bundle||c.push(s)}0t.label?1:e.componentt.component?1:0}),n.userItems.sort(e))},n.isSelect=function(e){return 0<=n.result.components.indexOf(e)},n.selectToggle=function(e){var t=n.result.components.indexOf(e);t<0?n.result.components.push(e):n.result.components.splice(t,1)},n.selectAllToggle=function(){var e=n.userItems;n.result.components.length===e.length?n.result.components=[]:n.result.components=e.map(function(e){return e.component})},n.item={name:"category",value:"",type:"string",label:"카테고리 이름 (선택 사항)",desc:"컴포넌트를 같은 카테고리로 배포합니다.",editor:{type:"input",inputType:"text",pattern:p.pattern.folderName,maxLength:50,placeholder:"컴포넌트를 가져오기 할때 카테고리 이름으로 정렬됩니다."},descText:'\\ / : * ? " < > | 문자는 사용할 수 없습니다.',descTextStyle:{padding:10,marginBottom:10}},n.onChange=function(e){n.result[e.name]=e.value,n.$applyAsync()},n.enterKey=n.saveData=function(){var e;n.callback&&(e=n.result,n.exportForm.$invalid?d.message("입력한 값이 유효하지 않습니다.",{delay:d.SHORTEST}):e.components.length<1?d.message("선택된 컴포넌트가 없습니다.",{delay:d.SHORTEST}):(n.callback(null,n.result),n.$applyAsync()))},n.$on("$destroy",function(){o()}),n.escKey=n.cancel=function(){n.callback&&(n.callback("취소"),o(),n.$applyAsync())}}}}}e.$inject=["$contentComponentSetting","$toast","$util","$applications"],MODULE.tool.instance.directive("jjExportComponentDialogBox",e)}(),function(){function e(u,d,p,g){return{restrict:"EA",templateUrl:"popup/template/jj-export-template-dialog-box.html",replace:!0,scope:!1,compile:function(){return function(n,e,t){function i(e){g.power=e}function l(e,t){var n=e.categoryPath,i=t.categoryPath,o=e.label,l=t.label;if(n&&i){if(nt.template?1:0}function o(){i(!0),n.config=null,n.userItems=null,n.result=null,n.item=null}i(!1),n.config.id=n.config.id||"ExportTemplateDialogBox",n.config.title="템플릿 배포",n.config.yes="확인",n.config.no="취소";var a,r=u.getSetting(),c=[];for(a in r){var s=r[a];s.bundle||c.push(s)}0t.label?1:e.templatet.template?1:0}),n.userItems.sort(e))},n.isSelect=function(e){return 0<=n.result.templates.indexOf(e)},n.selectToggle=function(e){var t=n.result.templates.indexOf(e);t<0?n.result.templates.push(e):n.result.templates.splice(t,1)},n.selectAllToggle=function(){var e=n.userItems;n.result.templates.length===e.length?n.result.templates=[]:n.result.templates=e.map(function(e){return e.template})},n.item={name:"category",value:"",type:"string",label:"카테고리 이름 (선택 사항)",desc:"템플릿을 같은 카테고리로 배포합니다.",editor:{type:"input",inputType:"text",pattern:p.pattern.folderName,maxLength:50,placeholder:"템플릿을 가져오기 할때 카테고리 이름으로 정렬됩니다."},descText:'\\ / : * ? " < > | 문자는 사용할 수 없습니다.',descTextStyle:{padding:10,marginBottom:10}},n.onChange=function(e){n.result[e.name]=e.value,n.$applyAsync()},n.enterKey=n.saveData=function(){var e;n.callback&&(e=n.result,n.exportForm.$invalid?d.message("입력한 값이 유효하지 않습니다.",{delay:d.SHORTEST}):e.templates.length<1?d.message("선택된 템플릿이 없습니다.",{delay:d.SHORTEST}):(n.callback(null,n.result),n.$applyAsync()))},n.$on("$destroy",function(){o()}),n.escKey=n.cancel=function(){n.callback&&(n.callback("취소"),o(),n.$applyAsync())}}}}}e.$inject=["$contentTemplateSetting","$toast","$util","$applications"],MODULE.tool.instance.directive("jjExportTemplateDialogBox",e)}(),function(){function e(y,e,t,b,x,$,w,j,n,_,k,i,C){return{restrict:"EA",templateUrl:"popup/jj-html-editor-dialog-box.html",replace:!0,scope:!1,compile:function(){var h;return function(r,c,e){function n(e){_.power=e}function t(){r.config.value=r.config.value||f;var e=r.config.value;r.config_assets={element:r.config.uid},r.config_html={type:"html",value:e.html,placeholder:"\x3c!-- HTML CODE --\x3e"},r.config_js={type:"js",value:e.js,placeholder:"// JS CODE\n// * HTML Element는 내부 IFrame에서 동작합니다.\n// * JS 코드는 HTML 내용이 삽입된 직후에 실행됩니다.\n// (document ready 이벤트 발생된 이후임.)\n"},r.config_css={type:"css",value:e.css,placeholder:"/* CSS CODE */"},r._tempCode=angular.copy(e),r.isRuned=!1,a(),r.$applyAsync()}function i(e,t){try{e=angular.extend(e||{},{code:r._tempCode}),n=e,i=function(){t&&t()},r.config&&r.config.write?(y.open({delay:400,message:"내용을 저장합니다."}),r.config.write(n,function(){y.close(),i&&i()})):i&&i()}catch(e){void 0,t&&t(e)}var n,i}function o(){l(),r.$applyAsync()}function l(){var e,t;n(!0),v(),h&&clearTimeout(h),h=null,g&&(r.closeDebuger(),r.config&&r.config.uid&&(t=r.config.uid||"",delete window[t],g&&(g.src=""),e&&e()),g=null,r.config=null,r._tempCode=null,r.tempLog=null,r.codeEditors=null,r.config_assets=null,r.config_html=null,r.config_js=null,r.config_css=null)}function a(){r.isRuned=!0,h&&clearTimeout(h),h=setTimeout(function(){var e,l,a;l={},a="",(e=[]).push(function(e){a=r._tempCode.css,l.css=d(r._tempCode.css),e()}),e.push(function(e){l.js=s(r._tempCode.js),e()}),e.push(function(e){l.html=u(r._tempCode.html),e()}),async.waterfall(e,function(e){i=a,p("css",o=l),p("html",o),p("js",o),o=r._tempCode.html,t=r._tempCode.js;var t,n=r.config.uid||"",i={css:i,html:o,js:t},o=(g=c.find("iframe[playground-view]")[0],{code:i,uid:n,deleteConnection:!1,set:function(e){e.scope={uid:n},e.$this={},e.$self={}},iframe:g,src:w.CLIENT_FRAMEWORK_FOLDER+w.HTML_ELEMENT_PATH});j.set(o),r.$applyAsync()}),h=null,r.$applyAsync()},300)}function s(e){return $.run(e)}function u(e){return x.run(e)}function d(e){return b.run(e)}function p(e,t){var t=t[e],n="";t.log&&(n=t.log.replace(/\n/gim,"
    ")),t.log=n,r.tempLog[e]=t,r.$applyAsync()}r.config.id=r.config.id||"HtmlEditorDialogBox",r.config.title=r.config.title||"내용 편집",r.config.yes=r.config.yes||"확인",r.config.no=r.config.no||"취소",r.config.save=r.config.write?r.config.save||"저장":"",n(!1);var g,m,f={html:"",js:"",css:""},v=(r._tempCode={},r.isRuned=!0,r.tempLog={},r.config.read?(m=function(e){r.config.value=angular.extend(f,e),t()},r.config&&r.config.read?(y.open({delay:400,message:"내용을 로드합니다."}),r.config.read(r.config,function(e){y.close(),m&&m(e)})):m&&m()):t(),r.codeEditors={},r.created=function(e,t){r.codeEditors||(r.codeEditors={}),r.codeEditors[e]=t},r.reformatCode=function(e){e=r.codeEditors[e];e&&e.autoFormatSelection()},r.changed=function(e,t){var n,i;r._tempCode[e]!==t&&(r._tempCode[e]=t,r.isRuned=!1,"html"===e?n=u:"css"===e?n=d:"js"===e&&(n=s),n&&((i={})[e]=n(t),p(e,i),r.$applyAsync()))},r.enterKey=r.close=function(){r.callback&&i(null,function(){r.callback(null,!0),o()})},r.save=function(e,t){0[ 명명 규칙 ] 페이지를 참고 하세요.',descTextStyle:{backgroundColor:"transparent",padding:10,marginBottom:10}},{name:"domain",value:"",type:"string",label:"Domain",desc:"App을 구별하는데 사용되는 고유 도메인 prefix 입니다.",editor:{}},{name:"appID",value:"",type:"string",label:"App ID",desc:"App 고유 식별자를 설정합니다.",editor:{type:"input",inputType:"text",pattern:x.pattern.appid},descText:'App 고유 식별자를 설정합니다. (기본값: Book ID)

    다른 App의 아이디와 중복이 될수도 있으므로 변경하지 않는 것이 좋습니다.
    아이디가 중복 될 경우 실행에 문제가 발생할 수 있습니다.

    알파벳 소문자와 숫자만 허용됩니다. 대문자와 공백, 특수문자, 한글은 사용할 수 없습니다.',descTextStyle:o},{name:"appName",value:"",type:"string",label:"App Name",desc:"App 이름을 설정합니다.",editor:{type:"input",inputType:"text",pattern:x.pattern.appname},descText:'App 이름을 설정합니다. (기본값: Book ID)

    특수문자(\\ / : * ? " < > |)는 사용할 수 없습니다.

    ',descTextStyle:o}],l.publish={},l.publish.params=angular.copy(l.config.params),l.getGroup=function(t){return function(e){return void 0===e||-1|]+$/,folderPattern:/^[^:*?"<>|]+$/},n(a),o.isDesktopFolder=!1,o.displayFolderPath="",l=o.$watch(function(){return o.item.folder+"/"+o.item.newFolder},function(e){var n;o.displayFolderPath=i(),n=o.displayFolderPath.toLowerCase(),o.isDesktopFolder=n===r,-1?,./{}\[\];:'"\s\r\n\t]+$/,phone:/^\d{10,11}$/,email:/[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/},c.parse()),l=(a.version={name:i.name+i.major,version:"ver. "+c.versionNumber()+" ("+c.com()+")"},o.testMode?a.userData={email:"tovsoft@tovsoft.com",name:"사용자1",phone:"01000000000"}:a.userData={code:[],email:"",name:"",phone:""},a.submit=function(e){var i;angular.element(e.target).hasClass("ng-invalid")?d.message("입력된 정보를 다시 확인해 주세요",{warn:!0}):(i={address:o.allAddress,code:a.userData.code.join("-"),email:a.userData.email,name:a.userData.name,phone:function(e){var t;if(10===e.length)t=/(\d{3})(?:-|\s)?(\d{3})(?:-|\s)?(\d{4})/g;else{if(11!==e.length)return e;t=/(\d{3})(?:-|\s)?(\d{4})(?:-|\s)?(\d{4})/g}return e=e.replace(t,function(e,t,n,i,o,l){return t+"-"+n+"-"+i})}(a.userData.phone)},r.regist(i,function(e,t,n){e?a.callback({success:e,userData:i}):a.callback({success:e,userData:i,msg:t})}))},t.find("input[code]"));a.onKeydown=function(e){!e.ctrlKey||e.altKey||e.shiftKey||86===e.keyCode&&(e.preventDefault(),navigator.clipboard.readText().then(function(o){var l=[];o.replace(/([0-9a-zA-Z]{4}(-|\s)){4}.{4}/g,function(e,t,n){var i="-"===n?" ":"-";return o.split(n).forEach(function(e){4
    ",$=angular.element(e),l.elementScope=l.$new(!1),F($)(l.elementScope),a.append($),h(!0),d(l.css),g(l.option),p(l.style),c(),s())}function c(e){void 0===e&&(e=J.power&&l.uid),k&&k(),k=null,D&&D(),D=null,T&&T(),T=null,C&&C(),C=null,S&&S(),S=null,E&&E(),E=null,P.unwatch(),e&&(D=l.$watch(function(){var e=B.get(l.uid);return!e||e.layer("isHide")},function(e){l.isHide=e,i()}),T=l.$watch(function(){var e=B.get(l.uid);return!e||e.layer("isLock")},function(e){l.isLock=e}),C=l.$watch(function(){var e=l.uid,e=B.get(e);return e?e.css():null},function(e){e&&(d(e),i(),m("css"))},!0),S=l.$watch(function(){var e=l.uid,e=B.get(e);return e?e.style():null},function(e){e&&(p(e),i(),m("style"))},!0),E=l.$watch(function(){var e=l.uid,e=B.get(e);return e?e.option():null},function(e){e&&(g(e),i(),m("option"))},!0),P.watch())}function s(){if(!l.uid)return l.isCurrentGroupMember=!1,void l.$applyAsync();var e=V.get(),e=e?e.currentEditGroup():"",t=B.get(l.uid).getNoneCopyValue("group")||"";l.isCurrentGroupMember=e===t,l.$applyAsync()}function n(){var e=l.isCurrentGroupMember;I&&I(),I=null,w&&w(),w=null,_&&_(),_=null,j&&j(),j=null,A&&A(),A=null,e&&(I=l.$watch(function(){var e=B.get(l.uid);return e?e.getNoneCopyValue("selected"):null},function(e,t){f()}),w=l.$watch(function(){if(!l.uid)return null;var e=B.get(l.uid);return e?e.tempdata("liveSize_fromInputBox"):null},function(e){l.uid&&i()}),_=l.$watch(function(){if(!l.uid)return null;var e=B.get(l.uid);return e?e.tempdata("liveScale_fromInputBox"):null},function(e){l.uid&&i()}),j=l.$watch(function(){if(!l.uid)return null;var e=B.get(l.uid);return e?e.tempdata("liveMove_fromKey"):null},function(e){l.uid&&i()}),l.$watch("updateSelectStateFlag",function(e,t){e&&(e=l.uid,B.get(e)&&(l.selected=B.get(e).value("selected")),l.type!==Y.TEXT&&(e=V.get())&&((e=e.value("editingUID"))?e===l.uid&&v():K.isSelectableElement(l.uid)&&v()),l.updateSelectStateFlag=!1,l.$applyAsync())}))}function u(){l.elementScope&&(l.elementScope.$destroy(),l.elementScope=null),$&&($.remove(),$=null),h(!1)}function i(){var e,t;l.isHide||!l.css?l.containerStyle={display:"none"}:(e={minWidth:l.css.minWidth,minHeight:l.css.minHeight,maxWidth:l.css.maxWidth,maxHeight:l.css.maxHeight},e=l.option._$$flexibleSize?angular.merge(e,{left:l.css.left,top:l.css.top}):angular.merge(e,q.getStyle(l.uid,l.css,l.option.layout)),t=B.get(l.uid).tempdata("liveSize_fromInputBox"),angular.isDefined(t)&&(e.left=t.left,e.top=t.top,e.width=t.width,e.height=t.height),t=B.get(l.uid).tempdata("liveMove_fromKey"),angular.isDefined(t)&&(e.left=t.css.left,e.top=t.css.top),t=function(e){var t;if(e)return e=angular.copy(e),t=B.get(l.uid).tempdata("liveScale_fromInputBox"),angular.isDefined(t)&&(e.scale=t),e}(l.css.transform),e.transform=B.getTransformString(t),l.containerStyle=angular.extend({},{},e))}function d(e){var t=B.get(l.uid).css();l.css=angular.extend({},t,e)}function p(e){var t=B.get(l.uid).style();l.style=angular.extend({},t,e)}function g(e){var t=B.get(l.uid).option();l.option=angular.extend({},t,e)}function m(e){P.layoutChange(e)}function f(){l.updateSelectStateFlag=!0,l.$applyAsync()}function v(){}function h(t){var n=a[0];U.forEach(function(e){t?n.addEventListener(e,y,!0):n.removeEventListener(e,y,!0)})}function y(e){var t=e.type.toLowerCase(),n="on"+t;e.target.hasAttribute(n)&&(e.stopPropagation(),void 0),"mousedown"===t?(n=e).target&&n.target.nodeName&&"A"===n.target.nodeName.toUpperCase()?z.isTouchDevice()&&(n.preventDefault(),void 0):G.mousedownType=l.uid:"click"===t&&(n=e,G.clickType=l.uid,n.target&&n.target.nodeName&&"A"===n.target.nodeName.toUpperCase()&&(z.isTouchDevice()||(n.preventDefault(),void 0)))}l.invalid=!1;var b,x,$,w,j,_,k,C,S,E,I,D,T,A,P=X.elementContainer(l),e=l.$watch(function(){return l.uid},function(e){t()}),O=(l.isCurrentGroupMember=!1,l.$watchCollection(function(){var e=V.get();return e?e.getNoneCopyValue("inGroup"):null},function(){var e=l.uid;B.get(e)&&(l.groupState=K.getEditGroupChain(e)),l.$applyAsync(),s()})),L=l.$watch("isCurrentGroupMember",function(e){n(),f(),l.$applyAsync()}),U=(l.liveUpdate=function(e,o){if(e.option&&g(e.option),e.style&&p(e.style),e.css)for(var t in l.css.left=e.css.left,l.css.top=e.css.top,l.css)void 0===e.css[t]&&(e.css[t]=l.css[t]);if(i(),!l.option._$$flexibleSize)return o&&o(e),void(W.isLiveUpdate=!1);l.elementScope.$$childHead.liveUpdate(e,function(e,t,n){e=e,i=angular.copy(l.css),(e=e||{}).width=void 0===e.width?a.outerWidth():e.width,e.height=void 0===e.height?a.outerHeight():e.height;var i={css:angular.merge(i,{width:e.width,height:e.height})};i.style=t,i.option=n,o&&o(i)})},l.selectElement=function(e,t){var n=R.uid();N.selectElement({document:n,selects:e||[]},t)},l.selected=!1,l.updateSelectStateFlag=!1,["mousedown","mouseup","click","dblclick","mousewheel","focus","blur","keydown","keypress","keyup ","scroll","submit"]);l.$on("$destroy",function(){l.uid=null,t(),P.destroy(),P=null,e(),O(),L()})}}}e.$inject=["$compile","$commandController","$elements","$documents","$selects","$projects","Touch","$device","$timeout","$selectDragger","$selectManager","$mask","$layout","ElementType","$applications","$lazyCheckSize"],MODULE.tool.instance.directive("jjElementContainer",e)}(),function(){function e(u,d,p,g,m,e,f,v,h,t){function n(t,l,e){function n(){var n,e;{if(window.document&&window.document.body)return e=function(t){var n,e=u.get();if(e)return n=e.files()||[],e=function(){var e=d.get();return e?(e.files()||[]).filter(function(e){return n.indexOf(e)<0}):[]}(),n.concat(e).filter(function(e){e=m.get(e);return(e?e.value("type"):"")===t})}(c)||[],"font"===c?(n=e,window.$$__isEditTool&&(r&&r.forEach(function(e){var t;-1
    "),ve(e)(t),n.find("[page-container]").append(e),P=e,O=t,l(!0),M(!0),U(!0),F(!0),N(!0),B(!0),R(!0),V(!0),z(!0),H(!0),G(!0),K(!0),q(!0),1===le.get().getNoneCopyValue("documents").length&&ee.zoomStep({direction:"fit"}),s.$applyAsync())}function r(){O&&O.$destroy(),O=null,P&&P.remove(),P=null,A&&e(),A=void 0,s.uid||(s.paper=null,c())}function M(e){if(!e&&$)return $(),void($=null);$=$||s.$watch(function(){var e=ae.get(s.uid);return 1<(e?e.getLength():0)},function(e,t){s.multiSelected=e})}function U(e){if(!e&&w)return w(),void(w=null);w=w||s.$watch(function(){var e=ae.get(s.uid);return e?e.value("currentGroup"):""},function(e,t){s.isGroup=Boolean(e)})}function F(e){if(!e&&j)return j(),void(j=null);j=j||s.$watch(function(){var e=le.get();if(!e)return 1;e=e.getNoneCopyValue("app");return void 0===e.$$temp_scale?e.scale:e.$$temp_scale},function(e,t){e=1/(s._scaleFactor=e);s.displayCoordinateStyle={transform:"scale("+e+","+e+")"}})}function N(e){if(!e&&_)return _(),void(_=null);_=_||s.$watch(function(){if(!s.uid)return null;var e=le.get();return e?e.getNoneCopyValue("paper"):null},function(e,t){s.paper=e,c()},!0)}function B(e){if(!e&&T)return T(),void(T=null);T=T||s.$watchCollection(function(){var e=ae.get();return e?e.getNoneCopyValue("inGroup"):null},function(e){c()})}function c(){if(!s.paper)return s.visible=!1,void(s.paperStyle={width:0,height:0});var e=ae.get(),e=e?e.currentEditGroup():"",e=e?-1*ue.getGroupOffsetTransform(e).angle:0;s.visible=!0,s.paperStyle={width:s.paper.width+"px",height:s.paper.height+"px",transform:"rotateZ("+e+"deg)"}}function R(e){if(!e&&k)return k(),void(k=null);k=k||s.$watch(function(){var e=ie.get(s.uid);return e?e.value("backgroundColor"):""},function(e,t){s.backgroundStyle||(s.backgroundStyle={}),s.backgroundStyle.backgroundColor=e})}function V(e){if(!e&&E)return E(),void(E=null);E=E||s.$watch(function(){var e=ie.get(s.uid);return e?e.getNoneCopyValue("insertSVG"):null},function(e,t){d()})}function z(e){if(!e&&C)return C(),void(C=null);C=C||s.$watch(function(){var e=p();return e?e.getNoneCopyValue("path"):null},function(e,t){W(),Z.safetyCall(s,function(){var e,t;u(),d(),e=p(),(t=e?e.getNoneCopyValue("path"):null)&&!e.isURL(t)&&(e=e.uid(),he.addAssetListener(t,e,function(e,t){s._assetChangedFlag=!0,u(),d(),s.$applyAsync()}),L={uid:e,path:t})})})}function H(e){if(!e&&I)return I(),void(I=null);I=I||s.$watch(function(){var e=ie.get(s.uid);return e?e.value("useCacheImage"):null},function(e,t){Z.safetyCall(s,function(){u()})})}function u(){s.master.url="";var e,t=ie.get(s.uid);!t||(e=(e=p())?e.path():null)&&(t.value("useCacheImage")&&!s._assetChangedFlag||(e=pe.noneCachePath(e)),s.master.url=e,s.master.style.backgroundImage=pe.getAvailableURL(e),s._assetChangedFlag=!1)}function G(e){if(!e&&S)return S(),void(S=null);S=S||s.$watch(function(){var e=ie.get(s.uid);return e?e.getNoneCopyValue("masterStyle"):null},function(e,t){d()},!0)}function d(){var e=ie.get(s.uid);(e=e&&e.value("master"))?(e=fe.resolveStyle(s.uid,e,s.master.url),s.master.style=e):s.master.style={}}function p(){try{var e=ie.get(s.uid).value("master");return oe.get(e)}catch(e){return null}}function W(){L&&(he.removeAssetListener(L.path,L.uid),L=null)}function K(e){if(!e&&D)return D(),void(D=null);J=J||s.$watch(function(){var e=Z.get().dataTransfer();return!!e&&(e.id&&e.id==t.dropId)},function(e,t){s.dragStarted=e})}function q(e){if(!e&&D)return D(),void(D=null);D=D||t.$observe("dropId",function(e){X||void 0,e?(n.on("dragenter",m),n.on("dragleave",h)):(n.off("dragenter",m),n.off("dragleave",h))})}function g(){n.off("dragover",f),n.off("drop",v),s.isDragOver=!1,s.$apply()}function Y(){if(!s.dragStarted)return!1;var e=Z.get().dataTransfer();return e&&e.item&&e.geometry?e:null}function m(e){return(e=e.originalEvent||e).preventDefault(),e.stopPropagation(),Y()?Q(function(){n.off("dragover",f),n.off("drop",v),n.on("dragover",f),n.on("drop",v),s.isDragOver=!0,s.$apply()},15):g(),!1}function f(e){return(e=e.originalEvent||e).preventDefault(),e.stopPropagation(),!1}function v(e){(e=e.originalEvent||e).preventDefault(),e.stopPropagation(),g();var t=Y();return t&&(void 0,t.geometry.x=e.offsetX-t.geometry.width*t.geometry.offsetX/120,t.geometry.y=e.offsetY-t.geometry.height*t.geometry.offsetY/120,t.geometry.x=Math.floor(t.geometry.x),t.geometry.y=Math.floor(t.geometry.y),function(e,t){function n(){return{css:c,option:o,style:l}}var i=e.type,o=e.option,l=e.style;if(void 0,e.template)me.insert(e.template);else{var a=t.x,r=t.y,c=angular.merge({},e.css,{left:a,top:r,width:t.width,height:t.height,transform:t.transform}),a=s.uid,r=ue.getEditGroupOffset();if(c.left=c.left-r.left,c.top=c.top-r.top,e.component)s.insertComponent({css:{left:c.left,top:c.top},document:a,component:e.component});else{t=e.source?pe.pathToActual(e.source):null;if(t){if(i===ge.MASTER)return de.insertMaster({original:t,uid:e.uid});if(i===ge.IMAGE)return r=n(),e.uid&&(r.uid=e.uid),de.insertImage(t,r)}else{if(i===ge.MASTER)return de.removeMaster(ie.uid());if(i===ge.MASK)return ue.add(a,{state:{normal:n()}})}e={normal:n()};s.addElement(a,{type:i,state:e})}}}(t.item,t.geometry)),!1}function h(e){return(e=e.originalEvent||e).preventDefault(),e.stopPropagation(),g(),!1}i(!0),o(!0),s.onMouseDownBackground=function(){se.mousedownType="paper"},s.onClickBackground=function(){se.clickType="paper"},s.visible=!1,s.backgroundStyle={backgroundColor:""},s.master={url:"",style:{}},s.insertComponent=function(e){ee.insertComponent(e,function(){void 0})},s.addElement=function(e,t){ee.addElement({document:e,elements:[{data:t}]})},s.selectElement=function(e){e={document:s.uid,selects:e||[]};ee.selectElement(e)},this.startEdit=s.startEdit=function(e,t){if(e){var n=s.uid,i=ae.get().value("currentGroup");if(1
    ')).width(v.width()),i.height(v.height()),n=v.position(),i.css({left:n.left,top:n.top}),v.parent().append(i),f.ghost=i,f.ghost_originalPosition=n),f.$applyAsync()}function o(e,t){t&&f._tempSize&&c("v"===f.direction?t.dx:t.dy,f._tempSize.dir,!1,f.dragOption),f._tempSize.isMoved&&(f._tempSize=null,f._content=null),l(),f.$applyAsync()}function l(){f.ghost&&(f.ghost.remove(),f.ghost=null,f.ghost_originalPosition=null)}function a(){var e,t,n,i;f.toggle&&!f._tempSize.isMoved&&(i=f.$eval(f.toggle),e=(i=angular.isArray(i)?i:[])[0],t=i[1],n=!((i=i[2])<=(n=f._tempSize[e]))&&(n<=t||t
    ",replace:!0,scope:{toggle:"@toggle",drag:"@drag",direction:"@jjSplitBar"},controller:t}}e.$inject=["Touch","$util","$document"],MODULE.tool.instance.directive("jjSplitBar",e)}(),function(){function e(g,e,m,f,v,h,y,t,n,b,x,i,$,w,j,_){function o(n,e,t){function i(){n.update=angular.merge({},n.update,_.getUpdateState())}n.message;var o,l=n.$watch(function(){return g.get()},function(e,t){n.message=e,n.$applyAsync()},!0),a=(n.info={version:h.version(),path:"Not Opened"},n.availableExplorer=!1,n.$watch(function(){return w&&w._projectRoot||""},function(e,t){n.info.path=e||"Not Opened",n.availableExplorer=!!e})),r=(n.explorer=function(){n.availableExplorer&&_.explorer(n.info.path+w.opsFolder)},n.changeColorTheme=function(e){y.modifyApplication({data:{colorTheme:e}})},o=(o=m.get())?o.getNoneCopyValue("app"):{scale:1},n.screen={scale:o.scale,percent:100*o.scale,min:v.zoom.min,max:v.zoom.max,unit:v.zoom.unit,disable:f.getLength()<1},n.$watch(function(){return f.getLength()},function(e,t){n.screen.disable=e<1})),c=n.$watch(function(){var e=m.get();if(!e)return 1;var t=e.getNoneCopyValue("documents");if(!t||t.length<1)return 1;t=e.getNoneCopyValue("app");return void 0===t.$$temp_scale?t.scale:t.$$temp_scale},function(e,t){n.screen.scale=e,n.screen.percent=Math.floor(100*e)}),s=(n.checkUpdate=function(t){t.preventDefault(),t.stopImmediatePropagation(),b.one(x.EVENT_MOUSE_UP,function(e){e.preventDefault(),t.stopImmediatePropagation();e=Math.floor(n.screen.percent)/100;y.zoomStep({scale:e,min:n.screen.min,max:n.screen.max,unit:n.screen.unit}),document.activeElement.blur()})},n.scaleUpdate=function(e){y.zoomStep({direction:e,min:n.screen.min,max:n.screen.max,unit:n.screen.unit})},n.zoomin=function(){n.scaleUpdate(1)},n.zoomout=function(){n.scaleUpdate(-1)},n.zoomPortrait=function(){n.scaleUpdate("portrait")},n.zoomLandscape=function(){n.scaleUpdate("landscape")},n.zoomFit=function(){n.scaleUpdate("fit")},n.versions={selectVersion:"",list:[]},n.$watch(function(){var e=$.getVersions();return e?e.installers:null},function(e,t){n.versions=$.getAvailableUpdateVersions(),n.versions&&s&&(s(),s=null)},!0)),u=(n.versionItemChange=function(){var e=$.getCurrentVersion().version,t=$.getVersionData(n.versions.selectVersion);e===t?j.message("현재 버전 입니다.",{delay:j.SHORTEST}):(n.versions.selectVersion=e,$.updateVersion(t,function(e){}))},n.update={show:!1},n.$watch(function(){return $.hasUpdate()},function(e,t){i()})),d=n.$watch(function(){return $.hasDownloadFile()},function(e,t){i()}),p=n.$watch(function(){return $.getRrequestError()},function(e,t){i()});n.updater=function(){$.update()},n.$on("$destroy",function(){n.message=null,n.info=null,l(),a(),c(),r(),u(),d(),p(),s&&s()})}return o.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"statusBar/jj-status-bar.html",replace:!0,scope:{},controller:o}}e.$inject=["$status","$applications","$projects","$documents","Default","$version","$commandController","$timeout","$notice","$document","$device","$externalAPI","$updater","FileSystem","$toast","$menuCall"],MODULE.tool.instance.directive("jjStatusBar",e)}(),function(){function e(e){return new(e.extend("TreeDragNDropService",{_tempSelects:[],getSelects:function(){return this._tempSelects},setSelects:function(e){this._tempSelects=("string"==typeof e?[e]:e)||[]},addMultiselect:function(e){var t=this;("string"==typeof e?[e]:e).forEach(function(e){-1{{ $index+1 }}',replace:!0,scope:!0}}),function(){function e(e,t,n,i,o,l,a,r){function c(e,t,n){e.getIndex=function(){return parseInt(e.index,10)},e.pageNumber=e.getIndex()+1}return c.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"tree/jj-doc-item.html",replace:!0,scope:{document:"@",uid:"@",index:"@"},controller:c}}e.$inject=["$commandController","$projects","$documents","$status","MessageType","$timeout","$treeDragNDrop","$capture"],MODULE.tool.instance.directive("jjDocItem",e)}(),function(){function e(a,r,c,e){function t(n,e,t){function i(){var e=r.get().getNoneCopyValue("paper"),e=r.$$checkThumbnailRatio(e.width,e.height),t=e.width,e=e.height;n.paperStyle={width:t,height:e},n.thumbnailStyle={position:"relative",width:t,height:e}}n.paperStyle={},n.thumbnailStyle={};var o=n.$watch(function(){var e=c.get(n.uid);return e?e.getNoneCopyValue("thumbnail"):null},function(e,t){a.safetyCall(n,function(){i()})}),l=n.$watch(function(){var e=r.get();return e?e.getNoneCopyValue("paper"):null},function(e,t){a.safetyCall(n,function(){i()})},!0);n.$on("$destroy",function(){n.paperStyle=null,n.thumbnailStyle=null,l(),o()})}return{restrict:"EA",templateUrl:"tree/jj-thumbnail.html",replace:!0,scope:{uid:"@"},compile:function(){return t}}}e.$inject=["$applications","$projects","$documents","$assets"],MODULE.core.instance.directive("jjThumbnail",e)}(),MODULE.tool.instance.directive("jjTreeItemVirtual",function(){return{restrict:"EA",template:'
    {{ $index+1 }}
    ',replace:!0,scope:!0}}),function(){function e(y,b,e,x,$,w,j,_){function t(r,i,e){function c(e){return"tree-"+e}function t(e){e?j.addDragEvent(h,{id:e,element:i,dragStart:o,dragEnd:l,ghost:n,ghostName:"tree-ghost-container",ghostScale:.5}):j.removeDragEvent(h)}function n(){return i}function o(e,t){var n,i,o,l,a=j.isMultiselected(r.uid)?j.getSelects():[r.uid];n=b.get(),(i=a.map(function(e){return n.getIndex(e)})).sort(),o=!0,l=i[0],a=i.map(function(e){return 1',transclude:!0,replace:!0,scope:{index:"@?",value:"@?"},controller:e}}e.$inject=["$viewerMenuDragNDrop","$util"],MODULE.tool.instance.directive("jjViewerMenuGroupItem",e)}(),function(){function e(u,a){return{restrict:"EA",templateUrl:"viewerOption/jj-viewer-setting-dialog-box.html",replace:!0,scope:!1,compile:function(){return function(c,e,t){function n(e){a.power=e}function i(){u.getViewerOption(function(e){var n;c.viewer=e,s=angular.merge({},c.viewer.skin),c.viewerInstanceChanged(),e=c.viewer.menu.all,n=c.viewer.menu.fixed,e=e.filter(function(e,t){return!n.includes(e)}),c.menuState={fixed:n.map(function(e,t){return{value:e}}),extended:e.map(function(e,t){return{value:e}})},l(),c.$applyAsync()})}function l(){var e=c.menuState.fixed,n=e.length,e=(e.forEach(function(e,t){e.label=n-t+" : "+e.value}),c.menuState.extended),i=e.length;e.forEach(function(e,t){e.label=n+(i-t)+" : "+e.value})}function o(){n(!0),c.config=null,c.menuState=null,c.viewer=null,c.skin=null}var s;n(!1),c.config.id=c.config.id||"ViewerSettingDialogBox",c.config.title="뷰어 설정",c.config.yes="확인",c.config.no="취소",c.$applyAsync(function(){i()}),c.dragOverGroup="",c.$on("$viewerMenuGroupDragOver",function(e,t){e.stopPropagation(),c.dragOverGroup=t||"",c.$applyAsync()}),c.$on("$viewerMenuGroupChange",function(e,t){e.stopPropagation(),function(e){var t=e.selects,e=e.drop;if(t.value!==e.value){var n=c.menuState[t.group],i=c.menuState[e.group],o=("first"===e.index?e.index=0:"last"===e.index&&(e.index=i.length),e.index);if(t.group===e.group){if(t.index===e.index)return;t.index',clickOutsideToClose:!0,useEnterKey:!1},function(e,t,n){t=t,n=n,(e=e)?(e=t&&t.openWorkspace||!1,_(n,e)):t?c(t,n):n&&n()}),o=i.$on("$destroy",function(){n()}),s=function(e){return i?i.callback?(i.callback.apply(null,[null,null,function(){t&&t(),l(function(){n(e)})}]),void i.$applyAsync()):void n(e):n(e)})}function c(e,t){switch(e.task){case"newProject":u=t,delete(s=e).task,p.newProject(s,function(e){if(!e)return _(u);s.isImportDocumentProcess?g.open({isCreateProjectProcess:!0},function(e){x.server({_processName:"import",project:s.project}),e?m.setMessage("문서 변환으로 새로운 프로젝트가 생성되었습니다."):m.setMessage("문서 변환이 취소되었습니다.",f.ERROR,v.FAIL)}):u&&u()});break;case"openProject":!function(i,o){if(!i||!i.path)return _(o);j.getVersionFromProjectFolder(i.path,function(e,t){var n;e&&void 0,void 0,t=t||$.JIK_VERSION,n=function(e){if(!e)return _(o);k({openWorkspace:i.openWorkspace,legacyVersion:t,isFolder:!0,path:i.path},o)},(e=t)<2?n(!1):e===$.JIK_VERSION?n(!0):(e='프로젝트 구조를 최신 버전으로 변경합니다.
    사용자가 추가한 파일들은 그대로 유지됩니다.
    • 현재 프로젝트 버전: JIK '+e+"
    • 최신 프로젝트 버전: JIK "+$.JIK_VERSION+"
    구조 변경 후 이전 버전의 직지 저작도구에서는 프로젝트 폴더를 사용할 수 없습니다.
    계속하시겠습니까?",w.confirm({content:e,title:"하위 버전 프로젝트 변환",cancel:"취소",ok:"확인",closeButton:!1}).then(function(e){n(0'},function(e,t){if(e)void 0,_(r,c);else{if(!t)return m.setMessage("프로젝트 파일 내보내기 작업이 취소되었습니다.",f.ALERT,v.NORMAL),void _(r,c);var e=t,o=r;h.save(e,function(e,t){if(e)return void 0,m.setMessage("프로젝트 파일 내보내기 작업이 취소되었습니다.",f.WARN,v.FAIL),_(o,c);var i,n;m.setMessage("내보내기 작업이 완료되었습니다."),i=t,n=function(){o&&o()},w.open({isTop:!0,templateUrl:"popup/project-file-option-result.html",controller:["$scope","$notice","originalConfig",function(e,t,n){e.close=function(e){t.close(e)},e.config={isTop:!0,title:"내보내기 결과",yes:"확인",result:i},e.explorer=function(e){j.explorer(e,function(e,t){})},e.$on("$destroy",function(){e.config=null}),n.enterValue=1,t.registNotice(e,n)}]}).then(function(e){n&&n()},function(){n&&n()})})}}):w.alert({title:"내보내기 취소",content:"내보내기할 프로젝트가 열려있지 않습니다.",ok:"확인"}).then(function(){_(r,c)},function(){_(r,c)});break;case"openProjectFile":l=e,a=t,j.getVersionFromProjectFile(l.path,function(e,t){e&&void 0,void 0,delete l.task,k({openWorkspace:l.openWorkspace,legacyVersion:t,path:l.path},a)});break;case"openShareFile":i=t,o=(n=e).openWorkspace||!1,n={project:b.uid(),popupConfig:{content1:"프로젝트에 설치할 공유 에셋 파일을 선택하세요.",content2:"중복된 에셋 파일은 덮어쓰기 됩니다. 공유 에셋 파일을 설치 하시겠습니까?",infoDesc:"현재 프로젝트에서 사용할 공유 에셋 파일인지 확인하세요.",yes:"설치",no:"취소",filePath:n.path},saveMenifest:!0},y.open(n,function(e){!e||e.cancel?_(i,o):i&&i()});break;default:_(t,e&&e.openWorkspace||!1)}var n,i,o,l,a,r,c,s,u}function k(t,n){var e,i=t.legacyVersion,o=t.path,l=t.isFolder,i=function(e){var t;switch(e){case 1:t=a;break;case 2:t=r;break;case 3:t=h}return t}(i);return i?(l=l?(e={unzipFolder:o,projectRoot:o},i.convert):(e={path:o},i.open))?void l.apply(i,[e,function(e){if(e)return _(n,t.openWorkspace);n&&n(e)}]):(void 0,_(n,t.openWorkspace)):_(n,t.openWorkspace)}var s;return{open:function(e,t){this.close(function(){e&&e.task?c(e,t):n(t)})},isOpen:function(){return Boolean(s)},close:function(e){s?s(e):e&&e()},onTaskSelected:c}}e.$inject=["$import","$commandController","$openImportPages","$status","MessageType","StatusIcon","$timeout","$projectFileLegacy","$projectFileLegacy2","$projectFile","$shareFile","$projects","$preview","FileSystem","$notice","$externalAPI"],MODULE.tool.instance.service("$openWorkspace",e)}(),function(){function e(a,u,l,r,c,s,d){function p(t,e,n){var i={ensureDir:!!(e=e||{}).ensureDir,pathString:t};!u._projectRoot||u._projectRoot!==t||e.silent?o(t,i,n):l.confirm({isTop:!0,closeButton:!1,title:"알림",ok:"예",cancel:"아니오",content:"현재 열려있는 프로젝트를 선택하였습니다.
    프로젝트를 다시 불러오시겠습니까?"}).then(function(e){if(1!==e)return n("cancel");o(t,i,n)},function(){void 0,n("cancel")})}function o(c,e,s){e={ensureDir:e.ensureDir,pathString:c,readContent:!1,directoryDepth:2};a.getTree(e,function(e){if(!e)return s();if(e.error)return o=e.error+"
    "+c,d.message(o,{delay:0}),s();var t,n=u._legacyFolder.substring(1),i=!0;for(t in e.children)if(t!==n){i=!1;break}var o={path:c,isEmpty:i,hasMetaInfFolder:!1,hasMimetype:!1,hasWorkspace:!1,hasPreviewFolder:!1,hasFrameworkFolder:!1,hasShareFolder:!1,hasPublishFolder:!1};if(o.isCurrentProjectFolder=!(!u._projectRoot||u._projectRoot!==c),i)return s(o);var l=u.metaInfFolder.substring(1),l=(o.hasMetaInfFolder=l in e.children,u.mimetype.substring(1)),l=(o.hasMimetype=l in e.children,u._workspace.substring(1));if(o.hasWorkspace=l in e.children,!o.hasWorkspace)return s(o);var a,l=e.children[l],r=u._previewFolder.substring(1),r=(o.hasPreviewFolder=r in l.children,u.opsFolder.substring(1)),l=e.children[r];l?(e=u.opsFrameworkFolder.substring(1),r=u.opsShareFolder.substring(1),a=u.opsPublishFolder.substring(1),o.hasFrameworkFolder=e in l.children,o.hasShareFolder=r in l.children,o.hasPublishFolder=a in l.children):(o.hasFrameworkFolder=!1,o.hasShareFolder=!1,o.hasPublishFolder=!1),s(o)})}function e(e,t){switch(e.task){case"newProject":i=t,(n=e).isEmpty?i("newProject"):(o=n.hasWorkspace?'비어있는 폴더가 아닙니다.
    선택한 프로젝트 폴더를 여시겠습니까?
    '+n.path.replace(/\\/g,"/")+"
    ":"비어있는 폴더가 아닙니다.
    폴더 내용을 포함한 새 프로젝트를 만드시겠습니까?",l.confirm({modal:!0,title:"새 프로젝트 만들기",content:o,ok:"예",cancel:"아니오",isTop:!0,closeButton:!1}).then(function(e){1!==e?i():n.hasWorkspace?g(n,i):i("newProject")},function(){void 0,i()}));break;case"openProject":g(e,t);break;default:t()}var n,i,o}function i(e,t){var n,i,o="newProject",l={silent:(e=e||{}).silent};if(e.showConfigPopup)return"boolean"==typeof e.showConfigPopup&&(e.showConfigPopup={}),e=angular.merge({task:o},e.showConfigPopup),n=e,i=function(e){if(!e)return t();l.ensureDir=!0,p(e,l,function(e){t(e)})},n=angular.merge({template:'
    ',title:"프로젝트 만들기",ok:"확인",cancel:"취소"},e),void c.open(n,function(e){i(e)});a.getOpenInformation({task:o,isDirectory:!0,directoryDesc:"프로젝트를 생성할 빈 폴더를 선택하세요."},function(e){if(!e)return t();p(e,l,function(e){t(e)})})}function g(e,t){e.hasWorkspace?t("openProject"):l.confirm({modal:!0,title:"프로젝트 열기",content:"프로젝트 폴더가 아닙니다.
    선택한 폴더를 프로젝트 폴더로 만드시겠습니까?",ok:"예",cancel:"아니오",isTop:!0,closeButton:!1}).then(function(e){1!==e?t():t("newProject")},function(){void 0,t()})}return{newProjectDialog:function(n){i({showConfigPopup:!0},function(t){if(!t||!t.path)return n();t.task="newProject",e(t,function(e){t.task=e,n(t)})})},importPagesProjectDialog:function(t){i({silent:!0,showConfigPopup:{title:"문서 변환 프로젝트 만들기"}},function(e){return e&&e.path?e.isEmpty?(e.task="newProject",e.ignoreAddDocument=!0,e.isImportDocumentProcess=!0,void t(e)):(e='비어있는 폴더가 아닙니다.
    해당 폴더에 새 프로젝트를 생성할 수 없습니다.
    '+e.path.replace(/\\/g,"/")+"
    ",void l.alert({content:e,title:"문서 변환 프로젝트 만들기",ok:"확인",modal:!0,isTop:!0,closeButton:!1}).then(function(e){},function(){})):t()})},emptyProjectDialog:i,saveProjectFileDialog:function(e,t){var n=u._projectRoot.substring(u._projectRoot.lastIndexOf("/")+1),i=angular.merge({task:"saveProjectFile",defaultSaveName:n+u.ext,saveMode:!0,accept:u.ext},e);a.getFileExplorer(i,function(e){e?(e={task:i.task,path:e},t(e)):void 0})},openProjectFileDialog:function(n){var i=[u.ext,u.ext2],o={task:"openProjectFile",accept:i.join(",")};a.getOpenInformation(o,function(e){var t;e?(t="."+u.parsePath(e).ext,i.includes(t)?n({task:o.task,path:e}):l.alert({content:'지원되지 않는 파일 형식 입니다. '+o.accept+' 파일을 선택하세요.
    '+e+"
    ",title:"프로젝트 파일 불러오기",ok:"확인",modal:!0,isTop:!0,closeButton:!1}).then(function(){n()},function(){n()})):n()})},saveShareFileDialog:function(e,t){var n=u._projectRoot.substring(u._projectRoot.lastIndexOf("/")+1),i=angular.merge({task:"saveShareFile",defaultSaveName:n+u.ext_share,saveMode:!0,accept:u.ext_share},e);a.getFileExplorer(i,function(e){e?(e={task:i.task,path:e},t(e)):void 0})},getFolderState:p,validatePath:e,updateRecentProjects:function(e,t,n){if("remove"!==e&&"add"!==e&&"update"!==e)return void 0,void(n&&n());var i=u.normalize(t.path),t={name:t.name||u.parseProjectName(i),path:i},o=r.data("recentProjects"),l=o.findIndex(function(e){return e.path===i}),a=!1;l<0?"add"!==e&&"update"!==e||(o.unshift(t),a=!0):0다시 시도해 주세요",ok:"확인"}).then(function(){n&&n()},function(){n&&n()})}void 0;var o,l=this._getData(e).dataType();l===a.GROUP?void 0:l===a.DOCUMENT?c.modifyDocument(o={ignoreCapture:!0,document:e,data:{events:t},_nothing:function(){i()}},i):(o={ignoreCapture:!0,document:r.uid(),elements:[{element:e,data:{events:t}}],_nothing:function(){i()}},c.modifyElement(o,i))}},new n}e.$inject=["EventPrototype","ElementType","$documents","$elements","$commandController","$toast","$notice"],MODULE.tool.instance.service("$eventEditor",e)}(),function(){function e(u,e,t,d,n,p,i,g,m){return{restrict:"EA",templateUrl:"content/event/jj-event-basic.html",replace:!0,scope:!0,link:function(o,e,t){function n(){o.eventCounter={};var e,t=o.events,n=o.resultEvents;for(e in t){var i=t[e].type;n[i]&&n[i].actions?o.eventCounter[i]=n[i].actions.length+1:o.eventCounter[i]=1}}function i(){var e;o.eventGroups=m.getEventGroups(o.type),o.events=m.getEvents(o.eventGroups),e=o.type==u.DOCUMENT?p.uid():g.get().isSingleSelected(),o.uid=e,r&&(r(),r=null),o.uid&&(r=o.$watchCollection(function(){return m.getCurrentEvent(o.uid)},function(e,t){o.resultEvents=angular.copy(e),n()}))}function l(){void 0;var e=o.resultEvents;m.save(o.uid,e)}function a(e,t,n){t={template:'
    ',item:t,type:o.type,eventType:e,uid:o.uid,title:"이벤트 동작 설정",cancel:"취소",ok:"확인",save:function(e){n(e)}};d.open(t,function(e){void 0,n(e)})}var r,c=o.$watch(function(){return o.type},function(e){i()}),s=o.$watch(function(){return o.type==u.DOCUMENT?p.uid():g.get().isSingleSelected()},function(e){i()});o.resultEvents=m.getCurrentEvent(o.uid),n(),o.addEvent=function(e,t){void 0;var n,i=e.type;a(i,t,function(e){if(e){if(void 0!==n)return o.resultEvents[i].actions[n]=e,void l();var t=o.resultEvents,t=(t[i]||(t[i]={type:i,actions:[]}),t[i].actions);t.push(e),n=t.length-1,l()}})},o.deleteAction=function(e,t){var n=o.resultEvents[e].actions;n.splice(t,1),n.length<1&&delete o.resultEvents[e],l()},o.editAction=function(t,n){var e=o.resultEvents[t].actions[n];a(t,e,function(e){e&&(o.resultEvents[t].actions[n]=e,l())})},o.$on("$destroy",function(){o.eventGroups=null,o.events=null,o.config=null,o.resultEvents=null,c(),s(),r&&(r(),r=null)})}}}e.$inject=["ElementType","EventPrototype","$commandController","$import","$notice","$documents","$elements","$selects","$eventEditor"],MODULE.tool.instance.directive("jjEventBasic",e)}(),function(){function e(l,a,r,c){function e(s,e,t){function n(){var e,t;s.config.item&&"string"==typeof s.config.item?s.config.item=(e=s.config.item,t=s.actionList,e.split(".").forEach(function(e){t=t&&t[e]}),t):s.config.item=s.config.item||s.actionList.common.none,s.result=angular.copy(s.config.item),s.currentAction=s.result.group+"."+s.result.name,s.selectAction=angular.copy(s.actionList[s.result.group][s.result.name]);var n,i=s.result.params||[],o=s.selectAction.params;for(n in o){var l=o[n],a=i[n];if(!l.name&&a.name)i.splice(n,0,l);else if(void 0===a||l.name!==a.name)i[n]=u(l);else{void 0;var r,c=a.type!==l.type;for(r in a)"type"!==r&&(c&&"value"===r?(l[r]=d(l.type,a[r]),a.type=l.type,void 0):(l[r]=a[r],void 0))}}s.selectAction.asynchronous=s.result.asynchronous}function u(e){return{name:e.name,value:e.value,type:e.type,require:e.require}}function d(e,t){var n,i;switch(e){case"object":case"array":angular.isArray(t)&&(i=t),angular.isString(t)&&(i=angular.fromJson(t));break;case"boolean":i="string"==typeof t?"true"===(n=t.toLowerCase())||"false"!==n&&Boolean(t):Boolean(t);break;case"number":i=Number(t);break;default:i=String(t)}return i}function i(){s.currentAction;var e,t={group:(t=s.currentAction.split("."))[0],name:t[1]};for(e in s.selectAction=angular.copy(s.actionList[t.group][t.name]),s.result={asynchronous:s.selectAction.asynchronous},s.selectAction)"params"!==e&&"desc"!==e&&(s.result[e]=s.selectAction[e]);var n,i=[],o=s.selectAction.params;for(n in o){var l=o[n];i[n]=u(l)}s.result.params=i,void 0}s.actionList=function(){var e=l;try{for(var t in e){var n,i=e[t];for(n in i){var o=i[n];o.desc&&"string"==typeof o.desc&&(o.desc=r.trustAsHtml(o.desc.replace(/\n/gim,"
    ")))}}}catch(e){void 0,void 0}return e}(),s.actionGroups=function(){switch(s.config.type){case a.DOCUMENT:case a.IMAGE:case a.TEXT:case a.VIDEO:case a.AUDIO:case a.INPUT:}return["common","book","media","JJ Binder API (link)","JJ Binder API (native)","JJ Binder API (record)","custom"]}(),s.actions=function(e,t){var n,i=[];for(n in t){var o,l=t[n],a=e[l];for(o in a){var r=a[o];r.group=l,i.push(r)}}return i}(s.actionList,s.actionGroups);var o=s.$watch(function(){return s.config},function(e,t){n()},!0);s.actionChange=function(){void 0,i()},s.submit=function(e,t,n){typeof t.value!==t.type&&(t.value=d(t.type,t.value)),void 0;e=s.result.params[e];e.value=t.value,e.require=t.require,n&&(t=s.getResult(),s.$emit("$callCodeEditorSave",t))},s.close=function(e){var t=s.callback;t&&(!s.result||e<1||"common"===s.result.group&&"none"===s.result.name?t():t(s.getResult())),s.$applyAsync(),s.$destroy()},s.getResult=function(){var e=s.result.params;if(e)for(var t=e.length-1;0<=t;--t)e[t].name||e.splice(t,1);return angular.copy(s.result)},s.weblink=function(e){c.weblink(e)},s.$on("$destroy",function(){o&&o(),s.actionList=null,s.actionGroups=null,s.actions=null,s.result=null,s.selectAction=null,s.currentAction=null})}return{restrict:"EA",templateUrl:"content/event/jj-event-editor.html",replace:!0,scope:!(e.$inject=["$scope","$element","$attrs"]),controller:e}}e.$inject=["ActionPrototype","ElementType","$sce","$util"],MODULE.tool.instance.directive("jjEventEditor",e)}(),MODULE.tool.instance.directive("jjEventEditorPopup",function(){return{restrict:"EA",templateUrl:"content/event/jj-event-editor-popup.html",replace:!0,scope:!1,link:function(n,e,t){n.escKey=function(){n.close(0)},n.enterKey=function(){n.close(1)},n.$on("$callCodeEditorSave",function(e,t){n.config.save&&n.config.save(t)}),n.$on("$destroy",function(){n.config=null})}}}),function(){function e(h,y,b,x,$,d,p,g,m,w,j,_,e,t){return{restrict:"EA",templateUrl:"content/event/jj-form-item.html",replace:!0,scope:{index:"@",uid:"@",item:"=",submit:"&"},link:function(f,i,e){function o(e,t){f.item.value=e.getValue()||"",f.itemChange()}function l(e,t){var n=angular.element(e.currentTarget).text(),n={style:{left:e.clientX,top:e.clientY},selects:[n],target:e.target};p.openExplorerPopup(n,function(e){e[0]&&(e=e[0],t&&t({replace:e.target}))})}var t,n=f.item.editor.pattern;if(n){if(n instanceof RegExp)t=n.source;else{if("string"!=typeof n)throw"잘못된 RegExp 표현식 입니다.";t=g.pattern[n]?(n=g.pattern[n]).source:n}f.item.editor.pattern=t}var a,v,r,c=f.item.editor.classNames;if(c){var s,u={};for(s in c)u[c[s]]=!0;f.classObject=u}f.item=f.item||{},f.item.editor=f.item.editor||{},f.item.editor.type=f.item.editor.type||"",void 0===f.item.require?f.temp={enable:!0,displayEnableBox:!1}:f.temp={enable:f.item.require,displayEnableBox:!0},f.itemChange=function(){f.submit({index:f.index,result:f.item})},f.itemEnableChange=function(){void 0,f.item.require=f.temp.enable,f.submit({index:f.index,result:f.item})},"image"===f.item.editor.display?a=f.$watch("item.value",function(e,t){var n;e=e,f.displayImageStyle=angular.merge({},f.item.editor.displayStyle),e&&"image"===f.item.editor.display?(e=j.pathToActual(e),n=j.getAvailableURL(e),f.displayImageStyle.backgroundImage=n,f.displayLabelStyle=f.item.editor.labelStyle,f.displayLabel=j.shortPathString(j.pathToVirtual(e))):f.displayLabel="선택된 이미지가 없습니다."}):(f.displayImageStyle={},a&&a()),f.openImageDialogBox=function(){var e={accept:j.ACCEPT_IMAGES,task:"assetFile"};m.getOpenInformation(e,function(e){e?(e=e.replace(/\\/g,"/"),f.item.value=e,void 0,f.submit({index:f.index,result:f.item})):void 0})},f.removeResource=function(){f.item.value="",f.submit({index:f.index,result:f.item})},"select"==f.item.editor.type&&f.item.editor.data.unshift({label:"( 기본값 사용 ) "+f.item.desc,value:""}),"uid"==f.item.editor.type&&(n=f.item.editor.data||"EG",v=f.item.editor.filter,f.UIDs=function(e){var t,n,i,o,l,a,r,c=f.item.editor.multiSelect?[]:[{label:"( "+f.item.desc+" )",value:""}],s=f.item.value;for(t in e){switch(e[t]){case"E":n=y.get().elements(),i=b;break;case"G":n=y.get().groups(),i=x;break;case"A":n=y.get().assets(),i=$;break;case"D":n=h.get().documents(),i=y}0===f.uid.indexOf(_.ELEMENT)&&(o=f.uid,a=(l=b.get(f.uid)).isGroupContainer(),r=l.parentGroup());for(var u=n.length-1;0<=u;--u){var d=n[u],p=i.get(d).name();if(v&&0',mode:f.item.editor.codeEditorType,title:f.item.editor.codeEditorTitle||"코드 편집",placeholder:f.item.editor.placeholder,value:e,autoformatButton:!0,save:"저장 (ctrl+s)",codeTest:!0,write:function(e,t){f.item.value=e,f.submit({index:f.index,result:f.item,isSave:!0}),t&&t()}};w.open(e,function(e,t){if(e)return void 0;void 0!==t&&r&&r.get().setValue(t)})},f.openEditorKeymap=function(){p.openKeymap()},f.$on("$destroy",function(){a&&a(),f.item=null,f.jjBinding=null,f.temp=null,r&&(r.get().off("change",o),p.destroy(r.uid())),r=null})}}}e.$inject=["$projects","$documents","$elements","$groups","$assets","Default","$codeEditor","$util","$externalAPI","$import","FileSystem","UIDType","$explorerPopup","$toast"],MODULE.tool.instance.directive("jjFormItem",e)}(),function(){function e(e,t){return{restrict:"EA",templateUrl:"content/event/jj-event-image.html",replace:!0,scope:!0,link:function(e,t,n){}}}e.$inject=["PropertyBase","ElementType"],MODULE.tool.instance.directive("__jjEventImage",e)}(),function(){function e(i,o,e,t,n,l,a,r){return{get:function(n,e,t){e=i.get(n,e,t).extend("ContentAssetBase",{setItem:function(e){n.item=e.uid?a.getContent(e.uid):null},getGeometrySize:function(e){return n.item.type===r.MASTER?{width:void 0,height:void 0}:this._super.getGeometrySize.apply(this,arguments)},itemChanged:function(e){var t;n.info.source?(t=o.pathToActual(n.info.source),n.imageStyle={backgroundImage:o.getAvailableURL(t)}):n.imageStyle=null},onDoubleClick:function(e){void 0,(e=e.originalEvent||e).stopPropagation();e=n.item.uid;l.insertItem(e,function(){n.$applyAsync()})}});return n.modifyItem=function(){void 0,a.modifyItem()},n.deleteItem=function(){void 0,a.deleteItem()},n.showInfoItem=function(){a.showInfoItem(n.info)},e}}}e.$inject=["ContentItemBase","FileSystem","$documents","$commandController","$mime","$assetManager","$contentAssetSetting2","ElementType"],MODULE.tool.instance.factory("ContentAssetBase",e)}(),function(){function e(o,l,a,e){return{get:function(n,e,t){function i(){n.item.thumbnail.source?n.thumbnailSource=n.item.thumbnail.source:n.thumbnailSource=null}e=o.get(n,e,t).extend("ContentComponentBase",{itemChanged:function(e){var t=l.getSetting(e.component);e.css=t.css,l.changeThumbnailSource(e),i()},onDoubleClick:function(e){(e=e.originalEvent||e).stopPropagation(),n.insertComponent()}});return n.insertComponent=function(){var e=n.item.component;e&&l.insert(e,function(){})},n.modifyComponent=function(){l.modify(n.item,function(e){e&&(a.message("컴포넌트가 변경되었습니다.",{delay:a.SHORTEST}),i())})},n.deleteComponent=function(){var e=n.item.component,t=l.getData(e).value("name");l.remove({remove:[{uid:e}],confirm:{title:"컴포넌트 삭제",content:''+t+" 컴포넌트를 삭제하시겠습니까?"}})},n.infoComponent=function(){var e=n.item.component;l.openInfoPopup(e)},e}}}e.$inject=["ContentItemBase","$componentUtil","$toast","FileSystem"],MODULE.tool.instance.factory("ContentComponentBase",e)}(),function(){function e(e,t,l,n,a){return{get:function(i,n,o){return e.create("ContentItemBase",{init:function(){this._run()},isDragable:!1,_bindHandler:void 0,_run:function(){var e=this,t=this.setWatch_info(),n=(this._bindHandler={onDragstart:angular.bind(this,this.onDragstart),onDragend:angular.bind(this,this.onDragend),onDoubleClick:angular.bind(this,this.onDoubleClick)},this.isDragable=l.isDragNDropable(),i.isDragging=!1,this.setWatch_dragid());i.$on("$destroy",function(){e.removeDragEvent(),t&&t(),n&&n()})},setWatch_info:function(){var n=this;return i.$watch(function(){return i.info},function(e,t){e=e&&angular.copy(e);n.setItem(e),n.itemChanged(i.item)},!0)},setItem:function(e){i.item=e},setWatch_dragid:function(){var t=this;return o.$observe("dragId",function(e){e?(n.attr("draggable","true"),t.addDragEvent()):(n.removeAttr("draggable"),t.removeDragEvent())})},itemChanged:function(e){},addDragEvent:function(){this.isDragable?(n.on("dragstart",this._bindHandler.onDragstart),n.on("dragend",this._bindHandler.onDragend),n.on("dblclick",this._bindHandler.onDoubleClick)):(void 0,n.on("click",this._bindHandler.onDoubleClick))},removeDragEvent:function(){this.isDragable?(n.off("dragstart",this._bindHandler.onDragstart),n.off("dragend",this._bindHandler.onDragend),n.off("dblclick",this._bindHandler.onDoubleClick)):n.off("click",this._bindHandler.onDoubleClick),i.isDragging&&this.onDragend()},setDragData:function(e){var t=this.getGeometrySize(e.target);return{id:o.dragId,item:i.item,geometry:{offsetX:e.offsetX,offsetY:e.offsetY,width:t.width,height:t.height,transform:{angle:0,scale:1}}}},getGeometrySize:function(e){e=angular.element(e);var t=i.item.css,n=t.width||e.width(),e=t.height||e.height();return n=Math.max(n,t.minWidth||0),e=Math.max(e,t.minHeight||0),{width:Math.min(n,t.maxWidth||1/0),height:Math.min(e,t.maxHeight||1/0)}},onDragstart:function(e){var t;(e=e.originalEvent||e).stopPropagation(),e.target instanceof HTMLElement?(t=this.setDragData(e),this.setDataTransfer(t),n.addClass("dragging"),i.isDragging=!0,i.$applyAsync()):e.preventDefault()},setDataTransfer:function(e){t.get().dataTransfer(e),void 0},onDragend:function(e){e&&(e=e.originalEvent||e).stopPropagation(),void 0,a.triggerHandler("mouseup"),n.removeClass("dragging"),i.isDragging=!1,this.setDataTransfer(null),e&&i.$applyAsync()}})}}}e.$inject=["$superClass","$applications","$device","ElementType","$document"],MODULE.tool.instance.factory("ContentItemBase",e)}(),function(){function e(o,l,a,e){return{get:function(n,e,t){function i(){n.item.thumbnail.source?n.thumbnailSource=n.item.thumbnail.source:n.thumbnailSource=null}e=o.get(n,e,t).extend("ContentTemplateBase",{getGeometrySize:function(e){return{width:void 0,height:void 0}},itemChanged:function(e){l.changeThumbnailSource(e),i()},onDoubleClick:function(e){}});return n.insertTemplate=function(){var e=n.item.template;e&&l.insert(e,function(){})},n.modifyTemplate=function(){l.modify(n.item,function(e){e&&(a.message("템플릿이 변경되었습니다.",{delay:a.SHORTEST}),i())})},n.deleteTemplate=function(){var e=n.item.template,t=l.getData(e).value("name");l.remove({remove:[{uid:e}],confirm:{title:"템플릿 삭제",content:''+t+" 템플릿을 삭제하시겠습니까?"}})},n.infoTemplate=function(){var e=n.item.template;l.openInfoPopup(e)},e}}}e.$inject=["ContentItemBase","$templateUtil","$toast","FileSystem"],MODULE.tool.instance.factory("ContentTemplateBase",e)}(),function(){function e(i){return{restrict:"EA",templateUrl:"content/item/jj-content-asset-box.html",replace:!0,scope:{info:"="},link:function(e,t,n){new(i.get(e,t,n).extend("ContentAssetBox",{})),e.$on("$destroy",function(){0})}}}e.$inject=["ContentAssetBase"],MODULE.tool.instance.directive("jjContentAssetBox",e)}(),function(){function e(i,o){return{restrict:"EA",templateUrl:"content/item/jj-content-asset-list.html",replace:!0,scope:{info:"="},link:function(t,e,n){t.tabWidth=o.treeTabWidth,new(i.get(t,e,n).extend("ContentAssetList",{setItem:function(e){this._super.setItem.apply(this,arguments),t.item.depth=1}})),t.$on("$destroy",function(){0})}}}e.$inject=["ContentAssetBase","Default"],MODULE.tool.instance.directive("jjContentAssetList",e)}(),function(){function e(i){return{restrict:"EA",templateUrl:"content/item/jj-content-component-box.html",replace:!0,scope:{info:"="},link:function(e,t,n){new(i.get(e,t,n).extend("ContentComponentBox",{})),e.$on("$destroy",function(){0})}}}e.$inject=["ContentComponentBase"],MODULE.tool.instance.directive("jjContentComponentBox",e)}(),function(){function e(i,o){return{restrict:"EA",templateUrl:"content/item/jj-content-component-list.html",replace:!0,scope:{info:"="},link:function(t,e,n){t.tabWidth=o.treeTabWidth,new(i.get(t,e,n).extend("ContentComponentList",{setItem:function(e){this._super.setItem.apply(this,arguments),t.item.type="file",t.item.depth=1}})),t.$on("$destroy",function(){0})}}}e.$inject=["ContentComponentBase","Default"],MODULE.tool.instance.directive("jjContentComponentList",e)}(),function(){function e(i,o,l,a,r){return{restrict:"EA",templateUrl:"content/item/jj-content-item.html",replace:!0,scope:{info:"="},link:function(n,e,t){new(i.get(n,e,t).extend("ContentItem",{onDoubleClick:function(e){(e=e.originalEvent||e).stopPropagation();var e=angular.merge({},n.item.css,{left:100,top:100,width:n.item.css.width,height:n.item.css.height}),t=o.uid(),e={normal:{css:e,option:n.item.option,style:n.item.style}};if(n.item.type===a.MASK)return r.add(t,{state:e}),void n.$apply();t={document:t,elements:[{data:{type:n.item.type,state:e}}]};l.addElement(t),n.$apply()}})),n.$on("$destroy",function(){0})}}}e.$inject=["ContentItemBase","$documents","$commandController","ElementType","$mask"],MODULE.tool.instance.directive("jjContentItem",e)}(),function(){function e(i){return{restrict:"EA",templateUrl:"content/item/jj-content-template-box.html",replace:!0,scope:{info:"="},link:function(e,t,n){new(i.get(e,t,n).extend("ContentTemplateBox",{})),e.$on("$destroy",function(){0})}}}e.$inject=["ContentTemplateBase"],MODULE.tool.instance.directive("jjContentTemplateBox",e)}(),function(){function e(i,o){return{restrict:"EA",templateUrl:"content/item/jj-content-template-list.html",replace:!0,scope:{info:"="},link:function(t,e,n){t.tabWidth=o.treeTabWidth,new(i.get(t,e,n).extend("ContentTemplateList",{setItem:function(e){this._super.setItem.apply(this,arguments),t.item.type="file",t.item.depth=1}})),t.$on("$destroy",function(){0})}}}e.$inject=["ContentTemplateBase","Default"],MODULE.tool.instance.directive("jjContentTemplateList",e)}(),function(){function e(i,o,e,t,n,l,a,r){return{restrict:"EA",templateUrl:"content/item/__jj-content-asset.html",replace:!0,scope:{info:"="},link:function(n,e,t){new(i.get(n,e,t).extend("ContentAsset",{itemChanged:function(e){e=o.pathToActual(e.source);n.imageStyle={backgroundImage:o.getAvailableURL(e)}},onDoubleClick:function(e){(e=e.originalEvent||e).stopPropagation();var e=angular.merge({},n.item.css,{left:50,top:50}),t=o.pathToActual(n.item.source);l.insertImage(t,{uid:n.item.uid,css:e,option:n.item.option,style:n.item.style},function(){}),n.$apply()}})),n.$on("$destroy",function(){0})}}}e.$inject=["ContentItemBase","FileSystem","$documents","$commandController","$mime","$assetManager","$assets","$externalAPI"],MODULE.tool.instance.directive("__jjContentAsset",e)}(),function(){function e(n,o,l,e,t,a){return{restrict:"EA",templateUrl:"content/item/__jj-content-master.html",replace:!0,scope:{info:"="},link:function(i,e,t){new(n.get(i,e,t).extend("ContentMaster",{itemChanged:function(e){var t;e.source?t=o.pathToActual(e.source):(t=o.pathToActual(o.BUNDLE_RESOURCE+o.resourceMasterFolder+"/"+o.MASTER_DELETE_FILE_NAME,!0),void 0),i.imageStyle={backgroundImage:o.getAvailableURL(t)}},onDragstart:function(){},onDragend:function(){},onDoubleClick:function(e){}})),i.insertMaster=function(){var e=(e=i.item.source)&&o.pathToActual(i.item.source),t=l.uid(),n=i.item.uid;a.masterImageChange({original:e,uid:n},t),i.$applyAsync()},i.$on("$destroy",function(){0})}}}e.$inject=["ContentItemBase","FileSystem","$documents","$commandController","$mime","$changeImageSource"],MODULE.tool.instance.directive("__jjContentMaster",e)}(),function(){function e(i,e,o,t,n,l){return{restrict:"EA",templateUrl:"content/item/__jj-content-template.html",replace:!0,scope:{info:"="},link:function(e,t,n){new(i.get(e,t,n).extend("ContentTemplateItem",{onDragstart:function(){},onDragend:function(){},onDoubleClick:function(e){}})),e.insertTemplate=function(e){o.insertTemplate({template:e},function(e){void 0})},e.removeTemplate=function(e){o.deleteTemplate({template:e},function(e){void 0})},e.$on("$destroy",function(){0})}}}e.$inject=["ContentItemBase","$documents","$commandController","$templates","$notice","$toast"],MODULE.tool.instance.directive("__jjContentTemplate",e)}(),function(){function e(e,s,u,d,p,g,m,f){return{restrict:"EA",templateUrl:"content/operation/jj-operation-layout.html",replace:!0,scope:!0,link:function(n,e,t){function i(){var e=u.checkArrange(n.selects);n.arrange.back.disable=!e.back,n.arrange.backward.disable=!e.backward,n.arrange.forward.disable=!e.forward,n.arrange.front.disable=!e.front}function o(){"page"===n.alignOption.sortByPage?n.alignOption.canAlign=n.selects&&0그룹을 해지하면 그룹에 적용된 코드가 정상작동하지 않을 수 있습니다.
    해지하시겠습니까?",title:"그룹 해지",ok:"예",cancel:"아니오",isTop:!0,closeButton:!1}).then(function(e){n(1===e)},function(){void 0,n(!1)})):void t()},i.$on("$destroy",function(){0})}}}e.$inject=["PropertyBase","ElementType","$selects","$groups","$documents","$notice","$mask","$commandController","$capsulize"],MODULE.tool.instance.directive("jjPropertyGroup",e)}(),function(){function e(i,o){return{restrict:"EA",templateUrl:"content/property/jj-property-html.html",replace:!0,scope:!0,link:function(e,t,n){new(i.get(e,t,n).extend("PropertyHtml",{getType:function(){return o.HTML}})),e.$on("$destroy",function(){0})}}}e.$inject=["PropertyBase","ElementType"],MODULE.tool.instance.directive("jjPropertyHtml",e)}(),function(){function e(i,o,e,t,n,l){return{restrict:"EA",templateUrl:"content/property/jj-property-image.html",replace:!0,scope:!0,link:function(e,t,n){new(i.get(e,t,n).extend("PropertyImage",{getType:function(){return o.IMAGE}})),e.$on("$destroy",function(){0})}}}e.$inject=["PropertyBase","ElementType","$selects","$documents","$elements","$commandController"],MODULE.tool.instance.directive("jjPropertyImage",e)}(),function(){function e(i,o){return{restrict:"EA",templateUrl:"content/property/jj-property-input.html",replace:!0,scope:!0,link:function(e,t,n){new(i.get(e,t,n).extend("jjPropertyInput",{getType:function(){return o.INPUT}})),e.$on("$destroy",function(){0})}}}e.$inject=["PropertyBase","ElementType"],MODULE.tool.instance.directive("jjPropertyInput",e)}(),function(){function e(o,l,a,r,c,s,u,d){return{restrict:"EA",templateUrl:"content/property/jj-property-mask.html",replace:!0,scope:!0,link:function(n,e,t){new(o.get(n,e,t).extend("PropertyMask",{getType:function(){return l.MASK}})),n.useSizeResetButton=!1;var i=n.$watchCollection(function(){var e=a.get(n.uid);if(!e)return[];e=e.getNoneCopyValue("childGroup"),e=r.get(e);return e?e.getNoneCopyValue("indexes").length:[]},function(e,t){d.safetyCall(n,function(){n.useSizeResetButton=0=e.bottom)),r.activate!==n){if(r.activate=n,!r.child||!r.treeItem)return s(),void a();r.activate?(u(r.treeItem),l(!0)):l(!1),a(),r.$applyAsync()}}function l(e){$&&$(),$=null,w&&w(),w=null,j&&j(),j=null,_&&_(),_=null,k&&k(),k=null,C&&C(),C=null,S&&S(),S=null,E&&E(),E=null,I&&I(),I=null,y&&y(),y=null,e&&($&&$(),$=r.$watch(function(){return r.treeItem.state},function(e,t){g(),m(),r.$applyAsync()},!0),w&&w(),w=r.$watch(function(){return r.tree.getFilters("selectable")},function(e,t){m(),r.$applyAsync()}),(r.isDocument||r.isElement)&&(j&&j(),j=r.$watch(function(){var e,t,n=0;return r.isDocument||r.isElement?(r.isDocument?e=O.get(r.uid):r.isElement&&((t=(t=L.get(r.uid))?t.isGroupContainer():"")&&(e=M.get(t))),n=e?e.getNoneCopyValue("indexes").length:n):n},function(e,t){t!==e&&(void 0,s(!0))})),(r.isDocument||r.isElement)&&(_&&_(),_=r.$watch(function(){var e,t,n=0;return r.isDocument||r.isElement?(r.isDocument?e=O.get(r.uid):r.isElement&&(e=L.get(r.uid)),e?(r.isDocument?t=e.files():r.isElement&&(t=e.getNoneCopyValue("assets")),n=t?t.length:n):n):n},function(e,t){t!==e&&(void 0,s(!0))})),(r.isDocument||r.isElement)&&(k&&k(),k=r.$watch(function(){var e,t=0;if(!r.isDocument&&!r.isElement)return t;if(r.isDocument?e=O.get(r.uid):r.isElement&&(e=L.get(r.uid)),!e)return t;var n,i=e.events();for(n in i){var o=i[n].actions;o&&(t+=o.length)}return t},function(e,t){t!==e&&(void 0,s(!0))})),r.isElement&&(C&&C(),C=r.$watch(function(){return(e=L.get(r.uid))?e.name():"";var e},function(e,t){e&&t!==e&&(r.treeItem.info=d(),r.$applyAsync())})),r.isEvent&&(S&&S(),S=r.$watch(f,function(e,t){t!==e&&(r.treeItem.info=d(),r.$applyAsync())})),r.isElement&&(E&&E(),E=r.$watchCollection(function(){var e,t;if(r.isElement)return e=0,t=R.getCapsule(r.uid),e=t&&t.schema?t.schema.length:e},function(e,t){e!==t&&(void 0,s(!0))})),r.isCapsule&&(e=T.getCapsuleUID(r.uid),R.getData(e.target)&&(I&&I(),I=r.$watch(function(){var e=v();return e?e.join(", "):""},function(e,t){e!==t&&(void 0,r.treeItem.info=d(),r.$applyAsync())}))),y=r.$watch(function(){return r.tree.options("showLabelDetail")},function(e,t){r._showLabelDetail=e}))}function a(){var e,t;x?x.updateView&&x.updateView(r.activate):(r.activate&&(!r.isRoot||r.isRoot&&r._showRoot)?(e=r.$new(!1),t=angular.element("
    "),B(t)(e),n.append(t),b=t,x=e):c(),r.$applyAsync())}function c(){x&&x.$destroy(),x=null,b&&b.remove(),b=null}function s(e){var t,n,i;r.isElement&&!L.get(r.uid)?r.tree.remove(r.uid):(r.tree&&r.tree.remove(r.uid),t=function(){var e=[],t=r.tree.options("keepHierarchy");r.isDocument?e=function(){var e;return t?(e=O.get(r.uid))?e.getNoneCopyValue("indexes"):[]:(e=O.get(r.uid))?e.getNoneCopyValue("elements"):[]}():r.isElement&&(e=function(){if(!t&&r.depth<0)return[];var e=L.get(r.uid),e=e?e.isGroupContainer():"";if(!e)return[];e=M.get(e);return e?e.getNoneCopyValue("indexes"):[]}());e=function(e){if(!p("display"))return angular.copy(e);var n=r.tree.options("keepHierarchy");return e.filter(function(e){var e=L.get(e).type(),t=p("display",e);return t=(t=n&&e===A.MASK?!0:t)||e===A.MASK?t:p("display","element")})}(e);e.reverse(),t||e.sort(function(e,t){var e=L.get(e),t=L.get(t),n=e.type(),i=t.type();if(n===A.MASK&&(n=A.GROUP),(i=i===A.MASK?A.GROUP:i)
    '),m(t)(e),i.find("[middle-container][view]").append(t),s=t,u=e),o.$applyAsync()}}))});o.$on("$destroy",function(){l(),c&&c(),c=null,d&&d(),d=null,n&&n(),o.config=null,o.content=null})}return t.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"explorer/view/jj-explorer-view.html",replace:!0,scope:{config:"="},controller:t}}e.$inject=["$explorerTree","$documents","$elements","$compile"],MODULE.tool.instance.directive("jjExplorerView",e)}(),MODULE.tool.instance.directive("jjExplorerViewAsset",function(){function e(e,t,n){e.onClick_yesButton=function(){e.$broadcast("yesButtonClick",e.category)},e.onClick_noButton=function(){e.$broadcast("noButtonClick",e.category)}}return e.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"explorer/view/jj-explorer-view-asset.html",replace:!0,scope:{config:"="},controller:e}}),MODULE.tool.instance.directive("jjExplorerViewBasic",function(){return{restrict:"EA",templateUrl:"explorer/view/jj-explorer-view-basic.html",replace:!0}}),function(){function e(a,e,t,r,c,s,n){function i(n,e,t){function i(){n.config.yes="저장"}function o(e,t,n){a.modifyCapsule(e,t,!0,function(e){return void 0===e?(c.message("변경된 사항이 없습니다.",{delay:c.SHORTEST}),void(n&&n())):e&&(e.modifyGroup||e.modifyElement)?(c.message("변경된 사항이 적용되었습니다.",{delay:c.SHORTEST}),void(n&&n(!0))):void s.alert({modal:!0,title:"저장 실패",content:"변경된 사항이 정상적으로 저장 되지 않았습니다.
    다시 시도해 주세요",ok:"확인"}).then(function(){n&&n(!1)},function(){n&&n(!1)})})}i();var l=n.$watch(function(){return n.config?n.config.uid:""},function(e,t){e!==t&&(n.refresh&&n.refresh(),i())});n.callback=function(e,t){if(e)return void 0;o(n.config.uid,t,function(e){})},n.selectNone=function(e){e.stopImmediatePropagation(),a.select(null)},n.importProperties=function(e){var t=r.capsuleUID_byGroup(n.config.uid),t=t?[t]:[],t={filters:{disable:t,highlight:t},style:{left:e.clientX,top:e.clientY},target:e.target};a.openImporter(t,function(e){e&&n.importData(e)})},n.$on("$destroy",function(){l&&l(),n.config={}})}return i.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"explorer/view/jj-explorer-view-capsule.html",replace:!0,scope:{config:"="},controller:i}}e.$inject=["$capsulize","$documents","$commandController","$explorerTree","$toast","$notice","UIDType"],MODULE.tool.instance.directive("jjExplorerViewCapsule",e)}(),function(){function e(o,a,r,e,t,n,i,l){function c(l,e,t){function n(){var e=l._config.uid,t=l._config.eventType,n=l._config.index,i=0===e.indexOf(a.type)?a.get().dataType():(e?o.get(e):null).type();l.type=i;i=r.getCurrentEvent(e)[t].actions[n];l.config=angular.merge(l._config,{item:i,type:l.type,ok:"저장"}),l.$applyAsync()}var i=l.$watch(function(){return l._config},function(e,t){n()},!0);n(),l.$on("$callCodeEditorSave",function(){l.saveData()}),l.saveData=function(){var e=l._config.uid,t=l._config.eventType,n=l._config.index,i=r.getCurrentEvent(e),i=angular.copy(i),t=i[t].actions,o=l.getResult();t[n]=o,r.save(e,i)},l.$on("$destroy",function(){i&&i(),l.config={}})}return c.$inject=["$scope","$element","$attrs"],{restrict:"EA",templateUrl:"explorer/view/jj-explorer-view-event.html",replace:!0,scope:{_config:"=config"},controller:c}}e.$inject=["$elements","$documents","$eventEditor","$import","$commandController","$explorerPopup","$toast","$notice"],MODULE.tool.instance.directive("jjExplorerViewEvent",e)}(),function(){function e(a,r,e,c,s,u,d,t){return e.extend("Menu_align",{buildMenuData:function(){this._super.buildMenuData.apply(this,arguments),this.data.label="정렬"},buildSubmenu:function(){var t=this,n=r.checkArrange(a.selects),e=([{label:"맨 뒤로",value:"back",icon:"arrange-back",key:"Alt+DOWN"},{label:"뒤로",value:"backward",icon:"arrange-backward",key:"Alt+Shift+DOWN"},{label:"앞으로",value:"forward",icon:"arrange-forward",key:"Alt+Shift+UP"},{label:"맨 앞으로",value:"front",icon:"arrange-front",key:"Alt+UP"}].forEach(function(e){if(!e)return t.addSubline();t.addMenu(new c({label:e.label,enabled:n[e.value],iconSelector:a.icon(e.icon),accelerator:e.key,click:function(){r.arrange(e.value)}}))}),u.get().getNoneCopyValue("alignOption")),i="page"===e.sortByPage,o=!1,l=(a.selects&&(o=i?0'},function(e,t){if(e)return void 0;void 0,n&&n()})},autoScrollSelectedPage:function(){var e=angular.element("[tree-container][jj-scroller]").controller();e&&e.autoScrollSelectedPage()}}))}e.$inject=["CommandControllerService","$notice","$projects","$screenZoom","$import","$auth","$command"],MODULE.tool.instance.service("$commandController",e)}(),function(){function e(n){function e(){}return e.prototype={_state:n.DEFAULT,set:function(e,t){e=angular.copy(e||n.DEFAULT),void 0===t||t||(e.cursor=""),this._state=e},get:function(){return this._state}},new e}e.$inject=["Cursor"];var t=MODULE.tool.instance;t.service("$cursor",e),t.value("Cursor",{DEFAULT:{mouse:"",target:"",cursor:""},DRAG_ELEMENT:{mouse:"drag",target:"screen",cursor:"move"},DRAG_SELECT:{mouse:"drag",target:"screen",cursor:"crosshair"}})}(),MODULE.tool.instance.service("$device",function(){function e(){this.SCALE_FACTOR=window.devicePixelRatio||1,void 0,this.isMobile()&&(this.SLOP=10),window.navigator.pointerEnabled?(this.EVENT_MOUSE_DOWN="pointerdown",this.EVENT_MOUSE_MOVE="pointermove",this.EVENT_MOUSE_UP="pointerup"):window.navigator.msPointerEnabled?(this.EVENT_MOUSE_DOWN="MSPointerDown",this.EVENT_MOUSE_MOVE="MSPointerMove",this.EVENT_MOUSE_UP="MSPointerUp"):this.isTouchAvaliable()?(this.EVENT_MOUSE_DOWN="touchstart mousedown",this.EVENT_MOUSE_MOVE="touchmove mousemove",this.EVENT_MOUSE_UP="touchend mouseup"):(this.EVENT_MOUSE_DOWN="mousedown",this.EVENT_MOUSE_MOVE="mousemove",this.EVENT_MOUSE_UP="mouseup")}return e.prototype={SCALE_FACTOR:1,SLOP:0,EVENT_MOUSE_DOWN:"mousedown",EVENT_MOUSE_MOVE:"mousemove",EVENT_MOUSE_UP:"mouseup",EVENT_CLICK:"click",EVENT_DBLCLICK:"dblclick",isMobile:function(){return/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent)},isTouchAvaliable:function(){return"ontouchstart"in window},isTouchDevice:function(){return this.isTouchAvaliable()&&this.isMobile()},isDragNDropable:function(){return!this.isMobile()},browser:function(){var e,t,n=navigator.userAgent,i=n.match(/(opera|chrome|safari|firefox|edge|trident(?=\/))\/?\s*(\d+)/i)||[];if(-1!==n.indexOf("Win")&&(e="Windows"),-1!==n.indexOf("Mac")&&(e="OS X"),-1!==n.indexOf("X11")&&(e="UNIX"),-1!==n.indexOf("Linux")&&(e="Linux"),-1!==n.indexOf("Android")&&(e="Android"),/iPad|iPhone|iPod/.test(n)&&(e="iOS"),-1!==n.indexOf("Windows Phone")&&(e="Windows Phone"),/trident/i.test(i[1]))return t=/\brv[ :]+(\d+)/g.exec(n)||[],/\b(Tablet|WebView)/gi.exec(n)?{name:"IETablet",version:t[1]||"",os:e}:{name:"IE",version:t[1]||"",os:e};if("MSIE"===i[1])return{name:"IEMobile",version:(t=/\brv[ :]+(\d+)/g.exec(n)||[])[1]||"",os:e};if("Chrome"===i[1]){if(null!==(t=n.match(/\bOPR\/(\d+)/)))return{name:"Opera",version:t[1],os:e};if(null!==(t=n.match(/\bEdge\/(\d+)/)))return{name:"Edge",version:t[1],os:e}}return i=i[2]?[i[1],i[2]]:[navigator.appName,navigator.appVersion,"-?"],null!==(t=n.match(/version\/(\d+)/i))&&i.splice(1,1,t[1]),{name:i[0],version:i[1],os:e}}},new e}),function(){function e(a,v,i,t,h,n,y,o,l){var r=!0,c={},b={};return{_getDefaultFontName:function(){return n.getDefaultFontName()},setSource:function(e,t,n){t=this._getBundleFontPath(e,t);b[e]={bundle:Boolean(n),source:t},n||void 0},getFontName:function(e){var e=a.parsePath(e),t=e.ext;return"ttf"===t?t="truetype":"eot"===t?t="embedded-opentype":"otf"===t&&(t="opentype"),{name:e.fileName,format:t}},isBundleFont:function(e){e=b[e];return e&&e.bundle},status:function(e){e="string"==typeof e?c[e]:e;return e?e.status:""},load:function(e,n){function t(e,t){++l,o[e]=t,l===a&&n&&n(o)}var i=this,o={},l=0,a=(e="string"==typeof e?[e]:e).length;e.forEach(function(e){i._loadCheck(e,t,!0)})},_loadCheck:function(n,i,e){var t=this._check(n);if("boolean"==typeof t)return e||0===e?void v(function(){i(n,t)},"boolean"==typeof e?250:0):i(n,t);t.then(function(e){i(n,!0)}).catch(function(e){var t=b[n],t=t?t.source:"";void 0,i(n,!1)})},reloadErrorFont:function(e){r=e},_check:function(e){var t=b[e],n=e===h.FONT_DEFAULT;if(t||(i=this._getDefaultFontName(),n&&!i||e&&void 0),!t)return!1;var i=c[e];if(i){var o=this.status(i);if("loaded"===o)return!0;if("loading"===o)return i.loaded;if("error"===o&&!r)return!1}var o=a.getAvailableURL(t.source),l=(n||(o='local("'+e+'"), '+o),i=new FontFace(e,o,{display:"swap"}),this._add(i,!1),this);return i.load().then(function(e){l._add(e,!0)})},_add:function(e,t){c[e.family]=e,t&&document.fonts.add(e)},_clear:function(){b={},c={},document.fonts.clear()},remove:function(e){var e="string"==typeof e?c[e]:e,t=e.family;this.isBundleFont(t)||(delete b[t],delete c[t],document.fonts.delete(e),this._checkRemoveDefaultFont(t))},bundleSource:function(e){var n=this;t.load(function(){i.getItems("font").forEach(function(e){var t,e=i.getContent(e);e&&e.property.bundle&&(t=n.getFontName(e.property.label),n.setSource(t.name,e.original,!0))}),e&&setTimeout(e)})},_getBundleFontPath:function(e,t){return a.pathToActual(t)},bundleIdleLoadStart:function(e){function i(e,t,n){1===arguments.length?o.setMessage(e):o.setMessage(e+" : "+n+" ( "+t+" )","",l.WAIT)}e=angular.extend({idle:!0,delay:250,bulk:1},e);var t,n=[];for(t in b)b[t]&&n.push({value:t});this.lazyLoadStart(n,{progress:function(e,t,n){i("폰트 설정",e,t)},complete:function(){i("폰트 설정이 완료 되었습니다.")}},e)},lazyLoadStart:function(e,o,t){function l(){if(!s){if(r&&!y.safety())return void 0,void v(l,5e3);f=0;for(var e=g,t=Math.min(m,g+a);el.zoom.max?l.zoom.max:e)/100},move:function(e){e=this._getNextScale(e);return this._state.scale=e,this._updateRange("x"),this._updateRange("y"),this.setState("x"),this.setState("y"),this._state},end:function(){return this._state},_getPointFromPaper:function(e){this.paper||(this.paper=this.container.find("[jj-paper]"));var t=this.paper.offset(),n=e.x-t.left,e=e.y-t.top,t=u();return{x:n/=t,y:e/=t}},_getRange:function(e){var e="x"==e,t=this.container[0],n=e?t.scrollWidth:t.scrollHeight,i=e?this.container.width():this.container.height(),o=e?t.offsetWidth-t.clientWidth:t.offsetHeight-t.clientHeight;return{minScroll:i-n-o,maxScroll:0,currentScroll:e?t.scrollLeft:t.scrollTop}},_getCenter:function(e){return"x"==e?this._state.cx:this._state.cy},_updateRange:function(e){var t="x"==e,n=this._state.scale,i=l.zoom.min/100,o=l.zoom.max/100,e=this._getCenter(e),i=e*(i-1),o=e*(o-1),t=t?p:g;t.min=Math.min(i,o),t.max=Math.max(i,o),t.value=e*(n-1)},setState:function(e){var t="x"===e,n=this._getCenter(e),i=t?this.container.width():this.container.height(),o=t?this.screen.outerWidth():this.screen.outerHeight(),l=t?this.contentArea.width:this.contentArea.height,l=n<0?this._setBelowState(e):l=n?n:e.value;return t},_setBelowState:function(e){e="x"==e?p:g;return{min:Math.min(e.min,e.minScroll),max:e.value}},_setOverState:function(e,t,n){var e="x"==e,i=e?p:g,o=this._state.scale,e=e?this.contentArea.width:this.contentArea.height;return{min:Math.min(i.min,i.minScroll),max:ee.max?e.max:t)e.max?e.max:t)e.max?e.max:t) '+_.parseProjectName(t)+'

    '+t+"

    ",k.confirm({content:e,title:"프로젝트 열기",ok:"확인",cancel:"취소",isTop:!0,closeButton:!1}).then(i,function(){void 0,n&&n()})):i()},openTemplate:function(e){a(e)},openComponent:function(e){r(e)},openSharedAsset:function(e){c(e)}}),e()}function i(){Boolean(E.uid())||$.isOpen()||$.open()}function o(t,e){if(e=e||function(){},!t)return e();if(d)return e();var n;switch(t=(t=t.replace(/\\/g,"/")).replace(/"/g,""),"."+_.parsePath(t).ext){case _.ext2:case _.ext:n=function(e){l(t,0,e)};break;case _.ext_template:n=function(e){a(t,e)};break;case _.ext_component:n=function(e){r(t,e)};break;case _.ext_share:n=function(e){c(t,e)}}if(!n)return e();d=!0,void 0,$.close(),n(function(){d=!1,C(function(){void 0,e()})})}function l(e,t,n){$.open({task:"openProjectFile",path:e},n=n||function(){})}function a(t,n){k.confirm({content:'다음 템플릿을 등록합니다.
    '+t+"
    ",title:"템플릿 등록",ok:"확인",cancel:"취소",isTop:!0,closeButton:!1}).then(function(e){if(n=n||function(){},void 0!==e&&e<1)return n();g.importTemplate({path:t},n)},function(){void 0,n&&n()})}function r(t,n){k.confirm({content:'다음 컴포넌트를 등록합니다.
    '+t+"
    ",title:"컴포넌트 등록",ok:"확인",cancel:"취소",isTop:!0,closeButton:!1}).then(function(e){if(n=n||function(){},void 0!==e&&e<1)return n();g.importComponent({path:t},n)},function(){void 0,n&&n()})}function c(e,t){E.uid()?(t=t||function(){},$.open({task:"openShareFile",path:e},t)):k.alert({content:'열려있는 프로젝트가 없어 공유 에셋 파일을 설치할 수 없습니다.
    '+e+"
    ",title:"공유 에셋 파일 설치",ok:"확인",cancel:"취소",isTop:!0,closeButton:!1}).then(function(){t&&t()},function(e){void 0,t&&t()})}u=!(s=-3),j.inputAllow=function(e,t){if(arguments.length<1)return s;void 0===t?u||(s=e):(s=e,u=t),j.$applyAsync()},j.$watch(function(){return j.inputAllow()},function(e,t){switch(e){case!1:case 0:y.disable(),h.pause();break;case!0:case 1:y.enable(),h.resume();break;case 2:y.enable();break;case 3:h.resume();break;case-2:y.disable();break;case-3:h.pause();break;default:throw new Error("지정되지 않은 값이 할당됨")}}),w.message("Application 설정 중입니다."),void 0,v.disable(),j.inputAllow(0);var s,u,d=!1,e=[],p=(e.push(function(e){n(e)}),e.push(function(e){e=e,window._callFileAssociationName=function(e){if(S.isBusy()||!S.power)b.message("다른 작업이 진행중입니다.
    팝업 창을 닫거나 현재 작업이 완료된 후 다시 실행해 주세요.",{warn:!0,delay:0});else{if(d)return void 0,void b.message("다른 작업이 진행중입니다.
    현재 작업이 완료된 후 다시 실행해 주세요.",{warn:!0,delay:0});0잠시만 기다려 주세요."),C(function(){w.close(1e3),t(d)})}),I.setMessage("새로운 Application이 준비되었습니다.")},p._checkStartApp()})}},new t}e.$inject=["$commandController","$menuCall","$capture","$autoBackup","$key","$fileDrop","$toast","$updater","$openWorkspace","$busy","$rootScope","FileSystem","$notice","$timeout","$applications","$projects","$status","$fontfaceManager"],MODULE.tool.instance.service("$toolBootstrap",e)}(),function(){function e(e,t,n,i,o,l,a,r,c,s){function u(){this.dragConfig={},this.dropConfig={},this._bindHandler={onDragStart:angular.bind(this,this.onDragStart),onDragEnd:angular.bind(this,this.onDragEnd),onDragEnter:angular.bind(this,this.onDragEnter),onDragLeave:angular.bind(this,this.onDragLeave),onDragOver:angular.bind(this,this.onDragOver),onDrop:angular.bind(this,this.onDrop)}}var d,p=d=t.isDragNDropable(),g={};return u.prototype={_bindHandler:void 0,dragConfig:void 0,disable:!1,addDragEvent:function(e){this.removeDragEvent(),this.dragConfig=e||{};e=this.dragConfig.element;e&&(e.attr("draggable","true"),p&&this.dragConfig.id&&(e.on("dragstart",this._bindHandler.onDragStart),e.on("dragend",this._bindHandler.onDragEnd)))},removeDragEvent:function(){var e=this.dragConfig.element;e&&(e.attr("draggable","false"),p&&this.dragConfig.id&&(e.off("dragstart",this._bindHandler.onDragStart),e.off("dragend",this._bindHandler.onDragEnd)))},dataTransfer:function(){if(arguments.length<1)return n.get().dataTransfer();n.get().dataTransfer(arguments[0])},_effectAllowed:"copyMove",_dropEffect:"copyMove",onDragStart:function(e){return e=e.originalEvent||e,this.disable?(e.preventDefault(),e.stopPropagation(),!1):s.checkInputbox(this.dragConfig.element[0])?(e.preventDefault(),!0):(e.dataTransfer.effectAllowed=this._effectAllowed,this.dragConfig.dragStart&&(t={id:this.dragConfig.id},this.dragConfig.dragStart(e,t),this._$applyAsync(this.dragConfig.element)),this.dataTransfer(t),this.setGhostImage(e,t),void a.$apply());var t},_$applyAsync:function(e){e&&e.scope&&((e=e.scope())&&e.$$childHead&&e.$$childHead.$applyAsync())},onDragEnd:function(e){return e&&((e=e.originalEvent||e).preventDefault(),e.stopPropagation()),!this.disable&&(this.dragConfig.dragEnd&&(t=this.dataTransfer(),this.dragConfig.dragEnd(e,t),this._$applyAsync(this.dragConfig.element)),this.dataTransfer(null),this.setGhostImage(),$(document.body)[0].focus(),!0);var t},setGhostImage:function(e,t){var n=this.dragConfig.ghostName;if(n)if(t){var i,o=angular.copy(t.selects),l=(this.dragConfig.ghostSort&&this.dragConfig.ghostSort(o),$("
    "));for(i in o=Array.isArray(o)?o:[o]){var a="string"==typeof o[i]?o[i]:o[i].id;g[a]&&(a=((a=g[a].dragConfig).ghost?a.ghost(a):a.element)[0].cloneNode(!0),$(a).find("[notghost]").remove(),l.append(a))}var r=l[0],c=($(".applicationContainer").append(r),0),s=0;t.ghostOffset&&(c=t.ghostOffset.x||0,s=t.ghostOffset.y||0);t=((t=e.offsetX||e.layerX)||0)+c,c=((c=e.offsetY||e.layerY)||0)+s,s=this.dragConfig.ghostScale;s&&(l.css({transformOrigin:t+"px "+c+"px",transform:"scale("+s+")"}),t*=s,c*=s),e.dataTransfer.setDragImage(r,t,c)}else $("["+n+"]").remove()},dropConfig:void 0,addDropEvent:function(e){this.removeDropEvent(),this.dropConfig=e||{};e=this.dropConfig.element;e&&d&&this.dropConfig.id&&(e.on("dragenter",this._bindHandler.onDragEnter),e.on("dragleave",this._bindHandler.onDragLeave),e.on("dragover",this._bindHandler.onDragOver),e.on("drop",this._bindHandler.onDrop))},removeDropEvent:function(){var e=this.dropConfig.element;e&&d&&this.dropConfig.id&&(e.off("dragenter",this._bindHandler.onDragEnter),e.off("dragleave",this._bindHandler.onDragLeave),e.off("dragover",this._bindHandler.onDragOver),e.off("drop",this._bindHandler.onDrop))},isDropAllowed:function(e){var t=this.dataTransfer();if(t&&t.id===this.dropConfig.id){if(this.dropConfig.isDropAllowed)if(!this.dropConfig.isDropAllowed(t))return!1;return t}},onDragEnter:function(e){return(e=e.originalEvent||e).preventDefault(),e.stopPropagation(),!this.disable&&(t=this.isDropAllowed(e))?(e.dataTransfer.dropEffect=this._dropEffect,void(this.dropConfig.dragEnter&&(!1===this.dropConfig.dragEnter(e,t)&&(e.dataTransfer.dropEffect="none"),this._$applyAsync(this.dropConfig.element)))):!(e.dataTransfer.dropEffect="none");var t},onDragOver:function(e){return(e=e.originalEvent||e).preventDefault(),e.stopPropagation(),!this.disable&&(t=this.isDropAllowed(e))?(e.dataTransfer.dropEffect=this._dropEffect,void(this.dropConfig.dragOver&&(!1===this.dropConfig.dragOver(e,t)&&(e.dataTransfer.dropEffect="none"),this._$applyAsync(this.dropConfig.element)))):!(e.dataTransfer.dropEffect="none");var t},onDragLeave:function(e){if(e=e.originalEvent||e,this.disable)return!1;e.preventDefault(),e.stopPropagation();var t=this.isDropAllowed(e);if(!t)return!1;this.dropConfig.dragLeave&&(this.dropConfig.dragLeave(e,t),this._$applyAsync(this.dropConfig.element))},onDrop:function(e){if(e=e.originalEvent||e,this.disable)return!1;e.preventDefault(),e.stopPropagation();var t=this.isDropAllowed(e);if(!t)return!1;this.dropConfig.drop&&(this.dropConfig.drop(e,t),this._$applyAsync(this.dropConfig.element))}},e.create("DragNDropService",{disable:function(e,t){if(e){e=g[e];if(e)return arguments.length<2?e.disable:void(e.disable=t)}else void 0},create:function(e){g[e]||(g[e]=new u)},remove:function(e){g[e]&&delete g[e]},getDragConfig:function(e){e=g[e];if(e)return e.dragConfig},getDropConfig:function(e){e=g[e];if(e)return e.dropConfig},addDragEvent:function(e,t){e=g[e];e&&e.addDragEvent(t)},removeDragEvent:function(e){e=g[e];e&&e.removeDragEvent()},addDropEvent:function(e,t){e=g[e];e&&e.addDropEvent(t)},removeDropEvent:function(e){e=g[e];e&&e.removeDropEvent()}})}e.$inject=["$superClass","$device","$applications","$selects","$commandController","$documents","$rootScope","$mask","$document","$key"];var t=MODULE.tool.instance;t.factory("DragNDropService",e),t.service("$dragNDropService",["DragNDropService",function(e){return new e}])}(),function(){function e(c,s){return{set:function(i){var o=i.uid||"",l=void 0===i.deleteConnection||i.deleteConnection,a=this,e=(window[o]=function(e){var t,n;t=e,l?delete window[o]:((n=t.console).log("%c# HTML Element Debuger","color:green;font-size:1.5em;font-weight:bold;"),n.log("%c# 전달된 속성값 (window.scope) : ","color:green;",t.scope)),i.set&&i.set(t),n=a._code2Html_usingTemplate(i),a._injection_usingTemplate(t,n),i.onRendering&&i.onRendering(e)},i.iframe),t="&protectCode=",n=(e&&e.hasAttribute("playground-view")?t+="0":t+=window.$$__isEditTool||window.$$__isCaptureSamplePage?1:0,(new Date).getTime()),r=i.src||"",t="?uid="+i.uid+t+"&_cachetime="+n;return r=s.usePreviewServer.htmlElementCapture?(n="http://localhost:"+c.getLocalServerPort(),r.replace(c.PROJECT_ROOT_MARKER,n)):c.pathToActual(r),e&&(e.src=c.getAvailableSRC(r)+t),r+t},_code2Html_usingTemplate:function(e){var t=e.code||{},e=e.exceptScript||!1,n=t.css||"",i=t.html||"",e=e?"":t.js||"",t=window.$$__isEditTool;return t?{baseURL:"../../",css:c.exportRootToPath(n,"")||n,html:c.exportRootToPath(i,"")||i,js:c.exportRootToPath(e,"")||e}:{baseURL:"../../",css:n,html:i,js:e}},_injection_usingTemplate:function(e,t){var n,i,o,l,e=e.document;o=e,i=t.baseURL,(l=o.getElementsByTagName("base")[0])?l.setAttribute("href",i):(l=o.createElement("base"),(n=o.createAttribute("href")).value=i,l.setAttributeNode(n)),o.head.appendChild(l),i=e,(n=t.css)&&((o=i.createElement("style")).innerHTML=n,i.head.appendChild(o)),l=e,(i=t.html)&&l.write(i),o=e,(l=t.js)&&o.write(l="