@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240311.0 → 0.0.0-nightly-20240313.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),o=r(260);class i extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(n=>{const i=t.commands.get("importWord"),s=new o.FileDialogButtonView(n),a=new e.SpinnerView;return s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),a.bind("isVisible").to(i,"isBusy"),s.buttonView.iconView.bind("isVisible").to(i,"isBusy",(t=>!t)),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var s=r(331),a=r(783),p=r(584);class c extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const n=new DataTransfer;n.setData("text/html",r.html);const o=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(o),t.editing.view.document.fire("clipboardInput",{dataTransfer:n})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),n={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(n).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,n=(0,p.first)(r.getSelectedBlocks());return!!n&&e.checkChild(n.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const n=r.getFirstPosition(),o=(0,p.first)(r.getSelectedBlocks());let i;i=o.is("element","paragraph")&&o.isEmpty?n:n.isAtStart?e.createPositionBefore(o):n.isAtEnd?e.createPositionAfter(o):t.split(n).position,this._importMarker=t.addMarker("importWord:"+(0,p.uid)(),{usingOperation:!1,affectsData:!1,range:new a.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const n=this.editor.plugins.get("ImportWordEditing").getToken(),o=new FormData;o.set("config",JSON.stringify(r)),o.set("file",e);const i={method:"POST",headers:{},body:o,signal:this._abortController.signal};return n&&(i.headers.Authorization=n.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,p.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,p.logError)("import-word-plugin-conversion-failed")}}const l=d;function d(t,e){const r=u();return(d=function(t,e){return r[t-=309]})(t,e)}function u(){const t=["5895TUjGxV","ImportWordEditing","get","pluginName","8kTpnhX","editor","2789941YvEhhq","12Xvonhs","commands","3392541LvTAih","2aHZHWZ","20698447VmaJcK","token","1047646LSWyPA","_token","registerTokenUrl","6040jDRdEc","getToken","define","inline","add","cloudServices","https://docx-converter.cke-cs.com/v2/convert/docx-html","init","importWord","none","5687514XIASZn","CloudServices","5pNSzJf","requires","plugins","859148kgWsfQ","config","tokenUrl"];return(u=function(){return t})()}!function(t,e){const r=d,n=t();for(;;)try{if(665339===parseInt(r(324))/1+-parseInt(r(321))/2*(-parseInt(r(320))/3)+-parseInt(r(342))/4*(-parseInt(r(339))/5)+parseInt(r(337))/6+parseInt(r(317))/7*(-parseInt(r(315))/8)+-parseInt(r(311))/9*(parseInt(r(327))/10)+parseInt(r(322))/11*(-parseInt(r(318))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(u);class h extends t.Plugin{static get[l(314)](){return l(312)}static get[l(340)](){const t=l;return[e.Notification,s.ClipboardPipeline,t(338)]}constructor(t){const e=l;super(t),this[e(325)]=null}async[l(334)](){const t=l,e=this[t(316)];e[t(309)][t(329)](t(335),{converterUrl:t(333),tokenUrl:(e[t(309)][t(313)](t(332))||{})[t(310)],formatting:{resets:t(336),defaults:t(336),styles:t(330)}}),e[t(319)][t(331)](t(335),new c(e));const{tokenUrl:r}=e[t(309)][t(313)](t(335));if(r){const{tokenUrl:n}=e[t(309)][t(313)](t(332))||{};this[t(325)]=r===n?e[t(341)][t(313)](t(338))[t(323)]:await e[t(341)][t(313)](t(338))[t(326)](r)}}[l(328)](){return this[l(325)]}}function m(){var t=["pluginName","8770670xEhzGB","6233472szRFDw","2776232xtvEIx","123345DSxCbS","ImportWord","6rajppj","requires","3056950jHBtOE","5596367aAVJtH","275117TqSeQa"];return(m=function(){return t})()}var f=g;function g(t,e){var r=m();return(g=function(t,e){return r[t-=251]})(t,e)}!function(t,e){for(var r=g,n=t();;)try{if(893963===parseInt(r(254))/1+parseInt(r(252))/2+parseInt(r(259))/3+-parseInt(r(257))/4+parseInt(r(256))/5+parseInt(r(261))/6*(-parseInt(r(253))/7)+-parseInt(r(258))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(m);class I extends t.Plugin{static get[f(255)](){return f(260)}static get[f(251)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=400]})(t,e)}function b(){var t=["963216KQNwAE","217869rxnlnr","1260336MhQQLi","6151080PEOHZU","527268BDYGPU","1565vsVREQ","104839xxiWDp","10DwwNuB","2396MmYfgl","9WBBUtt"];return(b=function(){return t})()}!function(t,e){for(var r=v,n=t();;)try{if(183675===parseInt(r(408))/1+parseInt(r(409))/2*(-parseInt(r(403))/3)+parseInt(r(400))/4*(-parseInt(r(407))/5)+parseInt(r(404))/6+-parseInt(r(406))/7+-parseInt(r(402))/8*(parseInt(r(401))/9)+parseInt(r(405))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=n})();
5
+ */(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{ImportWord:()=>I,ImportWordEditing:()=>u,ImportWordUI:()=>i});var t=r(782),e=r(311),n=r(260);class i extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(o=>{const i=t.commands.get("importWord"),s=new n.FileDialogButtonView(o),a=new e.SpinnerView;return s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),a.bind("isVisible").to(i,"isBusy"),s.buttonView.iconView.bind("isVisible").to(i,"isBusy",(t=>!t)),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var s=r(331),a=r(783),c=r(584);class p extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const o=new DataTransfer;o.setData("text/html",r.html);const n=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(n),t.editing.view.document.fire("clipboardInput",{dataTransfer:o})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),o={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(o).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,o=(0,c.first)(r.getSelectedBlocks());return!!o&&e.checkChild(o.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const o=r.getFirstPosition(),n=(0,c.first)(r.getSelectedBlocks());let i;i=n.is("element","paragraph")&&n.isEmpty?o:o.isAtStart?e.createPositionBefore(n):o.isAtEnd?e.createPositionAfter(n):t.split(o).position,this._importMarker=t.addMarker("importWord:"+(0,c.uid)(),{usingOperation:!1,affectsData:!1,range:new a.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const o=this.editor.plugins.get("ImportWordEditing").getToken(),n=new FormData;n.set("config",JSON.stringify(r)),n.set("file",e);const i={method:"POST",headers:{},body:n,signal:this._abortController.signal};return o&&(i.headers.Authorization=o.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,c.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,c.logError)("import-word-plugin-conversion-failed")}}function l(t,e){const r=h();return(l=function(t,e){return r[t-=412]})(t,e)}const d=l;!function(t,e){const r=l,o=t();for(;;)try{if(629418===-parseInt(r(427))/1*(-parseInt(r(436))/2)+-parseInt(r(424))/3+-parseInt(r(431))/4*(-parseInt(r(421))/5)+parseInt(r(417))/6+parseInt(r(415))/7*(-parseInt(r(412))/8)+parseInt(r(430))/9+-parseInt(r(438))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(h);class u extends t.Plugin{static get[d(416)](){return d(414)}static get[d(413)](){const t=d;return[e.Notification,s.ClipboardPipeline,t(433)]}constructor(t){const e=d;super(t),this[e(418)]=null}async[d(441)](){const t=d,e=this[t(419)];e[t(422)][t(428)](t(432),{converterUrl:t(434),tokenUrl:(e[t(422)][t(440)](t(437))||{})[t(442)],formatting:{resets:t(439),defaults:t(439),styles:t(435)}}),e[t(429)][t(420)](t(432),new p(e));const{tokenUrl:r}=e[t(422)][t(440)](t(432));if(r){const{tokenUrl:o}=e[t(422)][t(440)](t(437))||{};this[t(418)]=r===o?e[t(426)][t(440)](t(433))[t(423)]:await e[t(426)][t(440)](t(433))[t(425)](r)}}[d(443)](){return this[d(418)]}}function h(){const t=["2968317uJAkcF","registerTokenUrl","plugins","71IGuQNI","define","commands","8351226YttQVj","1228PxjSsE","importWord","CloudServices","https://docx-converter.cke-cs.com/v2/convert/docx-html","inline","17270MEyYHI","cloudServices","1165040FgGCsw","none","get","init","tokenUrl","getToken","8ggvqjs","requires","ImportWordEditing","6321273LgffYy","pluginName","3640890woCPJL","_token","editor","add","7990LZafyD","config","token"];return(h=function(){return t})()}var m=f;function f(t,e){var r=g();return(f=function(t,e){return r[t-=451]})(t,e)}function g(){var t=["3740406fKtjWF","3063860XweeYf","10ahmZmF","1857213JJpzxX","7hnDnIo","ImportWord","789813zqgNRg","pluginName","587781pIRetS","requires","3978000VLzeNw","2BxSKlW","1637872oeouPb"];return(g=function(){return t})()}!function(t,e){for(var r=f,o=t();;)try{if(562449===-parseInt(r(455))/1+-parseInt(r(460))/2*(-parseInt(r(452))/3)+parseInt(r(463))/4+-parseInt(r(459))/5+-parseInt(r(462))/6*(-parseInt(r(453))/7)+parseInt(r(461))/8+-parseInt(r(457))/9*(parseInt(r(451))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(g);class I extends t.Plugin{static get[m(456)](){return m(454)}static get[m(458)](){return[u,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=235]})(t,e)}function b(){var t=["846185SlGZSy","17142rFnzuK","3400148ySBCsd","662720NVQgpX","10mZeWyy","224JaEDsa","118359bvOHuR","2395550hQWbbI","28424403DNTCHE"];return(b=function(){return t})()}!function(t,e){for(var r=v,o=t();;)try{if(611406===-parseInt(r(237))/1+-parseInt(r(241))/2*(parseInt(r(243))/3)+-parseInt(r(239))/4+-parseInt(r(235))/5+-parseInt(r(238))/6*(parseInt(r(242))/7)+-parseInt(r(240))/8+parseInt(r(236))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=o})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-import-word",
3
- "version": "0.0.0-nightly-20240311.0",
3
+ "version": "0.0.0-nightly-20240313.0",
4
4
  "description": "Import from Word feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -30,7 +30,7 @@
30
30
  "type": "module",
31
31
  "main": "src/index.js",
32
32
  "dependencies": {
33
- "ckeditor5": "0.0.0-nightly-20240311.0"
33
+ "ckeditor5": "0.0.0-nightly-20240313.0"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (https://cksource.com/)",
package/src/importword.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x3452(){var _0x4d4afb=['pluginName','8770670xEhzGB','6233472szRFDw','2776232xtvEIx','123345DSxCbS','ImportWord','6rajppj','requires','3056950jHBtOE','5596367aAVJtH','275117TqSeQa'];_0x3452=function(){return _0x4d4afb;};return _0x3452();}var _0xfb3f0b=_0x4bf5;(function(_0x297cea,_0x1b05df){var _0x2aa2e8=_0x4bf5,_0x4d06f5=_0x297cea();while(!![]){try{var _0x396ca1=parseInt(_0x2aa2e8(0xfe))/0x1+parseInt(_0x2aa2e8(0xfc))/0x2+parseInt(_0x2aa2e8(0x103))/0x3+-parseInt(_0x2aa2e8(0x101))/0x4+parseInt(_0x2aa2e8(0x100))/0x5+parseInt(_0x2aa2e8(0x105))/0x6*(-parseInt(_0x2aa2e8(0xfd))/0x7)+-parseInt(_0x2aa2e8(0x102))/0x8;if(_0x396ca1===_0x1b05df)break;else _0x4d06f5['push'](_0x4d06f5['shift']());}catch(_0x444623){_0x4d06f5['push'](_0x4d06f5['shift']());}}}(_0x3452,0xda40b));import{Plugin as _0x44cbb9}from'ckeditor5/src/core.js';function _0x4bf5(_0x1a42ec,_0x5a1b84){var _0x34522d=_0x3452();return _0x4bf5=function(_0x4bf567,_0x4b55f2){_0x4bf567=_0x4bf567-0xfb;var _0x58e0d4=_0x34522d[_0x4bf567];return _0x58e0d4;},_0x4bf5(_0x1a42ec,_0x5a1b84);}import _0x2c5f49 from'./importwordui.js';import _0xfdefad from'./importwordediting.js';export default class i extends _0x44cbb9{static get[_0xfb3f0b(0xff)](){var _0x36352a=_0xfb3f0b;return _0x36352a(0x104);}static get[_0xfb3f0b(0xfb)](){return[_0xfdefad,_0x2c5f49];}}
23
+ var _0x5da0c4=_0x36ae;(function(_0x271d41,_0x134ca2){var _0x389f10=_0x36ae,_0x26ea37=_0x271d41();while(!![]){try{var _0x3ee4e4=-parseInt(_0x389f10(0x1c7))/0x1+-parseInt(_0x389f10(0x1cc))/0x2*(-parseInt(_0x389f10(0x1c4))/0x3)+parseInt(_0x389f10(0x1cf))/0x4+-parseInt(_0x389f10(0x1cb))/0x5+-parseInt(_0x389f10(0x1ce))/0x6*(-parseInt(_0x389f10(0x1c5))/0x7)+parseInt(_0x389f10(0x1cd))/0x8+-parseInt(_0x389f10(0x1c9))/0x9*(parseInt(_0x389f10(0x1c3))/0xa);if(_0x3ee4e4===_0x134ca2)break;else _0x26ea37['push'](_0x26ea37['shift']());}catch(_0x367926){_0x26ea37['push'](_0x26ea37['shift']());}}}(_0x1af3,0x89511));import{Plugin as _0x357556}from'ckeditor5/src/core.js';function _0x36ae(_0x457c71,_0x4abd7a){var _0x1af311=_0x1af3();return _0x36ae=function(_0x36ae6e,_0x4a76ff){_0x36ae6e=_0x36ae6e-0x1c3;var _0xf5435f=_0x1af311[_0x36ae6e];return _0xf5435f;},_0x36ae(_0x457c71,_0x4abd7a);}import _0x4d35d0 from'./importwordui.js';function _0x1af3(){var _0x4dd120=['3740406fKtjWF','3063860XweeYf','10ahmZmF','1857213JJpzxX','7hnDnIo','ImportWord','789813zqgNRg','pluginName','587781pIRetS','requires','3978000VLzeNw','2BxSKlW','1637872oeouPb'];_0x1af3=function(){return _0x4dd120;};return _0x1af3();}import _0x87fbad from'./importwordediting.js';export default class i extends _0x357556{static get[_0x5da0c4(0x1c8)](){var _0x533421=_0x5da0c4;return _0x533421(0x1c6);}static get[_0x5da0c4(0x1ca)](){return[_0x87fbad,_0x4d35d0];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x3f02a9}from'ckeditor5/src/core.js';import{Range as _0x37c9a1}from'ckeditor5/src/engine.js';import{logWarning as _0x530db6,logError as _0x2e55bc,first as _0x5a1ff3,uid as _0x32d493}from'ckeditor5/src/utils.js';export default class d extends _0x3f02a9{constructor(_0x5d151f){super(_0x5d151f),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x3900ff,_0x104480)=>{const _0x225597=new DataTransfer();_0x225597['setData']('text/html',_0x104480['html']);const _0x30f7b9=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0xf7d9a0=>{this['_importMarker']['stopListening'](),_0xf7d9a0['setSelection'](_0x30f7b9),_0x5d151f['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x225597});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4a4322,_0x43334d={}){if(this['isBusy'])return Promise['resolve']();const _0x3a99b2=this['editor']['config']['get']('importWord'),_0x216a6d={'url':_0x3a99b2['converterUrl'],'file':_0x4a4322,'serviceConfig':{..._0x43334d,'formatting':_0x3a99b2['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x216a6d)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x19890d=this['editor']['model'],_0x35032d=_0x19890d['schema'],_0x45d2d1=_0x19890d['document']['selection'],_0x18808c=_0x5a1ff3(_0x45d2d1['getSelectedBlocks']());return!!_0x18808c&&_0x35032d['checkChild'](_0x18808c['parent'],'paragraph');}['_prepareForImport'](){const _0x4a7aec=this['editor'],_0x1eec3f=_0x4a7aec['model'],_0x5350ac=_0x1eec3f['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x4a7aec['model']['createBatch']({'isUndoable':!0x0}),_0x1eec3f['enqueueChange'](this['_undoStepBatch'],_0xc10323=>{_0x5350ac['isCollapsed']||_0x1eec3f['deleteContent'](_0x5350ac,{'leaveUnmerged':!0x0});const _0x5cec12=_0x5350ac['getFirstPosition'](),_0x4f81fc=_0x5a1ff3(_0x5350ac['getSelectedBlocks']());let _0x39e125;_0x39e125=_0x4f81fc['is']('element','paragraph')&&_0x4f81fc['isEmpty']?_0x5cec12:_0x5cec12['isAtStart']?_0x1eec3f['createPositionBefore'](_0x4f81fc):_0x5cec12['isAtEnd']?_0x1eec3f['createPositionAfter'](_0x4f81fc):_0xc10323['split'](_0x5cec12)['position'],this['_importMarker']=_0xc10323['addMarker']('importWord:'+_0x32d493(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x37c9a1(_0x39e125)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x53c7b9=this['editor']['model'];_0x53c7b9['markers']['has'](this['_importMarker'])&&_0x53c7b9['enqueueChange'](this['_undoStepBatch'],_0xaed879=>{_0xaed879['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x3c722f,file:_0x15dc9c,serviceConfig:_0x3f03b7}){const _0x14345a=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x31a45e=new FormData();_0x31a45e['set']('config',JSON['stringify'](_0x3f03b7)),_0x31a45e['set']('file',_0x15dc9c);const _0x4800d9={'method':'POST','headers':{},'body':_0x31a45e,'signal':this['_abortController']['signal']};return _0x14345a&&(_0x4800d9['headers']['Authorization']=_0x14345a['value']),fetch(_0x3c722f,_0x4800d9);}['_handleImportResponse'](_0x194de7){return _0x194de7['ok']?_0x194de7['json']()['then'](_0x2151e0=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x2151e0);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x530db6('import-word-plugin-import-cancelled');const _0x3417de=this['editor'],_0x2e875b=(0x0,_0x3417de['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x3417de['plugins']['get']('Notification')['showWarning'](_0x2e875b),_0x2e55bc('import-word-plugin-conversion-failed');}}
23
+ import{Command as _0x12d583}from'ckeditor5/src/core.js';import{Range as _0x503009}from'ckeditor5/src/engine.js';import{logWarning as _0x5f4a6c,logError as _0x549ffc,first as _0x5207ab,uid as _0x557c3f}from'ckeditor5/src/utils.js';export default class d extends _0x12d583{constructor(_0x2d47a1){super(_0x2d47a1),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x1fcbed,_0x3c4003)=>{const _0x22a784=new DataTransfer();_0x22a784['setData']('text/html',_0x3c4003['html']);const _0x42129d=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0xf449e6=>{this['_importMarker']['stopListening'](),_0xf449e6['setSelection'](_0x42129d),_0x2d47a1['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x22a784});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x420dbf,_0x1adff7={}){if(this['isBusy'])return Promise['resolve']();const _0x477269=this['editor']['config']['get']('importWord'),_0x4b6b4c={'url':_0x477269['converterUrl'],'file':_0x420dbf,'serviceConfig':{..._0x1adff7,'formatting':_0x477269['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x4b6b4c)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x4742d8=this['editor']['model'],_0x267d95=_0x4742d8['schema'],_0x4fd9bc=_0x4742d8['document']['selection'],_0x44c8fe=_0x5207ab(_0x4fd9bc['getSelectedBlocks']());return!!_0x44c8fe&&_0x267d95['checkChild'](_0x44c8fe['parent'],'paragraph');}['_prepareForImport'](){const _0x22e403=this['editor'],_0x17ac4e=_0x22e403['model'],_0x266748=_0x17ac4e['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x22e403['model']['createBatch']({'isUndoable':!0x0}),_0x17ac4e['enqueueChange'](this['_undoStepBatch'],_0x9aaef1=>{_0x266748['isCollapsed']||_0x17ac4e['deleteContent'](_0x266748,{'leaveUnmerged':!0x0});const _0x51484f=_0x266748['getFirstPosition'](),_0x487b70=_0x5207ab(_0x266748['getSelectedBlocks']());let _0x5eeb76;_0x5eeb76=_0x487b70['is']('element','paragraph')&&_0x487b70['isEmpty']?_0x51484f:_0x51484f['isAtStart']?_0x17ac4e['createPositionBefore'](_0x487b70):_0x51484f['isAtEnd']?_0x17ac4e['createPositionAfter'](_0x487b70):_0x9aaef1['split'](_0x51484f)['position'],this['_importMarker']=_0x9aaef1['addMarker']('importWord:'+_0x557c3f(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x503009(_0x5eeb76)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x3fca19=this['editor']['model'];_0x3fca19['markers']['has'](this['_importMarker'])&&_0x3fca19['enqueueChange'](this['_undoStepBatch'],_0xc5b362=>{_0xc5b362['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x5dc630,file:_0x54ba4f,serviceConfig:_0x5dd09f}){const _0x5be11b=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x609d36=new FormData();_0x609d36['set']('config',JSON['stringify'](_0x5dd09f)),_0x609d36['set']('file',_0x54ba4f);const _0x15906f={'method':'POST','headers':{},'body':_0x609d36,'signal':this['_abortController']['signal']};return _0x5be11b&&(_0x15906f['headers']['Authorization']=_0x5be11b['value']),fetch(_0x5dc630,_0x15906f);}['_handleImportResponse'](_0x19ec50){return _0x19ec50['ok']?_0x19ec50['json']()['then'](_0x16adc3=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x16adc3);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x5f4a6c('import-word-plugin-import-cancelled');const _0x52a27c=this['editor'],_0x1069a1=(0x0,_0x52a27c['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x52a27c['plugins']['get']('Notification')['showWarning'](_0x1069a1),_0x549ffc('import-word-plugin-conversion-failed');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xe46625=_0x5a02;function _0x5a02(_0x5c845d,_0x14f4e5){const _0x378ce9=_0x378c();return _0x5a02=function(_0x5a0285,_0x2a62b9){_0x5a0285=_0x5a0285-0x135;let _0x3f0ba7=_0x378ce9[_0x5a0285];return _0x3f0ba7;},_0x5a02(_0x5c845d,_0x14f4e5);}(function(_0x4621af,_0x465a2c){const _0x410089=_0x5a02,_0x184dc2=_0x4621af();while(!![]){try{const _0x4b4674=parseInt(_0x410089(0x144))/0x1+-parseInt(_0x410089(0x141))/0x2*(-parseInt(_0x410089(0x140))/0x3)+-parseInt(_0x410089(0x156))/0x4*(-parseInt(_0x410089(0x153))/0x5)+parseInt(_0x410089(0x151))/0x6+parseInt(_0x410089(0x13d))/0x7*(-parseInt(_0x410089(0x13b))/0x8)+-parseInt(_0x410089(0x137))/0x9*(parseInt(_0x410089(0x147))/0xa)+parseInt(_0x410089(0x142))/0xb*(-parseInt(_0x410089(0x13e))/0xc);if(_0x4b4674===_0x465a2c)break;else _0x184dc2['push'](_0x184dc2['shift']());}catch(_0x509360){_0x184dc2['push'](_0x184dc2['shift']());}}}(_0x378c,0xa26fb));import{Plugin as _0x4b97ab}from'ckeditor5/src/core.js';import{Notification as _0x19f9f5}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x26d5b9}from'ckeditor5/src/clipboard.js';function _0x378c(){const _0x5e3c64=['5895TUjGxV','ImportWordEditing','get','pluginName','8kTpnhX','editor','2789941YvEhhq','12Xvonhs','commands','3392541LvTAih','2aHZHWZ','20698447VmaJcK','token','1047646LSWyPA','_token','registerTokenUrl','6040jDRdEc','getToken','define','inline','add','cloudServices','https://docx-converter.cke-cs.com/v2/convert/docx-html','init','importWord','none','5687514XIASZn','CloudServices','5pNSzJf','requires','plugins','859148kgWsfQ','config','tokenUrl'];_0x378c=function(){return _0x5e3c64;};return _0x378c();}import _0x59a134 from'./importwordcommand.js';export default class e extends _0x4b97ab{static get[_0xe46625(0x13a)](){const _0x18b831=_0xe46625;return _0x18b831(0x138);}static get[_0xe46625(0x154)](){const _0x416524=_0xe46625;return[_0x19f9f5,_0x26d5b9,_0x416524(0x152)];}constructor(_0x40516b){const _0x2d510b=_0xe46625;super(_0x40516b),this[_0x2d510b(0x145)]=null;}async[_0xe46625(0x14e)](){const _0x7c4a36=_0xe46625,_0x2857c2=this[_0x7c4a36(0x13c)];_0x2857c2[_0x7c4a36(0x135)][_0x7c4a36(0x149)](_0x7c4a36(0x14f),{'converterUrl':_0x7c4a36(0x14d),'tokenUrl':(_0x2857c2[_0x7c4a36(0x135)][_0x7c4a36(0x139)](_0x7c4a36(0x14c))||{})[_0x7c4a36(0x136)],'formatting':{'resets':_0x7c4a36(0x150),'defaults':_0x7c4a36(0x150),'styles':_0x7c4a36(0x14a)}}),_0x2857c2[_0x7c4a36(0x13f)][_0x7c4a36(0x14b)](_0x7c4a36(0x14f),new _0x59a134(_0x2857c2));const {tokenUrl:_0x34163d}=_0x2857c2[_0x7c4a36(0x135)][_0x7c4a36(0x139)](_0x7c4a36(0x14f));if(_0x34163d){const {tokenUrl:_0x2c87f0}=_0x2857c2[_0x7c4a36(0x135)][_0x7c4a36(0x139)](_0x7c4a36(0x14c))||{};this[_0x7c4a36(0x145)]=_0x34163d===_0x2c87f0?_0x2857c2[_0x7c4a36(0x155)][_0x7c4a36(0x139)](_0x7c4a36(0x152))[_0x7c4a36(0x143)]:await _0x2857c2[_0x7c4a36(0x155)][_0x7c4a36(0x139)](_0x7c4a36(0x152))[_0x7c4a36(0x146)](_0x34163d);}}[_0xe46625(0x148)](){const _0x243c30=_0xe46625;return this[_0x243c30(0x145)];}}
23
+ function _0x4bca(_0xa15448,_0x3d5db9){const _0x326a38=_0x326a();return _0x4bca=function(_0x4bca1e,_0xccfe6){_0x4bca1e=_0x4bca1e-0x19c;let _0x536421=_0x326a38[_0x4bca1e];return _0x536421;},_0x4bca(_0xa15448,_0x3d5db9);}const _0x41ea34=_0x4bca;(function(_0x398928,_0x2e701a){const _0x328303=_0x4bca,_0x4450d1=_0x398928();while(!![]){try{const _0x10c351=-parseInt(_0x328303(0x1ab))/0x1*(-parseInt(_0x328303(0x1b4))/0x2)+-parseInt(_0x328303(0x1a8))/0x3+-parseInt(_0x328303(0x1af))/0x4*(-parseInt(_0x328303(0x1a5))/0x5)+parseInt(_0x328303(0x1a1))/0x6+parseInt(_0x328303(0x19f))/0x7*(-parseInt(_0x328303(0x19c))/0x8)+parseInt(_0x328303(0x1ae))/0x9+-parseInt(_0x328303(0x1b6))/0xa;if(_0x10c351===_0x2e701a)break;else _0x4450d1['push'](_0x4450d1['shift']());}catch(_0x854485){_0x4450d1['push'](_0x4450d1['shift']());}}}(_0x326a,0x99aaa));import{Plugin as _0x3a4e6c}from'ckeditor5/src/core.js';import{Notification as _0x158366}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x9b6618}from'ckeditor5/src/clipboard.js';import _0x132f69 from'./importwordcommand.js';export default class e extends _0x3a4e6c{static get[_0x41ea34(0x1a0)](){const _0xe031d6=_0x41ea34;return _0xe031d6(0x19e);}static get[_0x41ea34(0x19d)](){const _0x9548e1=_0x41ea34;return[_0x158366,_0x9b6618,_0x9548e1(0x1b1)];}constructor(_0x5162ee){const _0x31c3bc=_0x41ea34;super(_0x5162ee),this[_0x31c3bc(0x1a2)]=null;}async[_0x41ea34(0x1b9)](){const _0x32bb99=_0x41ea34,_0x4a4f38=this[_0x32bb99(0x1a3)];_0x4a4f38[_0x32bb99(0x1a6)][_0x32bb99(0x1ac)](_0x32bb99(0x1b0),{'converterUrl':_0x32bb99(0x1b2),'tokenUrl':(_0x4a4f38[_0x32bb99(0x1a6)][_0x32bb99(0x1b8)](_0x32bb99(0x1b5))||{})[_0x32bb99(0x1ba)],'formatting':{'resets':_0x32bb99(0x1b7),'defaults':_0x32bb99(0x1b7),'styles':_0x32bb99(0x1b3)}}),_0x4a4f38[_0x32bb99(0x1ad)][_0x32bb99(0x1a4)](_0x32bb99(0x1b0),new _0x132f69(_0x4a4f38));const {tokenUrl:_0x1ba40a}=_0x4a4f38[_0x32bb99(0x1a6)][_0x32bb99(0x1b8)](_0x32bb99(0x1b0));if(_0x1ba40a){const {tokenUrl:_0x26950d}=_0x4a4f38[_0x32bb99(0x1a6)][_0x32bb99(0x1b8)](_0x32bb99(0x1b5))||{};this[_0x32bb99(0x1a2)]=_0x1ba40a===_0x26950d?_0x4a4f38[_0x32bb99(0x1aa)][_0x32bb99(0x1b8)](_0x32bb99(0x1b1))[_0x32bb99(0x1a7)]:await _0x4a4f38[_0x32bb99(0x1aa)][_0x32bb99(0x1b8)](_0x32bb99(0x1b1))[_0x32bb99(0x1a9)](_0x1ba40a);}}[_0x41ea34(0x1bb)](){const _0x2c39a2=_0x41ea34;return this[_0x2c39a2(0x1a2)];}}function _0x326a(){const _0x508266=['2968317uJAkcF','registerTokenUrl','plugins','71IGuQNI','define','commands','8351226YttQVj','1228PxjSsE','importWord','CloudServices','https://docx-converter.cke-cs.com/v2/convert/docx-html','inline','17270MEyYHI','cloudServices','1165040FgGCsw','none','get','init','tokenUrl','getToken','8ggvqjs','requires','ImportWordEditing','6321273LgffYy','pluginName','3640890woCPJL','_token','editor','add','7990LZafyD','config','token'];_0x326a=function(){return _0x508266;};return _0x326a();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2394f8}from'ckeditor5/src/core.js';import{SpinnerView as _0x2f8d04}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x7caeeb}from'ckeditor5/src/upload.js';import _0x3dcf6f from'../theme/icons/importword.svg';export default class o extends _0x2394f8{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x17e479=this['editor'],t=_0x17e479['t'];_0x17e479['ui']['componentFactory']['add']('importWord',_0xfc9352=>{const _0x2e7c9a=_0x17e479['commands']['get']('importWord'),_0x3f4e42=new _0x7caeeb(_0xfc9352),_0xc62e05=new _0x2f8d04();return _0x3f4e42['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x3f4e42['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x3dcf6f,'tooltip':!0x0}),_0x3f4e42['buttonView']['bind']('isOn','isEnabled')['to'](_0x2e7c9a,'isBusy','isEnabled'),_0xc62e05['bind']('isVisible')['to'](_0x2e7c9a,'isBusy'),_0x3f4e42['buttonView']['iconView']['bind']('isVisible')['to'](_0x2e7c9a,'isBusy',_0x313f99=>!_0x313f99),_0x3f4e42['buttonView']['children']['add'](_0xc62e05),_0x3f4e42['on']('done',(_0x1e9d89,_0x235a06)=>{_0x17e479['execute']('importWord',_0x235a06[0x0],{}),_0x17e479['editing']['view']['focus']();}),_0x3f4e42;});}}
23
+ import{Plugin as _0x1e04c5}from'ckeditor5/src/core.js';import{SpinnerView as _0x1ce0e0}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x5cc8ad}from'ckeditor5/src/upload.js';import _0x50cf6e from'../theme/icons/importword.svg';export default class o extends _0x1e04c5{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x17a3ec=this['editor'],t=_0x17a3ec['t'];_0x17a3ec['ui']['componentFactory']['add']('importWord',_0x7afa00=>{const _0x1eb3e5=_0x17a3ec['commands']['get']('importWord'),_0x158dbe=new _0x5cc8ad(_0x7afa00),_0x1988a6=new _0x1ce0e0();return _0x158dbe['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x158dbe['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x50cf6e,'tooltip':!0x0}),_0x158dbe['buttonView']['bind']('isOn','isEnabled')['to'](_0x1eb3e5,'isBusy','isEnabled'),_0x1988a6['bind']('isVisible')['to'](_0x1eb3e5,'isBusy'),_0x158dbe['buttonView']['iconView']['bind']('isVisible')['to'](_0x1eb3e5,'isBusy',_0x1e0555=>!_0x1e0555),_0x158dbe['buttonView']['children']['add'](_0x1988a6),_0x158dbe['on']('done',(_0x4c3b0c,_0x14fce2)=>{_0x17a3ec['execute']('importWord',_0x14fce2[0x0],{}),_0x17a3ec['editing']['view']['focus']();}),_0x158dbe;});}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x4aa996,_0x510e38){var _0x2bbdf3=_0x3e4b,_0x251e22=_0x4aa996();while(!![]){try{var _0xbb9be2=parseInt(_0x2bbdf3(0x198))/0x1+parseInt(_0x2bbdf3(0x199))/0x2*(-parseInt(_0x2bbdf3(0x193))/0x3)+parseInt(_0x2bbdf3(0x190))/0x4*(-parseInt(_0x2bbdf3(0x197))/0x5)+parseInt(_0x2bbdf3(0x194))/0x6+-parseInt(_0x2bbdf3(0x196))/0x7+-parseInt(_0x2bbdf3(0x192))/0x8*(parseInt(_0x2bbdf3(0x191))/0x9)+parseInt(_0x2bbdf3(0x195))/0xa;if(_0xbb9be2===_0x510e38)break;else _0x251e22['push'](_0x251e22['shift']());}catch(_0x31136d){_0x251e22['push'](_0x251e22['shift']());}}}(_0x4965,0x2cd7b));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';function _0x3e4b(_0x35ecac,_0xadab24){var _0x496599=_0x4965();return _0x3e4b=function(_0x3e4b9a,_0x187836){_0x3e4b9a=_0x3e4b9a-0x190;var _0x1d5ca5=_0x496599[_0x3e4b9a];return _0x1d5ca5;},_0x3e4b(_0x35ecac,_0xadab24);}function _0x4965(){var _0x118882=['963216KQNwAE','217869rxnlnr','1260336MhQQLi','6151080PEOHZU','527268BDYGPU','1565vsVREQ','104839xxiWDp','10DwwNuB','2396MmYfgl','9WBBUtt'];_0x4965=function(){return _0x118882;};return _0x4965();}export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';
23
+ function _0x2137(_0x228139,_0x51693a){var _0x2ed0ed=_0x2ed0();return _0x2137=function(_0x213762,_0x24fc8a){_0x213762=_0x213762-0xeb;var _0x31e353=_0x2ed0ed[_0x213762];return _0x31e353;},_0x2137(_0x228139,_0x51693a);}(function(_0x43a83c,_0xb89ee8){var _0x3f8016=_0x2137,_0x44aebe=_0x43a83c();while(!![]){try{var _0xa4f0=-parseInt(_0x3f8016(0xed))/0x1+-parseInt(_0x3f8016(0xf1))/0x2*(parseInt(_0x3f8016(0xf3))/0x3)+-parseInt(_0x3f8016(0xef))/0x4+-parseInt(_0x3f8016(0xeb))/0x5+-parseInt(_0x3f8016(0xee))/0x6*(parseInt(_0x3f8016(0xf2))/0x7)+-parseInt(_0x3f8016(0xf0))/0x8+parseInt(_0x3f8016(0xec))/0x9;if(_0xa4f0===_0xb89ee8)break;else _0x44aebe['push'](_0x44aebe['shift']());}catch(_0x3a3307){_0x44aebe['push'](_0x44aebe['shift']());}}}(_0x2ed0,0x9544e));function _0x2ed0(){var _0x3a4dd1=['846185SlGZSy','17142rFnzuK','3400148ySBCsd','662720NVQgpX','10mZeWyy','224JaEDsa','118359bvOHuR','2395550hQWbbI','28424403DNTCHE'];_0x2ed0=function(){return _0x3a4dd1;};return _0x2ed0();}export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';