{"version":3,"file":"ckeditor.js","sources":["webpack://InlineEditor/ckeditor.js"],"sourcesContent":["/*!\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n(function(t){const e=t[\"ko\"]=t[\"ko\"]||{};e.dictionary=Object.assign(e.dictionary||{},{\"%0 of %1\":\"0% / %1\",\"Align cell text to the bottom\":\"\",\"Align cell text to the center\":\"\",\"Align cell text to the left\":\"\",\"Align cell text to the middle\":\"\",\"Align cell text to the right\":\"\",\"Align cell text to the top\":\"\",\"Align center\":\"가운데 정렬\",\"Align left\":\"왼쪽 정렬\",\"Align right\":\"오른쪽 정렬\",\"Align table to the left\":\"\",\"Align table to the right\":\"\",Alignment:\"\",Aquamarine:\"연한 청록색\",Background:\"\",Big:\"큰\",Black:\"검은색\",\"Block quote\":\"인용 단락\",Blue:\"파랑색\",\"Blue marker\":\"파란색 마커\",Bold:\"굵게\",Border:\"\",\"Bulleted List\":\"불릿 목록\",Cancel:\"취소\",\"Cannot upload file:\":\"파일 업로드할 수 없음: \",\"Cell properties\":\"\",\"Center table\":\"\",\"Centered image\":\"가운데 정렬\",\"Change image text alternative\":\"대체 문구 변경\",\"Choose heading\":\"제목 선택\",Color:\"\",\"Color picker\":\"\",Column:\"\",\"Could not insert image at the current position.\":\"현재 위치에 사진을 삽입할 수 없습니다.\",\"Could not obtain resized image URL.\":\"크기가 조절된 사진의 URL을 가져오지 못했습니다.\",Dashed:\"\",\"Decrease indent\":\"들여쓰기 줄이기\",Default:\"기본\",\"Delete column\":\"\",\"Delete row\":\"\",\"Dim grey\":\"진한 회색\",Dimensions:\"\",\"Document colors\":\"문서 색깔들\",Dotted:\"\",Double:\"\",Downloadable:\"다운로드 가능\",\"Dropdown toolbar\":\"드롭다운 툴바\",\"Edit block\":\"편집 영역\",\"Edit link\":\"링크 편집\",\"Editor toolbar\":\"에디터 툴바\",\"Enter image caption\":\"사진 설명을 입력하세요\",\"Font Background Color\":\"글자 배경 색깔\",\"Font Color\":\"글자 색깔\",\"Font Family\":\"글꼴 집합\",\"Font Size\":\"글자 크기\",\"Full size image\":\"꽉 찬 크기\",Green:\"초록색\",\"Green marker\":\"초록색 마커\",\"Green pen\":\"초록색 펜\",Grey:\"회색\",Groove:\"\",\"Header column\":\"\",\"Header row\":\"\",Heading:\"제목\",\"Heading 1\":\"제목 1\",\"Heading 2\":\"제목 2\",\"Heading 3\":\"제목 3\",\"Heading 4\":\"제목 4\",\"Heading 5\":\"제목 5\",\"Heading 6\":\"제목 6\",Height:\"\",Highlight:\"강조\",\"Horizontal line\":\"수평선\",\"Horizontal text alignment toolbar\":\"\",Huge:\"매우 큰\",\"Image resize list\":\"사진 크기 목록\",\"Image toolbar\":\"사진 툴바\",\"image widget\":\"사진 위젯\",\"Increase indent\":\"들여쓰기 늘리기\",\"Insert column left\":\"\",\"Insert column right\":\"\",\"Insert image\":\"사진 삽입\",\"Insert image or file\":\"사진이나 파일을 삽입\",\"Insert media\":\"미디어 삽입\",\"Insert paragraph after block\":\"\",\"Insert paragraph before block\":\"\",\"Insert row above\":\"\",\"Insert row below\":\"\",\"Insert table\":\"테이블 삽입\",\"Inserting image failed\":\"사진 삽입 실패\",Inset:\"\",Italic:\"기울임꼴\",Justify:\"양쪽 정렬\",\"Justify cell text\":\"\",\"Left aligned image\":\"왼쪽 정렬\",\"Light blue\":\"연한 파랑색\",\"Light green\":\"밝은 초록색\",\"Light grey\":\"밝은 회색\",Link:\"링크\",\"Link URL\":\"링크 주소\",\"Media URL\":\"미디어 URL\",\"media widget\":\"미디어 위젯\",\"Merge cell down\":\"\",\"Merge cell left\":\"\",\"Merge cell right\":\"\",\"Merge cell up\":\"\",\"Merge cells\":\"\",Next:\"다음\",None:\"\",\"Numbered List\":\"번호 목록\",\"Open in a new tab\":\"새 탭에서 열기\",\"Open link in new tab\":\"새 탭에서 링크 열기\",Orange:\"주황색\",Original:\"원본\",Outset:\"\",Padding:\"\",Paragraph:\"문단\",\"Paste the media URL in the input.\":\"미디어의 URL을 입력해주세요.\",\"Pink marker\":\"분홍색 마커\",Previous:\"이전\",Purple:\"보라색\",Red:\"빨간색\",\"Red pen\":\"빨간색 펜\",Redo:\"다시 실행\",\"Remove color\":\"색깔 제거\",\"Remove highlight\":\"강조 제거\",\"Resize image\":\"사진 크기 조절\",\"Resize image to %0\":\"사진의 크기를 %0으로 조절\",\"Resize image to the original size\":\"사진을 원래 크기로 돌려놓기\",\"Rich Text Editor\":\"리치 텍스트 편집기\",\"Rich Text Editor, %0\":\"리치 텍스트 편집기, %0\",Ridge:\"\",\"Right aligned image\":\"오른쪽 정렬\",Row:\"\",Save:\"저장\",\"Select column\":\"\",\"Select row\":\"\",\"Selecting resized image failed\":\"크기가 조절된 이미지 선택 실패\",\"Show more items\":\"더보기\",\"Side image\":\"본문 옆에 배치\",Small:\"작은\",Solid:\"\",\"Split cell horizontally\":\"\",\"Split cell vertically\":\"\",Style:\"\",\"Table alignment toolbar\":\"\",\"Table cell text alignment\":\"\",\"Table properties\":\"\",\"Table toolbar\":\"\",\"Text alignment\":\"텍스트 정렬\",\"Text alignment toolbar\":\"텍스트 정렬 툴바\",\"Text alternative\":\"대체 문구\",\"Text highlight toolbar\":\"글자 강조 툴바\",'The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".':\"\",\"The URL must not be empty.\":\"URL이 비어있을 수 없습니다.\",'The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".':\"\",\"This link has no URL\":\"이 링크에는 URL이 없습니다.\",\"This media URL is not supported.\":\"이 미디어 URL은 지원되지 않습니다.\",Tiny:\"매우 작은\",\"Tip: Paste the URL into the content to embed faster.\":\"팁: URL을 붙여넣기하면 더 빨리 삽입할 수 있습니다.\",Turquoise:\"청록색\",Undo:\"실행 취소\",Unlink:\"링크 삭제\",\"Upload failed\":\"업로드 실패\",\"Upload in progress\":\"업로드 진행 중\",\"Vertical text alignment toolbar\":\"\",White:\"흰색\",\"Widget toolbar\":\"위젯 툴바\",Width:\"\",Yellow:\"노랑색\",\"Yellow marker\":\"노란색 마커\"});e.getPluralForm=function(t){return 0}})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));(function t(e,n){if(typeof exports===\"object\"&&typeof module===\"object\")module.exports=n();else if(typeof define===\"function\"&&define.amd)define([],n);else if(typeof exports===\"object\")exports[\"InlineEditor\"]=n();else e[\"InlineEditor\"]=n()})(window,(function(){return function(t){var e={};function n(o){if(e[o]){return e[o].exports}var i=e[o]={i:o,l:false,exports:{}};t[o].call(i.exports,i,i.exports,n);i.l=true;return i.exports}n.m=t;n.c=e;n.d=function(t,e,o){if(!n.o(t,e)){Object.defineProperty(t,e,{enumerable:true,get:o})}};n.r=function(t){if(typeof Symbol!==\"undefined\"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"})}Object.defineProperty(t,\"__esModule\",{value:true})};n.t=function(t,e){if(e&1)t=n(t);if(e&8)return t;if(e&4&&typeof t===\"object\"&&t&&t.__esModule)return t;var o=Object.create(null);n.r(o);Object.defineProperty(o,\"default\",{enumerable:true,value:t});if(e&2&&typeof t!=\"string\")for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o};n.n=function(t){var e=t&&t.__esModule?function e(){return t[\"default\"]}:function e(){return t};n.d(e,\"a\",e);return e};n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};n.p=\"\";return n(n.s=71)}([function(t,e,n){\"use strict\";n.d(e,\"a\",(function(){return i}));n.d(e,\"b\",(function(){return r}));const o=\"https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html\";class i extends Error{constructor(t,e,n){const o=`${t}${n?` ${JSON.stringify(n)}`:\"\"}${a(t)}`;super(o);this.name=\"CKEditorError\";this.context=e;this.data=n}is(t){return t===\"CKEditorError\"}static rethrowUnexpectedError(t,e){if(t.is&&t.is(\"CKEditorError\")){throw t}const n=new i(t.message,e);n.stack=t.stack;throw n}}function r(t,e){console.warn(...c(t,e))}function s(t,e){console.error(...c(t,e))}function a(t){return`\\nRead more: ${o}#error-${t}`}function c(t,e){const n=a(t);return e?[t,e,n]:[t,n]}},function(t,e,n){\"use strict\";var o=function t(){var e;return function t(){if(typeof e===\"undefined\"){e=Boolean(window&&document&&document.all&&!window.atob)}return e}}();var i=function t(){var e={};return function t(n){if(typeof e[n]===\"undefined\"){var o=document.querySelector(n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement){try{o=o.contentDocument.head}catch(t){o=null}}e[n]=o}return e[n]}}();var r=[];function s(t){var e=-1;for(var n=0;n
\").replace(/\\r?\\n/g,\"
\").replace(/^\\s/,\" \").replace(/\\s$/,\" \").replace(/\\s\\s/g,\" \");if(t.includes(\"
\")||t.includes(\"
\")){t=`
${t}
`}return t}function Ev(t){return t.replace(/(\\s+)<\\/span>/g,((t,e)=>{if(e.length==1){return\" \"}return e}))}const Dv=[\"figcaption\",\"li\"];function Tv(t){let e=\"\";if(t.is(\"$text\")||t.is(\"$textProxy\")){e=t.data}else if(t.is(\"element\",\"img\")&&t.hasAttribute(\"alt\")){e=t.getAttribute(\"alt\")}else if(t.is(\"element\",\"br\")){e=\"\\n\"}else{let n=null;for(const o of t.getChildren()){const t=Tv(o);if(n&&(n.is(\"containerElement\")||o.is(\"containerElement\"))){if(Dv.includes(n.name)||Dv.includes(o.name)){e+=\"\\n\"}else{e+=\"\\n\\n\"}}e+=t;n=o}}return e}class Mv extends jn{static get pluginName(){return\"Clipboard\"}static get requires(){return[yv]}init(){const t=this.editor;const e=t.model.document;const n=t.editing.view;const o=n.document;n.addObserver(_v);this.listenTo(o,\"clipboardInput\",(e=>{if(t.isReadOnly){e.stop()}}),{priority:\"highest\"});this.listenTo(o,\"clipboardInput\",((t,e)=>{const o=e.dataTransfer;let i=\"\";if(o.getData(\"text/html\")){i=Ev(o.getData(\"text/html\"))}else if(o.getData(\"text/plain\")){i=xv(o.getData(\"text/plain\"))}i=this.editor.data.htmlProcessor.toView(i);const s=new r(this,\"inputTransformation\");this.fire(s,{content:i,dataTransfer:o,asPlainText:e.asPlainText});if(s.stop.called){t.stop()}n.scrollToTheSelection()}),{priority:\"low\"});this.listenTo(this,\"inputTransformation\",((t,e)=>{if(!e.content.isEmpty){const n=this.editor.data;const o=this.editor.model;const i=n.toModel(e.content,\"$clipboardHolder\");if(i.childCount==0){return}o.change((t=>{const n=o.document.selection;if(e.asPlainText||Sv(i,o.schema)){const e=Array.from(n.getAttributes()).filter((([t])=>o.schema.getAttributeProperties(t).isFormatting));if(!n.isCollapsed){o.deleteContent(n,{doNotAutoparagraph:true})}e.push(...n.getAttributes());const r=t.createRangeIn(i);for(const n of r.getItems()){if(n.is(\"$text\")||n.is(\"$textProxy\")){t.setAttributes(e,n)}}}o.insertContent(i)}));t.stop()}}),{priority:\"low\"});function i(n,i){const r=i.dataTransfer;i.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));o.fire(\"clipboardOutput\",{dataTransfer:r,content:s,method:n.name})}this.listenTo(o,\"copy\",i,{priority:\"low\"});this.listenTo(o,\"cut\",((e,n)=>{if(t.isReadOnly){n.preventDefault()}else{i(e,n)}}),{priority:\"low\"});this.listenTo(o,\"clipboardOutput\",((n,o)=>{if(!o.content.isEmpty){o.dataTransfer.setData(\"text/html\",this.editor.data.htmlProcessor.toData(o.content));o.dataTransfer.setData(\"text/plain\",Tv(o.content))}if(o.method==\"cut\"){t.model.deleteContent(e.selection)}}),{priority:\"low\"})}}function Sv(t,e){if(t.childCount>1){return false}const n=t.getChild(0);if(e.isObject(n)){return false}return[...n.getAttributeKeys()].length==0}class Iv extends Vn{constructor(t){super(t);this._stack=[];this._createdBatches=new WeakSet;this.refresh();this.listenTo(t.data,\"set\",(()=>this.clearStack()))}refresh(){this.isEnabled=this._stack.length>0}addBatch(t){const e=this.editor.model.document.selection;const n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n});this.refresh()}clearStack(){this._stack=[];this.refresh()}_restoreSelection(t,e,n){const o=this.editor.model;const i=o.document;const r=[];const s=t.map((t=>t.getTransformedByOperations(n)));const a=s.flat();for(const t of s){const e=t.filter((t=>t.root!=i.graveyard)).filter((t=>!Bv(t,a)));if(!e.length){continue}Nv(e);r.push(e[0])}if(r.length){o.change((t=>{t.setSelection(r,{backward:e})}))}}_undo(t,e){const n=this.editor.model;const o=n.document;this._createdBatches.add(e);const i=t.operations.slice().filter((t=>t.isDocumentOperation));i.reverse();for(const t of i){const i=t.baseVersion+1;const r=Array.from(o.history.getOperations(i));const s=i_([t.getReversed()],r,{useRelations:true,document:this.editor.model.document,padWithNoOps:false,forceWeakRemove:true});const a=s.operationsA;for(const i of a){e.addOperation(i);n.applyOperation(i);o.history.setOperationAsUndone(t,i)}}}}function Nv(t){t.sort(((t,e)=>t.start.isBefore(e.start)?-1:1));for(let e=1;e