ckeditor5
Version:
A set of ready-to-use rich text editors created with a powerful framework. Made with real-time collaborative editing in mind.
5 lines • 1.89 MB
JavaScript
/**
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
let e;try{e={window:window,document:document}}catch{e={window:{},document:{}}}function t(){try{return navigator.userAgent.toLowerCase()}catch{return""}}const i=t(),n={isMac:s(i),isWindows:o(i),isGecko:r(i),isSafari:a(i),isiOS:l(i),isAndroid:c(i),isBlink:u(i),get isMediaForcedColors(){return h()},get isMotionReduced(){return m()},features:{isRegExpUnicodePropertySupported:d()}};function s(e){return e.indexOf("macintosh")>-1}function o(e){return e.indexOf("windows")>-1}function r(e){return!!e.match(/gecko\/\d+/)}function a(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}function l(e){return!!e.match(/iphone|ipad/i)||s(e)&&navigator.maxTouchPoints>0}function c(e){return e.indexOf("android")>-1}function u(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}function d(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch{}return e}function h(){return!!e.window.matchMedia&&e.window.matchMedia("(forced-colors: active)").matches}function m(){return!!e.window.matchMedia&&e.window.matchMedia("(prefers-reduced-motion)").matches}function g(e,t,i,n){i=i||function(e,t){return e===t};const s=Array.isArray(e)?e:Array.prototype.slice.call(e),o=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,i){const n=f(e,t,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=p(e,n),o=p(t,n),r=f(s,o,i),a=e.length-r,l=t.length-r;return{firstIndex:n,lastIndexOld:a,lastIndexNew:l}}(s,o,i),a=n?function(e,t){const{firstIndex:i,lastIndexOld:n,lastIndexNew:s}=e;if(-1===i)return Array(t).fill("equal");let o=[];i>0&&(o=o.concat(Array(i).fill("equal")));s-i>0&&(o=o.concat(Array(s-i).fill("insert")));n-i>0&&(o=o.concat(Array(n-i).fill("delete")));s<t&&(o=o.concat(Array(t-s).fill("equal")));return o}(r,o.length):function(e,t){const i=[],{firstIndex:n,lastIndexOld:s,lastIndexNew:o}=t;o-n>0&&i.push({index:n,type:"insert",values:e.slice(n,o)});s-n>0&&i.push({index:n+(o-n),type:"delete",howMany:s-n});return i}(o,r);return a}function f(e,t,i){for(let n=0;n<Math.max(e.length,t.length);n++)if(void 0===e[n]||void 0===t[n]||!i(e[n],t[n]))return n;return-1}function p(e,t){return e.slice(t).reverse()}function b(e,t,i){i=i||function(e,t){return e===t};const n=e.length,s=t.length;if(n>200||s>200||n+s>300)return b.fastDiff(e,t,i,!0);let o,r;if(s<n){const i=e;e=t,t=i,o="delete",r="insert"}else o="insert",r="delete";const a=e.length,l=t.length,c=l-a,u={},d={};function h(n){const s=(void 0!==d[n-1]?d[n-1]:-1)+1,c=void 0!==d[n+1]?d[n+1]:-1,h=s>c?-1:1;u[n+h]&&(u[n]=u[n+h].slice(0)),u[n]||(u[n]=[]),u[n].push(s>c?o:r);let m=Math.max(s,c),g=m-n;for(;g<a&&m<l&&i(e[g],t[m]);)g++,m++,u[n].push("equal");return m}let m,g=0;do{for(m=-g;m<c;m++)d[m]=h(m);for(m=c+g;m>c;m--)d[m]=h(m);d[c]=h(c),g++}while(d[c]!==l);return u[c].slice(1)}function w(e,t){const i=[];let n=0,s=null;return e.forEach(e=>{"equal"==e?(o(),n++):"insert"==e?(s&&"insert"==s.type?s.values.push(t[n]):(o(),s={type:"insert",index:n,values:[t[n]]}),n++):s&&"delete"==s.type?s.howMany++:(o(),s={type:"delete",index:n,howMany:1})}),o(),i;function o(){s&&(i.push(s),s=null)}}function v(e,t){if(e===t&&("object"==typeof(i=e)&&null!==i))return!0;var i;const n=_(e),s=_(t);for(const e of n)if(s.has(e))return!0;return!1}function _(e){const t=[e],i=new Set;for(;t.length>0;){const e=t.shift();if(!i.has(e)&&!y(e))if(i.add(e),e[Symbol.iterator])try{t.push(...e)}catch{}else t.push(...Object.values(e))}return i}function y(e){const t=Object.prototype.toString.call(e);return"[object Number]"===t||"[object Boolean]"===t||"[object String]"===t||"[object Symbol]"===t||"[object Function]"===t||"[object Date]"===t||"[object RegExp]"===t||null==e||e instanceof EventTarget||e instanceof Event}function k(){return function e(){e.called=!0}}b.fastDiff=g;class C{source;name;path;stop;off;return;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 x=new Array(256).fill("").map((e,t)=>("0"+t.toString(16)).slice(-2));function A(){const[e,t,i,n]=crypto.getRandomValues(new Uint32Array(4));return"e"+x[255&e]+x[e>>8&255]+x[e>>16&255]+x[e>>24&255]+x[255&t]+x[t>>8&255]+x[t>>16&255]+x[t>>24&255]+x[255&i]+x[i>>8&255]+x[i>>16&255]+x[i>>24&255]+x[255&n]+x[n>>8&255]+x[n>>16&255]+x[n>>24&255]}const E={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function T(e,t){const i=E.get(t.priority);let n=0,s=e.length;for(;n<s;){const t=n+s>>1;E.get(e[t].priority)<i?s=t:n=t+1}e.splice(n,0,t)}const S="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class I extends Error{context;data;constructor(e,t,i,n){super(function(e,t,i){const n=new WeakSet,s=(e,t)=>{if("object"==typeof t&&null!==t){if(n.has(t))return`[object ${t.constructor.name}]`;n.add(t)}return t},o=t?` ${JSON.stringify(t,s)}`:"",r=R(e),a=i?`\nOriginal error: ${i.name}: ${i.message}`:"";return e+o+r+a}(e,i,n)),this.name="CKEditorError",this.context=t,this.data=i,n&&(this.stack=n.stack)}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;throw new I("unexpected-error",t,void 0,e)}}function P(e,t){console.warn(...O(e,t))}function V(e,t){console.error(...O(e,t))}function R(e){return`\nRead more: ${S}#error-${e}`}function O(e,t){const i=R(e);return t?[e,t,i]:[e,i]}const B="48.1.1",L=new Date(2026,4,18);if(globalThis.CKEDITOR_VERSION)throw new I("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=B;const M=Symbol("listeningTo"),F=Symbol("emitterId"),N=Symbol("delegations"),D=z(Object);function z(e){if(!e)return D;return class extends e{on(e,t,i){this.listenTo(this,e,t,i)}once(e,t,i){let n=!1;this.listenTo(this,e,(e,...i)=>{n||(n=!0,e.off(),t.call(this,e,...i))},i)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,i,n={}){let s,o;this[M]||(this[M]={});const r=this[M];U(e)||q(e);const a=U(e);(s=r[a])||(s=r[a]={emitter:e,callbacks:{}}),(o=s.callbacks[t])||(o=s.callbacks[t]=[]),o.push(i),function(e,t,i,n,s){t._addEventListener?t._addEventListener(i,n,s):e._addEventListener.call(t,i,n,s)}(this,e,t,i,n)}stopListening(e,t,i){const n=this[M];let s=e&&U(e);const o=n&&s?n[s]:void 0,r=o&&t?o.callbacks[t]:void 0;if(!(!n||e&&!o||t&&!r))if(i){K(this,e,t,i);-1!==r.indexOf(i)&&(1===r.length?delete o.callbacks[t]:K(this,e,t,i))}else if(r){for(;i=r.pop();)K(this,e,t,i);delete o.callbacks[t]}else if(o){for(t in o.callbacks)this.stopListening(e,t);delete n[s]}else{for(s in n)this.stopListening(n[s].emitter);delete this[M]}}fire(e,...t){try{const i=e instanceof C?e:new C(this,e),n=i.name;let s=function(e,t){if(!e._events)return null;let i=t;do{const t=e._events[i];if(t&&t.callbacks&&t.callbacks.length)return t.callbacks;const n=i.lastIndexOf(":");i=n>-1?i.substring(0,n):""}while(i);return null}(this,n);if(i.path.push(this),s){s=s.slice();for(let e=0;e<s.length;e++){const o=s[e].callback;if(o.call(this,i,...t),i.off.called&&(delete i.off.called,this._removeEventListener(n,o)),i.stop.called)break}}const o=this[N];if(o){const e=o.get(n),s=o.get("*");e&&G(e,i,t),s&&G(s,i,t)}return i.return}catch(e){I.rethrowUnexpectedError(e,this)}}delegate(...e){return{to:(t,i)=>{this[N]||(this[N]=new Map),e.forEach(e=>{const n=this[N].get(e);n?n.set(t,i):this[N].set(e,new Map([[t,i]]))})}}}stopDelegating(e,t){if(this[N])if(e)if(t){const i=this[N].get(e);i&&i.delete(t)}else this[N].delete(e);else this[N].clear()}_addEventListener(e,t,i){!function(e,t){const i=j(e);if(i[t])return;let n=t,s=null;const o=[];for(;""!==n&&!i[n];)i[n]=$(),o.push(i[n]),s&&i[n].childEvents.push(s),s=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of o)e.callbacks=i[n].callbacks.slice();i[n].childEvents.push(s)}}(this,e);const n=W(this,e),s={callback:t,priority:E.get(i.priority)};for(const e of n)T(e,s)}_removeEventListener(e,t){const i=W(this,e);for(const e of i)for(let i=0;i<e.length;i++)e[i].callback==t&&(e.splice(i,1),i--)}}}function H(e,t){const i=e[M];return i&&i[t]?i[t].emitter:null}function q(e,t){e[F]||(e[F]=t||A())}function U(e){return e[F]}function j(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function $(){return{callbacks:[],childEvents:[]}}function W(e,t){const i=j(e)[t];if(!i)return[];let n=[i.callbacks];for(let t=0;t<i.childEvents.length;t++){const s=W(e,i.childEvents[t]);n=n.concat(s)}return n}function G(e,t,i){for(let[n,s]of e){s?"function"==typeof s&&(s=s(t.name)):s=t.name;const e=new C(t.source,s);e.path=[...t.path],n.fire(e,...i)}}function K(e,t,i,n){t._removeEventListener?t._removeEventListener(i,n):e._removeEventListener.call(t,i,n)}function J(e){return null!=e&&"function"!=typeof e&&function(e){return Number.isSafeInteger(e)&&e>=0}(e.length)}function Q(e){return e}function Y(e){return"__proto__"===e}function Z(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function X(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function ee(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(ee).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function te(e){if(Array.isArray(e))return e.map(X);if("symbol"==typeof e)return[e];const t=[],i=(e=ee(e)).length;if(0===i)return t;let n=0,s="",o="",r=!1;for(46===e.charCodeAt(0)&&(t.push(""),n++);n<i;){const a=e[n];o?"\\"===a&&n+1<i?(n++,s+=e[n]):a===o?o="":s+=a:r?'"'===a||"'"===a?o=a:"]"===a?(r=!1,t.push(s),s=""):s+=a:"["===a?(r=!0,s&&(t.push(s),s="")):"."===a?s&&(t.push(s),s=""):s+=a,n++}return s&&t.push(s),t}function ie(e,t,i){if(null==e)return i;switch(typeof t){case"string":{if(Y(t))return i;const n=e[t];return void 0===n?Z(t)?ie(e,te(t),i):i:n}case"number":case"symbol":{"number"==typeof t&&(t=X(t));const n=e[t];return void 0===n?i:n}default:{if(Array.isArray(t))return function(e,t,i){if(0===t.length)return i;let n=e;for(let e=0;e<t.length;e++){if(null==n)return i;if(Y(t[e]))return i;n=n[t[e]]}if(void 0===n)return i;return n}(e,t,i);if(Y(t=Object.is(t?.valueOf(),-0)?"-0":String(t)))return i;const n=e[t];return void 0===n?i:n}}}function ne(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function se(e){return null==e||"object"!=typeof e&&"function"!=typeof e}function oe(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function re(e,t,i){return"function"!=typeof i?re(e,t,()=>{}):ae(e,t,function e(t,n,s,o,r,a){const l=i(t,n,s,o,r,a);return void 0!==l?Boolean(l):ae(t,n,e,a)},new Map)}function ae(e,t,i,n){if(t===e)return!0;switch(typeof t){case"object":return function(e,t,i,n){if(null==t)return!0;if(Array.isArray(t))return le(e,t,i,n);if(t instanceof Map)return function(e,t,i,n){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[s,o]of t.entries()){if(!1===i(e.get(s),o,s,e,t,n))return!1}return!0}(e,t,i,n);if(t instanceof Set)return function(e,t,i,n){if(0===t.size)return!0;if(!(e instanceof Set))return!1;return le([...e],[...t],i,n)}(e,t,i,n);const s=Object.keys(t);if(null==e||se(e))return 0===s.length;if(0===s.length)return!0;if(n?.has(t))return n.get(t)===e;n?.set(t,e);try{for(let o=0;o<s.length;o++){const r=s[o];if(!se(e)&&!(r in e))return!1;if(void 0===t[r]&&void 0!==e[r])return!1;if(null===t[r]&&null!==e[r])return!1;if(!i(e[r],t[r],r,e,t,n))return!1}return!0}finally{n?.delete(t)}}(e,t,i,n);case"function":return Object.keys(t).length>0?ae(e,{...t},i,n):oe(e,t);default:return ne(e)?"string"!=typeof t||""===t:oe(e,t)}}function le(e,t,i,n){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const s=new Set;for(let o=0;o<t.length;o++){const r=t[o];let a=!1;for(let l=0;l<e.length;l++){if(s.has(l))continue;let c=!1;if(i(e[l],r,o,e,t,n)&&(c=!0),c){s.add(l),a=!0;break}}if(!a)return!1}return!0}function ce(e,t){return re(e,t,()=>{})}function ue(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function de(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const he="[object RegExp]",me="[object String]",ge="[object Number]",fe="[object Boolean]",pe="[object Arguments]",be="[object Symbol]",we="[object Date]",ve="[object Map]",_e="[object Set]",ye="[object Array]",ke="[object ArrayBuffer]",Ce="[object Object]",xe="[object DataView]",Ae="[object Uint8Array]",Ee="[object Uint8ClampedArray]",Te="[object Uint16Array]",Se="[object Uint32Array]",Ie="[object Int8Array]",Pe="[object Int16Array]",Ve="[object Int32Array]",Re="[object Float32Array]",Oe="[object Float64Array]";function Be(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Le(e,t,i,n=new Map,s=void 0){const o=s?.(e,t,i,n);if(void 0!==o)return o;if(se(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const t=new Array(e.length);n.set(e,t);for(let o=0;o<e.length;o++)t[o]=Le(e[o],o,i,n,s);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;n.set(e,t);for(const[o,r]of e)t.set(o,Le(r,o,i,n,s));return t}if(e instanceof Set){const t=new Set;n.set(e,t);for(const o of e)t.add(Le(o,void 0,i,n,s));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(Be(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);n.set(e,t);for(let o=0;o<e.length;o++)t[o]=Le(e[o],o,i,n,s);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,t),Me(t,e,i,n,s),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return n.set(e,t),Me(t,e,i,n,s),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return n.set(e,t),Me(t,e,i,n,s),t}if(e instanceof Error){const t=structuredClone(e);return n.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Me(t,e,i,n,s),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return n.set(e,t),Me(t,e,i,n,s),t}if(e instanceof Number){const t=new Number(e.valueOf());return n.set(e,t),Me(t,e,i,n,s),t}if(e instanceof String){const t=new String(e.valueOf());return n.set(e,t),Me(t,e,i,n,s),t}if("object"==typeof e&&function(e){switch(de(e)){case pe:case ye:case ke:case xe:case fe:case we:case Re:case Oe:case Ie:case Pe:case Ve:case ve:case ge:case Ce:case he:case _e:case me:case be:case Ae:case Ee:case Te:case Se:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return n.set(e,t),Me(t,e,i,n,s),t}return e}function Me(e,t,i=e,n,s){const o=[...Object.keys(t),...ue(t)];for(let r=0;r<o.length;r++){const a=o[r],l=Object.getOwnPropertyDescriptor(e,a);(null==l||l.writable)&&(e[a]=Le(t[a],a,i,n,s))}}function Fe(e){var t;return e=Le(t=e,void 0,t,new Map,void 0),t=>ce(t,e)}function Ne(e,t){return function(e,t){return Le(e,void 0,e,new Map,t)}(e,(i,n,s,o)=>{const r=t?.(i,n,s,o);if(void 0!==r)return r;if("object"==typeof e){if(de(e)===Ce&&"function"!=typeof e.constructor){const t={};return o.set(e,t),Me(t,e,s,o),t}switch(Object.prototype.toString.call(e)){case ge:case me:case fe:{const t=new e.constructor(e?.valueOf());return Me(t,e),t}case pe:{const t={};return Me(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function De(e){return Ne(e)}const ze=/^(?:0|[1-9]\d*)$/;function He(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return ze.test(e)}}function qe(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===de(e)}function Ue(e,t){let i;if(i=Array.isArray(t)?t:"string"==typeof t&&Z(t)&&null==e?.[t]?te(t):[t],0===i.length)return!1;let n=e;for(let e=0;e<i.length;e++){const t=i[e];if(null==n||!Object.hasOwn(n,t)){if(!((Array.isArray(n)||qe(n))&&He(t)&&t<n.length))return!1}n=n[t]}return!0}function je(e){if(null==e)return Q;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?function(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=X(e)}return t=De(t),function(i){const n=ie(i,e);return void 0===n?Ue(i,e):void 0===t?void 0===n:ce(n,t)}}(e[0],e[1]):Fe(e);case"string":case"symbol":case"number":return function(e){return function(t){return ie(t,e)}}(e)}}function $e(e){return"object"==typeof e&&null!==e}function We(e){return $e(e)&&J(e)}function Ge(e){return"symbol"==typeof e||e instanceof Symbol}function Ke(e){if(!e)return 0===e?e:0;if((e=function(e){return Ge(e)?NaN:Number(e)}(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e==e?e:0}function Je(e){return"string"==typeof e||e instanceof String}function Qe(e){return e}function Ye(e,t){if(null==e)return{};return function(e,t){const i={};for(let n=0;n<e.length;n++){const s=e[n],o=t(s,n,e);Object.hasOwn(i,o)||(i[o]=[]),i[o].push(s)}return i}(J(e)?Array.from(e):Object.values(e),je(t??Q))}const Ze=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xe=/^\w*$/;const et=(e,t,i)=>{const n=e[t];Object.hasOwn(e,t)&&oe(n,i)&&(void 0!==i||t in e)||(e[t]=i)};function tt(e,t,i,n){if(null==e&&!ne(e))return e;let s;var o,r;o=t,r=e,s=!Array.isArray(o)&&("number"==typeof o||"boolean"==typeof o||null==o||Ge(o)||"string"==typeof o&&(Xe.test(o)||!Ze.test(o))||null!=r&&Object.hasOwn(r,o))?[t]:Array.isArray(t)?t:te(t);const a=i(ie(e,s));let l=e;for(let t=0;t<s.length&&null!=l;t++){const i=X(s[t]);if(Y(i))continue;let o;if(t===s.length-1)o=a;else{const r=l[i],a=n?.(r,i,e);o=void 0!==a?a:ne(r)?r:He(s[t+1])?[]:{}}et(l,i,o),l=l[i]}return e}function it(e,t,i){return tt(e,t,()=>i,()=>{})}function nt(e,t,{signal:i,edges:n}={}){let s,o=null;const r=null!=n&&n.includes("leading"),a=null==n||n.includes("trailing"),l=()=>{null!==o&&(e.apply(s,o),s=void 0,o=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,a&&l(),d()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null),s=void 0,o=null},h=function(...e){if(i?.aborted)return;s=this,o=e;const t=null==c;u(),r&&t&&l()};return h.schedule=u,h.cancel=d,h.flush=()=>{l()},i?.addEventListener("abort",d,{once:!0}),h}function st(e,t=0,i={}){"object"!=typeof i&&(i={});const{leading:n=!1,trailing:s=!0,maxWait:o}=i,r=Array(2);let a;n&&(r[0]="leading"),s&&(r[1]="trailing");let l=null;const c=nt(function(...t){a=e.apply(this,t),l=null},t,{edges:r}),u=function(...t){return null!=o&&(null===l&&(l=Date.now()),Date.now()-l>=o)?(a=e.apply(this,t),l=Date.now(),c.cancel(),c.schedule(),a):(c.apply(this,t),a)};return u.cancel=c.cancel,u.flush=()=>(c.flush(),a),u}function ot(e,t=0,i={}){const{leading:n=!0,trailing:s=!0}=i;return st(e,t,{leading:n,maxWait:t,trailing:s})}function rt(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function at(e,t,i){return lt(e,t,void 0,void 0,void 0,void 0,i)}function lt(e,t,i,n,s,o,r){const a=r(e,t,i,n,s,o);if(void 0!==a)return a;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return e===t;case"number":return e===t||Object.is(e,t);case"object":return ct(e,t,o,r)}return ct(e,t,o,r)}function ct(e,t,i,n){if(Object.is(e,t))return!0;let s=de(e),o=de(t);if(s===pe&&(s=Ce),o===pe&&(o=Ce),s!==o)return!1;switch(s){case me:return e.toString()===t.toString();case ge:return oe(e.valueOf(),t.valueOf());case fe:case we:case be:return Object.is(e.valueOf(),t.valueOf());case he:return e.source===t.source&&e.flags===t.flags;case"[object Function]":return e===t}const r=(i=i??new Map).get(e),a=i.get(t);if(null!=r&&null!=a)return r===t;i.set(e,t),i.set(t,e);try{switch(s){case ve:if(e.size!==t.size)return!1;for(const[s,o]of e.entries())if(!t.has(s)||!lt(o,t.get(s),s,e,t,i,n))return!1;return!0;case _e:{if(e.size!==t.size)return!1;const s=Array.from(e.values()),o=Array.from(t.values());for(let r=0;r<s.length;r++){const a=s[r],l=o.findIndex(s=>lt(a,s,void 0,e,t,i,n));if(-1===l)return!1;o.splice(l,1)}return!0}case ye:case Ae:case Ee:case Te:case Se:case"[object BigUint64Array]":case Ie:case Pe:case Ve:case"[object BigInt64Array]":case Re:case Oe:if("undefined"!=typeof Buffer&&Buffer.isBuffer(e)!==Buffer.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(!lt(e[s],t[s],s,e,t,i,n))return!1;return!0;case ke:return e.byteLength===t.byteLength&&ct(new Uint8Array(e),new Uint8Array(t),i,n);case xe:return e.byteLength===t.byteLength&&e.byteOffset===t.byteOffset&&ct(new Uint8Array(e),new Uint8Array(t),i,n);case"[object Error]":return e.name===t.name&&e.message===t.message;case Ce:{if(!(ct(e.constructor,t.constructor,i,n)||rt(e)&&rt(t)))return!1;const s=[...Object.keys(e),...ue(e)],o=[...Object.keys(t),...ue(t)];if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++){const r=s[o],a=e[r];if(!Object.hasOwn(t,r))return!1;if(!lt(a,t[r],r,e,t,i,n))return!1}return!0}default:return!1}}finally{i.delete(e),i.delete(t)}}function ut(){}function dt(e,t){return at(e,t,ut)}function ht(e){const t=e?.constructor;return e===("function"==typeof t?t.prototype:Object.prototype)}function mt(e){return Be(e)}function gt(e,t){if((e=function(e){const t=Ke(e),i=t%1;return i?t-i:t}(e))<1||!Number.isSafeInteger(e))return[];const i=new Array(e);for(let n=0;n<e;n++)i[n]="function"==typeof t?t(n):n;return i}function ft(e){if(null==e)return[];switch(typeof e){case"object":case"function":return J(e)?function(e){const t=gt(e.length,e=>`${e}`),i=new Set(t);(function(e){return"undefined"!=typeof Buffer&&Buffer.isBuffer(e)})(e)&&(i.add("offset"),i.add("parent"));mt(e)&&(i.add("buffer"),i.add("byteLength"),i.add("byteOffset"));const n=pt(e).filter(e=>!i.has(e));if(Array.isArray(e))return[...t,...n];return[...t.filter(t=>Object.hasOwn(e,t)),...n]}(e):ht(e)?function(e){const t=pt(e);return t.filter(e=>"constructor"!==e)}(e):pt(e);default:return pt(Object(e))}}function pt(e){const t=[];for(const i in e)t.push(i);return t}function bt(e,...t){for(let i=0;i<t.length;i++)wt(e,t[i]);return e}function wt(e,t){const i=ft(t);for(let n=0;n<i.length;n++){const s=i[n];s in e&&oe(e[s],t[s])||(e[s]=t[s])}}function vt(e){if(se(e))return e;const t=de(e);if(!function(e){switch(de(e)){case pe:case ye:case ke:case xe:case fe:case we:case Re:case Oe:case Ie:case Pe:case Ve:case ve:case ge:case Ce:case he:case _e:case me:case be:case Ae:case Ee:case Te:case Se:return!0;default:return!1}}(e))return{};if(i=e,Array.isArray(i)){const t=Array.from(e);return e.length>0&&"string"==typeof e[0]&&Object.hasOwn(e,"index")&&(t.index=e.index,t.input=e.input),t}var i;if(mt(e)){const t=e;return new(0,t.constructor)(t.buffer,t.byteOffset,t.length)}if(t===ke)return new ArrayBuffer(e.byteLength);if(t===xe){const t=e,i=t.buffer,n=t.byteOffset,s=t.byteLength,o=new ArrayBuffer(s),r=new Uint8Array(i,n,s);return new Uint8Array(o).set(r),new DataView(o)}if(t===fe||t===ge||t===me){const i=new(0,e.constructor)(e.valueOf());return t===me?function(e,t){const i=t.valueOf().length;for(const n in t)Object.hasOwn(t,n)&&(Number.isNaN(Number(n))||Number(n)>=i)&&(e[n]=t[n])}(i,e):_t(i,e),i}if(t===we)return new Date(Number(e));if(t===he){const t=e,i=new RegExp(t.source,t.flags);return i.lastIndex=t.lastIndex,i}if(t===be)return Object(Symbol.prototype.valueOf.call(e));if(t===ve){const t=e,i=new Map;return t.forEach((e,t)=>{i.set(t,e)}),i}if(t===_e){const t=e,i=new Set;return t.forEach(e=>{i.add(e)}),i}if(t===pe){const t=e,i={};return _t(i,t),i.length=t.length,i[Symbol.iterator]=t[Symbol.iterator],i}const n={};return function(e,t){const i=Object.getPrototypeOf(t);if(null!==i){"function"==typeof t.constructor&&Object.setPrototypeOf(e,i)}}(n,e),_t(n,e),function(e,t){const i=Object.getOwnPropertySymbols(t);for(let n=0;n<i.length;n++){const s=i[n];Object.prototype.propertyIsEnumerable.call(t,s)&&(e[s]=t[s])}}(n,e),n}function _t(e,t){for(const i in t)Object.hasOwn(t,i)&&(e[i]=t[i])}function yt(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];if(null==t)return!1;return!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function kt(e,t=Q){return null==e?{}:function(e,t){const i={},n=Object.keys(e);for(let s=0;s<n.length;s++){const o=n[s],r=e[o];i[o]=t(r,o,e)}return i}(e,je(t))}function Ct(e,...t){const i=t.slice(0,-1),n=t[t.length-1];let s=e;for(let e=0;e<i.length;e++){s=xt(s,i[e],n,new Map)}return s}function xt(e,t,i,n){if(se(e)&&(e=Object(e)),null==t||"object"!=typeof t)return e;if(n.has(t))return function(e){if(se(e))return e;if(Array.isArray(e)||Be(e)||e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(null==t)return Object.assign(Object.create(t),e);const i=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new i(e);if(e instanceof RegExp){const t=new i(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new i(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new i(e.errors,e.message,{cause:e.cause}):new i(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}if("undefined"!=typeof File&&e instanceof File)return new i([e],e.name,{type:e.type,lastModified:e.lastModified});if("object"==typeof e){const i=Object.create(t);return Object.assign(i,e)}return e}(n.get(t));if(n.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}const s=[...Object.keys(t),...ue(t)];for(let o=0;o<s.length;o++){const r=s[o];if(Y(r))continue;let a=t[r],l=e[r];if(qe(a)&&(a={...a}),qe(l)&&(l={...l}),"undefined"!=typeof Buffer&&Buffer.isBuffer(a)&&(a=De(a)),Array.isArray(a))if(Array.isArray(l)){const e=[],t=Reflect.ownKeys(l);for(let i=0;i<t.length;i++){const n=t[i];e[n]=l[n]}l=e}else if(We(l)){const e=[];for(let t=0;t<l.length;t++)e[t]=l[t];l=e}else l=[];const c=i(l,a,r,e,t,n);void 0!==c?e[r]=c:Array.isArray(a)||$e(l)&&$e(a)&&(yt(l)||yt(a)||mt(l)||mt(a))?e[r]=xt(l,a,i,n):null==l&&yt(a)?e[r]=xt({},a,i,n):null==l&&mt(a)?e[r]=De(a):void 0!==l&&void 0===a||(e[r]=a)}return e}function At(e,...t){return Ct(e,...t,ut)}function Et(e,...t){if(function(e){return null==e}(e))return{};const i={};for(let n=0;n<t.length;n++){let s=t[n];switch(typeof s){case"object":Array.isArray(s)||(s=J(s)?Array.from(s):[s]);break;case"string":case"symbol":case"number":s=[s]}for(const t of s){const n=ie(e,t);(void 0!==n||Ue(e,t))&&("string"==typeof t&&Object.hasOwn(e,t)?i[t]=n:it(i,t,n))}}return i}function Tt(e){return"function"==typeof e}function St(e){return $e(e)&&1===e.nodeType&&!yt(e)}function It(e,t){if(!Number.isInteger(e)||e<0)throw new Error("n must be a non-negative integer.");let i=0;return(...n)=>{if(++i>=e)return t(...n)}}function Pt(e,t,i){return"function"!=typeof i&&(i=()=>{}),at(e,t,(...n)=>{const s=i(...n);return void 0!==s?Boolean(s):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?Pt(Array.from(e),Array.from(t),It(2,i)):void 0})}const Vt=new Map([["Æ","Ae"],["Ð","D"],["Ø","O"],["Þ","Th"],["ß","ss"],["æ","ae"],["ð","d"],["ø","o"],["þ","th"],["Đ","D"],["đ","d"],["Ħ","H"],["ħ","h"],["ı","i"],["IJ","IJ"],["ij","ij"],["ĸ","k"],["Ŀ","L"],["ŀ","l"],["Ł","L"],["ł","l"],["ʼn","'n"],["Ŋ","N"],["ŋ","n"],["Œ","Oe"],["œ","oe"],["Ŧ","T"],["ŧ","t"],["ſ","s"]]);function Rt(e){return function(e){e=e.normalize("NFD");let t="";for(let i=0;i<e.length;i++){const n=e[i];n>="̀"&&n<="ͯ"||n>="︠"&&n<="︣"||(t+=Vt.get(n)??n)}return t}(ee(e))}const Ot=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;const Bt={"&":"&","<":"<",">":">",'"':""","'":"'"};function Lt(e){return ee(e).replace(/[&<>"']/g,e=>Bt[e])}function Mt(e){return function(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}(ee(e))}function Ft(e){const t=function(e){return Array.from(e.match(Ot)??[])}(function(e){return"string"!=typeof e&&(e=ee(e)),e.replace(/['\u2019]/g,"")}(Rt(e)).trim());let i="";for(let e=0;e<t.length;e++){const n=t[e];i&&(i+=" "),n===n.toUpperCase()?i+=n:i+=n[0].toUpperCase()+n.slice(1).toLowerCase()}return i}function Nt(e){return function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}(ee(e))}const Dt=Symbol("observableProperties"),zt=Symbol("boundObservables"),Ht=Symbol("boundProperties"),qt=Symbol("decoratedMethods"),Ut=Symbol("decoratedOriginal"),jt=$t(z());function $t(e){if(!e)return jt;return class extends e{set(e,t){if(ne(e))return void Object.keys(e).forEach(t=>{this.set(t,e[t])},this);Wt(this);const i=this[Dt];if(e in this&&!i.has(e))throw new I("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>i.get(e),set(t){const n=i.get(e);let s=this.fire(`set:${e}`,e,t,n);void 0===s&&(s=t),n===s&&i.has(e)||(i.set(e,s),this.fire(`change:${e}`,e,s,n))}}),this[e]=t}bind(...e){if(!e.length||!Jt(e))throw new I("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new I("observable-bind-duplicate-properties",this);Wt(this);const t=this[Ht];e.forEach(e=>{if(t.has(e))throw new I("observable-bind-rebind",this)});const i=new Map;return e.forEach(e=>{const n={property:e,to:[]};t.set(e,n),i.set(e,n)}),{to:Gt,toMany:Kt,_observable:this,_bindProperties:e,_to:[],_bindings:i}}unbind(...e){if(!this[Dt])return;const t=this[Ht],i=this[zt];if(e.length){if(!Jt(e))throw new I("observable-unbind-wrong-properties",this);e.forEach(e=>{const n=t.get(e);n&&(n.to.forEach(([e,t])=>{const s=i.get(e),o=s[t];o.delete(n),o.size||delete s[t],Object.keys(s).length||(i.delete(e),this.stopListening(e,"change"))}),t.delete(e))})}else i.forEach((e,t)=>{this.stopListening(t,"change")}),i.clear(),t.clear()}decorate(e){Wt(this);const t=this[e];if(!t)throw new I("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,(e,i)=>{e.return=t.apply(this,i)}),this[e]=function(...t){return this.fire(e,t)},this[e][Ut]=t,this[qt]||(this[qt]=[]),this[qt].push(e)}stopListening(e,t,i){if(!e&&this[qt]){for(const e of this[qt])this[e]=this[e][Ut];delete this[qt]}super.stopListening(e,t,i)}[Dt];[qt];[Ht];[zt]}}function Wt(e){e[Dt]||(Object.defineProperty(e,Dt,{value:new Map}),Object.defineProperty(e,zt,{value:new Map}),Object.defineProperty(e,Ht,{value:new Map}))}function Gt(...e){const t=function(...e){if(!e.length)throw new I("observable-bind-to-parse-error",null);const t={to:[]};let i;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach(e=>{if("string"==typeof e)i.properties.push(e);else{if("object"!=typeof e)throw new I("observable-bind-to-parse-error",null);i={observable:e,properties:[]},t.to.push(i)}}),t}(...e),i=Array.from(this._bindings.keys()),n=i.length;if(!t.callback&&t.to.length>1)throw new I("observable-bind-to-no-callback",this);if(n>1&&t.callback)throw new I("observable-bind-to-extra-callback",this);var s;t.to.forEach(e=>{if(e.properties.length&&e.properties.length!==n)throw new I("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(i[0]).callback=t.callback),s=this._observable,this._to.forEach(e=>{const t=s[zt];let i;t.get(e.observable)||s.listenTo(e.observable,"change",(n,o)=>{i=t.get(e.observable)[o],i&&i.forEach(e=>{Qt(s,e.property)})})}),function(e){let t;e._bindings.forEach((i,n)=>{e._to.forEach(s=>{t=s.properties[i.callback?0:e._bindProperties.indexOf(n)],i.to.push([s.observable,t]),function(e,t,i,n){const s=e[zt],o=s.get(i),r=o||{};r[n]||(r[n]=new Set);r[n].add(t),o||s.set(i,r)}(e._observable,i,s.observable,t)})})}(this),this._bindProperties.forEach(e=>{Qt(this._observable,e)})}function Kt(e,t,i){if(this._bindings.size>1)throw new I("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const i=e.map(e=>[e,t]);return Array.prototype.concat.apply([],i)}(e,t),i)}function Jt(e){return e.every(e=>"string"==typeof e)}function Qt(e,t){const i=e[Ht].get(t);let n;i.callback?n=i.callback.apply(e,i.to.map(e=>e[0][e[1]])):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}class Yt{_replacedElements;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 Zt(e){let t=new AbortController;function i(...i){return t.abort(),t=new AbortController,e(t.signal,...i)}return i.abort=()=>t.abort(),i}function Xt(e){let t=0;for(const i of e)t++;return t}function ei(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)if(e[n]!=t[n])return n;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function ti(e){return!(!e||!e[Symbol.iterator])}function ii(e,t,i={},n=[]){const s=i&&i.xmlns,o=s?e.createElementNS(s,t):e.createElement(t);for(const e in i)o.setAttribute(e,i[e]);!Je(n)&&ti(n)||(n=[n]);for(let t of n)Je(t)&&(t=e.createTextNode(t)),o.appendChild(t);return o}class ni{_config;constructor(e,t){this._config=Object.create(null),t&&this.define(si(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,i,n=!1){if(yt(t))return void this._setObjectToTarget(e,t,n);const s=t.split(".");t=s.pop();for(const t of s)yt(e[t])||(e[t]=Object.create(null)),e=e[t];if(yt(i))return yt(e[t])||(e[t]=Object.create(null)),e=e[t],void this._setObjectToTarget(e,i,n);n&&void 0!==e[t]||(e[t]=i)}_getFromSource(e,t){const i=t.split(".");t=i.pop();for(const t of i){if(!yt(e[t])){e=null;break}e=e[t]}return e?si(e[t]):void 0}_setObjectToTarget(e,t,i){Object.keys(t).forEach(n=>{this._setToTarget(e,n,t[n],i)})}}function si(e){return Ne(e,oi)}function oi(e){return St(e)||"function"==typeof e?e:void 0}function ri(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 ai(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const li=ci(z());function ci(t){if(!t)return li;return class extends t{listenTo(t,i,n,s={}){if(ri(t)||ai(t)||t instanceof e.window.EventTarget){const e={capture:!!s.useCapture,passive:!!s.usePassive},o=this._getProxyEmitter(t,e)||new ui(t,e);this.listenTo(o,i,n,s)}else super.listenTo(t,i,n,s)}stopListening(t,i,n){if(ri(t)||ai(t)||t instanceof e.window.EventTarget){const e=this._getAllProxyEmitters(t);for(const t of e)this.stopListening(t,i,n)}else super.stopListening(t,i,n)}_getProxyEmitter(e,t){return H(this,di(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)}}}class ui extends(z()){_domNode;_options;constructor(e,t){super(),q(this,di(e,t)),this._domNode=e,this._options=t}_domListeners;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,i){this.attach(e),z().prototype._addEventListener.call(this,e,t,i)}_removeEventListener(e,t){z().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 di(e,t){let i=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=A())}(e);for(const e of Object.keys(t).sort())t[e]&&(i+="-"+e);return i}function hi(t){let i=t.parentElement;if(!i)return null;for(;"BODY"!=i.tagName;){const t=i.style.overflowY||e.window.getComputedStyle(i).overflowY;if("auto"===t||"scroll"===t)break;if(i=i.parentElement,!i)return null}return i}function mi(e){const t=[];let i=e;for(;i&&i.nodeType!=Node.DOCUMENT_NODE;)t.unshift(i),i=i.parentNode;return t}function gi(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function fi(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 pi(e){if(!e.target)return null;const t=e.target.ownerDocument,i=e.clientX,n=e.clientY;let s=null;return t.caretRangeFromPoint&&t.caretRangeFromPoint(i,n)?s=t.caretRangeFromPoint(i,n):e.rangeParent&&(s=t.createRange(),s.setStart(e.rangeParent,e.rangeOffset),s.collapse(!0)),s}function bi(e,t){const i=mi(e),n=mi(t);let s=0;for(;i[s]==n[s]&&i[s];)s++;return 0===s?null:i[s-1]}function wi(t){return t&&t.parentNode?t.offsetParent===e.document.body?null:t.offsetParent:null}function vi(e){return"[object Text]"==Object.prototype.toString.call(e)}function _i(e){return"[object Range]"==Object.prototype.toString.apply(e)}const yi=["top","right","bottom","left","width","height"],ki=new Set(["relative","absolute","fixed","sticky"]);class Ci{top;right;bottom;left;width;height;_source;constructor(e){const t=_i(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),Ei(e)||t)if(t){const t=Ci.getDomRangeRects(e);xi(this,Ci.getBoundingRect(t))}else xi(this,e.getBoundingClientRect());else if(ai(e)){const{innerWidth:t,innerHeight:i}=e;xi(this,{top:0,right:t,bottom:i,left:0,width:t,height:i})}else xi(this,e)}clone(){return new Ci(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 Ci(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(Ai(e))return t;let i,n=e,s=e.parentNode||e.commonAncestorContainer;for(;s&&!Ai(s);){const e="visible"===Si(s);if(Ii(n)&&(i=n),e||i&&"absolute"===Ti(i)&&!Ii(s)){n=s,s=s.parentNode;continue}const o=new Ci(s),r=t.getIntersection(o);if(!r)return null;r.getArea()<t.getArea()&&(t=r),n=s,s=s.parentNode}return t}isEqual(e){for(const t of yi)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}toAbsoluteRect(){const{scrollX:t,scrollY:i}=e.window,n=this.clone().moveBy(t,i);if(Ei(n._source)){const e=wi(n._source);e&&function(e,t){const i=new Ci(t),n=fi(t);let s=0,o=0;s-=i.left,o-=i.top,s+=t.scrollLeft,o+=t.scrollTop,s-=n.left,o-=n.top,e.moveBy(s,o)}(n,e)}return n}excludeScrollbarsAndBorders(){const e=this._source;let t,i,n;if(ai(e))t=e.innerWidth-e.document.documentElement.clientWidth,i=e.innerHeight-e.document.documentElement.clientHeight,n=e.getComputedStyle(e.document.documentElement).direction;else{const s=fi(e);t=e.offsetWidth-e.clientWidth-s.left-s.right,i=e.offsetHeight-e.clientHeight-s.top-s.bottom,n=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=s.left,this.top+=s.top,this.right-=s.right,this.bottom-=s.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===n?this.right-=t:this.left+=t,this.height-=i,this.bottom-=i,this}static getDomRangeRects(e){const t=[],i=Array.from(e.getClientRects());if(i.length)for(const n of i){const i=new Ci(n);i._source=e,t.push(i)}else{let i=e.startContainer;vi(i)&&(i=i.parentNode);const n=new Ci(i.getBoundingClientRect());n.right=n.left,n.width=0,t.push(n)}return t}static getDomElementRects(e){return Array.from(e.getClientRects()).map(t=>{const i=new Ci(t);return i._source=e,i})}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 i=0;for(const n of e)i++,t.left=Math.min(t.left,n.left),t.top=Math.min(t.top,n.top),t.right=Math.max(t.right,n.right),t.bottom=Math.max(t.bottom,n.bottom);return 0==i?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new Ci(t))}}function xi(e,t){for(const i of yi)e[i]=t[i]}function Ai(e){return!!Ei(e)&&e===e.ownerDocument.body}function Ei(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect}function Ti(e){return e.ownerDocument.defaultView.getComputedStyle(e).position}function Si(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).overflow:"visible"}function Ii(e){return e instanceof HTMLElement&&ki.has(Ti(e))}class Pi{_element;_callback;static _observerInstance=null;static _elementCallbacks=null;constructor(e,t){Pi._observerInstance||Pi._createObserver(),this._element=e,this._callback=t,Pi._addElementCallback(e,t),Pi._observerInstance.observe(e)}get element(){return this._element}destroy(){Pi._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){Pi._elementCallbacks||(Pi._elementCallbacks=new Map);let i=Pi._elementCallbacks.get(e);i||(i=new Set,Pi._elementCallbacks.set(e,i)),i.add(t)}static _deleteElementCallback(e,t){const i=Pi._getElementCallbacks(e);i&&(i.delete(t),i.size||(Pi._elementCallbacks.delete(e),Pi._observerInstance.unobserve(e))),Pi._elementCallbacks&&!Pi._elementCallbacks.size&&(Pi._observerInstance=null,Pi._elementCallbacks=null)}static _getElementCallbacks(e){return Pi._elementCallbacks?Pi._elementCallbacks.get(e):null}static _createObserver(){Pi._observerInstance=new e.window.ResizeObserver(e=>{for(const t of e){const e=Pi._getElementCallbacks(t.target);if(e)for(const i of e)i(t)}})}}function Vi(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Ri(e){return t=>t+e}function Oi(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Bi(e,t,i){e.insertBefore(i,e.childNodes[t]||null)}function Li(e){return e&&e.nodeType===Node.COMMENT_NODE}function Mi(t){try{e.document.createAttribute(t)}catch{return!1}return!0}function Fi(e){return!!e&&(vi(e)?Fi(e.parentElement):!!e.getClientRects&&!!e.getClientRects().length)}function Ni({element:e,target:t,positions:i,limiter:n,fitInViewport:s,viewportOffsetConfig:o}){Tt(t)&&(t=t()),Tt(n)&&(n=n());const r=wi(e),a=zi(o),l=new Ci(e),c=Di(t,a);let u;if(!c||!a.getIntersection(c))return null;const d={targetRect:c,elementRect:l,positionedElementAncestor:r,viewportRect:a};if(n||s){if(n){const e=Di(n,a);e&&(d.limiterRect=e)}u=function(e,t){const{elementRect:i}=t,n=i.getArea(),s=e.map(e=>new Hi(e,t)).filter(e=>!!e.name);let o=0,r=null;for(const e of s){const{limiterIntersectionArea:t,viewportIntersectionArea:i}=e;if(t===n)return e;const s=i**2+t**2;s>o&&(o=s,r=e)}return r}(i,d)}else u=new Hi(i[0],d);return u}function Di(e,t){const i=new Ci(e).getVisible();return i?i.getIntersection(t):null}function zi(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const i=new Ci(e.window);return i.top+=t.top,i.height-=t.top,i.bottom-=t.bottom,i.height-=t.bottom,i.left+=t.left,i.right-=t.right,i.width-=t.left+t.right,i}class Hi{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(e,t){const i=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!i)return;const{left:n,top:s,name:o,config:r}=i;this.name=o,this.config=r,this._positioningFunctionCoordinates={left:n,top:s},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 qi(e){const t=e.parentNode;t&&t.removeChild(e)}function Ui(){const t=e.window.visualViewport;if(!t||!n.isiOS&&!n.isSafari)return{left:0,top:0};return{left:Math.max(Math.round(t.offsetLeft),0),top:Math.max(Math.round(t.offsetTop),0)}}function ji({target:e,viewportOffset:t=0,ancestorOffset:i=0,alignToTop:n,forceScroll:s}){const o=Zi(e);let r=o,a=null;for(t=function(e){if("number"==typeof e)return{top:e,bottom:e,left:e,right:e};return e}(t);r;){let l;l=Xi(r==o?e:a),Gi({parent:l,getRect:()=>en(e,r),alignToTop:n,ancestorOffset:i,forceScroll:s});let c=en(e,r);const u=en(l,r);if(c.height>u.height){const e=c.getIntersection(u);e&&(c=e)}if(Wi({window:r,rect:c,viewportOffset:t,alignToTop:n,forceScroll:s}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}function $i(e,t,i,n,s){Gi({parent:Xi(e),getRect:()=>new Ci(e),ancestorOffset:t,limiterElement:i,alignToTop:n,forceScroll:s})}function Wi({window:e,rect:t,alignToTop:i,forceScroll:n,viewportOffset:s}){const o=t.clone().moveBy(0,s.bottom),r=t.clone().moveBy(0,-s.top),a=new Ci(e).excludeScrollbarsAndBorders(),l=i&&n,c=[r,o].every(e=>a.contains(e));let{scrollX:u,scrollY:d}=e;const h=u,m=d;l?d-=a.top-t.top+s.top:c||(Ji(r,a)?d-=a.top-t.top+s.top:Ki(o,a)&&(d+=i?t.top-a.top-s.top:t.bottom-a.bottom+s.bottom)),c||(Qi(t,a)?u-=a.left-t.left+s.left:Yi(t,a)&&(u+=t.right-a.right+s.right)),u==h&&d===m||e.scrollTo(u,d)}function Gi({parent:e,getRect:t,alignToTop:i,forceScroll:n,ancestorOffset:s=0,limiterElement:o}){const r=Zi(e),a=i&&n;let l,c,u;const d=o||r.document.body;for(;e!=d;)c=t(),l=new Ci(e).excludeScrollbarsAndBorders(),u=l.contains(c),a?e.scrollTop-=l.top-c.top+s:u||(Ji(c,l)?e.scrollTop-=l.top-c.top+s:Ki(c,l)&&(e.scrollTop+=i?c.top-l.top-s:c.bottom-l.bottom+s)),u||(Qi(c,l)?e.scrollLeft-=l.left-c.left+s:Yi(c,l)&&(e.scrollLeft+=c.right-l.right+s)),e=e.parentNode}function Ki(e,t){return e.bottom>t.bottom}function Ji(e,t){return e.top<t.top}function Qi(e,t){return e.left<t.left}function Yi(e,t){return e.right>t.right}function Zi(e){return _i(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Xi(e){if(_i(e)){let t=e.commonAncestorContainer;return vi(t)&&(t=t.parentNode),t}return e.parentNode}function en(e,t){const i=Zi(e),n=new Ci(e);if(i===t)return n;{let e=i;for(;e!=t;){const t=e.frameElement,i=new Ci(t).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),e=e.parent}}return n}const tn={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},nn={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},sn={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},on=mn(),rn=Object.fromEntries(Object.entries(on).map(([e,t])=>{let i;return i=t in sn?sn[t]:e.charAt(0).toUpperCase()+e.slice(1),[t,i]}));function an(e){let t;if("string"==typeof e){if(t=on[e.toLowerCase()],!t)throw new I("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?on.alt:0)+(e.ctrlKey?on.ctrl:0)+(e.shiftKey?on.shift:0)+(e.metaKey?on.cmd:0);return t}function ln(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 an(e.slice(0,-1));const t=an(e);return(n.isMac||n.isiOS)&&t==on.ctrl?on.cmd:t}(e):e).reduce((e,t)=>t+e,0)}function cn(e,t){let i=ln(e);const s=t?"Mac"===t:n.isMac||n.isiOS;return Object.entries(s?tn:nn).reduce((e,[t,n])=>(0!=(i&on[t])&&(i&=~on[t],e+=n),e),"")+(i?rn[i]:"")}function un(e){return e==on.arrowright||e==on.arrowleft||e==on.arrowup||e==on.arrowdown}function dn(e,t){const i="ltr"===t;switch(e){case on.arrowleft:return i?"left":"right";case on.arrowright:return i?"right":"left";case on.arrowup:return"up";case on.arrowdown:return"down"}}function hn(e,t){const i=dn(e,t);return"down"===i||"right"===i}function mn(){const e={pageup:33,pagedown:34,end:35,home:36,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}const gn=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig","ur","urd"];function fn(e){return gn.includes(e)?"rtl":"ltr"}function pn(e){return Array.isArray(e)?e:[e]}function bn(t,i,n){e.window.CKEDITOR_TRANSLATIONS[t]||(e.window.CKEDITOR_TRANSLATIONS[t]={});const s=e.window.CKEDITOR_TRANSLATIONS[t];s.dictionary=s.dictionary||{},s.getPluralForm=n||s.getPluralForm,Object.assign(s.dictionary,i)}function wn(t,i,n=1,s){if("number"!=typeof n)throw new I("translation-service-quantity-not-a-number",null,{quantity:n});const o=s||e.window.CKEDITOR_TRANSLATIONS,r=function(e){return Object.keys(e).length}(o);1===r&&(t=Object.keys(o)[0]);const a=i.id||i.string;if(0===r||!function(e,t,i){return!!i