Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-find-and-replace

Package Overview
Dependencies
Maintainers
1
Versions
676
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-find-and-replace - npm Package Compare versions

Comparing version 38.1.0 to 38.1.1

build/find-and-replace.js.map

2

build/find-and-replace.js

@@ -5,2 +5,2 @@ !function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{Find:"Find","Find and replace":"Find and replace","Find in text…":"Find in text…","Match case":"Match case","Next result":"Next result","Previous result":"Previous result",Replace:"Replace","Replace all":"Replace all","Replace with…":"Replace with…","Show options":"Show options","Text to find must not be empty.":"Text to find must not be empty.","Tip: Find some text first in order to replace it.":"Tip: Find some text first in order to replace it.","Whole words only":"Whole words only"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),

* For licensing, see LICENSE.md.
*/(()=>{var e={443:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',""]);const s=r},299:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,".ck-find-result{background:var(--ck-color-highlight-background);color:var(--ck-color-text)}.ck-find-result_selected{background:#ff9633}",""]);const s=r},226:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,".ck.ck-find-and-replace-form{max-width:100%}.ck.ck-find-and-replace-form fieldset{display:flex}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{position:absolute}.ck.ck-find-and-replace-form{width:400px}.ck.ck-find-and-replace-form:focus{outline:none}.ck.ck-find-and-replace-form fieldset{align-content:stretch;align-items:center;border:0;flex-direction:row;flex-wrap:nowrap;margin:0;padding:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset>.ck-button{flex:0 0 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset>*+*{margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset>*+*{margin-right:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view{flex:1 1 auto}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view .ck-input{min-width:50px;width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find{align-items:flex-start}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find{font-weight:700}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find .ck-button__label{padding-left:var(--ck-spacing-large);padding-right:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-prev>.ck-icon{transform:rotate(90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-next>.ck-icon{transform:rotate(-90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{left:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{color:var(--ck-color-base-border)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace{flex-wrap:wrap;justify-content:flex-end;margin-top:calc(var(--ck-spacing-large)*-1)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view{margin-bottom:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-options-dropdown{margin-left:0;margin-right:auto}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view,.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view .ck-input{width:100%}@media screen and (max-width:600px){.ck.ck-find-and-replace-form{width:300px}.ck.ck-find-and-replace-form fieldset{flex-wrap:wrap}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-labeled-field-view{flex:1 0 auto;margin-bottom:var(--ck-spacing-standard);width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button{text-align:center}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{flex:1 1 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-left:0}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-right:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type .ck-button__label{text-align:center;width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view){flex:1 1 auto}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-dropdown:not(.ck-labeled-field-view){flex-grow:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-button:not(.ck-labeled-field-view)>.ck-button__label{text-align:center;width:100%}}",""]);const s=r},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(r[a]=!0)}for(var o=0;o<e.length;o++){var c=[].concat(e[o]);n&&r[c[0]]||(i&&(c[2]?c[2]="".concat(i," and ").concat(c[2]):c[2]=i),t.push(c))}},t}},62:(e,t,i)=>{"use strict";var n,r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},s=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),a=[];function o(e){for(var t=-1,i=0;i<a.length;i++)if(a[i].identifier===e){t=i;break}return t}function c(e,t){for(var i={},n=[],r=0;r<e.length;r++){var s=e[r],c=t.base?s[0]+t.base:s[0],l=i[c]||0,d="".concat(c," ").concat(l);i[c]=l+1;var f=o(d),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(a[f].references++,a[f].updater(h)):a.push({identifier:d,updater:g(h,t),references:1}),n.push(d)}return n}function l(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var r=i.nc;r&&(n.nonce=r)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=s(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var d,f=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function h(e,t,i,n){var r=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=f(t,r);else{var s=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(s,a[t]):e.appendChild(s)}}function u(e,t,i){var n=i.css,r=i.media,s=i.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,m=0;function g(e,t){var i,n,r;if(t.singleton){var s=m++;i=p||(p=l(t)),n=h.bind(null,i,s,!1),r=h.bind(null,i,s,!0)}else i=l(t),n=u.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var i=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var r=o(i[n]);a[r].references--}for(var s=c(e,t),l=0;l<i.length;l++){var d=o(i[l]);0===a[d].references&&(a[d].updater(),a.splice(d,1))}i=s}}}},704:(e,t,i)=>{e.exports=i(79)("./src/core.js")},273:(e,t,i)=>{e.exports=i(79)("./src/ui.js")},209:(e,t,i)=>{e.exports=i(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={id:n,exports:{}};return e[n](s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var n={};(()=>{"use strict";i.r(n),i.d(n,{FindAndReplace:()=>de,FindAndReplaceEditing:()=>le,FindAndReplaceUI:()=>u,FindAndReplaceUtils:()=>Z,FindCommand:()=>p,FindNextCommand:()=>_,FindPreviousCommand:()=>w,ReplaceAllCommand:()=>k,ReplaceCommand:()=>g});var e=i(704),t=i(273),r=i(209),s=i(62),a=i.n(s),o=i(443),c={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};a()(o.Z,c);o.Z.locals;var l=i(226),d={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};a()(l.Z,d);l.Z.locals;const f='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>';class h extends t.View{constructor(e){super(e);const i=e.t;this.set("matchCount",0),this.set("highlightOffset",0),this.set("isDirty",!1),this.set("_areCommandsEnabled",{}),this.set("_resultsCounterText",""),this.set("_matchCase",!1),this.set("_wholeWordsOnly",!1),this.bind("_searchResultsFound").to(this,"matchCount",this,"isDirty",((e,t)=>e>0&&!t)),this._findInputView=this._createInputField(i("Find in text…")),this._replaceInputView=this._createInputField(i("Replace with…")),this._findButtonView=this._createButton({label:i("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._findPrevButtonView=this._createButton({label:i("Previous result"),class:"ck-button-prev",icon:f,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:i("Next result"),class:"ck-button-next",icon:f,keystroke:"F3",tooltip:!0}),this._optionsDropdown=this._createOptionsDropdown(),this._replaceButtonView=this._createButton({label:i("Replace"),class:"ck-button-replace",withText:!0}),this._replaceAllButtonView=this._createButton({label:i("Replace all"),class:"ck-button-replaceall",withText:!0}),this._findFieldsetView=this._createFindFieldset(),this._replaceFieldsetView=this._createReplaceFieldset(),this._focusTracker=new r.FocusTracker,this._keystrokes=new r.KeystrokeHandler,this._focusables=new t.ViewCollection,this._focusCycler=new t.FocusCycler({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this._keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-find-and-replace-form"],tabindex:"-1"},children:[new t.FormHeaderView(e,{label:i("Find and replace")}),this._findFieldsetView,this._replaceFieldsetView]})}render(){super.render(),(0,t.submitHandler)({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}reset(){this._findInputView.errorText=null,this.isDirty=!0}get _textToFind(){return this._findInputView.fieldView.element.value}get _textToReplace(){return this._replaceInputView.fieldView.element.value}_createFindFieldset(){const e=this.locale,i=new t.View(e);return this._findInputView.fieldView.on("input",(()=>{this.isDirty=!0})),this._findButtonView.on("execute",this._onFindButtonExecute.bind(this)),this._findPrevButtonView.delegate("execute").to(this,"findPrevious"),this._findNextButtonView.delegate("execute").to(this,"findNext"),this._findPrevButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findPrevious:e})=>e)),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findNext:e})=>e)),this._injectFindResultsCounter(),i.setTemplate({tag:"fieldset",attributes:{class:["ck","ck-find-and-replace-form__find"]},children:[this._findInputView,this._findButtonView,this._findPrevButtonView,this._findNextButtonView]}),i}_onFindButtonExecute(){if(this._textToFind)this.isDirty=!1,this.fire("findNext",{searchText:this._textToFind,matchCase:this._matchCase,wholeWords:this._wholeWordsOnly});else{const e=this.t;this._findInputView.errorText=e("Text to find must not be empty.")}}_injectFindResultsCounter(){const e=this.locale,i=e.t,n=this.bindTemplate,s=new t.View(this.locale);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",((e,t)=>i("%0 of %1",[e,t]))),s.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",n.if("isDirty","ck-hidden")]},children:[{text:n.to("_resultsCounterText")}]});const a=()=>{const t=this._findInputView.fieldView.element;if(!t||!(0,r.isVisible)(t))return;const i=new r.Rect(s.element).width,n="ltr"===e.uiLanguageDirection?"paddingRight":"paddingLeft";t.style[n]=i?`calc( 2 * var(--ck-spacing-standard) + ${i}px )`:""};this.on("change:_resultsCounterText",a,{priority:"low"}),this.on("change:isDirty",a,{priority:"low"}),this._findInputView.template.children[0].children.push(s)}_createReplaceFieldset(){const e=this.locale.t,i=new t.View(this.locale);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:e},t)=>e&&t)),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replaceAll:e},t)=>e&&t)),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:e},t)=>e&&t)),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",((t,i)=>t||!i?"":e("Tip: Find some text first in order to replace it."))),this._replaceButtonView.on("execute",(()=>{this.fire("replace",{searchText:this._textToFind,replaceText:this._textToReplace})})),this._replaceAllButtonView.on("execute",(()=>{this.fire("replaceAll",{searchText:this._textToFind,replaceText:this._textToReplace}),this.focus()})),i.setTemplate({tag:"fieldset",attributes:{class:["ck","ck-find-and-replace-form__replace"]},children:[this._replaceInputView,this._optionsDropdown,this._replaceButtonView,this._replaceAllButtonView]}),i}_createOptionsDropdown(){const i=this.locale.t,n=(0,t.createDropdown)(this.locale);n.class="ck-options-dropdown",n.buttonView.set({withText:!1,label:i("Show options"),icon:e.icons.cog,tooltip:!0});const s=new t.Model({withText:!0,label:i("Match case"),_isMatchCaseSwitch:!0}),a=new t.Model({withText:!0,label:i("Whole words only")});return s.bind("isOn").to(this,"_matchCase"),a.bind("isOn").to(this,"_wholeWordsOnly"),n.on("execute",(e=>{e.source._isMatchCaseSwitch?this._matchCase=!this._matchCase:this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0})),(0,t.addListToDropdown)(n,new r.Collection([{type:"switchbutton",model:s},{type:"switchbutton",model:a}])),n}_initFocusCycling(){[this._findInputView,this._findButtonView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._optionsDropdown,this._replaceButtonView,this._replaceAllButtonView].forEach((e=>{this._focusables.add(e),this._focusTracker.add(e.element)}))}_initKeystrokeHandling(){const e=e=>e.stopPropagation(),t=e=>{e.stopPropagation(),e.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",(e=>{t(e),this._findNextButtonView.fire("execute")})),this._keystrokes.set("shift+f3",(e=>{t(e),this._findPrevButtonView.fire("execute")})),this._keystrokes.set("enter",(e=>{const i=e.target;i===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),t(e)):i!==this._replaceInputView.fieldView.element||this.isDirty||(this._replaceButtonView.fire("execute"),t(e))})),this._keystrokes.set("shift+enter",(e=>{e.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),t(e))})),this._keystrokes.set("arrowright",e),this._keystrokes.set("arrowleft",e),this._keystrokes.set("arrowup",e),this._keystrokes.set("arrowdown",e)}_createButton(e){const i=new t.ButtonView(this.locale);return i.set(e),i}_createInputField(e){const i=new t.LabeledFieldView(this.locale,t.createLabeledInputText);return i.label=e,i}}class u extends e.Plugin{static get pluginName(){return"FindAndReplaceUI"}constructor(e){super(e),this.formView=null}init(){const e=this.editor;e.ui.componentFactory.add("findAndReplace",(i=>{const n=(0,t.createDropdown)(i),r=e.commands.get("find");return n.bind("isEnabled").to(r),n.once("change:isOpen",(()=>{this.formView=new((0,t.CssTransitionDisablerMixin)(h))(e.locale),n.panelView.children.add(this.formView),this._setupFormView(this.formView)})),n.on("change:isOpen",((e,t,i)=>{i?(this.formView.disableCssTransitions(),this.formView.reset(),this.formView._findInputView.fieldView.select(),this.formView.enableCssTransitions()):this.fire("searchReseted")}),{priority:"low"}),this._setupDropdownButton(n),n}))}_setupDropdownButton(e){const t=this.editor,i=t.locale.t;e.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.87 13.786 1.532-1.286 3.857 4.596a1 1 0 1 1-1.532 1.286l-3.857-4.596z"/><path d="M16.004 8.5a6.5 6.5 0 0 1-9.216 5.905c-1.154-.53-.863-1.415-.663-1.615.194-.194.564-.592 1.635-.141a4.5 4.5 0 0 0 5.89-5.904l-.104-.227 1.332-1.331c.045-.046.196-.041.224.007a6.47 6.47 0 0 1 .902 3.306zm-3.4-5.715c.562.305.742 1.106.354 1.494-.388.388-.995.414-1.476.178a4.5 4.5 0 0 0-6.086 5.882l.114.236-1.348 1.349c-.038.037-.17.022-.198-.023a6.5 6.5 0 0 1 5.54-9.9 6.469 6.469 0 0 1 3.1.784z"/><path d="M4.001 11.93.948 8.877a.2.2 0 0 1 .141-.341h6.106a.2.2 0 0 1 .141.341L4.283 11.93a.2.2 0 0 1-.282 0zm11.083-6.789 3.053 3.053a.2.2 0 0 1-.14.342H11.89a.2.2 0 0 1-.14-.342l3.052-3.053a.2.2 0 0 1 .282 0z"/></svg>',label:i("Find and replace"),keystroke:"CTRL+F",tooltip:!0}),t.keystrokes.set("Ctrl+F",((t,i)=>{e.isEnabled&&(e.isOpen=!0,i())}))}_setupFormView(e){const t=this.editor.commands,i=this.editor.plugins.get("FindAndReplaceEditing").state,n={before:-1,same:0,after:1,different:1};e.bind("highlightOffset").to(i,"highlightedResult",(e=>e?Array.from(i.results).sort(((e,t)=>n[e.marker.getStart().compareWith(t.marker.getStart())])).indexOf(e)+1:0)),e.listenTo(i.results,"change",(()=>{e.matchCount=i.results.length}));const r=t.get("findNext"),s=t.get("findPrevious"),a=t.get("replace"),o=t.get("replaceAll");e.bind("_areCommandsEnabled").to(r,"isEnabled",s,"isEnabled",a,"isEnabled",o,"isEnabled",((e,t,i,n)=>({findNext:e,findPrevious:t,replace:i,replaceAll:n}))),e.delegate("findNext","findPrevious","replace","replaceAll").to(this),e.on("change:isDirty",((e,t,i)=>{i&&this.fire("searchReseted")}))}}class p extends e.Command{constructor(e,t){super(e),this.isEnabled=!0,this.affectsData=!1,this._state=t}execute(e,{matchCase:t,wholeWords:i}={}){const{editor:n}=this,{model:r}=n,s=n.plugins.get("FindAndReplaceUtils");let a;"string"==typeof e?(a=s.findByTextCallback(e,{matchCase:t,wholeWords:i}),this._state.searchText=e):a=e;const o=r.document.getRootNames().reduce(((e,t)=>s.updateFindResultFromRange(r.createRangeIn(r.document.getRoot(t)),r,a,e)),null);return this._state.clear(r),this._state.results.addMany(o),this._state.highlightedResult=o.get(0),"string"==typeof e&&(this._state.searchText=e),this._state.matchCase=!!t,this._state.matchWholeWords=!!i,{results:o,findCallback:a}}}class m extends e.Command{constructor(e,t){super(e),this.isEnabled=!0,this._state=t,this._isEnabledBasedOnSelection=!1}_replace(e,t){const{model:i}=this.editor,n=t.marker.getRange();i.canEditAt(n)&&i.change((r=>{if("$graveyard"===n.root.rootName)return void this._state.results.remove(t);let s={};for(const e of n.getItems())if(e.is("$text")||e.is("$textProxy")){s=e.getAttributes();break}i.insertContent(r.createText(e,s),n),this._state.results.has(t)&&this._state.results.remove(t)}))}}class g extends m{execute(e,t){this._replace(e,t)}}class k extends m{execute(e,t){const{editor:i}=this,{model:n}=i,s=i.plugins.get("FindAndReplaceUtils"),a=t instanceof r.Collection?t:n.document.getRootNames().reduce(((e,i)=>s.updateFindResultFromRange(n.createRangeIn(n.document.getRoot(i)),n,s.findByTextCallback(t,this._state),e)),null);a.length&&[...a].forEach((t=>{this._replace(e,t)}))}}class _ extends e.Command{constructor(e,t){super(e),this.affectsData=!1,this._state=t,this.isEnabled=!1,this.listenTo(this._state.results,"change",(()=>{this.isEnabled=this._state.results.length>1}))}refresh(){this.isEnabled=this._state.results.length>1}execute(){const e=this._state.results,t=e.getIndex(this._state.highlightedResult),i=t+1>=e.length?0:t+1;this._state.highlightedResult=this._state.results.get(i)}}class w extends _{execute(){const e=this._state.results.getIndex(this._state.highlightedResult),t=e-1<0?this._state.results.length-1:e-1;this._state.highlightedResult=this._state.results.get(t)}}class b extends((0,r.ObservableMixin)()){constructor(e){super(),this.set("results",new r.Collection),this.set("highlightedResult",null),this.set("searchText",""),this.set("replaceText",""),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",((t,{removed:i,index:n})=>{if(Array.from(i).length){let t=!1;if(e.change((n=>{for(const r of i)this.highlightedResult===r&&(t=!0),e.markers.has(r.marker.name)&&n.removeMarker(r.marker)})),t){const e=n>=this.results.length?0:n;this.highlightedResult=this.results.get(e)}}}))}clear(e){this.searchText="",e.change((t=>{if(this.highlightedResult){const i=this.highlightedResult.marker.name.split(":")[1],n=e.markers.get(`findResultHighlighted:${i}`);n&&t.removeMarker(n)}[...this.results].forEach((({marker:e})=>{t.removeMarker(e)}))})),this.results.clear()}}const v="object"==typeof global&&global&&global.Object===Object&&global;var x="object"==typeof self&&self&&self.Object===Object&&self;const y=v||x||Function("return this")();const T=y.Symbol;const R=function(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r};const V=Array.isArray;var C=Object.prototype,F=C.hasOwnProperty,E=C.toString,A=T?T.toStringTag:void 0;const B=function(e){var t=F.call(e,A),i=e[A];try{e[A]=void 0;var n=!0}catch(e){}var r=E.call(e);return n&&(t?e[A]=i:delete e[A]),r};var I=Object.prototype.toString;const N=function(e){return I.call(e)};var O=T?T.toStringTag:void 0;const S=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O&&O in Object(e)?B(e):N(e)};const P=function(e){return null!=e&&"object"==typeof e};const M=function(e){return"symbol"==typeof e||P(e)&&"[object Symbol]"==S(e)};var j=T?T.prototype:void 0,D=j?j.toString:void 0;const $=function e(t){if("string"==typeof t)return t;if(V(t))return R(t,e)+"";if(M(t))return D?D.call(t):"";var i=t+"";return"0"==i&&1/t==-Infinity?"-0":i};const W=function(e){return null==e?"":$(e)};var H=/[\\^$.*+?()[\]{}|]/g,L=RegExp(H.source);const U=function(e){return(e=W(e))&&L.test(e)?e.replace(H,"\\$&"):e};class Z extends e.Plugin{static get pluginName(){return"FindAndReplaceUtils"}updateFindResultFromRange(e,t,i,n){const s=n||new r.Collection;return t.change((n=>{[...e].forEach((({type:e,item:a})=>{if("elementStart"===e&&t.schema.checkChild(a,"$text")){const e=i({item:a,text:this.rangeToText(t.createRangeIn(a))});if(!e)return;e.forEach((e=>{const t=`findResult:${(0,r.uid)()}`,i=n.addMarker(t,{usingOperation:!1,affectsData:!1,range:n.createRange(n.createPositionAt(a,e.start),n.createPositionAt(a,e.end))}),o=function(e,t){const i=e.find((({marker:e})=>t.getStart().isBefore(e.getStart())));return i?e.getIndex(i):e.length}(s,i);s.add({id:t,label:e.label,marker:i},o)}))}}))})),s}rangeToText(e){return Array.from(e.getItems()).reduce(((e,t)=>t.is("$text")||t.is("$textProxy")?e+t.data:`${e}\n`),"")}findByTextCallback(e,t){let i="gu";t.matchCase||(i+="i");let n=`(${U(e)})`;if(t.wholeWords){const t="[^a-zA-ZÀ-ɏḀ-ỿ]";new RegExp("^"+t).test(e)||(n=`(^|${t}|_)${n}`),new RegExp(t+"$").test(e)||(n=`${n}(?=_|${t}|$)`)}const r=new RegExp(n,i);return function({text:e}){return[...e.matchAll(r)].map(z)}}}function z(e){const t=e.length-1;let i=e.index;return 3===e.length&&(i+=e[1].length),{label:e[t],start:i,end:i+e[t].length}}const K=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const q=function(){return y.Date.now()};var J=/\s/;const Y=function(e){for(var t=e.length;t--&&J.test(e.charAt(t)););return t};var G=/^\s+/;const Q=function(e){return e?e.slice(0,Y(e)+1).replace(G,""):e};var X=/^[-+]0x[0-9a-f]+$/i,ee=/^0b[01]+$/i,te=/^0o[0-7]+$/i,ie=parseInt;const ne=function(e){if("number"==typeof e)return e;if(M(e))return NaN;if(K(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=K(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Q(e);var i=ee.test(e);return i||te.test(e)?ie(e.slice(2),i?2:8):X.test(e)?NaN:+e};var re=Math.max,se=Math.min;const ae=function(e,t,i){var n,r,s,a,o,c,l=0,d=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function u(t){var i=n,s=r;return n=r=void 0,l=t,a=e.apply(s,i)}function p(e){var i=e-c;return void 0===c||i>=t||i<0||f&&e-l>=s}function m(){var e=q();if(p(e))return g(e);o=setTimeout(m,function(e){var i=t-(e-c);return f?se(i,s-(e-l)):i}(e))}function g(e){return o=void 0,h&&n?u(e):(n=r=void 0,a)}function k(){var e=q(),i=p(e);if(n=arguments,r=this,c=e,i){if(void 0===o)return function(e){return l=e,o=setTimeout(m,t),d?u(e):a}(c);if(f)return clearTimeout(o),o=setTimeout(m,t),u(c)}return void 0===o&&(o=setTimeout(m,t)),a}return t=ne(t)||0,K(i)&&(d=!!i.leading,s=(f="maxWait"in i)?re(ne(i.maxWait)||0,t):s,h="trailing"in i?!!i.trailing:h),k.cancel=function(){void 0!==o&&clearTimeout(o),l=0,n=c=r=o=void 0},k.flush=function(){return void 0===o?a:g(q())},k};var oe=i(299),ce={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};a()(oe.Z,ce);oe.Z.locals;class le extends e.Plugin{static get requires(){return[Z]}static get pluginName(){return"FindAndReplaceEditing"}init(){this._activeResults=null,this.state=new b(this.editor.model),this._defineConverters(),this._defineCommands(),this.listenTo(this.state,"change:highlightedResult",((e,t,i,n)=>{const{model:r}=this.editor;r.change((e=>{if(n){const t=n.marker.name.split(":")[1],i=r.markers.get(`findResultHighlighted:${t}`);i&&e.removeMarker(i)}if(i){const t=i.marker.name.split(":")[1];e.addMarker(`findResultHighlighted:${t}`,{usingOperation:!1,affectsData:!1,range:i.marker.getRange()})}}))}));const e=ae(((e,t,i)=>{if(i){const e=this.editor.editing.view.domConverter,t=this.editor.editing.mapper.toViewRange(i.marker.getRange());(0,r.scrollViewportToShowTarget)({target:e.viewRangeToDom(t),viewportOffset:40})}}).bind(this),32);this.listenTo(this.state,"change:highlightedResult",e,{priority:"low"}),this.listenTo(this.editor,"destroy",e.cancel)}find(e){const{editor:t}=this,{model:i}=t,{findCallback:n,results:r}=t.execute("find",e);return this._activeResults=r,this.listenTo(i.document,"change:data",(()=>function(e,t,i){const n=new Set,r=new Set,s=t.model;s.document.differ.getChanges().forEach((e=>{"$text"===e.name||s.schema.isInline(e.position.nodeAfter)?(n.add(e.position.parent),[...s.markers.getMarkersAtPosition(e.position)].forEach((e=>{r.add(e.name)}))):"insert"===e.type&&n.add(e.position.nodeAfter)})),s.document.differ.getChangedMarkers().forEach((({name:e,data:{newRange:t}})=>{t&&"$graveyard"===t.start.root.rootName&&r.add(e)})),n.forEach((e=>{[...s.markers.getMarkersIntersectingRange(s.createRangeIn(e))].forEach((e=>r.add(e.name)))})),s.change((t=>{r.forEach((i=>{e.has(i)&&e.remove(i),t.removeMarker(i)}))})),n.forEach((n=>{t.plugins.get("FindAndReplaceUtils").updateFindResultFromRange(s.createRangeOn(n),s,i,e)}))}(this._activeResults,t,n))),this._activeResults}stop(){this._activeResults&&(this.stopListening(this.editor.model.document),this.state.clear(this.editor.model),this._activeResults=null)}_defineCommands(){this.editor.commands.add("find",new p(this.editor,this.state)),this.editor.commands.add("findNext",new _(this.editor,this.state)),this.editor.commands.add("findPrevious",new w(this.editor,this.state)),this.editor.commands.add("replace",new g(this.editor,this.state)),this.editor.commands.add("replaceAll",new k(this.editor,this.state))}_defineConverters(){const{editor:e}=this;e.conversion.for("editingDowncast").markerToHighlight({model:"findResult",view:({markerName:e})=>{const[,t]=e.split(":");return{name:"span",classes:["ck-find-result"],attributes:{"data-find-result":t}}}}),e.conversion.for("editingDowncast").markerToHighlight({model:"findResultHighlighted",view:({markerName:e})=>{const[,t]=e.split(":");return{name:"span",classes:["ck-find-result_selected"],attributes:{"data-find-result":t}}}})}}class de extends e.Plugin{static get requires(){return[le,u]}static get pluginName(){return"FindAndReplace"}init(){const e=this.editor.plugins.get("FindAndReplaceUI"),t=this.editor.plugins.get("FindAndReplaceEditing"),i=t.state;e.on("findNext",((e,t)=>{t?(i.searchText=t.searchText,this.editor.execute("find",t.searchText,t)):this.editor.execute("findNext")})),e.on("findPrevious",((e,t)=>{t&&i.searchText!==t.searchText?this.editor.execute("find",t.searchText):this.editor.execute("findPrevious")})),e.on("replace",((e,t)=>{i.searchText!==t.searchText&&this.editor.execute("find",t.searchText);const n=i.highlightedResult;n&&this.editor.execute("replace",t.replaceText,n)})),e.on("replaceAll",((e,t)=>{i.searchText!==t.searchText&&this.editor.execute("find",t.searchText),this.editor.execute("replaceAll",t.replaceText,i.results)})),e.on("searchReseted",(()=>{i.clear(this.editor.model),t.stop()}))}}})(),(window.CKEditor5=window.CKEditor5||{}).findAndReplace=n})();
*/(()=>{var e={487:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',""]);const s=r},355:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,".ck-find-result{background:var(--ck-color-highlight-background);color:var(--ck-color-text)}.ck-find-result_selected{background:#ff9633}",""]);const s=r},957:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,".ck.ck-find-and-replace-form{max-width:100%}.ck.ck-find-and-replace-form fieldset{display:flex}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{position:absolute}.ck.ck-find-and-replace-form{width:400px}.ck.ck-find-and-replace-form:focus{outline:none}.ck.ck-find-and-replace-form fieldset{align-content:stretch;align-items:center;border:0;flex-direction:row;flex-wrap:nowrap;margin:0;padding:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset>.ck-button{flex:0 0 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset>*+*{margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset>*+*{margin-right:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view{flex:1 1 auto}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view .ck-input{min-width:50px;width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find{align-items:flex-start}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find{font-weight:700}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find .ck-button__label{padding-left:var(--ck-spacing-large);padding-right:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-prev>.ck-icon{transform:rotate(90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-next>.ck-icon{transform:rotate(-90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{left:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{color:var(--ck-color-base-border)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace{flex-wrap:wrap;justify-content:flex-end;margin-top:calc(var(--ck-spacing-large)*-1)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view{margin-bottom:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-options-dropdown{margin-left:0;margin-right:auto}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view,.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view .ck-input{width:100%}@media screen and (max-width:600px){.ck.ck-find-and-replace-form{width:300px}.ck.ck-find-and-replace-form fieldset{flex-wrap:wrap}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-labeled-field-view{flex:1 0 auto;margin-bottom:var(--ck-spacing-standard);width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button{text-align:center}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{flex:1 1 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-left:0}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-right:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type .ck-button__label{text-align:center;width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view){flex:1 1 auto}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-dropdown:not(.ck-labeled-field-view){flex-grow:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-button:not(.ck-labeled-field-view)>.ck-button__label{text-align:center;width:100%}}",""]);const s=r},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(r[a]=!0)}for(var o=0;o<e.length;o++){var c=[].concat(e[o]);n&&r[c[0]]||(i&&(c[2]?c[2]="".concat(i," and ").concat(c[2]):c[2]=i),t.push(c))}},t}},62:(e,t,i)=>{"use strict";var n,r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},s=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),a=[];function o(e){for(var t=-1,i=0;i<a.length;i++)if(a[i].identifier===e){t=i;break}return t}function c(e,t){for(var i={},n=[],r=0;r<e.length;r++){var s=e[r],c=t.base?s[0]+t.base:s[0],l=i[c]||0,d="".concat(c," ").concat(l);i[c]=l+1;var f=o(d),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(a[f].references++,a[f].updater(h)):a.push({identifier:d,updater:g(h,t),references:1}),n.push(d)}return n}function l(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var r=i.nc;r&&(n.nonce=r)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=s(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var d,f=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function h(e,t,i,n){var r=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=f(t,r);else{var s=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(s,a[t]):e.appendChild(s)}}function u(e,t,i){var n=i.css,r=i.media,s=i.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,m=0;function g(e,t){var i,n,r;if(t.singleton){var s=m++;i=p||(p=l(t)),n=h.bind(null,i,s,!1),r=h.bind(null,i,s,!0)}else i=l(t),n=u.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var i=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var r=o(i[n]);a[r].references--}for(var s=c(e,t),l=0;l<i.length;l++){var d=o(i[l]);0===a[d].references&&(a[d].updater(),a.splice(d,1))}i=s}}}},704:(e,t,i)=>{e.exports=i(79)("./src/core.js")},273:(e,t,i)=>{e.exports=i(79)("./src/ui.js")},209:(e,t,i)=>{e.exports=i(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={id:n,exports:{}};return e[n](s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var n={};(()=>{"use strict";i.r(n),i.d(n,{FindAndReplace:()=>de,FindAndReplaceEditing:()=>le,FindAndReplaceUI:()=>u,FindAndReplaceUtils:()=>Z,FindCommand:()=>p,FindNextCommand:()=>_,FindPreviousCommand:()=>w,ReplaceAllCommand:()=>k,ReplaceCommand:()=>g});var e=i(704),t=i(273),r=i(209),s=i(62),a=i.n(s),o=i(487),c={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};a()(o.Z,c);o.Z.locals;var l=i(957),d={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};a()(l.Z,d);l.Z.locals;const f='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>';class h extends t.View{constructor(e){super(e);const i=e.t;this.set("matchCount",0),this.set("highlightOffset",0),this.set("isDirty",!1),this.set("_areCommandsEnabled",{}),this.set("_resultsCounterText",""),this.set("_matchCase",!1),this.set("_wholeWordsOnly",!1),this.bind("_searchResultsFound").to(this,"matchCount",this,"isDirty",((e,t)=>e>0&&!t)),this._findInputView=this._createInputField(i("Find in text…")),this._replaceInputView=this._createInputField(i("Replace with…")),this._findButtonView=this._createButton({label:i("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._findPrevButtonView=this._createButton({label:i("Previous result"),class:"ck-button-prev",icon:f,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:i("Next result"),class:"ck-button-next",icon:f,keystroke:"F3",tooltip:!0}),this._optionsDropdown=this._createOptionsDropdown(),this._replaceButtonView=this._createButton({label:i("Replace"),class:"ck-button-replace",withText:!0}),this._replaceAllButtonView=this._createButton({label:i("Replace all"),class:"ck-button-replaceall",withText:!0}),this._findFieldsetView=this._createFindFieldset(),this._replaceFieldsetView=this._createReplaceFieldset(),this._focusTracker=new r.FocusTracker,this._keystrokes=new r.KeystrokeHandler,this._focusables=new t.ViewCollection,this._focusCycler=new t.FocusCycler({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this._keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-find-and-replace-form"],tabindex:"-1"},children:[new t.FormHeaderView(e,{label:i("Find and replace")}),this._findFieldsetView,this._replaceFieldsetView]})}render(){super.render(),(0,t.submitHandler)({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}reset(){this._findInputView.errorText=null,this.isDirty=!0}get _textToFind(){return this._findInputView.fieldView.element.value}get _textToReplace(){return this._replaceInputView.fieldView.element.value}_createFindFieldset(){const e=this.locale,i=new t.View(e);return this._findInputView.fieldView.on("input",(()=>{this.isDirty=!0})),this._findButtonView.on("execute",this._onFindButtonExecute.bind(this)),this._findPrevButtonView.delegate("execute").to(this,"findPrevious"),this._findNextButtonView.delegate("execute").to(this,"findNext"),this._findPrevButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findPrevious:e})=>e)),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findNext:e})=>e)),this._injectFindResultsCounter(),i.setTemplate({tag:"fieldset",attributes:{class:["ck","ck-find-and-replace-form__find"]},children:[this._findInputView,this._findButtonView,this._findPrevButtonView,this._findNextButtonView]}),i}_onFindButtonExecute(){if(this._textToFind)this.isDirty=!1,this.fire("findNext",{searchText:this._textToFind,matchCase:this._matchCase,wholeWords:this._wholeWordsOnly});else{const e=this.t;this._findInputView.errorText=e("Text to find must not be empty.")}}_injectFindResultsCounter(){const e=this.locale,i=e.t,n=this.bindTemplate,s=new t.View(this.locale);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",((e,t)=>i("%0 of %1",[e,t]))),s.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",n.if("isDirty","ck-hidden")]},children:[{text:n.to("_resultsCounterText")}]});const a=()=>{const t=this._findInputView.fieldView.element;if(!t||!(0,r.isVisible)(t))return;const i=new r.Rect(s.element).width,n="ltr"===e.uiLanguageDirection?"paddingRight":"paddingLeft";t.style[n]=i?`calc( 2 * var(--ck-spacing-standard) + ${i}px )`:""};this.on("change:_resultsCounterText",a,{priority:"low"}),this.on("change:isDirty",a,{priority:"low"}),this._findInputView.template.children[0].children.push(s)}_createReplaceFieldset(){const e=this.locale.t,i=new t.View(this.locale);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:e},t)=>e&&t)),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replaceAll:e},t)=>e&&t)),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:e},t)=>e&&t)),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",((t,i)=>t||!i?"":e("Tip: Find some text first in order to replace it."))),this._replaceButtonView.on("execute",(()=>{this.fire("replace",{searchText:this._textToFind,replaceText:this._textToReplace})})),this._replaceAllButtonView.on("execute",(()=>{this.fire("replaceAll",{searchText:this._textToFind,replaceText:this._textToReplace}),this.focus()})),i.setTemplate({tag:"fieldset",attributes:{class:["ck","ck-find-and-replace-form__replace"]},children:[this._replaceInputView,this._optionsDropdown,this._replaceButtonView,this._replaceAllButtonView]}),i}_createOptionsDropdown(){const i=this.locale.t,n=(0,t.createDropdown)(this.locale);n.class="ck-options-dropdown",n.buttonView.set({withText:!1,label:i("Show options"),icon:e.icons.cog,tooltip:!0});const s=new t.Model({withText:!0,label:i("Match case"),_isMatchCaseSwitch:!0}),a=new t.Model({withText:!0,label:i("Whole words only")});return s.bind("isOn").to(this,"_matchCase"),a.bind("isOn").to(this,"_wholeWordsOnly"),n.on("execute",(e=>{e.source._isMatchCaseSwitch?this._matchCase=!this._matchCase:this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0})),(0,t.addListToDropdown)(n,new r.Collection([{type:"switchbutton",model:s},{type:"switchbutton",model:a}])),n}_initFocusCycling(){[this._findInputView,this._findButtonView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._optionsDropdown,this._replaceButtonView,this._replaceAllButtonView].forEach((e=>{this._focusables.add(e),this._focusTracker.add(e.element)}))}_initKeystrokeHandling(){const e=e=>e.stopPropagation(),t=e=>{e.stopPropagation(),e.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",(e=>{t(e),this._findNextButtonView.fire("execute")})),this._keystrokes.set("shift+f3",(e=>{t(e),this._findPrevButtonView.fire("execute")})),this._keystrokes.set("enter",(e=>{const i=e.target;i===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),t(e)):i!==this._replaceInputView.fieldView.element||this.isDirty||(this._replaceButtonView.fire("execute"),t(e))})),this._keystrokes.set("shift+enter",(e=>{e.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),t(e))})),this._keystrokes.set("arrowright",e),this._keystrokes.set("arrowleft",e),this._keystrokes.set("arrowup",e),this._keystrokes.set("arrowdown",e)}_createButton(e){const i=new t.ButtonView(this.locale);return i.set(e),i}_createInputField(e){const i=new t.LabeledFieldView(this.locale,t.createLabeledInputText);return i.label=e,i}}class u extends e.Plugin{static get pluginName(){return"FindAndReplaceUI"}constructor(e){super(e),this.formView=null}init(){const e=this.editor;e.ui.componentFactory.add("findAndReplace",(i=>{const n=(0,t.createDropdown)(i),r=e.commands.get("find");return n.bind("isEnabled").to(r),n.once("change:isOpen",(()=>{this.formView=new((0,t.CssTransitionDisablerMixin)(h))(e.locale),n.panelView.children.add(this.formView),this._setupFormView(this.formView)})),n.on("change:isOpen",((e,t,i)=>{i?(this.formView.disableCssTransitions(),this.formView.reset(),this.formView._findInputView.fieldView.select(),this.formView.enableCssTransitions()):this.fire("searchReseted")}),{priority:"low"}),this._setupDropdownButton(n),n}))}_setupDropdownButton(e){const t=this.editor,i=t.locale.t;e.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.87 13.786 1.532-1.286 3.857 4.596a1 1 0 1 1-1.532 1.286l-3.857-4.596z"/><path d="M16.004 8.5a6.5 6.5 0 0 1-9.216 5.905c-1.154-.53-.863-1.415-.663-1.615.194-.194.564-.592 1.635-.141a4.5 4.5 0 0 0 5.89-5.904l-.104-.227 1.332-1.331c.045-.046.196-.041.224.007a6.47 6.47 0 0 1 .902 3.306zm-3.4-5.715c.562.305.742 1.106.354 1.494-.388.388-.995.414-1.476.178a4.5 4.5 0 0 0-6.086 5.882l.114.236-1.348 1.349c-.038.037-.17.022-.198-.023a6.5 6.5 0 0 1 5.54-9.9 6.469 6.469 0 0 1 3.1.784z"/><path d="M4.001 11.93.948 8.877a.2.2 0 0 1 .141-.341h6.106a.2.2 0 0 1 .141.341L4.283 11.93a.2.2 0 0 1-.282 0zm11.083-6.789 3.053 3.053a.2.2 0 0 1-.14.342H11.89a.2.2 0 0 1-.14-.342l3.052-3.053a.2.2 0 0 1 .282 0z"/></svg>',label:i("Find and replace"),keystroke:"CTRL+F",tooltip:!0}),t.keystrokes.set("Ctrl+F",((t,i)=>{e.isEnabled&&(e.isOpen=!0,i())}))}_setupFormView(e){const t=this.editor.commands,i=this.editor.plugins.get("FindAndReplaceEditing").state,n={before:-1,same:0,after:1,different:1};e.bind("highlightOffset").to(i,"highlightedResult",(e=>e?Array.from(i.results).sort(((e,t)=>n[e.marker.getStart().compareWith(t.marker.getStart())])).indexOf(e)+1:0)),e.listenTo(i.results,"change",(()=>{e.matchCount=i.results.length}));const r=t.get("findNext"),s=t.get("findPrevious"),a=t.get("replace"),o=t.get("replaceAll");e.bind("_areCommandsEnabled").to(r,"isEnabled",s,"isEnabled",a,"isEnabled",o,"isEnabled",((e,t,i,n)=>({findNext:e,findPrevious:t,replace:i,replaceAll:n}))),e.delegate("findNext","findPrevious","replace","replaceAll").to(this),e.on("change:isDirty",((e,t,i)=>{i&&this.fire("searchReseted")}))}}class p extends e.Command{constructor(e,t){super(e),this.isEnabled=!0,this.affectsData=!1,this._state=t}execute(e,{matchCase:t,wholeWords:i}={}){const{editor:n}=this,{model:r}=n,s=n.plugins.get("FindAndReplaceUtils");let a;"string"==typeof e?(a=s.findByTextCallback(e,{matchCase:t,wholeWords:i}),this._state.searchText=e):a=e;const o=r.document.getRootNames().reduce(((e,t)=>s.updateFindResultFromRange(r.createRangeIn(r.document.getRoot(t)),r,a,e)),null);return this._state.clear(r),this._state.results.addMany(o),this._state.highlightedResult=o.get(0),"string"==typeof e&&(this._state.searchText=e),this._state.matchCase=!!t,this._state.matchWholeWords=!!i,{results:o,findCallback:a}}}class m extends e.Command{constructor(e,t){super(e),this.isEnabled=!0,this._state=t,this._isEnabledBasedOnSelection=!1}_replace(e,t){const{model:i}=this.editor,n=t.marker.getRange();i.canEditAt(n)&&i.change((r=>{if("$graveyard"===n.root.rootName)return void this._state.results.remove(t);let s={};for(const e of n.getItems())if(e.is("$text")||e.is("$textProxy")){s=e.getAttributes();break}i.insertContent(r.createText(e,s),n),this._state.results.has(t)&&this._state.results.remove(t)}))}}class g extends m{execute(e,t){this._replace(e,t)}}class k extends m{execute(e,t){const{editor:i}=this,{model:n}=i,s=i.plugins.get("FindAndReplaceUtils"),a=t instanceof r.Collection?t:n.document.getRootNames().reduce(((e,i)=>s.updateFindResultFromRange(n.createRangeIn(n.document.getRoot(i)),n,s.findByTextCallback(t,this._state),e)),null);a.length&&[...a].forEach((t=>{this._replace(e,t)}))}}class _ extends e.Command{constructor(e,t){super(e),this.affectsData=!1,this._state=t,this.isEnabled=!1,this.listenTo(this._state.results,"change",(()=>{this.isEnabled=this._state.results.length>1}))}refresh(){this.isEnabled=this._state.results.length>1}execute(){const e=this._state.results,t=e.getIndex(this._state.highlightedResult),i=t+1>=e.length?0:t+1;this._state.highlightedResult=this._state.results.get(i)}}class w extends _{execute(){const e=this._state.results.getIndex(this._state.highlightedResult),t=e-1<0?this._state.results.length-1:e-1;this._state.highlightedResult=this._state.results.get(t)}}class b extends((0,r.ObservableMixin)()){constructor(e){super(),this.set("results",new r.Collection),this.set("highlightedResult",null),this.set("searchText",""),this.set("replaceText",""),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",((t,{removed:i,index:n})=>{if(Array.from(i).length){let t=!1;if(e.change((n=>{for(const r of i)this.highlightedResult===r&&(t=!0),e.markers.has(r.marker.name)&&n.removeMarker(r.marker)})),t){const e=n>=this.results.length?0:n;this.highlightedResult=this.results.get(e)}}}))}clear(e){this.searchText="",e.change((t=>{if(this.highlightedResult){const i=this.highlightedResult.marker.name.split(":")[1],n=e.markers.get(`findResultHighlighted:${i}`);n&&t.removeMarker(n)}[...this.results].forEach((({marker:e})=>{t.removeMarker(e)}))})),this.results.clear()}}const v="object"==typeof global&&global&&global.Object===Object&&global;var x="object"==typeof self&&self&&self.Object===Object&&self;const y=v||x||Function("return this")();const T=y.Symbol;const R=function(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r};const V=Array.isArray;var C=Object.prototype,F=C.hasOwnProperty,E=C.toString,A=T?T.toStringTag:void 0;const B=function(e){var t=F.call(e,A),i=e[A];try{e[A]=void 0;var n=!0}catch(e){}var r=E.call(e);return n&&(t?e[A]=i:delete e[A]),r};var I=Object.prototype.toString;const N=function(e){return I.call(e)};var O=T?T.toStringTag:void 0;const S=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O&&O in Object(e)?B(e):N(e)};const P=function(e){return null!=e&&"object"==typeof e};const M=function(e){return"symbol"==typeof e||P(e)&&"[object Symbol]"==S(e)};var j=T?T.prototype:void 0,D=j?j.toString:void 0;const $=function e(t){if("string"==typeof t)return t;if(V(t))return R(t,e)+"";if(M(t))return D?D.call(t):"";var i=t+"";return"0"==i&&1/t==-Infinity?"-0":i};const W=function(e){return null==e?"":$(e)};var H=/[\\^$.*+?()[\]{}|]/g,L=RegExp(H.source);const U=function(e){return(e=W(e))&&L.test(e)?e.replace(H,"\\$&"):e};class Z extends e.Plugin{static get pluginName(){return"FindAndReplaceUtils"}updateFindResultFromRange(e,t,i,n){const s=n||new r.Collection;return t.change((n=>{[...e].forEach((({type:e,item:a})=>{if("elementStart"===e&&t.schema.checkChild(a,"$text")){const e=i({item:a,text:this.rangeToText(t.createRangeIn(a))});if(!e)return;e.forEach((e=>{const t=`findResult:${(0,r.uid)()}`,i=n.addMarker(t,{usingOperation:!1,affectsData:!1,range:n.createRange(n.createPositionAt(a,e.start),n.createPositionAt(a,e.end))}),o=function(e,t){const i=e.find((({marker:e})=>t.getStart().isBefore(e.getStart())));return i?e.getIndex(i):e.length}(s,i);s.add({id:t,label:e.label,marker:i},o)}))}}))})),s}rangeToText(e){return Array.from(e.getItems()).reduce(((e,t)=>t.is("$text")||t.is("$textProxy")?e+t.data:`${e}\n`),"")}findByTextCallback(e,t){let i="gu";t.matchCase||(i+="i");let n=`(${U(e)})`;if(t.wholeWords){const t="[^a-zA-ZÀ-ɏḀ-ỿ]";new RegExp("^"+t).test(e)||(n=`(^|${t}|_)${n}`),new RegExp(t+"$").test(e)||(n=`${n}(?=_|${t}|$)`)}const r=new RegExp(n,i);return function({text:e}){return[...e.matchAll(r)].map(z)}}}function z(e){const t=e.length-1;let i=e.index;return 3===e.length&&(i+=e[1].length),{label:e[t],start:i,end:i+e[t].length}}const K=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const q=function(){return y.Date.now()};var J=/\s/;const Y=function(e){for(var t=e.length;t--&&J.test(e.charAt(t)););return t};var G=/^\s+/;const Q=function(e){return e?e.slice(0,Y(e)+1).replace(G,""):e};var X=/^[-+]0x[0-9a-f]+$/i,ee=/^0b[01]+$/i,te=/^0o[0-7]+$/i,ie=parseInt;const ne=function(e){if("number"==typeof e)return e;if(M(e))return NaN;if(K(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=K(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Q(e);var i=ee.test(e);return i||te.test(e)?ie(e.slice(2),i?2:8):X.test(e)?NaN:+e};var re=Math.max,se=Math.min;const ae=function(e,t,i){var n,r,s,a,o,c,l=0,d=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function u(t){var i=n,s=r;return n=r=void 0,l=t,a=e.apply(s,i)}function p(e){var i=e-c;return void 0===c||i>=t||i<0||f&&e-l>=s}function m(){var e=q();if(p(e))return g(e);o=setTimeout(m,function(e){var i=t-(e-c);return f?se(i,s-(e-l)):i}(e))}function g(e){return o=void 0,h&&n?u(e):(n=r=void 0,a)}function k(){var e=q(),i=p(e);if(n=arguments,r=this,c=e,i){if(void 0===o)return function(e){return l=e,o=setTimeout(m,t),d?u(e):a}(c);if(f)return clearTimeout(o),o=setTimeout(m,t),u(c)}return void 0===o&&(o=setTimeout(m,t)),a}return t=ne(t)||0,K(i)&&(d=!!i.leading,s=(f="maxWait"in i)?re(ne(i.maxWait)||0,t):s,h="trailing"in i?!!i.trailing:h),k.cancel=function(){void 0!==o&&clearTimeout(o),l=0,n=c=r=o=void 0},k.flush=function(){return void 0===o?a:g(q())},k};var oe=i(355),ce={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};a()(oe.Z,ce);oe.Z.locals;class le extends e.Plugin{static get requires(){return[Z]}static get pluginName(){return"FindAndReplaceEditing"}init(){this._activeResults=null,this.state=new b(this.editor.model),this._defineConverters(),this._defineCommands(),this.listenTo(this.state,"change:highlightedResult",((e,t,i,n)=>{const{model:r}=this.editor;r.change((e=>{if(n){const t=n.marker.name.split(":")[1],i=r.markers.get(`findResultHighlighted:${t}`);i&&e.removeMarker(i)}if(i){const t=i.marker.name.split(":")[1];e.addMarker(`findResultHighlighted:${t}`,{usingOperation:!1,affectsData:!1,range:i.marker.getRange()})}}))}));const e=ae(((e,t,i)=>{if(i){const e=this.editor.editing.view.domConverter,t=this.editor.editing.mapper.toViewRange(i.marker.getRange());(0,r.scrollViewportToShowTarget)({target:e.viewRangeToDom(t),viewportOffset:40})}}).bind(this),32);this.listenTo(this.state,"change:highlightedResult",e,{priority:"low"}),this.listenTo(this.editor,"destroy",e.cancel)}find(e){const{editor:t}=this,{model:i}=t,{findCallback:n,results:r}=t.execute("find",e);return this._activeResults=r,this.listenTo(i.document,"change:data",(()=>function(e,t,i){const n=new Set,r=new Set,s=t.model;s.document.differ.getChanges().forEach((e=>{"$text"===e.name||s.schema.isInline(e.position.nodeAfter)?(n.add(e.position.parent),[...s.markers.getMarkersAtPosition(e.position)].forEach((e=>{r.add(e.name)}))):"insert"===e.type&&n.add(e.position.nodeAfter)})),s.document.differ.getChangedMarkers().forEach((({name:e,data:{newRange:t}})=>{t&&"$graveyard"===t.start.root.rootName&&r.add(e)})),n.forEach((e=>{[...s.markers.getMarkersIntersectingRange(s.createRangeIn(e))].forEach((e=>r.add(e.name)))})),s.change((t=>{r.forEach((i=>{e.has(i)&&e.remove(i),t.removeMarker(i)}))})),n.forEach((n=>{t.plugins.get("FindAndReplaceUtils").updateFindResultFromRange(s.createRangeOn(n),s,i,e)}))}(this._activeResults,t,n))),this._activeResults}stop(){this._activeResults&&(this.stopListening(this.editor.model.document),this.state.clear(this.editor.model),this._activeResults=null)}_defineCommands(){this.editor.commands.add("find",new p(this.editor,this.state)),this.editor.commands.add("findNext",new _(this.editor,this.state)),this.editor.commands.add("findPrevious",new w(this.editor,this.state)),this.editor.commands.add("replace",new g(this.editor,this.state)),this.editor.commands.add("replaceAll",new k(this.editor,this.state))}_defineConverters(){const{editor:e}=this;e.conversion.for("editingDowncast").markerToHighlight({model:"findResult",view:({markerName:e})=>{const[,t]=e.split(":");return{name:"span",classes:["ck-find-result"],attributes:{"data-find-result":t}}}}),e.conversion.for("editingDowncast").markerToHighlight({model:"findResultHighlighted",view:({markerName:e})=>{const[,t]=e.split(":");return{name:"span",classes:["ck-find-result_selected"],attributes:{"data-find-result":t}}}})}}class de extends e.Plugin{static get requires(){return[le,u]}static get pluginName(){return"FindAndReplace"}init(){const e=this.editor.plugins.get("FindAndReplaceUI"),t=this.editor.plugins.get("FindAndReplaceEditing"),i=t.state;e.on("findNext",((e,t)=>{t?(i.searchText=t.searchText,this.editor.execute("find",t.searchText,t)):this.editor.execute("findNext")})),e.on("findPrevious",((e,t)=>{t&&i.searchText!==t.searchText?this.editor.execute("find",t.searchText):this.editor.execute("findPrevious")})),e.on("replace",((e,t)=>{i.searchText!==t.searchText&&this.editor.execute("find",t.searchText);const n=i.highlightedResult;n&&this.editor.execute("replace",t.replaceText,n)})),e.on("replaceAll",((e,t)=>{i.searchText!==t.searchText&&this.editor.execute("find",t.searchText),this.editor.execute("replaceAll",t.replaceText,i.results)})),e.on("searchReseted",(()=>{i.clear(this.editor.model),t.stop()}))}}})(),(window.CKEditor5=window.CKEditor5||{}).findAndReplace=n})();
{
"name": "@ckeditor/ckeditor5-find-and-replace",
"version": "38.1.0",
"version": "38.1.1",
"description": "Find and replace feature for CKEditor 5.",

@@ -15,4 +15,4 @@ "keywords": [

"dependencies": {
"@ckeditor/ckeditor5-ui": "38.1.0",
"ckeditor5": "38.1.0",
"@ckeditor/ckeditor5-ui": "38.1.1",
"ckeditor5": "38.1.1",
"lodash-es": "^4.17.15"

@@ -19,0 +19,0 @@ },

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc