sirius-press/wordpress/wp-includes/js/dist/core-data.min.js

16 lines
226 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
(function() {
"use strict";var wp;(wp||={}).coreData=(()=>{var ng=Object.create;var So=Object.defineProperty;var og=Object.getOwnPropertyDescriptor;var sg=Object.getOwnPropertyNames;var ig=Object.getPrototypeOf,cg=Object.prototype.hasOwnProperty;var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Me=(e,t)=>{for(var r in t)So(e,r,{get:t[r],enumerable:!0})},ol=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of sg(t))!cg.call(e,o)&&o!==r&&So(e,o,{get:()=>t[o],enumerable:!(n=og(t,o))||n.enumerable});return e};var _=(e,t,r)=>(r=e!=null?ng(ig(e)):{},ol(t||!e||!e.__esModule?So(r,"default",{value:e,enumerable:!0}):r,e)),ag=e=>ol(So({},"__esModule",{value:!0}),e);var at=W((Mb,sl)=>{sl.exports=window.wp.data});var se=W((Nb,il)=>{"use strict";il.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(o of t.entries())if(!r.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],r.get(o[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(o of t.entries())if(!r.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(t[o]!==r[o])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var bo=W((Lb,cl)=>{cl.exports=window.wp.compose});var ll=W((Pb,al)=>{al.exports=window.wp.undoManager});var At=W((Jb,dl)=>{dl.exports=window.wp.apiFetch});var Uc=W((Kv,mf)=>{mf.exports=window.wp.privateApis});var vs=W((Xv,bf)=>{bf.exports=window.wp.hooks});var md=W((TC,gd)=>{"use strict";function hr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hr=function(t){return typeof t}:hr=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hr(e)}function KE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WE(e,t,r){return t&&pd(e.prototype,t),r&&pd(e,r),e}function hd(e,t){var r=e._map,n=e._arrayTreeMap,o=e._objectTreeMap;if(r.has(t))return r.get(t);for(var s=Object.keys(t).sort(),i=Array.isArray(t)?n:o,c=0;c<s.length;c++){var a=s[c];if(i=i.get(a),i===void 0)return;var l=t[a];if(i=i.get(l),i===void 0)return}var u=i.get("_ekm_value");if(u)return r.delete(u[0]),u[0]=t,i.set("_ekm_value",u),r.set(t,u),u}var QE=(function(){function e(t){if(KE(this,e),this.clear(),t instanceof e){var r=[];t.forEach(function(o,s){r.push([s,o])}),t=r}if(t!=null)for(var n=0;n<t.length;n++)this.set(t[n][0],t[n][1])}return WE(e,[{key:"set",value:function(r,n){if(r===null||hr(r)!=="object")return this._map.set(r,n),this;for(var o=Object.keys(r).sort(),s=[r,n],i=Array.isArray(r)?this._arrayTreeMap:this._objectTreeMap,c=0;c<o.length;c++){var a=o[c];i.has(a)||i.set(a,new e),i=i.get(a);var l=r[a];i.has(l)||i.set(l,new e),i=i.get(l)}var u=i.get("_ekm_value");return u&&this._map.delete(u[0]),i.set("_ekm_value",s),this._map.set(r,s),this}},{key:"get",value:function(r){if(r===null||hr(r)!=="object")return this._map.get(r);var n=hd(this,r);if(n)return n[1]}},{key:"has",value:function(r){return r===null||hr(r)!=="object"?this._map.has(r):hd(this,r)!==void 0}},{key:"delete",value:function(r){return this.has(r)?(this.set(r,void 0),!0):!1}},{key:"forEach",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==voi
`)}},Gi=(e,t)=>e===t?!0:e==null||t==null||e.constructor!==t.constructor?!1:e[Ye]?Oo(e,t):Dt(e)?Ro(e,r=>gn(t,n=>Gi(r,n))):kl(e)?Lr(e,(r,n)=>Gi(r,t[n])):!1,nt=class{static _dilutes=!1;extends(t){let[r,n]=[this.shape,t.shape];return this.constructor._dilutes&&([n,r]=[r,n]),Gi(r,n)}equals(t){return this.constructor===t.constructor&&Ge(this.shape,t.shape)}[rm](){return!0}[Ye](t){return this.equals(t)}validate(t){return this.check(t)}check(t,r){_t()}get nullable(){return $r(this,Wo)}get optional(){return new Vo(this)}cast(t){return Gl(t,this),t}expect(t){return Gl(t,this),t}},Cn=class extends nt{constructor(t,r){super(),this.shape=t,this._c=r}check(t,r=void 0){let n=t?.constructor===this.shape&&(this._c==null||this._c(t));return!n&&r?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),n}},H=(e,t=null)=>new Cn(e,t),dv=H(Cn),Rn=class extends nt{constructor(t){super(),this.shape=t}check(t,r){let n=this.shape(t);return!n&&r?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),n}},K=e=>new Rn(e),pv=H(Rn),jr=class extends nt{constructor(t){super(),this.shape=t}check(t,r){let n=this.shape.some(o=>o===t);return!n&&r?.extend(null,this.shape.join(" | "),t.toString()),n}},Ho=(...e)=>new jr(e),ql=H(jr),nm=RegExp.escape||(e=>e.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),zl=e=>{if(Fr.check(e))return[nm(e)];if(ql.check(e))return e.shape.map(t=>t+"");if(Jl.check(e))return["[+-]?\\d+.?\\d*"];if(Xl.check(e))return[".*"];if(qo.check(e))return e.shape.map(zl).flat(1);X()},qi=class extends nt{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(zl).map(r=>`(${r.join("|")})`).join("")+"$")}check(t,r){let n=this._r.exec(t)!=null;return!n&&r?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),n}};var hv=H(qi),om=Symbol("optional"),Vo=class extends nt{constructor(t){super(),this.shape=t}check(t,r){let n=t===void 0||this.shape.check(t);return!n&&r?.extend(null,"undefined (optional)","()"),n}get[om](){return!0}},sm=H(Vo),Bo=class extends nt{check(t,r){return r?.extend(null,"never",typeof t),!1}},gv=new Bo,mv=H(Bo),jo=class e extends nt{constructor(t,r=!1){super(),this.shape=t,this._isPartial=r}static _dilutes=!0;get partial(){return new e(this.shape,!0)}check(t,r){return t==null?(r?.extend(null,"object","null"),!1):Lr(this.shape,(n,o)=>{let s=this._isPartial&&!bn(t,o)||n.check(t[o],r);return!s&&r?.extend(o.toString(),n.toString(),typeof t[o],"Object property does not match"),s})}},im=e=>new jo(e),cm=H(jo),am=K(e=>e!=null&&(e.constructor===Object||e.constructor==null)),Fo=class extends nt{constructor(t,r){super(),this.shape={keys:t,values:r}}check(t,r){return t!=null&&Lr(t,(n,o)=>{let s=this.shape.keys.check(o,r);return!s&&r?.extend(o+"","Record",typeof t,s?"Key doesn't match schema":"Value doesn't match value"),s&&this.shape.values.check(n,r)})}},Hl=(e,t)=>new Fo(e,t),lm=H(Fo),$o=class extends nt{constructor(t){super(),this.shape=t}check(t,r){return t!=null&&Lr(this.shape,(n,o)=>{let s=n.check(t[o],r);return!s&&r?.extend(o.toString(),"Tuple",typeof n),s})}},um=(...e)=>new $o(e),yv=H($o),Yo=class extends nt{constructor(t){super(),this.shape=t.length===1?t[0]:new Tn(t)}check(t,r){let n=Dt(t)&&Ro(t,o=>this.shape.check(o));return!n&&r?.extend(null,"Array",""),n}},Kl=(...e)=>new Yo(e),fm=H(Yo),dm=K(e=>Dt(e)),Go=class extends nt{constructor(t,r){super(),this.shape=t,this._c=r}check(t,r){let n=t instanceof this.shape&&(this._c==null||this._c(t));return!n&&r?.extend(null,this.shape.name,t?.constructor.name),n}},pm=(e,t=null)=>new Go(e,t),Ev=H(Go),hm=pm(nt),zi=class extends nt{constructor(t){super(),this.len=t.length-1,this.args=um(...t.slice(-1)),this.res=t[this.len]}check(t,r){let n=t.constructor===Function&&t.length<=this.len;return!n&&r?.extend(null,"function",typeof t),n}};var gm=H(zi),mm=K(e=>typeof e=="function"),Hi=class extends nt{constructor(t){super(),this.shape=t}check(t,r){let n=Ro(this.shape,o=>o.check(t,r));return!n&&r?.extend(null,"Intersectinon",typeof t),n}};var wv=H(Hi,e=>e.shape.length>0),Tn=class extends nt{sta
${r.toString()}`)},Ki=class{constructor(t){this.patterns=[],this.$state=t}if(t,r){return this.patterns.push({if:In(t),h:r}),this}else(t){return this.if(zo,t)}done(){return(t,r)=>{for(let n=0;n<this.patterns.length;n++){let o=this.patterns[n];if(o.if.check(t))return o.h(t,r)}throw wt("Unhandled pattern")}}},bm=e=>new Ki(e),tu=bm(zo).if(Jl,(e,t)=>Lo(t,Ei,xr)).if(Xl,(e,t)=>Yl(t)).if(wm,(e,t)=>ji(t)).if(Em,(e,t)=>BigInt(Lo(t,Ei,xr))).if(qo,(e,t)=>Vr(t,Po(t,e.shape))).if(cm,(e,t)=>{let r={};for(let n in e.shape){let o=e.shape[n];if(sm.check(o)){if(ji(t))continue;o=o.shape}r[n]=tu(o,t)}return r}).if(fm,(e,t)=>{let r=[],n=Fi(t,0,42);for(let o=0;o<n;o++)r.push(Vr(t,e.shape));return r}).if(ql,(e,t)=>Po(t,e.shape)).if(_m,(e,t)=>null).if(gm,(e,t)=>{let r=Vr(t,e.res);return()=>r}).if(ym,(e,t)=>Vr(t,Po(t,[Br,Fr,Wo,Zl,Wi,Ko,Kl(Br),Hl($r("a","b","c"),Br)]))).if(lm,(e,t)=>{let r={},n=Lo(t,0,3);for(let o=0;o<n;o++){let s=Vr(t,e.shape.keys),i=Vr(t,e.shape.values);r[s]=i}return r}).done(),Vr=(e,t)=>tu(In(t),e);var qe=typeof document<"u"?document:{};var Rv=K(e=>e.nodeType===Tm);var Tv=typeof DOMParser<"u"?new DOMParser:null;var Iv=K(e=>e.nodeType===xm);var Av=K(e=>e.nodeType===Cm);var eu=e=>pl(e,(t,r)=>`${r}:${t};`).join("");var xm=qe.ELEMENT_NODE,Cm=qe.TEXT_NODE,kv=qe.CDATA_SECTION_NODE,Dv=qe.COMMENT_NODE,Rm=qe.DOCUMENT_NODE,Ov=qe.DOCUMENT_TYPE_NODE,Tm=qe.DOCUMENT_FRAGMENT_NODE,Uv=K(e=>e.nodeType===Rm);var Ft=Symbol;var An=Ft(),kn=Ft(),Qi=Ft(),Ji=Ft(),Xi=Ft(),Dn=Ft(),Zi=Ft(),Yr=Ft(),tc=Ft(),ru=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());let t=[],r=[],n=0;for(;n<e.length;n++){let o=e[n];if(o===void 0)break;if(o.constructor===String||o.constructor===Number)t.push(o);else if(o.constructor===Object)break}for(n>0&&r.push(t.join(""));n<e.length;n++){let o=e[n];o instanceof Symbol||r.push(o)}return r};var Mv=fe();var Dm={[An]:jt("font-weight","bold"),[kn]:jt("font-weight","normal"),[Qi]:jt("color","blue"),[Xi]:jt("color","green"),[Ji]:jt("color","grey"),[Dn]:jt("color","red"),[Zi]:jt("color","purple"),[Yr]:jt("color","orange"),[tc]:jt("color","black")},Om=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());let t=[],r=[],n=$(),o=[],s=0;for(;s<e.length;s++){let i=e[s],c=Dm[i];if(c!==void 0)n.set(c.left,c.right);else{if(i===void 0)break;if(i.constructor===String||i.constructor===Number){let a=eu(n);s>0||a.length>0?(t.push("%c"+i),r.push(a)):t.push(i)}else break}}for(s>0&&(o=r,o.unshift(t.join("")));s<e.length;s++){let i=e[s];i instanceof Symbol||o.push(i)}return o},nu=Pl?Om:ru,Qo=(...e)=>{console.log(...nu(e)),ou.forEach(t=>t.print(e))},ec=(...e)=>{console.warn(...nu(e)),e.unshift(Yr),ou.forEach(t=>t.print(e))};var ou=Vt();var su=e=>({[Symbol.iterator](){return this},next:e}),iu=(e,t)=>su(()=>{let r;do r=e.next();while(!r.done&&!t(r.value));return r}),Jo=(e,t)=>su(()=>{let{done:r,value:n}=e.next();return{done:r,value:r?void 0:t(n)}});var nc=class extends ce{constructor(t,r){super(),this.doc=t,this.awareness=r}},Un=class{constructor(t,r){this.clock=t,this.len=r}},ge=class{constructor(){this.clients=new Map}},Ke=(e,t,r)=>t.clients.forEach((n,o)=>{let s=e.doc.store.clients.get(o);if(s!=null){let i=s[s.length-1],c=i.id.clock+i.length;for(let a=0,l=n[a];a<n.length&&l.clock<c;l=n[++a])Du(e,s,l.clock,l.len,r)}}),Pm=(e,t)=>{let r=0,n=e.length-1;for(;r<=n;){let o=tt((r+n)/2),s=e[o],i=s.clock;if(i<=t){if(t<i+s.len)return o;r=o+1}else n=o-1}return null},ir=(e,t)=>{let r=e.clients.get(t.client);return r!==void 0&&Pm(r,t.clock)!==null},pc=e=>{e.clients.forEach(t=>{t.sort((o,s)=>o.clock-s.clock);let r,n;for(r=1,n=1;r<t.length;r++){let o=t[n-1],s=t[r];o.clock+o.len>=s.clock?o.len=Qt(o.len,s.clock+s.len-o.clock):(n<r&&(t[n]=s),n++)}t.length=n})},We=e=>{let t=new ge;for(let r=0;r<e.length;r++)e[r].clients.forEach((n,o)=>{if(!t.clients.has(o)){let s=n.slice();for(let i=r+1;i<e.length;i++)gl(s,e[i].clients.get(o)||[]);t.clients.set(o,s)}});return pc(t),t},Mn=(e,t,r,n)=>{Q(e.clients,t,()=>[]).push(new Un(r,n))},gs=()=>new ge,hc=e=>{let t=gs();return e.clients.forEach((r,n)=>{let o=[];for(let s=0;s<r.length;s++){let i=r[s];if(i.deleted){let c=i.id
`;r.right=new M(T(i,j(s.store,i)),r.left,r.left&&r.left.lastId,r.right,r.right&&r.right.id,t,null,new Ut(a)),r.right.integrate(e,0),r.forward()}ef(e,t,r,c)},of=(e,t,r,n,o)=>{let s=t,i=$();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===G){let l=s.content;i.set(l.key,l)}s=s.right}let c=0,a=!1;for(;t!==s;){if(r===t&&(a=!0),!t.deleted){let l=t.content;if(l.constructor===G){let{key:u,value:f}=l,d=n.get(u)??null;(i.get(u)!==l||d===f)&&(t.delete(e),c++,!a&&(o.get(u)??null)===f&&d!==f&&(d===null?o.delete(u):o.set(u,d))),!a&&!t.deleted&&Wr(o,l)}}t=t.right}return c},Ny=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;let r=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===G){let n=t.content.key;r.has(n)?t.delete(e):r.add(n)}t=t.left}},sf=e=>{let t=0;return U(e.doc,r=>{let n=e._start,o=e._start,s=$(),i=xo(s);for(;o;)o.deleted===!1&&(o.content.constructor===G?Wr(i,o.content):(t+=of(r,n,o,s,i),s=xo(i),n=o)),o=o.right}),t},Ly=e=>{let t=new Set,r=e.doc;for(let[n,o]of e.afterState.entries()){let s=e.beforeState.get(n)||0;o!==s&&Du(e,r.store.clients.get(n),s,o,i=>{!i.deleted&&i.content.constructor===G&&i.constructor!==ft&&t.add(i.parent)})}U(r,n=>{Ke(e,e.deleteSet,o=>{if(o instanceof ft||!o.parent._hasFormatting||t.has(o.parent))return;let s=o.parent;o.content.constructor===G?t.add(s):Ny(n,o)});for(let o of t)sf(o)})},bu=(e,t,r)=>{let n=r,o=xo(t.currentAttributes),s=t.right;for(;r>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Tt:case Zt:case Ut:r<t.right.length&&ut(e,T(t.right.id.client,t.right.id.clock+r)),r-=t.right.length,t.right.delete(e);break}t.forward()}s&&of(e,s,t.right,o,t.currentAttributes);let i=(t.left||t.right).parent;return i._searchMarker&&Vn(i._searchMarker,t.index,-n+r),t},fs=class extends Ze{constructor(t,r,n){super(t,r),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(o=>{o===null?this.childListChanged=!0:this.keysChanged.add(o)})}get changes(){if(this._changes===null){let t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){let t=this.target.doc,r=[];U(t,n=>{let o=new Map,s=new Map,i=this.target._start,c=null,a={},l="",u=0,f=0,d=()=>{if(c!==null){let p=null;switch(c){case"delete":f>0&&(p={delete:f}),f=0;break;case"insert":(typeof l=="object"||l.length>0)&&(p={insert:l},o.size>0&&(p.attributes={},o.forEach((h,g)=>{h!==null&&(p.attributes[g]=h)}))),l="";break;case"retain":u>0&&(p={retain:u},Ul(a)||(p.attributes=Dl({},a))),u=0;break}p&&r.push(p),c=null}};for(;i!==null;){switch(i.content.constructor){case Tt:case Zt:this.adds(i)?this.deletes(i)||(d(),c="insert",l=i.content.getContent()[0],d()):this.deletes(i)?(c!=="delete"&&(d(),c="delete"),f+=1):i.deleted||(c!=="retain"&&(d(),c="retain"),u+=1);break;case Ut:this.adds(i)?this.deletes(i)||(c!=="insert"&&(d(),c="insert"),l+=i.content.str):this.deletes(i)?(c!=="delete"&&(d(),c="delete"),f+=i.length):i.deleted||(c!=="retain"&&(d(),c="retain"),u+=i.length);break;case G:{let{key:p,value:h}=i.content;if(this.adds(i)){if(!this.deletes(i)){let g=o.get(p)??null;he(g,h)?h!==null&&i.delete(n):(c==="retain"&&d(),he(h,s.get(p)??null)?delete a[p]:a[p]=h)}}else if(this.deletes(i)){s.set(p,h);let g=o.get(p)??null;he(g,h)||(c==="retain"&&d(),a[p]=g)}else if(!i.deleted){s.set(p,h);let g=a[p];g!==void 0&&(he(g,h)?g!==null&&i.delete(n):(c==="retain"&&d(),h===null?delete a[p]:a[p]=h))}i.deleted||(c==="insert"&&d(),Wr(o,i.content));break}}i=i.right}for(d();r.length>0;){let p=r[r.length-1];if(p.retain!==void 0&&p.attributes===void 0)r.pop();else break}}),this._delta=r}return this._delta}},zr=class e extends Y{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??st(),this._length}_integrate(t,r){super._integrate(t,r);try{this._pending.forEach(n=>n())}catch(n){console.error(n)}this._pending=null}_copy(){return new e}clone(){let t=new e;return t.applyDelta(this.toDelta()),t}_callObserve
`?i.insert.slice(0,-1):i.insert;(typeof c!="string"||c.length>0)&&rc(n,this,o,c,i.attributes||{})}else i.retain!==void 0?Su(n,this,o,i.retain,i.attributes||{}):i.delete!==void 0&&bu(n,o,i.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,r,n){this.doc??st();let o=[],s=new Map,i=this.doc,c="",a=this._start;function l(){if(c.length>0){let f={},d=!1;s.forEach((h,g)=>{d=!0,f[g]=h});let p={insert:c};d&&(p.attributes=f),o.push(p),c=""}}let u=()=>{for(;a!==null;){if(de(a,t)||r!==void 0&&de(a,r))switch(a.content.constructor){case Ut:{let f=s.get("ychange");t!==void 0&&!de(a,t)?(f===void 0||f.user!==a.id.client||f.type!=="removed")&&(l(),s.set("ychange",n?n("removed",a.id):{type:"removed"})):r!==void 0&&!de(a,r)?(f===void 0||f.user!==a.id.client||f.type!=="added")&&(l(),s.set("ychange",n?n("added",a.id):{type:"added"})):f!==void 0&&(l(),s.delete("ychange")),c+=a.content.str;break}case Tt:case Zt:{l();let f={insert:a.content.getContent()[0]};if(s.size>0){let d={};f.attributes=d,s.forEach((p,h)=>{d[h]=p})}o.push(f);break}case G:de(a,t)&&(l(),Wr(s,a.content));break}a=a.right}l()};return t||r?U(i,f=>{t&&ic(f,t),r&&ic(f,r),u()},"cleanup"):u(),o}insert(t,r,n){if(r.length<=0)return;let o=this.doc;o!==null?U(o,s=>{let i=ts(s,this,t,!n);n||(n={},i.currentAttributes.forEach((c,a)=>{n[a]=c})),rc(s,this,i,r,n)}):this._pending.push(()=>this.insert(t,r,n))}insertEmbed(t,r,n){let o=this.doc;o!==null?U(o,s=>{let i=ts(s,this,t,!n);rc(s,this,i,r,n||{})}):this._pending.push(()=>this.insertEmbed(t,r,n||{}))}delete(t,r){if(r===0)return;let n=this.doc;n!==null?U(n,o=>{bu(o,ts(o,this,t,!0),r)}):this._pending.push(()=>this.delete(t,r))}format(t,r,n){if(r===0)return;let o=this.doc;o!==null?U(o,s=>{let i=ts(s,this,t,!1);i.right!==null&&Su(s,this,i,r,n)}):this._pending.push(()=>this.format(t,r,n))}removeAttribute(t){this.doc!==null?U(this.doc,r=>{as(r,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,r){this.doc!==null?U(this.doc,n=>{Tc(n,this,t,r)}):this._pending.push(()=>this.setAttribute(t,r))}getAttribute(t){return Ic(this,t)}getAttributes(){return Xu(this)}_write(t){t.writeTypeRef(eE)}},Py=e=>new zr,On=class{constructor(t,r=()=>!0){this._filter=r,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??st()}[Symbol.iterator](){return this}next(){let t=this._currentNode,r=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(r)))do if(r=t.content.type,!t.deleted&&(r.constructor===nr||r.constructor===rr)&&r._start!==null)t=r._start;else for(;t!==null;){let n=t.next;if(n!==null){t=n;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}},rr=class e extends Y{constructor(){super(),this._prelimContent=[]}get firstChild(){let t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,r){super._integrate(t,r),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return t.insert(0,this.toArray().map(r=>r instanceof Y?r.clone():r)),t}get length(){return this.doc??st(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new On(this,t)}querySelector(t){t=t.toUpperCase();let n=new On(this,o=>o.nodeName&&o.nodeName.toUpperCase()===t).next();return n.done?null:n.value}querySelectorAll(t){return t=t.toUpperCase(),kt(new On(this,r=>r.nodeName&&r.nodeName.toUpperCase()===t))}_callObserver(t,r){Es(this,t,new ds(this,r,t))}toString(){return Hu(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,r={},n){let o=t.createDocumentFragment();return n!==void 0&&n._createAssociation(o,this),Bn(this,s=>{o.insertBefore(s.toDOM(t,r,n),null)}),o}insert(t,r){this.doc!==null?U(this.doc,n=>{Qu(n,this,t,r)}):this._prelimContent.splice(t,0,...r)}insertAfter(t,r){if(this.doc!==null)U(this.doc,n=>{let o=t&&t instanceof Y?t._item:t;cs(n,this,o,r)});else{let n=this._prelimContent,o=t===null?0:n.findIndex(s=>s===t)+1;if(o
`))&&(t=t.trim()),(!n.newlineIsToken||!r.includes(`
`))&&(r=r.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(t.endsWith(`
`)&&(t=t.slice(0,-1)),r.endsWith(`
`)&&(r=r.slice(0,-1))),super.equals(t,r,n)}},Zf=new Jc;function Xc(e,t,r){return Zf.diff(e,t,r)}function BE(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
`));let r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let o=0;o<n.length;o++){let s=n[o];o%2&&!t.newlineIsToken?r[r.length-1]+=s:r.push(s)}return r}var ks=_(se(),1);var td=_(se(),1);function jE(e){return JSON.parse(JSON.stringify(e))}var Zc;(e=>{function t(s={},i={},c=!1){typeof s!="object"&&(s={}),typeof i!="object"&&(i={});let a=jE(i);c||(a=Object.keys(a).reduce((l,u)=>((a[u]!==null||a[u]!==void 0)&&(l[u]=a[u]),l),{}));for(let l in s)s[l]!==void 0&&i[l]===void 0&&(a[l]=s[l]);return Object.keys(a).length>0?a:void 0}e.compose=t;function r(s={},i={}){typeof s!="object"&&(s={}),typeof i!="object"&&(i={});let c=Object.keys(s).concat(Object.keys(i)).reduce((a,l)=>((0,td.default)(s[l],i[l])||(a[l]=i[l]===void 0?null:i[l]),a),{});return Object.keys(c).length>0?c:void 0}e.diff=r;function n(s={},i={}){s=s||{};let c=Object.keys(i).reduce((a,l)=>(i[l]!==s[l]&&s[l]!==void 0&&(a[l]=i[l]),a),{});return Object.keys(s).reduce((a,l)=>(s[l]!==i[l]&&i[l]===void 0&&(a[l]=null),a),c)}e.invert=n;function o(s,i,c=!1){if(typeof s!="object")return i;if(typeof i!="object")return;if(!c)return i;let a=Object.keys(i).reduce((l,u)=>(s[u]===void 0&&(l[u]=i[u]),l),{});return Object.keys(a).length>0?a:void 0}e.transform=o})(Zc||(Zc={}));var pr=Zc;var ta;(e=>{function t(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}e.length=t})(ta||(ta={}));var It=ta;var dt=class{ops;index;offset;constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=It.length(t);if(e>=n-r?(e=n-r,this.index+=1,this.offset=0):this.offset+=e,typeof t.delete=="number")return{delete:e};let o={};return t.attributes&&(o.attributes=t.attributes),typeof t.retain=="number"?o.retain=e:typeof t.retain=="object"&&t.retain!==null?o.retain=t.retain:typeof t.insert=="string"?o.insert=t.insert.substr(r,e):o.insert=t.insert,o}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?It.length(this.ops[this.index])-this.offset:1/0}peekType(){let e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index)}else return[];let e=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=e,this.index=t,[r].concat(n)}};function FE(e){return JSON.parse(JSON.stringify(e))}var $E="\0",YE=1e4;function ea(e){return e.map(t=>({...t,count:t.value.length}))}var ed=(e,t)=>{if(typeof e!="object"||e===null)throw new Error(`cannot retain a ${typeof e}`);if(typeof t!="object"||t===null)throw new Error(`cannot retain a ${typeof t}`);let r=Object.keys(e)[0];if(!r||r!==Object.keys(t)[0])throw new Error(`embed types not matched: ${r} != ${Object.keys(t)[0]}`);return[r,e[r],t[r]]},GE=class gt{static Op=It;static OpIterator=dt;static AttributeMap=pr;static handlers={};static registerEmbed(t,r){this.handlers[t]=r}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){let r=this.handlers[t];if(!r)throw new Error(`no handlers for embed type "${t}"`);return r}ops;constructor(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}insert(t,r){let n={};return typeof t=="string"&&t.length===0?this:(n.insert=t,r!=null&&typeof r=="object"&&Object.keys(r).length>0&&(n.attributes=r),this.push(n))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,r){if(typeof t=="number"&&t<=0)return this;let n={retain:t};return r!=null&&typeof r=="object"&&Object.keys(r).length>0&&(n.attributes=r),this.push(n)}push(t){let r=this.ops.length,n=this.ops[r-1];if(t=FE(t),typeof n=="object"){if(typeof t.delete=="number"&&typeof n.delete=="number")return this.ops[r-1]={delete:n.delete+t.delete},this;if(typeof n.delete=="number"&&t.insert!==null&&t.insert!==void 0&&(r-=1,n=this.ops[r-1],typeof n!="object"))return this.ops.unshift
`){let n=new dt(this.ops),o=new gt,s=0;for(;n.hasNext();){if(n.peekType()!=="insert")return;let i=n.peek(),c=It.length(i)-n.peekLength(),a=typeof i.insert=="string"?i.insert.indexOf(r,c)-c:-1;if(a<0)o.push(n.next());else if(a>0)o.push(n.next(a));else{if(t(o,n.next(1).attributes||{},s)===!1)return;s+=1,o=new gt}}o.length()>0&&t(o,{},s)}invert(t){let r=new gt;return this.reduce((n,o)=>{if(o.insert)r.delete(It.length(o));else{if(typeof o.retain=="number"&&(o.attributes===null||o.attributes===void 0))return r.retain(o.retain),n+o.retain;if(o.delete||typeof o.retain=="number"){let s=o.delete||o.retain;return t.slice(n,n+s).forEach(c=>{o.delete?r.push(c):o.retain&&o.attributes&&r.retain(It.length(c),pr.invert(o.attributes,c.attributes))}),n+s}else if(typeof o.retain=="object"&&o.retain!==null){let s=t.slice(n,n+1),i=new dt(s.ops).next(),[c,a,l]=ed(o.retain,i.insert),u=gt.getHandler(c);return r.retain({[c]:u.invert(a,l)},pr.invert(o.attributes,i.attributes)),n+1}}return n},0),r.chop()}transform(t,r=!1){if(r=!!r,typeof t=="number")return this.transformPosition(t,r);let n=t,o=new dt(this.ops),s=new dt(n.ops),i=new gt;for(;o.hasNext()||s.hasNext();)if(o.peekType()==="insert"&&(r||s.peekType()!=="insert"))i.retain(It.length(o.next()));else if(s.peekType()==="insert")i.push(s.next());else{let c=Math.min(o.peekLength(),s.peekLength()),a=o.next(c),l=s.next(c);if(a.delete)continue;if(l.delete)i.push(l);else{let u=a.retain,f=l.retain,d=typeof f=="object"&&f!==null?f:c;if(typeof u=="object"&&u!==null&&typeof f=="object"&&f!==null){let p=Object.keys(u)[0];if(p===Object.keys(f)[0]){let h=gt.getHandler(p);h&&(d={[p]:h.transform(u[p],f[p],r)})}}i.retain(d,pr.transform(a.attributes,l.attributes,r))}}return i.chop()}transformPosition(t,r=!1){r=!!r;let n=new dt(this.ops),o=0;for(;n.hasNext()&&o<=t;){let s=n.peekLength(),i=n.peekType();if(n.next(),i==="delete"){t-=Math.min(s,t-o);continue}else i==="insert"&&(o<t||!r)&&(t+=s);o+=s}return t}diffWithCursor(t,r){if(this.ops===t.ops)return new gt;let n=this.deltasToStrings(t);if(Math.max(...n.map(f=>f.length))>YE){let f=ea(Xc(n[0],n[1])),d=new dt(this.ops),p=new dt(t.ops);return this.convertChangesToDelta(f,d,p).chop()}else if(r===null)return this.diff(t);let s=ea(As(n[0],n[1])),i=0,c=[];for(let f=0;f<s.length;f++){let d=s[f],p=i,h=i+(d.count??0),g=r>p&&r<=h,w=!d.added&&!d.removed,y=d.removed&&!d.added,m=s[f+1],b=m&&m.added&&!m.removed;if(w&&g&&b){let E=this.tryMoveInsertionToCursor(d,m,r,p);if(E){c.push(...E),f++,i=h;continue}}if(y){let E=this.tryMoveDeletionToCursor(d,c,r,i);if(E){c.pop(),c.push(...E),i+=d.count??0;continue}}c.push(d),d.added||(i+=d.count??0)}s=c;let a=new dt(this.ops),l=new dt(t.ops);return this.convertChangesToDelta(s,a,l).chop()}tryMoveInsertionToCursor(t,r,n,o){let s=r.value,i=s.length,c=n-o-i;if(!(t.value.substring(c,c+s.length)===s))return null;let u=t.value.substring(0,c),f=t.value.substring(c),d=[];return u.length>0&&d.push({value:u,count:u.length,added:!1,removed:!1}),d.push(r),f.length>0&&d.push({value:f,count:f.length,added:!1,removed:!1}),d}tryMoveDeletionToCursor(t,r,n,o){let s=r[r.length-1];if(!s||s.added||s.removed)return null;let i=o-(s.count??0),c=o;if(n<i||n>=c)return null;let a=t.value,l=n-i;if(!(s.value.substring(l,l+a.length)===a))return null;let d=s.value.substring(0,l),p=s.value.substring(l),h=t.count??0,g=p.substring(h),w=[];return d.length>0&&w.push({value:d,count:d.length,added:!1,removed:!1}),w.push(t),g.length>0&&w.push({value:g,count:g.length,added:!1,removed:!1}),w}deltasToStrings(t){return[this,t].map(r=>r.map(n=>{if(n.insert!==null||n.insert!==void 0)return typeof n.insert=="string"?n.insert:$E;let o=r===t?"on":"with";throw new Error("diff() called "+o+" non-document")}).join(""))}convertChangesToDelta(t,r,n){let o=new gt;return t.forEach(s=>{let i=s.count??0;for(;i>0;){let c=0;if(s.added)c=Math.min(n.peekLength(),i),o.push(n.next(c));else if(s.removed)c=Math.min(i,r.peekLength()),r.next(c),o.delete(c);else{c=Math.min(r.peekLength(),n.peekLength(),i);let a=r.next(c),l=n.next(c);(0,ks.default)(a.insert,l.insert)?o.retain(c,pr.diff(a.attributes,l.attr
(window.wp ||= {}).coreData = wp.coreData;
})();