@micromag/ckeditor 0.3.547 → 0.3.549
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.
package/dist/build.cjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see build.cjs.LICENSE.txt */
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,(function(){return function(){var e,t,n={9246:function(e,t,n){const i=n(6931),o={};for(const e of Object.keys(i))o[i[e]]=e;const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=s;for(const e of Object.keys(s)){if(!("channels"in s[e]))throw new Error("missing channels property: "+e);if(!("labels"in s[e]))throw new Error("missing channel labels property: "+e);if(s[e].labels.length!==s[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=s[e];delete s[e].channels,delete s[e].labels,Object.defineProperty(s[e],"channels",{value:t}),Object.defineProperty(s[e],"labels",{value:n})}s.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,o=Math.min(t,n,i),s=Math.max(t,n,i),r=s-o;let a,l;s===o?a=0:t===s?a=(n-i)/r:n===s?a=2+(i-t)/r:i===s&&(a=4+(t-n)/r),a=Math.min(60*a,360),a<0&&(a+=360);const c=(o+s)/2;return l=s===o?0:c<=.5?r/(s+o):r/(2-s-o),[a,100*l,100*c]},s.rgb.hsv=function(e){let t,n,i,o,s;const r=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(r,a,l),d=c-Math.min(r,a,l),h=function(e){return(c-e)/6/d+.5};return 0===d?(o=0,s=0):(s=d/c,t=h(r),n=h(a),i=h(l),r===c?o=i-n:a===c?o=1/3+t-i:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*s,100*c]},s.rgb.hwb=function(e){const t=e[0],n=e[1];let i=e[2];const o=s.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(n,i));return i=1-1/255*Math.max(t,Math.max(n,i)),[o,100*r,100*i]},s.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,o=Math.min(1-t,1-n,1-i);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-i-o)/(1-o)||0),100*o]},s.rgb.keyword=function(e){const t=o[e];if(t)return t;let n,s=1/0;for(const t of Object.keys(i)){const o=(a=i[t],((r=e)[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2);o<s&&(s=o,n=t)}var r,a;return n},s.keyword.rgb=function(e){return i[e]},s.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,i=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,[100*(.4124*t+.3576*n+.1805*i),100*(.2126*t+.7152*n+.0722*i),100*(.0193*t+.1192*n+.9505*i)]},s.rgb.lab=function(e){const t=s.rgb.xyz(e);let n=t[0],i=t[1],o=t[2];return n/=95.047,i/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,[116*i-16,500*(n-i),200*(i-o)]},s.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,i=e[2]/100;let o,s,r;if(0===n)return r=255*i,[r,r,r];o=i<.5?i*(1+n):i+n-i*n;const a=2*i-o,l=[0,0,0];for(let e=0;e<3;e++)s=t+1/3*-(e-1),s<0&&s++,s>1&&s--,r=6*s<1?a+6*(o-a)*s:2*s<1?o:3*s<2?a+(o-a)*(2/3-s)*6:a,l[e]=255*r;return l},s.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,i=e[2]/100,o=n;const s=Math.max(i,.01);return i*=2,n*=i<=1?i:2-i,o*=s<=1?s:2-s,[t,100*(0===i?2*o/(s+o):2*n/(i+n)),(i+n)/2*100]},s.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let i=e[2]/100;const o=Math.floor(t)%6,s=t-Math.floor(t),r=255*i*(1-n),a=255*i*(1-n*s),l=255*i*(1-n*(1-s));switch(i*=255,o){case 0:return[i,l,r];case 1:return[a,i,r];case 2:return[r,i,l];case 3:return[r,a,i];case 4:return[l,r,i];case 5:return[i,r,a]}},s.hsv.hsl=function(e){const t=e[0],n=e[1]/100,i=e[2]/100,o=Math.max(i,.01);let s,r;r=(2-n)*i;const a=(2-n)*o;return s=n*o,s/=a<=1?a:2-a,s=s||0,r/=2,[t,100*s,100*r]},s.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,i=e[2]/100;const o=n+i;let s;o>1&&(n/=o,i/=o);const r=Math.floor(6*t),a=1-i;s=6*t-r,1&r&&(s=1-s);const l=n+s*(a-n);let c,d,h;switch(r){default:case 6:case 0:c=a,d=l,h=n;break;case 1:c=l,d=a,h=n;break;case 2:c=n,d=a,h=l;break;case 3:c=n,d=l,h=a;break;case 4:c=l,d=n,h=a;break;case 5:c=a,d=n,h=l}return[255*c,255*d,255*h]},s.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,i=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,i*(1-o)+o))]},s.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,i=e[2]/100;let o,s,r;return o=3.2406*t+-1.5372*n+-.4986*i,s=-.9689*t+1.8758*n+.0415*i,r=.0557*t+-.204*n+1.057*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),r=Math.min(Math.max(0,r),1),[255*o,255*s,255*r]},s.xyz.lab=function(e){let t=e[0],n=e[1],i=e[2];return t/=95.047,n/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*n-16,500*(t-n),200*(n-i)]},s.lab.xyz=function(e){let t,n,i;n=(e[0]+16)/116,t=e[1]/500+n,i=n-e[2]/200;const o=n**3,s=t**3,r=i**3;return n=o>.008856?o:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,i=r>.008856?r:(i-16/116)/7.787,t*=95.047,n*=100,i*=108.883,[t,n,i]},s.lab.lch=function(e){const t=e[0],n=e[1],i=e[2];let o;return o=360*Math.atan2(i,n)/2/Math.PI,o<0&&(o+=360),[t,Math.sqrt(n*n+i*i),o]},s.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI;return[t,n*Math.cos(i),n*Math.sin(i)]},s.rgb.ansi16=function(e,t=null){const[n,i,o]=e;let r=null===t?s.rgb.hsv(e)[2]:t;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(o/255)<<2|Math.round(i/255)<<1|Math.round(n/255));return 2===r&&(a+=60),a},s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])},s.rgb.ansi256=function(e){const t=e[0],n=e[1],i=e[2];return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},s.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},s.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},s.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},s.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},s.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,o=Math.max(Math.max(t,n),i),s=Math.min(Math.min(t,n),i),r=o-s;let a,l;return a=r<1?s/(1-r):0,l=r<=0?0:o===t?(n-i)/r%6:o===n?2+(i-t)/r:4+(t-n)/r,l/=6,l%=1,[360*l,100*r,100*a]},s.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,i=n<.5?2*t*n:2*t*(1-n);let o=0;return i<1&&(o=(n-.5*i)/(1-i)),[e[0],100*i,100*o]},s.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,i=t*n;let o=0;return i<1&&(o=(n-i)/(1-i)),[e[0],100*i,100*o]},s.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,i=e[2]/100;if(0===n)return[255*i,255*i,255*i];const o=[0,0,0],s=t%1*6,r=s%1,a=1-r;let l=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=r,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=r;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=r,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return l=(1-n)*i,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},s.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let i=0;return n>0&&(i=t/n),[e[0],100*i,100*n]},s.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let i=0;return n>0&&n<.5?i=t/(2*n):n>=.5&&n<1&&(i=t/(2*(1-n))),[e[0],100*i,100*n]},s.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},s.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,i=n-t;let o=0;return i<1&&(o=(n-i)/(1-i)),[e[0],100*i,100*o]},s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},s.gray.hsl=function(e){return[0,0,e[0]]},s.gray.hsv=s.gray.hsl,s.gray.hwb=function(e){return[0,100,e[0]]},s.gray.cmyk=function(e){return[0,0,0,e[0]]},s.gray.lab=function(e){return[e[0],0,0]},s.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},s.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},9047:function(e,t,n){const i=n(9246),o=n(802),s={};Object.keys(i).forEach((e=>{s[e]={},Object.defineProperty(s[e],"channels",{value:i[e].channels}),Object.defineProperty(s[e],"labels",{value:i[e].labels});const t=o(e);Object.keys(t).forEach((n=>{const i=t[n];s[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const i=e(t);if("object"==typeof i)for(let e=i.length,t=0;t<e;t++)i[t]=Math.round(i[t]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}(i),s[e][n].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(i)}))})),e.exports=s},802:function(e,t,n){const i=n(9246);function o(e,t){return function(n){return t(e(n))}}function s(e,t){const n=[t[e].parent,e];let s=i[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)n.unshift(t[r].parent),s=o(i[t[r].parent][r],s),r=t[r].parent;return s.conversion=n,s}e.exports=function(e){const t=function(e){const t=function(){const e={},t=Object.keys(i);for(let n=t.length,i=0;i<n;i++)e[t[i]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){const e=n.pop(),o=Object.keys(i[e]);for(let i=o.length,s=0;s<i;s++){const i=o[s],r=t[i];-1===r.distance&&(r.distance=t[e].distance+1,r.parent=e,n.unshift(i))}}return t}(e),n={},o=Object.keys(t);for(let e=o.length,i=0;i<e;i++){const e=o[i];null!==t[e].parent&&(n[e]=s(e,t))}return n}},6931:function(e){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},898:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content code {\n\tbackground-color: hsla(0, 0%, 78%, 0.3);\n\tpadding: .15em;\n\tborder-radius: 2px;\n}\n\n.ck.ck-editor__editable .ck-code_selected {\n\tbackground-color: hsla(0, 0%, 78%, 0.5);\n}\n"],sourceRoot:""}]),t.A=r},9975:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAWC,0BAAsC,CADtC,iBAAkB,CAFlB,aAAc,CACd,cAAe,CAPf,eAAgB,CAIhB,kBAAmB,CADnB,mBAOD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir="rtl"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n'],sourceRoot:""}]),t.A=r},4812:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle{display:none}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}.ck.ck-clipboard-drop-target-line{pointer-events:none;position:absolute}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-clipboard/theme/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CAEf,mBAAoB,CADpB,iBAOD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAOA,6EACC,YACD,CAEA,wEACC,YACD,CAIF,kCAEC,mBAAoB,CADpB,iBAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: inline;\n\t\tposition: relative;\n\t\tpointer-events: none;\n\n\t\t& span {\n\t\t\tposition: absolute;\n\t\t\twidth: 0;\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\t& > .ck-widget__selection-handle {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& > .ck-widget__type-around {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n.ck.ck-clipboard-drop-target-line {\n\tposition: absolute;\n\tpointer-events: none;\n}\n"],sourceRoot:""}]),t.A=r},4075:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css"],names:[],mappings:"AAKA,cAIC,iBAMD,CAJC,2DAEC,yBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor {\n\t/* All the elements within `.ck-editor` are positioned relatively to it.\n\t If any element needs to be positioned with respect to the <body>, etc.,\n\t it must land outside of the `.ck-editor` in DOM. */\n\tposition: relative;\n\n\t& .ck-editor__top .ck-sticky-panel .ck-toolbar {\n\t\t/* https://github.com/ckeditor/ckeditor5-editor-classic/issues/62 */\n\t\tz-index: var(--ck-z-panel);\n\t}\n}\n"],sourceRoot:""}]),t.A=r},8465:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-engine/theme/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDAIC,8BAA+B,CAF/B,MAAO,CAKP,mBAAoB,CANpB,iBAAkB,CAElB,OAKD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\t/* See ckeditor/ckeditor5#469. */\n\t\tpointer-events: none;\n\t}\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\n}\n"],sourceRoot:""}]),t.A=r},1909:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]),t.A=r},6232:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-heading/theme/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-heading_heading1 {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 {\n\tfont-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n\tfont-weight: bold;\n}\n'],sourceRoot:""}]),t.A=r},4356:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,":root{--ck-highlight-marker-yellow:#fdfd77;--ck-highlight-marker-green:#62f962;--ck-highlight-marker-pink:#fc7899;--ck-highlight-marker-blue:#72ccfd;--ck-highlight-pen-red:#e71313;--ck-highlight-pen-green:#128a00}.ck-content .marker-yellow{background-color:#fdfd77;background-color:var(--ck-highlight-marker-yellow)}.ck-content .marker-green{background-color:#62f962;background-color:var(--ck-highlight-marker-green)}.ck-content .marker-pink{background-color:#fc7899;background-color:var(--ck-highlight-marker-pink)}.ck-content .marker-blue{background-color:#72ccfd;background-color:var(--ck-highlight-marker-blue)}.ck-content .pen-red{background-color:transparent;color:#e71313;color:var(--ck-highlight-pen-red)}.ck-content .pen-green{background-color:transparent;color:#128a00;color:var(--ck-highlight-pen-green)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-highlight/theme/highlight.css"],names:[],mappings:"AAKA,MACC,oCAA+C,CAC/C,mCAA+C,CAC/C,kCAA8C,CAC9C,kCAA8C,CAC9C,8BAAwC,CACxC,gCACD,CAGC,2BACC,wBAAmD,CAAnD,kDACD,CAFA,0BACC,wBAAmD,CAAnD,iDACD,CAFA,yBACC,wBAAmD,CAAnD,gDACD,CAFA,yBACC,wBAAmD,CAAnD,gDACD,CAIA,qBAIC,4BAA6B,CAH7B,aAAqC,CAArC,iCAID,CALA,uBAIC,4BAA6B,CAH7B,aAAqC,CAArC,mCAID",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-highlight-marker-yellow: hsl(60, 97%, 73%);\n\t--ck-highlight-marker-green: hsl(120, 93%, 68%);\n\t--ck-highlight-marker-pink: hsl(345, 96%, 73%);\n\t--ck-highlight-marker-blue: hsl(201, 97%, 72%);\n\t--ck-highlight-pen-red: hsl(0, 85%, 49%);\n\t--ck-highlight-pen-green: hsl(112, 100%, 27%);\n}\n\n@define-mixin highlight-marker-color $color {\n\t.ck-content .marker-$color {\n\t\tbackground-color: var(--ck-highlight-marker-$color);\n\t}\n}\n\n@define-mixin highlight-pen-color $color {\n\t.ck-content .pen-$color {\n\t\tcolor: var(--ck-highlight-pen-$color);\n\n\t\t/* Override default yellow background of `<mark>` from user agent stylesheet */\n\t\tbackground-color: transparent;\n\t}\n}\n\n@mixin highlight-marker-color yellow;\n@mixin highlight-marker-color green;\n@mixin highlight-marker-color pink;\n@mixin highlight-marker-color blue;\n\n@mixin highlight-pen-color red;\n@mixin highlight-pen-color green;\n"],sourceRoot:""}]),t.A=r},5604:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;height:auto;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{-ms-flex-align:start;align-items:flex-start;display:-ms-inline-flexbox;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:-ms-flexbox;display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{-ms-flex-positive:1;-ms-flex-negative:1;flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image{z-index:1}.ck.ck-editor__editable .image.ck-widget_selected{z-index:2}.ck.ck-editor__editable .image-inline{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected{z-index:2}.ck.ck-editor__editable .image-inline.ck-widget_selected ::-moz-selection{display:none}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable .image-inline img{height:auto}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBA2BD,CAjBC,uBAEC,aAAc,CAad,WAAY,CAVZ,aAAc,CAGd,cAAe,CAGf,cAKD,CAGD,0BAYC,oBAAuB,CAAvB,sBAAuB,CANvB,0BAAoB,CAApB,mBAAoB,CAGpB,cAoBD,CAdC,kCACC,mBAAa,CAAb,YACD,CAGA,gEAGC,mBAAY,CACZ,mBAAc,CADd,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAKA,+BACC,SASD,CAHC,kDACC,SACD,CAMD,sCACC,SAkBD,CAZC,yDACC,SAUD,CAHC,0EACC,YACD,CAFA,qEACC,YACD,CAMF,0CACC,WACD,CAMC,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content {\n\t& .image {\n\t\tdisplay: table;\n\t\tclear: both;\n\t\ttext-align: center;\n\n\t\t/* Make sure there is some space between the content and the image. Center image by default. */\n\t\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\t \tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\t\tmargin: 0.9em auto;\n\n\t\t/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\n\t\tmin-width: 50px;\n\n\t\t& img {\n\t\t\t/* Prevent unnecessary margins caused by line-height (see #44). */\n\t\t\tdisplay: block;\n\n\t\t\t/* Center the image if its width is smaller than the content\'s width. */\n\t\t\tmargin: 0 auto;\n\n\t\t\t/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\n\t\t\tmax-width: 100%;\n\n\t\t\t/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\n\t\t\tmin-width: 100%;\n\n\t\t\t/* Keep proportions of the block image if the height is set and the image is wider than the editor width.\n\t\t\tSee https://github.com/ckeditor/ckeditor5/issues/14542. */\n\t\t\theight: auto;\n\t\t}\n\t}\n\n\t& .image-inline {\n\t\t/*\n\t\t * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).\n\t\t * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.\n\t\t * This strange behavior does not happen with inline-flex.\n\t\t */\n\t\tdisplay: inline-flex;\n\n\t\t/* While being resized, don\'t allow the image to exceed the width of the editing root. */\n\t\tmax-width: 100%;\n\n\t\t/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\n\t\talign-items: flex-start;\n\n\t\t/* When the picture is present it must act as a flex container to let the img resize properly */\n\t\t& picture {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t/* When the picture is present, it must act like a resizable img. */\n\t\t& picture,\n\t\t& img {\n\t\t\t/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\n\t\t\tflex-grow: 1;\n\t\t\tflex-shrink: 1;\n\n\t\t\t/* Prevents overflowing the editing root boundaries when an inline image is very wide. */\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Inhertit the content styles padding of the <figcaption> in case the integration overrides `text-align: center`\n\t * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\n\t * caret does, and not at the edge of <figcaption>.\n\t */\n\t& .image > figcaption.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the image caption placeholder doesn\'t overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t/*\n\t * See https://github.com/ckeditor/ckeditor5/issues/15115.\n\t */\n\t& .image {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the selected image always stays on top of its siblings.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t\t */\n\t\t&.ck-widget_selected {\n\t\t\tz-index: 2;\n\t\t}\n\t}\n\n\t/*\n\t * See https://github.com/ckeditor/ckeditor5/issues/15115.\n\t */\n\t& .image-inline {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the selected inline image always stays on top of its siblings.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t\t */\n\t\t&.ck-widget_selected {\n\t\t\tz-index: 2;\n\n\t\t\t/*\n\t\t\t * Make sure the native browser selection style is not displayed.\n\t\t\t * Inline image widgets have their own styles for the selected state and\n\t\t\t * leaving this up to the browser is asking for a visual collision.\n\t\t\t */\n\t\t\t& ::selection {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Keep proportions of the inline image if the height is set and the image is wider than the editor width.\n\tSee https://github.com/ckeditor/ckeditor5/issues/14542. */\n\t& .image-inline img {\n\t\theight: auto;\n\t}\n\n\t/* The inline image nested in the table should have its original size if not resized.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline img {\n\t\t\tmax-width: none;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.A=r},7908:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highlighted-background:#fd0}.ck-content .image>figcaption{background-color:#f7f7f7;background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:#333;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{-webkit-animation:ck-image-caption-highlight .6s ease-out;animation:ck-image-caption-highlight .6s ease-out}@-webkit-keyframes ck-image-caption-highlight{0%{background-color:#fd0;background-color:var(--ck-color-image-caption-highlighted-background)}to{background-color:#f7f7f7;background-color:var(--ck-color-image-caption-background)}}@keyframes ck-image-caption-highlight{0%{background-color:#fd0;background-color:var(--ck-color-image-caption-highlighted-background)}to{background-color:#f7f7f7;background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/imagecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,oDACD,CAGA,8BAKC,wBAA0D,CAA1D,yDAA0D,CAH1D,mBAAoB,CAEpB,UAAyC,CAAzC,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAMD,CAGA,qEACC,yDAAkD,CAAlD,iDACD,CAEA,8CACC,GACC,qBAAsE,CAAtE,qEACD,CAEA,GACC,wBAA0D,CAA1D,yDACD,CACD,CARA,sCACC,GACC,qBAAsE,CAAtE,qEACD,CAEA,GACC,wBAA0D,CAA1D,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-image-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-image-caption-highlighted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .image > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: bottom;\n\tword-break: break-word;\n\tcolor: var(--ck-color-image-caption-text);\n\tbackground-color: var(--ck-color-image-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\n\tanimation: ck-image-caption-highlight .6s ease-out;\n}\n\n@keyframes ck-image-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-image-caption-highlighted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-image-caption-background);\n\t}\n}\n"],sourceRoot:""}]),t.A=r},8003:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-image-insert-url .ck-image-insert-url__action-row{display:grid;grid-template-columns:repeat(2,1fr)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/imageinsert.css"],names:[],mappings:"AAMC,yDACC,YAAa,CACb,mCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-image-insert-url {\n\t& .ck-image-insert-url__action-row {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(2, 1fr);\n\t}\n}\n"],sourceRoot:""}]),t.A=r},5241:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-editor__editable img.image_placeholder{background-size:100% 100%}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/imageplaceholder.css"],names:[],mappings:"AAMC,8CACC,yBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& img.image_placeholder {\n\t\tbackground-size: 100% 100%;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},1232:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck-content img.image_resized{height:auto}.ck-content .image.image_resized{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAMA,8BACC,WACD,CAEA,iCAQC,6BAAsB,CAAtB,qBAAsB,CADtB,aAAc,CANd,cAkBD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Preserve aspect ratio of the resized image after introducing image height attribute. */\n.ck-content img.image_resized {\n\theight: auto;\n}\n\n.ck-content .image.image_resized {\n\tmax-width: 100%;\n\t/*\n\tThe `<figure>` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.\n\tSee https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.\n\tFortunately, since we control the width, there is no risk that the image will look bad.\n\t*/\n\tdisplay: block;\n\tbox-sizing: border-box;\n\n\t& img {\n\t\t/* For resized images it is the `<figure>` element that determines the image width. */\n\t\twidth: 100%;\n\t}\n\n\t& > figcaption {\n\t\t/* The `<figure>` element uses `display:block`, so `<figcaption>` also has to. */\n\t\tdisplay: block;\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/* The resized inline image nested in the table should respect its parent size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline.image_resized img {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-right: var(--ck-spacing-standard);\n}\n\n[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-left: var(--ck-spacing-standard);\n}\n\n.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {\n\twidth: 4em;\n}\n'],sourceRoot:""}]),t.A=r},9797:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - 1.5em);max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:1.5em;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:1.5em;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:1.5em;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:.75em;margin-bottom:var(--ck-inline-image-style-spacing);margin-top:.75em;margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:.75em;margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:.75em;margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,4BAAqD,CAArD,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,iBAA0C,CAA1C,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,kBAA2C,CAA3C,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,iBAA0C,CAA1C,yCACD,CAEA,2CAEC,gBAAiB,CADjB,cAED,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,YACD,CAGC,mGAGC,mBAAmD,CAAnD,kDAAmD,CADnD,gBAAgD,CAAhD,+CAED,CAEA,iDACC,kBAAkD,CAAlD,iDACD,CAEA,kDACC,iBAAiD,CAAjD,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-image-style-spacing: 1.5em;\n\t--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);\n}\n\n.ck-content {\n\t/* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\n\tconfirming successful application of the style if image width exceeds the editor's size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9342 */\n\t& .image-style-block-align-left,\n\t& .image-style-block-align-right {\n\t\tmax-width: calc(100% - var(--ck-image-style-spacing));\n\t}\n\n\t/* Allows displaying multiple floating images in the same line.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\n\t& .image-style-align-left,\n\t& .image-style-align-right {\n\t\tclear: none;\n\t}\n\n\t& .image-style-side {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t\tmax-width: 50%;\n\t}\n\n\t& .image-style-align-left {\n\t\tfloat: left;\n\t\tmargin-right: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-align-center {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t}\n\n\t& .image-style-align-right {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-block-align-right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\n\t& .image-style-block-align-left {\n\t\tmargin-left: 0;\n\t\tmargin-right: auto;\n\t}\n\n\t/* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\n\t& p + .image-style-align-left,\n\t& p + .image-style-align-right,\n\t& p + .image-style-side {\n\t\tmargin-top: 0;\n\t}\n\n\t& .image-inline {\n\t\t&.image-style-align-left,\n\t\t&.image-style-align-right {\n\t\t\tmargin-top: var(--ck-inline-image-style-spacing);\n\t\t\tmargin-bottom: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-left {\n\t\t\tmargin-right: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-right {\n\t\t\tmargin-left: var(--ck-inline-image-style-spacing);\n\t\t}\n\t}\n}\n\n.ck.ck-splitbutton {\n\t/* The button should display as a regular drop-down if the action button\n\tis forced to fire the same action as the arrow button. */\n\t&.ck-splitbutton_flatten {\n\t\t&:hover,\n\t\t&.ck-splitbutton_open {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-background);\n\n\t\t\t\t&::after {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.ck-splitbutton_open:hover {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-hover-background);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.A=r},524:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}',"",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/imageuploadicon.css"],names:[],mappings:"AAKA,+BAUC,iBAAkB,CATlB,aAAc,CACd,iBAAkB,CAOlB,sCAAwC,CADxC,oCAAsC,CAGtC,SAMD,CAJC,qCACC,UAAW,CACX,iBACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-image-upload-complete-icon {\n\tdisplay: block;\n\tposition: absolute;\n\n\t/*\n\t * Smaller images should have the icon closer to the border.\n\t * Match the icon position with the linked image indicator brought by the link image feature.\n\t */\n\ttop: min(var(--ck-spacing-medium), 6%);\n\tright: min(var(--ck-spacing-medium), 6%);\n\tborder-radius: 50%;\n\tz-index: 1;\n\n\t&::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t}\n}\n'],sourceRoot:""}]),t.A=r},9402:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,'.ck .ck-upload-placeholder-loader{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;display:-ms-flexbox;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}',"",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/imageuploadloader.css"],names:[],mappings:"AAKA,kCAGC,qBAAmB,CACnB,oBAAuB,CADvB,kBAAmB,CADnB,mBAAa,CAAb,YAAa,CAEb,sBAAuB,CAEvB,MAAO,CALP,iBAAkB,CAIlB,KAOD,CAJC,yCACC,UAAW,CACX,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-upload-placeholder-loader {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttop: 0;\n\tleft: 0;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},394:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\tposition: relative;\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},5575:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-text-alternative-form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{-ms-flex-wrap:wrap;flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{-ms-flex-preferred-size:100%;flex-basis:100%}.ck.ck-text-alternative-form .ck-button{-ms-flex-preferred-size:50%;flex-basis:50%}}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-image/theme/textalternativeform.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,mBAAa,CAAb,YAAa,CACb,sBAAmB,CAAnB,kBAAmB,CACnB,oBAAiB,CAAjB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,kBAAe,CAAf,cAUF,CARE,oDACC,4BAAgB,CAAhB,eACD,CAEA,wCACC,2BAAe,CAAf,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-text-alternative-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},4142:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},1165:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-link-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{-ms-flex-wrap:wrap;flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{-ms-flex-preferred-size:100%;flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){-ms-flex-preferred-size:50%;flex-basis:50%}}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-link/theme/linkactions.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,oBACC,mBAAa,CAAb,YAAa,CACb,sBAAmB,CAAnB,kBAAmB,CACnB,oBAAiB,CAAjB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,kBAAe,CAAf,cAUF,CARE,8CACC,4BAAgB,CAAhB,eACD,CAEA,8DACC,2BAAe,CAAf,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-link-actions__preview {\n\t\tdisplay: inline-block;\n\n\t\t& .ck-button__label {\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-link-actions__preview {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},5656:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-link-form{display:-ms-flexbox;display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{-ms-flex-wrap:wrap;flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{-ms-flex-preferred-size:100%;flex-basis:100%}.ck.ck-link-form .ck-button{-ms-flex-preferred-size:50%;flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-link/theme/linkform.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,iBACC,mBAAa,CAAb,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,kBAAe,CAAf,cAUF,CARE,wCACC,4BAAgB,CAAhB,eACD,CAEA,4BACC,2BAAe,CAAf,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-form {\n\tdisplay: flex;\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tdisplay: block;\n\n\t/*\n\t * Whether the form is in the responsive mode or not, if there are decorator buttons\n\t * keep the top margin of action buttons medium.\n\t */\n\t& .ck-button {\n\t\t&.ck-button-save,\n\t\t&.ck-button-cancel {\n\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},427:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-link/theme/linkimage.css"],names:[],mappings:"AASE,+FACC,aAAc,CACd,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/* Linked image indicator */\n\t& figure.image > a,\n\t& a span.image-inline {\n\t\t&::after {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]),t.A=r},8677:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-list/theme/documentlist.css"],names:[],mappings:"AAKA,8CACC,aACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-editor__editable .ck-list-bogus-paragraph {\n\tdisplay: block;\n}\n"],sourceRoot:""}]),t.A=r},3434:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-list/theme/list.css"],names:[],mappings:"AAKA,eACC,uBAiBD,CAfC,kBACC,2BAaD,CAXC,qBACC,2BASD,CAPC,wBACC,2BAKD,CAHC,2BACC,2BACD,CAMJ,eACC,oBAaD,CAXC,kBACC,sBASD,CAJE,6CACC,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content ol {\n\tlist-style-type: decimal;\n\n\t& ol {\n\t\tlist-style-type: lower-latin;\n\n\t\t& ol {\n\t\t\tlist-style-type: lower-roman;\n\n\t\t\t& ol {\n\t\t\t\tlist-style-type: upper-latin;\n\n\t\t\t\t& ol {\n\t\t\t\t\tlist-style-type: upper-roman;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck-content ul {\n\tlist-style-type: disc;\n\n\t& ul {\n\t\tlist-style-type: circle;\n\n\t\t& ul {\n\t\t\tlist-style-type: square;\n\n\t\t\t& ul {\n\t\t\t\tlist-style-type: square;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.A=r},2157:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},6864:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-list-styles-list{display:grid}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-list/theme/liststyles.css"],names:[],mappings:"AAKA,wBACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-styles-list {\n\tdisplay: grid;\n}\n"],sourceRoot:""}]),t.A=r},4522:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px;position:relative}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:16px;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:16px;width:var(--ck-todo-list-checkmark-size)}.ck-content[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;-webkit-box-sizing:border-box;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;-webkit-transition:box-shadow .25s ease-in-out;transition:box-shadow .25s ease-in-out;width:100%}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 2px 2px 0;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;-webkit-box-sizing:content-box;box-sizing:content-box;content:"";display:block;height:6.15385px;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:5.33333px;left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:3.01887px;top:calc(var(--ck-todo-list-checkmark-size)/5.3);-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);width:3.01887px;width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}.ck-editor__editable.ck-content .todo-list .todo-list__label>input,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{cursor:pointer}.ck-editor__editable.ck-content .todo-list .todo-list__label>input:hover:before,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:hover:before{-webkit-box-shadow:0 0 0 5px rgba(0,0,0,.1);box-shadow:0 0 0 5px rgba(0,0,0,.1)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{-webkit-appearance:none;border:0;display:inline-block;height:16px;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:16px;width:var(--ck-todo-list-checkmark-size)}.ck-editor__editable.ck-content[dir=rtl] .todo-list .todo-list__label>span[contenteditable=false]>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{border:1px solid #333;border-radius:2px;-webkit-box-sizing:border-box;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;-webkit-transition:box-shadow .25s ease-in-out;transition:box-shadow .25s ease-in-out;width:100%}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:after{border-color:transparent;border-style:solid;border-width:0 2px 2px 0;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;-webkit-box-sizing:content-box;box-sizing:content-box;content:"";display:block;height:6.15385px;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:5.33333px;left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:3.01887px;top:calc(var(--ck-todo-list-checkmark-size)/5.3);-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);width:3.01887px;width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:after{border-color:#fff}.ck-editor__editable.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}',"",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-list/theme/todolist.css"],names:[],mappings:"AAKA,MACC,kCACD,CAwEA,uBACC,eAwBD,CAtBC,0BAEC,iBAAkB,CADlB,iBAMD,CAHC,qCACC,cACD,CAIA,+CAlFD,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,WAA0C,CAA1C,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,UAAyC,CAAzC,wCAiFC,CAFA,wDAhEA,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAgEA,CA5DD,sDAOC,qBAAiC,CACjC,iBAAkB,CALlB,6BAAsB,CAAtB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,8CAAwC,CAAxC,sCAAwC,CAJxC,UAKD,CAEA,qDAcC,wBAA+G,CAA/G,kBAA+G,CAA/G,wBAA+G,CAA/G,sGAA+G,CAX/G,8BAAuB,CAAvB,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,gBAAwD,CAAxD,mDAAwD,CAHxD,cAAoD,CAApD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,aAAqD,CAArD,gDAAqD,CAMrD,+BAAwB,CAAxB,2BAAwB,CAAxB,uBAAwB,CALxB,eAAuD,CAAvD,kDAMD,CAGC,+DACC,kBAA8B,CAC9B,oBACD,CAEA,8DACC,iBACD,CAwBA,wEACC,qBACD,CAEA,mGACC,iBACD,CAYD,kKAEC,cAKD,CAHC,4LACC,2CAA0C,CAA1C,mCACD,CAMD,+FApHA,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,WAA0C,CAA1C,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,UAAyC,CAAzC,wCAmHA,CAFA,wGAlGC,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAkGD,CA9FA,sGAOC,qBAAiC,CACjC,iBAAkB,CALlB,6BAAsB,CAAtB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,8CAAwC,CAAxC,sCAAwC,CAJxC,UAKD,CAEA,qGAcC,wBAA+G,CAA/G,kBAA+G,CAA/G,wBAA+G,CAA/G,sGAA+G,CAX/G,8BAAuB,CAAvB,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,gBAAwD,CAAxD,mDAAwD,CAHxD,cAAoD,CAApD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,aAAqD,CAArD,gDAAqD,CAMrD,+BAAwB,CAAxB,2BAAwB,CAAxB,uBAAwB,CALxB,eAAuD,CAAvD,kDAMD,CAGC,+GACC,kBAA8B,CAC9B,oBACD,CAEA,8GACC,iBACD,CA2DA,uHACC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-todo-list-checkmark-size: 16px;\n}\n\n@define-mixin todo-list-checkbox {\n\t-webkit-appearance: none;\n\tdisplay: inline-block;\n\tposition: relative;\n\twidth: var(--ck-todo-list-checkmark-size);\n\theight: var(--ck-todo-list-checkmark-size);\n\tvertical-align: middle;\n\n\t/* Needed on iOS */\n\tborder: 0;\n\n\t/* LTR styles */\n\tleft: -25px;\n\tmargin-right: -15px;\n\tright: 0;\n\tmargin-left: 0;\n\n\t/* RTL styles */\n\t@nest [dir=rtl]& {\n\t\tleft: 0;\n\t\tmargin-right: 0;\n\t\tright: -25px;\n\t\tmargin-left: -15px;\n\t}\n\n\t&::before {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tbox-sizing: border-box;\n\t\tcontent: '';\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: 1px solid hsl(0, 0%, 20%);\n\t\tborder-radius: 2px;\n\t\ttransition: 250ms ease-in-out box-shadow;\n\t}\n\n\t&::after {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tbox-sizing: content-box;\n\t\tpointer-events: none;\n\t\tcontent: '';\n\n\t\t/* Calculate tick position, size and border-width proportional to the checkmark size. */\n\t\tleft: calc( var(--ck-todo-list-checkmark-size) / 3 );\n\t\ttop: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\twidth: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\theight: calc( var(--ck-todo-list-checkmark-size) / 2.6 );\n\t\tborder-style: solid;\n\t\tborder-color: transparent;\n\t\tborder-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;\n\t\ttransform: rotate(45deg);\n\t}\n\n\t&[checked] {\n\t\t&::before {\n\t\t\tbackground: hsl(126, 64%, 41%);\n\t\t\tborder-color: hsl(126, 64%, 41%);\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: hsl(0, 0%, 100%);\n\t\t}\n\t}\n}\n\n/*\n * To-do list content styles.\n */\n.ck-content .todo-list {\n\tlist-style: none;\n\n\t& li {\n\t\tposition: relative;\n\t\tmargin-bottom: 5px;\n\n\t\t& .todo-list {\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n\n\t& .todo-list__label {\n\t\t& > input {\n\t\t\t@mixin todo-list-checkbox;\n\t\t}\n\n\t\t& .todo-list__label__description {\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&.todo-list__label_without-description input[type=checkbox] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n\n/*\n * To-do list editing view styles.\n */\n.ck-editor__editable.ck-content .todo-list .todo-list__label {\n\t/*\n\t * To-do list should be interactive only during the editing\n\t * (https://github.com/ckeditor/ckeditor5/issues/2090).\n\t */\n\t& > input,\n\t& > span[contenteditable=false] > input {\n\t\tcursor: pointer;\n\n\t\t&:hover::before {\n\t\t\tbox-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);\n\t\t}\n\t}\n\n\t/*\n\t * Document Lists - editing view has an additional span around checkbox.\n\t */\n\t& > span[contenteditable=false] > input {\n\t\t@mixin todo-list-checkbox;\n\t}\n\n\t&.todo-list__label_without-description {\n\t\t& input[type=checkbox] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.A=r},245:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck-content .media{clear:both;display:block;margin:.9em 0;min-width:15em}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaembed.css"],names:[],mappings:"AAKA,mBAGC,UAAW,CASX,aAAc,CAJd,aAAe,CAQf,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .media {\n\t/* Don\'t allow floated content overlap the media.\n\thttps://github.com/ckeditor/ckeditor5-media-embed/issues/53 */\n\tclear: both;\n\n\t/* Make sure there is some space between the content and the media. */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em 0;\n\n\t/* Make sure media is not overriden with Bootstrap default `flex` value.\n\tSee: https://github.com/ckeditor/ckeditor5/issues/1373. */\n\tdisplay: block;\n\n\t/* Give the media some minimal width in the content to prevent them\n\tfrom being "squashed" in tight spaces, e.g. in table cells (#44) */\n\tmin-width: 15em;\n}\n'],sourceRoot:""}]),t.A=r},9381:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,'.ck-media__wrapper .ck-media__placeholder{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{display:block;overflow:hidden}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder){pointer-events:none}.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}',"",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaembedediting.css"],names:[],mappings:"AAMC,0CAGC,qBAAmB,CAAnB,kBAAmB,CAFnB,mBAAa,CAAb,YAAa,CACb,yBAAsB,CAAtB,qBAcD,CAXC,sEAEC,cAAe,CAEf,iBAMD,CAJC,wGAEC,aAAc,CADd,eAED,CAWD,6kBACC,YACD,CAMF,wFACC,mBACD,CAIA,mGACC,mBACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-media__wrapper {\n\t& .ck-media__placeholder {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\n\t\t& .ck-media__placeholder__url {\n\t\t\t/* Otherwise the URL will overflow when the content is very narrow. */\n\t\t\tmax-width: 100%;\n\n\t\t\tposition: relative;\n\n\t\t\t& .ck-media__placeholder__url__text {\n\t\t\t\toverflow: hidden;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="twitter.com"],\n\t&[data-oembed-url*="google.com/maps"],\n\t&[data-oembed-url*="goo.gl/maps"],\n\t&[data-oembed-url*="maps.google.com"],\n\t&[data-oembed-url*="maps.app.goo.gl"],\n\t&[data-oembed-url*="facebook.com"],\n\t&[data-oembed-url*="instagram.com"] {\n\t\t& .ck-media__placeholder__icon * {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/* Disable all mouse interaction as long as the editor is not read–only.\n https://github.com/ckeditor/ckeditor5-media-embed/issues/58 */\n.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper > *:not(.ck-media__placeholder) {\n\tpointer-events: none;\n}\n\n/* Disable all mouse interaction when the widget is not selected (e.g. to avoid opening links by accident).\n https://github.com/ckeditor/ckeditor5-media-embed/issues/18 */\n.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder {\n\tpointer-events: none;\n}\n'],sourceRoot:""}]),t.A=r},7698:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-media-form{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{-ms-flex-wrap:wrap;flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{-ms-flex-preferred-size:100%;flex-basis:100%}.ck.ck-media-form .ck-button{-ms-flex-preferred-size:50%;flex-basis:50%}}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaform.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,kBAEC,oBAAuB,CAAvB,sBAAuB,CADvB,mBAAa,CAAb,YAAa,CAEb,sBAAmB,CAAnB,kBAAmB,CACnB,oBAAiB,CAAjB,gBAqBD,CAnBC,yCACC,oBACD,CAEA,4BACC,YACD,CCbA,oCDCD,kBAeE,kBAAe,CAAf,cAUF,CARE,yCACC,4BAAgB,CAAhB,eACD,CAEA,6BACC,2BAAe,CAAf,cACD,CCtBD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-media-form {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},6532:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-aria-live-announcer{left:-10000px;position:absolute;top:-10000px}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/arialiveannouncer/arialiveannouncer.css"],names:[],mappings:"AAKA,2BAEC,aAAc,CADd,iBAAkB,CAElB,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-aria-live-announcer {\n\tposition: absolute;\n\tleft: -10000px;\n\ttop: -10000px;\n}\n"],sourceRoot:""}]),t.A=r},974:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-autocomplete{position:relative}.ck.ck-autocomplete>.ck-search__results{position:absolute;z-index:var(--ck-z-panel)}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{bottom:100%}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{bottom:auto;top:100%}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/autocomplete/autocomplete.css"],names:[],mappings:"AAKA,oBACC,iBAeD,CAbC,wCACC,iBAAkB,CAClB,yBAUD,CARC,6DACC,WACD,CAEA,6DAEC,WAAY,CADZ,QAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-autocomplete {\n\tposition: relative;\n\n\t& > .ck-search__results {\n\t\tposition: absolute;\n\t\tz-index: var(--ck-z-panel);\n\n\t\t&.ck-search__results_n {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-search__results_s {\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.A=r},5738:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-button,a.ck.ck-button{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir=ltr] .ck.ck-button,[dir=ltr] a.ck.ck-button{-ms-flex-pack:left;justify-content:left}[dir=rtl] .ck.ck-button,[dir=rtl] a.ck.ck-button{-ms-flex-pack:right;justify-content:right}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){-ms-flex-pack:center;justify-content:center}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/button/button.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css"],names:[],mappings:"AAQA,6BAMC,qBAAmB,CAAnB,kBAAmB,CADnB,0BAAoB,CAApB,mBAAoB,CADpB,iBAAkB,CCHlB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD0BD,CA9BA,iDASE,kBAAqB,CAArB,oBAqBF,CA9BA,iDAaE,mBAAsB,CAAtB,qBAiBF,CAdC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,oBAAuB,CAAvB,sBACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n@import "../../mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-unselectable;\n\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\n\t@mixin ck-dir ltr {\n\t\tjustify-content: left;\n\t}\n\n\t@mixin ck-dir rtl {\n\t\tjustify-content: right;\n\t}\n\n\t& .ck-button__label {\n\t\tdisplay: none;\n\t}\n\n\t&.ck-button_with-text {\n\t\t& .ck-button__label {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t/* Center the icon horizontally in a button without text. */\n\t&:not(.ck-button_with-text) {\n\t\tjustify-content: center;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n"],sourceRoot:""}]),t.A=r},2954:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/button/switchbutton.css"],names:[],mappings:"AASE,4HACC,aACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__toggle {\n\t\tdisplay: block;\n\n\t\t& .ck-button__toggle__inner {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.A=r},172:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/collapsible/collapsible.css"],names:[],mappings:"AAMC,sEACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-collapsible.ck-collapsible_collapsed {\n\t& > .ck-collapsible__children {\n\t\tdisplay: none;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},9040:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-color-grid{display:grid}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/colorgrid/colorgrid.css"],names:[],mappings:"AAKA,kBACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-color-grid {\n\tdisplay: grid;\n}\n"],sourceRoot:""}]),t.A=r},5348:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".color-picker-hex-input{width:-webkit-max-content;width:-moz-max-content;width:max-content}.color-picker-hex-input .ck.ck-input{min-width:0;min-width:auto}.ck.ck-color-picker__row{-ms-flex-pack:justify;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;justify-content:space-between;margin:var(--ck-spacing-large) 0 0;width:auto}.ck.ck-color-picker__row .ck.ck-labeled-field-view{padding-top:0}.ck.ck-color-picker__row .ck.ck-input-text{width:auto}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/colorpicker/colorpicker.css"],names:[],mappings:"AAKA,wBACC,yBAAkB,CAAlB,sBAAkB,CAAlB,iBAKD,CAHC,qCACC,WAAgB,CAAhB,cACD,CAGD,yBAIC,qBAA8B,CAH9B,mBAAa,CAAb,YAAa,CACb,sBAAmB,CAAnB,kBAAmB,CACnB,oBAAiB,CAAjB,gBAAiB,CACjB,6BAA8B,CAC9B,kCAAmC,CACnC,UAcD,CAZC,mDACC,aACD,CAEA,2CACC,UACD,CAEA,qDAEC,sCAAuC,CADvC,kCAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.color-picker-hex-input {\n\twidth: max-content;\n\n\t& .ck.ck-input {\n\t\tmin-width: unset;\n\t}\n}\n\n.ck.ck-color-picker__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\tmargin: var(--ck-spacing-large) 0 0;\n\twidth: unset;\n\n\t& .ck.ck-labeled-field-view {\n\t\tpadding-top: unset;\n\t}\n\n\t& .ck.ck-input-text {\n\t\twidth: unset;\n\t}\n\n\t& .ck-color-picker__hash-view {\n\t\tpadding-top: var(--ck-spacing-tiny);\n\t\tpadding-right: var(--ck-spacing-medium);\n\t}\n}\n"],sourceRoot:""}]),t.A=r},5616:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{-ms-flex-pack:start;justify-content:flex-start}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{-ms-flex-pack:distribute;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;justify-content:space-around}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-cancel,.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-save{-ms-flex:1 1;flex:1 1}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/colorselector/colorselector.css"],names:[],mappings:"AAUE,oLAGC,qBAAmB,CAAnB,kBAAmB,CADnB,mBAAa,CAAb,YAMD,CARA,wMAME,mBAA2B,CAA3B,0BAEF,CAKA,iFAGC,wBAA6B,CAF7B,mBAAa,CAAb,YAAa,CACb,sBAAmB,CAAnB,kBAAmB,CACnB,4BAMD,CAJC,oMAEC,YAAM,CAAN,QACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-color-selector {\n\t/* View fragment with color grids. */\n\t& .ck-color-grids-fragment {\n\t\t& .ck-button.ck-color-selector__remove-color,\n\t\t& .ck-button.ck-color-selector__color-picker {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tjustify-content: flex-start;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* View fragment with a color picker. */\n\t& .ck-color-picker-fragment {\n\t\t& .ck.ck-color-selector_action-bar {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tjustify-content: space-around;\n\n\t\t\t& .ck-button-save,\n\t\t\t& .ck-button-cancel {\n\t\t\t\tflex: 1\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.A=r},3502:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-dialog-overlay{-ms-scroll-chaining:none;bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent{-webkit-animation:none;animation:none;background:none;pointer-events:none}.ck.ck-dialog{-ms-scroll-chaining:none;overscroll-behavior:none;position:absolute;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.ck.ck-dialog .ck.ck-form__header{-ms-flex-negative:0;flex-shrink:0}.ck.ck-dialog .ck.ck-form__header .ck-form__header__label{cursor:-webkit-grab;cursor:grab}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent .ck.ck-dialog{pointer-events:all}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/dialog/dialog.css"],names:[],mappings:"AAKA,sBAEC,wBAAyB,CAGzB,QAAS,CACT,MAAO,CAJP,wBAAyB,CAEzB,cAAe,CAGf,OAAQ,CACR,KAAM,CAPN,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAcD,CALC,qDAEC,sBAAe,CAAf,cAAe,CACf,eAAgB,CAFhB,mBAGD,CAGD,cACC,wBAAyB,CAAzB,wBAAyB,CAEzB,iBAAkB,CADlB,yBAAkB,CAAlB,sBAAkB,CAAlB,iBAcD,CAXC,kCACC,mBAAc,CAAd,aAKD,CAHC,0DACC,mBAAY,CAAZ,WACD,CAVF,mEAcE,kBAEF",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-dialog-overlay {\n\tuser-select: none;\n\toverscroll-behavior: none;\n\n\tposition: fixed;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\n\t&.ck-dialog-overlay__transparent {\n\t\tpointer-events: none;\n\t\tanimation: none;\n\t\tbackground: none;\n\t}\n}\n\n.ck.ck-dialog {\n\toverscroll-behavior: none;\n\twidth: fit-content;\n\tposition: absolute;\n\n\t& .ck.ck-form__header {\n\t\tflex-shrink: 0;\n\n\t\t& .ck-form__header__label {\n\t\t\tcursor: grab;\n\t\t}\n\t}\n\n\t@nest .ck.ck-dialog-overlay.ck-dialog-overlay__transparent & {\n\t\tpointer-events: all;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},5101:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-dialog .ck.ck-dialog__actions{-ms-flex-pack:end;display:-ms-flexbox;display:flex;justify-content:flex-end}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/dialog/dialogactions.css"],names:[],mappings:"AAMC,qCAEC,iBAAyB,CADzB,mBAAa,CAAb,YAAa,CACb,wBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-dialog {\n\t& .ck.ck-dialog__actions {\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},8456:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:75vw;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;-webkit-transform:translateX(-75%);-ms-transform:translateX(-75%);transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;-webkit-transform:translateX(-25%);-ms-transform:translateX(-25%);transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-panel) + 1)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/dropdown.css"],names:[],mappings:"AAKA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBA2ED,CAzEC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UACD,CAEA,oCACC,YAAa,CAEb,cAAuC,CAAvC,sCAAuC,CAEvC,iBAAkB,CAHlB,yBA4DD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSAUC,WAAY,CADZ,QAED,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,kCAA2B,CAA3B,8BAA2B,CAA3B,0BACD,CAEA,sHAGC,QAAS,CACT,kCAA2B,CAA3B,8BAA2B,CAA3B,0BACD,CAEA,sHAGC,QAAS,CACT,kCAA2B,CAA3B,8BAA2B,CAA3B,0BACD,CAQF,mCACC,mCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-dropdown-max-width: 75vw;\n}\n\n.ck.ck-dropdown {\n\tdisplay: inline-block;\n\tposition: relative;\n\n\t& .ck-dropdown__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n\n\t/* Dropdown button should span horizontally, e.g. in vertical toolbars */\n\t& .ck-button.ck-dropdown__button {\n\t\twidth: 100%;\n\t}\n\n\t& .ck-dropdown__panel {\n\t\tdisplay: none;\n\t\tz-index: var(--ck-z-panel);\n\t\tmax-width: var(--ck-dropdown-max-width);\n\n\t\tposition: absolute;\n\n\t\t&.ck-dropdown__panel-visible {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_n,\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_nme {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-dropdown__panel_se,\n\t\t&.ck-dropdown__panel_sw,\n\t\t&.ck-dropdown__panel_smw,\n\t\t&.ck-dropdown__panel_sme,\n\t\t&.ck-dropdown__panel_s {\n\t\t\t/*\n\t\t\t * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\n\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/1053.\n\t\t\t */\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_se {\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_sw {\n\t\t\tright: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_s,\n\t\t&.ck-dropdown__panel_n {\n\t\t\t/* Positioning panels relative to the center of the button */\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_smw {\n\t\t\t/* Positioning panels relative to the middle-west of the button */\n\t\t\tleft: 75%;\n\t\t\ttransform: translateX(-75%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nme,\n\t\t&.ck-dropdown__panel_sme {\n\t\t\t/* Positioning panels relative to the middle-east of the button */\n\t\t\tleft: 25%;\n\t\t\ttransform: translateX(-25%);\n\t\t}\n\t}\n}\n\n/*\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\n * See https://github.com/ckeditor/ckeditor5/issues/7874\n */\n.ck.ck-toolbar .ck-dropdown__panel {\n\tz-index: calc( var(--ck-z-panel) + 1 );\n}\n"],sourceRoot:""}]),t.A=r},8976:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},3307:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/splitbutton.css"],names:[],mappings:"AAKA,mBAEC,iBAKD,CAHC,iDACC,qCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-splitbutton {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-splitbutton__action:focus {\n\t\tz-index: calc(var(--ck-z-default) + 1);\n\t}\n}\n\n"],sourceRoot:""}]),t.A=r},1837:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:60vw;max-width:var(--ck-toolbar-dropdown-max-width);width:-webkit-max-content;width:-moz-max-content;width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAGC,cAA+C,CAA/C,8CAA+C,CAD/C,yBAAkB,CAAlB,sBAAkB,CAAlB,iBAQD,CAJE,6DACC,qCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-dropdown-max-width: 60vw;\n}\n\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\n\t/* https://github.com/ckeditor/ckeditor5/issues/5586 */\n\twidth: max-content;\n\tmax-width: var(--ck-toolbar-dropdown-max-width);\n\n\t& .ck-button {\n\t\t&:focus {\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.A=r},3100:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},1680:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},8496:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-form__header{-ms-flex-align:center;-ms-flex-pack:justify;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__header h2.ck-form__header__label{-ms-flex-positive:1;flex-grow:1}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,qBAAmB,CACnB,qBAA8B,CAD9B,kBAAmB,CAHnB,mBAAa,CAAb,YAAa,CACb,sBAAmB,CAAnB,kBAAmB,CACnB,oBAAiB,CAAjB,gBAAiB,CAEjB,6BAKD,CAHC,8CACC,mBAAY,CAAZ,WACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__header {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\talign-items: center;\n\tjustify-content: space-between;\n\n\t& h2.ck-form__header__label {\n\t\tflex-grow: 1;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},8652:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-highlighted-text mark{background:var(--ck-color-highlight-background);font-size:inherit;font-weight:inherit;line-height:inherit;vertical-align:baseline;vertical-align:initial}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/highlightedtext/highlightedtext.css"],names:[],mappings:"AAKA,6BACC,+CAAgD,CAIhD,iBAAkB,CAFlB,mBAAoB,CACpB,mBAAoB,CAFpB,uBAAuB,CAAvB,sBAID",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-highlighted-text mark {\n\tbackground: var(--ck-color-highlight-background);\n\tvertical-align: initial;\n\tfont-weight: inherit;\n\tline-height: inherit;\n\tfont-size: inherit;\n}\n"],sourceRoot:""}]),t.A=r},3992:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-icon{vertical-align:middle}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-icon {\n\tvertical-align: middle;\n}\n"],sourceRoot:""}]),t.A=r},2400:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},4068:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tdisplay: block;\n}\n\n.ck.ck-voice-label {\n\tdisplay: none;\n}\n"],sourceRoot:""}]),t.A=r},83:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:-ms-flexbox;display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css"],names:[],mappings:"AAMC,mEACC,mBAAa,CAAb,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-field-view {\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t}\n\n\t& .ck.ck-label {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},2982:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/list/list.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css"],names:[],mappings:"AAOA,YAGC,mBAAa,CAAb,YAAa,CACb,yBAAsB,CAAtB,qBAAsB,CCFtB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDaD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-list {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t& .ck-list__item,\n\t& .ck-list__separator {\n\t\tdisplay: block;\n\t}\n\n\t/* Make sure that whatever child of the list item gets focus, it remains on the\n\ttop. Thanks to that, styles like box-shadow, outline, etc. are not masked by\n\tadjacent list items. */\n\t& .ck-list__item > *:focus {\n\t\tposition: relative;\n\t\tz-index: var(--ck-z-default);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n"],sourceRoot:""}]),t.A=r},8796:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},3601:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-menu-bar__menu{display:block;position:relative}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/menubar/menubarmenu.css"],names:[],mappings:"AAKA,sBACC,aAAc,CACd,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-menu-bar__menu {\n\tdisplay: block;\n\tposition: relative;\n}\n"],sourceRoot:""}]),t.A=r},7097:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{pointer-events:none;z-index:var(--ck-z-default)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/menubar/menubarmenubutton.css"],names:[],mappings:"AAMC,mFACC,mBAAoB,CACpB,2BACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-menu-bar__menu {\n\t& > .ck-menu-bar__menu__button > .ck-menu-bar__menu__button__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n}\n"],sourceRoot:""}]),t.A=r},7308:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},840:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},2027:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,":root{--ck-menu-bar-menu-max-width:75vw;--ck-menu-bar-nested-menu-horizontal-offset:5px}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{max-width:75vw;max-width:var(--ck-menu-bar-menu-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw{bottom:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{bottom:auto;top:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{left:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{right:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{left:calc(100% - 5px);left:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en{bottom:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{right:calc(100% - 5px);right:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{bottom:0}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/menubar/menubarmenupanel.css"],names:[],mappings:"AAKA,MACC,iCAAkC,CAClC,+CACD,CAEA,mDAEC,cAA4C,CAA5C,2CAA4C,CAC5C,iBAAkB,CAFlB,yBAkDD,CA9CC,gLAEC,WACD,CAEA,gLAGC,WAAY,CADZ,QAED,CAEA,gLAEC,MACD,CAEA,gLAEC,OACD,CAEA,gLAEC,qBAAqE,CAArE,kEACD,CAEA,wFACC,KACD,CAEA,wFACC,QACD,CAEA,gLAEC,sBAAsE,CAAtE,mEACD,CAEA,wFACC,KACD,CAEA,wFACC,QACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-menu-bar-menu-max-width: 75vw;\n\t--ck-menu-bar-nested-menu-horizontal-offset: 5px;\n}\n\n.ck.ck-menu-bar__menu > .ck.ck-menu-bar__menu__panel {\n\tz-index: var(--ck-z-panel);\n\tmax-width: var(--ck-menu-bar-menu-max-width);\n\tposition: absolute;\n\n\t&.ck-menu-bar__menu__panel_position_ne,\n\t&.ck-menu-bar__menu__panel_position_nw {\n\t\tbottom: 100%;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_se,\n\t&.ck-menu-bar__menu__panel_position_sw {\n\t\ttop: 100%;\n\t\tbottom: auto;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ne,\n\t&.ck-menu-bar__menu__panel_position_se {\n\t\tleft: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_nw,\n\t&.ck-menu-bar__menu__panel_position_sw {\n\t\tright: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_es,\n\t&.ck-menu-bar__menu__panel_position_en {\n\t\tleft: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) );\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_es {\n\t\ttop: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_en {\n\t\tbottom: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ws,\n\t&.ck-menu-bar__menu__panel_position_wn {\n\t\tright: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) );\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ws {\n\t\ttop: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_wn {\n\t\tbottom: 0px;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},8793:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-panel)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}',"",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonpanel.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Make sure the balloon arrow does not float over its children. */\n\t--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\n}\n\n.ck.ck-balloon-panel {\n\tdisplay: none;\n\tposition: absolute;\n\n\tz-index: var(--ck-z-panel);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tposition: absolute;\n\t\t}\n\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_visible {\n\t\tdisplay: block;\n\t}\n}\n'],sourceRoot:""}]),t.A=r},6432:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck .ck-balloon-rotator__navigation{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.ck .ck-balloon-rotator__content .ck-toolbar,.ck .ck-balloon-rotator__navigation{-ms-flex-pack:center;justify-content:center}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCAEC,qBAAmB,CAAnB,kBAAmB,CADnB,mBAAa,CAAb,YAGD,CAKA,iFANC,oBAAuB,CAAvB,sBAQD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\n */\n.ck .ck-balloon-rotator__content .ck-toolbar {\n\tjustify-content: center;\n}\n"],sourceRoot:""}]),t.A=r},6481:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-panel) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/fakepanel.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-fake-panel {\n\tposition: absolute;\n\n\t/* Fake panels should be placed under main balloon content. */\n\tz-index: calc(var(--ck-z-panel) - 1);\n}\n\n.ck .ck-fake-panel div {\n\tposition: absolute;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tz-index: 2;\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tz-index: 1;\n}\n"],sourceRoot:""}]),t.A=r},8099:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/stickypanel.css"],names:[],mappings:"AAMC,qDAEC,cAAe,CACf,KAAM,CAFN,yBAGD,CAEA,kEAEC,iBAAkB,CADlB,QAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\tz-index: var(--ck-z-panel); /* #315 */\n\t\tposition: fixed;\n\t\ttop: 0;\n\t}\n\n\t& .ck-sticky-panel__content_sticky_bottom-limit {\n\t\ttop: auto;\n\t\tposition: absolute;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},9665:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());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}}',"",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAQC,mCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,yCACC,YACD,CCdA,oCDoBE,wCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,8CACC,YACD,CC9BF",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck-vertical-form .ck-button {\n\t&::after {\n\t\tcontent: "";\n\t\twidth: 0;\n\t\tposition: absolute;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\tz-index: 1;\n\t}\n\n\t&:focus::after {\n\t\tdisplay: none;\n\t}\n}\n\n.ck.ck-responsive-form {\n\t@mixin ck-media-phone {\n\t\t& .ck-button {\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\n\t\t\t&:focus::after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},7898:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}[dir=ltr] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{left:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{right:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view .ck-search__reset{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{display:block}.ck.ck-search>.ck-search__results>.ck-search__info:not(.ck-hidden)~*{display:none}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/search/search.css"],names:[],mappings:"AASE,oFACC,iBAAkB,CAClB,OAAQ,CACR,kCAA2B,CAA3B,8BAA2B,CAA3B,0BASD,CAZA,8FAME,6BAMF,CAZA,8FAUE,8BAEF,CAEA,uDACC,iBAAkB,CAClB,OAAQ,CACR,kCAA2B,CAA3B,8BAA2B,CAA3B,0BACD,CAKC,oEACC,aACD,CAGA,qEACC,YACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-search {\n\t& > .ck-labeled-field-view {\n\t\t& > .ck-labeled-field-view__input-wrapper > .ck-icon {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: var(--ck-spacing-medium);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: var(--ck-spacing-medium);\n\t\t\t}\n\t\t}\n\n\t\t& .ck-search__reset {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\t}\n\n\t& > .ck-search__results {\n\t\t& > .ck-search__info {\n\t\t\t& > span:first-child {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t/* Hide the filtered view when nothing was found */\n\t\t\t&:not(.ck-hidden) ~ * {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.A=r},8568:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,":root{--ck-toolbar-spinner-size:18px}.ck.ck-spinner-container{display:block;position:relative}.ck.ck-spinner{left:0;margin:0 auto;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:1}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/spinner/spinner.css"],names:[],mappings:"AAKA,MACC,8BACD,CAEA,yBACC,aAAc,CACd,iBACD,CAEA,eAGC,MAAO,CAEP,aAAc,CAJd,iBAAkB,CAGlB,OAAQ,CAFR,OAAQ,CAIR,kCAA2B,CAA3B,8BAA2B,CAA3B,0BAA2B,CAC3B,SACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-spinner-size: 18px;\n}\n\n.ck.ck-spinner-container {\n\tdisplay: block;\n\tposition: relative;\n}\n\n.ck.ck-spinner {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 0;\n\tright: 0;\n\tmargin: 0 auto;\n\ttransform: translateY(-50%);\n\tz-index: 1;\n}\n"],sourceRoot:""}]),t.A=r},2062:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=r},7637:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-block-toolbar-button {\n\tposition: absolute;\n\tz-index: var(--ck-z-default);\n}\n"],sourceRoot:""}]),t.A=r},7520:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-toolbar{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{-ms-flex-align:center;-ms-flex-positive:1;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{-ms-flex-preferred-size:100%;flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{-ms-flex-direction:column;flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css"],names:[],mappings:"AAOA,eAKC,qBAAmB,CAAnB,kBAAmB,CAFnB,mBAAa,CAAb,YAAa,CACb,wBAAqB,CAArB,oBAAqB,CCFrB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6CD,CA3CC,kCAGC,qBAAmB,CACnB,mBAAY,CADZ,kBAAmB,CAFnB,mBAAa,CAAb,YAAa,CACb,sBAAmB,CAAnB,kBAAmB,CAEnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,4BAAgB,CAAhB,eACD,CAEA,sDACC,oBAAiB,CAAjB,gBACD,CAEA,sDACC,yBAAsB,CAAtB,qBACD,CAEA,sDACC,oBAAiB,CAAjB,gBACD,CAGC,yFACC,YACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-flow: row nowrap;\n\talign-items: center;\n\n\t& > .ck-toolbar__items {\n\t\tdisplay: flex;\n\t\tflex-flow: row wrap;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\n\t}\n\n\t& .ck.ck-toolbar__separator {\n\t\tdisplay: inline-block;\n\n\t\t/*\n\t\t * A leading or trailing separator makes no sense (separates from nothing on one side).\n\t\t * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\n\t\t * moved to another toolbar in the dropdown.\n\t\t */\n\t\t&:first-child,\n\t\t&:last-child {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\tflex-basis: 100%;\n\t}\n\n\t&.ck-toolbar_grouping > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t&.ck-toolbar_vertical > .ck-toolbar__items {\n\t\tflex-direction: column;\n\t}\n\n\t&.ck-toolbar_floating > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t& > .ck-dropdown__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n"],sourceRoot:""}]),t.A=r},1024:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck.ck-balloon-panel.ck-tooltip{z-index:calc(var(--ck-z-dialog) + 100)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/tooltip.css"],names:[],mappings:"AAKA,gCACC,sCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-balloon-panel.ck-tooltip {\n\tz-index: calc( var(--ck-z-dialog) + 100 );\n}\n"],sourceRoot:""}]),t.A=r},4791:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{-webkit-box-sizing:border-box;box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:9999}.ck-transitions-disabled,.ck-transitions-disabled *{-webkit-transition:none!important;transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);-webkit-box-shadow:none;box-shadow:none;min-height:0;min-height:auto;z-index:calc(var(--ck-z-panel) - 1)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;-webkit-filter:grayscale(80%);filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{-webkit-filter:grayscale(0);filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_inside]{border-color:transparent}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/globals/_hidden.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/globals/_reset.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/globals/_zindex.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/globals/_transition.css","webpack://./../../node_modules/@ckeditor/ckeditor5-ui/theme/globals/_poweredby.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,2EAGC,6BAAsB,CAAtB,qBAAsB,CAEtB,WAAY,CACZ,eAAgB,CAFhB,UAGD,CCPA,MACC,gBAAiB,CACjB,4CAA+C,CAC/C,kBACD,CCDA,oDAEC,iCAA2B,CAA3B,yBACD,CCNA,MACC,gCAAiC,CACjC,oCAAqC,CACrC,sCAAuC,CACvC,kCAA2C,CAC3C,qDAAsD,CACtD,+BAA4C,CAC5C,yDACD,CAEA,2CACC,qDAAsD,CAGtD,0CAA2C,CAD3C,uBAAgB,CAAhB,eAAgB,CAEhB,YAAiB,CAAjB,eAAiB,CACjB,mCAiDD,CA/CC,6DACC,4CAoCD,CAlCC,+DAGC,qBAAmB,CAAnB,kBAAmB,CAFnB,cAAe,CACf,mBAAa,CAAb,YAAa,CAGb,6BAAsB,CAAtB,qBAAsB,CACtB,4CAA6C,CAF7C,WAAY,CAGZ,qFACD,CAEA,mFASC,qCAAsC,CAFtC,cAAe,CANf,eAAgB,CAIhB,eAAiB,CAHjB,oBAAqB,CAMrB,kBAAmB,CAFnB,gBAAiB,CAHjB,gBAAiB,CACjB,wBAOD,CAEA,sEAEC,cAAe,CADf,aAED,CAGC,qEACC,2BAAqB,CAArB,mBAAqB,CACrB,SACD,CAIF,mEACC,wBACD,CAEA,mEACC,2BAA4B,CAC5B,8CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which hides an element in DOM.\n */\n.ck-hidden {\n\t/* Override selector specificity. Otherwise, all elements with some display\n\tstyle defined will override this one, which is not a desired result. */\n\tdisplay: none !important;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\tbox-sizing: border-box;\n\twidth: auto;\n\theight: auto;\n\tposition: static;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-z-default: 1;\n\t--ck-z-panel: calc( var(--ck-z-default) + 999 );\n\t--ck-z-dialog: 9999;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class that disables all transitions of the element and its children.\n */\n.ck-transitions-disabled,\n.ck-transitions-disabled * {\n\ttransition: none !important;\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-powered-by-line-height: 10px;\n\t--ck-powered-by-padding-vertical: 2px;\n\t--ck-powered-by-padding-horizontal: 4px;\n\t--ck-powered-by-text-color: hsl(0, 0%, 31%);\n\t--ck-powered-by-border-radius: var(--ck-border-radius);\n\t--ck-powered-by-background: hsl(0, 0%, 100%);\n\t--ck-powered-by-border-color: var(--ck-color-focus-border);\n}\n\n.ck.ck-balloon-panel.ck-powered-by-balloon {\n\t--ck-border-radius: var(--ck-powered-by-border-radius);\n\n\tbox-shadow: none;\n\tbackground: var(--ck-powered-by-background);\n\tmin-height: unset;\n\tz-index: calc( var(--ck-z-panel) - 1 );\n\n\t& .ck.ck-powered-by {\n\t\tline-height: var(--ck-powered-by-line-height);\n\n\t\t& a {\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\topacity: .66;\n\t\t\tfilter: grayscale(80%);\n\t\t\tline-height: var(--ck-powered-by-line-height);\n\t\t\tpadding: var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal);\n\t\t}\n\n\t\t& .ck-powered-by__label {\n\t\t\tfont-size: 7.5px;\n\t\t\tletter-spacing: -.2px;\n\t\t\tpadding-left: 2px;\n\t\t\ttext-transform: uppercase;\n\t\t\tfont-weight: bold;\n\t\t\tmargin-right: 4px;\n\t\t\tcursor: pointer;\n\t\t\tline-height: normal;\n\t\t\tcolor: var(--ck-powered-by-text-color);\n\n\t\t}\n\n\t\t& .ck-icon {\n\t\t\tdisplay: block;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&:hover {\n\t\t\t& a {\n\t\t\t\tfilter: grayscale(0%);\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[class*="position_inside"] {\n\t\tborder-color: transparent;\n\t}\n\n\t&[class*="position_border"] {\n\t\tborder: var(--ck-focus-ring);\n\t\tborder-color: var(--ck-powered-by-border-color);\n\t}\n}\n\n'],sourceRoot:""}]),t.A=r},3854:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:#262626;background:var(--ck-color-resizer-tooltip-background);border:1px solid #f2f2f2;border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:#f2f2f2;color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:10px;left:var(--ck-resizer-tooltip-offset);top:10px;top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:10px;right:var(--ck-resizer-tooltip-offset);top:10px;top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:10px;bottom:var(--ck-resizer-tooltip-offset);right:10px;right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:10px;bottom:var(--ck-resizer-tooltip-offset);left:10px;left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%)}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-widget/theme/widget.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CAID,kFACC,kBACD,CAGA,+FACC,kBACD,CAGD,kBACC,kBAAsD,CAAtD,qDAAsD,CAEtD,wBAAsD,CAAtD,qDAAsD,CACtD,6CAA8C,CAF9C,aAA2C,CAA3C,0CAA2C,CAI3C,aAAc,CADd,kCAAmC,CAGnC,uCAAwC,CACxC,4CAA6C,CAF7C,iCAsCD,CAlCC,8NAKC,iBACD,CAEA,0CAEC,SAAsC,CAAtC,qCAAsC,CADtC,QAAqC,CAArC,oCAED,CAEA,2CAEC,UAAuC,CAAvC,sCAAuC,CADvC,QAAqC,CAArC,oCAED,CAEA,8CACC,WAAwC,CAAxC,uCAAwC,CACxC,UAAuC,CAAvC,sCACD,CAEA,6CACC,WAAwC,CAAxC,uCAAwC,CACxC,SAAsC,CAAtC,qCACD,CAGA,8CAEC,QAAS,CADT,6CAAgD,CAEhD,iCAA0B,CAA1B,6BAA0B,CAA1B,yBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-resizer: var(--ck-color-focus-border);\n\t--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\n\t--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\n\n\t--ck-resizer-border-radius: var(--ck-border-radius);\n\t--ck-resizer-tooltip-offset: 10px;\n\t--ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\n}\n\n.ck .ck-widget {\n\t/* This is neccessary for type around UI to be positioned properly. */\n\tposition: relative;\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n\n\t& .ck-widget__selection-handle {\n\t\tposition: absolute;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the icon in not a subject to font-size or line-height to avoid\n\t\t\tunnecessary spacing around it. */\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t/* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n\n\t/* Show the selection handle when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n}\n\n.ck .ck-size-view {\n\tbackground: var(--ck-color-resizer-tooltip-background);\n\tcolor: var(--ck-color-resizer-tooltip-text);\n\tborder: 1px solid var(--ck-color-resizer-tooltip-text);\n\tborder-radius: var(--ck-resizer-border-radius);\n\tfont-size: var(--ck-font-size-tiny);\n\tdisplay: block;\n\tpadding: 0 var(--ck-spacing-small);\n\theight: var(--ck-resizer-tooltip-height);\n\tline-height: var(--ck-resizer-tooltip-height);\n\n\t&.ck-orientation-top-left,\n\t&.ck-orientation-top-right,\n\t&.ck-orientation-bottom-right,\n\t&.ck-orientation-bottom-left,\n\t&.ck-orientation-above-center {\n\t\tposition: absolute;\n\t}\n\n\t&.ck-orientation-top-left {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-top-right {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-right {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-left {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t/* Class applied if the widget is too small to contain the size label */\n\t&.ck-orientation-above-center {\n\t\ttop: calc(var(--ck-resizer-tooltip-height) * -1);\n\t\tleft: 50%;\n\t\ttransform: translate(-50%);\n\t}\n}\n"],sourceRoot:""}]),t.A=r},2262:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}","",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-widget/theme/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CAMb,MAAO,CAFP,mBAAoB,CAHpB,iBAAkB,CAMlB,KACD,CAGC,2EACC,aACD,CAGD,gCAIC,kBAAmB,CAHnB,iBAcD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget_with-resizer {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n}\n\n.ck .ck-widget__resizer {\n\tdisplay: none;\n\tposition: absolute;\n\n\t/* The wrapper itself should not interfere with the pointer device, only the handles should. */\n\tpointer-events: none;\n\n\tleft: 0;\n\ttop: 0;\n}\n\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\n\t& > .ck-widget__resizer {\n\t\tdisplay: block;\n\t}\n}\n\n.ck .ck-widget__resizer__handle {\n\tposition: absolute;\n\n\t/* Resizers are the only UI elements that should interfere with a pointer device. */\n\tpointer-events: all;\n\n\t&.ck-widget__resizer__handle-top-left,\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tcursor: nwse-resize;\n\t}\n\n\t&.ck-widget__resizer__handle-top-right,\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tcursor: nesw-resize;\n\t}\n}\n"],sourceRoot:""}]),t.A=r},1549:function(e,t,n){"use strict";var i=n(4991),o=n.n(i),s=n(6314),r=n.n(s)()(o());r.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}',"",{version:3,sources:["webpack://./../../node_modules/@ckeditor/ckeditor5-widget/theme/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CAEd,eAAgB,CADhB,iBAAkB,CAElB,2BAwBD,CAtBC,mDAGC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAEA,qFAGC,kBAAoB,CADpB,gDAAoD,CAGpD,kCAA2B,CAA3B,8BAA2B,CAA3B,0BACD,CAEA,oFAEC,mDAAuD,CACvD,mBAAqB,CAErB,iCAA0B,CAA1B,6BAA0B,CAA1B,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CAGd,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAMD,2EACC,YAAa,CAEb,MAAO,CADP,iBAAkB,CAElB,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHAEC,aAAc,CADd,qDAED,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\toverflow: hidden;\n\t\tz-index: var(--ck-z-default);\n\n\t\t& svg {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\tz-index: calc(var(--ck-z-default) + 2);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_before {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\ttop: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tleft: min(10%, 30px);\n\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_after {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\tbottom: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tright: min(10%, 30px);\n\n\t\t\ttransform: translateY(50%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 1px;\n\t\t\tleft: 1px;\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t}\n\n\t/*\n\t * When the widget is hovered the "fake caret" would normally be narrower than the\n\t * extra outline displayed around the widget. Let\'s extend the "fake caret" to match\n\t * the full width of the widget.\n\t */\n\t&:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tleft: calc( -1 * var(--ck-widget-outline-thickness) );\n\t\tright: calc( -1 * var(--ck-widget-outline-thickness) );\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\ttop: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tbottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n}\n\n/*\n * Integration with the read-only mode of the editor.\n */\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the restricted editing mode (feature) of the editor.\n */\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\n */\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\n\tdisplay: none;\n}\n'],sourceRoot:""}]),t.A=r},6314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var s=0;s<this.length;s++){var r=this[s][0];null!=r&&(o[r]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);i&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},4991:function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.exports=function(e){var n,i,o=(i=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var i,o,s=[],r=!0,a=!1;try{for(n=n.call(e);!(r=(i=n.next()).done)&&(s.push(i.value),!t||s.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==n.return||n.return()}finally{if(a)throw o}}return s}}(n,i)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[1],r=o[3];if(!r)return s;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),c="/*# ".concat(l," */"),d=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[s].concat(d).concat([c]).join("\n")}return[s].join("\n")}},5072:function(e,t,n){"use strict";var i,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function r(e){for(var t=-1,n=0;n<s.length;n++)if(s[n].identifier===e){t=n;break}return t}function a(e,t){for(var n={},i=[],o=0;o<e.length;o++){var a=e[o],l=t.base?a[0]+t.base:a[0],c=n[l]||0,d="".concat(l," ").concat(c);n[l]=c+1;var h=r(d),u={css:a[1],media:a[2],sourceMap:a[3]};-1!==h?(s[h].references++,s[h].updater(u)):s.push({identifier:d,updater:p(u,t),references:1}),i.push(d)}return i}function l(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var s=n.nc;s&&(i.nonce=s)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var r=o(e.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function h(e,t,n,i){var o=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{var s=document.createTextNode(o),r=e.childNodes;r[t]&&e.removeChild(r[t]),r.length?e.insertBefore(s,r[t]):e.appendChild(s)}}function u(e,t,n){var i=n.css,o=n.media,s=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var m=null,g=0;function p(e,t){var n,i,o;if(t.singleton){var s=g++;n=m||(m=l(t)),i=h.bind(null,n,s,!1),o=h.bind(null,n,s,!0)}else n=l(t),i=u.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i));var n=a(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<n.length;i++){var o=r(n[i]);s[o].references--}for(var l=a(e,t),c=0;c<n.length;c++){var d=r(n[c]);0===s[d].references&&(s[d].updater(),s.splice(d,1))}n=l}}}}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={id:e,exports:{}};return n[e](s,s.exports,o),s.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var s=Object.create(null);o.r(s);var r={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){r[e]=function(){return n[e]}}));return r.default=function(){return n},o.d(s,r),s},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var s={};return function(){"use strict";o.d(s,{default:function(){return Pk}});var e={};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,"string");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}function i(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function d(e,n,i){return n=l(n),function(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(n,i||[],l(e).constructor):n.apply(e,i))}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}o.r(e),o.d(e,{defaultPlugins:function(){return Ek},fullPlugins:function(){return Bk},inlinePlugins:function(){return Tk}});const m=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),g={isMac:f(m),isWindows:function(e){return e.indexOf("windows")>-1}(m),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(m),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(m),isiOS:function(e){return!!e.match(/iphone|ipad/i)||f(e)&&navigator.maxTouchPoints>0}(m),isAndroid:function(e){return e.indexOf("android")>-1}(m),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(m),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}};var p=g;function f(e){return e.indexOf("macintosh")>-1}function b(e,t,n,i){n=n||function(e,t){return e===t};const o=Array.isArray(e)?e:Array.prototype.slice.call(e),s=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,n){const i=w(e,t,n);if(-1===i)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const o=w(_(e,i),_(t,i),n);return{firstIndex:i,lastIndexOld:e.length-o,lastIndexNew:t.length-o}}(o,s,n),a=i?function(e,t){const{firstIndex:n,lastIndexOld:i,lastIndexNew:o}=e;if(-1===n)return Array(t).fill("equal");let s=[];return n>0&&(s=s.concat(Array(n).fill("equal"))),o-n>0&&(s=s.concat(Array(o-n).fill("insert"))),i-n>0&&(s=s.concat(Array(i-n).fill("delete"))),o<t&&(s=s.concat(Array(t-o).fill("equal"))),s}(r,s.length):function(e,t){const n=[],{firstIndex:i,lastIndexOld:o,lastIndexNew:s}=t;return s-i>0&&n.push({index:i,type:"insert",values:e.slice(i,s)}),o-i>0&&n.push({index:i+(s-i),type:"delete",howMany:o-i}),n}(s,r);return a}function w(e,t,n){for(let i=0;i<Math.max(e.length,t.length);i++)if(void 0===e[i]||void 0===t[i]||!n(e[i],t[i]))return i;return-1}function _(e,t){return e.slice(t).reverse()}function k(e,t,n){n=n||function(e,t){return e===t};const i=e.length,o=t.length;if(i>200||o>200||i+o>300)return k.fastDiff(e,t,n,!0);let s,r;if(o<i){const n=e;e=t,t=n,s="delete",r="insert"}else s="insert",r="delete";const a=e.length,l=t.length,c=l-a,d={},h={};function u(i){const o=(void 0!==h[i-1]?h[i-1]:-1)+1,c=void 0!==h[i+1]?h[i+1]:-1,u=o>c?-1:1;d[i+u]&&(d[i]=d[i+u].slice(0)),d[i]||(d[i]=[]),d[i].push(o>c?s:r);let m=Math.max(o,c),g=m-i;for(;g<a&&m<l&&n(e[g],t[m]);)g++,m++,d[i].push("equal");return m}let m,g=0;do{for(m=-g;m<c;m++)h[m]=u(m);for(m=c+g;m>c;m--)h[m]=u(m);h[c]=u(c),g++}while(h[c]!==l);return d[c].slice(1)}k.fastDiff=b;class v{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=function e(){e.called=!0},this.off=function e(){e.called=!0}}}const A=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function y(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0;return"e"+A[255&e]+A[e>>8&255]+A[e>>16&255]+A[e>>24&255]+A[255&t]+A[t>>8&255]+A[t>>16&255]+A[t>>24&255]+A[255&n]+A[n>>8&255]+A[n>>16&255]+A[n>>24&255]+A[255&i]+A[i>>8&255]+A[i>>16&255]+A[i>>24&255]}var C={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function x(e,t){const n=C.get(t.priority);for(let i=0;i<e.length;i++)if(C.get(e[i].priority)<n)return void e.splice(i,0,t);e.push(t)}const E="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class T extends Error{constructor(e,t,n){super(function(e,t){const n=new WeakSet;return e+(t?` ${JSON.stringify(t,((e,t)=>{if("object"==typeof t&&null!==t){if(n.has(t))return`[object ${t.constructor.name}]`;n.add(t)}return t}))}`:"")+P(e)}(e,n)),this.name="CKEditorError",this.context=t,this.data=n}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const n=new T(e.message,t);throw n.stack=e.stack,n}}function B(e,t){console.warn(...function(e,t){const n=P(e);return t?[e,t,n]:[e,n]}(e,t))}function P(e){return`\nRead more: ${E}#error-${e}`}const S=new Date(2024,3,16);if(globalThis.CKEDITOR_VERSION)throw new T("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION="41.3.1";const I=Symbol("listeningTo"),D=Symbol("emitterId"),O=Symbol("delegations"),M=R(Object);function R(e){return e?class extends e{on(e,t,n){this.listenTo(this,e,t,n)}once(e,t,n){let i=!1;this.listenTo(this,e,((e,...n)=>{i||(i=!0,e.off(),t.call(this,e,...n))}),n)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,n,i={}){let o,s;this[I]||(this[I]={});const r=this[I];N(e)||V(e);const a=N(e);(o=r[a])||(o=r[a]={emitter:e,callbacks:{}}),(s=o.callbacks[t])||(s=o.callbacks[t]=[]),s.push(n),function(e,t,n,i,o){t._addEventListener?t._addEventListener(n,i,o):e._addEventListener.call(t,n,i,o)}(this,e,t,n,i)}stopListening(e,t,n){const i=this[I];let o=e&&N(e);const s=i&&o?i[o]:void 0,r=s&&t?s.callbacks[t]:void 0;if(!(!i||e&&!s||t&&!r))if(n)H(this,e,t,n),-1!==r.indexOf(n)&&(1===r.length?delete s.callbacks[t]:H(this,e,t,n));else if(r){for(;n=r.pop();)H(this,e,t,n);delete s.callbacks[t]}else if(s){for(t in s.callbacks)this.stopListening(e,t);delete i[o]}else{for(o in i)this.stopListening(i[o].emitter);delete this[I]}}fire(e,...t){try{const n=e instanceof v?e:new v(this,e),i=n.name;let o=z(this,i);if(n.path.push(this),o){const e=[n,...t];o=Array.from(o);for(let t=0;t<o.length&&(o[t].callback.apply(this,e),n.off.called&&(delete n.off.called,this._removeEventListener(i,o[t].callback)),!n.stop.called);t++);}const s=this[O];if(s){const e=s.get(i),o=s.get("*");e&&j(e,n,t),o&&j(o,n,t)}return n.return}catch(e){T.rethrowUnexpectedError(e,this)}}delegate(...e){return{to:(t,n)=>{this[O]||(this[O]=new Map),e.forEach((e=>{const i=this[O].get(e);i?i.set(t,n):this[O].set(e,new Map([[t,n]]))}))}}}stopDelegating(e,t){if(this[O])if(e)if(t){const n=this[O].get(e);n&&n.delete(t)}else this[O].delete(e);else this[O].clear()}_addEventListener(e,t,n){!function(e,t){const n=F(e);if(n[t])return;let i=t,o=null;const s=[];for(;""!==i&&!n[i];)n[i]={callbacks:[],childEvents:[]},s.push(n[i]),o&&n[i].childEvents.push(o),o=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(const e of s)e.callbacks=n[i].callbacks.slice();n[i].childEvents.push(o)}}(this,e);const i=L(this,e),o={callback:t,priority:C.get(n.priority)};for(const e of i)x(e,o)}_removeEventListener(e,t){const n=L(this,e);for(const e of n)for(let n=0;n<e.length;n++)e[n].callback==t&&(e.splice(n,1),n--)}}:M}function V(e,t){e[D]||(e[D]=t||y())}function N(e){return e[D]}function F(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function L(e,t){const n=F(e)[t];if(!n)return[];let i=[n.callbacks];for(let t=0;t<n.childEvents.length;t++){const o=L(e,n.childEvents[t]);i=i.concat(o)}return i}function z(e,t){let n;return e._events&&(n=e._events[t])&&n.callbacks.length?n.callbacks:t.indexOf(":")>-1?z(e,t.substr(0,t.lastIndexOf(":"))):null}function j(e,t,n){for(let[i,o]of e){o?"function"==typeof o&&(o=o(t.name)):o=t.name;const e=new v(t.source,o);e.path=[...t.path],i.fire(e,...n)}}function H(e,t,n,i){t._removeEventListener?t._removeEventListener(n,i):e._removeEventListener.call(t,n,i)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{R[e]=M.prototype[e]}));var q=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const W=Symbol("observableProperties"),$=Symbol("boundObservables"),U=Symbol("boundProperties"),K=Symbol("decoratedMethods"),G=Symbol("decoratedOriginal"),Z=J(R());function J(e){return e?class extends e{set(e,t){if(q(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);Y(this);const n=this[W];if(e in this&&!n.has(e))throw new T("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){const i=n.get(e);let o=this.fire(`set:${e}`,e,t,i);void 0===o&&(o=t),i===o&&n.has(e)||(n.set(e,o),this.fire(`change:${e}`,e,o,i))}}),this[e]=t}bind(...e){if(!e.length||!ee(e))throw new T("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new T("observable-bind-duplicate-properties",this);Y(this);const t=this[U];e.forEach((e=>{if(t.has(e))throw new T("observable-bind-rebind",this)}));const n=new Map;return e.forEach((e=>{const i={property:e,to:[]};t.set(e,i),n.set(e,i)})),{to:Q,toMany:X,_observable:this,_bindProperties:e,_to:[],_bindings:n}}unbind(...e){if(!this[W])return;const t=this[U],n=this[$];if(e.length){if(!ee(e))throw new T("observable-unbind-wrong-properties",this);e.forEach((e=>{const i=t.get(e);i&&(i.to.forEach((([e,t])=>{const o=n.get(e),s=o[t];s.delete(i),s.size||delete o[t],Object.keys(o).length||(n.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else n.forEach(((e,t)=>{this.stopListening(t,"change")})),n.clear(),t.clear()}decorate(e){Y(this);const t=this[e];if(!t)throw new T("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,n)=>{e.return=t.apply(this,n)})),this[e]=function(...t){return this.fire(e,t)},this[e][G]=t,this[K]||(this[K]=[]),this[K].push(e)}stopListening(e,t,n){if(!e&&this[K]){for(const e of this[K])this[e]=this[e][G];delete this[K]}super.stopListening(e,t,n)}}:Z}function Y(e){e[W]||(Object.defineProperty(e,W,{value:new Map}),Object.defineProperty(e,$,{value:new Map}),Object.defineProperty(e,U,{value:new Map}))}function Q(...e){const t=function(...e){if(!e.length)throw new T("observable-bind-to-parse-error",null);const t={to:[]};let n;return"function"==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e=>{if("string"==typeof e)n.properties.push(e);else{if("object"!=typeof e)throw new T("observable-bind-to-parse-error",null);n={observable:e,properties:[]},t.to.push(n)}})),t}(...e),n=Array.from(this._bindings.keys()),i=n.length;if(!t.callback&&t.to.length>1)throw new T("observable-bind-to-no-callback",this);if(i>1&&t.callback)throw new T("observable-bind-to-extra-callback",this);var o;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==i)throw new T("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),o=this._observable,this._to.forEach((e=>{const t=o[$];let n;t.get(e.observable)||o.listenTo(e.observable,"change",((i,s)=>{n=t.get(e.observable)[s],n&&n.forEach((e=>{te(o,e.property)}))}))})),function(e){let t;e._bindings.forEach(((n,i)=>{e._to.forEach((o=>{t=o.properties[n.callback?0:e._bindProperties.indexOf(i)],n.to.push([o.observable,t]),function(e,t,n,i){const o=e[$],s=o.get(n),r=s||{};r[i]||(r[i]=new Set),r[i].add(t),s||o.set(n,r)}(e._observable,n,o.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{te(this._observable,e)}))}function X(e,t,n){if(this._bindings.size>1)throw new T("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const n=e.map((e=>[e,t]));return Array.prototype.concat.apply([],n)}(e,t),n)}function ee(e){return e.every((e=>"string"==typeof e))}function te(e,t){const n=e[U].get(t);let i;n.callback?i=n.callback.apply(e,n.to.map((e=>e[0][e[1]]))):(i=n.to[0],i=i[0][i[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=i:e.set(t,i)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{J[e]=Z.prototype[e]}));class ne{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}function ie(e){let t=0;for(const n of e)t++;return t}function oe(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++)if(e[i]!=t[i])return i;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function se(e){return!(!e||!e[Symbol.iterator])}var re="object"==typeof global&&global&&global.Object===Object&&global,ae="object"==typeof self&&self&&self.Object===Object&&self,le=re||ae||Function("return this")(),ce=le.Symbol,de=Object.prototype,he=de.hasOwnProperty,ue=de.toString,me=ce?ce.toStringTag:void 0,ge=Object.prototype.toString,pe=ce?ce.toStringTag:void 0,fe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":pe&&pe in Object(e)?function(e){var t=he.call(e,me),n=e[me];try{e[me]=void 0;var i=!0}catch(e){}var o=ue.call(e);return i&&(t?e[me]=n:delete e[me]),o}(e):function(e){return ge.call(e)}(e)},be=Array.isArray,we=function(e){return null!=e&&"object"==typeof e},_e=function(e){return"string"==typeof e||!be(e)&&we(e)&&"[object String]"==fe(e)};function ke(e,t,n={},i=[]){const o=n&&n.xmlns,s=o?e.createElementNS(o,t):e.createElement(t);for(const e in n)s.setAttribute(e,n[e]);!_e(i)&&se(i)||(i=[i]);for(let t of i)_e(t)&&(t=e.createTextNode(t)),s.appendChild(t);return s}var ve=function(e,t){return function(n){return e(t(n))}},Ae=ve(Object.getPrototypeOf,Object),ye=Function.prototype,Ce=Object.prototype,xe=ye.toString,Ee=Ce.hasOwnProperty,Te=xe.call(Object),Be=function(e){if(!we(e)||"[object Object]"!=fe(e))return!1;var t=Ae(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xe.call(n)==Te},Pe=function(e,t){return e===t||e!=e&&t!=t},Se=function(e,t){for(var n=e.length;n--;)if(Pe(e[n][0],t))return n;return-1},Ie=Array.prototype.splice;function De(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}De.prototype.clear=function(){this.__data__=[],this.size=0},De.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0||(n==t.length-1?t.pop():Ie.call(t,n,1),--this.size,0))},De.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},De.prototype.has=function(e){return Se(this.__data__,e)>-1},De.prototype.set=function(e,t){var n=this.__data__,i=Se(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var Oe=De,Me=function(e){if(!q(e))return!1;var t=fe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Re=le["__core-js_shared__"],Ve=function(){var e=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ne=Function.prototype.toString,Fe=function(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Le=/^\[object .+?Constructor\]$/,ze=Function.prototype,je=Object.prototype,He=ze.toString,qe=je.hasOwnProperty,We=RegExp("^"+He.call(qe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=function(e){return!(!q(e)||(t=e,Ve&&Ve in t))&&(Me(e)?We:Le).test(Fe(e));var t},Ue=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $e(n)?n:void 0},Ke=Ue(le,"Map"),Ge=Ue(Object,"create"),Ze=Object.prototype.hasOwnProperty,Je=Object.prototype.hasOwnProperty;function Ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ye.prototype.clear=function(){this.__data__=Ge?Ge(null):{},this.size=0},Ye.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ye.prototype.get=function(e){var t=this.__data__;if(Ge){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ze.call(t,e)?t[e]:void 0},Ye.prototype.has=function(e){var t=this.__data__;return Ge?void 0!==t[e]:Je.call(t,e)},Ye.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ge&&void 0===t?"__lodash_hash_undefined__":t,this};var Qe=Ye,Xe=function(e,t){var n,i,o=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function et(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}et.prototype.clear=function(){this.size=0,this.__data__={hash:new Qe,map:new(Ke||Oe),string:new Qe}},et.prototype.delete=function(e){var t=Xe(this,e).delete(e);return this.size-=t?1:0,t},et.prototype.get=function(e){return Xe(this,e).get(e)},et.prototype.has=function(e){return Xe(this,e).has(e)},et.prototype.set=function(e,t){var n=Xe(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};var tt=et;function nt(e){var t=this.__data__=new Oe(e);this.size=t.size}nt.prototype.clear=function(){this.__data__=new Oe,this.size=0},nt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},nt.prototype.get=function(e){return this.__data__.get(e)},nt.prototype.has=function(e){return this.__data__.has(e)},nt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Oe){var i=n.__data__;if(!Ke||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new tt(i)}return n.set(e,t),this.size=n.size,this};var it=nt,ot=function(){try{var e=Ue(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=function(e,t,n){"__proto__"==t&&ot?ot(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},rt=Object.prototype.hasOwnProperty,at=function(e,t,n){var i=e[t];rt.call(e,t)&&Pe(i,n)&&(void 0!==n||t in e)||st(e,t,n)},lt=function(e,t,n,i){var o=!n;n||(n={});for(var s=-1,r=t.length;++s<r;){var a=t[s],l=i?i(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),o?st(n,a,l):at(n,a,l)}return n},ct=function(e){return we(e)&&"[object Arguments]"==fe(e)},dt=Object.prototype,ht=dt.hasOwnProperty,ut=dt.propertyIsEnumerable,mt=ct(function(){return arguments}())?ct:function(e){return we(e)&&ht.call(e,"callee")&&!ut.call(e,"callee")},gt=mt,pt="object"==typeof exports&&exports&&!exports.nodeType&&exports,ft=pt&&"object"==typeof module&&module&&!module.nodeType&&module,bt=ft&&ft.exports===pt?le.Buffer:void 0,wt=(bt?bt.isBuffer:void 0)||function(){return!1},_t=/^(?:0|[1-9]\d*)$/,kt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&_t.test(e))&&e>-1&&e%1==0&&e<t},vt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},At={};At["[object Float32Array]"]=At["[object Float64Array]"]=At["[object Int8Array]"]=At["[object Int16Array]"]=At["[object Int32Array]"]=At["[object Uint8Array]"]=At["[object Uint8ClampedArray]"]=At["[object Uint16Array]"]=At["[object Uint32Array]"]=!0,At["[object Arguments]"]=At["[object Array]"]=At["[object ArrayBuffer]"]=At["[object Boolean]"]=At["[object DataView]"]=At["[object Date]"]=At["[object Error]"]=At["[object Function]"]=At["[object Map]"]=At["[object Number]"]=At["[object Object]"]=At["[object RegExp]"]=At["[object Set]"]=At["[object String]"]=At["[object WeakMap]"]=!1;var yt=function(e){return function(t){return e(t)}},Ct="object"==typeof exports&&exports&&!exports.nodeType&&exports,xt=Ct&&"object"==typeof module&&module&&!module.nodeType&&module,Et=xt&&xt.exports===Ct&&re.process,Tt=function(){try{return xt&&xt.require&&xt.require("util").types||Et&&Et.binding&&Et.binding("util")}catch(e){}}(),Bt=Tt&&Tt.isTypedArray,Pt=Bt?yt(Bt):function(e){return we(e)&&vt(e.length)&&!!At[fe(e)]},St=Object.prototype.hasOwnProperty,It=function(e,t){var n=be(e),i=!n&>(e),o=!n&&!i&&wt(e),s=!n&&!i&&!o&&Pt(e),r=n||i||o||s,a=r?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=a.length;for(var c in e)!t&&!St.call(e,c)||r&&("length"==c||o&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||kt(c,l))||a.push(c);return a},Dt=Object.prototype,Ot=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Dt)},Mt=ve(Object.keys,Object),Rt=Object.prototype.hasOwnProperty,Vt=function(e){return null!=e&&vt(e.length)&&!Me(e)},Nt=function(e){return Vt(e)?It(e):function(e){if(!Ot(e))return Mt(e);var t=[];for(var n in Object(e))Rt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},Ft=Object.prototype.hasOwnProperty,Lt=function(e){if(!q(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ot(e),n=[];for(var i in e)("constructor"!=i||!t&&Ft.call(e,i))&&n.push(i);return n},zt=function(e){return Vt(e)?It(e,!0):Lt(e)},jt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ht=jt&&"object"==typeof module&&module&&!module.nodeType&&module,qt=Ht&&Ht.exports===jt?le.Buffer:void 0,Wt=qt?qt.allocUnsafe:void 0,$t=function(e,t){if(t)return e.slice();var n=e.length,i=Wt?Wt(n):new e.constructor(n);return e.copy(i),i},Ut=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t},Kt=function(){return[]},Gt=Object.prototype.propertyIsEnumerable,Zt=Object.getOwnPropertySymbols,Jt=Zt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,o=0,s=[];++n<i;){var r=e[n];t(r,n,e)&&(s[o++]=r)}return s}(Zt(e),(function(t){return Gt.call(e,t)})))}:Kt,Yt=function(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e},Qt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Yt(t,Jt(e)),e=Ae(e);return t}:Kt,Xt=function(e,t,n){var i=t(e);return be(e)?i:Yt(i,n(e))},en=function(e){return Xt(e,Nt,Jt)},tn=function(e){return Xt(e,zt,Qt)},nn=Ue(le,"DataView"),on=Ue(le,"Promise"),sn=Ue(le,"Set"),rn=Ue(le,"WeakMap"),an="[object Map]",ln="[object Promise]",cn="[object Set]",dn="[object WeakMap]",hn="[object DataView]",un=Fe(nn),mn=Fe(Ke),gn=Fe(on),pn=Fe(sn),fn=Fe(rn),bn=fe;(nn&&bn(new nn(new ArrayBuffer(1)))!=hn||Ke&&bn(new Ke)!=an||on&&bn(on.resolve())!=ln||sn&&bn(new sn)!=cn||rn&&bn(new rn)!=dn)&&(bn=function(e){var t=fe(e),n="[object Object]"==t?e.constructor:void 0,i=n?Fe(n):"";if(i)switch(i){case un:return hn;case mn:return an;case gn:return ln;case pn:return cn;case fn:return dn}return t});var wn=bn,_n=Object.prototype.hasOwnProperty,kn=le.Uint8Array,vn=function(e){var t=new e.constructor(e.byteLength);return new kn(t).set(new kn(e)),t},An=/\w*$/,yn=ce?ce.prototype:void 0,Cn=yn?yn.valueOf:void 0,xn=function(e,t){var n=t?vn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},En=function(e,t,n){var i,o,s,r=e.constructor;switch(t){case"[object ArrayBuffer]":return vn(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return function(e,t){var n=t?vn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return xn(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return(s=new(o=e).constructor(o.source,An.exec(o))).lastIndex=o.lastIndex,s;case"[object Symbol]":return i=e,Cn?Object(Cn.call(i)):{}}},Tn=Object.create,Bn=function(){function e(){}return function(t){if(!q(t))return{};if(Tn)return Tn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Pn=function(e){return"function"!=typeof e.constructor||Ot(e)?{}:Bn(Ae(e))},Sn=Tt&&Tt.isMap,In=Sn?yt(Sn):function(e){return we(e)&&"[object Map]"==wn(e)},Dn=Tt&&Tt.isSet,On=Dn?yt(Dn):function(e){return we(e)&&"[object Set]"==wn(e)},Mn="[object Arguments]",Rn="[object Function]",Vn="[object Object]",Nn={};Nn[Mn]=Nn["[object Array]"]=Nn["[object ArrayBuffer]"]=Nn["[object DataView]"]=Nn["[object Boolean]"]=Nn["[object Date]"]=Nn["[object Float32Array]"]=Nn["[object Float64Array]"]=Nn["[object Int8Array]"]=Nn["[object Int16Array]"]=Nn["[object Int32Array]"]=Nn["[object Map]"]=Nn["[object Number]"]=Nn[Vn]=Nn["[object RegExp]"]=Nn["[object Set]"]=Nn["[object String]"]=Nn["[object Symbol]"]=Nn["[object Uint8Array]"]=Nn["[object Uint8ClampedArray]"]=Nn["[object Uint16Array]"]=Nn["[object Uint32Array]"]=!0,Nn["[object Error]"]=Nn[Rn]=Nn["[object WeakMap]"]=!1;var Fn=function e(t,n,i,o,s,r){var a,l=1&n,c=2&n,d=4&n;if(i&&(a=s?i(t,o,s,r):i(t)),void 0!==a)return a;if(!q(t))return t;var h=be(t);if(h){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&_n.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!l)return Ut(t,a)}else{var u=wn(t),m=u==Rn||"[object GeneratorFunction]"==u;if(wt(t))return $t(t,l);if(u==Vn||u==Mn||m&&!s){if(a=c||m?{}:Pn(t),!l)return c?function(e,t){return lt(e,Qt(e),t)}(t,function(e,t){return e&<(t,zt(t),e)}(a,t)):function(e,t){return lt(e,Jt(e),t)}(t,function(e,t){return e&<(t,Nt(t),e)}(a,t))}else{if(!Nn[u])return s?t:{};a=En(t,u,l)}}r||(r=new it);var g=r.get(t);if(g)return g;r.set(t,a),On(t)?t.forEach((function(o){a.add(e(o,n,i,o,t,r))})):In(t)&&t.forEach((function(o,s){a.set(s,e(o,n,i,s,t,r))}));var p=h?void 0:(d?c?tn:en:c?zt:Nt)(t);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(p||t,(function(o,s){p&&(o=t[s=o]),at(a,s,e(o,n,i,s,t,r))})),a},Ln=function(e,t){return Fn(e,5,t="function"==typeof t?t:void 0)},zn=function(e){return we(e)&&1===e.nodeType&&!Be(e)};class jn{constructor(e,t){this._config={},t&&this.define(Hn(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,n,i=!1){if(Be(t))return void this._setObjectToTarget(e,t,i);const o=t.split(".");t=o.pop();for(const t of o)Be(e[t])||(e[t]={}),e=e[t];if(Be(n))return Be(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,i);i&&void 0!==e[t]||(e[t]=n)}_getFromSource(e,t){const n=t.split(".");t=n.pop();for(const t of n){if(!Be(e[t])){e=null;break}e=e[t]}return e?Hn(e[t]):void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach((i=>{this._setToTarget(e,i,t[i],n)}))}}function Hn(e){return Ln(e,qn)}function qn(e){return zn(e)||"function"==typeof e?e:void 0}function Wn(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function $n(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const Un=Kn(R());function Kn(e){return e?class extends e{listenTo(e,t,n,i={}){if(Wn(e)||$n(e)){const o={capture:!!i.useCapture,passive:!!i.usePassive},s=this._getProxyEmitter(e,o)||new Gn(e,o);this.listenTo(s,t,n,i)}else super.listenTo(e,t,n,i)}stopListening(e,t,n){if(Wn(e)||$n(e)){const i=this._getAllProxyEmitters(e);for(const e of i)this.stopListening(e,t,n)}else super.stopListening(e,t,n)}_getProxyEmitter(e,t){return function(e,t){const n=e[I];return n&&n[t]?n[t].emitter:null}(this,Zn(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}:Un}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{Kn[e]=Un.prototype[e]}));class Gn extends(R()){constructor(e,t){super(),V(this,Zn(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,n){this.attach(e),R().prototype._addEventListener.call(this,e,t,n)}_removeEventListener(e,t){R().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function Zn(e,t){let n=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=y())}(e);for(const e of Object.keys(t).sort())t[e]&&(n+="-"+e);return n}let Jn;try{Jn={window:window,document:document}}catch(e){Jn={window:{},document:{}}}var Yn=Jn;function Qn(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function Xn(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function ei(e){return"[object Text]"==Object.prototype.toString.call(e)}function ti(e){return"[object Range]"==Object.prototype.toString.apply(e)}function ni(e){return e&&e.parentNode?e.offsetParent===Yn.document.body?null:e.offsetParent:null}const ii=["top","right","bottom","left","width","height"];class oi{constructor(e){const t=ti(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),ai(e)||t)if(t){const t=oi.getDomRangeRects(e);si(this,oi.getBoundingRect(t))}else si(this,e.getBoundingClientRect());else if($n(e)){const{innerWidth:t,innerHeight:n}=e;si(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else si(this,e)}clone(){return new oi(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0)return null;{const e=new oi(t);return e._source=this._source,e}}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(ri(e))return t;let n,i=e,o=e.parentNode||e.commonAncestorContainer;for(;o&&!ri(o);){const e="visible"===((s=o)instanceof HTMLElement?s.ownerDocument.defaultView.getComputedStyle(s).overflow:"visible");i instanceof HTMLElement&&"absolute"===li(i)&&(n=i);const r=li(o);if(e||n&&("relative"===r&&e||"relative"!==r)){i=o,o=o.parentNode;continue}const a=new oi(o),l=t.getIntersection(a);if(!l)return null;l.getArea()<t.getArea()&&(t=l),i=o,o=o.parentNode}var s;return t}isEqual(e){for(const t of ii)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}toAbsoluteRect(){const{scrollX:e,scrollY:t}=Yn.window,n=this.clone().moveBy(e,t);if(ai(n._source)){const e=ni(n._source);e&&function(e,t){const n=new oi(t),i=Xn(t);let o=0,s=0;o-=n.left,s-=n.top,o+=t.scrollLeft,s+=t.scrollTop,o-=i.left,s-=i.top,e.moveBy(o,s)}(n,e)}return n}excludeScrollbarsAndBorders(){const e=this._source;let t,n,i;if($n(e))t=e.innerWidth-e.document.documentElement.clientWidth,n=e.innerHeight-e.document.documentElement.clientHeight,i=e.getComputedStyle(e.document.documentElement).direction;else{const o=Xn(e);t=e.offsetWidth-e.clientWidth-o.left-o.right,n=e.offsetHeight-e.clientHeight-o.top-o.bottom,i=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=o.left,this.top+=o.top,this.right-=o.right,this.bottom-=o.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===i?this.right-=t:this.left+=t,this.height-=n,this.bottom-=n,this}static getDomRangeRects(e){const t=[],n=Array.from(e.getClientRects());if(n.length)for(const e of n)t.push(new oi(e));else{let n=e.startContainer;ei(n)&&(n=n.parentNode);const i=new oi(n.getBoundingClientRect());i.right=i.left,i.width=0,t.push(i)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let n=0;for(const i of e)n++,t.left=Math.min(t.left,i.left),t.top=Math.min(t.top,i.top),t.right=Math.max(t.right,i.right),t.bottom=Math.max(t.bottom,i.bottom);return 0==n?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new oi(t))}}function si(e,t){for(const n of ii)e[n]=t[n]}function ri(e){return!!ai(e)&&e===e.ownerDocument.body}function ai(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect}function li(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).position:"static"}class ci{constructor(e,t){ci._observerInstance||ci._createObserver(),this._element=e,this._callback=t,ci._addElementCallback(e,t),ci._observerInstance.observe(e)}get element(){return this._element}destroy(){ci._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){ci._elementCallbacks||(ci._elementCallbacks=new Map);let n=ci._elementCallbacks.get(e);n||(n=new Set,ci._elementCallbacks.set(e,n)),n.add(t)}static _deleteElementCallback(e,t){const n=ci._getElementCallbacks(e);n&&(n.delete(t),n.size||(ci._elementCallbacks.delete(e),ci._observerInstance.unobserve(e))),ci._elementCallbacks&&!ci._elementCallbacks.size&&(ci._observerInstance=null,ci._elementCallbacks=null)}static _getElementCallbacks(e){return ci._elementCallbacks?ci._elementCallbacks.get(e):null}static _createObserver(){ci._observerInstance=new Yn.window.ResizeObserver((e=>{for(const t of e){const e=ci._getElementCallbacks(t.target);if(e)for(const n of e)n(t)}}))}}ci._observerInstance=null,ci._elementCallbacks=null;var di=ci;function hi(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function ui(e){return t=>t+e}function mi(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function gi(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function pi(e){return e&&e.nodeType===Node.COMMENT_NODE}function fi(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}function bi({element:e,target:t,positions:n,limiter:i,fitInViewport:o,viewportOffsetConfig:s}){Me(t)&&(t=t()),Me(i)&&(i=i());const r=ni(e),a=function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new oi(Yn.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(s),l=new oi(e),c=wi(t,a);let d;if(!c||!a.getIntersection(c))return null;const h={targetRect:c,elementRect:l,positionedElementAncestor:r,viewportRect:a};if(i||o){if(i){const e=wi(i,a);e&&(h.limiterRect=e)}d=function(e,t){const{elementRect:n}=t,i=n.getArea(),o=e.map((e=>new _i(e,t))).filter((e=>!!e.name));let s=0,r=null;for(const e of o){const{limiterIntersectionArea:t,viewportIntersectionArea:n}=e;if(t===i)return e;const o=n**2+t**2;o>s&&(s=o,r=e)}return r}(n,h)}else d=new _i(n[0],h);return d}function wi(e,t){const n=new oi(e).getVisible();return n?n.getIntersection(t):null}class _i{constructor(e,t){const n=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!n)return;const{left:i,top:o,name:s,config:r}=n;this.name=s,this.config=r,this._positioningFunctionCoordinates={left:i,top:o},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=this._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function ki(e){const t=e.parentNode;t&&t.removeChild(e)}function vi({window:e,rect:t,alignToTop:n,forceScroll:i,viewportOffset:o}){const s=t.clone().moveBy(0,o.bottom),r=t.clone().moveBy(0,-o.top),a=new oi(e).excludeScrollbarsAndBorders(),l=n&&i,c=[r,s].every((e=>a.contains(e)));let{scrollX:d,scrollY:h}=e;const u=d,m=h;l?h-=a.top-t.top+o.top:c||(Ci(r,a)?h-=a.top-t.top+o.top:yi(s,a)&&(h+=n?t.top-a.top-o.top:t.bottom-a.bottom+o.bottom)),c||(xi(t,a)?d-=a.left-t.left+o.left:Ei(t,a)&&(d+=t.right-a.right+o.right)),d==u&&h===m||e.scrollTo(d,h)}function Ai({parent:e,getRect:t,alignToTop:n,forceScroll:i,ancestorOffset:o=0,limiterElement:s}){const r=Ti(e),a=n&&i;let l,c,d;const h=s||r.document.body;for(;e!=h;)c=t(),l=new oi(e).excludeScrollbarsAndBorders(),d=l.contains(c),a?e.scrollTop-=l.top-c.top+o:d||(Ci(c,l)?e.scrollTop-=l.top-c.top+o:yi(c,l)&&(e.scrollTop+=n?c.top-l.top-o:c.bottom-l.bottom+o)),d||(xi(c,l)?e.scrollLeft-=l.left-c.left+o:Ei(c,l)&&(e.scrollLeft+=c.right-l.right+o)),e=e.parentNode}function yi(e,t){return e.bottom>t.bottom}function Ci(e,t){return e.top<t.top}function xi(e,t){return e.left<t.left}function Ei(e,t){return e.right>t.right}function Ti(e){return ti(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Bi(e){if(ti(e)){let t=e.commonAncestorContainer;return ei(t)&&(t=t.parentNode),t}return e.parentNode}function Pi(e,t){const n=Ti(e),i=new oi(e);if(n===t)return i;{let e=n;for(;e!=t;){const t=e.frameElement,n=new oi(t).excludeScrollbarsAndBorders();i.moveBy(n.left,n.top),e=e.parent}}return i}const Si={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Ii={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},Di={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},Oi=function(){const e={pageup:33,pagedown:34,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++)e[String.fromCharCode(t).toLowerCase()]=t;for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return Object.assign(e,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),e}(),Mi=Object.fromEntries(Object.entries(Oi).map((([e,t])=>{let n;return n=t in Di?Di[t]:e.charAt(0).toUpperCase()+e.slice(1),[t,n]})));function Ri(e){let t;if("string"==typeof e){if(t=Oi[e.toLowerCase()],!t)throw new T("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?Oi.alt:0)+(e.ctrlKey?Oi.ctrl:0)+(e.shiftKey?Oi.shift:0)+(e.metaKey?Oi.cmd:0);return t}function Vi(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return Ri(e.slice(0,-1));const t=Ri(e);return(p.isMac||p.isiOS)&&t==Oi.ctrl?Oi.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function Ni(e){let t=Vi(e);return Object.entries(p.isMac||p.isiOS?Si:Ii).reduce(((e,[n,i])=>(t&Oi[n]&&(t&=~Oi[n],e+=i),e)),"")+(t?Mi[t]:"")}function Fi(e,t){const n="ltr"===t;switch(e){case Oi.arrowleft:return n?"left":"right";case Oi.arrowright:return n?"right":"left";case Oi.arrowup:return"up";case Oi.arrowdown:return"down"}}function Li(e){return Array.isArray(e)?e:[e]}var zi=function(e,t,n){(void 0!==n&&!Pe(e[t],n)||void 0===n&&!(t in e))&&st(e,t,n)},ji=function(e,t,n){for(var i=-1,o=Object(e),s=n(e),r=s.length;r--;){var a=s[++i];if(!1===t(o[a],a,o))break}return e},Hi=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},qi=function(e,t,n,i,o,s,r){var a,l=Hi(e,n),c=Hi(t,n),d=r.get(c);if(d)zi(e,n,d);else{var h=s?s(l,c,n+"",e,t,r):void 0,u=void 0===h;if(u){var m=be(c),g=!m&&wt(c),p=!m&&!g&&Pt(c);h=c,m||g||p?be(l)?h=l:we(a=l)&&Vt(a)?h=Ut(l):g?(u=!1,h=$t(c,!0)):p?(u=!1,h=xn(c,!0)):h=[]:Be(c)||gt(c)?(h=l,gt(l)?h=function(e){return lt(e,zt(e))}(l):q(l)&&!Me(l)||(h=Pn(c))):u=!1}u&&(r.set(c,h),o(h,c,i,s,r),r.delete(c)),zi(e,n,h)}},Wi=function e(t,n,i,o,s){t!==n&&ji(n,(function(r,a){if(s||(s=new it),q(r))qi(t,n,a,i,e,o,s);else{var l=o?o(Hi(t,a),r,a+"",t,n,s):void 0;void 0===l&&(l=r),zi(t,a,l)}}),zt)},$i=function(e){return e},Ui=Math.max,Ki=ot?function(e,t){return ot(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:$i,Gi=Date.now,Zi=function(e){var t=0,n=0;return function(){var i=Gi(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Ki),Ji=function(e,t){return Zi(function(e,t,n){return t=Ui(void 0===t?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=Ui(i.length-t,0),r=Array(s);++o<s;)r[o]=i[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=i[o];return a[t]=n(r),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,a)}}(e,t,$i),e+"")},Yi=function(e){return Ji((function(t,n){var i=-1,o=n.length,s=o>1?n[o-1]:void 0,r=o>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,r&&function(e,t,n){if(!q(n))return!1;var i=typeof t;return!!("number"==i?Vt(n)&&kt(t,n.length):"string"==i&&t in n)&&Pe(n[t],e)}(n[0],n[1],r)&&(s=o<3?void 0:s,o=1),t=Object(t);++i<o;){var a=n[i];a&&e(t,a,i,s)}return t}))},Qi=Yi((function(e,t,n){Wi(e,t,n)}));Yn.window.CKEDITOR_TRANSLATIONS||(Yn.window.CKEDITOR_TRANSLATIONS={});const Xi=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig"];function eo(e){return Xi.includes(e)?"rtl":"ltr"}class to{constructor({uiLanguage:e="en",contentLanguage:t,translations:n}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=eo(this.uiLanguage),this.contentLanguageDirection=eo(this.contentLanguage),this.translations=function(e){return Array.isArray(e)?e.reduce(((e,t)=>Qi(e,t))):e}(n),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=Li(t),"string"==typeof e&&(e={string:e});const n=e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,n)=>n<t.length?t[n]:e))}(function(e,t,n=1,i){if("number"!=typeof n)throw new T("translation-service-quantity-not-a-number",null,{quantity:n});const o=i||Yn.window.CKEDITOR_TRANSLATIONS,s=function(e){return Object.keys(e).length}(o);1===s&&(e=Object.keys(o)[0]);const r=t.id||t.string;if(0===s||!function(e,t,n){return!!n[e]&&!!n[e].dictionary[t]}(e,r,o))return 1!==n?t.plural:t.string;const a=o[e].dictionary,l=o[e].getPluralForm||(e=>1===e?0:1),c=a[r];return"string"==typeof c?c:c[Number(l(n))]}(this.uiLanguage,e,n,this.translations),t)}}class no extends(R()){constructor(e={},t={}){super();const n=se(e);if(n||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new T("collection-add-item-invalid-index",this);let n=0;for(const i of e){const e=this._getItemIdBeforeAdding(i),o=t+n;this._items.splice(o,0,i),this._itemMap.set(e,i),this.fire("add",i,o),n++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new T("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,n]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:n}),t}map(e,t){return this._items.map(e,t)}forEach(e,t){this._items.forEach(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new T("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,i,o)=>{const s=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(i);if(s&&r)this._bindToExternalToInternalMap.set(i,r),this._bindToInternalToExternalMap.set(r,i);else{const n=e(i);if(!n)return void this._skippedIndexesFromExternal.push(o);let s=o;for(const e of this._skippedIndexesFromExternal)o>e&&s--;for(const e of t._skippedIndexesFromExternal)s>=e&&s++;this._bindToExternalToInternalMap.set(i,n),this._bindToInternalToExternalMap.set(n,i),this.add(n,s);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)s<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)n(0,e,t.getIndex(e));this.listenTo(t,"add",n),this.listenTo(t,"remove",((e,t,n)=>{const i=this._bindToExternalToInternalMap.get(t);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(n<t&&e.push(t-1),n>t&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let n;if(t in e){if(n=e[t],"string"!=typeof n)throw new T("collection-add-invalid-id",this);if(this.get(n))throw new T("collection-add-item-already-exists",this)}else e[t]=n=y();return n}_remove(e){let t,n,i,o=!1;const s=this._idProperty;if("string"==typeof e?(n=e,i=this._itemMap.get(n),o=!i,i&&(t=this._items.indexOf(i))):"number"==typeof e?(t=e,i=this._items[t],o=!i,i&&(n=i[s])):(i=e,n=i[s],t=this._items.indexOf(i),o=-1==t||!this._itemMap.get(n)),o)throw new T("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(n);const r=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(r),this.fire("remove",i,t),[i,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function io(e){const t=e.next();return t.done?null:t.value}class oo extends(Kn(J())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new T("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class so{constructor(){this._listener=new(Kn())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+Ri(t),t)}))}set(e,t,n={}){const i=Vi(e),o=n.priority;this._listener.listenTo(this._listener,"_keydown:"+i,((e,n)=>{t(n,(()=>{n.preventDefault(),n.stopPropagation(),e.stop()})),e.return=!0}),{priority:o})}press(e){return!!this._listener.fire("_keydown:"+Ri(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function ro(e){return se(e)?new Map(e):function(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}(e)}function ao(e,t){let n;function i(...o){i.cancel(),n=setTimeout((()=>e(...o)),t)}return i.cancel=()=>{clearTimeout(n)},i}function lo(e,t){return!!(n=e.charAt(t-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t));var n}function co(e,t){return!!(n=e.charAt(t))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n);var n}const ho=function(){const e=/\p{Regional_Indicator}{2}/u.source,t="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map((e=>e.source)).join("|")+")";return new RegExp(`${e}|${t}(?:${t})*`,"ug")}();function uo(e,t){const n=String(e).matchAll(ho);return Array.from(n).some((e=>e.index<t&&t<e.index+e[0].length))}class mo extends(J()){constructor(e){super(),this._disableStack=new Set,this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",go,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",go),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function go(e){e.return=!1,e.stop()}class po extends(J()){constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{if(!this.affectsData)return;const n=e.model.document.selection,i=!("$graveyard"==n.getFirstPosition().root.rootName)&&e.model.canEditAt(n);(e.isReadOnly||this._isEnabledBasedOnSelection&&!i)&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",fo,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",fo),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function fo(e){e.return=!1,e.stop()}class bo extends(R()){constructor(e,t=[],n=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of n)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new T("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],n=[]){const i=this,o=this._context;!function e(t,n=new Set){t.forEach((t=>{a(t)&&(n.has(t)||(n.add(t),t.pluginName&&!i._availablePlugins.has(t.pluginName)&&i._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,n)))}))}(e),h(e);const s=[...function e(t,n=new Set){return t.map((e=>a(e)?e:i._availablePlugins.get(e))).reduce(((t,i)=>n.has(i)?t:(n.add(i),i.requires&&(h(i.requires,i),e(i.requires,n).forEach((e=>t.add(e)))),t.add(i))),new Set)}(e.filter((e=>!c(e,t))))];!function(e,t){for(const n of t){if("function"!=typeof n)throw new T("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const t=n.pluginName;if(!t)throw new T("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new T("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const o=i._availablePlugins.get(t);if(!o)throw new T("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const s=e.indexOf(o);if(-1===s){if(i._contextPlugins.has(o))return;throw new T("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(o.requires&&o.requires.length)throw new T("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(s,1,n),i._availablePlugins.set(t,n)}}(s,n);const r=function(e){return e.map((e=>{let t=i._contextPlugins.get(e);return t=t||new e(o),i._add(e,t),t}))}(s);return u(r,"init").then((()=>u(r,"afterInit"))).then((()=>r));function a(e){return"function"==typeof e}function l(e){return a(e)&&!!e.isContextPlugin}function c(e,t){return t.some((t=>t===e||d(e)===t||d(t)===e))}function d(e){return a(e)?e.pluginName||e.name:e}function h(e,n=null){e.map((e=>a(e)?e:i._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(!a(e)){if(t)throw new T("plugincollection-soft-required",o,{missingPlugin:e,requiredBy:d(t)});throw new T("plugincollection-plugin-not-found",o,{plugin:e})}}(e,n),function(e,t){if(l(t)&&!l(e))throw new T("plugincollection-context-required",o,{plugin:d(e),requiredBy:d(t)})}(e,n),function(e,n){if(n&&c(e,t))throw new T("plugincollection-required",o,{plugin:d(e),requiredBy:d(n)})}(e,n)}))}function u(e,t){return e.reduce(((e,n)=>n[t]?i._contextPlugins.has(n)?e:e.then(n[t].bind(n)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;if(n){if(this._plugins.has(n))throw new T("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e});this._plugins.set(n,t)}}}class wo{constructor(e){this._contextOwner=null;const{translations:t,...n}=e||{};this.config=new jn(n,this.constructor.defaultConfig);const i=this.constructor.builtinPlugins;this.config.define("plugins",i),this.plugins=new bo(this,i);const o=this.config.get("language")||{};this.locale=new to({uiLanguage:"string"==typeof o?o:o.ui,contentLanguage:this.config.get("language.content"),translations:t}),this.t=this.locale.t,this.editors=new no}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const n of e.concat(t)){if("function"!=typeof n)throw new T("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new T("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new T("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const n=new this(e);t(n.initPlugins().then((()=>n)))}))}}class _o extends(J()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}var ko=o(5072),vo=o.n(ko),Ao=o(8465);vo()(Ao.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ao.A.locals;const yo=new WeakMap;let Co=!1;function xo({view:e,element:t,text:n,isDirectHost:i=!0,keepOnFocus:o=!1}){const s=e.document;function r(n){yo.get(s).set(t,{text:n,isDirectHost:i,keepOnFocus:o,hostElement:i?t:null}),e.change((e=>Eo(s,e)))}yo.has(s)||(yo.set(s,new Map),s.registerPostFixer((e=>Eo(s,e))),s.on("change:isComposing",(()=>{e.change((e=>Eo(s,e)))}),{priority:"high"})),t.is("editableElement")&&t.on("change:placeholder",((e,t,n)=>{r(n)})),t.placeholder?r(t.placeholder):n&&r(n),n&&(Co||B("enableplaceholder-deprecated-text-option"),Co=!0)}function Eo(e,t){const n=yo.get(e),i=[];let o=!1;for(const[e,s]of n)s.isDirectHost&&(i.push(e),To(t,e,s)&&(o=!0));for(const[e,s]of n){if(s.isDirectHost)continue;const n=Bo(e);n&&(i.includes(n)||(s.hostElement=n,To(t,e,s)&&(o=!0)))}return o}function To(e,t,n){const{text:i,isDirectHost:o,hostElement:s}=n;let r=!1;return s.getAttribute("data-placeholder")!==i&&(e.setAttribute("data-placeholder",i,s),r=!0),(o||1==t.childCount)&&function(e,t){if(!e.isAttached())return!1;const n=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(n)return!1;const i=e.document,o=i.selection.anchor;return!(i.isComposing&&o&&o.parent===e||!t&&i.isFocused&&(!o||o.parent===e))}(s,n.keepOnFocus)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,s)&&(r=!0):function(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}(e,s)&&(r=!0),r}function Bo(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class Po{is(){throw new Error("is() method is abstract")}}var So=function(e){return Fn(e,4)};class Io extends(R(Po)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new T("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),i=e.getAncestors(t);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),i=oe(t,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]<n[i]}}isAfter(e){return this!=e&&this.root===e.root&&!this.isBefore(e)}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire(`change:${e}`,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=So(this);return delete e.parent,e}}Io.prototype.is=function(e){return"node"===e||"view:node"===e};class Do extends Io{constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof Do&&(this===e||this.data===e.data)}_clone(){return new Do(this.document,this.data)}}Do.prototype.is=function(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e};class Oo extends Po{constructor(e,t,n){if(super(),this.textNode=e,t<0||t>e.data.length)throw new T("view-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.data.length)throw new T("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let n=e.includeSelf?this.textNode:this.parent;for(;null!==n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}}Oo.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};class Mo{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=Ro(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const i=Ro(n,e);i&&t.push({element:n,pattern:e,match:i})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function Ro(e,t){if("function"==typeof t)return t(e);const n={};return t.name&&(n.name=function(e,t){return e instanceof RegExp?!!t.match(e):e===t}(t.name,e.name),!n.name)||t.attributes&&(n.attributes=function(e,t){const n=new Set(t.getAttributeKeys());return Be(e)?(void 0!==e.style&&B("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&B("matcher-pattern-deprecated-attributes-class-key",e)):(n.delete("style"),n.delete("class")),Vo(e,n,(e=>t.getAttribute(e)))}(t.attributes,e),!n.attributes)||t.classes&&(n.classes=function(e,t){return Vo(e,t.getClassNames(),(()=>{}))}(t.classes,e),!n.classes)||t.styles&&(n.styles=function(e,t){return Vo(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!n.styles)?null:n}function Vo(e,t,n){const i=function(e){return Array.isArray(e)?e.map((e=>Be(e)?(void 0!==e.key&&void 0!==e.value||B("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0])):Be(e)?Object.entries(e):[[e,!0]]}(e),o=Array.from(t),s=[];if(i.forEach((([e,t])=>{o.forEach((i=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,i)&&function(e,t,n){if(!0===e)return!0;const i=n(t);return e===i||e instanceof RegExp&&!!String(i).match(e)}(t,i,n)&&s.push(i)}))})),i.length&&!(s.length<i.length))return s}var No=function(e){return"symbol"==typeof e||we(e)&&"[object Symbol]"==fe(e)},Fo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lo=/^\w*$/,zo=function(e,t){if(be(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!No(e))||Lo.test(e)||!Fo.test(e)||null!=t&&e in Object(t)};function jo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],s=n.cache;if(s.has(o))return s.get(o);var r=e.apply(this,i);return n.cache=s.set(o,r)||s,r};return n.cache=new(jo.Cache||tt),n}jo.Cache=tt;var Ho,qo,Wo,$o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uo=/\\(\\)?/g,Ko=(Ho=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace($o,(function(e,n,i,o){t.push(i?o.replace(Uo,"$1"):n||e)})),t},qo=jo(Ho,(function(e){return 500===Wo.size&&Wo.clear(),e})),Wo=qo.cache,qo),Go=Ko,Zo=ce?ce.prototype:void 0,Jo=Zo?Zo.toString:void 0,Yo=function e(t){if("string"==typeof t)return t;if(be(t))return function(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}(t,e)+"";if(No(t))return Jo?Jo.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Qo=function(e){return null==e?"":Yo(e)},Xo=function(e,t){return be(e)?e:zo(e,t)?[e]:Go(Qo(e))},es=function(e){if("string"==typeof e||No(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},ts=function(e,t){for(var n=0,i=(t=Xo(t,e)).length;null!=e&&n<i;)e=e[es(t[n++])];return n&&n==i?e:void 0},ns=function(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++i<o;)s[i]=e[i+t];return s},is=function(e,t){return null==(e=function(e,t){return t.length<2?e:ts(e,ns(t,0,-1))}(e,t=Xo(t,e)))||delete e[es((n=t,i=null==n?0:n.length,i?n[i-1]:void 0))];var n,i},os=function(e,t,n){var i=null==e?void 0:ts(e,t);return void 0===i?n:i},ss=function(e,t,n){return null==e?e:function(e,t,n,i){if(!q(e))return e;for(var o=-1,s=(t=Xo(t,e)).length,r=s-1,a=e;null!=a&&++o<s;){var l=es(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=r){var d=a[l];void 0===(c=i?i(d,l,a):void 0)&&(c=q(d)?d:kt(t[o+1])?[]:{})}at(a,l,c),a=a[l]}return e}(e,t,n)};class rs{constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){return!Object.entries(this._styles).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const t=function(e){let t=null,n=0,i=0,o=null;const s=new Map;if(""===e)return s;";"!=e.charAt(e.length-1)&&(e+=";");for(let r=0;r<e.length;r++){const a=e.charAt(r);if(null===t)switch(a){case":":o||(o=e.substr(n,r-n),i=r+1);break;case'"':case"'":t=a;break;case";":{const t=e.substr(i,r-i);o&&s.set(o.trim(),t.trim()),o=null,n=r+1;break}}else a===t&&(t=null)}return s}(e);for(const[e,n]of t)this._styleProcessor.toNormalizedForm(e,n,this._styles)}has(e){if(this.isEmpty)return!1;const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)}set(e,t){if(q(e))for(const[t,n]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,n,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=ls(e);(function(e,t){null==e||is(e,t)})(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!q(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){return this.isEmpty?[]:e?this._styleProcessor.getStyleNames(this._styles):this.getStylesEntries().map((([e])=>e))}clear(){this._styles={}}getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const n of t)e.push(...this._styleProcessor.getReducedForm(n,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const n=t.splice(0,t.length-1).join("."),i=os(this._styles,n);i&&!Object.keys(i).length&&this.remove(n)}}class as{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,n){if(q(t))cs(n,ls(e),t);else if(this._normalizers.has(e)){const i=this._normalizers.get(e),{path:o,value:s}=i(t);cs(n,o,s)}else cs(n,e,t)}getNormalized(e,t){if(!e)return Qi({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const n=this._extractors.get(e);if("string"==typeof n)return os(t,n);const i=n(e,t);if(i)return i}return os(t,ls(e))}getReducedForm(e,t){const n=this.getNormalized(e,t);return void 0===n?[]:this._reducers.has(e)?this._reducers.get(e)(n):[[e,n]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const n=this.getNormalized(t,e);return n&&"object"==typeof n?Object.keys(n).length:n})),n=new Set([...t,...Object.keys(e)]);return Array.from(n)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const n of t)this._mapStyleNames(n,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function ls(e){return e.replace("-",".")}function cs(e,t,n){let i=n;q(n)&&(i=Qi({},os(e,t),n)),ss(e,t,i)}class ds extends Io{constructor(e,t,n,i){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=ro(e);for(const[e,n]of t)null===n?t.delete(e):"string"!=typeof n&&t.set(e,String(n));return t}(n),this._children=[],i&&this._insertChild(0,i),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");hs(this._classes,e),this._attrs.delete("class")}this._styles=new rs(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof ds))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,n]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==n)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new Mo(...e);let n=this.parent;for(;n&&!n.is("documentFragment");){if(t.match(n))return n;n=n.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),n=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==n?"":` ${n}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.document,this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._unsafeAttributesToRender=this._unsafeAttributesToRender,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let n=0;const i=function(e,t){return"string"==typeof t?[new Do(e,t)]:(se(t)||(t=[t]),Array.from(t).map((t=>"string"==typeof t?new Do(e,t):t instanceof Oo?new Do(e,t.data):t)))}(this.document,t);for(const t of i)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){const n=String(t);this._fireChange("attributes",this),"class"==e?hs(this._classes,n):"style"==e?this._styles.setTo(n):this._attrs.set(e,n)}_removeAttribute(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of Li(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of Li(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of Li(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function hs(e,t){const n=t.split(/\s+/);e.clear(),n.forEach((t=>e.add(t)))}ds.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class us extends ds{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=ms}}function ms(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}us.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class gs extends(J(us)){constructor(e,t,n,i){super(e,t,n,i),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}gs.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const ps=Symbol("rootName");class fs extends gs{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(ps)}set rootName(e){this._setCustomProperty(ps,e)}set _name(e){this.name=e}}fs.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class bs{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new T("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new T("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=ws._createAt(e.startPosition):this._position=ws._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,n;do{n=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let i;if(n instanceof Do){if(e.isAtEnd)return this._position=ws._createAfter(n),this._next();i=n.data[e.offset]}else i=n.getChild(e.offset);if(i instanceof ds){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e=new ws(i,0);return this._position=e,this._formatReturnValue("elementStart",i,t,e,1)}if(i instanceof Do){if(this.singleCharacters)return e=new ws(i,0),this._position=e,this._next();let n,o=i.data.length;return i==this._boundaryEndParent?(o=this.boundaries.end.offset,n=new Oo(i,0,o),e=ws._createAfter(n)):(n=new Oo(i,0,i.data.length),e.offset++),this._position=e,this._formatReturnValue("text",n,t,e,o)}if("string"==typeof i){let i;i=this.singleCharacters?1:(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-e.offset;const o=new Oo(n,e.offset,i);return e.offset+=i,this._position=e,this._formatReturnValue("text",o,t,e,i)}return e=ws._createAfter(n),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,t,e)}_previous(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0,value:void 0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let i;if(n instanceof Do){if(e.isAtStart)return this._position=ws._createBefore(n),this._previous();i=n.data[e.offset-1]}else i=n.getChild(e.offset-1);if(i instanceof ds)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",i,t,e,1)):(e=new ws(i,i.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",i,t,e));if(i instanceof Do){if(this.singleCharacters)return e=new ws(i,i.data.length),this._position=e,this._previous();let n,o=i.data.length;if(i==this._boundaryStartParent){const t=this.boundaries.start.offset;n=new Oo(i,t,i.data.length-t),o=n.data.length,e=ws._createBefore(n)}else n=new Oo(i,0,i.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",n,t,e,o)}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;i=e.offset-t}e.offset-=i;const o=new Oo(n,e.offset,i);return this._position=e,this._formatReturnValue("text",o,t,e,i)}return e=ws._createBefore(n),this._position=e,this._formatReturnValue("elementStart",n,t,e,1)}_formatReturnValue(e,t,n,i,o){return t instanceof Oo&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=ws._createAfter(t.textNode):(i=ws._createAfter(t.textNode),this._position=i)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=ws._createBefore(t.textNode):(i=ws._createBefore(t.textNode),this._position=i))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:i,length:o}}}}class ws extends Po{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof gs);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=ws._createAt(this),n=t.offset+e;return t.offset=n<0?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new bs(t);return n.skip(e),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let i=0;for(;t[i]==n[i]&&t[i];)i++;return 0===i?null:t[i-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],n=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const i=oe(t,n);switch(i){case"prefix":return"before";case"extension":return"after";default:return t[i]<n[i]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new bs(e)}clone(){return new ws(this.parent,this.offset)}static _createAt(e,t){if(e instanceof ws)return new this(e.parent,e.offset);{const n=e;if("end"==t)t=n.is("$text")?n.data.length:n.childCount;else{if("before"==t)return this._createBefore(n);if("after"==t)return this._createAfter(n);if(0!==t&&!t)throw new T("view-createpositionat-offset-required",n)}return new ws(n,t)}}static _createAfter(e){if(e.is("$textProxy"))return new ws(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new T("view-position-after-root",e,{root:e});return new ws(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new ws(e.textNode,e.offsetInText);if(!e.parent)throw new T("view-position-before-root",e,{root:e});return new ws(e.parent,e.index)}}ws.prototype.is=function(e){return"position"===e||"view:position"===e};class _s extends Po{constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new bs({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(ks,{direction:"backward"}),t=this.end.getLastMatchingPosition(ks);return e.parent.is("$text")&&e.isAtStart&&(e=ws._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=ws._createAfter(t.parent)),new _s(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(ks);if(e.isAfter(this.end)||e.isEqual(this.end))return new _s(e,e);let t=this.end.getLastMatchingPosition(ks,{direction:"backward"});const n=e.nodeAfter,i=t.nodeBefore;return n&&n.is("$text")&&(e=new ws(n,0)),i&&i.is("$text")&&(t=new ws(i,i.data.length)),new _s(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&i}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new _s(this.start,e.start)),this.containsPosition(e.end)&&t.push(new _s(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new _s(t,n)}return null}getWalker(e={}){return e.boundaries=this,new bs(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new _s(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new bs(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new bs(e);yield t.position;for(const e of t)yield e.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,n,i){return new this(new ws(e,t),new ws(n,i))}static _createFromPositionAndShift(e,t){const n=e,i=e.getShiftedBy(t);return t>0?new this(n,i):new this(i,n)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(ws._createBefore(e),t)}}function ks(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}_s.prototype.is=function(e){return"range"===e||"view:range"===e};class vs extends(R(Po)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const i of e._ranges)if(t.isEqual(i)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=ie(this.getRanges());if(t!=ie(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let i of e.getRanges())if(i=i.getTrimmed(),t.start.isEqual(i.start)&&t.end.isEqual(i.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,n,i]=e;if("object"==typeof n&&(i=n,n=void 0),null===t)this._setRanges([]),this._setFakeOptions(i);else if(t instanceof vs||t instanceof As)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof _s)this._setRanges([t],i&&i.backward),this._setFakeOptions(i);else if(t instanceof ws)this._setRanges([new _s(t)]),this._setFakeOptions(i);else if(t instanceof Io){const e=!!i&&!!i.backward;let o;if(void 0===n)throw new T("view-selection-setto-required-second-parameter",this);o="in"==n?_s._createIn(t):"on"==n?_s._createOn(t):new _s(ws._createAt(t,n)),this._setRanges([o],e),this._setFakeOptions(i)}else{if(!se(t))throw new T("view-selection-setto-not-selectable",this);this._setRanges(t,i&&i.backward),this._setFakeOptions(i)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new T("view-selection-setfocus-no-ranges",this);const n=ws._createAt(e,t);if("same"==n.compareWith(this.focus))return;const i=this.anchor;this._ranges.pop(),"before"==n.compareWith(i)?this._addRange(new _s(n,i),!0):this._addRange(new _s(i,n)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof _s))throw new T("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new T("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new _s(e.start,e.end))}}vs.prototype.is=function(e){return"selection"===e||"view:selection"===e};class As extends(R(Po)){constructor(...e){super(),this._selection=new vs,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}As.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class ys extends v{constructor(e,t,n){super(e,t),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Cs=Symbol("bubbling contexts");function xs(e){return class extends e{fire(e,...t){try{const n=e instanceof v?e:new v(this,e),i=Ps(this);if(!i.size)return;if(Es(n,"capturing",this),Ts(i,"$capture",n,...t))return n.return;const o=n.startRange||this.selection.getFirstRange(),s=o?o.getContainedElement():null,r=!!s&&Boolean(Bs(i,s));let a=s||function(e){if(!e)return null;const t=e.start.parent,n=e.end.parent,i=t.getPath(),o=n.getPath();return i.length>o.length?t:n}(o);if(Es(n,"atTarget",a),!r){if(Ts(i,"$text",n,...t))return n.return;Es(n,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(Ts(i,"$root",n,...t))return n.return}else if(a.is("element")&&Ts(i,a.name,n,...t))return n.return;if(Ts(i,a,n,...t))return n.return;a=a.parent,Es(n,"bubbling",a)}return Es(n,"bubbling",this),Ts(i,"$document",n,...t),n.return}catch(e){T.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,n){const i=Li(n.context||"$document"),o=Ps(this);for(const s of i){let i=o.get(s);i||(i=new(R()),o.set(s,i)),this.listenTo(i,e,t,n)}}_removeEventListener(e,t){const n=Ps(this);for(const i of n.values())this.stopListening(i,e,t)}}}{const e=xs(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{xs[t]=e.prototype[t]}))}function Es(e,t,n){e instanceof ys&&(e._eventPhase=t,e._currentTarget=n)}function Ts(e,t,n,...i){const o="string"==typeof t?e.get(t):Bs(e,t);return!!o&&(o.fire(n,...i),n.stop.called)}function Bs(e,t){for(const[n,i]of e)if("function"==typeof n&&n(t))return i;return null}function Ps(e){return e[Cs]||(e[Cs]=new Map),e[Cs]}class Ss extends(xs(J())){constructor(e){super(),this._postFixers=new Set,this.selection=new As,this.roots=new no({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.forEach((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(t=n(e),t)break}while(t)}}class Is extends ds{constructor(e,t,n,i){super(e,t,n,i),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Os}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new T("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}Is.DEFAULT_PRIORITY=10;var Ds=Is;function Os(){if(Ms(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Ms(e)>1)return null;e=e.parent}return!e||Ms(e)>1?null:this.childCount}function Ms(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Is.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Rs extends ds{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=Vs}_insertChild(e,t){if(t&&(t instanceof Io||Array.from(t).length>0))throw new T("view-emptyelement-cannot-add",[this,t]);return 0}}function Vs(){return null}Rs.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ns extends ds{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=Fs}_insertChild(e,t){if(t&&(t instanceof Io||Array.from(t).length>0))throw new T("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function Fs(){return null}Ns.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ls extends ds{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=zs}_insertChild(e,t){if(t&&(t instanceof Io||Array.from(t).length>0))throw new T("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function zs(){return null}Ls.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class js extends(R(Po)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let n=0;const i=function(e,t){return"string"==typeof t?[new Do(e,t)]:(se(t)||(t=[t]),Array.from(t).map((t=>"string"==typeof t?new Do(e,t):t instanceof Oo?new Do(e,t.data):t)))}(this.document,t);for(const t of i)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire("change:"+e,t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}js.prototype.is=function(e){return"documentFragment"===e||"view:documentFragment"===e};class Hs{constructor(e){this._cloneGroups=new Map,this._slotFactory=null,this.document=e}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createDocumentFragment(e){return new js(this.document,e)}createText(e){return new Do(this.document,e)}createAttributeElement(e,t,n={}){const i=new Ds(this.document,e,t);return"number"==typeof n.priority&&(i._priority=n.priority),n.id&&(i._id=n.id),n.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),i}createContainerElement(e,t,n={},i={}){let o=null;Be(n)?i=n:o=n;const s=new us(this.document,e,t,o);return i.renderUnsafeAttributes&&s._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),s}createEditableElement(e,t,n={}){const i=new gs(this.document,e,t);return n.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),i}createEmptyElement(e,t,n={}){const i=new Rs(this.document,e,t);return n.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),i}createUIElement(e,t,n){const i=new Ns(this.document,e,t);return n&&(i.render=n),i}createRawElement(e,t,n,i={}){const o=new Ls(this.document,e,t);return n&&(o.render=n),i.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),o}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){Be(e)&&void 0===n?t._setStyle(e):n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof ws?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new T("view-writer-break-non-container-element",this.document);if(!t.parent)throw new T("view-writer-break-root",this.document);if(e.isAtStart)return ws._createBefore(t);if(!e.isAtEnd){const n=t._clone(!1);this.insert(ws._createAfter(t),n);const i=new _s(e,ws._createAt(t,"end")),o=new ws(n,0);this.move(i,o)}return ws._createAfter(t)}mergeAttributes(e){const t=e.offset,n=e.parent;if(n.is("$text"))return e;if(n.is("attributeElement")&&0===n.childCount){const e=n.parent,t=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new ws(e,t))}const i=n.getChild(t-1),o=n.getChild(t);if(!i||!o)return e;if(i.is("$text")&&o.is("$text"))return Us(i,o);if(i.is("attributeElement")&&o.is("attributeElement")&&i.isSimilar(o)){const e=i.childCount;return i._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new ws(i,e))}return e}mergeContainers(e){const t=e.nodeBefore,n=e.nodeAfter;if(!(t&&n&&t.is("containerElement")&&n.is("containerElement")))throw new T("view-writer-merge-containers-invalid-position",this.document);const i=t.getChild(t.childCount-1),o=i instanceof Do?ws._createAt(i,"end"):ws._createAt(t,"end");return this.move(_s._createIn(n),ws._createAt(t,"end")),this.remove(_s._createOn(n)),o}insert(e,t){Gs(t=se(t)?[...t]:[t],this.document);const n=t.reduce(((e,t)=>{const n=e[e.length-1],i=!t.is("uiElement");return n&&n.breakAttributes==i?n.nodes.push(t):e.push({breakAttributes:i,nodes:[t]}),e}),[]);let i=null,o=e;for(const{nodes:e,breakAttributes:t}of n){const n=this._insertNodes(o,e,t);i||(i=n.start),o=n.end}return i?new _s(i,o):new _s(e)}remove(e){const t=e instanceof _s?e:_s._createOn(e);if(Js(t,this.document),t.isCollapsed)return new js(this.document);const{start:n,end:i}=this._breakAttributesRange(t,!0),o=n.parent,s=i.offset-n.offset,r=o._removeChildren(n.offset,s);for(const e of r)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(n);return t.start=a,t.end=a.clone(),new js(this.document,r)}clear(e,t){Js(e,this.document);const n=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const i of n){const n=i.item;let o;if(n.is("element")&&t.isSimilar(n))o=_s._createOn(n);else if(!i.nextPosition.isAfter(e.start)&&n.is("$textProxy")){const e=n.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(o=_s._createIn(e))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),this.remove(o))}}move(e,t){let n;if(t.isAfter(e.end)){const i=(t=this._breakAttributes(t,!0)).parent,o=i.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=i.childCount-o}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof Ds))throw new T("view-writer-wrap-invalid-attribute",this.document);if(Js(e,this.document),e.isCollapsed){let i=e.start;i.parent.is("element")&&(n=i.parent,!Array.from(n.getChildren()).some((e=>!e.is("uiElement"))))&&(i=i.getLastMatchingPosition((e=>e.item.is("uiElement")))),i=this._wrapPosition(i,t);const o=this.document.selection;return o.isCollapsed&&o.getFirstPosition().isEqual(e.start)&&this.setSelection(i),new _s(i)}return this._wrapRange(e,t);var n}unwrap(e,t){if(!(t instanceof Ds))throw new T("view-writer-unwrap-invalid-attribute",this.document);if(Js(e,this.document),e.isCollapsed)return e;const{start:n,end:i}=this._breakAttributesRange(e,!0),o=n.parent,s=this._unwrapChildren(o,n.offset,i.offset,t),r=this.mergeAttributes(s.start);r.isEqual(s.start)||s.end.offset--;const a=this.mergeAttributes(s.end);return new _s(r,a)}rename(e,t){const n=new us(this.document,e,t.getAttributes());return this.insert(ws._createAfter(t),n),this.move(_s._createIn(t),ws._createAt(n,0)),this.remove(_s._createOn(t)),n}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return ws._createAt(e,t)}createPositionAfter(e){return ws._createAfter(e)}createPositionBefore(e){return ws._createBefore(e)}createRange(e,t){return new _s(e,t)}createRangeOn(e){return _s._createOn(e)}createRangeIn(e){return _s._createIn(e)}createSelection(...e){return new vs(...e)}createSlot(e="children"){if(!this._slotFactory)throw new T("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,n){let i,o;if(i=n?qs(e):e.parent.is("$text")?e.parent.parent:e.parent,!i)throw new T("view-writer-invalid-position-container",this.document);o=n?this._breakAttributes(e,!0):e.parent.is("$text")?$s(e):e;const s=i._insertChild(o.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=o.getShiftedBy(s),a=this.mergeAttributes(o);a.isEqual(o)||r.offset--;const l=this.mergeAttributes(r);return new _s(a,l)}_wrapChildren(e,t,n,i){let o=t;const s=[];for(;o<n;){const t=e.getChild(o),n=t.is("$text"),l=t.is("attributeElement");if(l&&this._wrapAttributeElement(i,t))s.push(new ws(e,o));else if(n||!l||(a=t,(r=i).priority<a.priority||!(r.priority>a.priority)&&r.getIdentity()<a.getIdentity())){const n=i._clone();t._remove(),n._appendChild(t),e._insertChild(o,n),this._addToClonedElementsGroup(n),s.push(new ws(e,o))}else this._wrapChildren(t,0,t.childCount,i);o++}var r,a;let l=0;for(const e of s)e.offset-=l,e.offset!=t&&(this.mergeAttributes(e).isEqual(e)||(l++,n--));return _s._createFromParentsAndOffsets(e,t,e,n)}_unwrapChildren(e,t,n,i){let o=t;const s=[];for(;o<n;){const t=e.getChild(o);if(t.is("attributeElement"))if(t.isSimilar(i)){const i=t.getChildren(),r=t.childCount;t._remove(),e._insertChild(o,i),this._removeFromClonedElementsGroup(t),s.push(new ws(e,o),new ws(e,o+r)),o+=r,n+=r-1}else this._unwrapAttributeElement(i,t)?(s.push(new ws(e,o),new ws(e,o+1)),o++):(this._unwrapChildren(t,0,t.childCount,i),o++);else o++}let r=0;for(const e of s)e.offset-=r,e.offset!=t&&e.offset!=n&&(this.mergeAttributes(e).isEqual(e)||(r++,n--));return _s._createFromParentsAndOffsets(e,t,e,n)}_wrapRange(e,t){const{start:n,end:i}=this._breakAttributesRange(e,!0),o=n.parent,s=this._wrapChildren(o,n.offset,i.offset,t),r=this.mergeAttributes(s.start);r.isEqual(s.start)||s.end.offset--;const a=this.mergeAttributes(s.end);return new _s(r,a)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return Ws(e.clone());e.parent.is("$text")&&(e=$s(e));const n=this.createAttributeElement("_wrapPosition-fake-element");n._priority=Number.POSITIVE_INFINITY,n.isSimilar=()=>!1,e.parent._insertChild(e.offset,n);const i=new _s(e,e.getShiftedBy(1));this.wrap(i,t);const o=new ws(n.parent,n.index);n._remove();const s=o.nodeBefore,r=o.nodeAfter;return s instanceof Do&&r instanceof Do?Us(s,r):Ws(o)}_wrapAttributeElement(e,t){if(!Ys(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(const n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(const n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(const n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!Ys(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const n=e.start,i=e.end;if(Js(e,this.document),e.isCollapsed){const n=this._breakAttributes(e.start,t);return new _s(n,n)}const o=this._breakAttributes(i,t),s=o.parent.childCount,r=this._breakAttributes(n,t);return o.offset+=o.parent.childCount-s,new _s(r,o)}_breakAttributes(e,t=!1){const n=e.offset,i=e.parent;if(e.parent.is("emptyElement"))throw new T("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new T("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new T("view-writer-cannot-break-raw-element",this.document);if(!t&&i.is("$text")&&Zs(i.parent))return e.clone();if(Zs(i))return e.clone();if(i.is("$text"))return this._breakAttributes($s(e),t);if(n==i.childCount){const e=new ws(i.parent,i.index+1);return this._breakAttributes(e,t)}if(0===n){const e=new ws(i.parent,i.index);return this._breakAttributes(e,t)}{const e=i.index+1,o=i._clone();i.parent._insertChild(e,o),this._addToClonedElementsGroup(o);const s=i.childCount-n,r=i._removeChildren(n,s);o._appendChild(r);const a=new ws(i.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const n=this._cloneGroups.get(t);n&&n.delete(e)}}function qs(e){let t=e.parent;for(;!Zs(t);){if(!t)return;t=t.parent}return t}function Ws(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new ws(t,t.data.length);const n=e.nodeAfter;return n&&n.is("$text")?new ws(n,0):e}function $s(e){if(e.offset==e.parent.data.length)return new ws(e.parent.parent,e.parent.index+1);if(0===e.offset)return new ws(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new Do(e.root.document,t)),new ws(e.parent.parent,e.parent.index+1)}function Us(e,t){const n=e.data.length;return e._data+=t.data,t._remove(),new ws(e,n)}const Ks=[Do,Ds,us,Rs,Ls,Ns];function Gs(e,t){for(const n of e){if(!Ks.some((e=>n instanceof e)))throw new T("view-writer-insert-invalid-node-type",t);n.is("$text")||Gs(n.getChildren(),t)}}function Zs(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function Js(e,t){const n=qs(e.start),i=qs(e.end);if(!n||!i||n!==i)throw new T("view-writer-invalid-range-container",t)}function Ys(e,t){return null===e.id&&null===t.id}const Qs=e=>e.createTextNode(" "),Xs=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},er=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},tr=7,nr="".repeat(tr);function ir(e){return"string"==typeof e?e.substr(0,tr)===nr:ei(e)&&e.data.substr(0,tr)===nr}function or(e){return e.data.length==tr&&ir(e)}function sr(e){const t="string"==typeof e?e:e.data;return ir(e)?t.slice(tr):t}function rr(e,t){if(t.keyCode==Oi.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;ir(t)&&n<=tr&&e.collapse(t,0)}}}var ar=o(1909);vo()(ar.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ar.A.locals;class lr extends(J()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),p.isBlink&&!p.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new T("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){if(this.isComposing&&!p.isAndroid)return;let e=null;const t=!(p.isBlink&&!p.isAndroid&&this.isSelecting);for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=ws._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),n=t.parent.ownerDocument;ir(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=cr(n,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(t.childNodes),i=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),o=this._diffNodeLists(n,i),s=this._findUpdateActions(o,n,i,dr);if(-1!==s.indexOf("update")){const t={equal:0,insert:0,delete:0};for(const o of s)if("update"===o){const o=t.equal+t.insert,s=t.equal+t.delete,r=e.getChild(o);!r||r.is("uiElement")||r.is("rawElement")||this._updateElementMappings(r,n[s]),ki(i[o]),t.equal++}else t[o]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?ws._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&ei(t.parent)&&ir(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!ir(e))throw new T("view-renderer-filler-was-lost",this);or(e)?e.remove():e.data=e.data.substr(tr),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,n=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(n===t.getFillerOffset())return!1;const i=e.nodeBefore,o=e.nodeAfter;return!(i instanceof Do||o instanceof Do||p.isAndroid&&(i||o))}_updateText(e,t){const n=this.domConverter.findCorrespondingDomText(e);let i=this.domConverter.viewToDom(e).data;const o=t.inlineFillerPosition;o&&o.parent==e.parent&&o.offset==e.index&&(i=nr+i),mr(n,i)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(t.attributes).map((e=>e.name)),i=e.getAttributeKeys();for(const n of i)this.domConverter.setDomElementAttribute(t,n,e.getAttribute(n),e);for(const i of n)e.hasAttribute(i)||this.domConverter.removeDomElementAttribute(t,i)}_updateChildren(e,t){const n=this.domConverter.mapViewToDom(e);if(!n)return;if(p.isAndroid){let e=null;for(const t of Array.from(n.childNodes)){if(e&&ei(e)&&ei(t)){n.normalize();break}e=t}}const i=t.inlineFillerPosition,o=n.childNodes,s=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));i&&i.parent===e&&cr(n.ownerDocument,s,i.offset);const r=this._diffNodeLists(o,s),a=this._findUpdateActions(r,o,s,hr);let l=0;const c=new Set;for(const e of a)"delete"===e?(c.add(o[l]),ki(o[l])):"equal"!==e&&"update"!==e||l++;l=0;for(const e of a)"insert"===e?(gi(n,l,s[l]),l++):"update"===e?(mr(o[l],s[l].data),l++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(s[l])),l++);for(const e of c)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return k(e=function(e,t){const n=Array.from(e);if(0==n.length||!t)return n;return n[n.length-1]==t&&n.pop(),n}(e,this._fakeSelectionContainer),t,ur.bind(null,this.domConverter))}_findUpdateActions(e,t,n,i){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let o=[],s=[],r=[];const a={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?r.push(n[a.equal+a.insert]):"delete"===l?s.push(t[a.equal+a.delete]):(o=o.concat(k(s,r,i).map((e=>"equal"===e?"update":e))),o.push("equal"),s=[],r=[]),a[l]++;return o.concat(k(s,r,i).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(p.isBlink&&!p.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&p.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(e))return;n.parentElement&&n.parentElement==e||e.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const i=t.getSelection(),o=t.createRange();i.removeAllRanges(),o.selectNodeContents(n),i.addRange(o)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);t.setBaseAndExtent(n.parent,n.offset,i.parent,i.offset),p.isGecko&&function(e,t){const n=e.parent;if(n.nodeType!=Node.ELEMENT_NODE||e.offset!=n.childNodes.length-1)return;const i=n.childNodes[e.offset];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}(i,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t)||!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,n=e.ownerDocument.getSelection();return!t||t.parentElement!==e||n.anchorNode!==t&&!t.contains(n.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const n=e.activeElement,i=this.domConverter.mapDomToView(n);n&&i&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function cr(e,t,n){const i=t instanceof Array?t:t.childNodes,o=i[n];if(ei(o))return o.data=nr+o.data,o;{const o=e.createTextNode(nr);return Array.isArray(t)?i.splice(n,0,o):gi(t,n,o),o}}function dr(e,t){return Wn(e)&&Wn(t)&&!ei(e)&&!ei(t)&&!pi(e)&&!pi(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function hr(e,t){return Wn(e)&&Wn(t)&&ei(e)&&ei(t)}function ur(e,t,n){return t===n||(ei(t)&&ei(n)?t.data===n.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(n)))}function mr(e,t){const n=e.data;if(n==t)return;const i=b(n,t);for(const t of i)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const gr=er(Yn.document),pr=Qs(Yn.document),fr=Xs(Yn.document),br="data-ck-unsafe-attribute-",wr="data-ck-unsafe-element";class _r{constructor(e,{blockFillerMode:t,renderingMode:n="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new Mo,this._inlineObjectElementMatcher=new Mo,this._elementsWithTemporaryCustomProperties=new Set,this.document=e,this.renderingMode=n,this.blockFillerMode=t||("editing"===n?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?Yn.document:Yn.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new vs(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,n){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===e||"srcset"===e)||"source"===n&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const n=(new DOMParser).parseFromString(t,"text/html"),i=n.createDocumentFragment(),o=n.body.childNodes;for(;o.length>0;)i.appendChild(o[0]);const s=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT),r=[];let a;for(;a=s.nextNode();)r.push(a);for(const e of r){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(yr(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(i)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{const n=e;if(this.mapViewToDom(n)){if(!n.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(n);this._elementsWithTemporaryCustomProperties.add(n)}let i;if(n.is("documentFragment"))i=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(i,n);else{if(n.is("uiElement"))return i="$comment"===n.name?this._domDocument.createComment(n.getCustomProperty("$rawContent")):n.render(this._domDocument,this),t.bind&&this.bindElements(i,n),i;this._shouldRenameElement(n.name)?(yr(n.name),i=this._createReplacementDomElement(n.name)):i=n.hasAttribute("xmlns")?this._domDocument.createElementNS(n.getAttribute("xmlns"),n.name):this._domDocument.createElement(n.name),n.is("rawElement")&&n.render(i,this),t.bind&&this.bindElements(i,n);for(const e of n.getAttributeKeys())this.setDomElementAttribute(i,e,n.getAttribute(e),n)}if(!1!==t.withChildren)for(const e of this.viewChildrenToDom(n,t))i.appendChild(e);return i}}setDomElementAttribute(e,t,n,i){const o=this.shouldRenderAttribute(t,n,e.tagName.toLowerCase())||i&&i.shouldRenderUnsafeAttribute(t);o||B("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:n}),function(e){try{Yn.document.createAttribute(e)}catch(e){return!1}return!0}(t)?(e.hasAttribute(t)&&!o?e.removeAttribute(t):e.hasAttribute(br+t)&&o&&e.removeAttribute(br+t),e.setAttribute(o?t:br+t,n)):B("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:n})}removeDomElementAttribute(e,t){t!=wr&&(e.removeAttribute(t),e.removeAttribute(br+t))}*viewChildrenToDom(e,t={}){const n=e.getFillerOffset&&e.getFillerOffset();let i=0;for(const o of e.getChildren()){n===i&&(yield this._getBlockFiller());const e=o.is("element")&&!!o.getCustomProperty("dataPipeline:transparentRendering")&&!io(o.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(o,t):(e&&B("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:o}),yield this.viewToDom(o,t)),i++}n===i&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),i=this._domDocument.createRange();return i.setStart(t.parent,t.offset),i.setEnd(n.parent,n.offset),i}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const n=this.findCorrespondingDomText(t);if(!n)return null;let i=e.offset;return ir(n)&&(i+=tr),{parent:n,offset:i}}{let n,i,o;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;o=n.childNodes[0]}else{const t=e.nodeBefore;if(i=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!i)return null;n=i.parentNode,o=i.nextSibling}return ei(o)&&ir(o)?{parent:o,offset:tr}:{parent:n,offset:i?mi(i)+1:0}}}domToView(e,t={}){const n=[],i=this._domToView(e,t,n),o=i.next().value;return o?(i.next(),this._processDomInlineNodes(null,n,t),o.is("$text")&&0==o.data.length?null:o):null}*domChildrenToView(e,t={},n=[]){for(let i=0;i<e.childNodes.length;i++){const o=e.childNodes[i],s=this._domToView(o,t,n),r=s.next().value;null!==r&&(this._isBlockViewElement(r)&&this._processDomInlineNodes(e,n,t),yield r,s.next())}this._processDomInlineNodes(e,n,t)}domSelectionToView(e){if(function(e){if(!p.isGecko)return!1;if(!e.rangeCount)return!1;const t=e.getRangeAt(0).startContainer;try{Object.prototype.toString.call(t)}catch(e){return!0}return!1}(e))return new vs([]);if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;ei(t)&&(t=t.parentNode);const n=this.fakeSelectionToView(t);if(n)return n}const t=this.isDomSelectionBackward(e),n=[];for(let t=0;t<e.rangeCount;t++){const i=e.getRangeAt(t),o=this.domRangeToView(i);o&&n.push(o)}return new vs(n,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),n=this.domPositionToView(e.endContainer,e.endOffset);return t&&n?new _s(t,n):null}domPositionToView(e,t=0){if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,mi(e));const n=this.mapDomToView(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return ws._createBefore(n);if(ei(e)){if(or(e))return this.domPositionToView(e.parentNode,mi(e));const n=this.findCorrespondingViewText(e);let i=t;return n?(ir(e)&&(i-=tr,i=i<0?0:i),new ws(n,i)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new ws(t,0)}else{const n=e.childNodes[t-1];if(ei(n)&&or(n)||n&&this.isBlockFiller(n))return this.domPositionToView(n.parentNode,mi(n));const i=ei(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(i&&i.parent)return new ws(i.parent,i.index+1)}return null}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(or(e))return null;const t=this.getHostViewElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){const t=e.nextSibling;return t instanceof Do?t:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof Do?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=Yn.window,i=[];vr(t,(e=>{const{scrollLeft:t,scrollTop:n}=e;i.push([t,n])})),t.focus(),vr(t,(e=>{const[t,n]=i.shift();e.scrollLeft=t,e.scrollTop=n})),Yn.window.scrollTo(e,n)}}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const t=e.ownerDocument.defaultView.getSelection(),n=this.domSelectionToView(t);n&&n.rangeCount>0&&t.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(gr):!("BR"!==e.tagName||!Ar(e,this.blockElements)||1!==e.parentNode.childNodes.length)||e.isEqualNode(fr)||function(e,t){return e.isEqualNode(pr)&&Ar(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const n=t.collapsed;return t.detach(),n}getHostViewElement(e){const t=function(e){const t=[];let n=e;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)t.unshift(n),n=n.parentNode;return t}(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Qs(this._domDocument);case"markedNbsp":return Xs(this._domDocument);case"br":return er(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(ei(e)&&ir(e)&&t<tr)return!1;if(this.isElement(e)&&ir(e.childNodes[t]))return!1;const n=this.mapDomToView(e);return!n||!n.is("uiElement")&&!n.is("rawElement")}*_domToView(e,t,n){if(this.isBlockFiller(e))return null;const i=this.getHostViewElement(e);if(i)return i;if(pi(e)&&t.skipComments)return null;if(ei(e)){if(or(e))return null;{const t=e.data;if(""===t)return null;const i=new Do(this.document,t);return n.push(i),i}}{let i=this.mapDomToView(e);if(i)return this._isInlineObjectElement(i)&&n.push(i),i;if(this.isDocumentFragment(e))i=new js(this.document),t.bind&&this.bindDocumentFragments(e,i);else{i=this._createViewElement(e,t),t.bind&&this.bindElements(e,i);const o=e.attributes;if(o)for(let e=o.length,t=0;t<e;t++)i._setAttribute(o[t].name,o[t].value);if(this._isViewElementWithRawContent(i,t))return i._setCustomProperty("$rawContent",e.innerHTML),this._isBlockViewElement(i)||n.push(i),i;if(pi(e))return i._setCustomProperty("$rawContent",e.data),i}yield i;const o=[];if(!1!==t.withChildren)for(const n of this.domChildrenToView(e,t,o))i._appendChild(n);if(this._isInlineObjectElement(i))n.push(i);else for(const e of o)n.push(e)}}_processDomInlineNodes(e,t,n){if(!t.length)return;if(e&&!this.isDocumentFragment(e)&&!this._isBlockDomElement(e))return;let i=!1;for(let e=0;e<t.length;e++){const o=t[e];if(!o.is("$text")){i=!1;continue}let s,r=!1;if(kr(o,this.preElements))s=sr(o.data);else{s=o.data.replace(/[ \n\t\r]{1,}/g," "),r=/[^\S\u00A0]/.test(s.charAt(s.length-1));const a=e>0?t[e-1]:null,l=e+1<t.length?t[e+1]:null,c=!a||a.is("element")&&"br"==a.name||i,d=!l&&!ir(o.data);!1!==n.withChildren&&(c&&(s=s.replace(/^ /,"")),d&&(s=s.replace(/ $/,""))),s=sr(s),s=s.replace(/ \u00A0/g," ");const h=l&&l.is("element")&&"br"!=l.name,u=l&&l.is("$text")&&" "==l.data.charAt(0);(/[ \u00A0]\u00A0$/.test(s)||!l||h||u)&&(s=s.replace(/\u00A0$/," ")),(c||a&&a.is("element")&&"br"!=a.name)&&(s=s.replace(/^\u00A0/," "))}0==s.length&&o.parent?(o._remove(),t.splice(e,1),e--):(o._data=s,i=r)}t.length=0}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const n=this._getTouchingInlineViewNode(e,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const n=this._getTouchingInlineViewNode(e,!0),i=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=t.charAt(t.length-2)&&n&&!i||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g," ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_getTouchingInlineViewNode(e,t){const n=new bs({startPosition:t?ws._createAfter(e):ws._createBefore(e),direction:t?"forward":"backward"});for(const e of n){if(e.item.is("element","br"))return null;if(this._isInlineObjectElement(e.item))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("$textProxy"))return e.item}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return!!e.is("element")&&("br"==e.name||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e))}_createViewElement(e,t){if(pi(e))return new Ns(this.document,"$comment");const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new ds(this.document,n)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const n=this._domDocument.createElement("span");if(n.setAttribute(wr,e),t){for(;t.firstChild;)n.appendChild(t.firstChild);for(const e of t.getAttributeNames())n.setAttribute(e,t.getAttribute(e))}return n}}function kr(e,t){return e.getAncestors().some((e=>e.is("element")&&t.includes(e.name)))}function vr(e,t){let n=e;for(;n;)t(n),n=n.parentElement}function Ar(e,t){const n=e.parentNode;return!!n&&!!n.tagName&&t.includes(n.tagName.toLowerCase())}function yr(e){"script"===e&&B("domconverter-unsafe-script-element-detected"),"style"===e&&B("domconverter-unsafe-style-element-detected")}class Cr extends(Kn()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var xr=Yi((function(e,t){lt(t,zt(t),e)}));class Er{constructor(e,t,n){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,xr(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Tr extends Cr{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,n){this.isEnabled&&this.document.fire(e,new Er(this.view,t,n))}}class Br extends Tr{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return Ri(this)}};this.fire(e.type,e,t)}}var Pr=function(){return le.Date.now()},Sr=/\s/,Ir=/^\s+/,Dr=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Sr.test(e.charAt(t)););return t}(e)+1).replace(Ir,""):e},Or=/^[-+]0x[0-9a-f]+$/i,Mr=/^0b[01]+$/i,Rr=/^0o[0-7]+$/i,Vr=parseInt,Nr=function(e){if("number"==typeof e)return e;if(No(e))return NaN;if(q(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=q(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Dr(e);var n=Mr.test(e);return n||Rr.test(e)?Vr(e.slice(2),n?2:8):Or.test(e)?NaN:+e},Fr=Math.max,Lr=Math.min,zr=function(e,t,n){var i,o,s,r,a,l,c=0,d=!1,h=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=i,s=o;return i=o=void 0,c=t,r=e.apply(s,n)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-c>=s}function p(){var e=Pr();if(g(e))return f(e);a=setTimeout(p,function(e){var n=t-(e-l);return h?Lr(n,s-(e-c)):n}(e))}function f(e){return a=void 0,u&&i?m(e):(i=o=void 0,r)}function b(){var e=Pr(),n=g(e);if(i=arguments,o=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(p,t),d?m(e):r}(l);if(h)return clearTimeout(a),a=setTimeout(p,t),m(l)}return void 0===a&&(a=setTimeout(p,t)),r}return t=Nr(t)||0,q(n)&&(d=!!n.leading,s=(h="maxWait"in n)?Fr(Nr(n.maxWait)||0,t):s,u="trailing"in n?!!n.trailing:u),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=o=a=void 0},b.flush=function(){return void 0===a?r:f(Pr())},b};class jr extends Cr{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=zr((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,n)=>{e.selection.isFake&&this.isEnabled&&n.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,n)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new vs(t.getRanges(),{backward:t.isBackward,fake:!1});e!=Oi.arrowleft&&e!=Oi.arrowup||n.setTo(n.getFirstPosition()),e!=Oi.arrowright&&e!=Oi.arrowdown||n.setTo(n.getLastPosition());const i={oldSelection:t,newSelection:n,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}function Hr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new tt;++t<n;)this.add(e[t])}Hr.prototype.add=Hr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Hr.prototype.has=function(e){return this.__data__.has(e)};var qr=Hr,Wr=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1},$r=function(e,t){return e.has(t)},Ur=function(e,t,n,i,o,s){var r=1&n,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,m=2&n?new qr:void 0;for(s.set(e,t),s.set(t,e);++h<a;){var g=e[h],p=t[h];if(i)var f=r?i(p,g,h,t,e,s):i(g,p,h,e,t,s);if(void 0!==f){if(f)continue;u=!1;break}if(m){if(!Wr(t,(function(e,t){if(!$r(m,t)&&(g===e||o(g,e,n,i,s)))return m.push(t)}))){u=!1;break}}else if(g!==p&&!o(g,p,n,i,s)){u=!1;break}}return s.delete(e),s.delete(t),u},Kr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n},Gr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Zr=ce?ce.prototype:void 0,Jr=Zr?Zr.valueOf:void 0,Yr=Object.prototype.hasOwnProperty,Qr="[object Arguments]",Xr="[object Array]",ea="[object Object]",ta=Object.prototype.hasOwnProperty,na=function(e,t,n,i,o,s){var r=be(e),a=be(t),l=r?Xr:wn(e),c=a?Xr:wn(t),d=(l=l==Qr?ea:l)==ea,h=(c=c==Qr?ea:c)==ea,u=l==c;if(u&&wt(e)){if(!wt(t))return!1;r=!0,d=!1}if(u&&!d)return s||(s=new it),r||Pt(e)?Ur(e,t,n,i,o,s):function(e,t,n,i,o,s,r){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new kn(e),new kn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Pe(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Kr;case"[object Set]":var l=1&i;if(a||(a=Gr),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;i|=2,r.set(e,t);var d=Ur(a(e),a(t),i,o,s,r);return r.delete(e),d;case"[object Symbol]":if(Jr)return Jr.call(e)==Jr.call(t)}return!1}(e,t,l,n,i,o,s);if(!(1&n)){var m=d&&ta.call(e,"__wrapped__"),g=h&&ta.call(t,"__wrapped__");if(m||g){var p=m?e.value():e,f=g?t.value():t;return s||(s=new it),o(p,f,n,i,s)}}return!!u&&(s||(s=new it),function(e,t,n,i,o,s){var r=1&n,a=en(e),l=a.length;if(l!=en(t).length&&!r)return!1;for(var c=l;c--;){var d=a[c];if(!(r?d in t:Yr.call(t,d)))return!1}var h=s.get(e),u=s.get(t);if(h&&u)return h==t&&u==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=r;++c<l;){var p=e[d=a[c]],f=t[d];if(i)var b=r?i(f,p,d,t,e,s):i(p,f,d,e,t,s);if(!(void 0===b?p===f||o(p,f,n,i,s):b)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(m=!1)}return s.delete(e),s.delete(t),m}(e,t,n,i,o,s))},ia=function e(t,n,i,o,s){return t===n||(null==t||null==n||!we(t)&&!we(n)?t!=t&&n!=n:na(t,n,i,o,e,s))},oa=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?ia(e,t,void 0,n):!!i};class sa extends Cr{constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,n=new Set,i=new Set;for(const n of e){const e=t.mapDomToView(n.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==n.type||this._isBogusBrMutation(n)||i.add(e))}for(const o of e){const e=t.mapDomToView(o.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===o.type){const e=t.findCorrespondingViewText(o.target);e&&!i.has(e.parent)?n.add(e):!e&&ir(o.target)&&i.add(t.mapDomToView(o.target.parentNode))}}let o=!1;for(const e of n)o=!0,this.renderer.markToSync("text",e);for(const e of i){const n=t.mapViewToDom(e),i=Array.from(e.getChildren()),s=Array.from(t.domChildrenToView(n,{withChildren:!1}));oa(i,s,ra)||(o=!0,this.renderer.markToSync("children",e))}o&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function ra(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class aa extends Tr{constructor(e){super(e),this._isFocusChanging=!1,this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((n,i)=>{const o=t.selection.editableElement;null!==o&&o!==i.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class la extends Cr{constructor(e){super(e),this.mutationObserver=e.getObserver(sa),this.focusObserver=e.getObserver(aa),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=zr((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=zr((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,n=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",n,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",n,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",n,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,n)=>{this.document.isComposing&&!p.isAndroid||(this._handleSelectionChange(n,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const n=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const i=this.domConverter.domSelectionToView(n);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(i)||!this.domConverter.isDomSelectionCorrect(n))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(i))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:i,domSelection:n};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class ca extends Tr{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class da{constructor(e,t={}){this._files=t.cacheFiles?ha(e):null,this._native=e}get files(){return this._files||(this._files=ha(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,n){this._native.setDragImage(e,t,n)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function ha(e){const t=Array.from(e.files||[]),n=Array.from(e.items||[]);return t.length?t:n.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class ua extends Tr{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),n=this.view,i=n.document;let o=null,s=null,r=[];if(e.dataTransfer&&(o=new da(e.dataTransfer)),null!==e.data?s=e.data:o&&(s=o.getData("text/plain")),i.selection.isFake)r=Array.from(i.selection.getRanges());else if(t.length)r=t.map((e=>{const t=n.domConverter.domPositionToView(e.startContainer,e.startOffset),i=n.domConverter.domPositionToView(e.endContainer,e.endOffset);return t?n.createRange(t,i):i?n.createRange(i):void 0})).filter((e=>!!e));else if(p.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();r=Array.from(n.domConverter.domSelectionToView(t).getRanges())}if(p.isAndroid&&"insertCompositionText"==e.inputType&&s&&s.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[n.createRange(r[0].end)]});else if("insertText"==e.inputType&&s&&s.includes("\n")){const t=s.split(/\n{1,2}/g);let n=r;for(let s=0;s<t.length;s++){const r=t[s];""!=r&&(this.fire(e.type,e,{data:r,dataTransfer:o,targetRanges:n,inputType:e.inputType,isComposing:e.isComposing}),n=[i.selection.getFirstRange()]),s+1<t.length&&(this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:n}),n=[i.selection.getFirstRange()])}}else this.fire(e.type,e,{data:s,dataTransfer:o,targetRanges:r,inputType:e.inputType,isComposing:e.isComposing})}}class ma extends Cr{constructor(e){super(e),this.document.on("keydown",((e,t)=>{if(this.isEnabled&&((n=t.keyCode)==Oi.arrowright||n==Oi.arrowleft||n==Oi.arrowup||n==Oi.arrowdown)){const n=new ys(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,t),n.stop.called&&e.stop()}var n}))}observe(){}stopObserving(){}}class ga extends Cr{constructor(e){super(e);const t=this.document;t.on("keydown",((e,n)=>{if(!this.isEnabled||n.keyCode!=Oi.tab||n.ctrlKey)return;const i=new ys(t,"tab",t.selection.getFirstRange());t.fire(i,n),i.stop.called&&e.stop()}))}observe(){}stopObserving(){}}var pa=function(e){return Fn(e,5)};class fa extends(J()){constructor(e){var t;super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new Ss(e),this.domConverter=new _r(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new lr(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new Hs(this.document),this.addObserver(sa),this.addObserver(aa),this.addObserver(la),this.addObserver(Br),this.addObserver(jr),this.addObserver(ca),this.addObserver(ma),this.addObserver(ua),this.addObserver(ga),this.document.on("arrowKey",rr,{priority:"low"}),(t=this).document.on("arrowKey",((e,n)=>function(e,t,n){if(t.keyCode==Oi.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),i=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(i||t.shiftKey){const t=e.focusNode,o=e.focusOffset,s=n.domPositionToView(t,o);if(null===s)return;let r=!1;const a=s.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(r=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(r){const t=n.viewPositionToDom(a);i?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,n,t.domConverter)),{priority:"low"}),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0})),p.isiOS&&this.listenTo(this.document,"blur",((e,t)=>{this.domConverter.mapDomToView(t.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}))}attachDomRoot(e,t="main"){const n=this.document.getRoot(t);n._name=e.tagName.toLowerCase();const i={};for(const{name:t,value:o}of Array.from(e.attributes))i[t]=o,"class"===t?this._writer.addClass(o.split(" "),n):this._writer.setAttribute(t,o,n);this._initialDomRootAttributes.set(e,i);const o=()=>{this._writer.setAttribute("contenteditable",(!n.isReadOnly).toString(),n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};o(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(e.ownerDocument),n.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),n.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),n.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),n.on("change:isReadOnly",(()=>this.change(o))),n.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const n of this._observers.values())n.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const n=this._initialDomRootAttributes.get(t);for(const e in n)t.setAttribute(e,n[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,n]of this.domRoots)t.observe(n,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:n=20,ancestorOffset:i=20}={}){const o=this.document.selection.getFirstRange();if(!o)return;const s=pa({alignToTop:e,forceScroll:t,viewportOffset:n,ancestorOffset:i});"number"==typeof n&&(n={top:n,bottom:n,left:n,right:n});const r={target:this.domConverter.viewRangeToDom(o),viewportOffset:n,ancestorOffset:i,alignToTop:e,forceScroll:t};this.fire("scrollToTheSelection",r,s),function({target:e,viewportOffset:t=0,ancestorOffset:n=0,alignToTop:i,forceScroll:o}){const s=Ti(e);let r=s,a=null;for(t=function(e){return"number"==typeof e?{top:e,bottom:e,left:e,right:e}:e}(t);r;){let l;l=Bi(r==s?e:a),Ai({parent:l,getRect:()=>Pi(e,r),alignToTop:i,ancestorOffset:n,forceScroll:o});const c=Pi(e,r);if(vi({window:r,rect:c,viewportOffset:t,alignToTop:i,forceScroll:o}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}(r)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new T("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){T.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(aa).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return ws._createAt(e,t)}createPositionAfter(e){return ws._createAfter(e)}createPositionBefore(e){return ws._createBefore(e)}createRange(e,t){return new _s(e,t)}createRangeOn(e){return _s._createOn(e)}createRangeIn(e){return _s._createIn(e)}createSelection(...e){return new vs(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class ba{is(){throw new Error("is() method is abstract")}}class wa extends ba{constructor(e){super(),this.parent=null,this._attrs=ro(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new T("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new T("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),i=e.getAncestors(t);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),i=oe(t,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]<n[i]}}isAfter(e){return this!=e&&this.root===e.root&&!this.isBefore(e)}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce(((e,t)=>(e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=ro(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}wa.prototype.is=function(e){return"node"===e||"model:node"===e};class _a{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new T("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&e<t+n.offsetSize)return this.getNodeIndex(n);t+=n.offsetSize}if(t!=e)throw new T("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.length}_insertNodes(e,t){for(const e of t)if(!(e instanceof wa))throw new T("model-nodelist-insertnodes-not-node",this);this._nodes=function(e,t,n,i){if(Math.max(t.length,e.length)>1e4)return e.slice(0,n).concat(t).concat(e.slice(n+0,e.length));{const i=Array.from(e);return i.splice(n,0,...t),i}}(this._nodes,Array.from(t),e)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}class ka extends wa{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new ka(this.data,this.getAttributes())}static fromJSON(e){return new ka(e.data,e.attributes)}}ka.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class va extends ba{constructor(e,t,n){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new T("model-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.offsetSize)throw new T("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}va.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class Aa extends wa{constructor(e,t,n){super(t),this._children=new _a,this.name=e,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}findAncestor(e,t={}){let n=t.includeSelf?this:this.parent;for(;n;){if(n.name===e)return n;n=n.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new Aa(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){return"string"==typeof e?[new ka(e)]:(se(e)||(e=[e]),Array.from(e).map((e=>"string"==typeof e?new ka(e):e instanceof va?new ka(e.data,e.getAttributes()):e)))}(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}static fromJSON(e){let t;if(e.children){t=[];for(const n of e.children)n.name?t.push(Aa.fromJSON(n)):t.push(ka.fromJSON(n))}return new Aa(e.name,e.attributes,t)}}Aa.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class ya{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new T("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new T("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=xa._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,n,i,o;do{i=this.position,o=this._visitedParent,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this._position=i,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const i=Ea(t,n),o=i||Ta(t,n,i);if(o instanceof Aa){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t.path.push(0),this._visitedParent=o;return this._position=t,Ca("elementStart",o,e,t,1)}if(o instanceof ka){let i;if(this.singleCharacters)i=1;else{let e=o.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),i=e-t.offset}const s=t.offset-o.startOffset,r=new va(o,s,i);return t.offset+=i,this._position=t,Ca("text",r,e,t,i)}return t.path.pop(),t.offset++,this._position=t,this._visitedParent=n.parent,this.ignoreElementEnd?this._next():Ca("elementEnd",n,e,t)}_previous(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&0===t.offset)return{done:!0,value:void 0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const i=t.parent,o=Ea(t,i),s=o||Ba(t,i,o);if(s instanceof Aa)return t.offset--,this.shallow?(this._position=t,Ca("elementStart",s,e,t,1)):(t.path.push(s.maxOffset),this._position=t,this._visitedParent=s,this.ignoreElementEnd?this._previous():Ca("elementEnd",s,e,t));if(s instanceof ka){let i;if(this.singleCharacters)i=1;else{let e=s.startOffset;this._boundaryStartParent==n&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),i=t.offset-e}const o=t.offset-s.startOffset,r=new va(s,o-i,i);return t.offset-=i,this._position=t,Ca("text",r,e,t,i)}return t.path.pop(),this._position=t,this._visitedParent=n.parent,Ca("elementStart",n,e,t,1)}}function Ca(e,t,n,i,o){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:i,length:o}}}class xa extends ba{constructor(e,t,n="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new T("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new T("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChild(e.offsetToIndex(this.path[t])),!e)throw new T("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new T("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return Ea(this,this.parent)}get nodeAfter(){const e=this.parent;return Ta(this,e,Ea(this,e))}get nodeBefore(){const e=this.parent;return Ba(this,e,Ea(this,e))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=oe(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new ya(t);return n.skip(e),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const t=oe(this.path,e.path),n="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,n)}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let i=0;for(;t[i]==n[i]&&t[i];)i++;return 0===i?null:t[i-1]}getShiftedBy(e){const t=this.clone(),n=t.offset+e;return t.offset=n<0?0:n,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){if(this.root!==e.root)return!1;const t=Math.min(this.path.length,e.path.length);for(let n=0;n<t;n++){const t=this.path[n]-e.path[n];if(t<-1||t>1)return!1;if(1===t)return Pa(e,this,n);if(-1===t)return Pa(this,e,n)}return this.path.length===e.path.length||(this.path.length>e.path.length?Sa(this.path,t):Sa(e.path,t))}hasSameParentAs(e){return this.root===e.root&&"same"==oe(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=xa._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let n;return t.containsPosition(this)||t.start.isEqual(this)?(n=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(n=n._getTransformedByDeletion(e.deletionPosition,1))):n=this.isEqual(e.deletionPosition)?xa._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),n}_getTransformedByDeletion(e,t){const n=xa._createAt(this);if(this.root!=e.root)return n;if("same"==oe(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;n.offset-=t}}else if("prefix"==oe(e.getParentPath(),this.getParentPath())){const i=e.path.length-1;if(e.offset<=this.path[i]){if(e.offset+t>this.path[i])return null;n.path[i]-=t}}return n}_getTransformedByInsertion(e,t){const n=xa._createAt(this);if(this.root!=e.root)return n;if("same"==oe(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&"toPrevious"!=this.stickiness)&&(n.offset+=t);else if("prefix"==oe(e.getParentPath(),this.getParentPath())){const i=e.path.length-1;e.offset<=this.path[i]&&(n.path[i]+=t)}return n}_getTransformedByMove(e,t,n){if(t=t._getTransformedByDeletion(e,n),e.isEqual(t))return xa._createAt(this);const i=this._getTransformedByDeletion(e,n);return null===i||e.isEqual(this)&&"toNext"==this.stickiness||e.getShiftedBy(n).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(e,t):i._getTransformedByInsertion(t,n)}_getCombined(e,t){const n=e.path.length-1,i=xa._createAt(t);return i.stickiness=this.stickiness,i.offset=i.offset+this.path[n]-e.offset,i.path=[...i.path,...this.path.slice(n+1)],i}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t,n="toNone"){if(e instanceof xa)return new xa(e.root,e.path,e.stickiness);{const i=e;if("end"==t)t=i.maxOffset;else{if("before"==t)return this._createBefore(i,n);if("after"==t)return this._createAfter(i,n);if(0!==t&&!t)throw new T("model-createpositionat-offset-required",[this,e])}if(!i.is("element")&&!i.is("documentFragment"))throw new T("model-position-parent-incorrect",[this,e]);const o=i.getPath();return o.push(t),new this(i.root,o,n)}}static _createAfter(e,t){if(!e.parent)throw new T("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new T("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){const n=new xa(t.graveyard,e.path);return n.stickiness=e.stickiness,n}if(!t.getRoot(e.root))throw new T("model-position-fromjson-no-root",t,{rootName:e.root});return new xa(t.getRoot(e.root),e.path,e.stickiness)}}function Ea(e,t){const n=t.getChild(t.offsetToIndex(e.offset));return n&&n.is("$text")&&n.startOffset<e.offset?n:null}function Ta(e,t,n){return null!==n?null:t.getChild(t.offsetToIndex(e.offset))}function Ba(e,t,n){return null!==n?null:t.getChild(t.offsetToIndex(e.offset)-1)}function Pa(e,t,n){return n+1!==e.path.length&&!!Sa(t.path,n+1)&&!!function(e,t){let n=e.parent,i=e.path.length-1,o=0;for(;i>=t;){if(e.path[i]+o!==n.maxOffset)return!1;o=1,i--,n=n.parent}return!0}(e,n+1)}function Sa(e,t){for(;t<e.length;){if(0!==e[t])return!1;t++}return!0}xa.prototype.is=function(e){return"position"===e||"model:position"===e};class Ia extends ba{constructor(e,t){super(),this.start=xa._createAt(e),this.end=t?xa._createAt(t):xa._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new ya({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==oe(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&i}containsItem(e){const t=xa._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new Ia(this.start,e.start)),this.containsPosition(e.end)&&t.push(new Ia(e.end,this.end))):t.push(new Ia(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new Ia(t,n)}return null}getJoined(e,t=!1){let n=this.isIntersecting(e);if(n||(n=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!n)return null;let i=this.start,o=this.end;return e.start.isBefore(i)&&(i=e.start),e.end.isAfter(o)&&(o=e.end),new Ia(i,o)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,n=xa._createAt(this.start);let i=n.parent;for(;n.path.length>t+1;){const t=i.maxOffset-n.offset;0!==t&&e.push(new Ia(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,i=i.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],i=t-n.offset;0!==i&&e.push(new Ia(n,n.getShiftedBy(i))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new ya(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new ya(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new ya(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new Ia(this.start,this.end)]}getTransformedByOperations(e){const t=[new Ia(this.start,this.end)];for(const n of e)for(let e=0;e<t.length;e++){const i=t[e].getTransformedByOperation(n);t.splice(e,1,...i),e+=i.length-1}for(let e=0;e<t.length;e++){const n=t[e];for(let i=e+1;i<t.length;i++){const e=t[i];(n.containsRange(e)||e.containsRange(n)||n.isEqual(e))&&t.splice(i,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,t=this.end.nodeBefore;return e&&e.is("element")&&e===t?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,t=!1){return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e,t=!1){const n=e.sourcePosition,i=e.howMany,o=e.targetPosition;return this._getTransformedByMove(n,o,i,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let n=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(n=this.end.getShiftedBy(1)),t.root!=n.root&&(n=this.end.getShiftedBy(-1)),new Ia(t,n)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new Ia(this.start);let t=this.start._getTransformedByMergeOperation(e),n=this.end._getTransformedByMergeOperation(e);return t.root!=n.root&&(n=this.end.getShiftedBy(-1)),t.isAfter(n)?(e.sourcePosition.isBefore(e.targetPosition)?(t=xa._createAt(n),t.offset=0):(e.deletionPosition.isEqual(t)||(n=e.deletionPosition),t=e.targetPosition),new Ia(t,n)):new Ia(t,n)}_getTransformedByInsertion(e,t,n=!1){if(n&&this.containsPosition(e))return[new Ia(this.start,e),new Ia(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const n=new Ia(this.start,this.end);return n.start=n.start._getTransformedByInsertion(e,t),n.end=n.end._getTransformedByInsertion(e,t),[n]}}_getTransformedByMove(e,t,n,i=!1){if(this.isCollapsed){const i=this.start._getTransformedByMove(e,t,n);return[new Ia(i)]}const o=Ia._createFromPositionAndShift(e,n),s=t._getTransformedByDeletion(e,n);if(this.containsPosition(t)&&!i&&(o.containsPosition(this.start)||o.containsPosition(this.end))){const i=this.start._getTransformedByMove(e,t,n),o=this.end._getTransformedByMove(e,t,n);return[new Ia(i,o)]}let r;const a=this.getDifference(o);let l=null;const c=this.getIntersection(o);if(1==a.length?l=new Ia(a[0].start._getTransformedByDeletion(e,n),a[0].end._getTransformedByDeletion(e,n)):2==a.length&&(l=new Ia(this.start,this.end._getTransformedByDeletion(e,n))),r=l?l._getTransformedByInsertion(s,n,null!==c||i):[],c){const e=new Ia(c.start._getCombined(o.start,s),c.end._getCombined(o.start,s));2==r.length?r.splice(1,0,e):r.push(e)}return r}_getTransformedByDeletion(e,t){let n=this.start._getTransformedByDeletion(e,t),i=this.end._getTransformedByDeletion(e,t);return null==n&&null==i?null:(null==n&&(n=e),null==i&&(i=e),new Ia(n,i))}static _createFromPositionAndShift(e,t){const n=e,i=e.getShiftedBy(t);return t>0?new this(n,i):new this(i,n)}static _createIn(e){return new this(xa._createAt(e,0),xa._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(xa._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new T("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const n=e.indexOf(t),i=new this(t.start,t.end);if(n>0)for(let t=n-1;e[t].end.isEqual(i.start);t++)i.start=xa._createAt(e[t].start);for(let t=n+1;t<e.length&&e[t].start.isEqual(i.end);t++)i.end=xa._createAt(e[t].end);return i}static fromJSON(e,t){return new this(xa.fromJSON(e.start,t),xa.fromJSON(e.end,t))}}Ia.prototype.is=function(e){return"range"===e||"model:range"===e};class Da extends(R()){constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((e,t)=>{if(t.viewPosition)return;const n=this._modelToViewMapping.get(t.modelPosition.parent);if(!n)throw new T("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(n,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const n=this.findMappedViewAncestor(t.viewPosition),i=this._viewToModelMapping.get(n),o=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=xa._createAt(i,o)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const n=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(n)==e&&this._modelToViewMapping.delete(n))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e);const i=this._elementToMarkerNames.get(e)||new Set;i.add(t),this._markerNameToElements.set(t,n),this._elementToMarkerNames.set(e,i)}unbindElementFromMarkerName(e,t){const n=this._markerNameToElements.get(t);n&&(n.delete(e),0==n.size&&this._markerNameToElements.delete(t));const i=this._elementToMarkerNames.get(e);i&&(i.delete(t),0==i.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Ia(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new _s(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())n.add(t);else n.add(e);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,n){if(n!=e)return this._toModelOffset(e.parent,e.index,n)+this._toModelOffset(e,t,e);if(e.is("$text"))return t;let i=0;for(let n=0;n<t;n++)i+=this.getModelLength(e.getChild(n));return i}getModelLength(e){if(this._viewToModelLengthCallbacks.get(e.name))return this._viewToModelLengthCallbacks.get(e.name)(e);if(this._viewToModelMapping.has(e))return 1;if(e.is("$text"))return e.data.length;if(e.is("uiElement"))return 0;{let t=0;for(const n of e.getChildren())t+=this.getModelLength(n);return t}}findPositionIn(e,t){let n,i=0,o=0,s=0;if(e.is("$text"))return new ws(e,t);for(;o<t;)n=e.getChild(s),i=this.getModelLength(n),o+=i,s++;return o==t?this._moveViewPositionToTextNode(new ws(e,s)):this.findPositionIn(n,t-(o-i))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,n=e.nodeAfter;return t instanceof Do?new ws(t,t.data.length):n instanceof Do?new ws(n,0):e}}class Oa{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=Ma(t),e instanceof va&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=Ma(t),e instanceof va&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=Ma(t),e instanceof va&&(e=this._getSymbolForTextProxy(e));const n=this._consumable.get(e);if(void 0===n)return null;const i=n.get(t);return void 0===i?null:i}revert(e,t){t=Ma(t),e instanceof va&&(e=this._getSymbolForTextProxy(e));const n=this.test(e,t);return!1===n?(this._consumable.get(e).set(t,!0),!0):!0!==n&&null}verifyAllConsumed(e){const t=[];for(const[n,i]of this._consumable)for(const[o,s]of i){const i=o.split(":")[0];s&&e==i&&t.push({event:o,item:n.name||n.description})}if(t.length)throw new T("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const n=this._textProxyRegistry.get(e.startOffset);if(n){const i=n.get(e.endOffset);i&&(t=i.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,n=e.endOffset,i=e.parent,o=Symbol("$textProxy:"+e.data);let s,r;return s=this._textProxyRegistry.get(t),s||(s=new Map,this._textProxyRegistry.set(t,s)),r=s.get(n),r||(r=new Map,s.set(n,r)),r.set(i,o),o}}function Ma(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}class Ra extends(R()){constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,n){const i=this._createConversionApi(n,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,i);const o=this._reduceChanges(e.getChanges());for(const e of o)"insert"===e.type?this._convertInsert(Ia._createFromPositionAndShift(e.position,e.length),i):"reinsert"===e.type?this._convertReinsert(Ia._createFromPositionAndShift(e.position,e.length),i):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,i):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,i);i.mapper.flushDeferredBindings();for(const e of i.mapper.flushUnboundMarkerNames()){const n=t.get(e).getRange();this._convertMarkerRemove(e,n,i),this._convertMarkerAdd(e,n,i)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,i);i.consumable.verifyAllConsumed("insert")}convert(e,t,n,i={}){const o=this._createConversionApi(n,void 0,i);this._convertInsert(e,o);for(const[e,n]of t)this._convertMarkerAdd(e,n,o);o.consumable.verifyAllConsumed("insert")}convertSelection(e,t,n){const i=this._createConversionApi(n);this.fire("cleanSelection",{selection:e},i);const o=e.getFirstPosition().root;if(!i.mapper.toViewElement(o))return;const s=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(i.consumable,e,s),this.fire("selection",{selection:e},i),e.isCollapsed){for(const t of s)if(i.consumable.test(e,"addMarker:"+t.name)){const n=t.getRange();if(!Va(e.getFirstPosition(),t,i.mapper))continue;const o={item:e,markerName:t.name,markerRange:n};this.fire(`addMarker:${t.name}`,o,i)}for(const t of e.getAttributeKeys())if(i.consumable.test(e,"attribute:"+t)){const n={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.fire(`attribute:${t}:$text`,n,i)}}}_convertInsert(e,t,n={}){n.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,e);for(const n of Array.from(e.getWalker({shallow:!0})).map(Na))this._testAndFire("insert",n,t)}_convertRemove(e,t,n,i){this.fire(`remove:${n}`,{position:e,length:t},i)}_convertAttribute(e,t,n,i,o){this._addConsumablesForRange(o.consumable,e,`attribute:${t}`);for(const s of e){const e={item:s.item,range:Ia._createFromPositionAndShift(s.previousPosition,s.length),attributeKey:t,attributeOldValue:n,attributeNewValue:i};this._testAndFire(`attribute:${t}`,e,o)}}_convertReinsert(e,t){const n=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,n);for(const e of n.map(Na))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,n){if("$graveyard"==t.root.rootName)return;const i=`addMarker:${e}`;if(n.consumable.add(t,i),this.fire(i,{markerName:e,markerRange:t},n),n.consumable.consume(t,i)){this._addConsumablesForRange(n.consumable,t,i);for(const o of t.getItems()){if(!n.consumable.test(o,i))continue;const s={item:o,range:Ia._createOn(o),markerName:e,markerRange:t};this.fire(i,s,n)}}}_convertMarkerRemove(e,t,n){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},n)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const n of t){const t=n.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n)}}return e}_addConsumablesForRange(e,t,n){for(const i of t.getItems())e.add(i,n);return e}_addConsumablesForSelection(e,t,n){e.add(t,"selection");for(const i of n)e.add(t,"addMarker:"+i.name);for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n);return e}_testAndFire(e,t,n){const i=function(e,t){return`${e}:${t.item.is("element")?t.item.name:"$text"}`}(e,t),o=t.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(t.item):t.item,s=this._firedEventsMap.get(n),r=s.get(o);if(r){if(r.has(i))return;r.add(i)}else s.set(o,new Set([i]));this.fire(i,t,n)}_testAndFireAddAttributes(e,t){const n={item:e,range:Ia._createOn(e)};for(const e of n.item.getAttributeKeys())n.attributeKey=e,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(e),this._testAndFire(`attribute:${e}`,n,t)}_createConversionApi(e,t=new Set,n={}){const i={...this._conversionApi,consumable:new Oa,writer:e,options:n,convertItem:e=>this._convertInsert(Ia._createOn(e),i),convertChildren:e=>this._convertInsert(Ia._createIn(e),i,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,i),canReuseView:e=>!t.has(i.mapper.toModelElement(e))};return this._firedEventsMap.set(i,new Map),i}}function Va(e,t,n){const i=t.getRange(),o=Array.from(e.getAncestors());return o.shift(),o.reverse(),!o.some((e=>{if(i.containsItem(e))return!!n.toViewElement(e).getCustomProperty("addHighlight")}))}function Na(e){return{item:e.item,range:Ia._createFromPositionAndShift(e.previousPosition,e.length)}}class Fa extends(R(ba)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const i of e._ranges)if(t.isEqual(i)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Ia(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new Ia(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new Ia(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,n,i]=e;if("object"==typeof n&&(i=n,n=void 0),null===t)this._setRanges([]);else if(t instanceof Fa)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Ia)this._setRanges([t],!!i&&!!i.backward);else if(t instanceof xa)this._setRanges([new Ia(t)]);else if(t instanceof wa){const e=!!i&&!!i.backward;let o;if("in"==n)o=Ia._createIn(t);else if("on"==n)o=Ia._createOn(t);else{if(void 0===n)throw new T("model-selection-setto-required-second-parameter",[this,t]);o=new Ia(xa._createAt(t,n))}this._setRanges([o],e)}else{if(!se(t))throw new T("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,i&&!!i.backward)}}_setRanges(e,t=!1){const n=Array.from(e),i=n.some((t=>{if(!(t instanceof Ia))throw new T("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(n.length!==this._ranges.length||i)&&(this._replaceAllRanges(n),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new T("model-selection-setfocus-no-ranges",[this,e]);const n=xa._createAt(e,t);if("same"==n.compareWith(this.focus))return;const i=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(i)?(this._pushRange(new Ia(n,i)),this._lastRangeBackward=!0):(this._pushRange(new Ia(i,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=ja(t.start,e);qa(n,t)&&(yield n);for(const n of t.getWalker()){const i=n.item;"elementEnd"==n.type&&za(i,e,t)&&(yield i)}const i=ja(t.end,e);Wa(i,t)&&(yield i)}}containsEntireContent(e=this.anchor.root){const t=xa._createAt(e,0),n=xa._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new Ia(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new T("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_replaceAllRanges(e){this._removeAllRanges();for(const t of e)this._pushRange(t)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function La(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function za(e,t,n){return La(e,t)&&Ha(e,n)}function ja(e,t){const n=e.parent.root.document.model.schema,i=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const s=i.find((e=>!o&&(o=n.isLimit(e),!o&&La(e,t))));return i.forEach((e=>t.add(e))),s}function Ha(e,t){const n=function(e){const t=e.root.document.model.schema;let n=e.parent;for(;n;){if(t.isBlock(n))return n;n=n.parent}}(e);return!n||!t.containsRange(Ia._createOn(n),!0)}function qa(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(xa._createAt(e,e.maxOffset))&&Ha(e,t))}function Wa(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(xa._createAt(e,0))&&Ha(e,t))}Fa.prototype.is=function(e){return"selection"===e||"model:selection"===e};class $a extends(R(Ia)){constructor(e,t){super(e,t),Ua.call(this)}detach(){this.stopListening()}toRange(){return new Ia(this.start,this.end)}static fromRange(e){return new $a(e.start,e.end)}}function Ua(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const n=t[0];n.isDocumentOperation&&Ka.call(this,n)}),{priority:"low"})}function Ka(e){const t=this.getTransformedByOperation(e),n=Ia._createFromRanges(t),i=!n.isEqual(this),o=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let s=null;if(i){"$graveyard"==n.root.rootName&&(s="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",t,{deletionPosition:s})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:s})}$a.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const Ga="selection:";class Za extends(R(ba)){constructor(e){super(),this._selection=new Ja(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Ga+e}static _isStoreAttributeKey(e){return e.startsWith(Ga)}}Za.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class Ja extends Fa{constructor(e){super(),this.markers=new no({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const n=t[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,n,i)=>{this._updateMarker(t,i)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const n=e.document.differ;for(const i of n.getChanges()){if("insert"!=i.type)continue;const n=i.position.parent;i.length===n.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(n.getAttributeKeys()).filter((e=>e.startsWith(Ga)));for(const i of t)e.removeAttribute(i,n)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(...e){super.setTo(...e),this._updateAttributes(!0),this.updateMarkers()}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0),this.updateMarkers()}setAttribute(e,t){if(this._setAttribute(e,t)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=y();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new T("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this.updateMarkers()}_replaceAllRanges(e){this._validateSelectionRanges(e),super._replaceAllRanges(e)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_validateSelectionRanges(e){for(const t of e)if(!this._document._validateSelectionRange(t))throw new T("document-selection-wrong-position",this,{range:t})}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=$a.fromRange(e);return t.on("change:range",((e,n,i)=>{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=i.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const i=t.getRange();for(const n of this.getRanges())i.containsRange(n,!n.isCollapsed)&&e.push(t)}const n=Array.from(this.markers);for(const n of e)this.markers.has(n)||(this.markers.add(n),t=!0);for(const n of Array.from(this.markers))e.includes(n)||(this.markers.remove(n),t=!0);t&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(e,t){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let i=!1;const o=Array.from(this.markers),s=this.markers.has(e);if(t){let n=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){n=!0;break}n&&!s?(this.markers.add(e),i=!0):!n&&s&&(this.markers.remove(e),i=!0)}else s&&(this.markers.remove(e),i=!0);i&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateAttributes(e){const t=ro(this._getSurroundingAttributes()),n=ro(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const i=[];for(const[e,t]of this.getAttributes())n.has(e)&&n.get(e)===t||i.push(e);for(const[e]of n)this.hasAttribute(e)||i.push(e);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(e,t,n=!0){const i=n?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&(super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,i),!0))}_removeAttribute(e,t=!0){const n=t?"normal":"low";return!("low"==n&&"normal"==this._attributePriority.get(e)||(this._attributePriority.set(e,n),!super.hasAttribute(e)||(this._attrs.delete(e),0)))}_setAttributesTo(e){const t=new Set;for(const[t,n]of this.getAttributes())e.get(t)!==n&&this._removeAttribute(t,!1);for(const[n,i]of e)this._setAttribute(n,i,!1)&&t.add(n);return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(Ga)){const n=t.substr(10);yield[n,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;if("$graveyard"==e.root.rootName)return null;let n=null;if(this.isCollapsed){const i=e.textNode?e.textNode:e.nodeBefore,o=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=Ya(i,t)),n||(n=Ya(o,t)),!this.isGravityOverridden&&!n){let e=i;for(;e&&!n;)e=e.previousSibling,n=Ya(e,t)}if(!n){let e=o;for(;e&&!n;)e=e.nextSibling,n=Ya(e,t)}n||(n=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const i of e){if(i.item.is("element")&&t.isObject(i.item)){n=Ya(i.item,t);break}if("text"==i.type){n=i.item.getAttributes();break}}}return n}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function Ya(e,t){if(!e)return null;if(e instanceof va||e instanceof ka)return e.getAttributes();if(!t.isInline(e))return null;if(!t.isObject(e))return[];const n=[];for(const[i,o]of e.getAttributes())t.checkAttribute("$text",i)&&!1!==t.getAttributeProperties(i).copyFromObject&&n.push([i,o]);return n}class Qa{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}class Xa extends Qa{elementToElement(e){return this.add(function(e){const t=nl(e.model),n=il(e.view,"container");return t.attributes.length&&(t.children=!0),i=>{i.on(`insert:${t.name}`,function(e,t=hl){return(n,i,o)=>{if(!t(i.item,o.consumable,{preflight:!0}))return;const s=e(i.item,o,i);if(!s)return;t(i.item,o.consumable);const r=o.mapper.toViewPosition(i.range.start);o.mapper.bindElements(i.item,s),o.writer.insert(r,s),o.convertAttributes(i.item),cl(s,i.item.getChildren(),o,{reconversion:i.reconversion})}}(n,ll(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&i.on("reduceChanges",al(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=nl(e.model),n=il(e.view,"container");return t.children=!0,i=>{if(i._conversionApi.schema.checkChild(t.name,"$text"))throw new T("conversion-element-to-structure-disallowed-text",i,{elementName:t.name});var o,s;i.on(`insert:${t.name}`,(o=n,s=ll(t),(e,t,n)=>{if(!s(t.item,n.consumable,{preflight:!0}))return;const i=new Map;n.writer._registerSlotFactory(function(e,t,n){return(i,o)=>{const s=i.createContainerElement("$slot");let r=null;if("children"===o)r=Array.from(e.getChildren());else{if("function"!=typeof o)throw new T("conversion-slot-mode-unknown",n.dispatcher,{modeOrFilter:o});r=Array.from(e.getChildren()).filter((e=>o(e)))}return t.set(s,r),s}}(t.item,i,n));const r=o(t.item,n,t);if(n.writer._clearSlotFactory(),!r)return;!function(e,t,n){const i=Array.from(t.values()).flat(),o=new Set(i);if(o.size!=i.length)throw new T("conversion-slot-filter-overlap",n.dispatcher,{element:e});if(o.size!=e.childCount)throw new T("conversion-slot-filter-incomplete",n.dispatcher,{element:e})}(t.item,i,n),s(t.item,n.consumable);const a=n.mapper.toViewPosition(t.range.start);n.mapper.bindElements(t.item,r),n.writer.insert(a,r),n.convertAttributes(t.item),function(e,t,n,i){n.mapper.on("modelToViewPosition",r,{priority:"highest"});let o=null,s=null;for([o,s]of t)cl(e,s,n,i),n.writer.move(n.writer.createRangeIn(o),n.writer.createPositionBefore(o)),n.writer.remove(o);function r(e,t){const n=t.modelPosition.nodeAfter,i=s.indexOf(n);i<0||(t.viewPosition=t.mapper.findPositionIn(o,i))}n.mapper.off("modelToViewPosition",r)}(r,i,n,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),i.on("reduceChanges",al(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){let t=(e=pa(e)).model;"string"==typeof t&&(t={key:t});let n=`attribute:${t.key}`;if(t.name&&(n+=":"+t.name),t.values)for(const n of t.values)e.view[n]=il(e.view[n],"attribute");else e.view=il(e.view,"attribute");const i=ol(e);return t=>{t.on(n,function(e){return(t,n,i)=>{if(!i.consumable.test(n.item,t.name))return;const o=e(n.attributeOldValue,i,n),s=e(n.attributeNewValue,i,n);if(!o&&!s)return;i.consumable.consume(n.item,t.name);const r=i.writer,a=r.document.selection;if(n.item instanceof Fa||n.item instanceof Za)r.wrap(a.getFirstRange(),s);else{let e=i.mapper.toViewRange(n.range);null!==n.attributeOldValue&&o&&(e=r.unwrap(e,o)),null!==n.attributeNewValue&&s&&r.wrap(e,s)}}}(i),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=(e=pa(e)).model;"string"==typeof t&&(t={key:t});let n=`attribute:${t.key}`;if(t.name&&(n+=":"+t.name),t.values)for(const n of t.values)e.view[n]=sl(e.view[n]);else e.view=sl(e.view);const i=ol(e);return t=>{var o;t.on(n,(o=i,(e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;const i=o(t.attributeOldValue,n,t),s=o(t.attributeNewValue,n,t);if(!i&&!s)return;n.consumable.consume(t.item,e.name);const r=n.mapper.toViewElement(t.item),a=n.writer;if(!r)throw new T("conversion-attribute-to-attribute-on-text",n.dispatcher,t);if(null!==t.attributeOldValue&&i)if("class"==i.key){const e="string"==typeof i.value?i.value.split(/\s+/):i.value;for(const t of e)a.removeClass(t,r)}else if("style"==i.key)if("string"==typeof i.value){const e=new rs(a.document.stylesProcessor);e.setTo(i.value);for(const[t]of e.getStylesEntries())a.removeStyle(t,r)}else{const e=Object.keys(i.value);for(const t of e)a.removeStyle(t,r)}else a.removeAttribute(i.key,r);if(null!==t.attributeNewValue&&s)if("class"==s.key){const e="string"==typeof s.value?s.value.split(/\s+/):s.value;for(const t of e)a.addClass(t,r)}else if("style"==s.key)if("string"==typeof s.value){const e=new rs(a.document.stylesProcessor);e.setTo(s.value);for(const[t,n]of e.getStylesEntries())a.setStyle(t,n,r)}else{const e=Object.keys(s.value);for(const t of e)a.setStyle(t,s.value[t],r)}else a.setAttribute(s.key,s.value,r)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=il(e.view,"ui");return n=>{var i;n.on(`addMarker:${e.model}`,(i=t,(e,t,n)=>{t.isOpening=!0;const o=i(t,n);t.isOpening=!1;const s=i(t,n);if(!o||!s)return;const r=t.markerRange;if(r.isCollapsed&&!n.consumable.consume(r,e.name))return;for(const t of r)if(!n.consumable.consume(t.item,e.name))return;const a=n.mapper,l=n.writer;l.insert(a.toViewPosition(r.start),o),n.mapper.bindElementToMarker(o,t.markerName),r.isCollapsed||(l.insert(a.toViewPosition(r.end),s),n.mapper.bindElementToMarker(s,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),n.on(`removeMarker:${e.model}`,((e,t,n)=>{const i=n.mapper.markerNameToElements(t.markerName);if(i){for(const e of i)n.mapper.unbindElementFromMarkerName(e,t.markerName),n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var n;t.on(`addMarker:${e.model}`,(n=e.view,(e,t,i)=>{if(!t.item)return;if(!(t.item instanceof Fa||t.item instanceof Za||t.item.is("$textProxy")))return;const o=rl(n,t,i);if(!o)return;if(!i.consumable.consume(t.item,e.name))return;const s=i.writer,r=el(s,o),a=s.document.selection;if(t.item instanceof Fa||t.item instanceof Za)s.wrap(a.getFirstRange(),r);else{const e=i.mapper.toViewRange(t.range),n=s.wrap(e,r);for(const e of n.getItems())if(e.is("attributeElement")&&e.isSimilar(r)){i.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,n,i)=>{if(!n.item)return;if(!(n.item instanceof Aa))return;const o=rl(e,n,i);if(!o)return;if(!i.consumable.test(n.item,t.name))return;const s=i.mapper.toViewElement(n.item);if(s&&s.getCustomProperty("addHighlight")){i.consumable.consume(n.item,t.name);for(const e of Ia._createIn(n.item))i.consumable.consume(e.item,t.name);s.getCustomProperty("addHighlight")(s,o,i.writer),i.mapper.bindElementToMarker(s,n.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,n,i)=>{if(n.markerRange.isCollapsed)return;const o=rl(e,n,i);if(!o)return;const s=el(i.writer,o),r=i.mapper.markerNameToElements(n.markerName);if(r){for(const e of r)i.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("attributeElement")?i.writer.unwrap(i.writer.createRangeOn(e),s):e.getCustomProperty("removeHighlight")(e,o.id,i.writer);i.writer.clearClonedElementsGroup(n.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=pa(e)).model;let n=e.view;return n||(n=n=>({group:t,name:n.substr(e.model.length+1)})),i=>{var o;i.on(`addMarker:${t}`,(o=n,(e,t,n)=>{const i=o(t.markerName,n);if(!i)return;const s=t.markerRange;n.consumable.consume(s,e.name)&&(tl(s,!1,n,t,i),tl(s,!0,n,t,i),e.stop())}),{priority:e.converterPriority||"normal"}),i.on(`removeMarker:${t}`,function(e){return(t,n,i)=>{const o=e(n.markerName,i);if(!o)return;const s=i.mapper.markerNameToElements(n.markerName);if(s){for(const e of s)i.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("containerElement")?(r(`data-${o.group}-start-before`,e),r(`data-${o.group}-start-after`,e),r(`data-${o.group}-end-before`,e),r(`data-${o.group}-end-after`,e)):i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(n.markerName),t.stop()}function r(e,t){if(t.hasAttribute(e)){const n=new Set(t.getAttribute(e).split(","));n.delete(o.name),0==n.size?i.writer.removeAttribute(e,t):i.writer.setAttribute(e,Array.from(n).join(","),t)}}}}(n),{priority:e.converterPriority||"normal"})}}(e))}}function el(e,t){const n=e.createAttributeElement("span",t.attributes);return t.classes&&n._addClass(t.classes),"number"==typeof t.priority&&(n._priority=t.priority),n._id=t.id,n}function tl(e,t,n,i,o){const s=t?e.start:e.end,r=s.nodeAfter&&s.nodeAfter.is("element")?s.nodeAfter:null,a=s.nodeBefore&&s.nodeBefore.is("element")?s.nodeBefore:null;if(r||a){let e,s;t&&r||!t&&!a?(e=r,s=!0):(e=a,s=!1);const l=n.mapper.toViewElement(e);if(l)return void function(e,t,n,i,o,s){const r=`data-${s.group}-${t?"start":"end"}-${n?"before":"after"}`,a=e.hasAttribute(r)?e.getAttribute(r).split(","):[];a.unshift(s.name),i.writer.setAttribute(r,a.join(","),e),i.mapper.bindElementToMarker(e,o.markerName)}(l,t,s,n,i,o)}!function(e,t,n,i,o){const s=`${o.group}-${t?"start":"end"}`,r=o.name?{name:o.name}:null,a=n.writer.createUIElement(s,r);n.writer.insert(e,a),n.mapper.bindElementToMarker(a,i.markerName)}(n.mapper.toViewPosition(s),t,n,i,o)}function nl(e){return"string"==typeof e&&(e={name:e}),{name:e.name,attributes:e.attributes?Li(e.attributes):[],children:!!e.children}}function il(e,t){return"function"==typeof e?e:(n,i)=>function(e,t,n){let i;"string"==typeof e&&(e={name:e});const o=t.writer,s=Object.assign({},e.attributes);if("container"==n)i=o.createContainerElement(e.name,s);else if("attribute"==n){const t={priority:e.priority||Ds.DEFAULT_PRIORITY};i=o.createAttributeElement(e.name,s,t)}else i=o.createUIElement(e.name,s);if(e.styles){const t=Object.keys(e.styles);for(const n of t)o.setStyle(n,e.styles[n],i)}if(e.classes){const t=e.classes;if("string"==typeof t)o.addClass(t,i);else for(const e of t)o.addClass(e,i)}return i}(e,i,t)}function ol(e){return e.model.values?(t,n,i)=>{const o=e.view[t];return o?o(t,n,i):null}:e.view}function sl(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function rl(e,t,n){const i="function"==typeof e?e(t,n):e;return i?(i.priority||(i.priority=10),i.id||(i.id=t.markerName),i):null}function al(e){const t=function(e){return(t,n)=>{if(!t.is("element",e.name))return!1;if("attribute"==n.type){if(e.attributes.includes(n.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,n)=>{const i=[];n.reconvertedElements||(n.reconvertedElements=new Set);for(const e of n.changes){const o="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(o&&t(o,e)){if(!n.reconvertedElements.has(o)){n.reconvertedElements.add(o);const e=xa._createBefore(o);let t=i.length;for(let n=i.length-1;n>=0;n--){const o=i[n],s=("attribute"==o.type?o.range.start:o.position).compareWith(e);if("before"==s||"remove"==o.type&&"same"==s)break;t=n}i.splice(t,0,{type:"remove",name:o.name,position:e,length:1},{type:"reinsert",name:o.name,position:e,length:1})}}else i.push(e)}n.changes=i}}function ll(e){return(t,n,i={})=>{const o=["insert"];for(const n of e.attributes)t.hasAttribute(n)&&o.push(`attribute:${n}`);return!!o.every((e=>n.test(t,e)))&&(i.preflight||o.forEach((e=>n.consume(t,e))),!0)}}function cl(e,t,n,i){for(const o of t)dl(e.root,o,n,i)||n.convertItem(o)}function dl(e,t,n,i){const{writer:o,mapper:s}=n;if(!i.reconversion)return!1;const r=s.toViewElement(t);return!(!r||r.root==e||!n.canReuseView(r)||(o.move(o.createRangeOn(r),s.toViewPosition(xa._createBefore(t))),0))}function hl(e,t,{preflight:n}={}){return n?t.test(e,"insert"):t.consume(e,"insert")}function ul(e){const{schema:t,document:n}=e.model;for(const i of n.getRoots())if(i.isEmpty&&!t.checkChild(i,"$text")&&t.checkChild(i,"paragraph"))return e.insertElement("paragraph",i),!0;return!1}function ml(e,t,n){const i=n.createContext(e);return!!n.checkChild(i,"paragraph")&&!!n.checkChild(i.push("paragraph"),t)}function gl(e,t){const n=t.createElement("paragraph");return t.insert(n,e),t.createPositionAt(n,0)}class pl extends Qa{elementToElement(e){return this.add(fl(e))}elementToAttribute(e){return this.add(function(e){_l(e=pa(e));const t=kl(e,!1),n=bl(e.view),i=n?`element:${n}`:"element";return n=>{n.on(i,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=null;("string"==typeof(e=pa(e)).view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key,n=void 0===e.view.value?/[\s\S]*/:e.view.value;let i;if("class"==t||"style"==t){const e="class"==t?"classes":"styles";i={[e]:n}}else i={attributes:{[t]:n}};return e.view.name&&(i.name=e.view.name),e.view=i,t}(e)),_l(e,t);const n=kl(e,!0);return t=>{t.on("element",n,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,n)=>{const i="string"==typeof e?e:e(t,n);return n.writer.createElement("$marker",{"data-name":i})}}(e.model);return fl({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){(e=pa(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},n=wl(vl(t,"start")),i=wl(vl(t,"end"));return o=>{o.on(`element:${e.view}-start`,n,{priority:e.converterPriority||"normal"}),o.on(`element:${e.view}-end`,i,{priority:e.converterPriority||"normal"});const s=C.low,r=C.highest,a=C.get(e.converterPriority)/r;o.on("element",function(e){return(t,n,i)=>{const o=`data-${e.view}`;function s(t,o){for(const s of o){const o=e.model(s,i),r=i.writer.createElement("$marker",{"data-name":o});i.writer.insert(r,t),n.modelCursor.isEqual(t)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(t,1),n.modelRange=n.modelRange._getTransformedByInsertion(t,1)[0]}}(i.consumable.test(n.viewItem,{attributes:o+"-end-after"})||i.consumable.test(n.viewItem,{attributes:o+"-start-after"})||i.consumable.test(n.viewItem,{attributes:o+"-end-before"})||i.consumable.test(n.viewItem,{attributes:o+"-start-before"}))&&(n.modelRange||Object.assign(n,i.convertChildren(n.viewItem,n.modelCursor)),i.consumable.consume(n.viewItem,{attributes:o+"-end-after"})&&s(n.modelRange.end,n.viewItem.getAttribute(o+"-end-after").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-start-after"})&&s(n.modelRange.end,n.viewItem.getAttribute(o+"-start-after").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-end-before"})&&s(n.modelRange.start,n.viewItem.getAttribute(o+"-end-before").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-start-before"})&&s(n.modelRange.start,n.viewItem.getAttribute(o+"-start-before").split(",")))}}(t),{priority:s+a})}}(e))}}function fl(e){const t=wl(e=pa(e)),n=bl(e.view),i=n?`element:${n}`:"element";return n=>{n.on(i,t,{priority:e.converterPriority||"normal"})}}function bl(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function wl(e){const t=new Mo(e.view);return(n,i,o)=>{const s=t.match(i.viewItem);if(!s)return;const r=s.match;if(r.name=!0,!o.consumable.test(i.viewItem,r))return;const a=function(e,t,n){return e instanceof Function?e(t,n):n.writer.createElement(e)}(e.model,i.viewItem,o);a&&o.safeInsert(a,i.modelCursor)&&(o.consumable.consume(i.viewItem,r),o.convertChildren(i.viewItem,a),o.updateConversionResult(a,i))}}function _l(e,t=null){const n=null===t||(e=>e.getAttribute(t)),i="object"!=typeof e.model?e.model:e.model.key,o="object"!=typeof e.model||void 0===e.model.value?n:e.model.value;e.model={key:i,value:o}}function kl(e,t){const n=new Mo(e.view);return(i,o,s)=>{if(!o.modelRange&&t)return;const r=n.match(o.viewItem);if(!r)return;if(function(e,t){const n="function"==typeof e?e(t):e;return!("object"==typeof n&&!bl(n))&&(!n.classes&&!n.attributes&&!n.styles)}(e.view,o.viewItem)?r.match.name=!0:delete r.match.name,!s.consumable.test(o.viewItem,r.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(o.viewItem,s):e.model.value;if(null===l)return;o.modelRange||Object.assign(o,s.convertChildren(o.viewItem,o.modelCursor));const c=function(e,t,n,i){let o=!1;for(const s of Array.from(e.getItems({shallow:n})))i.schema.checkAttribute(s,t.key)&&(o=!0,s.hasAttribute(t.key)||i.writer.setAttribute(t.key,t.value,s));return o}(o.modelRange,{key:a,value:l},t,s);c&&(s.consumable.test(o.viewItem,{name:!0})&&(r.match.name=!0),s.consumable.consume(o.viewItem,r.match))}}function vl(e,t){return{view:`${e.view}-${t}`,model:(t,n)=>{const i=t.getAttribute("name"),o=e.model(i,n);return n.writer.createElement("$marker",{"data-name":o})}}}function Al(e,t){return e.isCollapsed?function(e,t){const n=e.start,i=t.getNearestSelectionRange(n);if(!i){const e=n.getAncestors().reverse().find((e=>t.isObject(e)));return e?Ia._createOn(e):null}if(!i.isCollapsed)return i;const o=i.start;return n.isEqual(o)?null:new Ia(o)}(e,t):function(e,t){const{start:n,end:i}=e,o=t.checkChild(n,"$text"),s=t.checkChild(i,"$text"),r=t.getLimitElement(n),a=t.getLimitElement(i);if(r===a){if(o&&s)return null;if(function(e,t,n){const i=e.nodeAfter&&!n.isLimit(e.nodeAfter)||n.checkChild(e,"$text"),o=t.nodeBefore&&!n.isLimit(t.nodeBefore)||n.checkChild(t,"$text");return i||o}(n,i,t)){const e=n.nodeAfter&&t.isSelectable(n.nodeAfter)?null:t.getNearestSelectionRange(n,"forward"),o=i.nodeBefore&&t.isSelectable(i.nodeBefore)?null:t.getNearestSelectionRange(i,"backward"),s=e?e.start:n,r=o?o.end:i;return new Ia(s,r)}}const l=r&&!r.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=n.nodeAfter&&i.nodeBefore&&n.nodeAfter.parent===i.nodeBefore.parent,o=l&&(!e||!Cl(n.nodeAfter,t)),s=c&&(!e||!Cl(i.nodeBefore,t));let d=n,h=i;return o&&(d=xa._createBefore(yl(r,t))),s&&(h=xa._createAfter(yl(a,t))),new Ia(d,h)}return null}(e,t)}function yl(e,t){let n=e,i=n;for(;t.isLimit(i)&&i.parent;)n=i,i=i.parent;return n}function Cl(e,t){return e&&t.isSelectable(e)}class xl extends(J()){constructor(e,t){super(),this.model=e,this.view=new fa(t),this.mapper=new Da,this.downcastDispatcher=new Ra({mapper:this.mapper,schema:e.schema});const n=this.model.document,i=n.selection,o=this.model.markers;var s,r,a;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(n,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(n.differ,o,e),this.downcastDispatcher.convertSelection(i,o,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(n,i)=>{const o=i.newSelection,s=[];for(const e of o.getRanges())s.push(t.toModelRange(e));const r=e.createSelection(s,{backward:o.isBackward});r.isEqual(e.document.selection)||e.change((e=>{e.setSelection(r)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(s=this.mapper,r=this.model.schema,a=this.view,(e,t)=>{if(!a.document.isComposing||p.isAndroid)for(let e=0;e<t.targetRanges.length;e++){const n=t.targetRanges[e],i=s.toModelRange(n),o=Al(i,r);o&&!o.isEqual(i)&&(t.targetRanges[e]=s.toViewRange(o))}}),{priority:"high"}),this.downcastDispatcher.on("insert:$text",((e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const i=n.writer,o=n.mapper.toViewPosition(t.range.start),s=i.createText(t.item.data);i.insert(o,s)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,n)=>{n.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||n.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,n)=>{const i=n.mapper.toViewPosition(t.position),o=t.position.getShiftedBy(t.length),s=n.mapper.toViewPosition(o,{isPhantom:!0}),r=n.writer.createRange(i,s),a=n.writer.remove(r.getTrimmed());for(const e of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",((e,t,n)=>{const i=n.writer,o=i.document.selection;for(const e of o.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&n.writer.mergeAttributes(e.start);i.setSelection(null)})),this.downcastDispatcher.on("selection",((e,t,n)=>{const i=t.selection;if(i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=[];for(const e of i.getRanges())o.push(n.mapper.toViewRange(e));n.writer.setSelection(o,{backward:i.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,n)=>{const i=t.selection;if(!i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=n.writer,s=i.getFirstPosition(),r=n.mapper.toViewPosition(s),a=o.breakAttributes(r);o.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new fs(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,n=this.model.markers.get(t);if(!n)throw new T("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(n)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class El{constructor(){this._consumables=new Map}add(e,t){let n;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?n=this._consumables.get(e):(n=new Bl(e),this._consumables.set(e,n)),n.add(t))}test(e,t){const n=this._consumables.get(e);return void 0===n?null:e.is("$text")||e.is("documentFragment")?n:n.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const n=this._consumables.get(e);void 0!==n&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):n.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},n=e.getAttributeKeys();for(const e of n)"style"!=e&&"class"!=e&&t.attributes.push(e);const i=e.getClassNames();for(const e of i)t.classes.push(e);const o=e.getStyleNames();for(const e of o)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new El),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,El.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const n of e.getChildren())t=El.createFrom(n,t);return t}}const Tl=["attributes","classes","styles"];class Bl{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Tl)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Tl)if(t in e){const n=this._test(t,e[t]);if(!0!==n)return n}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Tl)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Tl)t in e&&this._revert(t,e[t])}_add(e,t){const n=Li(t),i=this._consumables[e];for(const t of n){if("attributes"===e&&("class"===t||"style"===t))throw new T("viewconsumable-invalid-attribute",this);if(i.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))i.set(e,!0)}}_test(e,t){const n=Li(t),i=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){const e=i.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",n=this._test(e,[...this._consumables[e].keys()]);if(!0!==n)return n}return!0}_consume(e,t){const n=Li(t),i=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){if(i.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))i.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const n=Li(t),i=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t)!1===i.get(t)&&i.set(t,!0);else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Pl extends(J()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new Sl(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new Sl(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new T("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new T("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!(!t||!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!(!t||!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!(!t||!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const n=this.getDefinition(e.last);return!!n&&n.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof xa){const t=e.nodeBefore,n=e.nodeAfter;if(!(t instanceof Aa))throw new T("schema-check-merge-no-element-before",this);if(!(n instanceof Aa))throw new T("schema-check-merge-no-element-after",this);return this.checkMerge(t,n)}for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[n,i])=>{if(!i)return;const o=e(n,i);"boolean"==typeof o&&(t.stop(),t.return=o)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[n,i])=>{const o=e(n,i);"boolean"==typeof o&&(t.stop(),t.return=o)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;for(t=e instanceof xa?e.parent:(e instanceof Ia?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n}),null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const n=[...e.getFirstPosition().getAncestors(),new ka("",e.getAttributes())];return this.checkAttribute(n,t)}{const n=e.getRanges();for(const e of n)for(const n of e)if(this.checkAttribute(n.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const n of e)yield*this._getValidRangesForRange(n,t)}getNearestSelectionRange(e,t="both"){if("$graveyard"==e.root.rootName)return null;if(this.checkChild(e,"$text"))return new Ia(e);let n,i;const o=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(n=new ya({boundaries:Ia._createIn(o),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(i=new ya({boundaries:Ia._createIn(o),startPosition:e}));for(const e of function*(e,t){let n=!1;for(;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}(n,i)){const t=e.walker==n?"elementEnd":"elementStart",i=e.value;if(i.type==t&&this.isObject(i.item))return Ia._createOn(i.item);if(this.checkChild(i.nextPosition,"$text"))return new Ia(i.nextPosition)}return null}findAllowedParent(e,t){let n=e.parent;for(;n;){if(this.checkChild(n,t))return n;if(this.isLimit(n))return null;n=n.parent}return null}setAllowedAttributes(e,t,n){const i=n.model;for(const[o,s]of Object.entries(t))i.schema.checkAttribute(e,o)&&n.setAttribute(o,s,e)}removeDisallowedAttributes(e,t){for(const n of e)if(n.is("$text"))ql(this,n,t);else{const e=Ia._createIn(n).getPositions();for(const n of e)ql(this,n.nodeBefore||n.parent,t)}}getAttributesWithProperty(e,t,n){const i={};for(const[o,s]of e.getAttributes()){const e=this.getAttributeProperties(o);void 0!==e[t]&&(void 0!==n&&n!==e[t]||(i[o]=s))}return i}createContext(e){return new Sl(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const i of n)e[i]=Il(t[i],i);for(const t of n)Dl(e,t);for(const t of n)Ol(e,t);for(const t of n)Ml(e,t);for(const t of n)Rl(e,t),Vl(e,t);for(const t of n)Nl(e,t),Fl(e,t),Ll(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,n=t.length-1){const i=t.getItem(n);if(e.allowIn.includes(i.name)){if(0==n)return!0;{const e=this.getDefinition(i);return this._checkContextMatch(e,t,n-1)}}return!1}*_getValidRangesForRange(e,t){let n=e.start,i=e.start;for(const o of e.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(Ia._createIn(o),t)),this.checkAttribute(o,t)||(n.isEqual(i)||(yield new Ia(n,i)),n=xa._createAfter(o)),i=xa._createAfter(o);n.isEqual(i)||(yield new Ia(n,i))}findOptimalInsertionRange(e,t){const n=e.getSelectedElement();if(n&&this.isObject(n)&&!this.isInline(n))return"before"==t||"after"==t?new Ia(xa._createAt(n,t)):Ia._createOn(n);const i=io(e.getSelectedBlocks());if(!i)return new Ia(e.focus);if(i.isEmpty)return new Ia(xa._createAt(i,0));const o=xa._createAfter(i);return e.focus.isTouching(o)?new Ia(o):new Ia(xa._createBefore(i))}}class Sl{constructor(e){if(e instanceof Sl)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Hl)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Sl([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Il(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const n of e){const e=Object.keys(n).filter((e=>e.startsWith("is")));for(const i of e)t[i]=!!n[i]}}(e,n),zl(e,n,"allowIn"),zl(e,n,"allowContentOf"),zl(e,n,"allowWhere"),zl(e,n,"allowAttributes"),zl(e,n,"allowAttributesOf"),zl(e,n,"allowChildren"),zl(e,n,"inheritTypesFrom"),function(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,n),n}function Dl(e,t){const n=e[t];for(const i of n.allowChildren){const n=e[i];n&&n.allowIn.push(t)}n.allowChildren.length=0}function Ol(e,t){for(const n of e[t].allowContentOf)e[n]&&jl(e,n).forEach((e=>{e.allowIn.push(t)}));delete e[t].allowContentOf}function Ml(e,t){for(const n of e[t].allowWhere){const i=e[n];if(i){const n=i.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function Rl(e,t){for(const n of e[t].allowAttributesOf){const i=e[n];if(i){const n=i.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function Vl(e,t){const n=e[t];for(const t of n.inheritTypesFrom){const i=e[t];if(i){const e=Object.keys(i).filter((e=>e.startsWith("is")));for(const t of e)t in n||(n[t]=i[t])}}delete n.inheritTypesFrom}function Nl(e,t){const n=e[t],i=n.allowIn.filter((t=>e[t]));n.allowIn=Array.from(new Set(i))}function Fl(e,t){const n=e[t];for(const i of n.allowIn)e[i].allowChildren.push(t)}function Ll(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function zl(e,t,n){for(const i of e){const e=i[n];"string"==typeof e?t[n].push(e):Array.isArray(e)&&t[n].push(...e)}}function jl(e,t){const n=e[t];return(i=e,Object.keys(i).map((e=>i[e]))).filter((e=>e.allowIn.includes(n.name)));var i}function Hl(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute(t){return e.getAttribute(t)}}}function ql(e,t,n){for(const i of t.getAttributeKeys())e.checkAttribute(t,i)||n.removeAttribute(i,t)}class Wl extends(R()){constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,n=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let n;for(const i of new Sl(e)){const e={};for(const t of i.getAttributeKeys())e[t]=i.getAttribute(t);const o=t.createElement(i.name,e);n&&t.insert(o,n),n=xa._createAt(o,0)}return n}(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=El.createFrom(e),this.conversionApi.store={};const{modelRange:i}=this._convertItem(e,this._modelCursor),o=t.createDocumentFragment();if(i){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,o);o.markers=function(e,t){const n=new Set,i=new Map,o=Ia._createIn(e).getItems();for(const e of o)e.is("element","$marker")&&n.add(e);for(const e of n){const n=e.getAttribute("data-name"),o=t.createPositionBefore(e);i.has(n)?i.get(n).end=o.clone():i.set(n,new Ia(o.clone())),t.remove(e)}return i}(o,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(e,t){const n={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,n,this.conversionApi):e.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Ia))throw new T("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){let n=t.is("position")?t:xa._createAt(t,0);const i=new Ia(n);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,n);e.modelRange instanceof Ia&&(i.end=e.modelRange.end,n=e.modelCursor)}return{modelRange:i,modelCursor:n}}_safeInsert(e,t){const n=this._splitToAllowedParent(e,t);return!!n&&(this.conversionApi.writer.insert(e,n.position),!0)}_updateConversionResult(e,t){const n=this._getSplitParts(e),i=this.conversionApi.writer;t.modelRange||(t.modelRange=i.createRange(i.createPositionBefore(e),i.createPositionAfter(n[n.length-1])));const o=this._cursorParents.get(e);t.modelCursor=o?i.createPositionAt(o,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:n,writer:i}=this.conversionApi;let o=n.findAllowedParent(t,e);if(o){if(o===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(o)&&(o=null)}if(!o)return ml(t,e,n)?{position:gl(t,i)}:null;const s=this.conversionApi.writer.split(t,o),r=[];for(const e of s.range.getWalker())if("elementEnd"==e.type)r.push(e.item);else{const t=r.pop(),n=e.item;this._registerSplitPair(t,n)}const a=s.range.end.parent;return this._cursorParents.set(e,a),{position:s.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const n=this._splitParts.get(e);this._splitParts.set(t,n),n.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class $l{getHtml(e){const t=Yn.document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Ul{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new _r(e,{renderingMode:"data"}),this.htmlWriter=new $l}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`<body>${e}</body>`);const t=this.domParser.parseFromString(e,"text/html"),n=t.createDocumentFragment(),i=t.body.childNodes;for(;i.length>0;)n.appendChild(i[0]);return n}}class Kl extends(R()){constructor(e,t){super(),this.model=e,this.mapper=new Da,this.downcastDispatcher=new Ra({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const i=n.writer,o=n.mapper.toViewPosition(t.range.start),s=i.createText(t.item.data);i.insert(o,s)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,n)=>{n.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||n.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new Wl({schema:e.schema}),this.viewDocument=new Ss(t),this.stylesProcessor=t,this.htmlProcessor=new Ul(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Hs(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:n,consumable:i,writer:o})=>{let s=t.modelCursor;if(!i.test(t.viewItem))return;if(!n.checkChild(s,"$text")){if(!ml(s,"$text",n))return;if(0==t.viewItem.data.trim().length)return;const e=s.nodeBefore;s=gl(s,o),e&&e.is("element","$marker")&&(o.move(o.createRangeOn(e),s),s=o.createPositionAfter(e))}i.consume(t.viewItem);const r=o.createText(t.viewItem.data);o.insert(r,s),t.modelRange=o.createRange(s,s.getShiftedBy(r.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:i}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:i}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}}),{priority:"lowest"}),J().prototype.decorate.call(this,"init"),J().prototype.decorate.call(this,"set"),J().prototype.decorate.call(this,"get"),J().prototype.decorate.call(this,"toView"),J().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},ul)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:n="empty"}=e;if(!this._checkIfRootsExists([t]))throw new T("datacontroller-get-non-existent-root",this);const i=this.model.document.getRoot(t);return i.isAttached()||B("datacontroller-get-detached-root",this),"empty"!==n||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i,e):""}stringify(e,t={}){const n=this.toView(e,t);return this.processor.toData(n)}toView(e,t={}){const n=this.viewDocument,i=this._viewWriter;this.mapper.clearBindings();const o=Ia._createIn(e),s=new js(n);this.mapper.bindElements(e,s);const r=e.is("documentFragment")?e.markers:function(e){const t=[],n=e.root.document;if(!n)return new Map;const i=Ia._createIn(e);for(const e of n.model.markers){const n=e.getRange(),o=n.isCollapsed,s=n.start.isEqual(i.start)||n.end.isEqual(i.end);if(o&&s)t.push([e.name,n]);else{const o=i.getIntersection(n);o&&t.push([e.name,o])}}return t.sort((([e,t],[n,i])=>{if("after"!==t.end.compareWith(i.start))return 1;if("before"!==t.start.compareWith(i.end))return-1;switch(t.start.compareWith(i.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(i.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(o,r,i,t),s}init(e){if(this.model.document.version)throw new T("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new T("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const n of Object.keys(t)){const i=this.model.document.getRoot(n);e.insert(this.parse(t[n],i),i,0)}})),Promise.resolve()}set(e,t={}){let n={};if("string"==typeof e?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new T("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(n)){const i=this.model.document.getRoot(t);e.remove(e.createRangeIn(i)),e.insert(this.parse(n[t],i),i,0)}}))}parse(e,t="$root"){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t="$root"){return this.model.change((n=>this.upcastDispatcher.convert(e,n,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class Gl{constructor(e,t){this._helpers=new Map,this._downcast=Li(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Li(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const n=this._downcast.includes(t);if(!this._upcast.includes(t)&&!n)throw new T("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:n})}for(e){if(!this._helpers.has(e))throw new T("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:n}of Zl(e))this.for("upcast").elementToElement({model:t,view:n,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:n}of Zl(e))this.for("upcast").elementToAttribute({view:n,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:n}of Zl(e))this.for("upcast").attributeToAttribute({view:n,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:n}){if(this._helpers.has(e))throw new T("conversion-group-exists",this);const i=n?new Xa(t):new pl(t);this._helpers.set(e,i)}}function*Zl(e){if(e.model.values)for(const t of e.model.values){const n={key:e.model.key,value:t},i=e.view[t],o=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Jl(n,i,o)}else yield*Jl(e.model,e.view,e.upcastAlso)}function*Jl(e,t,n){if(yield{model:e,view:t},n)for(const t of Li(n))yield{model:e,view:t}}class Yl{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function Ql(e,t){const n=tc(t),i=n.reduce(((e,t)=>e+t.offsetSize),0),o=e.parent;ic(e);const s=e.index;return o._insertChild(s,n),nc(o,s+n.length),nc(o,s),new Ia(e,e.getShiftedBy(i))}function Xl(e){if(!e.isFlat)throw new T("operation-utils-remove-range-not-flat",this);const t=e.start.parent;ic(e.start),ic(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return nc(t,e.start.index),n}function ec(e,t){if(!e.isFlat)throw new T("operation-utils-move-range-not-flat",this);const n=Xl(e);return Ql(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),n)}function tc(e){const t=[];!function e(n){if("string"==typeof n)t.push(new ka(n));else if(n instanceof va)t.push(new ka(n.data,n.getAttributes()));else if(n instanceof wa)t.push(n);else if(se(n))for(const t of n)e(t)}(e);for(let e=1;e<t.length;e++){const n=t[e],i=t[e-1];n instanceof ka&&i instanceof ka&&oc(n,i)&&(t.splice(e-1,2,new ka(i.data+n.data,i.getAttributes())),e--)}return t}function nc(e,t){const n=e.getChild(t-1),i=e.getChild(t);if(n&&i&&n.is("$text")&&i.is("$text")&&oc(n,i)){const o=new ka(n.data+i.data,n.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,o)}}function ic(e){const t=e.textNode,n=e.parent;if(t){const i=e.offset-t.startOffset,o=t.index;n._removeChildren(o,1);const s=new ka(t.data.substr(0,i),t.getAttributes()),r=new ka(t.data.substr(i),t.getAttributes());n._insertChild(o,[s,r])}}function oc(e,t){const n=e.getAttributes(),i=t.getAttributes();for(const e of n){if(e[1]!==t.getAttribute(e[0]))return!1;i.next()}return i.next().done}class sc extends Yl{constructor(e,t,n,i){super(i),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}get affectedSelectable(){return[Ia._createFromPositionAndShift(this.sourcePosition,this.howMany),Ia._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new sc(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new sc(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,n=this.sourcePosition.offset,i=this.targetPosition.offset;if(n+this.howMany>e.maxOffset)throw new T("move-operation-nodes-do-not-exist",this);if(e===t&&n<i&&i<n+this.howMany)throw new T("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==oe(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=n&&this.targetPosition.path[e]<n+this.howMany)throw new T("move-operation-node-into-itself",this)}}_execute(){ec(Ia._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const n=xa.fromJSON(e.sourcePosition,t),i=xa.fromJSON(e.targetPosition,t);return new this(n,e.howMany,i,e.baseVersion)}}class rc extends Yl{constructor(e,t,n){super(n),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new _a(tc(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const e=new _a([...this.nodes].map((e=>e._clone(!0)))),t=new rc(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new xa(e,[0]);return new sc(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new T("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new _a([...e].map((e=>e._clone(!0)))),Ql(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const n=[];for(const t of e.nodes)t.name?n.push(Aa.fromJSON(t)):n.push(ka.fromJSON(t));const i=new rc(xa.fromJSON(e.position,t),n,e.baseVersion);return i.shouldReceiveAttributes=e.shouldReceiveAttributes,i}}class ac extends Yl{constructor(e,t,n,i,o){super(o),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=n,this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new xa(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ia(this.splitPosition,e)}get affectedSelectable(){const e=[Ia._createFromPositionAndShift(this.splitPosition,0),Ia._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(Ia._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new ac(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new xa(e,[0]);return new lc(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new T("split-operation-position-invalid",this);if(!e.parent)throw new T("split-operation-split-in-root",this);if(this.howMany!=e.maxOffset-this.splitPosition.offset)throw new T("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new T("split-operation-graveyard-position-invalid",this)}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)ec(Ia._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const t=e._clone();Ql(this.insertionPosition,t)}ec(new Ia(xa._createAt(e,this.splitPosition.offset),xa._createAt(e,e.maxOffset)),this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new xa(e.root,t,"toPrevious")}static fromJSON(e,t){const n=xa.fromJSON(e.splitPosition,t),i=xa.fromJSON(e.insertionPosition,t),o=e.graveyardPosition?xa.fromJSON(e.graveyardPosition,t):null;return new this(n,e.howMany,i,o,e.baseVersion)}}class lc extends Yl{constructor(e,t,n,i,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}get type(){return"merge"}get deletionPosition(){return new xa(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ia(this.sourcePosition,e)}get affectedSelectable(){const e=this.sourcePosition.parent;return[Ia._createOn(e),Ia._createFromPositionAndShift(this.targetPosition,0),Ia._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new lc(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),n=new xa(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new ac(e,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new T("merge-operation-source-position-invalid",this);if(!t.parent)throw new T("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new T("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;ec(Ia._createIn(e),this.targetPosition),ec(Ia._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const n=xa.fromJSON(e.sourcePosition,t),i=xa.fromJSON(e.targetPosition,t),o=xa.fromJSON(e.graveyardPosition,t);return new this(n,e.howMany,i,o,e.baseVersion)}}class cc extends Yl{constructor(e,t,n,i,o,s){super(s),this.name=e,this.oldRange=t?t.clone():null,this.newRange=n?n.clone():null,this.affectsData=o,this._markers=i}get type(){return"marker"}get affectedSelectable(){const e=[];return this.oldRange&&e.push(this.oldRange.clone()),this.newRange&&(this.oldRange?e.push(...this.newRange.getDifference(this.oldRange)):e.push(this.newRange.clone())),e}clone(){return new cc(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new cc(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new cc(e.name,e.oldRange?Ia.fromJSON(e.oldRange,t):null,e.newRange?Ia.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}var dc=function(e,t){return ia(e,t)};class hc extends Yl{constructor(e,t,n,i,o){super(o),this.range=e.clone(),this.key=t,this.oldValue=void 0===n?null:n,this.newValue=void 0===i?null:i}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new hc(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new hc(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new T("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!dc(e.getAttribute(this.key),this.oldValue))throw new T("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new T("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){dc(this.oldValue,this.newValue)||function(e,t,n){ic(e.start),ic(e.end);for(const i of e.getItems({shallow:!0})){const e=i.is("$textProxy")?i.textNode:i;null!==n?e._setAttribute(t,n):e._removeAttribute(t),nc(e.parent,e.index)}nc(e.end.parent,e.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new hc(Ia.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class uc extends Yl{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new uc(this.baseVersion)}getReversed(){return new uc(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class mc extends Yl{constructor(e,t,n,i){super(i),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=n}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new mc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new mc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Aa))throw new T("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new T("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new mc(xa.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class gc extends Yl{constructor(e,t,n,i,o){super(o),this.root=e,this.key=t,this.oldValue=void 0===n?null:n,this.newValue=void 0===i?null:i}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new gc(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new gc(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new T("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new T("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new T("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new T("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new gc(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class pc extends Yl{constructor(e,t,n,i,o){super(o),this.rootName=e,this.elementName=t,this.isAdd=n,this._document=i,this._document.getRoot(this.rootName)||(this._document.createRoot(this.elementName,this.rootName)._isAttached=!1)}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new pc(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new pc(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const e=super.toJSON();return delete e._document,e}static get className(){return"RootOperation"}static fromJSON(e,t){return new pc(e.rootName,e.elementName,e.isAdd,t,e.baseVersion)}}const fc={};fc[hc.className]=hc,fc[rc.className]=rc,fc[cc.className]=cc,fc[sc.className]=sc,fc[uc.className]=uc,fc[Yl.className]=Yl,fc[mc.className]=mc,fc[gc.className]=gc,fc[pc.className]=pc,fc[ac.className]=ac,fc[lc.className]=lc;class bc{static fromJSON(e,t){return fc[e.__className].fromJSON(e,t)}}const wc=new Map;function _c(e,t,n){let i=wc.get(e);i||(i=new Map,wc.set(e,i)),i.set(t,n)}function kc(e){return[e]}function vc(e,t,n={}){const i=function(e,t){const n=wc.get(e);return n&&n.has(t)?n.get(t):kc}(e.constructor,t.constructor);try{return i(e=e.clone(),t,n)}catch(e){throw e}}function Ac(e,t,n){e=e.slice(),t=t.slice();const i=new yc(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(e),i.setOriginalOperations(t);const o=i.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:o};const s=new WeakMap;for(const t of e)s.set(t,0);const r={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a<e.length;){const n=e[a],o=s.get(n);if(o==t.length){a++;continue}const r=t[o],l=vc(n,r,i.getContext(n,r,!0)),c=vc(r,n,i.getContext(r,n,!1));i.updateRelation(n,r),i.setOriginalOperations(l,n),i.setOriginalOperations(c,r);for(const e of l)s.set(e,o+c.length);e.splice(a,1,...l),t.splice(o,1,...c)}if(n.padWithNoOps){const n=e.length-r.originalOperationsACount,i=t.length-r.originalOperationsBCount;xc(e,i-n),xc(t,n-i)}return Cc(e,r.nextBaseVersionB),Cc(t,r.nextBaseVersionA),{operationsA:e,operationsB:t,originalOperations:o}}class yc{constructor(e,t,n=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!n,this._relations=new Map}setOriginalOperations(e,t=null){const n=t?this.originalOperations.get(t):null;for(const t of e)this.originalOperations.set(t,n||t)}updateRelation(e,t){if(e instanceof sc)t instanceof lc?e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter"):t instanceof sc&&(e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter"));else if(e instanceof ac){if(t instanceof lc)e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");else if(t instanceof sc)if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{const n=Ia._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const i=n.end.offset-e.splitPosition.offset,o=e.splitPosition.offset-n.start.offset;this._setRelation(e,t,{howMany:i,offset:o})}}}else if(e instanceof lc)t instanceof lc?(e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement")):t instanceof ac?e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource"):t instanceof sc&&t.howMany>0&&(e.sourcePosition.isEqual(t.sourcePosition.getShiftedBy(t.howMany))&&this._setRelation(e,t,"mergeSourceAffected"),e.targetPosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeTargetWasBefore"));else if(e instanceof cc){const n=e.newRange;if(!n)return;if(t instanceof sc){const i=Ia._createFromPositionAndShift(t.sourcePosition,t.howMany),o=i.containsPosition(n.start)||i.start.isEqual(n.start),s=i.containsPosition(n.end)||i.end.isEqual(n.end);!o&&!s||i.containsRange(n)||this._setRelation(e,t,{side:o?"left":"right",path:o?n.start.path.slice():n.end.path.slice()})}else if(t instanceof lc){const i=n.start.isEqual(t.targetPosition),o=n.start.isEqual(t.deletionPosition),s=n.end.isEqual(t.deletionPosition),r=n.end.isEqual(t.sourcePosition);(i||o||s||r)&&this._setRelation(e,t,{wasInLeftElement:i,wasStartBeforeMergedElement:o,wasEndBeforeMergedElement:s,wasInRightElement:r})}}}getContext(e,t,n){return{aIsStrong:n,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const n=this.originalOperations.get(t),i=this._history.getUndoneOperation(n);if(!i)return null;const o=this.originalOperations.get(e),s=this._relations.get(o);return s&&s.get(i)||null}_setRelation(e,t,n){const i=this.originalOperations.get(e),o=this.originalOperations.get(t);let s=this._relations.get(i);s||(s=new Map,this._relations.set(i,s)),s.set(o,n)}}function Cc(e,t){for(const n of e)n.baseVersion=t++}function xc(e,t){for(let n=0;n<t;n++)e.push(new uc(0))}function Ec(e,t,n){const i=e.nodes.getNode(0).getAttribute(t);if(i==n)return null;const o=new Ia(e.position,e.position.getShiftedBy(e.howMany));return new hc(o,t,i,n,0)}function Tc(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function Bc(e,t){const n=[];for(let i=0;i<e.length;i++){const o=e[i],s=new sc(o.start,o.end.offset-o.start.offset,t,0);n.push(s);for(let t=i+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(s.sourcePosition,s.targetPosition,s.howMany)[0];t=t._getTransformedByMove(s.sourcePosition,s.targetPosition,s.howMany)}return n}_c(hc,hc,((e,t,n)=>{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const i=e.range.getDifference(t.range).map((t=>new hc(t,e.key,e.oldValue,e.newValue,0))),o=e.range.getIntersection(t.range);return o&&n.aIsStrong&&i.push(new hc(o,t.key,t.newValue,e.newValue,0)),0==i.length?[new uc(0)]:i}return[e]})),_c(hc,rc,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const n=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new hc(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const i=Ec(t,e.key,e.oldValue);i&&n.unshift(i)}return n}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),_c(hc,lc,((e,t)=>{const n=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&n.push(Ia._createFromPositionAndShift(t.graveyardPosition,1));const i=e.range._getTransformedByMergeOperation(t);return i.isCollapsed||n.push(i),n.map((t=>new hc(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),_c(hc,sc,((e,t)=>{const n=function(e,t){const n=Ia._createFromPositionAndShift(t.sourcePosition,t.howMany);let i=null,o=[];n.containsRange(e,!0)?i=e:e.start.hasSameParentAs(n.start)?(o=e.getDifference(n),i=e.getIntersection(n)):o=[e];const s=[];for(let e of o){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const n=t.getMovedRangeStart(),i=e.start.hasSameParentAs(n),o=e._getTransformedByInsertion(n,t.howMany,i);s.push(...o)}return i&&s.push(i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]),s}(e.range,t);return n.map((t=>new hc(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),_c(hc,ac,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const n=e.clone();return n.range=new Ia(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,n]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),_c(rc,hc,((e,t)=>{const n=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const i=Ec(e,t.key,t.newValue);i&&n.push(i)}return n})),_c(rc,rc,((e,t,n)=>(e.position.isEqual(t.position)&&n.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),_c(rc,sc,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),_c(rc,ac,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),_c(rc,lc,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),_c(cc,rc,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),_c(cc,cc,((e,t,n)=>{if(e.name==t.name){if(!n.aIsStrong)return[new uc(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),_c(cc,lc,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),_c(cc,sc,((e,t,n)=>{if(e.oldRange&&(e.oldRange=Ia._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(n.abRelation){const i=Ia._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=i.end,e.newRange.start.path=n.abRelation.path,[e];if("right"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=i.start,e.newRange.end.path=n.abRelation.path,[e]}e.newRange=Ia._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),_c(cc,ac,((e,t,n)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(n.abRelation){const i=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?e.newRange.start=xa._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!n.abRelation.wasInLeftElement&&(e.newRange.start=xa._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasInRightElement?e.newRange.end=xa._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?e.newRange.end=xa._createAt(t.insertionPosition):e.newRange.end=i.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),_c(lc,rc,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),_c(lc,lc,((e,t,n)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(n.bWasUndone){const n=t.graveyardPosition.path.slice();return n.push(0),e.sourcePosition=new xa(t.graveyardPosition.root,n),e.howMany=0,[e]}return[new uc(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const i="$graveyard"==e.targetPosition.root.rootName,o="$graveyard"==t.targetPosition.root.rootName;if(o&&!i||(!i||o)&&n.aIsStrong){const n=t.targetPosition._getTransformedByMergeOperation(t),i=e.targetPosition._getTransformedByMergeOperation(t);return[new sc(n,e.howMany,i,0)]}return[new uc(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&n.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),_c(lc,sc,((e,t,n)=>{const i=Ia._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!n.bWasUndone&&!n.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition)?[new uc(0)]:(t.sourcePosition.getShiftedBy(t.howMany).isEqual(e.sourcePosition)?e.sourcePosition.stickiness="toNone":t.targetPosition.isEqual(e.sourcePosition)&&"mergeSourceAffected"==n.abRelation?e.sourcePosition.stickiness="toNext":t.sourcePosition.isEqual(e.targetPosition)?(e.targetPosition.stickiness="toNone",e.howMany-=t.howMany):t.targetPosition.isEqual(e.targetPosition)&&"mergeTargetWasBefore"==n.abRelation?(e.targetPosition.stickiness="toPrevious",e.howMany+=t.howMany):(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany)),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.sourcePosition.stickiness="toPrevious",e.targetPosition.stickiness="toNext",e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),_c(lc,ac,((e,t,n)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const i=0!=t.howMany,o=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(i||o||"mergeTargetNotMoved"==n.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==n.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),_c(sc,rc,((e,t)=>{const n=Ia._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),_c(sc,sc,((e,t,n)=>{const i=Ia._createFromPositionAndShift(e.sourcePosition,e.howMany),o=Ia._createFromPositionAndShift(t.sourcePosition,t.howMany);let s,r=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),s=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Tc(e,t)&&Tc(t,e))return[t.getReversed()];if(i.containsPosition(t.targetPosition)&&i.containsRange(o,!0))return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Bc([i],s);if(o.containsPosition(e.targetPosition)&&o.containsRange(i,!0))return i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Bc([i],s);const l=oe(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Bc([i],s);"remove"!=e.type||"remove"==t.type||n.aWasUndone||n.forceWeakRemove?"remove"==e.type||"remove"!=t.type||n.bWasUndone||n.forceWeakRemove||(r=!1):r=!0;const c=[],d=i.getDifference(o);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const n="same"==oe(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),i=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,n);c.push(...i)}const h=i.getIntersection(o);return null!==h&&r&&(h.start=h.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),h.end=h.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(h):1==c.length?o.start.isBefore(i.start)||o.start.isEqual(i.start)?c.unshift(h):c.push(h):c.splice(1,0,h)),0===c.length?[new uc(e.baseVersion)]:Bc(c,s)})),_c(sc,ac,((e,t,n)=>{let i=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(i=e.targetPosition._getTransformedBySplitOperation(t));const o=Ia._createFromPositionAndShift(e.sourcePosition,e.howMany);if(o.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=i,[e];if(o.start.hasSameParentAs(t.splitPosition)&&o.containsPosition(t.splitPosition)){let e=new Ia(t.splitPosition,o.end);return e=e._getTransformedBySplitOperation(t),Bc([new Ia(o.start,t.splitPosition),e],i)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==n.abRelation&&(i=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==n.abRelation&&(i=e.targetPosition);const s=[o._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const i=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);e.howMany>1&&i&&!n.aWasUndone&&s.push(Ia._createFromPositionAndShift(t.insertionPosition,1))}return Bc(s,i)})),_c(sc,lc,((e,t,n)=>{const i=Ia._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition))if("remove"!=e.type||n.forceWeakRemove){if(1==e.howMany)return n.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new uc(0)]}else if(!n.aWasUndone){const n=[];let i=t.graveyardPosition.clone(),o=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(n.push(new sc(e.sourcePosition,e.howMany-1,e.targetPosition,0)),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const s=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),r=new sc(i,1,s,0),a=r.getMovedRangeStart().path.slice();a.push(0);const l=new xa(r.targetPosition.root,a);o=o._getTransformedByMove(i,s,1);const c=new sc(o,t.howMany,l,0);return n.push(r),n.push(c),n}const o=Ia._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),_c(mc,rc,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),_c(mc,lc,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),_c(mc,sc,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),_c(mc,mc,((e,t,n)=>{if(e.position.isEqual(t.position)){if(!n.aIsStrong)return[new uc(0)];e.oldName=t.newName}return[e]})),_c(mc,ac,((e,t)=>{if("same"==oe(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new mc(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),_c(gc,gc,((e,t,n)=>{if(e.root===t.root&&e.key===t.key){if(!n.aIsStrong||e.newValue===t.newValue)return[new uc(0)];e.oldValue=t.newValue}return[e]})),_c(pc,pc,((e,t)=>e.rootName===t.rootName&&e.isAdd===t.isAdd?[new uc(0)]:[e])),_c(ac,rc,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset<t.position.offset&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByInsertOperation(t),e.insertionPosition=e.insertionPosition._getTransformedByInsertOperation(t),[e]))),_c(ac,lc,((e,t,n)=>{if(!e.graveyardPosition&&!n.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const n=t.graveyardPosition.path.slice();n.push(0);const i=new xa(t.graveyardPosition.root,n),o=ac.getInsertionPosition(new xa(t.graveyardPosition.root,n)),s=new ac(i,0,o,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=ac.getInsertionPosition(e.splitPosition),e.graveyardPosition=s.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[s,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=ac.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),_c(ac,sc,((e,t,n)=>{const i=Ia._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const o=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);if(!n.bWasUndone&&o){const n=e.splitPosition._getTransformedByMoveOperation(t),i=e.graveyardPosition._getTransformedByMoveOperation(t),o=i.path.slice();o.push(0);const s=new xa(i.root,o);return[new sc(n,e.howMany,s,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const o=e.splitPosition.isEqual(t.targetPosition);if(o&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=ac.getInsertionPosition(e.splitPosition),[e];if(o&&n.abRelation&&n.abRelation.howMany){const{howMany:t,offset:i}=n.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(i),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.splitPosition)){const n=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=n,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany),e.splitPosition=t.sourcePosition.clone(),e.insertionPosition=ac.getInsertionPosition(e.splitPosition),[e]}return t.sourcePosition.isEqual(t.targetPosition)||(e.splitPosition.hasSameParentAs(t.sourcePosition)&&e.splitPosition.offset<=t.sourcePosition.offset&&(e.howMany-=t.howMany),e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany)),e.splitPosition.stickiness="toNone",e.splitPosition=e.splitPosition._getTransformedByMoveOperation(t),e.splitPosition.stickiness="toNext",e.graveyardPosition?e.insertionPosition=e.insertionPosition._getTransformedByMoveOperation(t):e.insertionPosition=ac.getInsertionPosition(e.splitPosition),[e]})),_c(ac,ac,((e,t,n)=>{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new uc(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new uc(0)];if("splitBefore"==n.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const i="$graveyard"==e.splitPosition.root.rootName,o="$graveyard"==t.splitPosition.root.rootName;if(o&&!i||(!i||o)&&n.aIsStrong){const n=[];return t.howMany&&n.push(new sc(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&n.push(new sc(e.splitPosition,e.howMany,e.moveTargetPosition,0)),n}return[new uc(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.baRelation){const n=t.insertionPosition.path.slice();n.push(0);const i=new xa(t.insertionPosition.root,n);return[e,new sc(e.insertionPosition,1,i,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset<t.splitPosition.offset&&(e.howMany-=t.howMany),e.splitPosition=e.splitPosition._getTransformedBySplitOperation(t),e.insertionPosition=ac.getInsertionPosition(e.splitPosition),[e]}));class Pc extends(R(xa)){constructor(e,t,n="toNone"){if(super(e,t,n),!this.root.is("rootElement"))throw new T("model-liveposition-root-not-rootelement",e);Sc.call(this)}detach(){this.stopListening()}toPosition(){return new xa(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function Sc(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const n=t[0];n.isDocumentOperation&&Ic.call(this,n)}),{priority:"low"})}function Ic(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Pc.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class Dc{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},B("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:n=!0,isUndo:i=!1,isTyping:o=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=n,this.isUndo=i,this.isTyping=o}get type(){return B("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Oc{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),n=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),n||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Ia._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const n=t.graveyardPosition.parent;this._markInsert(n,t.graveyardPosition.offset,1);const i=t.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":{const e=t.affectedSelectable;if(!e._isLoaded)return;if(e.isAttached()==t.isAdd)return;this._bufferRootStateChange(t.rootName,t.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!t.root._isLoaded)return;const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,n){t.range&&t.range.root.is("rootElement")&&!t.range.root._isLoaded&&(t.range=null),n.range&&n.range.root.is("rootElement")&&!n.range.root._isLoaded&&(n.range=null);let i=this._changedMarkers.get(e);i?i.newMarkerData=n:(i={newMarkerData:n,oldMarkerData:t},this._changedMarkers.set(e,i)),null==i.oldMarkerData.range&&null==n.range&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.oldMarkerData.range&&e.push({name:t,range:n.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.newMarkerData.range&&e.push({name:t,range:n.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this.getChanges().length)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const n=e.range&&!t.range,i=!e.range&&t.range,o=e.range&&t.range&&!e.range.isEqual(t.range);if(n||i||o)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const n=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offset<t.offset?-1:1)),i=this._elementSnapshots.get(e),o=Mc(e.getChildren()),s=Rc(i.length,n);let r=0,a=0;for(const n of s)if("i"===n)t.push(this._getInsertDiff(e,r,o[r])),r++;else if("r"===n)t.push(this._getRemoveDiff(e,r,i[a])),a++;else if("a"===n){const n=o[r].attributes,s=i[a].attributes;let l;if("$text"==o[r].name)l=new Ia(xa._createAt(e,r),xa._createAt(e,r+1));else{const t=e.offsetToIndex(r);l=new Ia(xa._createAt(e,r),xa._createAt(e.getChild(t),0))}t.push(...this._getAttributesDiff(l,s,n)),r++,a++}else r++,a++}t.sort(((e,t)=>e.position.root!=t.position.root?e.position.root.rootName<t.position.root.rootName?-1:1:e.position.isEqual(t.position)?e.changeCount-t.changeCount:e.position.isBefore(t.position)?-1:1));for(let e=1,n=0;e<t.length;e++){const i=t[n],o=t[e],s="remove"==i.type&&"remove"==o.type&&"$text"==i.name&&"$text"==o.name&&i.position.isEqual(o.position),r="insert"==i.type&&"insert"==o.type&&"$text"==i.name&&"$text"==o.name&&i.position.parent==o.position.parent&&i.position.offset+i.length==o.position.offset,a="attribute"==i.type&&"attribute"==o.type&&i.position.parent==o.position.parent&&i.range.isFlat&&o.range.isFlat&&i.position.offset+i.length==o.position.offset&&i.attributeKey==o.attributeKey&&i.attributeOldValue==o.attributeOldValue&&i.attributeNewValue==o.attributeNewValue;s||r||a?(i.length++,a&&(i.range.end=i.range.end.getShiftedBy(1)),t[e]=null):n=e}t=t.filter((e=>e));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(Vc),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const n=this._changedRoots.get(e);void 0!==n.state?(delete n.state,void 0===n.attributes&&this._changedRoots.delete(e)):n.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,n,i){const o=this._changedRoots.get(e)||{name:e},s=o.attributes||{};if(s[t]){const e=s[t];i===e.oldValue?delete s[t]:e.newValue=i}else s[t]={oldValue:n,newValue:i};0===Object.entries(s).length?(delete o.attributes,void 0===o.state&&this._changedRoots.delete(e)):(o.attributes=s,this._changedRoots.set(e,o))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=Ia._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const t of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,t,null,e.getAttribute(t));for(const t of this._markerCollection)if(t.getRange().root==e){const e=t.getData();this.bufferMarkerChange(t.name,{...e,range:null},e)}}}_markInsert(e,t,n){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const i={type:"insert",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,i)}_markRemove(e,t,n){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const i={type:"remove",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,i),this._removeAllNestedChanges(e,t,n)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const n=this._getChangesForElement(e);this._handleChange(t,n),n.push(t);for(let e=0;e<n.length;e++)n[e].howMany<1&&(n.splice(e,1),e--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,Mc(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const n of t){const i=e.offset+e.howMany,o=n.offset+n.howMany;if("insert"==e.type&&("insert"==n.type&&(e.offset<=n.offset?n.offset+=e.howMany:e.offset<o&&(n.howMany+=e.nodesToHandle,e.nodesToHandle=0)),"remove"==n.type&&e.offset<n.offset&&(n.offset+=e.howMany),"attribute"==n.type))if(e.offset<=n.offset)n.offset+=e.howMany;else if(e.offset<o){const o=n.howMany;n.howMany=e.offset-n.offset,t.unshift({type:"attribute",offset:i,howMany:o-n.howMany,count:this._changeCount++})}if("remove"==e.type){if("insert"==n.type)if(i<=n.offset)n.offset-=e.howMany;else if(i<=o)if(e.offset<n.offset){const t=i-n.offset;n.offset=e.offset,n.howMany-=t,e.nodesToHandle-=t}else n.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=n.offset)e.nodesToHandle-=n.howMany,n.howMany=0;else if(e.offset<o){const t=o-e.offset;n.howMany-=t,e.nodesToHandle-=t}if("remove"==n.type&&(i<=n.offset?n.offset-=e.howMany:e.offset<n.offset&&(e.nodesToHandle+=n.howMany,n.howMany=0)),"attribute"==n.type)if(i<=n.offset)n.offset-=e.howMany;else if(e.offset<n.offset){const t=i-n.offset;n.offset=e.offset,n.howMany-=t}else if(e.offset<o)if(i<=o){const i=n.howMany;n.howMany=e.offset-n.offset;const o=i-n.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:o,count:this._changeCount++})}else n.howMany-=o-e.offset}if("attribute"==e.type){if("insert"==n.type)if(e.offset<n.offset&&i>n.offset){if(i>o){const e={type:"attribute",offset:o,howMany:i-o,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offset<o&&(i>o?(e.nodesToHandle=i-o,e.offset=o):e.nodesToHandle=0);if("remove"==n.type&&e.offset<n.offset&&i>n.offset){const o={type:"attribute",offset:n.offset,howMany:i-n.offset,count:this._changeCount++};this._handleChange(o,t),t.push(o),e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==n.type&&(e.offset>=n.offset&&i<=o?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&i>=o&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:"insert",position:xa._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++,_element:n.element}}_getRemoveDiff(e,t,n){return{type:"remove",position:xa._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++,_element:n.element}}_getAttributesDiff(e,t,n){const i=[];n=new Map(n);for(const[o,s]of t){const t=n.has(o)?n.get(o):null;t!==s&&i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:s,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(o)}for(const[t,o]of n)i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return i}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),i=e.startOffset;if(n)for(const e of n)if("insert"==e.type&&i>=e.offset&&i<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,n){const i=new Ia(xa._createAt(e,t),xa._createAt(e,t+n));for(const e of i.getItems({shallow:!0}))e.is("element")&&(this._elementSnapshots.delete(e),this._changesInElement.delete(e),this._removeAllNestedChanges(e,0,e.maxOffset))}}function Mc(e){const t=[];for(const n of e)if(n.is("$text"))for(let e=0;e<n.data.length;e++)t.push({name:"$text",attributes:new Map(n.getAttributes())});else t.push({name:n.name,attributes:new Map(n.getAttributes()),element:n});return t}function Rc(e,t){const n=[];let i=0,o=0;for(const e of t){if(e.offset>i){for(let t=0;t<e.offset-i;t++)n.push("e");o+=e.offset-i}if("insert"==e.type){for(let t=0;t<e.howMany;t++)n.push("i");i=e.offset+e.howMany}else if("remove"==e.type){for(let t=0;t<e.howMany;t++)n.push("r");i=e.offset,o+=e.howMany}else n.push(..."a".repeat(e.howMany).split("")),i=e.offset+e.howMany,o+=e.howMany}if(o<e)for(let t=0;t<e-o-i;t++)n.push("e");return n}function Vc(e){const t="position"in e&&"$graveyard"==e.position.root.rootName,n="range"in e&&"$graveyard"==e.range.root.rootName;return!t&&!n}class Nc{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new T("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const n=this._operations[0];void 0===e&&(e=n.baseVersion);let i=t-1;for(const[t,n]of this._gaps)e>t&&e<n&&(e=n),i>t&&i<n&&(i=t-1);if(i<n.baseVersion||e>this.lastOperation.baseVersion)return[];let o=this._baseVersionToOperationIndex.get(e);void 0===o&&(o=0);let s=this._baseVersionToOperationIndex.get(i);return void 0===s&&(s=this._operations.length-1),this._operations.slice(o,s+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class Fc extends Aa{constructor(e,t,n="main"){super(t),this._isAttached=!0,this._isLoaded=!0,this._document=e,this.rootName=n}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}Fc.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const Lc="$graveyard";class zc extends(R()){constructor(e){super(),this.model=e,this.history=new Nc,this.selection=new Za(this),this.roots=new no({idProperty:"rootName"}),this.differ=new Oc(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Lc),this.listenTo(e,"applyOperation",((e,t)=>{const n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const n=t[0];n.isDocumentOperation&&this.history.addOperation(n)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,n,i,o)=>{const s={...t.getData(),range:i};this.differ.bufferMarkerChange(t.name,o,s),null===n&&t.on("change",((e,n)=>{const i=t.getData();this.differ.bufferMarkerChange(t.name,{...i,range:n},i)}))})),this.registerPostFixer((e=>{let t=!1;for(const n of this.roots)n.isAttached()||n.isEmpty||(e.remove(e.createRangeIn(n)),t=!0);for(const n of this.model.markers)n.getRange().root.isAttached()||(e.removeMarker(n),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(Lc)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new T("model-document-createroot-name-exists",this,{name:t});const n=new Fc(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return this.getRoots(e).map((e=>e.rootName))}getRoots(e=!1){return this.roots.filter((t=>t!=this.graveyard&&(e||t.isAttached())&&t._isLoaded))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=So(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,n=t.schema,i=t.createPositionFromPath(e,[0]);return n.getNearestSelectionRange(i)||t.createRange(i)}_validateSelectionRange(e){return jc(e.start)&&jc(e.end)}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),t=n(e),t)break}while(t)}}function jc(e){const t=e.textNode;if(t){const n=t.data,i=e.offset-t.startOffset;return!lo(n,i)&&!co(n,i)}return!0}class Hc extends(R()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof qc?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1,i=!1){const o=e instanceof qc?e.name:e;if(o.includes(","))throw new T("markercollection-incorrect-marker-name",this);const s=this._markers.get(o);if(s){const e=s.getData(),r=s.getRange();let a=!1;return r.isEqual(t)||(s._attachLiveRange($a.fromRange(t)),a=!0),n!=s.managedUsingOperations&&(s._managedUsingOperations=n,a=!0),"boolean"==typeof i&&i!=s.affectsData&&(s._affectsData=i,a=!0),a&&this.fire(`update:${o}`,s,r,t,e),s}const r=$a.fromRange(t),a=new qc(o,r,n,i);return this._markers.set(o,a),this.fire(`update:${o}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof qc?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire(`update:${t}`,n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0)}_refresh(e){const t=e instanceof qc?e.name:e,n=this._markers.get(t);if(!n)throw new T("markercollection-refresh-marker-not-exists",this);const i=n.getRange();this.fire(`update:${t}`,n,i,i,n.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class qc extends(R(ba)){constructor(e,t,n,i){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=n,this._affectsData=i}get managedUsingOperations(){if(!this._liveRange)throw new T("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new T("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new T("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new T("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new T("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}qc.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Wc extends Yl{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new T("detach-operation-on-document-node",this)}_execute(){Xl(Ia._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class $c extends ba{constructor(e){super(),this.markers=new Map,this._children=new _a,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const n of e)n.name?t.push(Aa.fromJSON(n)):t.push(ka.fromJSON(n));return new $c(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){return"string"==typeof e?[new ka(e)]:(se(e)||(e=[e]),Array.from(e).map((e=>"string"==typeof e?new ka(e):e instanceof va?new ka(e.data,e.getAttributes()):e)))}(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}}$c.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class Uc{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new ka(e,t)}createElement(e,t){return new Aa(e,t)}createDocumentFragment(){return new $c}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,n=0){if(this._assertWriterUsedCorrectly(),e instanceof ka&&""==e.data)return;const i=xa._createAt(t,n);if(e.parent){if(Yc(e.root,i.root))return void this.move(Ia._createOn(e),i);if(e.root.document)throw new T("model-writer-insert-forbidden-move",this);this.remove(e)}const o=i.root.document?i.root.document.version:null,s=new rc(i,e,o);if(e instanceof ka&&(s.shouldReceiveAttributes=!0),this.batch.addOperation(s),this.model.applyOperation(s),e instanceof $c)for(const[t,n]of e.markers){const e=xa._createAt(n.root,0),o={range:new Ia(n.start._getCombined(e,i),n.end._getCombined(e,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,o):this.addMarker(t,o)}}insertText(e,t,n,i){t instanceof $c||t instanceof Aa||t instanceof xa?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,i)}insertElement(e,t,n,i){t instanceof $c||t instanceof Aa||t instanceof xa?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,i)}append(e,t){this.insert(e,t,"end")}appendText(e,t,n){t instanceof $c||t instanceof Aa?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),n,"end")}appendElement(e,t,n){t instanceof $c||t instanceof Aa?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),n,"end")}setAttribute(e,t,n){if(this._assertWriterUsedCorrectly(),n instanceof Ia){const i=n.getMinimalFlatRanges();for(const n of i)Kc(this,e,t,n)}else Gc(this,e,t,n)}setAttributes(e,t){for(const[n,i]of ro(e))this.setAttribute(n,i,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof Ia){const n=t.getMinimalFlatRanges();for(const t of n)Kc(this,e,null,t)}else Gc(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof Ia)for(const n of e.getItems())t(n);else t(e)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof Ia))throw new T("writer-move-invalid-range",this);if(!e.isFlat)throw new T("writer-move-range-not-flat",this);const i=xa._createAt(t,n);if(i.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!Yc(e.root,i.root))throw new T("writer-move-different-document",this);const o=e.root.document?e.root.document.version:null,s=new sc(e.start,e.end.offset-e.start.offset,i,o);this.batch.addOperation(s),this.model.applyOperation(s)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof Ia?e:Ia._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),Jc(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,n=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Aa))throw new T("writer-merge-no-element-before",this);if(!(n instanceof Aa))throw new T("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,n){return this.model.createPositionFromPath(e,t,n)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,n=e.nodeAfter;this.move(Ia._createIn(n),xa._createAt(t,"end")),this.remove(n)}_merge(e){const t=xa._createAt(e.nodeBefore,"end"),n=xa._createAt(e.nodeAfter,0),i=e.root.document.graveyard,o=new xa(i,[0]),s=e.root.document.version,r=new lc(n,e.nodeAfter.maxOffset,t,o,s);this.batch.addOperation(r),this.model.applyOperation(r)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Aa))throw new T("writer-rename-not-element-instance",this);const n=e.root.document?e.root.document.version:null,i=new mc(xa._createBefore(e),e.name,t,n);this.batch.addOperation(i),this.model.applyOperation(i)}split(e,t){this._assertWriterUsedCorrectly();let n,i,o=e.parent;if(!o.parent)throw new T("writer-split-element-no-parent",this);if(t||(t=o.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new T("writer-split-invalid-limit-element",this);do{const t=o.root.document?o.root.document.version:null,s=o.maxOffset-e.offset,r=ac.getInsertionPosition(e),a=new ac(e,s,r,null,t);this.batch.addOperation(a),this.model.applyOperation(a),n||i||(n=o,i=e.parent.nextSibling),o=(e=this.createPositionAfter(e.parent)).parent}while(o!==t);return{position:e,range:new Ia(xa._createAt(n,"end"),xa._createAt(i,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new T("writer-wrap-range-not-flat",this);const n=t instanceof Aa?t:new Aa(t);if(n.childCount>0)throw new T("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new T("writer-wrap-element-attached",this);this.insert(n,e.start);const i=new Ia(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(i,xa._createAt(n,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new T("writer-unwrap-element-no-parent",this);this.move(Ia._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new T("writer-addmarker-no-usingoperation",this);const n=t.usingOperation,i=t.range,o=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new T("writer-addmarker-marker-exists",this);if(!i)throw new T("writer-addmarker-no-range",this);return n?(Zc(this,e,null,i,o),this.model.markers.get(e)):this.model.markers._set(e,i,n,o)}updateMarker(e,t){this._assertWriterUsedCorrectly();const n="string"==typeof e?e:e.name,i=this.model.markers.get(n);if(!i)throw new T("writer-updatemarker-marker-not-exists",this);if(!t)return B("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),void this.model.markers._refresh(i);const o="boolean"==typeof t.usingOperation,s="boolean"==typeof t.affectsData,r=s?t.affectsData:i.affectsData;if(!o&&!t.range&&!s)throw new T("writer-updatemarker-wrong-options",this);const a=i.getRange(),l=t.range?t.range:a;o&&t.usingOperation!==i.managedUsingOperations?t.usingOperation?Zc(this,n,null,l,r):(Zc(this,n,a,null,r),this.model.markers._set(n,l,void 0,r)):i.managedUsingOperations?Zc(this,n,a,l,r):this.model.markers._set(n,l,void 0,r)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new T("writer-removemarker-no-marker",this);const n=this.model.markers.get(t);n.managedUsingOperations?Zc(this,t,n.getRange(),null,n.affectsData):this.model.markers._remove(t)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const n=this.model.document.getRoot(e);if(n&&n.isAttached())throw new T("writer-addroot-root-exists",this);const i=this.model.document,o=new pc(e,t,!0,i,i.version);return this.batch.addOperation(o),this.model.applyOperation(o),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new T("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const n=this.model.document,i=new pc(t.rootName,t.name,!1,n,n.version);this.batch.addOperation(i),this.model.applyOperation(i)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,n]of ro(e))this._setSelectionAttribute(t,n)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const i=Za._getStoreAttributeKey(e);this.setAttribute(i,t,n.anchor.parent)}n._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const n=Za._getStoreAttributeKey(e);this.removeAttribute(n,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new T("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const i=n.getRange();let o=!1;if("move"===e){const e=t;o=e.containsPosition(i.start)||e.start.isEqual(i.start)||e.containsPosition(i.end)||e.end.isEqual(i.end)}else{const e=t,n=e.nodeBefore,s=e.nodeAfter,r=i.start.parent==n&&i.start.isAtEnd,a=i.end.parent==s&&0==i.end.offset,l=i.end.nodeAfter==s,c=i.start.nodeAfter==s;o=r||a||l||c}o&&this.updateMarker(n.name,{range:i})}}}function Kc(e,t,n,i){const o=e.model,s=o.document;let r,a,l,c=i.start;for(const e of i.getWalker({shallow:!0}))l=e.item.getAttribute(t),r&&a!=l&&(a!=n&&d(),c=r),r=e.nextPosition,a=l;function d(){const i=new Ia(c,r),l=i.root.document?s.version:null,d=new hc(i,t,a,n,l);e.batch.addOperation(d),o.applyOperation(d)}r instanceof xa&&r!=c&&a!=n&&d()}function Gc(e,t,n,i){const o=e.model,s=o.document,r=i.getAttribute(t);let a,l;if(r!=n){if(i.root===i){const e=i.document?s.version:null;l=new gc(i,t,r,n,e)}else{a=new Ia(xa._createBefore(i),e.createPositionAfter(i));const o=a.root.document?s.version:null;l=new hc(a,t,r,n,o)}e.batch.addOperation(l),o.applyOperation(l)}}function Zc(e,t,n,i,o){const s=e.model,r=s.document,a=new cc(t,n,i,s.markers,!!o,r.version);e.batch.addOperation(a),s.applyOperation(a)}function Jc(e,t,n,i){let o;if(e.root.document){const n=i.document,s=new xa(n.graveyard,[0]);o=new sc(e,t,s,n.version)}else o=new Wc(e,t);n.addOperation(o),i.applyOperation(o)}function Yc(e,t){return e===t||e instanceof Fc&&t instanceof Fc}function Qc(e,t,n={}){if(t.isCollapsed)return;const i=t.getFirstRange();if("$graveyard"==i.root.rootName)return;const o=e.schema;e.change((e=>{if(!n.doNotResetEntireContent&&function(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const i=t.getFirstRange();return i.start.parent!=i.end.parent&&e.checkChild(n,"paragraph")}(o,t))return void function(e,t){const n=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(n)),nd(e,e.createPositionAt(n,0),t)}(e,t);const s={};if(!n.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(s,o.getAttributesWithProperty(e,"copyOnReplace",!0))}const[r,a]=function(e){const t=e.root.document.model,n=e.start;let i=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const n=function(e){const t=e.parent,n=t.root.document.model.schema,i=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of i){if(n.isLimit(e))return null;if(n.isBlock(e))return e}}(i);if(n&&i.isTouching(t.createPositionAt(n,0))){const n=t.createSelection(e);t.modifySelection(n,{direction:"backward"});const o=n.getLastPosition(),s=t.createRange(o,i);t.hasContent(s,{ignoreMarkers:!0})||(i=o)}}return[Pc.fromPosition(n,"toPrevious"),Pc.fromPosition(i,"toNext")]}(i);r.isTouching(a)||e.remove(e.createRange(r,a)),n.leaveUnmerged||(function(e,t,n){const i=e.model;if(!td(e.model.schema,t,n))return;const[o,s]=function(e,t){const n=e.getAncestors(),i=t.getAncestors();let o=0;for(;n[o]&&n[o]==i[o];)o++;return[n[o],i[o]]}(t,n);o&&s&&(!i.hasContent(o,{ignoreMarkers:!0})&&i.hasContent(s,{ignoreMarkers:!0})?ed(e,t,n,o.parent):Xc(e,t,n,o.parent))}(e,r,a),o.removeDisallowedAttributes(r.parent.getChildren(),e)),id(e,t,r),!n.doNotAutoparagraph&&function(e,t){const n=e.checkChild(t,"$text"),i=e.checkChild(t,"paragraph");return!n&&i}(o,r)&&nd(e,r,t,s),r.detach(),a.detach()}))}function Xc(e,t,n,i){const o=t.parent,s=n.parent;if(o!=i&&s!=i){for(t=e.createPositionAfter(o),(n=e.createPositionBefore(s)).isEqual(t)||e.insert(s,t),e.merge(t);n.parent.isEmpty;){const t=n.parent;n=e.createPositionBefore(t),e.remove(t)}td(e.model.schema,t,n)&&Xc(e,t,n,i)}}function ed(e,t,n,i){const o=t.parent,s=n.parent;if(o!=i&&s!=i){for(t=e.createPositionAfter(o),(n=e.createPositionBefore(s)).isEqual(t)||e.insert(o,n);t.parent.isEmpty;){const n=t.parent;t=e.createPositionBefore(n),e.remove(n)}n=e.createPositionBefore(s),function(e,t){const n=t.nodeBefore,i=t.nodeAfter;n.name!=i.name&&e.rename(n,i.name),e.clearAttributes(n),e.setAttributes(Object.fromEntries(i.getAttributes()),n),e.merge(t)}(e,n),td(e.model.schema,t,n)&&ed(e,t,n,i)}}function td(e,t,n){const i=t.parent,o=n.parent;return i!=o&&!e.isLimit(i)&&!e.isLimit(o)&&function(e,t,n){const i=new Ia(e,t);for(const e of i.getWalker())if(n.isLimit(e.item))return!1;return!0}(t,n,e)}function nd(e,t,n,i={}){const o=e.createElement("paragraph");e.model.schema.setAllowedAttributes(o,i,e),e.insert(o,t),id(e,n,e.createPositionAt(o,0))}function id(e,t,n){t instanceof Za?e.setSelection(n):t.setTo(n)}function od(e,t){const n=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{n.push(e.start.parent),t.remove(e)})),n.forEach((e=>{let n=e;for(;n.parent&&n.isEmpty;){const e=t.createRangeOn(n);n=n.parent,t.remove(e)}}))}class sd{constructor(e,t,n){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(e);if(n.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new T("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Ia._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Ia(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Pc.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new T("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Pc.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Pc.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof Aa))return;if(!this._canMergeLeft(e))return;const t=Pc._createBefore(e);t.stickiness="toNext";const n=Pc.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Pc._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Pc._createAt(t.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof Aa))return;if(!this._canMergeRight(e))return;const t=Pc._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new T("insertcontent-invalid-insertion-position",this);this.position=xa._createAt(t.nodeBefore,"end");const n=Pc.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Pc._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Pc._createAt(t.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof Aa&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof Aa&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}const rd=' ,.?!:;"-()';function ad(e,t){const{isForward:n,walker:i,unit:o,schema:s,treatEmojiAsSingleUnit:r}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let n=e.position.textNode;for(n||(n=t?e.position.nodeAfter:e.position.nodeBefore);n&&n.is("$text");){const i=e.position.offset-n.startOffset;if(dd(n,i,t))n=t?e.position.nodeAfter:e.position.nodeBefore;else{if(cd(n.data,i,t))break;e.next()}}return e.position}(i,n):function(e,t,n){const i=e.position.textNode;if(i){const o=i.data;let s=e.position.offset-i.startOffset;for(;lo(o,s)||"character"==t&&co(o,s)||n&&uo(o,s);)e.next(),s=e.position.offset-i.startOffset}return e.position}(i,o,r);if(a==(n?"elementStart":"elementEnd")){if(s.isSelectable(l))return xa._createAt(l,n?"after":"before");if(s.checkChild(c,"$text"))return c}else{if(s.isLimit(l))return void i.skip((()=>!0));if(s.checkChild(c,"$text"))return c}}function ld(e,t){const n=e.root,i=xa._createAt(n,t?"end":0);return t?new Ia(e,i):new Ia(i,e)}function cd(e,t,n){const i=t+(n?0:-1);return rd.includes(e.charAt(i))}function dd(e,t,n){return t===(n?e.offsetSize:0)}class hd extends(J()){constructor(){var e;super(),this.markers=new Hc,this.document=new zc(this),this.schema=new Pl,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),(e=this).document.registerPostFixer((t=>function(e,t){const n=t.document.selection,i=t.schema,o=[];let s=!1;for(const e of n.getRanges()){const t=Al(e,i);t&&!t.isEqual(e)?(o.push(t),s=!0):o.push(e)}return s&&e.setSelection(function(e){const t=[...e],n=new Set;let i=1;for(;i<t.length;){const e=t[i],o=t.slice(0,i);for(const[s,r]of o.entries())if(!n.has(s))if(e.isEqual(r))n.add(s);else if(e.isIntersecting(r)){n.add(s),n.add(i);const o=e.getJoined(r);t.push(o)}i++}return t.filter(((e,t)=>!n.has(t)))}(o),{backward:n.isBackward}),!1}(t,e))),this.document.registerPostFixer(ul),this.on("insertContent",((e,[t,n])=>{e.return=function(e,t,n){return e.change((i=>{const o=n||e.document.selection;o.isCollapsed||e.deleteContent(o,{doNotAutoparagraph:!0});const s=new sd(e,i,o.anchor),r=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[n,i]of t.markers){const{start:t,end:o}=i,s=t.isEqual(o);e.push({position:t,name:n,isCollapsed:s},{position:o,name:n,isCollapsed:s})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:n,name:o,isCollapsed:s}of e){let e=null,a=null;const l=n.parent===t&&n.isAtStart,c=n.parent===t&&n.isAtEnd;l||c?s&&(a=l?"start":"end"):(e=i.createElement("$marker"),i.insert(e,n)),r.push({name:o,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];s.handleNodes(a);let l=s.getSelectionRange();if(t.is("documentFragment")&&r.length){const e=l?$a.fromRange(l):null,t={};for(let e=r.length-1;e>=0;e--){const{name:n,element:o,collapsed:a}=r[e],l=!t[n];if(l&&(t[n]=[]),o){const e=i.createPositionAt(o,"before");t[n].push(e),i.remove(o)}else{const e=s.getAffectedRange();if(!e){a&&t[n].push(s.position);continue}a?t[n].push(e[a]):t[n].push(l?e.start:e.end)}}for(const[e,[n,o]]of Object.entries(t))n&&o&&n.root===o.root&&n.root.document&&!i.model.markers.has(e)&&i.addMarker(e,{usingOperation:!0,affectsData:!0,range:new Ia(n,o)});e&&(l=e.toRange(),e.detach())}l&&(o instanceof Za?i.setSelection(l):o.setTo(l));const c=s.getAffectedRange()||e.createRange(o.anchor);return s.destroy(),c}))}(this,t,n)})),this.on("insertObject",((e,[t,n,i])=>{e.return=function(e,t,n,i={}){if(!e.schema.isObject(t))throw new T("insertobject-element-not-an-object",e,{object:t});const o=n||e.document.selection;let s=o;i.findOptimalPosition&&e.schema.isBlock(t)&&(s=e.createSelection(e.schema.findOptimalInsertionRange(o,i.findOptimalPosition)));const r=io(o.getSelectedBlocks()),a={};return r&&Object.assign(a,e.schema.getAttributesWithProperty(r,"copyOnReplace",!0)),e.change((n=>{s.isCollapsed||e.deleteContent(s,{doNotAutoparagraph:!0});let o=t;const r=s.anchor.parent;!e.schema.checkChild(r,t)&&e.schema.checkChild(r,"paragraph")&&e.schema.checkChild("paragraph",t)&&(o=n.createElement("paragraph"),n.insert(t,o)),e.schema.setAllowedAttributes(o,a,n);const l=e.insertContent(o,s);return l.isCollapsed||i.setSelection&&function(e,t,n,i){const o=e.model;if("on"==n)return void e.setSelection(t,"on");if("after"!=n)throw new T("insertobject-invalid-place-parameter-value",o);let s=t.nextSibling;o.schema.isInline(t)?e.setSelection(t,"after"):(!(s&&o.schema.checkChild(s,"$text"))&&o.schema.checkChild(t.parent,"paragraph")&&(s=e.createElement("paragraph"),o.schema.setAllowedAttributes(s,i,e),o.insertContent(s,e.createPositionAfter(t))),s&&e.setSelection(s,0))}(n,t,i.setSelection,a),l}))}(this,t,n,i)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Dc,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){T.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new Dc):e instanceof Dc||(e=new Dc(e)):e=new Dc,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){T.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,n,...i){const o=ud(t,n);return this.fire("insertContent",[e,o,n,...i])}insertObject(e,t,n,i,...o){const s=ud(t,n);return this.fire("insertObject",[e,s,i,i,...o])}deleteContent(e,t){Qc(this,e,t)}modifySelection(e,t){!function(e,t,n={}){const i=e.schema,o="backward"!=n.direction,s=n.unit?n.unit:"character",r=!!n.treatEmojiAsSingleUnit,a=t.focus,l=new ya({boundaries:ld(a,o),singleCharacters:!0,direction:o?"forward":"backward"}),c={walker:l,schema:i,isForward:o,unit:s,treatEmojiAsSingleUnit:r};let d;for(;d=l.next();){if(d.done)return;const n=ad(c,d.value);if(n)return void(t instanceof Za?e.change((e=>{e.setSelectionFocus(n)})):t.setFocus(n))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const n=e.createDocumentFragment(),i=t.getFirstRange();if(!i||i.isCollapsed)return n;const o=i.start.root,s=i.start.getCommonPath(i.end),r=o.getNodeByPath(s);let a;a=i.start.parent==i.end.parent?i:e.createRange(e.createPositionAt(r,i.start.path[s.length]),e.createPositionAt(r,i.end.path[s.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),n):e.append(e.cloneElement(t,!0),n);if(a!=i){const t=i._getTransformedByMove(a.start,e.createPositionAt(n,0),l)[0],o=e.createRange(e.createPositionAt(n,0),t.start);od(e.createRange(t.end,e.createPositionAt(n,"end")),e),od(o,e)}return n}))}(this,e)}hasContent(e,t={}){const n=e instanceof Ia?e:Ia._createIn(e);if(n.isCollapsed)return!1;const{ignoreWhitespaces:i=!1,ignoreMarkers:o=!1}=t;if(!o)for(const e of this.markers.getMarkersIntersectingRange(n))if(e.affectsData)return!0;for(const e of n.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!i)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=ud(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,n){return new xa(e,t,n)}createPositionAt(e,t){return xa._createAt(e,t)}createPositionAfter(e){return xa._createAfter(e)}createPositionBefore(e){return xa._createBefore(e)}createRange(e,t){return new Ia(e,t)}createRangeIn(e){return Ia._createIn(e)}createRangeOn(e){return Ia._createOn(e)}createSelection(...e){return new Fa(...e)}createBatch(e){return new Dc(e)}createOperationFromJSON(e){return bc.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Uc(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function ud(e,t){if(e)return e instanceof Fa||e instanceof Za?e:e instanceof wa?t||0===t?new Fa(e,t):e.is("rootElement")?new Fa(e,"in"):new Fa(e,"on"):new Fa(e)}class md extends Tr{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class gd extends Tr{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class pd{constructor(e){this.document=e}createDocumentFragment(e){return new js(this.document,e)}createElement(e,t,n){return new ds(this.document,e,t,n)}createText(e){return new Do(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,n){return n._insertChild(e,t)}removeChildren(e,t,n){return n._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const n=e.parent;if(n){const i=n.getChildIndex(e);return this.removeChildren(i,1,n),this.insertChild(i,t,n),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const n=t.getChildIndex(e);this.remove(e),this.insertChild(n,e.getChildren(),t)}}rename(e,t){const n=new ds(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,n)?n:null}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){Be(e)&&void 0===n?t._setStyle(e):n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return ws._createAt(e,t)}createPositionAfter(e){return ws._createAfter(e)}createPositionBefore(e){return ws._createBefore(e)}createRange(e,t){return new _s(e,t)}createRangeOn(e){return _s._createOn(e)}createRangeIn(e){return _s._createIn(e)}createSelection(...e){return new vs(...e)}}new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);class fd{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new T("commandcollection-command-not-found",this,{commandName:e});return n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class bd extends so{constructor(e){super(),this.editor=e}set(e,t,n={}){if("string"==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}const wd="contentEditing",_d="common";class kd{constructor(e){this.keystrokeInfos=new Map,this._editor=e;const t=e.config.get("menuBar.isVisible"),n=e.locale.t;this.addKeystrokeInfoCategory({id:wd,label:n("Content editing keystrokes"),description:n("These keyboard shortcuts allow for quick access to content editing features.")});const i=[{label:n("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:n("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:n("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:n("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:n("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:n("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];t&&i.push({label:n("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:n("User interface and content navigation keystrokes"),description:n("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:i}]})}addKeystrokeInfoCategory({id:e,label:t,description:n,groups:i}){this.keystrokeInfos.set(e,{id:e,label:t,description:n,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:e,id:_d}),i&&i.forEach((t=>{this.addKeystrokeInfoGroup({categoryId:e,...t})}))}addKeystrokeInfoGroup({categoryId:e=wd,id:t,label:n,keystrokes:i}){const o=this.keystrokeInfos.get(e);if(!o)throw new T("accessibility-unknown-keystroke-info-category",this._editor,{groupId:t,categoryId:e});o.groups.set(t,{id:t,label:n,keystrokes:i||[]})}addKeystrokeInfos({categoryId:e=wd,groupId:t=_d,keystrokes:n}){if(!this.keystrokeInfos.has(e))throw new T("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:e,keystrokes:n});const i=this.keystrokeInfos.get(e);if(!i.groups.has(t))throw new T("accessibility-unknown-keystroke-info-group",this._editor,{groupId:t,categoryId:e,keystrokes:n});i.groups.get(t).keystrokes.push(...n)}}class vd extends(J()){constructor(e={}){super();const t=this.constructor,{translations:n,...i}=t.defaultConfig||{},{translations:o=n,...s}=e,r=e.language||i.language;this._context=e.context||new wo({language:r,translations:o}),this._context._addEditor(this,!e.context);const a=Array.from(t.builtinPlugins||[]);this.config=new jn(s,i),this.config.define("plugins",a),this.config.define(this._context._getEditorConfig()),this.plugins=new bo(this,a,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new fd,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new hd,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const l=new as;this.data=new Kl(this.model,l),this.editing=new xl(this.model,l),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Gl([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new bd(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new kd(this)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new T("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new T("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new T("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(e){this.data.set(e)}getData(e){return this.data.get(e)}initPlugins(){const e=this.config,t=e.get("plugins"),n=e.get("removePlugins")||[],i=e.get("extraPlugins")||[],o=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(i),n,o)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){T.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}function Ad(e){if(!Me(e.updateSourceElement))throw new T("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let n;const i=t.form,o=()=>e.updateSourceElement();Me(i.submit)&&(n=i.submit,i.submit=()=>{o(),n.apply(i)}),i.addEventListener("submit",o),e.on("destroy",(()=>{i.removeEventListener("submit",o),n&&(i.submit=n)}))}}function yd(e){return class extends e{updateSourceElement(e){if(!this.sourceElement)throw new T("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),n=this.sourceElement instanceof HTMLTextAreaElement;if(!t&&!n)return void hi(this.sourceElement,"");const i="string"==typeof e?e:this.data.get();hi(this.sourceElement,i)}}}yd.updateSourceElement=yd(Object).prototype.updateSourceElement;class Cd extends _o{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new no({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new T("pendingactions-add-invalid-message",this);const t=new(J());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const xd={bold:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',cancel:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',colorPalette:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 8.665 8.665 0 0 1-.372.008Zm-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414ZM9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Zm4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',history:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1z"/><path d="M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052z"/><path d="M11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1l4.16-4.482ZM17.8 1c.652 0 1.2.47 1.2 1.1v14.362c0 .64-.532 1.038-1.184 1.038H2.184C1.532 17.5 1 17.103 1 16.462V2.1C1 1.47 1.537 1 2.2 1h15.6Zm-5.655 6a2.128 2.128 0 0 1 .157-2.364A2.133 2.133 0 1 1 12.145 7Z"/></svg>',imageUpload:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a2.97 2.97 0 0 1-.414-.287 2.998 2.998 0 0 1-1.055-2.03 3.003 3.003 0 0 1 .693-2.185l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L1.5 13.6V2.5h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.134 2.134 0 0 0-1.875-.978Z"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.784.784 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79Z"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.784.784 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79Z"/></svg>',imageAssetManager:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1c-.662 0-1.2.47-1.2 1.1v14.248c0 .64.533 1.152 1.185 1.152h6.623v-7.236L6.617 9.15a.694.694 0 0 0-.957-.033L1.602 13.55V2.553l14.798.003V9.7H18V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.723 2.805a2.094 2.094 0 0 0-1.621.832 2.127 2.127 0 0 0 1.136 3.357 2.13 2.13 0 0 0 2.611-1.506 2.133 2.133 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.366-.44Z"/><path clip-rule="evenodd" d="M19.898 12.369v6.187a.844.844 0 0 1-.844.844h-8.719a.844.844 0 0 1-.843-.844v-7.312a.844.844 0 0 1 .843-.844h2.531a.843.843 0 0 1 .597.248l.838.852h4.75c.223 0 .441.114.6.272a.844.844 0 0 1 .247.597Zm-1.52.654-4.377.02-1.1-1.143H11v6h7.4l-.023-4.877Z"/></svg>',imageUrl:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h7.029a5.401 5.401 0 0 1 .615-4.338l.762-1.232-2.975-2.78a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v6.023c.449.131.887.32 1.307.573l.058.033c.046.028.09.057.135.086V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.15 2.15 0 0 0-1.611.834 2.118 2.118 0 0 0-.438 1.158 2.14 2.14 0 0 0 1.277 2.096 2.132 2.132 0 0 0 2.645-3.11 2.13 2.13 0 0 0-1.873-.978Z"/><path d="M16.63 10.294a3.003 3.003 0 0 0-4.142.887l-.117.177a.647.647 0 0 0-.096.492.664.664 0 0 0 .278.418.7.7 0 0 0 .944-.234 1.741 1.741 0 0 1 2.478-.463 1.869 1.869 0 0 1 .476 2.55.637.637 0 0 0-.071.5.646.646 0 0 0 .309.396.627.627 0 0 0 .869-.19l.027-.041a3.226 3.226 0 0 0-.956-4.492Zm-6.061 3.78-.044.066a3.228 3.228 0 0 0 .82 4.403 3.005 3.005 0 0 0 4.275-.798l.13-.197a.626.626 0 0 0 .092-.475.638.638 0 0 0-.268-.402.713.713 0 0 0-.99.26l-.018.029a1.741 1.741 0 0 1-2.477.461 1.87 1.87 0 0 1-.475-2.55l.029-.047a.647.647 0 0 0 .086-.485.66.66 0 0 0-.275-.408l-.04-.027a.609.609 0 0 0-.845.17Z"/><path d="M15.312 13.925c.24-.36.154-.838-.19-1.067-.346-.23-.82-.124-1.059.236l-1.268 1.907c-.239.36-.153.838.192 1.067.345.23.818.123 1.057-.236l1.268-1.907Z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',textAlternative:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1H3.035Zm10.453 2.61a1.885 1.885 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.903 1.903 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598ZM7.463 8.163a.611.611 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.628.628 0 0 0-.417-.185Zm6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.618.618 0 0 0-.42-.165ZM.91 11.5a.91.91 0 0 0-.91.912v6.877c0 .505.405.91.91.91h18.178a.91.91 0 0 0 .912-.91v-6.877a.908.908 0 0 0-.912-.912H.91ZM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516L3.668 13Zm4.947 0h1.801v4.3h2.7v1.4h-4.5V13h-.001Zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9V13h-.001Zm-8.517 1.457-.614 2.059h1.262l-.648-2.059Z"/></svg>',loupe:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.68 13.74h-.001l4.209 4.208a1 1 0 1 0 1.414-1.414l-4.267-4.268a6 6 0 1 0-1.355 1.474ZM13 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/></svg>',previousArrow:'<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>',nextArrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>',importExport:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></svg>',paragraph:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>',plus:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1Z"/></svg>',text:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M13 5.5H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2ZM13 7a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-8A.5.5 0 0 1 2 7h11Z"/></svg>',objectSizeSmall:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M7 9.5H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2ZM7 11a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4A.5.5 0 0 1 2 11h5Z"/></svg>',objectSizeMedium:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M10 7.5H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2ZM10 9a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6A.5.5 0 0 1 2 9h8Z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>',dragIndicator:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/></svg>',redo:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>',undo:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',bulletedList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>',numberedList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',todoList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2.315 14.705 2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',codeBlock:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174zm2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207zM16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14zM5.009 15l.003 1H3v-1h2.009zm2.188-2-1.471 1H5v-1h2.197zM10 11v.095L8.668 12H7v-1h3zm4-2v1H7V9h7zm0-2v1H7V7h7zm-4-2v1H5V5h5zM6 3v1H3V3h3z"/></svg>',browseFiles:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',heading1:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 9v10h-2v-8h-2V9h4zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v4.5z"/></svg>',heading2:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm16.076 8.343V18.5h-6.252c.067-.626.27-1.22.61-1.78.338-.561 1.006-1.305 2.005-2.232.804-.749 1.297-1.257 1.479-1.523.245-.368.368-.732.368-1.092 0-.398-.107-.703-.32-.917-.214-.214-.51-.32-.886-.32-.372 0-.669.111-.889.336-.22.224-.347.596-.38 1.117l-1.778-.178c.106-.982.438-1.686.997-2.114.558-.427 1.257-.64 2.095-.64.918 0 1.64.247 2.164.742.525.495.787 1.11.787 1.847 0 .419-.075.818-.225 1.197-.15.378-.388.775-.714 1.19-.216.275-.605.67-1.168 1.187-.563.516-.92.859-1.07 1.028a3.11 3.11 0 0 0-.365.495h3.542z"/></svg>',heading3:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm9.989 7.53 1.726-.209c.055.44.203.777.445 1.01.24.232.533.349.876.349.368 0 .678-.14.93-.42.251-.279.377-.655.377-1.13 0-.448-.12-.803-.362-1.066a1.153 1.153 0 0 0-.882-.393c-.228 0-.501.044-.819.133l.197-1.453c.482.012.85-.092 1.105-.315.253-.222.38-.517.38-.885 0-.313-.093-.563-.279-.75-.186-.185-.434-.278-.743-.278a1.07 1.07 0 0 0-.78.317c-.216.212-.347.52-.394.927l-1.644-.28c.114-.562.287-1.012.517-1.348.231-.337.553-.601.965-.794a3.24 3.24 0 0 1 1.387-.289c.876 0 1.579.28 2.108.838.436.457.653.973.653 1.549 0 .817-.446 1.468-1.339 1.955.533.114.96.37 1.28.768.319.398.478.878.478 1.441 0 .817-.298 1.513-.895 2.088-.596.576-1.339.864-2.228.864-.842 0-1.54-.243-2.094-.727-.555-.485-.876-1.118-.965-1.901z"/></svg>',heading4:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5H17.05zm0-3.44v-3.18l-2.14 3.18h2.14z"/></svg>',heading5:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm9.578 7.607 1.777-.184c.05.402.201.72.45.955a1.223 1.223 0 0 0 1.81-.101c.258-.303.387-.759.387-1.368 0-.572-.128-1-.384-1.286-.256-.285-.59-.428-1-.428-.512 0-.971.226-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.697 2.697 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863c.55.576.825 1.323.825 2.241a3.36 3.36 0 0 1-.666 2.05c-.605.821-1.445 1.232-2.52 1.232-.86 0-1.56-.23-2.101-.692-.542-.461-.866-1.081-.971-1.86z"/></svg>',heading6:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm15.595 2.973-1.726.19c-.043-.355-.153-.617-.33-.787-.178-.169-.409-.253-.692-.253-.377 0-.695.169-.956.507-.26.339-.424 1.043-.492 2.114.445-.525.997-.787 1.657-.787.745 0 1.383.284 1.914.85.531.568.797 1.3.797 2.197 0 .952-.28 1.716-.838 2.291-.559.576-1.276.864-2.152.864-.94 0-1.712-.365-2.317-1.095-.605-.73-.908-1.927-.908-3.59 0-1.705.316-2.935.946-3.688.63-.753 1.45-1.13 2.457-1.13.706 0 1.291.198 1.755.594.463.395.758.97.885 1.723zm-4.043 3.891c0 .58.133 1.028.4 1.343.266.315.57.473.914.473.33 0 .605-.13.825-.388.22-.258.33-.68.33-1.27 0-.604-.118-1.047-.355-1.329a1.115 1.115 0 0 0-.89-.422c-.342 0-.632.134-.869.403s-.355.666-.355 1.19z"/></svg>',horizontalLine:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 9h16v2H2z"/></svg>',html:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M17 0a2 2 0 0 1 2 2v7a1 1 0 0 1 1 1v5a1 1 0 0 1-.883.993l-.118.006L19 17a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2l-.001-1.001-.116-.006A1 1 0 0 1 0 15v-5a1 1 0 0 1 .999-1L1 2a2 2 0 0 1 2-2h14zm.499 15.999h-15L2.5 17a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5l-.001-1.001zm-3.478-6.013-.014.014H14v.007l-1.525 1.525-1.46-1.46-.015.013V10h-1v5h1v-3.53l1.428 1.43.048.043.131-.129L14 11.421V15h1v-5h-.965l-.014-.014zM2 10H1v5h1v-2h2v2h1v-5H4v2H2v-2zm7 0H6v1h1v4h1v-4h1v-1zm8 0h-1v5h3v-1h-2v-4zm0-8.5H3a.5.5 0 0 0-.5.5l-.001 6.999h15L17.5 2a.5.5 0 0 0-.5-.5zM10 7v1H4V7h6zm3-2v1H4V5h9zm-3-2v1H4V3h6z"/></svg>',indent:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',outdent:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>',table:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5.5v3h4v-3H3Zm0 4v3h4v-3H3Zm0 4v3h4v-3H3Zm5 3h4v-3H8v3Zm5 0h4v-3h-4v3Zm4-4v-3h-4v3h4Zm0-4v-3h-4v3h4Zm1.5 8A1.5 1.5 0 0 1 17 18H3a1.5 1.5 0 0 1-1.5-1.5V3c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13.5Zm-6.5-4v-3H8v3h4Zm0-4v-3H8v3h4Z"/></svg>'};class Ed extends po{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document.selection,i=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(n.isCollapsed)i?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of o)i?e.setAttribute(this.attributeKey,i,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const Td="bold";class Bd extends mo{static get pluginName(){return"BoldEditing"}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Td}),e.model.schema.setAttributeProperties(Td,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Td,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(Td,new Ed(e,Td)),e.keystrokes.set("CTRL+B",Td),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Bold text"),keystroke:"CTRL+B"}]})}}function Pd({emitter:e,activator:t,callback:n,contextElements:i}){e.listenTo(document,"mousedown",((e,o)=>{if(!t())return;const s="function"==typeof o.composedPath?o.composedPath():[],r="function"==typeof i?i():i;for(const e of r)if(e.contains(o.target)||s.includes(e))return;n()}))}function Sd(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function Id({view:e}){e.listenTo(e.element,"submit",((t,n)=>{n.preventDefault(),e.fire("submit")}),{useCapture:!0})}class Dd extends no{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,n)=>{this._renderViewIntoCollectionParent(t,n)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new T("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const n of this)for(const i of e)n.delegate(i).to(t);this.on("add",((n,i)=>{for(const n of e)i.delegate(n).to(t)})),this.on("remove",((n,i)=>{for(const n of e)i.stopDelegating(n,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}class Od extends(R()){constructor(e){super(),Object.assign(this,qd(Hd(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new T("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const n of t.children)Zd(n)?yield n:Jd(n)&&(yield*e(n))}(this)}static bind(e,t){return{to(n,i){return new Rd({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:i})},if(n,i,o){return new Vd({observable:e,emitter:t,attribute:n,valueIfTrue:i,callback:o})}}}static extend(e,t){if(e._isRendered)throw new T("template-extend-render",[this,e]);Kd(e,qd(Hd(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new T("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),Nd(this.text)?this._bindToObservable({schema:this.text,updater:Ld(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,n=e.revertData;for(const i in this.attributes){const o=t.getAttribute(i),s=this.attributes[i];n&&(n.attributes[i]=o);const r=Qd(s)?s[0].ns:null;if(Nd(s)){const a=Qd(s)?s[0].value:s;n&&Xd(i)&&a.unshift(o),this._bindToObservable({schema:a,updater:zd(t,i,r),data:e})}else if("style"==i&&"string"!=typeof s[0])this._renderStyleAttribute(s[0],e);else{n&&o&&Xd(i)&&s.unshift(o);const e=s.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce($d,"");Gd(e)||t.setAttributeNS(r,i,e)}}}_renderStyleAttribute(e,t){const n=t.node;for(const i in e){const o=e[i];Nd(o)?this._bindToObservable({schema:[o],updater:jd(n,i),data:t}):n.style[i]=o}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,i=e.isApplying;let o=0;for(const s of this.children)if(Yd(s)){if(!i){s.setParent(t);for(const e of s)n.appendChild(e.element)}}else if(Zd(s))i||(s.isRendered||s.render(),n.appendChild(s.element));else if(Wn(s))n.appendChild(s);else if(i){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),s._renderNode({intoFragment:!1,node:n.childNodes[o++],isApplying:!0,revertData:t})}else n.appendChild(s.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map((n=>{const[i,o]=t.split("@");return n.activateDomEventListener(i,o,e)}));e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const i=n.revertData;Fd(e,t,n);const o=e.filter((e=>!Gd(e))).filter((e=>e.observable)).map((i=>i.activateAttributeListener(e,t,n)));i&&i.bindings.push(o)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const n=e;for(const e in t.attributes){const i=t.attributes[e];null===i?n.removeAttribute(e):n.setAttribute(e,i)}for(let e=0;e<t.children.length;++e)this._revertTemplateFromNode(n.childNodes[e],t.children[e])}}class Md{constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,n){const i=()=>Fd(e,t,n);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,i),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,i)}}}class Rd extends Md{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,n){const i=(e,n)=>{t&&!n.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,i),()=>{this.emitter.stopListening(n.node,e,i)}}}class Vd extends Md{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!Gd(super.getValue(e))&&(this.valueIfTrue||!0)}}function Nd(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(Nd):e instanceof Md)}function Fd(e,t,{node:n}){const i=function(e,t){return e.map((e=>e instanceof Md?e.getValue(t):e))}(e,n);let o;o=1==e.length&&e[0]instanceof Vd?i[0]:i.reduce($d,""),Gd(o)?t.remove():t.set(o)}function Ld(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function zd(e,t,n){return{set(i){e.setAttributeNS(n,t,i)},remove(){e.removeAttributeNS(n,t)}}}function jd(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function Hd(e){return Ln(e,(e=>{if(e&&(e instanceof Md||Jd(e)||Zd(e)||Yd(e)))return e}))}function qd(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=Li(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Wd(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=Li(e[t].value)),Wd(e,t)}(e.attributes);const t=[];if(e.children)if(Yd(e.children))t.push(e.children);else for(const n of e.children)Jd(n)||Zd(n)||Wn(n)?t.push(n):t.push(new Od(n));e.children=t}return e}function Wd(e,t){e[t]=Li(e[t])}function $d(e,t){return Gd(t)?e:Gd(e)?t:`${e} ${t}`}function Ud(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function Kd(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),Ud(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),Ud(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new T("ui-template-extend-children-mismatch",e);let n=0;for(const i of t.children)Kd(e.children[n++],i)}}function Gd(e){return!e&&0!==e}function Zd(e){return e instanceof th}function Jd(e){return e instanceof Od}function Yd(e){return e instanceof Dd}function Qd(e){return q(e[0])&&e[0].ns}function Xd(e){return"class"==e||"style"==e}var eh=o(4791);vo()(eh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),eh.A.locals;class th extends(Kn(J())){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new no,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,n)=>{n.locale=e,n.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Od.bind(this,this)}createCollection(e){const t=new Dd(e);return this._viewCollections.add(t),t}registerChild(e){se(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){se(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Od(e)}extendTemplate(e){Od.extend(this.template,e)}render(){if(this.isRendered)throw new T("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}var nh=o(4068);vo()(nh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),nh.A.locals;class ih extends th{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${y()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class oh extends th{constructor(e,t){super(e);const n=e.t,i=new ih;i.text=n("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":i.id,role:"document",tabindex:-1},children:[ke(document,"p",{},n("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(t.values())),i]})}focus(){this.element.focus()}_createCategories(e){return e.map((e=>{const t=[ke(document,"h3",{},e.label),...Array.from(e.groups.values()).map((e=>this._createGroup(e))).flat()];return e.description&&t.splice(1,0,ke(document,"p",{},e.description)),ke(document,"section",{},t)}))}_createGroup(e){const t=e.keystrokes.sort(((e,t)=>e.label.localeCompare(t.label))).map((e=>this._createGroupRow(e))).flat(),n=[ke(document,"dl",{},t)];return e.label&&n.unshift(ke(document,"h4",{},e.label)),n}_createGroupRow(e){const t=this.locale.t,n=ke(document,"dt"),i=ke(document,"dd"),o="string"==typeof(r=e.keystroke)?[[r]]:"string"==typeof r[0]?[r]:r,s=[];var r;for(const e of o)s.push(e.map(sh).join(""));return n.innerHTML=e.label,i.innerHTML=s.join(", ")+(e.mayRequireFn&&p.isMac?` ${t("(may require <kbd>Fn</kbd>)")}`:""),[n,i]}}function sh(e){return Ni(e).split("+").map((e=>`<kbd>${e}</kbd>`)).join("+")}var rh='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/><path d="M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103V9.125Z"/><path clip-rule="evenodd" d="M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17Zm0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10Z"/></svg>',ah=o(3100);vo()(ah.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ah.A.locals;class lh extends mo{constructor(){super(...arguments),this.contentView=null}static get requires(){return[Bu]}static get pluginName(){return"AccessibilityHelp"}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",(()=>{const e=this._createButton(ph);return e.set({tooltip:!0,withText:!1,label:t("Accessibility help")}),e})),e.ui.componentFactory.add("menuBar:accessibilityHelp",(()=>{const e=this._createButton(Xm);return e.label=t("Accessibility"),e})),e.keystrokes.set("Alt+0",((e,t)=>{this._showDialog(),t()})),this._setupRootLabels()}_createButton(e){const t=new e(this.editor.locale);return t.set({keystroke:"Alt+0",icon:rh}),t.on("execute",(()=>this._showDialog())),t}_setupRootLabels(){const e=this.editor,t=e.editing.view,n=e.t;function i(e,t){const i=`${t.getAttribute("aria-label")}. ${n("Press %0 for help.",[Ni("Alt+0")])}`;e.setAttribute("aria-label",i,t)}e.ui.on("ready",(()=>{t.change((e=>{for(const n of t.document.roots)i(e,n)})),e.on("addRoot",((n,o)=>{const s=e.editing.view.document.getRoot(o.rootName);t.change((e=>i(e,s)))}),{priority:"low"})}))}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),n=e.locale.t;this.contentView||(this.contentView=new oh(e.locale,e.accessibility.keystrokeInfos)),t.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:n("Accessibility help"),icon:rh,hasCloseButton:!0,content:this.contentView})}}class ch extends Dd{constructor(e,t=[]){super(t),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new Od({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=ke(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var dh=o(3992);vo()(dh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),dh.A.locals;class hh extends th{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",e.if("isVisible","ck-hidden",(e=>!e)),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:n}of Array.from(e.attributes))hh.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,n);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}hh.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];var uh=hh;class mh extends th{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}var gh=o(5738);vo()(gh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),gh.A.locals;class ph extends th{constructor(e,t=new mh){super(e),this._focusDelayed=null;const n=this.bindTemplate,i=y();this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${i}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new uh,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const o={tag:"button",attributes:{class:["ck","ck-button",n.to("class"),n.if("isEnabled","ck-disabled",(e=>!e)),n.if("isVisible","ck-hidden",(e=>!e)),n.to("isOn",(e=>e?"ck-on":"ck-off")),n.if("withText","ck-button_with-text"),n.if("withKeystroke","ck-button_with-keystroke")],role:n.to("role"),type:n.to("type",(e=>e||"button")),tabindex:n.to("tabindex"),"aria-checked":n.to("ariaChecked"),"aria-label":n.to("ariaLabel"),"aria-labelledby":n.to("ariaLabelledBy"),"aria-disabled":n.if("isEnabled",!0,(e=>!e)),"aria-pressed":n.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":n.to("_tooltipString"),"data-cke-tooltip-position":n.to("tooltipPosition")},children:this.children,on:{click:n.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};p.isSafari&&(this._focusDelayed||(this._focusDelayed=ao((()=>this.focus()),0)),o.on.mousedown=n.to((()=>{this._focusDelayed()})),o.on.mouseup=n.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(o)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new th;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>Ni(e)))}]}),e}_getTooltipString(e,t,n){return e?"string"==typeof e?e:(n&&(n=Ni(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:""}`):""}}var fh=o(2954);vo()(fh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),fh.A.locals;class bh extends ph{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new th;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class wh extends ph{constructor(e){super(e),this.buttonView=this,this._fileInputView=new _h(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",(()=>{this._fileInputView.open()})),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}class _h extends th{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}var kh='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>',vh=o(172);vo()(vh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),vh.A.locals;class Ah extends th{constructor(e,t){super(e);const n=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",n.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:n.if("isCollapsed","hidden"),"aria-labelledby":n.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new ph(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:kh}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",(e=>!e)),e.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),e}}var yh=o(9040);vo()(yh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),yh.A.locals,o(6931),o(9047);var Ch=o(83);vo()(Ch.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ch.A.locals;class xh extends th{constructor(e,t){super(e);const n=`ck-labeled-field-view-${y()}`,i=`ck-labeled-field-view-status-${y()}`;this.fieldView=t(this,n,i),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(i),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",o.to("class"),o.if("isEnabled","ck-disabled",(e=>!e)),o.if("isEmpty","ck-labeled-field-view_empty"),o.if("isFocused","ck-labeled-field-view_focused"),o.if("placeholder","ck-labeled-field-view_placeholder"),o.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new ih(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new th(this.locale),n=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",(e=>!e))],id:e,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class Eh extends th{constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new oo,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),tabindex:t.to("tabIndex"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById"),"aria-label":t.to("ariaLabel")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,n)=>{this._setDomElementValue(n),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}var Th=o(2400);vo()(Th.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Th.A.locals;class Bh extends Eh{constructor(e){super(e),this.set("inputMode","text");const t=this.bindTemplate;this.extendTemplate({attributes:{inputmode:t.to("inputMode")}})}}class Ph extends Bh{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}var Sh=o(2062);vo()(Sh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Sh.A.locals;class Ih extends th{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():B("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var Dh=o(8456);vo()(Dh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Dh.A.locals;class Oh extends th{constructor(e,t,n){super(e);const i=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new so,this.focusTracker=new oo,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e))],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[t,n]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":i.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.on("change:isOpen",((e,t,n)=>{if(n)if("auto"===this.panelPosition){const e=Oh._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=e?e.name:this._panelPositions[0].name}else this.panelView.position=this.panelPosition})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:n,southWest:i,northEast:o,northWest:s,southMiddleEast:r,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=Oh.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,i,r,a,e,o,s,l,c,t]:[i,n,a,r,e,s,o,c,l,t]}}Oh.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},Oh._getOptimalPosition=bi;var Mh=Oh;class Rh extends ph{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new uh;return e.content=kh,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class Vh extends(R()){constructor(e){if(super(),this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];"string"==typeof n&&(n=[n]);for(const i of n)e.keystrokeHandler.set(i,((e,n)=>{this[t](),n()}))}this.on("forwardCycle",(()=>this.focusFirst()),{priority:"low"}),this.on("backwardCycle",(()=>this.focusLast()),{priority:"low"})}get first(){return this.focusables.find(Nh)||null}get last(){return this.focusables.filter(Nh).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,n)=>{const i=t.element===this.focusTracker.focusedElement;return i&&(e=n),i})),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;e&&this.focusables.getIndex(e)===this.current||e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;e&&this.focusables.getIndex(e)===this.current||e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}_focus(e,t){e&&this.focusTracker.focusedElement!==e.element&&e.focus(t)}_getDomFocusableItem(e){const t=this.focusables.length;if(!t)return null;const n=this.current;if(null===n)return this[1===e?"first":"last"];let i=this.focusables.get(n),o=(n+t+e)%t;do{const n=this.focusables.get(o);if(Nh(n)){i=n;break}o=(o+t+e)%t}while(o!==n);return i}}function Nh(e){return Fh(e)&&fi(e.element)}function Fh(e){return!(!("focus"in e)||"function"!=typeof e.focus)}class Lh extends th{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class zh extends th{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function jh(e){if(Array.isArray(e))return{items:e,removeItems:[]};const t={items:[],removeItems:[]};return e?{...t,...e}:t}var Hh=o(7520);vo()(Hh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Hh.A.locals;const{threeVerticalDots:qh}=xd,Wh={alignLeft:xd.alignLeft,bold:xd.bold,importExport:xd.importExport,paragraph:xd.paragraph,plus:xd.plus,text:xd.text,threeVerticalDots:xd.threeVerticalDots,pilcrow:xd.pilcrow,dragIndicator:xd.dragIndicator};class $h extends th{constructor(e,t){super(e);const n=this.bindTemplate,i=this.t;this.options=t||{},this.set("ariaLabel",i("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new oo,this.keystrokes=new so,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Uh(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const o="rtl"===e.uiLanguageDirection;this._focusCycler=new Vh({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[o?"arrowright":"arrowleft","arrowup"],focusNext:[o?"arrowleft":"arrowright","arrowdown"]}});const s=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact")];var r;this.options.shouldGroupWhenFull&&this.options.isFloating&&s.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:s,role:"toolbar","aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(r=this,r.bindTemplate.to((e=>{e.target===r.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new Gh(this):new Kh(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,n){this.items.addMany(this._buildItemsFromConfig(e,t,n))}_buildItemsFromConfig(e,t,n){const i=jh(e),o=n||i.removeItems;return this._cleanItemsConfiguration(i.items,t,o).map((e=>q(e)?this._createNestedToolbarDropdown(e,t,o):"|"===e?new Lh:"-"===e?new zh:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,n){const i=e.filter(((e,i,o)=>"|"===e||-1===n.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(B("toolbarview-line-break-ignored-when-grouping-items",o),!1):!(!q(e)&&!t.has(e)&&(B("toolbarview-item-unavailable",{item:e}),1)))));return this._cleanSeparatorsAndLineBreaks(i)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,n=e.length,i=e.findIndex(t);if(-1===i)return[];const o=n-e.slice().reverse().findIndex(t);return e.slice(i,o).filter(((e,n,i)=>!!t(e)||!(n>0&&i[n-1]===e)))}_createNestedToolbarDropdown(e,t,n){let{label:i,icon:o,items:s,tooltip:r=!0,withText:a=!1}=e;if(s=this._cleanItemsConfiguration(s,t,n),!s.length)return null;const l=ou(this.locale);return i||B("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:i,tooltip:r,withText:!!a}),!1!==o?l.buttonView.icon=Wh[o]||o||qh:l.buttonView.withText=!0,su(l,(()=>l.toolbarView._buildItemsFromConfig(s,t,n))),l}}class Uh extends th{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Kh{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>Fh(e)?e:null)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Gh{constructor(e){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),e.children.on("change",this._updateFocusCyclableItems.bind(this)),e.items.on("change",((e,t)=>{const n=t.index,i=Array.from(t.added);for(const e of t.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=n;e<n+i.length;e++){const t=i[e-n];e>this.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!fi(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,n=new oi(e.lastChild),i=new oi(e);if(!this.cachedPadding){const n=Yn.window.getComputedStyle(e),i="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[i])}return"ltr"===t?n.right>i.right-this.cachedPadding:n.left<i.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new di(this.viewElement,(t=>{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Lh),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,n=ou(e);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",su(n,this.groupedItems),n.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:qh}),n}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{Fh(e)&&this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class Zh extends th{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class Jh extends th{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class Yh extends th{constructor(e,t=new ih){super(e);const n=this.bindTemplate,i=new Xh(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,i]),i.set({role:"group",ariaLabelledBy:t.id}),i.focusTracker.destroy(),i.keystrokes.destroy(),this.items=i.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",n.if("isVisible","ck-hidden",(e=>!e))]},children:this.children})}focus(){if(this.items){const e=this.items.find((e=>!(e instanceof Jh)));e&&e.focus()}}}var Qh=o(2982);vo()(Qh.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Qh.A.locals;class Xh extends th{constructor(e){super(e),this._listItemGroupToChangeListeners=new WeakMap;const t=this.bindTemplate;this.focusables=new Dd,this.items=this.createCollection(),this.focusTracker=new oo,this.keystrokes=new so,this._focusCycler=new Vh({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof Yh?this._registerFocusableItemsGroup(e):e instanceof Zh&&this._registerFocusableListItem(e);this.items.on("change",((e,t)=>{for(const e of t.removed)e instanceof Yh?this._deregisterFocusableItemsGroup(e):e instanceof Zh&&this._deregisterFocusableListItem(e);for(const e of Array.from(t.added).reverse())e instanceof Yh?this._registerFocusableItemsGroup(e,t.index):this._registerFocusableListItem(e,t.index)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,n)=>{for(const e of n.removed)this._deregisterFocusableListItem(e);for(const t of Array.from(n.added).reverse())this._registerFocusableListItem(t,this.items.getIndex(e)+n.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach(((e,n)=>{const i=void 0!==t?t+n:void 0;this._registerFocusableListItem(e,i)}));const n=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,n),e.items.on("change",n)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}var eu=o(3307);vo()(eu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),eu.A.locals;class tu extends th{constructor(e,t){super(e);const n=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new so,this.focusTracker=new oo,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",n.to("class"),n.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new ph;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new ph,t=e.bindTemplate;return e.icon=kh,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var nu=o(1837),iu=(vo()(nu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),nu.A.locals,o(8976));function ou(e,t=Rh){const n="function"==typeof t?new t(e):t,i=new Ih(e),o=new Mh(e,n,i);return n.bind("isEnabled").to(o),n instanceof tu?n.arrowView.bind("isOn").to(o,"isOpen"):n.bind("isOn").to(o,"isOpen"),function(e){(function(e){e.on("render",(()=>{Pd({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:()=>[e.element,...e.focusTracker._elements]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof bh||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,n,i)=>{e.isOpen&&!i&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,n)=>{e.isOpen&&(e.panelView.focus(),n())})),e.keystrokes.set("arrowup",((t,n)=>{e.isOpen&&(e.panelView.focusLast(),n())}))}(e),function(e){e.on("change:isOpen",((t,n,i)=>{if(i)return;const o=e.panelView.element;o&&o.contains(Yn.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,n,i)=>{i&&e.panelView.focus()}),{priority:"low"})}(e)}(o),o}function su(e,t,n={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?ru(e,t,n):e.once("change:isOpen",(()=>ru(e,t,n)),{priority:"highest"}),n.enableActiveItemFocusOnDropdownOpen&&lu(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function ru(e,t,n){const i=e.locale,o=i.t,s=e.toolbarView=new $h(i),r="function"==typeof t?t():t;s.ariaLabel=n.ariaLabel||o("Dropdown toolbar"),n.maxWidth&&(s.maxWidth=n.maxWidth),n.class&&(s.class=n.class),n.isCompact&&(s.isCompact=n.isCompact),n.isVertical&&(s.isVertical=!0),r instanceof Dd?s.items.bindTo(r).using((e=>e)):s.items.addMany(r),e.panelView.children.add(s),s.items.delegate("execute").to(e)}function au(e,t,n){const i=e.locale,o=e.listView=new Xh(i),s="function"==typeof t?t():t;o.ariaLabel=n.ariaLabel,o.role=n.role,cu(e,o.items,s,i),e.panelView.children.add(o),o.items.delegate("execute").to(e)}function lu(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const n=t();n&&("function"==typeof n.focus?n.focus():B("ui-dropdown-focus-child-on-open-child-missing-focus",{view:n}))}),{priority:C.low-10})}function cu(e,t,n,i){t.bindTo(n).using((t=>{if("separator"===t.type)return new Jh(i);if("group"===t.type){const n=new Yh(i);return n.set({label:t.label}),cu(e,n.items,t.items,i),n.items.delegate("execute").to(e),n}if("button"===t.type||"switchbutton"===t.type){const e=new Zh(i);let n;return"button"===t.type?(n=new ph(i),n.bind("ariaChecked").to(n,"isOn")):n=new bh(i),n.bind(...Object.keys(t.model)).to(t.model),n.delegate("execute").to(e),e.children.add(n),e}return null}))}vo()(iu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),iu.A.locals;const du=(e,t,n)=>{const i=new Ph(e.locale);return i.set({id:t,ariaDescribedById:n}),i.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),i.bind("hasError").to(e,"errorText",(e=>!!e)),i.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(i),i};Math.PI;Symbol("same"),Symbol("color"),Symbol("hsva"),Symbol("update"),Symbol("parts"),Symbol("css"),Symbol("sliders");HTMLElement;var hu=o(5348);vo()(hu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hu.A.locals,J(no);const{eraser:uu,colorPalette:mu}=xd;var gu=o(5616);vo()(gu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),gu.A.locals;class pu{constructor(e){this._components=new Map,this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(fu(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new T("componentfactory-item-missing",this,{name:e});return this._components.get(fu(e)).callback(this.editor.locale)}has(e){return this._components.has(fu(e))}}function fu(e){return String(e).toLowerCase()}var bu=o(8496);vo()(bu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),bu.A.locals;class wu extends th{constructor(e,t={}){super(e);const n=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",n.to("class")]},children:this.children}),t.icon&&(this.iconView=new uh,this.iconView.content=t.icon,this.children.add(this.iconView));const i=new th(e);i.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:n.to("label")}]}),this.children.add(i)}}var _u=o(5101);vo()(_u.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),_u.A.locals;class ku extends th{constructor(e){super(e),this.children=this.createCollection(),this.keystrokes=new so,this._focusTracker=new oo,this._focusables=new Dd,this.focusCycler=new Vh({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const t of e){const e=new ph(this.locale);let n;for(n in e.on("execute",(()=>t.onExecute())),t.onCreate&&t.onCreate(e),t)"onExecute"!=n&&"onCreate"!=n&&e.set(n,t[n]);this.children.add(e)}this._updateFocusCyclableItems()}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach((e=>{this._focusables.add(e),this._focusTracker.add(e.element)}))}}class vu extends th{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}var Au=o(3502);vo()(Au.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Au.A.locals;const yu="screen-center",Cu="editor-center",xu=ui("px");class Eu extends(function(e){return class extends e{constructor(...e){super(...e),this._onDragBound=this._onDrag.bind(this),this._onDragEndBound=this._onDragEnd.bind(this),this._lastDraggingCoordinates={x:0,y:0},this.on("render",(()=>{this._attachListeners()})),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(Yn.document,"mouseup",this._onDragEndBound),this.listenTo(Yn.document,"touchend",this._onDragEndBound),this.listenTo(Yn.document,"mousemove",this._onDragBound),this.listenTo(Yn.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(Yn.document,"mouseup",this._onDragEndBound),this.stopListening(Yn.document,"touchend",this._onDragEndBound),this.stopListening(Yn.document,"mousemove",this._onDragBound),this.stopListening(Yn.document,"touchmove",this._onDragBound)}_onDragStart(e,t){if(!this._isHandleElementPressed(t))return;this._attachDragListeners();let n=0,i=0;t instanceof MouseEvent?(n=t.clientX,i=t.clientY):(n=t.touches[0].clientX,i=t.touches[0].clientY),this._lastDraggingCoordinates={x:n,y:i},this.isDragging=!0}_onDrag(e,t){if(!this.isDragging)return void this._detachDragListeners();let n=0,i=0;t instanceof MouseEvent?(n=t.clientX,i=t.clientY):(n=t.touches[0].clientX,i=t.touches[0].clientY),t.preventDefault(),this.fire("drag",{deltaX:Math.round(n-this._lastDraggingCoordinates.x),deltaY:Math.round(i-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:n,y:i}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(e){return!!this.dragHandleElement&&(this.dragHandleElement===e.target||e.target instanceof HTMLElement&&this.dragHandleElement.contains(e.target))}}}(th)){constructor(e,{getCurrentDomRoot:t,getViewportOffset:n}){super(e),this.wasMoved=!1;const i=this.bindTemplate,o=e.t;this.set("className",""),this.set("ariaLabel",o("Editor dialog")),this.set("isModal",!1),this.set("position",yu),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=n,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new so,this.focusTracker=new oo,this._focusables=new Dd,this._focusCycler=new Vh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",i.if("isModal","ck-dialog-overlay__transparent",(e=>!e)),i.if("_isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",i.to("className")],role:"dialog","aria-label":i.to("ariaLabel"),style:{top:i.to("_top",(e=>xu(e))),left:i.to("_left",(e=>xu(e))),visibility:i.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",((e,t)=>{this.fire("close",{source:"escKeyPress"}),t()})),this.on("drag",((e,{deltaX:t,deltaY:n})=>{this.wasMoved=!0,this.moveBy(t,n)})),this.listenTo(Yn.window,"resize",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.listenTo(Yn.document,"scroll",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.on("change:_isVisible",((e,t,n)=>{n&&(this._isTransparent=!0,setTimeout((()=>{this.updatePosition(),this._isTransparent=!1,this.focus()}),10))})),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView?this.headerView.element:null}setupParts({icon:e,title:t,hasCloseButton:n=!0,content:i,actionButtons:o}){t&&(this.headerView=new wu(this.locale,{icon:e}),n&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=t,this.ariaLabel=t,this.parts.add(this.headerView,0)),i&&(i instanceof th&&(i=[i]),this.contentView=new vu(this.locale),this.contentView.children.addMany(i),this.parts.add(this.contentView)),o&&(this.actionsView=new ku(this.locale),this.actionsView.setButtons(o),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const n=this._getViewportRect(),i=this._getDialogRect();e+i.width>n.right&&(e=n.right-i.width),e<n.left&&(e=n.left),t<n.top&&(t=n.top),this._moveTo(e,t)}_moveTo(e,t){this._left=e,this._top=t}moveBy(e,t){this.moveTo(this._left+e,this._top+t)}_moveOffScreen(){this._moveTo(-9999,-9999)}updatePosition(){if(!this.element||!this.element.parentNode)return;const e=this._getViewportRect();let t,n=this.position;this._getCurrentDomRoot()?t=this._getVisibleDomRootRect(e):n=yu;const i=Eu.defaultOffset,o=this._getDialogRect();switch(n){case"editor-top-side":if(t){const e="ltr"===this.locale.contentLanguageDirection?t.right-o.width-i:t.left+i;this.moveTo(e,t.top+i)}else this._moveOffScreen();break;case Cu:t?this.moveTo(Math.round(t.left+t.width/2-o.width/2),Math.round(t.top+t.height/2-o.height/2)):this._moveOffScreen();break;case yu:this.moveTo(Math.round((e.width-o.width)/2),Math.round((e.height-o.height)/2));break;case"editor-top-center":t?this.moveTo(Math.round(t.left+t.width/2-o.width/2),t.top+i):this._moveOffScreen();break;case"editor-bottom-center":t?this.moveTo(Math.round(t.left+t.width/2-o.width/2),t.bottom-o.height-i):this._moveOffScreen();break;case"editor-above-center":t?this.moveTo(Math.round(t.left+t.width/2-o.width/2),t.top-o.height-i):this._moveOffScreen();break;case"editor-below-center":t?this.moveTo(Math.round(t.left+t.width/2-o.width/2),t.bottom+i):this._moveOffScreen()}}_getVisibleDomRootRect(e){let t=new oi(this._getCurrentDomRoot()).getVisible();return t?(t=e.getIntersection(t),t||null):null}_getDialogRect(){return new oi(this.element.firstElementChild)}_getViewportRect(){return function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new oi(Yn.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t.left+=e.left,t.right-=e.right,t.width-=e.left+e.right,t}(this._getViewportOffset())}_updateFocusCyclableItems(){const e=[];if(this.contentView)for(const t of this.contentView.children)Fh(t)&&e.push(t);this.actionsView&&e.push(this.actionsView),this.closeButtonView&&e.push(this.closeButtonView),e.forEach((e=>{var t;this._focusables.add(e),this.focusTracker.add(e.element),Fh(t=e)&&"focusCycler"in t&&t.focusCycler instanceof Vh&&(this.listenTo(e.focusCycler,"forwardCycle",(e=>{this._focusCycler.focusNext(),this._focusCycler.next!==this._focusCycler.focusables.get(this._focusCycler.current)&&e.stop()})),this.listenTo(e.focusCycler,"backwardCycle",(e=>{this._focusCycler.focusPrevious(),this._focusCycler.previous!==this._focusCycler.focusables.get(this._focusCycler.current)&&e.stop()})))}))}_createCloseButton(){const e=new ph(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:xd.cancel}),e.on("execute",(()=>this.fire("close",{source:"closeButton"}))),e}}Eu.defaultOffset=15;var Tu=Eu;class Bu extends mo{static get pluginName(){return"Dialog"}constructor(e){super(e);const t=e.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set("id",null),e.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:t("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}_initShowHideListeners(){this.on("show",((e,t)=>{this._show(t)})),this.on("show",((e,t)=>{t.onShow&&t.onShow(this)}),{priority:"low"}),this.on("hide",(()=>{Bu._visibleDialogPlugin&&Bu._visibleDialogPlugin._hide()})),this.on("hide",(()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)}),{priority:"low"})}_initFocusToggler(){const e=this.editor;e.keystrokes.set("Ctrl+F6",((t,n)=>{this.isOpen&&!this.view.isModal&&(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),n())}))}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",(()=>{if(!this.view)return;const t=e.document.differ.getChangedRoots();for(const e of t)e.state&&this.view.updatePosition()}))}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show({id:e,icon:t,title:n,hasCloseButton:i=!0,content:o,actionButtons:s,className:r,isModal:a,position:l,onHide:c}){const d=this.editor;this.view=new Tu(d.locale,{getCurrentDomRoot:()=>d.editing.view.getDomRoot(d.model.document.selection.anchor.root.rootName),getViewportOffset:()=>d.ui.viewportOffset});const h=this.view;h.on("close",(()=>{this.hide()})),d.ui.view.body.add(h),d.ui.focusTracker.add(h.element),d.keystrokes.listenTo(h.element),l||(l=a?yu:Cu),h.set({position:l,_isVisible:!0,className:r,isModal:a}),h.setupParts({icon:t,title:n,hasCloseButton:i,content:o,actionButtons:s}),this.id=e,c&&(this._onHide=c),this.isOpen=!0,Bu._visibleDialogPlugin=this}hide(){Bu._visibleDialogPlugin&&Bu._visibleDialogPlugin.fire(`hide:${Bu._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,t=this.view;t.contentView&&t.contentView.reset(),e.ui.view.body.remove(t),e.ui.focusTracker.remove(t.element),e.keystrokes.stopListening(t.element),t.destroy(),e.editing.view.focus(),this.id=null,this.isOpen=!1,Bu._visibleDialogPlugin=null}}var Pu=o(8793);vo()(Pu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Pu.A.locals;const Su=ui("px"),Iu=Yn.document.body,Du={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class Ou extends th{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",Su),left:t.to("left",Su)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=Ou.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:Iu,fitInViewport:!0},e),i=Ou._getOptimalPosition(n)||Du,o=parseInt(i.left),s=parseInt(i.top),r=i.name,a=i.config||{},{withArrow:l=!0}=a;this.top=s,this.left=o,this.position=r,this.withArrow=l}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=Ru(e.target),n=e.limiter?Ru(e.limiter):Iu;this.listenTo(Yn.document,"scroll",((i,o)=>{const s=o.target,r=t&&s.contains(t),a=n&&s.contains(n);!r&&!a&&t&&n||this.attachTo(e)}),{useCapture:!0}),this.listenTo(Yn.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(Yn.document,"scroll"),this.stopListening(Yn.window,"resize")}}Ou.arrowSideOffset=25,Ou.arrowHeightOffset=10,Ou.stickyVerticalOffset=20,Ou._getOptimalPosition=bi,Ou.defaultPositions=Vu();var Mu=Ou;function Ru(e){return zn(e)?e:ti(e)?e.commonAncestorContainer:"function"==typeof e?Ru(e()):null}function Vu(e={}){const{sideOffset:t=Ou.arrowSideOffset,heightOffset:n=Ou.arrowHeightOffset,stickyVerticalOffset:i=Ou.stickyVerticalOffset,config:o}=e;return{northWestArrowSouthWest:(e,n)=>({top:s(e,n),left:e.left-t,name:"arrow_sw",...o&&{config:o}}),northWestArrowSouthMiddleWest:(e,n)=>({top:s(e,n),left:e.left-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northWestArrowSouth:(e,t)=>({top:s(e,t),left:e.left-t.width/2,name:"arrow_s",...o&&{config:o}}),northWestArrowSouthMiddleEast:(e,n)=>({top:s(e,n),left:e.left-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northWestArrowSouthEast:(e,n)=>({top:s(e,n),left:e.left-n.width+t,name:"arrow_se",...o&&{config:o}}),northArrowSouthWest:(e,n)=>({top:s(e,n),left:e.left+e.width/2-t,name:"arrow_sw",...o&&{config:o}}),northArrowSouthMiddleWest:(e,n)=>({top:s(e,n),left:e.left+e.width/2-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northArrowSouth:(e,t)=>({top:s(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...o&&{config:o}}),northArrowSouthMiddleEast:(e,n)=>({top:s(e,n),left:e.left+e.width/2-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northArrowSouthEast:(e,n)=>({top:s(e,n),left:e.left+e.width/2-n.width+t,name:"arrow_se",...o&&{config:o}}),northEastArrowSouthWest:(e,n)=>({top:s(e,n),left:e.right-t,name:"arrow_sw",...o&&{config:o}}),northEastArrowSouthMiddleWest:(e,n)=>({top:s(e,n),left:e.right-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northEastArrowSouth:(e,t)=>({top:s(e,t),left:e.right-t.width/2,name:"arrow_s",...o&&{config:o}}),northEastArrowSouthMiddleEast:(e,n)=>({top:s(e,n),left:e.right-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northEastArrowSouthEast:(e,n)=>({top:s(e,n),left:e.right-n.width+t,name:"arrow_se",...o&&{config:o}}),southWestArrowNorthWest:e=>({top:r(e),left:e.left-t,name:"arrow_nw",...o&&{config:o}}),southWestArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.left-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southWestArrowNorth:(e,t)=>({top:r(e),left:e.left-t.width/2,name:"arrow_n",...o&&{config:o}}),southWestArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.left-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southWestArrowNorthEast:(e,n)=>({top:r(e),left:e.left-n.width+t,name:"arrow_ne",...o&&{config:o}}),southArrowNorthWest:e=>({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw",...o&&{config:o}}),southArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.left+e.width/2-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southArrowNorth:(e,t)=>({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...o&&{config:o}}),southArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.left+e.width/2-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southArrowNorthEast:(e,n)=>({top:r(e),left:e.left+e.width/2-n.width+t,name:"arrow_ne",...o&&{config:o}}),southEastArrowNorthWest:e=>({top:r(e),left:e.right-t,name:"arrow_nw",...o&&{config:o}}),southEastArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.right-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southEastArrowNorth:(e,t)=>({top:r(e),left:e.right-t.width/2,name:"arrow_n",...o&&{config:o}}),southEastArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.right-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southEastArrowNorthEast:(e,n)=>({top:r(e),left:e.right-n.width+t,name:"arrow_ne",...o&&{config:o}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-n,name:"arrow_e",...o&&{config:o}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+n,name:"arrow_w",...o&&{config:o}}),viewportStickyNorth:(e,t,n,s)=>{const r=s||n;return e.getIntersection(r)?r.height-e.height>i?null:{top:r.top+i,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...o}}:null}};function s(e,t){return e.top-t.height-n}function r(e){return e.bottom+n}}var Nu=o(1024);vo()(Nu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Nu.A.locals;const Fu="ck-tooltip";class Lu extends(Kn()){constructor(e){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,this._mutationObserver=null,Lu._editors.add(e),Lu._instance)return Lu._instance;Lu._instance=this,this.tooltipTextView=new th(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new Mu(e.locale),this.balloonPanelView.class=Fu,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=function(e){const t=new MutationObserver((()=>{e()}));return{attach(e){t.observe(e,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){t.disconnect()}}}((()=>{this._updateTooltipPosition()})),this._pinTooltipDebounced=zr(this._pinTooltip,600),this._unpinTooltipDebounced=zr(this._unpinTooltip,400),this.listenTo(Yn.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(Yn.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Yn.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Yn.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Yn.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Yn.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Lu._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Lu._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Lu._instance=null)}static getPositioningFunctions(e){const t=Lu.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onKeyDown(e,t){"Escape"===t.key&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(e,{target:t}){const n=ju(t);n?n!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(n,Hu(n))):"focus"===e.name&&this._unpinTooltip()}_onLeaveOrBlur(e,{target:t,relatedTarget:n}){if("mouseleave"===e.name){if(!zn(t))return;const e=this.balloonPanelView.element,i=e&&(e===n||e.contains(n)),o=!i&&t===e;if(i)return void this._unpinTooltipDebounced.cancel();if(!o&&this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const s=ju(t),r=ju(n);(o||s&&s!==r)&&this._unpinTooltipDebounced()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltipDebounced()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:n,cssClass:i}){this._unpinTooltip();const o=io(Lu._editors.values()).ui.view.body;o.has(this.balloonPanelView)||o.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:Lu.getPositioningFunctions(n)}),this._resizeObserver=new di(e,(()=>{fi(e)||this._unpinTooltip()})),this._mutationObserver.attach(e),this.balloonPanelView.class=[Fu,i].filter((e=>e)).join(" ");for(const e of Lu._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=n}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Lu._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._resizeObserver&&this._resizeObserver.destroy(),this._mutationObserver.detach()}_updateTooltipPosition(){const e=Hu(this._currentElementWithTooltip);fi(this._currentElementWithTooltip)&&e.text?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Lu.getPositioningFunctions(e.position)}):this._unpinTooltip()}}Lu.defaultBalloonPositions=Vu({heightOffset:5,sideOffset:13}),Lu._editors=new Set,Lu._instance=null;var zu=Lu;function ju(e){return zn(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function Hu(e){return{text:e.dataset.ckeTooltipText,position:e.dataset.ckeTooltipPosition||"s",cssClass:e.dataset.ckeTooltipClass||""}}var qu=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return q(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),zr(e,t,{leading:i,maxWait:t,trailing:o})};class Wu extends(Kn()){constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=qu(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;(e.config.get("ui.poweredBy.forceVisible")||"VALID"!==function(e){function t(e){return e.length>=40&&e.length<=255?"VALID":"INVALID"}if(!e)return"INVALID";let n="";try{n=atob(e)}catch(e){return"INVALID"}const i=n.split("-"),o=i[0],s=i[1];if(!s)return t(e);try{atob(s)}catch(n){try{if(atob(o),!atob(o).length)return t(e)}catch(n){return t(e)}}if(o.length<40||o.length>255)return"INVALID";let r="";try{atob(o),r=atob(s)}catch(e){return"INVALID"}if(8!==r.length)return"INVALID";const a=Number(r.substring(0,4)),l=Number(r.substring(4,6))-1,c=Number(r.substring(6,8)),d=new Date(a,l,c);return d<S||isNaN(Number(d))?"INVALID":"VALID"}(e.config.get("licenseKey")))&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",((e,t,n)=>{this._updateLastFocusedEditableElement(),n?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,n)=>{this._updateLastFocusedEditableElement(),n&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new Mu,n=Ku(e),i=new $u(e.locale,n.label);t.content.add(i),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const n=Ku(e),i="right"===n.side?function(e,t){return Uu(e,t,((e,n)=>e.left+e.width-n.width-t.horizontalOffset))}(t,n):function(e,t){return Uu(e,t,(e=>e.left+t.horizontalOffset))}(t,n);return{target:t,positions:[i]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,n=e.ui.focusTracker.focusedElement;if(!t||!n)return void(this._lastFocusedEditableElement=null);const i=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));i.includes(n)?this._lastFocusedEditableElement=n:this._lastFocusedEditableElement=i[0]}}class $u extends th{constructor(e,t){super(e);const n=new uh,i=this.bindTemplate;n.set({content:'<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/><path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></svg>\n',isColorInherited:!1}),n.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],n],on:{dragstart:i.to((e=>e.preventDefault()))}}]})}}function Uu(e,t,n){return(i,o)=>{const s=new oi(e);if(s.width<350||s.height<50)return null;let r;r="inside"===t.position?s.bottom-o.height:s.bottom-o.height/2,r-=t.verticalOffset;const a=n(s,o),l=i.clone().moveTo(a,r).getIntersection(o.clone().moveTo(a,r)).getVisible();return!l||l.getArea()<o.getArea()?null:{top:r,left:a,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}}}}function Ku(e){const t=e.config.get("ui.poweredBy"),n=t&&t.position||"border";return{position:n,label:"Powered by",verticalOffset:"inside"===n?5:0,horizontalOffset:5,side:"ltr"===e.locale.contentLanguageDirection?"right":"left",...t}}var Gu=o(6532);vo()(Gu.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Gu.A.locals;const Zu="polite";class Ju{constructor(e){this.editor=e}announce(e,t,n=Zu){const i=this.editor;this.view||(this.view=new Yu(i.locale),i.ui.view.body.add(this.view));let o=this.view.regionViews.find((t=>t.regionName===e));o||(o=new Qu(this.view.locale),this.view.regionViews.add(o)),o.set({regionName:e,text:t,politeness:n})}}class Yu extends th{constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class Qu extends th{constructor(e){super(e);const t=this.bindTemplate;this.set("regionName",""),this.set("text",""),this.set("politeness",Zu),this.setTemplate({tag:"div",attributes:{role:"region","data-region":t.to("regionName"),"aria-live":t.to("politeness")},children:[{text:t.to("text")}]})}}class Xu extends(J()){constructor(e){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[];const t=e.editing.view;this.editor=e,this.componentFactory=new pu(e),this.focusTracker=new oo,this.tooltipManager=new zu(e),this.poweredBy=new Wu(e),this.ariaLiveAnnouncer=new Ju(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const n=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?n():this.once("ready",n)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const n=e.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let n,i;e.keystrokes.set("Alt+F10",((e,o)=>{const s=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(s)&&!Array.from(t.domRoots.values()).includes(s)&&(n=s);const r=this._getCurrentFocusedToolbarDefinition();r&&i||(i=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e<i.length;e++){const e=i.shift();if(i.push(e),e!==r&&this._focusFocusableCandidateToolbar(e)){r&&r.options.afterBlur&&r.options.afterBlur();break}}o()})),e.keystrokes.set("Esc",((t,i)=>{const o=this._getCurrentFocusedToolbarDefinition();o&&(n?(n.focus(),n=null):e.editing.view.focus(),o.options.afterBlur&&o.options.afterBlur(),i())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:n,options:i}=t;(fi(n.element)||i.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>em(e)-em(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:n}}=e;return n&&n(),!!fi(t.element)&&(t.focus(),!0)}_handleScrollToTheSelection(e,t){const n={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=n.top,t.viewportOffset.bottom+=n.bottom,t.viewportOffset.left+=n.left,t.viewportOffset.right+=n.right}}function em(e){const{toolbarView:t,options:n}=e;let i=10;return fi(t.element)&&i--,n.isContextual&&i--,i}var tm=o(1680);vo()(tm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),tm.A.locals;class nm extends th{constructor(e){super(e),this.body=new ch(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class im extends nm{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new ih;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class om extends th{constructor(e,t,n){super(e),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((n=>{const i=e.document.getRoot(t.name);n.addClass(t.isFocused?"ck-focused":"ck-blurred",i),n.removeClass(t.isFocused?"ck-blurred":"ck-focused",i)}))}e.isRenderingInProgress?function n(i){e.once("change:isRenderingInProgress",((e,o,s)=>{s?n(i):t(i)}))}(this):t(this)}}class sm extends om{constructor(e,t,n,i={}){super(e,t,n);const o=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=i.label||(()=>o("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const n=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),n)}))}}class rm extends _o{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class am extends(J()){constructor(e,t){super(),t&&xr(this,t),e&&this.set(e)}}var lm=o(6432),cm=(vo()(lm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lm.A.locals,o(6481));vo()(cm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),cm.A.locals;const dm=ui("px");class hm extends mo{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new T("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const n=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),n.set(e.view,e),this._viewToStack.set(e.view,n),n===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new T("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new T("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new Mu(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new um(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,n)=>{if(n<2)return"";const i=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[i,n])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new mm(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:n=!0,singleViewMode:i=!1}){this.view.class=t,this.view.withArrow=n,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),i&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class um extends th{constructor(e){super(e);const t=e.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new oo,this.buttonPrevView=this._createButtonView(t("Previous"),xd.previousArrow),this.buttonNextView=this._createButtonView(t("Next"),xd.nextArrow),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const n=new ph(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n}}class mm extends th{constructor(e,t){super(e);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:n.to("top",dm),left:n.to("left",dm),width:n.to("width",dm),height:n.to("height",dm)}},children:this.content}),this.on("change:numberOfPanels",((e,t,n,i)=>{n>i?this._addPanels(n-i):this._removePanels(i-n),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new th;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:n,height:i}=new oi(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:n,height:i})}}}var gm=o(8099);vo()(gm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),gm.A.locals;const pm=ui("px");class fm extends th{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new Od({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?pm(this._contentPanelRect.height):null))}}}).render(),this.contentPanelElement=new Od({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?pm(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_stickyTopOffset",(e=>e?pm(e):e)),bottom:t.to("_stickyBottomOffset",(e=>e?pm(e):e)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(Yn.document,"scroll",(()=>{this.checkIfShouldBeSticky()}),{useCapture:!0}),this.listenTo(this,"change:isActive",(()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const e=new oi(this.limiterElement);let t=e.getVisible();if(t){const e=new oi(Yn.window);e.top+=this.viewportTopOffset,e.height-=this.viewportTopOffset,t=t.getIntersection(e)}if(t&&e.top<t.top){const n=t.top;if(n+this._contentPanelRect.height+this.limiterBottomOffset>t.bottom){const n=Math.max(e.bottom-t.bottom,0)+this.limiterBottomOffset;e.bottom-n>e.top+this._contentPanelRect.height?this._stickToBottomOfLimiter(n):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<e.height?this._stickToTopOfAncestors(n):this._unstick()}else this._unstick()}_stickToTopOfAncestors(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=e,this._stickyBottomOffset=null,this._marginLeft=pm(-Yn.window.scrollX)}_stickToBottomOfLimiter(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=e,this._marginLeft=pm(-Yn.window.scrollX)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new oi(this.contentPanelElement)}}class bm extends xh{constructor(e,t){const n=e.t,i=Object.assign({},{showResetButton:!0,showIcon:!0,creator:du},t);super(e,i.creator),this.label=t.label,this._viewConfig=i,this._viewConfig.showIcon&&(this.iconView=new uh,this.iconView.content=xd.loupe,this.fieldWrapperChildren.add(this.iconView,0),this.extendTemplate({attributes:{class:"ck-search__query_with-icon"}})),this._viewConfig.showResetButton&&(this.resetButtonView=new ph(e),this.resetButtonView.set({label:n("Clear"),icon:xd.cancel,class:"ck-search__reset",isVisible:!1,tooltip:!0}),this.resetButtonView.on("execute",(()=>{this.reset(),this.focus(),this.fire("reset")})),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",(e=>!e)),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class wm extends th{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",e.if("isVisible","ck-hidden",(e=>!e))],tabindex:-1},children:[{tag:"span",children:[{text:[e.to("primaryText")]}]},{tag:"span",children:[{text:[e.to("secondaryText")]}]}]})}focus(){this.element.focus()}}class _m extends th{constructor(e){super(e),this.children=this.createCollection(),this.focusTracker=new oo,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}),this._focusCycler=new Vh({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}var km=/[\\^$.*+?()[\]{}|]/g,vm=RegExp(km.source),Am=o(7898);vo()(Am.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Am.A.locals;class ym extends th{constructor(e,t){super(e),this._config=t,this.filteredView=t.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new oo,this.keystrokes=new so,this.resultsView=new _m(e),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),t.infoView&&t.infoView.instance?this.infoView=t.infoView.instance:(this.infoView=new wm,this._enableDefaultInfoViewBehavior(),this.on("render",(()=>{this.search("")}))),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new Vh({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",((e,{resultsCount:t,totalItemsCount:n})=>{this.resultsCount=t,this.totalItemsCount=n})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",t.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const e=e=>e.stopPropagation();for(const e of this.focusableChildren)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search("")}search(e){const t=e?new RegExp((i=Qo(i=e))&&vm.test(i)?i.replace(km,"\\$&"):i,"ig"):null,n=this.filteredView.filter(t);var i;this.fire("search",{query:e,...n})}_createSearchTextQueryView(){const e=new bm(this.locale,this._config.queryView);return this.listenTo(e.fieldView,"input",(()=>{this.search(e.fieldView.element.value)})),e.on("reset",(()=>this.reset())),e.bind("isEnabled").to(this),e}_enableDefaultInfoViewBehavior(){const e=this.locale.t,t=this.infoView;function n(e,{query:t,resultsCount:n,totalItemsCount:i}){return"function"==typeof e?e(t,n,i):e}this.on("search",((i,o)=>{if(o.resultsCount)t.set({isVisible:!1});else{const i=this._config.infoView&&this._config.infoView.text;let s,r;o.totalItemsCount?i&&i.notFound?(s=i.notFound.primary,r=i.notFound.secondary):(s=e("No results found"),r=""):i&&i.noSearchableItems?(s=i.noSearchableItems.primary,r=i.noSearchableItems.secondary):(s=e("No searchable items"),r=""),t.set({primaryText:n(s,o),secondaryText:n(r,o),isVisible:!0})}}))}}var Cm=o(974);vo()(Cm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Cm.A.locals;class xm extends ym{constructor(e,t){super(e,t),this._config=t;const n=ui("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const i=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[i.if("isVisible","ck-hidden",(e=>!e)),i.to("_position",(e=>`ck-search__results_${e}`))],style:{width:i.to("_width",n)}}}),this.focusTracker.on("change:isFocused",((e,n,i)=>{this._updateResultsVisibility(),i?this.resultsView.element.scrollTop=0:t.resetOnBlur&&this.queryView.reset()})),this.on("search",(()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()})),this.keystrokes.set("esc",((e,t)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,t())})),this.listenTo(Yn.document,"scroll",(()=>{this._updateResultsViewWidthAndPosition()})),this.on("change:isEnabled",(()=>{this._updateResultsVisibility()})),this.filteredView.on("execute",((e,{value:t})=>{this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=t,this.resultsView.isVisible=!1})),this.resultsView.on("change:isVisible",(()=>{this._updateResultsViewWidthAndPosition()}))}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new oi(this.queryView.fieldView.element).width;const e=xm._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:xm.defaultResultsPositions});this.resultsView._position=e?e.name:"s"}_updateResultsVisibility(){const e=void 0===this._config.queryMinChars?0:this._config.queryMinChars,t=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&t>=e}}xm.defaultResultsPositions=[e=>({top:e.bottom,left:e.left,name:"s"}),(e,t)=>({top:e.top-t.height,left:e.left,name:"n"})],xm._getOptimalPosition=bi;RegExp(/[&<>"']/g.source);var Em=o(8652);vo()(Em.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Em.A.locals;var Tm=o(8568);vo()(Tm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Tm.A.locals,ui("px");var Bm=o(7637);vo()(Bm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Bm.A.locals,ui("px"),ui("px");var Pm=o(7097);vo()(Pm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Pm.A.locals;class Sm extends ph{constructor(e){super(e);const t=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e))),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new uh;return e.content=kh,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}var Im=o(7308);vo()(Im.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Im.A.locals;class Dm extends Zh{constructor(e,t){super(e);const n=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:n.to("mouseenter")}}),this.delegate("mouseenter").to(t)}}const Om={toggleMenusAndFocusItemsOnHover(e){e.on("menu:mouseenter",(t=>{if(e.isOpen){for(const n of e.menus){const e=t.path[0],i=e instanceof Dm&&e.children.first===n;n.isOpen=(t.path.includes(n)||i)&&n.isEnabled}t.source.focus()}}))},focusCycleMenusOnArrows(e){const t="rtl"===e.locale.uiLanguageDirection;function n(t,n){const i=e.children.getIndex(t),o=t.isOpen,s=e.children.length,r=e.children.get((i+s+n)%s);t.isOpen=!1,o&&(r.isOpen=!0),r.buttonView.focus()}e.on("menu:arrowright",(e=>{n(e.source,t?-1:1)})),e.on("menu:arrowleft",(e=>{n(e.source,t?1:-1)}))},closeMenusWhenTheBarCloses(e){e.on("change:isOpen",(()=>{e.isOpen||e.menus.forEach((e=>{e.isOpen=!1}))}))},closeMenuWhenAnotherOnTheSameLevelOpens(e){e.on("menu:change:isOpen",((t,n,i)=>{i&&e.menus.filter((e=>t.source.parentMenuView===e.parentMenuView&&t.source!==e&&e.isOpen)).forEach((e=>{e.isOpen=!1}))}))},closeOnClickOutside(e){Pd({emitter:e,activator:()=>e.isOpen,callback:()=>e.close(),contextElements:()=>e.children.map((e=>e.element))})}},Mm={openAndFocusPanelOnArrowDownKey(e){e.keystrokes.set("arrowdown",((t,n)=>{e.focusTracker.focusedElement===e.buttonView.element&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),n())}))},openOnArrowRightKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowleft":"arrowright";e.keystrokes.set(t,((t,n)=>{e.focusTracker.focusedElement===e.buttonView.element&&e.isEnabled&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),n())}))},openOnButtonClick(e){e.buttonView.on("execute",(()=>{e.isOpen=!0,e.panelView.focus()}))},toggleOnButtonClick(e){e.buttonView.on("execute",(()=>{e.isOpen=!e.isOpen,e.isOpen&&e.panelView.focus()}))},closeOnArrowLeftKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowright":"arrowleft";e.keystrokes.set(t,((t,n)=>{e.isOpen&&(e.isOpen=!1,e.focus(),n())}))},closeOnEscKey(e){e.keystrokes.set("esc",((t,n)=>{e.isOpen&&(e.isOpen=!1,e.focus(),n())}))},closeOnParentClose(e){e.parentMenuView.on("change:isOpen",((t,n,i)=>{i||t.source!==e.parentMenuView||(e.isOpen=!1)}))}},Rm={southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),eastSouth:e=>({top:e.top,left:e.right-5,name:"es"}),eastNorth:(e,t)=>({top:e.top-t.height,left:e.right-5,name:"en"}),westSouth:(e,t)=>({top:e.top,left:e.left-t.width+5,name:"ws"}),westNorth:(e,t)=>({top:e.top-t.height,left:e.left-t.width+5,name:"wn"})},Vm=[{menuId:"file",label:"File",groups:[{groupId:"export",items:["menuBar:exportPdf","menuBar:exportWord"]},{groupId:"import",items:["menuBar:importWord"]},{groupId:"revisionHistory",items:["menuBar:revisionHistory"]}]},{menuId:"edit",label:"Edit",groups:[{groupId:"undo",items:["menuBar:undo","menuBar:redo"]},{groupId:"selectAll",items:["menuBar:selectAll"]},{groupId:"findAndReplace",items:["menuBar:findAndReplace"]}]},{menuId:"view",label:"View",groups:[{groupId:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:uploadImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable"]},{groupId:"insertInline",items:["menuBar:link","menuBar:comment"]},{groupId:"insertMinorWidgets",items:["menuBar:insertTemplate","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]},{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{menuId:"format",label:"Format",groups:[{groupId:"textAndFont",items:[{menuId:"text",label:"Text",groups:[{groupId:"basicStyles",items:["menuBar:bold","menuBar:italic","menuBar:underline","menuBar:strikethrough","menuBar:superscript","menuBar:subscript","menuBar:code"]},{groupId:"textPartLanguage",items:["menuBar:textPartLanguage"]}]},{menuId:"font",label:"Font",groups:[{groupId:"fontProperties",items:["menuBar:fontSize","menuBar:fontFamily"]},{groupId:"fontColors",items:["menuBar:fontColor","menuBar:fontBackgroundColor"]},{groupId:"highlight",items:["menuBar:highlight"]}]},"menuBar:heading"]},{groupId:"list",items:["menuBar:bulletedList","menuBar:numberedList","menuBar:todoList"]},{groupId:"indent",items:["menuBar:alignment","menuBar:indent","menuBar:outdent"]},{groupId:"caseChange",items:["menuBar:caseChange"]},{groupId:"removeFormat",items:["menuBar:removeFormat"]}]},{menuId:"tools",label:"Tools",groups:[{groupId:"aiTools",items:["menuBar:aiAssistant","menuBar:aiCommands"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function Nm({normalizedConfig:e,locale:t,componentFactory:n}){const i=pa(e);return function(e,t){const n=t.removeItems,i=[];t.items=t.items.filter((({menuId:e})=>!n.includes(e)||(i.push(e),!1))),jm(t.items,(e=>{e.groups=e.groups.filter((({groupId:e})=>!n.includes(e)||(i.push(e),!1)));for(const t of e.groups)t.items=t.items.filter((e=>{const t=Wm(e);return!n.includes(t)||(i.push(t),!1)}))}));for(const t of n)i.includes(t)||B("menu-bar-item-could-not-be-removed",{menuBarConfig:e,itemName:t})}(e,i),function(e,t){const n=t.addItems,i=[];for(const e of n){const n=(s=e.position).startsWith("start")?"start":s.startsWith("end")?"end":s.startsWith("after")?"after":"before",r=qm(e.position);if("object"==typeof(o=e)&&"menu"in o)if(r){const o=t.items.findIndex((e=>e.menuId===r));-1!=o?"before"===n?(t.items.splice(o,0,e.menu),i.push(e)):"after"===n&&(t.items.splice(o+1,0,e.menu),i.push(e)):Fm(t,e.menu,r,n)&&i.push(e)}else"start"===n?(t.items.unshift(e.menu),i.push(e)):"end"===n&&(t.items.push(e.menu),i.push(e));else Hm(e)?jm(t.items,(t=>{if(t.menuId===r)"start"===n?(t.groups.unshift(e.group),i.push(e)):"end"===n&&(t.groups.push(e.group),i.push(e));else{const o=t.groups.findIndex((e=>e.groupId===r));-1!==o&&("before"===n?(t.groups.splice(o,0,e.group),i.push(e)):"after"===n&&(t.groups.splice(o+1,0,e.group),i.push(e)))}})):Fm(t,e.item,r,n)&&i.push(e)}var o,s;for(const t of n)i.includes(t)||B("menu-bar-item-could-not-be-added",{menuBarConfig:e,addedItemConfig:t})}(e,i),function(e,t,n){jm(t.items,(i=>{for(const o of i.groups)o.items=o.items.filter((o=>{const s="string"==typeof o&&!n.has(o);return s&&!t.isUsingDefaultConfig&&B("menu-bar-item-unavailable",{menuBarConfig:e,parentMenuConfig:pa(i),componentName:o}),!s}))}))}(e,i,n),Lm(e,i),function(e,t){const n=t.t,i={File:n({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:n({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:n({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:n({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:n({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:n({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:n({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:n({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:n({string:"Font",id:"MENU_BAR_MENU_FONT"})};jm(e.items,(e=>{e.label in i&&(e.label=i[e.label])}))}(i,t),i}function Fm(e,t,n,i){let o=!1;return jm(e.items,(e=>{for(const{groupId:s,items:r}of e.groups){if(o)return;if(s===n)"start"===i?(r.unshift(t),o=!0):"end"===i&&(r.push(t),o=!0);else{const e=r.findIndex((e=>Wm(e)===n));-1!==e&&("before"===i?(r.splice(e,0,t),o=!0):"after"===i&&(r.splice(e+1,0,t),o=!0))}}})),o}function Lm(e,t){const n=t.isUsingDefaultConfig;let i=!1;t.items=t.items.filter((t=>!!t.groups.length||(zm(e,t,n),!1))),t.items.length?(jm(t.items,(t=>{t.groups=t.groups.filter((e=>!!e.items.length||(i=!0,!1)));for(const o of t.groups)o.items=o.items.filter((t=>!($m(t)&&!t.groups.length&&(zm(e,t,n),i=!0,1))))})),i&&Lm(e,t)):zm(e,e,n)}function zm(e,t,n){n||B("menu-bar-menu-empty",{menuBarConfig:e,emptyMenuConfig:t})}function jm(e,t){if(Array.isArray(e))for(const t of e)n(t);function n(e){t(e);for(const t of e.groups)for(const e of t.items)$m(e)&&n(e)}}function Hm(e){return"object"==typeof e&&"group"in e}function qm(e){const t=e.match(/^[^:]+:(.+)/);return t?t[1]:null}function Wm(e){return"string"==typeof e?e:e.menuId}function $m(e){return"object"==typeof e&&"menuId"in e}var Um=o(2027);vo()(Um.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Um.A.locals;class Km extends th{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",t.to("position",(e=>`ck-menu-bar__menu__panel_position_${e}`)),t.if("isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(e=1){this.children.length&&(1===e?this.children.first.focus():this.children.last.focus())}}var Gm=o(3601);vo()(Gm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Gm.A.locals;class Zm extends th{constructor(e){super(e);const t=this.bindTemplate;this.buttonView=new Sm(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new Km(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new so,this.focusTracker=new oo,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("parentMenuView","ck-menu-bar__menu_top-level",(e=>!e))]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),Mm.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(Mm.openOnButtonClick(this),Mm.openOnArrowRightKey(this),Mm.closeOnArrowLeftKey(this),Mm.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),Mm.openAndFocusPanelOnArrowDownKey(this),Mm.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",((e,t)=>{this.fire("arrowright"),t()})),this.keystrokes.set("arrowleft",((e,t)=>{this.fire("arrowleft"),t()}))}_repositionPanelOnOpen(){this.on("change:isOpen",((e,t,n)=>{if(!n)return;const i=Zm._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=i?i.name:this._panelPositions[0].name}))}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:n,northWest:i,westSouth:o,eastSouth:s,westNorth:r,eastNorth:a}=Rm;return"ltr"===this.locale.uiLanguageDirection?this.parentMenuView?[s,a,o,r]:[e,t,n,i]:this.parentMenuView?[o,r,s,a]:[t,e,i,n]}}Zm._getOptimalPosition=bi;var Jm=Zm;class Ym extends Xh{constructor(e){super(e),this.role="menu"}}var Qm=o(840);vo()(Qm.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Qm.A.locals;class Xm extends ph{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}class eg extends wh{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var tg=o(8796);vo()(tg.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),tg.A.locals;const ng=["mouseenter","arrowleft","arrowright","change:isOpen"];class ig extends th{constructor(e){super(e),this.menus=[];const t=e.t;this.set("isOpen",!1),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar"],"aria-label":t("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,t){const n=Nm({normalizedConfig:e,locale:this.locale,componentFactory:t}).items.map((e=>this._createMenu({componentFactory:t,menuDefinition:e})));this.children.addMany(n)}render(){super.render(),Om.toggleMenusAndFocusItemsOnHover(this),Om.closeMenusWhenTheBarCloses(this),Om.closeMenuWhenAnotherOnTheSameLevelOpens(this),Om.focusCycleMenusOnArrows(this),Om.closeOnClickOutside(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const e of this.children)e.isOpen=!1}registerMenu(e,t=null){t?(e.delegate(...ng).to(t),e.parentMenuView=t):e.delegate(...ng).to(this,(e=>"menu:"+e)),e._attachBehaviors(),this.menus.push(e)}_createMenu({componentFactory:e,menuDefinition:t,parentMenuView:n}){const i=this.locale,o=new Jm(i);return this.registerMenu(o,n),o.buttonView.set({label:t.label}),o.once("change:isOpen",(()=>{const n=new Ym(i);n.ariaLabel=t.label,o.panelView.children.add(n),n.items.addMany(this._createMenuItems({menuDefinition:t,parentMenuView:o,componentFactory:e}))})),o}_createMenuItems({menuDefinition:e,parentMenuView:t,componentFactory:n}){const i=this.locale,o=[];for(const s of e.groups){for(const e of s.items){const s=new Dm(i,t);if(q(e))s.children.add(this._createMenu({componentFactory:n,menuDefinition:e,parentMenuView:t}));else{const i=this._createMenuItemContentFromFactory({componentName:e,componentFactory:n,parentMenuView:t});if(!i)continue;s.children.add(i)}o.push(s)}s!==e.groups[e.groups.length-1]&&o.push(new Jh(i))}return o}_createMenuItemContentFromFactory({componentName:e,parentMenuView:t,componentFactory:n}){const i=n.create(e);return i instanceof Jm||i instanceof Xm||i instanceof eg?(this._registerMenuTree(i,t),i.on("execute",(()=>{this.close()})),i):(B("menu-bar-component-unsupported",{componentName:e,componentView:i}),null)}_registerMenuTree(e,t){if(!(e instanceof Jm))return void e.delegate("mouseenter").to(t);this.registerMenu(e,t);const n=e.panelView.children.filter((e=>e instanceof Ym))[0];if(!n)return void e.delegate("mouseenter").to(t);const i=n.items.filter((e=>e instanceof Zh));for(const t of i)this._registerMenuTree(t.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",((t,n,i)=>{clearTimeout(e),i?this.isOpen=!0:e=setTimeout((()=>{this.isOpen=Array.from(this.children).some((e=>e.isOpen))}),0)}))}}function og({editor:e,commandName:t,plugin:n,icon:i,label:o,keystroke:s}){return r=>{const a=e.commands.get(t),l=new r(e.locale);return l.set({label:o,icon:i,keystroke:s,isToggleable:!0}),l.bind("isEnabled").to(a,"isEnabled"),n.listenTo(l,"execute",(()=>{e.execute(t),e.editing.view.focus()})),l}}const sg="bold";class rg extends mo{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.locale.t,n=e.commands.get(sg),i=og({editor:e,commandName:sg,plugin:this,icon:xd.bold,label:t("Bold"),keystroke:"CTRL+B"});e.ui.componentFactory.add(sg,(()=>{const e=i(ph);return e.set({tooltip:!0}),e.bind("isOn").to(n,"value"),e})),e.ui.componentFactory.add("menuBar:"+sg,(()=>i(Xm)))}}class ag extends mo{static get requires(){return[Bd,rg]}static get pluginName(){return"Bold"}}class lg{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class cg extends po{constructor(e,t){super(e),this._buffer=new lg(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,i=e.text||"",o=i.length;let s=n.selection;if(e.selection?s=e.selection:e.range&&(s=t.createSelection(e.range)),!t.canEditAt(s))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock();const a=Array.from(n.selection.getAttributes());t.deleteContent(s),i&&t.insertContent(e.createText(i,a),s),r?e.setSelection(r):s.is("documentSelection")||e.setSelection(s),this._buffer.unlock(),this._buffer.input(o)}))}}const dg=["insertText","insertReplacementText"];class hg extends Cr{constructor(e){super(e),this.focusObserver=e.getObserver(aa),p.isAndroid&&dg.push("insertCompositionText");const t=e.document;t.on("beforeinput",((n,i)=>{if(!this.isEnabled)return;const{data:o,targetRanges:s,inputType:r,domEvent:a}=i;if(!dg.includes(r))return;this.focusObserver.flush();const l=new v(t,"insertText");t.fire(l,new Er(e,a,{text:o,selection:e.createSelection(s)})),l.stop.called&&n.stop()})),t.on("compositionend",((n,{data:i,domEvent:o})=>{this.isEnabled&&!p.isAndroid&&i&&t.fire("insertText",new Er(e,o,{text:i,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class ug extends mo{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,n=e.editing.view,i=t.document.selection;n.addObserver(hg);const o=new cg(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",o),e.commands.add("input",o),this.listenTo(n.document,"insertText",((i,o)=>{n.document.isComposing||o.preventDefault();const{text:s,selection:r,resultRange:a}=o,l=Array.from(r.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let c=s;if(p.isAndroid){const e=Array.from(l[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=c.length?c.startsWith(e)&&(c=c.substring(e.length),l[0].start=l[0].start.getShiftedBy(e.length)):e.startsWith(c)&&(l[0].start=l[0].start.getShiftedBy(c.length),c=""))}const d={text:c,selection:t.createSelection(l)};a&&(d.resultRange=e.editing.mapper.toModelRange(a)),e.execute("insertText",d),n.scrollToTheSelection()})),p.isAndroid?this.listenTo(n.document,"keydown",((e,s)=>{!i.isCollapsed&&229==s.keyCode&&n.document.isComposing&&mg(t,o)})):this.listenTo(n.document,"compositionstart",(()=>{i.isCollapsed||mg(t,o)}))}}function mg(e,t){if(!t.isEnabled)return;const n=t.buffer;n.lock(),e.enqueueChange(n.batch,(()=>{e.deleteContent(e.document.selection)})),n.unlock()}class gg extends po{constructor(e,t){super(e),this.direction=t,this._buffer=new lg(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,(i=>{this._buffer.lock();const o=i.createSelection(e.selection||n.selection);if(!t.canEditAt(o))return;const s=e.sequence||1,r=o.isCollapsed;if(o.isCollapsed&&t.modifySelection(o,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(s))return void this._replaceEntireContentWithParagraph(i);if(this._shouldReplaceFirstBlockWithParagraph(o,s))return void this.editor.execute("paragraph",{selection:o});if(o.isCollapsed)return;let a=0;o.getFirstRange().getMinimalFlatRanges().forEach((e=>{a+=ie(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(o,{doNotResetEntireContent:r,direction:this.direction}),this._buffer.input(a),i.setSelection(o),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,n=t.document.selection,i=t.schema.getLimitElement(n);if(!n.isCollapsed||!n.containsEntireContent(i))return!1;if(!t.schema.checkChild(i,"paragraph"))return!1;const o=i.getChild(0);return!o||!o.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,n=t.document.selection,i=t.schema.getLimitElement(n),o=e.createElement("paragraph");e.remove(e.createRangeIn(i)),e.insert(o,i),e.setSelection(o,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const n=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const i=e.getFirstPosition(),o=n.schema.getLimitElement(i),s=o.getChild(0);return i.parent==s&&!!e.containsEntireContent(s)&&!!n.schema.checkChild(o,"paragraph")&&"paragraph"!=s.name}}const pg="word",fg="selection",bg="backward",wg="forward",_g={deleteContent:{unit:fg,direction:bg},deleteContentBackward:{unit:"codePoint",direction:bg},deleteWordBackward:{unit:pg,direction:bg},deleteHardLineBackward:{unit:fg,direction:bg},deleteSoftLineBackward:{unit:fg,direction:bg},deleteContentForward:{unit:"character",direction:wg},deleteWordForward:{unit:pg,direction:wg},deleteHardLineForward:{unit:fg,direction:wg},deleteSoftLineForward:{unit:fg,direction:wg}};class kg extends Cr{constructor(e){super(e);const t=e.document;let n=0;t.on("keydown",(()=>{n++})),t.on("keyup",(()=>{n=0})),t.on("beforeinput",((i,o)=>{if(!this.isEnabled)return;const{targetRanges:s,domEvent:r,inputType:a}=o,l=_g[a];if(!l)return;const c={direction:l.direction,unit:l.unit,sequence:n};c.unit==fg&&(c.selectionToRemove=e.createSelection(s[0])),"deleteContentBackward"===a&&(p.isAndroid&&(c.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let n=0;for(const{nextPosition:e}of t){if(e.parent.is("$text")){const t=e.parent.data,i=e.offset;if(lo(t,i)||co(t,i)||uo(t,i))continue;n++}else n++;if(n>1)return!0}return!1}(s)&&(c.unit=fg,c.selectionToRemove=e.createSelection(s)));const d=new ys(t,"delete",s[0]);t.fire(d,new Er(e,r,c)),d.stop.called&&i.stop()})),p.isBlink&&function(e){const t=e.view,n=t.document;let i=null,o=!1;function s(e){return e==Oi.backspace||e==Oi.delete}function r(e){return e==Oi.backspace?bg:wg}n.on("keydown",((e,{keyCode:t})=>{i=t,o=!1})),n.on("keyup",((a,{keyCode:l,domEvent:c})=>{const d=n.selection,h=e.isEnabled&&l==i&&s(l)&&!d.isCollapsed&&!o;if(i=null,h){const e=d.getFirstRange(),i=new ys(n,"delete",e),o={unit:fg,direction:r(l),selectionToRemove:d};n.fire(i,new Er(t,c,o))}})),n.on("beforeinput",((e,{inputType:t})=>{const n=_g[t];s(i)&&n&&n.direction==r(i)&&(o=!0)}),{priority:"high"}),n.on("beforeinput",((e,{inputType:t,data:n})=>{i==Oi.delete&&"insertText"==t&&""==n&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class vg extends mo{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,n=t.document,i=e.model.document;t.addObserver(kg),this._undoOnBackspace=!1;const o=new gg(e,"forward");e.commands.add("deleteForward",o),e.commands.add("forwardDelete",o),e.commands.add("delete",new gg(e,"backward")),this.listenTo(n,"delete",((i,o)=>{n.isComposing||o.preventDefault();const{direction:s,sequence:r,selectionToRemove:a,unit:l}=o,c="forward"===s?"deleteForward":"delete",d={sequence:r};if("selection"==l){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=l;e.execute(c,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",((t,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,e.execute("undo"),n.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(i,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Ag extends mo{static get requires(){return[ug,vg]}static get pluginName(){return"Typing"}}function yg(e,t){let n=e.start;return{text:Array.from(e.getWalker({ignoreElementEnd:!1})).reduce(((e,{item:i})=>i.is("$text")||i.is("$textProxy")?e+i.data:(n=t.createPositionAfter(i),"")),""),range:t.createRange(n,e.end)}}class Cg extends(J()){constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:n})=>{n&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const n=this.model,i=n.document.selection,o=n.createRange(n.createPositionAt(i.focus.parent,0),i.focus),{text:s,range:r}=yg(o,n),a=this.testCallback(s);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const n=Object.assign(t,{text:s,range:r});"object"==typeof a&&Object.assign(n,a),this.fire(`matched:${e}`,n)}}}class xg extends mo{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this._isNextGravityRestorationSkipped=!1,this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,n=e.editing.view,i=e.locale,o=t.document.selection;this.listenTo(n.document,"arrowKey",((e,t)=>{if(!o.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const n=t.keyCode==Oi.arrowright,s=t.keyCode==Oi.arrowleft;if(!n&&!s)return;const r=i.contentLanguageDirection;let a=!1;a="ltr"===r&&n||"rtl"===r&&s?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()}),{context:"$text",priority:"highest"}),this.listenTo(o,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&Ig(o.getFirstPosition(),this.attributes)||this._restoreGravity())})),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,n=this.editor.model,i=n.document.selection,o=i.getFirstPosition();return!(this._isGravityOverridden||o.isAtStart&&Eg(i,t)||!Ig(o,t)||(Pg(e),Eg(i,t)&&Ig(o,t,!0)?Bg(n,t):this._overrideGravity(),0))}_handleBackwardMovement(e){const t=this.attributes,n=this.editor.model,i=n.document.selection,o=i.getFirstPosition();return this._isGravityOverridden?(Pg(e),this._restoreGravity(),Ig(o,t,!0)?Bg(n,t):Tg(n,t,o),!0):o.isAtStart?!!Eg(i,t)&&(Pg(e),Tg(n,t,o),!0):!Eg(i,t)&&Ig(o,t,!0)?(Pg(e),Tg(n,t,o),!0):!!Sg(o,t)&&(o.isAtEnd&&!Eg(i,t)&&Ig(o,t)?(Pg(e),Tg(n,t,o),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,i=e.editing.view.document;e.editing.view.addObserver(gd);let o=!1;this.listenTo(i,"mousedown",(()=>{o=!0})),this.listenTo(i,"selectionChange",(()=>{const e=this.attributes;if(!o)return;if(o=!1,!n.isCollapsed)return;if(!Eg(n,e))return;const i=n.getFirstPosition();Ig(i,e)&&(i.isAtStart||Ig(i,e,!0)?Bg(t,e):this._isGravityOverridden||this._overrideGravity())}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection,n=this.attributes;this.listenTo(e,"insertContent",(()=>{const i=t.getFirstPosition();Eg(t,n)&&Ig(i,n)&&Bg(e,n)}),{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,i=e.editing.view;let o=!1,s=!1;this.listenTo(i.document,"delete",((e,t)=>{o="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{if(!o)return;const e=n.getFirstPosition();s=Eg(n,this.attributes)&&!Sg(e,this.attributes)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{o&&(o=!1,s||e.model.enqueueChange((()=>{const e=n.getFirstPosition();Eg(n,this.attributes)&&Ig(e,this.attributes)&&(e.isAtStart||Ig(e,this.attributes,!0)?Bg(t,this.attributes):this._isGravityOverridden||this._overrideGravity())})))}),{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function Eg(e,t){for(const n of t)if(e.hasAttribute(n))return!0;return!1}function Tg(e,t,n){const i=n.nodeBefore;e.change((n=>{if(i){const t=[],o=e.schema.isObject(i)&&e.schema.isInline(i);for(const[n,s]of i.getAttributes())!e.schema.checkAttribute("$text",n)||o&&!1===e.schema.getAttributeProperties(n).copyFromObject||t.push([n,s]);n.setSelectionAttribute(t)}else n.removeSelectionAttribute(t)}))}function Bg(e,t){e.change((e=>{e.removeSelectionAttribute(t)}))}function Pg(e){e.preventDefault()}function Sg(e,t){return Ig(e.getShiftedBy(-1),t)}function Ig(e,t,n=!1){const{nodeBefore:i,nodeAfter:o}=e;for(const e of t){const t=i?i.getAttribute(e):void 0,s=o?o.getAttribute(e):void 0;if((!n||void 0!==t&&void 0!==s)&&s!==t)return!0}return!1}function Dg(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function Og(e,t,n,i){return i.createRange(Mg(e,t,n,!0,i),Mg(e,t,n,!1,i))}function Mg(e,t,n,i,o){let s=e.textNode||(i?e.nodeBefore:e.nodeAfter),r=null;for(;s&&s.getAttribute(t)==n;)r=s,s=i?s.previousSibling:s.nextSibling;return r?o.createPositionAt(r,i?"before":"after"):e}Dg('"'),Dg("'"),Dg("'"),Dg('"'),Dg('"'),Dg("'");var Rg=o(898);vo()(Rg.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Rg.A.locals;const Vg="italic";class Ng extends mo{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Vg}),e.model.schema.setAttributeProperties(Vg,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Vg,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(Vg,new Ed(e,Vg)),e.keystrokes.set("CTRL+I",Vg),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Italic text"),keystroke:"CTRL+I"}]})}}const Fg="italic";class Lg extends mo{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.commands.get(Fg),n=e.locale.t,i=og({editor:e,commandName:Fg,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",label:n("Italic")});e.ui.componentFactory.add(Fg,(()=>{const e=i(ph);return e.set({tooltip:!0}),e.bind("isOn").to(t,"value"),e})),e.ui.componentFactory.add("menuBar:"+Fg,(()=>i(Xm)))}}class zg extends mo{static get requires(){return[Ng,Lg]}static get pluginName(){return"Italic"}}class jg extends Xu{constructor(e,t){super(e),this.view=t,this._toolbarConfig=jh(e.config.get("toolbar")),this._menuBarConfig=function(e){let t;return t="items"in e&&e.items?{items:e.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...e}:{items:pa(Vm),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...e},t}(e.config.get("menuBar")||{}),this._elementReplacer=new ne,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,n=this.view,i=t.editing.view,o=n.editable,s=i.document.getRoot();o.name=s.rootName,n.render();const r=o.element;this.setEditableElement(o.name,r),n.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(r),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this._initMenuBar(),this._initDialogPluginIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initMenuBar(){const e=this.view;e.menuBarView&&(this._setupMenuBarBehaviors(e.menuBarView.element),e.menuBarView.fillFromConfig(this._menuBarConfig,this.componentFactory))}_initPlaceholder(){const e=this.editor,t=e.editing.view,n=t.document.getRoot(),i=e.sourceElement;let o;const s=e.config.get("placeholder");s&&(o="string"==typeof s?s:s[this.view.editable.name]),!o&&i&&"textarea"===i.tagName.toLowerCase()&&(o=i.getAttribute("placeholder")),o&&(n.placeholder=o),xo({view:t,element:n,isDirectHost:!1,keepOnFocus:!0})}_handleScrollToTheSelectionWithStickyPanel(e,t,n){const i=this.view.stickyPanel;if(i.isSticky){const e=new oi(i.element).height;t.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(n)};this.listenTo(i,"change:isSticky",e),setTimeout((()=>{this.stopListening(i,"change:isSticky",e)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,t=this.editor.plugins.get("Dialog");t.on("show",(()=>{const n=t.view;n.on("moveTo",((t,i)=>{if(!e.isSticky||n.wasMoved)return;const o=new oi(e.contentPanelElement);i[1]<o.bottom+Tu.defaultOffset&&(i[1]=o.bottom+Tu.defaultOffset)}),{priority:"high"})}),{priority:"low"})}_setupMenuBarBehaviors(e){const t=this.editor;this.focusTracker.add(e),t.keystrokes.listenTo(e),t.keystrokes.set("Esc",((n,i)=>{e.contains(this.focusTracker.focusedElement)&&(t.editing.view.focus(),i())})),t.keystrokes.set("Alt+F9",((t,n)=>{e.contains(this.focusTracker.focusedElement)||(this.view.menuBarView.focus(),n())}))}}var Hg=o(4075);vo()(Hg.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Hg.A.locals;class qg extends im{constructor(e,t,n={}){super(e),this.stickyPanel=new fm(e),this.toolbar=new $h(e,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull}),n.useMenuBar&&(this.menuBarView=new ig(e)),this.editable=new sm(e,t)}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class Wg{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const n=this._listeners[e]||[];for(const e of n)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const n=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:n}),n?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){return this.crashes.length<=this._crashNumberLimit||(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function $g(e,t=new Set){const n=[e],i=new Set;let o=0;for(;n.length>o;){const e=n[o++];if(!i.has(e)&&Ug(e)&&!t.has(e))if(i.add(e),Symbol.iterator in e)try{for(const t of e)n.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&n.push(e[t])}return i}function Ug(e){const t=Object.prototype.toString.call(e),n=typeof e;return!("number"===n||"boolean"===n||"string"===n||"symbol"===n||"function"===n||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function Kg(e,t,n=new Set){if(e===t&&"object"==typeof(i=e)&&null!==i)return!0;var i;const o=$g(e,n),s=$g(t,n);for(const e of o)if(s.has(e))return!0;return!1}class Gg extends Wg{constructor(e,t={}){super(t),this._editor=null,this._lifecyclePromise=null,this._initUsingData=!0,this._editables={},this._throttledSave=qu(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,n)=>e.create(t,n)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{const e={},t=[],n=this._config.rootsAttributes||{},i={};for(const[o,s]of Object.entries(this._data.roots))s.isLoaded?(e[o]="",i[o]=n[o]||{}):t.push(o);const o={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:t,rootsAttributes:i,_watchdogInitialData:this._data};return delete o.initialData,o.extraPlugins.push(Zg),this._initUsingData?this.create(e,o,o.context):zn(this._elementOrData)?this.create(this._elementOrData,o,o.context):this.create(this._editables,o,o.context)})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,n){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData="string"==typeof e||Object.keys(e).length>0&&"string"==typeof Object.values(e)[0],this._config=this._cloneEditorConfiguration(t)||{},this._config.context=n,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")})).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}destroy(){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,t=e.model.document.roots.filter((e=>e.isAttached()&&"$graveyard"!=e.rootName)),{plugins:n}=e,i=n.has("CommentsRepository")&&n.get("CommentsRepository"),o=n.has("TrackChanges")&&n.get("TrackChanges"),s={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};t.forEach((e=>{s.roots[e.rootName]={content:JSON.stringify(Array.from(e.getChildren())),attributes:JSON.stringify(Array.from(e.getAttributes())),isLoaded:e._isLoaded}}));for(const t of e.model.markers)t._affectsData&&(s.markers[t.name]={rangeJSON:t.getRange().toJSON(),usingOperation:t._managedUsingOperations,affectsData:t._affectsData});return i&&(s.commentThreads=JSON.stringify(i.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),o&&(s.suggestions=JSON.stringify(o.getSuggestions({toJSON:!0,skipNotAttached:!0}))),s}_getEditables(){const e={};for(const t of this.editor.model.document.getRootNames()){const n=this.editor.ui.getEditableElement(t);n&&(e[t]=n)}return e}_isErrorComingFromThisItem(e){return Kg(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return Ln(e,((e,t)=>zn(e)||"context"===t?e:void 0))}}class Zg{constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",(e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},(e=>{this._restoreCollaborationData(),this._restoreEditorData(e)})),this.editor.data.fire("ready")}),{priority:999})}_createNode(e,t){if("name"in t){const n=e.createElement(t.name,t.attributes);if(t.children)for(const i of t.children)n._appendChild(this._createNode(e,i));return n}return e.createText(t.data,t.attributes)}_restoreEditorData(e){const t=this.editor;Object.entries(this._data.roots).forEach((([n,{content:i,attributes:o}])=>{const s=JSON.parse(i),r=JSON.parse(o),a=t.model.document.getRoot(n);for(const[t,n]of r)e.setAttribute(t,n,a);for(const t of s){const n=this._createNode(e,t);e.insert(n,a,"end")}})),Object.entries(this._data.markers).forEach((([n,i])=>{const{document:o}=t.model,{rangeJSON:{start:s,end:r},...a}=i,l=o.getRoot(s.root),c=e.createPositionFromPath(l,s.path,s.stickiness),d=e.createPositionFromPath(l,r.path,r.stickiness),h=e.createRange(c,d);e.addMarker(n,{range:h,...a})}))}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),t=JSON.parse(this._data.suggestions);e.forEach((e=>{const t=this.editor.config.get("collaboration.channelId"),n=this.editor.plugins.get("CommentsRepository");n.hasCommentThread(e.threadId)&&n.getCommentThread(e.threadId).remove(),n.addCommentThread({channelId:t,...e})})),t.forEach((e=>{const t=this.editor.plugins.get("TrackChangesEditing");t.hasSuggestion(e.id)?t.getSuggestion(e.id).attributes=e.attributes:t.addSuggestionData(e)}))}}const Jg=Symbol("MainQueueId");class Yg extends Wg{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new Qg,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(Jg,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=Xg(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new Gg(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((n,{error:i,causesRestart:o})=>{this._fire("itemError",{itemId:e.id,error:i}),o&&this._actionQueues.enqueue(e.id,(()=>new Promise((n=>{const i=()=>{t.off("restart",i),this._fire("itemRestart",{itemId:e.id}),n()};t.on("restart",i)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=Xg(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(Jg,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(Jg,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=$g(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return Kg(this._context,e.context)}}class Qg{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const n=e===Jg;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const i=(n?Promise.all(this._queues.values()):Promise.all([this._queues.get(Jg),this._queues.get(e)])).then(t),o=i.catch((()=>{}));return this._queues.set(e,o),i.finally((()=>{this._activeActions--,this._queues.get(e)===o&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function Xg(e){return Array.isArray(e)?e:[e]}class ep extends(yd(vd)){constructor(e,t={}){if(!np(e)&&void 0!==t.initialData)throw new T("editor-create-initial-data",null);super(t),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return np(e)?Qn(e):e}(e)),np(e)&&(this.sourceElement=e),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=this.config.get("menuBar"),o=new qg(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n,useMenuBar:i.isVisible});this.ui=new jg(this,o),Ad(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((n=>{const i=new this(e,t);n(i.initPlugins().then((()=>i.ui.init(np(e)?e:null))).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}ep.Context=wo,ep.EditorWatchdog=Gg,ep.ContextWatchdog=Yg;var tp=ep;function np(e){return zn(e)}class ip extends Xu{constructor(e,t){super(e),this.view=t,this._toolbarConfig=jh(e.config.get("toolbar"))}get element(){return this.view.editable.element}init(){const e=this.editor,t=this.view,n=e.editing.view,i=t.editable,o=n.document.getRoot();i.name=o.rootName,t.render();const s=i.element;this.setEditableElement(i.name,s),i.bind("isFocused").to(this.focusTracker),n.attachDomRoot(s),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const e=this.view;this.editor.editing.view.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view,n=t.editable.element,i=t.toolbar;t.panel.bind("isVisible").to(this.focusTracker,"isFocused"),t.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e||0)),t.listenTo(e.ui,"update",(()=>{t.panel.isVisible&&t.panel.pin({target:n,positions:t.panelPositions})})),i.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(i)}_initPlaceholder(){const e=this.editor,t=e.editing.view,n=t.document.getRoot(),i=e.config.get("placeholder");if(i){const e="string"==typeof i?i:i[n.rootName];e&&(n.placeholder=e)}xo({view:t,element:n,isDirectHost:!1,keepOnFocus:!0})}}const op=ui("px");class sp extends nm{constructor(e,t,n,i={}){super(e);const o=e.t;this.toolbar=new $h(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull,isFloating:!0}),this.set("viewportTopOffset",0),this.panel=new Mu(e),this.panelPositions=this._getPanelPositions(),this.panel.extendTemplate({attributes:{class:"ck-toolbar-container"}}),this.editable=new sm(e,t,n,{label:e=>o("Rich Text Editor. Editing area: %0",e.name)}),this._resizeObserver=null}render(){if(super.render(),this.body.add(this.panel),this.registerChild(this.editable),this.panel.content.add(this.toolbar),this.toolbar.options.shouldGroupWhenFull){const e=this.editable.element;this._resizeObserver=new di(e,(()=>{this.toolbar.maxWidth=op(new oi(e).width)}))}}destroy(){super.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getPanelPositionTop(e,t){let n;return n=e.top>t.height+this.viewportTopOffset?e.top-t.height:e.bottom>t.height+this.viewportTopOffset+50?this.viewportTopOffset:e.bottom,n}_getPanelPositions(){const e=[(e,t)=>({top:this._getPanelPositionTop(e,t),left:e.left,name:"toolbar_west",config:{withArrow:!1}}),(e,t)=>({top:this._getPanelPositionTop(e,t),left:e.left+e.width-t.width,name:"toolbar_east",config:{withArrow:!1}})];return"ltr"===this.locale.uiLanguageDirection?e:e.reverse()}}class rp extends(yd(vd)){constructor(e,t={}){if(!lp(e)&&void 0!==t.initialData)throw new T("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return lp(e)?Qn(e):e}(e)),this.model.document.createRoot(),lp(e)&&(this.sourceElement=e,function(e,t){if(t.ckeditorInstance)throw new T("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}(this,e));const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=new sp(this.locale,this.editing.view,this.sourceElement,{shouldToolbarGroupWhenFull:n});this.ui=new ip(this,i),Ad(this)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(e)}))}static create(e,t={}){return new Promise((n=>{if(lp(e)&&"TEXTAREA"===e.tagName)throw new T("editor-wrong-element",null);const i=new this(e,t);n(i.initPlugins().then((()=>i.ui.init())).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}rp.Context=wo,rp.EditorWatchdog=Gg,rp.ContextWatchdog=Yg;var ap=rp;function lp(e){return zn(e)}class cp extends Tr{constructor(e){super(e),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const t=this.document;function n(e){return(n,i)=>{i.preventDefault();const o=i.dropRange?[i.dropRange]:null,s=new v(t,e);t.fire(s,{dataTransfer:i.dataTransfer,method:n.name,targetRanges:o,target:i.target,domEvent:i.domEvent}),s.stop.called&&i.stopPropagation()}}this.listenTo(t,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",n("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,n="drop"==e.type||"paste"==e.type,i={dataTransfer:new da(t,{cacheFiles:n})};"drop"!=e.type&&"dragover"!=e.type||(i.dropRange=function(e,t){const n=t.target.ownerDocument,i=t.clientX,o=t.clientY;let s;return n.caretRangeFromPoint&&n.caretRangeFromPoint(i,o)?s=n.caretRangeFromPoint(i,o):t.rangeParent&&(s=n.createRange(),s.setStart(t.rangeParent,t.rangeOffset),s.collapse(!0)),s?e.domConverter.domRangeToView(s):null}(this.view,e)),this.fire(e.type,e,i)}}const dp=["figcaption","li"],hp=["ol","ul"];function up(e){if(e.is("$text")||e.is("$textProxy"))return e.data;if(e.is("element","img")&&e.hasAttribute("alt"))return e.getAttribute("alt");if(e.is("element","br"))return"\n";let t="",n=null;for(const s of e.getChildren())t+=(i=s,((o=n)?i.is("element","li")&&!i.isEmpty&&i.getChild(0).is("containerElement")||hp.includes(i.name)&&hp.includes(o.name)?"\n\n":i.is("containerElement")||o.is("containerElement")?dp.includes(i.name)||dp.includes(o.name)?"\n":"\n\n":"":"")+up(s)),n=s;var i,o;return t}var mp=function(e){return e==e&&!q(e)},gp=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},pp=function(e){var t=function(e){for(var t=Nt(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,mp(o)]}return t}(e);return 1==t.length&&t[0][2]?gp(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var o=n.length,s=o,r=!i;if(null==e)return!s;for(e=Object(e);o--;){var a=n[o];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){var l=(a=n[o])[0],c=e[l],d=a[1];if(r&&a[2]){if(void 0===c&&!(l in e))return!1}else{var h=new it;if(i)var u=i(c,d,l,e,t,h);if(!(void 0===u?ia(d,c,3,i,h):u))return!1}}return!0}(n,e,t)}},fp=function(e,t){return null!=e&&t in Object(e)},bp=function(e,t){return null!=e&&function(e,t,n){for(var i=-1,o=(t=Xo(t,e)).length,s=!1;++i<o;){var r=es(t[i]);if(!(s=null!=e&&n(e,r)))break;e=e[r]}return s||++i!=o?s:!!(o=null==e?0:e.length)&&vt(o)&&kt(r,o)&&(be(e)||gt(e))}(e,t,fp)},wp=function(e){return zo(e)?(t=es(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return ts(t,e)}}(e);var t},_p=function(e){return"function"==typeof e?e:null==e?$i:"object"==typeof e?be(e)?(t=e[0],n=e[1],zo(t)&&mp(n)?gp(es(t),n):function(e){var i=os(e,t);return void 0===i&&i===n?bp(e,t):ia(n,i,3)}):pp(e):wp(e);var t,n},kp=function(e,t){var n={};return t=_p(t),function(e,t){e&&ji(e,t,Nt)}(e,(function(e,i,o){st(n,i,t(e,i,o))})),n};class vp extends mo{constructor(){super(...arguments),this._markersToCopy=new Map}static get pluginName(){return"ClipboardMarkersUtils"}_registerMarkerToCopy(e,t){this._markersToCopy.set(e,t)}_copySelectedFragmentWithMarkers(e,t,n=(e=>e.model.getSelectedContent(e.model.document.selection))){return this.editor.model.change((i=>{const o=i.model.document.selection;i.setSelection(t);const s=this._insertFakeMarkersIntoSelection(i,i.model.document.selection,e),r=n(i),a=this._removeFakeMarkersInsideElement(i,r);for(const[e,t]of Object.entries(s)){a[e]||(a[e]=i.createRangeIn(r));for(const e of t)i.remove(e)}r.markers.clear();for(const[e,t]of Object.entries(a))r.markers.set(e,t);return i.setSelection(o),r}))}_pasteMarkersIntoTransformedElement(e,t){const n=this._getPasteMarkersFromRangeMap(e);return this.editor.model.change((e=>{const i=this._insertFakeMarkersElements(e,n),o=t(e),s=this._removeFakeMarkersInsideElement(e,o);for(const t of Object.values(i).flat())e.remove(t);for(const[t,n]of Object.entries(s))e.model.markers.has(t)||e.addMarker(t,{usingOperation:!0,affectsData:!0,range:n});return o}))}_pasteFragmentWithMarkers(e){const t=this._getPasteMarkersFromRangeMap(e.markers);e.markers.clear();for(const n of t)e.markers.set(n.name,n.range);return this.editor.model.insertContent(e)}_forceMarkersCopy(e,t,n={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const i=this._markersToCopy.get(e);this._markersToCopy.set(e,n),t(),i?this._markersToCopy.set(e,i):this._markersToCopy.delete(e)}_isMarkerCopyable(e,t){const n=this._getMarkerClipboardConfig(e);if(!n)return!1;if(!t)return!0;const{allowedActions:i}=n;return"all"===i||i.includes(t)}_hasMarkerConfiguration(e){return!!this._getMarkerClipboardConfig(e)}_getMarkerClipboardConfig(e){const[t]=e.split(":");return this._markersToCopy.get(t)||null}_insertFakeMarkersIntoSelection(e,t,n){const i=this._getCopyableMarkersFromSelection(e,t,n);return this._insertFakeMarkersElements(e,i)}_getCopyableMarkersFromSelection(e,t,n){const i=Array.from(t.getRanges()),o=new Set(i.flatMap((t=>Array.from(e.model.markers.getMarkersIntersectingRange(t)))));return Array.from(o).filter((e=>{if(!this._isMarkerCopyable(e.name,n))return!1;const{copyPartiallySelected:t}=this._getMarkerClipboardConfig(e.name);if(!t){const t=e.getRange();return i.some((e=>e.containsRange(t,!0)))}return!0})).map((e=>({name:"dragstart"===n?this._getUniqueMarkerName(e.name):e.name,range:e.getRange()})))}_getPasteMarkersFromRangeMap(e,t=null){const{model:n}=this.editor;return(e instanceof Map?Array.from(e.entries()):Object.entries(e)).flatMap((([e,i])=>{if(!this._hasMarkerConfiguration(e))return[{name:e,range:i}];if(this._isMarkerCopyable(e,t)){const t=this._getMarkerClipboardConfig(e),o=n.markers.has(e)&&"$graveyard"===n.markers.get(e).getRange().root.rootName;return(t.duplicateOnPaste||o)&&(e=this._getUniqueMarkerName(e)),[{name:e,range:i}]}return[]}))}_insertFakeMarkersElements(e,t){const n={},i=t.flatMap((e=>{const{start:t,end:n}=e.range;return[{position:t,marker:e,type:"start"},{position:n,marker:e,type:"end"}]})).sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:t,marker:o,type:s}of i){const i=e.createElement("$marker",{"data-name":o.name,"data-type":s});n[o.name]||(n[o.name]=[]),n[o.name].push(i),e.insert(i,t)}return n}_removeFakeMarkersInsideElement(e,t){const n=this._getAllFakeMarkersFromElement(e,t).reduce(((t,n)=>{const i=n.markerElement&&e.createPositionBefore(n.markerElement);let o=t[n.name],s=!1;return o&&o.start&&o.end&&(this._getMarkerClipboardConfig(n.name).duplicateOnPaste?t[this._getUniqueMarkerName(n.name)]=t[n.name]:s=!0,o=null),s||(t[n.name]={...o,[n.type]:i}),n.markerElement&&e.remove(n.markerElement),t}),{});return kp(n,(n=>new Ia(n.start||e.createPositionFromPath(t,[0]),n.end||e.createPositionAt(t,"end"))))}_getAllFakeMarkersFromElement(e,t){const n=Array.from(e.createRangeIn(t)).flatMap((({item:e})=>{if(!e.is("element","$marker"))return[];const t=e.getAttribute("data-name"),n=e.getAttribute("data-type");return[{markerElement:e,name:t,type:n}]})),i=[],o=[];for(const e of n)"end"===e.type&&(n.some((t=>t.name===e.name&&"start"===t.type))||i.push({markerElement:null,name:e.name,type:"start"})),"start"===e.type&&(n.some((t=>t.name===e.name&&"end"===t.type))||o.unshift({markerElement:null,name:e.name,type:"end"}));return[...i,...n,...o]}_getUniqueMarkerName(e){const t=e.split(":"),n=y().substring(1,6);return 3===t.length?`${t.slice(0,2).join(":")}:${n}`:`${t.join(":")}:${n}`}}class Ap extends mo{static get pluginName(){return"ClipboardPipeline"}static get requires(){return[vp]}init(){this.editor.editing.view.addObserver(cp),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,t,n){const i=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:"cut"===n},(()=>{const o=i._copySelectedFragmentWithMarkers(n,t);this.fire("outputTransformation",{dataTransfer:e,content:o,method:n})}))}_setupPasteDrop(){const e=this.editor,t=e.model,n=e.editing.view,i=n.document,o=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(i,"clipboardInput",((t,n)=>{"paste"!=n.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(i,"clipboardInput",((e,t)=>{const i=t.dataTransfer;let o;if(t.content)o=t.content;else{let e="";i.getData("text/html")?e=function(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(/<!--[\s\S]*?-->/g,"")}(i.getData("text/html")):i.getData("text/plain")&&(((s=(s=i.getData("text/plain")).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("</p><p>")||s.includes("<br>"))&&(s=`<p>${s}</p>`),e=s),o=this.editor.data.htmlProcessor.toView(e)}var s;const r=new v(this,"inputTransformation");this.fire(r,{content:o,dataTransfer:i,targetRanges:t.targetRanges,method:t.method}),r.stop.called&&e.stop(),n.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,n)=>{if(n.content.isEmpty)return;const i=this.editor.data.toModel(n.content,"$clipboardHolder");0!=i.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:i,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,t)=>{t.resultRange=o._pasteFragmentWithMarkers(t.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,n=e.editing.view.document,i=(e,n)=>{const i=n.dataTransfer;n.preventDefault(),this._fireOutputTransformationEvent(i,t.selection,e.name)};this.listenTo(n,"copy",i,{priority:"low"}),this.listenTo(n,"cut",((t,n)=>{e.model.canEditAt(e.model.document.selection)?i(t,n):n.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((t,i)=>{const o=e.data.toView(i.content);n.fire("clipboardOutput",{dataTransfer:i.dataTransfer,content:o,method:i.method})}),{priority:"low"}),this.listenTo(n,"clipboardOutput",((n,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",up(i.content))),"cut"==i.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}function*yp(e,t){for(const n of t)n&&e.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class Cp extends po{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,n=t.document.selection,i=t.schema,o=n.isCollapsed,s=n.getFirstRange(),r=s.start.parent,a=s.end.parent;if(i.isLimit(r)||i.isLimit(a))return o||r!=a||t.deleteContent(n),!1;if(o){const t=yp(e.model.schema,n.getAttributes());return xp(e,s.start),e.setSelectionAttribute(t),!0}{const i=!(s.start.isAtStart&&s.end.isAtEnd),o=r==a;if(t.deleteContent(n,{leaveUnmerged:i}),i){if(o)return xp(e,n.focus),!0;e.setSelection(a,0)}}return!1}}function xp(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}const Ep={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class Tp extends Cr{constructor(e){super(e);const t=this.document;let n=!1;t.on("keydown",((e,t)=>{n=t.shiftKey})),t.on("beforeinput",((i,o)=>{if(!this.isEnabled)return;let s=o.inputType;p.isSafari&&n&&"insertParagraph"==s&&(s="insertLineBreak");const r=o.domEvent,a=Ep[s];if(!a)return;const l=new ys(t,"enter",o.targetRanges[0]);t.fire(l,new Er(e,r,{isSoft:a.isSoft})),l.stop.called&&i.stop()}))}observe(){}stopObserving(){}}class Bp extends mo{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,n=t.document,i=this.editor.t;t.addObserver(Tp),e.commands.add("enter",new Cp(e)),this.listenTo(n,"enter",((i,o)=>{n.isComposing||o.preventDefault(),o.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class Pp extends po{execute(){const e=this.editor.model,t=e.document;e.change((n=>{!function(e,t,n){const i=n.isCollapsed,o=n.getFirstRange(),s=o.start.parent,r=o.end.parent,a=s==r;if(i){const i=yp(e.schema,n.getAttributes());Sp(e,t,o.end),t.removeSelectionAttribute(n.getAttributeKeys()),t.setSelectionAttribute(i)}else{const i=!(o.start.isAtStart&&o.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:i}),a?Sp(e,t,n.focus):i&&t.setSelection(r,0)}}(e,n,t.selection),this.fire("afterExecute",{writer:n})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const n=t.anchor;if(!n||!e.checkChild(n,"softBreak"))return!1;const i=t.getFirstRange(),o=i.start.parent,s=i.end.parent;return!Ip(o,e)&&!Ip(s,e)||o===s}(e.schema,t.selection)}}function Sp(e,t,n){const i=t.createElement("softBreak");e.insertContent(i,n),t.setSelection(i,"after")}function Ip(e,t){return!e.is("rootElement")&&(t.isLimit(e)||Ip(e.parent,t))}class Dp extends mo{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,n=e.conversion,i=e.editing.view,o=i.document,s=this.editor.t;t.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),i.addObserver(Tp),e.commands.add("shiftEnter",new Pp(e)),this.listenTo(o,"enter",((t,n)=>{o.isComposing||n.preventDefault(),n.isSoft&&(e.execute("shiftEnter"),i.scrollToTheSelection())}),{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:s("Insert a soft break (a <code><br></code> element)"),keystroke:"Shift+Enter"}]})}}class Op extends(R()){constructor(){super(...arguments),this._stack=[]}add(e,t){const n=this._stack,i=n[0];this._insertDescriptor(e);const o=n[0];i===o||Mp(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:t})}remove(e,t){const n=this._stack,i=n[0];this._removeDescriptor(e);const o=n[0];i===o||Mp(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex((t=>t.id===e.id));if(Mp(e,t[n]))return;n>-1&&t.splice(n,1);let i=0;for(;t[i]&&(o=t[i],s=e,o.priority>s.priority||!(o.priority<s.priority)&&Rp(o.classes)>Rp(s.classes));)i++;var o,s;t.splice(i,0,e)}_removeDescriptor(e){const t=this._stack,n=t.findIndex((t=>t.id===e));n>-1&&t.splice(n,1)}}function Mp(e,t){return e&&t&&e.priority==t.priority&&Rp(e.classes)==Rp(t.classes)}function Rp(e){return Array.isArray(e)?e.sort().join(","):e}const Vp="ck-widget_selected";function Np(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function Fp(e,t,n={}){if(!e.is("containerElement"))throw new T("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=Hp,t.setCustomProperty("widgetLabel",[],e),n.label&&function(e,t){e.getCustomProperty("widgetLabel").push(t)}(e,n.label),n.hasSelectionHandle&&function(e,t){const n=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),n=new uh;return n.set("content",'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>'),n.render(),t.appendChild(n.element),t}));t.insert(t.createPositionAt(e,0),n),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),function(e,t,n=Lp,i=zp){const o=new Op;o.on("change:top",((t,o)=>{o.oldDescriptor&&i(e,o.oldDescriptor,o.writer),o.newDescriptor&&n(e,o.newDescriptor,o.writer)})),t.setCustomProperty("addHighlight",((e,t,n)=>o.add(t,n)),e),t.setCustomProperty("removeHighlight",((e,t,n)=>o.remove(t,n)),e)}(e,t),e}function Lp(e,t,n){if(t.classes&&n.addClass(Li(t.classes),e),t.attributes)for(const i in t.attributes)n.setAttribute(i,t.attributes[i],e)}function zp(e,t,n){if(t.classes&&n.removeClass(Li(t.classes),e),t.attributes)for(const i in t.attributes)n.removeAttribute(i,e)}function jp(e,t){const n=e.getSelectedElement();if(n){const i=$p(e);if(i)return t.createRange(t.createPositionAt(n,i))}return t.schema.findOptimalInsertionRange(e)}function Hp(){return null}const qp="widget-type-around";function Wp(e,t,n){return!!e&&Np(e)&&!n.isInline(t)}function $p(e){return e.getAttribute(qp)}var Up=o(1549);vo()(Up.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Up.A.locals;const Kp=["before","after"],Gp=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild,Zp="ck-widget__type-around_disabled";class Jp extends mo{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[Bp,vg]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((n,i,o)=>{t.change((e=>{for(const n of t.document.roots)o?e.removeClass(Zp,n):e.addClass(Zp,n)})),o||e.model.change((e=>{e.removeSelectionAttribute(qp)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const n=this.editor,i=n.editing.view,o=n.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(e,t),attributes:o}),i.focus(),i.scrollToTheSelection()}_listenToIfEnabled(e,t,n,i){this.listenTo(e,t,((...e)=>{this.isEnabled&&n(...e)}),i)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=$p(e);if(!t)return!1;const n=e.getSelectedElement();return this._insertParagraph(n,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,n=e.locale.t,i={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,o,s)=>{const r=s.mapper.toViewElement(o.item);r&&Wp(r,o.item,t)&&(!function(e,t,n){const i=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const n=this.toDomElement(e);return function(e,t){for(const n of Kp){const i=new Od({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:t[n],"aria-hidden":"true"},children:[e.ownerDocument.importNode(Gp,!0)]});e.appendChild(i.render())}}(n,t),function(e){const t=new Od({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(n),n}));e.insert(e.createPositionAt(n,"end"),i)}(s.writer,i,r),r.getCustomProperty("widgetLabel").push((()=>this.isEnabled?n("Press Enter to type after or press Shift + Enter to type before the widget"):"")))}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,n=t.document.selection,i=t.schema,o=e.editing.view;function s(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(o.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[Np,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",((t,n)=>{n.directChange&&e.model.change((e=>{e.removeSelectionAttribute(qp)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=n.getSelectedElement();t&&Wp(e.editing.mapper.toViewElement(t),t,i)||e.model.change((e=>{e.removeSelectionAttribute(qp)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,n)=>{const o=n.writer;if(this._currentFakeCaretModelElement){const e=n.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(o.removeClass(Kp.map(s),e),this._currentFakeCaretModelElement=null)}const r=t.selection.getSelectedElement();if(!r)return;const a=n.mapper.toViewElement(r);if(!Wp(a,r,i))return;const l=$p(t.selection);l&&(o.addClass(s(l),a),this._currentFakeCaretModelElement=r)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,n,i)=>{i||e.model.change((e=>{e.removeSelectionAttribute(qp)}))}))}_handleArrowKeyPress(e,t){const n=this.editor,i=n.model,o=i.document.selection,s=i.schema,r=n.editing.view,a=function(e,t){const n=Fi(e,t);return"down"===n||"right"===n}(t.keyCode,n.locale.contentLanguageDirection),l=r.document.selection.getSelectedElement();let c;Wp(l,n.editing.mapper.toModelElement(l),s)?c=this._handleArrowKeyPressOnSelectedWidget(a):o.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,n=$p(t.document.selection);return t.change((t=>n?n!==(e?"after":"before")&&(t.removeSelectionAttribute(qp),!0):(t.setSelectionAttribute(qp,e?"after":"before"),!0)))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,n=t.model,i=n.schema,o=t.plugins.get("Widget"),s=o._getObjectElementNextToSelection(e);return!!Wp(t.editing.mapper.toViewElement(s),s,i)&&(n.change((t=>{o._setSelectionOverElement(s),t.setSelectionAttribute(qp,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,n=t.model,i=n.schema,o=t.editing.mapper,s=n.document.selection,r=e?s.getLastPosition().nodeBefore:s.getFirstPosition().nodeAfter;return!!Wp(o.toViewElement(r),r,i)&&(n.change((t=>{t.setSelection(r,"on"),t.setSelectionAttribute(qp,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((n,i)=>{const o=i.domTarget.closest(".ck-widget__type-around__button");if(!o)return;const s=o.classList.contains("ck-widget__type-around__button_before")?"before":"after",r=function(e,t){const n=e.closest(".ck-widget");return t.mapDomToView(n)}(o,t.domConverter),a=e.editing.mapper.toModelElement(r);this._insertParagraph(a,s),i.preventDefault(),n.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,n=e.editing.view;this._listenToIfEnabled(n.document,"enter",((n,i)=>{if("atTarget"!=n.eventPhase)return;const o=t.getSelectedElement(),s=e.editing.mapper.toViewElement(o),r=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Wp(s,o,r)&&(this._insertParagraph(o,i.isSoft?"before":"after"),a=!0),a&&(i.preventDefault(),n.stop())}),{context:Np})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,n)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(n.selection=e.selection)}),{priority:"high"}),p.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,n=e.model,i=n.schema;this._listenToIfEnabled(t.document,"delete",((t,o)=>{if("atTarget"!=t.eventPhase)return;const s=$p(n.document.selection);if(!s)return;const r=o.direction,a=n.document.selection.getSelectedElement(),l="forward"==r;if("before"===s===l)e.execute("delete",{selection:n.createSelection(a,"on")});else{const t=i.getNearestSelectionRange(n.createPositionAt(a,s),r);if(t)if(t.isCollapsed){const o=n.createSelection(t.start);if(n.modifySelection(o,{direction:r}),o.focus.isEqual(t.start)){const e=function(e,t){let n=t;for(const i of t.getAncestors({parentFirst:!0})){if(i.childCount>1||e.isLimit(i))break;n=i}return n}(i,t.start.parent);n.deleteContent(n.createSelection(e,"on"),{doNotAutoparagraph:!0})}else n.change((n=>{n.setSelection(t),e.execute(l?"deleteForward":"delete")}))}else n.change((n=>{n.setSelection(t),e.execute(l?"deleteForward":"delete")}))}o.preventDefault(),t.stop()}),{context:Np})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,n=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[i,o])=>{if(o&&!o.is("documentSelection"))return;const s=$p(n);return s?(e.stop(),t.change((e=>{const o=n.getSelectedElement(),r=t.createPositionAt(o,s),a=e.createSelection(r),l=t.insertContent(i,a);return e.setSelection(a),l}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,n)=>{const[,i,o={}]=n;if(i&&!i.is("documentSelection"))return;const s=$p(t);s&&(o.findOptimalPosition=s,n[3]=o)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[n])=>{n&&!n.is("documentSelection")||$p(t)&&e.stop()}),{priority:"high"})}}function Yp(e,t,n){const i=e.schema,o=e.createRangeIn(t.root),s="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:e,item:r,type:a}of o.getWalker({startPosition:t,direction:n})){if(i.isLimit(r)&&!i.isInline(r))return e;if(a==s&&i.isBlock(r))return null}return null}function Qp(e,t,n){const i="backward"==n?t.end:t.start;if(e.checkChild(i,"$text"))return i;for(const{nextPosition:i}of t.getWalker({direction:n}))if(e.checkChild(i,"$text"))return i;return null}var Xp=o(3854);vo()(Xp.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Xp.A.locals;class ef extends mo{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[Jp,vg]}init(){const e=this.editor,t=e.editing.view,n=t.document,i=e.t;this.editor.editing.downcastDispatcher.on("selection",((t,n,i)=>{const o=i.writer,s=n.selection;if(s.isCollapsed)return;const r=s.getSelectedElement();if(!r)return;const a=e.editing.mapper.toViewElement(r);var l;Np(a)&&i.consumable.consume(s,"selection")&&o.setSelection(o.createRangeOn(a),{fake:!0,label:(l=a,l.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),""))})})),this.editor.editing.downcastDispatcher.on("selection",((e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const i=n.writer,o=i.document.selection;let s=null;for(const e of o.getRanges())for(const t of e){const e=t.item;Np(e)&&(r=e,!(a=s)||!Array.from(r.getAncestors()).includes(a))&&(i.addClass(Vp,e),this._previouslySelected.add(e),s=e)}var r,a}),{priority:"low"}),t.addObserver(gd),this.listenTo(n,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(n,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[Np,"$text"]}),this.listenTo(n,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(n,"arrowKey",function(e){const t=e.model;return(n,i)=>{const o=i.keyCode==Oi.arrowup,s=i.keyCode==Oi.arrowdown,r=i.shiftKey,a=t.document.selection;if(!o&&!s)return;const l=s;if(r&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,l))return;const c=function(e,t,n){const i=e.model;if(n){const e=t.isCollapsed?t.focus:t.getLastPosition(),n=Yp(i,e,"forward");if(!n)return null;const o=i.createRange(e,n),s=Qp(i.schema,o,"backward");return s?i.createRange(e,s):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),n=Yp(i,e,"backward");if(!n)return null;const o=i.createRange(n,e),s=Qp(i.schema,o,"forward");return s?i.createRange(s,e):null}}(e,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(r)return}(c.isCollapsed||function(e,t,n){const i=e.model,o=e.view.domConverter;if(n){const e=i.createSelection(t.start);i.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=i.createRange(e.focus,t.end))}const s=e.mapper.toViewRange(t),r=o.viewRangeToDom(s),a=oi.getDomRangeRects(r);let l;for(const e of a)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,c,l))&&(t.change((e=>{const n=l?c.end:c.start;if(r){const i=t.createSelection(a.anchor);i.setFocus(n),e.setSelection(i)}else e.setSelection(n)})),n.stop(),i.preventDefault(),i.stopPropagation())}}}(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"}),this.listenTo(n,"tab",((e,t)=>{"atTarget"==e.eventPhase&&(t.shiftKey||this._selectFirstNestedEditable()&&(t.preventDefault(),e.stop()))}),{context:Np,priority:"low"}),this.listenTo(n,"tab",((e,t)=>{t.shiftKey&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())}),{priority:"low"}),this.listenTo(n,"keydown",((e,t)=>{t.keystroke==Oi.esc&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())}),{priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:i("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:i("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:i("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:i("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:i("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const n=this.editor,i=n.editing.view,o=i.document;let s=t.target;if(t.domEvent.detail>=3)return void(this._selectBlockContent(s)&&t.preventDefault());if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(Np(t))return!1;t=t.parent}return!1}(s))return;if(!Np(s)&&(s=s.findAncestor(Np),!s))return;p.isAndroid&&t.preventDefault(),o.isFocused||i.focus();const r=n.editing.mapper.toModelElement(s);this._setSelectionOverElement(r)}_selectBlockContent(e){const t=this.editor,n=t.model,i=t.editing.mapper,o=n.schema,s=i.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),r=function(e,t){for(const n of e.getAncestors({includeSelf:!0,parentFirst:!0})){if(t.checkChild(n,"$text"))return n;if(t.isLimit(n)&&!t.isObject(n))break}return null}(i.toModelElement(s),n.schema);return!!r&&(n.change((e=>{const t=o.isLimit(r)?null:function(e,t){const n=new ya({startPosition:e});for(const{item:e}of n){if(t.isLimit(e)||!e.is("element"))return null;if(t.checkChild(e,"$text"))return e}return null}(e.createPositionAfter(r),o),n=e.createPositionAt(r,0),i=t?e.createPositionAt(t,0):e.createPositionAt(r,"end");e.setSelection(e.createRange(n,i))})),!0)}_handleSelectionChangeOnArrowKeyPress(e,t){const n=t.keyCode,i=this.editor.model,o=i.schema,s=i.document.selection,r=s.getSelectedElement(),a=Fi(n,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(r&&o.isObject(r)){const n=l?s.getLastPosition():s.getFirstPosition(),r=o.getNearestSelectionRange(n,l?"forward":"backward");return void(r&&(i.change((e=>{e.setSelection(r)})),t.preventDefault(),e.stop()))}if(!s.isCollapsed&&!t.shiftKey){const n=s.getFirstPosition(),r=s.getLastPosition(),a=n.nodeAfter,c=r.nodeBefore;return void((a&&o.isObject(a)||c&&o.isObject(c))&&(i.change((e=>{e.setSelection(l?r:n)})),t.preventDefault(),e.stop()))}if(!s.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&o.isObject(d)){if(o.isInline(d)&&c)return;this._setSelectionOverElement(d),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const n=this.editor.model,i=n.schema,o=n.document.selection.getSelectedElement();o&&i.isObject(o)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const n=this._getObjectElementNextToSelection(e);return n?(this.editor.model.change((e=>{let i=t.anchor.parent;for(;i.isEmpty;){const t=i;i=t.parent,e.remove(t)}this._setSelectionOverElement(n)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,i=t.document.selection,o=t.createSelection(i);if(t.modifySelection(o,{direction:e?"forward":"backward"}),o.isEqual(i))return null;const s=e?o.focus.nodeBefore:o.focus.nodeAfter;return s&&n.isObject(s)?s:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(Vp,t);this._previouslySelected.clear()}_selectFirstNestedEditable(){const e=this.editor,t=this.editor.editing.view.document;for(const n of t.selection.getFirstRange().getItems())if(n.is("editableElement")){const t=e.editing.mapper.toModelElement(n);if(!t)continue;const i=e.model.createPositionAt(t,0),o=e.model.schema.getNearestSelectionRange(i,"forward");return e.model.change((e=>{e.setSelection(o)})),!0}return!1}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,n=e.editing.view.document.selection.getFirstPosition().parent,i=(n.is("$text")?n.parent:n).findAncestor(Np);if(!i)return!1;const o=t.toModelElement(i);return!!o&&(e.model.change((e=>{e.setSelection(o,"on")})),!0)}}class tf extends mo{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[hm]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!Np(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:n,getRelatedElement:i,balloonClassName:o="ck-toolbar-container"}){if(!n.length)return void B("widget-toolbar-no-items",{toolbarId:e});const s=this.editor,r=s.t,a=new $h(s.locale);if(a.ariaLabel=t||r("Widget toolbar"),this._toolbarDefinitions.has(e))throw new T("widget-toolbar-duplicated",this,{toolbarId:e});const l={view:a,getRelatedElement:i,balloonClassName:o,itemsConfig:n,initialized:!1};s.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const e=i(s.editing.view.document.selection);e&&this._showToolbar(l,e)},afterBlur:()=>{this._hideToolbar(l)}}),this._toolbarDefinitions.set(e,l)}_updateToolbarsVisibility(){let e=0,t=null,n=null;for(const i of this._toolbarDefinitions.values()){const o=i.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&o)if(this.editor.ui.focusTracker.isFocused){const s=o.getAncestors().length;s>e&&(e=s,t=o,n=i)}else this._isToolbarVisible(i)&&this._hideToolbar(i);else this._isToolbarInBalloon(i)&&this._hideToolbar(i)}n&&this._showToolbar(n,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?nf(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:of(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);nf(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function nf(e,t){const n=e.plugins.get("ContextualBalloon"),i=of(e,t);n.updatePosition(i)}function of(e,t){const n=e.editing.view,i=Mu.defaultPositions;return{target:n.domConverter.mapViewToDom(t),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}J(),J();var sf=o(2262);vo()(sf.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),sf.A.locals;const rf=ui("px");class af extends th{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",(e=>!e))],style:{left:e.to("left",(e=>rf(e))),top:e.to("top",(e=>rf(e))),width:e.to("width",(e=>rf(e)))}}})}}class lf extends mo{constructor(){super(...arguments),this.removeDropMarkerDelayed=ao((()=>this.removeDropMarker()),40),this._updateDropMarkerThrottled=qu((e=>this._updateDropMarker(e)),40),this._reconvertMarkerThrottled=qu((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0),this._dropTargetLineView=new af,this._domEmitter=new(Kn()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,t,n,i,o,s){this.removeDropMarkerDelayed.cancel();const r=cf(this.editor,e,t,n,i,o,s);if(r)return s&&s.containsRange(r)?this.removeDropMarker():void this._updateDropMarkerThrottled(r)}getFinalDropRange(e,t,n,i,o,s){const r=cf(this.editor,e,t,n,i,o,s);return this.removeDropMarker(),r}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:n})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(n);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,n=t.model.markers;t.model.change((t=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("",e.createElement("span"),""),t}))}_updateDropTargetLine(e){const t=this.editor.editing,n=e.start.nodeBefore,i=e.start.nodeAfter,o=e.start.parent,s=n?t.mapper.toViewElement(n):null,r=s?t.view.domConverter.mapViewToDom(s):null,a=i?t.mapper.toViewElement(i):null,l=a?t.view.domConverter.mapViewToDom(a):null,c=t.mapper.toViewElement(o);if(!c)return;const d=t.view.domConverter.mapViewToDom(c),h=this._getScrollableRect(c),{scrollX:u,scrollY:m}=Yn.window,g=r?new oi(r):null,p=l?new oi(l):null,f=new oi(d).excludeScrollbarsAndBorders(),b=g?g.bottom:f.top,w=p?p.top:f.bottom,_=Yn.window.getComputedStyle(d),k=b<=w?(b+w)/2:w;if(h.top<k&&k<h.bottom){const e=f.left+parseFloat(_.paddingLeft),t=f.right-parseFloat(_.paddingRight),n=Math.max(e+u,h.left),i=Math.min(t+u,h.right);this._dropTargetLineView.set({isVisible:!0,left:n,top:k+m,width:i-n})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const t=e.root.rootName;let n;if(this._scrollables.has(t))n=this._scrollables.get(t).domElement;else{n=function(e){let t=e;do{t=t.parentElement;const e=Yn.window.getComputedStyle(t).overflowY;if("auto"==e||"scroll"==e)break}while("BODY"!=t.tagName);return t}(this.editor.editing.view.domConverter.mapViewToDom(e)),this._domEmitter.listenTo(n,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const i=new di(n,this._reconvertMarkerThrottled);this._scrollables.set(t,{domElement:n,resizeObserver:i})}return new oi(n).excludeScrollbarsAndBorders()}}function cf(e,t,n,i,o,s,r){const a=e.model,l=e.editing.mapper;let c=mf(e,t);for(;c;){if(!s)if(a.schema.checkChild(c,"$text")){if(n){const t=n[0].start,s=l.toModelPosition(t);if(!r||Array.from(r.getItems()).every((e=>a.schema.checkChild(s,e)))){if(a.schema.checkChild(s,"$text"))return a.createRange(s);if(t)return hf(e,mf(e,t.parent),i,o)}}}else if(a.schema.isInline(c))return hf(e,c,i,o);if(a.schema.isBlock(c))return hf(e,c,i,o);if(a.schema.checkChild(c,"$block")){const t=Array.from(c.getChildren()).filter((t=>t.is("element")&&!df(e,t)));let n=0,s=t.length;if(0==s)return a.createRange(a.createPositionAt(c,"end"));for(;n<s-1;){const r=Math.floor((n+s)/2);"before"==uf(e,t[r],i,o)?s=r:n=r}return hf(e,t[n],i,o)}c=c.parent}return null}function df(e,t){const n=e.editing.mapper,i=e.editing.view.domConverter,o=n.toViewElement(t);if(!o)return!0;const s=i.mapViewToDom(o);return"none"!=Yn.window.getComputedStyle(s).float}function hf(e,t,n,i){const o=e.model;return o.createRange(o.createPositionAt(t,uf(e,t,n,i)))}function uf(e,t,n,i){const o=e.editing.mapper,s=e.editing.view.domConverter,r=o.toViewElement(t),a=s.mapViewToDom(r),l=new oi(a);return e.model.schema.isInline(t)?n<(l.left+l.right)/2?"before":"after":i<(l.top+l.bottom)/2?"before":"after"}function mf(e,t){const n=e.editing.mapper,i=e.editing.view,o=n.toModelElement(t);if(o)return o;const s=i.createPositionBefore(t),r=n.findMappedViewAncestor(s);return n.toModelElement(r)}class gf extends mo{constructor(){super(...arguments),this._isBlockDragging=!1,this._domEmitter=new(Kn())}static get pluginName(){return"DragDropBlockToolbar"}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",((e,t,n)=>{n?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),p.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const t=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(t,"dragstart",((e,t)=>this._handleBlockDragStart(t))),this._domEmitter.listenTo(Yn.document,"dragover",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(Yn.document,"drop",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(Yn.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0}),this.isEnabled&&t.setAttribute("draggable","true"),this.on("change:isEnabled",((e,n,i)=>{t.setAttribute("draggable",i?"true":"false")}))}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,n=t.document.selection,i=this.editor.editing.view,o=Array.from(n.getSelectedBlocks()),s=t.createRange(t.createPositionBefore(o[0]),t.createPositionAfter(o[o.length-1]));t.change((e=>e.setSelection(s))),this._isBlockDragging=!0,i.focus(),i.getObserver(cp).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),n=e.clientY,i=document.elementFromPoint(t,n),o=this.editor.editing.view;i&&i.closest(".ck-editor__editable")&&o.getObserver(cp).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:i,clientX:t,clientY:n,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}var pf=o(4812);vo()(pf.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),pf.A.locals;class ff extends mo{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=ao((()=>this._clearDraggableAttributes()),40),this._blockMode=!1,this._domEmitter=new(Kn())}static get pluginName(){return"DragDrop"}static get requires(){return[Ap,ef,lf,gf]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(cp),t.addObserver(gd),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,n)=>{n||this._finalizeDragging(!1)})),p.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,n=e.editing.view,i=n.document,o=e.plugins.get(lf);this.listenTo(i,"dragstart",((e,n)=>{if(n.target&&n.target.is("editableElement"))return void n.preventDefault();if(this._prepareDraggedRange(n.target),!this._draggedRange)return void n.preventDefault();this._draggingUid=y(),n.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",n.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const i=t.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(n.dataTransfer,i,"dragstart");const{dataTransfer:o,domTarget:s,domEvent:r}=n,{clientX:a}=r;this._updatePreview({dataTransfer:o,domTarget:s,clientX:a}),n.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(Yn.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&n.focus()})),this.listenTo(i,"dragleave",(()=>{o.removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:n,clientY:i}=t.domEvent;o.updateDropMarker(t.target,t.targetRanges,n,i,this._blockMode,this._draggedRange),this._draggedRange||(t.dataTransfer.dropEffect="copy"),p.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,n=e.plugins.get(lf);this.listenTo(t,"clipboardInput",((t,i)=>{if("drop"!=i.method)return;const{clientX:o,clientY:s}=i.domEvent,r=n.getFinalDropRange(i.target,i.targetRanges,o,s,this._blockMode,this._draggedRange);return r?(this._draggedRange&&this._draggingUid!=i.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),"move"==bf(i.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0)?(this._finalizeDragging(!1),void t.stop()):void(i.targetRanges=[e.editing.mapper.toViewRange(r)])):(this._finalizeDragging(!1),void t.stop())}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(Ap);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const n=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(n)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const n="move"==bf(t.dataTransfer),i=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(i&&n)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,n=t.document;this.listenTo(n,"mousedown",((i,o)=>{if(p.isAndroid||!o)return;this._clearDraggableAttributesDelayed.cancel();let s=wf(o.target);if(p.isBlink&&!e.isReadOnly&&!s&&!n.selection.isCollapsed){const e=n.selection.getSelectedElement();e&&Np(e)||(s=n.selection.editableElement)}s&&(t.change((e=>{e.setAttribute("draggable","true",s)})),this._draggableElement=e.editing.mapper.toModelElement(s))})),this.listenTo(n,"mouseup",(()=>{p.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(e){const t=this.editor,n=t.model;t.plugins.get(lf).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&n.change((e=>{const t=n.createSelection(this._draggedRange);n.deleteContent(t,{doNotAutoparagraph:!0});const i=t.getFirstPosition().parent;i.isEmpty&&!n.schema.checkChild(i,"$text")&&n.schema.checkChild(i,"paragraph")&&e.insertElement("paragraph",i,0)})),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,n=t.model,i=n.document.selection,o=e?wf(e):null;if(o){const e=t.editing.mapper.toModelElement(o);return this._draggedRange=$a.fromRange(n.createRangeOn(e)),this._blockMode=n.schema.isBlock(e),void(t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop"))}if(i.isCollapsed&&!i.getFirstPosition().parent.isEmpty)return;const s=Array.from(i.getSelectedBlocks()),r=i.getFirstRange();if(0==s.length)return void(this._draggedRange=$a.fromRange(r));const a=_f(n,s);if(s.length>1)this._draggedRange=$a.fromRange(a),this._blockMode=!0;else if(1==s.length){const e=r.start.isTouching(a.start)&&r.end.isTouching(a.end);this._draggedRange=$a.fromRange(e?a:r),this._blockMode=e}n.change((e=>e.setSelection(this._draggedRange.toRange())))}_updatePreview({dataTransfer:e,domTarget:t,clientX:n}){const i=this.editor.editing.view,o=i.document.selection.editableElement,s=i.domConverter.mapViewToDom(o),r=Yn.window.getComputedStyle(s);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=ke(Yn.document,"div",{style:"position: fixed; left: -999999px;"}),Yn.document.body.appendChild(this._previewContainer));const a=new oi(s);if(s.contains(t))return;const l=parseFloat(r.paddingLeft),c=ke(Yn.document,"div");c.className="ck ck-content",c.style.width=r.width,c.style.paddingLeft=`${a.left-n+l}px`,p.isiOS&&(c.style.backgroundColor="white"),c.innerHTML=e.getData("text/html"),e.setDragImage(c,0,0),this._previewContainer.appendChild(c)}}function bf(e){return p.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function wf(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(Np);if(Np(e))return e;const t=e.findAncestor((e=>Np(e)||e.is("editableElement")));return Np(t)?t:null}function _f(e,t){const n=t[0],i=t[t.length-1],o=n.getCommonAncestor(i),s=e.createPositionBefore(n),r=e.createPositionAfter(i);if(o&&o.is("element")&&!e.schema.isLimit(o)){const t=e.createRangeOn(o),n=s.isTouching(t.start),i=r.isTouching(t.end);if(n&&i)return _f(e,[o])}return e.createRange(s,r)}class kf extends mo{static get pluginName(){return"PastePlainText"}static get requires(){return[Ap]}init(){const e=this.editor,t=e.model,n=e.editing.view,i=n.document,o=t.document.selection;let s=!1;n.addObserver(cp),this.listenTo(i,"keydown",((e,t)=>{s=t.shiftKey})),e.plugins.get(Ap).on("contentInsertion",((e,n)=>{(s||function(e,t){if(e.childCount>1)return!1;const n=e.getChild(0);return!t.isObject(n)&&0==Array.from(n.getAttributeKeys()).length}(n.content,t.schema))&&t.change((e=>{const i=Array.from(o.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));o.isCollapsed||t.deleteContent(o,{doNotAutoparagraph:!0}),i.push(...o.getAttributes());const s=e.createRangeIn(n.content);for(const t of s.getItems())t.is("$textProxy")&&e.setAttributes(i,t)}))}))}}class vf extends mo{static get pluginName(){return"Clipboard"}static get requires(){return[vp,Ap,ff,kf]}init(){const e=this.editor,t=this.editor.t;e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Copy selected content"),keystroke:"CTRL+C"},{label:t("Paste content"),keystroke:"CTRL+V"},{label:t("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}class Af extends po{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let n=e.schema.getLimitElement(t);if(t.containsEntireContent(n)||!yf(e.schema,n))do{if(n=n.parent,!n)return}while(!yf(e.schema,n));e.change((e=>{e.setSelection(n,"in")}))}}function yf(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const Cf=Vi("Ctrl+A");class xf extends mo{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.t,n=e.editing.view.document;e.commands.add("selectAll",new Af(e)),this.listenTo(n,"keydown",((t,n)=>{Ri(n)===Cf&&(e.execute("selectAll"),n.preventDefault())})),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Select all"),keystroke:"CTRL+A"}]})}}class Ef extends mo{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(()=>{const e=this._createButton(ph);return e.set({tooltip:!0}),e})),e.ui.componentFactory.add("menuBar:selectAll",(()=>this._createButton(Xm)))}_createButton(e){const t=this.editor,n=t.locale,i=t.commands.get("selectAll"),o=new e(t.locale),s=n.t;return o.set({label:s("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A"}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>{t.execute("selectAll"),t.editing.view.focus()})),o}}class Tf extends mo{static get requires(){return[xf,Ef]}static get pluginName(){return"SelectAll"}}class Bf extends po{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const n=t[1];n.batchType||(n.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,n){const i=this.editor.model,o=i.document,s=[],r=e.map((e=>e.getTransformedByOperations(n))),a=r.flat();for(const e of r){const t=e.filter((e=>e.root!=o.graveyard)).filter((e=>!Sf(e,a)));t.length&&(Pf(t),s.push(t[0]))}s.length&&i.change((e=>{e.setSelection(s,{backward:t})}))}_undo(e,t){const n=this.editor.model,i=n.document;this._createdBatches.add(t);const o=e.operations.slice().filter((e=>e.isDocumentOperation));o.reverse();for(const e of o){const o=e.baseVersion+1,s=Array.from(i.history.getOperations(o)),r=Ac([e.getReversed()],s,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let o of r){const s=o.affectedSelectable;s&&!n.canEditAt(s)&&(o=new uc(o.baseVersion)),t.addOperation(o),n.applyOperation(o),i.history.setOperationAsUndone(e,o)}}}}function Pf(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;t<e.length;t++){const n=e[t-1].getJoined(e[t],!0);n&&(t--,e.splice(t,2,n))}}function Sf(e,t){return t.some((t=>t!==e&&t.containsRange(e,!0)))}class If extends Bf{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,n=this._stack.splice(t,1)[0],i=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(i,(()=>{this._undo(n.batch,i);const e=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e)})),this.fire("revert",n.batch,i),this.refresh()}}class Df extends Bf{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const n=e.batch.operations[e.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(n);this._restoreSelection(e.selection.ranges,e.selection.isBackward,i),this._undo(e.batch,t)})),this.refresh()}}class Of extends mo{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor,t=e.t;this._undoCommand=new If(e),this._redoCommand=new Df(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const n=t[0];if(!n.isDocumentOperation)return;const i=n.batch,o=this._redoCommand.createdBatches.has(i),s=this._undoCommand.createdBatches.has(i);this._batchRegistry.has(i)||(this._batchRegistry.add(i),i.isUndoable&&(o?this._undoCommand.addBatch(i):s||(this._undoCommand.addBatch(i),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,n)=>{this._redoCommand.addBatch(n)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Undo"),keystroke:"CTRL+Z"},{label:t("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class Mf extends mo{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,n=e.t,i="ltr"==t.uiLanguageDirection?xd.undo:xd.redo,o="ltr"==t.uiLanguageDirection?xd.redo:xd.undo;this._addButtonsToFactory("undo",n("Undo"),"CTRL+Z",i),this._addButtonsToFactory("redo",n("Redo"),"CTRL+Y",o)}_addButtonsToFactory(e,t,n,i){const o=this.editor;o.ui.componentFactory.add(e,(()=>{const o=this._createButton(ph,e,t,n,i);return o.set({tooltip:!0}),o})),o.ui.componentFactory.add("menuBar:"+e,(()=>this._createButton(Xm,e,t,n,i)))}_createButton(e,t,n,i,o){const s=this.editor,r=s.locale,a=s.commands.get(t),l=new e(r);return l.set({label:n,icon:o,keystroke:i}),l.bind("isEnabled").to(a,"isEnabled"),this.listenTo(l,"execute",(()=>{s.execute(t),s.editing.view.focus()})),l}}class Rf extends mo{static get requires(){return[Of,Mf]}static get pluginName(){return"Undo"}}class Vf extends mo{static get requires(){return[lh,vf,Bp,Tf,Dp,Ag,Rf]}static get pluginName(){return"Essentials"}}class Nf extends po{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=io(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&Ff(t,e.schema)}execute(e={}){const t=this.editor.model,n=t.document,i=e.selection||n.selection;t.canEditAt(i)&&t.change((e=>{const n=i.getSelectedBlocks();for(const i of n)!i.is("element","paragraph")&&Ff(i,t.schema)&&e.rename(i,"paragraph")}))}}function Ff(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class Lf extends po{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,n=e.attributes;let i=e.position;t.canEditAt(i)&&t.change((e=>{if(i=this._findPositionToInsertParagraph(i,e),!i)return;const o=e.createElement("paragraph");n&&t.schema.setAllowedAttributes(o,n,e),t.insertContent(o,i),e.setSelection(o,"in")}))}_findPositionToInsertParagraph(e,t){const n=this.editor.model;if(n.schema.checkChild(e,"paragraph"))return e;const i=n.schema.findAllowedParent(e,"paragraph");if(!i)return null;const o=e.parent,s=n.schema.checkChild(o,"$text");return o.isEmpty||s&&e.isAtEnd?n.createPositionAfter(o):!o.isEmpty&&s&&e.isAtStart?n.createPositionBefore(o):t.split(e,i).position}}class zf extends mo{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new Nf(e)),e.commands.add("insertParagraph",new Lf(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>zf.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}zf.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);var jf=zf;const Hf=xd.paragraph;class qf extends po{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=io(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>Wf(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,n=t.document,i=e.value;t.change((e=>{const o=Array.from(n.selection.getSelectedBlocks()).filter((e=>Wf(e,i,t.schema)));for(const t of o)t.is("element",i)||e.rename(t,i)}))}}function Wf(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}const $f="paragraph";class Uf extends mo{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[jf]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const i of t)"paragraph"!==i.model&&(e.model.schema.register(i.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(i),n.push(i.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new qf(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,i)=>{const o=e.model.document.selection.getFirstPosition().parent;n.some((e=>o.is("element",e.model)))&&!o.is("element",$f)&&0===o.childCount&&i.writer.rename(o,$f)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:C.low+1})}}function Kf(e){const t=e.t,n={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map((e=>{const t=n[e.title];return t&&t!=e.title&&(e.title=t),e}))}var Gf=o(6232);vo()(Gf.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Gf.A.locals;class Zf extends mo{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,n=Kf(e),i=t("Choose heading"),o=t("Heading");e.ui.componentFactory.add("heading",(t=>{const s={},r=new no,a=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[a];for(const e of n){const t={type:"button",model:new am({label:e.title,class:e.class,role:"menuitemradio",withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),c.push(l)):(t.model.bind("isOn").to(a,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),r.add(t),s[e.model]=e.title}const d=ou(t);return function(e,t,n={}){e.isOpen?au(e,t,n):e.once("change:isOpen",(()=>au(e,t,n)),{priority:"highest"}),lu(e,(()=>e.listView.items.find((e=>e instanceof Zh&&e.children.first.isOn))))}(d,r,{ariaLabel:o,role:"menu"}),d.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",((...e)=>e.some((e=>e)))),d.buttonView.bind("label").to(a,"value",l,"value",((e,t)=>{const n=t?"paragraph":e;return"boolean"==typeof n?i:s[n]?s[n]:i})),d.buttonView.bind("ariaLabel").to(a,"value",l,"value",((e,t)=>{const n=t?"paragraph":e;return"boolean"==typeof n?o:s[n]?`${s[n]}, ${o}`:o})),this.listenTo(d,"execute",(t=>{const{commandName:n,commandValue:i}=t.source;e.execute(n,i?{value:i}:void 0),e.editing.view.focus()})),d})),e.ui.componentFactory.add("menuBar:heading",(i=>{const o=new Jm(i),s=e.commands.get("heading"),r=e.commands.get("paragraph"),a=[s],l=new Ym(i);o.set({class:"ck-heading-dropdown"}),l.set({ariaLabel:t("Heading"),role:"menu"}),o.buttonView.set({label:t("Heading")}),o.panelView.children.add(l);for(const t of n){const n=new Dm(i,o),c=new Xm(i);n.children.add(c),l.items.add(n),c.set({label:t.title,role:"menuitemradio",class:t.class}),c.bind("ariaChecked").to(c,"isOn"),c.delegate("execute").to(o),c.on("execute",(()=>{const n="paragraph"===t.model?"paragraph":"heading";e.execute(n,{value:t.model}),e.editing.view.focus()})),"paragraph"===t.model?(c.bind("isOn").to(r,"value"),a.push(r)):c.bind("isOn").to(s,"value",(e=>e===t.model))}return o.bind("isEnabled").toMany(a,"isEnabled",((...e)=>e.some((e=>e)))),o}))}}class Jf extends mo{static get requires(){return[Uf,Zf]}static get pluginName(){return"Heading"}}const Yf={heading1:xd.heading1,heading2:xd.heading2,heading3:xd.heading3,heading4:xd.heading4,heading5:xd.heading5,heading6:xd.heading6};new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class Qf{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,n)=>{if(!n.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!n.schema.isInline(t.item))return;const i=n.writer,o=i.document.selection;for(const e of this._definitions){const s=i.createAttributeElement("a",e.attributes,{priority:5});e.classes&&i.addClass(e.classes,s);for(const t in e.styles)i.setStyle(t,e.styles[t],s);i.setCustomProperty("link",!0,s),e.callback(t.attributeNewValue)?t.item.is("selection")?i.wrap(o.getFirstRange(),s):i.wrap(n.mapper.toViewRange(t.range),s):i.unwrap(n.mapper.toViewRange(t.range),s)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:n,mapper:i})=>{const o=i.toViewElement(t.item),s=Array.from(o.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const i=ro(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of i)"class"===e?n.addClass(t,s):n.setAttribute(e,t,s);e.classes&&n.addClass(e.classes,s);for(const t in e.styles)n.setStyle(t,e.styles[t],s)}else{for(const[e,t]of i)"class"===e?n.removeClass(t,s):n.removeAttribute(e,s);e.classes&&n.removeClass(e.classes,s);for(const t in e.styles)n.removeStyle(t,s)}}}))}}}var Xf=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),eb=function(e){return Xf.test(e)},tb="\\ud800-\\udfff",nb="["+tb+"]",ib="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ob="\\ud83c[\\udffb-\\udfff]",sb="[^"+tb+"]",rb="(?:\\ud83c[\\udde6-\\uddff]){2}",ab="[\\ud800-\\udbff][\\udc00-\\udfff]",lb="(?:"+ib+"|"+ob+")?",cb="[\\ufe0e\\ufe0f]?",db=cb+lb+"(?:\\u200d(?:"+[sb,rb,ab].join("|")+")"+cb+lb+")*",hb="(?:"+[sb+ib+"?",ib,rb,ab,nb].join("|")+")",ub=RegExp(ob+"(?="+ob+")|"+hb+db,"g"),mb=function(e){return eb(e)?function(e){return e.match(ub)||[]}(e):function(e){return e.split("")}(e)},gb=function(e){e=Qo(e);var t,n,i,o,s=eb(e)?mb(e):void 0,r=s?s[0]:e.charAt(0),a=s?(t=s,n=1,o=t.length,i=void 0===i?o:i,!n&&i>=o?t:ns(t,n,i)).join(""):e.slice(1);return r.toUpperCase()+a};const pb=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,fb=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,bb=/^((\w+:(\/{2,})?)|(\W))/i,wb=["https?","ftps?","mailto"],_b="Ctrl+K";function kb(e,{writer:t}){const n=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,n),n}function vb(e,t=wb){const n=String(e),i=t.join("|");return function(e,t){return!!e.replace(pb,"").match(t)}(n,new RegExp(`${"^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))".replace("<protocols>",i)}`,"i"))?n:"#"}function Ab(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function yb(e,t){const n=(i=e,fb.test(i)?"mailto:":t);var i;const o=!!n&&!Cb(e);return e&&o?n+e:e}function Cb(e){return bb.test(e)}function xb(e){window.open(e,"_blank","noopener")}class Eb extends po{constructor(){super(...arguments),this.manualDecorators=new no,this.automaticDecorators=new Qf}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement()||io(t.getSelectedBlocks());Ab(n,e.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(n,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const n=this.editor.model,i=n.document.selection,o=[],s=[];for(const e in t)t[e]?o.push(e):s.push(e);n.change((t=>{if(i.isCollapsed){const r=i.getFirstPosition();if(i.hasAttribute("linkHref")){const a=Tb(i);let l=Og(r,"linkHref",i.getAttribute("linkHref"),n);i.getAttribute("linkHref")===a&&(l=this._updateLinkContent(n,t,l,e)),t.setAttribute("linkHref",e,l),o.forEach((e=>{t.setAttribute(e,!0,l)})),s.forEach((e=>{t.removeAttribute(e,l)})),t.setSelection(t.createPositionAfter(l.end.nodeBefore))}else if(""!==e){const s=ro(i.getAttributes());s.set("linkHref",e),o.forEach((e=>{s.set(e,!0)}));const{end:a}=n.insertContent(t.createText(e,s),r);t.setSelection(a)}["linkHref",...o,...s].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const r=n.schema.getValidRanges(i.getRanges(),"linkHref"),a=[];for(const e of i.getSelectedBlocks())n.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of r)this._isRangeToUpdate(e,a)&&l.push(e);for(const r of l){let a=r;if(1===l.length){const o=Tb(i);i.getAttribute("linkHref")===o&&(a=this._updateLinkContent(n,t,r,e),t.setSelection(t.createSelection(a)))}t.setAttribute("linkHref",e,a),o.forEach((e=>{t.setAttribute(e,!0,a)})),s.forEach((e=>{t.removeAttribute(e,a)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,n=t.document.selection,i=n.getSelectedElement();return Ab(i,t.schema)?i.getAttribute(e):n.getAttribute(e)}_isRangeToUpdate(e,t){for(const n of t)if(n.containsRange(e))return!1;return!0}_updateLinkContent(e,t,n,i){const o=t.createText(i,{linkHref:i});return e.insertContent(o,n)}}function Tb(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const n=t[0];return n.is("$text")||n.is("$textProxy")?n.data:null}}class Bb extends po{refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement();Ab(n,e.schema)?this.isEnabled=e.schema.checkAttribute(n,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,n=t.document.selection,i=e.commands.get("link");t.change((e=>{const o=n.isCollapsed?[Og(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),t)]:t.schema.getValidRanges(n.getRanges(),"linkHref");for(const t of o)if(e.removeAttribute("linkHref",t),i)for(const n of i.manualDecorators)e.removeAttribute(n.id,t)}))}}class Pb extends(J()){constructor({id:e,label:t,attributes:n,classes:i,styles:o,defaultValue:s}){super(),this.id=e,this.set("value",void 0),this.defaultValue=s,this.label=t,this.attributes=n,this.classes=i,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var Sb=o(4142);vo()(Sb.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Sb.A.locals;const Ib="automatic",Db=/^(https?:)?\/\//;class Ob extends mo{static get pluginName(){return"LinkEditing"}static get requires(){return[xg,ug,Ap]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1})}init(){const e=this.editor,t=this.editor.config.get("link.allowedProtocols");e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:kb}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,n)=>kb(vb(e,t),n)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new Eb(e)),e.commands.add("unlink",new Bb(e));const n=function(e,t){const n={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>("label"in e&&n[e.label]&&(e.label=n[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[n,i]of Object.entries(e)){const e=Object.assign({},i,{id:`link${gb(n)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter((e=>e.mode===Ib))),this._enableManualDecorators(n.filter((e=>"manual"===e.mode))),e.plugins.get(xg).registerAttribute("linkHref"),function(e,t,n,i){const o=e.editing.view,s=new Set;o.document.registerPostFixer((n=>{const o=e.model.document.selection;let r=!1;if(o.hasAttribute(t)){const a=Og(o.getFirstPosition(),t,o.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(a);for(const e of l.getItems())e.is("element","a")&&!e.hasClass(i)&&(n.addClass(i,e),s.add(e),r=!0)}return r})),e.conversion.for("editingDowncast").add((e=>{function t(){o.change((e=>{for(const t of s.values())e.removeClass(i,t),s.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}(e,"linkHref",0,"ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,n=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:Ib,callback:e=>!!e&&Db.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(e),n.length&&t.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,n=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const i=new Pb(e);n.add(i),t.conversion.for("downcast").attributeToElement({model:i.id,view:(e,{writer:t,schema:n},{item:o})=>{if((o.is("selection")||n.isInline(o))&&e){const e=t.createAttributeElement("a",i.attributes,{priority:5});i.classes&&t.addClass(i.classes,e);for(const n in i.styles)t.setStyle(n,i.styles[n],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...i._createPattern()},model:{key:i.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(p.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let n=t.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const i=n.getAttribute("href");i&&(e.stop(),t.preventDefault(),xb(i))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,n)=>{const i=e.commands.get("link").value;i&&n.keyCode===Oi.enter&&n.altKey&&(t.stop(),xb(i))}))}_enableSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(t,"change:attribute",((n,{attributeKeys:i})=>{i.includes("linkHref")&&!t.hasAttribute("linkHref")&&e.change((t=>{var n;!function(e,t){e.removeSelectionAttribute("linkHref");for(const n of t)e.removeSelectionAttribute(n)}(t,(n=e.schema,n.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))))}))}))}_enableClipboardIntegration(){const e=this.editor,t=e.model,n=this.editor.config.get("link.defaultProtocol");n&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",((e,i)=>{t.change((e=>{const t=e.createRangeIn(i.content);for(const i of t.getItems())if(i.hasAttribute("linkHref")){const t=yb(i.getAttribute("linkHref"),n);e.setAttribute("linkHref",t,i)}}))}))}}var Mb=o(9665),Rb=(vo()(Mb.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Mb.A.locals,o(5656));vo()(Rb.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Rb.A.locals;class Vb extends th{constructor(e,t){super(e),this.focusTracker=new oo,this.keystrokes=new so,this._focusables=new Dd;const n=e.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),xd.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),xd.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new Vh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const i=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&i.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:i,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),Id({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new xh(this.locale,du);return t.label=e("Link URL"),t}_createButton(e,t,n,i){const o=new ph(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const n of e.manualDecorators){const i=new bh(this.locale);i.set({name:n.id,label:n.label,withText:!0}),i.bind("isOn").toMany([n,e],"value",((e,t)=>void 0===t&&void 0===e?!!n.defaultValue:!!e)),i.on("execute",(()=>{n.set("value",!i.isOn)})),t.add(i)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new th;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}var Nb=o(1165);vo()(Nb.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Nb.A.locals;class Fb extends th{constructor(e,t={}){super(e),this.focusTracker=new oo,this.keystrokes=new so,this._focusables=new Dd;const n=e.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(n("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(n("Edit link"),xd.pencil,"edit"),this.set("href",void 0),this._linkConfig=t,this._focusCycler=new Vh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){const i=new ph(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.delegate("execute").to(this,n),i}_createPreviewButton(){const e=new ph(this.locale),t=this.bindTemplate,n=this.t;return e.set({withText:!0,tooltip:n("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&vb(e,this._linkConfig.allowedProtocols))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||n("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const Lb="link-ui";class zb extends mo{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[hm]}static get pluginName(){return"LinkUI"}init(){const e=this.editor,t=this.editor.t;e.editing.view.addObserver(md),this._balloon=e.plugins.get(hm),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:Lb,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:Lb,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Create link"),keystroke:_b},{label:t("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new Fb(e.locale,e.config.get("link")),n=e.commands.get("link"),i=e.commands.get("unlink");return t.bind("href").to(n,"value"),t.editButtonView.bind("isEnabled").to(n),t.unlinkButtonView.bind("isEnabled").to(i),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(_b,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),i=e.config.get("link.allowCreatingEmptyLinks"),o=new(Sd(Vb))(e.locale,t);return o.urlInputView.fieldView.bind("value").to(t,"value"),o.urlInputView.bind("isEnabled").to(t,"isEnabled"),o.saveButtonView.bind("isEnabled").to(t,"isEnabled",o.urlInputView,"isEmpty",((e,t)=>e&&(i||!t))),this.listenTo(o,"submit",(()=>{const{value:t}=o.urlInputView.fieldView.element,i=yb(t,n);e.execute("link",i,o.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),o}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link");e.ui.componentFactory.add("link",(()=>{const e=this._createButton(ph);return e.set({tooltip:!0,isToggleable:!0}),e.bind("isOn").to(t,"value",(e=>!!e)),e})),e.ui.componentFactory.add("menuBar:link",(()=>this._createButton(Xm)))}_createButton(e){const t=this.editor,n=t.locale,i=t.commands.get("link"),o=new e(t.locale),s=n.t;return o.set({label:s("Link"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>',keystroke:_b}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>this._showUI(!0))),o}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(_b,((t,n)=>{n(),e.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),Pd({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let n=this._getSelectedLinkElement(),i=s();const o=()=>{const e=this._getSelectedLinkElement(),t=s();n&&!e||!n&&t!==i?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=e,i=t};function s(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,n=e.document;let i;if(t.markers.has(Lb)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(Lb)),n=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));i=e.domConverter.viewRangeToDom(n)}else i=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:i}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,n=t.getSelectedElement();if(t.isCollapsed||n&&Np(n))return jb(t.getFirstPosition());{const n=t.getFirstRange().getTrimmed(),i=jb(n.start),o=jb(n.end);return i&&i==o&&e.createRangeIn(i).getTrimmed().isEqual(n)?i:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const n=e.document.selection.getFirstRange();if(e.markers.has(Lb))t.updateMarker(Lb,{range:n});else if(n.start.isAtEnd){const i=n.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:n});t.addMarker(Lb,{usingOperation:!1,affectsData:!1,range:t.createRange(i,n.end)})}else t.addMarker(Lb,{usingOperation:!1,affectsData:!1,range:n})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(Lb)&&e.change((e=>{e.removeMarker(Lb)}))}}function jb(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const Hb=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class qb extends mo{static get requires(){return[vg,Ob]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(e,t){return t.textNode&&t.textNode.hasAttribute("linkHref")?Og(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const n=this.editor.model,i=n.document.selection,o=i.getFirstPosition(),s=i.getLastPosition();let r=t.getJoined(this._expandLinkRange(n,o)||t);r&&(r=r.getJoined(this._expandLinkRange(n,s)||t)),r&&(r.start.isBefore(o)||r.end.isAfter(s))&&e.setSelection(r)}_enablePasteLinking(){const e=this.editor,t=e.model,n=t.document.selection,i=e.plugins.get("ClipboardPipeline"),o=e.commands.get("link");i.on("inputTransformation",((e,i)=>{if(!this.isEnabled||!o.isEnabled||n.isCollapsed||"paste"!==i.method)return;if(n.rangeCount>1)return;const s=n.getFirstRange(),r=i.dataTransfer.getData("text/plain");if(!r)return;const a=r.match(Hb);a&&a[2]===r&&(t.change((e=>{this._selectEntireLinks(e,s),o.execute(r)})),e.stop())}),{priority:"high"})}_enableTypingHandling(){const e=this.editor,t=new Cg(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=Wb(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,n)=>{const{batch:i,range:o,url:s}=n;if(!i.isTyping)return;const r=o.end.getShiftedBy(-1),a=r.getShiftedBy(-s.length),l=e.model.createRange(a,r);this._applyAutoLink(s,l)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("enter");n&&n.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const n=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("shiftEnter");n&&n.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),n=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:n,range:i}=yg(e,t),o=Wb(n);if(o){const e=t.createRange(i.end.getShiftedBy(-o.length),i.end);this._applyAutoLink(o,e)}}_applyAutoLink(e,t){const n=this.editor.model,i=yb(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,n)&&Cb(i)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(i,t)}_persistAutoLink(e,t){const n=this.editor.model,i=this.editor.plugins.get("Delete");n.enqueueChange((o=>{o.setAttribute("linkHref",e,t),n.enqueueChange((()=>{i.requestUndoOnBackspace()}))}))}}function Wb(e){const t=Hb.exec(e);return t?t[2]:null}class $b extends mo{static get requires(){return[Ob,zb,qb]}static get pluginName(){return"Link"}}var Ub=o(427);vo()(Ub.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ub.A.locals;class Kb{constructor(e,t){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward="forward"==t.direction,this._includeSelf=!!t.includeSelf,this._sameAttributes=Li(t.sameAttributes||[]),this._sameIndent=!!t.sameIndent,this._lowerIndent=!!t.lowerIndent,this._higherIndent=!!t.higherIndent}static first(e,t){return io(new this(e,t)[Symbol.iterator]())}*[Symbol.iterator](){const e=[];for(const{node:t}of Gb(this._getStartNode(),this._isForward?"forward":"backward")){const n=t.getAttribute("listIndent");if(n<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=n}else if(n>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){e.push(t);continue}}else{if(!this._sameIndent){if(this._higherIndent){e.length&&(yield*e,e.length=0);break}continue}if(this._sameAttributes.some((e=>t.getAttribute(e)!==this._startElement.getAttribute(e))))break}e.length&&(yield*e,e.length=0),yield t}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*Gb(e,t="forward"){const n="forward"==t,i=[];let o=null;for(;Yb(e);){let t=null;if(o){const n=e.getAttribute("listIndent"),s=o.getAttribute("listIndent");n>s?i[s]=o:n<s?(t=i[n],i.length=n):t=o}yield{node:e,previous:o,previousNodeInList:t},o=e,e=n?e.nextSibling:e.previousSibling}}class Zb{constructor(e){this._listHead=e}[Symbol.iterator](){return Gb(this._listHead,"forward")}}class Jb{static next(){return y()}}function Yb(e){return!!e&&e.is("element")&&e.hasAttribute("listItemId")}function Qb(e,t={}){return[...Xb(e,{...t,direction:"backward"}),...Xb(e,{...t,direction:"forward"})]}function Xb(e,t={}){const n="forward"==t.direction,i=Array.from(new Kb(e,{...t,includeSelf:n,sameIndent:!0,sameAttributes:"listItemId"}));return n?i:i.reverse()}function ew(e,t){const n=new Kb(e,{sameIndent:!0,sameAttributes:"listType",...t}),i=new Kb(e,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward",...t});return[...Array.from(n).reverse(),...i]}function tw(e){return!Kb.first(e,{sameIndent:!0,sameAttributes:"listItemId"})}function nw(e){return!Kb.first(e,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function iw(e,t={}){e=Li(e);const n=!1!==t.withNested,i=new Set;for(const t of e)for(const e of Qb(t,{higherIndent:n}))i.add(e);return cw(i)}function ow(e,t){const n=Xb(e,{direction:"forward"}),i=Jb.next();for(const e of n)t.setAttribute("listItemId",i,e);return n}function sw(e,t,n){const i={};for(const[e,n]of t.getAttributes())e.startsWith("list")&&(i[e]=n);const o=Xb(e,{direction:"forward"});for(const e of o)n.setAttributes(i,e);return o}function rw(e,t,{expand:n,indentBy:i=1}={}){e=Li(e);const o=n?iw(e):e;for(const e of o){const n=e.getAttribute("listIndent")+i;n<0?aw(e,t):t.setAttribute("listIndent",n,e)}return o}function aw(e,t){e=Li(e);for(const n of e)n.is("element","listItem")&&t.rename(n,"paragraph");for(const n of e)for(const e of n.getAttributeKeys())e.startsWith("list")&&t.removeAttribute(e,n);return e}function lw(e){if(!e.length)return!1;const t=e[0].getAttribute("listItemId");return!!t&&!e.some((e=>e.getAttribute("listItemId")!=t))}function cw(e){return Array.from(e).filter((e=>"$graveyard"!==e.root.rootName)).sort(((e,t)=>e.index-t.index))}function dw(e){const t=e.document.selection.getSelectedElement();return t&&e.schema.isObject(t)&&e.schema.isBlock(t)?t:null}function hw(e,t){return t.checkChild(e.parent,"listItem")&&t.checkChild(e,"$text")&&!t.isObject(e)}function uw(e,t,n){return Xb(t,{direction:"forward"}).pop().index>e.index?sw(e,t,n):[]}class mw extends po{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=gw(e.document.selection);e.change((e=>{const n=[];lw(t)&&!tw(t[0])?("forward"==this._direction&&n.push(...rw(t,e)),n.push(...ow(t[0],e))):"forward"==this._direction?n.push(...rw(t,e,{expand:!0})):n.push(...function(e,t){const n=iw(e=Li(e)),i=new Set,o=Math.min(...n.map((e=>e.getAttribute("listIndent")))),s=new Map;for(const e of n)s.set(e,Kb.first(e,{lowerIndent:!0}));for(const e of n){if(i.has(e))continue;i.add(e);const n=e.getAttribute("listIndent")-1;if(n<0)aw(e,t);else{if(e.getAttribute("listIndent")==o){const n=uw(e,s.get(e),t);for(const e of n)i.add(e);if(n.length)continue}t.setAttribute("listIndent",n,e)}}return cw(i)}(t,e));for(const t of n){if(!t.hasAttribute("listType"))continue;const n=Kb.first(t,{sameIndent:!0});n&&e.setAttribute("listType",n.getAttribute("listType"),t)}this._fireAfterExecute(n)}))}_fireAfterExecute(e){this.fire("afterExecute",cw(new Set(e)))}_checkEnabled(){let e=gw(this.editor.model.document.selection),t=e[0];if(!t)return!1;if("backward"==this._direction)return!0;if(lw(e)&&!tw(e[0]))return!0;e=iw(e),t=e[0];const n=Kb.first(t,{sameIndent:!0});return!!n&&n.getAttribute("listType")==t.getAttribute("listType")}}function gw(e){const t=Array.from(e.getSelectedBlocks()),n=t.findIndex((e=>!Yb(e)));return-1!=n&&(t.length=n),t}class pw extends po{constructor(e,t,n={}){super(e),this.type=t,this._listWalkerOptions=n.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.document,i=dw(t),o=Array.from(n.selection.getSelectedBlocks()).filter((e=>t.schema.checkAttribute(e,"listType")||hw(e,t.schema))),s=void 0!==e.forceValue?!e.forceValue:this.value;t.change((r=>{if(s){const e=o[o.length-1],t=Xb(e,{direction:"forward"}),n=[];t.length>1&&n.push(...ow(t[1],r)),n.push(...aw(o,r)),n.push(...function(e,t){const n=[];let i=Number.POSITIVE_INFINITY;for(const{node:o}of Gb(e.nextSibling,"forward")){const e=o.getAttribute("listIndent");if(0==e)break;e<i&&(i=e);const s=e-i;t.setAttribute("listIndent",s,o),n.push(o)}return n}(e,r)),this._fireAfterExecute(n)}else if((i||n.selection.isCollapsed)&&Yb(o[0])){const t=ew(i||o[0],this._listWalkerOptions);for(const n of t)r.setAttributes({...e.additionalAttributes,listType:this.type},n);this._fireAfterExecute(t)}else{const n=[];for(const i of o)if(i.hasAttribute("listType"))for(const t of iw(i,{withNested:!1}))t.getAttribute("listType")!=this.type&&(r.setAttributes({...e.additionalAttributes,listType:this.type},t),n.push(t));else!i.is("element","listItem")&&hw(i,t.schema)&&r.rename(i,"listItem"),r.setAttributes({...e.additionalAttributes,listIndent:0,listItemId:Jb.next(),listType:this.type},i),n.push(i);this._fireAfterExecute(n)}}))}_fireAfterExecute(e){this.fire("afterExecute",cw(new Set(e)))}_getValue(){const e=this.editor.model.document.selection,t=Array.from(e.getSelectedBlocks());if(!t.length)return!1;for(const e of t)if(e.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){const e=this.editor.model,t=e.schema,n=e.document.selection,i=Array.from(n.getSelectedBlocks());if(!i.length)return!1;if(this.value)return!0;for(const e of i)if(t.checkAttribute(e,"listType")||hw(e,t))return!0;return!1}}class fw extends po{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:e=!1}={}){const t=this.editor.model,n=t.document.selection,i=[];t.change((o=>{const{firstElement:s,lastElement:r}=this._getMergeSubjectElements(n,e),a=s.getAttribute("listIndent")||0,l=r.getAttribute("listIndent"),c=r.getAttribute("listItemId");if(a!=l){const e=(d=r,Array.from(new Kb(d,{direction:"forward",higherIndent:!0})));i.push(...rw([r,...e],o,{indentBy:a-l,expand:a<l}))}var d;if(e){let e=n;n.isCollapsed&&(e=o.createSelection(o.createRange(o.createPositionAt(s,"end"),o.createPositionAt(r,0)))),t.deleteContent(e,{doNotResetEntireContent:n.isCollapsed});const a=e.getLastPosition().parent,l=a.nextSibling;i.push(a),l&&l!==r&&l.getAttribute("listItemId")==c&&i.push(...sw(l,a,o))}else i.push(...sw(r,s,o));this._fireAfterExecute(i)}))}_fireAfterExecute(e){this.fire("afterExecute",cw(new Set(e)))}_checkEnabled(){const e=this.editor.model,t=e.document.selection,n=dw(e);if(t.isCollapsed||n){const e=n||t.getFirstPosition().parent;if(!Yb(e))return!1;const i="backward"==this._direction?e.previousSibling:e.nextSibling;if(!i)return!1;if(lw([e,i]))return!1}else{const e=t.getLastPosition(),n=t.getFirstPosition();if(e.parent===n.parent)return!1;if(!Yb(e.parent))return!1}return!0}_getMergeSubjectElements(e,t){const n=dw(this.editor.model);let i,o;if(e.isCollapsed||n){const s=n||e.getFirstPosition().parent,r=tw(s);"backward"==this._direction?(o=s,i=r&&!t?Kb.first(s,{sameIndent:!0,lowerIndent:!0}):s.previousSibling):(i=s,o=s.nextSibling)}else i=e.getFirstPosition().parent,o=e.getLastPosition().parent;return{firstElement:i,lastElement:o}}}class bw extends po{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change((e=>{const t=ow(this._getStartBlock(),e);this._fireAfterExecute(t)}))}_fireAfterExecute(e){this.fire("afterExecute",cw(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,t=this._getStartBlock();return e.isCollapsed&&Yb(t)&&!tw(t)}_getStartBlock(){const e=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?e:e.nextSibling}}class ww extends mo{static get pluginName(){return"ListUtils"}expandListBlocksToCompleteList(e){return function(e){e=Li(e);const t=new Set;for(const n of e)for(const e of ew(n))t.add(e);return cw(t)}(e)}isFirstBlockOfListItem(e){return tw(e)}isListItemBlock(e){return Yb(e)}expandListBlocksToCompleteItems(e,t={}){return iw(e,t)}isNumberedListType(e){return function(e){return"numbered"==e||"customNumbered"==e}(e)}}function _w(e){return e.is("element","ol")||e.is("element","ul")}function kw(e){return e.is("element","li")}function vw(e,t,n,i=Cw(n,t)){return e.createAttributeElement(yw(n),null,{priority:2*t/100-100,id:i})}function Aw(e,t,n){return e.createAttributeElement("li",null,{priority:(2*t+1)/100-100,id:n})}function yw(e){return"numbered"==e||"customNumbered"==e?"ol":"ul"}function Cw(e,t){return`list-${e}-${t}`}function xw(e,t){const n=e.nodeBefore;if(Yb(n)){let e=n;for(const{node:n}of Gb(e,"backward"))if(e=n,t.has(e))return;t.set(n,e)}else{const n=e.nodeAfter;Yb(n)&&t.set(n,n)}}function Ew(){return(e,t,n)=>{if(!n.consumable.test(t.viewItem,{name:!0}))return;const i=new pd(t.viewItem.document);for(const e of Array.from(t.viewItem.getChildren()))kw(e)||_w(e)||i.remove(e)}}function Tw(e,t,n,{dataPipeline:i}={}){const o=function(e){return(t,n)=>{const i=[];for(const n of e)t.hasAttribute(n)&&i.push(`attribute:${n}`);return!!i.every((e=>!1!==n.test(t,e)))&&(i.forEach((e=>n.consume(t,e))),!0)}}(e);return(s,r,a)=>{const{writer:l,mapper:c,consumable:d}=a,h=r.item;if(!e.includes(r.attributeKey))return;if(!o(h,d))return;const u=function(e,t,n){const i=n.createRangeOn(e);return t.toViewRange(i).getTrimmed().end.nodeBefore}(h,c,n);Pw(u,l,c),function(e,t){let n=e.parent;for(;n.is("attributeElement")&&["ul","ol","li"].includes(n.name);){const i=n.parent;t.unwrap(t.createRangeOn(e),n),n=i}}(u,l);const m=function(e,t,n,i,{dataPipeline:o}){let s=i.createRangeOn(t);if(!tw(e))return s;for(const r of n){if("itemMarker"!=r.scope)continue;const n=r.createElement(i,e,{dataPipeline:o});if(!n)continue;if(i.setCustomProperty("listItemMarker",!0,n),r.canInjectMarkerIntoElement&&r.canInjectMarkerIntoElement(e)?i.insert(i.createPositionAt(t,0),n):(i.insert(s.start,n),s=i.createRange(i.createPositionBefore(n),i.createPositionAfter(t))),!r.createWrapperElement||!r.canWrapElement)continue;const a=r.createWrapperElement(i,e,{dataPipeline:o});i.setCustomProperty("listItemWrapper",!0,a),r.canWrapElement(e)?s=i.wrap(s,a):(s=i.wrap(i.createRangeOn(n),a),s=i.createRange(s.start,i.createPositionAfter(t)))}return s}(h,u,t,l,{dataPipeline:i});!function(e,t,n,i){if(!e.hasAttribute("listIndent"))return;const o=e.getAttribute("listIndent");let s=e;for(let e=o;e>=0;e--){const o=Aw(i,e,s.getAttribute("listItemId")),r=vw(i,e,s.getAttribute("listType"));for(const e of n)"list"!=e.scope&&"item"!=e.scope||!s.hasAttribute(e.attributeName)||e.setAttributeOnDowncast(i,s.getAttribute(e.attributeName),"list"==e.scope?r:o);if(t=i.wrap(t,o),t=i.wrap(t,r),0==e)break;if(s=Kb.first(s,{lowerIndent:!0}),!s)break}}(h,m,t,l)}}function Bw(e,{dataPipeline:t}={}){return(n,{writer:i})=>{if(!Sw(n,e))return null;if(!t)return i.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const o=i.createContainerElement("p");return i.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function Pw(e,t,n){for(;e.parent.is("attributeElement")&&e.parent.getCustomProperty("listItemWrapper");)t.unwrap(t.createRangeOn(e),e.parent);const i=[];o(t.createPositionBefore(e).getWalker({direction:"backward"})),o(t.createRangeIn(e).getWalker());for(const e of i)t.remove(e);function o(e){for(const{item:t}of e){if(t.is("element")&&n.toModelElement(t))break;t.is("element")&&t.getCustomProperty("listItemMarker")&&i.push(t)}}}function Sw(e,t,n=Qb(e)){if(!Yb(e))return!1;for(const n of e.getAttributeKeys())if(!n.startsWith("selection:")&&!t.includes(n))return!1;return n.length<2}var Iw=o(8677),Dw=(vo()(Iw.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Iw.A.locals,o(3434));vo()(Dw.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Dw.A.locals;const Ow=["listType","listIndent","listItemId"];class Mw extends mo{static get pluginName(){return"ListEditing"}static get requires(){return[Bp,vg,ww,Ap]}constructor(e){super(e),this._downcastStrategies=[],e.config.define("list.multiBlock",!0)}init(){const e=this.editor,t=e.model,n=e.config.get("list.multiBlock");if(e.plugins.has("LegacyListEditing"))throw new T("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});t.schema.register("$listItem",{allowAttributes:Ow}),n?(t.schema.extend("$container",{allowAttributesOf:"$listItem"}),t.schema.extend("$block",{allowAttributesOf:"$listItem"}),t.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):t.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const e of Ow)t.schema.setAttributeProperties(e,{copyOnReplace:!0});e.commands.add("numberedList",new pw(e,"numbered")),e.commands.add("bulletedList",new pw(e,"bulleted")),e.commands.add("customNumberedList",new pw(e,"customNumbered",{multiLevel:!0})),e.commands.add("customBulletedList",new pw(e,"customBulleted",{multiLevel:!0})),e.commands.add("indentList",new mw(e,"forward")),e.commands.add("outdentList",new mw(e,"backward")),e.commands.add("splitListItemBefore",new bw(e,"before")),e.commands.add("splitListItemAfter",new bw(e,"after")),n&&(e.commands.add("mergeListItemBackward",new fw(e,"backward")),e.commands.add("mergeListItemForward",new fw(e,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration()}afterInit(){const e=this.editor.commands,t=e.get("indent"),n=e.get("outdent");t&&t.registerChildCommand(e.get("indentList"),{priority:"high"}),n&&n.registerChildCommand(e.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}getListAttributeNames(){return[...Ow,...this._downcastStrategies.map((e=>e.attributeName))]}_setupDeleteIntegration(){const e=this.editor,t=e.commands.get("mergeListItemBackward"),n=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",((i,o)=>{const s=e.model.document.selection;dw(e.model)||e.model.change((()=>{const r=s.getFirstPosition();if(s.isCollapsed&&"backward"==o.direction){if(!r.isAtStart)return;const n=r.parent;if(!Yb(n))return;if(Kb.first(n,{sameAttributes:"listType",sameIndent:!0})||0!==n.getAttribute("listIndent")){if(!t||!t.isEnabled)return;t.execute({shouldMergeOnBlocksContentLevel:Rw(e.model,"backward")})}else nw(n)||e.execute("splitListItemAfter"),e.execute("outdentList");o.preventDefault(),i.stop()}else{if(s.isCollapsed&&!s.getLastPosition().isAtEnd)return;if(!n||!n.isEnabled)return;n.execute({shouldMergeOnBlocksContentLevel:Rw(e.model,"forward")}),o.preventDefault(),i.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const e=this.editor,t=e.model,n=e.commands,i=n.get("enter");this.listenTo(e.editing.view.document,"enter",((n,i)=>{const o=t.document,s=o.selection.getFirstPosition().parent;if(o.selection.isCollapsed&&Yb(s)&&s.isEmpty&&!i.isSoft){const t=tw(s),o=nw(s);t&&o?(e.execute("outdentList"),i.preventDefault(),n.stop()):t&&!o?(e.execute("splitListItemAfter"),i.preventDefault(),n.stop()):o&&(e.execute("splitListItemBefore"),i.preventDefault(),n.stop())}}),{context:"li"}),this.listenTo(i,"afterExecute",(()=>{const t=n.get("splitListItemBefore");t.refresh(),t.isEnabled&&2===Qb(e.model.document.selection.getLastPosition().parent).length&&t.execute()}))}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",((t,n)=>{const i=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(i).isEnabled&&(e.execute(i),n.stopPropagation(),n.preventDefault(),t.stop())}),{context:"li"})}_setupConversion(){const e=this.editor,t=e.model,n=this.getListAttributeNames(),i=e.config.get("list.multiBlock"),o=i?"paragraph":"listItem";e.conversion.for("upcast").elementToElement({view:"li",model:(e,{writer:t})=>t.createElement(o,{listType:""})}).elementToElement({view:"p",model:(e,{writer:t})=>e.parent&&e.parent.is("element","li")?t.createElement(o,{listType:""}):null,converterPriority:"high"}).add((e=>{e.on("element:li",((e,t,n)=>{const{writer:i,schema:o}=n;if(!t.modelRange)return;const s=Array.from(t.modelRange.getItems({shallow:!0})).filter((e=>o.checkAttribute(e,"listItemId")));if(!s.length)return;const r=Jb.next(),a=function(e){let t=0,n=e.parent;for(;n;){if(kw(n))t++;else{const e=n.previousSibling;e&&kw(e)&&t++}n=n.parent}return t}(t.viewItem);let l=t.viewItem.parent&&t.viewItem.parent.is("element","ol")?"numbered":"bulleted";const c=s[0].getAttribute("listType");c&&(l=c);const d={listItemId:r,listIndent:a,listType:l};for(const e of s)e.hasAttribute("listItemId")||i.setAttributes(d,e);s.length>1&&s[1].getAttribute("listItemId")!=d.listItemId&&n.keepEmptyElement(s[0])})),e.on("element:ul",Ew(),{priority:"high"}),e.on("element:ol",Ew(),{priority:"high"})})),i||e.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),e.conversion.for("editingDowncast").elementToElement({model:o,view:Bw(n),converterPriority:"high"}).add((e=>{var i;e.on("attribute",Tw(n,this._downcastStrategies,t)),e.on("remove",(i=t.schema,(e,t,n)=>{const{writer:o,mapper:s}=n,r=e.name.split(":")[1];if(!i.checkAttribute(r,"listItemId"))return;const a=s.toViewPosition(t.position),l=t.position.getShiftedBy(t.length),c=s.toViewPosition(l,{isPhantom:!0}),d=o.createRange(a,c).getTrimmed().end.nodeBefore;d&&Pw(d,o,s)}))})),e.conversion.for("dataDowncast").elementToElement({model:o,view:Bw(n,{dataPipeline:!0}),converterPriority:"high"}).add((e=>{e.on("attribute",Tw(n,this._downcastStrategies,t,{dataPipeline:!0}))}));const s=(r=this._downcastStrategies,a=e.editing.view,(e,t)=>{if(t.modelPosition.offset>0)return;const n=t.modelPosition.parent;if(!Yb(n))return;if(!r.some((e=>"itemMarker"==e.scope&&e.canInjectMarkerIntoElement&&e.canInjectMarkerIntoElement(n))))return;const i=t.mapper.toViewElement(n),o=a.createRangeIn(i),s=o.getWalker();let l=o.start;for(const{item:e}of s){if(e.is("element")&&t.mapper.toModelElement(e)||e.is("$textProxy"))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&(l=a.createPositionAfter(e),s.skip((({previousPosition:e})=>!e.isEqual(l))))}t.viewPosition=l});var r,a;e.editing.mapper.on("modelToViewPosition",s),e.data.mapper.on("modelToViewPosition",s),this.listenTo(t.document,"change:data",function(e,t,n,i){return()=>{const i=e.document.differ.getChanges(),r=[],a=new Map,l=new Set;for(const e of i)if("insert"==e.type&&"$text"!=e.name)xw(e.position,a),e.attributes.has("listItemId")?l.add(e.position.nodeAfter):xw(e.position.getShiftedBy(e.length),a);else if("remove"==e.type&&e.attributes.has("listItemId"))xw(e.position,a);else if("attribute"==e.type){const t=e.range.start.nodeAfter;n.includes(e.attributeKey)?(xw(e.range.start,a),null===e.attributeNewValue?(xw(e.range.start.getShiftedBy(1),a),s(t)&&r.push(t)):l.add(t)):Yb(t)&&s(t)&&r.push(t)}for(const e of a.values())r.push(...o(e,l));for(const e of new Set(r))t.reconvertItem(e)};function o(e,t){const i=[],o=new Set,a=[];for(const{node:l,previous:c}of Gb(e,"forward")){if(o.has(l))continue;const e=l.getAttribute("listIndent");c&&e<c.getAttribute("listIndent")&&(a.length=e+1),a[e]=Object.fromEntries(Array.from(l.getAttributes()).filter((([e])=>n.includes(e))));const d=Xb(l,{direction:"forward"});for(const e of d)o.add(e),(s(e,d)||r(e,a,t))&&i.push(e)}return i}function s(e,o){const s=t.mapper.toViewElement(e);if(!s)return!1;if(i.fire("checkElement",{modelElement:e,viewElement:s}))return!0;if(!e.is("element","paragraph")&&!e.is("element","listItem"))return!1;const r=Sw(e,n,o);return!(!r||!s.is("element","p"))||!(r||!s.is("element","span"))}function r(e,n,o){if(o.has(e))return!1;const s=t.mapper.toViewElement(e);let r=n.length-1;for(let e=s.parent;!e.is("editableElement");e=e.parent){const t=kw(e),o=_w(e);if(!o&&!t)continue;const s="checkAttributes:"+(t?"item":"list");if(i.fire(s,{viewElement:e,modelAttributes:n[r]}))break;if(o&&(r--,r<0))return!1}return!0}}(t,e.editing,n,this),{priority:"high"}),this.on("checkAttributes:item",((e,{viewElement:t,modelAttributes:n})=>{t.id!=n.listItemId&&(e.return=!0,e.stop())})),this.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:n})=>{t.name==yw(n.listType)&&t.id==Cw(n.listType,n.listIndent)||(e.return=!0,e.stop())}))}_setupModelPostFixing(){const e=this.editor.model,t=this.getListAttributeNames();e.document.registerPostFixer((n=>function(e,t,n,i){const o=e.document.differ.getChanges(),s=new Map,r=i.editor.config.get("list.multiBlock");let a=!1;for(const i of o){if("insert"==i.type&&"$text"!=i.name){const o=i.position.nodeAfter;if(!e.schema.checkAttribute(o,"listItemId"))for(const e of Array.from(o.getAttributeKeys()))n.includes(e)&&(t.removeAttribute(e,o),a=!0);xw(i.position,s),i.attributes.has("listItemId")||xw(i.position.getShiftedBy(i.length),s);for(const{item:t,previousPosition:n}of e.createRangeIn(o))Yb(t)&&xw(n,s)}else"remove"==i.type?xw(i.position,s):"attribute"==i.type&&n.includes(i.attributeKey)&&(xw(i.range.start,s),null===i.attributeNewValue&&xw(i.range.start.getShiftedBy(1),s));if(!r&&"attribute"==i.type&&Ow.includes(i.attributeKey)){const e=i.range.start.nodeAfter;null===i.attributeNewValue&&e&&e.is("element","listItem")?(t.rename(e,"paragraph"),a=!0):null===i.attributeOldValue&&e&&e.is("element")&&"listItem"!=e.name&&(t.rename(e,"listItem"),a=!0)}}const l=new Set;for(const e of s.values())a=i.fire("postFixer",{listNodes:new Zb(e),listHead:e,writer:t,seenIds:l})||a;return a}(e,n,t,this))),this.on("postFixer",((e,{listNodes:t,writer:n})=>{e.return=function(e,t){let n=0,i=-1,o=null,s=!1;for(const{node:r}of e){const e=r.getAttribute("listIndent");if(e>n){let a;null===o?(o=e-n,a=n):(o>e&&(o=e),a=e-o),a>i+1&&(a=i+1),t.setAttribute("listIndent",a,r),s=!0,i=a}else o=null,n=e+1,i=e}return s}(t,n)||e.return}),{priority:"high"}),this.on("postFixer",((e,{listNodes:t,writer:n,seenIds:i})=>{e.return=function(e,t,n){const i=new Set;let o=!1;for(const{node:s}of e){if(i.has(s))continue;let e=s.getAttribute("listType"),r=s.getAttribute("listItemId");if(t.has(r)&&(r=Jb.next()),t.add(r),s.is("element","listItem"))s.getAttribute("listItemId")!=r&&(n.setAttribute("listItemId",r,s),o=!0);else for(const t of Xb(s,{direction:"forward"}))i.add(t),t.getAttribute("listType")!=e&&(r=Jb.next(),e=t.getAttribute("listType")),t.getAttribute("listItemId")!=r&&(n.setAttribute("listItemId",r,t),o=!0)}return o}(t,i,n)||e.return}),{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model,t=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",function(e){return(t,[n,i])=>{const o=n.is("documentFragment")?Array.from(n.getChildren()):[n];if(!o.length)return;const s=(i?e.createSelection(i):e.document.selection).getFirstPosition();let r;if(Yb(s.parent))r=s.parent;else{if(!Yb(s.nodeBefore))return;r=s.nodeBefore}e.change((e=>{const t=r.getAttribute("listType"),n=r.getAttribute("listIndent"),i=o[0].getAttribute("listIndent")||0,s=Math.max(n-i,0);for(const n of o){const i=Yb(n);r.is("element","listItem")&&n.is("element","paragraph")&&e.rename(n,"listItem"),e.setAttributes({listIndent:(i?n.getAttribute("listIndent"):0)+s,listItemId:i?n.getAttribute("listItemId"):Jb.next(),listType:t},n)}}))}}(e),{priority:"high"}),this.listenTo(t,"outputTransformation",((t,n)=>{e.change((e=>{const t=Array.from(n.content.getChildren()),i=t[t.length-1];if(t.length>1&&i.is("element")&&i.isEmpty&&t.slice(0,-1).every(Yb)&&e.remove(i),"copy"==n.method||"cut"==n.method){const t=Array.from(n.content.getChildren());lw(t)&&aw(t,e)}}))}))}_setupAccessibilityIntegration(){const e=this.editor,t=e.t;e.accessibility.addKeystrokeInfoGroup({id:"list",label:t("Keystrokes that can be used in a list"),keystrokes:[{label:t("Increase list item indent"),keystroke:"Tab"},{label:t("Decrease list item indent"),keystroke:"Shift+Tab"}]})}}function Rw(e,t){const n=e.document.selection;if(!n.isCollapsed)return!dw(e);if("forward"===t)return!0;const i=n.getFirstPosition().parent,o=i.previousSibling;return!e.schema.isObject(o)&&(!!o.isEmpty||lw([i,o]))}function Vw(e,t,n,i){e.ui.componentFactory.add(t,(()=>{const o=Nw(ph,e,t,n,i);return o.set({tooltip:!0,isToggleable:!0}),o})),e.ui.componentFactory.add(`menuBar:${t}`,(()=>Nw(Xm,e,t,n,i)))}function Nw(e,t,n,i,o){const s=t.commands.get(n),r=new e(t.locale);return r.set({label:i,icon:o}),r.bind("isOn","isEnabled").to(s,"value","isEnabled"),r.on("execute",(()=>{t.execute(n),t.editing.view.focus()})),r}class Fw extends mo{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;Vw(this.editor,"numberedList",e("Numbered List"),xd.numberedList),Vw(this.editor,"bulletedList",e("Bulleted List"),xd.bulletedList)}}class Lw extends mo{static get requires(){return[Mw,Fw]}static get pluginName(){return"List"}}const zw={},jw={},Hw={},qw=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:e,typeAttribute:t,listType:n}of qw)zw[e]=n,jw[e]=t,t&&(Hw[t]=e);var Ww=o(2157);vo()(Ww.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ww.A.locals;var $w=o(6864);vo()($w.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),$w.A.locals,Vi("Ctrl+Enter");var Uw=o(4522);vo()(Uw.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Uw.A.locals,Vi("Ctrl+Enter");var Kw=function(e){function t(){return a(this,t),d(this,t,arguments)}return u(t,e),r(t)}(tp);Kw.builtinPlugins=[Vf,Jf,jf,ag,zg,$b,Lw],Kw.defaultConfig={};var Gw=function(e){function t(){return a(this,t),d(this,t,arguments)}return u(t,e),r(t)}(ap);Gw.builtinPlugins=[Vf,jf,ag,zg,$b],Gw.defaultConfig={};class Zw extends po{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.schema,i=t.document.selection,o=Array.from(i.getSelectedBlocks()),s=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(s){const t=o.filter((e=>Jw(e)||Qw(n,e)));this._applyQuote(e,t)}else this._removeQuote(e,o.filter(Jw))}))}_getValue(){const e=io(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!Jw(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=io(e.getSelectedBlocks());return!!n&&Qw(t,n)}_removeQuote(e,t){Yw(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=e.createPositionBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=e.createPositionAfter(t.end.parent);e.move(t,n)}))}_applyQuote(e,t){const n=[];Yw(e,t).reverse().forEach((t=>{let i=Jw(t.start);i||(i=e.createElement("blockQuote"),e.wrap(t,i)),n.push(i)})),n.reverse().reduce(((t,n)=>t.nextSibling==n?(e.merge(e.createPositionAfter(t)),t):n))}}function Jw(e){return"blockQuote"==e.parent.name?e.parent:null}function Yw(e,t){let n,i=0;const o=[];for(;i<t.length;){const s=t[i],r=t[i+1];n||(n=e.createPositionBefore(s)),r&&s.nextSibling==r||(o.push(e.createRange(n,e.createPositionAfter(s))),n=null),i++}return o}function Qw(e,t){const n=e.checkChild(t.parent,"blockQuote"),i=e.checkChild(["$root","blockQuote"],t);return n&&i}class Xw extends mo{static get pluginName(){return"BlockQuoteEditing"}static get requires(){return[Bp,vg]}init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new Zw(e)),t.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer((n=>{const i=e.model.document.differ.getChanges();for(const e of i)if("insert"==e.type){const i=e.position.nodeAfter;if(!i)continue;if(i.is("element","blockQuote")&&i.isEmpty)return n.remove(i),!0;if(i.is("element","blockQuote")&&!t.checkChild(e.position,i))return n.unwrap(i),!0;if(i.is("element")){const e=n.createRangeIn(i);for(const i of e.getItems())if(i.is("element","blockQuote")&&!t.checkChild(n.createPositionBefore(i),i))return n.unwrap(i),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return n.remove(t),!0}return!1}));const n=this.editor.editing.view.document,i=e.model.document.selection,o=e.commands.get("blockQuote");this.listenTo(n,"enter",((t,n)=>{i.isCollapsed&&o.value&&i.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(n,"delete",((t,n)=>{if("backward"!=n.direction||!i.isCollapsed||!o.value)return;const s=i.getLastPosition().parent;s.isEmpty&&!s.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())}),{context:"blockquote"})}}var e_=o(9975);vo()(e_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e_.A.locals;class t_ extends mo{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.commands.get("blockQuote");e.ui.componentFactory.add("blockQuote",(()=>{const e=this._createButton(ph);return e.set({tooltip:!0}),e.bind("isOn").to(t,"value"),e})),e.ui.componentFactory.add("menuBar:blockQuote",(()=>this._createButton(Xm)))}_createButton(e){const t=this.editor,n=t.locale,i=t.commands.get("blockQuote"),o=new e(t.locale),s=n.t;return o.set({label:s("Block quote"),icon:xd.quote,isToggleable:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),o}}class n_ extends po{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute("highlight"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"highlight")}execute(e={}){const t=this.editor.model,n=t.document.selection,i=e.value;t.change((e=>{if(n.isCollapsed){const t=n.getFirstPosition();if(n.hasAttribute("highlight")){const n=e=>e.item.hasAttribute("highlight")&&e.item.getAttribute("highlight")===this.value,o=t.getLastMatchingPosition(n,{direction:"backward"}),s=t.getLastMatchingPosition(n),r=e.createRange(o,s);i&&this.value!==i?(t.isEqual(s)||e.setAttribute("highlight",i,r),e.setSelectionAttribute("highlight",i)):(t.isEqual(s)||e.removeAttribute("highlight",r),e.removeSelectionAttribute("highlight"))}else i&&e.setSelectionAttribute("highlight",i)}else{const o=t.schema.getValidRanges(n.getRanges(),"highlight");for(const t of o)i?e.setAttribute("highlight",i,t):e.removeAttribute("highlight",t)}}))}}class i_ extends mo{static get pluginName(){return"HighlightEditing"}constructor(e){super(e),e.config.define("highlight",{options:[{model:"yellowMarker",class:"marker-yellow",title:"Yellow marker",color:"var(--ck-highlight-marker-yellow)",type:"marker"},{model:"greenMarker",class:"marker-green",title:"Green marker",color:"var(--ck-highlight-marker-green)",type:"marker"},{model:"pinkMarker",class:"marker-pink",title:"Pink marker",color:"var(--ck-highlight-marker-pink)",type:"marker"},{model:"blueMarker",class:"marker-blue",title:"Blue marker",color:"var(--ck-highlight-marker-blue)",type:"marker"},{model:"redPen",class:"pen-red",title:"Red pen",color:"var(--ck-highlight-pen-red)",type:"pen"},{model:"greenPen",class:"pen-green",title:"Green pen",color:"var(--ck-highlight-pen-green)",type:"pen"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"highlight"});const t=e.config.get("highlight.options");e.conversion.attributeToElement(function(e){const t={model:{key:"highlight",values:[]},view:{}};for(const n of e)t.model.values.push(n.model),t.view[n.model]={name:"mark",classes:n.class};return t}(t)),e.commands.add("highlight",new n_(e))}}var o_=o(4356);vo()(o_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),o_.A.locals;class s_ extends mo{get localizedOptionTitles(){const e=this.editor.t;return{"Yellow marker":e("Yellow marker"),"Green marker":e("Green marker"),"Pink marker":e("Pink marker"),"Blue marker":e("Blue marker"),"Red pen":e("Red pen"),"Green pen":e("Green pen")}}static get pluginName(){return"HighlightUI"}init(){const e=this.editor.config.get("highlight.options");for(const t of e)this._addHighlighterButton(t);this._addRemoveHighlightButton(),this._addDropdown(e),this._addMenuBarButton(e)}_addRemoveHighlightButton(){const e=this.editor.t,t=this.editor.commands.get("highlight");this._addButton("removeHighlight",e("Remove highlight"),xd.eraser,null,(e=>{e.bind("isEnabled").to(t,"isEnabled")}))}_addHighlighterButton(e){const t=this.editor.commands.get("highlight");this._addButton("highlight:"+e.model,e.title,r_(e.type),e.model,(function(n){n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",(t=>t===e.model)),n.iconView.fillColor=e.color,n.isToggleable=!0}))}_addButton(e,t,n,i,o){const s=this.editor;s.ui.componentFactory.add(e,(e=>{const r=new ph(e),a=this.localizedOptionTitles[t]?this.localizedOptionTitles[t]:t;return r.set({label:a,icon:n,tooltip:!0}),r.on("execute",(()=>{s.execute("highlight",{value:i}),s.editing.view.focus()})),o(r),r}))}_addDropdown(e){const t=this.editor,n=t.t,i=t.ui.componentFactory,o=e[0],s=e.reduce(((e,t)=>(e[t.model]=t,e)),{});i.add("highlight",(r=>{const a=t.commands.get("highlight"),l=ou(r,tu),c=l.buttonView;function d(e,t){const n=e&&e!==c.lastExecuted?e:c.lastExecuted;return s[n][t]}return c.set({label:n("Highlight"),tooltip:!0,lastExecuted:o.model,commandValue:o.model,isToggleable:!0}),c.bind("icon").to(a,"value",(e=>r_(d(e,"type")))),c.bind("color").to(a,"value",(e=>d(e,"color"))),c.bind("commandValue").to(a,"value",(e=>d(e,"model"))),c.bind("isOn").to(a,"value",(e=>!!e)),c.delegate("execute").to(l),l.bind("isEnabled").to(a,"isEnabled"),su(l,(()=>{const t=e.map((e=>{const t=i.create("highlight:"+e.model);return this.listenTo(t,"execute",(()=>{l.buttonView.set({lastExecuted:e.model})})),t}));return t.push(new Lh),t.push(i.create("removeHighlight")),t}),{enableActiveItemFocusOnDropdownOpen:!0,ariaLabel:n("Text highlight toolbar")}),function(e){e.buttonView.actionView.iconView.bind("fillColor").to(e.buttonView,"color")}(l),c.on("execute",(()=>{t.execute("highlight",{value:c.commandValue})})),this.listenTo(l,"execute",(()=>{t.editing.view.focus()})),l}))}_addMenuBarButton(e){const t=this.editor,n=t.t;t.ui.componentFactory.add("menuBar:highlight",(i=>{const o=t.commands.get("highlight"),s=new Jm(i);s.buttonView.set({label:n("Highlight"),icon:r_("marker")}),s.bind("isEnabled").to(o),s.buttonView.iconView.fillColor="transparent";const r=new Ym(i);for(const n of e){const e=new Dm(i,s),a=new Xm(i);a.set({label:n.title,icon:r_(n.type)}),a.delegate("execute").to(s),a.bind("isOn").to(o,"value",(e=>e===n.model)),a.bind("ariaChecked").to(a,"isOn"),a.iconView.bind("fillColor").to(a,"isOn",(e=>e?"transparent":n.color)),a.on("execute",(()=>{t.execute("highlight",{value:n.model}),t.editing.view.focus()})),e.children.add(a),r.items.add(e)}r.items.add(new Jh(i));const a=new Dm(i,s),l=new Xm(i);return l.set({label:n("Remove highlight"),icon:xd.eraser}),l.delegate("execute").to(s),l.on("execute",(()=>{t.execute("highlight",{value:null}),t.editing.view.focus()})),a.children.add(l),r.items.add(a),s.panelView.children.add(r),s}))}}function r_(e){return"marker"===e?'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M10.798 1.59 3.002 12.875l1.895 1.852 2.521 1.402 6.997-12.194z"/><path d="m2.556 16.727.234-.348c-.297-.151-.462-.293-.498-.426-.036-.137.002-.416.115-.837.094-.25.15-.449.169-.595a4.495 4.495 0 0 0 0-.725c-.209-.621-.303-1.041-.284-1.26.02-.218.178-.506.475-.862l6.77-9.414c.539-.91 1.605-.85 3.199.18 1.594 1.032 2.188 1.928 1.784 2.686l-5.877 10.36c-.158.412-.333.673-.526.782-.193.108-.604.179-1.232.21-.362.131-.608.237-.738.318-.13.081-.305.238-.526.47-.293.265-.504.397-.632.397-.096 0-.27-.075-.524-.226l-.31.41-1.6-1.12zm-.279.415 1.575 1.103-.392.515H1.19l1.087-1.618zm8.1-13.656-4.953 6.9L8.75 12.57l4.247-7.574c.175-.25-.188-.647-1.092-1.192-.903-.546-1.412-.652-1.528-.32zM8.244 18.5 9.59 17h9.406v1.5H8.245z"/></svg>':'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M10.126 2.268 2.002 13.874l1.895 1.852 2.521 1.402L14.47 5.481l-1.543-2.568-2.801-.645z"/><path d="m4.5 18.088-2.645-1.852-.04-2.95-.006-.005.006-.008v-.025l.011.008L8.73 2.97c.165-.233.356-.417.567-.557l-1.212.308L4.604 7.9l-.83-.558 3.694-5.495 2.708-.69 1.65 1.145.046.018.85-1.216 2.16 1.512-.856 1.222c.828.967 1.144 2.141.432 3.158L7.55 17.286l.006.005-3.055.797H4.5zm-.634.166-1.976.516-.026-1.918 2.002 1.402zM9.968 3.817l-.006-.004-6.123 9.184 3.277 2.294 6.108-9.162.005.003c.317-.452-.16-1.332-1.064-1.966-.891-.624-1.865-.776-2.197-.349zM8.245 18.5 9.59 17h9.406v1.5H8.245z"/></svg>'}function a_(e,t){const n=e.plugins.get("ImageUtils"),i=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>n.isInlineImageView(e)?i&&("block"==e.getStyle("display")||e.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==t?null:o(e):null;function o(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function l_(e,t){const n=io(t.getSelectedBlocks());return!n||e.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}function c_(e){return e&&e.endsWith("px")?parseInt(e):null}function d_(e){const t=c_(e.getStyle("width")),n=c_(e.getStyle("height"));return!(!t||!n)}const h_=/^(image|image-inline)$/;class u_ extends mo{constructor(){super(...arguments),this._domEmitter=new(Kn())}static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,n=null,i={}){const o=this.editor,s=o.model,r=s.document.selection,a=m_(o,t||r,n);e={...Object.fromEntries(r.getAttributes()),...e};for(const t in e)s.schema.checkAttribute(a,t)||delete e[t];return s.change((n=>{const{setImageSizes:o=!0}=i,r=n.createElement(a,e);return s.insertObject(r,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==a?void 0:"auto"}),r.parent?(o&&this.setImageNaturalSizeAttributes(r),r):null}))}setImageNaturalSizeAttributes(e){const t=e.getAttribute("src");t&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change((n=>{const i=new Yn.window.Image;this._domEmitter.listenTo(i,"load",(()=>{e.getAttribute("width")||e.getAttribute("height")||this.editor.model.enqueueChange(n.batch,(t=>{t.setAttribute("width",i.naturalWidth,e),t.setAttribute("height",i.naturalHeight,e)})),this._domEmitter.stopListening(i,"load")})),i.src=t})))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const n=e.getSelectedElement();if(n&&this.isImageWidget(n))return n;let i=t.parent;for(;i;){if(i.is("element")&&this.isImageWidget(i))return i;i=i.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:h_})}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==m_(e,t,null)){const n=function(e,t){const n=jp(e,t).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}(t,e.model);if(e.model.schema.checkChild(n,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every((e=>!e.is("element","imageBlock")))}(e)}toImageWidget(e,t,n){return t.setCustomProperty("image",!0,e),Fp(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${n}`:n}})}isImageWidget(e){return!!e.getCustomProperty("image")&&Np(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:n}of t.createRangeIn(e))if(this.isInlineImageView(n))return n}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function m_(e,t,n){const i=e.model.schema,o=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?n||("inline"===o?"imageInline":"auto"!==o?"imageBlock":t.is("selection")?l_(i,t):i.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class g_ extends po{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,n=t.plugins.get("ImageUtils"),i=t.model,o=n.getClosestSelectedImageElement(i.document.selection);i.change((t=>{t.setAttribute("alt",e.newValue,o)}))}}class p_ extends mo{static get requires(){return[u_]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new g_(this.editor))}}var f_=o(5575);vo()(f_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),f_.A.locals;class b_ extends th{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new oo,this.keystrokes=new so,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),xd.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),xd.cancel,"ck-button-cancel","cancel"),this._focusables=new Dd,this._focusCycler=new Vh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),Id({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,n,i){const o=new ph(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createLabeledInputView(){const e=this.locale.t,t=new xh(this.locale,du);return t.label=e("Text alternative"),t}}function w_(e){const t=e.editing.view,n=Mu.defaultPositions,i=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(i.getClosestSelectedImageWidget(t.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class __ extends mo{static get requires(){return[hm]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",(n=>{const i=e.commands.get("imageTextAlternative"),o=new ph(n);return o.set({label:t("Change image text alternative"),icon:xd.textAlternative,tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),o.bind("isOn").to(i,"value",(e=>!!e)),this.listenTo(o,"execute",(()=>{this._showForm()})),o}))}_createForm(){const e=this.editor,t=e.editing.view.document,n=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Sd(b_))(e.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),this.listenTo(e.ui,"update",(()=>{n.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const n=w_(e);t.updatePosition(n)}}(e):this._hideForm(!0)})),Pd({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:w_(e)}),n.fieldView.value=n.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class k_ extends mo{static get requires(){return[p_,__]}static get pluginName(){return"ImageTextAlternative"}}function v_(e,t,n){const i=(t,n,i)=>{if(!i.consumable.consume(n.item,t.name))return;const o=i.writer,s=i.mapper.toViewElement(n.item),r=e.findViewImgElement(s);o.setAttribute(n.attributeKey,n.attributeNewValue||"",r)};return e=>{e.on(`attribute:${n}:${t}`,i)}}class A_ extends Cr{observe(e){this.listenTo(e,"load",((e,t)=>{const n=t.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(t)}),{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class y_ extends po{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&B("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&B("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=Li(e.source),n=this.editor.model.document.selection,i=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(n.getAttributes());t.forEach(((e,t)=>{const s=n.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&s&&i.isImage(s)){const t=this.editor.model.createPositionAfter(s);i.insertImage({...e,...o},t)}else i.insertImage({...e,...o})}))}}class C_ extends po{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement(),n=this.editor.plugins.get("ImageUtils");this.editor.model.change((i=>{i.setAttribute("src",e.source,t),this.cleanupImage(i,t),n.setImageNaturalSizeAttributes(t)}))}cleanupImage(e,t){e.removeAttribute("srcset",t),e.removeAttribute("sizes",t),e.removeAttribute("sources",t),e.removeAttribute("width",t),e.removeAttribute("height",t),e.removeAttribute("alt",t)}}class x_ extends mo{static get requires(){return[u_]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(A_),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const n=new y_(e),i=new C_(e);e.commands.add("insertImage",n),e.commands.add("replaceImageSource",i),e.commands.add("imageInsert",n)}}class E_ extends mo{static get requires(){return[u_]}static get pluginName(){return"ImageSizeAttributes"}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const t=this.editor,n=t.plugins.get("ImageUtils"),i="imageBlock"===e?"figure":"img";function o(t,i,o,s){t.on(`attribute:${i}:${e}`,((t,i,r)=>{if(!r.consumable.consume(i.item,t.name))return;const a=r.writer,l=r.mapper.toViewElement(i.item),c=n.findViewImgElement(l);if(null!==i.attributeNewValue?a.setAttribute(o,i.attributeNewValue,c):a.removeAttribute(o,c),i.item.hasAttribute("sources"))return;const d=i.item.hasAttribute("resizedWidth");if("imageInline"===e&&!d&&!s)return;const h=i.item.getAttribute("width"),u=i.item.getAttribute("height");h&&u&&a.setStyle("aspect-ratio",`${h}/${u}`,c)}))}t.conversion.for("upcast").attributeToAttribute({view:{name:i,styles:{width:/.+/}},model:{key:"width",value:e=>d_(e)?c_(e.getStyle("width")):null}}).attributeToAttribute({view:{name:i,key:"width"},model:"width"}).attributeToAttribute({view:{name:i,styles:{height:/.+/}},model:{key:"height",value:e=>d_(e)?c_(e.getStyle("height")):null}}).attributeToAttribute({view:{name:i,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add((e=>{o(e,"width","width",!0),o(e,"height","height",!0)})),t.conversion.for("dataDowncast").add((e=>{o(e,"width","width",!1),o(e,"height","height",!1)}))}}class T_ extends po{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(e={}){const t=this.editor,n=this.editor.model,i=t.plugins.get("ImageUtils"),o=i.getClosestSelectedImageElement(n.document.selection),s=Object.fromEntries(o.getAttributes());return s.src||s.uploadId?n.change((t=>{const{setImageSizes:r=!0}=e,a=Array.from(n.markers).filter((e=>e.getRange().containsItem(o))),l=i.insertImage(s,n.createSelection(o,"on"),this._modelElementName,{setImageSizes:r});if(!l)return null;const c=t.createRangeOn(l);for(const e of a){const n=e.getRange(),i="$graveyard"!=n.root.rootName?n.getJoined(c,!0):c;t.updateMarker(e,{range:i})}return{oldElement:o,newElement:l}})):null}}var B_=o(5241);vo()(B_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),B_.A.locals;class P_ extends mo{static get requires(){return[u_]}static get pluginName(){return"ImagePlaceholder"}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,t=e.conversion,n=e.plugins.get("ImageUtils");t.for("editingDowncast").add((e=>{e.on("attribute:placeholder",((e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;if(!t.item.is("element","imageBlock")&&!t.item.is("element","imageInline"))return;i.consumable.consume(t.item,e.name);const o=i.writer,s=i.mapper.toViewElement(t.item),r=n.findViewImgElement(s);t.attributeNewValue?(o.addClass("image_placeholder",r),o.setStyle("background-image",`url(${t.attributeNewValue})`,r),o.setCustomProperty("editingPipeline:doNotReuseOnce",!0,r)):(o.removeClass("image_placeholder",r),o.removeStyle("background-image",r))}))}))}_setupLoadListener(){const e=this.editor,t=e.model,n=e.editing,i=n.view,o=e.plugins.get("ImageUtils");i.addObserver(A_),this.listenTo(i.document,"imageLoaded",((e,s)=>{const r=i.domConverter.mapDomToView(s.target);if(!r)return;const a=o.getImageWidgetFromImageView(r);if(!a)return;const l=n.mapper.toModelElement(a);l&&l.hasAttribute("placeholder")&&t.enqueueChange({isUndoable:!1},(e=>{e.removeAttribute("placeholder",l)}))}))}}var S_=o(8003);vo()(S_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),S_.A.locals;class I_ extends th{constructor(e,t=[]){super(e),this.focusTracker=new oo,this.keystrokes=new so,this._focusables=new Dd,this.children=this.createCollection(),this._focusCycler=new Vh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const e of t)this.children.add(e),this._focusables.add(e),e instanceof Ah&&this._focusables.addMany(e.children);if(this._focusables.length>1)for(const e of this._focusables)D_(e)&&(e.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()})));this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),Id({view:this});for(const e of this._focusables)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}function D_(e){return"focusCycler"in e}class O_ extends mo{static get pluginName(){return"ImageInsertUI"}static get requires(){return[u_]}constructor(e){super(e),this._integrations=new Map,e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",(()=>{this.isImageSelected=n.isImage(t.getSelectedElement())}));const i=e=>this._createToolbarComponent(e);e.ui.componentFactory.add("insertImage",i),e.ui.componentFactory.add("imageInsert",i)}registerIntegration({name:e,observable:t,buttonViewCreator:n,formViewCreator:i,requiresForm:o}){this._integrations.has(e)&&B("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:t,buttonViewCreator:n,formViewCreator:i,requiresForm:!!o})}_createToolbarComponent(e){const t=this.editor,n=e.t,i=this._prepareIntegrations();if(!i.length)return null;let o;const s=i[0];if(1==i.length){if(!s.requiresForm)return s.buttonViewCreator(!0);o=s.buttonViewCreator(!0)}else{const t=s.buttonViewCreator(!1);o=new tu(e,t),o.tooltip=!0,o.bind("label").to(this,"isImageSelected",(e=>n(e?"Replace image":"Insert image")))}const r=this.dropdownView=ou(e,o),a=i.map((({observable:e})=>"function"==typeof e?e():e));return r.bind("isEnabled").toMany(a,"isEnabled",((...e)=>e.some((e=>e)))),r.once("change:isOpen",(()=>{const e=i.map((({formViewCreator:e})=>e(1==i.length))),n=new I_(t.locale,e);r.panelView.children.add(n)})),r}_prepareIntegrations(){const e=this.editor.config.get("image.insert.integrations"),t=[];if(!e.length)return B("image-insert-integrations-not-specified"),t;for(const n of e)this._integrations.has(n)?t.push(this._integrations.get(n)):["upload","assetManager","url"].includes(n)||B("image-insert-unknown-integration",{item:n});return t.length||B("image-insert-integrations-not-registered"),t}}var M_=o(5604);vo()(M_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),M_.A.locals;class R_ extends mo{static get requires(){return[x_,E_,u_,P_,Ap]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck(((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1})),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new T_(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,i=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:n})=>i.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(n),n,t("image widget"))}),n.for("downcast").add(v_(i,"imageInline","src")).add(v_(i,"imageInline","alt")).add(function(e,t){const n=(t,n,i)=>{if(!i.consumable.consume(n.item,t.name))return;const o=i.writer,s=i.mapper.toViewElement(n.item),r=e.findViewImgElement(s);null===n.attributeNewValue?(o.removeAttribute("srcset",r),o.removeAttribute("sizes",r)):n.attributeNewValue&&(o.setAttribute("srcset",n.attributeNewValue,r),o.setAttribute("sizes","100vw",r))};return e=>{e.on(`attribute:srcset:${t}`,n)}}(i,"imageInline")),n.for("upcast").elementToElement({view:a_(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,i=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline");this.listenTo(o,"inputTransformation",((o,s)=>{const r=Array.from(s.content.getChildren());let a;if(!r.every(i.isBlockImageView))return;a=s.targetRanges?e.editing.mapper.toModelRange(s.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageInline"===l_(t.schema,l)){const e=new pd(n.document),t=r.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((n=>e.setAttribute(...n,i.findViewImgElement(t)))),t.getChild(0)):t));s.content=e.createDocumentFragment(t)}})),this.listenTo(o,"contentInsertion",((e,n)=>{"paste"===n.method&&t.change((e=>{const t=e.createRangeIn(n.content);for(const e of t.getItems())e.is("element","imageInline")&&i.setImageNaturalSizeAttributes(e)}))}))}}var V_=o(7908);function N_(e){const t=e.map((e=>e.replace("+","\\+")));return new RegExp(`^image\\/(${t.join("|")})$`)}function F_(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}vo()(V_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),V_.A.locals;class L_ extends mo{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,n=()=>{const e=this._createButton(wh);return e.set({label:t("Upload image from computer"),tooltip:!0}),e};if(e.ui.componentFactory.add("uploadImage",n),e.ui.componentFactory.add("imageUpload",n),e.ui.componentFactory.add("menuBar:uploadImage",(()=>{const e=this._createButton(eg);return e.label=t("Image from computer"),e})),e.plugins.has("ImageInsertUI")){const n=e.plugins.get("ImageInsertUI");n.registerIntegration({name:"upload",observable:()=>e.commands.get("uploadImage"),buttonViewCreator:()=>{const i=e.ui.componentFactory.create("uploadImage");return i.bind("label").to(n,"isImageSelected",(e=>t(e?"Replace image from computer":"Upload image from computer"))),i},formViewCreator:()=>{const i=e.ui.componentFactory.create("uploadImage");return i.withText=!0,i.bind("label").to(n,"isImageSelected",(e=>t(e?"Replace from computer":"Upload from computer"))),i.on("execute",(()=>{n.dropdownView.isOpen=!1})),i}})}}_createButton(e){const t=this.editor,n=t.locale,i=t.commands.get("uploadImage"),o=t.config.get("image.upload.types"),s=N_(o),r=new e(t.locale),a=n.t;return r.set({acceptedType:o.map((e=>`image/${e}`)).join(","),allowMultipleFiles:!0,label:a("Upload image from computer"),icon:xd.imageUpload}),r.bind("isEnabled").to(i),r.on("done",((e,n)=>{const i=Array.from(n).filter((e=>s.test(e.type)));i.length&&(t.execute("uploadImage",{file:i}),t.editing.view.focus())})),r}}class z_ extends(J()){constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((n,i)=>{t.onload=()=>{const e=t.result;this._data=e,n(e)},t.onerror=()=>{i("error")},t.onabort=()=>{i("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class j_ extends mo{constructor(){super(...arguments),this.loaders=new no,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[Cd]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return B("filerepository-no-upload-adapter"),null;const t=new H_(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof H_?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,n)=>{e===t&&this._loadersMap.delete(n)}))}_updatePendingAction(){const e=this.editor.plugins.get(Cd);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,n=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else e.remove(this._pendingAction),this._pendingAction=null}}class H_ extends(J()){constructor(e,t){super(),this.id=y(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new z_,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new T("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new T("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((n,i)=>{t.rejecter=i,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,n(e)})).catch((e=>{t.isFulfilled=!0,i(e)}))})),t}}class q_{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then((e=>new Promise(((t,n)=>{this._initRequest(),this._initListeners(t,n,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,n){const i=this.xhr,o=this.loader,s=`Couldn't upload file: ${n.name}.`;i.addEventListener("error",(()=>t(s))),i.addEventListener("abort",(()=>t())),i.addEventListener("load",(()=>{const n=i.response;if(!n||n.error)return t(n&&n.error&&n.error.message?n.error.message:s);const o=n.url?{default:n.url}:n.urls;e({...n,urls:o})})),i.upload&&i.upload.addEventListener("progress",(e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)}))}_sendRequest(e){const t=this.options.headers||{},n=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=n;const i=new FormData;i.append("upload",e),this.xhr.send(i)}}var W_=o(394),$_=(vo()(W_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),W_.A.locals,o(524)),U_=(vo()($_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),$_.A.locals,o(9402));vo()(U_.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),U_.A.locals;class K_ extends mo{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.uploadStatusChange=(e,t,n)=>{const i=this.editor,o=t.item,s=o.getAttribute("uploadId");if(!n.consumable.consume(t.item,e.name))return;const r=i.plugins.get("ImageUtils"),a=i.plugins.get(j_),l=s?t.attributeNewValue:null,c=this.placeholder,d=i.editing.mapper.toViewElement(o),h=n.writer;if("reading"==l)return G_(d,h),void Z_(r,c,d,h);if("uploading"==l){const e=a.loaders.get(s);return G_(d,h),void(e?(J_(d,h),function(e,t,n,i){const o=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),o),n.on("change:uploadedPercent",((e,t,n)=>{i.change((e=>{e.setStyle("width",n+"%",o)}))}))}(d,h,e,i.editing.view),function(e,t,n,i){if(i.data){const o=e.findViewImgElement(t);n.setAttribute("src",i.data,o)}}(r,d,h,e)):Z_(r,c,d,h))}"complete"==l&&a.loaders.get(s)&&function(e,t,n){const i=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),i),setTimeout((()=>{n.change((e=>e.remove(e.createRangeOn(i))))}),3e3)}(d,h,i.editing.view),function(e,t){Q_(e,t,"progressBar")}(d,h),J_(d,h),function(e,t){t.removeClass("ck-appear",e)}(d,h)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function G_(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function Z_(e,t,n,i){n.hasClass("ck-image-upload-placeholder")||i.addClass("ck-image-upload-placeholder",n);const o=e.findViewImgElement(n);o.getAttribute("src")!==t&&i.setAttribute("src",t,o),Y_(n,"placeholder")||i.insert(i.createPositionAfter(o),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(i))}function J_(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),Q_(e,t,"placeholder")}function Y_(e,t){for(const n of e.getChildren())if(n.getCustomProperty(t))return n}function Q_(e,t,n){const i=Y_(e,n);i&&t.remove(t.createRangeOn(i))}class X_ extends po{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(n)}execute(e){const t=Li(e.file),n=this.editor.model.document.selection,i=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(n.getAttributes());t.forEach(((e,t)=>{const s=n.getSelectedElement();if(t&&s&&i.isImage(s)){const t=this.editor.model.createPositionAfter(s);this._uploadImage(e,o,t)}else this._uploadImage(e,o)}))}_uploadImage(e,t,n){const i=this.editor,o=i.plugins.get(j_).createLoader(e),s=i.plugins.get("ImageUtils");o&&s.insertImage({...t,uploadId:o.id},n)}}class ek extends mo{static get requires(){return[j_,rm,Ap,u_]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,n=e.conversion,i=e.plugins.get(j_),o=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline"),r=N_(e.config.get("image.upload.types")),a=new X_(e);e.commands.add("uploadImage",a),e.commands.add("imageUpload",a),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,n)=>{if(i=n.dataTransfer,Array.from(i.types).includes("text/html")&&""!==i.getData("text/html"))return;var i;const o=Array.from(n.dataTransfer.files).filter((e=>!!e&&r.test(e.type)));o.length&&(t.stop(),e.model.change((t=>{n.targetRanges&&t.setSelection(n.targetRanges.map((t=>e.editing.mapper.toModelRange(t)))),e.execute("uploadImage",{file:o})})))})),this.listenTo(s,"inputTransformation",((t,n)=>{const s=Array.from(e.editing.view.createRangeIn(n.content)).map((e=>e.item)).filter((e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(o,e)&&!e.getAttribute("uploadProcessed"))).map((e=>{return{promise:(t=e,new Promise(((e,n)=>{const i=t.getAttribute("src");fetch(i).then((e=>e.blob())).then((t=>{const n=F_(t,i),o=n.replace("image/",""),s=new File([t],`image.${o}`,{type:n});e(s)})).catch((t=>t&&"TypeError"===t.name?function(e){return function(e){return new Promise(((t,n)=>{const i=Yn.document.createElement("img");i.addEventListener("load",(()=>{const e=Yn.document.createElement("canvas");e.width=i.width,e.height=i.height,e.getContext("2d").drawImage(i,0,0),e.toBlob((e=>e?t(e):n()))})),i.addEventListener("error",(()=>n())),i.src=e}))}(e).then((t=>{const n=F_(t,e),i=n.replace("image/","");return new File([t],`image.${i}`,{type:n})}))}(i).then(e).catch(n):n(t)))}))),imageElement:e};var t}));if(!s.length)return;const r=new pd(e.editing.view.document);for(const e of s){r.setAttribute("uploadProcessed",!0,e.imageElement);const t=i.createLoader(e.promise);t&&(r.setAttribute("src","",e.imageElement),r.setAttribute("uploadId",t.id,e.imageElement))}})),e.editing.view.document.on("dragover",((e,t)=>{t.preventDefault()})),t.on("change",(()=>{const n=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),o=new Set;for(const t of n)if("insert"==t.type&&"$text"!=t.name){const n=t.position.nodeAfter,s="$graveyard"==t.position.root.rootName;for(const t of tk(e,n)){const e=t.getAttribute("uploadId");if(!e)continue;const n=i.loaders.get(e);n&&(s?o.has(e)||n.abort():(o.add(e),this._uploadImageElements.set(e,t),"idle"==n.status&&this._readAndUpload(n)))}}})),this.on("uploadComplete",((e,{imageElement:t,data:n})=>{const i=n.urls?n.urls:n;this.editor.model.change((e=>{e.setAttribute("src",i.default,t),this._parseAndSetSrcsetAttributeOnImage(i,t,e),o.setImageNaturalSizeAttributes(t)}))}),{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,n=t.model,i=t.locale.t,o=t.plugins.get(j_),s=t.plugins.get(rm),r=t.plugins.get("ImageUtils"),a=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","reading",a.get(e.id))})),e.read().then((()=>{const i=e.upload(),o=a.get(e.id);if(p.isSafari){const e=t.editing.mapper.toViewElement(o),n=r.findViewImgElement(e);t.editing.view.once("render",(()=>{if(!n.parent)return;const e=t.editing.view.domConverter.mapViewToDom(n.parent);if(!e)return;const i=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=i}))}return n.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","uploading",o)})),i})).then((t=>{n.enqueueChange({isUndoable:!1},(n=>{const i=a.get(e.id);n.setAttribute("uploadStatus","complete",i),this.fire("uploadComplete",{data:t,imageElement:i})})),l()})).catch((t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&s.showWarning(t,{title:i("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},(t=>{t.remove(a.get(e.id))})),l()}));function l(){n.enqueueChange({isUndoable:!1},(t=>{const n=a.get(e.id);t.removeAttribute("uploadId",n),t.removeAttribute("uploadStatus",n),a.delete(e.id)})),o.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,n){let i=0;const o=Object.keys(e).filter((e=>{const t=parseInt(e,10);if(!isNaN(t))return i=Math.max(i,t),!0})).map((t=>`${e[t]} ${t}w`)).join(", ");if(""!=o){const e={srcset:o};t.hasAttribute("width")||t.hasAttribute("height")||(e.width=i),n.setAttributes(e,t)}}}function tk(e,t){const n=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter((e=>n.isImage(e.item))).map((e=>e.item))}var nk=o(1232);vo()(nk.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),nk.A.locals;const{objectFullWidth:ik,objectInline:ok,objectLeft:sk,objectRight:rk,objectCenter:ak,objectBlockLeft:lk,objectBlockRight:ck}=xd;var dk=o(9797);function hk(e,t){const n=(n,i,o)=>{if(!o.consumable.consume(i.item,n.name))return;const s=i.attributeNewValue,r=o.writer,a=o.mapper.toViewElement(i.item),l=[...a.getChildren()].find((e=>e.getCustomProperty("media-content")));r.remove(l);const c=e.getMediaViewElement(r,s,t);r.insert(r.createPositionAt(a,0),c)};return e=>{e.on("attribute:url:media",n)}}function uk(e,t,n,i){return e.createContainerElement("figure",{class:"media"},[t.getMediaViewElement(e,n,i),e.createSlot()])}function mk(e){const t=e.getSelectedElement();return t&&t.is("element","media")?t:null}function gk(e,t,n,i){e.change((o=>{const s=o.createElement("media",{url:t});e.insertObject(s,n,null,{setSelection:"on",findOptimalPosition:i?"auto":void 0})}))}vo()(dk.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),dk.A.locals;class pk extends po{refresh(){const e=this.editor.model,t=e.document.selection,n=mk(t);this.value=n?n.getAttribute("url"):void 0,this.isEnabled=function(e){const t=e.getSelectedElement();return!!t&&"media"===t.name}(t)||function(e,t){let n=jp(e,t).start.parent;return n.isEmpty&&!t.schema.isLimit(n)&&(n=n.parent),t.schema.checkChild(n,"media")}(t,e)}execute(e){const t=this.editor.model,n=t.document.selection,i=mk(n);i?t.change((t=>{t.setAttribute("url",e,i)})):gk(t,e,n,!0)}}class fk{constructor(e,t){const n=t.providers,i=t.extraProviders||[],o=new Set(t.removeProviders),s=n.concat(i).filter((e=>{const t=e.name;return t?!o.has(t):(B("media-embed-no-provider-name",{provider:e}),!1)}));this.locale=e,this.providerDefinitions=s}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,n){return this._getMedia(t).getViewElement(e,n)}_getMedia(e){if(!e)return new bk(this.locale);e=e.trim();for(const t of this.providerDefinitions){const n=t.html,i=Li(t.url);for(const t of i){const i=this._getUrlMatches(e,t);if(i)return new bk(this.locale,e,i,n)}}return null}_getUrlMatches(e,t){let n=e.match(t);if(n)return n;let i=e.replace(/^https?:\/\//,"");return n=i.match(t),n||(i=i.replace(/^www\./,""),n=i.match(t),n||null)}}class bk{constructor(e,t,n,i){this.url=this._getValidUrl(t),this._locale=e,this._match=n,this._previewRenderer=i}getViewElement(e,t){const n={};let i;if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),t.renderForEditingView&&(n.class="ck-media__wrapper");const o=this._getPreviewHtml(t);i=e.createRawElement("div",n,((e,t)=>{t.setContentOf(e,o)}))}else this.url&&(n.url=this.url),i=e.createEmptyElement(t.elementName,n);return e.setCustomProperty("media-content",!0,i),i}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new uh,t=this._locale.t;return e.content='<svg viewBox="0 0 64 42" xmlns="http://www.w3.org/2000/svg"><path d="M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098-2.506.668-4.538-.083-4.538-1.678 0-1.594 2.032-3.43 4.538-4.098.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556A1.014 1.014 0 0 0 49 17h-1.574zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.994 1.994 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805V17zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17zm29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155h18.692zM20.6 21.375v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616V37.53H20.6zm24.233-16.155v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615V37.53h-1.615zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35v-9.956z"/></svg>',e.viewBox="0 0 64 42",new Od({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":t("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}var wk=o(9381);vo()(wk.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),wk.A.locals;class _k extends mo{static get pluginName(){return"MediaEmbedEditing"}constructor(e){super(e),e.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:[/^dailymotion\.com\/video\/(\w+)/,/^dai.ly\/(\w+)/],html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; "><iframe src="https://www.dailymotion.com/embed/video/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" width="480" height="270" allowfullscreen allow="autoplay"></iframe></div>`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 126%;"><iframe src="https://open.spotify.com/embed/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe></div>`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)(?:&t=(\d+))?/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)(?:\?t=(\d+))?/,/^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,/^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/],html:e=>{const t=e[1],n=e[2];return`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://www.youtube.com/embed/${t}${n?`?start=${n}`:""}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>`}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:e=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://player.vimeo.com/video/${e[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>`},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:[/^google\.com\/maps/,/^goo\.gl\/maps/,/^maps\.google\.com/,/^maps\.app\.goo\.gl/]},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new fk(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,t=e.model.schema,n=e.t,i=e.conversion,o=e.config.get("mediaEmbed.previewsInData"),s=e.config.get("mediaEmbed.elementName"),r=this.registry;e.commands.add("mediaEmbed",new pk(e)),t.register("media",{inheritAllFrom:"$blockObject",allowAttributes:["url"]}),i.for("dataDowncast").elementToStructure({model:"media",view:(e,{writer:t})=>{const n=e.getAttribute("url");return uk(t,r,n,{elementName:s,renderMediaPreview:!!n&&o})}}),i.for("dataDowncast").add(hk(r,{elementName:s,renderMediaPreview:o})),i.for("editingDowncast").elementToStructure({model:"media",view:(e,{writer:t})=>{const i=e.getAttribute("url");return function(e,t,n){return t.setCustomProperty("media",!0,e),Fp(e,t,{label:n})}(uk(t,r,i,{elementName:s,renderForEditingView:!0}),t,n("media widget"))}}),i.for("editingDowncast").add(hk(r,{elementName:s,renderForEditingView:!0})),i.for("upcast").elementToElement({view:e=>["oembed",s].includes(e.name)&&e.getAttribute("url")?{name:!0}:null,model:(e,{writer:t})=>{const n=e.getAttribute("url");return r.hasMedia(n)?t.createElement("media",{url:n}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(e,{writer:t})=>{const n=e.getAttribute("data-oembed-url");return r.hasMedia(n)?t.createElement("media",{url:n}):null}}).add((e=>{e.on("element:figure",((e,t,n)=>{if(!n.consumable.consume(t.viewItem,{name:!0,classes:"media"}))return;const{modelRange:i,modelCursor:o}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=i,t.modelCursor=o,io(i.getItems())||n.consumable.revert(t.viewItem,{name:!0,classes:"media"})}))}))}}const kk=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class vk extends mo{static get requires(){return[vf,vg,Rf]}static get pluginName(){return"AutoMediaEmbed"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,n=e.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",(()=>{const e=t.selection.getFirstRange(),n=Pc.fromPosition(e.start);n.stickiness="toPrevious";const i=Pc.fromPosition(e.end);i.stickiness="toNext",t.once("change:data",(()=>{this._embedMediaBetweenPositions(n,i),n.detach(),i.detach()}),{priority:"high"})})),e.commands.get("undo").on("execute",(()=>{this._timeoutId&&(Yn.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedMediaBetweenPositions(e,t){const n=this.editor,i=n.plugins.get(_k).registry,o=new $a(e,t),s=o.getWalker({ignoreElementEnd:!0});let r="";for(const e of s)e.item.is("$textProxy")&&(r+=e.item.data);r=r.trim(),r.match(kk)&&i.hasMedia(r)&&n.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=Pc.fromPosition(e),this._timeoutId=Yn.window.setTimeout((()=>{n.model.change((e=>{this._timeoutId=null,e.remove(o),o.detach();let t=null;"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert),gk(n.model,r,t,!1),this._positionToInsert.detach(),this._positionToInsert=null})),n.plugins.get(vg).requestUndoOnBackspace()}),100)):o.detach()}}var Ak=o(7698);vo()(Ak.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ak.A.locals;class yk extends th{constructor(e,t){super(t);const n=t.t;this.focusTracker=new oo,this.keystrokes=new so,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),xd.check,"ck-button-save"),this.saveButtonView.type="submit",this.saveButtonView.bind("isEnabled").to(this,"mediaURLInputValue",(e=>!!e)),this.cancelButtonView=this._createButton(n("Cancel"),xd.cancel,"ck-button-cancel","cancel"),this._focusables=new Dd,this._focusCycler=new Vh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),Id({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.element.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,t=new xh(this.locale,du),n=t.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),t.label=e("Media URL"),t.infoText=this._urlInputViewInfoDefault,n.on("input",(()=>{t.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=n.element.value.trim()})),t}_createButton(e,t,n,i){const o=new ph(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}}class Ck extends mo{static get requires(){return[_k]}static get pluginName(){return"MediaEmbedUI"}init(){const e=this.editor,t=e.commands.get("mediaEmbed");e.ui.componentFactory.add("mediaEmbed",(e=>{const n=ou(e);return this._setUpDropdown(n,t),n}))}_setUpDropdown(e,t){const n=this.editor,i=n.t,o=e.buttonView,s=n.plugins.get(_k).registry;e.once("change:isOpen",(()=>{const i=new(Sd(yk))(function(e,t){return[t=>{if(!t.url.length)return e("The URL must not be empty.")},n=>{if(!t.hasMedia(n.url))return e("This media URL is not supported.")}]}(n.t,s),n.locale);e.panelView.children.add(i),o.on("open",(()=>{i.disableCssTransitions(),i.url=t.value||"",i.urlInputView.fieldView.select(),i.enableCssTransitions()}),{priority:"low"}),e.on("submit",(()=>{i.isValid()&&(n.execute("mediaEmbed",i.url),n.editing.view.focus())})),e.on("change:isOpen",(()=>i.resetFormStatus())),e.on("cancel",(()=>{n.editing.view.focus()})),i.delegate("submit","cancel").to(e),i.urlInputView.fieldView.bind("value").to(t,"value"),i.urlInputView.bind("isEnabled").to(t,"isEnabled")})),e.bind("isEnabled").to(t),o.set({label:i("Insert media"),icon:'<svg viewBox="0 0 22 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-14.24 1h13.008v12H4.467l.029-12Zm-2.208 1h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003l-.029 1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h.974v1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Z"/><path d="M8.374 6.648a.399.399 0 0 1 .395-.4.402.402 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35V6.648Z"/></svg>',tooltip:!0})}}var xk=o(245);vo()(xk.A,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),xk.A.locals;const Ek=[class extends mo{static get requires(){return[i_,s_]}static get pluginName(){return"Highlight"}},class extends mo{init(){const e=(this.editor.config.get("highlight.options")||[]).filter((({color:e=null})=>null!==e));this.editor.conversion.attributeToElement({model:{key:"highlight",values:e.map((({model:e})=>e))},view:e.reduce(((e,{model:t,color:n})=>({...e,[t]:{name:"mark",styles:{"background-color":n,"box-shadow":`0.05em 0px 0px ${n}, -0.05em 0px 0px ${n}`}}})),{})})}}],Tk=[class extends mo{init(){this.editor.editing.view.document.on("enter",((e,t)=>{if(t.preventDefault(),e.stop(),t.isSoft)return this.editor.execute("enter"),void this.editor.editing.view.scrollToTheSelection();this.editor.execute("shiftEnter"),this.editor.editing.view.scrollToTheSelection()}),{priority:"high"}),this.editor.conversion.elementToElement({model:"paragraph",view:"span",converterPriority:"high"})}}],Bk=[Jf,class extends mo{static get requires(){return[R_,ef,k_,O_]}static get pluginName(){return"ImageInline"}},class extends mo{static get requires(){return[tf,u_]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(tf),i=e.plugins.get("ImageUtils");var o;n.register("image",{ariaLabel:t("Image toolbar"),items:(o=e.config.get("image.toolbar")||[],o.map((e=>q(e)?e.name:e))),getRelatedElement:e=>i.getClosestSelectedImageWidget(e)})}},class extends mo{static get pluginName(){return"ImageUpload"}static get requires(){return[ek,L_,K_]}},class extends mo{static get requires(){return[j_]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(j_).createUploadAdapter=t=>new q_(t,e):B("simple-upload-adapter-missing-uploadurl"))}},class extends mo{static get requires(){return[_k,Ck,vk,ef]}static get pluginName(){return"MediaEmbed"}},class extends mo{static get requires(){return[Xw,t_]}static get pluginName(){return"BlockQuote"}},class extends mo{init(){Kf(this.editor).filter((e=>"paragraph"!==e.model)).map((e=>this._createButton(e)))}_createButton(e){const t=this.editor;t.ui.componentFactory.add(e.model,(n=>{const i=new ph(n),o=t.commands.get("heading");return i.label=e.title,i.icon=e.icon||Yf[e.model],i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(o),i.bind("isOn").to(o,"value",(t=>t==e.model)),i.on("execute",(()=>{t.execute("heading",{value:e.model}),t.editing.view.focus()})),i}))}},class extends mo{static get requires(){return[jf]}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(n=>{const i=new ph(n),o=e.commands.get("paragraph");return i.label=t("Paragraph"),i.icon=Hf,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(o),i.bind("isOn").to(o,"value"),i.on("execute",(()=>{e.execute("paragraph")})),i}))}},Lw];var Pk={Editor:Kw,InlineEditor:Gw,...e}}(),s.default}()}));
|
|
3
|
+
//# sourceMappingURL=build.cjs.map
|