PageSourceSearch

https://www.cccb.org/o/frontend-editor-ckeditor-web/__liferay__/ex…/@ckeditor$ckeditor5-emoji$dist$index.js.js

js cccb.org collected 2026-09-24 07:57:50 UTC 49,591 bytes, 15 lines download raw bytes

vendor: 8,267 bytes, line 1
1var br=Object.create;var nt=Object.defineProperty;var kr=Object.getOwnPropertyDescriptor;var _r=Object.getOwnPropertyNames;var Vr=Object.getPrototypeOf,vr=Object.prototype.hasOwnProperty;var jr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Er=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _r(e))!vr.call(t,o)&&o!==r&&nt(t,o,{get:()=>e[o],enumerable:!(i=kr(e,o))||i.enumerable});return t};var Tr=(t,e,r)=>(r=t!=null?br(Vr(t)):{},Er(e||!t||!t.__esModule?nt(r,"default",{value:t,enumerable:!0}):r,t));var mt=jr((lt,ge)=>{((t,e)=>{typeof define=="function"&&define.amd?define([],e):typeof ge=="object"&&ge.exports?ge.exports=e():t.fuzzysort=e()})(lt,t=>{"use strict";var e=(a,n)=>{if(!a||!n)return A;var f=rt(a);J(n)||(n=R(n));var p=f.bitflags;return(p&n._bitflags)!==p?A:X(f,n)},r=(a,n,f)=>{if(!a)return f?.all?hr(n,f):qe;var p=rt(a),d=p.bitflags,u=p.containsSpace,l=T(f?.threshold||0),g=f?.limit||ze,h=0,b=0,y=n.length;function C(Q){h<g?(de.add(Q),++h):(++b,Q._score>de.peek()._score&&de.replaceTop(Q))}if(f?.key)for(var L=f.key,k=0;k<y;++k){var M=n[k],_=pe(M,L);if(_&&(J(_)||(_=R(_)),(d&_._bitflags)===d)){var v=X(p,_);v!==A&&(v._score<l||(v.obj=M,C(v)))}}else if(f?.keys){var H=f.keys,F=H.length;e:for(var k=0;k<y;++k){var M=n[k];{for(var P=0,I=0;I<F;++I){var L=H[I],_=pe(M,L);if(!_){He[I]=oe;continue}J(_)||(_=R(_)),He[I]=_,P|=_._bitflags}if((d&P)!==d)continue}if(u)for(let V=0;V<p.spaceSearches.length;V++)U[V]=D;for(var I=0;I<F;++I){if(_=He[I],_===oe){ee[I]=oe;continue}if(ee[I]=X(p,_,!1,u),ee[I]===A){ee[I]=oe;continue}if(u)for(let j=0;j<p.spaceSearches.length;j++){if($[j]>-1e3&&U[j]>D){var B=(U[j]+$[j])/4;B>U[j]&&(U[j]=B)}$[j]>U[j]&&(U[j]=$[j])}}if(u){for(let V=0;V<p.spaceSearches.length;V++)if(U[V]===D)continue e}else{var w=!1;for(let V=0;V<F;V++)if(ee[V]._score!==D){w=!0;break}if(!w)continue}var O=new c(F);for(let V=0;V<F;V++)O[V]=ee[V];if(u){var S=0;for(let V=0;V<p.spaceSearches.length;V++)S+=U[V]}else{var S=D;for(let j=0;j<F;j++){var v=O[j];if(v._score>-1e3&&S>D){var B=(S+v._score)/4;B>S&&(S=B)}v._score>S&&(S=v._score)}}if(O.obj=M,O._score=S,f?.scoreFn){if(S=f.scoreFn(O),!S)continue;S=T(S),O._score=S}S<l||C(O)}}else for(var k=0;k<y;++k){var _=n[k];if(_&&(J(_)||(_=R(_)),(d&_._bitflags)===d)){var v=X(p,_);v!==A&&(v._score<l||C(v))}}if(h===0)return qe;for(var z=new Array(h),k=h-1;k>=0;--k)z[k]=de.poll();return z.total=h+b,z},i=(a,n="<b>",f="</b>")=>{for(var p=typeof n=="function"?n:void 0,d=a.target,u=d.length,l=a.indexes,g="",h=0,b=0,y=!1,C=[],L=0;L<u;++L){var k=d[L];if(l[b]===L){if(++b,y||(y=!0,p?(C.push(g),g=""):g+=n),b===l.length){p?(g+=k,C.push(p(g,h++)),g="",C.push(d.substr(L+1))):g+=k+f+d.substr(L+1);break}}else y&&(y=!1,p?(C.push(p(g,h++)),g=""):g+=f);g+=k}return p?C:g},o=a=>{typeof a=="number"?a=""+a:typeof a!="string"&&(a="");var n=Ne(a);return x(a,{_targetLower:n._lower,_targetLowerCodes:n.lowerCodes,_bitflags:n.bitflags})},m=()=>{Ue.clear(),We.clear()};class s{get indexes(){return this._indexes.slice(0,this._indexes.len).sort((n,f)=>n-f)}set indexes(n){return this._indexes=n}highlight(n,f){return i(this,n,f)}get score(){return E(this._score)}set score(n){this._score=T(n)}}class c extends Array{get score(){return E(this._score)}set score(n){this._score=T(n)}}var x=(a,n)=>{let f=new s;return f.target=a,f.obj=n.obj??A,f._score=n._score??D,f._indexes=n._indexes??[],f._targetLower=n._targetLower??"",f._targetLowerCodes=n._targetLowerCodes??A,f._nextBeginningIndexes=n._nextBeginningIndexes??A,f._bitflags=n._bitflags??0,f},E=a=>a===D?0:a>1?a:Math.E**(((-a+1)**.04307-1)*-2),T=a=>a===0?D:a>1?a:1-Math.pow(Math.log(a)/-2+1,1/.04307),Y=a=>{typeof a=="number"?a=""+a:typeof a!="string"&&(a=""),a=a.trim();var n=Ne(a),f=[];if(n.containsSpace){var p=a.split(/\s+/);p=[...new Set(p)];for(var d=0;d<p.length;d++)if(p[d]!==""){var u=Ne(p[d]);f.push({lowerCodes:u.lowerCodes,_lower:p[d].toLowerCase(),containsSpace:!1})}}return{lowerCodes:n.lowerCodes,_lower:n._lower,containsSpace:n.containsSpace,bitflags:n.bitflags,spaceSearches:f}},R=a=>{if(a.length>999)return o(a);var n=Ue.get(a);return n!==void 0||(n=o(a),Ue.set(a,n)),n},rt=a=>{if(a.length>999)return Y(a);var n=We.get(a);return n!==void 0||(n=Y(a),We.set(a,n)),n},hr=(a,n)=>{var f=[];f.total=a.length;var p=n?.limit||ze;if(n?.key)for(var d=0;d<a.length;d++){var u=a[d],l=pe(u,n.key);if(l!=A){J(l)||(l=R(l));var g=x(l.target,{_score:l._score,obj:u});if(f.push(g),f.length>=p)return f}}else if(n?.keys)for(var d=0;d<a.length;d++){for(var u=a[d],h=new c(n.keys.length),b=n.keys.length-1;b>=0;--b){var l=pe(u,n.keys[b]);if(!l){h[b]=oe;continue}J(l)||(l=R(l)),l._score=D,l._indexes.len=0,h[b]=l}if(h.obj=u,h._score=D,f.push(h),f.length>=p)return f}else for(var d=0;d<a.length;d++){var l=a[d];if(l!=A&&(J(l)||(l=R(l)),l._score=D,l._indexes.len=0,f.push(l),f.length>=p))return f}return f},X=(a,n,f=!1,p=!1)=>{if(f===!1&&a.containsSpace)return gr(a,n,p);for(var d=a._lower,u=a.lowerCodes,l=u[0],g=n._targetLowerCodes,h=u.length,b=g.length,k=0,y=0,C=0;;){var L=l===g[y];if(L){if(N[C++]=y,++k,k===h)break;l=u[k]}if(++y,y>=b)return A}var k=0,M=!1,_=0,v=n._nextBeginningIndexes;v===A&&(v=n._nextBeginningIndexes=wr(n.target)),y=N[0]===0?0:v[N[0]-1];var H=0;if(y!==b)for(;;)if(y>=b){if(k<=0||(++H,H>200))break;--k;var F=me[--_];y=v[F]}else{var L=u[k]===g[y];if(L){if(me[_++]=y,++k,k===h){M=!0;break}++y}else y=v[y]}var P=h<=1?-1:n._targetLower.indexOf(d,N[0]),I=!!~P,B=I?P===0||n._nextBeginningIndexes[P-1]===P:!1;if(I&&!B){for(var w=0;w<v.length;w=v[w])if(!(w<=P)){for(var O=0;O<h&&u[O]===n._targetLowerCodes[w+O];O++);if(O===h){P=w,B=!0;break}}}var S=V=>{for(var j=0,ot=0,W=1;W<h;++W)V[W]-V[W-1]!==1&&(j-=V[W],++ot);var Ir=V[h-1]-V[0]-(h-1);if(j-=(12+Ir)*ot,V[0]!==0&&(j-=V[0]*V[0]*.2),!M)j*=1e3;else{for(var Ke=1,W=v[0];W<b;W=v[W])++Ke;Ke>24&&(j*=(Ke-24)*10)}return j-=(b-h)/2,I&&(j/=1+h*h*1),B&&(j/=1+h*h*1),j-=(b-h)/2,j};if(M)if(B){for(var w=0;w<h;++w)N[w]=P+w;var z=N,Q=S(N)}else var z=me,Q=S(me);else{if(I)for(var w=0;w<h;++w)N[w]=P+w;var z=N,Q=S(z)}n._score=Q;for(var w=0;w<h;++w)n._indexes[w]=z[w];n._indexes.len=h;let he=new s;return he.target=n.target,he._score=n._score,he._indexes=n._indexes,he},gr=(a,n,f)=>{for(var p=new Set,d=0,u=A,l=0,g=a.spaceSearches,h=g.length,b=0,y=()=>{for(let B=b-1;B>=0;B--)n._nextBeginningIndexes[ue[B*2+0]]=ue[B*2+1]},C=!1,I=0;I<h;++I){$[I]=D;var L=g[I];if(u=X(L,n),f){if(u===A)continue;C=!0}else if(u===A)return y(),A;var k=I===h-1;if(!k){var M=u._indexes,_=!0;for(let w=0;w<M.len-1;w++)if(M[w+1]-M[w]!==1){_=!1;break}if(_){var v=M[M.len-1]+1,H=n._nextBeginningIndexes[v-1];for(let w=v-1;w>=0&&H===n._nextBeginningIndexes[w];w--)n._nextBeginningIndexes[w]=v,ue[b*2+0]=w,ue[b*2+1]=H,b++}}d+=u._score/h,$[I]=u._score/h,u._indexes[0]<l&&(d-=(l-u._indexes[0])*2),l=u._indexes[0];for(var F=0;F<u._indexes.len;++F)p.add(u._indexes[F])}if(f&&!C)return A;y();var P=X(a,n,!0);if(P!==A&&P._score>d){if(f)for(var I=0;I<h;++I)$[I]=P._score/h;return P}f&&(u=n),u._score=d;var I=0;for(let B of p)u._indexes[I++]=B;return u._indexes.len=I,u},it=a=>a.replace(/\p{Script=Latin}+/gu,n=>n.normalize("NFD")).replace(/[\u0300-\u036f]/g,""),Ne=a=>{a=it(a);for(var n=a.length,f=a.toLowerCase(),p=[],d=0,u=!1,l=0;l<n;++l){var g=p[l]=f.charCodeAt(l);if(g===32){u=!0;continue}var h=g>=97&&g<=122?g-97:g>=48&&g<=57?26:g<=127?30:31;d|=1<<h}return{lowerCodes:p,bitflags:d,containsSpace:u,_lower:f}},xr=a=>{for(var n=a.length,f=[],p=0,d=!1,u=!1,l=0;l<n;++l){var g=a.charCodeAt(l),h=g>=65&&g<=90,b=h||g>=97&&g<=122||g>=48&&g<=57,y=h&&!d||!u||!b;d=h,u=b,y&&(f[p++]=l)}return f},wr=a=>{a=it(a);for(var n=a.length,f=xr(a),p=[],d=f[0],u=0,l=0;l<n;++l)d>l?p[l]=d:(d=f[++u],p[l]=d===void 0?n:d);return p},Ue=new Map,We=new Map,N=[],me=[],ue=[],U=[],$=[],He=[],ee=[],pe=(a,n)=>{var f=a[n];if(f!==void 0)return f;if(typeof n=="function")return n(a);var p=n;Array.isArray(n)||(p=n.split("."));for(var d=p.length,u=-1;a&&++u<d;)a=a[p[u]];return a},J=a=>typeof a=="object"&&typeof a._bitflags=="number",ze=1/0,D=-ze,qe=[];qe.total=0;var A=null,oe=o(""),yr=a=>{var n=[],f=0,p={},d=u=>{for(var l=0,g=n[l],h=1;h<f;){var b=h+1;l=h,b<f&&n[b]._score<n[h]._score&&(l=b),n[l-1>>1]=n[l],h=1+(l<<1)}for(var y=l-1>>1;l>0&&g._score<n[y]._score;y=(l=y)-1>>1)n[l]=n[y];n[l]=g};return p.add=u=>{var l=f;n[f++]=u;for(var g=l-1>>1;l>0&&u._score<n[g]._score;
1g=(l=g)-1>>1)n[l]=n[g];n[l]=u},p.poll=u=>{if(f!==0){var l=n[0];return n[0]=n[--f],d(),l}},p.peek=u=>{if(f!==0)return n[0]},p.replaceTop=u=>{n[0]=u,d()},p},de=yr();return{single:e,go:r,prepare:o,cleanup:m}})});import{Accessibility as Hr,Command as st,CommandCollection as zr,Context as qr,ContextPlugin as Kr,EditingKeystrokeHandler as Gr,Editor as $r,ElementApiMixin as Jr,MultiCommand as Qr,PendingActions as Zr,Plugin as te,_DEFAULT_ACCESSIBILITY_GROUP_ID as Yr,_getEditorUsageData as Xr,attachToForm as ei,secureSourceElement as ti}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-core$dist$index.js.js";import{CKEditorError as oi,Collection as at,Config as ni,DOCUMENTATION_URL as si,DomEmitterMixin as ai,ElementReplacer as ci,EmitterMixin as fi,EventInfo as li,FocusTracker as ne,KeystrokeHandler as se,Locale as mi,ObservableMixin as ui,Rect as pi,ResizeObserver as di,_clearTranslations as hi,_getEmitterId as gi,_getEmitterListenedTo as xi,_getUserAgent as wi,_isAndroid as yi,_isBlink as Ii,_isGecko as bi,_isMac as ki,_isMediaForcedColors as _i,_isMotionReduced as Vi,_isRegExpUnicodePropertySupported as vi,_isSafari as ji,_isWindows as Ei,_isiOS as Ti,_setEmitterId as Si,_translate as Ai,_unifyTranslations as Bi,abortableDebounce as Li,add as Pi,areConnectedThroughProperties as Mi,collectStylesheets as Ci,compareArrays as Di,count as Oi,crc32 as Fi,createElement as Ri,delay as Ni,diff as Ui,diffToChanges as Wi,env as Hi,exponentialDelay as zi,fastDiff as qi,findClosestScrollableAncestor as Ki,first as Gi,formatHtml as $i,getAncestors as Ji,getBorderWidths as Qi,getCode as Zi,getCommonAncestor as Yi,getDataFromElement as Xi,getEnvKeystrokeText as eo,getLanguageDirection as to,getLocalizedArrowKeyCodeDirection as ro,getOptimalPosition as io,getPositionedAncestor as oo,getRangeFromMouseEvent as no,getVisualViewportOffset as so,global as ct,indexOf as ao,insertAt as co,insertToPriorityArray as fo,isArrowKeyCode as lo,isCombiningMark as mo,isComment as uo,isForwardArrowKeyCode as po,isHighSurrogateHalf as ho,isInsideCombinedSymbol as go,isInsideEmojiSequence as xo,isInsideSurrogatePair as wo,isIterable as yo,isLowSurrogateHalf as Io,isNode as bo,isRange as ko,isText as _o,isValidAttributeName as Vo,isViewWithFocusTracker as vo,isVisible as jo,isWindow as Eo,keyCodes as To,logError as So,logWarning as ae,mapsEqual as Ao,nth as Bo,objectToMap as Lo,parseBase64EncodedObject as Po,parseKeystroke as Mo,priorities as Co,releaseDate as Do,remove as Oo,retry as Fo,scrollAncestorsToShowTarget as Ro,scrollViewportToShowTarget as No,setDataInElement as Uo,spliceArray as Wo,spy as Ho,toArray as zo,toMap as qo,toUnit as Ko,uid as Go,version as ft,wait as $o}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-utils$dist$index.js.js";import{Delete as Zo,DeleteCommand as Yo,Input as Xo,InsertTextCommand as en,TextTransformation as tn,TextWatcher as rn,TwoStepCaretMovement as on,Typing as Ge,TypingChangeBuffer as nn,_DeleteObserver as sn,findAttributeRange as an,findAttributeRangeBound as cn,getLastTextLine as fn,inlineHighlight as ln}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-typing$dist$index.js.js";var pr=Tr(mt(),1);function ut(t){return Number.isSafeInteger(t)&&t>=0}function pt(t){return t!=null&&typeof t!="function"&&ut(t.length)}function xe(t){return t}function we(t){return t==="__proto__"}function ye(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}function Ie(t){return typeof t=="string"||typeof t=="symbol"?t:Object.is(t?.valueOf?.(),-0)?"-0":String(t)}function be(t){let e=[],r=t.length;if(r===0)return e;let i=0,o="",m="",s=!1;for(t.charCodeAt(0)===46&&(e.push(""),i++);i<r;){let c=t[i];m?c==="\\"&&i+1<r?(i++,o+=t[i]):c===m?m="":o+=c:s?c==='"'||c==="'"?m=c:c==="]"?(s=!1,e.push(o),o=""):o+=c:c==="["?(s=!0,o&&(e.push(o),o="")):c==="."?o&&(e.push(o),o=""):o+=c,i++}return o&&e.push(o),e}function ce(t,e,r){if(t==null)return r;switch(typeof e){case"string":{if(we(e))return r;let i=t[e];return i===void 0?ye(e)?ce(t,be(e),r):r:i}case"number":case"symbol":{typeof e=="number"&&(e=Ie(e));let i=t[e];return i===void 0?r:i}
1default:{if(Array.isArray(e))return Sr(t,e,r);if(Object.is(e?.valueOf(),-0)?e="-0":e=String(e),we(e))return r;let i=t[e];return i===void 0?r:i}}}function Sr(t,e,r){if(e.length===0)return r;let i=t;for(let o=0;o<e.length;o++){if(i==null||we(e[o]))return r;i=i[e[o]]}return i===void 0?r:i}function dt(t){return function(e){return ce(e,t)}}function ht(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function ke(t){return t==null||typeof t!="object"&&typeof t!="function"}function $e(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function gt(t,e,r){return typeof r!="function"?re(t,e):Je(t,e,function i(o,m,s,c,x,E){let T=r(o,m,s,c,x,E);return T!==void 0?!!T:Je(o,m,i,E)},new Map)}function Je(t,e,r,i){if(e===t)return!0;switch(typeof e){case"object":return Ar(t,e,r,i);case"function":return Object.keys(e).length>0?Je(t,{...e},r,i):$e(t,e);default:return ht(t)?typeof e=="string"?e==="":!0:$e(t,e)}}function Ar(t,e,r,i){if(e==null)return!0;if(Array.isArray(e))return xt(t,e,r,i);if(e instanceof Map)return Br(t,e,r,i);if(e instanceof Set)return Lr(t,e,r,i);let o=Object.keys(e);if(t==null)return o.length===0;if(o.length===0)return!0;if(i&&i.has(e))return i.get(e)===t;i&&i.set(e,t);try{for(let m=0;m<o.length;m++){let s=o[m];if(!ke(t)&&!(s in t)||e[s]===void 0&&t[s]!==void 0||e[s]===null&&t[s]!==null||!r(t[s],e[s],s,t,e,i))return!1}return!0}finally{i&&i.delete(e)}}function Br(t,e,r,i){if(e.size===0)return!0;if(!(t instanceof Map))return!1;for(let[o,m]of e.entries()){let s=t.get(o);if(r(s,m,o,t,e,i)===!1)return!1}return!0}function xt(t,e,r,i){if(e.length===0)return!0;if(!Array.isArray(t))return!1;let o=new Set;for(let m=0;m<e.length;m++){let s=e[m],c=!1;for(let x=0;x<t.length;x++){if(o.has(x))continue;let E=t[x],T=!1;if(r(E,s,m,t,e,i)&&(T=!0),T){o.add(x),c=!0;break}}if(!c)return!1}return!0}function Lr(t,e,r,i){return e.size===0?!0:t instanceof Set?xt([...t],[...e],r,i):!1}function re(t,e){return gt(t,e,()=>{})}function wt(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function _e(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var yt="[object RegExp]",Ve="[object String]",ve="[object Number]",je="[object Boolean]",Ee="[object Arguments]",It="[object Symbol]",bt="[object Date]",kt="[object Map]",_t="[object Set]",Vt="[object Array]";var vt="[object ArrayBuffer]",jt="[object Object]";var Et="[object DataView]",Tt="[object Uint8Array]",St="[object Uint8ClampedArray]",At="[object Uint16Array]",Bt="[object Uint32Array]";var Lt="[object Int8Array]",Pt="[object Int16Array]",Mt="[object Int32Array]";var Ct="[object Float32Array]",Dt="[object Float64Array]";function Ot(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Ft(t,e){return K(t,void 0,t,new Map,e)}function K(t,e,r,i=new Map,o=void 0){let m=o?.(t,e,r,i);if(m!=null)return m;if(ke(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){let s=new Array(t.length);i.set(t,s);for(let c=0;c<t.length;c++)s[c]=K(t[c],c,r,i,o);return Object.hasOwn(t,"index")&&(s.index=t.index),Object.hasOwn(t,"input")&&(s.input=t.input),s}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let s=new RegExp(t.source,t.flags);return s.lastIndex=t.lastIndex,s}if(t instanceof Map){let s=new Map;i.set(t,s);for(let[c,x]of t)s.set(c,K(x,c,r,i,o));return s}if(t instanceof Set){let s=new Set;i.set(t,s);for(let c of t)s.add(K(c,void 0,r,i,o));return s}if(typeof Buffer<"u"&&Buffer.isBuffer(t))return t.subarray();if(Ot(t)){let s=new(Object.getPrototypeOf(t)).constructor(t.length);i.set(t,s);for(let c=0;c<t.length;c++)s[c]=K(t[c],c,r,i,o);return s}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let s=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,s),q(s,t,r,i,o),s}if(typeof File<"u"&&t instanceof File){let s=new File([t],t.name,{type:t.type});return i.set(t,s),q(s,t,r,i,o),s}if(t instanceof Blob){let s=new Blob([t],{type:t.type});return i.set(t,s),q(s,t,r,i,o),s}if(t instanceof Error){let s=new t.constructor;return i.set(t,s),s.message=t.message,s.name=t.name,s.stack=t.stack,s.cause=t.cause,q(s,t,r,i,o),s}if(typeof t=="object"&&Pr(t)){let s=Object.create(Object.getPrototypeOf(t));return i.set(t,s),q(s,t,r,i,o),s}return t}function q(t,e,r=t,i,o){let m=[...Object.keys(e),...wt(e)];for(let s=0;s<m.length;s++){let c=m[s],x=Object.getOwnPropertyDescriptor(t,c);(x==null||x.writable)&&(t[c]=K(e[c],c,r,i,o))}}function Pr(t){switch(_e(t)){case Ee:case Vt:case vt:case Et:case je:case bt:case Ct:case Dt:case Lt:case Pt:case Mt:case kt:case ve:case jt:case yt:case _t:case Ve:case It:case Tt:case St:case At:case Bt:return!0;default:return!1}}function Rt(t){return K(t,void 0,t,new Map,void 0)}function Nt(t){return t=Rt(t),e=>re(e,t)}function Ut(t,e){return Ft(t,(r,i,o,m)=>{let s=e?.(r,i,o,m);if(s!=null)return s;if(typeof t=="object")switch(Object.prototype.toString.call(t)){case ve:case Ve:case je:{let c=new t.constructor(t?.valueOf());return q(c,t),c}case Ee:{let c={};return q(c,t),c.length=t.length,c[Symbol.iterator]=t[Symbol.iterator],c}default:return}})}function Wt(t){return Ut(t)}var Mr=/^(?:0|[1-9]\d*)$/;function Ht(t,e=Number.MAX_SAFE_INTEGER){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<e;case"symbol":return!1;case"string":return Mr.test(t)}}function zt(t){return t!==null&&typeof t=="object"&&_e(t)==="[object Arguments]"}function qt(t,e){let r;if(Array.isArray(e)?r=e:typeof e=="string"&&ye(e)&&t?.[e]==null?r=be(e):r=[e],r.length===0)return!1;let i=t;for(let o=0;o<r.length;o++){let m=r[o];if((i==null||!Object.hasOwn(i,m))&&!((Array.isArray(i)||zt(i))&&Ht(m)&&m<i.length))return!1;i=i[m]}return!0}function Kt(t,e){switch(typeof t){case"object":{Object.is(t?.valueOf(),-0)&&(t="-0");break}case"number":{t=Ie(t);break}}return e=Wt(e),function(r){let i=ce(r,t);
1return i===void 0?qt(r,t):e===void 0?i===void 0:re(i,e)}}function Gt(t){if(t==null)return xe;switch(typeof t){case"function":return t;case"object":return Array.isArray(t)&&t.length===2?Kt(t[0],t[1]):Nt(t);case"string":case"symbol":case"number":return dt(t)}}function $t(t,e){let r={};for(let i=0;i<t.length;i++){let o=t[i],m=e(o);Object.hasOwn(r,m)||(r[m]=[]),r[m].push(o)}return r}function Qe(t,e){if(t==null)return{};let r=pt(t)?Array.from(t):Object.values(t),i=Gt(e??xe);return $t(r,i)}function Ze(t){if(t==null)return"";if(typeof t=="string")return t;if(Array.isArray(t))return t.map(Ze).join(",");let e=String(t);return e==="0"&&Object.is(Number(t),-0)?"-0":e}function Jt(t){return t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function Ye(t){return Jt(Ze(t))}import{AccessibilityHelp as Os,AccessibilityHelpContentView as Fs,AriaLiveAnnouncer as Rs,AriaLiveAnnouncerPoliteness as Ns,AriaLiveAnnouncerRegionView as Us,AriaLiveAnnouncerView as Ws,AutocompleteView as Hs,Badge as zs,BalloonPanelView as qs,BalloonToolbar as Ks,BlockButtonView as Gs,BlockToolbar as $s,BodyCollection as Js,BoxedEditorUIView as Qs,ButtonLabelView as Zs,ButtonLabelWithHighlightView as Ys,ButtonView as fe,CollapsibleView as Xs,ColorGridView as ea,ColorGridsFragmentView as ta,ColorPickerFragmentView as ra,ColorPickerInputRowView as ia,ColorPickerView as oa,ColorSelectorView as na,ColorTileView as sa,ComponentFactory as aa,ContextualBalloon as Qt,CssTransitionDisablerMixin as ca,DefaultMenuBarItems as fa,Dialog as Zt,DialogActionsView as la,DialogContentView as ma,DialogView as ua,DialogViewPosition as pa,DocumentColorCollection as da,DraggableViewMixin as ha,DropdownButtonView as ga,DropdownMenuButtonView as xa,DropdownMenuListItemButtonView as wa,DropdownMenuListItemView as ya,DropdownMenuListView as Ia,DropdownMenuNestedMenuPanelView as ba,DropdownMenuNestedMenuView as ka,DropdownMenuPanelPositioningFunctions as _a,DropdownMenuRootListView as Va,DropdownPanelView as va,DropdownView as ja,EditableUIView as Ea,EditorUI as Ta,EditorUIView as Sa,EvaluationBadge as Aa,FileDialogButtonView as Ba,FileDialogListItemButtonView as La,FileDialogViewMixin as Pa,FocusCycler as Te,FormHeaderView as Yt,FormRowView as Ma,HighlightedTextView as Ca,IconView as Da,IframeView as Oa,InlineEditableUIView as Fa,InputBase as Ra,InputNumberView as Na,InputTextView as Ua,InputView as Wa,ItemsView as Ha,LabelView as za,LabelWithHighlightView as qa,LabeledFieldView as Ka,LabeledInputView as Ga,ListItemButtonView as $a,ListItemGroupView as Ja,ListItemView as Qa,ListSeparatorView as Za,ListView as Ya,MenuBarMenuButtonView as Xa,MenuBarMenuListItemButtonView as Xt,MenuBarMenuListItemFileDialogButtonView as ec,MenuBarMenuListItemView as tc,MenuBarMenuListView as rc,MenuBarMenuPanelView as ic,MenuBarMenuView as oc,MenuBarView as nc,NESTED_TOOLBAR_ICONS as sc,Notification as ac,PoweredBy as cc,SearchInfoView as er,SearchResultsView as fc,SearchTextView as tr,SliderView as lc,SpinnerView as mc,SplitButtonView as uc,StickyPanelView as pc,SwitchButtonView as dc,Template as hc,TextareaView as gc,ToolbarLineBreakView as xc,ToolbarSeparatorView as wc,ToolbarView as yc,TooltipManager as Ic,UIModel as rr,View as Z,ViewCollection as ir,ViewModel as bc,_CheckIconHolderView as kc,_CollapsibleView as _c,_ContextualBalloonRotatorView as Vc,_DropdownMenuBehaviors as vc,_DropdownRootMenuBehaviors as jc,_MenuBarBehaviors as Ec,_MenuBarMenuBehaviors as Tc,_MenuBarMenuViewPanelPositioningFunctions as Sc,_SearchInfoView as Ac,_SearchTextQueryView as Bc,_TemplateBinding as Lc,_TemplateIfBinding as Pc,_TemplateToBinding as Mc,_convertColor as Cc,_convertColorToHex as Dc,_preventUiViewDefault as Oc,_processMenuBarConfig as Fc,_registerCustomElement as Rc,_tryNormalizeHexColor as Nc,addKeyboardHandlingForGrid as or,addListToDropdown as nr,addMenuToDropdown as Uc,addToolbarToDropdown as Wc,clickOutsideHandler as sr,createDropdown as ar,createLabeledDropdown as Hc,createLabeledInputNumber as zc,createLabeledInputText as cr,createLabeledTextarea as qc,filterGroupAndItemNames as Kc,focusChildOnDropdownOpen as Gc,getLocalizedColorOptions as $c,isFocusable as fr,isViewWithFocusCycler as lr,normalizeColorOptions as Jc,normalizeMenuBarConfig as Qc,normalizeSingleColorDefinition as Zc,normalizeToolbarConfig as Yc,submitHandler as Xc}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-ui$dist$index.js.js";import{IconAccessibility as rf,IconAddComment as of,IconAlignBottom as nf,IconAlignCenter as sf,IconAlignJustify as af,IconAlignLeft as cf,IconAlignMiddle as ff,IconAlignRight as lf,IconAlignTop as mf,IconArrowDown as uf,IconArrowUp as pf,IconBold as df,IconBookmark as hf,IconBookmarkInline as gf,IconBookmarkMedium as xf,IconBookmarkSmall as wf,IconBrowseFiles as yf,IconBulletedList as If,IconCancel as bf,IconCaption as kf,IconCaseChange as _f,IconCheck as Vf,IconChevronDown as vf,IconChevronUp as jf,IconCkboxImageEdit as Ef,IconCode as Tf,IconCodeBlock as Sf,IconCog as Af,IconColorPalette as Bf,IconColorTileCheck as Lf,IconCommentsArchive as Pf,IconContentLock as Mf,IconContentUnlock as Cf,IconCopy as Df,IconDragHandle as Of,IconDragIndicator as Ff,IconDropbox as Rf,IconDropdownArrow as Nf,IconEditComment as Uf,IconEmoji as mr,IconEraser as Wf,IconError as Hf,IconExportPdf as zf,IconExportWord as qf,IconFacebook as Kf,IconFindReplace as Gf,IconFontBackgroun
1d as $f,IconFontColor as Jf,IconFontFamily as Qf,IconFontSize as Zf,IconFullscreenEnter as Yf,IconFullscreenLeave as Xf,IconGoogleDrive as el,IconGooglePhotos as tl,IconHeading1 as rl,IconHeading2 as il,IconHeading3 as ol,IconHeading4 as nl,IconHeading5 as sl,IconHeading6 as al,IconHistory as cl,IconHorizontalLine as fl,IconHtml as ll,IconImage as ml,IconImageAssetManager as ul,IconImageUpload as pl,IconImageUrl as dl,IconImportExport as hl,IconImportWord as gl,IconIndent as xl,IconInsertMergeField as wl,IconItalic as yl,IconLegalStyleList as Il,IconLineHeight as bl,IconLink as kl,IconListStyleCircle as _l,IconListStyleDecimal as Vl,IconListStyleDecimalLeadingZero as vl,IconListStyleDisc as jl,IconListStyleLowerLatin as El,IconListStyleLowerRoman as Tl,IconListStyleSquare as Sl,IconListStyleUpperLatin as Al,IconListStyleUpperRoman as Bl,IconLocal as Ll,IconLoupe as Pl,IconLowVision as Ml,IconMagicWand as Cl,IconMarker as Dl,IconMedia as Ol,IconMediaPlaceholder as Fl,IconMultiLevelList as Rl,IconNextArrow as Nl,IconNotification as Ul,IconNumberedList as Wl,IconObjectCenter as Hl,IconObjectFullWidth as zl,IconObjectInline as ql,IconObjectInlineLeft as Kl,IconObjectInlineRight as Gl,IconObjectLeft as $l,IconObjectRight as Jl,IconObjectSizeCustom as Ql,IconObjectSizeFull as Zl,IconObjectSizeLarge as Yl,IconObjectSizeMedium as Xl,IconObjectSizeSmall as em,IconOneDrive as tm,IconOutdent as rm,IconPageBreak as im,IconPaginationExample as om,IconPaintRoller as nm,IconPaintRollerCursorDefault as sm,IconPaintRollerCursorText as am,IconParagraph as cm,IconPen as fm,IconPencil as lm,IconPilcrow as mm,IconPlay as um,IconPlus as pm,IconPreviewMergeFields as dm,IconPreviousArrow as ur,IconPrint as hm,IconProjectLogo as gm,IconQuote as xm,IconRedo as wm,IconRemove as ym,IconRemoveComment as Im,IconRemoveFormat as bm,IconReturnArrow as km,IconRevisionHistory as _m,IconRobotPencil as Vm,IconSelectAll as vm,IconSettings as jm,IconShowBlocks as Em,IconSource as Tm,IconSpecialCharacters as Sm,IconStrikethrough as Am,IconSubmit as Bm,IconSubscript as Lm,IconSuperscript as Pm,IconTable as Mm,IconTableCellProperties as Cm,IconTableColumn as Dm,IconTableLayout as Om,IconTableMergeCell as Fm,IconTableOfContents as Rm,IconTableProperties as Nm,IconTableRow as Um,IconTemplate as Wm,IconTemplateGeneric as Hm,IconText as zm,IconTextAlternative as qm,IconThreeVerticalDots as Km,IconTodoList as Gm,IconTrackChanges as $m,IconTrackChangesAccept as Jm,IconTrackChangesDiscard as Qm,IconUnderline as Zm,IconUndo as Ym,IconUnlink as Xm,IconUploadcareImageEdit as eu,IconUploadcareImageUpload as tu,IconUploadcareLink as ru,IconUser as iu,IconWarning as ou}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-icons$dist$index.js.js";function dr(t){let e=Cr();if(!e)return!1;let r=25,i=20,o=Math.floor(r/2);e.font=o+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=i*2,e.canvas.height=r,e.clearRect(0,0,i*2,r),e.fillStyle="#FF0000",e.fillText(t,0,22),e.fillStyle="#0000FF",e.fillText(t,i,22);let m=e.getImageData(0,0,i,r).data,s=m.length,c=0;for(;c<s&&!m[c+3];c+=4);if(c>=s)return!1;let x=i+c/4%i,E=Math.floor(c/4/i),T=e.getImageData(x,E,1,1).data;if(m[c]!==T[0]||m[c+2]!==T[2])return!1;return!(e.measureText(t).width>=i)}function Cr(){try{return document.createElement("canvas").getContext("2d",{willReadFrequently:!0})}catch{return null}}var Dr={0:"default",1:"light",2:"medium-light",3:"medium",4:"medium-dark",5:"dark"},Or={"\u{1FAE9}":16,"\u{1FAE8}":15.1,"\u{1FAE0}":14,"\u{1F636}\u200D\u{1F32B}\uFE0F":13.1,"\u{1F9D1}\u200D\u{1F4BB}":12.1,"\u{1F970}":11,"\u{1F92A}":5,"\u2695\uFE0F":4,"\u{1F923}":3,"\u{1F44B}\u{1F3FD}":2,"\u{1F600}":1,"\u{1F610}":.7,"\u{1F602}":.6},Se=24,Ae=class t extends te{_emojiCanvas=null;static get pluginName(){return"EmojiUtils"}static get isOfficialPlugin(){return!0}init(){this._emojiCanvas=document.createElement("canvas").getContext("2d")}isEmojiSupported(e,r,i){return e.version<=r?this.hasZwj(e.emoji)?this.isEmojiZwjSupported(e,i):!0:!1}getEmojiSupportedVersionByOs(){for(let[e,r]of Object.entries(Or))if(t._isEmojiSupported(e))return r;return 0}hasZwj(e){return e.includes("\u200D")}isEmojiZwjSupported(e,r){return this.getNodeWidthUsingCanvas(r,e.emoji)<Se*1.8?!0:this.getNodeWidth(r,e.emoji)<Se*1.8}getNodeWidth(e,r){let i=document.createElement("span");i.textContent=r,e.appendChild(i);let o=i.offsetWidth;return e.removeChild(i),o}getNodeWidthUsingCanvas(e,r){let i=getComputedStyle(e);return this._emojiCanvas.font=[i.fontStyle,i.fontVariant,i.fontWeight,`${Se}px`,`"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", ${i.fontFamily}`].join(" "),Math.ceil(this._emojiCanvas.measureText(r).width)}createEmojiWidthTestingContainer(){let e=document.createElement("div");return e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.whiteSpace="nowrap",e.style.fontSize=Se+"px",e}normalizeEmojiSkinTone(e){let r={...e,skins:{default:e.emoji}};return e.skins&&e.skins.forEach(i=>
1{let o=Dr[i.tone];r.skins[o]=i.emoji}),r}isEmojiCategoryAllowed(e){return e.group!==2}static _isEmojiSupported=dr},Fr="https://cdn.ckeditor.com/ckeditor5/data/emoji/{version}/en.json",Rr=16,le=class t extends te{_items;_url;_repositoryPromise;static get requires(){return[Ae]}static get pluginName(){return"EmojiRepository"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("emoji",{version:void 0,skinTone:"default",definitionsUrl:void 0,useCustomFont:!1}),this._url=this._getUrl(),this._repositoryPromise=new Promise(r=>{this._repositoryPromiseResolveCallback=r}),this._items=null}async init(){return this._warnAboutCdnUse(),await this._loadAndCacheEmoji(),this._items=this._getItems(),this._items?this._repositoryPromiseResolveCallback(!0):(ae("emoji-repository-empty"),this._repositoryPromiseResolveCallback(!1))}getEmojiByQuery(e){return this._items?e.split(/\s/).filter(Boolean).some(o=>o.length>=2)?pr.default.go(e,this._items,{threshold:.6,keys:["emoticon","annotation",o=>e.split(/\s/).filter(Boolean).flatMap(c=>o.tags?.filter(x=>x.startsWith(c))).join()]}).map(o=>o.obj):[]:[]}getEmojiCategories(){let e=this._getItems();if(!e)return[];let{t:r}=this.editor.locale,i=[{title:r("Smileys & Expressions"),icon:"\u{1F604}",groupId:0},{title:r("Gestures & People"),icon:"\u{1F44B}",groupId:1},{title:r("Animals & Nature"),icon:"\u{1F43B}",groupId:3},{title:r("Food & Drinks"),icon:"\u{1F34E}",groupId:4},{title:r("Travel & Places"),icon:"\u{1F698}",groupId:5},{title:r("Activities"),icon:"\u{1F3C0}",groupId:6},{title:r("Objects"),icon:"\u{1F4A1}",groupId:7},{title:r("Symbols"),icon:"\u{1F535}",groupId:8},{title:r("Flags"),icon:"\u{1F3C1}",groupId:9}],o=Qe(e,m=>m.group);return i.map(m=>({...m,items:o[m.groupId]}))}getSkinTones(){let{t:e}=this.editor.locale;return[{id:"default",icon:"\u{1F44B}",tooltip:e("Default skin tone")},{id:"light",icon:"\u{1F44B}\u{1F3FB}",tooltip:e("Light skin tone")},{id:"medium-light",icon:"\u{1F44B}\u{1F3FC}",tooltip:e("Medium Light skin tone")},{id:"medium",icon:"\u{1F44B}\u{1F3FD}",tooltip:e("Medium skin tone")},{id:"medium-dark",icon:"\u{1F44B}\u{1F3FE}",tooltip:e("Medium Dark skin tone")},{id:"dark",icon:"\u{1F44B}\u{1F3FF}",tooltip:e("Dark skin tone")}]}isReady(){return this._repositoryPromise}_getUrl(){let{definitionsUrl:e,version:r}=this.editor.config.get("emoji");if(!e||e==="cdn"){let i=r||Rr,o=new URL(Fr.replace("{version}",i.toString()));return o.searchParams.set("editorVersion",ft),o}return r&&ae("emoji-repository-redundant-version"),new URL(e)}_warnAboutCdnUse(){let e=this.editor,r=e.config.get("emoji"),i=e.config.get("licenseKey"),o=window[Symbol.for("cke distribution")];i!=="GPL"&&o!=="cloud"&&(r&&r.definitionsUrl||ae("emoji-repository-cdn-use"))}_getItems(){let e=t._results[this._url.href];return e&&e.length?e:null}async _loadAndCacheEmoji(){if(t._results[this._url.href])return;let e=await fetch(this._url,{cache:"force-cache"}).then(r=>r.ok?r.json():[]).catch(()=>[]);t._results[this._url.href]=this._normalizeEmoji(e)}_normalizeEmoji(e){let r=this.editor,i=r.config.get("emoji.useCustomFont"),o=r.plugins.get("EmojiUtils"),m=e.filter(E=>o.isEmojiCategoryAllowed(E));if(i)return m.map(E=>o.normalizeEmojiSkinTone(E));let s=o.getEmojiSupportedVersionByOs(),c=o.createEmojiWidthTestingContainer();document.body.appendChild(c);let x=m.filter(E=>o.isEmojiSupported(E,s,c)).map(E=>o.normalizeEmojiSkinTone(E));return c.remove(),x}static _results={}},ie=":",Xe=":__EMOJI_SHOW_ALL:",et=":__EMOJI_HINT:",Be=class extends te{_emojiDropdownLimit;_skinTone;static get requires(){return[le,Ge,"Mention"]}static get pluginName(){return"EmojiMention"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.editor.config.define("emoji",{dropdownLimit:6}),this._emojiDropdownLimit=e.config.get("emoji.dropdownLimit"),this._skinTone=e.config.get("emoji.skinTone"),this._setupMentionConfiguration(e)}_setupMentionConfiguration(e){let r=e.config.get("mergeFields.prefix"),i=e.config.get("mention.feeds"),o=r?r[0]===ie:!1;if(i.filter(x=>!x._isEmojiMarker).some(x=>x.marker===ie)||o){ae("emoji-config-marker-already-used",{marker:ie});return}if(i.some(x=>x._isEmojiMarker))return;let c={_isEmojiMarker:!0,marker:ie,dropdownLimit:this._emojiDropdownLimit,itemRenderer:this._customItemRendererFactory(this.editor.t),feed:this._queryEmojiCallbackFactory()};this.editor.config.set("mention.feeds",[...i,c])}
1async init(){let e=this.editor;this.emojiPickerPlugin=e.plugins.has("EmojiPicker")?e.plugins.get("EmojiPicker"):null,this.emojiRepositoryPlugin=e.plugins.get("EmojiRepository"),this._isEmojiRepositoryAvailable=await this.emojiRepositoryPlugin.isReady(),this._isEmojiRepositoryAvailable&&e.once("ready",this._overrideMentionExecuteListener.bind(this))}_customItemRendererFactory(e){return r=>{let i=document.createElement("button");i.classList.add("ck"),i.classList.add("ck-button"),i.classList.add("ck-button_with-text"),i.id=`mention-list-item-id${r.id.slice(0,-1)}`,i.type="button",i.tabIndex=-1;let o=document.createElement("span");return o.classList.add("ck"),o.classList.add("ck-button__label"),i.appendChild(o),r.id===et?(i.classList.add("ck-list-item-button"),i.classList.add("ck-disabled"),o.textContent=e("Keep on typing to see the emoji.")):r.id===Xe?o.textContent=e("Show all emoji..."):o.textContent=`${r.text} ${r.id}`,i}}_overrideMentionExecuteListener(){let e=this.editor;e.commands.get("mention").on("execute",(r,i)=>{let o=i[0];if(o.marker===ie&&(r.stop(),o.mention.id!==et))if(o.mention.id===Xe){let m=[...o.range.getItems()].filter(c=>c.is("$textProxy")).map(c=>c.data).reduce((c,x)=>c+x,"");e.model.change(c=>{e.model.deleteContent(c.createSelection(o.range))});let s=this.emojiPickerPlugin;s.showUI(m.slice(1)),setTimeout(()=>{s.emojiPickerView.focus()})}else e.execute("insertText",{text:o.mention.text,range:o.range})},{priority:"high"})}_queryEmojiCallbackFactory(){return e=>{if(e.startsWith(" "))return[];if(e.startsWith(ie))return[];if(!this._isEmojiRepositoryAvailable)return[];let r=this.emojiRepositoryPlugin.getEmojiByQuery(e).map(o=>{let m=o.skins[this._skinTone]||o.skins.default;return this.emojiPickerPlugin&&(m=o.skins[this.emojiPickerPlugin.skinTone]||o.skins.default),{id:`:${o.annotation}:`,text:m}});if(!this.emojiPickerPlugin)return r.slice(0,this._emojiDropdownLimit);let i={id:e.length>1?Xe:et};return[...r.slice(0,this._emojiDropdownLimit-1),i]}}},Le=class extends st{refresh(){let r=this.editor.model,i=r.schema,o=r.document.selection;this.isEnabled=i.checkChild(o.getFirstPosition(),"$text")}execute(e=""){this.editor.plugins.get("EmojiPicker").showUI(e)}},Pe=class extends Z{tiles;focusTracker;keystrokes;emojiCategories;cachedTiles;_getEmojiByQuery;constructor(e,{categoryName:r,emojiCategories:i,getEmojiByQuery:o,skinTone:m}){super(e),this.set("isEmpty",!0),this.set("categoryName",r),this.set("skinTone",m),this.tiles=this.createCollection(),this.cachedTiles=this.createCollection(),this.focusTracker=new ne,this.keystrokes=new se,this._getEmojiByQuery=o,this.emojiCategories=i;let s=this.bindTemplate;this.setTemplate({tag:"div",children:[{tag:"div",attributes:{role:"grid",class:["ck","ck-emoji__grid"]},children:this.tiles}],attributes:{role:"tabpanel",class:["ck","ck-emoji__tiles",s.if("isEmpty","ck-hidden",c=>c)]}}),or({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>ct.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy(),this.focusTracker.destroy()}focus(){let e=this.tiles.first;e&&e.focus()}filter(e){let{matchingItems:r,allItems:i}=e?this._getItemsByQuery(e.source):this._getItemsByCategory();return this._updateGrid(r),this.set("isEmpty",r.length===0),{resultsCount:r.length,totalItemsCount:i.length}}_getItemsByQuery(e){return{matchingItems:this._getEmojiByQuery(e),allItems:this.emojiCategories.flatMap(r=>r.items)}}_getItemsByCategory(){let e=this.emojiCategories.find(i=>i.title===this.categoryName),{items:r}=e;return{matchingItems:r,allItems:r}}_updateGrid(e){[...this.tiles].forEach(r=>{this.focusTracker.remove(r),this.tiles.remove(r)}),e.map(r=>{let i=r.skins[this.skinTone]||r.skins.default;return this.cachedTiles.get(i)||this._createTile(i,r.annotation)}).forEach(r=>{this.tiles.add(r),this.focusTracker.add(r)})}_createTile(e,r){let i=new fe(this.locale);return i.viewUid=e,i.extendTemplate({attributes:{class:["ck-emoji__tile"]}}),i.set({label:e,tooltip:r,withText:!0,ariaLabel:r,ariaLabelledBy:void 0}),i.on("execute",()=>{this.fire("execute",{name:r,emoji:e})}),this.cachedTiles.add(i),i}},Me=class extends Z{focusTracker;keystrokes;focusCycler;buttonViews;constructor(e,{emojiCategories:r,categoryName:i}){super(e),this.buttonViews=this.createCollection(r.map(o=>this._createCategoryButton(o))),this.focusTracker=new ne,this.keystrokes=new se,this.focusCycler=new Te({focusables:this.buttonViews,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focu
1sNext:"arrowright"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-emoji__categories-list"],role:"tablist"},children:this.buttonViews}),this.on("change:categoryName",(o,m,s,c)=>{let x=this.buttonViews.find(T=>T.tooltip===c);x&&(x.isOn=!1);let E=this.buttonViews.find(T=>T.tooltip===s);E.isOn=!0}),this.set("categoryName",i)}render(){super.render(),this.buttonViews.forEach(e=>{this.focusTracker.add(e)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),this.buttonViews.destroy()}focus(){this.buttonViews.first.focus()}enableCategories(){this.buttonViews.forEach(e=>{e.isEnabled=!0})}disableCategories(){this.buttonViews.forEach(e=>{e.set({class:"",isEnabled:!1,isOn:!1})})}_createCategoryButton(e){let r=new fe,i=r.bindTemplate;return r.extendTemplate({attributes:{"aria-selected":i.to("isOn",o=>o.toString()),class:["ck-emoji__category-item"]}}),r.set({ariaLabel:e.title,label:e.icon,role:"tab",tooltip:e.title,withText:!0,ariaLabelledBy:void 0}),r.on("execute",()=>{this.categoryName=e.title}),r.on("change:isEnabled",()=>{r.isEnabled&&r.tooltip===this.categoryName&&(r.isOn=!0)}),r}},Ce=class extends Z{inputView;gridView;constructor(e,{gridView:r,resultsView:i}){super(e),this.gridView=r;let o=e.t;this.inputView=new tr(this.locale,{queryView:{label:o("Find an emoji (min. 2 characters)"),creator:cr},filteredView:this.gridView,infoView:{instance:i}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search"],tabindex:"-1"},children:[this.inputView.queryView]}),this.inputView.delegate("search").to(this)}destroy(){super.destroy(),this.inputView.destroy()}search(e){let r=e?new RegExp(Ye(e),"ig"):null,i=this.gridView.filter(r);this.inputView.fire("search",{query:e,...i})}setInputValue(e){e?this.inputView.queryView.fieldView.value=e:this.inputView.queryView.fieldView.reset()}getInputValue(){return this.inputView.queryView.fieldView.element.value}focus(){this.inputView.focus()}},De=class extends Z{dropdownView;_skinTones;constructor(e,{skinTone:r,skinTones:i}
1){super(e),this.set("skinTone",r),this._skinTones=i;let o=e.t,m=o("Select skin tone"),s=ar(e),c=new at;for(let{id:x,icon:E,tooltip:T}of this._skinTones){let Y={type:"button",model:new rr({value:x,label:E,ariaLabel:T,tooltip:T,tooltipPosition:"e",role:"menuitemradio",withText:!0,ariaLabelledBy:void 0})};Y.model.bind("isOn").to(this,"skinTone",R=>R===x),c.add(Y)}nr(s,c,{ariaLabel:m,role:"menu"}),s.buttonView.set({label:this._getSkinTone().icon,ariaLabel:m,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:m}),this.dropdownView=s,this.listenTo(s,"execute",x=>{this.skinTone=x.source.value}),s.buttonView.bind("label").to(this,"skinTone",()=>this._getSkinTone().icon),s.buttonView.bind("ariaLabel").to(this,"skinTone",()=>`${this._getSkinTone().tooltip}, ${m}`),this.setTemplate({tag:"div",attributes:{class:["ck","ck-emoji__skin-tone"]},children:[s]})}focus(){this.dropdownView.buttonView.focus()}_getSkinTone(){return this._skinTones.find(e=>e.id===this.skinTone)}},Oe=class extends Z{items;focusTracker;keystrokes;focusCycler;searchView;toneView;categoriesView;gridView;infoView;constructor(e,{emojiCategories:r,getEmojiByQuery:i,skinTone:o,skinTones:m}){super(e);let s=r[0].title;this.gridView=new Pe(e,{categoryName:s,emojiCategories:r,getEmojiByQuery:i,skinTone:o}),this.infoView=new er,this.searchView=new Ce(e,{gridView:this.gridView,resultsView:this.infoView}),this.categoriesView=new Me(e,{emojiCategories:r,categoryName:s}),this.toneView=new De(e,{skinTone:o,skinTones:m}),this.items=this.createCollection([this.searchView,this.toneView,this.categoriesView,this.gridView,this.infoView]),this.focusTracker=new ne,this.keystrokes=new se,this.focusCycler=new Te({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",children:[{tag:"div",children:[this.searchView,this.toneView],attributes:{class:["ck","ck-emoji__search"]}},this.categoriesView,this.gridView,{tag:"div",children:[this.infoView],attributes:{class:["ck","ck-search__results"]}}],attributes:{tabindex:"-1",class:["ck","ck-emoji","ck-search"]}}),this._setupEventListeners()}render(){super.render(),this.focusTracker.add(this.searchView.element),this.focusTracker.add(this.toneView.element),this.focusTracker.add(this.categoriesView.element),this.focusTracker.add(this.gridView.element),this.focusTracker.add(this.infoView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.searchView.focus()}_setupEventListeners(){let e=this.locale.t;this.searchView.on("search",(r,i)=>{i.query?this.categoriesView.disableCategories():this.categoriesView.enableCategories()}),this.searchView.on("search",(r,i)=>{i.query.length===1?this.infoView.set({primaryText:e("Keep on typing to see the emoji."),secondaryText:e("The query must contain at least two characters."),isVisible:!0}):i.resultsCount?this.infoView.set({isVisible:!1}):this.infoView.set({primaryText:e('No emojis were found matching "%0".',i.query
1),secondaryText:e("Please try a different phrase or check the spelling."),isVisible:!0})}),this.searchView.on("search",()=>{this.fire("update"),this.gridView.element.scrollTo(0,0)}),this.categoriesView.on("change:categoryName",(r,i,o)=>{this.gridView.categoryName=o,this.searchView.search("")}),this.toneView.on("change:skinTone",(r,i,o)=>{this.gridView.skinTone=o,this.searchView.search(this.searchView.getInputValue())})}},Fe=class extends Z{backButtonView;focusTracker=new ne;keystrokes=new se;children;_focusables=new ir;_focusCycler;constructor(e){super(e),this.backButtonView=this._createBackButton(),this.children=this.createCollection([this._createHeaderView()]),this._focusCycler=new Te({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form","ck-emoji-picker-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),[...this.children.filter(fr),this.backButtonView].forEach(r=>{this._focusables.add(r),this.focusTracker.add(r.element),lr(r)&&this._focusCycler.chain(r.focusCycler)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBackButton(){let e=this.locale.t,r=new fe(this.locale);return r.set({class:"ck-button-back",label:e("Back"),icon:ur,tooltip:!0}),r.delegate("execute").to(this,"cancel"),r}_createHeaderView(){let e=this.locale.t,r=new Yt(this.locale,{label:e("Emoji picker")});return r.children.add(this.backButtonView,0),r}},G="emoji-picker",Re=class extends te{static get requires(){return[le,Qt,Zt,Ge]}static get pluginName(){return"EmojiPicker"}static get isOfficialPlugin(){return!0}
1async init(){let e=this.editor;if(this.balloonPlugin=e.plugins.get("ContextualBalloon"),this.emojiRepositoryPlugin=e.plugins.get("EmojiRepository"),!await this.emojiRepositoryPlugin.isReady())return;let r=new Le(e);e.commands.add("emoji",r),e.ui.componentFactory.add("emoji",()=>{let i=this._createButton(fe,r);return i.set({tooltip:!0}),i}),e.ui.componentFactory.add("menuBar:emoji",()=>this._createButton(Xt,r)),this._setupConversion()}destroy(){super.destroy(),this.emojiPickerView&&this.emojiPickerView.destroy()}get skinTone(){return this.emojiPickerView?this.emojiPickerView.gridView.skinTone:this.editor.config.get("emoji.skinTone")}showUI(e=""){this._showFakeVisualSelection(),this.emojiPickerView||(this.emojiPickerView=this._createEmojiPickerView()),e&&this.emojiPickerView.searchView.setInputValue(e),this.emojiPickerView.searchView.search(e),this.emojiPickerFormView||(this.emojiPickerFormView=this._createEmojiPickerFormView()),this.balloonPlugin.hasView(this.emojiPickerFormView)||(this.emojiPickerFormView.backButtonView.isVisible=!!this.balloonPlugin.visibleView,this.balloonPlugin.add({view:this.emojiPickerFormView,position:this._getBalloonPositionData(),balloonClassName:"ck-emoji-picker-balloon"})),this.emojiPickerView.focus()}_createButton(e,r){let i=new e(this.editor.locale),o=this.editor.locale.t;return i.bind("isEnabled").to(r,"isEnabled"),i.set({label:o("Emoji"),icon:mr,isToggleable:!0}),i.on("execute",()=>{this.editor.editing.view.scrollToTheSelection(),this.showUI()}),i}_createEmojiPickerView(){let e=new Oe(this.editor.locale,{emojiCategories:this.emojiRepositoryPlugin.getEmojiCategories(),skinTone:this.editor.config.get("emoji.skinTone"),skinTones:this.emojiRepositoryPlugin.getSkinTones(),getEmojiByQuery:r=>this.emojiRepositoryPlugin.getEmojiByQuery(r)});return this.listenTo(e.gridView,"execute",(r,i)=>{let o=this.editor,m=i.emoji;this._hideUI(),o.execute("insertText",{text:m})}),e}_createEmojiPickerFormView(){let e=new Fe(this.editor.locale);return e.children.add(this.emojiPickerView),this.listenTo(this.emojiPickerView,"update",()=>{this.balloonPlugin.visibleView===e&&this.balloonPlugin.updatePosition()}),this.listenTo(e,"cancel",()=>{this._hideUI()}),e.keystrokes.set("Esc",(r,i)=>{this._hideUI(),i()}),sr({emitter:e,contextElements:[this.balloonPlugin.view.element],callback:()=>{this._hideUI(!1)},activator:()=>this.balloonPlugin.visibleView===e}),e}_hideUI(e=!0){this.balloonPlugin.remove(this.emojiPickerFormView),this.emojiPickerView.searchView.setInputValue(""),e&&this.editor.editing.view.focus(),this._hideFakeVisualSelection()}_setupConversion(){let e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:G,view:{classes:["ck-fake-emoji-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:G,view:(r,{writer:i})=>{if(!r.markerRange.isCollapsed)return null;let o=i.createUIElement("span");return i.addClass(["ck-fake-emoji-selection","ck-fake-emoji-selection_collapsed"],o),o}})}_getBalloonPositionData(){let e=this.editor.editing.view,r=e.document;return{target:()=>e.domConverter.viewRangeToDom(r.selection.getFirstRange())}}_showFakeVisualSelection(){let e=this.editor.model;e.change(r=>{let i=e.document.selection.getFirstRange();if(e.markers.has(G))r.updateMarker(G,{range:i});else if(i.start.isAtEnd){let o=i.start.getLastMatchingPosition(({item:m})=>!e.schema.isContent(m),{boundaries:i});r.addMarker(G,{usingOperation:!1,affectsData:!1,range:r.createRange(o,i.end)})}else r.addMarker(G,{usingOperation:!1,affectsData:!1,range:i})})}_hideFakeVisualSelection(){let e=this.editor.model;e.markers.has(G)&&e.change(r=>{r.removeMarker(G)})}},tt=class extends te{static get requires(){return[Be,Re]}static get pluginName(){return"Emoji"}static get isOfficialPlugin(){return!0}};export{tt as Emoji,Me as EmojiCategoriesView,Le as EmojiCommand,Pe as EmojiGridView,Be as EmojiMention,Re as EmojiPicker,Fe as EmojiPickerFormView,Oe as EmojiPickerView,le as EmojiRepository,Ce as EmojiSearchView,De as EmojiToneView,Ae as EmojiUtils,dr as _isEmojiSupported};
2/*! Bundled license information:
3
4@ckeditor/ckeditor5-emoji/dist/index.js:
5  (**
6   * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
7   * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8   *)
9  (**
10   * @license Copyright (c) 2023, Koala Interactive SAS
11   * For licensing, see https://github.com/koala-interactive/is-emoji-supported/blob/master/LICENSE.md
12   *)
13  (* istanbul ignore next -- @preserve *)
14*/
15//# sourceMappingURL=@ckeditor$ckeditor5-emoji$dist$index.js.(JOBMII4M).js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.