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.91 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
*/
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let u;try{u={window,document}}catch{u={window:{},document:{}}}function d(){try{return navigator.userAgent.toLowerCase()}catch{return``}}const f=d(),p={isMac:m(f),isWindows:h(f),isGecko:g(f),isSafari:_(f),isiOS:v(f),isAndroid:y(f),isBlink:ee(f),get isMediaForcedColors(){return x()},get isMotionReduced(){return te()},features:{isRegExpUnicodePropertySupported:b()}};function m(e){return e.indexOf(`macintosh`)>-1}function h(e){return e.indexOf(`windows`)>-1}function g(e){return!!e.match(/gecko\/\d+/)}function _(e){return e.indexOf(` applewebkit/`)>-1&&e.indexOf(`chrome`)===-1}function v(e){return!!e.match(/iphone|ipad/i)||m(e)&&navigator.maxTouchPoints>0}function y(e){return e.indexOf(`android`)>-1}function ee(e){return e.indexOf(`chrome/`)>-1&&e.indexOf(`edge/`)<0}function b(){let e=!1;try{e=`ć`.search(RegExp(`[\\p{L}]`,`u`))===0}catch{}return e}function x(){return u.window.matchMedia?u.window.matchMedia(`(forced-colors: active)`).matches:!1}function te(){return u.window.matchMedia?u.window.matchMedia(`(prefers-reduced-motion)`).matches:!1}function ne(e,t,n,r){n||=function(e,t){return e===t};let i=Array.isArray(e)?e:Array.prototype.slice.call(e),a=Array.isArray(t)?t:Array.prototype.slice.call(t),o=re(i,a,n);return r?ae(o,a.length):ie(a,o)}function re(e,t,n){let r=S(e,t,n);if(r===-1)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};let i=S(C(e,r),C(t,r),n);return{firstIndex:r,lastIndexOld:e.length-i,lastIndexNew:t.length-i}}function S(e,t,n){for(let r=0;r<Math.max(e.length,t.length);r++)if(e[r]===void 0||t[r]===void 0||!n(e[r],t[r]))return r;return-1}function C(e,t){return e.slice(t).reverse()}function ie(e,t){let n=[],{firstIndex:r,lastIndexOld:i,lastIndexNew:a}=t;return a-r>0&&n.push({index:r,type:`insert`,values:e.slice(r,a)}),i-r>0&&n.push({index:r+(a-r),type:`delete`,howMany:i-r}),n}function ae(e,t){let{firstIndex:n,lastIndexOld:r,lastIndexNew:i}=e;if(n===-1)return Array(t).fill(`equal`);let a=[];return n>0&&(a=a.concat(Array(n).fill(`equal`))),i-n>0&&(a=a.concat(Array(i-n).fill(`insert`))),r-n>0&&(a=a.concat(Array(r-n).fill(`delete`))),i<t&&(a=a.concat(Array(t-i).fill(`equal`))),a}const oe=function(e,t,n){n||=function(e,t){return e===t};let r=e.length,i=t.length;if(r>200||i>200||r+i>300)return oe.fastDiff(e,t,n,!0);let a,o;if(i<r){let n=e;e=t,t=n,a=`delete`,o=`insert`}else a=`insert`,o=`delete`;let s=e.length,c=t.length,l=c-s,u={},d={};function f(r){let i=(d[r-1]===void 0?-1:d[r-1])+1,l=d[r+1]===void 0?-1:d[r+1],f=i>l?-1:1;u[r+f]&&(u[r]=u[r+f].slice(0)),u[r]||(u[r]=[]),u[r].push(i>l?a:o);let p=Math.max(i,l),m=p-r;for(;m<s&&p<c&&n(e[m],t[p]);)m++,p++,u[r].push(`equal`);return p}let p=0,m;do{for(m=-p;m<l;m++)d[m]=f(m);for(m=l+p;m>l;m--)d[m]=f(m);d[l]=f(l),p++}while(d[l]!==c);return u[l].slice(1)};oe.fastDiff=ne;function se(e,t){let n=[],r=0,i=null;return e.forEach(e=>{e==`equal`?(a(),r++):e==`insert`?(i&&i.type==`insert`?i.values.push(t[r]):(a(),i={type:`insert`,index:r,values:[t[r]]}),r++):i&&i.type==`delete`?i.howMany++:(a(),i={type:`delete`,index:r,howMany:1})}),a(),n;function a(){i&&=(n.push(i),null)}}function ce(e,t){if(e===t&&de(e))return!0;let n=le(e),r=le(t);for(let e of n)if(r.has(e))return!0;return!1}function le(e){let t=[e],n=new Set;for(;t.length>0;){let e=t.shift();if(!(n.has(e)||ue(e)))if(n.add(e),e[Symbol.iterator])try{t.push(...e)}catch{}else t.push(...Object.values(e))}return n}function ue(e){let t=Object.prototype.toString.call(e);return t===`[object Number]`||t===`[object Boolean]`||t===`[object String]`||t===`[object Symbol]`||t===`[object Function]`||t===`[object Date]`||t===`[object RegExp]`||e==null||e instanceof EventTarget||e instanceof Event}function de(e){return typeof e==`object`&&!!e}function fe(){return function e(){e.called=!0}}var pe=class{source;name;path;stop;off;return;constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=fe(),this.off=fe()}};const me=Array(256).fill(``).map((e,t)=>(`0`+t.toString(16)).slice(-2));function he(){let[e,t,n,r]=crypto.getRandomValues(new Uint32Array(4));return`e`+me[e>>0&255]+me[e>>8&255]+me[e>>16&255]+me[e>>24&255]+me[t>>0&255]+me[t>>8&255]+me[t>>16&255]+me[t>>24&255]+me[n>>0&255]+me[n>>8&255]+me[n>>16&255]+me[n>>24&255]+me[r>>0&255]+me[r>>8&255]+me[r>>16&255]+me[r>>24&255]}const ge={get(e=`normal`){return typeof e==`number`?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function _e(e,t){let n=ge.get(t.priority),r=0,i=e.length;for(;r<i;){let t=r+i>>1;ge.get(e[t].priority)<n?i=t:r=t+1}e.splice(r,0,t)}const ve=`https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html`;var w=class e extends Error{context;data;constructor(e,t,n,r){super(xe(e,n,r)),this.name=`CKEditorError`,this.context=t,this.data=n,r&&(this.stack=r.stack)}is(e){return e===`CKEditorError`}static rethrowUnexpectedError(t,n){throw t.is&&t.is(`CKEditorError`)?t:new e(`unexpected-error`,n,void 0,t)}};function T(e,t){console.warn(...Se(e,t))}function ye(e,t){console.error(...Se(e,t))}function be(e){return`\nRead more: ${ve}#error-${e}`}function xe(e,t,n){let r=new WeakSet,i=t?` ${JSON.stringify(t,(e,t)=>{if(typeof t==`object`&&t){if(r.has(t))return`[object ${t.constructor.name}]`;r.add(t)}return t})}`:``,a=be(e),o=n?`\nOriginal error: ${n.name}: ${n.message}`:``;return e+i+a+o}function Se(e,t){let n=be(e);return t?[e,t,n]:[e,n]}const Ce=`48.3.0`,we=new Date(2026,5,2);if(globalThis.CKEDITOR_VERSION)throw new w(`ckeditor-duplicated-modules`,null);globalThis.CKEDITOR_VERSION=Ce;const Te=Symbol(`listeningTo`),Ee=Symbol(`emitterId`),De=Symbol(`delegations`),Oe=E(Object);function E(e){if(!e)return Oe;class t extends e{on(e,t,n){this.listenTo(this,e,t,n)}once(e,t,n){let r=!1;this.listenTo(this,e,(e,...n)=>{r||(r=!0,e.off(),t.call(this,e,...n))},n)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,n,r={}){let i,a;this[Te]||(this[Te]={});let o=this[Te];je(e)||Ae(e);let s=je(e);(i=o[s])||(i=o[s]={emitter:e,callbacks:{}}),(a=i.callbacks[t])||(a=i.callbacks[t]=[]),a.push(n),Re(this,e,t,n,r)}stopListening(e,t,n){let r=this[Te],i=e&&je(e),a=r&&i?r[i]:void 0,o=a&&t?a.callbacks[t]:void 0;if(!(!r||e&&!a||t&&!o))if(n)ze(this,e,t,n),o.indexOf(n)!==-1&&(o.length===1?delete a.callbacks[t]:ze(this,e,t,n));else if(o){for(;n=o.pop();)ze(this,e,t,n);delete a.callbacks[t]}else if(a){for(t in a.callbacks)this.stopListening(e,t);delete r[i]}else{for(i in r)this.stopListening(r[i].emitter);delete this[Te]}}fire(e,...t){try{let n=e instanceof pe?e:new pe(this,e),r=n.name,i=Ie(this,r);if(n.path.push(this),i){i=i.slice();for(let e=0;e<i.length;e++){let a=i[e].callback;if(a.call(this,n,...t),n.off.called&&(delete n.off.called,this._removeEventListener(r,a)),n.stop.called)break}}let a=this[De];if(a){let e=a.get(r),i=a.get(`*`);e&&Le(e,n,t),i&&Le(i,n,t)}return n.return}catch(e){w.rethrowUnexpectedError(e,this)}}delegate(...e){return{to:(t,n)=>{this[De]||(this[De]=new Map),e.forEach(e=>{let r=this[De].get(e);r?r.set(t,n):this[De].set(e,new Map([[t,n]]))})}}}stopDelegating(e,t){if(this[De])if(!e)this[De].clear();else if(!t)this[De].delete(e);else{let n=this[De].get(e);n&&n.delete(t)}}_addEventListener(e,t,n){Pe(this,e);let r=Fe(this,e),i={callback:t,priority:ge.get(n.priority)};for(let e of r)_e(e,i)}_removeEventListener(e,t){let n=Fe(this,e);for(let e of n)for(let n=0;n<e.length;n++)e[n].callback==t&&(e.splice(n,1),n--)}}return t}function ke(e,t){let n=e[Te];return n&&n[t]?n[t].emitter:null}function Ae(e,t){e[Ee]||(e[Ee]=t||he())}function je(e){return e[Ee]}function Me(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function Ne(){return{callbacks:[],childEvents:[]}}function Pe(e,t){let n=Me(e);if(n[t])return;let r=t,i=null,a=[];for(;r!==``&&!n[r];)n[r]=Ne(),a.push(n[r]),i&&n[r].childEvents.push(i),i=r,r=r.substr(0,r.lastIndexOf(`:`));if(r!==``){for(let e of a)e.callbacks=n[r].callbacks.slice();n[r].childEvents.push(i)}}function Fe(e,t){let n=Me(e)[t];if(!n)return[];let r=[n.callbacks];for(let t=0;t<n.childEvents.length;t++){let i=Fe(e,n.childEvents[t]);r=r.concat(i)}return r}function Ie(e,t){if(!e._events)return null;let n=t;do{let t=e._events[n];if(t&&t.callbacks&&t.callbacks.length)return t.callbacks;let r=n.lastIndexOf(`:`);n=r>-1?n.substring(0,r):``}while(n);return null}function Le(e,t,n){for(let[r,i]of e){i?typeof i==`function`&&(i=i(t.name)):i=t.name;let e=new pe(t.source,i);e.path=[...t.path],r.fire(e,...n)}}function Re(e,t,n,r,i){t._addEventListener?t._addEventListener(n,r,i):e._addEventListener.call(t,n,r,i)}function ze(e,t,n,r){t._removeEventListener?t._removeEventListener(n,r):e._removeEventListener.call(t,n,r)}function Be(e,t){let n={};for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);Object.hasOwn(n,a)||(n[a]=[]),n[a].push(i)}return n}function Ve(e){return e}function eee(e){return Number.isSafeInteger(e)&&e>=0}function He(e){return e!=null&&typeof e!=`function`&&eee(e.length)}function Ue(e){return e===`__proto__`}function We(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function Ge(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ke(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Ke).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function qe(e){if(Array.isArray(e))return e.map(Ge);if(typeof e==`symbol`)return[e];e=Ke(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r<n;){let s=e[r];a?s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s:o?s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s:s===`[`?(o=!0,i&&=(t.push(i),``)):s===`.`?i&&=(t.push(i),``):i+=s,r++}return i&&t.push(i),t}function Je(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(Ue(t))return n;let r=e[t];return r===void 0?We(t)?Je(e,qe(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Ge(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Ye(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),Ue(t))return n;let r=e[t];return r===void 0?n:r}}}function Ye(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||Ue(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function tee(e){return function(t){return Je(t,e)}}function Xe(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Ze(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function Qe(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function $e(e,t,n){return typeof n==`function`?et(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?et(t,r,e,s):!!c},new Map):$e(e,t,()=>void 0)}function et(e,t,n,r){if(t===e)return!0;switch(typeof t){case`object`:return tt(e,t,n,r);case`function`:return Object.keys(t).length>0?et(e,{...t},n,r):Qe(e,t);default:return Xe(e)?typeof t==`string`?t===``:!0:Qe(e,t)}}function tt(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return rt(e,t,n,r);if(t instanceof Map)return nt(e,t,n,r);if(t instanceof Set)return it(e,t,n,r);let i=Object.keys(t);if(e==null||Ze(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!Ze(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function nt(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function rt(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function it(e,t,n,r){return t.size===0?!0:e instanceof Set?rt([...e],[...t],n,r):!1}function at(e,t){return $e(e,t,()=>void 0)}function ot(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function st(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}const ct=`[object RegExp]`,lt=`[object String]`,ut=`[object Number]`,dt=`[object Boolean]`,ft=`[object Arguments]`,pt=`[object Symbol]`,mt=`[object Date]`,ht=`[object Map]`,gt=`[object Set]`,_t=`[object Array]`,vt=`[object ArrayBuffer]`,yt=`[object Object]`,bt=`[object DataView]`,xt=`[object Uint8Array]`,St=`[object Uint8ClampedArray]`,Ct=`[object Uint16Array]`,wt=`[object Uint32Array]`,Tt=`[object Int8Array]`,Et=`[object Int16Array]`,Dt=`[object Int32Array]`,Ot=`[object Float32Array]`,kt=`[object Float64Array]`;function At(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function jt(e,t){return Mt(e,void 0,e,new Map,t)}function Mt(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(Ze(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Mt(e[a],a,n,r,i);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){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Mt(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Mt(a,void 0,n,r,i));return t}if(typeof Buffer<`u`&&Buffer.isBuffer(e))return e.subarray();if(At(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Mt(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Nt(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Nt(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Nt(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Nt(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Nt(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Nt(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Nt(t,e,n,r,i),t}if(typeof e==`object`&&Pt(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Nt(t,e,n,r,i),t}return e}function Nt(e,t,n=e,r,i){let a=[...Object.keys(t),...ot(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Mt(t[s],s,n,r,i))}}function Pt(e){switch(st(e)){case ft:case _t:case vt:case bt:case dt:case mt:case Ot:case kt:case Tt:case Et:case Dt:case ht:case ut:case yt:case ct:case gt:case lt:case pt:case xt:case St:case Ct:case wt:return!0;default:return!1}}function Ft(e){return Mt(e,void 0,e,new Map,void 0)}function It(e){return e=Ft(e),t=>at(t,e)}function Lt(e,t){return jt(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(st(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Nt(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case ut:case lt:case dt:{let t=new e.constructor(e?.valueOf());return Nt(t,e),t}case ft:{let t={};return Nt(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Rt(e){return Lt(e)}const zt=/^(?:0|[1-9]\d*)$/;function Bt(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return zt.test(e)}}function Vt(e){return typeof e==`object`&&!!e&&st(e)===`[object Arguments]`}function Ht(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&We(t)&&e?.[t]==null?qe(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||Vt(r))&&Bt(t)&&t<r.length))return!1;r=r[t]}return!0}function nee(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=Ge(e);break}return t=Rt(t),function(n){let r=Je(n,e);return r===void 0?Ht(n,e):t===void 0?r===void 0:at(r,t)}}function Ut(e){if(e==null)return Ve;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?nee(e[0],e[1]):It(e);case`string`:case`symbol`:case`number`:return tee(e)}}function Wt(e,t){return e==null?{}:Be(He(e)?Array.from(e):Object.values(e),Ut(t??Ve))}function Gt(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Kt(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Gt(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function qt(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return Kt(e,t,{leading:r,maxWait:t,trailing:i})}function Jt(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function Yt(e,t,n){return Xt(e,t,void 0,void 0,void 0,void 0,n)}function Xt(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return Zt(e,t,a,o)}return Zt(e,t,a,o)}function Zt(e,t,n,r){if(Object.is(e,t))return!0;let i=st(e),a=st(t);if(i===`[object Arguments]`&&(i=yt),a===`[object Arguments]`&&(a=yt),i!==a)return!1;switch(i){case lt:return e.toString()===t.toString();case ut:return Qe(e.valueOf(),t.valueOf());case dt:case mt:case pt:return Object.is(e.valueOf(),t.valueOf());case ct:return e.source===t.source&&e.flags===t.flags;case`[object Function]`:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case ht:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!Xt(a,t.get(i),i,e,t,n,r))return!1;return!0;case gt:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>Xt(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case _t:case xt:case St:case Ct:case wt:case`[object BigUint64Array]`:case Tt:case Et:case Dt:case`[object BigInt64Array]`:case Ot:case kt:if(typeof Buffer<`u`&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Xt(e[i],t[i],i,e,t,n,r))return!1;return!0;case vt:return e.byteLength===t.byteLength?Zt(new Uint8Array(e),new Uint8Array(t),n,r):!1;case bt:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Zt(new Uint8Array(e),new Uint8Array(t),n,r);case`[object Error]`:return e.name===t.name&&e.message===t.message;case yt:{if(!(Zt(e.constructor,t.constructor,n,r)||Jt(e)&&Jt(t)))return!1;let i=[...Object.keys(e),...ot(e)],a=[...Object.keys(t),...ot(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!Xt(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Qt(){}function $t(e,t){return Yt(e,t,Qt)}function en(e){return e}function tn(e){return typeof Buffer<`u`&&Buffer.isBuffer(e)}function nn(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function rn(e){return At(e)}function an(e){return typeof e==`symbol`||e instanceof Symbol}function on(e){return an(e)?NaN:Number(e)}function sn(e){return e?(e=on(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function cn(e){let t=sn(e),n=t%1;return n?t-n:t}function ln(e,t){if(e=cn(e),e<1||!Number.isSafeInteger(e))return[];let n=Array(e);for(let r=0;r<e;r++)n[r]=typeof t==`function`?t(r):r;return n}function un(e){if(e==null)return[];switch(typeof e){case`object`:case`function`:return He(e)?iee(e):nn(e)?ree(e):dn(e);default:return dn(Object(e))}}function dn(e){let t=[];for(let n in e)t.push(n);return t}function ree(e){return dn(e).filter(e=>e!==`constructor`)}function iee(e){let t=ln(e.length,e=>`${e}`),n=new Set(t);tn(e)&&(n.add(`offset`),n.add(`parent`)),rn(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=dn(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function fn(e,...t){for(let n=0;n<t.length;n++)aee(e,t[n]);return e}function aee(e,t){let n=un(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!Qe(e[i],t[i]))&&(e[i]=t[i])}}function oee(e){return Array.isArray(e)}function see(e){if(Ze(e))return e;let t=st(e);if(!cee(e))return{};if(oee(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(rn(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?hn(r,e):pn(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return pn(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return gn(n,e),pn(n,e),mn(n,e),n}function cee(e){switch(st(e)){case ft:case _t:case vt:case bt:case dt:case mt:case Ot:case kt:case Tt:case Et:case Dt:case ht:case ut:case yt:case ct:case gt:case lt:case pt:case xt:case St:case Ct:case wt:return!0;default:return!1}}function pn(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function mn(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function hn(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function gn(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}function _n(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[a]=t(o,a,e)}return n}function vn(e,t=Ve){return e==null?{}:_n(e,Ut(t))}function yn(e){if(Ze(e))return e;if(Array.isArray(e)||At(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function bn(e){return typeof e==`object`&&!!e}function lee(e){return bn(e)&&He(e)}function xn(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Sn(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=Cn(i,t,r,new Map)}return i}function Cn(e,t,n,r){if(Ze(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return yn(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...ot(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Ue(o))continue;let s=t[o],c=e[o];if(Vt(s)&&(s={...s}),Vt(c)&&(c={...c}),typeof Buffer<`u`&&Buffer.isBuffer(s)&&(s=Rt(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(lee(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||bn(c)&&bn(s)&&(xn(c)||xn(s)||rn(c)||rn(s))?e[o]=Cn(c,s,n,r):c==null&&xn(s)?e[o]=Cn({},s,n,r):c==null&&rn(s)?e[o]=Rt(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function wn(e,...t){return Sn(e,...t,Qt)}const Tn=(e,t,n)=>{let r=e[t];(!(Object.hasOwn(e,t)&&Qe(r,n))||n===void 0&&!(t in e))&&(e[t]=n)},En=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dn=/^\w*$/;function uee(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||an(e)?!0:typeof e==`string`&&(Dn.test(e)||!En.test(e))||t!=null&&Object.hasOwn(t,e)}function dee(e,t,n,r){if(e==null&&!Xe(e))return e;let i;i=uee(t,e)?[t]:Array.isArray(t)?t:qe(t);let a=n(Je(e,i)),o=e;for(let t=0;t<i.length&&o!=null;t++){let n=Ge(i[t]);if(Ue(n))continue;let s;if(t===i.length-1)s=a;else{let a=o[n],c=r?.(a,n,e);s=c===void 0?Xe(a)?a:Bt(i[t+1])?[]:{}:c}Tn(o,n,s),o=o[n]}return e}function On(e,t,n){return dee(e,t,()=>n,()=>void 0)}function fee(e){return e==null}function kn(e,...t){if(fee(e))return{};let n={};for(let r=0;r<t.length;r++){let i=t[r];switch(typeof i){case`object`:Array.isArray(i)||(i=He(i)?Array.from(i):[i]);break;case`string`:case`symbol`:case`number`:i=[i];break}for(let t of i){let r=Je(e,t);r===void 0&&!Ht(e,t)||(typeof t==`string`&&Object.hasOwn(e,t)?n[t]=r:On(n,t,r))}}return n}function An(e){return typeof e==`function`}function jn(e){return bn(e)&&e.nodeType===1&&!xn(e)}function Mn(e){if(e==null)return!0;if(He(e))return typeof e.splice!=`function`&&typeof e!=`string`&&(typeof Buffer>`u`||!Buffer.isBuffer(e))&&!rn(e)&&!Vt(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return nn(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}function Nn(e,t){if(!Number.isInteger(e)||e<0)throw Error(`n must be a non-negative integer.`);let n=0;return(...r)=>{if(++n>=e)return t(...r)}}function Pn(e,t,n){return typeof n!=`function`&&(n=()=>void 0),Yt(e,t,(...r)=>{let i=n(...r);if(i!==void 0)return!!i;if(e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set)return Pn(Array.from(e),Array.from(t),Nn(2,n))})}function Fn(e){return typeof e==`string`||e instanceof String}const In={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Ln(e){return e.replace(/[&<>"']/g,e=>In[e])}function Rn(e){return Ln(Ke(e))}function zn(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`)}function Bn(e){return zn(Ke(e))}const Vn=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 Hn(e){e=e.normalize(`NFD`);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r>=`̀`&&r<=`ͯ`||r>=`︠`&&r<=`︣`||(t+=Vn.get(r)??r)}return t}function Un(e){return Hn(Ke(e))}const Wn=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function Gn(e){return Array.from(e.match(Wn)??[])}function Kn(e){return typeof e!=`string`&&(e=Ke(e)),e.replace(/['\u2019]/g,``)}function qn(e){let t=Gn(Kn(Un(e)).trim()),n=``;for(let e=0;e<t.length;e++){let r=t[e];n&&(n+=` `),r===r.toUpperCase()?n+=r:n+=r[0].toUpperCase()+r.slice(1).toLowerCase()}return n}function Jn(e){return e.substring(0,1).toUpperCase()+e.substring(1)}function Yn(e){return Jn(Ke(e))}const Xn=Symbol(`observableProperties`),Zn=Symbol(`boundObservables`),Qn=Symbol(`boundProperties`),$n=Symbol(`decoratedMethods`),er=Symbol(`decoratedOriginal`),tr=D(E());function D(e){if(!e)return tr;class t extends e{set(e,t){if(Xe(e)){Object.keys(e).forEach(t=>{this.set(t,e[t])},this);return}nr(this);let n=this[Xn];if(e in this&&!n.has(e))throw new w(`observable-set-cannot-override`,this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){let r=n.get(e),i=this.fire(`set:${e}`,e,t,r);i===void 0&&(i=t),(r!==i||!n.has(e))&&(n.set(e,i),this.fire(`change:${e}`,e,i,r))}}),this[e]=t}bind(...e){if(!e.length||!or(e))throw new w(`observable-bind-wrong-properties`,this);if(new Set(e).size!==e.length)throw new w(`observable-bind-duplicate-properties`,this);nr(this);let t=this[Qn];e.forEach(e=>{if(t.has(e))throw new w(`observable-bind-rebind`,this)});let n=new Map;return e.forEach(e=>{let r={property:e,to:[]};t.set(e,r),n.set(e,r)}),{to:rr,toMany:ir,_observable:this,_bindProperties:e,_to:[],_bindings:n}}unbind(...e){if(!this[Xn])return;let t=this[Qn],n=this[Zn];if(e.length){if(!or(e))throw new w(`observable-unbind-wrong-properties`,this);e.forEach(e=>{let r=t.get(e);r&&(r.to.forEach(([e,t])=>{let i=n.get(e),a=i[t];a.delete(r),a.size||delete i[t],Object.keys(i).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){nr(this);let t=this[e];if(!t)throw new w(`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][er]=t,this[$n]||(this[$n]=[]),this[$n].push(e)}stopListening(e,t,n){if(!e&&this[$n]){for(let e of this[$n])this[e]=this[e][er];delete this[$n]}super.stopListening(e,t,n)}[Xn];[$n];[Qn];[Zn]}return t}function nr(e){e[Xn]||(Object.defineProperty(e,Xn,{value:new Map}),Object.defineProperty(e,Zn,{value:new Map}),Object.defineProperty(e,Qn,{value:new Map}))}function rr(...e){let t=sr(...e),n=Array.from(this._bindings.keys()),r=n.length;if(!t.callback&&t.to.length>1)throw new w(`observable-bind-to-no-callback`,this);if(r>1&&t.callback)throw new w(`observable-bind-to-extra-callback`,this);t.to.forEach(e=>{if(e.properties.length&&e.properties.length!==r)throw new w(`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),hee(this._observable,this._to),mee(this),this._bindProperties.forEach(e=>{cr(this._observable,e)})}function ir(e,t,n){if(this._bindings.size>1)throw new w(`observable-bind-to-many-not-one-binding`,this);this.to(...ar(e,t),n)}function ar(e,t){let n=e.map(e=>[e,t]);return Array.prototype.concat.apply([],n)}function or(e){return e.every(e=>typeof e==`string`)}function sr(...e){if(!e.length)throw new w(`observable-bind-to-parse-error`,null);let t={to:[]},n;return typeof e[e.length-1]==`function`&&(t.callback=e.pop()),e.forEach(e=>{if(typeof e==`string`)n.properties.push(e);else if(typeof e==`object`)n={observable:e,properties:[]},t.to.push(n);else throw new w(`observable-bind-to-parse-error`,null)}),t}function pee(e,t,n,r){let i=e[Zn],a=i.get(n),o=a||{};o[r]||(o[r]=new Set),o[r].add(t),a||i.set(n,o)}function mee(e){let t;e._bindings.forEach((n,r)=>{e._to.forEach(i=>{t=i.properties[n.callback?0:e._bindProperties.indexOf(r)],n.to.push([i.observable,t]),pee(e._observable,n,i.observable,t)})})}function cr(e,t){let n=e[Qn].get(t),r;n.callback?r=n.callback.apply(e,n.to.map(e=>e[0][e[1]])):(r=n.to[0],r=r[0][r[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=r:e.set(t,r)}function hee(e,t){t.forEach(t=>{let n=e[Zn],r;n.get(t.observable)||e.listenTo(t.observable,`change`,(i,a)=>{r=n.get(t.observable)[a],r&&r.forEach(t=>{cr(e,t.property)})})})}var lr=class{_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 ur(e){let t=new AbortController;function n(...n){return t.abort(),t=new AbortController,e(t.signal,...n)}return n.abort=()=>t.abort(),n}function dr(e){let t=0;for(let n of e)t++;return t}function fr(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!=t[r])return r;return e.length==t.length?`same`:e.length<t.length?`prefix`:`extension`}function pr(e){return!!(e&&e[Symbol.iterator])}function mr(e,t,n={},r=[]){let i=n&&n.xmlns,a=i?e.createElementNS(i,t):e.createElement(t);for(let e in n)a.setAttribute(e,n[e]);(Fn(r)||!pr(r))&&(r=[r]);for(let t of r)Fn(t)&&(t=e.createTextNode(t)),a.appendChild(t);return a}var hr=class{_config;constructor(e,t){this._config=Object.create(null),t&&this.define(gr(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(let e of Object.keys(this._config))yield e}_setToTarget(e,t,n,r=!1){if(xn(t)){this._setObjectToTarget(e,t,r);return}let i=t.split(`.`);t=i.pop();for(let t of i)xn(e[t])||(e[t]=Object.create(null)),e=e[t];if(xn(n)){xn(e[t])||(e[t]=Object.create(null)),e=e[t],this._setObjectToTarget(e,n,r);return}r&&e[t]!==void 0||(e[t]=n)}_getFromSource(e,t){let n=t.split(`.`);t=n.pop();for(let t of n){if(!xn(e[t])){e=null;break}e=e[t]}return e?gr(e[t]):void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach(r=>{this._setToTarget(e,r,t[r],n)})}};function gr(e){return Lt(e,_r)}function _r(e){return jn(e)||typeof e==`function`?e:void 0}function vr(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 yr(e){let t=Object.prototype.toString.apply(e);return t==`[object Window]`||t==`[object global]`}const gee=br(E()),_ee=E();function br(e){if(!e)return gee;class t extends e{listenTo(e,t,n,r={}){if(vr(e)||yr(e)||e instanceof u.window.EventTarget){let i={capture:!!r.useCapture,passive:!!r.usePassive},a=this._getProxyEmitter(e,i)||new xr(e,i);this.listenTo(a,t,n,r)}else super.listenTo(e,t,n,r)}stopListening(e,t,n){if(vr(e)||yr(e)||e instanceof u.window.EventTarget){let r=this._getAllProxyEmitters(e);for(let e of r)this.stopListening(e,t,n)}else super.stopListening(e,t,n)}_getProxyEmitter(e,t){return ke(this,Cr(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)}}return t}var xr=class extends _ee{_domNode;_options;constructor(e,t){super(),Ae(this,Cr(e,t)),this._domNode=e,this._options=t}_domListeners;attach(e){if(this._domListeners&&this._domListeners[e])return;let t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),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),E().prototype._addEventListener.call(this,e,t,n)}_removeEventListener(e,t){E().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){let t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}};function Sr(e){return e[`data-ck-expando`]||=he()}function Cr(e,t){let n=Sr(e);for(let e of Object.keys(t).sort())t[e]&&(n+=`-`+e);return n}function wr(e){let t=e.parentElement;if(!t)return null;for(;t.tagName!=`BODY`;){let e=t.style.overflowY||u.window.getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)break;if(t=t.parentElement,!t)return null}return t}function Tr(e){let t=[],n=e;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)t.unshift(n),n=n.parentNode;return t}function Er(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function Dr(e){let 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 Or(e){if(!e.target)return null;let t=e.target.ownerDocument,n=e.clientX,r=e.clientY,i=null;return t.caretRangeFromPoint&&t.caretRangeFromPoint(n,r)?i=t.caretRangeFromPoint(n,r):e.rangeParent&&(i=t.createRange(),i.setStart(e.rangeParent,e.rangeOffset),i.collapse(!0)),i}function kr(e,t){let n=Tr(e),r=Tr(t),i=0;for(;n[i]==r[i]&&n[i];)i++;return i===0?null:n[i-1]}function Ar(e){return!e||!e.parentNode||e.offsetParent===u.document.body?null:e.offsetParent}function jr(e){return Object.prototype.toString.call(e)==`[object Text]`}function Mr(e){return Object.prototype.toString.apply(e)==`[object Range]`}const Nr=[`top`,`right`,`bottom`,`left`,`width`,`height`],Pr=new Set([`relative`,`absolute`,`fixed`,`sticky`]);var O=class e{top;right;bottom;left;width;height;_source;constructor(t){let n=Mr(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Lr(t)||n)if(n){let n=e.getDomRangeRects(t);Fr(this,e.getBoundingRect(n))}else Fr(this,t.getBoundingClientRect());else if(yr(t)){let{innerWidth:e,innerHeight:n}=t;Fr(this,{top:0,right:e,bottom:n,left:0,width:e,height:n})}else Fr(this,t)}clone(){return new e(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(t){let n={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left),width:0,height:0};if(n.width=n.right-n.left,n.height=n.bottom-n.top,n.width<0||n.height<0)return null;{let t=new e(n);return t._source=this._source,t}}getIntersectionArea(e){let t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){let t=this._source,n=this.clone();if(Ir(t))return n;let r=t,i=t.parentNode||t.commonAncestorContainer,a;for(;i&&!Ir(i);){let t=zr(i)===`visible`;if(Br(r)&&(a=r),t||a&&Rr(a)===`absolute`&&!Br(i)){r=i,i=i.parentNode;continue}let o=new e(i),s=n.getIntersection(o);if(s)s.getArea()<n.getArea()&&(n=s);else return null;r=i,i=i.parentNode}return n}isEqual(e){for(let t of Nr)if(this[t]!==e[t])return!1;return!0}contains(e){let t=this.getIntersection(e);return!!(t&&t.isEqual(e))}toAbsoluteRect(){let{scrollX:e,scrollY:t}=u.window,n=this.clone().moveBy(e,t);if(Lr(n._source)){let e=Ar(n._source);e&&Vr(n,e)}return n}excludeScrollbarsAndBorders(){let e=this._source,t,n,r;if(yr(e))t=e.innerWidth-e.document.documentElement.clientWidth,n=e.innerHeight-e.document.documentElement.clientHeight,r=e.getComputedStyle(e.document.documentElement).direction;else{let i=Dr(e);t=e.offsetWidth-e.clientWidth-i.left-i.right,n=e.offsetHeight-e.clientHeight-i.top-i.bottom,r=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=i.left,this.top+=i.top,this.right-=i.right,this.bottom-=i.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,r===`ltr`?this.right-=t:this.left+=t,this.height-=n,this.bottom-=n,this}static getDomRangeRects(t){let n=[],r=Array.from(t.getClientRects());if(r.length)for(let i of r){let r=new e(i);r._source=t,n.push(r)}else{let r=t.startContainer;jr(r)&&(r=r.parentNode);let i=new e(r.getBoundingClientRect());i.right=i.left,i.width=0,n.push(i)}return n}static getDomElementRects(t){return Array.from(t.getClientRects()).map(n=>{let r=new e(n);return r._source=t,r})}static getBoundingRect(t){let n={left:1/0,top:1/0,right:-1/0,bottom:-1/0,width:0,height:0},r=0;for(let e of t)r++,n.left=Math.min(n.left,e.left),n.top=Math.min(n.top,e.top),n.right=Math.max(n.right,e.right),n.bottom=Math.max(n.bottom,e.bottom);return r==0?null:(n.width=n.right-n.left,n.height=n.bottom-n.top,new e(n))}};function Fr(e,t){for(let n of Nr)e[n]=t[n]}function Ir(e){return Lr(e)?e===e.ownerDocument.body:!1}function Lr(e){return typeof e==`object`&&!!e&&e.nodeType===1&&typeof e.getBoundingClientRect==`function`}function Rr(e){return e.ownerDocument.defaultView.getComputedStyle(e).position}function zr(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).overflow:`visible`}function Br(e){return e instanceof HTMLElement&&Pr.has(Rr(e))}function Vr(e,t){let n=new O(t),r=Dr(t),i=0,a=0;i-=n.left,a-=n.top,i+=t.scrollLeft,a+=t.scrollTop,i-=r.left,a-=r.top,e.moveBy(i,a)}var Hr=class e{_element;_callback;static _observerInstance=null;static _elementCallbacks=null;constructor(t,n){e._observerInstance||e._createObserver(),this._element=t,this._callback=n,e._addElementCallback(t,n),e._observerInstance.observe(t)}get element(){return this._element}destroy(){e._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,n){e._elementCallbacks||=new Map;let r=e._elementCallbacks.get(t);r||(r=new Set,e._elementCallbacks.set(t,r)),r.add(n)}static _deleteElementCallback(t,n){let r=e._getElementCallbacks(t);r&&(r.delete(n),r.size||(e._elementCallbacks.delete(t),e._observerInstance.unobserve(t))),e._elementCallbacks&&!e._elementCallbacks.size&&(e._observerInstance=null,e._elementCallbacks=null)}static _getElementCallbacks(t){return e._elementCallbacks?e._elementCallbacks.get(t):null}static _createObserver(){e._observerInstance=new u.window.ResizeObserver(t=>{for(let n of t){let t=e._getElementCallbacks(n.target);if(t)for(let e of t)e(n)}})}};function Ur(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Wr(e){return t=>t+e}function Gr(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Kr(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function qr(e){return e&&e.nodeType===Node.COMMENT_NODE}function Jr(e){try{u.document.createAttribute(e)}catch{return!1}return!0}function Yr(e){return e?jr(e)?Yr(e.parentElement):e.getClientRects?!!e.getClientRects().length:!1:!1}function Xr({element:e,target:t,positions:n,limiter:r,fitInViewport:i,viewportOffsetConfig:a}){An(t)&&(t=t()),An(r)&&(r=r());let o=Ar(e),s=Qr(a),c=new O(e),l=Zr(t,s),u;if(!l||!s.getIntersection(l))return null;let d={targetRect:l,elementRect:c,positionedElementAncestor:o,viewportRect:s};if(!r&&!i)u=new $r(n[0],d);else{if(r){let e=Zr(r,s);e&&(d.limiterRect=e)}u=vee(n,d)}return u}function Zr(e,t){let n=new O(e).getVisible();return n?n.getIntersection(t):null}function Qr(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);let t=new O(u.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}function vee(e,t){let{elementRect:n}=t,r=n.getArea(),i=e.map(e=>new $r(e,t)).filter(e=>!!e.name),a=0,o=null;for(let e of i){let{limiterIntersectionArea:t,viewportIntersectionArea:n}=e;if(t===r)return e;let i=n**2+t**2;i>a&&(a=i,o=e)}return o}var $r=class{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(e,t){let n=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!n)return;let{left:r,top:i,name:a,config:o}=n;this.name=a,this.config=o,this._positioningFunctionCoordinates={left:r,top:i},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){let 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._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||=this._rect.toAbsoluteRect(),this._cachedAbsoluteRect}};function ei(e){let t=e.parentNode;t&&t.removeChild(e)}function ti(){let e=u.window.visualViewport;return!e||!(p.isiOS||p.isSafari)?{left:0,top:0}:{left:Math.max(Math.round(e.offsetLeft),0),top:Math.max(Math.round(e.offsetTop),0)}}function ni({target:e,viewportOffset:t=0,ancestorOffset:n=0,alignToTop:r,forceScroll:i}){let a=ui(e),o=a,s=null;for(t=pi(t);o;){let c;c=di(o==a?e:s),ai({parent:c,getRect:()=>fi(e,o),alignToTop:r,ancestorOffset:n,forceScroll:i});let l=fi(e,o),u=fi(c,o);if(l.height>u.height){let e=l.getIntersection(u);e&&(l=e)}if(ii({window:o,rect:l,viewportOffset:t,alignToTop:r,forceScroll:i}),o.parent!=o){if(s=o.frameElement,o=o.parent,!s)return}else o=null}}function ri(e,t,n,r,i){ai({parent:di(e),getRect:()=>new O(e),ancestorOffset:t,limiterElement:n,alignToTop:r,forceScroll:i})}function ii({window:e,rect:t,alignToTop:n,forceScroll:r,viewportOffset:i}){let a=t.clone().moveBy(0,i.bottom),o=t.clone().moveBy(0,-i.top),s=new O(e).excludeScrollbarsAndBorders(),c=[o,a],l=n&&r,u=c.every(e=>s.contains(e)),{scrollX:d,scrollY:f}=e,p=d,m=f;l?f-=s.top-t.top+i.top:u||(si(o,s)?f-=s.top-t.top+i.top:oi(a,s)&&(n?f+=t.top-s.top-i.top:f+=t.bottom-s.bottom+i.bottom)),u||(ci(t,s)?d-=s.left-t.left+i.left:li(t,s)&&(d+=t.right-s.right+i.right)),(d!=p||f!==m)&&e.scrollTo(d,f)}function ai({parent:e,getRect:t,alignToTop:n,forceScroll:r,ancestorOffset:i=0,limiterElement:a}){let o=ui(e),s=n&&r,c,l,u,d=a||o.document.body;for(;e!=d;)l=t(),c=new O(e).excludeScrollbarsAndBorders(),u=c.contains(l),s?e.scrollTop-=c.top-l.top+i:u||(si(l,c)?e.scrollTop-=c.top-l.top+i:oi(l,c)&&(n?e.scrollTop+=l.top-c.top-i:e.scrollTop+=l.bottom-c.bottom+i)),u||(ci(l,c)?e.scrollLeft-=c.left-l.left+i:li(l,c)&&(e.scrollLeft+=l.right-c.right+i)),e=e.parentNode}function oi(e,t){return e.bottom>t.bottom}function si(e,t){return e.top<t.top}function ci(e,t){return e.left<t.left}function li(e,t){return e.right>t.right}function ui(e){return Mr(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function di(e){if(Mr(e)){let t=e.commonAncestorContainer;return jr(t)&&(t=t.parentNode),t}else return e.parentNode}function fi(e,t){let n=ui(e),r=new O(e);if(n===t)return r;{let e=n;for(;e!=t;){let t=e.frameElement,n=new O(t).excludeScrollbarsAndBorders();r.moveBy(n.left,n.top),e=e.parent}}return r}function pi(e){return typeof e==`number`?{top:e,bottom:e,left:e,right:e}:e}const mi={ctrl:`⌃`,cmd:`⌘`,alt:`⌥`,shift:`⇧`},hi={ctrl:`Ctrl+`,alt:`Alt+`,shift:`Shift+`},gi={37:`←`,38:`↑`,39:`→`,40:`↓`,9:`⇥`,33:`Page Up`,34:`Page Down`},k=yee(),_i=Object.fromEntries(Object.entries(k).map(([e,t])=>{let n;return n=t in gi?gi[t]:e.charAt(0).toUpperCase()+e.slice(1),[t,n]}));function vi(e){let t;if(typeof e==`string`){if(t=k[e.toLowerCase()],!t)throw new w(`keyboard-unknown-key`,null,{key:e})}else t=e.keyCode+(e.altKey?k.alt:0)+(e.ctrlKey?k.ctrl:0)+(e.shiftKey?k.shift:0)+(e.metaKey?k.cmd:0);return t}function yi(e){return typeof e==`string`&&(e=bee(e)),e.map(e=>typeof e==`string`?Ci(e):e).reduce((e,t)=>t+e,0)}function bi(e,t){let n=yi(e),r=t?t===`Mac`:p.isMac||p.isiOS;return Object.entries(r?mi:hi).reduce((e,[t,r])=>((n&k[t])!=0&&(n&=~k[t],e+=r),e),``)+(n?_i[n]:``)}function xi(e){return e==k.arrowright||e==k.arrowleft||e==k.arrowup||e==k.arrowdown}function Si(e,t){let n=t===`ltr`;switch(e){case k.arrowleft:return n?`left`:`right`;case k.arrowright:return n?`right`:`left`;case k.arrowup:return`up`;case k.arrowdown:return`down`}}function Ci(e){if(e.endsWith(`!`))return vi(e.slice(0,-1));let t=vi(e);return(p.isMac||p.isiOS)&&t==k.ctrl?k.cmd:t}function wi(e,t){let n=Si(e,t);return n===`down`||n===`right`}function yee(){let 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++){let n=String.fromCharCode(t);e[n.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}function bee(e){return e.split(`+`).map(e=>e.trim())}const xee=[`ar`,`ara`,`dv`,`div`,`fa`,`per`,`f