diff --git a/ios/Sources/GutenbergKit/Gutenberg/assets/index-B5TqVEgG.js b/ios/Sources/GutenbergKit/Gutenberg/assets/index-BMmsRBi8.js similarity index 81% rename from ios/Sources/GutenbergKit/Gutenberg/assets/index-B5TqVEgG.js rename to ios/Sources/GutenbergKit/Gutenberg/assets/index-BMmsRBi8.js index 5926c275..2dc5bc15 100644 --- a/ios/Sources/GutenbergKit/Gutenberg/assets/index-B5TqVEgG.js +++ b/ios/Sources/GutenbergKit/Gutenberg/assets/index-BMmsRBi8.js @@ -1,4 +1,4 @@ -var eke=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pmn=eke((mgn,k4)=>{function tke(e,t){for(var n=0;no[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var p1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function y5(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var uS={exports:{}},Og={},dS={exports:{}},Vn={};/** +var J_e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Bmn=J_e((bgn,_4)=>{function eke(e,t){for(var n=0;no[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var p1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O5(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var lS={exports:{}},Og={},uS={exports:{}},Vn={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var eke=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pmn=eke((mgn * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var GV;function nke(){if(GV)return Vn;GV=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator;function f(V){return V===null||typeof V!="object"?null:(V=p&&V[p]||V["@@iterator"],typeof V=="function"?V:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function z(V,ee,te){this.props=V,this.context=ee,this.refs=g,this.updater=te||b}z.prototype.isReactComponent={},z.prototype.setState=function(V,ee){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,ee,"setState")},z.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function A(){}A.prototype=z.prototype;function _(V,ee,te){this.props=V,this.context=ee,this.refs=g,this.updater=te||b}var v=_.prototype=new A;v.constructor=_,h(v,z.prototype),v.isPureReactComponent=!0;var M=Array.isArray,y=Object.prototype.hasOwnProperty,k={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function C(V,ee,te){var J,ue={},ce=null,me=null;if(ee!=null)for(J in ee.ref!==void 0&&(me=ee.ref),ee.key!==void 0&&(ce=""+ee.key),ee)y.call(ee,J)&&!S.hasOwnProperty(J)&&(ue[J]=ee[J]);var de=arguments.length-2;if(de===1)ue.children=te;else if(1()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pmn=eke((mgn * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var YV;function oke(){if(YV)return Og;YV=1;var e=i3(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(c,l,u){var d,p={},f=null,b=null;u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(b=l.ref);for(d in l)o.call(l,d)&&!s.hasOwnProperty(d)&&(p[d]=l[d]);if(c&&c.defaultProps)for(d in l=c.defaultProps,l)p[d]===void 0&&(p[d]=l[d]);return{$$typeof:t,type:c,key:f,ref:b,props:p,_owner:r.current}}return Og.Fragment=n,Og.jsx=i,Og.jsxs=i,Og}var ZV;function rke(){return ZV||(ZV=1,uS.exports=oke()),uS.exports}var a=rke(),x=i3();const Bo=Zr(x),hE=tke({__proto__:null,default:Bo},[x]);let ca,Xa,ad,Gu;const Ere=/<(\/)?(\w+)\s*(\/)?>/g;function pS(e,t,n,o,r){return{element:e,tokenStart:t,tokenLength:n,prevOffset:o,leadingTextStart:r,children:[]}}const cr=(e,t)=>{if(ca=e,Xa=0,ad=[],Gu=[],Ere.lastIndex=0,!ske(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while(ike(t));return x.createElement(x.Fragment,null,...ad)},ske=e=>{const t=typeof e=="object",n=t&&Object.values(e);return t&&n.length&&n.every(o=>x.isValidElement(o))};function ike(e){const t=ake(),[n,o,r,s]=t,i=Gu.length,c=r>Xa?Xa:null;if(!e[o])return fS(),!1;switch(n){case"no-more-tokens":if(i!==0){const{leadingTextStart:p,tokenStart:f}=Gu.pop();ad.push(ca.substr(p,f))}return fS(),!1;case"self-closed":return i===0?(c!==null&&ad.push(ca.substr(c,r-c)),ad.push(e[o]),Xa=r+s,!0):(QV(pS(e[o],r,s)),Xa=r+s,!0);case"opener":return Gu.push(pS(e[o],r,s,r+s,c)),Xa=r+s,!0;case"closer":if(i===1)return cke(r),Xa=r+s,!0;const l=Gu.pop(),u=ca.substr(l.prevOffset,r-l.prevOffset);l.children.push(u),l.prevOffset=r+s;const d=pS(l.element,l.tokenStart,l.tokenLength,r+s);return d.children=l.children,QV(d),Xa=r+s,!0;default:return fS(),!1}}function ake(){const e=Ere.exec(ca);if(e===null)return["no-more-tokens"];const t=e.index,[n,o,r,s]=e,i=n.length;return s?["self-closed",r,t,i]:o?["closer",r,t,i]:["opener",r,t,i]}function fS(){const e=ca.length-Xa;e!==0&&ad.push(ca.substr(Xa,e))}function QV(e){const{element:t,tokenStart:n,tokenLength:o,prevOffset:r,children:s}=e,i=Gu[Gu.length-1],c=ca.substr(i.prevOffset,n-i.prevOffset);c&&i.children.push(c),i.children.push(x.cloneElement(t,null,...s)),i.prevOffset=r||n+o}function cke(e){const{element:t,leadingTextStart:n,prevOffset:o,tokenStart:r,children:s}=Gu.pop(),i=e?ca.substr(o,e-o):ca.substr(o);i&&s.push(i),n!==null&&ad.push(ca.substr(n,r-n)),ad.push(x.cloneElement(t,null,...s))}var bS={exports:{}},es={},hS={exports:{}},mS={};/** + */var YV;function nke(){if(YV)return Og;YV=1;var e=i3(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(c,l,u){var d,p={},f=null,b=null;u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(b=l.ref);for(d in l)o.call(l,d)&&!s.hasOwnProperty(d)&&(p[d]=l[d]);if(c&&c.defaultProps)for(d in l=c.defaultProps,l)p[d]===void 0&&(p[d]=l[d]);return{$$typeof:t,type:c,key:f,ref:b,props:p,_owner:r.current}}return Og.Fragment=n,Og.jsx=i,Og.jsxs=i,Og}var ZV;function oke(){return ZV||(ZV=1,lS.exports=nke()),lS.exports}var a=oke(),x=i3();const Bo=Zr(x),bE=eke({__proto__:null,default:Bo},[x]);let aa,Xa,ad,Gu;const Ere=/<(\/)?(\w+)\s*(\/)?>/g;function dS(e,t,n,o,r){return{element:e,tokenStart:t,tokenLength:n,prevOffset:o,leadingTextStart:r,children:[]}}const cr=(e,t)=>{if(aa=e,Xa=0,ad=[],Gu=[],Ere.lastIndex=0,!rke(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while(ske(t));return x.createElement(x.Fragment,null,...ad)},rke=e=>{const t=typeof e=="object",n=t&&Object.values(e);return t&&n.length&&n.every(o=>x.isValidElement(o))};function ske(e){const t=ike(),[n,o,r,s]=t,i=Gu.length,c=r>Xa?Xa:null;if(!e[o])return pS(),!1;switch(n){case"no-more-tokens":if(i!==0){const{leadingTextStart:p,tokenStart:f}=Gu.pop();ad.push(aa.substr(p,f))}return pS(),!1;case"self-closed":return i===0?(c!==null&&ad.push(aa.substr(c,r-c)),ad.push(e[o]),Xa=r+s,!0):(QV(dS(e[o],r,s)),Xa=r+s,!0);case"opener":return Gu.push(dS(e[o],r,s,r+s,c)),Xa=r+s,!0;case"closer":if(i===1)return ake(r),Xa=r+s,!0;const l=Gu.pop(),u=aa.substr(l.prevOffset,r-l.prevOffset);l.children.push(u),l.prevOffset=r+s;const d=dS(l.element,l.tokenStart,l.tokenLength,r+s);return d.children=l.children,QV(d),Xa=r+s,!0;default:return pS(),!1}}function ike(){const e=Ere.exec(aa);if(e===null)return["no-more-tokens"];const t=e.index,[n,o,r,s]=e,i=n.length;return s?["self-closed",r,t,i]:o?["closer",r,t,i]:["opener",r,t,i]}function pS(){const e=aa.length-Xa;e!==0&&ad.push(aa.substr(Xa,e))}function QV(e){const{element:t,tokenStart:n,tokenLength:o,prevOffset:r,children:s}=e,i=Gu[Gu.length-1],c=aa.substr(i.prevOffset,n-i.prevOffset);c&&i.children.push(c),i.children.push(x.cloneElement(t,null,...s)),i.prevOffset=r||n+o}function ake(e){const{element:t,leadingTextStart:n,prevOffset:o,tokenStart:r,children:s}=Gu.pop(),i=e?aa.substr(o,e-o):aa.substr(o);i&&s.push(i),n!==null&&ad.push(aa.substr(n,r-n)),ad.push(x.cloneElement(t,null,...s))}var fS={exports:{}},es={},bS={exports:{}},hS={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var eke=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pmn=eke((mgn * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var JV;function lke(){return JV||(JV=1,function(e){function t(F,X){var Z=F.length;F.push(X);e:for(;0>>1,ee=F[V];if(0>>1;Vr(ue,Z))cer(me,ue)?(F[V]=me,F[ce]=Z,V=ce):(F[V]=ue,F[J]=Z,V=J);else if(cer(me,Z))F[V]=me,F[ce]=Z,V=ce;else break e}}return X}function r(F,X){var Z=F.sortIndex-X.sortIndex;return Z!==0?Z:F.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var l=[],u=[],d=1,p=null,f=3,b=!1,h=!1,g=!1,z=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(F){for(var X=n(u);X!==null;){if(X.callback===null)o(u);else if(X.startTime<=F)o(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(F){if(g=!1,v(F),!h)if(n(l)!==null)h=!0,P(y);else{var X=n(u);X!==null&&$(M,X.startTime-F)}}function y(F,X){h=!1,g&&(g=!1,A(C),C=-1),b=!0;var Z=f;try{for(v(X),p=n(l);p!==null&&(!(p.expirationTime>X)||F&&!E());){var V=p.callback;if(typeof V=="function"){p.callback=null,f=p.priorityLevel;var ee=V(p.expirationTime<=X);X=e.unstable_now(),typeof ee=="function"?p.callback=ee:p===n(l)&&o(l),v(X)}else o(l);p=n(l)}if(p!==null)var te=!0;else{var J=n(u);J!==null&&$(M,J.startTime-X),te=!1}return te}finally{p=null,f=Z,b=!1}}var k=!1,S=null,C=-1,R=5,T=-1;function E(){return!(e.unstable_now()-TF||125V?(F.sortIndex=Z,t(u,F),n(l)===null&&F===n(u)&&(g?(A(C),C=-1):g=!0,$(M,Z-V))):(F.sortIndex=ee,t(l,F),h||b||(h=!0,P(y))),F},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(F){var X=f;return function(){var Z=f;f=X;try{return F.apply(this,arguments)}finally{f=Z}}}}(mS)),mS}var eH;function uke(){return eH||(eH=1,hS.exports=lke()),hS.exports}/** + */var JV;function cke(){return JV||(JV=1,function(e){function t(F,X){var Z=F.length;F.push(X);e:for(;0>>1,ee=F[V];if(0>>1;Vr(ue,Z))cer(me,ue)?(F[V]=me,F[ce]=Z,V=ce):(F[V]=ue,F[J]=Z,V=J);else if(cer(me,Z))F[V]=me,F[ce]=Z,V=ce;else break e}}return X}function r(F,X){var Z=F.sortIndex-X.sortIndex;return Z!==0?Z:F.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var l=[],u=[],d=1,p=null,f=3,b=!1,h=!1,g=!1,z=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(F){for(var X=n(u);X!==null;){if(X.callback===null)o(u);else if(X.startTime<=F)o(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(F){if(g=!1,v(F),!h)if(n(l)!==null)h=!0,P(y);else{var X=n(u);X!==null&&$(M,X.startTime-F)}}function y(F,X){h=!1,g&&(g=!1,A(C),C=-1),b=!0;var Z=f;try{for(v(X),p=n(l);p!==null&&(!(p.expirationTime>X)||F&&!E());){var V=p.callback;if(typeof V=="function"){p.callback=null,f=p.priorityLevel;var ee=V(p.expirationTime<=X);X=e.unstable_now(),typeof ee=="function"?p.callback=ee:p===n(l)&&o(l),v(X)}else o(l);p=n(l)}if(p!==null)var te=!0;else{var J=n(u);J!==null&&$(M,J.startTime-X),te=!1}return te}finally{p=null,f=Z,b=!1}}var k=!1,S=null,C=-1,R=5,T=-1;function E(){return!(e.unstable_now()-TF||125V?(F.sortIndex=Z,t(u,F),n(l)===null&&F===n(u)&&(g?(A(C),C=-1):g=!0,$(M,Z-V))):(F.sortIndex=ee,t(l,F),h||b||(h=!0,P(y))),F},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(F){var X=f;return function(){var Z=f;f=X;try{return F.apply(this,arguments)}finally{f=Z}}}}(hS)),hS}var eH;function lke(){return eH||(eH=1,bS.exports=cke()),bS.exports}/** * @license React * react-dom.production.min.js * @@ -30,42 +30,42 @@ var eke=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pmn=eke((mgn * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var tH;function dke(){if(tH)return es;tH=1;var e=i3(),t=uke();function n(O){for(var w="https://reactjs.org/docs/error-decoder.html?invariant="+O,q=1;q"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},p={};function f(O){return l.call(p,O)?!0:l.call(d,O)?!1:u.test(O)?p[O]=!0:(d[O]=!0,!1)}function b(O,w,q,W){if(q!==null&&q.type===0)return!1;switch(typeof w){case"function":case"symbol":return!0;case"boolean":return W?!1:q!==null?!q.acceptsBooleans:(O=O.toLowerCase().slice(0,5),O!=="data-"&&O!=="aria-");default:return!1}}function h(O,w,q,W){if(w===null||typeof w>"u"||b(O,w,q,W))return!0;if(W)return!1;if(q!==null)switch(q.type){case 3:return!w;case 4:return w===!1;case 5:return isNaN(w);case 6:return isNaN(w)||1>w}return!1}function g(O,w,q,W,D,K,le){this.acceptsBooleans=w===2||w===3||w===4,this.attributeName=W,this.attributeNamespace=D,this.mustUseProperty=q,this.propertyName=O,this.type=w,this.sanitizeURL=K,this.removeEmptyString=le}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(O){z[O]=new g(O,0,!1,O,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(O){var w=O[0];z[w]=new g(w,1,!1,O[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(O){z[O]=new g(O,2,!1,O.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(O){z[O]=new g(O,2,!1,O,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(O){z[O]=new g(O,3,!1,O.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(O){z[O]=new g(O,3,!0,O,null,!1,!1)}),["capture","download"].forEach(function(O){z[O]=new g(O,4,!1,O,null,!1,!1)}),["cols","rows","size","span"].forEach(function(O){z[O]=new g(O,6,!1,O,null,!1,!1)}),["rowSpan","start"].forEach(function(O){z[O]=new g(O,5,!1,O.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function _(O){return O[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(O){var w=O.replace(A,_);z[w]=new g(w,1,!1,O,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(O){var w=O.replace(A,_);z[w]=new g(w,1,!1,O,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(O){var w=O.replace(A,_);z[w]=new g(w,1,!1,O,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(O){z[O]=new g(O,1,!1,O.toLowerCase(),null,!1,!1)}),z.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(O){z[O]=new g(O,1,!1,O.toLowerCase(),null,!0,!0)});function v(O,w,q,W){var D=z.hasOwnProperty(w)?z[w]:null;(D!==null?D.type!==0:W||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},p={};function f(O){return l.call(p,O)?!0:l.call(d,O)?!1:u.test(O)?p[O]=!0:(d[O]=!0,!1)}function b(O,w,q,W){if(q!==null&&q.type===0)return!1;switch(typeof w){case"function":case"symbol":return!0;case"boolean":return W?!1:q!==null?!q.acceptsBooleans:(O=O.toLowerCase().slice(0,5),O!=="data-"&&O!=="aria-");default:return!1}}function h(O,w,q,W){if(w===null||typeof w>"u"||b(O,w,q,W))return!0;if(W)return!1;if(q!==null)switch(q.type){case 3:return!w;case 4:return w===!1;case 5:return isNaN(w);case 6:return isNaN(w)||1>w}return!1}function g(O,w,q,W,D,K,le){this.acceptsBooleans=w===2||w===3||w===4,this.attributeName=W,this.attributeNamespace=D,this.mustUseProperty=q,this.propertyName=O,this.type=w,this.sanitizeURL=K,this.removeEmptyString=le}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(O){z[O]=new g(O,0,!1,O,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(O){var w=O[0];z[w]=new g(w,1,!1,O[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(O){z[O]=new g(O,2,!1,O.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(O){z[O]=new g(O,2,!1,O,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(O){z[O]=new g(O,3,!1,O.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(O){z[O]=new g(O,3,!0,O,null,!1,!1)}),["capture","download"].forEach(function(O){z[O]=new g(O,4,!1,O,null,!1,!1)}),["cols","rows","size","span"].forEach(function(O){z[O]=new g(O,6,!1,O,null,!1,!1)}),["rowSpan","start"].forEach(function(O){z[O]=new g(O,5,!1,O.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function _(O){return O[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(O){var w=O.replace(A,_);z[w]=new g(w,1,!1,O,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(O){var w=O.replace(A,_);z[w]=new g(w,1,!1,O,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(O){var w=O.replace(A,_);z[w]=new g(w,1,!1,O,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(O){z[O]=new g(O,1,!1,O.toLowerCase(),null,!1,!1)}),z.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(O){z[O]=new g(O,1,!1,O.toLowerCase(),null,!0,!0)});function v(O,w,q,W){var D=z.hasOwnProperty(w)?z[w]:null;(D!==null?D.type!==0:W||!(2Te||D[le]!==K[Te]){var Le=` -`+D[le].replace(" at new "," at ");return O.displayName&&Le.includes("")&&(Le=Le.replace("",O.displayName)),Le}while(1<=le&&0<=Te);break}}}finally{te=!1,Error.prepareStackTrace=q}return(O=O?O.displayName||O.name:"")?ee(O):""}function ue(O){switch(O.tag){case 5:return ee(O.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return O=J(O.type,!1),O;case 11:return O=J(O.type.render,!1),O;case 1:return O=J(O.type,!0),O;default:return""}}function ce(O){if(O==null)return null;if(typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case S:return"Fragment";case k:return"Portal";case R:return"Profiler";case C:return"StrictMode";case N:return"Suspense";case j:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case E:return(O.displayName||"Context")+".Consumer";case T:return(O._context.displayName||"Context")+".Provider";case B:var w=O.render;return O=O.displayName,O||(O=w.displayName||w.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case I:return w=O.displayName||null,w!==null?w:ce(O.type)||"Memo";case P:w=O._payload,O=O._init;try{return ce(O(w))}catch{}}return null}function me(O){var w=O.type;switch(O.tag){case 24:return"Cache";case 9:return(w.displayName||"Context")+".Consumer";case 10:return(w._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return O=w.render,O=O.displayName||O.name||"",w.displayName||(O!==""?"ForwardRef("+O+")":"ForwardRef");case 7:return"Fragment";case 5:return w;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(w);case 8:return w===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w}return null}function de(O){switch(typeof O){case"boolean":case"number":case"string":case"undefined":return O;case"object":return O;default:return""}}function Ae(O){var w=O.type;return(O=O.nodeName)&&O.toLowerCase()==="input"&&(w==="checkbox"||w==="radio")}function ye(O){var w=Ae(O)?"checked":"value",q=Object.getOwnPropertyDescriptor(O.constructor.prototype,w),W=""+O[w];if(!O.hasOwnProperty(w)&&typeof q<"u"&&typeof q.get=="function"&&typeof q.set=="function"){var D=q.get,K=q.set;return Object.defineProperty(O,w,{configurable:!0,get:function(){return D.call(this)},set:function(le){W=""+le,K.call(this,le)}}),Object.defineProperty(O,w,{enumerable:q.enumerable}),{getValue:function(){return W},setValue:function(le){W=""+le},stopTracking:function(){O._valueTracker=null,delete O[w]}}}}function Ne(O){O._valueTracker||(O._valueTracker=ye(O))}function je(O){if(!O)return!1;var w=O._valueTracker;if(!w)return!0;var q=w.getValue(),W="";return O&&(W=Ae(O)?O.checked?"true":"false":O.value),O=W,O!==q?(w.setValue(O),!0):!1}function ie(O){if(O=O||(typeof document<"u"?document:void 0),typeof O>"u")return null;try{return O.activeElement||O.body}catch{return O.body}}function we(O,w){var q=w.checked;return Z({},w,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:q??O._wrapperState.initialChecked})}function re(O,w){var q=w.defaultValue==null?"":w.defaultValue,W=w.checked!=null?w.checked:w.defaultChecked;q=de(w.value!=null?w.value:q),O._wrapperState={initialChecked:W,initialValue:q,controlled:w.type==="checkbox"||w.type==="radio"?w.checked!=null:w.value!=null}}function pe(O,w){w=w.checked,w!=null&&v(O,"checked",w,!1)}function ke(O,w){pe(O,w);var q=de(w.value),W=w.type;if(q!=null)W==="number"?(q===0&&O.value===""||O.value!=q)&&(O.value=""+q):O.value!==""+q&&(O.value=""+q);else if(W==="submit"||W==="reset"){O.removeAttribute("value");return}w.hasOwnProperty("value")?se(O,w.type,q):w.hasOwnProperty("defaultValue")&&se(O,w.type,de(w.defaultValue)),w.checked==null&&w.defaultChecked!=null&&(O.defaultChecked=!!w.defaultChecked)}function Se(O,w,q){if(w.hasOwnProperty("value")||w.hasOwnProperty("defaultValue")){var W=w.type;if(!(W!=="submit"&&W!=="reset"||w.value!==void 0&&w.value!==null))return;w=""+O._wrapperState.initialValue,q||w===O.value||(O.value=w),O.defaultValue=w}q=O.name,q!==""&&(O.name=""),O.defaultChecked=!!O._wrapperState.initialChecked,q!==""&&(O.name=q)}function se(O,w,q){(w!=="number"||ie(O.ownerDocument)!==O)&&(q==null?O.defaultValue=""+O._wrapperState.initialValue:O.defaultValue!==""+q&&(O.defaultValue=""+q))}var L=Array.isArray;function U(O,w,q,W){if(O=O.options,w){w={};for(var D=0;D"+w.valueOf().toString()+"",w=wt.firstChild;O.firstChild;)O.removeChild(O.firstChild);for(;w.firstChild;)O.appendChild(w.firstChild)}});function ae(O,w){if(w){var q=O.firstChild;if(q&&q===O.lastChild&&q.nodeType===3){q.nodeValue=w;return}}O.textContent=w}var H={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Y=["Webkit","ms","Moz","O"];Object.keys(H).forEach(function(O){Y.forEach(function(w){w=w+O.charAt(0).toUpperCase()+O.substring(1),H[w]=H[O]})});function fe(O,w,q){return w==null||typeof w=="boolean"||w===""?"":q||typeof w!="number"||w===0||H.hasOwnProperty(O)&&H[O]?(""+w).trim():w+"px"}function Re(O,w){O=O.style;for(var q in w)if(w.hasOwnProperty(q)){var W=q.indexOf("--")===0,D=fe(q,w[q],W);q==="float"&&(q="cssFloat"),W?O.setProperty(q,D):O[q]=D}}var be=Z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ze(O,w){if(w){if(be[O]&&(w.children!=null||w.dangerouslySetInnerHTML!=null))throw Error(n(137,O));if(w.dangerouslySetInnerHTML!=null){if(w.children!=null)throw Error(n(60));if(typeof w.dangerouslySetInnerHTML!="object"||!("__html"in w.dangerouslySetInnerHTML))throw Error(n(61))}if(w.style!=null&&typeof w.style!="object")throw Error(n(62))}}function nt(O,w){if(O.indexOf("-")===-1)return typeof w.is=="string";switch(O){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mt=null;function ot(O){return O=O.target||O.srcElement||window,O.correspondingUseElement&&(O=O.correspondingUseElement),O.nodeType===3?O.parentNode:O}var Ue=null,yt=null,fn=null;function Pn(O){if(O=sg(O)){if(typeof Ue!="function")throw Error(n(280));var w=O.stateNode;w&&(w=gy(w),Ue(O.stateNode,O.type,w))}}function Mo(O){yt?fn?fn.push(O):fn=[O]:yt=O}function rr(){if(yt){var O=yt,w=fn;if(fn=yt=null,Pn(O),w)for(O=0;O>>=0,O===0?32:31-(mp(O)/gp|0)|0}var Mp=64,Fc=4194304;function Ea(O){switch(O&-O){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return O&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return O&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return O}}function Dm(O,w){var q=O.pendingLanes;if(q===0)return 0;var W=0,D=O.suspendedLanes,K=O.pingedLanes,le=q&268435455;if(le!==0){var Te=le&~D;Te!==0?W=Ea(Te):(K&=le,K!==0&&(W=Ea(K)))}else le=q&~D,le!==0?W=Ea(le):K!==0&&(W=Ea(K));if(W===0)return 0;if(w!==0&&w!==W&&!(w&D)&&(D=W&-W,K=w&-w,D>=K||D===16&&(K&4194240)!==0))return w;if(W&4&&(W|=q&16),w=O.entangledLanes,w!==0)for(O=O.entanglements,w&=W;0q;q++)w.push(O);return w}function Fm(O,w,q){O.pendingLanes|=w,w!==536870912&&(O.suspendedLanes=0,O.pingedLanes=0),O=O.eventTimes,w=31-I0(w),O[w]=q}function ywe(O,w){var q=O.pendingLanes&~w;O.pendingLanes=w,O.suspendedLanes=0,O.pingedLanes=0,O.expiredLanes&=w,O.mutableReadLanes&=w,O.entangledLanes&=w,w=O.entanglements;var W=O.eventTimes;for(O=O.expirationTimes;0=Ym),DF=" ",FF=!1;function $F(O,w){switch(O){case"keyup":return Kwe.indexOf(w.keyCode)!==-1;case"keydown":return w.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VF(O){return O=O.detail,typeof O=="object"&&"data"in O?O.data:null}var yb=!1;function Zwe(O,w){switch(O){case"compositionend":return VF(w);case"keypress":return w.which!==32?null:(FF=!0,DF);case"textInput":return O=w.data,O===DF&&FF?null:O;default:return null}}function Qwe(O,w){if(yb)return O==="compositionend"||!Vk&&$F(O,w)?(O=NF(),iy=Pk=bu=null,yb=!1,O):null;switch(O){case"paste":return null;case"keypress":if(!(w.ctrlKey||w.altKey||w.metaKey)||w.ctrlKey&&w.altKey){if(w.char&&1=w)return{node:q,offset:w-O};O=W}e:{for(;q;){if(q.nextSibling){q=q.nextSibling;break e}q=q.parentNode}q=void 0}q=ZF(q)}}function JF(O,w){return O&&w?O===w?!0:O&&O.nodeType===3?!1:w&&w.nodeType===3?JF(O,w.parentNode):"contains"in O?O.contains(w):O.compareDocumentPosition?!!(O.compareDocumentPosition(w)&16):!1:!1}function e$(){for(var O=window,w=ie();w instanceof O.HTMLIFrameElement;){try{var q=typeof w.contentWindow.location.href=="string"}catch{q=!1}if(q)O=w.contentWindow;else break;w=ie(O.document)}return w}function Xk(O){var w=O&&O.nodeName&&O.nodeName.toLowerCase();return w&&(w==="input"&&(O.type==="text"||O.type==="search"||O.type==="tel"||O.type==="url"||O.type==="password")||w==="textarea"||O.contentEditable==="true")}function a_e(O){var w=e$(),q=O.focusedElem,W=O.selectionRange;if(w!==q&&q&&q.ownerDocument&&JF(q.ownerDocument.documentElement,q)){if(W!==null&&Xk(q)){if(w=W.start,O=W.end,O===void 0&&(O=w),"selectionStart"in q)q.selectionStart=w,q.selectionEnd=Math.min(O,q.value.length);else if(O=(w=q.ownerDocument||document)&&w.defaultView||window,O.getSelection){O=O.getSelection();var D=q.textContent.length,K=Math.min(W.start,D);W=W.end===void 0?K:Math.min(W.end,D),!O.extend&&K>W&&(D=W,W=K,K=D),D=QF(q,K);var le=QF(q,W);D&&le&&(O.rangeCount!==1||O.anchorNode!==D.node||O.anchorOffset!==D.offset||O.focusNode!==le.node||O.focusOffset!==le.offset)&&(w=w.createRange(),w.setStart(D.node,D.offset),O.removeAllRanges(),K>W?(O.addRange(w),O.extend(le.node,le.offset)):(w.setEnd(le.node,le.offset),O.addRange(w)))}}for(w=[],O=q;O=O.parentNode;)O.nodeType===1&&w.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q=document.documentMode,Ab=null,Gk=null,eg=null,Kk=!1;function t$(O,w,q){var W=q.window===q?q.document:q.nodeType===9?q:q.ownerDocument;Kk||Ab==null||Ab!==ie(W)||(W=Ab,"selectionStart"in W&&Xk(W)?W={start:W.selectionStart,end:W.selectionEnd}:(W=(W.ownerDocument&&W.ownerDocument.defaultView||window).getSelection(),W={anchorNode:W.anchorNode,anchorOffset:W.anchorOffset,focusNode:W.focusNode,focusOffset:W.focusOffset}),eg&&Jm(eg,W)||(eg=W,W=by(Gk,"onSelect"),0kb||(O.current=a6[kb],a6[kb]=null,kb--)}function er(O,w){kb++,a6[kb]=O.current,O.current=w}var Mu={},r1=gu(Mu),K1=gu(!1),Op=Mu;function Sb(O,w){var q=O.type.contextTypes;if(!q)return Mu;var W=O.stateNode;if(W&&W.__reactInternalMemoizedUnmaskedChildContext===w)return W.__reactInternalMemoizedMaskedChildContext;var D={},K;for(K in q)D[K]=w[K];return W&&(O=O.stateNode,O.__reactInternalMemoizedUnmaskedChildContext=w,O.__reactInternalMemoizedMaskedChildContext=D),D}function Y1(O){return O=O.childContextTypes,O!=null}function My(){ir(K1),ir(r1)}function m$(O,w,q){if(r1.current!==Mu)throw Error(n(168));er(r1,w),er(K1,q)}function g$(O,w,q){var W=O.stateNode;if(w=w.childContextTypes,typeof W.getChildContext!="function")return q;W=W.getChildContext();for(var D in W)if(!(D in w))throw Error(n(108,me(O)||"Unknown",D));return Z({},q,W)}function zy(O){return O=(O=O.stateNode)&&O.__reactInternalMemoizedMergedChildContext||Mu,Op=r1.current,er(r1,O),er(K1,K1.current),!0}function M$(O,w,q){var W=O.stateNode;if(!W)throw Error(n(169));q?(O=g$(O,w,Op),W.__reactInternalMemoizedMergedChildContext=O,ir(K1),ir(r1),er(r1,O)):ir(K1),er(K1,q)}var Vc=null,Oy=!1,c6=!1;function z$(O){Vc===null?Vc=[O]:Vc.push(O)}function z_e(O){Oy=!0,z$(O)}function zu(){if(!c6&&Vc!==null){c6=!0;var O=0,w=Eo;try{var q=Vc;for(Eo=1;O>=le,D-=le,Hc=1<<32-I0(w)+D|q<yn?(v0=ln,ln=null):v0=ln.sibling;var po=st(Fe,ln,Ve[yn],ft);if(po===null){ln===null&&(ln=v0);break}O&&ln&&po.alternate===null&&w(Fe,ln),De=K(po,De,yn),cn===null?Kt=po:cn.sibling=po,cn=po,ln=v0}if(yn===Ve.length)return q(Fe,ln),fr&&Ap(Fe,yn),Kt;if(ln===null){for(;ynyn?(v0=ln,ln=null):v0=ln.sibling;var Su=st(Fe,ln,po.value,ft);if(Su===null){ln===null&&(ln=v0);break}O&&ln&&Su.alternate===null&&w(Fe,ln),De=K(Su,De,yn),cn===null?Kt=Su:cn.sibling=Su,cn=Su,ln=v0}if(po.done)return q(Fe,ln),fr&&Ap(Fe,yn),Kt;if(ln===null){for(;!po.done;yn++,po=Ve.next())po=ut(Fe,po.value,ft),po!==null&&(De=K(po,De,yn),cn===null?Kt=po:cn.sibling=po,cn=po);return fr&&Ap(Fe,yn),Kt}for(ln=W(Fe,ln);!po.done;yn++,po=Ve.next())po=Wt(ln,Fe,yn,po.value,ft),po!==null&&(O&&po.alternate!==null&&ln.delete(po.key===null?yn:po.key),De=K(po,De,yn),cn===null?Kt=po:cn.sibling=po,cn=po);return O&&ln.forEach(function(J_e){return w(Fe,J_e)}),fr&&Ap(Fe,yn),Kt}function Vr(Fe,De,Ve,ft){if(typeof Ve=="object"&&Ve!==null&&Ve.type===S&&Ve.key===null&&(Ve=Ve.props.children),typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case y:e:{for(var Kt=Ve.key,cn=De;cn!==null;){if(cn.key===Kt){if(Kt=Ve.type,Kt===S){if(cn.tag===7){q(Fe,cn.sibling),De=D(cn,Ve.props.children),De.return=Fe,Fe=De;break e}}else if(cn.elementType===Kt||typeof Kt=="object"&&Kt!==null&&Kt.$$typeof===P&&w$(Kt)===cn.type){q(Fe,cn.sibling),De=D(cn,Ve.props),De.ref=ig(Fe,cn,Ve),De.return=Fe,Fe=De;break e}q(Fe,cn);break}else w(Fe,cn);cn=cn.sibling}Ve.type===S?(De=qp(Ve.props.children,Fe.mode,ft,Ve.key),De.return=Fe,Fe=De):(ft=Gy(Ve.type,Ve.key,Ve.props,null,Fe.mode,ft),ft.ref=ig(Fe,De,Ve),ft.return=Fe,Fe=ft)}return le(Fe);case k:e:{for(cn=Ve.key;De!==null;){if(De.key===cn)if(De.tag===4&&De.stateNode.containerInfo===Ve.containerInfo&&De.stateNode.implementation===Ve.implementation){q(Fe,De.sibling),De=D(De,Ve.children||[]),De.return=Fe,Fe=De;break e}else{q(Fe,De);break}else w(Fe,De);De=De.sibling}De=sS(Ve,Fe.mode,ft),De.return=Fe,Fe=De}return le(Fe);case P:return cn=Ve._init,Vr(Fe,De,cn(Ve._payload),ft)}if(L(Ve))return $t(Fe,De,Ve,ft);if(X(Ve))return Ut(Fe,De,Ve,ft);xy(Fe,Ve)}return typeof Ve=="string"&&Ve!==""||typeof Ve=="number"?(Ve=""+Ve,De!==null&&De.tag===6?(q(Fe,De.sibling),De=D(De,Ve),De.return=Fe,Fe=De):(q(Fe,De),De=rS(Ve,Fe.mode,ft),De.return=Fe,Fe=De),le(Fe)):q(Fe,De)}return Vr}var Tb=_$(!0),k$=_$(!1),wy=gu(null),_y=null,Eb=null,b6=null;function h6(){b6=Eb=_y=null}function m6(O){var w=wy.current;ir(wy),O._currentValue=w}function g6(O,w,q){for(;O!==null;){var W=O.alternate;if((O.childLanes&w)!==w?(O.childLanes|=w,W!==null&&(W.childLanes|=w)):W!==null&&(W.childLanes&w)!==w&&(W.childLanes|=w),O===q)break;O=O.return}}function Wb(O,w){_y=O,b6=Eb=null,O=O.dependencies,O!==null&&O.firstContext!==null&&(O.lanes&w&&(Z1=!0),O.firstContext=null)}function oi(O){var w=O._currentValue;if(b6!==O)if(O={context:O,memoizedValue:w,next:null},Eb===null){if(_y===null)throw Error(n(308));Eb=O,_y.dependencies={lanes:0,firstContext:O}}else Eb=Eb.next=O;return w}var vp=null;function M6(O){vp===null?vp=[O]:vp.push(O)}function S$(O,w,q,W){var D=w.interleaved;return D===null?(q.next=q,M6(w)):(q.next=D.next,D.next=q),w.interleaved=q,Xc(O,W)}function Xc(O,w){O.lanes|=w;var q=O.alternate;for(q!==null&&(q.lanes|=w),q=O,O=O.return;O!==null;)O.childLanes|=w,q=O.alternate,q!==null&&(q.childLanes|=w),q=O,O=O.return;return q.tag===3?q.stateNode:null}var Ou=!1;function z6(O){O.updateQueue={baseState:O.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function C$(O,w){O=O.updateQueue,w.updateQueue===O&&(w.updateQueue={baseState:O.baseState,firstBaseUpdate:O.firstBaseUpdate,lastBaseUpdate:O.lastBaseUpdate,shared:O.shared,effects:O.effects})}function Gc(O,w){return{eventTime:O,lane:w,tag:0,payload:null,callback:null,next:null}}function yu(O,w,q){var W=O.updateQueue;if(W===null)return null;if(W=W.shared,co&2){var D=W.pending;return D===null?w.next=w:(w.next=D.next,D.next=w),W.pending=w,Xc(O,q)}return D=W.interleaved,D===null?(w.next=w,M6(W)):(w.next=D.next,D.next=w),W.interleaved=w,Xc(O,q)}function ky(O,w,q){if(w=w.updateQueue,w!==null&&(w=w.shared,(q&4194240)!==0)){var W=w.lanes;W&=O.pendingLanes,q|=W,w.lanes=q,Ek(O,q)}}function q$(O,w){var q=O.updateQueue,W=O.alternate;if(W!==null&&(W=W.updateQueue,q===W)){var D=null,K=null;if(q=q.firstBaseUpdate,q!==null){do{var le={eventTime:q.eventTime,lane:q.lane,tag:q.tag,payload:q.payload,callback:q.callback,next:null};K===null?D=K=le:K=K.next=le,q=q.next}while(q!==null);K===null?D=K=w:K=K.next=w}else D=K=w;q={baseState:W.baseState,firstBaseUpdate:D,lastBaseUpdate:K,shared:W.shared,effects:W.effects},O.updateQueue=q;return}O=q.lastBaseUpdate,O===null?q.firstBaseUpdate=w:O.next=w,q.lastBaseUpdate=w}function Sy(O,w,q,W){var D=O.updateQueue;Ou=!1;var K=D.firstBaseUpdate,le=D.lastBaseUpdate,Te=D.shared.pending;if(Te!==null){D.shared.pending=null;var Le=Te,Ge=Le.next;Le.next=null,le===null?K=Ge:le.next=Ge,le=Le;var at=O.alternate;at!==null&&(at=at.updateQueue,Te=at.lastBaseUpdate,Te!==le&&(Te===null?at.firstBaseUpdate=Ge:Te.next=Ge,at.lastBaseUpdate=Le))}if(K!==null){var ut=D.baseState;le=0,at=Ge=Le=null,Te=K;do{var st=Te.lane,Wt=Te.eventTime;if((W&st)===st){at!==null&&(at=at.next={eventTime:Wt,lane:0,tag:Te.tag,payload:Te.payload,callback:Te.callback,next:null});e:{var $t=O,Ut=Te;switch(st=w,Wt=q,Ut.tag){case 1:if($t=Ut.payload,typeof $t=="function"){ut=$t.call(Wt,ut,st);break e}ut=$t;break e;case 3:$t.flags=$t.flags&-65537|128;case 0:if($t=Ut.payload,st=typeof $t=="function"?$t.call(Wt,ut,st):$t,st==null)break e;ut=Z({},ut,st);break e;case 2:Ou=!0}}Te.callback!==null&&Te.lane!==0&&(O.flags|=64,st=D.effects,st===null?D.effects=[Te]:st.push(Te))}else Wt={eventTime:Wt,lane:st,tag:Te.tag,payload:Te.payload,callback:Te.callback,next:null},at===null?(Ge=at=Wt,Le=ut):at=at.next=Wt,le|=st;if(Te=Te.next,Te===null){if(Te=D.shared.pending,Te===null)break;st=Te,Te=st.next,st.next=null,D.lastBaseUpdate=st,D.shared.pending=null}}while(!0);if(at===null&&(Le=ut),D.baseState=Le,D.firstBaseUpdate=Ge,D.lastBaseUpdate=at,w=D.shared.interleaved,w!==null){D=w;do le|=D.lane,D=D.next;while(D!==w)}else K===null&&(D.shared.lanes=0);_p|=le,O.lanes=le,O.memoizedState=ut}}function R$(O,w,q){if(O=w.effects,w.effects=null,O!==null)for(w=0;wq?q:4,O(!0);var W=x6.transition;x6.transition={};try{O(!1),w()}finally{Eo=q,x6.transition=W}}function Y$(){return ri().memoizedState}function v_e(O,w,q){var W=wu(O);if(q={lane:W,action:q,hasEagerState:!1,eagerState:null,next:null},Z$(O))Q$(w,q);else if(q=S$(O,w,q,W),q!==null){var D=W1();ea(q,O,W,D),J$(q,w,W)}}function x_e(O,w,q){var W=wu(O),D={lane:W,action:q,hasEagerState:!1,eagerState:null,next:null};if(Z$(O))Q$(w,D);else{var K=O.alternate;if(O.lanes===0&&(K===null||K.lanes===0)&&(K=w.lastRenderedReducer,K!==null))try{var le=w.lastRenderedState,Te=K(le,q);if(D.hasEagerState=!0,D.eagerState=Te,Ki(Te,le)){var Le=w.interleaved;Le===null?(D.next=D,M6(w)):(D.next=Le.next,Le.next=D),w.interleaved=D;return}}catch{}finally{}q=S$(O,w,D,W),q!==null&&(D=W1(),ea(q,O,W,D),J$(q,w,W))}}function Z$(O){var w=O.alternate;return O===wr||w!==null&&w===wr}function Q$(O,w){ug=Ry=!0;var q=O.pending;q===null?w.next=w:(w.next=q.next,q.next=w),O.pending=w}function J$(O,w,q){if(q&4194240){var W=w.lanes;W&=O.pendingLanes,q|=W,w.lanes=q,Ek(O,q)}}var Wy={readContext:oi,useCallback:s1,useContext:s1,useEffect:s1,useImperativeHandle:s1,useInsertionEffect:s1,useLayoutEffect:s1,useMemo:s1,useReducer:s1,useRef:s1,useState:s1,useDebugValue:s1,useDeferredValue:s1,useTransition:s1,useMutableSource:s1,useSyncExternalStore:s1,useId:s1,unstable_isNewReconciler:!1},w_e={readContext:oi,useCallback:function(O,w){return Ba().memoizedState=[O,w===void 0?null:w],O},useContext:oi,useEffect:F$,useImperativeHandle:function(O,w,q){return q=q!=null?q.concat([O]):null,Ty(4194308,4,H$.bind(null,w,O),q)},useLayoutEffect:function(O,w){return Ty(4194308,4,O,w)},useInsertionEffect:function(O,w){return Ty(4,2,O,w)},useMemo:function(O,w){var q=Ba();return w=w===void 0?null:w,O=O(),q.memoizedState=[O,w],O},useReducer:function(O,w,q){var W=Ba();return w=q!==void 0?q(w):w,W.memoizedState=W.baseState=w,O={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:O,lastRenderedState:w},W.queue=O,O=O.dispatch=v_e.bind(null,wr,O),[W.memoizedState,O]},useRef:function(O){var w=Ba();return O={current:O},w.memoizedState=O},useState:I$,useDebugValue:R6,useDeferredValue:function(O){return Ba().memoizedState=O},useTransition:function(){var O=I$(!1),w=O[0];return O=A_e.bind(null,O[1]),Ba().memoizedState=O,[w,O]},useMutableSource:function(){},useSyncExternalStore:function(O,w,q){var W=wr,D=Ba();if(fr){if(q===void 0)throw Error(n(407));q=q()}else{if(q=w(),A0===null)throw Error(n(349));wp&30||N$(W,w,q)}D.memoizedState=q;var K={value:q,getSnapshot:w};return D.queue=K,F$(L$.bind(null,W,K,O),[O]),W.flags|=2048,fg(9,B$.bind(null,W,K,q,w),void 0,null),q},useId:function(){var O=Ba(),w=A0.identifierPrefix;if(fr){var q=Uc,W=Hc;q=(W&~(1<<32-I0(W)-1)).toString(32)+q,w=":"+w+"R"+q,q=dg++,0")&&(Le=Le.replace("",O.displayName)),Le}while(1<=le&&0<=Te);break}}}finally{te=!1,Error.prepareStackTrace=q}return(O=O?O.displayName||O.name:"")?ee(O):""}function ue(O){switch(O.tag){case 5:return ee(O.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return O=J(O.type,!1),O;case 11:return O=J(O.type.render,!1),O;case 1:return O=J(O.type,!0),O;default:return""}}function ce(O){if(O==null)return null;if(typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case S:return"Fragment";case k:return"Portal";case R:return"Profiler";case C:return"StrictMode";case N:return"Suspense";case j:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case E:return(O.displayName||"Context")+".Consumer";case T:return(O._context.displayName||"Context")+".Provider";case B:var w=O.render;return O=O.displayName,O||(O=w.displayName||w.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case I:return w=O.displayName||null,w!==null?w:ce(O.type)||"Memo";case P:w=O._payload,O=O._init;try{return ce(O(w))}catch{}}return null}function me(O){var w=O.type;switch(O.tag){case 24:return"Cache";case 9:return(w.displayName||"Context")+".Consumer";case 10:return(w._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return O=w.render,O=O.displayName||O.name||"",w.displayName||(O!==""?"ForwardRef("+O+")":"ForwardRef");case 7:return"Fragment";case 5:return w;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(w);case 8:return w===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w}return null}function de(O){switch(typeof O){case"boolean":case"number":case"string":case"undefined":return O;case"object":return O;default:return""}}function Ae(O){var w=O.type;return(O=O.nodeName)&&O.toLowerCase()==="input"&&(w==="checkbox"||w==="radio")}function ye(O){var w=Ae(O)?"checked":"value",q=Object.getOwnPropertyDescriptor(O.constructor.prototype,w),W=""+O[w];if(!O.hasOwnProperty(w)&&typeof q<"u"&&typeof q.get=="function"&&typeof q.set=="function"){var D=q.get,K=q.set;return Object.defineProperty(O,w,{configurable:!0,get:function(){return D.call(this)},set:function(le){W=""+le,K.call(this,le)}}),Object.defineProperty(O,w,{enumerable:q.enumerable}),{getValue:function(){return W},setValue:function(le){W=""+le},stopTracking:function(){O._valueTracker=null,delete O[w]}}}}function Ne(O){O._valueTracker||(O._valueTracker=ye(O))}function je(O){if(!O)return!1;var w=O._valueTracker;if(!w)return!0;var q=w.getValue(),W="";return O&&(W=Ae(O)?O.checked?"true":"false":O.value),O=W,O!==q?(w.setValue(O),!0):!1}function ie(O){if(O=O||(typeof document<"u"?document:void 0),typeof O>"u")return null;try{return O.activeElement||O.body}catch{return O.body}}function we(O,w){var q=w.checked;return Z({},w,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:q??O._wrapperState.initialChecked})}function re(O,w){var q=w.defaultValue==null?"":w.defaultValue,W=w.checked!=null?w.checked:w.defaultChecked;q=de(w.value!=null?w.value:q),O._wrapperState={initialChecked:W,initialValue:q,controlled:w.type==="checkbox"||w.type==="radio"?w.checked!=null:w.value!=null}}function pe(O,w){w=w.checked,w!=null&&v(O,"checked",w,!1)}function ke(O,w){pe(O,w);var q=de(w.value),W=w.type;if(q!=null)W==="number"?(q===0&&O.value===""||O.value!=q)&&(O.value=""+q):O.value!==""+q&&(O.value=""+q);else if(W==="submit"||W==="reset"){O.removeAttribute("value");return}w.hasOwnProperty("value")?se(O,w.type,q):w.hasOwnProperty("defaultValue")&&se(O,w.type,de(w.defaultValue)),w.checked==null&&w.defaultChecked!=null&&(O.defaultChecked=!!w.defaultChecked)}function Se(O,w,q){if(w.hasOwnProperty("value")||w.hasOwnProperty("defaultValue")){var W=w.type;if(!(W!=="submit"&&W!=="reset"||w.value!==void 0&&w.value!==null))return;w=""+O._wrapperState.initialValue,q||w===O.value||(O.value=w),O.defaultValue=w}q=O.name,q!==""&&(O.name=""),O.defaultChecked=!!O._wrapperState.initialChecked,q!==""&&(O.name=q)}function se(O,w,q){(w!=="number"||ie(O.ownerDocument)!==O)&&(q==null?O.defaultValue=""+O._wrapperState.initialValue:O.defaultValue!==""+q&&(O.defaultValue=""+q))}var L=Array.isArray;function U(O,w,q,W){if(O=O.options,w){w={};for(var D=0;D"+w.valueOf().toString()+"",w=wt.firstChild;O.firstChild;)O.removeChild(O.firstChild);for(;w.firstChild;)O.appendChild(w.firstChild)}});function ae(O,w){if(w){var q=O.firstChild;if(q&&q===O.lastChild&&q.nodeType===3){q.nodeValue=w;return}}O.textContent=w}var H={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Y=["Webkit","ms","Moz","O"];Object.keys(H).forEach(function(O){Y.forEach(function(w){w=w+O.charAt(0).toUpperCase()+O.substring(1),H[w]=H[O]})});function fe(O,w,q){return w==null||typeof w=="boolean"||w===""?"":q||typeof w!="number"||w===0||H.hasOwnProperty(O)&&H[O]?(""+w).trim():w+"px"}function Re(O,w){O=O.style;for(var q in w)if(w.hasOwnProperty(q)){var W=q.indexOf("--")===0,D=fe(q,w[q],W);q==="float"&&(q="cssFloat"),W?O.setProperty(q,D):O[q]=D}}var be=Z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ze(O,w){if(w){if(be[O]&&(w.children!=null||w.dangerouslySetInnerHTML!=null))throw Error(n(137,O));if(w.dangerouslySetInnerHTML!=null){if(w.children!=null)throw Error(n(60));if(typeof w.dangerouslySetInnerHTML!="object"||!("__html"in w.dangerouslySetInnerHTML))throw Error(n(61))}if(w.style!=null&&typeof w.style!="object")throw Error(n(62))}}function nt(O,w){if(O.indexOf("-")===-1)return typeof w.is=="string";switch(O){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mt=null;function ot(O){return O=O.target||O.srcElement||window,O.correspondingUseElement&&(O=O.correspondingUseElement),O.nodeType===3?O.parentNode:O}var Ue=null,yt=null,fn=null;function Ln(O){if(O=sg(O)){if(typeof Ue!="function")throw Error(n(280));var w=O.stateNode;w&&(w=my(w),Ue(O.stateNode,O.type,w))}}function Mo(O){yt?fn?fn.push(O):fn=[O]:yt=O}function rr(){if(yt){var O=yt,w=fn;if(fn=yt=null,Ln(O),w)for(O=0;O>>=0,O===0?32:31-(mp(O)/gp|0)|0}var Mp=64,Dc=4194304;function Ea(O){switch(O&-O){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return O&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return O&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return O}}function Dm(O,w){var q=O.pendingLanes;if(q===0)return 0;var W=0,D=O.suspendedLanes,K=O.pingedLanes,le=q&268435455;if(le!==0){var Te=le&~D;Te!==0?W=Ea(Te):(K&=le,K!==0&&(W=Ea(K)))}else le=q&~D,le!==0?W=Ea(le):K!==0&&(W=Ea(K));if(W===0)return 0;if(w!==0&&w!==W&&!(w&D)&&(D=W&-W,K=w&-w,D>=K||D===16&&(K&4194240)!==0))return w;if(W&4&&(W|=q&16),w=O.entangledLanes,w!==0)for(O=O.entanglements,w&=W;0q;q++)w.push(O);return w}function Fm(O,w,q){O.pendingLanes|=w,w!==536870912&&(O.suspendedLanes=0,O.pingedLanes=0),O=O.eventTimes,w=31-I0(w),O[w]=q}function Owe(O,w){var q=O.pendingLanes&~w;O.pendingLanes=w,O.suspendedLanes=0,O.pingedLanes=0,O.expiredLanes&=w,O.mutableReadLanes&=w,O.entangledLanes&=w,w=O.entanglements;var W=O.eventTimes;for(O=O.expirationTimes;0=Ym),DF=" ",FF=!1;function $F(O,w){switch(O){case"keyup":return Gwe.indexOf(w.keyCode)!==-1;case"keydown":return w.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VF(O){return O=O.detail,typeof O=="object"&&"data"in O?O.data:null}var yb=!1;function Ywe(O,w){switch(O){case"compositionend":return VF(w);case"keypress":return w.which!==32?null:(FF=!0,DF);case"textInput":return O=w.data,O===DF&&FF?null:O;default:return null}}function Zwe(O,w){if(yb)return O==="compositionend"||!$k&&$F(O,w)?(O=NF(),sy=Lk=bu=null,yb=!1,O):null;switch(O){case"paste":return null;case"keypress":if(!(w.ctrlKey||w.altKey||w.metaKey)||w.ctrlKey&&w.altKey){if(w.char&&1=w)return{node:q,offset:w-O};O=W}e:{for(;q;){if(q.nextSibling){q=q.nextSibling;break e}q=q.parentNode}q=void 0}q=ZF(q)}}function JF(O,w){return O&&w?O===w?!0:O&&O.nodeType===3?!1:w&&w.nodeType===3?JF(O,w.parentNode):"contains"in O?O.contains(w):O.compareDocumentPosition?!!(O.compareDocumentPosition(w)&16):!1:!1}function e$(){for(var O=window,w=ie();w instanceof O.HTMLIFrameElement;){try{var q=typeof w.contentWindow.location.href=="string"}catch{q=!1}if(q)O=w.contentWindow;else break;w=ie(O.document)}return w}function Uk(O){var w=O&&O.nodeName&&O.nodeName.toLowerCase();return w&&(w==="input"&&(O.type==="text"||O.type==="search"||O.type==="tel"||O.type==="url"||O.type==="password")||w==="textarea"||O.contentEditable==="true")}function i_e(O){var w=e$(),q=O.focusedElem,W=O.selectionRange;if(w!==q&&q&&q.ownerDocument&&JF(q.ownerDocument.documentElement,q)){if(W!==null&&Uk(q)){if(w=W.start,O=W.end,O===void 0&&(O=w),"selectionStart"in q)q.selectionStart=w,q.selectionEnd=Math.min(O,q.value.length);else if(O=(w=q.ownerDocument||document)&&w.defaultView||window,O.getSelection){O=O.getSelection();var D=q.textContent.length,K=Math.min(W.start,D);W=W.end===void 0?K:Math.min(W.end,D),!O.extend&&K>W&&(D=W,W=K,K=D),D=QF(q,K);var le=QF(q,W);D&&le&&(O.rangeCount!==1||O.anchorNode!==D.node||O.anchorOffset!==D.offset||O.focusNode!==le.node||O.focusOffset!==le.offset)&&(w=w.createRange(),w.setStart(D.node,D.offset),O.removeAllRanges(),K>W?(O.addRange(w),O.extend(le.node,le.offset)):(w.setEnd(le.node,le.offset),O.addRange(w)))}}for(w=[],O=q;O=O.parentNode;)O.nodeType===1&&w.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q=document.documentMode,Ab=null,Xk=null,eg=null,Gk=!1;function t$(O,w,q){var W=q.window===q?q.document:q.nodeType===9?q:q.ownerDocument;Gk||Ab==null||Ab!==ie(W)||(W=Ab,"selectionStart"in W&&Uk(W)?W={start:W.selectionStart,end:W.selectionEnd}:(W=(W.ownerDocument&&W.ownerDocument.defaultView||window).getSelection(),W={anchorNode:W.anchorNode,anchorOffset:W.anchorOffset,focusNode:W.focusNode,focusOffset:W.focusOffset}),eg&&Jm(eg,W)||(eg=W,W=fy(Xk,"onSelect"),0kb||(O.current=i6[kb],i6[kb]=null,kb--)}function er(O,w){kb++,i6[kb]=O.current,O.current=w}var Mu={},r1=gu(Mu),K1=gu(!1),Op=Mu;function Sb(O,w){var q=O.type.contextTypes;if(!q)return Mu;var W=O.stateNode;if(W&&W.__reactInternalMemoizedUnmaskedChildContext===w)return W.__reactInternalMemoizedMaskedChildContext;var D={},K;for(K in q)D[K]=w[K];return W&&(O=O.stateNode,O.__reactInternalMemoizedUnmaskedChildContext=w,O.__reactInternalMemoizedMaskedChildContext=D),D}function Y1(O){return O=O.childContextTypes,O!=null}function gy(){ir(K1),ir(r1)}function m$(O,w,q){if(r1.current!==Mu)throw Error(n(168));er(r1,w),er(K1,q)}function g$(O,w,q){var W=O.stateNode;if(w=w.childContextTypes,typeof W.getChildContext!="function")return q;W=W.getChildContext();for(var D in W)if(!(D in w))throw Error(n(108,me(O)||"Unknown",D));return Z({},q,W)}function My(O){return O=(O=O.stateNode)&&O.__reactInternalMemoizedMergedChildContext||Mu,Op=r1.current,er(r1,O),er(K1,K1.current),!0}function M$(O,w,q){var W=O.stateNode;if(!W)throw Error(n(169));q?(O=g$(O,w,Op),W.__reactInternalMemoizedMergedChildContext=O,ir(K1),ir(r1),er(r1,O)):ir(K1),er(K1,q)}var $c=null,zy=!1,a6=!1;function z$(O){$c===null?$c=[O]:$c.push(O)}function M_e(O){zy=!0,z$(O)}function zu(){if(!a6&&$c!==null){a6=!0;var O=0,w=Eo;try{var q=$c;for(Eo=1;O>=le,D-=le,Vc=1<<32-I0(w)+D|q<yn?(v0=ln,ln=null):v0=ln.sibling;var po=st(Fe,ln,Ve[yn],ft);if(po===null){ln===null&&(ln=v0);break}O&&ln&&po.alternate===null&&w(Fe,ln),De=K(po,De,yn),cn===null?Kt=po:cn.sibling=po,cn=po,ln=v0}if(yn===Ve.length)return q(Fe,ln),fr&&Ap(Fe,yn),Kt;if(ln===null){for(;ynyn?(v0=ln,ln=null):v0=ln.sibling;var Su=st(Fe,ln,po.value,ft);if(Su===null){ln===null&&(ln=v0);break}O&&ln&&Su.alternate===null&&w(Fe,ln),De=K(Su,De,yn),cn===null?Kt=Su:cn.sibling=Su,cn=Su,ln=v0}if(po.done)return q(Fe,ln),fr&&Ap(Fe,yn),Kt;if(ln===null){for(;!po.done;yn++,po=Ve.next())po=ut(Fe,po.value,ft),po!==null&&(De=K(po,De,yn),cn===null?Kt=po:cn.sibling=po,cn=po);return fr&&Ap(Fe,yn),Kt}for(ln=W(Fe,ln);!po.done;yn++,po=Ve.next())po=Wt(ln,Fe,yn,po.value,ft),po!==null&&(O&&po.alternate!==null&&ln.delete(po.key===null?yn:po.key),De=K(po,De,yn),cn===null?Kt=po:cn.sibling=po,cn=po);return O&&ln.forEach(function(Q_e){return w(Fe,Q_e)}),fr&&Ap(Fe,yn),Kt}function Vr(Fe,De,Ve,ft){if(typeof Ve=="object"&&Ve!==null&&Ve.type===S&&Ve.key===null&&(Ve=Ve.props.children),typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case y:e:{for(var Kt=Ve.key,cn=De;cn!==null;){if(cn.key===Kt){if(Kt=Ve.type,Kt===S){if(cn.tag===7){q(Fe,cn.sibling),De=D(cn,Ve.props.children),De.return=Fe,Fe=De;break e}}else if(cn.elementType===Kt||typeof Kt=="object"&&Kt!==null&&Kt.$$typeof===P&&w$(Kt)===cn.type){q(Fe,cn.sibling),De=D(cn,Ve.props),De.ref=ig(Fe,cn,Ve),De.return=Fe,Fe=De;break e}q(Fe,cn);break}else w(Fe,cn);cn=cn.sibling}Ve.type===S?(De=qp(Ve.props.children,Fe.mode,ft,Ve.key),De.return=Fe,Fe=De):(ft=Xy(Ve.type,Ve.key,Ve.props,null,Fe.mode,ft),ft.ref=ig(Fe,De,Ve),ft.return=Fe,Fe=ft)}return le(Fe);case k:e:{for(cn=Ve.key;De!==null;){if(De.key===cn)if(De.tag===4&&De.stateNode.containerInfo===Ve.containerInfo&&De.stateNode.implementation===Ve.implementation){q(Fe,De.sibling),De=D(De,Ve.children||[]),De.return=Fe,Fe=De;break e}else{q(Fe,De);break}else w(Fe,De);De=De.sibling}De=rS(Ve,Fe.mode,ft),De.return=Fe,Fe=De}return le(Fe);case P:return cn=Ve._init,Vr(Fe,De,cn(Ve._payload),ft)}if(L(Ve))return $t(Fe,De,Ve,ft);if(X(Ve))return Ut(Fe,De,Ve,ft);vy(Fe,Ve)}return typeof Ve=="string"&&Ve!==""||typeof Ve=="number"?(Ve=""+Ve,De!==null&&De.tag===6?(q(Fe,De.sibling),De=D(De,Ve),De.return=Fe,Fe=De):(q(Fe,De),De=oS(Ve,Fe.mode,ft),De.return=Fe,Fe=De),le(Fe)):q(Fe,De)}return Vr}var Tb=_$(!0),k$=_$(!1),xy=gu(null),wy=null,Eb=null,f6=null;function b6(){f6=Eb=wy=null}function h6(O){var w=xy.current;ir(xy),O._currentValue=w}function m6(O,w,q){for(;O!==null;){var W=O.alternate;if((O.childLanes&w)!==w?(O.childLanes|=w,W!==null&&(W.childLanes|=w)):W!==null&&(W.childLanes&w)!==w&&(W.childLanes|=w),O===q)break;O=O.return}}function Wb(O,w){wy=O,f6=Eb=null,O=O.dependencies,O!==null&&O.firstContext!==null&&(O.lanes&w&&(Z1=!0),O.firstContext=null)}function oi(O){var w=O._currentValue;if(f6!==O)if(O={context:O,memoizedValue:w,next:null},Eb===null){if(wy===null)throw Error(n(308));Eb=O,wy.dependencies={lanes:0,firstContext:O}}else Eb=Eb.next=O;return w}var vp=null;function g6(O){vp===null?vp=[O]:vp.push(O)}function S$(O,w,q,W){var D=w.interleaved;return D===null?(q.next=q,g6(w)):(q.next=D.next,D.next=q),w.interleaved=q,Uc(O,W)}function Uc(O,w){O.lanes|=w;var q=O.alternate;for(q!==null&&(q.lanes|=w),q=O,O=O.return;O!==null;)O.childLanes|=w,q=O.alternate,q!==null&&(q.childLanes|=w),q=O,O=O.return;return q.tag===3?q.stateNode:null}var Ou=!1;function M6(O){O.updateQueue={baseState:O.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function C$(O,w){O=O.updateQueue,w.updateQueue===O&&(w.updateQueue={baseState:O.baseState,firstBaseUpdate:O.firstBaseUpdate,lastBaseUpdate:O.lastBaseUpdate,shared:O.shared,effects:O.effects})}function Xc(O,w){return{eventTime:O,lane:w,tag:0,payload:null,callback:null,next:null}}function yu(O,w,q){var W=O.updateQueue;if(W===null)return null;if(W=W.shared,co&2){var D=W.pending;return D===null?w.next=w:(w.next=D.next,D.next=w),W.pending=w,Uc(O,q)}return D=W.interleaved,D===null?(w.next=w,g6(W)):(w.next=D.next,D.next=w),W.interleaved=w,Uc(O,q)}function _y(O,w,q){if(w=w.updateQueue,w!==null&&(w=w.shared,(q&4194240)!==0)){var W=w.lanes;W&=O.pendingLanes,q|=W,w.lanes=q,Tk(O,q)}}function q$(O,w){var q=O.updateQueue,W=O.alternate;if(W!==null&&(W=W.updateQueue,q===W)){var D=null,K=null;if(q=q.firstBaseUpdate,q!==null){do{var le={eventTime:q.eventTime,lane:q.lane,tag:q.tag,payload:q.payload,callback:q.callback,next:null};K===null?D=K=le:K=K.next=le,q=q.next}while(q!==null);K===null?D=K=w:K=K.next=w}else D=K=w;q={baseState:W.baseState,firstBaseUpdate:D,lastBaseUpdate:K,shared:W.shared,effects:W.effects},O.updateQueue=q;return}O=q.lastBaseUpdate,O===null?q.firstBaseUpdate=w:O.next=w,q.lastBaseUpdate=w}function ky(O,w,q,W){var D=O.updateQueue;Ou=!1;var K=D.firstBaseUpdate,le=D.lastBaseUpdate,Te=D.shared.pending;if(Te!==null){D.shared.pending=null;var Le=Te,Ge=Le.next;Le.next=null,le===null?K=Ge:le.next=Ge,le=Le;var at=O.alternate;at!==null&&(at=at.updateQueue,Te=at.lastBaseUpdate,Te!==le&&(Te===null?at.firstBaseUpdate=Ge:Te.next=Ge,at.lastBaseUpdate=Le))}if(K!==null){var ut=D.baseState;le=0,at=Ge=Le=null,Te=K;do{var st=Te.lane,Wt=Te.eventTime;if((W&st)===st){at!==null&&(at=at.next={eventTime:Wt,lane:0,tag:Te.tag,payload:Te.payload,callback:Te.callback,next:null});e:{var $t=O,Ut=Te;switch(st=w,Wt=q,Ut.tag){case 1:if($t=Ut.payload,typeof $t=="function"){ut=$t.call(Wt,ut,st);break e}ut=$t;break e;case 3:$t.flags=$t.flags&-65537|128;case 0:if($t=Ut.payload,st=typeof $t=="function"?$t.call(Wt,ut,st):$t,st==null)break e;ut=Z({},ut,st);break e;case 2:Ou=!0}}Te.callback!==null&&Te.lane!==0&&(O.flags|=64,st=D.effects,st===null?D.effects=[Te]:st.push(Te))}else Wt={eventTime:Wt,lane:st,tag:Te.tag,payload:Te.payload,callback:Te.callback,next:null},at===null?(Ge=at=Wt,Le=ut):at=at.next=Wt,le|=st;if(Te=Te.next,Te===null){if(Te=D.shared.pending,Te===null)break;st=Te,Te=st.next,st.next=null,D.lastBaseUpdate=st,D.shared.pending=null}}while(!0);if(at===null&&(Le=ut),D.baseState=Le,D.firstBaseUpdate=Ge,D.lastBaseUpdate=at,w=D.shared.interleaved,w!==null){D=w;do le|=D.lane,D=D.next;while(D!==w)}else K===null&&(D.shared.lanes=0);_p|=le,O.lanes=le,O.memoizedState=ut}}function R$(O,w,q){if(O=w.effects,w.effects=null,O!==null)for(w=0;wq?q:4,O(!0);var W=v6.transition;v6.transition={};try{O(!1),w()}finally{Eo=q,v6.transition=W}}function Y$(){return ri().memoizedState}function A_e(O,w,q){var W=wu(O);if(q={lane:W,action:q,hasEagerState:!1,eagerState:null,next:null},Z$(O))Q$(w,q);else if(q=S$(O,w,q,W),q!==null){var D=W1();Ji(q,O,W,D),J$(q,w,W)}}function v_e(O,w,q){var W=wu(O),D={lane:W,action:q,hasEagerState:!1,eagerState:null,next:null};if(Z$(O))Q$(w,D);else{var K=O.alternate;if(O.lanes===0&&(K===null||K.lanes===0)&&(K=w.lastRenderedReducer,K!==null))try{var le=w.lastRenderedState,Te=K(le,q);if(D.hasEagerState=!0,D.eagerState=Te,Gi(Te,le)){var Le=w.interleaved;Le===null?(D.next=D,g6(w)):(D.next=Le.next,Le.next=D),w.interleaved=D;return}}catch{}finally{}q=S$(O,w,D,W),q!==null&&(D=W1(),Ji(q,O,W,D),J$(q,w,W))}}function Z$(O){var w=O.alternate;return O===wr||w!==null&&w===wr}function Q$(O,w){ug=qy=!0;var q=O.pending;q===null?w.next=w:(w.next=q.next,q.next=w),O.pending=w}function J$(O,w,q){if(q&4194240){var W=w.lanes;W&=O.pendingLanes,q|=W,w.lanes=q,Tk(O,q)}}var Ey={readContext:oi,useCallback:s1,useContext:s1,useEffect:s1,useImperativeHandle:s1,useInsertionEffect:s1,useLayoutEffect:s1,useMemo:s1,useReducer:s1,useRef:s1,useState:s1,useDebugValue:s1,useDeferredValue:s1,useTransition:s1,useMutableSource:s1,useSyncExternalStore:s1,useId:s1,unstable_isNewReconciler:!1},x_e={readContext:oi,useCallback:function(O,w){return Ba().memoizedState=[O,w===void 0?null:w],O},useContext:oi,useEffect:F$,useImperativeHandle:function(O,w,q){return q=q!=null?q.concat([O]):null,Ry(4194308,4,H$.bind(null,w,O),q)},useLayoutEffect:function(O,w){return Ry(4194308,4,O,w)},useInsertionEffect:function(O,w){return Ry(4,2,O,w)},useMemo:function(O,w){var q=Ba();return w=w===void 0?null:w,O=O(),q.memoizedState=[O,w],O},useReducer:function(O,w,q){var W=Ba();return w=q!==void 0?q(w):w,W.memoizedState=W.baseState=w,O={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:O,lastRenderedState:w},W.queue=O,O=O.dispatch=A_e.bind(null,wr,O),[W.memoizedState,O]},useRef:function(O){var w=Ba();return O={current:O},w.memoizedState=O},useState:I$,useDebugValue:q6,useDeferredValue:function(O){return Ba().memoizedState=O},useTransition:function(){var O=I$(!1),w=O[0];return O=y_e.bind(null,O[1]),Ba().memoizedState=O,[w,O]},useMutableSource:function(){},useSyncExternalStore:function(O,w,q){var W=wr,D=Ba();if(fr){if(q===void 0)throw Error(n(407));q=q()}else{if(q=w(),A0===null)throw Error(n(349));wp&30||N$(W,w,q)}D.memoizedState=q;var K={value:q,getSnapshot:w};return D.queue=K,F$(L$.bind(null,W,K,O),[O]),W.flags|=2048,fg(9,B$.bind(null,W,K,q,w),void 0,null),q},useId:function(){var O=Ba(),w=A0.identifierPrefix;if(fr){var q=Hc,W=Vc;q=(W&~(1<<32-I0(W)-1)).toString(32)+q,w=":"+w+"R"+q,q=dg++,0<\/script>",O=O.removeChild(O.firstChild)):typeof W.is=="string"?O=le.createElement(q,{is:W.is}):(O=le.createElement(q),q==="select"&&(le=O,W.multiple?le.multiple=!0:W.size&&(le.size=W.size))):O=le.createElementNS(O,q),O[Wa]=w,O[rg]=W,zV(O,w,!1,!1),w.stateNode=O;e:{switch(le=nt(q,W),q){case"dialog":sr("cancel",O),sr("close",O),D=W;break;case"iframe":case"object":case"embed":sr("load",O),D=W;break;case"video":case"audio":for(D=0;Djb&&(w.flags|=128,W=!0,bg(K,!1),w.lanes=4194304)}else{if(!W)if(O=Cy(le),O!==null){if(w.flags|=128,W=!0,q=O.updateQueue,q!==null&&(w.updateQueue=q,w.flags|=4),bg(K,!0),K.tail===null&&K.tailMode==="hidden"&&!le.alternate&&!fr)return i1(w),null}else 2*Ar()-K.renderingStartTime>jb&&q!==1073741824&&(w.flags|=128,W=!0,bg(K,!1),w.lanes=4194304);K.isBackwards?(le.sibling=w.child,w.child=le):(q=K.last,q!==null?q.sibling=le:w.child=le,K.last=le)}return K.tail!==null?(w=K.tail,K.rendering=w,K.tail=w.sibling,K.renderingStartTime=Ar(),w.sibling=null,q=xr.current,er(xr,W?q&1|2:q&1),w):(i1(w),null);case 22:case 23:return tS(),W=w.memoizedState!==null,O!==null&&O.memoizedState!==null!==W&&(w.flags|=8192),W&&w.mode&1?qs&1073741824&&(i1(w),w.subtreeFlags&6&&(w.flags|=8192)):i1(w),null;case 24:return null;case 25:return null}throw Error(n(156,w.tag))}function E_e(O,w){switch(u6(w),w.tag){case 1:return Y1(w.type)&&My(),O=w.flags,O&65536?(w.flags=O&-65537|128,w):null;case 3:return Nb(),ir(K1),ir(r1),v6(),O=w.flags,O&65536&&!(O&128)?(w.flags=O&-65537|128,w):null;case 5:return y6(w),null;case 13:if(ir(xr),O=w.memoizedState,O!==null&&O.dehydrated!==null){if(w.alternate===null)throw Error(n(340));Rb()}return O=w.flags,O&65536?(w.flags=O&-65537|128,w):null;case 19:return ir(xr),null;case 4:return Nb(),null;case 10:return m6(w.type._context),null;case 22:case 23:return tS(),null;case 24:return null;default:return null}}var Py=!1,a1=!1,W_e=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function Lb(O,w){var q=O.ref;if(q!==null)if(typeof q=="function")try{q(null)}catch(W){Lr(O,w,W)}else q.current=null}function $6(O,w,q){try{q()}catch(W){Lr(O,w,W)}}var AV=!1;function N_e(O,w){if(t6=ry,O=e$(),Xk(O)){if("selectionStart"in O)var q={start:O.selectionStart,end:O.selectionEnd};else e:{q=(q=O.ownerDocument)&&q.defaultView||window;var W=q.getSelection&&q.getSelection();if(W&&W.rangeCount!==0){q=W.anchorNode;var D=W.anchorOffset,K=W.focusNode;W=W.focusOffset;try{q.nodeType,K.nodeType}catch{q=null;break e}var le=0,Te=-1,Le=-1,Ge=0,at=0,ut=O,st=null;t:for(;;){for(var Wt;ut!==q||D!==0&&ut.nodeType!==3||(Te=le+D),ut!==K||W!==0&&ut.nodeType!==3||(Le=le+W),ut.nodeType===3&&(le+=ut.nodeValue.length),(Wt=ut.firstChild)!==null;)st=ut,ut=Wt;for(;;){if(ut===O)break t;if(st===q&&++Ge===D&&(Te=le),st===K&&++at===W&&(Le=le),(Wt=ut.nextSibling)!==null)break;ut=st,st=ut.parentNode}ut=Wt}q=Te===-1||Le===-1?null:{start:Te,end:Le}}else q=null}q=q||{start:0,end:0}}else q=null;for(n6={focusedElem:O,selectionRange:q},ry=!1,Ft=w;Ft!==null;)if(w=Ft,O=w.child,(w.subtreeFlags&1028)!==0&&O!==null)O.return=w,Ft=O;else for(;Ft!==null;){w=Ft;try{var $t=w.alternate;if(w.flags&1024)switch(w.tag){case 0:case 11:case 15:break;case 1:if($t!==null){var Ut=$t.memoizedProps,Vr=$t.memoizedState,Fe=w.stateNode,De=Fe.getSnapshotBeforeUpdate(w.elementType===w.type?Ut:Zi(w.type,Ut),Vr);Fe.__reactInternalSnapshotBeforeUpdate=De}break;case 3:var Ve=w.stateNode.containerInfo;Ve.nodeType===1?Ve.textContent="":Ve.nodeType===9&&Ve.documentElement&&Ve.removeChild(Ve.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ft){Lr(w,w.return,ft)}if(O=w.sibling,O!==null){O.return=w.return,Ft=O;break}Ft=w.return}return $t=AV,AV=!1,$t}function hg(O,w,q){var W=w.updateQueue;if(W=W!==null?W.lastEffect:null,W!==null){var D=W=W.next;do{if((D.tag&O)===O){var K=D.destroy;D.destroy=void 0,K!==void 0&&$6(w,q,K)}D=D.next}while(D!==W)}}function jy(O,w){if(w=w.updateQueue,w=w!==null?w.lastEffect:null,w!==null){var q=w=w.next;do{if((q.tag&O)===O){var W=q.create;q.destroy=W()}q=q.next}while(q!==w)}}function V6(O){var w=O.ref;if(w!==null){var q=O.stateNode;switch(O.tag){case 5:O=q;break;default:O=q}typeof w=="function"?w(O):w.current=O}}function vV(O){var w=O.alternate;w!==null&&(O.alternate=null,vV(w)),O.child=null,O.deletions=null,O.sibling=null,O.tag===5&&(w=O.stateNode,w!==null&&(delete w[Wa],delete w[rg],delete w[i6],delete w[g_e],delete w[M_e])),O.stateNode=null,O.return=null,O.dependencies=null,O.memoizedProps=null,O.memoizedState=null,O.pendingProps=null,O.stateNode=null,O.updateQueue=null}function xV(O){return O.tag===5||O.tag===3||O.tag===4}function wV(O){e:for(;;){for(;O.sibling===null;){if(O.return===null||xV(O.return))return null;O=O.return}for(O.sibling.return=O.return,O=O.sibling;O.tag!==5&&O.tag!==6&&O.tag!==18;){if(O.flags&2||O.child===null||O.tag===4)continue e;O.child.return=O,O=O.child}if(!(O.flags&2))return O.stateNode}}function H6(O,w,q){var W=O.tag;if(W===5||W===6)O=O.stateNode,w?q.nodeType===8?q.parentNode.insertBefore(O,w):q.insertBefore(O,w):(q.nodeType===8?(w=q.parentNode,w.insertBefore(O,q)):(w=q,w.appendChild(O)),q=q._reactRootContainer,q!=null||w.onclick!==null||(w.onclick=my));else if(W!==4&&(O=O.child,O!==null))for(H6(O,w,q),O=O.sibling;O!==null;)H6(O,w,q),O=O.sibling}function U6(O,w,q){var W=O.tag;if(W===5||W===6)O=O.stateNode,w?q.insertBefore(O,w):q.appendChild(O);else if(W!==4&&(O=O.child,O!==null))for(U6(O,w,q),O=O.sibling;O!==null;)U6(O,w,q),O=O.sibling}var D0=null,Qi=!1;function Au(O,w,q){for(q=q.child;q!==null;)_V(O,w,q),q=q.sibling}function _V(O,w,q){if($o&&typeof $o.onCommitFiberUnmount=="function")try{$o.onCommitFiberUnmount(T1,q)}catch{}switch(q.tag){case 5:a1||Lb(q,w);case 6:var W=D0,D=Qi;D0=null,Au(O,w,q),D0=W,Qi=D,D0!==null&&(Qi?(O=D0,q=q.stateNode,O.nodeType===8?O.parentNode.removeChild(q):O.removeChild(q)):D0.removeChild(q.stateNode));break;case 18:D0!==null&&(Qi?(O=D0,q=q.stateNode,O.nodeType===8?s6(O.parentNode,q):O.nodeType===1&&s6(O,q),Xm(O)):s6(D0,q.stateNode));break;case 4:W=D0,D=Qi,D0=q.stateNode.containerInfo,Qi=!0,Au(O,w,q),D0=W,Qi=D;break;case 0:case 11:case 14:case 15:if(!a1&&(W=q.updateQueue,W!==null&&(W=W.lastEffect,W!==null))){D=W=W.next;do{var K=D,le=K.destroy;K=K.tag,le!==void 0&&(K&2||K&4)&&$6(q,w,le),D=D.next}while(D!==W)}Au(O,w,q);break;case 1:if(!a1&&(Lb(q,w),W=q.stateNode,typeof W.componentWillUnmount=="function"))try{W.props=q.memoizedProps,W.state=q.memoizedState,W.componentWillUnmount()}catch(Te){Lr(q,w,Te)}Au(O,w,q);break;case 21:Au(O,w,q);break;case 22:q.mode&1?(a1=(W=a1)||q.memoizedState!==null,Au(O,w,q),a1=W):Au(O,w,q);break;default:Au(O,w,q)}}function kV(O){var w=O.updateQueue;if(w!==null){O.updateQueue=null;var q=O.stateNode;q===null&&(q=O.stateNode=new W_e),w.forEach(function(W){var D=V_e.bind(null,O,W);q.has(W)||(q.add(W),W.then(D,D))})}}function Ji(O,w){var q=w.deletions;if(q!==null)for(var W=0;WD&&(D=le),W&=~K}if(W=D,W=Ar()-W,W=(120>W?120:480>W?480:1080>W?1080:1920>W?1920:3e3>W?3e3:4320>W?4320:1960*L_e(W/1960))-W,10O?16:O,xu===null)var W=!1;else{if(O=xu,xu=null,Vy=0,co&6)throw Error(n(331));var D=co;for(co|=4,Ft=O.current;Ft!==null;){var K=Ft,le=K.child;if(Ft.flags&16){var Te=K.deletions;if(Te!==null){for(var Le=0;LeAr()-K6?Sp(O,0):G6|=q),J1(O,w)}function IV(O,w){w===0&&(O.mode&1?(w=Fc,Fc<<=1,!(Fc&130023424)&&(Fc=4194304)):w=1);var q=W1();O=Xc(O,w),O!==null&&(Fm(O,w,q),J1(O,q))}function $_e(O){var w=O.memoizedState,q=0;w!==null&&(q=w.retryLane),IV(O,q)}function V_e(O,w){var q=0;switch(O.tag){case 13:var W=O.stateNode,D=O.memoizedState;D!==null&&(q=D.retryLane);break;case 19:W=O.stateNode;break;default:throw Error(n(314))}W!==null&&W.delete(w),IV(O,q)}var DV;DV=function(O,w,q){if(O!==null)if(O.memoizedProps!==w.pendingProps||K1.current)Z1=!0;else{if(!(O.lanes&q)&&!(w.flags&128))return Z1=!1,R_e(O,w,q);Z1=!!(O.flags&131072)}else Z1=!1,fr&&w.flags&1048576&&O$(w,Ay,w.index);switch(w.lanes=0,w.tag){case 2:var W=w.type;Ly(O,w),O=w.pendingProps;var D=Sb(w,r1.current);Wb(w,q),D=_6(null,w,W,O,D,q);var K=k6();return w.flags|=1,typeof D=="object"&&D!==null&&typeof D.render=="function"&&D.$$typeof===void 0?(w.tag=1,w.memoizedState=null,w.updateQueue=null,Y1(W)?(K=!0,zy(w)):K=!1,w.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,z6(w),D.updater=Ny,w.stateNode=D,D._reactInternals=w,E6(w,W,O,q),w=L6(null,w,W,!0,K,q)):(w.tag=0,fr&&K&&l6(w),E1(null,w,D,q),w=w.child),w;case 16:W=w.elementType;e:{switch(Ly(O,w),O=w.pendingProps,D=W._init,W=D(W._payload),w.type=W,D=w.tag=U_e(W),O=Zi(W,O),D){case 0:w=B6(null,w,W,O,q);break e;case 1:w=fV(null,w,W,O,q);break e;case 11:w=cV(null,w,W,O,q);break e;case 14:w=lV(null,w,W,Zi(W.type,O),q);break e}throw Error(n(306,W,""))}return w;case 0:return W=w.type,D=w.pendingProps,D=w.elementType===W?D:Zi(W,D),B6(O,w,W,D,q);case 1:return W=w.type,D=w.pendingProps,D=w.elementType===W?D:Zi(W,D),fV(O,w,W,D,q);case 3:e:{if(bV(w),O===null)throw Error(n(387));W=w.pendingProps,K=w.memoizedState,D=K.element,C$(O,w),Sy(w,W,null,q);var le=w.memoizedState;if(W=le.element,K.isDehydrated)if(K={element:W,isDehydrated:!1,cache:le.cache,pendingSuspenseBoundaries:le.pendingSuspenseBoundaries,transitions:le.transitions},w.updateQueue.baseState=K,w.memoizedState=K,w.flags&256){D=Bb(Error(n(423)),w),w=hV(O,w,W,q,D);break e}else if(W!==D){D=Bb(Error(n(424)),w),w=hV(O,w,W,q,D);break e}else for(Cs=mu(w.stateNode.containerInfo.firstChild),Ss=w,fr=!0,Yi=null,q=k$(w,null,W,q),w.child=q;q;)q.flags=q.flags&-3|4096,q=q.sibling;else{if(Rb(),W===D){w=Kc(O,w,q);break e}E1(O,w,W,q)}w=w.child}return w;case 5:return T$(w),O===null&&p6(w),W=w.type,D=w.pendingProps,K=O!==null?O.memoizedProps:null,le=D.children,o6(W,D)?le=null:K!==null&&o6(W,K)&&(w.flags|=32),pV(O,w),E1(O,w,le,q),w.child;case 6:return O===null&&p6(w),null;case 13:return mV(O,w,q);case 4:return O6(w,w.stateNode.containerInfo),W=w.pendingProps,O===null?w.child=Tb(w,null,W,q):E1(O,w,W,q),w.child;case 11:return W=w.type,D=w.pendingProps,D=w.elementType===W?D:Zi(W,D),cV(O,w,W,D,q);case 7:return E1(O,w,w.pendingProps,q),w.child;case 8:return E1(O,w,w.pendingProps.children,q),w.child;case 12:return E1(O,w,w.pendingProps.children,q),w.child;case 10:e:{if(W=w.type._context,D=w.pendingProps,K=w.memoizedProps,le=D.value,er(wy,W._currentValue),W._currentValue=le,K!==null)if(Ki(K.value,le)){if(K.children===D.children&&!K1.current){w=Kc(O,w,q);break e}}else for(K=w.child,K!==null&&(K.return=w);K!==null;){var Te=K.dependencies;if(Te!==null){le=K.child;for(var Le=Te.firstContext;Le!==null;){if(Le.context===W){if(K.tag===1){Le=Gc(-1,q&-q),Le.tag=2;var Ge=K.updateQueue;if(Ge!==null){Ge=Ge.shared;var at=Ge.pending;at===null?Le.next=Le:(Le.next=at.next,at.next=Le),Ge.pending=Le}}K.lanes|=q,Le=K.alternate,Le!==null&&(Le.lanes|=q),g6(K.return,q,w),Te.lanes|=q;break}Le=Le.next}}else if(K.tag===10)le=K.type===w.type?null:K.child;else if(K.tag===18){if(le=K.return,le===null)throw Error(n(341));le.lanes|=q,Te=le.alternate,Te!==null&&(Te.lanes|=q),g6(le,q,w),le=K.sibling}else le=K.child;if(le!==null)le.return=K;else for(le=K;le!==null;){if(le===w){le=null;break}if(K=le.sibling,K!==null){K.return=le.return,le=K;break}le=le.return}K=le}E1(O,w,D.children,q),w=w.child}return w;case 9:return D=w.type,W=w.pendingProps.children,Wb(w,q),D=oi(D),W=W(D),w.flags|=1,E1(O,w,W,q),w.child;case 14:return W=w.type,D=Zi(W,w.pendingProps),D=Zi(W.type,D),lV(O,w,W,D,q);case 15:return uV(O,w,w.type,w.pendingProps,q);case 17:return W=w.type,D=w.pendingProps,D=w.elementType===W?D:Zi(W,D),Ly(O,w),w.tag=1,Y1(W)?(O=!0,zy(w)):O=!1,Wb(w,q),tV(w,W,D),E6(w,W,D,q),L6(null,w,W,!0,O,q);case 19:return MV(O,w,q);case 22:return dV(O,w,q)}throw Error(n(156,w.tag))};function FV(O,w){return hp(O,w)}function H_e(O,w,q,W){this.tag=O,this.key=q,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=w,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=W,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(O,w,q,W){return new H_e(O,w,q,W)}function oS(O){return O=O.prototype,!(!O||!O.isReactComponent)}function U_e(O){if(typeof O=="function")return oS(O)?1:0;if(O!=null){if(O=O.$$typeof,O===B)return 11;if(O===I)return 14}return 2}function ku(O,w){var q=O.alternate;return q===null?(q=ii(O.tag,w,O.key,O.mode),q.elementType=O.elementType,q.type=O.type,q.stateNode=O.stateNode,q.alternate=O,O.alternate=q):(q.pendingProps=w,q.type=O.type,q.flags=0,q.subtreeFlags=0,q.deletions=null),q.flags=O.flags&14680064,q.childLanes=O.childLanes,q.lanes=O.lanes,q.child=O.child,q.memoizedProps=O.memoizedProps,q.memoizedState=O.memoizedState,q.updateQueue=O.updateQueue,w=O.dependencies,q.dependencies=w===null?null:{lanes:w.lanes,firstContext:w.firstContext},q.sibling=O.sibling,q.index=O.index,q.ref=O.ref,q}function Gy(O,w,q,W,D,K){var le=2;if(W=O,typeof O=="function")oS(O)&&(le=1);else if(typeof O=="string")le=5;else e:switch(O){case S:return qp(q.children,D,K,w);case C:le=8,D|=8;break;case R:return O=ii(12,q,w,D|2),O.elementType=R,O.lanes=K,O;case N:return O=ii(13,q,w,D),O.elementType=N,O.lanes=K,O;case j:return O=ii(19,q,w,D),O.elementType=j,O.lanes=K,O;case $:return Ky(q,D,K,w);default:if(typeof O=="object"&&O!==null)switch(O.$$typeof){case T:le=10;break e;case E:le=9;break e;case B:le=11;break e;case I:le=14;break e;case P:le=16,W=null;break e}throw Error(n(130,O==null?O:typeof O,""))}return w=ii(le,q,w,D),w.elementType=O,w.type=W,w.lanes=K,w}function qp(O,w,q,W){return O=ii(7,O,W,w),O.lanes=q,O}function Ky(O,w,q,W){return O=ii(22,O,W,w),O.elementType=$,O.lanes=q,O.stateNode={isHidden:!1},O}function rS(O,w,q){return O=ii(6,O,null,w),O.lanes=q,O}function sS(O,w,q){return w=ii(4,O.children!==null?O.children:[],O.key,w),w.lanes=q,w.stateNode={containerInfo:O.containerInfo,pendingChildren:null,implementation:O.implementation},w}function X_e(O,w,q,W,D){this.tag=w,this.containerInfo=O,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tk(0),this.expirationTimes=Tk(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tk(0),this.identifierPrefix=W,this.onRecoverableError=D,this.mutableSourceEagerHydrationData=null}function iS(O,w,q,W,D,K,le,Te,Le){return O=new X_e(O,w,q,Te,Le),w===1?(w=1,K===!0&&(w|=8)):w=0,K=ii(3,null,null,w),O.current=K,K.stateNode=O,K.memoizedState={element:W,isDehydrated:q,cache:null,transitions:null,pendingSuspenseBoundaries:null},z6(K),O}function G_e(O,w,q){var W=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),bS.exports=dke(),bS.exports}var hs=Wre(),nA={},oH;function pke(){if(oH)return nA;oH=1;var e=Wre();return nA.createRoot=e.createRoot,nA.hydrateRoot=e.hydrateRoot,nA}var Nre=pke();const fke=e=>typeof e=="number"?!1:typeof e?.valueOf()=="string"||Array.isArray(e)?!e.length:!e,f0={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};/*! +`+K.stack}return{value:O,source:w,stack:D,digest:null}}function E6(O,w,q){return{value:O,source:null,stack:q??null,digest:w??null}}function W6(O,w){try{console.error(w.value)}catch(q){setTimeout(function(){throw q})}}var k_e=typeof WeakMap=="function"?WeakMap:Map;function oV(O,w,q){q=Xc(-1,q),q.tag=3,q.payload={element:null};var W=w.value;return q.callback=function(){Dy||(Dy=!0,K6=W),W6(O,w)},q}function rV(O,w,q){q=Xc(-1,q),q.tag=3;var W=O.type.getDerivedStateFromError;if(typeof W=="function"){var D=w.value;q.payload=function(){return W(D)},q.callback=function(){W6(O,w)}}var K=O.stateNode;return K!==null&&typeof K.componentDidCatch=="function"&&(q.callback=function(){W6(O,w),typeof W!="function"&&(vu===null?vu=new Set([this]):vu.add(this));var le=w.stack;this.componentDidCatch(w.value,{componentStack:le!==null?le:""})}),q}function sV(O,w,q){var W=O.pingCache;if(W===null){W=O.pingCache=new k_e;var D=new Set;W.set(w,D)}else D=W.get(w),D===void 0&&(D=new Set,W.set(w,D));D.has(q)||(D.add(q),O=D_e.bind(null,O,w,q),w.then(O,O))}function iV(O){do{var w;if((w=O.tag===13)&&(w=O.memoizedState,w=w!==null?w.dehydrated!==null:!0),w)return O;O=O.return}while(O!==null);return null}function aV(O,w,q,W,D){return O.mode&1?(O.flags|=65536,O.lanes=D,O):(O===w?O.flags|=65536:(O.flags|=128,q.flags|=131072,q.flags&=-52805,q.tag===1&&(q.alternate===null?q.tag=17:(w=Xc(-1,1),w.tag=2,yu(q,w,1))),q.lanes|=1),O)}var S_e=M.ReactCurrentOwner,Z1=!1;function E1(O,w,q,W){w.child=O===null?k$(w,null,q,W):Tb(w,O.child,q,W)}function cV(O,w,q,W,D){q=q.render;var K=w.ref;return Wb(w,D),W=w6(O,w,q,W,K,D),q=_6(),O!==null&&!Z1?(w.updateQueue=O.updateQueue,w.flags&=-2053,O.lanes&=~D,Gc(O,w,D)):(fr&&q&&c6(w),w.flags|=1,E1(O,w,W,D),w.child)}function lV(O,w,q,W,D){if(O===null){var K=q.type;return typeof K=="function"&&!nS(K)&&K.defaultProps===void 0&&q.compare===null&&q.defaultProps===void 0?(w.tag=15,w.type=K,uV(O,w,K,W,D)):(O=Xy(q.type,null,W,w,w.mode,D),O.ref=w.ref,O.return=w,w.child=O)}if(K=O.child,!(O.lanes&D)){var le=K.memoizedProps;if(q=q.compare,q=q!==null?q:Jm,q(le,W)&&O.ref===w.ref)return Gc(O,w,D)}return w.flags|=1,O=ku(K,W),O.ref=w.ref,O.return=w,w.child=O}function uV(O,w,q,W,D){if(O!==null){var K=O.memoizedProps;if(Jm(K,W)&&O.ref===w.ref)if(Z1=!1,w.pendingProps=W=K,(O.lanes&D)!==0)O.flags&131072&&(Z1=!0);else return w.lanes=O.lanes,Gc(O,w,D)}return N6(O,w,q,W,D)}function dV(O,w,q){var W=w.pendingProps,D=W.children,K=O!==null?O.memoizedState:null;if(W.mode==="hidden")if(!(w.mode&1))w.memoizedState={baseLanes:0,cachePool:null,transitions:null},er(Pb,qs),qs|=q;else{if(!(q&1073741824))return O=K!==null?K.baseLanes|q:q,w.lanes=w.childLanes=1073741824,w.memoizedState={baseLanes:O,cachePool:null,transitions:null},w.updateQueue=null,er(Pb,qs),qs|=O,null;w.memoizedState={baseLanes:0,cachePool:null,transitions:null},W=K!==null?K.baseLanes:q,er(Pb,qs),qs|=W}else K!==null?(W=K.baseLanes|q,w.memoizedState=null):W=q,er(Pb,qs),qs|=W;return E1(O,w,D,q),w.child}function pV(O,w){var q=w.ref;(O===null&&q!==null||O!==null&&O.ref!==q)&&(w.flags|=512,w.flags|=2097152)}function N6(O,w,q,W,D){var K=Y1(q)?Op:r1.current;return K=Sb(w,K),Wb(w,D),q=w6(O,w,q,W,K,D),W=_6(),O!==null&&!Z1?(w.updateQueue=O.updateQueue,w.flags&=-2053,O.lanes&=~D,Gc(O,w,D)):(fr&&W&&c6(w),w.flags|=1,E1(O,w,q,D),w.child)}function fV(O,w,q,W,D){if(Y1(q)){var K=!0;My(w)}else K=!1;if(Wb(w,D),w.stateNode===null)By(O,w),tV(w,q,W),T6(w,q,W,D),W=!0;else if(O===null){var le=w.stateNode,Te=w.memoizedProps;le.props=Te;var Le=le.context,Ge=q.contextType;typeof Ge=="object"&&Ge!==null?Ge=oi(Ge):(Ge=Y1(q)?Op:r1.current,Ge=Sb(w,Ge));var at=q.getDerivedStateFromProps,ut=typeof at=="function"||typeof le.getSnapshotBeforeUpdate=="function";ut||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(Te!==W||Le!==Ge)&&nV(w,le,W,Ge),Ou=!1;var st=w.memoizedState;le.state=st,ky(w,W,le,D),Le=w.memoizedState,Te!==W||st!==Le||K1.current||Ou?(typeof at=="function"&&(R6(w,q,at,W),Le=w.memoizedState),(Te=Ou||eV(w,q,Te,W,st,Le,Ge))?(ut||typeof le.UNSAFE_componentWillMount!="function"&&typeof le.componentWillMount!="function"||(typeof le.componentWillMount=="function"&&le.componentWillMount(),typeof le.UNSAFE_componentWillMount=="function"&&le.UNSAFE_componentWillMount()),typeof le.componentDidMount=="function"&&(w.flags|=4194308)):(typeof le.componentDidMount=="function"&&(w.flags|=4194308),w.memoizedProps=W,w.memoizedState=Le),le.props=W,le.state=Le,le.context=Ge,W=Te):(typeof le.componentDidMount=="function"&&(w.flags|=4194308),W=!1)}else{le=w.stateNode,C$(O,w),Te=w.memoizedProps,Ge=w.type===w.elementType?Te:Yi(w.type,Te),le.props=Ge,ut=w.pendingProps,st=le.context,Le=q.contextType,typeof Le=="object"&&Le!==null?Le=oi(Le):(Le=Y1(q)?Op:r1.current,Le=Sb(w,Le));var Wt=q.getDerivedStateFromProps;(at=typeof Wt=="function"||typeof le.getSnapshotBeforeUpdate=="function")||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(Te!==ut||st!==Le)&&nV(w,le,W,Le),Ou=!1,st=w.memoizedState,le.state=st,ky(w,W,le,D);var $t=w.memoizedState;Te!==ut||st!==$t||K1.current||Ou?(typeof Wt=="function"&&(R6(w,q,Wt,W),$t=w.memoizedState),(Ge=Ou||eV(w,q,Ge,W,st,$t,Le)||!1)?(at||typeof le.UNSAFE_componentWillUpdate!="function"&&typeof le.componentWillUpdate!="function"||(typeof le.componentWillUpdate=="function"&&le.componentWillUpdate(W,$t,Le),typeof le.UNSAFE_componentWillUpdate=="function"&&le.UNSAFE_componentWillUpdate(W,$t,Le)),typeof le.componentDidUpdate=="function"&&(w.flags|=4),typeof le.getSnapshotBeforeUpdate=="function"&&(w.flags|=1024)):(typeof le.componentDidUpdate!="function"||Te===O.memoizedProps&&st===O.memoizedState||(w.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||Te===O.memoizedProps&&st===O.memoizedState||(w.flags|=1024),w.memoizedProps=W,w.memoizedState=$t),le.props=W,le.state=$t,le.context=Le,W=Ge):(typeof le.componentDidUpdate!="function"||Te===O.memoizedProps&&st===O.memoizedState||(w.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||Te===O.memoizedProps&&st===O.memoizedState||(w.flags|=1024),W=!1)}return B6(O,w,q,W,K,D)}function B6(O,w,q,W,D,K){pV(O,w);var le=(w.flags&128)!==0;if(!W&&!le)return D&&M$(w,q,!1),Gc(O,w,K);W=w.stateNode,S_e.current=w;var Te=le&&typeof q.getDerivedStateFromError!="function"?null:W.render();return w.flags|=1,O!==null&&le?(w.child=Tb(w,O.child,null,K),w.child=Tb(w,null,Te,K)):E1(O,w,Te,K),w.memoizedState=W.state,D&&M$(w,q,!0),w.child}function bV(O){var w=O.stateNode;w.pendingContext?m$(O,w.pendingContext,w.pendingContext!==w.context):w.context&&m$(O,w.context,!1),z6(O,w.containerInfo)}function hV(O,w,q,W,D){return Rb(),p6(D),w.flags|=256,E1(O,w,q,W),w.child}var L6={dehydrated:null,treeContext:null,retryLane:0};function P6(O){return{baseLanes:O,cachePool:null,transitions:null}}function mV(O,w,q){var W=w.pendingProps,D=xr.current,K=!1,le=(w.flags&128)!==0,Te;if((Te=le)||(Te=O!==null&&O.memoizedState===null?!1:(D&2)!==0),Te?(K=!0,w.flags&=-129):(O===null||O.memoizedState!==null)&&(D|=1),er(xr,D&1),O===null)return d6(w),O=w.memoizedState,O!==null&&(O=O.dehydrated,O!==null)?(w.mode&1?O.data==="$!"?w.lanes=8:w.lanes=1073741824:w.lanes=1,null):(le=W.children,O=W.fallback,K?(W=w.mode,K=w.child,le={mode:"hidden",children:le},!(W&1)&&K!==null?(K.childLanes=0,K.pendingProps=le):K=Gy(le,W,0,null),O=qp(O,W,q,null),K.return=w,O.return=w,K.sibling=O,w.child=K,w.child.memoizedState=P6(q),w.memoizedState=L6,O):j6(w,le));if(D=O.memoizedState,D!==null&&(Te=D.dehydrated,Te!==null))return C_e(O,w,le,W,Te,D,q);if(K){K=W.fallback,le=w.mode,D=O.child,Te=D.sibling;var Le={mode:"hidden",children:W.children};return!(le&1)&&w.child!==D?(W=w.child,W.childLanes=0,W.pendingProps=Le,w.deletions=null):(W=ku(D,Le),W.subtreeFlags=D.subtreeFlags&14680064),Te!==null?K=ku(Te,K):(K=qp(K,le,q,null),K.flags|=2),K.return=w,W.return=w,W.sibling=K,w.child=W,W=K,K=w.child,le=O.child.memoizedState,le=le===null?P6(q):{baseLanes:le.baseLanes|q,cachePool:null,transitions:le.transitions},K.memoizedState=le,K.childLanes=O.childLanes&~q,w.memoizedState=L6,W}return K=O.child,O=K.sibling,W=ku(K,{mode:"visible",children:W.children}),!(w.mode&1)&&(W.lanes=q),W.return=w,W.sibling=null,O!==null&&(q=w.deletions,q===null?(w.deletions=[O],w.flags|=16):q.push(O)),w.child=W,w.memoizedState=null,W}function j6(O,w){return w=Gy({mode:"visible",children:w},O.mode,0,null),w.return=O,O.child=w}function Ny(O,w,q,W){return W!==null&&p6(W),Tb(w,O.child,null,q),O=j6(w,w.pendingProps.children),O.flags|=2,w.memoizedState=null,O}function C_e(O,w,q,W,D,K,le){if(q)return w.flags&256?(w.flags&=-257,W=E6(Error(n(422))),Ny(O,w,le,W)):w.memoizedState!==null?(w.child=O.child,w.flags|=128,null):(K=W.fallback,D=w.mode,W=Gy({mode:"visible",children:W.children},D,0,null),K=qp(K,D,le,null),K.flags|=2,W.return=w,K.return=w,W.sibling=K,w.child=W,w.mode&1&&Tb(w,O.child,null,le),w.child.memoizedState=P6(le),w.memoizedState=L6,K);if(!(w.mode&1))return Ny(O,w,le,null);if(D.data==="$!"){if(W=D.nextSibling&&D.nextSibling.dataset,W)var Te=W.dgst;return W=Te,K=Error(n(419)),W=E6(K,W,void 0),Ny(O,w,le,W)}if(Te=(le&O.childLanes)!==0,Z1||Te){if(W=A0,W!==null){switch(le&-le){case 4:D=2;break;case 16:D=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:D=32;break;case 536870912:D=268435456;break;default:D=0}D=D&(W.suspendedLanes|le)?0:D,D!==0&&D!==K.retryLane&&(K.retryLane=D,Uc(O,D),Ji(W,O,D,-1))}return tS(),W=E6(Error(n(421))),Ny(O,w,le,W)}return D.data==="$?"?(w.flags|=128,w.child=O.child,w=F_e.bind(null,O),D._reactRetry=w,null):(O=K.treeContext,Cs=mu(D.nextSibling),Ss=w,fr=!0,Ki=null,O!==null&&(ti[ni++]=Vc,ti[ni++]=Hc,ti[ni++]=yp,Vc=O.id,Hc=O.overflow,yp=w),w=j6(w,W.children),w.flags|=4096,w)}function gV(O,w,q){O.lanes|=w;var W=O.alternate;W!==null&&(W.lanes|=w),m6(O.return,w,q)}function I6(O,w,q,W,D){var K=O.memoizedState;K===null?O.memoizedState={isBackwards:w,rendering:null,renderingStartTime:0,last:W,tail:q,tailMode:D}:(K.isBackwards=w,K.rendering=null,K.renderingStartTime=0,K.last=W,K.tail=q,K.tailMode=D)}function MV(O,w,q){var W=w.pendingProps,D=W.revealOrder,K=W.tail;if(E1(O,w,W.children,q),W=xr.current,W&2)W=W&1|2,w.flags|=128;else{if(O!==null&&O.flags&128)e:for(O=w.child;O!==null;){if(O.tag===13)O.memoizedState!==null&&gV(O,q,w);else if(O.tag===19)gV(O,q,w);else if(O.child!==null){O.child.return=O,O=O.child;continue}if(O===w)break e;for(;O.sibling===null;){if(O.return===null||O.return===w)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}W&=1}if(er(xr,W),!(w.mode&1))w.memoizedState=null;else switch(D){case"forwards":for(q=w.child,D=null;q!==null;)O=q.alternate,O!==null&&Sy(O)===null&&(D=q),q=q.sibling;q=D,q===null?(D=w.child,w.child=null):(D=q.sibling,q.sibling=null),I6(w,!1,D,q,K);break;case"backwards":for(q=null,D=w.child,w.child=null;D!==null;){if(O=D.alternate,O!==null&&Sy(O)===null){w.child=D;break}O=D.sibling,D.sibling=q,q=D,D=O}I6(w,!0,q,null,K);break;case"together":I6(w,!1,null,null,void 0);break;default:w.memoizedState=null}return w.child}function By(O,w){!(w.mode&1)&&O!==null&&(O.alternate=null,w.alternate=null,w.flags|=2)}function Gc(O,w,q){if(O!==null&&(w.dependencies=O.dependencies),_p|=w.lanes,!(q&w.childLanes))return null;if(O!==null&&w.child!==O.child)throw Error(n(153));if(w.child!==null){for(O=w.child,q=ku(O,O.pendingProps),w.child=q,q.return=w;O.sibling!==null;)O=O.sibling,q=q.sibling=ku(O,O.pendingProps),q.return=w;q.sibling=null}return w.child}function q_e(O,w,q){switch(w.tag){case 3:bV(w),Rb();break;case 5:T$(w);break;case 1:Y1(w.type)&&My(w);break;case 4:z6(w,w.stateNode.containerInfo);break;case 10:var W=w.type._context,D=w.memoizedProps.value;er(xy,W._currentValue),W._currentValue=D;break;case 13:if(W=w.memoizedState,W!==null)return W.dehydrated!==null?(er(xr,xr.current&1),w.flags|=128,null):q&w.child.childLanes?mV(O,w,q):(er(xr,xr.current&1),O=Gc(O,w,q),O!==null?O.sibling:null);er(xr,xr.current&1);break;case 19:if(W=(q&w.childLanes)!==0,O.flags&128){if(W)return MV(O,w,q);w.flags|=128}if(D=w.memoizedState,D!==null&&(D.rendering=null,D.tail=null,D.lastEffect=null),er(xr,xr.current),W)break;return null;case 22:case 23:return w.lanes=0,dV(O,w,q)}return Gc(O,w,q)}var zV,D6,OV,yV;zV=function(O,w){for(var q=w.child;q!==null;){if(q.tag===5||q.tag===6)O.appendChild(q.stateNode);else if(q.tag!==4&&q.child!==null){q.child.return=q,q=q.child;continue}if(q===w)break;for(;q.sibling===null;){if(q.return===null||q.return===w)return;q=q.return}q.sibling.return=q.return,q=q.sibling}},D6=function(){},OV=function(O,w,q,W){var D=O.memoizedProps;if(D!==W){O=w.stateNode,xp(Na.current);var K=null;switch(q){case"input":D=we(O,D),W=we(O,W),K=[];break;case"select":D=Z({},D,{value:void 0}),W=Z({},W,{value:void 0}),K=[];break;case"textarea":D=ne(O,D),W=ne(O,W),K=[];break;default:typeof D.onClick!="function"&&typeof W.onClick=="function"&&(O.onclick=hy)}ze(q,W);var le;q=null;for(Ge in D)if(!W.hasOwnProperty(Ge)&&D.hasOwnProperty(Ge)&&D[Ge]!=null)if(Ge==="style"){var Te=D[Ge];for(le in Te)Te.hasOwnProperty(le)&&(q||(q={}),q[le]="")}else Ge!=="dangerouslySetInnerHTML"&&Ge!=="children"&&Ge!=="suppressContentEditableWarning"&&Ge!=="suppressHydrationWarning"&&Ge!=="autoFocus"&&(r.hasOwnProperty(Ge)?K||(K=[]):(K=K||[]).push(Ge,null));for(Ge in W){var Le=W[Ge];if(Te=D?.[Ge],W.hasOwnProperty(Ge)&&Le!==Te&&(Le!=null||Te!=null))if(Ge==="style")if(Te){for(le in Te)!Te.hasOwnProperty(le)||Le&&Le.hasOwnProperty(le)||(q||(q={}),q[le]="");for(le in Le)Le.hasOwnProperty(le)&&Te[le]!==Le[le]&&(q||(q={}),q[le]=Le[le])}else q||(K||(K=[]),K.push(Ge,q)),q=Le;else Ge==="dangerouslySetInnerHTML"?(Le=Le?Le.__html:void 0,Te=Te?Te.__html:void 0,Le!=null&&Te!==Le&&(K=K||[]).push(Ge,Le)):Ge==="children"?typeof Le!="string"&&typeof Le!="number"||(K=K||[]).push(Ge,""+Le):Ge!=="suppressContentEditableWarning"&&Ge!=="suppressHydrationWarning"&&(r.hasOwnProperty(Ge)?(Le!=null&&Ge==="onScroll"&&sr("scroll",O),K||Te===Le||(K=[])):(K=K||[]).push(Ge,Le))}q&&(K=K||[]).push("style",q);var Ge=K;(w.updateQueue=Ge)&&(w.flags|=4)}},yV=function(O,w,q,W){q!==W&&(w.flags|=4)};function bg(O,w){if(!fr)switch(O.tailMode){case"hidden":w=O.tail;for(var q=null;w!==null;)w.alternate!==null&&(q=w),w=w.sibling;q===null?O.tail=null:q.sibling=null;break;case"collapsed":q=O.tail;for(var W=null;q!==null;)q.alternate!==null&&(W=q),q=q.sibling;W===null?w||O.tail===null?O.tail=null:O.tail.sibling=null:W.sibling=null}}function i1(O){var w=O.alternate!==null&&O.alternate.child===O.child,q=0,W=0;if(w)for(var D=O.child;D!==null;)q|=D.lanes|D.childLanes,W|=D.subtreeFlags&14680064,W|=D.flags&14680064,D.return=O,D=D.sibling;else for(D=O.child;D!==null;)q|=D.lanes|D.childLanes,W|=D.subtreeFlags,W|=D.flags,D.return=O,D=D.sibling;return O.subtreeFlags|=W,O.childLanes=q,w}function R_e(O,w,q){var W=w.pendingProps;switch(l6(w),w.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return i1(w),null;case 1:return Y1(w.type)&&gy(),i1(w),null;case 3:return W=w.stateNode,Nb(),ir(K1),ir(r1),A6(),W.pendingContext&&(W.context=W.pendingContext,W.pendingContext=null),(O===null||O.child===null)&&(Ay(w)?w.flags|=4:O===null||O.memoizedState.isDehydrated&&!(w.flags&256)||(w.flags|=1024,Ki!==null&&(Q6(Ki),Ki=null))),D6(O,w),i1(w),null;case 5:O6(w);var D=xp(lg.current);if(q=w.type,O!==null&&w.stateNode!=null)OV(O,w,q,W,D),O.ref!==w.ref&&(w.flags|=512,w.flags|=2097152);else{if(!W){if(w.stateNode===null)throw Error(n(166));return i1(w),null}if(O=xp(Na.current),Ay(w)){W=w.stateNode,q=w.type;var K=w.memoizedProps;switch(W[Wa]=w,W[rg]=K,O=(w.mode&1)!==0,q){case"dialog":sr("cancel",W),sr("close",W);break;case"iframe":case"object":case"embed":sr("load",W);break;case"video":case"audio":for(D=0;D<\/script>",O=O.removeChild(O.firstChild)):typeof W.is=="string"?O=le.createElement(q,{is:W.is}):(O=le.createElement(q),q==="select"&&(le=O,W.multiple?le.multiple=!0:W.size&&(le.size=W.size))):O=le.createElementNS(O,q),O[Wa]=w,O[rg]=W,zV(O,w,!1,!1),w.stateNode=O;e:{switch(le=nt(q,W),q){case"dialog":sr("cancel",O),sr("close",O),D=W;break;case"iframe":case"object":case"embed":sr("load",O),D=W;break;case"video":case"audio":for(D=0;Djb&&(w.flags|=128,W=!0,bg(K,!1),w.lanes=4194304)}else{if(!W)if(O=Sy(le),O!==null){if(w.flags|=128,W=!0,q=O.updateQueue,q!==null&&(w.updateQueue=q,w.flags|=4),bg(K,!0),K.tail===null&&K.tailMode==="hidden"&&!le.alternate&&!fr)return i1(w),null}else 2*Ar()-K.renderingStartTime>jb&&q!==1073741824&&(w.flags|=128,W=!0,bg(K,!1),w.lanes=4194304);K.isBackwards?(le.sibling=w.child,w.child=le):(q=K.last,q!==null?q.sibling=le:w.child=le,K.last=le)}return K.tail!==null?(w=K.tail,K.rendering=w,K.tail=w.sibling,K.renderingStartTime=Ar(),w.sibling=null,q=xr.current,er(xr,W?q&1|2:q&1),w):(i1(w),null);case 22:case 23:return eS(),W=w.memoizedState!==null,O!==null&&O.memoizedState!==null!==W&&(w.flags|=8192),W&&w.mode&1?qs&1073741824&&(i1(w),w.subtreeFlags&6&&(w.flags|=8192)):i1(w),null;case 24:return null;case 25:return null}throw Error(n(156,w.tag))}function T_e(O,w){switch(l6(w),w.tag){case 1:return Y1(w.type)&&gy(),O=w.flags,O&65536?(w.flags=O&-65537|128,w):null;case 3:return Nb(),ir(K1),ir(r1),A6(),O=w.flags,O&65536&&!(O&128)?(w.flags=O&-65537|128,w):null;case 5:return O6(w),null;case 13:if(ir(xr),O=w.memoizedState,O!==null&&O.dehydrated!==null){if(w.alternate===null)throw Error(n(340));Rb()}return O=w.flags,O&65536?(w.flags=O&-65537|128,w):null;case 19:return ir(xr),null;case 4:return Nb(),null;case 10:return h6(w.type._context),null;case 22:case 23:return eS(),null;case 24:return null;default:return null}}var Ly=!1,a1=!1,E_e=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function Lb(O,w){var q=O.ref;if(q!==null)if(typeof q=="function")try{q(null)}catch(W){Lr(O,w,W)}else q.current=null}function F6(O,w,q){try{q()}catch(W){Lr(O,w,W)}}var AV=!1;function W_e(O,w){if(e6=oy,O=e$(),Uk(O)){if("selectionStart"in O)var q={start:O.selectionStart,end:O.selectionEnd};else e:{q=(q=O.ownerDocument)&&q.defaultView||window;var W=q.getSelection&&q.getSelection();if(W&&W.rangeCount!==0){q=W.anchorNode;var D=W.anchorOffset,K=W.focusNode;W=W.focusOffset;try{q.nodeType,K.nodeType}catch{q=null;break e}var le=0,Te=-1,Le=-1,Ge=0,at=0,ut=O,st=null;t:for(;;){for(var Wt;ut!==q||D!==0&&ut.nodeType!==3||(Te=le+D),ut!==K||W!==0&&ut.nodeType!==3||(Le=le+W),ut.nodeType===3&&(le+=ut.nodeValue.length),(Wt=ut.firstChild)!==null;)st=ut,ut=Wt;for(;;){if(ut===O)break t;if(st===q&&++Ge===D&&(Te=le),st===K&&++at===W&&(Le=le),(Wt=ut.nextSibling)!==null)break;ut=st,st=ut.parentNode}ut=Wt}q=Te===-1||Le===-1?null:{start:Te,end:Le}}else q=null}q=q||{start:0,end:0}}else q=null;for(t6={focusedElem:O,selectionRange:q},oy=!1,Ft=w;Ft!==null;)if(w=Ft,O=w.child,(w.subtreeFlags&1028)!==0&&O!==null)O.return=w,Ft=O;else for(;Ft!==null;){w=Ft;try{var $t=w.alternate;if(w.flags&1024)switch(w.tag){case 0:case 11:case 15:break;case 1:if($t!==null){var Ut=$t.memoizedProps,Vr=$t.memoizedState,Fe=w.stateNode,De=Fe.getSnapshotBeforeUpdate(w.elementType===w.type?Ut:Yi(w.type,Ut),Vr);Fe.__reactInternalSnapshotBeforeUpdate=De}break;case 3:var Ve=w.stateNode.containerInfo;Ve.nodeType===1?Ve.textContent="":Ve.nodeType===9&&Ve.documentElement&&Ve.removeChild(Ve.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ft){Lr(w,w.return,ft)}if(O=w.sibling,O!==null){O.return=w.return,Ft=O;break}Ft=w.return}return $t=AV,AV=!1,$t}function hg(O,w,q){var W=w.updateQueue;if(W=W!==null?W.lastEffect:null,W!==null){var D=W=W.next;do{if((D.tag&O)===O){var K=D.destroy;D.destroy=void 0,K!==void 0&&F6(w,q,K)}D=D.next}while(D!==W)}}function Py(O,w){if(w=w.updateQueue,w=w!==null?w.lastEffect:null,w!==null){var q=w=w.next;do{if((q.tag&O)===O){var W=q.create;q.destroy=W()}q=q.next}while(q!==w)}}function $6(O){var w=O.ref;if(w!==null){var q=O.stateNode;switch(O.tag){case 5:O=q;break;default:O=q}typeof w=="function"?w(O):w.current=O}}function vV(O){var w=O.alternate;w!==null&&(O.alternate=null,vV(w)),O.child=null,O.deletions=null,O.sibling=null,O.tag===5&&(w=O.stateNode,w!==null&&(delete w[Wa],delete w[rg],delete w[s6],delete w[m_e],delete w[g_e])),O.stateNode=null,O.return=null,O.dependencies=null,O.memoizedProps=null,O.memoizedState=null,O.pendingProps=null,O.stateNode=null,O.updateQueue=null}function xV(O){return O.tag===5||O.tag===3||O.tag===4}function wV(O){e:for(;;){for(;O.sibling===null;){if(O.return===null||xV(O.return))return null;O=O.return}for(O.sibling.return=O.return,O=O.sibling;O.tag!==5&&O.tag!==6&&O.tag!==18;){if(O.flags&2||O.child===null||O.tag===4)continue e;O.child.return=O,O=O.child}if(!(O.flags&2))return O.stateNode}}function V6(O,w,q){var W=O.tag;if(W===5||W===6)O=O.stateNode,w?q.nodeType===8?q.parentNode.insertBefore(O,w):q.insertBefore(O,w):(q.nodeType===8?(w=q.parentNode,w.insertBefore(O,q)):(w=q,w.appendChild(O)),q=q._reactRootContainer,q!=null||w.onclick!==null||(w.onclick=hy));else if(W!==4&&(O=O.child,O!==null))for(V6(O,w,q),O=O.sibling;O!==null;)V6(O,w,q),O=O.sibling}function H6(O,w,q){var W=O.tag;if(W===5||W===6)O=O.stateNode,w?q.insertBefore(O,w):q.appendChild(O);else if(W!==4&&(O=O.child,O!==null))for(H6(O,w,q),O=O.sibling;O!==null;)H6(O,w,q),O=O.sibling}var D0=null,Zi=!1;function Au(O,w,q){for(q=q.child;q!==null;)_V(O,w,q),q=q.sibling}function _V(O,w,q){if($o&&typeof $o.onCommitFiberUnmount=="function")try{$o.onCommitFiberUnmount(T1,q)}catch{}switch(q.tag){case 5:a1||Lb(q,w);case 6:var W=D0,D=Zi;D0=null,Au(O,w,q),D0=W,Zi=D,D0!==null&&(Zi?(O=D0,q=q.stateNode,O.nodeType===8?O.parentNode.removeChild(q):O.removeChild(q)):D0.removeChild(q.stateNode));break;case 18:D0!==null&&(Zi?(O=D0,q=q.stateNode,O.nodeType===8?r6(O.parentNode,q):O.nodeType===1&&r6(O,q),Xm(O)):r6(D0,q.stateNode));break;case 4:W=D0,D=Zi,D0=q.stateNode.containerInfo,Zi=!0,Au(O,w,q),D0=W,Zi=D;break;case 0:case 11:case 14:case 15:if(!a1&&(W=q.updateQueue,W!==null&&(W=W.lastEffect,W!==null))){D=W=W.next;do{var K=D,le=K.destroy;K=K.tag,le!==void 0&&(K&2||K&4)&&F6(q,w,le),D=D.next}while(D!==W)}Au(O,w,q);break;case 1:if(!a1&&(Lb(q,w),W=q.stateNode,typeof W.componentWillUnmount=="function"))try{W.props=q.memoizedProps,W.state=q.memoizedState,W.componentWillUnmount()}catch(Te){Lr(q,w,Te)}Au(O,w,q);break;case 21:Au(O,w,q);break;case 22:q.mode&1?(a1=(W=a1)||q.memoizedState!==null,Au(O,w,q),a1=W):Au(O,w,q);break;default:Au(O,w,q)}}function kV(O){var w=O.updateQueue;if(w!==null){O.updateQueue=null;var q=O.stateNode;q===null&&(q=O.stateNode=new E_e),w.forEach(function(W){var D=$_e.bind(null,O,W);q.has(W)||(q.add(W),W.then(D,D))})}}function Qi(O,w){var q=w.deletions;if(q!==null)for(var W=0;WD&&(D=le),W&=~K}if(W=D,W=Ar()-W,W=(120>W?120:480>W?480:1080>W?1080:1920>W?1920:3e3>W?3e3:4320>W?4320:1960*B_e(W/1960))-W,10O?16:O,xu===null)var W=!1;else{if(O=xu,xu=null,$y=0,co&6)throw Error(n(331));var D=co;for(co|=4,Ft=O.current;Ft!==null;){var K=Ft,le=K.child;if(Ft.flags&16){var Te=K.deletions;if(Te!==null){for(var Le=0;LeAr()-G6?Sp(O,0):X6|=q),J1(O,w)}function IV(O,w){w===0&&(O.mode&1?(w=Dc,Dc<<=1,!(Dc&130023424)&&(Dc=4194304)):w=1);var q=W1();O=Uc(O,w),O!==null&&(Fm(O,w,q),J1(O,q))}function F_e(O){var w=O.memoizedState,q=0;w!==null&&(q=w.retryLane),IV(O,q)}function $_e(O,w){var q=0;switch(O.tag){case 13:var W=O.stateNode,D=O.memoizedState;D!==null&&(q=D.retryLane);break;case 19:W=O.stateNode;break;default:throw Error(n(314))}W!==null&&W.delete(w),IV(O,q)}var DV;DV=function(O,w,q){if(O!==null)if(O.memoizedProps!==w.pendingProps||K1.current)Z1=!0;else{if(!(O.lanes&q)&&!(w.flags&128))return Z1=!1,q_e(O,w,q);Z1=!!(O.flags&131072)}else Z1=!1,fr&&w.flags&1048576&&O$(w,yy,w.index);switch(w.lanes=0,w.tag){case 2:var W=w.type;By(O,w),O=w.pendingProps;var D=Sb(w,r1.current);Wb(w,q),D=w6(null,w,W,O,D,q);var K=_6();return w.flags|=1,typeof D=="object"&&D!==null&&typeof D.render=="function"&&D.$$typeof===void 0?(w.tag=1,w.memoizedState=null,w.updateQueue=null,Y1(W)?(K=!0,My(w)):K=!1,w.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,M6(w),D.updater=Wy,w.stateNode=D,D._reactInternals=w,T6(w,W,O,q),w=B6(null,w,W,!0,K,q)):(w.tag=0,fr&&K&&c6(w),E1(null,w,D,q),w=w.child),w;case 16:W=w.elementType;e:{switch(By(O,w),O=w.pendingProps,D=W._init,W=D(W._payload),w.type=W,D=w.tag=H_e(W),O=Yi(W,O),D){case 0:w=N6(null,w,W,O,q);break e;case 1:w=fV(null,w,W,O,q);break e;case 11:w=cV(null,w,W,O,q);break e;case 14:w=lV(null,w,W,Yi(W.type,O),q);break e}throw Error(n(306,W,""))}return w;case 0:return W=w.type,D=w.pendingProps,D=w.elementType===W?D:Yi(W,D),N6(O,w,W,D,q);case 1:return W=w.type,D=w.pendingProps,D=w.elementType===W?D:Yi(W,D),fV(O,w,W,D,q);case 3:e:{if(bV(w),O===null)throw Error(n(387));W=w.pendingProps,K=w.memoizedState,D=K.element,C$(O,w),ky(w,W,null,q);var le=w.memoizedState;if(W=le.element,K.isDehydrated)if(K={element:W,isDehydrated:!1,cache:le.cache,pendingSuspenseBoundaries:le.pendingSuspenseBoundaries,transitions:le.transitions},w.updateQueue.baseState=K,w.memoizedState=K,w.flags&256){D=Bb(Error(n(423)),w),w=hV(O,w,W,q,D);break e}else if(W!==D){D=Bb(Error(n(424)),w),w=hV(O,w,W,q,D);break e}else for(Cs=mu(w.stateNode.containerInfo.firstChild),Ss=w,fr=!0,Ki=null,q=k$(w,null,W,q),w.child=q;q;)q.flags=q.flags&-3|4096,q=q.sibling;else{if(Rb(),W===D){w=Gc(O,w,q);break e}E1(O,w,W,q)}w=w.child}return w;case 5:return T$(w),O===null&&d6(w),W=w.type,D=w.pendingProps,K=O!==null?O.memoizedProps:null,le=D.children,n6(W,D)?le=null:K!==null&&n6(W,K)&&(w.flags|=32),pV(O,w),E1(O,w,le,q),w.child;case 6:return O===null&&d6(w),null;case 13:return mV(O,w,q);case 4:return z6(w,w.stateNode.containerInfo),W=w.pendingProps,O===null?w.child=Tb(w,null,W,q):E1(O,w,W,q),w.child;case 11:return W=w.type,D=w.pendingProps,D=w.elementType===W?D:Yi(W,D),cV(O,w,W,D,q);case 7:return E1(O,w,w.pendingProps,q),w.child;case 8:return E1(O,w,w.pendingProps.children,q),w.child;case 12:return E1(O,w,w.pendingProps.children,q),w.child;case 10:e:{if(W=w.type._context,D=w.pendingProps,K=w.memoizedProps,le=D.value,er(xy,W._currentValue),W._currentValue=le,K!==null)if(Gi(K.value,le)){if(K.children===D.children&&!K1.current){w=Gc(O,w,q);break e}}else for(K=w.child,K!==null&&(K.return=w);K!==null;){var Te=K.dependencies;if(Te!==null){le=K.child;for(var Le=Te.firstContext;Le!==null;){if(Le.context===W){if(K.tag===1){Le=Xc(-1,q&-q),Le.tag=2;var Ge=K.updateQueue;if(Ge!==null){Ge=Ge.shared;var at=Ge.pending;at===null?Le.next=Le:(Le.next=at.next,at.next=Le),Ge.pending=Le}}K.lanes|=q,Le=K.alternate,Le!==null&&(Le.lanes|=q),m6(K.return,q,w),Te.lanes|=q;break}Le=Le.next}}else if(K.tag===10)le=K.type===w.type?null:K.child;else if(K.tag===18){if(le=K.return,le===null)throw Error(n(341));le.lanes|=q,Te=le.alternate,Te!==null&&(Te.lanes|=q),m6(le,q,w),le=K.sibling}else le=K.child;if(le!==null)le.return=K;else for(le=K;le!==null;){if(le===w){le=null;break}if(K=le.sibling,K!==null){K.return=le.return,le=K;break}le=le.return}K=le}E1(O,w,D.children,q),w=w.child}return w;case 9:return D=w.type,W=w.pendingProps.children,Wb(w,q),D=oi(D),W=W(D),w.flags|=1,E1(O,w,W,q),w.child;case 14:return W=w.type,D=Yi(W,w.pendingProps),D=Yi(W.type,D),lV(O,w,W,D,q);case 15:return uV(O,w,w.type,w.pendingProps,q);case 17:return W=w.type,D=w.pendingProps,D=w.elementType===W?D:Yi(W,D),By(O,w),w.tag=1,Y1(W)?(O=!0,My(w)):O=!1,Wb(w,q),tV(w,W,D),T6(w,W,D,q),B6(null,w,W,!0,O,q);case 19:return MV(O,w,q);case 22:return dV(O,w,q)}throw Error(n(156,w.tag))};function FV(O,w){return hp(O,w)}function V_e(O,w,q,W){this.tag=O,this.key=q,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=w,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=W,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(O,w,q,W){return new V_e(O,w,q,W)}function nS(O){return O=O.prototype,!(!O||!O.isReactComponent)}function H_e(O){if(typeof O=="function")return nS(O)?1:0;if(O!=null){if(O=O.$$typeof,O===B)return 11;if(O===I)return 14}return 2}function ku(O,w){var q=O.alternate;return q===null?(q=ii(O.tag,w,O.key,O.mode),q.elementType=O.elementType,q.type=O.type,q.stateNode=O.stateNode,q.alternate=O,O.alternate=q):(q.pendingProps=w,q.type=O.type,q.flags=0,q.subtreeFlags=0,q.deletions=null),q.flags=O.flags&14680064,q.childLanes=O.childLanes,q.lanes=O.lanes,q.child=O.child,q.memoizedProps=O.memoizedProps,q.memoizedState=O.memoizedState,q.updateQueue=O.updateQueue,w=O.dependencies,q.dependencies=w===null?null:{lanes:w.lanes,firstContext:w.firstContext},q.sibling=O.sibling,q.index=O.index,q.ref=O.ref,q}function Xy(O,w,q,W,D,K){var le=2;if(W=O,typeof O=="function")nS(O)&&(le=1);else if(typeof O=="string")le=5;else e:switch(O){case S:return qp(q.children,D,K,w);case C:le=8,D|=8;break;case R:return O=ii(12,q,w,D|2),O.elementType=R,O.lanes=K,O;case N:return O=ii(13,q,w,D),O.elementType=N,O.lanes=K,O;case j:return O=ii(19,q,w,D),O.elementType=j,O.lanes=K,O;case $:return Gy(q,D,K,w);default:if(typeof O=="object"&&O!==null)switch(O.$$typeof){case T:le=10;break e;case E:le=9;break e;case B:le=11;break e;case I:le=14;break e;case P:le=16,W=null;break e}throw Error(n(130,O==null?O:typeof O,""))}return w=ii(le,q,w,D),w.elementType=O,w.type=W,w.lanes=K,w}function qp(O,w,q,W){return O=ii(7,O,W,w),O.lanes=q,O}function Gy(O,w,q,W){return O=ii(22,O,W,w),O.elementType=$,O.lanes=q,O.stateNode={isHidden:!1},O}function oS(O,w,q){return O=ii(6,O,null,w),O.lanes=q,O}function rS(O,w,q){return w=ii(4,O.children!==null?O.children:[],O.key,w),w.lanes=q,w.stateNode={containerInfo:O.containerInfo,pendingChildren:null,implementation:O.implementation},w}function U_e(O,w,q,W,D){this.tag=w,this.containerInfo=O,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rk(0),this.expirationTimes=Rk(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rk(0),this.identifierPrefix=W,this.onRecoverableError=D,this.mutableSourceEagerHydrationData=null}function sS(O,w,q,W,D,K,le,Te,Le){return O=new U_e(O,w,q,Te,Le),w===1?(w=1,K===!0&&(w|=8)):w=0,K=ii(3,null,null,w),O.current=K,K.stateNode=O,K.memoizedState={element:W,isDehydrated:q,cache:null,transitions:null,pendingSuspenseBoundaries:null},M6(K),O}function X_e(O,w,q){var W=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fS.exports=uke(),fS.exports}var hs=Wre(),tA={},oH;function dke(){if(oH)return tA;oH=1;var e=Wre();return tA.createRoot=e.createRoot,tA.hydrateRoot=e.hydrateRoot,tA}var Nre=dke();const pke=e=>typeof e=="number"?!1:typeof e?.valueOf()=="string"||Array.isArray(e)?!e.length:!e,f0={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function rH(e){return Object.prototype.toString.call(e)==="[object Object]"}function a3(e){var t,n;return rH(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(rH(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var mE=function(e,t){return mE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},mE(e,t)};function bke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");mE(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pr=function(){return Pr=Object.assign||function(t){for(var n,o=1,r=arguments.length;o0&&n>="0"&&n<="9"?"_"+n+o:""+n.toUpperCase()+o}function S4(e,t){return t===void 0&&(t={}),A5(e,Pr({delimiter:"",transform:Bre},t))}function Mke(e,t){return t===0?e.toLowerCase():Bre(e,t)}function RN(e,t){return t===void 0&&(t={}),S4(e,Pr({transform:Mke},t))}function zke(e){return e.charAt(0).toUpperCase()+e.substr(1)}function Oke(e){return zke(e.toLowerCase())}function Lre(e,t){return t===void 0&&(t={}),A5(e,Pr({delimiter:" ",transform:Oke},t))}function yke(e,t){return t===void 0&&(t={}),A5(e,Pr({delimiter:"."},t))}function Ti(e,t){return t===void 0&&(t={}),yke(e,Pr({delimiter:"-"},t))}function Ake(e){return e.replace(/>/g,">")}const vke=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function Pre(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function xke(e){return e.replace(/"/g,""")}function jre(e){return e.replace(/{typeof o=="string"&&o.trim()!==""&&(n+=o)}),x.createElement("div",{dangerouslySetInnerHTML:{__html:n},...t})}const{Provider:_ke,Consumer:kke}=x.createContext(void 0),Ske=x.forwardRef(()=>null),Cke=new Set(["string","boolean","number"]),qke=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Rke=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),Tke=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),Eke=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function Dre(e,t){return t.some(n=>e.indexOf(n)===0)}function Wke(e){return e==="key"||e==="children"}function Nke(e,t){switch(e){case"style":return Dke(t)}return t}const iH=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),aH=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),cH=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e),{});function Bke(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return aH[t]?aH[t]:iH[t]?Ti(iH[t]):cH[t]?cH[t]:t}function Lke(e){return e.startsWith("--")?e:Dre(e,["ms","O","Moz","Webkit"])?"-"+Ti(e):Ti(e)}function Pke(e,t){return typeof t=="number"&&t!==0&&!Eke.has(e)?t+"px":t}function M1(e,t,n={}){if(e==null||e===!1)return"";if(Array.isArray(e))return hM(e,t,n);switch(typeof e){case"string":return gE(e);case"number":return e.toString()}const{type:o,props:r}=e;switch(o){case x.StrictMode:case x.Fragment:return hM(r.children,t,n);case i0:const{children:s,...i}=r;return lH(Object.keys(i).length?"div":null,{...i,dangerouslySetInnerHTML:{__html:s}},t,n)}switch(typeof o){case"string":return lH(o,r,t,n);case"function":return o.prototype&&typeof o.prototype.render=="function"?jke(o,r,t,n):M1(o(r,n),t,n)}switch(o&&o.$$typeof){case _ke.$$typeof:return hM(r.children,r.value,n);case kke.$$typeof:return M1(r.children(t||o._currentValue),t,n);case Ske.$$typeof:return M1(o.render(r),t,n)}return""}function lH(e,t,n,o={}){let r="";if(e==="textarea"&&t.hasOwnProperty("value")){r=hM(t.value,n,o);const{value:i,...c}=t;t=c}else t.dangerouslySetInnerHTML&&typeof t.dangerouslySetInnerHTML.__html=="string"?r=t.dangerouslySetInnerHTML.__html:typeof t.children<"u"&&(r=hM(t.children,n,o));if(!e)return r;const s=Ike(t);return qke.has(e)?"<"+e+s+"/>":"<"+e+s+">"+r+""}function jke(e,t,n,o={}){const r=new e(t,o);return typeof r.getChildContext=="function"&&Object.assign(o,r.getChildContext()),M1(r.render(),n,o)}function hM(e,t,n={}){let o="";e=Array.isArray(e)?e:[e];for(let r=0;r=0),g.type){case"b":p=parseInt(p,10).toString(2);break;case"c":p=String.fromCharCode(parseInt(p,10));break;case"d":case"i":p=parseInt(p,10);break;case"j":p=JSON.stringify(p,null,g.width?parseInt(g.width):0);break;case"e":p=g.precision?parseFloat(p).toExponential(g.precision):parseFloat(p).toExponential();break;case"f":p=g.precision?parseFloat(p).toFixed(g.precision):parseFloat(p);break;case"g":p=g.precision?String(Number(p.toPrecision(g.precision))):parseFloat(p);break;case"o":p=(parseInt(p,10)>>>0).toString(8);break;case"s":p=String(p),p=g.precision?p.substring(0,g.precision):p;break;case"t":p=String(!!p),p=g.precision?p.substring(0,g.precision):p;break;case"T":p=Object.prototype.toString.call(p).slice(8,-1).toLowerCase(),p=g.precision?p.substring(0,g.precision):p;break;case"u":p=parseInt(p,10)>>>0;break;case"v":p=p.valueOf(),p=g.precision?p.substring(0,g.precision):p;break;case"x":p=(parseInt(p,10)>>>0).toString(16);break;case"X":p=(parseInt(p,10)>>>0).toString(16).toUpperCase();break}t.json.test(g.type)?f+=p:(t.number.test(g.type)&&(!v||g.sign)?(M=v?"+":"-",p=p.toString().replace(t.sign,"")):M="",A=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",_=g.width-(M+p).length,z=g.width&&_>0?A.repeat(_):"",f+=g.align?M+p+z:A==="0"?M+z+p:z+M+p)}return f}var s=Object.create(null);function i(c){if(s[c])return s[c];for(var l=c,u,d=[],p=0;l;){if((u=t.text.exec(l))!==null)d.push(u[0]);else if((u=t.modulo.exec(l))!==null)d.push("%");else if((u=t.placeholder.exec(l))!==null){if(u[2]){p|=1;var f=[],b=u[2],h=[];if((h=t.key.exec(b))!==null)for(f.push(h[1]);(b=b.substring(h[0].length))!=="";)if((h=t.key_access.exec(b))!==null)f.push(h[1]);else if((h=t.index_access.exec(b))!==null)f.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=f}else p|=2;if(p===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(u[0].length)}return s[c]=d}e.sprintf=n,e.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o)})()}(gS)),gS}var $ke=Fke();const Vke=Zr($ke),Hke=Hs(console.error);function xe(e,...t){try{return Vke.sprintf(e,...t)}catch(n){return n instanceof Error&&Hke(`sprintf error: + */function rH(e){return Object.prototype.toString.call(e)==="[object Object]"}function a3(e){var t,n;return rH(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(rH(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var hE=function(e,t){return hE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},hE(e,t)};function fke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");hE(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pr=function(){return Pr=Object.assign||function(t){for(var n,o=1,r=arguments.length;o0&&n>="0"&&n<="9"?"_"+n+o:""+n.toUpperCase()+o}function k4(e,t){return t===void 0&&(t={}),y5(e,Pr({delimiter:"",transform:Bre},t))}function gke(e,t){return t===0?e.toLowerCase():Bre(e,t)}function qN(e,t){return t===void 0&&(t={}),k4(e,Pr({transform:gke},t))}function Mke(e){return e.charAt(0).toUpperCase()+e.substr(1)}function zke(e){return Mke(e.toLowerCase())}function Lre(e,t){return t===void 0&&(t={}),y5(e,Pr({delimiter:" ",transform:zke},t))}function Oke(e,t){return t===void 0&&(t={}),y5(e,Pr({delimiter:"."},t))}function Ti(e,t){return t===void 0&&(t={}),Oke(e,Pr({delimiter:"-"},t))}function yke(e){return e.replace(/>/g,">")}const Ake=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function Pre(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function vke(e){return e.replace(/"/g,""")}function jre(e){return e.replace(/{typeof o=="string"&&o.trim()!==""&&(n+=o)}),x.createElement("div",{dangerouslySetInnerHTML:{__html:n},...t})}const{Provider:wke,Consumer:_ke}=x.createContext(void 0),kke=x.forwardRef(()=>null),Ske=new Set(["string","boolean","number"]),Cke=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),qke=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),Rke=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),Tke=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function Dre(e,t){return t.some(n=>e.indexOf(n)===0)}function Eke(e){return e==="key"||e==="children"}function Wke(e,t){switch(e){case"style":return Ike(t)}return t}const iH=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),aH=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),cH=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e),{});function Nke(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return aH[t]?aH[t]:iH[t]?Ti(iH[t]):cH[t]?cH[t]:t}function Bke(e){return e.startsWith("--")?e:Dre(e,["ms","O","Moz","Webkit"])?"-"+Ti(e):Ti(e)}function Lke(e,t){return typeof t=="number"&&t!==0&&!Tke.has(e)?t+"px":t}function M1(e,t,n={}){if(e==null||e===!1)return"";if(Array.isArray(e))return hM(e,t,n);switch(typeof e){case"string":return mE(e);case"number":return e.toString()}const{type:o,props:r}=e;switch(o){case x.StrictMode:case x.Fragment:return hM(r.children,t,n);case i0:const{children:s,...i}=r;return lH(Object.keys(i).length?"div":null,{...i,dangerouslySetInnerHTML:{__html:s}},t,n)}switch(typeof o){case"string":return lH(o,r,t,n);case"function":return o.prototype&&typeof o.prototype.render=="function"?Pke(o,r,t,n):M1(o(r,n),t,n)}switch(o&&o.$$typeof){case wke.$$typeof:return hM(r.children,r.value,n);case _ke.$$typeof:return M1(r.children(t||o._currentValue),t,n);case kke.$$typeof:return M1(o.render(r),t,n)}return""}function lH(e,t,n,o={}){let r="";if(e==="textarea"&&t.hasOwnProperty("value")){r=hM(t.value,n,o);const{value:i,...c}=t;t=c}else t.dangerouslySetInnerHTML&&typeof t.dangerouslySetInnerHTML.__html=="string"?r=t.dangerouslySetInnerHTML.__html:typeof t.children<"u"&&(r=hM(t.children,n,o));if(!e)return r;const s=jke(t);return Cke.has(e)?"<"+e+s+"/>":"<"+e+s+">"+r+""}function Pke(e,t,n,o={}){const r=new e(t,o);return typeof r.getChildContext=="function"&&Object.assign(o,r.getChildContext()),M1(r.render(),n,o)}function hM(e,t,n={}){let o="";e=Array.isArray(e)?e:[e];for(let r=0;r=0),g.type){case"b":p=parseInt(p,10).toString(2);break;case"c":p=String.fromCharCode(parseInt(p,10));break;case"d":case"i":p=parseInt(p,10);break;case"j":p=JSON.stringify(p,null,g.width?parseInt(g.width):0);break;case"e":p=g.precision?parseFloat(p).toExponential(g.precision):parseFloat(p).toExponential();break;case"f":p=g.precision?parseFloat(p).toFixed(g.precision):parseFloat(p);break;case"g":p=g.precision?String(Number(p.toPrecision(g.precision))):parseFloat(p);break;case"o":p=(parseInt(p,10)>>>0).toString(8);break;case"s":p=String(p),p=g.precision?p.substring(0,g.precision):p;break;case"t":p=String(!!p),p=g.precision?p.substring(0,g.precision):p;break;case"T":p=Object.prototype.toString.call(p).slice(8,-1).toLowerCase(),p=g.precision?p.substring(0,g.precision):p;break;case"u":p=parseInt(p,10)>>>0;break;case"v":p=p.valueOf(),p=g.precision?p.substring(0,g.precision):p;break;case"x":p=(parseInt(p,10)>>>0).toString(16);break;case"X":p=(parseInt(p,10)>>>0).toString(16).toUpperCase();break}t.json.test(g.type)?f+=p:(t.number.test(g.type)&&(!v||g.sign)?(M=v?"+":"-",p=p.toString().replace(t.sign,"")):M="",A=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",_=g.width-(M+p).length,z=g.width&&_>0?A.repeat(_):"",f+=g.align?M+p+z:A==="0"?M+z+p:z+M+p)}return f}var s=Object.create(null);function i(c){if(s[c])return s[c];for(var l=c,u,d=[],p=0;l;){if((u=t.text.exec(l))!==null)d.push(u[0]);else if((u=t.modulo.exec(l))!==null)d.push("%");else if((u=t.placeholder.exec(l))!==null){if(u[2]){p|=1;var f=[],b=u[2],h=[];if((h=t.key.exec(b))!==null)for(f.push(h[1]);(b=b.substring(h[0].length))!=="";)if((h=t.key_access.exec(b))!==null)f.push(h[1]);else if((h=t.index_access.exec(b))!==null)f.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=f}else p|=2;if(p===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(u[0].length)}return s[c]=d}e.sprintf=n,e.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o)})()}(mS)),mS}var Fke=Dke();const $ke=Zr(Fke),Vke=Hs(console.error);function xe(e,...t){try{return $ke.sprintf(e,...t)}catch(n){return n instanceof Error&&Vke(`sprintf error: -`+n.toString()),e}}var ME,Fre,Kg,$re;ME={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1};Fre=["(","?"];Kg={")":["("],":":["?","?:"]};$re=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function Uke(e){for(var t=[],n=[],o,r,s,i;o=e.match($re);){for(r=o[0],s=e.substr(0,o.index).trim(),s&&t.push(s);i=n.pop();){if(Kg[r]){if(Kg[r][0]===i){r=Kg[r][1]||r;break}}else if(Fre.indexOf(i)>=0||ME[i]":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function Gke(e,t){var n=[],o,r,s,i,c,l;for(o=0;o{const o=new TN({}),r=new Set,s=()=>{r.forEach(M=>M())},i=M=>(r.add(M),()=>r.delete(M)),c=(M="default")=>o.data[M],l=(M,y="default")=>{o.data[y]={...o.data[y],...M},o.data[y][""]={...pH[""],...o.data[y]?.[""]},delete o.pluralForms[y]},u=(M,y)=>{l(M,y),s()},d=(M,y="default")=>{o.data[y]={...o.data[y],...M,"":{...pH[""],...o.data[y]?.[""],...M?.[""]}},delete o.pluralForms[y],s()},p=(M,y)=>{o.data={},o.pluralForms={},u(M,y)},f=(M="default",y,k,S,C)=>(o.data[M]||l(void 0,M),o.dcnpgettext(M,y,k,S,C)),b=(M="default")=>M,h=(M,y)=>{let k=f(y,void 0,M);return n?(k=n.applyFilters("i18n.gettext",k,M,y),n.applyFilters("i18n.gettext_"+b(y),k,M,y)):k},g=(M,y,k)=>{let S=f(k,y,M);return n?(S=n.applyFilters("i18n.gettext_with_context",S,M,y,k),n.applyFilters("i18n.gettext_with_context_"+b(k),S,M,y,k)):S},z=(M,y,k,S)=>{let C=f(S,void 0,M,y,k);return n?(C=n.applyFilters("i18n.ngettext",C,M,y,k,S),n.applyFilters("i18n.ngettext_"+b(S),C,M,y,k,S)):C},A=(M,y,k,S,C)=>{let R=f(C,S,M,y,k);return n?(R=n.applyFilters("i18n.ngettext_with_context",R,M,y,k,S,C),n.applyFilters("i18n.ngettext_with_context_"+b(C),R,M,y,k,S,C)):R},_=()=>g("ltr","text direction")==="rtl",v=(M,y,k)=>{const S=y?y+""+M:M;let C=!!o.data?.[k??"default"]?.[S];return n&&(C=n.applyFilters("i18n.has_translation",C,M,y,k),C=n.applyFilters("i18n.has_translation_"+b(k),C,M,y,k)),C};if(n){const M=y=>{Qke.test(y)&&s()};n.addAction("hookAdded","core/i18n",M),n.addAction("hookRemoved","core/i18n",M)}return{getLocaleData:c,setLocaleData:u,addLocaleData:d,resetLocaleData:p,subscribe:i,__:h,_x:g,_n:z,_nx:A,isRTL:_,hasTranslation:v}};function Vre(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function EN(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function fH(e,t){return function(o,r,s,i=10){const c=e[t];if(!EN(o)||!Vre(r))return;if(typeof s!="function"){console.error("The hook callback must be a function.");return}if(typeof i!="number"){console.error("If specified, the hook priority must be a number.");return}const l={callback:s,priority:i,namespace:r};if(c[o]){const u=c[o].handlers;let d;for(d=u.length;d>0&&!(i>=u[d-1].priority);d--);d===u.length?u[d]=l:u.splice(d,0,l),c.__current.forEach(p=>{p.name===o&&p.currentIndex>=d&&p.currentIndex++})}else c[o]={handlers:[l],runs:0};o!=="hookAdded"&&e.doAction("hookAdded",o,r,s,i)}}function oA(e,t,n=!1){return function(r,s){const i=e[t];if(!EN(r)||!n&&!Vre(s))return;if(!i[r])return 0;let c=0;if(n)c=i[r].handlers.length,i[r]={runs:i[r].runs,handlers:[]};else{const l=i[r].handlers;for(let u=l.length-1;u>=0;u--)l[u].namespace===s&&(l.splice(u,1),c++,i.__current.forEach(d=>{d.name===r&&d.currentIndex>=u&&d.currentIndex--}))}return r!=="hookRemoved"&&e.doAction("hookRemoved",r,s),c}}function bH(e,t){return function(o,r){const s=e[t];return typeof r<"u"?o in s&&s[o].handlers.some(i=>i.namespace===r):o in s}}function rA(e,t,n,o){return function(s,...i){const c=e[t];c[s]||(c[s]={handlers:[],runs:0}),c[s].runs++;const l=c[s].handlers;if(!l||!l.length)return n?i[0]:void 0;const u={name:s,currentIndex:0};async function d(){try{c.__current.add(u);let f=n?i[0]:void 0;for(;u.currentIndex"u"?r.__current.size>0:Array.from(r.__current).some(s=>s.name===o)}}function gH(e,t){return function(o){const r=e[t];if(EN(o))return r[o]&&r[o].runs?r[o].runs:0}}class e6e{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=fH(this,"actions"),this.addFilter=fH(this,"filters"),this.removeAction=oA(this,"actions"),this.removeFilter=oA(this,"filters"),this.hasAction=bH(this,"actions"),this.hasFilter=bH(this,"filters"),this.removeAllActions=oA(this,"actions",!0),this.removeAllFilters=oA(this,"filters",!0),this.doAction=rA(this,"actions",!1,!1),this.doActionAsync=rA(this,"actions",!1,!0),this.applyFilters=rA(this,"filters",!0,!1),this.applyFiltersAsync=rA(this,"filters",!0,!0),this.currentAction=hH(this,"actions"),this.currentFilter=hH(this,"filters"),this.doingAction=mH(this,"actions"),this.doingFilter=mH(this,"filters"),this.didAction=gH(this,"actions"),this.didFilter=gH(this,"filters")}}function Hre(){return new e6e}const Ure=Hre(),{addAction:C4,addFilter:Bn,removeAction:zE,removeFilter:OE,hasAction:Imn,hasFilter:Xre,removeAllActions:Dmn,removeAllFilters:Fmn,doAction:WN,doActionAsync:t6e,applyFilters:gr,applyFiltersAsync:n6e,currentAction:$mn,currentFilter:Vmn,doingAction:Hmn,doingFilter:Umn,didAction:Xmn,didFilter:Gmn,actions:Kmn,filters:Ymn}=Ure,a0=Jke(void 0,void 0,Ure);a0.getLocaleData.bind(a0);a0.setLocaleData.bind(a0);a0.resetLocaleData.bind(a0);a0.subscribe.bind(a0);const m=a0.__.bind(a0),We=a0._x.bind(a0),Dn=a0._n.bind(a0);a0._nx.bind(a0);const jt=a0.isRTL.bind(a0);a0.hasTranslation.bind(a0);function o6e(e){const t=(n,o)=>{const{headers:r={}}=n;for(const s in r)if(s.toLowerCase()==="x-wp-nonce"&&r[s]===t.nonce)return o(n);return o({...n,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t}const Gre=(e,t)=>{let n=e.path,o,r;return typeof e.namespace=="string"&&typeof e.endpoint=="string"&&(o=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),r?n=o+"/"+r:n=o),delete e.namespace,delete e.endpoint,t({...e,path:n})},r6e=e=>(t,n)=>Gre(t,o=>{let r=o.url,s=o.path,i;return typeof s=="string"&&(i=e,e.indexOf("?")!==-1&&(s=s.replace("?","&")),s=s.replace(/^\//,""),typeof i=="string"&&i.indexOf("?")!==-1&&(s=s.replace("?","&")),r=i+s),n({...o,url:r})});function Pf(e){try{return new URL(e),!0}catch{return!1}}const s6e=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function Kre(e){return s6e.test(e)}const i6e=/^(tel:)?(\+)?\d{6,15}$/;function a6e(e){return e=e.replace(/[-.() ]/g,""),i6e.test(e)}function x5(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function NN(e){return e?/^[a-z\-.\+]+[0-9]*:$/i.test(e):!1}function BN(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function c6e(e){return e?/^[^\s#?]+$/.test(e):!1}function Aa(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function l6e(e){return e?/^[^\s#?]+$/.test(e):!1}function LN(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}function w5(e){let t="";const n=Object.entries(e);let o;for(;o=n.shift();){let[r,s]=o;if(Array.isArray(s)||s&&s.constructor===Object){const c=Object.entries(s).reverse();for(const[l,u]of c)n.unshift([`${r}[${l}]`,u])}else s!==void 0&&(s===null&&(s=""),t+="&"+[r,s].map(encodeURIComponent).join("="))}return t.substr(1)}function u6e(e){return e?/^[^\s#?\/]+$/.test(e):!1}function d6e(e){const t=Aa(e),n=LN(e);let o="/";return t&&(o+=t),n&&(o+=`?${n}`),o}function p6e(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function yE(e){return e?/^#[^\s#?\/]*$/.test(e):!1}function Y2(e){try{return decodeURIComponent(e)}catch{return e}}function f6e(e,t,n){const o=t.length,r=o-1;for(let s=0;s{const[o,r=""]=n.split("=").filter(Boolean).map(Y2);if(o){const s=o.replace(/\]/g,"").split("[");f6e(t,s,r)}return t},Object.create(null))}function tn(e="",t){if(!t||!Object.keys(t).length)return e;let n=e;const o=e.indexOf("?");return o!==-1&&(t=Object.assign(Lh(e),t),n=n.substr(0,o)),n+"?"+w5(t)}function AE(e,t){return Lh(e)[t]}function MH(e,t){return AE(e,t)!==void 0}function q4(e,...t){const n=e.indexOf("?");if(n===-1)return e;const o=Lh(e),r=e.substr(0,n);t.forEach(i=>delete o[i]);const s=w5(o);return s?r+"?"+s:r}const b6e=/^(?:[a-z]+:|#|\?|\.|\/)/i;function jf(e){return e&&(e=e.trim(),!b6e.test(e)&&!Kre(e)?"http://"+e:e)}function c3(e){try{return decodeURI(e)}catch{return e}}function Ph(e,t=null){if(!e)return"";let n=e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));const o=/\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;if(!t||n.length<=t||!n.match(o))return n;n=n.split("?")[0];const r=n.split("/"),s=r[r.length-1];if(s.length<=t)return"…"+n.slice(-t);const i=s.lastIndexOf("."),[c,l]=[s.slice(0,i),s.slice(i+1)],u=c.slice(-3)+"."+l;return s.slice(0,t-u.length-1)+"…"+u}var yg={exports:{}},zH;function h6e(){if(zH)return yg.exports;zH=1;var e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},t=Object.keys(e).join("|"),n=new RegExp(t,"g"),o=new RegExp(t,"");function r(c){return e[c]}var s=function(c){return c.replace(n,r)},i=function(c){return!!c.match(o)};return yg.exports=s,yg.exports.has=i,yg.exports.remove=s,yg.exports}var m6e=h6e();const ms=Zr(m6e);function _5(e){return e?ms(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}function If(e){let t;if(e){try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch{}if(t)return t}}function OH(e){const t=e.split("?"),n=t[1],o=t[0];return n?o+"?"+n.split("&").map(r=>r.split("=")).map(r=>r.map(decodeURIComponent)).sort((r,s)=>r[0].localeCompare(s[0])).map(r=>r.map(encodeURIComponent)).map(r=>r.join("=")).join("&"):o}function g6e(e){const t=Object.fromEntries(Object.entries(e).map(([n,o])=>[OH(n),o]));return(n,o)=>{const{parse:r=!0}=n;let s=n.path;if(!s&&n.url){const{rest_route:l,...u}=Lh(n.url);typeof l=="string"&&(s=tn(l,u))}if(typeof s!="string")return o(n);const i=n.method||"GET",c=OH(s);if(i==="GET"&&t[c]){const l=t[c];return delete t[c],yH(l,!!r)}else if(i==="OPTIONS"&&t[i]&&t[i][c]){const l=t[i][c];return delete t[i][c],yH(l,!!r)}return o(n)}}function yH(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}const M6e=({path:e,url:t,...n},o)=>({...n,url:t&&tn(t,o),path:e&&tn(e,o)}),AH=e=>e.json?e.json():Promise.reject(e),z6e=e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}},vH=e=>{const{next:t}=z6e(e.headers.get("link"));return t},O6e=e=>{const t=!!e.path&&e.path.indexOf("per_page=-1")!==-1,n=!!e.url&&e.url.indexOf("per_page=-1")!==-1;return t||n},Yre=async(e,t)=>{if(e.parse===!1||!O6e(e))return t(e);const n=await Tt({...M6e(e,{per_page:100}),parse:!1}),o=await AH(n);if(!Array.isArray(o))return o;let r=vH(n);if(!r)return o;let s=[].concat(o);for(;r;){const i=await Tt({...e,path:void 0,url:r,parse:!1}),c=await AH(i);s=s.concat(c),r=vH(i)}return s},y6e=new Set(["PATCH","PUT","DELETE"]),A6e="GET",v6e=(e,t)=>{const{method:n=A6e}=e;return y6e.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},x6e=(e,t)=>(typeof e.url=="string"&&!MH(e.url,"_locale")&&(e.url=tn(e.url,{_locale:"user"})),typeof e.path=="string"&&!MH(e.path,"_locale")&&(e.path=tn(e.path,{_locale:"user"})),t(e)),w6e=(e,t=!0)=>t?e.status===204?null:e.json?e.json():Promise.reject(e):e,_6e=e=>{const t={code:"invalid_json",message:m("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch(()=>{throw t})},Zre=(e,t=!0)=>Promise.resolve(w6e(e,t)).catch(n=>PN(n,t));function PN(e,t=!0){if(!t)throw e;return _6e(e).then(n=>{const o={code:"unknown_error",message:m("An unknown error occurred.")};throw n||o})}function k6e(e){const t=!!e.method&&e.method==="POST";return(!!e.path&&e.path.indexOf("/wp/v2/media")!==-1||!!e.url&&e.url.indexOf("/wp/v2/media")!==-1)&&t}const S6e=(e,t)=>{if(!k6e(e))return t(e);let n=0;const o=5,r=s=>(n++,t({path:`/wp/v2/media/${s}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n{if(!s.headers)return Promise.reject(s);const i=s.headers.get("x-wp-upload-attachment-id");return s.status>=500&&s.status<600&&i?r(i).catch(()=>e.parse!==!1?Promise.reject({code:"post_process",message:m("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(s)):PN(s,e.parse)}).then(s=>Zre(s,e.parse))},C6e=e=>(t,n)=>{if(typeof t.url=="string"){const o=AE(t.url,"wp_theme_preview");o===void 0?t.url=tn(t.url,{wp_theme_preview:e}):o===""&&(t.url=q4(t.url,"wp_theme_preview"))}if(typeof t.path=="string"){const o=AE(t.path,"wp_theme_preview");o===void 0?t.path=tn(t.path,{wp_theme_preview:e}):o===""&&(t.path=q4(t.path,"wp_theme_preview"))}return n(t)},q6e={Accept:"application/json, */*;q=0.1"},R6e={credentials:"include"},Qre=[x6e,Gre,v6e,Yre];function T6e(e){Qre.unshift(e)}const Jre=e=>{if(e.status>=200&&e.status<300)return e;throw e},E6e=e=>{const{url:t,path:n,data:o,parse:r=!0,...s}=e;let{body:i,headers:c}=e;return c={...q6e,...c},o&&(i=JSON.stringify(o),c["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...R6e,...s,body:i,headers:c}).then(u=>Promise.resolve(u).then(Jre).catch(d=>PN(d,r)).then(d=>Zre(d,r)),u=>{throw u&&u.name==="AbortError"?u:{code:"fetch_error",message:m("You are probably offline.")}})};let e0e=E6e;function W6e(e){e0e=e}function Tt(e){return Qre.reduceRight((n,o)=>r=>o(r,n),e0e)(e).catch(n=>n.code!=="rest_cookie_invalid_nonce"?Promise.reject(n):window.fetch(Tt.nonceEndpoint).then(Jre).then(o=>o.text()).then(o=>(Tt.nonceMiddleware.nonce=o,Tt(e))))}Tt.use=T6e;Tt.setFetchHandler=W6e;Tt.createNonceMiddleware=o6e;Tt.createPreloadingMiddleware=g6e;Tt.createRootURLMiddleware=r6e;Tt.fetchAllMiddleware=Yre;Tt.mediaUploadMiddleware=S6e;Tt.createThemePreviewMiddleware=C6e;const xH=Object.create(null);function Ke(e,t={}){const{since:n,version:o,alternative:r,plugin:s,link:i,hint:c}=t,l=s?` from ${s}`:"",u=n?` since version ${n}`:"",d=o?` and will be removed${l} in version ${o}`:"",p=r?` Please use ${r} instead.`:"",f=i?` See: ${i}`:"",b=c?` Note: ${c}`:"",h=`${e} is deprecated${u}${d}.${p}${f}${b}`;h in xH||(WN("deprecated",e,t,h),console.warn(h),xH[h]=!0)}function os(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var N6e=typeof Symbol=="function"&&Symbol.observable||"@@observable",wH=N6e,MS=()=>Math.random().toString(36).substring(7).split("").join("."),B6e={INIT:`@@redux/INIT${MS()}`,REPLACE:`@@redux/REPLACE${MS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${MS()}`},_H=B6e;function L6e(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function t0e(e,t,n){if(typeof e!="function")throw new Error(os(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(os(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(os(1));return n(t0e)(e,t)}let o=e,r=t,s=new Map,i=s,c=0,l=!1;function u(){i===s&&(i=new Map,s.forEach((z,A)=>{i.set(A,z)}))}function d(){if(l)throw new Error(os(3));return r}function p(z){if(typeof z!="function")throw new Error(os(4));if(l)throw new Error(os(5));let A=!0;u();const _=c++;return i.set(_,z),function(){if(A){if(l)throw new Error(os(6));A=!1,u(),i.delete(_),s=null}}}function f(z){if(!L6e(z))throw new Error(os(7));if(typeof z.type>"u")throw new Error(os(8));if(typeof z.type!="string")throw new Error(os(17));if(l)throw new Error(os(9));try{l=!0,r=o(r,z)}finally{l=!1}return(s=i).forEach(_=>{_()}),z}function b(z){if(typeof z!="function")throw new Error(os(10));o=z,f({type:_H.REPLACE})}function h(){const z=p;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(os(11));function _(){const M=A;M.next&&M.next(d())}return _(),{unsubscribe:z(_)}},[wH](){return this}}}return f({type:_H.INIT}),{dispatch:f,subscribe:p,getState:d,replaceReducer:b,[wH]:h}}function P6e(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function j6e(...e){return t=>(n,o)=>{const r=t(n,o);let s=()=>{throw new Error(os(15))};const i={getState:r.getState,dispatch:(l,...u)=>s(l,...u)},c=e.map(l=>l(i));return s=P6e(...c)(r.dispatch),{...r,dispatch:s}}}var zS,kH;function I6e(){if(kH)return zS;kH=1;function e(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(c){return typeof c}:e=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},e(i)}function t(i,c){if(!(i instanceof c))throw new TypeError("Cannot call a class as a function")}function n(i,c){for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(p,f){f!==null&&e(f)==="object"&&(p=p[1]),l.call(d,p,f,u)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),i}();return zS=s,zS}var D6e=I6e();const Va=Zr(D6e);function F6e(e){return!!e&&typeof e[Symbol.iterator]=="function"&&typeof e.next=="function"}var OS={},Vo={},sA={},SH;function n0e(){if(SH)return sA;SH=1,Object.defineProperty(sA,"__esModule",{value:!0});var e={all:Symbol("all"),error:Symbol("error"),fork:Symbol("fork"),join:Symbol("join"),race:Symbol("race"),call:Symbol("call"),cps:Symbol("cps"),subscribe:Symbol("subscribe")};return sA.default=e,sA}var CH;function o0e(){if(CH)return Vo;CH=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.createChannel=Vo.subscribe=Vo.cps=Vo.apply=Vo.call=Vo.invoke=Vo.delay=Vo.race=Vo.join=Vo.fork=Vo.error=Vo.all=void 0;var e=n0e(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}return Vo.all=function(r){return{type:t.default.all,value:r}},Vo.error=function(r){return{type:t.default.error,error:r}},Vo.fork=function(r){for(var s=arguments.length,i=Array(s>1?s-1:0),c=1;c1?s-1:0),c=1;c2?i-2:0),l=2;l1?s-1:0),c=1;c"u"?"undefined":e(i))==="object"&&!!i},all:function(i){return r.obj(i)&&i.type===n.default.all},error:function(i){return r.obj(i)&&i.type===n.default.error},array:Array.isArray,func:function(i){return typeof i=="function"},promise:function(i){return i&&r.func(i.then)},iterator:function(i){return i&&r.func(i.next)&&r.func(i.throw)},fork:function(i){return r.obj(i)&&i.type===n.default.fork},join:function(i){return r.obj(i)&&i.type===n.default.join},race:function(i){return r.obj(i)&&i.type===n.default.race},call:function(i){return r.obj(i)&&i.type===n.default.call},cps:function(i){return r.obj(i)&&i.type===n.default.cps},subscribe:function(i){return r.obj(i)&&i.type===n.default.subscribe},channel:function(i){return r.obj(i)&&r.func(i.subscribe)}};return aA.default=r,aA}var RH;function $6e(){if(RH)return ts;RH=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.iterator=ts.array=ts.object=ts.error=ts.any=void 0;var e=k5(),t=n(e);function n(l){return l&&l.__esModule?l:{default:l}}var o=ts.any=function(u,d,p,f){return f(u),!0},r=ts.error=function(u,d,p,f,b){return t.default.error(u)?(b(u.error),!0):!1},s=ts.object=function(u,d,p,f,b){if(!t.default.all(u)||!t.default.obj(u.value))return!1;var h={},g=Object.keys(u.value),z=0,A=!1,_=function(y,k){A||(h[y]=k,z++,z===g.length&&f(h))},v=function(y,k){A||(A=!0,b(k))};return g.map(function(M){p(u.value[M],function(y){return _(M,y)},function(y){return v(M,y)})}),!0},i=ts.array=function(u,d,p,f,b){if(!t.default.all(u)||!t.default.array(u.value))return!1;var h=[],g=0,z=!1,A=function(M,y){z||(h[M]=y,g++,g===u.value.length&&f(h))},_=function(M,y){z||(z=!0,b(y))};return u.value.map(function(v,M){p(v,function(y){return A(M,y)},function(y){return _(M,y)})}),!0},c=ts.iterator=function(u,d,p,f,b){return t.default.iterator(u)?(p(u,d,b),!0):!1};return ts.default=[r,c,i,s,o],ts}var TH;function V6e(){if(TH)return iA;TH=1,Object.defineProperty(iA,"__esModule",{value:!0});var e=$6e(),t=r(e),n=k5(),o=r(n);function r(c){return c&&c.__esModule?c:{default:c}}function s(c){if(Array.isArray(c)){for(var l=0,u=Array(c.length);l(c,l,u,d,p)=>{if(!Y6e(c,s))return!1;const f=i(c);return r0e(f)?f.then(d,p):d(f),!0}),o=(s,i)=>vE(s)?(t(s),i(),!0):!1;n.push(o);const r=K6e.create(n);return s=>new Promise((i,c)=>r(s,l=>{vE(l)&&t(l),i(l)},c))}function Q6e(e={}){return t=>{const n=Z6e(e,t.dispatch);return o=>r=>F6e(r)?n(r):o(r)}}function Or(e,t){return n=>{const o=e(n);return o.displayName=J6e(t,n),o}}const J6e=(e,t)=>{const n=t.displayName||t.name||"Component";return`${S4(e??"")}(${n})`},F1=(e,t,n)=>{let o,r,s=0,i,c,l,u=0,d=!1,p=!1,f=!0;n&&(d=!!n.leading,p="maxWait"in n,n.maxWait!==void 0&&(s=Math.max(n.maxWait,t)),f="trailing"in n?!!n.trailing:f);function b(E){const B=o,N=r;return o=void 0,r=void 0,u=E,i=e.apply(N,B),i}function h(E,B){c=setTimeout(E,B)}function g(){c!==void 0&&clearTimeout(c)}function z(E){return u=E,h(M,t),d?b(E):i}function A(E){return E-(l||0)}function _(E){const B=A(E),N=E-u,j=t-B;return p?Math.min(j,s-N):j}function v(E){const B=A(E),N=E-u;return l===void 0||B>=t||B<0||p&&N>=s}function M(){const E=Date.now();if(v(E))return k(E);h(M,_(E))}function y(){c=void 0}function k(E){return y(),f&&o?b(E):(o=r=void 0,i)}function S(){g(),u=0,y(),o=l=r=void 0}function C(){return R()?k(Date.now()):i}function R(){return c!==void 0}function T(...E){const B=Date.now(),N=v(B);if(o=E,r=this,l=B,N){if(!R())return z(l);if(p)return h(M,t),b(l)}return R()||h(M,t),i}return T.cancel=S,T.flush=C,T.pending=R,T},jN=(e,t,n)=>{let o=!0,r=!0;return n&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),F1(e,t,{leading:o,trailing:r,maxWait:t})};function gc(){const e=new Map,t=new Map;function n(o){const r=t.get(o);if(r)for(const s of r)s()}return{get(o){return e.get(o)},set(o,r){e.set(o,r),n(o)},delete(o){e.delete(o),n(o)},subscribe(o,r){let s=t.get(o);return s||(s=new Set,t.set(o,s)),s.add(r),()=>{s.delete(r),s.size===0&&t.delete(o)}}}}const s0e=(e=!1)=>(...t)=>(...n)=>{const o=t.flat();return e&&o.reverse(),o.reduce((r,s)=>[s(...r)],n)[0]},Ku=s0e(),Co=s0e(!0);function eSe(e){return Or(t=>n=>e(n)?a.jsx(t,{...n}):null,"ifCondition")}function i0e(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=0;for(;r{if(n)return n;const o=oSe(e);return t?`${t}-${o}`:o},[e,n,t])}const rSe=Or(e=>t=>{const n=vt(e);return a.jsx(e,{...t,instanceId:n})},"instanceId"),sSe=Or(e=>class extends x.Component{constructor(n){super(n),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(n,o){const r=setTimeout(()=>{n(),this.clearTimeout(r)},o);return this.timeouts.push(r),r}clearTimeout(n){clearTimeout(n),this.timeouts=this.timeouts.filter(o=>o!==n)}render(){return a.jsx(e,{...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout})}},"withSafeTimeout");function iSe(e){return[e?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function a0e(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function aSe(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&a0e(n)}function S5(e,{sequential:t=!1}={}){const n=e.querySelectorAll(iSe(t));return Array.from(n).filter(o=>{if(!a0e(o))return!1;const{nodeName:r}=o;return r==="AREA"?aSe(o):!0})}const cSe=Object.freeze(Object.defineProperty({__proto__:null,find:S5},Symbol.toStringTag,{value:"Module"}));function xE(e){const t=e.getAttribute("tabindex");return t===null?0:parseInt(t,10)}function c0e(e){return xE(e)!==-1}function lSe(){const e={};return function(n,o){const{nodeName:r,type:s,checked:i,name:c}=o;if(r!=="INPUT"||s!=="radio"||!c)return n.concat(o);const l=e.hasOwnProperty(c);if(!(i||!l))return n;if(l){const d=e[c];n=n.filter(p=>p!==d)}return e[c]=o,n.concat(o)}}function uSe(e,t){return{element:e,index:t}}function dSe(e){return e.element}function pSe(e,t){const n=xE(e.element),o=xE(t.element);return n===o?e.index-t.index:n-o}function IN(e){return e.filter(c0e).map(uSe).sort(pSe).map(dSe).reduce(lSe(),[])}function fSe(e){return IN(S5(e))}function bSe(e){return IN(S5(e.ownerDocument.body)).reverse().find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_PRECEDING)}function hSe(e){return IN(S5(e.ownerDocument.body)).find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_FOLLOWING)}const mSe=Object.freeze(Object.defineProperty({__proto__:null,find:fSe,findNext:hSe,findPrevious:bSe,isTabbableIndex:c0e},Symbol.toStringTag,{value:"Module"}));function Nv(e){if(!e.collapsed){const s=Array.from(e.getClientRects());if(s.length===1)return s[0];const i=s.filter(({width:p})=>p>1);if(i.length===0)return e.getBoundingClientRect();if(i.length===1)return i[0];let{top:c,bottom:l,left:u,right:d}=i[0];for(const{top:p,bottom:f,left:b,right:h}of i)pl&&(l=f),bd&&(d=h);return new window.DOMRect(u,c,d-u,l-c)}const{startContainer:t}=e,{ownerDocument:n}=t;if(t.nodeName==="BR"){const{parentNode:s}=t,i=Array.from(s.childNodes).indexOf(t);e=n.createRange(),e.setStart(s,i),e.setEnd(s,i)}const o=e.getClientRects();if(o.length>1)return null;let r=o[0];if(!r||r.height===0){const s=n.createTextNode("​");e=e.cloneRange(),e.insertNode(s),r=e.getClientRects()[0],s.parentNode,s.parentNode.removeChild(s)}return r}function wE(e){const t=e.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return n?Nv(n):null}function l0e(e){e.defaultView;const t=e.defaultView.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return!!n&&!n.collapsed}function DN(e){return e?.nodeName==="INPUT"}function md(e){const t=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return DN(e)&&e.type&&!t.includes(e.type)||e.nodeName==="TEXTAREA"||e.contentEditable==="true"}function gSe(e){if(!DN(e)&&!md(e))return!1;try{const{selectionStart:t,selectionEnd:n}=e;return t===null||t!==n}catch{return!0}}function MSe(e){return l0e(e)||!!e.activeElement&&gSe(e.activeElement)}function zSe(e){return!!e.activeElement&&(DN(e.activeElement)||md(e.activeElement)||l0e(e))}function R4(e){return e.ownerDocument.defaultView,e.ownerDocument.defaultView.getComputedStyle(e)}function ps(e,t="vertical"){if(e){if((t==="vertical"||t==="all")&&e.scrollHeight>e.clientHeight){const{overflowY:n}=R4(e);if(/(auto|scroll)/.test(n))return e}if((t==="horizontal"||t==="all")&&e.scrollWidth>e.clientWidth){const{overflowX:n}=R4(e);if(/(auto|scroll)/.test(n))return e}return e.ownerDocument===e.parentNode?e:ps(e.parentNode,t)}}function C5(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function OSe(e){if(C5(e))return e.selectionStart===0&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t,o=n.getSelection(),r=o.rangeCount?o.getRangeAt(0):null;if(!r)return!0;const{startContainer:s,endContainer:i,startOffset:c,endOffset:l}=r;if(s===e&&i===e&&c===0&&l===e.childNodes.length)return!0;e.lastChild;const u=i.nodeType===i.TEXT_NODE?i.data.length:i.childNodes.length;return PH(s,e,"firstChild")&&PH(i,e,"lastChild")&&c===0&&l===u}function PH(e,t,n){let o=t;do{if(e===o)return!0;o=o[n]}while(o);return!1}function u0e(e){if(!e)return!1;const{tagName:t}=e;return C5(e)||t==="BUTTON"||t==="SELECT"}function FN(e){return R4(e).direction==="rtl"}function ySe(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map(({top:r})=>r));return Math.max(...t.map(({bottom:r})=>r))-n}function d0e(e){const{anchorNode:t,focusNode:n,anchorOffset:o,focusOffset:r}=e,s=t.compareDocumentPosition(n);return s&t.DOCUMENT_POSITION_PRECEDING?!1:s&t.DOCUMENT_POSITION_FOLLOWING?!0:s===0?o<=r:!0}function ASe(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;const o=e.caretPositionFromPoint(t,n);if(!o)return null;const r=e.createRange();return r.setStart(o.offsetNode,o.offset),r.collapse(!0),r}function p0e(e,t,n,o){const r=o.style.zIndex,s=o.style.position,{position:i="static"}=R4(o);i==="static"&&(o.style.position="relative"),o.style.zIndex="10000";const c=ASe(e,t,n);return o.style.zIndex=r,o.style.position=s,c}function f0e(e,t,n){let o=n();return(!o||!o.startContainer||!e.contains(o.startContainer))&&(e.scrollIntoView(t),o=n(),!o||!o.startContainer||!e.contains(o.startContainer))?null:o}function b0e(e,t,n=!1){if(C5(e)&&typeof e.selectionStart=="number")return e.selectionStart!==e.selectionEnd?!1:t?e.selectionStart===0:e.value.length===e.selectionStart;if(!e.isContentEditable)return!0;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return!1;const i=s.getRangeAt(0),c=i.cloneRange(),l=d0e(s),u=s.isCollapsed;u||c.collapse(!l);const d=Nv(c),p=Nv(i);if(!d||!p)return!1;const f=ySe(i);if(!u&&f&&f>d.height&&l===t)return!1;const b=FN(e)?!t:t,h=e.getBoundingClientRect(),g=b?h.left+1:h.right-1,z=t?h.top+1:h.bottom-1,A=f0e(e,t,()=>p0e(o,g,z,e));if(!A)return!1;const _=Nv(A);if(!_)return!1;const v=t?"top":"bottom",M=b?"left":"right",y=_[v]-p[v],k=_[M]-d[M],S=Math.abs(y)<=1,C=Math.abs(k)<=1;return n?S:S&&C}function yS(e,t){return b0e(e,t)}function jH(e,t){return b0e(e,t,!0)}function vSe(e,t,n){const{ownerDocument:o}=e,r=FN(e)?!t:t,s=e.getBoundingClientRect();n===void 0?n=t?s.right-1:s.left+1:n<=s.left?n=s.left+1:n>=s.right&&(n=s.right-1);const i=r?s.bottom-1:s.top+1;return p0e(o,n,i,e)}function h0e(e,t,n){if(!e)return;if(e.focus(),C5(e)){if(typeof e.selectionStart!="number")return;t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0);return}if(!e.isContentEditable)return;const o=f0e(e,t,()=>vSe(e,t,n));if(!o)return;const{ownerDocument:r}=e,{defaultView:s}=r,i=s.getSelection();i.removeAllRanges(),i.addRange(o)}function m0e(e,t){return h0e(e,t,void 0)}function xSe(e,t,n){return h0e(e,t,n?.left)}function g0e(e,t){t.parentNode,t.parentNode.insertBefore(e,t.nextSibling)}function pf(e){e.parentNode,e.parentNode.removeChild(e)}function wSe(e,t){e.parentNode,g0e(t,e.parentNode),pf(e)}function mM(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function IH(e,t){const n=e.ownerDocument.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode,e.parentNode.replaceChild(n,e),n}function Ag(e,t){t.parentNode,t.parentNode.insertBefore(e,t),e.appendChild(t)}function q5(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const n=t.getElementsByTagName("*");let o=n.length;for(;o--;){const r=n[o];if(r.tagName==="SCRIPT")pf(r);else{let s=r.attributes.length;for(;s--;){const{name:i}=r.attributes[s];i.startsWith("on")&&r.removeAttribute(i)}}}return t.innerHTML}function v1(e){e=q5(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}function T4(e){switch(e.nodeType){case e.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(e.nodeValue||"");case e.ELEMENT_NODE:return e.hasAttributes()?!1:e.hasChildNodes()?Array.from(e.childNodes).every(T4):!0;default:return!0}}const gM={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},_Se=["#text","br"];Object.keys(gM).filter(e=>!_Se.includes(e)).forEach(e=>{const{[e]:t,...n}=gM;gM[e].children=n});const kSe={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]}},lA={...gM,...kSe};function R5(e){if(e!=="paste")return lA;const{u:t,abbr:n,data:o,time:r,wbr:s,bdi:i,bdo:c,...l}={...lA,ins:{children:lA.ins.children},del:{children:lA.del.children}};return l}function k2(e){const t=e.nodeName.toLowerCase();return R5().hasOwnProperty(t)||t==="span"}function M0e(e){const t=e.nodeName.toLowerCase();return gM.hasOwnProperty(t)||t==="span"}function SSe(e){return!!e&&e.nodeType===e.ELEMENT_NODE}const CSe=()=>{};function Yg(e,t,n,o){Array.from(e).forEach(r=>{const s=r.nodeName.toLowerCase();if(n.hasOwnProperty(s)&&(!n[s].isMatch||n[s].isMatch?.(r))){if(SSe(r)){const{attributes:i=[],classes:c=[],children:l,require:u=[],allowEmpty:d}=n[s];if(l&&!d&&T4(r)){pf(r);return}if(r.hasAttributes()&&(Array.from(r.attributes).forEach(({name:p})=>{p!=="class"&&!i.includes(p)&&r.removeAttribute(p)}),r.classList&&r.classList.length)){const p=c.map(f=>f==="*"?()=>!0:typeof f=="string"?b=>b===f:f instanceof RegExp?b=>f.test(b):CSe);Array.from(r.classList).forEach(f=>{p.some(b=>b(f))||r.classList.remove(f)}),r.classList.length||r.removeAttribute("class")}if(r.hasChildNodes()){if(l==="*")return;if(l)u.length&&!r.querySelector(u.join(","))?(Yg(r.childNodes,t,n,o),mM(r)):r.parentNode&&r.parentNode.nodeName==="BODY"&&k2(r)?(Yg(r.childNodes,t,n,o),Array.from(r.childNodes).some(p=>!k2(p))&&mM(r)):Yg(r.childNodes,t,l,o);else for(;r.firstChild;)pf(r.firstChild)}}}else Yg(r.childNodes,t,n,o),o&&!k2(r)&&r.nextElementSibling&&g0e(t.createElement("br"),r),mM(r)})}function _E(e,t,n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,Yg(o.body.childNodes,o,t,n),o.body.innerHTML}function E4(e){const t=Array.from(e.files);return Array.from(e.items).forEach(n=>{const o=n.getAsFile();o&&!t.find(({name:r,type:s,size:i})=>r===o.name&&s===o.type&&i===o.size)&&t.push(o)}),t}const Xr={focusable:cSe,tabbable:mSe};function Mn(e,t){const n=x.useRef();return x.useCallback(o=>{o?n.current=e(o):n.current&&n.current()},t)}function $N(){return Mn(e=>{function t(n){const{key:o,shiftKey:r,target:s}=n;if(o!=="Tab")return;const i=r?"findPrevious":"findNext",c=Xr.tabbable[i](s)||null;if(s.contains(c)){n.preventDefault(),c?.focus();return}if(e.contains(c))return;const l=r?"append":"prepend",{ownerDocument:u}=e,d=u.createElement("div");d.tabIndex=-1,e[l](d),d.addEventListener("blur",()=>e.removeChild(d)),d.focus()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[])}var Bv={exports:{}};/*! +`+n.toString()),e}}var gE,Fre,Kg,$re;gE={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1};Fre=["(","?"];Kg={")":["("],":":["?","?:"]};$re=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function Hke(e){for(var t=[],n=[],o,r,s,i;o=e.match($re);){for(r=o[0],s=e.substr(0,o.index).trim(),s&&t.push(s);i=n.pop();){if(Kg[r]){if(Kg[r][0]===i){r=Kg[r][1]||r;break}}else if(Fre.indexOf(i)>=0||gE[i]":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function Xke(e,t){var n=[],o,r,s,i,c,l;for(o=0;o{const o=new RN({}),r=new Set,s=()=>{r.forEach(M=>M())},i=M=>(r.add(M),()=>r.delete(M)),c=(M="default")=>o.data[M],l=(M,y="default")=>{o.data[y]={...o.data[y],...M},o.data[y][""]={...pH[""],...o.data[y]?.[""]},delete o.pluralForms[y]},u=(M,y)=>{l(M,y),s()},d=(M,y="default")=>{o.data[y]={...o.data[y],...M,"":{...pH[""],...o.data[y]?.[""],...M?.[""]}},delete o.pluralForms[y],s()},p=(M,y)=>{o.data={},o.pluralForms={},u(M,y)},f=(M="default",y,k,S,C)=>(o.data[M]||l(void 0,M),o.dcnpgettext(M,y,k,S,C)),b=(M="default")=>M,h=(M,y)=>{let k=f(y,void 0,M);return n?(k=n.applyFilters("i18n.gettext",k,M,y),n.applyFilters("i18n.gettext_"+b(y),k,M,y)):k},g=(M,y,k)=>{let S=f(k,y,M);return n?(S=n.applyFilters("i18n.gettext_with_context",S,M,y,k),n.applyFilters("i18n.gettext_with_context_"+b(k),S,M,y,k)):S},z=(M,y,k,S)=>{let C=f(S,void 0,M,y,k);return n?(C=n.applyFilters("i18n.ngettext",C,M,y,k,S),n.applyFilters("i18n.ngettext_"+b(S),C,M,y,k,S)):C},A=(M,y,k,S,C)=>{let R=f(C,S,M,y,k);return n?(R=n.applyFilters("i18n.ngettext_with_context",R,M,y,k,S,C),n.applyFilters("i18n.ngettext_with_context_"+b(C),R,M,y,k,S,C)):R},_=()=>g("ltr","text direction")==="rtl",v=(M,y,k)=>{const S=y?y+""+M:M;let C=!!o.data?.[k??"default"]?.[S];return n&&(C=n.applyFilters("i18n.has_translation",C,M,y,k),C=n.applyFilters("i18n.has_translation_"+b(k),C,M,y,k)),C};if(n){const M=y=>{Zke.test(y)&&s()};n.addAction("hookAdded","core/i18n",M),n.addAction("hookRemoved","core/i18n",M)}return{getLocaleData:c,setLocaleData:u,addLocaleData:d,resetLocaleData:p,subscribe:i,__:h,_x:g,_n:z,_nx:A,isRTL:_,hasTranslation:v}};function Vre(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function TN(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function fH(e,t){return function(o,r,s,i=10){const c=e[t];if(!TN(o)||!Vre(r))return;if(typeof s!="function"){console.error("The hook callback must be a function.");return}if(typeof i!="number"){console.error("If specified, the hook priority must be a number.");return}const l={callback:s,priority:i,namespace:r};if(c[o]){const u=c[o].handlers;let d;for(d=u.length;d>0&&!(i>=u[d-1].priority);d--);d===u.length?u[d]=l:u.splice(d,0,l),c.__current.forEach(p=>{p.name===o&&p.currentIndex>=d&&p.currentIndex++})}else c[o]={handlers:[l],runs:0};o!=="hookAdded"&&e.doAction("hookAdded",o,r,s,i)}}function nA(e,t,n=!1){return function(r,s){const i=e[t];if(!TN(r)||!n&&!Vre(s))return;if(!i[r])return 0;let c=0;if(n)c=i[r].handlers.length,i[r]={runs:i[r].runs,handlers:[]};else{const l=i[r].handlers;for(let u=l.length-1;u>=0;u--)l[u].namespace===s&&(l.splice(u,1),c++,i.__current.forEach(d=>{d.name===r&&d.currentIndex>=u&&d.currentIndex--}))}return r!=="hookRemoved"&&e.doAction("hookRemoved",r,s),c}}function bH(e,t){return function(o,r){const s=e[t];return typeof r<"u"?o in s&&s[o].handlers.some(i=>i.namespace===r):o in s}}function oA(e,t,n,o){return function(s,...i){const c=e[t];c[s]||(c[s]={handlers:[],runs:0}),c[s].runs++;const l=c[s].handlers;if(!l||!l.length)return n?i[0]:void 0;const u={name:s,currentIndex:0};async function d(){try{c.__current.add(u);let f=n?i[0]:void 0;for(;u.currentIndex"u"?r.__current.size>0:Array.from(r.__current).some(s=>s.name===o)}}function gH(e,t){return function(o){const r=e[t];if(TN(o))return r[o]&&r[o].runs?r[o].runs:0}}class Jke{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=fH(this,"actions"),this.addFilter=fH(this,"filters"),this.removeAction=nA(this,"actions"),this.removeFilter=nA(this,"filters"),this.hasAction=bH(this,"actions"),this.hasFilter=bH(this,"filters"),this.removeAllActions=nA(this,"actions",!0),this.removeAllFilters=nA(this,"filters",!0),this.doAction=oA(this,"actions",!1,!1),this.doActionAsync=oA(this,"actions",!1,!0),this.applyFilters=oA(this,"filters",!0,!1),this.applyFiltersAsync=oA(this,"filters",!0,!0),this.currentAction=hH(this,"actions"),this.currentFilter=hH(this,"filters"),this.doingAction=mH(this,"actions"),this.doingFilter=mH(this,"filters"),this.didAction=gH(this,"actions"),this.didFilter=gH(this,"filters")}}function Hre(){return new Jke}const Ure=Hre(),{addAction:S4,addFilter:Bn,removeAction:ME,removeFilter:zE,hasAction:Pmn,hasFilter:Xre,removeAllActions:jmn,removeAllFilters:Imn,doAction:EN,doActionAsync:e6e,applyFilters:gr,applyFiltersAsync:t6e,currentAction:Dmn,currentFilter:Fmn,doingAction:$mn,doingFilter:Vmn,didAction:Hmn,didFilter:Umn,actions:Xmn,filters:Gmn}=Ure,a0=Qke(void 0,void 0,Ure);a0.getLocaleData.bind(a0);a0.setLocaleData.bind(a0);a0.resetLocaleData.bind(a0);a0.subscribe.bind(a0);const m=a0.__.bind(a0),We=a0._x.bind(a0),Dn=a0._n.bind(a0);a0._nx.bind(a0);const jt=a0.isRTL.bind(a0);a0.hasTranslation.bind(a0);function n6e(e){const t=(n,o)=>{const{headers:r={}}=n;for(const s in r)if(s.toLowerCase()==="x-wp-nonce"&&r[s]===t.nonce)return o(n);return o({...n,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t}const Gre=(e,t)=>{let n=e.path,o,r;return typeof e.namespace=="string"&&typeof e.endpoint=="string"&&(o=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),r?n=o+"/"+r:n=o),delete e.namespace,delete e.endpoint,t({...e,path:n})},o6e=e=>(t,n)=>Gre(t,o=>{let r=o.url,s=o.path,i;return typeof s=="string"&&(i=e,e.indexOf("?")!==-1&&(s=s.replace("?","&")),s=s.replace(/^\//,""),typeof i=="string"&&i.indexOf("?")!==-1&&(s=s.replace("?","&")),r=i+s),n({...o,url:r})});function Pf(e){try{return new URL(e),!0}catch{return!1}}const r6e=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function Kre(e){return r6e.test(e)}const s6e=/^(tel:)?(\+)?\d{6,15}$/;function i6e(e){return e=e.replace(/[-.() ]/g,""),s6e.test(e)}function v5(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function WN(e){return e?/^[a-z\-.\+]+[0-9]*:$/i.test(e):!1}function NN(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function a6e(e){return e?/^[^\s#?]+$/.test(e):!1}function Aa(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function c6e(e){return e?/^[^\s#?]+$/.test(e):!1}function BN(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}function x5(e){let t="";const n=Object.entries(e);let o;for(;o=n.shift();){let[r,s]=o;if(Array.isArray(s)||s&&s.constructor===Object){const c=Object.entries(s).reverse();for(const[l,u]of c)n.unshift([`${r}[${l}]`,u])}else s!==void 0&&(s===null&&(s=""),t+="&"+[r,s].map(encodeURIComponent).join("="))}return t.substr(1)}function l6e(e){return e?/^[^\s#?\/]+$/.test(e):!1}function u6e(e){const t=Aa(e),n=BN(e);let o="/";return t&&(o+=t),n&&(o+=`?${n}`),o}function d6e(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function OE(e){return e?/^#[^\s#?\/]*$/.test(e):!1}function Y2(e){try{return decodeURIComponent(e)}catch{return e}}function p6e(e,t,n){const o=t.length,r=o-1;for(let s=0;s{const[o,r=""]=n.split("=").filter(Boolean).map(Y2);if(o){const s=o.replace(/\]/g,"").split("[");p6e(t,s,r)}return t},Object.create(null))}function tn(e="",t){if(!t||!Object.keys(t).length)return e;let n=e;const o=e.indexOf("?");return o!==-1&&(t=Object.assign(Lh(e),t),n=n.substr(0,o)),n+"?"+x5(t)}function yE(e,t){return Lh(e)[t]}function MH(e,t){return yE(e,t)!==void 0}function C4(e,...t){const n=e.indexOf("?");if(n===-1)return e;const o=Lh(e),r=e.substr(0,n);t.forEach(i=>delete o[i]);const s=x5(o);return s?r+"?"+s:r}const f6e=/^(?:[a-z]+:|#|\?|\.|\/)/i;function jf(e){return e&&(e=e.trim(),!f6e.test(e)&&!Kre(e)?"http://"+e:e)}function c3(e){try{return decodeURI(e)}catch{return e}}function Ph(e,t=null){if(!e)return"";let n=e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));const o=/\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;if(!t||n.length<=t||!n.match(o))return n;n=n.split("?")[0];const r=n.split("/"),s=r[r.length-1];if(s.length<=t)return"…"+n.slice(-t);const i=s.lastIndexOf("."),[c,l]=[s.slice(0,i),s.slice(i+1)],u=c.slice(-3)+"."+l;return s.slice(0,t-u.length-1)+"…"+u}var yg={exports:{}},zH;function b6e(){if(zH)return yg.exports;zH=1;var e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},t=Object.keys(e).join("|"),n=new RegExp(t,"g"),o=new RegExp(t,"");function r(c){return e[c]}var s=function(c){return c.replace(n,r)},i=function(c){return!!c.match(o)};return yg.exports=s,yg.exports.has=i,yg.exports.remove=s,yg.exports}var h6e=b6e();const ms=Zr(h6e);function w5(e){return e?ms(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}function If(e){let t;if(e){try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch{}if(t)return t}}function OH(e){const t=e.split("?"),n=t[1],o=t[0];return n?o+"?"+n.split("&").map(r=>r.split("=")).map(r=>r.map(decodeURIComponent)).sort((r,s)=>r[0].localeCompare(s[0])).map(r=>r.map(encodeURIComponent)).map(r=>r.join("=")).join("&"):o}function m6e(e){const t=Object.fromEntries(Object.entries(e).map(([n,o])=>[OH(n),o]));return(n,o)=>{const{parse:r=!0}=n;let s=n.path;if(!s&&n.url){const{rest_route:l,...u}=Lh(n.url);typeof l=="string"&&(s=tn(l,u))}if(typeof s!="string")return o(n);const i=n.method||"GET",c=OH(s);if(i==="GET"&&t[c]){const l=t[c];return delete t[c],yH(l,!!r)}else if(i==="OPTIONS"&&t[i]&&t[i][c]){const l=t[i][c];return delete t[i][c],yH(l,!!r)}return o(n)}}function yH(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}const g6e=({path:e,url:t,...n},o)=>({...n,url:t&&tn(t,o),path:e&&tn(e,o)}),AH=e=>e.json?e.json():Promise.reject(e),M6e=e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}},vH=e=>{const{next:t}=M6e(e.headers.get("link"));return t},z6e=e=>{const t=!!e.path&&e.path.indexOf("per_page=-1")!==-1,n=!!e.url&&e.url.indexOf("per_page=-1")!==-1;return t||n},Yre=async(e,t)=>{if(e.parse===!1||!z6e(e))return t(e);const n=await Tt({...g6e(e,{per_page:100}),parse:!1}),o=await AH(n);if(!Array.isArray(o))return o;let r=vH(n);if(!r)return o;let s=[].concat(o);for(;r;){const i=await Tt({...e,path:void 0,url:r,parse:!1}),c=await AH(i);s=s.concat(c),r=vH(i)}return s},O6e=new Set(["PATCH","PUT","DELETE"]),y6e="GET",A6e=(e,t)=>{const{method:n=y6e}=e;return O6e.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},v6e=(e,t)=>(typeof e.url=="string"&&!MH(e.url,"_locale")&&(e.url=tn(e.url,{_locale:"user"})),typeof e.path=="string"&&!MH(e.path,"_locale")&&(e.path=tn(e.path,{_locale:"user"})),t(e)),x6e=(e,t=!0)=>t?e.status===204?null:e.json?e.json():Promise.reject(e):e,w6e=e=>{const t={code:"invalid_json",message:m("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch(()=>{throw t})},Zre=(e,t=!0)=>Promise.resolve(x6e(e,t)).catch(n=>LN(n,t));function LN(e,t=!0){if(!t)throw e;return w6e(e).then(n=>{const o={code:"unknown_error",message:m("An unknown error occurred.")};throw n||o})}function _6e(e){const t=!!e.method&&e.method==="POST";return(!!e.path&&e.path.indexOf("/wp/v2/media")!==-1||!!e.url&&e.url.indexOf("/wp/v2/media")!==-1)&&t}const k6e=(e,t)=>{if(!_6e(e))return t(e);let n=0;const o=5,r=s=>(n++,t({path:`/wp/v2/media/${s}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n{if(!s.headers)return Promise.reject(s);const i=s.headers.get("x-wp-upload-attachment-id");return s.status>=500&&s.status<600&&i?r(i).catch(()=>e.parse!==!1?Promise.reject({code:"post_process",message:m("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(s)):LN(s,e.parse)}).then(s=>Zre(s,e.parse))},S6e=e=>(t,n)=>{if(typeof t.url=="string"){const o=yE(t.url,"wp_theme_preview");o===void 0?t.url=tn(t.url,{wp_theme_preview:e}):o===""&&(t.url=C4(t.url,"wp_theme_preview"))}if(typeof t.path=="string"){const o=yE(t.path,"wp_theme_preview");o===void 0?t.path=tn(t.path,{wp_theme_preview:e}):o===""&&(t.path=C4(t.path,"wp_theme_preview"))}return n(t)},C6e={Accept:"application/json, */*;q=0.1"},q6e={credentials:"include"},Qre=[v6e,Gre,A6e,Yre];function R6e(e){Qre.unshift(e)}const Jre=e=>{if(e.status>=200&&e.status<300)return e;throw e},T6e=e=>{const{url:t,path:n,data:o,parse:r=!0,...s}=e;let{body:i,headers:c}=e;return c={...C6e,...c},o&&(i=JSON.stringify(o),c["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...q6e,...s,body:i,headers:c}).then(u=>Promise.resolve(u).then(Jre).catch(d=>LN(d,r)).then(d=>Zre(d,r)),u=>{throw u&&u.name==="AbortError"?u:{code:"fetch_error",message:m("You are probably offline.")}})};let e0e=T6e;function E6e(e){e0e=e}function Tt(e){return Qre.reduceRight((n,o)=>r=>o(r,n),e0e)(e).catch(n=>n.code!=="rest_cookie_invalid_nonce"?Promise.reject(n):window.fetch(Tt.nonceEndpoint).then(Jre).then(o=>o.text()).then(o=>(Tt.nonceMiddleware.nonce=o,Tt(e))))}Tt.use=R6e;Tt.setFetchHandler=E6e;Tt.createNonceMiddleware=n6e;Tt.createPreloadingMiddleware=m6e;Tt.createRootURLMiddleware=o6e;Tt.fetchAllMiddleware=Yre;Tt.mediaUploadMiddleware=k6e;Tt.createThemePreviewMiddleware=S6e;const xH=Object.create(null);function Ke(e,t={}){const{since:n,version:o,alternative:r,plugin:s,link:i,hint:c}=t,l=s?` from ${s}`:"",u=n?` since version ${n}`:"",d=o?` and will be removed${l} in version ${o}`:"",p=r?` Please use ${r} instead.`:"",f=i?` See: ${i}`:"",b=c?` Note: ${c}`:"",h=`${e} is deprecated${u}${d}.${p}${f}${b}`;h in xH||(EN("deprecated",e,t,h),console.warn(h),xH[h]=!0)}function os(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var W6e=typeof Symbol=="function"&&Symbol.observable||"@@observable",wH=W6e,gS=()=>Math.random().toString(36).substring(7).split("").join("."),N6e={INIT:`@@redux/INIT${gS()}`,REPLACE:`@@redux/REPLACE${gS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${gS()}`},_H=N6e;function B6e(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function t0e(e,t,n){if(typeof e!="function")throw new Error(os(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(os(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(os(1));return n(t0e)(e,t)}let o=e,r=t,s=new Map,i=s,c=0,l=!1;function u(){i===s&&(i=new Map,s.forEach((z,A)=>{i.set(A,z)}))}function d(){if(l)throw new Error(os(3));return r}function p(z){if(typeof z!="function")throw new Error(os(4));if(l)throw new Error(os(5));let A=!0;u();const _=c++;return i.set(_,z),function(){if(A){if(l)throw new Error(os(6));A=!1,u(),i.delete(_),s=null}}}function f(z){if(!B6e(z))throw new Error(os(7));if(typeof z.type>"u")throw new Error(os(8));if(typeof z.type!="string")throw new Error(os(17));if(l)throw new Error(os(9));try{l=!0,r=o(r,z)}finally{l=!1}return(s=i).forEach(_=>{_()}),z}function b(z){if(typeof z!="function")throw new Error(os(10));o=z,f({type:_H.REPLACE})}function h(){const z=p;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(os(11));function _(){const M=A;M.next&&M.next(d())}return _(),{unsubscribe:z(_)}},[wH](){return this}}}return f({type:_H.INIT}),{dispatch:f,subscribe:p,getState:d,replaceReducer:b,[wH]:h}}function L6e(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function P6e(...e){return t=>(n,o)=>{const r=t(n,o);let s=()=>{throw new Error(os(15))};const i={getState:r.getState,dispatch:(l,...u)=>s(l,...u)},c=e.map(l=>l(i));return s=L6e(...c)(r.dispatch),{...r,dispatch:s}}}var MS,kH;function j6e(){if(kH)return MS;kH=1;function e(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(c){return typeof c}:e=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},e(i)}function t(i,c){if(!(i instanceof c))throw new TypeError("Cannot call a class as a function")}function n(i,c){for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(p,f){f!==null&&e(f)==="object"&&(p=p[1]),l.call(d,p,f,u)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),i}();return MS=s,MS}var I6e=j6e();const Va=Zr(I6e);function D6e(e){return!!e&&typeof e[Symbol.iterator]=="function"&&typeof e.next=="function"}var zS={},Vo={},rA={},SH;function n0e(){if(SH)return rA;SH=1,Object.defineProperty(rA,"__esModule",{value:!0});var e={all:Symbol("all"),error:Symbol("error"),fork:Symbol("fork"),join:Symbol("join"),race:Symbol("race"),call:Symbol("call"),cps:Symbol("cps"),subscribe:Symbol("subscribe")};return rA.default=e,rA}var CH;function o0e(){if(CH)return Vo;CH=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.createChannel=Vo.subscribe=Vo.cps=Vo.apply=Vo.call=Vo.invoke=Vo.delay=Vo.race=Vo.join=Vo.fork=Vo.error=Vo.all=void 0;var e=n0e(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}return Vo.all=function(r){return{type:t.default.all,value:r}},Vo.error=function(r){return{type:t.default.error,error:r}},Vo.fork=function(r){for(var s=arguments.length,i=Array(s>1?s-1:0),c=1;c1?s-1:0),c=1;c2?i-2:0),l=2;l1?s-1:0),c=1;c"u"?"undefined":e(i))==="object"&&!!i},all:function(i){return r.obj(i)&&i.type===n.default.all},error:function(i){return r.obj(i)&&i.type===n.default.error},array:Array.isArray,func:function(i){return typeof i=="function"},promise:function(i){return i&&r.func(i.then)},iterator:function(i){return i&&r.func(i.next)&&r.func(i.throw)},fork:function(i){return r.obj(i)&&i.type===n.default.fork},join:function(i){return r.obj(i)&&i.type===n.default.join},race:function(i){return r.obj(i)&&i.type===n.default.race},call:function(i){return r.obj(i)&&i.type===n.default.call},cps:function(i){return r.obj(i)&&i.type===n.default.cps},subscribe:function(i){return r.obj(i)&&i.type===n.default.subscribe},channel:function(i){return r.obj(i)&&r.func(i.subscribe)}};return iA.default=r,iA}var RH;function F6e(){if(RH)return ts;RH=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.iterator=ts.array=ts.object=ts.error=ts.any=void 0;var e=_5(),t=n(e);function n(l){return l&&l.__esModule?l:{default:l}}var o=ts.any=function(u,d,p,f){return f(u),!0},r=ts.error=function(u,d,p,f,b){return t.default.error(u)?(b(u.error),!0):!1},s=ts.object=function(u,d,p,f,b){if(!t.default.all(u)||!t.default.obj(u.value))return!1;var h={},g=Object.keys(u.value),z=0,A=!1,_=function(y,k){A||(h[y]=k,z++,z===g.length&&f(h))},v=function(y,k){A||(A=!0,b(k))};return g.map(function(M){p(u.value[M],function(y){return _(M,y)},function(y){return v(M,y)})}),!0},i=ts.array=function(u,d,p,f,b){if(!t.default.all(u)||!t.default.array(u.value))return!1;var h=[],g=0,z=!1,A=function(M,y){z||(h[M]=y,g++,g===u.value.length&&f(h))},_=function(M,y){z||(z=!0,b(y))};return u.value.map(function(v,M){p(v,function(y){return A(M,y)},function(y){return _(M,y)})}),!0},c=ts.iterator=function(u,d,p,f,b){return t.default.iterator(u)?(p(u,d,b),!0):!1};return ts.default=[r,c,i,s,o],ts}var TH;function $6e(){if(TH)return sA;TH=1,Object.defineProperty(sA,"__esModule",{value:!0});var e=F6e(),t=r(e),n=_5(),o=r(n);function r(c){return c&&c.__esModule?c:{default:c}}function s(c){if(Array.isArray(c)){for(var l=0,u=Array(c.length);l(c,l,u,d,p)=>{if(!K6e(c,s))return!1;const f=i(c);return r0e(f)?f.then(d,p):d(f),!0}),o=(s,i)=>AE(s)?(t(s),i(),!0):!1;n.push(o);const r=G6e.create(n);return s=>new Promise((i,c)=>r(s,l=>{AE(l)&&t(l),i(l)},c))}function Z6e(e={}){return t=>{const n=Y6e(e,t.dispatch);return o=>r=>D6e(r)?n(r):o(r)}}function Or(e,t){return n=>{const o=e(n);return o.displayName=Q6e(t,n),o}}const Q6e=(e,t)=>{const n=t.displayName||t.name||"Component";return`${k4(e??"")}(${n})`},F1=(e,t,n)=>{let o,r,s=0,i,c,l,u=0,d=!1,p=!1,f=!0;n&&(d=!!n.leading,p="maxWait"in n,n.maxWait!==void 0&&(s=Math.max(n.maxWait,t)),f="trailing"in n?!!n.trailing:f);function b(E){const B=o,N=r;return o=void 0,r=void 0,u=E,i=e.apply(N,B),i}function h(E,B){c=setTimeout(E,B)}function g(){c!==void 0&&clearTimeout(c)}function z(E){return u=E,h(M,t),d?b(E):i}function A(E){return E-(l||0)}function _(E){const B=A(E),N=E-u,j=t-B;return p?Math.min(j,s-N):j}function v(E){const B=A(E),N=E-u;return l===void 0||B>=t||B<0||p&&N>=s}function M(){const E=Date.now();if(v(E))return k(E);h(M,_(E))}function y(){c=void 0}function k(E){return y(),f&&o?b(E):(o=r=void 0,i)}function S(){g(),u=0,y(),o=l=r=void 0}function C(){return R()?k(Date.now()):i}function R(){return c!==void 0}function T(...E){const B=Date.now(),N=v(B);if(o=E,r=this,l=B,N){if(!R())return z(l);if(p)return h(M,t),b(l)}return R()||h(M,t),i}return T.cancel=S,T.flush=C,T.pending=R,T},PN=(e,t,n)=>{let o=!0,r=!0;return n&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),F1(e,t,{leading:o,trailing:r,maxWait:t})};function gc(){const e=new Map,t=new Map;function n(o){const r=t.get(o);if(r)for(const s of r)s()}return{get(o){return e.get(o)},set(o,r){e.set(o,r),n(o)},delete(o){e.delete(o),n(o)},subscribe(o,r){let s=t.get(o);return s||(s=new Set,t.set(o,s)),s.add(r),()=>{s.delete(r),s.size===0&&t.delete(o)}}}}const s0e=(e=!1)=>(...t)=>(...n)=>{const o=t.flat();return e&&o.reverse(),o.reduce((r,s)=>[s(...r)],n)[0]},Ku=s0e(),Co=s0e(!0);function J6e(e){return Or(t=>n=>e(n)?a.jsx(t,{...n}):null,"ifCondition")}function i0e(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=0;for(;r{if(n)return n;const o=nSe(e);return t?`${t}-${o}`:o},[e,n,t])}const oSe=Or(e=>t=>{const n=vt(e);return a.jsx(e,{...t,instanceId:n})},"instanceId"),rSe=Or(e=>class extends x.Component{constructor(n){super(n),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(n,o){const r=setTimeout(()=>{n(),this.clearTimeout(r)},o);return this.timeouts.push(r),r}clearTimeout(n){clearTimeout(n),this.timeouts=this.timeouts.filter(o=>o!==n)}render(){return a.jsx(e,{...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout})}},"withSafeTimeout");function sSe(e){return[e?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function a0e(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function iSe(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&a0e(n)}function k5(e,{sequential:t=!1}={}){const n=e.querySelectorAll(sSe(t));return Array.from(n).filter(o=>{if(!a0e(o))return!1;const{nodeName:r}=o;return r==="AREA"?iSe(o):!0})}const aSe=Object.freeze(Object.defineProperty({__proto__:null,find:k5},Symbol.toStringTag,{value:"Module"}));function vE(e){const t=e.getAttribute("tabindex");return t===null?0:parseInt(t,10)}function c0e(e){return vE(e)!==-1}function cSe(){const e={};return function(n,o){const{nodeName:r,type:s,checked:i,name:c}=o;if(r!=="INPUT"||s!=="radio"||!c)return n.concat(o);const l=e.hasOwnProperty(c);if(!(i||!l))return n;if(l){const d=e[c];n=n.filter(p=>p!==d)}return e[c]=o,n.concat(o)}}function lSe(e,t){return{element:e,index:t}}function uSe(e){return e.element}function dSe(e,t){const n=vE(e.element),o=vE(t.element);return n===o?e.index-t.index:n-o}function jN(e){return e.filter(c0e).map(lSe).sort(dSe).map(uSe).reduce(cSe(),[])}function pSe(e){return jN(k5(e))}function fSe(e){return jN(k5(e.ownerDocument.body)).reverse().find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_PRECEDING)}function bSe(e){return jN(k5(e.ownerDocument.body)).find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_FOLLOWING)}const hSe=Object.freeze(Object.defineProperty({__proto__:null,find:pSe,findNext:bSe,findPrevious:fSe,isTabbableIndex:c0e},Symbol.toStringTag,{value:"Module"}));function Wv(e){if(!e.collapsed){const s=Array.from(e.getClientRects());if(s.length===1)return s[0];const i=s.filter(({width:p})=>p>1);if(i.length===0)return e.getBoundingClientRect();if(i.length===1)return i[0];let{top:c,bottom:l,left:u,right:d}=i[0];for(const{top:p,bottom:f,left:b,right:h}of i)pl&&(l=f),bd&&(d=h);return new window.DOMRect(u,c,d-u,l-c)}const{startContainer:t}=e,{ownerDocument:n}=t;if(t.nodeName==="BR"){const{parentNode:s}=t,i=Array.from(s.childNodes).indexOf(t);e=n.createRange(),e.setStart(s,i),e.setEnd(s,i)}const o=e.getClientRects();if(o.length>1)return null;let r=o[0];if(!r||r.height===0){const s=n.createTextNode("​");e=e.cloneRange(),e.insertNode(s),r=e.getClientRects()[0],s.parentNode,s.parentNode.removeChild(s)}return r}function xE(e){const t=e.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return n?Wv(n):null}function l0e(e){e.defaultView;const t=e.defaultView.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return!!n&&!n.collapsed}function IN(e){return e?.nodeName==="INPUT"}function md(e){const t=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return IN(e)&&e.type&&!t.includes(e.type)||e.nodeName==="TEXTAREA"||e.contentEditable==="true"}function mSe(e){if(!IN(e)&&!md(e))return!1;try{const{selectionStart:t,selectionEnd:n}=e;return t===null||t!==n}catch{return!0}}function gSe(e){return l0e(e)||!!e.activeElement&&mSe(e.activeElement)}function MSe(e){return!!e.activeElement&&(IN(e.activeElement)||md(e.activeElement)||l0e(e))}function q4(e){return e.ownerDocument.defaultView,e.ownerDocument.defaultView.getComputedStyle(e)}function ps(e,t="vertical"){if(e){if((t==="vertical"||t==="all")&&e.scrollHeight>e.clientHeight){const{overflowY:n}=q4(e);if(/(auto|scroll)/.test(n))return e}if((t==="horizontal"||t==="all")&&e.scrollWidth>e.clientWidth){const{overflowX:n}=q4(e);if(/(auto|scroll)/.test(n))return e}return e.ownerDocument===e.parentNode?e:ps(e.parentNode,t)}}function S5(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function zSe(e){if(S5(e))return e.selectionStart===0&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t,o=n.getSelection(),r=o.rangeCount?o.getRangeAt(0):null;if(!r)return!0;const{startContainer:s,endContainer:i,startOffset:c,endOffset:l}=r;if(s===e&&i===e&&c===0&&l===e.childNodes.length)return!0;e.lastChild;const u=i.nodeType===i.TEXT_NODE?i.data.length:i.childNodes.length;return PH(s,e,"firstChild")&&PH(i,e,"lastChild")&&c===0&&l===u}function PH(e,t,n){let o=t;do{if(e===o)return!0;o=o[n]}while(o);return!1}function u0e(e){if(!e)return!1;const{tagName:t}=e;return S5(e)||t==="BUTTON"||t==="SELECT"}function DN(e){return q4(e).direction==="rtl"}function OSe(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map(({top:r})=>r));return Math.max(...t.map(({bottom:r})=>r))-n}function d0e(e){const{anchorNode:t,focusNode:n,anchorOffset:o,focusOffset:r}=e,s=t.compareDocumentPosition(n);return s&t.DOCUMENT_POSITION_PRECEDING?!1:s&t.DOCUMENT_POSITION_FOLLOWING?!0:s===0?o<=r:!0}function ySe(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;const o=e.caretPositionFromPoint(t,n);if(!o)return null;const r=e.createRange();return r.setStart(o.offsetNode,o.offset),r.collapse(!0),r}function p0e(e,t,n,o){const r=o.style.zIndex,s=o.style.position,{position:i="static"}=q4(o);i==="static"&&(o.style.position="relative"),o.style.zIndex="10000";const c=ySe(e,t,n);return o.style.zIndex=r,o.style.position=s,c}function f0e(e,t,n){let o=n();return(!o||!o.startContainer||!e.contains(o.startContainer))&&(e.scrollIntoView(t),o=n(),!o||!o.startContainer||!e.contains(o.startContainer))?null:o}function b0e(e,t,n=!1){if(S5(e)&&typeof e.selectionStart=="number")return e.selectionStart!==e.selectionEnd?!1:t?e.selectionStart===0:e.value.length===e.selectionStart;if(!e.isContentEditable)return!0;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return!1;const i=s.getRangeAt(0),c=i.cloneRange(),l=d0e(s),u=s.isCollapsed;u||c.collapse(!l);const d=Wv(c),p=Wv(i);if(!d||!p)return!1;const f=OSe(i);if(!u&&f&&f>d.height&&l===t)return!1;const b=DN(e)?!t:t,h=e.getBoundingClientRect(),g=b?h.left+1:h.right-1,z=t?h.top+1:h.bottom-1,A=f0e(e,t,()=>p0e(o,g,z,e));if(!A)return!1;const _=Wv(A);if(!_)return!1;const v=t?"top":"bottom",M=b?"left":"right",y=_[v]-p[v],k=_[M]-d[M],S=Math.abs(y)<=1,C=Math.abs(k)<=1;return n?S:S&&C}function OS(e,t){return b0e(e,t)}function jH(e,t){return b0e(e,t,!0)}function ASe(e,t,n){const{ownerDocument:o}=e,r=DN(e)?!t:t,s=e.getBoundingClientRect();n===void 0?n=t?s.right-1:s.left+1:n<=s.left?n=s.left+1:n>=s.right&&(n=s.right-1);const i=r?s.bottom-1:s.top+1;return p0e(o,n,i,e)}function h0e(e,t,n){if(!e)return;if(e.focus(),S5(e)){if(typeof e.selectionStart!="number")return;t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0);return}if(!e.isContentEditable)return;const o=f0e(e,t,()=>ASe(e,t,n));if(!o)return;const{ownerDocument:r}=e,{defaultView:s}=r,i=s.getSelection();i.removeAllRanges(),i.addRange(o)}function m0e(e,t){return h0e(e,t,void 0)}function vSe(e,t,n){return h0e(e,t,n?.left)}function g0e(e,t){t.parentNode,t.parentNode.insertBefore(e,t.nextSibling)}function pf(e){e.parentNode,e.parentNode.removeChild(e)}function xSe(e,t){e.parentNode,g0e(t,e.parentNode),pf(e)}function mM(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function IH(e,t){const n=e.ownerDocument.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode,e.parentNode.replaceChild(n,e),n}function Ag(e,t){t.parentNode,t.parentNode.insertBefore(e,t),e.appendChild(t)}function C5(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const n=t.getElementsByTagName("*");let o=n.length;for(;o--;){const r=n[o];if(r.tagName==="SCRIPT")pf(r);else{let s=r.attributes.length;for(;s--;){const{name:i}=r.attributes[s];i.startsWith("on")&&r.removeAttribute(i)}}}return t.innerHTML}function v1(e){e=C5(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}function R4(e){switch(e.nodeType){case e.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(e.nodeValue||"");case e.ELEMENT_NODE:return e.hasAttributes()?!1:e.hasChildNodes()?Array.from(e.childNodes).every(R4):!0;default:return!0}}const gM={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},wSe=["#text","br"];Object.keys(gM).filter(e=>!wSe.includes(e)).forEach(e=>{const{[e]:t,...n}=gM;gM[e].children=n});const _Se={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]}},cA={...gM,..._Se};function q5(e){if(e!=="paste")return cA;const{u:t,abbr:n,data:o,time:r,wbr:s,bdi:i,bdo:c,...l}={...cA,ins:{children:cA.ins.children},del:{children:cA.del.children}};return l}function k2(e){const t=e.nodeName.toLowerCase();return q5().hasOwnProperty(t)||t==="span"}function M0e(e){const t=e.nodeName.toLowerCase();return gM.hasOwnProperty(t)||t==="span"}function kSe(e){return!!e&&e.nodeType===e.ELEMENT_NODE}const SSe=()=>{};function Yg(e,t,n,o){Array.from(e).forEach(r=>{const s=r.nodeName.toLowerCase();if(n.hasOwnProperty(s)&&(!n[s].isMatch||n[s].isMatch?.(r))){if(kSe(r)){const{attributes:i=[],classes:c=[],children:l,require:u=[],allowEmpty:d}=n[s];if(l&&!d&&R4(r)){pf(r);return}if(r.hasAttributes()&&(Array.from(r.attributes).forEach(({name:p})=>{p!=="class"&&!i.includes(p)&&r.removeAttribute(p)}),r.classList&&r.classList.length)){const p=c.map(f=>f==="*"?()=>!0:typeof f=="string"?b=>b===f:f instanceof RegExp?b=>f.test(b):SSe);Array.from(r.classList).forEach(f=>{p.some(b=>b(f))||r.classList.remove(f)}),r.classList.length||r.removeAttribute("class")}if(r.hasChildNodes()){if(l==="*")return;if(l)u.length&&!r.querySelector(u.join(","))?(Yg(r.childNodes,t,n,o),mM(r)):r.parentNode&&r.parentNode.nodeName==="BODY"&&k2(r)?(Yg(r.childNodes,t,n,o),Array.from(r.childNodes).some(p=>!k2(p))&&mM(r)):Yg(r.childNodes,t,l,o);else for(;r.firstChild;)pf(r.firstChild)}}}else Yg(r.childNodes,t,n,o),o&&!k2(r)&&r.nextElementSibling&&g0e(t.createElement("br"),r),mM(r)})}function wE(e,t,n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,Yg(o.body.childNodes,o,t,n),o.body.innerHTML}function T4(e){const t=Array.from(e.files);return Array.from(e.items).forEach(n=>{const o=n.getAsFile();o&&!t.find(({name:r,type:s,size:i})=>r===o.name&&s===o.type&&i===o.size)&&t.push(o)}),t}const Xr={focusable:aSe,tabbable:hSe};function Mn(e,t){const n=x.useRef();return x.useCallback(o=>{o?n.current=e(o):n.current&&n.current()},t)}function FN(){return Mn(e=>{function t(n){const{key:o,shiftKey:r,target:s}=n;if(o!=="Tab")return;const i=r?"findPrevious":"findNext",c=Xr.tabbable[i](s)||null;if(s.contains(c)){n.preventDefault(),c?.focus();return}if(e.contains(c))return;const l=r?"append":"prepend",{ownerDocument:u}=e,d=u.createElement("div");d.tabIndex=-1,e[l](d),d.addEventListener("blur",()=>e.removeChild(d)),d.focus()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[])}var Nv={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha - */var qSe=Bv.exports,DH;function RSe(){return DH||(DH=1,function(e,t){(function(o,r){e.exports=r()})(qSe,function(){return function(){var n={686:function(s,i,c){c.d(i,{default:function(){return V}});var l=c(279),u=c.n(l),d=c(370),p=c.n(d),f=c(817),b=c.n(f);function h(ee){try{return document.execCommand(ee)}catch{return!1}}var g=function(te){var J=b()(te);return h("cut"),J},z=g;function A(ee){var te=document.documentElement.getAttribute("dir")==="rtl",J=document.createElement("textarea");J.style.fontSize="12pt",J.style.border="0",J.style.padding="0",J.style.margin="0",J.style.position="absolute",J.style[te?"right":"left"]="-9999px";var ue=window.pageYOffset||document.documentElement.scrollTop;return J.style.top="".concat(ue,"px"),J.setAttribute("readonly",""),J.value=ee,J}var _=function(te,J){var ue=A(te);J.container.appendChild(ue);var ce=b()(ue);return h("copy"),ue.remove(),ce},v=function(te){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},ue="";return typeof te=="string"?ue=_(te,J):te instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(te?.type)?ue=_(te.value,J):(ue=b()(te),h("copy")),ue},M=v;function y(ee){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(J){return typeof J}:y=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},y(ee)}var k=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=te.action,ue=J===void 0?"copy":J,ce=te.container,me=te.target,de=te.text;if(ue!=="copy"&&ue!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(me!==void 0)if(me&&y(me)==="object"&&me.nodeType===1){if(ue==="copy"&&me.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(ue==="cut"&&(me.hasAttribute("readonly")||me.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(de)return M(de,{container:ce});if(me)return ue==="cut"?z(me):M(me,{container:ce})},S=k;function C(ee){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?C=function(J){return typeof J}:C=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},C(ee)}function R(ee,te){if(!(ee instanceof te))throw new TypeError("Cannot call a class as a function")}function T(ee,te){for(var J=0;J"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function F(ee){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},F(ee)}function X(ee,te){var J="data-clipboard-".concat(ee);if(te.hasAttribute(J))return te.getAttribute(J)}var Z=function(ee){B(J,ee);var te=j(J);function J(ue,ce){var me;return R(this,J),me=te.call(this),me.resolveOptions(ce),me.listenClick(ue),me}return E(J,[{key:"resolveOptions",value:function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof ce.action=="function"?ce.action:this.defaultAction,this.target=typeof ce.target=="function"?ce.target:this.defaultTarget,this.text=typeof ce.text=="function"?ce.text:this.defaultText,this.container=C(ce.container)==="object"?ce.container:document.body}},{key:"listenClick",value:function(ce){var me=this;this.listener=p()(ce,"click",function(de){return me.onClick(de)})}},{key:"onClick",value:function(ce){var me=ce.delegateTarget||ce.currentTarget,de=this.action(me)||"copy",Ae=S({action:de,container:this.container,target:this.target(me),text:this.text(me)});this.emit(Ae?"success":"error",{action:de,text:Ae,trigger:me,clearSelection:function(){me&&me.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(ce){return X("action",ce)}},{key:"defaultTarget",value:function(ce){var me=X("target",ce);if(me)return document.querySelector(me)}},{key:"defaultText",value:function(ce){return X("text",ce)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(ce){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return M(ce,me)}},{key:"cut",value:function(ce){return z(ce)}},{key:"isSupported",value:function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],me=typeof ce=="string"?[ce]:ce,de=!!document.queryCommandSupported;return me.forEach(function(Ae){de=de&&!!document.queryCommandSupported(Ae)}),de}}]),J}(u()),V=Z},828:function(s){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function l(u,d){for(;u&&u.nodeType!==i;){if(typeof u.matches=="function"&&u.matches(d))return u;u=u.parentNode}}s.exports=l},438:function(s,i,c){var l=c(828);function u(f,b,h,g,z){var A=p.apply(this,arguments);return f.addEventListener(h,A,z),{destroy:function(){f.removeEventListener(h,A,z)}}}function d(f,b,h,g,z){return typeof f.addEventListener=="function"?u.apply(null,arguments):typeof h=="function"?u.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(A){return u(A,b,h,g,z)}))}function p(f,b,h,g){return function(z){z.delegateTarget=l(z.target,b),z.delegateTarget&&g.call(f,z)}}s.exports=d},879:function(s,i){i.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},i.nodeList=function(c){var l=Object.prototype.toString.call(c);return c!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in c&&(c.length===0||i.node(c[0]))},i.string=function(c){return typeof c=="string"||c instanceof String},i.fn=function(c){var l=Object.prototype.toString.call(c);return l==="[object Function]"}},370:function(s,i,c){var l=c(879),u=c(438);function d(h,g,z){if(!h&&!g&&!z)throw new Error("Missing required arguments");if(!l.string(g))throw new TypeError("Second argument must be a String");if(!l.fn(z))throw new TypeError("Third argument must be a Function");if(l.node(h))return p(h,g,z);if(l.nodeList(h))return f(h,g,z);if(l.string(h))return b(h,g,z);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(h,g,z){return h.addEventListener(g,z),{destroy:function(){h.removeEventListener(g,z)}}}function f(h,g,z){return Array.prototype.forEach.call(h,function(A){A.addEventListener(g,z)}),{destroy:function(){Array.prototype.forEach.call(h,function(A){A.removeEventListener(g,z)})}}}function b(h,g,z){return u(document.body,h,g,z)}s.exports=d},817:function(s){function i(c){var l;if(c.nodeName==="SELECT")c.focus(),l=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var u=c.hasAttribute("readonly");u||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),u||c.removeAttribute("readonly"),l=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var d=window.getSelection(),p=document.createRange();p.selectNodeContents(c),d.removeAllRanges(),d.addRange(p),l=d.toString()}return l}s.exports=i},279:function(s){function i(){}i.prototype={on:function(c,l,u){var d=this.e||(this.e={});return(d[c]||(d[c]=[])).push({fn:l,ctx:u}),this},once:function(c,l,u){var d=this;function p(){d.off(c,p),l.apply(u,arguments)}return p._=l,this.on(c,p,u)},emit:function(c){var l=[].slice.call(arguments,1),u=((this.e||(this.e={}))[c]||[]).slice(),d=0,p=u.length;for(d;d{t.current=e},[e]),t}function Ul(e,t){const n=FH(e),o=FH(t);return Mn(r=>{const s=new ESe(r,{text(){return typeof n.current=="function"?n.current():n.current||""}});return s.on("success",({clearSelection:i})=>{i(),o.current&&o.current()}),()=>{s.destroy()}},[])}function pa(e=null){if(!e){if(typeof window>"u")return!1;e=window}const{platform:t}=e.navigator;return t.indexOf("Mac")!==-1||["iPad","iPhone"].includes(t)}const Mc=8,Z2=9,Gr=13,gd=27,VN=32,WSe=33,NSe=34,FM=35,S2=36,wi=37,cc=38,_i=39,Ps=40,Ol=46,BSe=121,ta="alt",Ga="ctrl",Up="meta",na="shift";function z0e(e){return e.length<2?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function l3(e,t){return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}const T5={primary:e=>e()?[Up]:[Ga],primaryShift:e=>e()?[na,Up]:[Ga,na],primaryAlt:e=>e()?[ta,Up]:[Ga,ta],secondary:e=>e()?[na,ta,Up]:[Ga,na,ta],access:e=>e()?[Ga,ta]:[na,ta],ctrl:()=>[Ga],alt:()=>[ta],ctrlShift:()=>[Ga,na],shift:()=>[na],shiftAlt:()=>[na,ta],undefined:()=>[]},LSe=l3(T5,e=>(t,n=pa)=>[...e(n),t.toLowerCase()].join("+")),O0e=l3(T5,e=>(t,n=pa)=>{const o=n(),r={[ta]:o?"⌥":"Alt",[Ga]:o?"⌃":"Ctrl",[Up]:"⌘",[na]:o?"⇧":"Shift"};return[...e(n).reduce((i,c)=>{var l;const u=(l=r[c])!==null&&l!==void 0?l:c;return o?[...i,u]:[...i,u,"+"]},[]),z0e(t)]}),j1=l3(O0e,e=>(t,n=pa)=>e(t,n).join("")),y0e=l3(T5,e=>(t,n=pa)=>{const o=n(),r={[na]:"Shift",[Up]:o?"Command":"Control",[Ga]:"Control",[ta]:o?"Option":"Alt",",":m("Comma"),".":m("Period"),"`":m("Backtick"),"~":m("Tilde")};return[...e(n),t].map(s=>{var i;return z0e((i=r[s])!==null&&i!==void 0?i:s)}).join(o?" ":" + ")});function PSe(e){return[ta,Ga,Up,na].filter(t=>e[`${t}Key`])}const lc=l3(T5,e=>(t,n,o=pa)=>{const r=e(o),s=PSe(t),i={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},c=r.filter(d=>!s.includes(d)),l=s.filter(d=>!r.includes(d));if(c.length>0||l.length>0)return!1;let u=t.key.toLowerCase();return n?(t.altKey&&n.length===1&&(u=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&n.length===1&&i[t.code]&&(u=i[t.code]),n==="del"&&(n="delete"),u===n.toLowerCase()):r.includes(u)});function E5(e="firstElement"){const t=x.useRef(e),n=r=>{r.focus({preventScroll:!0})},o=x.useRef();return x.useEffect(()=>{t.current=e},[e]),Mn(r=>{var s;if(!(!r||t.current===!1)&&!r.contains((s=r.ownerDocument?.activeElement)!==null&&s!==void 0?s:null)){if(t.current!=="firstElement"){n(r);return}return o.current=setTimeout(()=>{const i=Xr.tabbable.find(r)[0];i&&n(i)},0),()=>{o.current&&clearTimeout(o.current)}}},[])}let uA=null;function HN(e){const t=x.useRef(null),n=x.useRef(null),o=x.useRef(e);return x.useEffect(()=>{o.current=e},[e]),x.useCallback(r=>{if(r){var s;if(t.current=r,n.current)return;const c=r.ownerDocument.activeElement instanceof window.HTMLIFrameElement?r.ownerDocument.activeElement.contentDocument:r.ownerDocument;n.current=(s=c?.activeElement)!==null&&s!==void 0?s:null}else if(n.current){const c=t.current?.contains(t.current?.ownerDocument.activeElement);if(t.current?.isConnected&&!c){var i;(i=uA)!==null&&i!==void 0||(uA=n.current);return}o.current?o.current():(n.current.isConnected?n.current:uA)?.focus(),uA=null}},[])}const jSe=["button","submit"];function ISe(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return jSe.includes(e.type)}return!1}function A0e(e){const t=x.useRef(e);x.useEffect(()=>{t.current=e},[e]);const n=x.useRef(!1),o=x.useRef(),r=x.useCallback(()=>{clearTimeout(o.current)},[]);x.useEffect(()=>()=>r(),[]),x.useEffect(()=>{e||r()},[e,r]);const s=x.useCallback(c=>{const{type:l,target:u}=c;["mouseup","touchend"].includes(l)?n.current=!1:ISe(u)&&(n.current=!0)},[]),i=x.useCallback(c=>{if(c.persist(),n.current)return;const l=c.target.getAttribute("data-unstable-ignore-focus-outside-for-relatedtarget");l&&c.relatedTarget?.closest(l)||(o.current=setTimeout(()=>{if(!document.hasFocus()){c.preventDefault();return}typeof t.current=="function"&&t.current(c)},0))},[]);return{onFocus:r,onMouseDown:s,onMouseUp:s,onTouchStart:s,onTouchEnd:s,onBlur:i}}function dA(e,t){typeof e=="function"?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function xn(e){const t=x.useRef(),n=x.useRef(!1),o=x.useRef(!1),r=x.useRef([]),s=x.useRef(e);return s.current=e,x.useLayoutEffect(()=>{o.current===!1&&n.current===!0&&e.forEach((i,c)=>{const l=r.current[c];i!==l&&(dA(l,null),dA(i,t.current))}),r.current=e},e),x.useLayoutEffect(()=>{o.current=!1}),x.useCallback(i=>{dA(t,i),o.current=!0,n.current=i!==null;const c=i?s.current:r.current;for(const l of c)dA(l,i)},[])}function v0e(e){const t=x.useRef(),{constrainTabbing:n=e.focusOnMount!==!1}=e;x.useEffect(()=>{t.current=e},Object.values(e));const o=$N(),r=E5(e.focusOnMount),s=HN(),i=A0e(l=>{t.current?.__unstableOnClose?t.current.__unstableOnClose("focus-outside",l):t.current?.onClose&&t.current.onClose()}),c=x.useCallback(l=>{l&&l.addEventListener("keydown",u=>{u.keyCode===gd&&!u.defaultPrevented&&t.current?.onClose&&(u.preventDefault(),t.current.onClose())})},[]);return[xn([n?o:null,e.focusOnMount!==!1?s:null,e.focusOnMount!==!1?r:null,c]),{...i,tabIndex:-1}]}function UN({isDisabled:e=!1}={}){return Mn(t=>{if(e)return;const n=t?.ownerDocument?.defaultView;if(!n)return;const o=[],r=()=>{t.childNodes.forEach(c=>{c instanceof n.HTMLElement&&(c.getAttribute("inert")||(c.setAttribute("inert","true"),o.push(()=>{c.removeAttribute("inert")})))})},s=F1(r,0,{leading:!0});r();const i=new window.MutationObserver(s);return i.observe(t,{childList:!0}),()=>{i&&i.disconnect(),s.cancel(),o.forEach(c=>c())}},[e])}function Ts(e){const t=x.useRef(()=>{throw new Error("Callbacks created with `useEvent` cannot be called during rendering.")});return x.useInsertionEffect(()=>{t.current=e}),x.useCallback((...n)=>t.current?.(...n),[])}const XN=typeof window<"u"?x.useLayoutEffect:x.useEffect;function x0e({onDragStart:e,onDragMove:t,onDragEnd:n}){const[o,r]=x.useState(!1),s=x.useRef({onDragStart:e,onDragMove:t,onDragEnd:n});XN(()=>{s.current.onDragStart=e,s.current.onDragMove=t,s.current.onDragEnd=n},[e,t,n]);const i=x.useCallback(u=>s.current.onDragMove&&s.current.onDragMove(u),[]),c=x.useCallback(u=>{s.current.onDragEnd&&s.current.onDragEnd(u),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),r(!1)},[]),l=x.useCallback(u=>{s.current.onDragStart&&s.current.onDragStart(u),document.addEventListener("mousemove",i),document.addEventListener("mouseup",c),r(!0)},[]);return x.useEffect(()=>()=>{o&&(document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c))},[o]),{startDrag:l,endDrag:c,isDragging:o}}const $H=new Map;function DSe(e){if(!e)return null;let t=$H.get(e);return t||(typeof window<"u"&&typeof window.matchMedia=="function"?(t=window.matchMedia(e),$H.set(e,t),t):null)}function GN(e){const t=x.useMemo(()=>{const n=DSe(e);return{subscribe(o){return n?(n.addEventListener?.("change",o),()=>{n.removeEventListener?.("change",o)}):()=>{}},getValue(){var o;return(o=n?.matches)!==null&&o!==void 0?o:!1}}},[e]);return x.useSyncExternalStore(t.subscribe,t.getValue,()=>!1)}function Fr(e){const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}const $1=()=>GN("(prefers-reduced-motion: reduce)");function FSe(e,t){const n={...e};return Object.entries(t).forEach(([o,r])=>{n[o]?n[o]={...n[o],to:r.to}:n[o]=r}),n}const VH=(e,t)=>{const n=e?.findIndex(({id:r})=>typeof r=="string"?r===t.id:ds(r,t.id)),o=[...e];return n!==-1?o[n]={id:t.id,changes:FSe(o[n].changes,t.changes)}:o.push(t),o};function $Se(){let e=[],t=[],n=0;const o=()=>{e=e.slice(0,n||void 0),n=0},r=()=>{var i;const c=e.length===0?0:e.length-1;let l=(i=e[c])!==null&&i!==void 0?i:[];t.forEach(u=>{l=VH(l,u)}),t=[],e[c]=l},s=i=>!i.filter(({changes:l})=>Object.values(l).some(({from:u,to:d})=>typeof u!="function"&&typeof d!="function"&&!ds(u,d))).length;return{addRecord(i,c=!1){const l=!i||s(i);if(c){if(l)return;i.forEach(u=>{t=VH(t,u)})}else{if(o(),t.length&&r(),l)return;e.push(i)}},undo(){t.length&&(o(),r());const i=e[e.length-1+n];if(i)return n-=1,i},redo(){const i=e[e.length+n];if(i)return n+=1,i},hasUndo(){return!!e[e.length-1+n]},hasRedo(){return!!e[e.length+n]}}}const HH={xhuge:1920,huge:1440,wide:1280,xlarge:1080,large:960,medium:782,small:600,mobile:480},VSe={">=":"min-width","<":"max-width"},HSe={">=":(e,t)=>t>=e,"<":(e,t)=>t=")=>{const n=x.useContext(w0e),o=!n&&`(${VSe[t]}: ${HH[e]}px)`,r=GN(o||void 0);return n?HSe[t](HH[e],n):r};Yn.__experimentalWidthProvider=w0e.Provider;function _0e(e,t={}){const n=Ts(e),o=x.useRef(),r=x.useRef();return Ts(s=>{var i;if(s===o.current)return;(i=r.current)!==null&&i!==void 0||(r.current=new ResizeObserver(n));const{current:c}=r;o.current&&c.unobserve(o.current),o.current=s,s&&c.observe(s,t)})}const USe=e=>{let t;if(!e.contentBoxSize)t=[e.contentRect.width,e.contentRect.height];else if(e.contentBoxSize[0]){const r=e.contentBoxSize[0];t=[r.inlineSize,r.blockSize]}else{const r=e.contentBoxSize;t=[r.inlineSize,r.blockSize]}const[n,o]=t.map(r=>Math.round(r));return{width:n,height:o}},XSe={position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1};function GSe({onResize:e}){const t=_0e(n=>{const o=USe(n.at(-1));e(o)});return a.jsx("div",{ref:t,style:XSe,"aria-hidden":"true"})}function KSe(e,t){return e.width===t.width&&e.height===t.height}const UH={width:null,height:null};function YSe(){const[e,t]=x.useState(UH),n=x.useRef(UH),o=x.useCallback(s=>{KSe(n.current,s)||(n.current=s,t(s))},[]);return[a.jsx(GSe,{onResize:o}),e]}function js(e,t={}){return e?_0e(e,t):YSe()}var AS={exports:{}},XH;function ZSe(){return XH||(XH=1,function(e){(function(t){e.exports?e.exports=t():window.idleCallbackShim=t()})(function(){var t,n,o,r,s=typeof window<"u"?window:typeof p1!=null?p1:this||{},i=s.cancelRequestAnimationFrame&&s.requestAnimationFrame||setTimeout,c=s.cancelRequestAnimationFrame||clearTimeout,l=[],u=0,d=!1,p=7,f=35,b=125,h=0,g=0,z=0,A={get didTimeout(){return!1},timeRemaining:function(){var B=p-(Date.now()-g);return B<0?0:B}},_=v(function(){p=22,b=66,f=0});function v(B){var N,j,I=99,P=function(){var $=Date.now()-j;$9?o=setTimeout(S,n):(n=0,S()))}function R(){var B,N,j,I=p>9?9:1;if(g=Date.now(),d=!1,o=null,u>2||g-n-50I;N++)B=l.shift(),z++,B&&B(A);l.length?C():u=0}function T(B){return h++,l.push(B),C(),h}function E(B){var N=B-1-z;l[N]&&(l[N]=null)}if(!s.requestIdleCallback||!s.cancelIdleCallback)s.requestIdleCallback=T,s.cancelIdleCallback=E,s.document&&document.addEventListener&&(s.addEventListener("scroll",y,!0),s.addEventListener("resize",y),document.addEventListener("focus",y,!0),document.addEventListener("mouseover",y,!0),["click","keypress","touchstart","mousedown"].forEach(function(B){document.addEventListener(B,y,{capture:!0,passive:!0})}),s.MutationObserver&&new MutationObserver(y).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));else try{s.requestIdleCallback(function(){},{timeout:0})}catch{(function(N){var j,I;if(s.requestIdleCallback=function(P,$){return $&&typeof $.timeout=="number"?N(P,$.timeout):N(P)},s.IdleCallbackDeadline&&(j=IdleCallbackDeadline.prototype)){if(I=Object.getOwnPropertyDescriptor(j,"timeRemaining"),!I||!I.configurable||!I.get)return;Object.defineProperty(j,"timeRemaining",{value:function(){return I.get.call(this)},enumerable:!0,configurable:!0})}})(s.requestIdleCallback)}return{request:T,cancel:E}})}(AS)),AS.exports}ZSe();function QSe(){return typeof window>"u"?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback}const GH=QSe(),KN=()=>{const e=new Map;let t=!1;const n=c=>{for(const[l,u]of e)if(e.delete(l),u(),typeof c=="number"||c.timeRemaining()<=0)break;if(e.size===0){t=!1;return}GH(n)};return{add:(c,l)=>{e.set(c,l),t||(t=!0,GH(n))},flush:c=>{const l=e.get(c);return l===void 0?!1:(e.delete(c),l(),!0)},cancel:c=>e.delete(c),reset:()=>{e.clear(),t=!1}}};function JSe(e,t){const n=[];for(let o=0;o{let s=JSe(e,o);s.length{hs.flushSync(()=>{r(l=>[...l,...e.slice(c,c+n)])})});return()=>i.reset()},[e]),o}function eCe(e,t){if(e.length!==t.length)return!1;for(var n=0;nF1(e,t??0,n),[e,t,n]);return x.useEffect(()=>()=>o.cancel(),[o]),o}function S0e(e=""){const[t,n]=x.useState(e),[o,r]=x.useState(e),s=C1(r,250);return x.useEffect(()=>{s(t)},[t,s]),[t,n,o]}function kE(e,t,n){const o=k0e(()=>jN(e,t??0,n),[e,t,n]);return x.useEffect(()=>()=>o.cancel(),[o]),o}function W5({dropZoneElement:e,isDisabled:t,onDrop:n,onDragStart:o,onDragEnter:r,onDragLeave:s,onDragEnd:i,onDragOver:c}){const l=Ts(n),u=Ts(o),d=Ts(r),p=Ts(s),f=Ts(i),b=Ts(c);return Mn(h=>{if(t)return;const g=e??h;let z=!1;const{ownerDocument:A}=g;function _(R){const{defaultView:T}=A;if(!R||!T||!(R instanceof T.HTMLElement)||!g.contains(R))return!1;let E=R;do if(E.dataset.isDropZone)return E===g;while(E=E.parentElement);return!1}function v(R){z||(z=!0,A.addEventListener("dragend",C),A.addEventListener("mousemove",C),o&&u(R))}function M(R){R.preventDefault(),!g.contains(R.relatedTarget)&&r&&d(R)}function y(R){!R.defaultPrevented&&c&&b(R),R.preventDefault()}function k(R){_(R.relatedTarget)||s&&p(R)}function S(R){R.defaultPrevented||(R.preventDefault(),R.dataTransfer&&R.dataTransfer.files.length,n&&l(R),C(R))}function C(R){z&&(z=!1,A.removeEventListener("dragend",C),A.removeEventListener("mousemove",C),i&&f(R))}return g.setAttribute("data-is-drop-zone","true"),g.addEventListener("drop",S),g.addEventListener("dragenter",M),g.addEventListener("dragover",y),g.addEventListener("dragleave",k),A.addEventListener("dragenter",v),()=>{g.removeAttribute("data-is-drop-zone"),g.removeEventListener("drop",S),g.removeEventListener("dragenter",M),g.removeEventListener("dragover",y),g.removeEventListener("dragleave",k),A.removeEventListener("dragend",C),A.removeEventListener("mousemove",C),A.removeEventListener("dragenter",v)}},[t,e])}function C0e(){return Mn(e=>{const{ownerDocument:t}=e;if(!t)return;const{defaultView:n}=t;if(!n)return;function o(){t&&t.activeElement===e&&e.focus()}return n.addEventListener("blur",o),()=>{n.removeEventListener("blur",o)}},[])}const tCe=30;function nCe(e,t,n,o){var r,s;const i=(r=o?.initWindowSize)!==null&&r!==void 0?r:tCe,c=(s=o?.useWindowing)!==null&&s!==void 0?s:!0,[l,u]=x.useState({visibleItems:i,start:0,end:i,itemInView:d=>d>=0&&d<=i});return x.useLayoutEffect(()=>{if(!c)return;const d=ps(e.current),p=b=>{var h;if(!d)return;const g=Math.ceil(d.clientHeight/t),z=b?g:(h=o?.windowOverscan)!==null&&h!==void 0?h:g,A=Math.floor(d.scrollTop/t),_=Math.max(0,A-z),v=Math.min(n-1,A+g+z);u(M=>{const y={visibleItems:g,start:_,end:v,itemInView:k=>_<=k&&k<=v};return M.start!==y.start||M.end!==y.end||M.visibleItems!==y.visibleItems?y:M})};p(!0);const f=F1(()=>{p()},16);return d?.addEventListener("scroll",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),()=>{d?.removeEventListener("scroll",f),d?.ownerDocument?.defaultView?.removeEventListener("resize",f)}},[t,e,n,o?.expandedState,o?.windowOverscan,c]),x.useLayoutEffect(()=>{if(!c)return;const d=ps(e.current),p=f=>{switch(f.keyCode){case S2:return d?.scrollTo({top:0});case FM:return d?.scrollTo({top:n*t});case WSe:return d?.scrollTo({top:d.scrollTop-l.visibleItems*t});case NSe:return d?.scrollTo({top:d.scrollTop+l.visibleItems*t})}};return d?.ownerDocument?.defaultView?.addEventListener("keydown",p),()=>{d?.ownerDocument?.defaultView?.removeEventListener("keydown",p)}},[n,t,e,l.visibleItems,c,o?.expandedState]),[l,u]}function $M(e,t){const[n,o]=x.useMemo(()=>[r=>e.subscribe(t,r),()=>e.get(t)],[e,t]);return x.useSyncExternalStore(n,o,o)}function q0e(e){const t=Object.keys(e);return function(o={},r){const s={};let i=!1;for(const c of t){const l=e[c],u=o[c],d=l(u,r);s[c]=d,i=i||d!==u}return i?s:o}}function At(e){const t=new WeakMap,n=(...o)=>{let r=t.get(n.registry);return r||(r=e(n.registry.select),t.set(n.registry,r)),r(...o)};return n.isRegistrySelector=!0,n}function vS(e){return e.isRegistryControl=!0,e}const oCe="@@data/SELECT",rCe="@@data/RESOLVE_SELECT",sCe="@@data/DISPATCH",iCe={[oCe]:vS(e=>({storeKey:t,selectorName:n,args:o})=>e.select(t)[n](...o)),[rCe]:vS(e=>({storeKey:t,selectorName:n,args:o})=>{const r=e.select(t)[n].hasResolver?"resolveSelect":"select";return e[r](t)[n](...o)}),[sCe]:vS(e=>({storeKey:t,actionName:n,args:o})=>e.dispatch(t)[n](...o))},aCe=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/commands","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/format-library","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/router","@wordpress/dataviews","@wordpress/fields","@wordpress/media-utils","@wordpress/upload-media"],KH=[],cCe=!globalThis.IS_WORDPRESS_CORE,P0=(e,t)=>{if(!aCe.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!cCe&&KH.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);return KH.push(t),{lock:lCe,unlock:uCe}};function lCe(e,t){if(!e)throw new Error("Cannot lock an undefined object.");const n=e;MM in n||(n[MM]={}),R0e.set(n[MM],t)}function uCe(e){if(!e)throw new Error("Cannot unlock an undefined object.");const t=e;if(!(MM in t))throw new Error("Cannot unlock an object that was not locked before. ");return R0e.get(t[MM])}const R0e=new WeakMap,MM=Symbol("Private API ID"),{lock:Zg,unlock:Db}=P0("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/data"),dCe=()=>e=>t=>r0e(t)?t.then(n=>{if(n)return e(n)}):e(t),pCe=(e,t)=>()=>n=>o=>{const r=e.select(t).getCachedResolvers();return Object.entries(r).forEach(([i,c])=>{const l=e.stores[t]?.resolvers?.[i];!l||!l.shouldInvalidate||c.forEach((u,d)=>{u!==void 0&&(u.status!=="finished"&&u.status!=="error"||l.shouldInvalidate(o,...d)&&e.dispatch(t).invalidateResolution(i,d))})}),n(o)};function fCe(e){return()=>t=>n=>typeof n=="function"?n(e):t(n)}const bCe=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}};function Lu(e){if(e==null)return[];const t=e.length;let n=t;for(;n>0&&e[n-1]===void 0;)n--;return n===t?e:e.slice(0,n)}const hCe=bCe("selectorName")((e=new Va,t)=>{switch(t.type){case"START_RESOLUTION":{const n=new Va(e);return n.set(Lu(t.args),{status:"resolving"}),n}case"FINISH_RESOLUTION":{const n=new Va(e);return n.set(Lu(t.args),{status:"finished"}),n}case"FAIL_RESOLUTION":{const n=new Va(e);return n.set(Lu(t.args),{status:"error",error:t.error}),n}case"START_RESOLUTIONS":{const n=new Va(e);for(const o of t.args)n.set(Lu(o),{status:"resolving"});return n}case"FINISH_RESOLUTIONS":{const n=new Va(e);for(const o of t.args)n.set(Lu(o),{status:"finished"});return n}case"FAIL_RESOLUTIONS":{const n=new Va(e);return t.args.forEach((o,r)=>{const s={status:"error",error:void 0},i=t.errors[r];i&&(s.error=i),n.set(Lu(o),s)}),n}case"INVALIDATE_RESOLUTION":{const n=new Va(e);return n.delete(Lu(t.args)),n}}return e}),mCe=(e={},t)=>{switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":{if(t.selectorName in e){const{[t.selectorName]:n,...o}=e;return o}return e}case"START_RESOLUTION":case"FINISH_RESOLUTION":case"FAIL_RESOLUTION":case"START_RESOLUTIONS":case"FINISH_RESOLUTIONS":case"FAIL_RESOLUTIONS":case"INVALIDATE_RESOLUTION":return hCe(e,t)}return e};var xS={};function gCe(e){return[e]}function MCe(e){return!!e&&typeof e=="object"}function zCe(){var e={clear:function(){e.head=null}};return e}function YH(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;oArray.from(t._map.values()).some(n=>n[1]?.status==="resolving"))}const kCe=It(e=>{const t={};return Object.values(e).forEach(n=>Array.from(n._map.values()).forEach(o=>{var r;const s=(r=o[1]?.status)!==null&&r!==void 0?r:"error";t[s]||(t[s]=0),t[s]++})),t},e=>[e]),SCe=Object.freeze(Object.defineProperty({__proto__:null,countSelectorsByStatus:kCe,getCachedResolvers:wCe,getIsResolving:OCe,getResolutionError:vCe,getResolutionState:Df,hasFinishedResolution:yCe,hasResolutionFailed:ACe,hasResolvingSelectors:_Ce,hasStartedResolution:T0e,isResolving:xCe},Symbol.toStringTag,{value:"Module"}));function E0e(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function W0e(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function N0e(e,t,n){return{type:"FAIL_RESOLUTION",selectorName:e,args:t,error:n}}function CCe(e,t){return{type:"START_RESOLUTIONS",selectorName:e,args:t}}function qCe(e,t){return{type:"FINISH_RESOLUTIONS",selectorName:e,args:t}}function RCe(e,t,n){return{type:"FAIL_RESOLUTIONS",selectorName:e,args:t,errors:n}}function TCe(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function ECe(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function WCe(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}const NCe=Object.freeze(Object.defineProperty({__proto__:null,failResolution:N0e,failResolutions:RCe,finishResolution:W0e,finishResolutions:qCe,invalidateResolution:TCe,invalidateResolutionForStore:ECe,invalidateResolutionForStoreSelector:WCe,startResolution:E0e,startResolutions:CCe},Symbol.toStringTag,{value:"Module"})),wS=e=>{const t=[...e];for(let n=t.length-1;n>=0;n--)t[n]===void 0&&t.splice(n,1);return t},Yu=(e,t)=>Object.fromEntries(Object.entries(e??{}).map(([n,o])=>[n,t(o,n)])),BCe=(e,t)=>t instanceof Map?Object.fromEntries(t):t instanceof window.HTMLElement?null:t;function LCe(){const e={};return{isRunning(t,n){return e[t]&&e[t].get(wS(n))},clear(t,n){e[t]&&e[t].delete(wS(n))},markAsRunning(t,n){e[t]||(e[t]=new Va),e[t].set(wS(n),!0)}}}function ZH(e){const t=new WeakMap;return{get(n,o){let r=t.get(n);return r||(r=e(n,o),t.set(n,r)),r}}}function x1(e,t){const n={},o={},r={privateActions:n,registerPrivateActions:i=>{Object.assign(n,i)},privateSelectors:o,registerPrivateSelectors:i=>{Object.assign(o,i)}},s={name:e,instantiate:i=>{const c=new Set,l=t.reducer,d=PCe(e,t,i,{registry:i,get dispatch(){return z},get select(){return S},get resolveSelect(){return B()}});Zg(d,r);const p=LCe();function f(P){return(...$)=>Promise.resolve(d.dispatch(P(...$)))}const b={...Yu(NCe,f),...Yu(t.actions,f)},h=ZH(f),g=new Proxy(()=>{},{get:(P,$)=>{const F=n[$];return F?h.get(F,$):b[$]}}),z=new Proxy(g,{apply:(P,$,[F])=>d.dispatch(F)});Zg(b,g);const A=t.resolvers?DCe(t.resolvers):{};function _(P,$){P.isRegistrySelector&&(P.registry=i);const F=(...Z)=>{Z=SE(P,Z);const V=d.__unstableOriginalGetState();return P.isRegistrySelector&&(P.registry=i),P(V.root,...Z)};F.__unstableNormalizeArgs=P.__unstableNormalizeArgs;const X=A[$];return X?FCe(F,$,X,d,p):(F.hasResolver=!1,F)}function v(P){const $=(...F)=>{const X=d.__unstableOriginalGetState(),Z=F&&F[0],V=F&&F[1],ee=t?.selectors?.[Z];return Z&&ee&&(F[1]=SE(ee,V)),P(X.metadata,...F)};return $.hasResolver=!1,$}const M={...Yu(SCe,v),...Yu(t.selectors,_)},y=ZH(_);for(const[P,$]of Object.entries(o))y.get($,P);const k=new Proxy(()=>{},{get:(P,$)=>{const F=o[$];return F?y.get(F,$):M[$]}}),S=new Proxy(k,{apply:(P,$,[F])=>F(d.__unstableOriginalGetState())});Zg(M,k);const C=jCe(M,d),R=ICe(M,d),T=()=>M,E=()=>b,B=()=>C,N=()=>R;d.__unstableOriginalGetState=d.getState,d.getState=()=>d.__unstableOriginalGetState().root;const j=d&&(P=>(c.add(P),()=>c.delete(P)));let I=d.__unstableOriginalGetState();return d.subscribe(()=>{const P=d.__unstableOriginalGetState(),$=P!==I;if(I=P,$)for(const F of c)F()}),{reducer:l,store:d,actions:b,selectors:M,resolvers:A,getSelectors:T,getResolveSelectors:B,getSuspendSelectors:N,getActions:E,subscribe:j}}};return Zg(s,r),s}function PCe(e,t,n,o){const r={...t.controls,...iCe},s=Yu(r,p=>p.isRegistryControl?p(n):p),i=[pCe(n,e),dCe,Q6e(s),fCe(o)],c=[j6e(...i)];typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&c.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e,serialize:{replacer:BCe}}));const{reducer:l,initialState:u}=t,d=q0e({metadata:mCe,root:l});return t0e(d,{root:u},Co(c))}function jCe(e,t){const{getIsResolving:n,hasStartedResolution:o,hasFinishedResolution:r,hasResolutionFailed:s,isResolving:i,getCachedResolvers:c,getResolutionState:l,getResolutionError:u,hasResolvingSelectors:d,countSelectorsByStatus:p,...f}=e;return Yu(f,(b,h)=>b.hasResolver?(...g)=>new Promise((z,A)=>{const _=()=>e.hasFinishedResolution(h,g),v=S=>{if(e.hasResolutionFailed(h,g)){const R=e.getResolutionError(h,g);A(R)}else z(S)},M=()=>b.apply(null,g),y=M();if(_())return v(y);const k=t.subscribe(()=>{_()&&(k(),v(M()))})}):async(...g)=>b.apply(null,g))}function ICe(e,t){return Yu(e,(n,o)=>n.hasResolver?(...r)=>{const s=n.apply(null,r);if(e.hasFinishedResolution(o,r)){if(e.hasResolutionFailed(o,r))throw e.getResolutionError(o,r);return s}throw new Promise(i=>{const c=t.subscribe(()=>{e.hasFinishedResolution(o,r)&&(i(),c())})})}:n)}function DCe(e){return Yu(e,t=>t.fulfill?t:{...t,fulfill:t})}function FCe(e,t,n,o,r){function s(c){const l=o.getState();if(r.isRunning(t,c)||typeof n.isFulfilled=="function"&&n.isFulfilled(l,...c))return;const{metadata:u}=o.__unstableOriginalGetState();T0e(u,t,c)||(r.markAsRunning(t,c),setTimeout(async()=>{r.clear(t,c),o.dispatch(E0e(t,c));try{const d=n.fulfill(...c);d&&await o.dispatch(d),o.dispatch(W0e(t,c))}catch(d){o.dispatch(N0e(t,c,d))}},0))}const i=(...c)=>(c=SE(e,c),s(c),e(...c));return i.hasResolver=!0,i}function SE(e,t){return e.__unstableNormalizeArgs&&typeof e.__unstableNormalizeArgs=="function"&&t?.length?e.__unstableNormalizeArgs(t):t}const $Ce={name:"core/data",instantiate(e){const t=o=>(r,...s)=>e.select(r)[o](...s),n=o=>(r,...s)=>e.dispatch(r)[o](...s);return{getSelectors(){return Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map(o=>[o,t(o)]))},getActions(){return Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map(o=>[o,n(o)]))},subscribe(){return()=>()=>{}}}}};function QH(){let e=!1,t=!1;const n=new Set,o=()=>Array.from(n).forEach(r=>r());return{get isPaused(){return e},subscribe(r){return n.add(r),()=>n.delete(r)},pause(){e=!0},resume(){e=!1,t&&(t=!1,o())},emit(){if(e){t=!0;return}o()}}}function vg(e){return typeof e=="string"?e:e.name}function N5(e={},t=null){const n={},o=QH();let r=null;function s(){o.emit()}const i=(y,k)=>{if(!k)return o.subscribe(y);const S=vg(k),C=n[S];return C?C.subscribe(y):t?t.subscribe(y,k):o.subscribe(y)};function c(y){const k=vg(y);r?.add(k);const S=n[k];return S?S.getSelectors():t?.select(k)}function l(y,k){r=new Set;try{return y.call(this)}finally{k.current=Array.from(r),r=null}}function u(y){const k=vg(y);r?.add(k);const S=n[k];return S?S.getResolveSelectors():t&&t.resolveSelect(k)}function d(y){const k=vg(y);r?.add(k);const S=n[k];return S?S.getSuspendSelectors():t&&t.suspendSelect(k)}function p(y){const k=vg(y),S=n[k];return S?S.getActions():t&&t.dispatch(k)}function f(y){return Object.fromEntries(Object.entries(y).map(([k,S])=>typeof S!="function"?[k,S]:[k,function(){return _[k].apply(null,arguments)}]))}function b(y,k){if(n[y])return console.error('Store "'+y+'" is already registered.'),n[y];const S=k();if(typeof S.getSelectors!="function")throw new TypeError("store.getSelectors must be a function");if(typeof S.getActions!="function")throw new TypeError("store.getActions must be a function");if(typeof S.subscribe!="function")throw new TypeError("store.subscribe must be a function");S.emitter=QH();const C=S.subscribe;if(S.subscribe=R=>{const T=S.emitter.subscribe(R),E=C(()=>{if(S.emitter.isPaused){S.emitter.emit();return}R()});return()=>{E?.(),T?.()}},n[y]=S,S.subscribe(s),t)try{Db(S.store).registerPrivateActions(Db(t).privateActionsOf(y)),Db(S.store).registerPrivateSelectors(Db(t).privateSelectorsOf(y))}catch{}return S}function h(y){b(y.name,()=>y.instantiate(_))}function g(y,k){Ke("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),b(y,()=>k)}function z(y,k){if(!k.reducer)throw new TypeError("Must specify store reducer");return b(y,()=>x1(y,k).instantiate(_)).store}function A(y){if(o.isPaused){y();return}o.pause(),Object.values(n).forEach(k=>k.emitter.pause());try{y()}finally{o.resume(),Object.values(n).forEach(k=>k.emitter.resume())}}let _={batch:A,stores:n,namespaces:n,subscribe:i,select:c,resolveSelect:u,suspendSelect:d,dispatch:p,use:v,register:h,registerGenericStore:g,registerStore:z,__unstableMarkListeningStores:l};function v(y,k){if(y)return _={..._,...y(_,k)},_}_.register($Ce);for(const[y,k]of Object.entries(e))_.register(x1(y,k));t&&t.subscribe(s);const M=f(_);return Zg(M,{privateActionsOf:y=>{try{return Db(n[y].store).privateActions}catch{return{}}},privateSelectorsOf:y=>{try{return Db(n[y].store).privateSelectors}catch{return{}}}}),M}const qc=N5();var _S,JH;function VCe(){if(JH)return _S;JH=1;var e=function(_){return t(_)&&!n(_)};function t(A){return!!A&&typeof A=="object"}function n(A){var _=Object.prototype.toString.call(A);return _==="[object RegExp]"||_==="[object Date]"||s(A)}var o=typeof Symbol=="function"&&Symbol.for,r=o?Symbol.for("react.element"):60103;function s(A){return A.$$typeof===r}function i(A){return Array.isArray(A)?[]:{}}function c(A,_){return _.clone!==!1&&_.isMergeableObject(A)?g(i(A),A,_):A}function l(A,_,v){return A.concat(_).map(function(M){return c(M,v)})}function u(A,_){if(!_.customMerge)return g;var v=_.customMerge(A);return typeof v=="function"?v:g}function d(A){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(A).filter(function(_){return Object.propertyIsEnumerable.call(A,_)}):[]}function p(A){return Object.keys(A).concat(d(A))}function f(A,_){try{return _ in A}catch{return!1}}function b(A,_){return f(A,_)&&!(Object.hasOwnProperty.call(A,_)&&Object.propertyIsEnumerable.call(A,_))}function h(A,_,v){var M={};return v.isMergeableObject(A)&&p(A).forEach(function(y){M[y]=c(A[y],v)}),p(_).forEach(function(y){b(A,y)||(f(A,y)&&v.isMergeableObject(_[y])?M[y]=u(y,v)(A[y],_[y],v):M[y]=c(_[y],v))}),M}function g(A,_,v){v=v||{},v.arrayMerge=v.arrayMerge||l,v.isMergeableObject=v.isMergeableObject||e,v.cloneUnlessOtherwiseSpecified=c;var M=Array.isArray(_),y=Array.isArray(A),k=M===y;return k?M?v.arrayMerge(A,_,v):h(A,_,v):c(_,v)}g.all=function(_,v){if(!Array.isArray(_))throw new Error("first argument should be an array");return _.reduce(function(M,y){return g(M,y,v)},{})};var z=g;return _S=z,_S}var HCe=VCe();const B0e=Zr(HCe),L0e=x.createContext(qc),{Consumer:Qmn,Provider:YN}=L0e;function Fn(){return x.useContext(L0e)}const P0e=x.createContext(!1),{Consumer:Jmn,Provider:B5}=P0e;function UCe(){return x.useContext(P0e)}const kS=KN();function XCe(e,t){if(!e||!t)return;const n=typeof e=="object"&&typeof t=="object"?Object.keys(e).filter(o=>e[o]!==t[o]):[];console.warn(`The \`useSelect\` hook returns different values when called with the same state and parameters. + */var CSe=Nv.exports,DH;function qSe(){return DH||(DH=1,function(e,t){(function(o,r){e.exports=r()})(CSe,function(){return function(){var n={686:function(s,i,c){c.d(i,{default:function(){return V}});var l=c(279),u=c.n(l),d=c(370),p=c.n(d),f=c(817),b=c.n(f);function h(ee){try{return document.execCommand(ee)}catch{return!1}}var g=function(te){var J=b()(te);return h("cut"),J},z=g;function A(ee){var te=document.documentElement.getAttribute("dir")==="rtl",J=document.createElement("textarea");J.style.fontSize="12pt",J.style.border="0",J.style.padding="0",J.style.margin="0",J.style.position="absolute",J.style[te?"right":"left"]="-9999px";var ue=window.pageYOffset||document.documentElement.scrollTop;return J.style.top="".concat(ue,"px"),J.setAttribute("readonly",""),J.value=ee,J}var _=function(te,J){var ue=A(te);J.container.appendChild(ue);var ce=b()(ue);return h("copy"),ue.remove(),ce},v=function(te){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},ue="";return typeof te=="string"?ue=_(te,J):te instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(te?.type)?ue=_(te.value,J):(ue=b()(te),h("copy")),ue},M=v;function y(ee){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(J){return typeof J}:y=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},y(ee)}var k=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=te.action,ue=J===void 0?"copy":J,ce=te.container,me=te.target,de=te.text;if(ue!=="copy"&&ue!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(me!==void 0)if(me&&y(me)==="object"&&me.nodeType===1){if(ue==="copy"&&me.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(ue==="cut"&&(me.hasAttribute("readonly")||me.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(de)return M(de,{container:ce});if(me)return ue==="cut"?z(me):M(me,{container:ce})},S=k;function C(ee){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?C=function(J){return typeof J}:C=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},C(ee)}function R(ee,te){if(!(ee instanceof te))throw new TypeError("Cannot call a class as a function")}function T(ee,te){for(var J=0;J"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function F(ee){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},F(ee)}function X(ee,te){var J="data-clipboard-".concat(ee);if(te.hasAttribute(J))return te.getAttribute(J)}var Z=function(ee){B(J,ee);var te=j(J);function J(ue,ce){var me;return R(this,J),me=te.call(this),me.resolveOptions(ce),me.listenClick(ue),me}return E(J,[{key:"resolveOptions",value:function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof ce.action=="function"?ce.action:this.defaultAction,this.target=typeof ce.target=="function"?ce.target:this.defaultTarget,this.text=typeof ce.text=="function"?ce.text:this.defaultText,this.container=C(ce.container)==="object"?ce.container:document.body}},{key:"listenClick",value:function(ce){var me=this;this.listener=p()(ce,"click",function(de){return me.onClick(de)})}},{key:"onClick",value:function(ce){var me=ce.delegateTarget||ce.currentTarget,de=this.action(me)||"copy",Ae=S({action:de,container:this.container,target:this.target(me),text:this.text(me)});this.emit(Ae?"success":"error",{action:de,text:Ae,trigger:me,clearSelection:function(){me&&me.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(ce){return X("action",ce)}},{key:"defaultTarget",value:function(ce){var me=X("target",ce);if(me)return document.querySelector(me)}},{key:"defaultText",value:function(ce){return X("text",ce)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(ce){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return M(ce,me)}},{key:"cut",value:function(ce){return z(ce)}},{key:"isSupported",value:function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],me=typeof ce=="string"?[ce]:ce,de=!!document.queryCommandSupported;return me.forEach(function(Ae){de=de&&!!document.queryCommandSupported(Ae)}),de}}]),J}(u()),V=Z},828:function(s){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function l(u,d){for(;u&&u.nodeType!==i;){if(typeof u.matches=="function"&&u.matches(d))return u;u=u.parentNode}}s.exports=l},438:function(s,i,c){var l=c(828);function u(f,b,h,g,z){var A=p.apply(this,arguments);return f.addEventListener(h,A,z),{destroy:function(){f.removeEventListener(h,A,z)}}}function d(f,b,h,g,z){return typeof f.addEventListener=="function"?u.apply(null,arguments):typeof h=="function"?u.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(A){return u(A,b,h,g,z)}))}function p(f,b,h,g){return function(z){z.delegateTarget=l(z.target,b),z.delegateTarget&&g.call(f,z)}}s.exports=d},879:function(s,i){i.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},i.nodeList=function(c){var l=Object.prototype.toString.call(c);return c!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in c&&(c.length===0||i.node(c[0]))},i.string=function(c){return typeof c=="string"||c instanceof String},i.fn=function(c){var l=Object.prototype.toString.call(c);return l==="[object Function]"}},370:function(s,i,c){var l=c(879),u=c(438);function d(h,g,z){if(!h&&!g&&!z)throw new Error("Missing required arguments");if(!l.string(g))throw new TypeError("Second argument must be a String");if(!l.fn(z))throw new TypeError("Third argument must be a Function");if(l.node(h))return p(h,g,z);if(l.nodeList(h))return f(h,g,z);if(l.string(h))return b(h,g,z);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(h,g,z){return h.addEventListener(g,z),{destroy:function(){h.removeEventListener(g,z)}}}function f(h,g,z){return Array.prototype.forEach.call(h,function(A){A.addEventListener(g,z)}),{destroy:function(){Array.prototype.forEach.call(h,function(A){A.removeEventListener(g,z)})}}}function b(h,g,z){return u(document.body,h,g,z)}s.exports=d},817:function(s){function i(c){var l;if(c.nodeName==="SELECT")c.focus(),l=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var u=c.hasAttribute("readonly");u||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),u||c.removeAttribute("readonly"),l=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var d=window.getSelection(),p=document.createRange();p.selectNodeContents(c),d.removeAllRanges(),d.addRange(p),l=d.toString()}return l}s.exports=i},279:function(s){function i(){}i.prototype={on:function(c,l,u){var d=this.e||(this.e={});return(d[c]||(d[c]=[])).push({fn:l,ctx:u}),this},once:function(c,l,u){var d=this;function p(){d.off(c,p),l.apply(u,arguments)}return p._=l,this.on(c,p,u)},emit:function(c){var l=[].slice.call(arguments,1),u=((this.e||(this.e={}))[c]||[]).slice(),d=0,p=u.length;for(d;d{t.current=e},[e]),t}function Hl(e,t){const n=FH(e),o=FH(t);return Mn(r=>{const s=new TSe(r,{text(){return typeof n.current=="function"?n.current():n.current||""}});return s.on("success",({clearSelection:i})=>{i(),o.current&&o.current()}),()=>{s.destroy()}},[])}function da(e=null){if(!e){if(typeof window>"u")return!1;e=window}const{platform:t}=e.navigator;return t.indexOf("Mac")!==-1||["iPad","iPhone"].includes(t)}const Mc=8,Z2=9,Gr=13,gd=27,$N=32,ESe=33,WSe=34,FM=35,S2=36,wi=37,cc=38,_i=39,Ps=40,zl=46,NSe=121,ea="alt",Ga="ctrl",Up="meta",ta="shift";function z0e(e){return e.length<2?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function l3(e,t){return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}const R5={primary:e=>e()?[Up]:[Ga],primaryShift:e=>e()?[ta,Up]:[Ga,ta],primaryAlt:e=>e()?[ea,Up]:[Ga,ea],secondary:e=>e()?[ta,ea,Up]:[Ga,ta,ea],access:e=>e()?[Ga,ea]:[ta,ea],ctrl:()=>[Ga],alt:()=>[ea],ctrlShift:()=>[Ga,ta],shift:()=>[ta],shiftAlt:()=>[ta,ea],undefined:()=>[]},BSe=l3(R5,e=>(t,n=da)=>[...e(n),t.toLowerCase()].join("+")),O0e=l3(R5,e=>(t,n=da)=>{const o=n(),r={[ea]:o?"⌥":"Alt",[Ga]:o?"⌃":"Ctrl",[Up]:"⌘",[ta]:o?"⇧":"Shift"};return[...e(n).reduce((i,c)=>{var l;const u=(l=r[c])!==null&&l!==void 0?l:c;return o?[...i,u]:[...i,u,"+"]},[]),z0e(t)]}),j1=l3(O0e,e=>(t,n=da)=>e(t,n).join("")),y0e=l3(R5,e=>(t,n=da)=>{const o=n(),r={[ta]:"Shift",[Up]:o?"Command":"Control",[Ga]:"Control",[ea]:o?"Option":"Alt",",":m("Comma"),".":m("Period"),"`":m("Backtick"),"~":m("Tilde")};return[...e(n),t].map(s=>{var i;return z0e((i=r[s])!==null&&i!==void 0?i:s)}).join(o?" ":" + ")});function LSe(e){return[ea,Ga,Up,ta].filter(t=>e[`${t}Key`])}const lc=l3(R5,e=>(t,n,o=da)=>{const r=e(o),s=LSe(t),i={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},c=r.filter(d=>!s.includes(d)),l=s.filter(d=>!r.includes(d));if(c.length>0||l.length>0)return!1;let u=t.key.toLowerCase();return n?(t.altKey&&n.length===1&&(u=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&n.length===1&&i[t.code]&&(u=i[t.code]),n==="del"&&(n="delete"),u===n.toLowerCase()):r.includes(u)});function T5(e="firstElement"){const t=x.useRef(e),n=r=>{r.focus({preventScroll:!0})},o=x.useRef();return x.useEffect(()=>{t.current=e},[e]),Mn(r=>{var s;if(!(!r||t.current===!1)&&!r.contains((s=r.ownerDocument?.activeElement)!==null&&s!==void 0?s:null)){if(t.current!=="firstElement"){n(r);return}return o.current=setTimeout(()=>{const i=Xr.tabbable.find(r)[0];i&&n(i)},0),()=>{o.current&&clearTimeout(o.current)}}},[])}let lA=null;function VN(e){const t=x.useRef(null),n=x.useRef(null),o=x.useRef(e);return x.useEffect(()=>{o.current=e},[e]),x.useCallback(r=>{if(r){var s;if(t.current=r,n.current)return;const c=r.ownerDocument.activeElement instanceof window.HTMLIFrameElement?r.ownerDocument.activeElement.contentDocument:r.ownerDocument;n.current=(s=c?.activeElement)!==null&&s!==void 0?s:null}else if(n.current){const c=t.current?.contains(t.current?.ownerDocument.activeElement);if(t.current?.isConnected&&!c){var i;(i=lA)!==null&&i!==void 0||(lA=n.current);return}o.current?o.current():(n.current.isConnected?n.current:lA)?.focus(),lA=null}},[])}const PSe=["button","submit"];function jSe(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return PSe.includes(e.type)}return!1}function A0e(e){const t=x.useRef(e);x.useEffect(()=>{t.current=e},[e]);const n=x.useRef(!1),o=x.useRef(),r=x.useCallback(()=>{clearTimeout(o.current)},[]);x.useEffect(()=>()=>r(),[]),x.useEffect(()=>{e||r()},[e,r]);const s=x.useCallback(c=>{const{type:l,target:u}=c;["mouseup","touchend"].includes(l)?n.current=!1:jSe(u)&&(n.current=!0)},[]),i=x.useCallback(c=>{if(c.persist(),n.current)return;const l=c.target.getAttribute("data-unstable-ignore-focus-outside-for-relatedtarget");l&&c.relatedTarget?.closest(l)||(o.current=setTimeout(()=>{if(!document.hasFocus()){c.preventDefault();return}typeof t.current=="function"&&t.current(c)},0))},[]);return{onFocus:r,onMouseDown:s,onMouseUp:s,onTouchStart:s,onTouchEnd:s,onBlur:i}}function uA(e,t){typeof e=="function"?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function xn(e){const t=x.useRef(),n=x.useRef(!1),o=x.useRef(!1),r=x.useRef([]),s=x.useRef(e);return s.current=e,x.useLayoutEffect(()=>{o.current===!1&&n.current===!0&&e.forEach((i,c)=>{const l=r.current[c];i!==l&&(uA(l,null),uA(i,t.current))}),r.current=e},e),x.useLayoutEffect(()=>{o.current=!1}),x.useCallback(i=>{uA(t,i),o.current=!0,n.current=i!==null;const c=i?s.current:r.current;for(const l of c)uA(l,i)},[])}function v0e(e){const t=x.useRef(),{constrainTabbing:n=e.focusOnMount!==!1}=e;x.useEffect(()=>{t.current=e},Object.values(e));const o=FN(),r=T5(e.focusOnMount),s=VN(),i=A0e(l=>{t.current?.__unstableOnClose?t.current.__unstableOnClose("focus-outside",l):t.current?.onClose&&t.current.onClose()}),c=x.useCallback(l=>{l&&l.addEventListener("keydown",u=>{u.keyCode===gd&&!u.defaultPrevented&&t.current?.onClose&&(u.preventDefault(),t.current.onClose())})},[]);return[xn([n?o:null,e.focusOnMount!==!1?s:null,e.focusOnMount!==!1?r:null,c]),{...i,tabIndex:-1}]}function HN({isDisabled:e=!1}={}){return Mn(t=>{if(e)return;const n=t?.ownerDocument?.defaultView;if(!n)return;const o=[],r=()=>{t.childNodes.forEach(c=>{c instanceof n.HTMLElement&&(c.getAttribute("inert")||(c.setAttribute("inert","true"),o.push(()=>{c.removeAttribute("inert")})))})},s=F1(r,0,{leading:!0});r();const i=new window.MutationObserver(s);return i.observe(t,{childList:!0}),()=>{i&&i.disconnect(),s.cancel(),o.forEach(c=>c())}},[e])}function Ts(e){const t=x.useRef(()=>{throw new Error("Callbacks created with `useEvent` cannot be called during rendering.")});return x.useInsertionEffect(()=>{t.current=e}),x.useCallback((...n)=>t.current?.(...n),[])}const UN=typeof window<"u"?x.useLayoutEffect:x.useEffect;function x0e({onDragStart:e,onDragMove:t,onDragEnd:n}){const[o,r]=x.useState(!1),s=x.useRef({onDragStart:e,onDragMove:t,onDragEnd:n});UN(()=>{s.current.onDragStart=e,s.current.onDragMove=t,s.current.onDragEnd=n},[e,t,n]);const i=x.useCallback(u=>s.current.onDragMove&&s.current.onDragMove(u),[]),c=x.useCallback(u=>{s.current.onDragEnd&&s.current.onDragEnd(u),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),r(!1)},[]),l=x.useCallback(u=>{s.current.onDragStart&&s.current.onDragStart(u),document.addEventListener("mousemove",i),document.addEventListener("mouseup",c),r(!0)},[]);return x.useEffect(()=>()=>{o&&(document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c))},[o]),{startDrag:l,endDrag:c,isDragging:o}}const $H=new Map;function ISe(e){if(!e)return null;let t=$H.get(e);return t||(typeof window<"u"&&typeof window.matchMedia=="function"?(t=window.matchMedia(e),$H.set(e,t),t):null)}function XN(e){const t=x.useMemo(()=>{const n=ISe(e);return{subscribe(o){return n?(n.addEventListener?.("change",o),()=>{n.removeEventListener?.("change",o)}):()=>{}},getValue(){var o;return(o=n?.matches)!==null&&o!==void 0?o:!1}}},[e]);return x.useSyncExternalStore(t.subscribe,t.getValue,()=>!1)}function Fr(e){const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}const $1=()=>XN("(prefers-reduced-motion: reduce)");function DSe(e,t){const n={...e};return Object.entries(t).forEach(([o,r])=>{n[o]?n[o]={...n[o],to:r.to}:n[o]=r}),n}const VH=(e,t)=>{const n=e?.findIndex(({id:r})=>typeof r=="string"?r===t.id:ds(r,t.id)),o=[...e];return n!==-1?o[n]={id:t.id,changes:DSe(o[n].changes,t.changes)}:o.push(t),o};function FSe(){let e=[],t=[],n=0;const o=()=>{e=e.slice(0,n||void 0),n=0},r=()=>{var i;const c=e.length===0?0:e.length-1;let l=(i=e[c])!==null&&i!==void 0?i:[];t.forEach(u=>{l=VH(l,u)}),t=[],e[c]=l},s=i=>!i.filter(({changes:l})=>Object.values(l).some(({from:u,to:d})=>typeof u!="function"&&typeof d!="function"&&!ds(u,d))).length;return{addRecord(i,c=!1){const l=!i||s(i);if(c){if(l)return;i.forEach(u=>{t=VH(t,u)})}else{if(o(),t.length&&r(),l)return;e.push(i)}},undo(){t.length&&(o(),r());const i=e[e.length-1+n];if(i)return n-=1,i},redo(){const i=e[e.length+n];if(i)return n+=1,i},hasUndo(){return!!e[e.length-1+n]},hasRedo(){return!!e[e.length+n]}}}const HH={xhuge:1920,huge:1440,wide:1280,xlarge:1080,large:960,medium:782,small:600,mobile:480},$Se={">=":"min-width","<":"max-width"},VSe={">=":(e,t)=>t>=e,"<":(e,t)=>t=")=>{const n=x.useContext(w0e),o=!n&&`(${$Se[t]}: ${HH[e]}px)`,r=XN(o||void 0);return n?VSe[t](HH[e],n):r};Yn.__experimentalWidthProvider=w0e.Provider;function _0e(e,t={}){const n=Ts(e),o=x.useRef(),r=x.useRef();return Ts(s=>{var i;if(s===o.current)return;(i=r.current)!==null&&i!==void 0||(r.current=new ResizeObserver(n));const{current:c}=r;o.current&&c.unobserve(o.current),o.current=s,s&&c.observe(s,t)})}const HSe=e=>{let t;if(!e.contentBoxSize)t=[e.contentRect.width,e.contentRect.height];else if(e.contentBoxSize[0]){const r=e.contentBoxSize[0];t=[r.inlineSize,r.blockSize]}else{const r=e.contentBoxSize;t=[r.inlineSize,r.blockSize]}const[n,o]=t.map(r=>Math.round(r));return{width:n,height:o}},USe={position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1};function XSe({onResize:e}){const t=_0e(n=>{const o=HSe(n.at(-1));e(o)});return a.jsx("div",{ref:t,style:USe,"aria-hidden":"true"})}function GSe(e,t){return e.width===t.width&&e.height===t.height}const UH={width:null,height:null};function KSe(){const[e,t]=x.useState(UH),n=x.useRef(UH),o=x.useCallback(s=>{GSe(n.current,s)||(n.current=s,t(s))},[]);return[a.jsx(XSe,{onResize:o}),e]}function js(e,t={}){return e?_0e(e,t):KSe()}var yS={exports:{}},XH;function YSe(){return XH||(XH=1,function(e){(function(t){e.exports?e.exports=t():window.idleCallbackShim=t()})(function(){var t,n,o,r,s=typeof window<"u"?window:typeof p1!=null?p1:this||{},i=s.cancelRequestAnimationFrame&&s.requestAnimationFrame||setTimeout,c=s.cancelRequestAnimationFrame||clearTimeout,l=[],u=0,d=!1,p=7,f=35,b=125,h=0,g=0,z=0,A={get didTimeout(){return!1},timeRemaining:function(){var B=p-(Date.now()-g);return B<0?0:B}},_=v(function(){p=22,b=66,f=0});function v(B){var N,j,I=99,P=function(){var $=Date.now()-j;$9?o=setTimeout(S,n):(n=0,S()))}function R(){var B,N,j,I=p>9?9:1;if(g=Date.now(),d=!1,o=null,u>2||g-n-50I;N++)B=l.shift(),z++,B&&B(A);l.length?C():u=0}function T(B){return h++,l.push(B),C(),h}function E(B){var N=B-1-z;l[N]&&(l[N]=null)}if(!s.requestIdleCallback||!s.cancelIdleCallback)s.requestIdleCallback=T,s.cancelIdleCallback=E,s.document&&document.addEventListener&&(s.addEventListener("scroll",y,!0),s.addEventListener("resize",y),document.addEventListener("focus",y,!0),document.addEventListener("mouseover",y,!0),["click","keypress","touchstart","mousedown"].forEach(function(B){document.addEventListener(B,y,{capture:!0,passive:!0})}),s.MutationObserver&&new MutationObserver(y).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));else try{s.requestIdleCallback(function(){},{timeout:0})}catch{(function(N){var j,I;if(s.requestIdleCallback=function(P,$){return $&&typeof $.timeout=="number"?N(P,$.timeout):N(P)},s.IdleCallbackDeadline&&(j=IdleCallbackDeadline.prototype)){if(I=Object.getOwnPropertyDescriptor(j,"timeRemaining"),!I||!I.configurable||!I.get)return;Object.defineProperty(j,"timeRemaining",{value:function(){return I.get.call(this)},enumerable:!0,configurable:!0})}})(s.requestIdleCallback)}return{request:T,cancel:E}})}(yS)),yS.exports}YSe();function ZSe(){return typeof window>"u"?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback}const GH=ZSe(),GN=()=>{const e=new Map;let t=!1;const n=c=>{for(const[l,u]of e)if(e.delete(l),u(),typeof c=="number"||c.timeRemaining()<=0)break;if(e.size===0){t=!1;return}GH(n)};return{add:(c,l)=>{e.set(c,l),t||(t=!0,GH(n))},flush:c=>{const l=e.get(c);return l===void 0?!1:(e.delete(c),l(),!0)},cancel:c=>e.delete(c),reset:()=>{e.clear(),t=!1}}};function QSe(e,t){const n=[];for(let o=0;o{let s=QSe(e,o);s.length{hs.flushSync(()=>{r(l=>[...l,...e.slice(c,c+n)])})});return()=>i.reset()},[e]),o}function JSe(e,t){if(e.length!==t.length)return!1;for(var n=0;nF1(e,t??0,n),[e,t,n]);return x.useEffect(()=>()=>o.cancel(),[o]),o}function S0e(e=""){const[t,n]=x.useState(e),[o,r]=x.useState(e),s=C1(r,250);return x.useEffect(()=>{s(t)},[t,s]),[t,n,o]}function _E(e,t,n){const o=k0e(()=>PN(e,t??0,n),[e,t,n]);return x.useEffect(()=>()=>o.cancel(),[o]),o}function E5({dropZoneElement:e,isDisabled:t,onDrop:n,onDragStart:o,onDragEnter:r,onDragLeave:s,onDragEnd:i,onDragOver:c}){const l=Ts(n),u=Ts(o),d=Ts(r),p=Ts(s),f=Ts(i),b=Ts(c);return Mn(h=>{if(t)return;const g=e??h;let z=!1;const{ownerDocument:A}=g;function _(R){const{defaultView:T}=A;if(!R||!T||!(R instanceof T.HTMLElement)||!g.contains(R))return!1;let E=R;do if(E.dataset.isDropZone)return E===g;while(E=E.parentElement);return!1}function v(R){z||(z=!0,A.addEventListener("dragend",C),A.addEventListener("mousemove",C),o&&u(R))}function M(R){R.preventDefault(),!g.contains(R.relatedTarget)&&r&&d(R)}function y(R){!R.defaultPrevented&&c&&b(R),R.preventDefault()}function k(R){_(R.relatedTarget)||s&&p(R)}function S(R){R.defaultPrevented||(R.preventDefault(),R.dataTransfer&&R.dataTransfer.files.length,n&&l(R),C(R))}function C(R){z&&(z=!1,A.removeEventListener("dragend",C),A.removeEventListener("mousemove",C),i&&f(R))}return g.setAttribute("data-is-drop-zone","true"),g.addEventListener("drop",S),g.addEventListener("dragenter",M),g.addEventListener("dragover",y),g.addEventListener("dragleave",k),A.addEventListener("dragenter",v),()=>{g.removeAttribute("data-is-drop-zone"),g.removeEventListener("drop",S),g.removeEventListener("dragenter",M),g.removeEventListener("dragover",y),g.removeEventListener("dragleave",k),A.removeEventListener("dragend",C),A.removeEventListener("mousemove",C),A.removeEventListener("dragenter",v)}},[t,e])}function C0e(){return Mn(e=>{const{ownerDocument:t}=e;if(!t)return;const{defaultView:n}=t;if(!n)return;function o(){t&&t.activeElement===e&&e.focus()}return n.addEventListener("blur",o),()=>{n.removeEventListener("blur",o)}},[])}const eCe=30;function tCe(e,t,n,o){var r,s;const i=(r=o?.initWindowSize)!==null&&r!==void 0?r:eCe,c=(s=o?.useWindowing)!==null&&s!==void 0?s:!0,[l,u]=x.useState({visibleItems:i,start:0,end:i,itemInView:d=>d>=0&&d<=i});return x.useLayoutEffect(()=>{if(!c)return;const d=ps(e.current),p=b=>{var h;if(!d)return;const g=Math.ceil(d.clientHeight/t),z=b?g:(h=o?.windowOverscan)!==null&&h!==void 0?h:g,A=Math.floor(d.scrollTop/t),_=Math.max(0,A-z),v=Math.min(n-1,A+g+z);u(M=>{const y={visibleItems:g,start:_,end:v,itemInView:k=>_<=k&&k<=v};return M.start!==y.start||M.end!==y.end||M.visibleItems!==y.visibleItems?y:M})};p(!0);const f=F1(()=>{p()},16);return d?.addEventListener("scroll",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),()=>{d?.removeEventListener("scroll",f),d?.ownerDocument?.defaultView?.removeEventListener("resize",f)}},[t,e,n,o?.expandedState,o?.windowOverscan,c]),x.useLayoutEffect(()=>{if(!c)return;const d=ps(e.current),p=f=>{switch(f.keyCode){case S2:return d?.scrollTo({top:0});case FM:return d?.scrollTo({top:n*t});case ESe:return d?.scrollTo({top:d.scrollTop-l.visibleItems*t});case WSe:return d?.scrollTo({top:d.scrollTop+l.visibleItems*t})}};return d?.ownerDocument?.defaultView?.addEventListener("keydown",p),()=>{d?.ownerDocument?.defaultView?.removeEventListener("keydown",p)}},[n,t,e,l.visibleItems,c,o?.expandedState]),[l,u]}function $M(e,t){const[n,o]=x.useMemo(()=>[r=>e.subscribe(t,r),()=>e.get(t)],[e,t]);return x.useSyncExternalStore(n,o,o)}function q0e(e){const t=Object.keys(e);return function(o={},r){const s={};let i=!1;for(const c of t){const l=e[c],u=o[c],d=l(u,r);s[c]=d,i=i||d!==u}return i?s:o}}function At(e){const t=new WeakMap,n=(...o)=>{let r=t.get(n.registry);return r||(r=e(n.registry.select),t.set(n.registry,r)),r(...o)};return n.isRegistrySelector=!0,n}function AS(e){return e.isRegistryControl=!0,e}const nCe="@@data/SELECT",oCe="@@data/RESOLVE_SELECT",rCe="@@data/DISPATCH",sCe={[nCe]:AS(e=>({storeKey:t,selectorName:n,args:o})=>e.select(t)[n](...o)),[oCe]:AS(e=>({storeKey:t,selectorName:n,args:o})=>{const r=e.select(t)[n].hasResolver?"resolveSelect":"select";return e[r](t)[n](...o)}),[rCe]:AS(e=>({storeKey:t,actionName:n,args:o})=>e.dispatch(t)[n](...o))},iCe=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/commands","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/format-library","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/router","@wordpress/dataviews","@wordpress/fields","@wordpress/media-utils","@wordpress/upload-media"],KH=[],aCe=!globalThis.IS_WORDPRESS_CORE,P0=(e,t)=>{if(!iCe.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!aCe&&KH.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);return KH.push(t),{lock:cCe,unlock:lCe}};function cCe(e,t){if(!e)throw new Error("Cannot lock an undefined object.");const n=e;MM in n||(n[MM]={}),R0e.set(n[MM],t)}function lCe(e){if(!e)throw new Error("Cannot unlock an undefined object.");const t=e;if(!(MM in t))throw new Error("Cannot unlock an object that was not locked before. ");return R0e.get(t[MM])}const R0e=new WeakMap,MM=Symbol("Private API ID"),{lock:Zg,unlock:Db}=P0("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/data"),uCe=()=>e=>t=>r0e(t)?t.then(n=>{if(n)return e(n)}):e(t),dCe=(e,t)=>()=>n=>o=>{const r=e.select(t).getCachedResolvers();return Object.entries(r).forEach(([i,c])=>{const l=e.stores[t]?.resolvers?.[i];!l||!l.shouldInvalidate||c.forEach((u,d)=>{u!==void 0&&(u.status!=="finished"&&u.status!=="error"||l.shouldInvalidate(o,...d)&&e.dispatch(t).invalidateResolution(i,d))})}),n(o)};function pCe(e){return()=>t=>n=>typeof n=="function"?n(e):t(n)}const fCe=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}};function Lu(e){if(e==null)return[];const t=e.length;let n=t;for(;n>0&&e[n-1]===void 0;)n--;return n===t?e:e.slice(0,n)}const bCe=fCe("selectorName")((e=new Va,t)=>{switch(t.type){case"START_RESOLUTION":{const n=new Va(e);return n.set(Lu(t.args),{status:"resolving"}),n}case"FINISH_RESOLUTION":{const n=new Va(e);return n.set(Lu(t.args),{status:"finished"}),n}case"FAIL_RESOLUTION":{const n=new Va(e);return n.set(Lu(t.args),{status:"error",error:t.error}),n}case"START_RESOLUTIONS":{const n=new Va(e);for(const o of t.args)n.set(Lu(o),{status:"resolving"});return n}case"FINISH_RESOLUTIONS":{const n=new Va(e);for(const o of t.args)n.set(Lu(o),{status:"finished"});return n}case"FAIL_RESOLUTIONS":{const n=new Va(e);return t.args.forEach((o,r)=>{const s={status:"error",error:void 0},i=t.errors[r];i&&(s.error=i),n.set(Lu(o),s)}),n}case"INVALIDATE_RESOLUTION":{const n=new Va(e);return n.delete(Lu(t.args)),n}}return e}),hCe=(e={},t)=>{switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":{if(t.selectorName in e){const{[t.selectorName]:n,...o}=e;return o}return e}case"START_RESOLUTION":case"FINISH_RESOLUTION":case"FAIL_RESOLUTION":case"START_RESOLUTIONS":case"FINISH_RESOLUTIONS":case"FAIL_RESOLUTIONS":case"INVALIDATE_RESOLUTION":return bCe(e,t)}return e};var vS={};function mCe(e){return[e]}function gCe(e){return!!e&&typeof e=="object"}function MCe(){var e={clear:function(){e.head=null}};return e}function YH(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;oArray.from(t._map.values()).some(n=>n[1]?.status==="resolving"))}const _Ce=It(e=>{const t={};return Object.values(e).forEach(n=>Array.from(n._map.values()).forEach(o=>{var r;const s=(r=o[1]?.status)!==null&&r!==void 0?r:"error";t[s]||(t[s]=0),t[s]++})),t},e=>[e]),kCe=Object.freeze(Object.defineProperty({__proto__:null,countSelectorsByStatus:_Ce,getCachedResolvers:xCe,getIsResolving:zCe,getResolutionError:ACe,getResolutionState:Df,hasFinishedResolution:OCe,hasResolutionFailed:yCe,hasResolvingSelectors:wCe,hasStartedResolution:T0e,isResolving:vCe},Symbol.toStringTag,{value:"Module"}));function E0e(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function W0e(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function N0e(e,t,n){return{type:"FAIL_RESOLUTION",selectorName:e,args:t,error:n}}function SCe(e,t){return{type:"START_RESOLUTIONS",selectorName:e,args:t}}function CCe(e,t){return{type:"FINISH_RESOLUTIONS",selectorName:e,args:t}}function qCe(e,t,n){return{type:"FAIL_RESOLUTIONS",selectorName:e,args:t,errors:n}}function RCe(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function TCe(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function ECe(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}const WCe=Object.freeze(Object.defineProperty({__proto__:null,failResolution:N0e,failResolutions:qCe,finishResolution:W0e,finishResolutions:CCe,invalidateResolution:RCe,invalidateResolutionForStore:TCe,invalidateResolutionForStoreSelector:ECe,startResolution:E0e,startResolutions:SCe},Symbol.toStringTag,{value:"Module"})),xS=e=>{const t=[...e];for(let n=t.length-1;n>=0;n--)t[n]===void 0&&t.splice(n,1);return t},Yu=(e,t)=>Object.fromEntries(Object.entries(e??{}).map(([n,o])=>[n,t(o,n)])),NCe=(e,t)=>t instanceof Map?Object.fromEntries(t):t instanceof window.HTMLElement?null:t;function BCe(){const e={};return{isRunning(t,n){return e[t]&&e[t].get(xS(n))},clear(t,n){e[t]&&e[t].delete(xS(n))},markAsRunning(t,n){e[t]||(e[t]=new Va),e[t].set(xS(n),!0)}}}function ZH(e){const t=new WeakMap;return{get(n,o){let r=t.get(n);return r||(r=e(n,o),t.set(n,r)),r}}}function x1(e,t){const n={},o={},r={privateActions:n,registerPrivateActions:i=>{Object.assign(n,i)},privateSelectors:o,registerPrivateSelectors:i=>{Object.assign(o,i)}},s={name:e,instantiate:i=>{const c=new Set,l=t.reducer,d=LCe(e,t,i,{registry:i,get dispatch(){return z},get select(){return S},get resolveSelect(){return B()}});Zg(d,r);const p=BCe();function f(P){return(...$)=>Promise.resolve(d.dispatch(P(...$)))}const b={...Yu(WCe,f),...Yu(t.actions,f)},h=ZH(f),g=new Proxy(()=>{},{get:(P,$)=>{const F=n[$];return F?h.get(F,$):b[$]}}),z=new Proxy(g,{apply:(P,$,[F])=>d.dispatch(F)});Zg(b,g);const A=t.resolvers?ICe(t.resolvers):{};function _(P,$){P.isRegistrySelector&&(P.registry=i);const F=(...Z)=>{Z=kE(P,Z);const V=d.__unstableOriginalGetState();return P.isRegistrySelector&&(P.registry=i),P(V.root,...Z)};F.__unstableNormalizeArgs=P.__unstableNormalizeArgs;const X=A[$];return X?DCe(F,$,X,d,p):(F.hasResolver=!1,F)}function v(P){const $=(...F)=>{const X=d.__unstableOriginalGetState(),Z=F&&F[0],V=F&&F[1],ee=t?.selectors?.[Z];return Z&&ee&&(F[1]=kE(ee,V)),P(X.metadata,...F)};return $.hasResolver=!1,$}const M={...Yu(kCe,v),...Yu(t.selectors,_)},y=ZH(_);for(const[P,$]of Object.entries(o))y.get($,P);const k=new Proxy(()=>{},{get:(P,$)=>{const F=o[$];return F?y.get(F,$):M[$]}}),S=new Proxy(k,{apply:(P,$,[F])=>F(d.__unstableOriginalGetState())});Zg(M,k);const C=PCe(M,d),R=jCe(M,d),T=()=>M,E=()=>b,B=()=>C,N=()=>R;d.__unstableOriginalGetState=d.getState,d.getState=()=>d.__unstableOriginalGetState().root;const j=d&&(P=>(c.add(P),()=>c.delete(P)));let I=d.__unstableOriginalGetState();return d.subscribe(()=>{const P=d.__unstableOriginalGetState(),$=P!==I;if(I=P,$)for(const F of c)F()}),{reducer:l,store:d,actions:b,selectors:M,resolvers:A,getSelectors:T,getResolveSelectors:B,getSuspendSelectors:N,getActions:E,subscribe:j}}};return Zg(s,r),s}function LCe(e,t,n,o){const r={...t.controls,...sCe},s=Yu(r,p=>p.isRegistryControl?p(n):p),i=[dCe(n,e),uCe,Z6e(s),pCe(o)],c=[P6e(...i)];typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&c.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e,serialize:{replacer:NCe}}));const{reducer:l,initialState:u}=t,d=q0e({metadata:hCe,root:l});return t0e(d,{root:u},Co(c))}function PCe(e,t){const{getIsResolving:n,hasStartedResolution:o,hasFinishedResolution:r,hasResolutionFailed:s,isResolving:i,getCachedResolvers:c,getResolutionState:l,getResolutionError:u,hasResolvingSelectors:d,countSelectorsByStatus:p,...f}=e;return Yu(f,(b,h)=>b.hasResolver?(...g)=>new Promise((z,A)=>{const _=()=>e.hasFinishedResolution(h,g),v=S=>{if(e.hasResolutionFailed(h,g)){const R=e.getResolutionError(h,g);A(R)}else z(S)},M=()=>b.apply(null,g),y=M();if(_())return v(y);const k=t.subscribe(()=>{_()&&(k(),v(M()))})}):async(...g)=>b.apply(null,g))}function jCe(e,t){return Yu(e,(n,o)=>n.hasResolver?(...r)=>{const s=n.apply(null,r);if(e.hasFinishedResolution(o,r)){if(e.hasResolutionFailed(o,r))throw e.getResolutionError(o,r);return s}throw new Promise(i=>{const c=t.subscribe(()=>{e.hasFinishedResolution(o,r)&&(i(),c())})})}:n)}function ICe(e){return Yu(e,t=>t.fulfill?t:{...t,fulfill:t})}function DCe(e,t,n,o,r){function s(c){const l=o.getState();if(r.isRunning(t,c)||typeof n.isFulfilled=="function"&&n.isFulfilled(l,...c))return;const{metadata:u}=o.__unstableOriginalGetState();T0e(u,t,c)||(r.markAsRunning(t,c),setTimeout(async()=>{r.clear(t,c),o.dispatch(E0e(t,c));try{const d=n.fulfill(...c);d&&await o.dispatch(d),o.dispatch(W0e(t,c))}catch(d){o.dispatch(N0e(t,c,d))}},0))}const i=(...c)=>(c=kE(e,c),s(c),e(...c));return i.hasResolver=!0,i}function kE(e,t){return e.__unstableNormalizeArgs&&typeof e.__unstableNormalizeArgs=="function"&&t?.length?e.__unstableNormalizeArgs(t):t}const FCe={name:"core/data",instantiate(e){const t=o=>(r,...s)=>e.select(r)[o](...s),n=o=>(r,...s)=>e.dispatch(r)[o](...s);return{getSelectors(){return Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map(o=>[o,t(o)]))},getActions(){return Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map(o=>[o,n(o)]))},subscribe(){return()=>()=>{}}}}};function QH(){let e=!1,t=!1;const n=new Set,o=()=>Array.from(n).forEach(r=>r());return{get isPaused(){return e},subscribe(r){return n.add(r),()=>n.delete(r)},pause(){e=!0},resume(){e=!1,t&&(t=!1,o())},emit(){if(e){t=!0;return}o()}}}function vg(e){return typeof e=="string"?e:e.name}function W5(e={},t=null){const n={},o=QH();let r=null;function s(){o.emit()}const i=(y,k)=>{if(!k)return o.subscribe(y);const S=vg(k),C=n[S];return C?C.subscribe(y):t?t.subscribe(y,k):o.subscribe(y)};function c(y){const k=vg(y);r?.add(k);const S=n[k];return S?S.getSelectors():t?.select(k)}function l(y,k){r=new Set;try{return y.call(this)}finally{k.current=Array.from(r),r=null}}function u(y){const k=vg(y);r?.add(k);const S=n[k];return S?S.getResolveSelectors():t&&t.resolveSelect(k)}function d(y){const k=vg(y);r?.add(k);const S=n[k];return S?S.getSuspendSelectors():t&&t.suspendSelect(k)}function p(y){const k=vg(y),S=n[k];return S?S.getActions():t&&t.dispatch(k)}function f(y){return Object.fromEntries(Object.entries(y).map(([k,S])=>typeof S!="function"?[k,S]:[k,function(){return _[k].apply(null,arguments)}]))}function b(y,k){if(n[y])return console.error('Store "'+y+'" is already registered.'),n[y];const S=k();if(typeof S.getSelectors!="function")throw new TypeError("store.getSelectors must be a function");if(typeof S.getActions!="function")throw new TypeError("store.getActions must be a function");if(typeof S.subscribe!="function")throw new TypeError("store.subscribe must be a function");S.emitter=QH();const C=S.subscribe;if(S.subscribe=R=>{const T=S.emitter.subscribe(R),E=C(()=>{if(S.emitter.isPaused){S.emitter.emit();return}R()});return()=>{E?.(),T?.()}},n[y]=S,S.subscribe(s),t)try{Db(S.store).registerPrivateActions(Db(t).privateActionsOf(y)),Db(S.store).registerPrivateSelectors(Db(t).privateSelectorsOf(y))}catch{}return S}function h(y){b(y.name,()=>y.instantiate(_))}function g(y,k){Ke("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),b(y,()=>k)}function z(y,k){if(!k.reducer)throw new TypeError("Must specify store reducer");return b(y,()=>x1(y,k).instantiate(_)).store}function A(y){if(o.isPaused){y();return}o.pause(),Object.values(n).forEach(k=>k.emitter.pause());try{y()}finally{o.resume(),Object.values(n).forEach(k=>k.emitter.resume())}}let _={batch:A,stores:n,namespaces:n,subscribe:i,select:c,resolveSelect:u,suspendSelect:d,dispatch:p,use:v,register:h,registerGenericStore:g,registerStore:z,__unstableMarkListeningStores:l};function v(y,k){if(y)return _={..._,...y(_,k)},_}_.register(FCe);for(const[y,k]of Object.entries(e))_.register(x1(y,k));t&&t.subscribe(s);const M=f(_);return Zg(M,{privateActionsOf:y=>{try{return Db(n[y].store).privateActions}catch{return{}}},privateSelectorsOf:y=>{try{return Db(n[y].store).privateSelectors}catch{return{}}}}),M}const qc=W5();var wS,JH;function $Ce(){if(JH)return wS;JH=1;var e=function(_){return t(_)&&!n(_)};function t(A){return!!A&&typeof A=="object"}function n(A){var _=Object.prototype.toString.call(A);return _==="[object RegExp]"||_==="[object Date]"||s(A)}var o=typeof Symbol=="function"&&Symbol.for,r=o?Symbol.for("react.element"):60103;function s(A){return A.$$typeof===r}function i(A){return Array.isArray(A)?[]:{}}function c(A,_){return _.clone!==!1&&_.isMergeableObject(A)?g(i(A),A,_):A}function l(A,_,v){return A.concat(_).map(function(M){return c(M,v)})}function u(A,_){if(!_.customMerge)return g;var v=_.customMerge(A);return typeof v=="function"?v:g}function d(A){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(A).filter(function(_){return Object.propertyIsEnumerable.call(A,_)}):[]}function p(A){return Object.keys(A).concat(d(A))}function f(A,_){try{return _ in A}catch{return!1}}function b(A,_){return f(A,_)&&!(Object.hasOwnProperty.call(A,_)&&Object.propertyIsEnumerable.call(A,_))}function h(A,_,v){var M={};return v.isMergeableObject(A)&&p(A).forEach(function(y){M[y]=c(A[y],v)}),p(_).forEach(function(y){b(A,y)||(f(A,y)&&v.isMergeableObject(_[y])?M[y]=u(y,v)(A[y],_[y],v):M[y]=c(_[y],v))}),M}function g(A,_,v){v=v||{},v.arrayMerge=v.arrayMerge||l,v.isMergeableObject=v.isMergeableObject||e,v.cloneUnlessOtherwiseSpecified=c;var M=Array.isArray(_),y=Array.isArray(A),k=M===y;return k?M?v.arrayMerge(A,_,v):h(A,_,v):c(_,v)}g.all=function(_,v){if(!Array.isArray(_))throw new Error("first argument should be an array");return _.reduce(function(M,y){return g(M,y,v)},{})};var z=g;return wS=z,wS}var VCe=$Ce();const B0e=Zr(VCe),L0e=x.createContext(qc),{Consumer:Ymn,Provider:KN}=L0e;function Fn(){return x.useContext(L0e)}const P0e=x.createContext(!1),{Consumer:Zmn,Provider:N5}=P0e;function HCe(){return x.useContext(P0e)}const _S=GN();function UCe(e,t){if(!e||!t)return;const n=typeof e=="object"&&typeof t=="object"?Object.keys(e).filter(o=>e[o]!==t[o]):[];console.warn(`The \`useSelect\` hook returns different values when called with the same state and parameters. This can lead to unnecessary re-renders and performance issues if not fixed. Non-equal value keys: %s -`,n.join(", "))}function GCe(e,t){const n=e.select,o={};let r,s,i=!1,c,l,u;const d=new Map;function p(b){var h;return(h=e.stores[b]?.store?.getState?.())!==null&&h!==void 0?h:{}}const f=b=>{const h=[...b],g=new Set;function z(_){if(i)for(const S of h)d.get(S)!==p(S)&&(i=!1);d.clear();const v=()=>{i=!1,_()},M=()=>{c?kS.add(o,v):v()},y=[];function k(S){y.push(e.subscribe(M,S))}for(const S of h)k(S);return g.add(k),()=>{g.delete(k);for(const S of y.values())S?.();kS.cancel(o)}}function A(_){for(const v of _)if(!h.includes(v)){h.push(v);for(const M of g)M(v)}}return{subscribe:z,updateStores:A}};return(b,h)=>{function g(){if(i&&b===r)return s;const A={current:null},_=e.__unstableMarkListeningStores(()=>b(n,e),A);if(globalThis.SCRIPT_DEBUG&&!u){const v=b(n,e);ds(_,v)||(XCe(_,v),u=!0)}if(l)l.updateStores(A.current);else{for(const v of A.current)d.set(v,p(v));l=f(A.current)}ds(s,_)||(s=_),r=b,i=!0}function z(){return g(),s}return c&&!h&&(i=!1,kS.cancel(o)),g(),c=h,{subscribe:l.subscribe,getValue:z}}}function KCe(e){return Fn().select(e)}function YCe(e,t,n){const o=Fn(),r=UCe(),s=x.useMemo(()=>GCe(o),[o,e]),i=x.useCallback(t,n),{subscribe:c,getValue:l}=s(i,r),u=x.useSyncExternalStore(c,l,l);return x.useDebugValue(u),u}function G(e,t){const n=typeof e!="function",o=x.useRef(n);if(n!==o.current){const r=o.current?"static":"mapping",s=n?"static":"mapping";throw new Error(`Switching useSelect from ${r} to ${s} is not allowed`)}return n?KCe(e):YCe(!1,e,t)}const Xl=e=>Or(t=>nSe(n=>{const r=G((s,i)=>e(s,n,i));return a.jsx(t,{...n,...r})}),"withSelect"),Oe=e=>{const{dispatch:t}=Fn();return e===void 0?t:t(e)},ZCe=(e,t)=>{const n=Fn(),o=x.useRef(e);return XN(()=>{o.current=e}),x.useMemo(()=>{const r=o.current(n.dispatch,n);return Object.fromEntries(Object.entries(r).map(([s,i])=>(typeof i!="function"&&console.warn(`Property ${s} returned from dispatchMap in useDispatchWithMap must be a function.`),[s,(...c)=>o.current(n.dispatch,n)[s](...c)])))},[n,...t])},Ff=e=>Or(t=>n=>{const r=ZCe((s,i)=>e(s,n,i),[]);return a.jsx(t,{...n,...r})},"withDispatch");function kr(e){return qc.dispatch(e)}function uo(e){return qc.select(e)}const J0=q0e,j0e=qc.resolveSelect;qc.suspendSelect;const QCe=qc.subscribe;qc.registerGenericStore;const JCe=qc.registerStore;qc.use;const Us=qc.register;var SS,eU;function eqe(){return eU||(eU=1,SS=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),SS}var tqe=eqe();const N0=Zr(tqe);function nqe(e,t){if(!e)return t;let n=!1;const o={};for(const r in t)N0(e[r],t[r])?o[r]=e[r]:(n=!0,o[r]=t[r]);if(!n)return e;for(const r in e)o.hasOwnProperty(r)||(o[r]=e[r]);return o}function Md(e){return typeof e=="string"?e.split(","):Array.isArray(e)?e:null}const I0e=e=>t=>(n,o)=>n===void 0||e(o)?t(n,o):n,ZN=e=>(...t)=>async({resolveSelect:n})=>{await n[e](...t)},tU=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}},D0e=e=>t=>(n,o)=>t(n,e(o));function oqe(e){const t=new WeakMap;return n=>{let o;return t.has(n)?o=t.get(n):(o=e(n),n!==null&&typeof n=="object"&&t.set(n,o)),o}}function rqe(e,t){return(e.rawAttributes||[]).includes(t)}function L5(e,t,n){if(!e||typeof e!="object")return e;const o=Array.isArray(t)?t:t.split(".");return o.reduce((r,s,i)=>(r[s]===void 0&&(Number.isInteger(o[i+1])?r[s]=[]:r[s]={}),i===o.length-1&&(r[s]=n),r[s]),e),e}function sqe(e,t,n){if(!e||typeof e!="object"||typeof t!="string"&&!Array.isArray(t))return e;const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach(s=>{r=r?.[s]}),r!==void 0?r:n}function iqe(e){return/^\s*\d+\s*$/.test(e)}const zM=["create","read","update","delete"];function QN(e){const t={};if(!e)return t;const n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[o,r]of Object.entries(n))t[o]=e.includes(r);return t}function P5(e,t,n){return(typeof t=="object"?[e,t.kind,t.name,t.id]:[e,t,n]).filter(Boolean).join("/")}const F0e=Symbol("RECEIVE_INTERMEDIATE_RESULTS");function $0e(e,t,n){return{type:"RECEIVE_ITEMS",items:Array.isArray(e)?e:[e],persistedEdits:t,meta:n}}function aqe(e,t,n,o=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(n)?n:[n],kind:e,name:t,invalidateCache:o}}function cqe(e,t={},n,o){return{...$0e(e,n,o),query:t}}function lqe(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let s=0;s{_=_?.[v]}),L5(g,A,_)}}else{if(!e.itemIsComplete[c]?.[b])return null;g=h}p.push(g)}return p}const V0e=It((e,t={})=>{let n=nU.get(e);if(n){const r=n.get(t);if(r!==void 0)return r}else n=new Va,nU.set(e,n);const o=uqe(e,t);return n.set(t,o),o});function H0e(e,t={}){var n;const{stableKey:o,context:r}=jh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalItems)!==null&&n!==void 0?n:null}function dqe(e,t={}){var n;const{stableKey:o,context:r}=jh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalPages)!==null&&n!==void 0?n:null}function pqe(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce((n,o)=>({...n,[o.name]:o}),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter(([n])=>!t.names.includes(n)))}return e}const fqe=J0({formatTypes:pqe}),JN=It(e=>Object.values(e.formatTypes),e=>[e.formatTypes]);function bqe(e,t){return e.formatTypes[t]}function hqe(e,t){const n=JN(e);return n.find(({className:o,tagName:r})=>o===null&&t===r)||n.find(({className:o,tagName:r})=>o===null&&r==="*")}function mqe(e,t){return JN(e).find(({className:n})=>n===null?!1:` ${t} `.indexOf(` ${n} `)>=0)}const gqe=Object.freeze(Object.defineProperty({__proto__:null,getFormatType:bqe,getFormatTypeForBareElement:hqe,getFormatTypeForClassName:mqe,getFormatTypes:JN},Symbol.toStringTag,{value:"Module"}));function Mqe(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function zqe(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}const Oqe=Object.freeze(Object.defineProperty({__proto__:null,addFormatTypes:Mqe,removeFormatTypes:zqe},Symbol.toStringTag,{value:"Module"})),yqe="core/rich-text",dl=x1(yqe,{reducer:fqe,selectors:gqe,actions:Oqe});Us(dl);function N4(e,t){if(e===t)return!0;if(!e||!t||e.type!==t.type)return!1;const n=e.attributes,o=t.attributes;if(n===o)return!0;if(!n||!o)return!1;const r=Object.keys(n),s=Object.keys(o);if(r.length!==s.length)return!1;const i=r.length;for(let c=0;c{const r=t[o-1];if(r){const s=n.slice();s.forEach((i,c)=>{const l=r[c];N4(i,l)&&(s[c]=l)}),t[o]=s}}),{...e,formats:t}}function oU(e,t,n){return e=e.slice(),e[t]=n,e}function qi(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t.type);if(c){const l=i[n].indexOf(c);for(;i[n]&&i[n][l]===c;)i[n]=oU(i[n],l,t),n--;for(o++;i[o]&&i[o][l]===c;)i[o]=oU(i[o],l,t),o++}}else{let c=1/0;for(let l=n;ld!==t.type);const u=i[l].length;uc!==t.type)||[],t]})}function pl({implementation:e},t){return pl.body||(pl.body=e.createHTMLDocument("").body),pl.body.innerHTML=t,pl.body}const fl="",U0e="\uFEFF";function eB(e,t=[]){const{formats:n,start:o,end:r,activeFormats:s}=e;if(o===void 0)return t;if(o===r){if(s)return s;const u=n[o-1]||t,d=n[o]||t;return u.lengthN4(p,f))||c.splice(d,1)}if(c.length===0)return t}return c||t}function X0e(e){return uo(dl).getFormatType(e)}function rU(e,t){if(t)return e;const n={};for(const o in e){let r=o;o.startsWith("data-disable-rich-text-")&&(r=o.slice(23)),n[r]=e[o]}return n}function pA({type:e,tagName:t,attributes:n,unregisteredAttributes:o,object:r,boundaryClass:s,isEditableTree:i}){const c=X0e(e);let l={};if(s&&i&&(l["data-rich-text-format-boundary"]="true"),!c)return n&&(l={...n,...l}),{type:e,attributes:rU(l,i),object:r};l={...o,...l};for(const u in n){const d=c.attributes?c.attributes[u]:!1;d?l[d]=n[u]:l[u]=n[u]}return c.className&&(l.class?l.class=`${c.className} ${l.class}`:l.class=c.className),i&&c.contentEditable===!1&&(l.contenteditable="false"),{type:t||c.tagName,object:c.object,attributes:rU(l,i)}}function Aqe(e,t,n){do if(e[n]!==t[n])return!1;while(n--);return!0}function G0e({value:e,preserveWhiteSpace:t,createEmpty:n,append:o,getLastChild:r,getParent:s,isText:i,getText:c,remove:l,appendText:u,onStartIndex:d,onEndIndex:p,isEditableTree:f,placeholder:b}){const{formats:h,replacements:g,text:z,start:A,end:_}=e,v=h.length+1,M=n(),y=eB(e),k=y[y.length-1];let S,C;o(M,"");for(let R=0;R{if(N&&S&&Aqe(B,S,I)){N=r(N);return}const{type:P,tagName:$,attributes:F,unregisteredAttributes:X}=j,Z=f&&j===k,V=s(N),ee=o(V,pA({type:P,tagName:$,attributes:F,unregisteredAttributes:X,boundaryClass:Z,isEditableTree:f}));i(N)&&c(N).length===0&&l(N),N=o(ee,"")}),R===0&&(d&&A===0&&d(M,N),p&&_===0&&p(M,N)),T===fl){const j=g[R];if(!j)continue;const{type:I,attributes:P,innerHTML:$}=j,F=X0e(I);f&&I==="#comment"?(N=o(s(N),{type:"span",attributes:{contenteditable:"false","data-rich-text-comment":P["data-rich-text-comment"]}}),o(o(N,{type:"span"}),P["data-rich-text-comment"].trim())):!f&&I==="script"?(N=o(s(N),pA({type:"script",isEditableTree:f})),o(N,{html:decodeURIComponent(P["data-rich-text-script"])})):F?.contentEditable===!1?(N=o(s(N),pA({...j,isEditableTree:f,boundaryClass:A===R&&_===R+1})),$&&o(N,{html:$})):N=o(s(N),pA({...j,object:!0,isEditableTree:f})),N=o(s(N),"")}else!t&&T===` -`?(N=o(s(N),{type:"br",attributes:f?{"data-rich-text-line-break":"true"}:void 0,object:!0}),N=o(s(N),"")):i(N)?u(N,T):N=o(s(N),T);d&&A===R+1&&d(M,N),p&&_===R+1&&p(M,N),E&&R===z.length&&(o(s(N),U0e),b&&z.length===0&&o(s(N),{type:"span",attributes:{"data-rich-text-placeholder":b,style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),S=B,C=T}return M}function T0({value:e,preserveWhiteSpace:t}){const n=G0e({value:e,preserveWhiteSpace:t,createEmpty:vqe,append:wqe,getLastChild:xqe,getParent:kqe,isText:Sqe,getText:Cqe,remove:qqe,appendText:_qe});return K0e(n.children)}function vqe(){return{}}function xqe({children:e}){return e&&e[e.length-1]}function wqe(e,t){return typeof t=="string"&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function _qe(e,t){e.text+=t}function kqe({parent:e}){return e}function Sqe({text:e}){return typeof e=="string"}function Cqe({text:e}){return e}function qqe(e){const t=e.parent.children.indexOf(e);return t!==-1&&e.parent.children.splice(t,1),e}function Rqe({type:e,attributes:t,object:n,children:o}){if(e==="#comment")return``;let r="";for(const s in t)Ire(s)&&(r+=` ${s}="${v5(t[s])}"`);return n?`<${e}${r}>`:`<${e}${r}>${K0e(o)}`}function K0e(e=[]){return e.map(t=>t.html!==void 0?t.html:t.text===void 0?Rqe(t):wke(t.text)).join("")}function Jp({text:e}){return e.replace(fl,"")}function $p(){return{formats:[],replacements:[],text:""}}function Tqe({tagName:e,attributes:t}){let n;if(t&&t.class&&(n=uo(dl).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=uo(dl).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{formatType:n,type:n.name,tagName:e};const o={},r={},s={...t};for(const i in n.attributes){const c=n.attributes[i];o[i]=s[c],delete s[c],typeof o[i]>"u"&&delete o[i]}for(const i in s)r[i]=t[i];return n.contentEditable===!1&&delete r.contenteditable,{formatType:n,type:n.name,tagName:e,attributes:o,unregisteredAttributes:r}}class Xo{#e;static empty(){return new Xo}static fromPlainText(t){return new Xo(eo({text:t}))}static fromHTMLString(t){return new Xo(eo({html:t}))}static fromHTMLElement(t,n={}){const{preserveWhiteSpace:o=!1}=n,r=o?t:Y0e(t),s=new Xo(eo({element:r}));return Object.defineProperty(s,"originalHTML",{value:t.innerHTML}),s}constructor(t=$p()){this.#e=t}toPlainText(){return Jp(this.#e)}toHTMLString({preserveWhiteSpace:t}={}){return this.originalHTML||T0({value:this.#e,preserveWhiteSpace:t})}valueOf(){return this.toHTMLString()}toString(){return this.toHTMLString()}toJSON(){return this.toHTMLString()}get length(){return this.text.length}get formats(){return this.#e.formats}get replacements(){return this.#e.replacements}get text(){return this.#e.text}}for(const e of Object.getOwnPropertyNames(String.prototype))Xo.prototype.hasOwnProperty(e)||Object.defineProperty(Xo.prototype,e,{value(...t){return this.toHTMLString()[e](...t)}});function eo({element:e,text:t,html:n,range:o,__unstableIsEditableTree:r}={}){return n instanceof Xo?{text:n.text,formats:n.formats,replacements:n.replacements}:typeof t=="string"&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:(typeof n=="string"&&n.length>0&&(e=pl(document,n)),typeof e!="object"?$p():Z0e({element:e,range:o,isEditableTree:r}))}function qu(e,t,n,o){if(!n)return;const{parentNode:r}=t,{startContainer:s,startOffset:i,endContainer:c,endOffset:l}=n,u=e.text.length;o.start!==void 0?e.start=u+o.start:t===s&&t.nodeType===t.TEXT_NODE?e.start=u+i:r===s&&t===s.childNodes[i]?e.start=u:r===s&&t===s.childNodes[i-1]?e.start=u+o.text.length:t===s&&(e.start=u),o.end!==void 0?e.end=u+o.end:t===c&&t.nodeType===t.TEXT_NODE?e.end=u+l:r===c&&t===c.childNodes[l-1]?e.end=u+o.text.length:r===c&&t===c.childNodes[l]?e.end=u:t===c&&(e.end=u+l)}function Eqe(e,t,n){if(!t)return;const{startContainer:o,endContainer:r}=t;let{startOffset:s,endOffset:i}=t;return e===o&&(s=n(e.nodeValue.slice(0,s)).length),e===r&&(i=n(e.nodeValue.slice(0,i)).length),{startContainer:o,startOffset:s,endContainer:r,endOffset:i}}function Y0e(e,t=!0){const n=e.cloneNode(!0);return n.normalize(),Array.from(n.childNodes).forEach((o,r,s)=>{if(o.nodeType===o.TEXT_NODE){let i=o.nodeValue;/[\n\t\r\f]/.test(i)&&(i=i.replace(/[\n\t\r\f]+/g," ")),i.indexOf(" ")!==-1&&(i=i.replace(/ {2,}/g," ")),r===0&&i.startsWith(" ")?i=i.slice(1):t&&r===s.length-1&&i.endsWith(" ")&&(i=i.slice(0,-1)),o.nodeValue=i}else o.nodeType===o.ELEMENT_NODE&&Y0e(o,!1)}),n}const Wqe="\r";function sU(e){return e.replace(new RegExp(`[${U0e}${fl}${Wqe}]`,"gu"),"")}function Z0e({element:e,range:t,isEditableTree:n}){const o=$p();if(!e)return o;if(!e.hasChildNodes())return qu(o,e,t,$p()),o;const r=e.childNodes.length;for(let i=0;in===t)}function Lqe({start:e,end:t,replacements:n,text:o}){if(!(e+1!==t||o[e]!==fl))return n[e]}function Gl({start:e,end:t}){if(!(e===void 0||t===void 0))return e===t}function CE({text:e}){return e.length===0}function Pqe(e,t=""){return typeof t=="string"&&(t=eo({text:t})),Ih(e.reduce((n,{formats:o,replacements:r,text:s})=>({formats:n.formats.concat(t.formats,o),replacements:n.replacements.concat(t.replacements,r),text:n.text+t.text+s})))}function Q0e(e,t){if(t={name:e,...t},typeof t.name!="string"){window.console.error("Format names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name)){window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");return}if(uo(dl).getFormatType(t.name)){window.console.error('Format "'+t.name+'" is already registered.');return}if(typeof t.tagName!="string"||t.tagName===""){window.console.error("Format tag names must be a string.");return}if((typeof t.className!="string"||t.className==="")&&t.className!==null){window.console.error("Format class names must be a string, or null to handle bare elements.");return}if(!/^[_a-zA-Z]+[a-zA-Z0-9_-]*$/.test(t.className)){window.console.error("A class name must begin with a letter, followed by any number of hyphens, underscores, letters, or numbers.");return}if(t.className===null){const n=uo(dl).getFormatTypeForBareElement(t.tagName);if(n&&n.name!=="core/unknown"){window.console.error(`Format "${n.name}" is already registered to handle bare tag name "${t.tagName}".`);return}}else{const n=uo(dl).getFormatTypeForClassName(t.className);if(n){window.console.error(`Format "${n.name}" is already registered to handle class name "${t.className}".`);return}}if(!("title"in t)||t.title===""){window.console.error('The format "'+t.name+'" must have a title.');return}if("keywords"in t&&t.keywords.length>3){window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');return}if(typeof t.title!="string"){window.console.error("Format titles must be strings.");return}return kr(dl).addFormatTypes(t),t}function Yd(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t);if(c){for(;i[n]?.find(l=>l===c);)CS(i,n,t),n--;for(o++;i[o]?.find(l=>l===c);)CS(i,o,t),o++}}else for(let c=n;cc!==t)||[]})}function CS(e,t,n){const o=e[t].filter(({type:r})=>r!==n);o.length?e[t]=o:delete e[t]}function E0(e,t,n=e.start,o=e.end){const{formats:r,replacements:s,text:i}=e;typeof t=="string"&&(t=eo({text:t}));const c=n+t.text.length;return Ih({formats:r.slice(0,n).concat(t.formats,r.slice(o)),replacements:s.slice(0,n).concat(t.replacements,s.slice(o)),text:i.slice(0,n)+t.text+i.slice(o),start:c,end:c})}function fa(e,t,n){return E0(e,eo(),t,n)}function jqe({formats:e,replacements:t,text:n,start:o,end:r},s,i){return n=n.replace(s,(c,...l)=>{const u=l[l.length-2];let d=i,p,f;return typeof d=="function"&&(d=i(c,...l)),typeof d=="object"?(p=d.formats,f=d.replacements,d=d.text):(p=Array(d.length),f=Array(d.length),e[u]&&(p=p.fill(e[u]))),e=e.slice(0,u).concat(p,e.slice(u+c.length)),t=t.slice(0,u).concat(f,t.slice(u+c.length)),o&&(o=r=u+d.length),d}),Ih({formats:e,replacements:t,text:n,start:o,end:r})}function J0e(e,t,n,o){return E0(e,{formats:[,],replacements:[t],text:fl},n,o)}function Q2(e,t=e.start,n=e.end){const{formats:o,replacements:r,text:s}=e;return t===void 0||n===void 0?{...e}:{formats:o.slice(t,n),replacements:r.slice(t,n),text:s.slice(t,n)}}function nB({formats:e,replacements:t,text:n,start:o,end:r},s){if(typeof s!="string")return Iqe(...arguments);let i=0;return n.split(s).map(c=>{const l=i,u={formats:e.slice(l,l+c.length),replacements:t.slice(l,l+c.length),text:c};return i+=s.length+c.length,o!==void 0&&r!==void 0&&(o>=l&&ol&&(u.start=0),r>=l&&ri&&(u.end=c.length)),u})}function Iqe({formats:e,replacements:t,text:n,start:o,end:r},s=o,i=r){if(o===void 0||r===void 0)return;const c={formats:e.slice(0,s),replacements:t.slice(0,s),text:n.slice(0,s)},l={formats:e.slice(i),replacements:t.slice(i),text:n.slice(i),start:0,end:0};return[c,l]}function e1e(e,t){return e===t||e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function qE(e,t,n){const o=e.parentNode;let r=0;for(;e=e.previousSibling;)r++;return n=[r,...n],o!==t&&(n=qE(o,t,n)),n}function iU(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function Dqe(e,t){if(t.html!==void 0)return e.innerHTML+=t.html;typeof t=="string"&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:o}=t;if(n)if(n==="#comment")t=e.ownerDocument.createComment(o["data-rich-text-comment"]);else{t=e.ownerDocument.createElement(n);for(const r in o)t.setAttribute(r,o[r])}return e.appendChild(t)}function Fqe(e,t){e.appendData(t)}function $qe({lastChild:e}){return e}function Vqe({parentNode:e}){return e}function Hqe(e){return e.nodeType===e.TEXT_NODE}function Uqe({nodeValue:e}){return e}function Xqe(e){return e.parentNode.removeChild(e)}function Gqe({value:e,prepareEditableTree:t,isEditableTree:n=!0,placeholder:o,doc:r=document}){let s=[],i=[];return t&&(e={...e,formats:t(e)}),{body:G0e({value:e,createEmpty:()=>pl(r,""),append:Dqe,getLastChild:$qe,getParent:Vqe,isText:Hqe,getText:Uqe,remove:Xqe,appendText:Fqe,onStartIndex(u,d){s=qE(d,u,[d.nodeValue.length])},onEndIndex(u,d){i=qE(d,u,[d.nodeValue.length])},isEditableTree:n,placeholder:o}),selection:{startPath:s,endPath:i}}}function Kqe({value:e,current:t,prepareEditableTree:n,__unstableDomOnly:o,placeholder:r}){const{body:s,selection:i}=Gqe({value:e,prepareEditableTree:n,placeholder:r,doc:t.ownerDocument});t1e(s,t),e.start!==void 0&&!o&&Yqe(i,t)}function t1e(e,t){let n=0,o;for(;o=e.firstChild;){const r=t.childNodes[n];if(!r)t.appendChild(o);else if(r.isEqualNode(o))e.removeChild(o);else if(r.nodeName!==o.nodeName||r.nodeType===r.TEXT_NODE&&r.data!==o.data)t.replaceChild(o,r);else{const s=r.attributes,i=o.attributes;if(s){let c=s.length;for(;c--;){const{name:l}=s[c];o.getAttribute(l)||r.removeAttribute(l)}}if(i)for(let c=0;c0){if(e1e(d,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(d),p!==c.activeElement&&p instanceof l.HTMLElement&&p.focus()}function Zqe(e){if(!(typeof document>"u")){if(document.readyState==="complete"||document.readyState==="interactive")return void e();document.addEventListener("DOMContentLoaded",e)}}function aU(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}function Qqe(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=m("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;return t&&t.appendChild(e),e}function Jqe(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let n=0;n]+>/g," "),cU===e&&(e+=" "),cU=e,e}function Yt(e,t){Jqe(),e=eRe(e);const n=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");o&&t==="assertive"?o.textContent=e:r&&(r.textContent=e),n&&n.removeAttribute("hidden")}function tRe(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");e===null&&Qqe(),t===null&&aU("assertive"),n===null&&aU("polite")}Zqe(tRe);function zc(e,t){return tB(e,t.type)?(t.title&&Yt(xe(m("%s removed."),t.title),"assertive"),Yd(e,t.type)):(t.title&&Yt(xe(m("%s applied."),t.title),"assertive"),qi(e,t))}function nRe(e,t,n,o){let r=e.startContainer;if(r.nodeType===r.TEXT_NODE&&e.startOffset===r.length&&r.nextSibling)for(r=r.nextSibling;r.firstChild;)r=r.firstChild;if(r.nodeType!==r.ELEMENT_NODE&&(r=r.parentElement),!r||r===t||!t.contains(r))return;const s=n+(o?"."+o:"");for(;r!==t;){if(r.matches(s))return r;r=r.parentElement}}function oRe(e,t){return{contextElement:t,getBoundingClientRect(){return t.contains(e.startContainer)?e.getBoundingClientRect():t.getBoundingClientRect()}}}function qS(e,t,n){if(!e)return;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return;const i=s.getRangeAt(0);if(!i||!i.startContainer)return;const c=nRe(i,e,t,n);return c||oRe(i,e)}function u3({editableContentElement:e,settings:t={}}){const{tagName:n,className:o,isActive:r}=t,[s,i]=x.useState(()=>qS(e,n,o)),c=Fr(r);return x.useLayoutEffect(()=>{if(!e)return;function l(){i(qS(e,n,o))}function u(){p.addEventListener("selectionchange",l)}function d(){p.removeEventListener("selectionchange",l)}const{ownerDocument:p}=e;return(e===p.activeElement||!c&&r||c&&!r)&&(i(qS(e,n,o)),u()),e.addEventListener("focusin",u),e.addEventListener("focusout",d),()=>{d(),e.removeEventListener("focusin",u),e.removeEventListener("focusout",d)}},[e,n,o,r,c]),s}const rRe="pre-wrap",sRe="1px";function iRe(){return x.useCallback(e=>{e&&(e.style.whiteSpace=rRe,e.style.minWidth=sRe)},[])}function aRe({record:e}){const t=x.useRef(),{activeFormats:n=[],replacements:o,start:r}=e.current,s=o[r];return x.useEffect(()=>{if((!n||!n.length)&&!s)return;const i="*[data-rich-text-format-boundary]",c=t.current.querySelector(i);if(!c)return;const{ownerDocument:l}=c,{defaultView:u}=l,p=u.getComputedStyle(c).color.replace(")",", 0.2)").replace("rgb","rgba"),f=`.rich-text:focus ${i}`,b=`background-color: ${p}`,h=`${f} {${b}}`,g="rich-text-boundary-style";let z=l.getElementById(g);z||(z=l.createElement("style"),z.id=g,l.head.appendChild(z)),z.innerHTML!==h&&(z.innerHTML=h)},[n,s]),t}const cRe=e=>t=>{function n(r){const{record:s}=e.current,{ownerDocument:i}=t;if(Gl(s.current)||!t.contains(i.activeElement))return;const c=Q2(s.current),l=Jp(c),u=T0({value:c});r.clipboardData.setData("text/plain",l),r.clipboardData.setData("text/html",u),r.clipboardData.setData("rich-text","true"),r.preventDefault(),r.type==="cut"&&i.execCommand("delete")}const{defaultView:o}=t.ownerDocument;return o.addEventListener("copy",n),o.addEventListener("cut",n),()=>{o.removeEventListener("copy",n),o.removeEventListener("cut",n)}},lRe=()=>e=>{function t(o){const{target:r}=o;if(r===e||r.textContent&&r.isContentEditable)return;const{ownerDocument:s}=r,{defaultView:i}=s,c=i.getSelection();if(c.containsNode(r))return;const l=s.createRange(),u=r.isContentEditable?r:r.closest("[contenteditable]");l.selectNode(u),c.removeAllRanges(),c.addRange(l),o.preventDefault()}function n(o){o.relatedTarget&&!e.contains(o.relatedTarget)&&o.relatedTarget.tagName==="A"&&t(o)}return e.addEventListener("click",t),e.addEventListener("focusin",n),()=>{e.removeEventListener("click",t),e.removeEventListener("focusin",n)}},lU=[],uRe=e=>t=>{function n(o){const{keyCode:r,shiftKey:s,altKey:i,metaKey:c,ctrlKey:l}=o;if(s||i||c||l||r!==wi&&r!==_i)return;const{record:u,applyRecord:d,forceRender:p}=e.current,{text:f,formats:b,start:h,end:g,activeFormats:z=[]}=u.current,A=Gl(u.current),{ownerDocument:_}=t,{defaultView:v}=_,{direction:M}=v.getComputedStyle(t),y=M==="rtl"?_i:wi,k=o.keyCode===y;if(A&&z.length===0&&(h===0&&k||g===f.length&&!k)||!A)return;const S=b[h-1]||lU,C=b[h]||lU,R=k?S:C,T=z.every((P,$)=>P===R[$]);let E=z.length;if(T?E{t.removeEventListener("keydown",n)}},dRe=e=>t=>{function n(o){const{keyCode:r}=o,{createRecord:s,handleChange:i}=e.current;if(o.defaultPrevented||r!==Ol&&r!==Mc)return;const c=s(),{start:l,end:u,text:d}=c;l===0&&u!==0&&u===d.length&&(i(fa(c)),o.preventDefault())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}};function pRe({value:e,start:t,end:n,formats:o}){const r=Math.min(t,n),s=Math.max(t,n),i=e.formats[r-1]||[],c=e.formats[s]||[];for(e.activeFormats=o.map((l,u)=>{if(i[u]){if(N4(l,i[u]))return i[u]}else if(c[u]&&N4(l,c[u]))return c[u];return l});--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}const fRe=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),uU=[],n1e="data-rich-text-placeholder";function bRe(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:o}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const r=n.childNodes[o];!r||r.nodeType!==r.ELEMENT_NODE||!r.hasAttribute(n1e)||t.collapseToStart()}const hRe=e=>t=>{const{ownerDocument:n}=t,{defaultView:o}=n;let r=!1;function s(d){if(r)return;let p;d&&(p=d.inputType);const{record:f,applyRecord:b,createRecord:h,handleChange:g}=e.current;if(p&&(p.indexOf("format")===0||fRe.has(p))){b(f.current);return}const z=h(),{start:A,activeFormats:_=[]}=f.current,v=pRe({value:z,start:A,end:z.start,formats:_});g(v)}function i(){const{record:d,applyRecord:p,createRecord:f,onSelectionChange:b}=e.current;if(t.contentEditable!=="true")return;if(n.activeElement!==t){n.removeEventListener("selectionchange",i);return}if(r)return;const{start:h,end:g,text:z}=f(),A=d.current;if(z!==A.text){s();return}if(h===A.start&&g===A.end){A.text.length===0&&h===0&&bRe(o);return}const _={...A,start:h,end:g,activeFormats:A._newActiveFormats,_newActiveFormats:void 0},v=eB(_,uU);_.activeFormats=v,d.current=_,p(_,{domOnly:!0}),b(h,g)}function c(){r=!0,n.removeEventListener("selectionchange",i),t.querySelector(`[${n1e}]`)?.remove()}function l(){r=!1,s({inputType:"insertText"}),n.addEventListener("selectionchange",i)}function u(){const{record:d,isSelected:p,onSelectionChange:f,applyRecord:b}=e.current;t.parentElement.closest('[contenteditable="true"]')||(p?b(d.current,{domOnly:!0}):d.current={...d.current,start:void 0,end:void 0,activeFormats:uU},f(d.current.start,d.current.end),window.queueMicrotask(i),n.addEventListener("selectionchange",i))}return t.addEventListener("input",s),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("focus",u),()=>{t.removeEventListener("input",s),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("focus",u)}},mRe=()=>e=>{const{ownerDocument:t}=e,{defaultView:n}=t,o=n?.getSelection();let r;function s(){return o.rangeCount?o.getRangeAt(0):null}function i(c){const l=c.type==="keydown"?"keyup":"pointerup";function u(){t.removeEventListener(l,d),t.removeEventListener("selectionchange",u),t.removeEventListener("input",u)}function d(){u(),!e1e(r,s())&&t.dispatchEvent(new Event("selectionchange"))}t.addEventListener(l,d),t.addEventListener("selectionchange",u),t.addEventListener("input",u),r=s()}return e.addEventListener("pointerdown",i),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointerdown",i),e.removeEventListener("keydown",i)}};function gRe(){return e=>{const{ownerDocument:t}=e,{defaultView:n}=t;let o=null;function r(i){i.defaultPrevented||i.target!==e&&i.target.contains(e)&&(o=e.getAttribute("contenteditable"),e.setAttribute("contenteditable","false"),n.getSelection().removeAllRanges())}function s(){o!==null&&(e.setAttribute("contenteditable",o),o=null)}return n.addEventListener("pointerdown",r),n.addEventListener("pointerup",s),()=>{n.removeEventListener("pointerdown",r),n.removeEventListener("pointerup",s)}}}const MRe=[cRe,lRe,uRe,dRe,hRe,mRe,gRe];function zRe(e){const t=x.useRef(e);x.useInsertionEffect(()=>{t.current=e});const n=x.useMemo(()=>MRe.map(o=>o(t)),[t]);return Mn(o=>{const r=n.map(s=>s(o));return()=>{r.forEach(s=>s())}},[n])}function o1e({value:e="",selectionStart:t,selectionEnd:n,placeholder:o,onSelectionChange:r,preserveWhiteSpace:s,onChange:i,__unstableDisableFormats:c,__unstableIsSelected:l,__unstableDependencies:u=[],__unstableAfterParse:d,__unstableBeforeSerialize:p,__unstableAddInvisibleFormats:f}){const b=Fn(),[,h]=x.useReducer(()=>({})),g=x.useRef();function z(){const{ownerDocument:{defaultView:T}}=g.current,E=T.getSelection(),B=E.rangeCount>0?E.getRangeAt(0):null;return eo({element:g.current,range:B,__unstableIsEditableTree:!0})}function A(T,{domOnly:E}={}){Kqe({value:T,current:g.current,prepareEditableTree:f,__unstableDomOnly:E,placeholder:o})}const _=x.useRef(e),v=x.useRef();function M(){_.current=e,v.current=e,e instanceof Xo||(v.current=e?Xo.fromHTMLString(e,{preserveWhiteSpace:s}):Xo.empty()),v.current={text:v.current.text,formats:v.current.formats,replacements:v.current.replacements},c&&(v.current.formats=Array(e.length),v.current.replacements=Array(e.length)),d&&(v.current.formats=d(v.current)),v.current.start=t,v.current.end=n}const y=x.useRef(!1);v.current?(t!==v.current.start||n!==v.current.end)&&(y.current=l,v.current={...v.current,start:t,end:n,activeFormats:void 0}):(y.current=l,M());function k(T){if(v.current=T,A(T),c)_.current=T.text;else{const I=p?p(T):T.formats;T={...T,formats:I},typeof e=="string"?_.current=T0({value:T,preserveWhiteSpace:s}):_.current=new Xo(T)}const{start:E,end:B,formats:N,text:j}=v.current;b.batch(()=>{r(E,B),i(_.current,{__unstableFormats:N,__unstableText:j})}),h()}function S(){M(),A(v.current)}const C=x.useRef(!1);x.useLayoutEffect(()=>{C.current&&e!==_.current&&(S(),h())},[e]),x.useLayoutEffect(()=>{y.current&&(g.current.ownerDocument.activeElement!==g.current&&g.current.focus(),A(v.current),y.current=!1)},[y.current]);const R=xn([g,iRe(),aRe({record:v}),zRe({record:v,handleChange:k,applyRecord:A,createRecord:z,isSelected:l,onSelectionChange:r,forceRender:h}),Mn(()=>{S(),C.current=!0},[o,...u])]);return{value:v.current,getValue:()=>v.current,onChange:k,ref:R}}const e1="id",ORe=["title","excerpt","content"],r1e=[{label:m("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","default_template_part_areas","default_template_types","url"].join(",")},plural:"__unstableBases",syncConfig:{fetch:async()=>Tt({path:"/"}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/base",getSyncObjectId:()=>"index"},{label:m("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes",syncConfig:{fetch:async e=>Tt({path:`/wp/v2/types/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/postType",getSyncObjectId:e=>e},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:m("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:m("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:m("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:m("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:m("Widget types")},{label:m("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:m("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:m("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:m("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:m("Menu Location"),key:"name"},{label:m("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>e?.title?.rendered||e?.title,getRevisionsUrl:(e,t)=>`/wp/v2/global-styles/${e}/revisions${t?"/"+t:""}`,supportsPagination:!0},{label:m("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:m("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:m("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"}],s1e=[{kind:"postType",loadEntities:vRe},{kind:"taxonomy",loadEntities:xRe},{kind:"root",name:"site",plural:"sites",loadEntities:wRe}],yRe=(e,t)=>{const n={};return e?.status==="auto-draft"&&(!t.status&&!n.status&&(n.status="draft"),(!t.title||t.title==="Auto Draft")&&!n.title&&(!e?.title||e?.title==="Auto Draft")&&(n.title="")),n},RS=new WeakMap;function ARe(e){const t={...e};for(const[n,o]of Object.entries(e))o instanceof Xo&&(t[n]=o.valueOf());return t}function i1e(e){return e.map(t=>{const{innerBlocks:n,attributes:o,...r}=t;return{...r,attributes:ARe(o),innerBlocks:i1e(n)}})}async function vRe(){const e=await Tt({path:"/wp/v2/types?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;const r=["wp_template","wp_template_part"].includes(t),s=(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2";return{kind:"postType",baseURL:`/${s}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:ORe,getTitle:i=>{var c;return i?.title?.rendered||i?.title||(r?Lre((c=i.slug)!==null&&c!==void 0?c:""):String(i.id))},__unstablePrePersist:r?void 0:yRe,__unstable_rest_base:n.rest_base,syncConfig:{fetch:async i=>Tt({path:`/${s}/${n.rest_base}/${i}?context=edit`}),applyChangesToDoc:(i,c)=>{const l=i.getMap("document");Object.entries(c).forEach(([u,d])=>{typeof d!="function"&&(u==="blocks"&&(RS.has(d)||RS.set(d,i1e(d)),d=RS.get(d)),l.get(u)!==d&&l.set(u,d))})},fromCRDTDoc:i=>i.getMap("document").toJSON()},syncObjectType:"postType/"+n.name,getSyncObjectId:i=>i,supportsPagination:!0,getRevisionsUrl:(i,c)=>`/${s}/${n.rest_base}/${i}/revisions${c?"/"+c:""}`,revisionKey:r?"wp_id":e1}})}async function xRe(){const e=await Tt({path:"/wp/v2/taxonomies?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;return{kind:"taxonomy",baseURL:`/${(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2"}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name}})}async function wRe(){var e;const t={label:m("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",syncConfig:{fetch:async()=>Tt({path:"/wp/v2/settings"}),applyChangesToDoc:(r,s)=>{const i=r.getMap("document");Object.entries(s).forEach(([c,l])=>{i.get(c)!==l&&i.set(c,l)})},fromCRDTDoc:r=>r.getMap("document").toJSON()},syncObjectType:"root/site",getSyncObjectId:()=>"index",meta:{}},n=await Tt({path:t.baseURL,method:"OPTIONS"}),o={};return Object.entries((e=n?.schema?.properties)!==null&&e!==void 0?e:{}).forEach(([r,s])=>{typeof s=="object"&&s.title&&(o[r]=s.title)}),[{...t,meta:{labels:o}}]}const J2=(e,t,n="get")=>{const o=e==="root"?"":S4(e),r=S4(t);return`${n}${o}${r}`};function a1e(e){const{query:t}=e;return t?jh(t).context:"default"}function _Re(e,t,n,o){var r;if(n===1&&o===-1)return t;const i=(n-1)*o,c=Math.max((r=e?.length)!==null&&r!==void 0?r:0,i+t.length),l=new Array(c);for(let u=0;u=i&&u!t.some(o=>Number.isInteger(o)?o===+n:o===n)))}function kRe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=a1e(t),o=t.key||e1;return{...e,[n]:{...e[n],...t.items.reduce((r,s)=>{const i=s?.[o];return r[i]=nqe(e?.[n]?.[i],s),r},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,c1e(o,t.itemIds)]))}return e}function SRe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=a1e(t),{query:o,key:r=e1}=t,s=o?jh(o):{},i=!o||!Array.isArray(s.fields);return{...e,[n]:{...e[n],...t.items.reduce((c,l)=>{const u=l?.[r];return c[u]=e?.[n]?.[u]||i,c},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,c1e(o,t.itemIds)]))}return e}const CRe=Co([I0e(e=>"query"in e),D0e(e=>e.query?{...e,...jh(e.query)}:e),tU("context"),tU("stableKey")])((e={},t)=>{const{type:n,page:o,perPage:r,key:s=e1}=t;return n!=="RECEIVE_ITEMS"?e:{itemIds:_Re(e?.itemIds||[],t.items.map(i=>i?.[s]).filter(Boolean),o,r),meta:t.meta}}),qRe=(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return CRe(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce((o,r)=>(o[r]=!0,o),{});return Object.fromEntries(Object.entries(e).map(([o,r])=>[o,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{...i,itemIds:i.itemIds.filter(c=>!n[c])}]))]));default:return e}},dU=J0({items:kRe,itemIsComplete:SRe,queries:qRe});function RRe(e={},t){switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e}function TRe(e={byId:{},queries:{}},t){switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...t.users.reduce((n,o)=>({...n,[o.id]:o}),{})},queries:{...e.queries,[t.queryID]:t.users.map(n=>n.id)}}}return e}function ERe(e={},t){switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e}function WRe(e=[],t){switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e}function NRe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e}function BRe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_GLOBAL_STYLES_ID":return t.id}return e}function LRe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLES":return{...e,[t.stylesheet]:t.globalStyles}}return e}function PRe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS":return{...e,[t.stylesheet]:t.variations}}return e}const jRe=e=>(t,n)=>{if(n.type==="UNDO"||n.type==="REDO"){const{record:o}=n;let r=t;return o.forEach(({id:{kind:s,name:i,recordId:c},changes:l})=>{r=e(r,{type:"EDIT_ENTITY_RECORD",kind:s,name:i,recordId:c,edits:Object.entries(l).reduce((u,[d,p])=>(u[d]=n.type==="UNDO"?p.from:p.to,u),{})})}),r}return e(t,n)};function IRe(e){return Co([jRe,I0e(t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind),D0e(t=>({key:e.key||e1,...t}))])(J0({queriedData:dU,edits:(t={},n)=>{var o;switch(n.type){case"RECEIVE_ITEMS":if(((o=n?.query?.context)!==null&&o!==void 0?o:"default")!=="default")return t;const s={...t};for(const c of n.items){const l=c?.[n.key],u=s[l];if(!u)continue;const d=Object.keys(u).reduce((p,f)=>{var b;return!N0(u[f],(b=c[f]?.raw)!==null&&b!==void 0?b:c[f])&&(!n.persistedEdits||!N0(u[f],n.persistedEdits[f]))&&(p[f]=u[f]),p},{});Object.keys(d).length?s[l]=d:delete s[l]}return s;case"EDIT_ENTITY_RECORD":const i={...t[n.recordId],...n.edits};return Object.keys(i).forEach(c=>{i[c]===void 0&&delete i[c]}),{...t,[n.recordId]:i}}return t},saving:(t={},n)=>{switch(n.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="SAVE_ENTITY_RECORD_START",error:n.error,isAutosave:n.isAutosave}}}return t},deleting:(t={},n)=>{switch(n.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="DELETE_ENTITY_RECORD_START",error:n.error}}}return t},revisions:(t={},n)=>{if(n.type==="RECEIVE_ITEM_REVISIONS"){const o=n.recordKey;delete n.recordKey;const r=dU(t[o],{...n,type:"RECEIVE_ITEMS"});return{...t,[o]:r}}return n.type==="REMOVE_ITEMS"?Object.fromEntries(Object.entries(t).filter(([o])=>!n.itemIds.some(r=>Number.isInteger(r)?r===+o:r===o))):t}}))}function DRe(e=r1e,t){switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}const FRe=(e={},t)=>{const n=DRe(e.config,t);let o=e.reducer;if(!o||n!==e.config){const s=n.reduce((i,c)=>{const{kind:l}=c;return i[l]||(i[l]=[]),i[l].push(c),i},{});o=J0(Object.entries(s).reduce((i,[c,l])=>{const u=J0(l.reduce((d,p)=>({...d,[p.name]:IRe(p)}),{}));return i[c]=u,i},{}))}const r=o(e.records,t);return r===e.records&&n===e.config&&o===e.reducer?e:{reducer:o,records:r,config:n}};function $Re(e=$Se()){return e}function VRe(e={},t){switch(t.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return e}function HRe(e={},t){switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:o}=t;return{...e,[n]:o}}return e}function URe(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed};case"RECEIVE_USER_PERMISSIONS":return{...e,...t.permissions}}return e}function XRe(e={},t){switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:o}=t;return{...e,[n]:o}}return e}function GRe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERNS":return t.patterns}return e}function KRe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERN_CATEGORIES":return t.categories}return e}function YRe(e=[],t){switch(t.type){case"RECEIVE_USER_PATTERN_CATEGORIES":return t.patternCategories}return e}function ZRe(e=null,t){switch(t.type){case"RECEIVE_NAVIGATION_FALLBACK_ID":return t.fallbackId}return e}function QRe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS":return{...e,[t.currentId]:t.revisions}}return e}function JRe(e={},t){switch(t.type){case"RECEIVE_DEFAULT_TEMPLATE":return{...e,[JSON.stringify(t.query)]:t.templateId}}return e}function eTe(e={},t){switch(t.type){case"RECEIVE_REGISTERED_POST_META":return{...e,[t.postType]:t.registeredPostMeta}}return e}const tTe=J0({terms:RRe,users:TRe,currentTheme:NRe,currentGlobalStylesId:BRe,currentUser:ERe,themeGlobalStyleVariations:PRe,themeBaseGlobalStyles:LRe,themeGlobalStyleRevisions:QRe,taxonomies:WRe,entities:FRe,editsReference:VRe,undoManager:$Re,embedPreviews:HRe,userPermissions:URe,autosaves:XRe,blockPatterns:GRe,blockPatternCategories:KRe,userPatternCategories:YRe,navigationFallbackId:ZRe,defaultTemplates:JRe,registeredPostMeta:eTe}),No="core",nTe={},oTe=At(e=>(t,n)=>e(No).isResolving("getEmbedPreview",[n]));function rTe(e,t){Ke("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=tn("/wp/v2/users/?who=authors&per_page=100",t);return l1e(e,n)}function sTe(e){return e.currentUser}const l1e=It((e,t)=>{var n;return((n=e.users.queries[t])!==null&&n!==void 0?n:[]).map(r=>e.users.byId[r])},(e,t)=>[e.users.queries[t],e.users.byId]);function iTe(e,t){return Ke("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),u1e(e,t)}const u1e=It((e,t)=>e.entities.config.filter(n=>n.kind===t),(e,t)=>e.entities.config);function aTe(e,t,n){return Ke("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),Dh(e,t,n)}function Dh(e,t,n){return e.entities.config?.find(o=>o.kind===t&&o.name===n)}const Zd=It((e,t,n,o,r)=>{var s;const i=e.entities.records?.[t]?.[n]?.queriedData;if(!i)return;const c=(s=r?.context)!==null&&s!==void 0?s:"default";if(r===void 0)return i.itemIsComplete[c]?.[o]?i.items[c][o]:void 0;const l=i.items[c]?.[o];if(l&&r._fields){var u;const d={},p=(u=Md(r._fields))!==null&&u!==void 0?u:[];for(let f=0;f{h=h?.[g]}),L5(d,b,h)}return d}return l},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});Zd.__unstableNormalizeArgs=e=>{const t=[...e],n=t?.[2];return t[2]=iqe(n)?Number(n):n,t};function cTe(e,t,n,o){return Zd(e,t,n,o)}const d1e=It((e,t,n,o)=>{const r=Zd(e,t,n,o);return r&&Object.keys(r).reduce((s,i)=>{if(rqe(Dh(e,t,n),i)){var c;s[i]=(c=r[i]?.raw)!==null&&c!==void 0?c:r[i]}else s[i]=r[i];return s},{})},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});function lTe(e,t,n,o){return Array.isArray(oB(e,t,n,o))}const oB=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?V0e(r,o):null},uTe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?H0e(r,o):null},dTe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;if(!r)return null;if(o.per_page===-1)return 1;const s=H0e(r,o);return s&&(o.per_page?Math.ceil(s/o.per_page):dqe(r,o))},pTe=It(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].edits).filter(i=>Zd(e,o,r,i)&&f1e(e,o,r,i));if(s.length){const i=Dh(e,o,r);s.forEach(c=>{const l=sB(e,o,r,c);n.push({key:l?l[i.key||e1]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]),fTe=It(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].saving).filter(i=>iB(e,o,r,i));if(s.length){const i=Dh(e,o,r);s.forEach(c=>{const l=sB(e,o,r,c);n.push({key:l?l[i.key||e1]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]);function rB(e,t,n,o){return e.entities.records?.[t]?.[n]?.edits?.[o]}const p1e=It((e,t,n,o)=>{const{transientEdits:r}=Dh(e,t,n)||{},s=rB(e,t,n,o)||{};return r?Object.keys(s).reduce((i,c)=>(r[c]||(i[c]=s[c]),i),{}):s},(e,t,n,o)=>[e.entities.config,e.entities.records?.[t]?.[n]?.edits?.[o]]);function f1e(e,t,n,o){return iB(e,t,n,o)||Object.keys(p1e(e,t,n,o)).length>0}const sB=It((e,t,n,o)=>{const r=d1e(e,t,n,o),s=rB(e,t,n,o);return!r&&!s?!1:{...r,...s}},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData.itemIsComplete[i]?.[o],e.entities.records?.[t]?.[n]?.edits?.[o]]});function bTe(e,t,n,o){var r;const{pending:s,isAutosave:i}=(r=e.entities.records?.[t]?.[n]?.saving?.[o])!==null&&r!==void 0?r:{};return!!(s&&i)}function iB(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.saving?.[o]?.pending)!==null&&r!==void 0?r:!1}function hTe(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.deleting?.[o]?.pending)!==null&&r!==void 0?r:!1}function mTe(e,t,n,o){return e.entities.records?.[t]?.[n]?.saving?.[o]?.error}function gTe(e,t,n,o){return e.entities.records?.[t]?.[n]?.deleting?.[o]?.error}function MTe(e){Ke("select( 'core' ).getUndoEdit()",{since:"6.3"})}function zTe(e){Ke("select( 'core' ).getRedoEdit()",{since:"6.3"})}function OTe(e){return e.undoManager.hasUndo()}function yTe(e){return e.undoManager.hasRedo()}function j5(e){return e.currentTheme?Zd(e,"root","theme",e.currentTheme):null}function b1e(e){return e.currentGlobalStylesId}function ATe(e){var t;return(t=j5(e)?.theme_supports)!==null&&t!==void 0?t:nTe}function vTe(e,t){return e.embedPreviews[t]}function xTe(e,t){const n=e.embedPreviews[t],o=''+t+"";return n?n.html===o:!1}function aB(e,t,n,o){if(typeof n=="object"&&(!n.kind||!n.name))return!1;const s=P5(t,n,o);return e.userPermissions[s]}function wTe(e,t,n,o){return Ke("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),aB(e,"update",{kind:t,name:n,id:o})}function _Te(e,t,n){return e.autosaves[n]}function kTe(e,t,n,o){return o===void 0?void 0:e.autosaves[n]?.find(s=>s.author===o)}const STe=At(e=>(t,n,o)=>e(No).hasFinishedResolution("getAutosaves",[n,o]));function CTe(e){return e.editsReference}function qTe(e){const t=j5(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function RTe(e){const t=j5(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function TTe(e){return e.blockPatterns}function ETe(e){return e.blockPatternCategories}function WTe(e){return e.userPatternCategories}function NTe(e){Ke("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});const t=b1e(e);return t?e.themeGlobalStyleRevisions[t]:null}function h1e(e,t){return e.defaultTemplates[JSON.stringify(t)]}const BTe=(e,t,n,o,r)=>{const s=e.entities.records?.[t]?.[n]?.revisions?.[o];return s?V0e(s,r):null},LTe=It((e,t,n,o,r,s)=>{var i;const c=e.entities.records?.[t]?.[n]?.revisions?.[o];if(!c)return;const l=(i=s?.context)!==null&&i!==void 0?i:"default";if(s===void 0)return c.itemIsComplete[l]?.[r]?c.items[l][r]:void 0;const u=c.items[l]?.[r];if(u&&s._fields){var d;const p={},f=(d=Md(s._fields))!==null&&d!==void 0?d:[];for(let b=0;b{g=g?.[z]}),L5(p,h,g)}return p}return u},(e,t,n,o,r,s)=>{var i;const c=(i=s?.context)!==null&&i!==void 0?i:"default";return[e.entities.records?.[t]?.[n]?.revisions?.[o]?.items?.[c]?.[r],e.entities.records?.[t]?.[n]?.revisions?.[o]?.itemIsComplete?.[c]?.[r]]}),PTe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:b1e,__experimentalGetCurrentThemeBaseGlobalStyles:qTe,__experimentalGetCurrentThemeGlobalStylesVariations:RTe,__experimentalGetDirtyEntityRecords:pTe,__experimentalGetEntitiesBeingSaved:fTe,__experimentalGetEntityRecordNoResolver:cTe,canUser:aB,canUserEditEntityRecord:wTe,getAuthors:rTe,getAutosave:kTe,getAutosaves:_Te,getBlockPatternCategories:ETe,getBlockPatterns:TTe,getCurrentTheme:j5,getCurrentThemeGlobalStylesRevisions:NTe,getCurrentUser:sTe,getDefaultTemplateId:h1e,getEditedEntityRecord:sB,getEmbedPreview:vTe,getEntitiesByKind:iTe,getEntitiesConfig:u1e,getEntity:aTe,getEntityConfig:Dh,getEntityRecord:Zd,getEntityRecordEdits:rB,getEntityRecordNonTransientEdits:p1e,getEntityRecords:oB,getEntityRecordsTotalItems:uTe,getEntityRecordsTotalPages:dTe,getLastEntityDeleteError:gTe,getLastEntitySaveError:mTe,getRawEntityRecord:d1e,getRedoEdit:zTe,getReferenceByDistinctEdits:CTe,getRevision:LTe,getRevisions:BTe,getThemeSupports:ATe,getUndoEdit:MTe,getUserPatternCategories:WTe,getUserQueryResults:l1e,hasEditsForEntityRecord:f1e,hasEntityRecords:lTe,hasFetchedAutosaves:STe,hasRedo:yTe,hasUndo:OTe,isAutosavingEntityRecord:bTe,isDeletingEntityRecord:hTe,isPreviewEmbedFallback:xTe,isRequestingEmbedPreview:oTe,isSavingEntityRecord:iB},Symbol.toStringTag,{value:"Module"})),{lock:jTe,unlock:eh}=P0("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/core-data");function ITe(e){return e.undoManager}function DTe(e){return e.navigationFallbackId}const FTe=At(e=>It((t,n)=>e(No).getBlockPatterns().filter(({postTypes:o})=>!o||Array.isArray(o)&&o.includes(n)),()=>[e(No).getBlockPatterns()])),m1e=At(e=>It((t,n,o,r)=>(Array.isArray(r)?r:[r]).map(i=>({delete:e(No).canUser("delete",{kind:n,name:o,id:i}),update:e(No).canUser("update",{kind:n,name:o,id:i})})),t=>[t.userPermissions]));function $Te(e,t,n,o){return m1e(e,t,n,o)[0]}function VTe(e,t){var n;return(n=e.registeredPostMeta?.[t])!==null&&n!==void 0?n:{}}function g1e(e){return!e||!["number","string"].includes(typeof e)||Number(e)===0?null:e.toString()}const HTe=At(e=>It(()=>{if(!e(No).canUser("read",{kind:"root",name:"site"}))return null;const n=e(No).getEntityRecord("root","site");if(!n)return null;const o=n?.show_on_front==="page"?g1e(n.page_on_front):null;return o?{postType:"page",postId:o}:{postType:"wp_template",postId:e(No).getDefaultTemplateId({slug:"front-page"})}},t=>[aB(t,"read",{kind:"root",name:"site"})&&Zd(t,"root","site"),h1e(t,{slug:"front-page"})])),UTe=At(e=>()=>{if(!e(No).canUser("read",{kind:"root",name:"site"}))return null;const n=e(No).getEntityRecord("root","site");return n?.show_on_front==="page"?g1e(n.page_for_posts):null}),XTe=At(e=>(t,n,o)=>{const r=eh(e(No)).getHomePage();if(!r)return;if(n==="page"&&n===r?.postType&&o.toString()===r?.postId){const u=e(No).getEntityRecords("postType","wp_template",{per_page:-1});if(!u)return;const d=u.find(({slug:p})=>p==="front-page")?.id;if(d)return d}const s=e(No).getEditedEntityRecord("postType",n,o);if(!s)return;const i=eh(e(No)).getPostsPageId();if(n==="page"&&i===o.toString())return e(No).getDefaultTemplateId({slug:"home"});const c=s.template;if(c){const u=e(No).getEntityRecords("postType","wp_template",{per_page:-1})?.find(({slug:d})=>d===c);if(u)return u.id}let l;return s.slug?l=n==="page"?`${n}-${s.slug}`:`single-${n}-${s.slug}`:l=n==="page"?"page":`single-${n}`,e(No).getDefaultTemplateId({slug:l})}),GTe=Object.freeze(Object.defineProperty({__proto__:null,getBlockPatternsForPostType:FTe,getEntityRecordPermissions:$Te,getEntityRecordsPermissions:m1e,getHomePage:HTe,getNavigationFallbackId:DTe,getPostsPageId:UTe,getRegisteredPostMeta:VTe,getTemplateId:XTe,getUndoManager:ITe},Symbol.toStringTag,{value:"Module"}));let fA;const KTe=new Uint8Array(16);function YTe(){if(!fA&&(fA=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!fA))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fA(KTe)}const $0=[];for(let e=0;e<256;++e)$0.push((e+256).toString(16).slice(1));function ZTe(e,t=0){return $0[e[t+0]]+$0[e[t+1]]+$0[e[t+2]]+$0[e[t+3]]+"-"+$0[e[t+4]]+$0[e[t+5]]+"-"+$0[e[t+6]]+$0[e[t+7]]+"-"+$0[e[t+8]]+$0[e[t+9]]+"-"+$0[e[t+10]]+$0[e[t+11]]+$0[e[t+12]]+$0[e[t+13]]+$0[e[t+14]]+$0[e[t+15]]}const QTe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),pU={randomUUID:QTe};function Is(e,t,n){if(pU.randomUUID&&!t&&!e)return pU.randomUUID();e=e||{};const o=e.random||(e.rng||YTe)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,ZTe(o)}let TS=null;function JTe(e,t){const n=[...e],o=[];for(;n.length;)o.push(n.splice(0,t));return o}async function eEe(e){TS===null&&(TS=(await Tt({path:"/batch/v1",method:"OPTIONS"})).endpoints[0].args.requests.maxItems);const t=[];for(const n of JTe(e,TS)){const o=await Tt({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map(s=>({path:s.path,body:s.data,method:s.method,headers:s.headers}))}});let r;o.failed?r=o.responses.map(s=>({error:s?.body})):r=o.responses.map(s=>{const i={};return s.status>=200&&s.status<300?i.output=s.body:i.error=s.body,i}),t.push(...r)}return t}function tEe(e=eEe){let t=0,n=[];const o=new nEe;return{add(r){const s=++t;o.add(s);const i=c=>new Promise((l,u)=>{n.push({input:c,resolve:l,reject:u}),o.delete(s)});return typeof r=="function"?Promise.resolve(r(i)).finally(()=>{o.delete(s)}):i(r)},async run(){o.size&&await new Promise(i=>{const c=o.subscribe(()=>{o.size||(c(),i(void 0))})});let r;try{if(r=await e(n.map(({input:i})=>i)),r.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(i){for(const{reject:c}of n)c(i);throw i}let s=!0;return r.forEach((i,c)=>{const l=n[c];if(i?.error)l?.reject(i.error),s=!1;else{var u;l?.resolve((u=i?.output)!==null&&u!==void 0?u:i)}}),n=[],s}}}class nEe{constructor(...t){this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(t){return this.set.add(t),this.subscribers.forEach(n=>n()),this}delete(t){const n=this.set.delete(t);return this.subscribers.forEach(o=>o()),n}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}}const fU=globalThis||void 0||self,fs=()=>new Map,RE=e=>{const t=fs();return e.forEach((n,o)=>{t.set(o,n)}),t},w1=(e,t,n)=>{let o=e.get(t);return o===void 0&&e.set(t,o=n()),o},oEe=(e,t)=>{const n=[];for(const[o,r]of e)n.push(t(r,o));return n},rEe=(e,t)=>{for(const[n,o]of e)if(t(o,n))return!0;return!1},zd=()=>new Set,ES=e=>e[e.length-1],sEe=(e,t)=>{for(let n=0;n{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Tl((this._observers.get(t)||fs()).values()).forEach(o=>o(...n))}destroy(){this._observers=fs()}}class d3{constructor(){this._observers=fs()}on(t,n){w1(this._observers,t,zd).add(n)}once(t,n){const o=(...r)=>{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Tl((this._observers.get(t)||fs()).values()).forEach(o=>o(...n))}destroy(){this._observers=fs()}}const Oc=Math.floor,Lv=Math.abs,cEe=Math.log10,cB=(e,t)=>ee>t?e:t,M1e=e=>e!==0?e<0:1/e<0,bU=1,hU=2,WS=4,NS=8,VM=32,yl=64,Ns=128,I5=31,TE=63,ef=127,lEe=2147483647,z1e=Number.MAX_SAFE_INTEGER,uEe=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&Oc(e)===e),dEe=String.fromCharCode,pEe=e=>e.toLowerCase(),fEe=/^\s*/g,bEe=e=>e.replace(fEe,""),hEe=/([A-Z])/g,mU=(e,t)=>bEe(e.replace(hEe,n=>`${t}${pEe(n)}`)),mEe=e=>{const t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let r=0;rHM.encode(e),EE=HM?gEe:mEe;let OM=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});OM&&OM.decode(new Uint8Array).length===1&&(OM=null);class p3{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const k0=()=>new p3,MEe=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array(MEe(e));let n=0;for(let o=0;o{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},UM=x0,sn=(e,t)=>{for(;t>ef;)x0(e,Ns|ef&t),t=Oc(t/128);x0(e,ef&t)},lB=(e,t)=>{const n=M1e(t);for(n&&(t=-t),x0(e,(t>TE?Ns:0)|(n?yl:0)|TE&t),t=Oc(t/64);t>0;)x0(e,(t>ef?Ns:0)|ef&t),t=Oc(t/128)},WE=new Uint8Array(3e4),OEe=WE.length/3,yEe=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),o=n.length;sn(e,o);for(let r=0;r{const n=e.cbuf.length,o=e.cpos,r=cB(n-o,t.length),s=t.length-r;e.cbuf.set(t.subarray(0,r),o),e.cpos+=r,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array($f(n*2,s)),e.cbuf.set(t.subarray(r)),e.cpos=s)},jr=(e,t)=>{sn(e,t.byteLength),D5(e,t)},uB=(e,t)=>{zEe(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},vEe=(e,t)=>uB(e,4).setFloat32(0,t,!1),xEe=(e,t)=>uB(e,8).setFloat64(0,t,!1),wEe=(e,t)=>uB(e,8).setBigInt64(0,t,!1),gU=new DataView(new ArrayBuffer(4)),_Ee=e=>(gU.setFloat32(0,e),gU.getFloat32(0)===e),th=(e,t)=>{switch(typeof t){case"string":x0(e,119),uc(e,t);break;case"number":uEe(t)&&Lv(t)<=lEe?(x0(e,125),lB(e,t)):_Ee(t)?(x0(e,124),vEe(e,t)):(x0(e,123),xEe(e,t));break;case"bigint":x0(e,122),wEe(e,t);break;case"object":if(t===null)x0(e,126);else if(iEe(t)){x0(e,117),sn(e,t.length);for(let n=0;n0&&sn(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const zU=e=>{e.count>0&&(lB(e.encoder,e.count===1?e.s:-e.s),e.count>1&&sn(e.encoder,e.count-2))};class Pv{constructor(){this.encoder=new p3,this.s=0,this.count=0}write(t){this.s===t?this.count++:(zU(this),this.count=1,this.s=t)}toUint8Array(){return zU(this),Sr(this.encoder)}}const OU=e=>{if(e.count>0){const t=e.diff*2+(e.count===1?0:1);lB(e.encoder,t),e.count>1&&sn(e.encoder,e.count-2)}};class BS{constructor(){this.encoder=new p3,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(OU(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return OU(this),Sr(this.encoder)}}class kEe{constructor(){this.sarr=[],this.s="",this.lensE=new Pv}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new p3;return this.sarr.push(this.s),this.s="",uc(t,this.sarr.join("")),D5(t,this.lensE.toUint8Array()),Sr(t)}}const ba=e=>new Error(e),dc=()=>{throw ba("Method unimplemented")},yc=()=>{throw ba("Unexpected case")},O1e=ba("Unexpected end of array"),y1e=ba("Integer out of Range");class F5{constructor(t){this.arr=t,this.pos=0}}const Rc=e=>new F5(e),SEe=e=>e.pos!==e.arr.length,CEe=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},w0=e=>CEe(e,_n(e)),ff=e=>e.arr[e.pos++],_n=e=>{let t=0,n=1;const o=e.arr.length;for(;e.posz1e)throw y1e}throw O1e},dB=e=>{let t=e.arr[e.pos++],n=t&TE,o=64;const r=(t&yl)>0?-1:1;if(!(t&Ns))return r*n;const s=e.arr.length;for(;e.posz1e)throw y1e}throw O1e},qEe=e=>{let t=_n(e);if(t===0)return"";{let n=String.fromCodePoint(ff(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(ff(e));else for(;t>0;){const o=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,r),t-=o}return decodeURIComponent(escape(n))}},REe=e=>OM.decode(w0(e)),Al=OM?REe:qEe,pB=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},TEe=e=>pB(e,4).getFloat32(0,!1),EEe=e=>pB(e,8).getFloat64(0,!1),WEe=e=>pB(e,8).getBigInt64(0,!1),NEe=[e=>{},e=>null,dB,TEe,EEe,WEe,e=>!1,e=>!0,Al,e=>{const t=_n(e),n={};for(let o=0;o{const t=_n(e),n=[];for(let o=0;oNEe[127-ff(e)](e);class yU extends F5{constructor(t,n){super(t),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),SEe(this)?this.count=_n(this)+1:this.count=-1),this.count--,this.s}}class jv extends F5{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=dB(this);const t=M1e(this.s);this.count=1,t&&(this.s=-this.s,this.count=_n(this)+2)}return this.count--,this.s}}class LS extends F5{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=dB(this),n=t&1;this.diff=Oc(t/2),this.count=1,n&&(this.count=_n(this)+2)}return this.s+=this.diff,this.count--,this.s}}class BEe{constructor(t){this.decoder=new jv(t),this.str=Al(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),n=this.str.slice(this.spos,t);return this.spos=t,n}}const LEe=crypto.getRandomValues.bind(crypto),PEe=Math.random,A1e=()=>LEe(new Uint32Array(1))[0],jEe="10000000-1000-4000-8000"+-1e11,v1e=()=>jEe.replace(/[018]/g,e=>(e^A1e()&15>>e/4).toString(16)),El=Date.now,oh=e=>new Promise(e);Promise.all.bind(Promise);const IEe=e=>Promise.reject(e),fB=e=>Promise.resolve(e);var x1e={},$5={};$5.byteLength=$Ee;$5.toByteArray=HEe;$5.fromByteArray=GEe;var rc=[],fi=[],DEe=typeof Uint8Array<"u"?Uint8Array:Array,PS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Fb=0,FEe=PS.length;Fb0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var o=n===t?0:4-n%4;return[n,o]}function $Ee(e){var t=w1e(e),n=t[0],o=t[1];return(n+o)*3/4-o}function VEe(e,t,n){return(t+n)*3/4-n}function HEe(e){var t,n=w1e(e),o=n[0],r=n[1],s=new DEe(VEe(e,o,r)),i=0,c=r>0?o-4:o,l;for(l=0;l>16&255,s[i++]=t>>8&255,s[i++]=t&255;return r===2&&(t=fi[e.charCodeAt(l)]<<2|fi[e.charCodeAt(l+1)]>>4,s[i++]=t&255),r===1&&(t=fi[e.charCodeAt(l)]<<10|fi[e.charCodeAt(l+1)]<<4|fi[e.charCodeAt(l+2)]>>2,s[i++]=t>>8&255,s[i++]=t&255),s}function UEe(e){return rc[e>>18&63]+rc[e>>12&63]+rc[e>>6&63]+rc[e&63]}function XEe(e,t,n){for(var o,r=[],s=t;sc?c:i+s));return o===1?(t=e[n-1],r.push(rc[t>>2]+rc[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(rc[t>>10]+rc[t>>4&63]+rc[t<<2&63]+"=")),r.join("")}var bB={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */bB.read=function(e,t,n,o,r){var s,i,c=r*8-o-1,l=(1<>1,d=-7,p=n?r-1:0,f=n?-1:1,b=e[t+p];for(p+=f,s=b&(1<<-d)-1,b>>=-d,d+=c;d>0;s=s*256+e[t+p],p+=f,d-=8);for(i=s&(1<<-d)-1,s>>=-d,d+=o;d>0;i=i*256+e[t+p],p+=f,d-=8);if(s===0)s=1-u;else{if(s===l)return i?NaN:(b?-1:1)*(1/0);i=i+Math.pow(2,o),s=s-u}return(b?-1:1)*i*Math.pow(2,s-o)};bB.write=function(e,t,n,o,r,s){var i,c,l,u=s*8-r-1,d=(1<>1,f=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:s-1,h=o?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,i=d):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),i+p>=1?t+=f/l:t+=f*Math.pow(2,1-p),t*l>=2&&(i++,l/=2),i+p>=d?(c=0,i=d):i+p>=1?(c=(t*l-1)*Math.pow(2,r),i=i+p):(c=t*Math.pow(2,p-1)*Math.pow(2,r),i=0));r>=8;e[n+b]=c&255,b+=h,c/=256,r-=8);for(i=i<0;e[n+b]=i&255,b+=h,i/=256,u-=8);e[n+b-h]|=g*128};/*! +`,n.join(", "))}function XCe(e,t){const n=e.select,o={};let r,s,i=!1,c,l,u;const d=new Map;function p(b){var h;return(h=e.stores[b]?.store?.getState?.())!==null&&h!==void 0?h:{}}const f=b=>{const h=[...b],g=new Set;function z(_){if(i)for(const S of h)d.get(S)!==p(S)&&(i=!1);d.clear();const v=()=>{i=!1,_()},M=()=>{c?_S.add(o,v):v()},y=[];function k(S){y.push(e.subscribe(M,S))}for(const S of h)k(S);return g.add(k),()=>{g.delete(k);for(const S of y.values())S?.();_S.cancel(o)}}function A(_){for(const v of _)if(!h.includes(v)){h.push(v);for(const M of g)M(v)}}return{subscribe:z,updateStores:A}};return(b,h)=>{function g(){if(i&&b===r)return s;const A={current:null},_=e.__unstableMarkListeningStores(()=>b(n,e),A);if(globalThis.SCRIPT_DEBUG&&!u){const v=b(n,e);ds(_,v)||(UCe(_,v),u=!0)}if(l)l.updateStores(A.current);else{for(const v of A.current)d.set(v,p(v));l=f(A.current)}ds(s,_)||(s=_),r=b,i=!0}function z(){return g(),s}return c&&!h&&(i=!1,_S.cancel(o)),g(),c=h,{subscribe:l.subscribe,getValue:z}}}function GCe(e){return Fn().select(e)}function KCe(e,t,n){const o=Fn(),r=HCe(),s=x.useMemo(()=>XCe(o),[o,e]),i=x.useCallback(t,n),{subscribe:c,getValue:l}=s(i,r),u=x.useSyncExternalStore(c,l,l);return x.useDebugValue(u),u}function G(e,t){const n=typeof e!="function",o=x.useRef(n);if(n!==o.current){const r=o.current?"static":"mapping",s=n?"static":"mapping";throw new Error(`Switching useSelect from ${r} to ${s} is not allowed`)}return n?GCe(e):KCe(!1,e,t)}const Ul=e=>Or(t=>tSe(n=>{const r=G((s,i)=>e(s,n,i));return a.jsx(t,{...n,...r})}),"withSelect"),Oe=e=>{const{dispatch:t}=Fn();return e===void 0?t:t(e)},YCe=(e,t)=>{const n=Fn(),o=x.useRef(e);return UN(()=>{o.current=e}),x.useMemo(()=>{const r=o.current(n.dispatch,n);return Object.fromEntries(Object.entries(r).map(([s,i])=>(typeof i!="function"&&console.warn(`Property ${s} returned from dispatchMap in useDispatchWithMap must be a function.`),[s,(...c)=>o.current(n.dispatch,n)[s](...c)])))},[n,...t])},Ff=e=>Or(t=>n=>{const r=YCe((s,i)=>e(s,n,i),[]);return a.jsx(t,{...n,...r})},"withDispatch");function kr(e){return qc.dispatch(e)}function uo(e){return qc.select(e)}const J0=q0e,j0e=qc.resolveSelect;qc.suspendSelect;const ZCe=qc.subscribe;qc.registerGenericStore;const QCe=qc.registerStore;qc.use;const Us=qc.register;var kS,eU;function JCe(){return eU||(eU=1,kS=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),kS}var eqe=JCe();const N0=Zr(eqe);function tqe(e,t){if(!e)return t;let n=!1;const o={};for(const r in t)N0(e[r],t[r])?o[r]=e[r]:(n=!0,o[r]=t[r]);if(!n)return e;for(const r in e)o.hasOwnProperty(r)||(o[r]=e[r]);return o}function Md(e){return typeof e=="string"?e.split(","):Array.isArray(e)?e:null}const I0e=e=>t=>(n,o)=>n===void 0||e(o)?t(n,o):n,YN=e=>(...t)=>async({resolveSelect:n})=>{await n[e](...t)},tU=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}},D0e=e=>t=>(n,o)=>t(n,e(o));function nqe(e){const t=new WeakMap;return n=>{let o;return t.has(n)?o=t.get(n):(o=e(n),n!==null&&typeof n=="object"&&t.set(n,o)),o}}function oqe(e,t){return(e.rawAttributes||[]).includes(t)}function B5(e,t,n){if(!e||typeof e!="object")return e;const o=Array.isArray(t)?t:t.split(".");return o.reduce((r,s,i)=>(r[s]===void 0&&(Number.isInteger(o[i+1])?r[s]=[]:r[s]={}),i===o.length-1&&(r[s]=n),r[s]),e),e}function rqe(e,t,n){if(!e||typeof e!="object"||typeof t!="string"&&!Array.isArray(t))return e;const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach(s=>{r=r?.[s]}),r!==void 0?r:n}function sqe(e){return/^\s*\d+\s*$/.test(e)}const zM=["create","read","update","delete"];function ZN(e){const t={};if(!e)return t;const n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[o,r]of Object.entries(n))t[o]=e.includes(r);return t}function L5(e,t,n){return(typeof t=="object"?[e,t.kind,t.name,t.id]:[e,t,n]).filter(Boolean).join("/")}const F0e=Symbol("RECEIVE_INTERMEDIATE_RESULTS");function $0e(e,t,n){return{type:"RECEIVE_ITEMS",items:Array.isArray(e)?e:[e],persistedEdits:t,meta:n}}function iqe(e,t,n,o=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(n)?n:[n],kind:e,name:t,invalidateCache:o}}function aqe(e,t={},n,o){return{...$0e(e,n,o),query:t}}function cqe(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let s=0;s{_=_?.[v]}),B5(g,A,_)}}else{if(!e.itemIsComplete[c]?.[b])return null;g=h}p.push(g)}return p}const V0e=It((e,t={})=>{let n=nU.get(e);if(n){const r=n.get(t);if(r!==void 0)return r}else n=new Va,nU.set(e,n);const o=lqe(e,t);return n.set(t,o),o});function H0e(e,t={}){var n;const{stableKey:o,context:r}=jh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalItems)!==null&&n!==void 0?n:null}function uqe(e,t={}){var n;const{stableKey:o,context:r}=jh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalPages)!==null&&n!==void 0?n:null}function dqe(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce((n,o)=>({...n,[o.name]:o}),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter(([n])=>!t.names.includes(n)))}return e}const pqe=J0({formatTypes:dqe}),QN=It(e=>Object.values(e.formatTypes),e=>[e.formatTypes]);function fqe(e,t){return e.formatTypes[t]}function bqe(e,t){const n=QN(e);return n.find(({className:o,tagName:r})=>o===null&&t===r)||n.find(({className:o,tagName:r})=>o===null&&r==="*")}function hqe(e,t){return QN(e).find(({className:n})=>n===null?!1:` ${t} `.indexOf(` ${n} `)>=0)}const mqe=Object.freeze(Object.defineProperty({__proto__:null,getFormatType:fqe,getFormatTypeForBareElement:bqe,getFormatTypeForClassName:hqe,getFormatTypes:QN},Symbol.toStringTag,{value:"Module"}));function gqe(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function Mqe(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}const zqe=Object.freeze(Object.defineProperty({__proto__:null,addFormatTypes:gqe,removeFormatTypes:Mqe},Symbol.toStringTag,{value:"Module"})),Oqe="core/rich-text",ul=x1(Oqe,{reducer:pqe,selectors:mqe,actions:zqe});Us(ul);function W4(e,t){if(e===t)return!0;if(!e||!t||e.type!==t.type)return!1;const n=e.attributes,o=t.attributes;if(n===o)return!0;if(!n||!o)return!1;const r=Object.keys(n),s=Object.keys(o);if(r.length!==s.length)return!1;const i=r.length;for(let c=0;c{const r=t[o-1];if(r){const s=n.slice();s.forEach((i,c)=>{const l=r[c];W4(i,l)&&(s[c]=l)}),t[o]=s}}),{...e,formats:t}}function oU(e,t,n){return e=e.slice(),e[t]=n,e}function qi(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t.type);if(c){const l=i[n].indexOf(c);for(;i[n]&&i[n][l]===c;)i[n]=oU(i[n],l,t),n--;for(o++;i[o]&&i[o][l]===c;)i[o]=oU(i[o],l,t),o++}}else{let c=1/0;for(let l=n;ld!==t.type);const u=i[l].length;uc!==t.type)||[],t]})}function dl({implementation:e},t){return dl.body||(dl.body=e.createHTMLDocument("").body),dl.body.innerHTML=t,dl.body}const pl="",U0e="\uFEFF";function JN(e,t=[]){const{formats:n,start:o,end:r,activeFormats:s}=e;if(o===void 0)return t;if(o===r){if(s)return s;const u=n[o-1]||t,d=n[o]||t;return u.lengthW4(p,f))||c.splice(d,1)}if(c.length===0)return t}return c||t}function X0e(e){return uo(ul).getFormatType(e)}function rU(e,t){if(t)return e;const n={};for(const o in e){let r=o;o.startsWith("data-disable-rich-text-")&&(r=o.slice(23)),n[r]=e[o]}return n}function dA({type:e,tagName:t,attributes:n,unregisteredAttributes:o,object:r,boundaryClass:s,isEditableTree:i}){const c=X0e(e);let l={};if(s&&i&&(l["data-rich-text-format-boundary"]="true"),!c)return n&&(l={...n,...l}),{type:e,attributes:rU(l,i),object:r};l={...o,...l};for(const u in n){const d=c.attributes?c.attributes[u]:!1;d?l[d]=n[u]:l[u]=n[u]}return c.className&&(l.class?l.class=`${c.className} ${l.class}`:l.class=c.className),i&&c.contentEditable===!1&&(l.contenteditable="false"),{type:t||c.tagName,object:c.object,attributes:rU(l,i)}}function yqe(e,t,n){do if(e[n]!==t[n])return!1;while(n--);return!0}function G0e({value:e,preserveWhiteSpace:t,createEmpty:n,append:o,getLastChild:r,getParent:s,isText:i,getText:c,remove:l,appendText:u,onStartIndex:d,onEndIndex:p,isEditableTree:f,placeholder:b}){const{formats:h,replacements:g,text:z,start:A,end:_}=e,v=h.length+1,M=n(),y=JN(e),k=y[y.length-1];let S,C;o(M,"");for(let R=0;R{if(N&&S&&yqe(B,S,I)){N=r(N);return}const{type:P,tagName:$,attributes:F,unregisteredAttributes:X}=j,Z=f&&j===k,V=s(N),ee=o(V,dA({type:P,tagName:$,attributes:F,unregisteredAttributes:X,boundaryClass:Z,isEditableTree:f}));i(N)&&c(N).length===0&&l(N),N=o(ee,"")}),R===0&&(d&&A===0&&d(M,N),p&&_===0&&p(M,N)),T===pl){const j=g[R];if(!j)continue;const{type:I,attributes:P,innerHTML:$}=j,F=X0e(I);f&&I==="#comment"?(N=o(s(N),{type:"span",attributes:{contenteditable:"false","data-rich-text-comment":P["data-rich-text-comment"]}}),o(o(N,{type:"span"}),P["data-rich-text-comment"].trim())):!f&&I==="script"?(N=o(s(N),dA({type:"script",isEditableTree:f})),o(N,{html:decodeURIComponent(P["data-rich-text-script"])})):F?.contentEditable===!1?(N=o(s(N),dA({...j,isEditableTree:f,boundaryClass:A===R&&_===R+1})),$&&o(N,{html:$})):N=o(s(N),dA({...j,object:!0,isEditableTree:f})),N=o(s(N),"")}else!t&&T===` +`?(N=o(s(N),{type:"br",attributes:f?{"data-rich-text-line-break":"true"}:void 0,object:!0}),N=o(s(N),"")):i(N)?u(N,T):N=o(s(N),T);d&&A===R+1&&d(M,N),p&&_===R+1&&p(M,N),E&&R===z.length&&(o(s(N),U0e),b&&z.length===0&&o(s(N),{type:"span",attributes:{"data-rich-text-placeholder":b,style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),S=B,C=T}return M}function T0({value:e,preserveWhiteSpace:t}){const n=G0e({value:e,preserveWhiteSpace:t,createEmpty:Aqe,append:xqe,getLastChild:vqe,getParent:_qe,isText:kqe,getText:Sqe,remove:Cqe,appendText:wqe});return K0e(n.children)}function Aqe(){return{}}function vqe({children:e}){return e&&e[e.length-1]}function xqe(e,t){return typeof t=="string"&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function wqe(e,t){e.text+=t}function _qe({parent:e}){return e}function kqe({text:e}){return typeof e=="string"}function Sqe({text:e}){return e}function Cqe(e){const t=e.parent.children.indexOf(e);return t!==-1&&e.parent.children.splice(t,1),e}function qqe({type:e,attributes:t,object:n,children:o}){if(e==="#comment")return``;let r="";for(const s in t)Ire(s)&&(r+=` ${s}="${A5(t[s])}"`);return n?`<${e}${r}>`:`<${e}${r}>${K0e(o)}`}function K0e(e=[]){return e.map(t=>t.html!==void 0?t.html:t.text===void 0?qqe(t):xke(t.text)).join("")}function Jp({text:e}){return e.replace(pl,"")}function $p(){return{formats:[],replacements:[],text:""}}function Rqe({tagName:e,attributes:t}){let n;if(t&&t.class&&(n=uo(ul).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=uo(ul).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{formatType:n,type:n.name,tagName:e};const o={},r={},s={...t};for(const i in n.attributes){const c=n.attributes[i];o[i]=s[c],delete s[c],typeof o[i]>"u"&&delete o[i]}for(const i in s)r[i]=t[i];return n.contentEditable===!1&&delete r.contenteditable,{formatType:n,type:n.name,tagName:e,attributes:o,unregisteredAttributes:r}}class Xo{#e;static empty(){return new Xo}static fromPlainText(t){return new Xo(eo({text:t}))}static fromHTMLString(t){return new Xo(eo({html:t}))}static fromHTMLElement(t,n={}){const{preserveWhiteSpace:o=!1}=n,r=o?t:Y0e(t),s=new Xo(eo({element:r}));return Object.defineProperty(s,"originalHTML",{value:t.innerHTML}),s}constructor(t=$p()){this.#e=t}toPlainText(){return Jp(this.#e)}toHTMLString({preserveWhiteSpace:t}={}){return this.originalHTML||T0({value:this.#e,preserveWhiteSpace:t})}valueOf(){return this.toHTMLString()}toString(){return this.toHTMLString()}toJSON(){return this.toHTMLString()}get length(){return this.text.length}get formats(){return this.#e.formats}get replacements(){return this.#e.replacements}get text(){return this.#e.text}}for(const e of Object.getOwnPropertyNames(String.prototype))Xo.prototype.hasOwnProperty(e)||Object.defineProperty(Xo.prototype,e,{value(...t){return this.toHTMLString()[e](...t)}});function eo({element:e,text:t,html:n,range:o,__unstableIsEditableTree:r}={}){return n instanceof Xo?{text:n.text,formats:n.formats,replacements:n.replacements}:typeof t=="string"&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:(typeof n=="string"&&n.length>0&&(e=dl(document,n)),typeof e!="object"?$p():Z0e({element:e,range:o,isEditableTree:r}))}function qu(e,t,n,o){if(!n)return;const{parentNode:r}=t,{startContainer:s,startOffset:i,endContainer:c,endOffset:l}=n,u=e.text.length;o.start!==void 0?e.start=u+o.start:t===s&&t.nodeType===t.TEXT_NODE?e.start=u+i:r===s&&t===s.childNodes[i]?e.start=u:r===s&&t===s.childNodes[i-1]?e.start=u+o.text.length:t===s&&(e.start=u),o.end!==void 0?e.end=u+o.end:t===c&&t.nodeType===t.TEXT_NODE?e.end=u+l:r===c&&t===c.childNodes[l-1]?e.end=u+o.text.length:r===c&&t===c.childNodes[l]?e.end=u:t===c&&(e.end=u+l)}function Tqe(e,t,n){if(!t)return;const{startContainer:o,endContainer:r}=t;let{startOffset:s,endOffset:i}=t;return e===o&&(s=n(e.nodeValue.slice(0,s)).length),e===r&&(i=n(e.nodeValue.slice(0,i)).length),{startContainer:o,startOffset:s,endContainer:r,endOffset:i}}function Y0e(e,t=!0){const n=e.cloneNode(!0);return n.normalize(),Array.from(n.childNodes).forEach((o,r,s)=>{if(o.nodeType===o.TEXT_NODE){let i=o.nodeValue;/[\n\t\r\f]/.test(i)&&(i=i.replace(/[\n\t\r\f]+/g," ")),i.indexOf(" ")!==-1&&(i=i.replace(/ {2,}/g," ")),r===0&&i.startsWith(" ")?i=i.slice(1):t&&r===s.length-1&&i.endsWith(" ")&&(i=i.slice(0,-1)),o.nodeValue=i}else o.nodeType===o.ELEMENT_NODE&&Y0e(o,!1)}),n}const Eqe="\r";function sU(e){return e.replace(new RegExp(`[${U0e}${pl}${Eqe}]`,"gu"),"")}function Z0e({element:e,range:t,isEditableTree:n}){const o=$p();if(!e)return o;if(!e.hasChildNodes())return qu(o,e,t,$p()),o;const r=e.childNodes.length;for(let i=0;in===t)}function Bqe({start:e,end:t,replacements:n,text:o}){if(!(e+1!==t||o[e]!==pl))return n[e]}function Xl({start:e,end:t}){if(!(e===void 0||t===void 0))return e===t}function SE({text:e}){return e.length===0}function Lqe(e,t=""){return typeof t=="string"&&(t=eo({text:t})),Ih(e.reduce((n,{formats:o,replacements:r,text:s})=>({formats:n.formats.concat(t.formats,o),replacements:n.replacements.concat(t.replacements,r),text:n.text+t.text+s})))}function Q0e(e,t){if(t={name:e,...t},typeof t.name!="string"){window.console.error("Format names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name)){window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");return}if(uo(ul).getFormatType(t.name)){window.console.error('Format "'+t.name+'" is already registered.');return}if(typeof t.tagName!="string"||t.tagName===""){window.console.error("Format tag names must be a string.");return}if((typeof t.className!="string"||t.className==="")&&t.className!==null){window.console.error("Format class names must be a string, or null to handle bare elements.");return}if(!/^[_a-zA-Z]+[a-zA-Z0-9_-]*$/.test(t.className)){window.console.error("A class name must begin with a letter, followed by any number of hyphens, underscores, letters, or numbers.");return}if(t.className===null){const n=uo(ul).getFormatTypeForBareElement(t.tagName);if(n&&n.name!=="core/unknown"){window.console.error(`Format "${n.name}" is already registered to handle bare tag name "${t.tagName}".`);return}}else{const n=uo(ul).getFormatTypeForClassName(t.className);if(n){window.console.error(`Format "${n.name}" is already registered to handle class name "${t.className}".`);return}}if(!("title"in t)||t.title===""){window.console.error('The format "'+t.name+'" must have a title.');return}if("keywords"in t&&t.keywords.length>3){window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');return}if(typeof t.title!="string"){window.console.error("Format titles must be strings.");return}return kr(ul).addFormatTypes(t),t}function Yd(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t);if(c){for(;i[n]?.find(l=>l===c);)SS(i,n,t),n--;for(o++;i[o]?.find(l=>l===c);)SS(i,o,t),o++}}else for(let c=n;cc!==t)||[]})}function SS(e,t,n){const o=e[t].filter(({type:r})=>r!==n);o.length?e[t]=o:delete e[t]}function E0(e,t,n=e.start,o=e.end){const{formats:r,replacements:s,text:i}=e;typeof t=="string"&&(t=eo({text:t}));const c=n+t.text.length;return Ih({formats:r.slice(0,n).concat(t.formats,r.slice(o)),replacements:s.slice(0,n).concat(t.replacements,s.slice(o)),text:i.slice(0,n)+t.text+i.slice(o),start:c,end:c})}function pa(e,t,n){return E0(e,eo(),t,n)}function Pqe({formats:e,replacements:t,text:n,start:o,end:r},s,i){return n=n.replace(s,(c,...l)=>{const u=l[l.length-2];let d=i,p,f;return typeof d=="function"&&(d=i(c,...l)),typeof d=="object"?(p=d.formats,f=d.replacements,d=d.text):(p=Array(d.length),f=Array(d.length),e[u]&&(p=p.fill(e[u]))),e=e.slice(0,u).concat(p,e.slice(u+c.length)),t=t.slice(0,u).concat(f,t.slice(u+c.length)),o&&(o=r=u+d.length),d}),Ih({formats:e,replacements:t,text:n,start:o,end:r})}function J0e(e,t,n,o){return E0(e,{formats:[,],replacements:[t],text:pl},n,o)}function Q2(e,t=e.start,n=e.end){const{formats:o,replacements:r,text:s}=e;return t===void 0||n===void 0?{...e}:{formats:o.slice(t,n),replacements:r.slice(t,n),text:s.slice(t,n)}}function tB({formats:e,replacements:t,text:n,start:o,end:r},s){if(typeof s!="string")return jqe(...arguments);let i=0;return n.split(s).map(c=>{const l=i,u={formats:e.slice(l,l+c.length),replacements:t.slice(l,l+c.length),text:c};return i+=s.length+c.length,o!==void 0&&r!==void 0&&(o>=l&&ol&&(u.start=0),r>=l&&ri&&(u.end=c.length)),u})}function jqe({formats:e,replacements:t,text:n,start:o,end:r},s=o,i=r){if(o===void 0||r===void 0)return;const c={formats:e.slice(0,s),replacements:t.slice(0,s),text:n.slice(0,s)},l={formats:e.slice(i),replacements:t.slice(i),text:n.slice(i),start:0,end:0};return[c,l]}function e1e(e,t){return e===t||e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function CE(e,t,n){const o=e.parentNode;let r=0;for(;e=e.previousSibling;)r++;return n=[r,...n],o!==t&&(n=CE(o,t,n)),n}function iU(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function Iqe(e,t){if(t.html!==void 0)return e.innerHTML+=t.html;typeof t=="string"&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:o}=t;if(n)if(n==="#comment")t=e.ownerDocument.createComment(o["data-rich-text-comment"]);else{t=e.ownerDocument.createElement(n);for(const r in o)t.setAttribute(r,o[r])}return e.appendChild(t)}function Dqe(e,t){e.appendData(t)}function Fqe({lastChild:e}){return e}function $qe({parentNode:e}){return e}function Vqe(e){return e.nodeType===e.TEXT_NODE}function Hqe({nodeValue:e}){return e}function Uqe(e){return e.parentNode.removeChild(e)}function Xqe({value:e,prepareEditableTree:t,isEditableTree:n=!0,placeholder:o,doc:r=document}){let s=[],i=[];return t&&(e={...e,formats:t(e)}),{body:G0e({value:e,createEmpty:()=>dl(r,""),append:Iqe,getLastChild:Fqe,getParent:$qe,isText:Vqe,getText:Hqe,remove:Uqe,appendText:Dqe,onStartIndex(u,d){s=CE(d,u,[d.nodeValue.length])},onEndIndex(u,d){i=CE(d,u,[d.nodeValue.length])},isEditableTree:n,placeholder:o}),selection:{startPath:s,endPath:i}}}function Gqe({value:e,current:t,prepareEditableTree:n,__unstableDomOnly:o,placeholder:r}){const{body:s,selection:i}=Xqe({value:e,prepareEditableTree:n,placeholder:r,doc:t.ownerDocument});t1e(s,t),e.start!==void 0&&!o&&Kqe(i,t)}function t1e(e,t){let n=0,o;for(;o=e.firstChild;){const r=t.childNodes[n];if(!r)t.appendChild(o);else if(r.isEqualNode(o))e.removeChild(o);else if(r.nodeName!==o.nodeName||r.nodeType===r.TEXT_NODE&&r.data!==o.data)t.replaceChild(o,r);else{const s=r.attributes,i=o.attributes;if(s){let c=s.length;for(;c--;){const{name:l}=s[c];o.getAttribute(l)||r.removeAttribute(l)}}if(i)for(let c=0;c0){if(e1e(d,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(d),p!==c.activeElement&&p instanceof l.HTMLElement&&p.focus()}function Yqe(e){if(!(typeof document>"u")){if(document.readyState==="complete"||document.readyState==="interactive")return void e();document.addEventListener("DOMContentLoaded",e)}}function aU(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}function Zqe(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=m("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;return t&&t.appendChild(e),e}function Qqe(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let n=0;n]+>/g," "),cU===e&&(e+=" "),cU=e,e}function Yt(e,t){Qqe(),e=Jqe(e);const n=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");o&&t==="assertive"?o.textContent=e:r&&(r.textContent=e),n&&n.removeAttribute("hidden")}function eRe(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");e===null&&Zqe(),t===null&&aU("assertive"),n===null&&aU("polite")}Yqe(eRe);function zc(e,t){return eB(e,t.type)?(t.title&&Yt(xe(m("%s removed."),t.title),"assertive"),Yd(e,t.type)):(t.title&&Yt(xe(m("%s applied."),t.title),"assertive"),qi(e,t))}function tRe(e,t,n,o){let r=e.startContainer;if(r.nodeType===r.TEXT_NODE&&e.startOffset===r.length&&r.nextSibling)for(r=r.nextSibling;r.firstChild;)r=r.firstChild;if(r.nodeType!==r.ELEMENT_NODE&&(r=r.parentElement),!r||r===t||!t.contains(r))return;const s=n+(o?"."+o:"");for(;r!==t;){if(r.matches(s))return r;r=r.parentElement}}function nRe(e,t){return{contextElement:t,getBoundingClientRect(){return t.contains(e.startContainer)?e.getBoundingClientRect():t.getBoundingClientRect()}}}function CS(e,t,n){if(!e)return;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return;const i=s.getRangeAt(0);if(!i||!i.startContainer)return;const c=tRe(i,e,t,n);return c||nRe(i,e)}function u3({editableContentElement:e,settings:t={}}){const{tagName:n,className:o,isActive:r}=t,[s,i]=x.useState(()=>CS(e,n,o)),c=Fr(r);return x.useLayoutEffect(()=>{if(!e)return;function l(){i(CS(e,n,o))}function u(){p.addEventListener("selectionchange",l)}function d(){p.removeEventListener("selectionchange",l)}const{ownerDocument:p}=e;return(e===p.activeElement||!c&&r||c&&!r)&&(i(CS(e,n,o)),u()),e.addEventListener("focusin",u),e.addEventListener("focusout",d),()=>{d(),e.removeEventListener("focusin",u),e.removeEventListener("focusout",d)}},[e,n,o,r,c]),s}const oRe="pre-wrap",rRe="1px";function sRe(){return x.useCallback(e=>{e&&(e.style.whiteSpace=oRe,e.style.minWidth=rRe)},[])}function iRe({record:e}){const t=x.useRef(),{activeFormats:n=[],replacements:o,start:r}=e.current,s=o[r];return x.useEffect(()=>{if((!n||!n.length)&&!s)return;const i="*[data-rich-text-format-boundary]",c=t.current.querySelector(i);if(!c)return;const{ownerDocument:l}=c,{defaultView:u}=l,p=u.getComputedStyle(c).color.replace(")",", 0.2)").replace("rgb","rgba"),f=`.rich-text:focus ${i}`,b=`background-color: ${p}`,h=`${f} {${b}}`,g="rich-text-boundary-style";let z=l.getElementById(g);z||(z=l.createElement("style"),z.id=g,l.head.appendChild(z)),z.innerHTML!==h&&(z.innerHTML=h)},[n,s]),t}const aRe=e=>t=>{function n(r){const{record:s}=e.current,{ownerDocument:i}=t;if(Xl(s.current)||!t.contains(i.activeElement))return;const c=Q2(s.current),l=Jp(c),u=T0({value:c});r.clipboardData.setData("text/plain",l),r.clipboardData.setData("text/html",u),r.clipboardData.setData("rich-text","true"),r.preventDefault(),r.type==="cut"&&i.execCommand("delete")}const{defaultView:o}=t.ownerDocument;return o.addEventListener("copy",n),o.addEventListener("cut",n),()=>{o.removeEventListener("copy",n),o.removeEventListener("cut",n)}},cRe=()=>e=>{function t(o){const{target:r}=o;if(r===e||r.textContent&&r.isContentEditable)return;const{ownerDocument:s}=r,{defaultView:i}=s,c=i.getSelection();if(c.containsNode(r))return;const l=s.createRange(),u=r.isContentEditable?r:r.closest("[contenteditable]");l.selectNode(u),c.removeAllRanges(),c.addRange(l),o.preventDefault()}function n(o){o.relatedTarget&&!e.contains(o.relatedTarget)&&o.relatedTarget.tagName==="A"&&t(o)}return e.addEventListener("click",t),e.addEventListener("focusin",n),()=>{e.removeEventListener("click",t),e.removeEventListener("focusin",n)}},lU=[],lRe=e=>t=>{function n(o){const{keyCode:r,shiftKey:s,altKey:i,metaKey:c,ctrlKey:l}=o;if(s||i||c||l||r!==wi&&r!==_i)return;const{record:u,applyRecord:d,forceRender:p}=e.current,{text:f,formats:b,start:h,end:g,activeFormats:z=[]}=u.current,A=Xl(u.current),{ownerDocument:_}=t,{defaultView:v}=_,{direction:M}=v.getComputedStyle(t),y=M==="rtl"?_i:wi,k=o.keyCode===y;if(A&&z.length===0&&(h===0&&k||g===f.length&&!k)||!A)return;const S=b[h-1]||lU,C=b[h]||lU,R=k?S:C,T=z.every((P,$)=>P===R[$]);let E=z.length;if(T?E{t.removeEventListener("keydown",n)}},uRe=e=>t=>{function n(o){const{keyCode:r}=o,{createRecord:s,handleChange:i}=e.current;if(o.defaultPrevented||r!==zl&&r!==Mc)return;const c=s(),{start:l,end:u,text:d}=c;l===0&&u!==0&&u===d.length&&(i(pa(c)),o.preventDefault())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}};function dRe({value:e,start:t,end:n,formats:o}){const r=Math.min(t,n),s=Math.max(t,n),i=e.formats[r-1]||[],c=e.formats[s]||[];for(e.activeFormats=o.map((l,u)=>{if(i[u]){if(W4(l,i[u]))return i[u]}else if(c[u]&&W4(l,c[u]))return c[u];return l});--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}const pRe=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),uU=[],n1e="data-rich-text-placeholder";function fRe(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:o}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const r=n.childNodes[o];!r||r.nodeType!==r.ELEMENT_NODE||!r.hasAttribute(n1e)||t.collapseToStart()}const bRe=e=>t=>{const{ownerDocument:n}=t,{defaultView:o}=n;let r=!1;function s(d){if(r)return;let p;d&&(p=d.inputType);const{record:f,applyRecord:b,createRecord:h,handleChange:g}=e.current;if(p&&(p.indexOf("format")===0||pRe.has(p))){b(f.current);return}const z=h(),{start:A,activeFormats:_=[]}=f.current,v=dRe({value:z,start:A,end:z.start,formats:_});g(v)}function i(){const{record:d,applyRecord:p,createRecord:f,onSelectionChange:b}=e.current;if(t.contentEditable!=="true")return;if(n.activeElement!==t){n.removeEventListener("selectionchange",i);return}if(r)return;const{start:h,end:g,text:z}=f(),A=d.current;if(z!==A.text){s();return}if(h===A.start&&g===A.end){A.text.length===0&&h===0&&fRe(o);return}const _={...A,start:h,end:g,activeFormats:A._newActiveFormats,_newActiveFormats:void 0},v=JN(_,uU);_.activeFormats=v,d.current=_,p(_,{domOnly:!0}),b(h,g)}function c(){r=!0,n.removeEventListener("selectionchange",i),t.querySelector(`[${n1e}]`)?.remove()}function l(){r=!1,s({inputType:"insertText"}),n.addEventListener("selectionchange",i)}function u(){const{record:d,isSelected:p,onSelectionChange:f,applyRecord:b}=e.current;t.parentElement.closest('[contenteditable="true"]')||(p?b(d.current,{domOnly:!0}):d.current={...d.current,start:void 0,end:void 0,activeFormats:uU},f(d.current.start,d.current.end),window.queueMicrotask(i),n.addEventListener("selectionchange",i))}return t.addEventListener("input",s),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("focus",u),()=>{t.removeEventListener("input",s),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("focus",u)}},hRe=()=>e=>{const{ownerDocument:t}=e,{defaultView:n}=t,o=n?.getSelection();let r;function s(){return o.rangeCount?o.getRangeAt(0):null}function i(c){const l=c.type==="keydown"?"keyup":"pointerup";function u(){t.removeEventListener(l,d),t.removeEventListener("selectionchange",u),t.removeEventListener("input",u)}function d(){u(),!e1e(r,s())&&t.dispatchEvent(new Event("selectionchange"))}t.addEventListener(l,d),t.addEventListener("selectionchange",u),t.addEventListener("input",u),r=s()}return e.addEventListener("pointerdown",i),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointerdown",i),e.removeEventListener("keydown",i)}};function mRe(){return e=>{const{ownerDocument:t}=e,{defaultView:n}=t;let o=null;function r(i){i.defaultPrevented||i.target!==e&&i.target.contains(e)&&(o=e.getAttribute("contenteditable"),e.setAttribute("contenteditable","false"),n.getSelection().removeAllRanges())}function s(){o!==null&&(e.setAttribute("contenteditable",o),o=null)}return n.addEventListener("pointerdown",r),n.addEventListener("pointerup",s),()=>{n.removeEventListener("pointerdown",r),n.removeEventListener("pointerup",s)}}}const gRe=[aRe,cRe,lRe,uRe,bRe,hRe,mRe];function MRe(e){const t=x.useRef(e);x.useInsertionEffect(()=>{t.current=e});const n=x.useMemo(()=>gRe.map(o=>o(t)),[t]);return Mn(o=>{const r=n.map(s=>s(o));return()=>{r.forEach(s=>s())}},[n])}function o1e({value:e="",selectionStart:t,selectionEnd:n,placeholder:o,onSelectionChange:r,preserveWhiteSpace:s,onChange:i,__unstableDisableFormats:c,__unstableIsSelected:l,__unstableDependencies:u=[],__unstableAfterParse:d,__unstableBeforeSerialize:p,__unstableAddInvisibleFormats:f}){const b=Fn(),[,h]=x.useReducer(()=>({})),g=x.useRef();function z(){const{ownerDocument:{defaultView:T}}=g.current,E=T.getSelection(),B=E.rangeCount>0?E.getRangeAt(0):null;return eo({element:g.current,range:B,__unstableIsEditableTree:!0})}function A(T,{domOnly:E}={}){Gqe({value:T,current:g.current,prepareEditableTree:f,__unstableDomOnly:E,placeholder:o})}const _=x.useRef(e),v=x.useRef();function M(){_.current=e,v.current=e,e instanceof Xo||(v.current=e?Xo.fromHTMLString(e,{preserveWhiteSpace:s}):Xo.empty()),v.current={text:v.current.text,formats:v.current.formats,replacements:v.current.replacements},c&&(v.current.formats=Array(e.length),v.current.replacements=Array(e.length)),d&&(v.current.formats=d(v.current)),v.current.start=t,v.current.end=n}const y=x.useRef(!1);v.current?(t!==v.current.start||n!==v.current.end)&&(y.current=l,v.current={...v.current,start:t,end:n,activeFormats:void 0}):(y.current=l,M());function k(T){if(v.current=T,A(T),c)_.current=T.text;else{const I=p?p(T):T.formats;T={...T,formats:I},typeof e=="string"?_.current=T0({value:T,preserveWhiteSpace:s}):_.current=new Xo(T)}const{start:E,end:B,formats:N,text:j}=v.current;b.batch(()=>{r(E,B),i(_.current,{__unstableFormats:N,__unstableText:j})}),h()}function S(){M(),A(v.current)}const C=x.useRef(!1);x.useLayoutEffect(()=>{C.current&&e!==_.current&&(S(),h())},[e]),x.useLayoutEffect(()=>{y.current&&(g.current.ownerDocument.activeElement!==g.current&&g.current.focus(),A(v.current),y.current=!1)},[y.current]);const R=xn([g,sRe(),iRe({record:v}),MRe({record:v,handleChange:k,applyRecord:A,createRecord:z,isSelected:l,onSelectionChange:r,forceRender:h}),Mn(()=>{S(),C.current=!0},[o,...u])]);return{value:v.current,getValue:()=>v.current,onChange:k,ref:R}}const e1="id",zRe=["title","excerpt","content"],r1e=[{label:m("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","default_template_part_areas","default_template_types","url"].join(",")},plural:"__unstableBases",syncConfig:{fetch:async()=>Tt({path:"/"}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/base",getSyncObjectId:()=>"index"},{label:m("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes",syncConfig:{fetch:async e=>Tt({path:`/wp/v2/types/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/postType",getSyncObjectId:e=>e},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:m("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:m("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:m("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:m("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:m("Widget types")},{label:m("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:m("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:m("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:m("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:m("Menu Location"),key:"name"},{label:m("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>e?.title?.rendered||e?.title,getRevisionsUrl:(e,t)=>`/wp/v2/global-styles/${e}/revisions${t?"/"+t:""}`,supportsPagination:!0},{label:m("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:m("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:m("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"}],s1e=[{kind:"postType",loadEntities:ARe},{kind:"taxonomy",loadEntities:vRe},{kind:"root",name:"site",plural:"sites",loadEntities:xRe}],ORe=(e,t)=>{const n={};return e?.status==="auto-draft"&&(!t.status&&!n.status&&(n.status="draft"),(!t.title||t.title==="Auto Draft")&&!n.title&&(!e?.title||e?.title==="Auto Draft")&&(n.title="")),n},qS=new WeakMap;function yRe(e){const t={...e};for(const[n,o]of Object.entries(e))o instanceof Xo&&(t[n]=o.valueOf());return t}function i1e(e){return e.map(t=>{const{innerBlocks:n,attributes:o,...r}=t;return{...r,attributes:yRe(o),innerBlocks:i1e(n)}})}async function ARe(){const e=await Tt({path:"/wp/v2/types?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;const r=["wp_template","wp_template_part"].includes(t),s=(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2";return{kind:"postType",baseURL:`/${s}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:zRe,getTitle:i=>{var c;return i?.title?.rendered||i?.title||(r?Lre((c=i.slug)!==null&&c!==void 0?c:""):String(i.id))},__unstablePrePersist:r?void 0:ORe,__unstable_rest_base:n.rest_base,syncConfig:{fetch:async i=>Tt({path:`/${s}/${n.rest_base}/${i}?context=edit`}),applyChangesToDoc:(i,c)=>{const l=i.getMap("document");Object.entries(c).forEach(([u,d])=>{typeof d!="function"&&(u==="blocks"&&(qS.has(d)||qS.set(d,i1e(d)),d=qS.get(d)),l.get(u)!==d&&l.set(u,d))})},fromCRDTDoc:i=>i.getMap("document").toJSON()},syncObjectType:"postType/"+n.name,getSyncObjectId:i=>i,supportsPagination:!0,getRevisionsUrl:(i,c)=>`/${s}/${n.rest_base}/${i}/revisions${c?"/"+c:""}`,revisionKey:r?"wp_id":e1}})}async function vRe(){const e=await Tt({path:"/wp/v2/taxonomies?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;return{kind:"taxonomy",baseURL:`/${(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2"}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name}})}async function xRe(){var e;const t={label:m("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",syncConfig:{fetch:async()=>Tt({path:"/wp/v2/settings"}),applyChangesToDoc:(r,s)=>{const i=r.getMap("document");Object.entries(s).forEach(([c,l])=>{i.get(c)!==l&&i.set(c,l)})},fromCRDTDoc:r=>r.getMap("document").toJSON()},syncObjectType:"root/site",getSyncObjectId:()=>"index",meta:{}},n=await Tt({path:t.baseURL,method:"OPTIONS"}),o={};return Object.entries((e=n?.schema?.properties)!==null&&e!==void 0?e:{}).forEach(([r,s])=>{typeof s=="object"&&s.title&&(o[r]=s.title)}),[{...t,meta:{labels:o}}]}const J2=(e,t,n="get")=>{const o=e==="root"?"":k4(e),r=k4(t);return`${n}${o}${r}`};function a1e(e){const{query:t}=e;return t?jh(t).context:"default"}function wRe(e,t,n,o){var r;if(n===1&&o===-1)return t;const i=(n-1)*o,c=Math.max((r=e?.length)!==null&&r!==void 0?r:0,i+t.length),l=new Array(c);for(let u=0;u=i&&u!t.some(o=>Number.isInteger(o)?o===+n:o===n)))}function _Re(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=a1e(t),o=t.key||e1;return{...e,[n]:{...e[n],...t.items.reduce((r,s)=>{const i=s?.[o];return r[i]=tqe(e?.[n]?.[i],s),r},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,c1e(o,t.itemIds)]))}return e}function kRe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=a1e(t),{query:o,key:r=e1}=t,s=o?jh(o):{},i=!o||!Array.isArray(s.fields);return{...e,[n]:{...e[n],...t.items.reduce((c,l)=>{const u=l?.[r];return c[u]=e?.[n]?.[u]||i,c},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,c1e(o,t.itemIds)]))}return e}const SRe=Co([I0e(e=>"query"in e),D0e(e=>e.query?{...e,...jh(e.query)}:e),tU("context"),tU("stableKey")])((e={},t)=>{const{type:n,page:o,perPage:r,key:s=e1}=t;return n!=="RECEIVE_ITEMS"?e:{itemIds:wRe(e?.itemIds||[],t.items.map(i=>i?.[s]).filter(Boolean),o,r),meta:t.meta}}),CRe=(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return SRe(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce((o,r)=>(o[r]=!0,o),{});return Object.fromEntries(Object.entries(e).map(([o,r])=>[o,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{...i,itemIds:i.itemIds.filter(c=>!n[c])}]))]));default:return e}},dU=J0({items:_Re,itemIsComplete:kRe,queries:CRe});function qRe(e={},t){switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e}function RRe(e={byId:{},queries:{}},t){switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...t.users.reduce((n,o)=>({...n,[o.id]:o}),{})},queries:{...e.queries,[t.queryID]:t.users.map(n=>n.id)}}}return e}function TRe(e={},t){switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e}function ERe(e=[],t){switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e}function WRe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e}function NRe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_GLOBAL_STYLES_ID":return t.id}return e}function BRe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLES":return{...e,[t.stylesheet]:t.globalStyles}}return e}function LRe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS":return{...e,[t.stylesheet]:t.variations}}return e}const PRe=e=>(t,n)=>{if(n.type==="UNDO"||n.type==="REDO"){const{record:o}=n;let r=t;return o.forEach(({id:{kind:s,name:i,recordId:c},changes:l})=>{r=e(r,{type:"EDIT_ENTITY_RECORD",kind:s,name:i,recordId:c,edits:Object.entries(l).reduce((u,[d,p])=>(u[d]=n.type==="UNDO"?p.from:p.to,u),{})})}),r}return e(t,n)};function jRe(e){return Co([PRe,I0e(t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind),D0e(t=>({key:e.key||e1,...t}))])(J0({queriedData:dU,edits:(t={},n)=>{var o;switch(n.type){case"RECEIVE_ITEMS":if(((o=n?.query?.context)!==null&&o!==void 0?o:"default")!=="default")return t;const s={...t};for(const c of n.items){const l=c?.[n.key],u=s[l];if(!u)continue;const d=Object.keys(u).reduce((p,f)=>{var b;return!N0(u[f],(b=c[f]?.raw)!==null&&b!==void 0?b:c[f])&&(!n.persistedEdits||!N0(u[f],n.persistedEdits[f]))&&(p[f]=u[f]),p},{});Object.keys(d).length?s[l]=d:delete s[l]}return s;case"EDIT_ENTITY_RECORD":const i={...t[n.recordId],...n.edits};return Object.keys(i).forEach(c=>{i[c]===void 0&&delete i[c]}),{...t,[n.recordId]:i}}return t},saving:(t={},n)=>{switch(n.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="SAVE_ENTITY_RECORD_START",error:n.error,isAutosave:n.isAutosave}}}return t},deleting:(t={},n)=>{switch(n.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="DELETE_ENTITY_RECORD_START",error:n.error}}}return t},revisions:(t={},n)=>{if(n.type==="RECEIVE_ITEM_REVISIONS"){const o=n.recordKey;delete n.recordKey;const r=dU(t[o],{...n,type:"RECEIVE_ITEMS"});return{...t,[o]:r}}return n.type==="REMOVE_ITEMS"?Object.fromEntries(Object.entries(t).filter(([o])=>!n.itemIds.some(r=>Number.isInteger(r)?r===+o:r===o))):t}}))}function IRe(e=r1e,t){switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}const DRe=(e={},t)=>{const n=IRe(e.config,t);let o=e.reducer;if(!o||n!==e.config){const s=n.reduce((i,c)=>{const{kind:l}=c;return i[l]||(i[l]=[]),i[l].push(c),i},{});o=J0(Object.entries(s).reduce((i,[c,l])=>{const u=J0(l.reduce((d,p)=>({...d,[p.name]:jRe(p)}),{}));return i[c]=u,i},{}))}const r=o(e.records,t);return r===e.records&&n===e.config&&o===e.reducer?e:{reducer:o,records:r,config:n}};function FRe(e=FSe()){return e}function $Re(e={},t){switch(t.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return e}function VRe(e={},t){switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:o}=t;return{...e,[n]:o}}return e}function HRe(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed};case"RECEIVE_USER_PERMISSIONS":return{...e,...t.permissions}}return e}function URe(e={},t){switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:o}=t;return{...e,[n]:o}}return e}function XRe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERNS":return t.patterns}return e}function GRe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERN_CATEGORIES":return t.categories}return e}function KRe(e=[],t){switch(t.type){case"RECEIVE_USER_PATTERN_CATEGORIES":return t.patternCategories}return e}function YRe(e=null,t){switch(t.type){case"RECEIVE_NAVIGATION_FALLBACK_ID":return t.fallbackId}return e}function ZRe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS":return{...e,[t.currentId]:t.revisions}}return e}function QRe(e={},t){switch(t.type){case"RECEIVE_DEFAULT_TEMPLATE":return{...e,[JSON.stringify(t.query)]:t.templateId}}return e}function JRe(e={},t){switch(t.type){case"RECEIVE_REGISTERED_POST_META":return{...e,[t.postType]:t.registeredPostMeta}}return e}const eTe=J0({terms:qRe,users:RRe,currentTheme:WRe,currentGlobalStylesId:NRe,currentUser:TRe,themeGlobalStyleVariations:LRe,themeBaseGlobalStyles:BRe,themeGlobalStyleRevisions:ZRe,taxonomies:ERe,entities:DRe,editsReference:$Re,undoManager:FRe,embedPreviews:VRe,userPermissions:HRe,autosaves:URe,blockPatterns:XRe,blockPatternCategories:GRe,userPatternCategories:KRe,navigationFallbackId:YRe,defaultTemplates:QRe,registeredPostMeta:JRe}),No="core",tTe={},nTe=At(e=>(t,n)=>e(No).isResolving("getEmbedPreview",[n]));function oTe(e,t){Ke("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=tn("/wp/v2/users/?who=authors&per_page=100",t);return l1e(e,n)}function rTe(e){return e.currentUser}const l1e=It((e,t)=>{var n;return((n=e.users.queries[t])!==null&&n!==void 0?n:[]).map(r=>e.users.byId[r])},(e,t)=>[e.users.queries[t],e.users.byId]);function sTe(e,t){return Ke("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),u1e(e,t)}const u1e=It((e,t)=>e.entities.config.filter(n=>n.kind===t),(e,t)=>e.entities.config);function iTe(e,t,n){return Ke("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),Dh(e,t,n)}function Dh(e,t,n){return e.entities.config?.find(o=>o.kind===t&&o.name===n)}const Zd=It((e,t,n,o,r)=>{var s;const i=e.entities.records?.[t]?.[n]?.queriedData;if(!i)return;const c=(s=r?.context)!==null&&s!==void 0?s:"default";if(r===void 0)return i.itemIsComplete[c]?.[o]?i.items[c][o]:void 0;const l=i.items[c]?.[o];if(l&&r._fields){var u;const d={},p=(u=Md(r._fields))!==null&&u!==void 0?u:[];for(let f=0;f{h=h?.[g]}),B5(d,b,h)}return d}return l},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});Zd.__unstableNormalizeArgs=e=>{const t=[...e],n=t?.[2];return t[2]=sqe(n)?Number(n):n,t};function aTe(e,t,n,o){return Zd(e,t,n,o)}const d1e=It((e,t,n,o)=>{const r=Zd(e,t,n,o);return r&&Object.keys(r).reduce((s,i)=>{if(oqe(Dh(e,t,n),i)){var c;s[i]=(c=r[i]?.raw)!==null&&c!==void 0?c:r[i]}else s[i]=r[i];return s},{})},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});function cTe(e,t,n,o){return Array.isArray(nB(e,t,n,o))}const nB=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?V0e(r,o):null},lTe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?H0e(r,o):null},uTe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;if(!r)return null;if(o.per_page===-1)return 1;const s=H0e(r,o);return s&&(o.per_page?Math.ceil(s/o.per_page):uqe(r,o))},dTe=It(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].edits).filter(i=>Zd(e,o,r,i)&&f1e(e,o,r,i));if(s.length){const i=Dh(e,o,r);s.forEach(c=>{const l=rB(e,o,r,c);n.push({key:l?l[i.key||e1]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]),pTe=It(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].saving).filter(i=>sB(e,o,r,i));if(s.length){const i=Dh(e,o,r);s.forEach(c=>{const l=rB(e,o,r,c);n.push({key:l?l[i.key||e1]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]);function oB(e,t,n,o){return e.entities.records?.[t]?.[n]?.edits?.[o]}const p1e=It((e,t,n,o)=>{const{transientEdits:r}=Dh(e,t,n)||{},s=oB(e,t,n,o)||{};return r?Object.keys(s).reduce((i,c)=>(r[c]||(i[c]=s[c]),i),{}):s},(e,t,n,o)=>[e.entities.config,e.entities.records?.[t]?.[n]?.edits?.[o]]);function f1e(e,t,n,o){return sB(e,t,n,o)||Object.keys(p1e(e,t,n,o)).length>0}const rB=It((e,t,n,o)=>{const r=d1e(e,t,n,o),s=oB(e,t,n,o);return!r&&!s?!1:{...r,...s}},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData.itemIsComplete[i]?.[o],e.entities.records?.[t]?.[n]?.edits?.[o]]});function fTe(e,t,n,o){var r;const{pending:s,isAutosave:i}=(r=e.entities.records?.[t]?.[n]?.saving?.[o])!==null&&r!==void 0?r:{};return!!(s&&i)}function sB(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.saving?.[o]?.pending)!==null&&r!==void 0?r:!1}function bTe(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.deleting?.[o]?.pending)!==null&&r!==void 0?r:!1}function hTe(e,t,n,o){return e.entities.records?.[t]?.[n]?.saving?.[o]?.error}function mTe(e,t,n,o){return e.entities.records?.[t]?.[n]?.deleting?.[o]?.error}function gTe(e){Ke("select( 'core' ).getUndoEdit()",{since:"6.3"})}function MTe(e){Ke("select( 'core' ).getRedoEdit()",{since:"6.3"})}function zTe(e){return e.undoManager.hasUndo()}function OTe(e){return e.undoManager.hasRedo()}function P5(e){return e.currentTheme?Zd(e,"root","theme",e.currentTheme):null}function b1e(e){return e.currentGlobalStylesId}function yTe(e){var t;return(t=P5(e)?.theme_supports)!==null&&t!==void 0?t:tTe}function ATe(e,t){return e.embedPreviews[t]}function vTe(e,t){const n=e.embedPreviews[t],o=''+t+"";return n?n.html===o:!1}function iB(e,t,n,o){if(typeof n=="object"&&(!n.kind||!n.name))return!1;const s=L5(t,n,o);return e.userPermissions[s]}function xTe(e,t,n,o){return Ke("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),iB(e,"update",{kind:t,name:n,id:o})}function wTe(e,t,n){return e.autosaves[n]}function _Te(e,t,n,o){return o===void 0?void 0:e.autosaves[n]?.find(s=>s.author===o)}const kTe=At(e=>(t,n,o)=>e(No).hasFinishedResolution("getAutosaves",[n,o]));function STe(e){return e.editsReference}function CTe(e){const t=P5(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function qTe(e){const t=P5(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function RTe(e){return e.blockPatterns}function TTe(e){return e.blockPatternCategories}function ETe(e){return e.userPatternCategories}function WTe(e){Ke("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});const t=b1e(e);return t?e.themeGlobalStyleRevisions[t]:null}function h1e(e,t){return e.defaultTemplates[JSON.stringify(t)]}const NTe=(e,t,n,o,r)=>{const s=e.entities.records?.[t]?.[n]?.revisions?.[o];return s?V0e(s,r):null},BTe=It((e,t,n,o,r,s)=>{var i;const c=e.entities.records?.[t]?.[n]?.revisions?.[o];if(!c)return;const l=(i=s?.context)!==null&&i!==void 0?i:"default";if(s===void 0)return c.itemIsComplete[l]?.[r]?c.items[l][r]:void 0;const u=c.items[l]?.[r];if(u&&s._fields){var d;const p={},f=(d=Md(s._fields))!==null&&d!==void 0?d:[];for(let b=0;b{g=g?.[z]}),B5(p,h,g)}return p}return u},(e,t,n,o,r,s)=>{var i;const c=(i=s?.context)!==null&&i!==void 0?i:"default";return[e.entities.records?.[t]?.[n]?.revisions?.[o]?.items?.[c]?.[r],e.entities.records?.[t]?.[n]?.revisions?.[o]?.itemIsComplete?.[c]?.[r]]}),LTe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:b1e,__experimentalGetCurrentThemeBaseGlobalStyles:CTe,__experimentalGetCurrentThemeGlobalStylesVariations:qTe,__experimentalGetDirtyEntityRecords:dTe,__experimentalGetEntitiesBeingSaved:pTe,__experimentalGetEntityRecordNoResolver:aTe,canUser:iB,canUserEditEntityRecord:xTe,getAuthors:oTe,getAutosave:_Te,getAutosaves:wTe,getBlockPatternCategories:TTe,getBlockPatterns:RTe,getCurrentTheme:P5,getCurrentThemeGlobalStylesRevisions:WTe,getCurrentUser:rTe,getDefaultTemplateId:h1e,getEditedEntityRecord:rB,getEmbedPreview:ATe,getEntitiesByKind:sTe,getEntitiesConfig:u1e,getEntity:iTe,getEntityConfig:Dh,getEntityRecord:Zd,getEntityRecordEdits:oB,getEntityRecordNonTransientEdits:p1e,getEntityRecords:nB,getEntityRecordsTotalItems:lTe,getEntityRecordsTotalPages:uTe,getLastEntityDeleteError:mTe,getLastEntitySaveError:hTe,getRawEntityRecord:d1e,getRedoEdit:MTe,getReferenceByDistinctEdits:STe,getRevision:BTe,getRevisions:NTe,getThemeSupports:yTe,getUndoEdit:gTe,getUserPatternCategories:ETe,getUserQueryResults:l1e,hasEditsForEntityRecord:f1e,hasEntityRecords:cTe,hasFetchedAutosaves:kTe,hasRedo:OTe,hasUndo:zTe,isAutosavingEntityRecord:fTe,isDeletingEntityRecord:bTe,isPreviewEmbedFallback:vTe,isRequestingEmbedPreview:nTe,isSavingEntityRecord:sB},Symbol.toStringTag,{value:"Module"})),{lock:PTe,unlock:eh}=P0("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/core-data");function jTe(e){return e.undoManager}function ITe(e){return e.navigationFallbackId}const DTe=At(e=>It((t,n)=>e(No).getBlockPatterns().filter(({postTypes:o})=>!o||Array.isArray(o)&&o.includes(n)),()=>[e(No).getBlockPatterns()])),m1e=At(e=>It((t,n,o,r)=>(Array.isArray(r)?r:[r]).map(i=>({delete:e(No).canUser("delete",{kind:n,name:o,id:i}),update:e(No).canUser("update",{kind:n,name:o,id:i})})),t=>[t.userPermissions]));function FTe(e,t,n,o){return m1e(e,t,n,o)[0]}function $Te(e,t){var n;return(n=e.registeredPostMeta?.[t])!==null&&n!==void 0?n:{}}function g1e(e){return!e||!["number","string"].includes(typeof e)||Number(e)===0?null:e.toString()}const VTe=At(e=>It(()=>{if(!e(No).canUser("read",{kind:"root",name:"site"}))return null;const n=e(No).getEntityRecord("root","site");if(!n)return null;const o=n?.show_on_front==="page"?g1e(n.page_on_front):null;return o?{postType:"page",postId:o}:{postType:"wp_template",postId:e(No).getDefaultTemplateId({slug:"front-page"})}},t=>[iB(t,"read",{kind:"root",name:"site"})&&Zd(t,"root","site"),h1e(t,{slug:"front-page"})])),HTe=At(e=>()=>{if(!e(No).canUser("read",{kind:"root",name:"site"}))return null;const n=e(No).getEntityRecord("root","site");return n?.show_on_front==="page"?g1e(n.page_for_posts):null}),UTe=At(e=>(t,n,o)=>{const r=eh(e(No)).getHomePage();if(!r)return;if(n==="page"&&n===r?.postType&&o.toString()===r?.postId){const u=e(No).getEntityRecords("postType","wp_template",{per_page:-1});if(!u)return;const d=u.find(({slug:p})=>p==="front-page")?.id;if(d)return d}const s=e(No).getEditedEntityRecord("postType",n,o);if(!s)return;const i=eh(e(No)).getPostsPageId();if(n==="page"&&i===o.toString())return e(No).getDefaultTemplateId({slug:"home"});const c=s.template;if(c){const u=e(No).getEntityRecords("postType","wp_template",{per_page:-1})?.find(({slug:d})=>d===c);if(u)return u.id}let l;return s.slug?l=n==="page"?`${n}-${s.slug}`:`single-${n}-${s.slug}`:l=n==="page"?"page":`single-${n}`,e(No).getDefaultTemplateId({slug:l})}),XTe=Object.freeze(Object.defineProperty({__proto__:null,getBlockPatternsForPostType:DTe,getEntityRecordPermissions:FTe,getEntityRecordsPermissions:m1e,getHomePage:VTe,getNavigationFallbackId:ITe,getPostsPageId:HTe,getRegisteredPostMeta:$Te,getTemplateId:UTe,getUndoManager:jTe},Symbol.toStringTag,{value:"Module"}));let pA;const GTe=new Uint8Array(16);function KTe(){if(!pA&&(pA=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pA))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pA(GTe)}const $0=[];for(let e=0;e<256;++e)$0.push((e+256).toString(16).slice(1));function YTe(e,t=0){return $0[e[t+0]]+$0[e[t+1]]+$0[e[t+2]]+$0[e[t+3]]+"-"+$0[e[t+4]]+$0[e[t+5]]+"-"+$0[e[t+6]]+$0[e[t+7]]+"-"+$0[e[t+8]]+$0[e[t+9]]+"-"+$0[e[t+10]]+$0[e[t+11]]+$0[e[t+12]]+$0[e[t+13]]+$0[e[t+14]]+$0[e[t+15]]}const ZTe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),pU={randomUUID:ZTe};function Is(e,t,n){if(pU.randomUUID&&!t&&!e)return pU.randomUUID();e=e||{};const o=e.random||(e.rng||KTe)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,YTe(o)}let RS=null;function QTe(e,t){const n=[...e],o=[];for(;n.length;)o.push(n.splice(0,t));return o}async function JTe(e){RS===null&&(RS=(await Tt({path:"/batch/v1",method:"OPTIONS"})).endpoints[0].args.requests.maxItems);const t=[];for(const n of QTe(e,RS)){const o=await Tt({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map(s=>({path:s.path,body:s.data,method:s.method,headers:s.headers}))}});let r;o.failed?r=o.responses.map(s=>({error:s?.body})):r=o.responses.map(s=>{const i={};return s.status>=200&&s.status<300?i.output=s.body:i.error=s.body,i}),t.push(...r)}return t}function eEe(e=JTe){let t=0,n=[];const o=new tEe;return{add(r){const s=++t;o.add(s);const i=c=>new Promise((l,u)=>{n.push({input:c,resolve:l,reject:u}),o.delete(s)});return typeof r=="function"?Promise.resolve(r(i)).finally(()=>{o.delete(s)}):i(r)},async run(){o.size&&await new Promise(i=>{const c=o.subscribe(()=>{o.size||(c(),i(void 0))})});let r;try{if(r=await e(n.map(({input:i})=>i)),r.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(i){for(const{reject:c}of n)c(i);throw i}let s=!0;return r.forEach((i,c)=>{const l=n[c];if(i?.error)l?.reject(i.error),s=!1;else{var u;l?.resolve((u=i?.output)!==null&&u!==void 0?u:i)}}),n=[],s}}}class tEe{constructor(...t){this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(t){return this.set.add(t),this.subscribers.forEach(n=>n()),this}delete(t){const n=this.set.delete(t);return this.subscribers.forEach(o=>o()),n}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}}const fU=globalThis||void 0||self,fs=()=>new Map,qE=e=>{const t=fs();return e.forEach((n,o)=>{t.set(o,n)}),t},w1=(e,t,n)=>{let o=e.get(t);return o===void 0&&e.set(t,o=n()),o},nEe=(e,t)=>{const n=[];for(const[o,r]of e)n.push(t(r,o));return n},oEe=(e,t)=>{for(const[n,o]of e)if(t(o,n))return!0;return!1},zd=()=>new Set,TS=e=>e[e.length-1],rEe=(e,t)=>{for(let n=0;n{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Rl((this._observers.get(t)||fs()).values()).forEach(o=>o(...n))}destroy(){this._observers=fs()}}class d3{constructor(){this._observers=fs()}on(t,n){w1(this._observers,t,zd).add(n)}once(t,n){const o=(...r)=>{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Rl((this._observers.get(t)||fs()).values()).forEach(o=>o(...n))}destroy(){this._observers=fs()}}const Oc=Math.floor,Bv=Math.abs,aEe=Math.log10,aB=(e,t)=>ee>t?e:t,M1e=e=>e!==0?e<0:1/e<0,bU=1,hU=2,ES=4,WS=8,VM=32,Ol=64,Ns=128,j5=31,RE=63,ef=127,cEe=2147483647,z1e=Number.MAX_SAFE_INTEGER,lEe=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&Oc(e)===e),uEe=String.fromCharCode,dEe=e=>e.toLowerCase(),pEe=/^\s*/g,fEe=e=>e.replace(pEe,""),bEe=/([A-Z])/g,mU=(e,t)=>fEe(e.replace(bEe,n=>`${t}${dEe(n)}`)),hEe=e=>{const t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let r=0;rHM.encode(e),TE=HM?mEe:hEe;let OM=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});OM&&OM.decode(new Uint8Array).length===1&&(OM=null);class p3{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const k0=()=>new p3,gEe=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array(gEe(e));let n=0;for(let o=0;o{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},UM=x0,sn=(e,t)=>{for(;t>ef;)x0(e,Ns|ef&t),t=Oc(t/128);x0(e,ef&t)},cB=(e,t)=>{const n=M1e(t);for(n&&(t=-t),x0(e,(t>RE?Ns:0)|(n?Ol:0)|RE&t),t=Oc(t/64);t>0;)x0(e,(t>ef?Ns:0)|ef&t),t=Oc(t/128)},EE=new Uint8Array(3e4),zEe=EE.length/3,OEe=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),o=n.length;sn(e,o);for(let r=0;r{const n=e.cbuf.length,o=e.cpos,r=aB(n-o,t.length),s=t.length-r;e.cbuf.set(t.subarray(0,r),o),e.cpos+=r,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array($f(n*2,s)),e.cbuf.set(t.subarray(r)),e.cpos=s)},jr=(e,t)=>{sn(e,t.byteLength),I5(e,t)},lB=(e,t)=>{MEe(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},AEe=(e,t)=>lB(e,4).setFloat32(0,t,!1),vEe=(e,t)=>lB(e,8).setFloat64(0,t,!1),xEe=(e,t)=>lB(e,8).setBigInt64(0,t,!1),gU=new DataView(new ArrayBuffer(4)),wEe=e=>(gU.setFloat32(0,e),gU.getFloat32(0)===e),th=(e,t)=>{switch(typeof t){case"string":x0(e,119),uc(e,t);break;case"number":lEe(t)&&Bv(t)<=cEe?(x0(e,125),cB(e,t)):wEe(t)?(x0(e,124),AEe(e,t)):(x0(e,123),vEe(e,t));break;case"bigint":x0(e,122),xEe(e,t);break;case"object":if(t===null)x0(e,126);else if(sEe(t)){x0(e,117),sn(e,t.length);for(let n=0;n0&&sn(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const zU=e=>{e.count>0&&(cB(e.encoder,e.count===1?e.s:-e.s),e.count>1&&sn(e.encoder,e.count-2))};class Lv{constructor(){this.encoder=new p3,this.s=0,this.count=0}write(t){this.s===t?this.count++:(zU(this),this.count=1,this.s=t)}toUint8Array(){return zU(this),Sr(this.encoder)}}const OU=e=>{if(e.count>0){const t=e.diff*2+(e.count===1?0:1);cB(e.encoder,t),e.count>1&&sn(e.encoder,e.count-2)}};class NS{constructor(){this.encoder=new p3,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(OU(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return OU(this),Sr(this.encoder)}}class _Ee{constructor(){this.sarr=[],this.s="",this.lensE=new Lv}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new p3;return this.sarr.push(this.s),this.s="",uc(t,this.sarr.join("")),I5(t,this.lensE.toUint8Array()),Sr(t)}}const fa=e=>new Error(e),dc=()=>{throw fa("Method unimplemented")},yc=()=>{throw fa("Unexpected case")},O1e=fa("Unexpected end of array"),y1e=fa("Integer out of Range");class D5{constructor(t){this.arr=t,this.pos=0}}const Rc=e=>new D5(e),kEe=e=>e.pos!==e.arr.length,SEe=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},w0=e=>SEe(e,_n(e)),ff=e=>e.arr[e.pos++],_n=e=>{let t=0,n=1;const o=e.arr.length;for(;e.posz1e)throw y1e}throw O1e},uB=e=>{let t=e.arr[e.pos++],n=t&RE,o=64;const r=(t&Ol)>0?-1:1;if(!(t&Ns))return r*n;const s=e.arr.length;for(;e.posz1e)throw y1e}throw O1e},CEe=e=>{let t=_n(e);if(t===0)return"";{let n=String.fromCodePoint(ff(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(ff(e));else for(;t>0;){const o=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,r),t-=o}return decodeURIComponent(escape(n))}},qEe=e=>OM.decode(w0(e)),yl=OM?qEe:CEe,dB=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},REe=e=>dB(e,4).getFloat32(0,!1),TEe=e=>dB(e,8).getFloat64(0,!1),EEe=e=>dB(e,8).getBigInt64(0,!1),WEe=[e=>{},e=>null,uB,REe,TEe,EEe,e=>!1,e=>!0,yl,e=>{const t=_n(e),n={};for(let o=0;o{const t=_n(e),n=[];for(let o=0;oWEe[127-ff(e)](e);class yU extends D5{constructor(t,n){super(t),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),kEe(this)?this.count=_n(this)+1:this.count=-1),this.count--,this.s}}class Pv extends D5{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=uB(this);const t=M1e(this.s);this.count=1,t&&(this.s=-this.s,this.count=_n(this)+2)}return this.count--,this.s}}class BS extends D5{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=uB(this),n=t&1;this.diff=Oc(t/2),this.count=1,n&&(this.count=_n(this)+2)}return this.s+=this.diff,this.count--,this.s}}class NEe{constructor(t){this.decoder=new Pv(t),this.str=yl(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),n=this.str.slice(this.spos,t);return this.spos=t,n}}const BEe=crypto.getRandomValues.bind(crypto),LEe=Math.random,A1e=()=>BEe(new Uint32Array(1))[0],PEe="10000000-1000-4000-8000"+-1e11,v1e=()=>PEe.replace(/[018]/g,e=>(e^A1e()&15>>e/4).toString(16)),Tl=Date.now,oh=e=>new Promise(e);Promise.all.bind(Promise);const jEe=e=>Promise.reject(e),pB=e=>Promise.resolve(e);var x1e={},F5={};F5.byteLength=FEe;F5.toByteArray=VEe;F5.fromByteArray=XEe;var rc=[],fi=[],IEe=typeof Uint8Array<"u"?Uint8Array:Array,LS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Fb=0,DEe=LS.length;Fb0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var o=n===t?0:4-n%4;return[n,o]}function FEe(e){var t=w1e(e),n=t[0],o=t[1];return(n+o)*3/4-o}function $Ee(e,t,n){return(t+n)*3/4-n}function VEe(e){var t,n=w1e(e),o=n[0],r=n[1],s=new IEe($Ee(e,o,r)),i=0,c=r>0?o-4:o,l;for(l=0;l>16&255,s[i++]=t>>8&255,s[i++]=t&255;return r===2&&(t=fi[e.charCodeAt(l)]<<2|fi[e.charCodeAt(l+1)]>>4,s[i++]=t&255),r===1&&(t=fi[e.charCodeAt(l)]<<10|fi[e.charCodeAt(l+1)]<<4|fi[e.charCodeAt(l+2)]>>2,s[i++]=t>>8&255,s[i++]=t&255),s}function HEe(e){return rc[e>>18&63]+rc[e>>12&63]+rc[e>>6&63]+rc[e&63]}function UEe(e,t,n){for(var o,r=[],s=t;sc?c:i+s));return o===1?(t=e[n-1],r.push(rc[t>>2]+rc[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(rc[t>>10]+rc[t>>4&63]+rc[t<<2&63]+"=")),r.join("")}var fB={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */fB.read=function(e,t,n,o,r){var s,i,c=r*8-o-1,l=(1<>1,d=-7,p=n?r-1:0,f=n?-1:1,b=e[t+p];for(p+=f,s=b&(1<<-d)-1,b>>=-d,d+=c;d>0;s=s*256+e[t+p],p+=f,d-=8);for(i=s&(1<<-d)-1,s>>=-d,d+=o;d>0;i=i*256+e[t+p],p+=f,d-=8);if(s===0)s=1-u;else{if(s===l)return i?NaN:(b?-1:1)*(1/0);i=i+Math.pow(2,o),s=s-u}return(b?-1:1)*i*Math.pow(2,s-o)};fB.write=function(e,t,n,o,r,s){var i,c,l,u=s*8-r-1,d=(1<>1,f=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:s-1,h=o?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,i=d):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),i+p>=1?t+=f/l:t+=f*Math.pow(2,1-p),t*l>=2&&(i++,l/=2),i+p>=d?(c=0,i=d):i+p>=1?(c=(t*l-1)*Math.pow(2,r),i=i+p):(c=t*Math.pow(2,p-1)*Math.pow(2,r),i=0));r>=8;e[n+b]=c&255,b+=h,c/=256,r-=8);for(i=i<0;e[n+b]=i&255,b+=h,i/=256,u-=8);e[n+b-h]|=g*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(e){const t=$5,n=bB,o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=d,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;const r=2147483647;e.kMaxLength=r;const{Uint8Array:s,ArrayBuffer:i,SharedArrayBuffer:c}=globalThis;d.TYPED_ARRAY_SUPPORT=l(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const ae=new s(1),H={foo:function(){return 42}};return Object.setPrototypeOf(H,s.prototype),Object.setPrototypeOf(ae,H),ae.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function u(ae){if(ae>r)throw new RangeError('The value "'+ae+'" is invalid for option "size"');const H=new s(ae);return Object.setPrototypeOf(H,d.prototype),H}function d(ae,H,Y){if(typeof ae=="number"){if(typeof H=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(ae)}return p(ae,H,Y)}d.poolSize=8192;function p(ae,H,Y){if(typeof ae=="string")return g(ae,H);if(i.isView(ae))return A(ae);if(ae==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ae);if(Pe(ae,i)||ae&&Pe(ae.buffer,i)||typeof c<"u"&&(Pe(ae,c)||ae&&Pe(ae.buffer,c)))return _(ae,H,Y);if(typeof ae=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const fe=ae.valueOf&&ae.valueOf();if(fe!=null&&fe!==ae)return d.from(fe,H,Y);const Re=v(ae);if(Re)return Re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ae[Symbol.toPrimitive]=="function")return d.from(ae[Symbol.toPrimitive]("string"),H,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ae)}d.from=function(ae,H,Y){return p(ae,H,Y)},Object.setPrototypeOf(d.prototype,s.prototype),Object.setPrototypeOf(d,s);function f(ae){if(typeof ae!="number")throw new TypeError('"size" argument must be of type number');if(ae<0)throw new RangeError('The value "'+ae+'" is invalid for option "size"')}function b(ae,H,Y){return f(ae),ae<=0?u(ae):H!==void 0?typeof Y=="string"?u(ae).fill(H,Y):u(ae).fill(H):u(ae)}d.alloc=function(ae,H,Y){return b(ae,H,Y)};function h(ae){return f(ae),u(ae<0?0:M(ae)|0)}d.allocUnsafe=function(ae){return h(ae)},d.allocUnsafeSlow=function(ae){return h(ae)};function g(ae,H){if((typeof H!="string"||H==="")&&(H="utf8"),!d.isEncoding(H))throw new TypeError("Unknown encoding: "+H);const Y=k(ae,H)|0;let fe=u(Y);const Re=fe.write(ae,H);return Re!==Y&&(fe=fe.slice(0,Re)),fe}function z(ae){const H=ae.length<0?0:M(ae.length)|0,Y=u(H);for(let fe=0;fe=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return ae|0}function y(ae){return+ae!=ae&&(ae=0),d.alloc(+ae)}d.isBuffer=function(H){return H!=null&&H._isBuffer===!0&&H!==d.prototype},d.compare=function(H,Y){if(Pe(H,s)&&(H=d.from(H,H.offset,H.byteLength)),Pe(Y,s)&&(Y=d.from(Y,Y.offset,Y.byteLength)),!d.isBuffer(H)||!d.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(H===Y)return 0;let fe=H.length,Re=Y.length;for(let be=0,ze=Math.min(fe,Re);beRe.length?(d.isBuffer(ze)||(ze=d.from(ze)),ze.copy(Re,be)):s.prototype.set.call(Re,ze,be);else if(d.isBuffer(ze))ze.copy(Re,be);else throw new TypeError('"list" argument must be an Array of Buffers');be+=ze.length}return Re};function k(ae,H){if(d.isBuffer(ae))return ae.length;if(i.isView(ae)||Pe(ae,i))return ae.byteLength;if(typeof ae!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ae);const Y=ae.length,fe=arguments.length>2&&arguments[2]===!0;if(!fe&&Y===0)return 0;let Re=!1;for(;;)switch(H){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return L(ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return ve(ae).length;default:if(Re)return fe?-1:L(ae).length;H=(""+H).toLowerCase(),Re=!0}}d.byteLength=k;function S(ae,H,Y){let fe=!1;if((H===void 0||H<0)&&(H=0),H>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,H>>>=0,Y<=H))return"";for(ae||(ae="utf8");;)switch(ae){case"hex":return ee(this,H,Y);case"utf8":case"utf-8":return $(this,H,Y);case"ascii":return Z(this,H,Y);case"latin1":case"binary":return V(this,H,Y);case"base64":return P(this,H,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,H,Y);default:if(fe)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),fe=!0}}d.prototype._isBuffer=!0;function C(ae,H,Y){const fe=ae[H];ae[H]=ae[Y],ae[Y]=fe}d.prototype.swap16=function(){const H=this.length;if(H%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;YY&&(H+=" ... "),""},o&&(d.prototype[o]=d.prototype.inspect),d.prototype.compare=function(H,Y,fe,Re,be){if(Pe(H,s)&&(H=d.from(H,H.offset,H.byteLength)),!d.isBuffer(H))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof H);if(Y===void 0&&(Y=0),fe===void 0&&(fe=H?H.length:0),Re===void 0&&(Re=0),be===void 0&&(be=this.length),Y<0||fe>H.length||Re<0||be>this.length)throw new RangeError("out of range index");if(Re>=be&&Y>=fe)return 0;if(Re>=be)return-1;if(Y>=fe)return 1;if(Y>>>=0,fe>>>=0,Re>>>=0,be>>>=0,this===H)return 0;let ze=be-Re,nt=fe-Y;const Mt=Math.min(ze,nt),ot=this.slice(Re,be),Ue=H.slice(Y,fe);for(let yt=0;yt2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,rt(Y)&&(Y=Re?0:ae.length-1),Y<0&&(Y=ae.length+Y),Y>=ae.length){if(Re)return-1;Y=ae.length-1}else if(Y<0)if(Re)Y=0;else return-1;if(typeof H=="string"&&(H=d.from(H,fe)),d.isBuffer(H))return H.length===0?-1:T(ae,H,Y,fe,Re);if(typeof H=="number")return H=H&255,typeof s.prototype.indexOf=="function"?Re?s.prototype.indexOf.call(ae,H,Y):s.prototype.lastIndexOf.call(ae,H,Y):T(ae,[H],Y,fe,Re);throw new TypeError("val must be string, number or Buffer")}function T(ae,H,Y,fe,Re){let be=1,ze=ae.length,nt=H.length;if(fe!==void 0&&(fe=String(fe).toLowerCase(),fe==="ucs2"||fe==="ucs-2"||fe==="utf16le"||fe==="utf-16le")){if(ae.length<2||H.length<2)return-1;be=2,ze/=2,nt/=2,Y/=2}function Mt(Ue,yt){return be===1?Ue[yt]:Ue.readUInt16BE(yt*be)}let ot;if(Re){let Ue=-1;for(ot=Y;otze&&(Y=ze-nt),ot=Y;ot>=0;ot--){let Ue=!0;for(let yt=0;ytRe&&(fe=Re)):fe=Re;const be=H.length;fe>be/2&&(fe=be/2);let ze;for(ze=0;ze>>0,isFinite(fe)?(fe=fe>>>0,Re===void 0&&(Re="utf8")):(Re=fe,fe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const be=this.length-Y;if((fe===void 0||fe>be)&&(fe=be),H.length>0&&(fe<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");Re||(Re="utf8");let ze=!1;for(;;)switch(Re){case"hex":return E(this,H,Y,fe);case"utf8":case"utf-8":return B(this,H,Y,fe);case"ascii":case"latin1":case"binary":return N(this,H,Y,fe);case"base64":return j(this,H,Y,fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,H,Y,fe);default:if(ze)throw new TypeError("Unknown encoding: "+Re);Re=(""+Re).toLowerCase(),ze=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(ae,H,Y){return H===0&&Y===ae.length?t.fromByteArray(ae):t.fromByteArray(ae.slice(H,Y))}function $(ae,H,Y){Y=Math.min(ae.length,Y);const fe=[];let Re=H;for(;Re239?4:be>223?3:be>191?2:1;if(Re+nt<=Y){let Mt,ot,Ue,yt;switch(nt){case 1:be<128&&(ze=be);break;case 2:Mt=ae[Re+1],(Mt&192)===128&&(yt=(be&31)<<6|Mt&63,yt>127&&(ze=yt));break;case 3:Mt=ae[Re+1],ot=ae[Re+2],(Mt&192)===128&&(ot&192)===128&&(yt=(be&15)<<12|(Mt&63)<<6|ot&63,yt>2047&&(yt<55296||yt>57343)&&(ze=yt));break;case 4:Mt=ae[Re+1],ot=ae[Re+2],Ue=ae[Re+3],(Mt&192)===128&&(ot&192)===128&&(Ue&192)===128&&(yt=(be&15)<<18|(Mt&63)<<12|(ot&63)<<6|Ue&63,yt>65535&&yt<1114112&&(ze=yt))}}ze===null?(ze=65533,nt=1):ze>65535&&(ze-=65536,fe.push(ze>>>10&1023|55296),ze=56320|ze&1023),fe.push(ze),Re+=nt}return X(fe)}const F=4096;function X(ae){const H=ae.length;if(H<=F)return String.fromCharCode.apply(String,ae);let Y="",fe=0;for(;fefe)&&(Y=fe);let Re="";for(let be=H;befe&&(H=fe),Y<0?(Y+=fe,Y<0&&(Y=0)):Y>fe&&(Y=fe),YY)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(H,Y,fe){H=H>>>0,Y=Y>>>0,fe||J(H,Y,this.length);let Re=this[H],be=1,ze=0;for(;++ze>>0,Y=Y>>>0,fe||J(H,Y,this.length);let Re=this[H+--Y],be=1;for(;Y>0&&(be*=256);)Re+=this[H+--Y]*be;return Re},d.prototype.readUint8=d.prototype.readUInt8=function(H,Y){return H=H>>>0,Y||J(H,1,this.length),this[H]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(H,Y){return H=H>>>0,Y||J(H,2,this.length),this[H]|this[H+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(H,Y){return H=H>>>0,Y||J(H,2,this.length),this[H]<<8|this[H+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),(this[H]|this[H+1]<<8|this[H+2]<<16)+this[H+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),this[H]*16777216+(this[H+1]<<16|this[H+2]<<8|this[H+3])},d.prototype.readBigUInt64LE=wt(function(H){H=H>>>0,pe(H,"offset");const Y=this[H],fe=this[H+7];(Y===void 0||fe===void 0)&&ke(H,this.length-8);const Re=Y+this[++H]*2**8+this[++H]*2**16+this[++H]*2**24,be=this[++H]+this[++H]*2**8+this[++H]*2**16+fe*2**24;return BigInt(Re)+(BigInt(be)<>>0,pe(H,"offset");const Y=this[H],fe=this[H+7];(Y===void 0||fe===void 0)&&ke(H,this.length-8);const Re=Y*2**24+this[++H]*2**16+this[++H]*2**8+this[++H],be=this[++H]*2**24+this[++H]*2**16+this[++H]*2**8+fe;return(BigInt(Re)<>>0,Y=Y>>>0,fe||J(H,Y,this.length);let Re=this[H],be=1,ze=0;for(;++ze=be&&(Re-=Math.pow(2,8*Y)),Re},d.prototype.readIntBE=function(H,Y,fe){H=H>>>0,Y=Y>>>0,fe||J(H,Y,this.length);let Re=Y,be=1,ze=this[H+--Re];for(;Re>0&&(be*=256);)ze+=this[H+--Re]*be;return be*=128,ze>=be&&(ze-=Math.pow(2,8*Y)),ze},d.prototype.readInt8=function(H,Y){return H=H>>>0,Y||J(H,1,this.length),this[H]&128?(255-this[H]+1)*-1:this[H]},d.prototype.readInt16LE=function(H,Y){H=H>>>0,Y||J(H,2,this.length);const fe=this[H]|this[H+1]<<8;return fe&32768?fe|4294901760:fe},d.prototype.readInt16BE=function(H,Y){H=H>>>0,Y||J(H,2,this.length);const fe=this[H+1]|this[H]<<8;return fe&32768?fe|4294901760:fe},d.prototype.readInt32LE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),this[H]|this[H+1]<<8|this[H+2]<<16|this[H+3]<<24},d.prototype.readInt32BE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),this[H]<<24|this[H+1]<<16|this[H+2]<<8|this[H+3]},d.prototype.readBigInt64LE=wt(function(H){H=H>>>0,pe(H,"offset");const Y=this[H],fe=this[H+7];(Y===void 0||fe===void 0)&&ke(H,this.length-8);const Re=this[H+4]+this[H+5]*2**8+this[H+6]*2**16+(fe<<24);return(BigInt(Re)<>>0,pe(H,"offset");const Y=this[H],fe=this[H+7];(Y===void 0||fe===void 0)&&ke(H,this.length-8);const Re=(Y<<24)+this[++H]*2**16+this[++H]*2**8+this[++H];return(BigInt(Re)<>>0,Y||J(H,4,this.length),n.read(this,H,!0,23,4)},d.prototype.readFloatBE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),n.read(this,H,!1,23,4)},d.prototype.readDoubleLE=function(H,Y){return H=H>>>0,Y||J(H,8,this.length),n.read(this,H,!0,52,8)},d.prototype.readDoubleBE=function(H,Y){return H=H>>>0,Y||J(H,8,this.length),n.read(this,H,!1,52,8)};function ue(ae,H,Y,fe,Re,be){if(!d.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(H>Re||Hae.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(H,Y,fe,Re){if(H=+H,Y=Y>>>0,fe=fe>>>0,!Re){const nt=Math.pow(2,8*fe)-1;ue(this,H,Y,fe,nt,0)}let be=1,ze=0;for(this[Y]=H&255;++ze>>0,fe=fe>>>0,!Re){const nt=Math.pow(2,8*fe)-1;ue(this,H,Y,fe,nt,0)}let be=fe-1,ze=1;for(this[Y+be]=H&255;--be>=0&&(ze*=256);)this[Y+be]=H/ze&255;return Y+fe},d.prototype.writeUint8=d.prototype.writeUInt8=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,1,255,0),this[Y]=H&255,Y+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,2,65535,0),this[Y]=H&255,this[Y+1]=H>>>8,Y+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,2,65535,0),this[Y]=H>>>8,this[Y+1]=H&255,Y+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,4,4294967295,0),this[Y+3]=H>>>24,this[Y+2]=H>>>16,this[Y+1]=H>>>8,this[Y]=H&255,Y+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,4,4294967295,0),this[Y]=H>>>24,this[Y+1]=H>>>16,this[Y+2]=H>>>8,this[Y+3]=H&255,Y+4};function ce(ae,H,Y,fe,Re){re(H,fe,Re,ae,Y,7);let be=Number(H&BigInt(4294967295));ae[Y++]=be,be=be>>8,ae[Y++]=be,be=be>>8,ae[Y++]=be,be=be>>8,ae[Y++]=be;let ze=Number(H>>BigInt(32)&BigInt(4294967295));return ae[Y++]=ze,ze=ze>>8,ae[Y++]=ze,ze=ze>>8,ae[Y++]=ze,ze=ze>>8,ae[Y++]=ze,Y}function me(ae,H,Y,fe,Re){re(H,fe,Re,ae,Y,7);let be=Number(H&BigInt(4294967295));ae[Y+7]=be,be=be>>8,ae[Y+6]=be,be=be>>8,ae[Y+5]=be,be=be>>8,ae[Y+4]=be;let ze=Number(H>>BigInt(32)&BigInt(4294967295));return ae[Y+3]=ze,ze=ze>>8,ae[Y+2]=ze,ze=ze>>8,ae[Y+1]=ze,ze=ze>>8,ae[Y]=ze,Y+8}d.prototype.writeBigUInt64LE=wt(function(H,Y=0){return ce(this,H,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=wt(function(H,Y=0){return me(this,H,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(H,Y,fe,Re){if(H=+H,Y=Y>>>0,!Re){const Mt=Math.pow(2,8*fe-1);ue(this,H,Y,fe,Mt-1,-Mt)}let be=0,ze=1,nt=0;for(this[Y]=H&255;++be>0)-nt&255;return Y+fe},d.prototype.writeIntBE=function(H,Y,fe,Re){if(H=+H,Y=Y>>>0,!Re){const Mt=Math.pow(2,8*fe-1);ue(this,H,Y,fe,Mt-1,-Mt)}let be=fe-1,ze=1,nt=0;for(this[Y+be]=H&255;--be>=0&&(ze*=256);)H<0&&nt===0&&this[Y+be+1]!==0&&(nt=1),this[Y+be]=(H/ze>>0)-nt&255;return Y+fe},d.prototype.writeInt8=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,1,127,-128),H<0&&(H=255+H+1),this[Y]=H&255,Y+1},d.prototype.writeInt16LE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,2,32767,-32768),this[Y]=H&255,this[Y+1]=H>>>8,Y+2},d.prototype.writeInt16BE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,2,32767,-32768),this[Y]=H>>>8,this[Y+1]=H&255,Y+2},d.prototype.writeInt32LE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,4,2147483647,-2147483648),this[Y]=H&255,this[Y+1]=H>>>8,this[Y+2]=H>>>16,this[Y+3]=H>>>24,Y+4},d.prototype.writeInt32BE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,4,2147483647,-2147483648),H<0&&(H=4294967295+H+1),this[Y]=H>>>24,this[Y+1]=H>>>16,this[Y+2]=H>>>8,this[Y+3]=H&255,Y+4},d.prototype.writeBigInt64LE=wt(function(H,Y=0){return ce(this,H,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=wt(function(H,Y=0){return me(this,H,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(ae,H,Y,fe,Re,be){if(Y+fe>ae.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function Ae(ae,H,Y,fe,Re){return H=+H,Y=Y>>>0,Re||de(ae,H,Y,4),n.write(ae,H,Y,fe,23,4),Y+4}d.prototype.writeFloatLE=function(H,Y,fe){return Ae(this,H,Y,!0,fe)},d.prototype.writeFloatBE=function(H,Y,fe){return Ae(this,H,Y,!1,fe)};function ye(ae,H,Y,fe,Re){return H=+H,Y=Y>>>0,Re||de(ae,H,Y,8),n.write(ae,H,Y,fe,52,8),Y+8}d.prototype.writeDoubleLE=function(H,Y,fe){return ye(this,H,Y,!0,fe)},d.prototype.writeDoubleBE=function(H,Y,fe){return ye(this,H,Y,!1,fe)},d.prototype.copy=function(H,Y,fe,Re){if(!d.isBuffer(H))throw new TypeError("argument should be a Buffer");if(fe||(fe=0),!Re&&Re!==0&&(Re=this.length),Y>=H.length&&(Y=H.length),Y||(Y=0),Re>0&&Re=this.length)throw new RangeError("Index out of range");if(Re<0)throw new RangeError("sourceEnd out of bounds");Re>this.length&&(Re=this.length),H.length-Y>>0,fe=fe===void 0?this.length:fe>>>0,H||(H=0);let be;if(typeof H=="number")for(be=Y;be2**32?Re=ie(String(Y)):typeof Y=="bigint"&&(Re=String(Y),(Y>BigInt(2)**BigInt(32)||Y<-(BigInt(2)**BigInt(32)))&&(Re=ie(Re)),Re+="n"),fe+=` It must be ${H}. Received ${Re}`,fe},RangeError);function ie(ae){let H="",Y=ae.length;const fe=ae[0]==="-"?1:0;for(;Y>=fe+4;Y-=3)H=`_${ae.slice(Y-3,Y)}${H}`;return`${ae.slice(0,Y)}${H}`}function we(ae,H,Y){pe(H,"offset"),(ae[H]===void 0||ae[H+Y]===void 0)&&ke(H,ae.length-(Y+1))}function re(ae,H,Y,fe,Re,be){if(ae>Y||ae= 0${ze} and < 2${ze} ** ${(be+1)*8}${ze}`:nt=`>= -(2${ze} ** ${(be+1)*8-1}${ze}) and < 2 ** ${(be+1)*8-1}${ze}`,new Ne.ERR_OUT_OF_RANGE("value",nt,ae)}we(fe,Re,be)}function pe(ae,H){if(typeof ae!="number")throw new Ne.ERR_INVALID_ARG_TYPE(H,"number",ae)}function ke(ae,H,Y){throw Math.floor(ae)!==ae?(pe(ae,Y),new Ne.ERR_OUT_OF_RANGE("offset","an integer",ae)):H<0?new Ne.ERR_BUFFER_OUT_OF_BOUNDS:new Ne.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${H}`,ae)}const Se=/[^+/0-9A-Za-z-_]/g;function se(ae){if(ae=ae.split("=")[0],ae=ae.trim().replace(Se,""),ae.length<2)return"";for(;ae.length%4!==0;)ae=ae+"=";return ae}function L(ae,H){H=H||1/0;let Y;const fe=ae.length;let Re=null;const be=[];for(let ze=0;ze55295&&Y<57344){if(!Re){if(Y>56319){(H-=3)>-1&&be.push(239,191,189);continue}else if(ze+1===fe){(H-=3)>-1&&be.push(239,191,189);continue}Re=Y;continue}if(Y<56320){(H-=3)>-1&&be.push(239,191,189),Re=Y;continue}Y=(Re-55296<<10|Y-56320)+65536}else Re&&(H-=3)>-1&&be.push(239,191,189);if(Re=null,Y<128){if((H-=1)<0)break;be.push(Y)}else if(Y<2048){if((H-=2)<0)break;be.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((H-=3)<0)break;be.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((H-=4)<0)break;be.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return be}function U(ae){const H=[];for(let Y=0;Y>8,Re=Y%256,be.push(Re),be.push(fe);return be}function ve(ae){return t.toByteArray(se(ae))}function qe(ae,H,Y,fe){let Re;for(Re=0;Re=H.length||Re>=ae.length);++Re)H[Re+Y]=ae[Re];return Re}function Pe(ae,H){return ae instanceof H||ae!=null&&ae.constructor!=null&&ae.constructor.name!=null&&ae.constructor.name===H.name}function rt(ae){return ae!==ae}const qt=function(){const ae="0123456789abcdef",H=new Array(256);for(let Y=0;Y<16;++Y){const fe=Y*16;for(let Re=0;Re<16;++Re)H[fe+Re]=ae[Y]+ae[Re]}return H}();function wt(ae){return typeof BigInt>"u"?Bt:ae}function Bt(){throw new Error("BigInt not supported")}})(x1e);const rh=x1e.Buffer;function KEe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _1e={exports:{}},Qr=_1e.exports={},Ka,Ya;function NE(){throw new Error("setTimeout has not been defined")}function BE(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ka=setTimeout:Ka=NE}catch{Ka=NE}try{typeof clearTimeout=="function"?Ya=clearTimeout:Ya=BE}catch{Ya=BE}})();function k1e(e){if(Ka===setTimeout)return setTimeout(e,0);if((Ka===NE||!Ka)&&setTimeout)return Ka=setTimeout,setTimeout(e,0);try{return Ka(e,0)}catch{try{return Ka.call(null,e,0)}catch{return Ka.call(this,e,0)}}}function YEe(e){if(Ya===clearTimeout)return clearTimeout(e);if((Ya===BE||!Ya)&&clearTimeout)return Ya=clearTimeout,clearTimeout(e);try{return Ya(e)}catch{try{return Ya.call(null,e)}catch{return Ya.call(this,e)}}}var bl=[],C2=!1,Xp,Iv=-1;function ZEe(){!C2||!Xp||(C2=!1,Xp.length?bl=Xp.concat(bl):Iv=-1,bl.length&&S1e())}function S1e(){if(!C2){var e=k1e(ZEe);C2=!0;for(var t=bl.length;t;){for(Xp=bl,bl=[];++Iv1)for(var n=1;ne===void 0?null:e;class JEe{constructor(){this.map=new Map}setItem(t,n){this.map.set(t,n)}getItem(t){return this.map.get(t)}}let q1e=new JEe,hB=!0;try{typeof localStorage<"u"&&localStorage&&(q1e=localStorage,hB=!1)}catch{}const R1e=q1e,e8e=e=>hB||addEventListener("storage",e),t8e=e=>hB||removeEventListener("storage",e),n8e=Object.assign,T1e=Object.keys,o8e=(e,t)=>{for(const n in e)t(e[n],n)},vU=e=>T1e(e).length,xU=e=>T1e(e).length,r8e=e=>{for(const t in e)return!1;return!0},s8e=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},E1e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i8e=(e,t)=>e===t||xU(e)===xU(t)&&s8e(e,(n,o)=>(n!==void 0||E1e(t,o))&&t[o]===n),a8e=Object.freeze,W1e=e=>{for(const t in e){const n=e[t];(typeof n=="object"||typeof n=="function")&&W1e(e[t])}return a8e(e)},mB=(e,t,n=0)=>{try{for(;n{},l8e=e=>e,u8e=(e,t)=>e===t,yM=(e,t)=>{if(e==null||t==null)return u8e(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:{if(e.byteLength!==t.byteLength)return!1;for(let n=0;nt.includes(e);var N1e={};const sh=typeof Oi<"u"&&Oi.release&&/node|io\.js/.test(Oi.release.name)&&Object.prototype.toString.call(typeof Oi<"u"?Oi:0)==="[object process]",B1e=typeof window<"u"&&typeof document<"u"&&!sh;let Pa;const p8e=()=>{if(Pa===void 0)if(sh){Pa=fs();const e=Oi.argv;let t=null;for(let n=0;n{if(e.length!==0){const[t,n]=e.split("=");Pa.set(`--${mU(t,"-")}`,n),Pa.set(`-${mU(t,"-")}`,n)}})):Pa=fs();return Pa},LE=e=>p8e().has(e),XM=e=>AU(sh?N1e[e.toUpperCase().replaceAll("-","_")]:R1e.getItem(e)),L1e=e=>LE("--"+e)||XM(e)!==null;L1e("production");const f8e=sh&&d8e(N1e.FORCE_COLOR,["true","1","2"]),b8e=f8e||!LE("--no-colors")&&!L1e("no-color")&&(!sh||Oi.stdout.isTTY)&&(!sh||LE("--color")||XM("COLORTERM")!==null||(XM("TERM")||"").includes("color")),P1e=e=>new Uint8Array(e),h8e=(e,t,n)=>new Uint8Array(e,t,n),m8e=e=>new Uint8Array(e),g8e=e=>{let t="";for(let n=0;nrh.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),z8e=e=>{const t=atob(e),n=P1e(t.length);for(let o=0;o{const t=rh.from(e,"base64");return h8e(t.buffer,t.byteOffset,t.byteLength)},j1e=B1e?g8e:M8e,gB=B1e?z8e:O8e,y8e=e=>{const t=P1e(e.byteLength);return t.set(e),t};class A8e{constructor(t,n){this.left=t,this.right=n}}const Zc=(e,t)=>new A8e(e,t);typeof DOMParser<"u"&&new DOMParser;const v8e=e=>oEe(e,(t,n)=>`${n}:${t};`).join(""),x8e=JSON.stringify,Yl=Symbol,ki=Yl(),bf=Yl(),I1e=Yl(),MB=Yl(),D1e=Yl(),F1e=Yl(),$1e=Yl(),V5=Yl(),H5=Yl(),w8e=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[];let o=0;for(;o0&&n.push(t.join(""));o{const n=wU[jS],o=XM("log"),r=o!==null&&(o==="*"||o==="true"||new RegExp(o,"gi").test(t));return jS=(jS+1)%wU.length,t+=": ",r?(...s)=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const i=El(),c=i-_U;_U=i,e(n,t,H5,...s.map(l=>{switch(l!=null&&l.constructor===Uint8Array&&(l=Array.from(l)),typeof l){case"string":case"symbol":return l;default:return x8e(l)}}),n," +"+c+"ms")}:c8e},k8e={[ki]:Zc("font-weight","bold"),[bf]:Zc("font-weight","normal"),[I1e]:Zc("color","blue"),[D1e]:Zc("color","green"),[MB]:Zc("color","grey"),[F1e]:Zc("color","red"),[$1e]:Zc("color","purple"),[V5]:Zc("color","orange"),[H5]:Zc("color","black")},S8e=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[],o=fs();let r=[],s=0;for(;s0||l.length>0?(t.push("%c"+i),n.push(l)):t.push(i)}else break}}for(s>0&&(r=n,r.unshift(t.join("")));s{console.log(...V1e(e)),U1e.forEach(t=>t.print(e))},C8e=(...e)=>{console.warn(...V1e(e)),e.unshift(V5),U1e.forEach(t=>t.print(e))},U1e=zd(),q8e=e=>_8e(H1e,e),X1e=e=>({[Symbol.iterator](){return this},next:e}),R8e=(e,t)=>X1e(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),IS=(e,t)=>X1e(()=>{const{done:n,value:o}=e.next();return{done:n,value:n?void 0:t(o)}});class zB{constructor(t,n){this.clock=t,this.len=n}}class f3{constructor(){this.clients=new Map}}const G1e=(e,t,n)=>t.clients.forEach((o,r)=>{const s=e.doc.store.clients.get(r);for(let i=0;i{let n=0,o=e.length-1;for(;n<=o;){const r=Oc((n+o)/2),s=e[r],i=s.clock;if(i<=t){if(t{const n=e.clients.get(t.client);return n!==void 0&&T8e(n,t.clock)!==null},OB=e=>{e.clients.forEach(t=>{t.sort((r,s)=>r.clock-s.clock);let n,o;for(n=1,o=1;n=s.clock?r.len=$f(r.len,s.clock+s.len-r.clock):(o{const t=new f3;for(let n=0;n{if(!t.clients.has(r)){const s=o.slice();for(let i=n+1;i{w1(e.clients,t,()=>[]).push(new zB(n,o))},W8e=()=>new f3,N8e=e=>{const t=W8e();return e.clients.forEach((n,o)=>{const r=[];for(let s=0;s0&&t.clients.set(o,r)}),t},Fh=(e,t)=>{sn(e.restEncoder,t.clients.size),Tl(t.clients.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{e.resetDsCurVal(),sn(e.restEncoder,n);const r=o.length;sn(e.restEncoder,r);for(let s=0;s{const t=new f3,n=_n(e.restDecoder);for(let o=0;o0){const i=w1(t.clients,r,()=>[]);for(let c=0;c{const o=new f3,r=_n(e.restDecoder);for(let s=0;s0){const s=new hf;return sn(s.restEncoder,0),Fh(s,o),s.toUint8Array()}return null},Y1e=A1e;class $h extends aEe{constructor({guid:t=v1e(),collectionid:n=null,gc:o=!0,gcFilter:r=()=>!0,meta:s=null,autoLoad:i=!1,shouldLoad:c=!0}={}){super(),this.gc=o,this.gcFilter=r,this.clientID=Y1e(),this.guid=t,this.collectionid=n,this.share=new Map,this.store=new ise,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=i,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=oh(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});const l=()=>oh(u=>{const d=p=>{(p===void 0||p===!0)&&(this.off("sync",d),u())};this.on("sync",d)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Ho(t.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Tl(this.subdocs).map(t=>t.guid))}transact(t,n=null){return Ho(this,t,n)}get(t,n=Y0){const o=w1(this.share,t,()=>{const s=new n;return s._integrate(this,null),s}),r=o.constructor;if(n!==Y0&&r!==n)if(r===Y0){const s=new n;s._map=o._map,o._map.forEach(i=>{for(;i!==null;i=i.left)i.parent=s}),s._start=o._start;for(let i=s._start;i!==null;i=i.right)i.parent=s;return s._length=o._length,this.share.set(t,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return o}getArray(t=""){return this.get(t,R2)}getText(t=""){return this.get(t,ch)}getMap(t=""){return this.get(t,ah)}getXmlElement(t=""){return this.get(t,lh)}getXmlFragment(t=""){return this.get(t,mf)}toJSON(){const t={};return this.share.forEach((n,o)=>{t[o]=n.toJSON()}),t}destroy(){this.isDestroyed=!0,Tl(this.subdocs).forEach(n=>n.destroy());const t=this._item;if(t!==null){this._item=null;const n=t.content;n.doc=new $h({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,Ho(t.parent.doc,o=>{const r=n.doc;t.deleted||o.subdocsAdded.add(r),o.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class Z1e{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return _n(this.restDecoder)}readDsLen(){return _n(this.restDecoder)}}class Q1e extends Z1e{readLeftID(){return to(_n(this.restDecoder),_n(this.restDecoder))}readRightID(){return to(_n(this.restDecoder),_n(this.restDecoder))}readClient(){return _n(this.restDecoder)}readInfo(){return ff(this.restDecoder)}readString(){return Al(this.restDecoder)}readParentInfo(){return _n(this.restDecoder)===1}readTypeRef(){return _n(this.restDecoder)}readLen(){return _n(this.restDecoder)}readAny(){return nh(this.restDecoder)}readBuf(){return y8e(w0(this.restDecoder))}readJSON(){return JSON.parse(Al(this.restDecoder))}readKey(){return Al(this.restDecoder)}}class B8e{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=_n(this.restDecoder),this.dsCurrVal}readDsLen(){const t=_n(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class ih extends B8e{constructor(t){super(t),this.keys=[],_n(t),this.keyClockDecoder=new LS(w0(t)),this.clientDecoder=new jv(w0(t)),this.leftClockDecoder=new LS(w0(t)),this.rightClockDecoder=new LS(w0(t)),this.infoDecoder=new yU(w0(t),ff),this.stringDecoder=new BEe(w0(t)),this.parentInfoDecoder=new yU(w0(t),ff),this.typeRefDecoder=new jv(w0(t)),this.lenDecoder=new jv(w0(t))}readLeftID(){return new q2(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new q2(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return nh(this.restDecoder)}readBuf(){return w0(this.restDecoder)}readJSON(){return nh(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{o=$f(o,t[0].id.clock);const r=Ac(t,o);sn(e.restEncoder,t.length-r),e.writeClient(n),sn(e.restEncoder,o);const s=t[r];s.write(e,o-s.id.clock);for(let i=r+1;i{const o=new Map;n.forEach((r,s)=>{q0(t,s)>r&&o.set(s,r)}),U5(t).forEach((r,s)=>{n.has(s)||o.set(s,0)}),sn(e.restEncoder,o.size),Tl(o.entries()).sort((r,s)=>s[0]-r[0]).forEach(([r,s])=>{L8e(e,t.clients.get(r),r,s)})},P8e=(e,t)=>{const n=fs(),o=_n(e.restDecoder);for(let r=0;r{const o=[];let r=Tl(n.keys()).sort((b,h)=>b-h);if(r.length===0)return null;const s=()=>{if(r.length===0)return null;let b=n.get(r[r.length-1]);for(;b.refs.length===b.i;)if(r.pop(),r.length>0)b=n.get(r[r.length-1]);else return null;return b};let i=s();if(i===null)return null;const c=new ise,l=new Map,u=(b,h)=>{const g=l.get(b);(g==null||g>h)&&l.set(b,h)};let d=i.refs[i.i++];const p=new Map,f=()=>{for(const b of o){const h=b.id.client,g=n.get(h);g?(g.i--,c.clients.set(h,g.refs.slice(g.i)),n.delete(h),g.i=0,g.refs=[]):c.clients.set(h,[b]),r=r.filter(z=>z!==h)}o.length=0};for(;;){if(d.constructor!==Ai){const h=w1(p,d.id.client,()=>q0(t,d.id.client))-d.id.clock;if(h<0)o.push(d),u(d.id.client,d.id.clock-1),f();else{const g=d.getMissing(e,t);if(g!==null){o.push(d);const z=n.get(g)||{refs:[],i:0};if(z.refs.length===z.i)u(g,q0(t,g)),f();else{d=z.refs[z.i++];continue}}else(h===0||h0)d=o.pop();else if(i!==null&&i.i0){const b=new hf;return AB(b,c,new Map),sn(b.restEncoder,0),{missing:l,update:b.toUint8Array()}}return null},I8e=(e,t)=>AB(e,t.doc.store,t.beforeState),D8e=(e,t,n,o=new ih(e))=>Ho(t,r=>{r.local=!1;let s=!1;const i=r.doc,c=i.store,l=P8e(o,i),u=j8e(r,c,l),d=c.pendingStructs;if(d){for(const[f,b]of d.missing)if(bb)&&d.missing.set(f,b)}d.update=L4([d.update,u.update])}}else c.pendingStructs=u;const p=kU(o,r,c);if(c.pendingDs){const f=new ih(Rc(c.pendingDs));_n(f.restDecoder);const b=kU(f,r,c);p&&b?c.pendingDs=L4([p,b]):c.pendingDs=p||b}else c.pendingDs=p;if(s){const f=c.pendingStructs.update;c.pendingStructs=null,tse(r.doc,f)}},n,!1),tse=(e,t,n,o=ih)=>{const r=Rc(t);D8e(r,e,n,new o(r))},nse=(e,t,n)=>tse(e,t,n,Q1e),F8e=(e,t,n=new Map)=>{AB(e,t.store,n),Fh(e,N8e(t.store))},$8e=(e,t=new Uint8Array([0]),n=new hf)=>{const o=ose(t);F8e(n,e,o);const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(rWe(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===b3)return nWe(r.map((s,i)=>i===0?s:iWe(s)));if(n.constructor===hf)return L4(r)}return r[0]},vB=(e,t)=>$8e(e,t,new b3),V8e=e=>{const t=new Map,n=_n(e.restDecoder);for(let o=0;oV8e(new Z1e(Rc(e))),rse=(e,t)=>(sn(e.restEncoder,t.size),Tl(t.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{sn(e.restEncoder,n),sn(e.restEncoder,o)}),e),H8e=(e,t)=>rse(e,U5(t.store)),U8e=(e,t=new ese)=>(e instanceof Map?rse(t,e):H8e(t,e),t.toUint8Array()),X8e=e=>U8e(e,new J1e);class G8e{constructor(){this.l=[]}}const SU=()=>new G8e,CU=(e,t)=>e.l.push(t),qU=(e,t)=>{const n=e.l,o=n.length;e.l=n.filter(r=>t!==r),o===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},sse=(e,t,n)=>mB(e.l,[t,n]);class q2{constructor(t,n){this.client=t,this.clock=n}}const bA=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,to=(e,t)=>new q2(e,t),K8e=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw yc()},o2=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!K1e(t.ds,e.id),PE=(e,t)=>{const n=w1(e.meta,PE,zd),o=e.doc.store;n.has(t)||(t.sv.forEach((r,s)=>{r{}),n.add(t))};class ise{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const U5=e=>{const t=new Map;return e.clients.forEach((n,o)=>{const r=n[n.length-1];t.set(o,r.id.clock+r.length)}),t},q0=(e,t)=>{const n=e.clients.get(t);if(n===void 0)return 0;const o=n[n.length-1];return o.id.clock+o.length},ase=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{const o=n[n.length-1];if(o.id.clock+o.length!==t.id.clock)throw yc()}n.push(t)},Ac=(e,t)=>{let n=0,o=e.length-1,r=e[o],s=r.id.clock;if(s===t)return o;let i=Oc(t/(s+r.length-1)*o);for(;n<=o;){if(r=e[i],s=r.id.clock,s<=t){if(t{const n=e.clients.get(t.client);return n[Ac(n,t.clock)]},DS=Y8e,jE=(e,t,n)=>{const o=Ac(t,n),r=t[o];return r.id.clock{const n=e.doc.store.clients.get(t.client);return n[jE(e,n,t.clock)]},RU=(e,t,n)=>{const o=t.clients.get(n.client),r=Ac(o,n.clock),s=o[r];return n.clock!==s.id.clock+s.length-1&&s.constructor!==yi&&o.splice(r+1,0,$4(e,s,n.clock-s.id.clock+1)),s},Z8e=(e,t,n)=>{const o=e.clients.get(t.id.client);o[Ac(o,t.id.clock)]=n},cse=(e,t,n,o,r)=>{if(o===0)return;const s=n+o;let i=jE(e,t,n),c;do c=t[i++],st.deleteSet.clients.size===0&&!rEe(t.afterState,(n,o)=>t.beforeState.get(o)!==n)?!1:(OB(t.deleteSet),I8e(e,t),Fh(e,t.deleteSet),!0),EU=(e,t,n)=>{const o=t._item;(o===null||o.id.clock<(e.beforeState.get(o.id.client)||0)&&!o.deleted)&&w1(e.changed,t,zd).add(n)},Dv=(e,t)=>{let n=e[t],o=e[t-1],r=t;for(;r>0;n=o,o=e[--r-1]){if(o.deleted===n.deleted&&o.constructor===n.constructor&&o.mergeWith(n)){n instanceof b1&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,o);continue}break}const s=t-r;return s&&e.splice(t+1-s,s),s},J8e=(e,t,n)=>{for(const[o,r]of e.clients.entries()){const s=t.clients.get(o);for(let i=r.length-1;i>=0;i--){const c=r[i],l=c.clock+c.len;for(let u=Ac(s,c.clock),d=s[u];u{e.clients.forEach((n,o)=>{const r=t.clients.get(o);for(let s=n.length-1;s>=0;s--){const i=n[s],c=cB(r.length-1,1+Ac(r,i.clock+i.len-1));for(let l=c,u=r[l];l>0&&u.id.clock>=i.clock;u=r[l])l-=1+Dv(r,l)}})},lse=(e,t)=>{if(tc.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(n,l)})),c.push(()=>{n.changedParentTypes.forEach((l,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=u,d._path=null}),l.sort((d,p)=>d.path.length-p.path.length),sse(u._dEH,l,n))})}),c.push(()=>o.emit("afterTransaction",[n,o])),mB(c,[]),n._needFormattingCleanup&&OWe(n)}finally{o.gc&&J8e(s,r,o.gcFilter),eWe(s,r),n.afterState.forEach((d,p)=>{const f=n.beforeState.get(p)||0;if(f!==d){const b=r.clients.get(p),h=$f(Ac(b,f),1);for(let g=b.length-1;g>=h;)g-=1+Dv(b,g)}});for(let d=i.length-1;d>=0;d--){const{client:p,clock:f}=i[d].id,b=r.clients.get(p),h=Ac(b,f);h+11||h>0&&Dv(b,h)}if(!n.local&&n.afterState.get(o.clientID)!==n.beforeState.get(o.clientID)&&(H1e(V5,ki,"[yjs] ",bf,F1e,"Changed the client-id because another client seems to be using it."),o.clientID=Y1e()),o.emit("afterTransactionCleanup",[n,o]),o._observers.has("update")){const d=new b3;TU(d,n)&&o.emit("update",[d.toUint8Array(),n.origin,o,n])}if(o._observers.has("updateV2")){const d=new hf;TU(d,n)&&o.emit("updateV2",[d.toUint8Array(),n.origin,o,n])}const{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:u}=n;(c.size>0||u.size>0||l.size>0)&&(c.forEach(d=>{d.clientID=o.clientID,d.collectionid==null&&(d.collectionid=o.collectionid),o.subdocs.add(d)}),u.forEach(d=>o.subdocs.delete(d)),o.emit("subdocs",[{loaded:l,added:c,removed:u},o,n]),u.forEach(d=>d.destroy())),e.length<=t+1?(o._transactionCleanups=[],o.emit("afterAllTransactions",[o,e])):lse(e,t+1)}}},Ho=(e,t,n=null,o=!0)=>{const r=e._transactionCleanups;let s=!1,i=null;e._transaction===null&&(s=!0,e._transaction=new Q8e(e,n,o),r.push(e._transaction),r.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{i=t(e._transaction)}finally{if(s){const c=e._transaction===r[0];e._transaction=null,c&&lse(r,0)}}return i};function*tWe(e){const t=_n(e.restDecoder);for(let n=0;nL4(e,Q1e,b3),oWe=(e,t)=>{if(e.constructor===yi){const{client:n,clock:o}=e.id;return new yi(to(n,o+t),e.length-t)}else if(e.constructor===Ai){const{client:n,clock:o}=e.id;return new Ai(to(n,o+t),e.length-t)}else{const n=e,{client:o,clock:r}=n.id;return new b1(to(o,r+t),null,to(o,r+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},L4=(e,t=ih,n=hf)=>{if(e.length===1)return e[0];const o=e.map(d=>new t(Rc(d)));let r=o.map(d=>new xB(d,!0)),s=null;const i=new n,c=new wB(i);for(;r=r.filter(f=>f.curr!==null),r.sort((f,b)=>{if(f.curr.id.client===b.curr.id.client){const h=f.curr.id.clock-b.curr.id.clock;return h===0?f.curr.constructor===b.curr.constructor?0:f.curr.constructor===Ai?1:-1:h}else return b.curr.id.client-f.curr.id.client}),r.length!==0;){const d=r[0],p=d.curr.id.client;if(s!==null){let f=d.curr,b=!1;for(;f!==null&&f.id.clock+f.length<=s.struct.id.clock+s.struct.length&&f.id.client>=s.struct.id.client;)f=d.next(),b=!0;if(f===null||f.id.client!==p||b&&f.id.clock>s.struct.id.clock+s.struct.length)continue;if(p!==s.struct.id.client)Hu(c,s.struct,s.offset),s={struct:f,offset:0},d.next();else if(s.struct.id.clock+s.struct.length0&&(s.struct.constructor===Ai?s.struct.length-=h:f=oWe(f,h)),s.struct.mergeWith(f)||(Hu(c,s.struct,s.offset),s={struct:f,offset:0},d.next())}}else s={struct:d.curr,offset:0},d.next();for(let f=d.curr;f!==null&&f.id.client===p&&f.id.clock===s.struct.id.clock+s.struct.length&&f.constructor!==Ai;f=d.next())Hu(c,s.struct,s.offset),s={struct:f,offset:0}}s!==null&&(Hu(c,s.struct,s.offset),s=null),_B(c);const l=o.map(d=>yB(d)),u=E8e(l);return Fh(i,u),i.toUint8Array()},rWe=(e,t,n=ih,o=hf)=>{const r=ose(t),s=new o,i=new wB(s),c=new n(Rc(e)),l=new xB(c,!1);for(;l.curr;){const d=l.curr,p=d.id.client,f=r.get(p)||0;if(l.curr.constructor===Ai){l.next();continue}if(d.id.clock+d.length>f)for(Hu(i,d,$f(f-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===p;)Hu(i,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===p&&l.curr.id.clock+l.curr.length<=f;)l.next()}_B(i);const u=yB(c);return Fh(s,u),s.toUint8Array()},use=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:Sr(e.encoder.restEncoder)}),e.encoder.restEncoder=k0(),e.written=0)},Hu=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&use(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),sn(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},_B=e=>{use(e);const t=e.encoder.restEncoder;sn(t,e.clientStructs.length);for(let n=0;n{const r=new n(Rc(e)),s=new xB(r,!1),i=new o,c=new wB(i);for(let u=s.curr;u!==null;u=s.next())Hu(c,t(u),0);_B(c);const l=yB(r);return Fh(i,l),i.toUint8Array()},iWe=e=>sWe(e,l8e,ih,b3),WU="You must not compute changes after the event-handler fired.";class X5{constructor(t,n){this.target=t,this.currentTarget=t,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=aWe(this.currentTarget,this.target))}deletes(t){return K1e(this.transaction.deleteSet,t.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw ba(WU);const t=new Map,n=this.target;this.transaction.changed.get(n).forEach(r=>{if(r!==null){const s=n._map.get(r);let i,c;if(this.adds(s)){let l=s.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(s))if(l!==null&&this.deletes(l))i="delete",c=ES(l.content.getContent());else return;else l!==null&&this.deletes(l)?(i="update",c=ES(l.content.getContent())):(i="add",c=void 0)}else if(this.deletes(s))i="delete",c=ES(s.content.getContent());else return;t.set(r,{action:i,oldValue:c})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw ba(WU);const n=this.target,o=zd(),r=zd(),s=[];if(t={added:o,deleted:r,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let c=null;const l=()=>{c&&s.push(c)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=u.length,r.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),o.add(u)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&l()}this._changes=t}return t}}const aWe=(e,t)=>{const n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let o=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(o+=r.length),r=r.right;n.unshift(o)}t=t._item.parent}return n},z1=()=>{C8e("Invalid access: Add Yjs type to a document before reading data.")},dse=80;let kB=0;class cWe{constructor(t,n){t.marker=!0,this.p=t,this.index=n,this.timestamp=kB++}}const lWe=e=>{e.timestamp=kB++},pse=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=kB++},uWe=(e,t,n)=>{if(e.length>=dse){const o=e.reduce((r,s)=>r.timestamp{if(e._start===null||t===0||e._searchMarker===null)return null;const n=e._searchMarker.length===0?null:e._searchMarker.reduce((s,i)=>Lv(t-s.index)t;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);for(;o.left!==null&&o.left.id.client===o.id.client&&o.left.id.clock+o.left.length===o.id.clock;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);return n!==null&&Lv(n.index-r){for(let o=e.length-1;o>=0;o--){const r=e[o];if(n>0){let s=r.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(r.index-=s.length);if(s===null||s.marker===!0){e.splice(o,1);continue}r.p=s,s.marker=!0}(t0&&t===r.index)&&(r.index=$f(t,r.index+n))}},K5=(e,t,n)=>{const o=e,r=t.changedParentTypes;for(;w1(r,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;sse(o._eH,n,t)};class Y0{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=SU(),this._dEH=SU(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,n){this.doc=t,this._item=n}_copy(){throw dc()}clone(){throw dc()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,n){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){CU(this._eH,t)}observeDeep(t){CU(this._dEH,t)}unobserve(t){qU(this._eH,t)}unobserveDeep(t){qU(this._dEH,t)}toJSON(){}}const fse=(e,t,n)=>{e.doc??z1(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let o=n-t;const r=[];let s=e._start;for(;s!==null&&o>0;){if(s.countable&&!s.deleted){const i=s.content.getContent();if(i.length<=t)t-=i.length;else{for(let c=t;c0;c++)r.push(i[c]),o--;t=0}}s=s.right}return r},bse=e=>{e.doc??z1();const t=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const o=n.content.getContent();for(let r=0;r{let n=0,o=e._start;for(e.doc??z1();o!==null;){if(o.countable&&!o.deleted){const r=o.content.getContent();for(let s=0;s{const n=[];return KM(e,(o,r)=>{n.push(t(o,r,e))}),n},dWe=e=>{let t=e._start,n=null,o=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),o=0,t=t.right}const r=n[o++];return n.length<=o&&(n=null),{done:!1,value:r}}}},mse=(e,t)=>{e.doc??z1();const n=G5(e,t);let o=e._start;for(n!==null&&(o=n.p,t-=n.index);o!==null;o=o.right)if(!o.deleted&&o.countable){if(t{let r=n;const s=e.doc,i=s.clientID,c=s.store,l=n===null?t._start:n.right;let u=[];const d=()=>{u.length>0&&(r=new b1(to(i,q0(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new gf(u)),r.integrate(e,0),u=[])};o.forEach(p=>{if(p===null)u.push(p);else switch(p.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(p);break;default:switch(d(),p.constructor){case Uint8Array:case ArrayBuffer:r=new b1(to(i,q0(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new h3(new Uint8Array(p))),r.integrate(e,0);break;case $h:r=new b1(to(i,q0(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new m3(p)),r.integrate(e,0);break;default:if(p instanceof Y0)r=new b1(to(i,q0(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Zl(p)),r.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},gse=()=>ba("Length exceeded!"),Mse=(e,t,n,o)=>{if(n>t._length)throw gse();if(n===0)return t._searchMarker&&GM(t._searchMarker,n,o.length),P4(e,t,null,o);const r=n,s=G5(t,n);let i=t._start;for(s!==null&&(i=s.p,n-=s.index,n===0&&(i=i.prev,n+=i&&i.countable&&!i.deleted?i.length:0));i!==null;i=i.right)if(!i.deleted&&i.countable){if(n<=i.length){n{let r=(t._searchMarker||[]).reduce((s,i)=>i.index>s.index?i:s,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return P4(e,t,r,n)},zse=(e,t,n,o)=>{if(o===0)return;const r=n,s=o,i=G5(t,n);let c=t._start;for(i!==null&&(c=i.p,n-=i.index);c!==null&&n>0;c=c.right)!c.deleted&&c.countable&&(n0&&c!==null;)c.deleted||(o0)throw gse();t._searchMarker&&GM(t._searchMarker,r,-s+o)},j4=(e,t,n)=>{const o=t._map.get(n);o!==void 0&&o.delete(e)},SB=(e,t,n,o)=>{const r=t._map.get(n)||null,s=e.doc,i=s.clientID;let c;if(o==null)c=new gf([o]);else switch(o.constructor){case Number:case Object:case Boolean:case Array:case String:c=new gf([o]);break;case Uint8Array:c=new h3(o);break;case $h:c=new m3(o);break;default:if(o instanceof Y0)c=new Zl(o);else throw new Error("Unexpected content type")}new b1(to(i,q0(s.store,i)),r,r&&r.lastId,null,null,t,n,c).integrate(e,0)},CB=(e,t)=>{e.doc??z1();const n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},Ose=e=>{const t={};return e.doc??z1(),e._map.forEach((n,o)=>{n.deleted||(t[o]=n.content.getContent()[n.length-1])}),t},yse=(e,t)=>{e.doc??z1();const n=e._map.get(t);return n!==void 0&&!n.deleted},fWe=(e,t)=>{const n={};return e._map.forEach((o,r)=>{let s=o;for(;s!==null&&(!t.sv.has(s.id.client)||s.id.clock>=(t.sv.get(s.id.client)||0));)s=s.left;s!==null&&o2(s,t)&&(n[r]=s.content.getContent()[s.length-1])}),n},hA=e=>(e.doc??z1(),R8e(e._map.entries(),t=>!t[1].deleted));class bWe extends X5{}class R2 extends Y0{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const n=new R2;return n.push(t),n}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new R2}clone(){const t=new R2;return t.insert(0,this.toArray().map(n=>n instanceof Y0?n.clone():n)),t}get length(){return this.doc??z1(),this._length}_callObserver(t,n){super._callObserver(t,n),K5(this,t,new bWe(this,t))}insert(t,n){this.doc!==null?Ho(this.doc,o=>{Mse(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}push(t){this.doc!==null?Ho(this.doc,n=>{pWe(n,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,n=1){this.doc!==null?Ho(this.doc,o=>{zse(o,this,t,n)}):this._prelimContent.splice(t,n)}get(t){return mse(this,t)}toArray(){return bse(this)}slice(t=0,n=this.length){return fse(this,t,n)}toJSON(){return this.map(t=>t instanceof Y0?t.toJSON():t)}map(t){return hse(this,t)}forEach(t){KM(this,t)}[Symbol.iterator](){return dWe(this)}_write(t){t.writeTypeRef(jWe)}}const hWe=e=>new R2;class mWe extends X5{constructor(t,n,o){super(t,n),this.keysChanged=o}}class ah extends Y0{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,n){super._integrate(t,n),this._prelimContent.forEach((o,r)=>{this.set(r,o)}),this._prelimContent=null}_copy(){return new ah}clone(){const t=new ah;return this.forEach((n,o)=>{t.set(o,n instanceof Y0?n.clone():n)}),t}_callObserver(t,n){K5(this,t,new mWe(this,t,n))}toJSON(){this.doc??z1();const t={};return this._map.forEach((n,o)=>{if(!n.deleted){const r=n.content.getContent()[n.length-1];t[o]=r instanceof Y0?r.toJSON():r}}),t}get size(){return[...hA(this)].length}keys(){return IS(hA(this),t=>t[0])}values(){return IS(hA(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return IS(hA(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??z1(),this._map.forEach((n,o)=>{n.deleted||t(n.content.getContent()[n.length-1],o,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Ho(this.doc,n=>{j4(n,this,t)}):this._prelimContent.delete(t)}set(t,n){return this.doc!==null?Ho(this.doc,o=>{SB(o,this,t,n)}):this._prelimContent.set(t,n),n}get(t){return CB(this,t)}has(t){return yse(this,t)}clear(){this.doc!==null?Ho(this.doc,t=>{this.forEach(function(n,o,r){j4(t,r,o)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(IWe)}}const gWe=e=>new ah,Zu=(e,t)=>e===t||typeof e=="object"&&typeof t=="object"&&e&&t&&i8e(e,t);class IE{constructor(t,n,o,r){this.left=t,this.right=n,this.index=o,this.currentAttributes=r}forward(){switch(this.right===null&&yc(),this.right.content.constructor){case m0:this.right.deleted||Vh(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const NU=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case m0:t.right.deleted||Vh(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n{const r=new Map,s=o?G5(t,n):null;if(s){const i=new IE(s.p.left,s.p,s.index,r);return NU(e,i,n-s.index)}else{const i=new IE(null,t._start,0,r);return NU(e,i,n)}},Ase=(e,t,n,o)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===m0&&Zu(o.get(n.right.content.key),n.right.content.value));)n.right.deleted||o.delete(n.right.content.key),n.forward();const r=e.doc,s=r.clientID;o.forEach((i,c)=>{const l=n.left,u=n.right,d=new b1(to(s,q0(r.store,s)),l,l&&l.lastId,u,u&&u.id,t,null,new m0(c,i));d.integrate(e,0),n.right=d,n.forward()})},Vh=(e,t)=>{const{key:n,value:o}=t;o===null?e.delete(n):e.set(n,o)},vse=(e,t)=>{for(;e.right!==null;){if(!(e.right.deleted||e.right.content.constructor===m0&&Zu(t[e.right.content.key]??null,e.right.content.value)))break;e.forward()}},xse=(e,t,n,o)=>{const r=e.doc,s=r.clientID,i=new Map;for(const c in o){const l=o[c],u=n.currentAttributes.get(c)??null;if(!Zu(u,l)){i.set(c,u);const{left:d,right:p}=n;n.right=new b1(to(s,q0(r.store,s)),d,d&&d.lastId,p,p&&p.id,t,null,new m0(c,l)),n.right.integrate(e,0),n.forward()}}return i},FS=(e,t,n,o,r)=>{n.currentAttributes.forEach((f,b)=>{r[b]===void 0&&(r[b]=null)});const s=e.doc,i=s.clientID;vse(n,r);const c=xse(e,t,n,r),l=o.constructor===String?new vc(o):o instanceof Y0?new Zl(o):new Vf(o);let{left:u,right:d,index:p}=n;t._searchMarker&&GM(t._searchMarker,n.index,l.getLength()),d=new b1(to(i,q0(s.store,i)),u,u&&u.lastId,d,d&&d.id,t,null,l),d.integrate(e,0),n.right=d,n.index=p,n.forward(),Ase(e,t,n,c)},BU=(e,t,n,o,r)=>{const s=e.doc,i=s.clientID;vse(n,r);const c=xse(e,t,n,r);e:for(;n.right!==null&&(o>0||c.size>0&&(n.right.deleted||n.right.content.constructor===m0));){if(!n.right.deleted)switch(n.right.content.constructor){case m0:{const{key:l,value:u}=n.right.content,d=r[l];if(d!==void 0){if(Zu(d,u))c.delete(l);else{if(o===0)break e;c.set(l,u)}n.right.delete(e)}else n.currentAttributes.set(l,u);break}default:o0){let l="";for(;o>0;o--)l+=` -`;n.right=new b1(to(i,q0(s.store,i)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new vc(l)),n.right.integrate(e,0),n.forward()}Ase(e,t,n,c)},wse=(e,t,n,o,r)=>{let s=t;const i=fs();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===m0){const u=s.content;i.set(u.key,u)}s=s.right}let c=0,l=!1;for(;t!==s;){if(n===t&&(l=!0),!t.deleted){const u=t.content;switch(u.constructor){case m0:{const{key:d,value:p}=u,f=o.get(d)??null;(i.get(d)!==u||f===p)&&(t.delete(e),c++,!l&&(r.get(d)??null)===p&&f!==p&&(f===null?r.delete(d):r.set(d,f))),!l&&!t.deleted&&Vh(r,u);break}}}t=t.right}return c},MWe=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===m0){const o=t.content.key;n.has(o)?t.delete(e):n.add(o)}t=t.left}},zWe=e=>{let t=0;return Ho(e.doc,n=>{let o=e._start,r=e._start,s=fs();const i=RE(s);for(;r;){if(r.deleted===!1)switch(r.content.constructor){case m0:Vh(i,r.content);break;default:t+=wse(n,o,r,s,i),s=RE(i),o=r;break}r=r.right}}),t},OWe=e=>{const t=new Set,n=e.doc;for(const[o,r]of e.afterState.entries()){const s=e.beforeState.get(o)||0;r!==s&&cse(e,n.store.clients.get(o),s,r,i=>{!i.deleted&&i.content.constructor===m0&&i.constructor!==yi&&t.add(i.parent)})}Ho(n,o=>{G1e(e,e.deleteSet,r=>{if(r instanceof yi||!r.parent._hasFormatting||t.has(r.parent))return;const s=r.parent;r.content.constructor===m0?t.add(s):MWe(o,r)});for(const r of t)zWe(r)})},LU=(e,t,n)=>{const o=n,r=RE(t.currentAttributes),s=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Zl:case Vf:case vc:n{r===null?this.childListChanged=!0:this.keysChanged.add(r)})}get changes(){if(this._changes===null){const 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){const t=this.target.doc,n=[];Ho(t,o=>{const r=new Map,s=new Map;let i=this.target._start,c=null;const l={};let u="",d=0,p=0;const f=()=>{if(c!==null){let b=null;switch(c){case"delete":p>0&&(b={delete:p}),p=0;break;case"insert":(typeof u=="object"||u.length>0)&&(b={insert:u},r.size>0&&(b.attributes={},r.forEach((h,g)=>{h!==null&&(b.attributes[g]=h)}))),u="";break;case"retain":d>0&&(b={retain:d},r8e(l)||(b.attributes=n8e({},l))),d=0;break}b&&n.push(b),c=null}};for(;i!==null;){switch(i.content.constructor){case Zl:case Vf:this.adds(i)?this.deletes(i)||(f(),c="insert",u=i.content.getContent()[0],f()):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=1):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=1);break;case vc:this.adds(i)?this.deletes(i)||(c!=="insert"&&(f(),c="insert"),u+=i.content.str):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=i.length):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=i.length);break;case m0:{const{key:b,value:h}=i.content;if(this.adds(i)){if(!this.deletes(i)){const g=r.get(b)??null;Zu(g,h)?h!==null&&i.delete(o):(c==="retain"&&f(),Zu(h,s.get(b)??null)?delete l[b]:l[b]=h)}}else if(this.deletes(i)){s.set(b,h);const g=r.get(b)??null;Zu(g,h)||(c==="retain"&&f(),l[b]=g)}else if(!i.deleted){s.set(b,h);const g=l[b];g!==void 0&&(Zu(g,h)?g!==null&&i.delete(o):(c==="retain"&&f(),h===null?delete l[b]:l[b]=h))}i.deleted||(c==="insert"&&f(),Vh(r,i.content));break}}i=i.right}for(f();n.length>0;){const b=n[n.length-1];if(b.retain!==void 0&&b.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class ch extends Y0{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??z1(),this._length}_integrate(t,n){super._integrate(t,n);try{this._pending.forEach(o=>o())}catch(o){console.error(o)}this._pending=null}_copy(){return new ch}clone(){const t=new ch;return t.applyDelta(this.toDelta()),t}_callObserver(t,n){super._callObserver(t,n);const o=new yWe(this,t,n);K5(this,t,o),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??z1();let t="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===vc&&(t+=n.content.str),n=n.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:n=!0}={}){this.doc!==null?Ho(this.doc,o=>{const r=new IE(null,this._start,0,new Map);for(let s=0;s0)&&FS(o,this,r,c,i.attributes||{})}else i.retain!==void 0?BU(o,this,r,i.retain,i.attributes||{}):i.delete!==void 0&&LU(o,r,i.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,n,o){this.doc??z1();const r=[],s=new Map,i=this.doc;let c="",l=this._start;function u(){if(c.length>0){const p={};let f=!1;s.forEach((h,g)=>{f=!0,p[g]=h});const b={insert:c};f&&(b.attributes=p),r.push(b),c=""}}const d=()=>{for(;l!==null;){if(o2(l,t)||n!==void 0&&o2(l,n))switch(l.content.constructor){case vc:{const p=s.get("ychange");t!==void 0&&!o2(l,t)?(p===void 0||p.user!==l.id.client||p.type!=="removed")&&(u(),s.set("ychange",o?o("removed",l.id):{type:"removed"})):n!==void 0&&!o2(l,n)?(p===void 0||p.user!==l.id.client||p.type!=="added")&&(u(),s.set("ychange",o?o("added",l.id):{type:"added"})):p!==void 0&&(u(),s.delete("ychange")),c+=l.content.str;break}case Zl:case Vf:{u();const p={insert:l.content.getContent()[0]};if(s.size>0){const f={};p.attributes=f,s.forEach((b,h)=>{f[h]=b})}r.push(p);break}case m0:o2(l,t)&&(u(),Vh(s,l.content));break}l=l.right}u()};return t||n?Ho(i,p=>{t&&PE(p,t),n&&PE(p,n),d()},"cleanup"):d(),r}insert(t,n,o){if(n.length<=0)return;const r=this.doc;r!==null?Ho(r,s=>{const i=mA(s,this,t,!o);o||(o={},i.currentAttributes.forEach((c,l)=>{o[l]=c})),FS(s,this,i,n,o)}):this._pending.push(()=>this.insert(t,n,o))}insertEmbed(t,n,o){const r=this.doc;r!==null?Ho(r,s=>{const i=mA(s,this,t,!o);FS(s,this,i,n,o||{})}):this._pending.push(()=>this.insertEmbed(t,n,o||{}))}delete(t,n){if(n===0)return;const o=this.doc;o!==null?Ho(o,r=>{LU(r,mA(r,this,t,!0),n)}):this._pending.push(()=>this.delete(t,n))}format(t,n,o){if(n===0)return;const r=this.doc;r!==null?Ho(r,s=>{const i=mA(s,this,t,!1);i.right!==null&&BU(s,this,i,n,o)}):this._pending.push(()=>this.format(t,n,o))}removeAttribute(t){this.doc!==null?Ho(this.doc,n=>{j4(n,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,n){this.doc!==null?Ho(this.doc,o=>{SB(o,this,t,n)}):this._pending.push(()=>this.setAttribute(t,n))}getAttribute(t){return CB(this,t)}getAttributes(){return Ose(this)}_write(t){t.writeTypeRef(DWe)}}const AWe=e=>new ch;class $S{constructor(t,n=()=>!0){this._filter=n,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??z1()}[Symbol.iterator](){return this}next(){let t=this._currentNode,n=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(n)))do if(n=t.content.type,!t.deleted&&(n.constructor===lh||n.constructor===mf)&&n._start!==null)t=n._start;else for(;t!==null;)if(t.right!==null){t=t.right;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})}}class mf extends Y0{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new mf}clone(){const t=new mf;return t.insert(0,this.toArray().map(n=>n instanceof Y0?n.clone():n)),t}get length(){return this.doc??z1(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new $S(this,t)}querySelector(t){t=t.toUpperCase();const o=new $S(this,r=>r.nodeName&&r.nodeName.toUpperCase()===t).next();return o.done?null:o.value}querySelectorAll(t){return t=t.toUpperCase(),Tl(new $S(this,n=>n.nodeName&&n.nodeName.toUpperCase()===t))}_callObserver(t,n){K5(this,t,new wWe(this,n,t))}toString(){return hse(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,n={},o){const r=t.createDocumentFragment();return o!==void 0&&o._createAssociation(r,this),KM(this,s=>{r.insertBefore(s.toDOM(t,n,o),null)}),r}insert(t,n){this.doc!==null?Ho(this.doc,o=>{Mse(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}insertAfter(t,n){if(this.doc!==null)Ho(this.doc,o=>{const r=t&&t instanceof Y0?t._item:t;P4(o,this,r,n)});else{const o=this._prelimContent,r=t===null?0:o.findIndex(s=>s===t)+1;if(r===0&&t!==null)throw ba("Reference item not found");o.splice(r,0,...n)}}delete(t,n=1){this.doc!==null?Ho(this.doc,o=>{zse(o,this,t,n)}):this._prelimContent.splice(t,n)}toArray(){return bse(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return mse(this,t)}slice(t=0,n=this.length){return fse(this,t,n)}forEach(t){KM(this,t)}_write(t){t.writeTypeRef($We)}}const vWe=e=>new mf;class lh extends mf{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,n){super._integrate(t,n),this._prelimAttrs.forEach((o,r)=>{this.setAttribute(r,o)}),this._prelimAttrs=null}_copy(){return new lh(this.nodeName)}clone(){const t=new lh(this.nodeName),n=this.getAttributes();return o8e(n,(o,r)=>{typeof o=="string"&&t.setAttribute(r,o)}),t.insert(0,this.toArray().map(o=>o instanceof Y0?o.clone():o)),t}toString(){const t=this.getAttributes(),n=[],o=[];for(const c in t)o.push(c);o.sort();const r=o.length;for(let c=0;c0?" "+n.join(" "):"";return`<${s}${i}>${super.toString()}`}removeAttribute(t){this.doc!==null?Ho(this.doc,n=>{j4(n,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,n){this.doc!==null?Ho(this.doc,o=>{SB(o,this,t,n)}):this._prelimAttrs.set(t,n)}getAttribute(t){return CB(this,t)}hasAttribute(t){return yse(this,t)}getAttributes(t){return t?fWe(this,t):Ose(this)}toDOM(t=document,n={},o){const r=t.createElement(this.nodeName),s=this.getAttributes();for(const i in s){const c=s[i];typeof c=="string"&&r.setAttribute(i,c)}return KM(this,i=>{r.appendChild(i.toDOM(t,n,o))}),o!==void 0&&o._createAssociation(r,this),r}_write(t){t.writeTypeRef(FWe),t.writeKey(this.nodeName)}}const xWe=e=>new lh(e.readKey());class wWe extends X5{constructor(t,n,o){super(t,o),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(r=>{r===null?this.childListChanged=!0:this.attributesChanged.add(r)})}}class I4 extends ah{constructor(t){super(),this.hookName=t}_copy(){return new I4(this.hookName)}clone(){const t=new I4(this.hookName);return this.forEach((n,o)=>{t.set(o,n)}),t}toDOM(t=document,n={},o){const r=n[this.hookName];let s;return r!==void 0?s=r.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),o!==void 0&&o._createAssociation(s,this),s}_write(t){t.writeTypeRef(VWe),t.writeKey(this.hookName)}}const _We=e=>new I4(e.readKey());class D4 extends ch{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new D4}clone(){const t=new D4;return t.applyDelta(this.toDelta()),t}toDOM(t=document,n,o){const r=t.createTextNode(this.toString());return o!==void 0&&o._createAssociation(r,this),r}toString(){return this.toDelta().map(t=>{const n=[];for(const r in t.attributes){const s=[];for(const i in t.attributes[r])s.push({key:i,value:t.attributes[r][i]});s.sort((i,c)=>i.keyr.nodeName=0;r--)o+=``;return o}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(HWe)}}const kWe=e=>new D4;class qB{constructor(t,n){this.id=t,this.length=n}get deleted(){throw dc()}mergeWith(t){return!1}write(t,n,o){throw dc()}integrate(t,n){throw dc()}}const SWe=0;class yi extends qB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){n>0&&(this.id.clock+=n,this.length-=n),ase(t.doc.store,this)}write(t,n){t.writeInfo(SWe),t.writeLen(this.length-n)}getMissing(t,n){return null}}class h3{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new h3(this.content)}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeBuf(this.content)}getRef(){return 3}}const CWe=e=>new h3(e.readBuf());class YM{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new YM(this.len)}splice(t){const n=new YM(this.len-t);return this.len=t,n}mergeWith(t){return this.len+=t.len,!0}integrate(t,n){B4(t.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(t){}gc(t){}write(t,n){t.writeLen(this.len-n)}getRef(){return 1}}const qWe=e=>new YM(e.readLen()),_se=(e,t)=>new $h({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class m3{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const n={};this.opts=n,t.gc||(n.gc=!1),t.autoLoad&&(n.autoLoad=!0),t.meta!==null&&(n.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new m3(_se(this.doc.guid,this.opts))}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){this.doc._item=n,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,n){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const RWe=e=>new m3(_se(e.readString(),e.readAny()));class Vf{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Vf(this.embed)}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeJSON(this.embed)}getRef(){return 5}}const TWe=e=>new Vf(e.readJSON());class m0{constructor(t,n){this.key=t,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new m0(this.key,this.value)}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){const o=n.parent;o._searchMarker=null,o._hasFormatting=!0}delete(t){}gc(t){}write(t,n){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EWe=e=>new m0(e.readKey(),e.readJSON());class F4{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new F4(this.arr)}splice(t){const n=new F4(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){const o=this.arr.length;t.writeLen(o-n);for(let r=n;r{const t=e.readLen(),n=[];for(let o=0;o{const t=e.readLen(),n=[];for(let o=0;o=55296&&o<=56319&&(this.str=this.str.slice(0,t-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(t){return this.str+=t.str,!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const LWe=e=>new vc(e.readString()),PWe=[hWe,gWe,AWe,xWe,vWe,_We,kWe],jWe=0,IWe=1,DWe=2,FWe=3,$We=4,VWe=5,HWe=6;class Zl{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Zl(this.type._copy())}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){this.type._integrate(t.doc,n)}delete(t){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(t.beforeState.get(n.id.client)||0)&&t._mergeStructs.push(n):n.delete(t),n=n.right;this.type._map.forEach(o=>{o.deleted?o.id.clock<(t.beforeState.get(o.id.client)||0)&&t._mergeStructs.push(o):o.delete(t)}),t.changed.delete(this.type)}gc(t){let n=this.type._start;for(;n!==null;)n.gc(t,!0),n=n.right;this.type._start=null,this.type._map.forEach(o=>{for(;o!==null;)o.gc(t,!0),o=o.left}),this.type._map=new Map}write(t,n){this.type._write(t)}getRef(){return 7}}const UWe=e=>new Zl(PWe[e.readTypeRef()](e)),$4=(e,t,n)=>{const{client:o,clock:r}=t.id,s=new b1(to(o,r+n),t,to(o,r+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&s.markDeleted(),t.keep&&(s.keep=!0),t.redone!==null&&(s.redone=to(t.redone.client,t.redone.clock+n)),t.right=s,s.right!==null&&(s.right.left=s),e._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),t.length=n,s};let b1=class DE extends qB{constructor(t,n,o,r,s,i,c,l){super(t,l.getLength()),this.origin=o,this.left=n,this.right=r,this.rightOrigin=s,this.parent=i,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?hU:0}set marker(t){(this.info&NS)>0!==t&&(this.info^=NS)}get marker(){return(this.info&NS)>0}get keep(){return(this.info&bU)>0}set keep(t){this.keep!==t&&(this.info^=bU)}get countable(){return(this.info&hU)>0}get deleted(){return(this.info&WS)>0}set deleted(t){this.deleted!==t&&(this.info^=WS)}markDeleted(){this.info|=WS}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=q0(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=q0(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===q2&&this.id.client!==this.parent.client&&this.parent.clock>=q0(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=RU(t,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Od(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===yi||this.right&&this.right.constructor===yi)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===DE&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===DE&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===q2){const o=DS(n,this.parent);o.constructor===yi?this.parent=null:this.parent=o.content.type}return null}integrate(t,n){if(n>0&&(this.id.clock+=n,this.left=RU(t,t.doc.store,to(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let o=this.left,r;if(o!==null)r=o.right;else if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start;const s=new Set,i=new Set;for(;r!==null&&r!==this.right;){if(i.add(r),s.add(r),bA(this.origin,r.origin)){if(r.id.client{o.p===t&&(o.p=this,!this.deleted&&this.countable&&(o.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),B4(t.deleteSet,this.id.client,this.id.clock,this.length),EU(t,n,this.parentSub),this.content.delete(t)}}gc(t,n){if(!this.deleted)throw yc();this.content.gc(t),n?Z8e(t,this,new yi(this.id,this.length)):this.content=new YM(this.length)}write(t,n){const o=n>0?to(this.id.client,this.id.clock+n-1):this.origin,r=this.rightOrigin,s=this.parentSub,i=this.content.getRef()&I5|(o===null?0:Ns)|(r===null?0:yl)|(s===null?0:VM);if(t.writeInfo(i),o!==null&&t.writeLeftID(o),r!==null&&t.writeRightID(r),o===null&&r===null){const c=this.parent;if(c._item!==void 0){const l=c._item;if(l===null){const u=K8e(c);t.writeParentInfo(!0),t.writeString(u)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else c.constructor===String?(t.writeParentInfo(!0),t.writeString(c)):c.constructor===q2?(t.writeParentInfo(!1),t.writeLeftID(c)):yc();s!==null&&t.writeString(s)}this.content.write(t,n)}};const kse=(e,t)=>XWe[t&I5](e),XWe=[()=>{yc()},qWe,WWe,CWe,LWe,TWe,EWe,UWe,BWe,RWe,()=>{yc()}],GWe=10;class Ai extends qB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){yc()}write(t,n){t.writeInfo(GWe),sn(t.restEncoder,this.length-n)}getMissing(t,n){return null}}const Sse=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof fU<"u"?fU:{},Cse="__ $YJS$ __";Sse[Cse]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");Sse[Cse]=!0;const Hf=e=>oh((t,n)=>{e.onerror=o=>n(new Error(o.target.error)),e.onsuccess=o=>t(o.target.result)}),KWe=(e,t)=>oh((n,o)=>{const r=indexedDB.open(e);r.onupgradeneeded=s=>t(s.target.result),r.onerror=s=>o(ba(s.target.error)),r.onsuccess=s=>{const i=s.target.result;i.onversionchange=()=>{i.close()},n(i)}}),YWe=e=>Hf(indexedDB.deleteDatabase(e)),ZWe=(e,t)=>t.forEach(n=>e.createObjectStore.apply(e,n)),Qg=(e,t,n="readwrite")=>{const o=e.transaction(t,n);return t.map(r=>sNe(o,r))},qse=(e,t)=>Hf(e.count(t)),QWe=(e,t)=>Hf(e.get(t)),Rse=(e,t)=>Hf(e.delete(t)),JWe=(e,t,n)=>Hf(e.put(t,n)),FE=(e,t)=>Hf(e.add(t)),eNe=(e,t,n)=>Hf(e.getAll(t,n)),tNe=(e,t,n)=>{let o=null;return rNe(e,t,r=>(o=r,!1),n).then(()=>o)},nNe=(e,t=null)=>tNe(e,t,"prev"),oNe=(e,t)=>oh((n,o)=>{e.onerror=o,e.onsuccess=async r=>{const s=r.target.result;if(s===null||await t(s)===!1)return n();s.continue()}}),rNe=(e,t,n,o="next")=>oNe(e.openKeyCursor(t,o),r=>n(r.key)),sNe=(e,t)=>e.objectStore(t),iNe=(e,t)=>IDBKeyRange.upperBound(e,t),aNe=(e,t)=>IDBKeyRange.lowerBound(e,t),VS="custom",Tse="updates",Ese=500,Wse=(e,t=()=>{},n=()=>{})=>{const[o]=Qg(e.db,[Tse]);return eNe(o,aNe(e._dbref,!1)).then(r=>{e._destroyed||(t(o),Ho(e.doc,()=>{r.forEach(s=>nse(e.doc,s))},e,!1),n(o))}).then(()=>nNe(o).then(r=>{e._dbref=r+1})).then(()=>qse(o).then(r=>{e._dbsize=r})).then(()=>o)},cNe=(e,t=!0)=>Wse(e).then(n=>{(t||e._dbsize>=Ese)&&FE(n,vB(e.doc)).then(()=>Rse(n,iNe(e._dbref,!0))).then(()=>qse(n).then(o=>{e._dbsize=o}))});class lNe extends d3{constructor(t,n){super(),this.doc=n,this.name=t,this._dbref=0,this._dbsize=0,this._destroyed=!1,this.db=null,this.synced=!1,this._db=KWe(t,o=>ZWe(o,[["updates",{autoIncrement:!0}],["custom"]])),this.whenSynced=oh(o=>this.on("synced",()=>o(this))),this._db.then(o=>{this.db=o,Wse(this,i=>FE(i,vB(n)),()=>{if(this._destroyed)return this;this.synced=!0,this.emit("synced",[this])})}),this._storeTimeout=1e3,this._storeTimeoutId=null,this._storeUpdate=(o,r)=>{if(this.db&&r!==this){const[s]=Qg(this.db,[Tse]);FE(s,o),++this._dbsize>=Ese&&(this._storeTimeoutId!==null&&clearTimeout(this._storeTimeoutId),this._storeTimeoutId=setTimeout(()=>{cNe(this,!1),this._storeTimeoutId=null},this._storeTimeout))}},n.on("update",this._storeUpdate),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}destroy(){return this._storeTimeoutId&&clearTimeout(this._storeTimeoutId),this.doc.off("update",this._storeUpdate),this.doc.off("destroy",this.destroy),this._destroyed=!0,this._db.then(t=>{t.close()})}clearData(){return this.destroy().then(()=>{YWe(this.name)})}get(t){return this._db.then(n=>{const[o]=Qg(n,[VS],"readonly");return QWe(o,t)})}set(t,n){return this._db.then(o=>{const[r]=Qg(o,[VS]);return JWe(r,n,t)})}del(t){return this._db.then(n=>{const[o]=Qg(n,[VS]);return Rse(o,t)})}}function uNe(e,t,n){const o=`${t}-${e}`,r=new lNe(o,n);return new Promise(s=>{r.on("synced",()=>{s(()=>r.destroy())})})}const dNe=1200,pNe=2500,V4=3e4,$E=e=>{if(e.shouldConnect&&e.ws===null){const t=new WebSocket(e.url),n=e.binaryType;let o=null;n&&(t.binaryType=n),e.ws=t,e.connecting=!0,e.connected=!1,t.onmessage=i=>{e.lastMessageReceived=El();const c=i.data,l=typeof c=="string"?JSON.parse(c):c;l&&l.type==="pong"&&(clearTimeout(o),o=setTimeout(s,V4/2)),e.emit("message",[l,e])};const r=i=>{e.ws!==null&&(e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:i},e])):e.unsuccessfulReconnects++,setTimeout($E,cB(cEe(e.unsuccessfulReconnects+1)*dNe,pNe),e)),clearTimeout(o)},s=()=>{e.ws===t&&e.send({type:"ping"})};t.onclose=()=>r(null),t.onerror=i=>r(i),t.onopen=()=>{e.lastMessageReceived=El(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),o=setTimeout(s,V4/2)}}};class fNe extends d3{constructor(t,{binaryType:n}={}){super(),this.url=t,this.ws=null,this.binaryType=n||null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&V4n.key===t&&this.onmessage!==null&&this.onmessage({data:gB(n.newValue||"")}),e8e(this._onChange)}postMessage(t){R1e.setItem(this.room,j1e(m8e(t)))}close(){t8e(this._onChange)}}const hNe=typeof BroadcastChannel>"u"?bNe:BroadcastChannel,RB=e=>w1(Nse,e,()=>{const t=zd(),n=new hNe(e);return n.onmessage=o=>t.forEach(r=>r(o.data,"broadcastchannel")),{bc:n,subs:t}}),mNe=(e,t)=>(RB(e).subs.add(t),t),gNe=(e,t)=>{const n=RB(e),o=n.subs.delete(t);return o&&n.subs.size===0&&(n.bc.close(),Nse.delete(e)),o},MNe=(e,t,n=null)=>{const o=RB(e);o.bc.postMessage(t),o.subs.forEach(r=>r(t,n))},zNe=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}};function gA(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var HS={exports:{}},PU;function ONe(){return PU||(PU=1,function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,o=Math.abs,r=Math.pow;return function(){function s(i,c,l){function u(f,b){if(!c[f]){if(!i[f]){var h=typeof gA=="function"&&gA;if(!b&&h)return h(f,!0);if(d)return d(f,!0);var g=new Error("Cannot find module '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}var z=c[f]={exports:{}};i[f][0].call(z.exports,function(A){var _=i[f][1][A];return u(_||A)},z,z.exports,s,i,c,l)}return c[f].exports}for(var d=typeof gA=="function"&&gA,p=0;p>16,T[E++]=255&y>>8,T[E++]=255&y;return R===2&&(y=g[M.charCodeAt(k)]<<2|g[M.charCodeAt(k+1)]>>4,T[E++]=255&y),R===1&&(y=g[M.charCodeAt(k)]<<10|g[M.charCodeAt(k+1)]<<4|g[M.charCodeAt(k+2)]>>2,T[E++]=255&y>>8,T[E++]=255&y),T}function p(M){return h[63&M>>18]+h[63&M>>12]+h[63&M>>6]+h[63&M]}function f(M,y,k){for(var S,C=[],R=y;RE?E:T+R));return S===1?(y=M[k-1],C.push(h[y>>2]+h[63&y<<4]+"==")):S===2&&(y=(M[k-2]<<8)+M[k-1],C.push(h[y>>10]+h[63&y>>4]+h[63&y<<2]+"=")),C.join("")}c.byteLength=function(M){var y=l(M),k=y[0],S=y[1];return 3*(k+S)/4-S},c.toByteArray=d,c.fromByteArray=b;for(var h=[],g=[],z=typeof Uint8Array>"u"?Array:Uint8Array,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,v=A.length;_L)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function h(L,U,ne){return b(L),0>=L||U===void 0?d(L):typeof ne=="string"?d(L).fill(U,ne):d(L).fill(U)}function g(L){return b(L),d(0>L?0:0|M(L))}function z(L,U){if((typeof U!="string"||U==="")&&(U="utf8"),!p.isEncoding(U))throw new TypeError("Unknown encoding: "+U);var ne=0|y(L,U),ve=d(ne),qe=ve.write(L,U);return qe!==ne&&(ve=ve.slice(0,qe)),ve}function A(L){for(var U=0>L.length?0:0|M(L.length),ne=d(U),ve=0;veU||L.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|L}function y(L,U){if(p.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||re(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);var ne=L.length,ve=2>>1;case"base64":return ie(L).length;default:if(qe)return ve?-1:ye(L).length;U=(""+U).toLowerCase(),qe=!0}}function k(L,U,ne){var ve=!1;if((U===void 0||0>U)&&(U=0),U>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),0>=ne)||(ne>>>=0,U>>>=0,ne<=U))return"";for(L||(L="utf8");;)switch(L){case"hex":return V(this,U,ne);case"utf8":case"utf-8":return $(this,U,ne);case"ascii":return X(this,U,ne);case"latin1":case"binary":return Z(this,U,ne);case"base64":return P(this,U,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,U,ne);default:if(ve)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),ve=!0}}function S(L,U,ne){var ve=L[U];L[U]=L[ne],L[ne]=ve}function C(L,U,ne,ve,qe){if(L.length===0)return-1;if(typeof ne=="string"?(ve=ne,ne=0):2147483647ne&&(ne=-2147483648),ne=+ne,pe(ne)&&(ne=qe?0:L.length-1),0>ne&&(ne=L.length+ne),ne>=L.length){if(qe)return-1;ne=L.length-1}else if(0>ne)if(qe)ne=0;else return-1;if(typeof U=="string"&&(U=p.from(U,ve)),p.isBuffer(U))return U.length===0?-1:R(L,U,ne,ve,qe);if(typeof U=="number")return U&=255,typeof Uint8Array.prototype.indexOf=="function"?qe?Uint8Array.prototype.indexOf.call(L,U,ne):Uint8Array.prototype.lastIndexOf.call(L,U,ne):R(L,[U],ne,ve,qe);throw new TypeError("val must be string, number or Buffer")}function R(L,U,ne,ve,qe){function Pe(fe,Re){return rt===1?fe[Re]:fe.readUInt16BE(Re*rt)}var rt=1,qt=L.length,wt=U.length;if(ve!==void 0&&(ve=(ve+"").toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(2>L.length||2>U.length)return-1;rt=2,qt/=2,wt/=2,ne/=2}var Bt;if(qe){var ae=-1;for(Bt=ne;Btqt&&(ne=qt-wt),Bt=ne;0<=Bt;Bt--){for(var H=!0,Y=0;Yqe&&(ve=qe)):ve=qe;var Pe=U.length;ve>Pe/2&&(ve=Pe/2);for(var rt,qt=0;qtPe&&(rt=Pe):qt===2?(wt=L[qe+1],(192&wt)==128&&(H=(31&Pe)<<6|63&wt,127H||57343H&&(rt=H)))}rt===null?(rt=65533,qt=1):65535>>10),rt=56320|1023&rt),ve.push(rt),qe+=qt}return F(ve)}function F(L){var U=L.length;if(U<=4096)return l.apply(String,L);for(var ne="",ve=0;veU)&&(U=0),(!ne||0>ne||ne>ve)&&(ne=ve);for(var qe="",Pe=U;PeL)throw new RangeError("offset is not uint");if(L+U>ne)throw new RangeError("Trying to access beyond buffer length")}function J(L,U,ne,ve,qe,Pe){if(!p.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(U>qe||UL.length)throw new RangeError("Index out of range")}function ue(L,U,ne,ve){if(ne+ve>L.length)throw new RangeError("Index out of range");if(0>ne)throw new RangeError("Index out of range")}function ce(L,U,ne,ve,qe){return U=+U,ne>>>=0,qe||ue(L,U,ne,4),Se.write(L,U,ne,ve,23,4),ne+4}function me(L,U,ne,ve,qe){return U=+U,ne>>>=0,qe||ue(L,U,ne,8),Se.write(L,U,ne,ve,52,8),ne+8}function de(L){if(L=L.split("=")[0],L=L.trim().replace(se,""),2>L.length)return"";for(;L.length%4!=0;)L+="=";return L}function Ae(L){return 16>L?"0"+L.toString(16):L.toString(16)}function ye(L,U){U=U||1/0;for(var ne,ve=L.length,qe=null,Pe=[],rt=0;rtne){if(!qe){if(56319ne){-1<(U-=3)&&Pe.push(239,191,189),qe=ne;continue}ne=(qe-55296<<10|ne-56320)+65536}else qe&&-1<(U-=3)&&Pe.push(239,191,189);if(qe=null,128>ne){if(0>(U-=1))break;Pe.push(ne)}else if(2048>ne){if(0>(U-=2))break;Pe.push(192|ne>>6,128|63&ne)}else if(65536>ne){if(0>(U-=3))break;Pe.push(224|ne>>12,128|63&ne>>6,128|63&ne)}else if(1114112>ne){if(0>(U-=4))break;Pe.push(240|ne>>18,128|63&ne>>12,128|63&ne>>6,128|63&ne)}else throw new Error("Invalid code point")}return Pe}function Ne(L){for(var U=[],ne=0;ne(U-=2));++rt)ne=L.charCodeAt(rt),ve=ne>>8,qe=ne%256,Pe.push(qe),Pe.push(ve);return Pe}function ie(L){return ke.toByteArray(de(L))}function we(L,U,ne,ve){for(var qe=0;qe=U.length||qe>=L.length);++qe)U[qe+ne]=L[qe];return qe}function re(L,U){return L instanceof U||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===U.name}function pe(L){return L!==L}var ke=s("base64-js"),Se=s("ieee754");c.Buffer=p,c.SlowBuffer=function(L){return+L!=L&&(L=0),p.alloc(+L)},c.INSPECT_MAX_BYTES=50,c.kMaxLength=2147483647,p.TYPED_ARRAY_SUPPORT=function(){try{var L=new Uint8Array(1);return L.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},L.foo()===42}catch{return!1}}(),p.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){return p.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){return p.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),p.poolSize=8192,p.from=function(L,U,ne){return f(L,U,ne)},p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,p.alloc=function(L,U,ne){return h(L,U,ne)},p.allocUnsafe=function(L){return g(L)},p.allocUnsafeSlow=function(L){return g(L)},p.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==p.prototype},p.compare=function(L,U){if(re(L,Uint8Array)&&(L=p.from(L,L.offset,L.byteLength)),re(U,Uint8Array)&&(U=p.from(U,U.offset,U.byteLength)),!p.isBuffer(L)||!p.isBuffer(U))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===U)return 0;for(var ne=L.length,ve=U.length,qe=0,Pe=u(ne,ve);qeU&&(L+=" ... "),""},p.prototype.compare=function(L,U,ne,ve,qe){if(re(L,Uint8Array)&&(L=p.from(L,L.offset,L.byteLength)),!p.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if(U===void 0&&(U=0),ne===void 0&&(ne=L?L.length:0),ve===void 0&&(ve=0),qe===void 0&&(qe=this.length),0>U||ne>L.length||0>ve||qe>this.length)throw new RangeError("out of range index");if(ve>=qe&&U>=ne)return 0;if(ve>=qe)return-1;if(U>=ne)return 1;if(U>>>=0,ne>>>=0,ve>>>=0,qe>>>=0,this===L)return 0;for(var Pe=qe-ve,rt=ne-U,qt=u(Pe,rt),wt=this.slice(ve,qe),Bt=L.slice(U,ne),ae=0;ae>>=0,isFinite(ne)?(ne>>>=0,ve===void 0&&(ve="utf8")):(ve=ne,ne=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var qe=this.length-U;if((ne===void 0||ne>qe)&&(ne=qe),0ne||0>U)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");ve||(ve="utf8");for(var Pe=!1;;)switch(ve){case"hex":return T(this,L,U,ne);case"utf8":case"utf-8":return E(this,L,U,ne);case"ascii":return B(this,L,U,ne);case"latin1":case"binary":return N(this,L,U,ne);case"base64":return j(this,L,U,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,L,U,ne);default:if(Pe)throw new TypeError("Unknown encoding: "+ve);ve=(""+ve).toLowerCase(),Pe=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},p.prototype.slice=function(L,U){var ne=this.length;L=~~L,U=U===void 0?ne:~~U,0>L?(L+=ne,0>L&&(L=0)):L>ne&&(L=ne),0>U?(U+=ne,0>U&&(U=0)):U>ne&&(U=ne),U>>=0,U>>>=0,ne||te(L,U,this.length);for(var ve=this[L],qe=1,Pe=0;++Pe>>=0,U>>>=0,ne||te(L,U,this.length);for(var ve=this[L+--U],qe=1;0>>=0,U||te(L,1,this.length),this[L]},p.prototype.readUInt16LE=function(L,U){return L>>>=0,U||te(L,2,this.length),this[L]|this[L+1]<<8},p.prototype.readUInt16BE=function(L,U){return L>>>=0,U||te(L,2,this.length),this[L]<<8|this[L+1]},p.prototype.readUInt32LE=function(L,U){return L>>>=0,U||te(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+16777216*this[L+3]},p.prototype.readUInt32BE=function(L,U){return L>>>=0,U||te(L,4,this.length),16777216*this[L]+(this[L+1]<<16|this[L+2]<<8|this[L+3])},p.prototype.readIntLE=function(L,U,ne){L>>>=0,U>>>=0,ne||te(L,U,this.length);for(var ve=this[L],qe=1,Pe=0;++Pe=qe&&(ve-=r(2,8*U)),ve},p.prototype.readIntBE=function(L,U,ne){L>>>=0,U>>>=0,ne||te(L,U,this.length);for(var ve=U,qe=1,Pe=this[L+--ve];0=qe&&(Pe-=r(2,8*U)),Pe},p.prototype.readInt8=function(L,U){return L>>>=0,U||te(L,1,this.length),128&this[L]?-1*(255-this[L]+1):this[L]},p.prototype.readInt16LE=function(L,U){L>>>=0,U||te(L,2,this.length);var ne=this[L]|this[L+1]<<8;return 32768&ne?4294901760|ne:ne},p.prototype.readInt16BE=function(L,U){L>>>=0,U||te(L,2,this.length);var ne=this[L+1]|this[L]<<8;return 32768&ne?4294901760|ne:ne},p.prototype.readInt32LE=function(L,U){return L>>>=0,U||te(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},p.prototype.readInt32BE=function(L,U){return L>>>=0,U||te(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},p.prototype.readFloatLE=function(L,U){return L>>>=0,U||te(L,4,this.length),Se.read(this,L,!0,23,4)},p.prototype.readFloatBE=function(L,U){return L>>>=0,U||te(L,4,this.length),Se.read(this,L,!1,23,4)},p.prototype.readDoubleLE=function(L,U){return L>>>=0,U||te(L,8,this.length),Se.read(this,L,!0,52,8)},p.prototype.readDoubleBE=function(L,U){return L>>>=0,U||te(L,8,this.length),Se.read(this,L,!1,52,8)},p.prototype.writeUIntLE=function(L,U,ne,ve){if(L=+L,U>>>=0,ne>>>=0,!ve){var qe=r(2,8*ne)-1;J(this,L,U,ne,qe,0)}var Pe=1,rt=0;for(this[U]=255&L;++rt>>=0,ne>>>=0,!ve){var qe=r(2,8*ne)-1;J(this,L,U,ne,qe,0)}var Pe=ne-1,rt=1;for(this[U+Pe]=255&L;0<=--Pe&&(rt*=256);)this[U+Pe]=255&L/rt;return U+ne},p.prototype.writeUInt8=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,1,255,0),this[U]=255&L,U+1},p.prototype.writeUInt16LE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,2,65535,0),this[U]=255&L,this[U+1]=L>>>8,U+2},p.prototype.writeUInt16BE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,2,65535,0),this[U]=L>>>8,this[U+1]=255&L,U+2},p.prototype.writeUInt32LE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,4,4294967295,0),this[U+3]=L>>>24,this[U+2]=L>>>16,this[U+1]=L>>>8,this[U]=255&L,U+4},p.prototype.writeUInt32BE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,4,4294967295,0),this[U]=L>>>24,this[U+1]=L>>>16,this[U+2]=L>>>8,this[U+3]=255&L,U+4},p.prototype.writeIntLE=function(L,U,ne,ve){if(L=+L,U>>>=0,!ve){var qe=r(2,8*ne-1);J(this,L,U,ne,qe-1,-qe)}var Pe=0,rt=1,qt=0;for(this[U]=255&L;++PeL&&qt===0&&this[U+Pe-1]!==0&&(qt=1),this[U+Pe]=255&(L/rt>>0)-qt;return U+ne},p.prototype.writeIntBE=function(L,U,ne,ve){if(L=+L,U>>>=0,!ve){var qe=r(2,8*ne-1);J(this,L,U,ne,qe-1,-qe)}var Pe=ne-1,rt=1,qt=0;for(this[U+Pe]=255&L;0<=--Pe&&(rt*=256);)0>L&&qt===0&&this[U+Pe+1]!==0&&(qt=1),this[U+Pe]=255&(L/rt>>0)-qt;return U+ne},p.prototype.writeInt8=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,1,127,-128),0>L&&(L=255+L+1),this[U]=255&L,U+1},p.prototype.writeInt16LE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,2,32767,-32768),this[U]=255&L,this[U+1]=L>>>8,U+2},p.prototype.writeInt16BE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,2,32767,-32768),this[U]=L>>>8,this[U+1]=255&L,U+2},p.prototype.writeInt32LE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,4,2147483647,-2147483648),this[U]=255&L,this[U+1]=L>>>8,this[U+2]=L>>>16,this[U+3]=L>>>24,U+4},p.prototype.writeInt32BE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,4,2147483647,-2147483648),0>L&&(L=4294967295+L+1),this[U]=L>>>24,this[U+1]=L>>>16,this[U+2]=L>>>8,this[U+3]=255&L,U+4},p.prototype.writeFloatLE=function(L,U,ne){return ce(this,L,U,!0,ne)},p.prototype.writeFloatBE=function(L,U,ne){return ce(this,L,U,!1,ne)},p.prototype.writeDoubleLE=function(L,U,ne){return me(this,L,U,!0,ne)},p.prototype.writeDoubleBE=function(L,U,ne){return me(this,L,U,!1,ne)},p.prototype.copy=function(L,U,ne,ve){if(!p.isBuffer(L))throw new TypeError("argument should be a Buffer");if(ne||(ne=0),ve||ve===0||(ve=this.length),U>=L.length&&(U=L.length),U||(U=0),0U)throw new RangeError("targetStart out of bounds");if(0>ne||ne>=this.length)throw new RangeError("Index out of range");if(0>ve)throw new RangeError("sourceEnd out of bounds");ve>this.length&&(ve=this.length),L.length-Uqe||ve==="latin1")&&(L=qe)}}else typeof L=="number"&&(L&=255);if(0>U||this.length>>=0,ne=ne===void 0?this.length:ne>>>0,L||(L=0);var Pe;if(typeof L=="number")for(Pe=U;Pe{g==="%%"||(b++,g==="%c"&&(h=b))}),p.splice(h,0,f)},c.save=function(p){try{p?c.storage.setItem("debug",p):c.storage.removeItem("debug")}catch{}},c.load=u,c.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch{}}(),c.destroy=(()=>{let p=!1;return()=>{p||(p=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),c.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],c.log=console.debug||console.log||(()=>{}),i.exports=s("./common")(c);const{formatters:d}=i.exports;d.j=function(p){try{return JSON.stringify(p)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,s("_process"))},{"./common":5,_process:12}],5:[function(s,i){i.exports=function(c){function l(p){function f(...g){if(!f.enabled)return;const z=f,A=+new Date,_=A-(b||A);z.diff=_,z.prev=b,z.curr=A,b=A,g[0]=l.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let v=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(y,k)=>{if(y==="%%")return"%";v++;const S=l.formatters[k];if(typeof S=="function"){const C=g[v];y=S.call(z,C),g.splice(v,1),v--}return y}),l.formatArgs.call(z,g),(z.log||l.log).apply(z,g)}let b,h=null;return f.namespace=p,f.useColors=l.useColors(),f.color=l.selectColor(p),f.extend=u,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(p):h,set:g=>{h=g}}),typeof l.init=="function"&&l.init(f),f}function u(p,f){const b=l(this.namespace+(typeof f>"u"?":":f)+p);return b.log=this.log,b}function d(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(p){return p instanceof Error?p.stack||p.message:p},l.disable=function(){const p=[...l.names.map(d),...l.skips.map(d).map(f=>"-"+f)].join(",");return l.enable(""),p},l.enable=function(p){l.save(p),l.names=[],l.skips=[];let f;const b=(typeof p=="string"?p:"").split(/[\s,]+/),h=b.length;for(f=0;f{l[p]=c[p]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(p){let f=0;for(let b=0;bj&&!P.warned){P.warned=!0;var $=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+(E+" listeners added. Use emitter.setMaxListeners() to increase limit"));$.name="MaxListenersExceededWarning",$.emitter=T,$.type=E,$.count=P.length,c($)}return T}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(T,E,B){var N={fired:!1,wrapFn:void 0,target:T,type:E,listener:B},j=f.bind(N);return j.listener=B,N.wrapFn=j,j}function h(T,E,B){var N=T._events;if(N===void 0)return[];var j=N[E];return j===void 0?[]:typeof j=="function"?B?[j.listener||j]:[j]:B?_(j):z(j,j.length)}function g(T){var E=this._events;if(E!==void 0){var B=E[T];if(typeof B=="function")return 1;if(B!==void 0)return B.length}return 0}function z(T,E){for(var B=Array(E),N=0;NT||C(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");R=T}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(T){if(typeof T!="number"||0>T||C(T))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+T+".");return this._maxListeners=T,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(T){for(var E=[],B=1;Bj)return this;j===0?B.shift():A(B,j),B.length===1&&(N[T]=B[0]),N.removeListener!==void 0&&this.emit("removeListener",T,P||E)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(T){var E,B,N;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[T]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete B[T]),this;if(arguments.length===0){var j,I=Object.keys(B);for(N=0;N"u")return null;var c={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return c.RTCPeerConnection?c:null}},{}],9:[function(s,i,c){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */c.read=function(l,u,d,p,f){var b,h,g=8*f-p-1,z=(1<>1,_=-7,v=d?f-1:0,M=d?-1:1,y=l[u+v];for(v+=M,b=y&(1<<-_)-1,y>>=-_,_+=g;0<_;b=256*b+l[u+v],v+=M,_-=8);for(h=b&(1<<-_)-1,b>>=-_,_+=p;0<_;h=256*h+l[u+v],v+=M,_-=8);if(b===0)b=1-A;else{if(b===z)return h?NaN:(y?-1:1)*(1/0);h+=r(2,p),b-=A}return(y?-1:1)*h*r(2,b-p)},c.write=function(l,u,d,p,f,b){var h,g,z,A=Math.LN2,_=Math.log,v=8*b-f-1,M=(1<>1,k=f===23?r(2,-24)-r(2,-77):0,S=p?0:b-1,C=p?1:-1,R=0>u||u===0&&0>1/u?1:0;for(u=o(u),isNaN(u)||u===1/0?(g=isNaN(u)?1:0,h=M):(h=n(_(u)/A),1>u*(z=r(2,-h))&&(h--,z*=2),u+=1<=h+y?k/z:k*r(2,1-y),2<=u*z&&(h++,z/=2),h+y>=M?(g=0,h=M):1<=h+y?(g=(u*z-1)*r(2,f),h+=y):(g=u*r(2,y-1)*r(2,f),h=0));8<=f;l[d+S]=255&g,S+=C,g/=256,f-=8);for(h=h<=1.5*h?"s":"")}i.exports=function(f,b){b=b||{};var h=typeof f;if(h=="string"&&0 */let l;i.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?c:window):u=>(l||(l=Promise.resolve())).then(u).catch(d=>setTimeout(()=>{throw d},0))}).call(this)}).call(this,typeof p1>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{}],14:[function(s,i){(function(c,l){(function(){var u=s("safe-buffer").Buffer,d=l.crypto||l.msCrypto;i.exports=d&&d.getRandomValues?function(p,f){if(p>4294967295)throw new RangeError("requested too many random bytes");var b=u.allocUnsafe(p);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{_process:12,"safe-buffer":30}],15:[function(s,i){function c(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g}function l(h,g,z){function A(v,M,y){return typeof g=="string"?g:g(v,M,y)}z||(z=Error);var _=function(v){function M(y,k,S){return v.call(this,A(y,k,S))||this}return c(M,v),M}(z);_.prototype.name=z.name,_.prototype.code=h,b[h]=_}function u(h,g){if(Array.isArray(h)){var z=h.length;return h=h.map(function(A){return A+""}),2h.length)&&(z=h.length),h.substring(z-g.length,z)===g}function f(h,g,z){return typeof z!="number"&&(z=0),!(z+g.length>h.length)&&h.indexOf(g,z)!==-1}var b={};l("ERR_INVALID_OPT_VALUE",function(h,g){return'The value "'+g+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,g,z){var A;typeof g=="string"&&d(g,"not ")?(A="must not be",g=g.replace(/^not /,"")):A="must be";var _;if(p(h," argument"))_="The ".concat(h," ").concat(A," ").concat(u(g,"type"));else{var v=f(h,".")?"property":"argument";_='The "'.concat(h,'" ').concat(v," ").concat(A," ").concat(u(g,"type"))}return _+=". Received type ".concat(typeof z),_},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=b},{}],16:[function(s,i){(function(c){(function(){function l(A){return this instanceof l?(f.call(this,A),b.call(this,A),this.allowHalfOpen=!0,void(A&&(A.readable===!1&&(this.readable=!1),A.writable===!1&&(this.writable=!1),A.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u))))):new l(A)}function u(){this._writableState.ended||c.nextTick(d,this)}function d(A){A.end()}var p=Object.keys||function(A){var _=[];for(var v in A)_.push(v);return _};i.exports=l;var f=s("./_stream_readable"),b=s("./_stream_writable");s("inherits")(l,f);for(var h,g=p(b.prototype),z=0;z>>1,se|=se>>>2,se|=se>>>4,se|=se>>>8,se|=se>>>16,se++),se}function _(se,L){return 0>=se||L.length===0&&L.ended?0:L.objectMode?1:se===se?(se>L.highWaterMark&&(L.highWaterMark=A(se)),se<=L.length?se:L.ended?L.length:(L.needReadable=!0,0)):L.flowing&&L.length?L.buffer.head.data.length:L.length}function v(se,L){if(X("onEofChunk"),!L.ended){if(L.decoder){var U=L.decoder.end();U&&U.length&&(L.buffer.push(U),L.length+=L.objectMode?1:U.length)}L.ended=!0,L.sync?M(se):(L.needReadable=!1,!L.emittedReadable&&(L.emittedReadable=!0,y(se)))}}function M(se){var L=se._readableState;X("emitReadable",L.needReadable,L.emittedReadable),L.needReadable=!1,L.emittedReadable||(X("emitReadable",L.flowing),L.emittedReadable=!0,c.nextTick(y,se))}function y(se){var L=se._readableState;X("emitReadable_",L.destroyed,L.length,L.ended),!L.destroyed&&(L.length||L.ended)&&(se.emit("readable"),L.emittedReadable=!1),L.needReadable=!L.flowing&&!L.ended&&L.length<=L.highWaterMark,N(se)}function k(se,L){L.readingMore||(L.readingMore=!0,c.nextTick(S,se,L))}function S(se,L){for(;!L.reading&&!L.ended&&(L.length=L.length?(U=L.decoder?L.buffer.join(""):L.buffer.length===1?L.buffer.first():L.buffer.concat(L.length),L.buffer.clear()):U=L.buffer.consume(se,L.decoder),U}function I(se){var L=se._readableState;X("endReadable",L.endEmitted),L.endEmitted||(L.ended=!0,c.nextTick(P,L,se))}function P(se,L){if(X("endReadableNT",se.endEmitted,se.length),!se.endEmitted&&se.length===0&&(se.endEmitted=!0,L.readable=!1,L.emit("end"),se.autoDestroy)){var U=L._writableState;(!U||U.autoDestroy&&U.finished)&&L.destroy()}}function $(se,L){for(var U=0,ne=se.length;U=L.highWaterMark)||L.ended))return X("read: emitReadable",L.length,L.ended),L.length===0&&L.ended?I(this):M(this),null;if(se=_(se,L),se===0&&L.ended)return L.length===0&&I(this),null;var ne=L.needReadable;X("need readable",ne),(L.length===0||L.length-se"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(s,i){function c(A,_){var v=this._transformState;v.transforming=!1;var M=v.writecb;if(M===null)return this.emit("error",new b);v.writechunk=null,v.writecb=null,_!=null&&this.push(_),M(A);var y=this._readableState;y.reading=!1,(y.needReadable||y.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(s,i){(function(c){(function(){function l(C,R,T){return R in C?Object.defineProperty(C,R,{value:T,enumerable:!0,configurable:!0,writable:!0}):C[R]=T,C}function u(C,R){return{value:C,done:R}}function d(C){var R=C[g];if(R!==null){var T=C[y].read();T!==null&&(C[v]=null,C[g]=null,C[z]=null,R(u(T,!1)))}}function p(C){c.nextTick(d,C)}function f(C,R){return function(T,E){C.then(function(){return R[_]?void T(u(void 0,!0)):void R[M](T,E)},E)}}var b,h=s("./end-of-stream"),g=Symbol("lastResolve"),z=Symbol("lastReject"),A=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),M=Symbol("handlePromise"),y=Symbol("stream"),k=Object.getPrototypeOf(function(){}),S=Object.setPrototypeOf((b={get stream(){return this[y]},next:function(){var C=this,R=this[A];if(R!==null)return Promise.reject(R);if(this[_])return Promise.resolve(u(void 0,!0));if(this[y].destroyed)return new Promise(function(N,j){c.nextTick(function(){C[A]?j(C[A]):N(u(void 0,!0))})});var T,E=this[v];if(E)T=new Promise(f(E,this));else{var B=this[y].read();if(B!==null)return Promise.resolve(u(B,!1));T=new Promise(this[M])}return this[v]=T,T}},l(b,Symbol.asyncIterator,function(){return this}),l(b,"return",function(){var C=this;return new Promise(function(R,T){C[y].destroy(null,function(E){return E?void T(E):void R(u(void 0,!0))})})}),b),k);i.exports=function(C){var R,T=Object.create(S,(R={},l(R,y,{value:C,writable:!0}),l(R,g,{value:null,writable:!0}),l(R,z,{value:null,writable:!0}),l(R,A,{value:null,writable:!0}),l(R,_,{value:C._readableState.endEmitted,writable:!0}),l(R,M,{value:function(E,B){var N=T[y].read();N?(T[v]=null,T[g]=null,T[z]=null,E(u(N,!1))):(T[g]=E,T[z]=B)},writable:!0}),R));return T[v]=null,h(C,function(E){if(E&&E.code!=="ERR_STREAM_PREMATURE_CLOSE"){var B=T[z];return B!==null&&(T[v]=null,T[g]=null,T[z]=null,B(E)),void(T[A]=E)}var N=T[g];N!==null&&(T[v]=null,T[g]=null,T[z]=null,N(u(void 0,!0))),T[_]=!0}),C.on("readable",p.bind(null,T)),T}}).call(this)}).call(this,s("_process"))},{"./end-of-stream":24,_process:12}],22:[function(s,i){function c(v,M){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(v);M&&(k=k.filter(function(S){return Object.getOwnPropertyDescriptor(v,S).enumerable})),y.push.apply(y,k)}return y}function l(v){for(var M,y=1;y>>0),k=this.head,S=0;k;)b(k.data,y,S),S+=k.data.length,k=k.next;return y}},{key:"consume",value:function(M,y){var k;return MC.length?C.length:M;if(S+=R===C.length?C:C.slice(0,M),M-=R,M===0){R===C.length?(++k,this.head=y.next?y.next:this.tail=null):(this.head=y,y.data=C.slice(R));break}++k}return this.length-=k,S}},{key:"_getBuffer",value:function(M){var y=g.allocUnsafe(M),k=this.head,S=1;for(k.data.copy(y),M-=k.data.length;k=k.next;){var C=k.data,R=M>C.length?C.length:M;if(C.copy(y,y.length-M,0,R),M-=R,M===0){R===C.length?(++S,this.head=k.next?k.next:this.tail=null):(this.head=k,k.data=C.slice(R));break}++S}return this.length-=S,y}},{key:_,value:function(M,y){return A(this,l({},y,{depth:0,customInspect:!1}))}}]),v}()},{buffer:3,util:2}],23:[function(s,i){(function(c){(function(){function l(p,f){d(p,f),u(p)}function u(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit("close")}function d(p,f){p.emit("error",f)}i.exports={destroy:function(p,f){var b=this,h=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;return h||g?(f?f(p):p&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,c.nextTick(d,this,p)):c.nextTick(d,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(z){!f&&z?b._writableState?b._writableState.errorEmitted?c.nextTick(u,b):(b._writableState.errorEmitted=!0,c.nextTick(l,b,z)):c.nextTick(l,b,z):f?(c.nextTick(u,b),f(z)):c.nextTick(u,b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(p,f){var b=p._readableState,h=p._writableState;b&&b.autoDestroy||h&&h.autoDestroy?p.destroy(f):p.emit("error",f)}}}).call(this)}).call(this,s("_process"))},{_process:12}],24:[function(s,i){function c(f){var b=!1;return function(){if(!b){b=!0;for(var h=arguments.length,g=Array(h),z=0;zv.length)throw new z("streams");var k,S=v.map(function(C,R){var T=Rb){var h=f?p:"highWaterMark";throw new l(h,b)}return n(b)}return u.objectMode?16:16384}}},{"../../../errors":15}],28:[function(s,i){i.exports=s("events").EventEmitter},{events:7}],29:[function(s,i,c){c=i.exports=s("./lib/_stream_readable.js"),c.Stream=c,c.Readable=c,c.Writable=s("./lib/_stream_writable.js"),c.Duplex=s("./lib/_stream_duplex.js"),c.Transform=s("./lib/_stream_transform.js"),c.PassThrough=s("./lib/_stream_passthrough.js"),c.finished=s("./lib/internal/streams/end-of-stream.js"),c.pipeline=s("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(s,i,c){function l(f,b){for(var h in f)b[h]=f[h]}function u(f,b,h){return p(f,b,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var d=s("buffer"),p=d.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?i.exports=d:(l(d,c),c.Buffer=u),u.prototype=Object.create(p.prototype),l(p,u),u.from=function(f,b,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return p(f,b,h)},u.alloc=function(f,b,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var g=p(f);return b===void 0?g.fill(0):typeof h=="string"?g.fill(b,h):g.fill(b),g},u.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return p(f)},u.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(f)}},{buffer:3}],31:[function(s,i,c){function l(S){if(!S)return"utf8";for(var C;;)switch(S){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return S;default:if(C)return;S=(""+S).toLowerCase(),C=!0}}function u(S){var C=l(S);if(typeof C!="string"&&(y.isEncoding===k||!k(S)))throw new Error("Unknown encoding: "+S);return C||S}function d(S){this.encoding=u(S);var C;switch(this.encoding){case"utf16le":this.text=g,this.end=z,C=4;break;case"utf8":this.fillLast=h,C=4;break;case"base64":this.text=A,this.end=_,C=3;break;default:return this.write=v,void(this.end=M)}this.lastNeed=0,this.lastTotal=0,this.lastChar=y.allocUnsafe(C)}function p(S){return 127>=S?0:S>>5==6?2:S>>4==14?3:S>>3==30?4:S>>6==2?-1:-2}function f(S,C,R){var T=C.length-1;if(T=T)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1],R.slice(0,-1)}return R}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=S[S.length-1],S.toString("utf16le",C,S.length-1)}function z(S){var C=S&&S.length?this.write(S):"";if(this.lastNeed){var R=this.lastTotal-this.lastNeed;return C+this.lastChar.toString("utf16le",0,R)}return C}function A(S,C){var R=(S.length-C)%3;return R==0?S.toString("base64",C):(this.lastNeed=3-R,this.lastTotal=3,R==1?this.lastChar[0]=S[S.length-1]:(this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1]),S.toString("base64",C,S.length-R))}function _(S){var C=S&&S.length?this.write(S):"";return this.lastNeed?C+this.lastChar.toString("base64",0,3-this.lastNeed):C}function v(S){return S.toString(this.encoding)}function M(S){return S&&S.length?this.write(S):""}var y=s("safe-buffer").Buffer,k=y.isEncoding||function(S){switch(S=""+S,S&&S.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};c.StringDecoder=d,d.prototype.write=function(S){if(S.length===0)return"";var C,R;if(this.lastNeed){if(C=this.fillLast(S),C===void 0)return"";R=this.lastNeed,this.lastNeed=0}else R=0;return R"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{}],"/":[function(s,i){function c(_){return _.replace(/a=ice-options:trickle\s\n/g,"")}function l(_){console.warn(_)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const u=s("debug")("simple-peer"),d=s("get-browser-rtc"),p=s("randombytes"),f=s("readable-stream"),b=s("queue-microtask"),h=s("err-code"),{Buffer:g}=s("buffer"),z=65536;class A extends f.Duplex{constructor(v){if(v=Object.assign({allowHalfOpen:!1},v),super(v),this._id=p(4).toString("hex").slice(0,7),this._debug("new peer %o",v),this.channelName=v.initiator?v.channelName||p(20).toString("hex"):null,this.initiator=v.initiator||!1,this.channelConfig=v.channelConfig||A.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},A.config,v.config),this.offerOptions=v.offerOptions||{},this.answerOptions=v.answerOptions||{},this.sdpTransform=v.sdpTransform||(M=>M),this.streams=v.streams||(v.stream?[v.stream]:[]),this.trickle=v.trickle===void 0||v.trickle,this.allowHalfTrickle=v.allowHalfTrickle!==void 0&&v.allowHalfTrickle,this.iceCompleteTimeout=v.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=v.wrtc&&typeof v.wrtc=="object"?v.wrtc:d(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(M){return void this.destroy(h(M,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=M=>{this._onIceCandidate(M)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(M=>{this.destroy(h(M,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=M=>{this._setupData(M)},this.streams&&this.streams.forEach(M=>{this.addStream(M)}),this._pc.ontrack=M=>{this._onTrack(M)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof v=="string")try{v=JSON.parse(v)}catch{v={}}this._debug("signal()"),v.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),v.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(v.transceiverRequest.kind,v.transceiverRequest.init)),v.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(v.candidate):this._pendingCandidates.push(v.candidate)),v.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(v)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(M=>{this._addIceCandidate(M)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(M=>{this.destroy(h(M,"ERR_SET_REMOTE_DESCRIPTION"))}),v.sdp||v.candidate||v.renegotiate||v.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(v){const M=new this._wrtc.RTCIceCandidate(v);this._pc.addIceCandidate(M).catch(y=>{!M.address||M.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(y,"ERR_ADD_ICE_CANDIDATE"))})}send(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(v)}}addTransceiver(v,M){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(v,M),this._needsNegotiation()}catch(y){this.destroy(h(y,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:v,init:M}})}}addStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),v.getTracks().forEach(M=>{this.addTrack(M,v)})}}addTrack(v,M){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const y=this._senderMap.get(v)||new Map;let k=y.get(M);if(!k)k=this._pc.addTrack(v,M),y.set(M,k),this._senderMap.set(v,y),this._needsNegotiation();else throw k.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(v,M,y){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const k=this._senderMap.get(v),S=k?k.get(y):null;if(!S)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");M&&this._senderMap.set(M,k),S.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):S.replaceTrack(M)}removeTrack(v,M){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const y=this._senderMap.get(v),k=y?y.get(M):null;if(!k)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{k.removed=!0,this._pc.removeTrack(k)}catch(S){S.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(k):this.destroy(h(S,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),v.getTracks().forEach(M=>{this.removeTrack(M,v)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,b(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(v){this._destroy(v,()=>{})}_destroy(v,M){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",v&&(v.message||v)),b(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",v&&(v.message||v)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,v&&this.emit("error",v),this.emit("close"),M()}))}_setupData(v){if(!v.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=v.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=z),this.channelName=this._channel.label,this._channel.onmessage=y=>{this._onChannelMessage(y)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=y=>{const k=y.error instanceof Error?y.error:new Error(`Datachannel error: ${y.message} ${y.filename}:${y.lineno}:${y.colno}`);this.destroy(h(k,"ERR_DATA_CHANNEL"))};let M=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(M&&this._onChannelClose(),M=!0):M=!1},5e3)}_read(){}_write(v,M,y){if(this.destroyed)return y(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(v)}catch(k){return this.destroy(h(k,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>z?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=y):y(null)}else this._debug("write before connect"),this._chunk=v,this._cb=y}_onFinish(){if(!this.destroyed){const v=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?v():this.once("connect",v)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const M=()=>{if(!this.destroyed){const y=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:y.type,sdp:y.sdp})}};this._pc.setLocalDescription(v).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?M():this.once("_iceComplete",M))}).catch(y=>{this.destroy(h(y,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(v=>{v.mid||!v.sender.track||v.requested||(v.requested=!0,this.addTransceiver(v.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const M=()=>{if(!this.destroyed){const y=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:y.type,sdp:y.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(v).then(()=>{this.destroyed||(this.trickle||this._iceComplete?M():this.once("_iceComplete",M))}).catch(y=>{this.destroy(h(y,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const v=this._pc.iceConnectionState,M=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",v,M),this.emit("iceStateChange",v,M),(v==="connected"||v==="completed")&&(this._pcReady=!0,this._maybeReady()),v==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),v==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(v){const M=y=>(Object.prototype.toString.call(y.values)==="[object Array]"&&y.values.forEach(k=>{Object.assign(y,k)}),y);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(y=>{const k=[];y.forEach(S=>{k.push(M(S))}),v(null,k)},y=>v(y)):0{if(this.destroyed)return;const k=[];y.result().forEach(S=>{const C={};S.names().forEach(R=>{C[R]=S.stat(R)}),C.id=S.id,C.type=S.type,C.timestamp=S.timestamp,k.push(M(C))}),v(null,k)},y=>v(y)):v(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const v=()=>{this.destroyed||this.getStats((M,y)=>{if(this.destroyed)return;M&&(y=[]);const k={},S={},C={};let R=!1;y.forEach(E=>{(E.type==="remotecandidate"||E.type==="remote-candidate")&&(k[E.id]=E),(E.type==="localcandidate"||E.type==="local-candidate")&&(S[E.id]=E),(E.type==="candidatepair"||E.type==="candidate-pair")&&(C[E.id]=E)});const T=E=>{R=!0;let B=S[E.localCandidateId];B&&(B.ip||B.address)?(this.localAddress=B.ip||B.address,this.localPort=+B.port):B&&B.ipAddress?(this.localAddress=B.ipAddress,this.localPort=+B.portNumber):typeof E.googLocalAddress=="string"&&(B=E.googLocalAddress.split(":"),this.localAddress=B[0],this.localPort=+B[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let N=k[E.remoteCandidateId];N&&(N.ip||N.address)?(this.remoteAddress=N.ip||N.address,this.remotePort=+N.port):N&&N.ipAddress?(this.remoteAddress=N.ipAddress,this.remotePort=+N.portNumber):typeof E.googRemoteAddress=="string"&&(N=E.googRemoteAddress.split(":"),this.remoteAddress=N[0],this.remotePort=+N[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(y.forEach(E=>{E.type==="transport"&&E.selectedCandidatePairId&&T(C[E.selectedCandidatePairId]),(E.type==="googCandidatePair"&&E.googActiveConnection==="true"||(E.type==="candidatepair"||E.type==="candidate-pair")&&E.selected)&&T(E)}),!R&&(!Object.keys(C).length||Object.keys(S).length))return void setTimeout(v,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(B){return this.destroy(h(B,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const E=this._cb;this._cb=null,E(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};v()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>z)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(v=>{this._pc.removeTrack(v),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(v){this.destroyed||(v.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:v.candidate.candidate,sdpMLineIndex:v.candidate.sdpMLineIndex,sdpMid:v.candidate.sdpMid}}):!v.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),v.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(v){if(this.destroyed)return;let M=v.data;M instanceof ArrayBuffer&&(M=g.from(M)),this.push(M)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const v=this._cb;this._cb=null,v(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(v){this.destroyed||v.streams.forEach(M=>{this._debug("on track"),this.emit("track",v.track,M),this._remoteTracks.push({track:v.track,stream:M}),this._remoteStreams.some(y=>y.id===M.id)||(this._remoteStreams.push(M),b(()=>{this._debug("on stream"),this.emit("stream",M)}))})}_debug(){const v=[].slice.call(arguments);v[0]="["+this._id+"] "+v[0],u.apply(null,v)}}A.WEBRTC_SUPPORT=!!d(),A.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},A.channelConfig={},i.exports=A},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})}(HS)),HS.exports}var yNe=ONe();const ANe=Zr(yNe),TB=0,EB=1,Bse=2,Lse=(e,t)=>{sn(e,TB);const n=X8e(t);jr(e,n)},Pse=(e,t,n)=>{sn(e,EB),jr(e,vB(t,n))},vNe=(e,t,n)=>Pse(t,n,w0(e)),jse=(e,t,n)=>{try{nse(t,w0(e),n)}catch(o){console.error("Caught error while handling a Yjs update",o)}},xNe=(e,t)=>{sn(e,Bse),jr(e,t)},wNe=jse,_Ne=(e,t,n,o)=>{const r=_n(e);switch(r){case TB:vNe(e,t,n);break;case EB:jse(e,n,o);break;case Bse:wNe(e,n,o);break;default:throw new Error("Unknown message type")}return r},US=3e4;class kNe extends d3{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const n=El();this.getLocalState()!==null&&US/2<=n-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const o=[];this.meta.forEach((r,s)=>{s!==this.clientID&&US<=n-r.lastUpdated&&this.states.has(s)&&o.push(s)}),o.length>0&&VE(this,o,"timeout")},Oc(US/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const n=this.clientID,o=this.meta.get(n),r=o===void 0?0:o.clock+1,s=this.states.get(n);t===null?this.states.delete(n):this.states.set(n,t),this.meta.set(n,{clock:r,lastUpdated:El()});const i=[],c=[],l=[],u=[];t===null?u.push(n):s==null?t!=null&&i.push(n):(c.push(n),yM(s,t)||l.push(n)),(i.length>0||l.length>0||u.length>0)&&this.emit("change",[{added:i,updated:l,removed:u},"local"]),this.emit("update",[{added:i,updated:c,removed:u},"local"])}setLocalStateField(t,n){const o=this.getLocalState();o!==null&&this.setLocalState({...o,[t]:n})}getStates(){return this.states}}const VE=(e,t,n)=>{const o=[];for(let r=0;r0&&(e.emit("change",[{added:[],updated:[],removed:o},n]),e.emit("update",[{added:[],updated:[],removed:o},n]))},H4=(e,t,n=e.states)=>{const o=t.length,r=k0();sn(r,o);for(let s=0;s{const o=Rc(t),r=El(),s=[],i=[],c=[],l=[],u=_n(o);for(let d=0;d0||c.length>0||l.length>0)&&e.emit("change",[{added:s,updated:c,removed:l},n]),(s.length>0||i.length>0||l.length>0)&&e.emit("update",[{added:s,updated:i,removed:l},n])},CNe=(e,t)=>{const n=EE(e).buffer,o=EE(t).buffer;return crypto.subtle.importKey("raw",n,"PBKDF2",!1,["deriveKey"]).then(r=>crypto.subtle.deriveKey({name:"PBKDF2",salt:o,iterations:1e5,hash:"SHA-256"},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},Ise=(e,t)=>{if(!t)return fB(e);const n=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,e).then(o=>{const r=k0();return uc(r,"AES-GCM"),jr(r,n),jr(r,new Uint8Array(o)),Sr(r)})},qNe=(e,t)=>{const n=k0();return th(n,e),Ise(Sr(n),t)},Dse=(e,t)=>{if(!t)return fB(e);const n=Rc(e);Al(n)!=="AES-GCM"&&IEe(ba("Unknown encryption algorithm"));const r=w0(n),s=w0(n);return crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,s).then(i=>new Uint8Array(i))},Fse=(e,t)=>Dse(e,t).then(n=>nh(Rc(new Uint8Array(n)))),R0=q8e("y-webrtc"),T2=0,$se=3,ZM=1,WB=4,QM=new Map,pc=new Map,Vse=e=>{let t=!0;e.webrtcConns.forEach(n=>{n.synced||(t=!1)}),(!t&&e.synced||t&&!e.synced)&&(e.synced=t,e.provider.emit("synced",[{synced:t}]),R0("synced ",ki,e.name,bf," with all peers"))},Hse=(e,t,n)=>{const o=Rc(t),r=k0(),s=_n(o);if(e===void 0)return null;const i=e.awareness,c=e.doc;let l=!1;switch(s){case T2:{sn(r,T2);const u=_Ne(o,r,c,e);u===EB&&!e.synced&&n(),u===TB&&(l=!0);break}case $se:sn(r,ZM),jr(r,H4(i,Array.from(i.getStates().keys()))),l=!0;break;case ZM:SNe(i,w0(o),e);break;case WB:{const u=ff(o)===1,d=Al(o);if(d!==e.peerId&&(e.bcConns.has(d)&&!u||!e.bcConns.has(d)&&u)){const p=[],f=[];u?(e.bcConns.add(d),f.push(d)):(e.bcConns.delete(d),p.push(d)),e.provider.emit("peers",[{added:f,removed:p,webrtcPeers:Array.from(e.webrtcConns.keys()),bcPeers:Array.from(e.bcConns)}]),Use(e)}break}default:return console.error("Unable to compute message"),r}return l?r:null},RNe=(e,t)=>{const n=e.room;return R0("received message from ",ki,e.remotePeerId,MB," (",n.name,")",bf,H5),Hse(n,t,()=>{e.synced=!0,R0("synced ",ki,n.name,bf," with ",ki,e.remotePeerId),Vse(n)})},XS=(e,t)=>{R0("send message to ",ki,e.remotePeerId,bf,MB," (",e.room.name,")",H5);try{e.peer.send(Sr(t))}catch{}},TNe=(e,t)=>{R0("broadcast message in ",ki,e.name,bf),e.webrtcConns.forEach(n=>{try{n.peer.send(t)}catch{}})};class U4{constructor(t,n,o,r){R0("establishing connection to ",ki,o),this.room=r,this.remotePeerId=o,this.glareToken=void 0,this.closed=!1,this.connected=!1,this.synced=!1,this.peer=new ANe({initiator:n,...r.provider.peerOpts}),this.peer.on("signal",s=>{this.glareToken===void 0&&(this.glareToken=Date.now()+Math.random()),Y5(t,r,{to:o,from:r.peerId,type:"signal",token:this.glareToken,signal:s})}),this.peer.on("connect",()=>{R0("connected to ",ki,o),this.connected=!0;const i=r.provider.doc,c=r.awareness,l=k0();sn(l,T2),Lse(l,i),XS(this,l);const u=c.getStates();if(u.size>0){const d=k0();sn(d,ZM),jr(d,H4(c,Array.from(u.keys()))),XS(this,d)}}),this.peer.on("close",()=>{this.connected=!1,this.closed=!0,r.webrtcConns.has(this.remotePeerId)&&(r.webrtcConns.delete(this.remotePeerId),r.provider.emit("peers",[{removed:[this.remotePeerId],added:[],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}])),Vse(r),this.peer.destroy(),R0("closed connection to ",ki,o),HE(r)}),this.peer.on("error",s=>{R0("Error in connection to ",ki,o,": ",s),HE(r)}),this.peer.on("data",s=>{const i=RNe(this,s);i!==null&&XS(this,i)})}destroy(){this.peer.destroy()}}const Du=(e,t)=>Ise(t,e.key).then(n=>e.mux(()=>MNe(e.name,n))),jU=(e,t)=>{e.bcconnected&&Du(e,t),TNe(e,t)},HE=e=>{QM.forEach(t=>{t.connected&&(t.send({type:"subscribe",topics:[e.name]}),e.webrtcConns.size{if(e.provider.filterBcConns){const t=k0();sn(t,WB),UM(t,1),uc(t,e.peerId),Du(e,Sr(t))}};class ENe{constructor(t,n,o,r){this.peerId=v1e(),this.doc=t,this.awareness=n.awareness,this.provider=n,this.synced=!1,this.name=o,this.key=r,this.webrtcConns=new Map,this.bcConns=new Set,this.mux=zNe(),this.bcconnected=!1,this._bcSubscriber=s=>Dse(new Uint8Array(s),r).then(i=>this.mux(()=>{const c=Hse(this,i,()=>{});c&&Du(this,Sr(c))})),this._docUpdateHandler=(s,i)=>{const c=k0();sn(c,T2),xNe(c,s),jU(this,Sr(c))},this._awarenessUpdateHandler=({added:s,updated:i,removed:c},l)=>{const u=s.concat(i).concat(c),d=k0();sn(d,ZM),jr(d,H4(this.awareness,u)),jU(this,Sr(d))},this._beforeUnloadHandler=()=>{VE(this.awareness,[t.clientID],"window unload"),pc.forEach(s=>{s.disconnect()})},typeof window<"u"?window.addEventListener("beforeunload",this._beforeUnloadHandler):typeof Oi<"u"&&Oi.on("exit",this._beforeUnloadHandler)}connect(){this.doc.on("update",this._docUpdateHandler),this.awareness.on("update",this._awarenessUpdateHandler),HE(this);const t=this.name;mNe(t,this._bcSubscriber),this.bcconnected=!0,Use(this);const n=k0();sn(n,T2),Lse(n,this.doc),Du(this,Sr(n));const o=k0();sn(o,T2),Pse(o,this.doc),Du(this,Sr(o));const r=k0();sn(r,$se),Du(this,Sr(r));const s=k0();sn(s,ZM),jr(s,H4(this.awareness,[this.doc.clientID])),Du(this,Sr(s))}disconnect(){QM.forEach(n=>{n.connected&&n.send({type:"unsubscribe",topics:[this.name]})}),VE(this.awareness,[this.doc.clientID],"disconnect");const t=k0();sn(t,WB),UM(t,0),uc(t,this.peerId),Du(this,Sr(t)),gNe(this.name,this._bcSubscriber),this.bcconnected=!1,this.doc.off("update",this._docUpdateHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.webrtcConns.forEach(n=>n.destroy())}destroy(){this.disconnect(),typeof window<"u"?window.removeEventListener("beforeunload",this._beforeUnloadHandler):typeof Oi<"u"&&Oi.off("exit",this._beforeUnloadHandler)}}const WNe=(e,t,n,o)=>{if(pc.has(n))throw ba(`A Yjs Doc connected to room "${n}" already exists!`);const r=new ENe(e,t,n,o);return pc.set(n,r),r},Y5=(e,t,n)=>{t.key?qNe(n,t.key).then(o=>{e.send({type:"publish",topic:t.name,data:j1e(o)})}):e.send({type:"publish",topic:t.name,data:n})};class Xse extends fNe{constructor(t){super(t),this.providers=new Set,this.on("connect",()=>{R0(`connected (${t})`);const n=Array.from(pc.keys());this.send({type:"subscribe",topics:n}),pc.forEach(o=>Y5(this,o,{type:"announce",from:o.peerId}))}),this.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=pc.get(o);if(r==null||typeof o!="string")return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i==null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew U4(this,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){R0("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){R0("offer answered by: ",i.from);const d=c.get(i.from);d.glareToken=void 0}i.to===l&&(w1(c,i.from,()=>new U4(this,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&Fse(gB(n.data),r.key).then(s):s(n.data)}}}),this.on("disconnect",()=>R0(`disconnect (${t})`))}}class NNe extends d3{constructor(t,n,{signaling:o=["wss://y-webrtc-eu.fly.dev"],password:r=null,awareness:s=new kNe(n),maxConns:i=20+Oc(PEe()*15),filterBcConns:c=!0,peerOpts:l={}}={}){super(),this.roomName=t,this.doc=n,this.filterBcConns=c,this.awareness=s,this.shouldConnect=!1,this.signalingUrls=o,this.signalingConns=[],this.maxConns=i,this.peerOpts=l,this.key=r?CNe(r,t):fB(null),this.room=null,this.key.then(u=>{this.room=WNe(n,this,t,u),this.shouldConnect?this.room.connect():this.room.disconnect()}),this.connect(),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}get connected(){return this.room!==null&&this.shouldConnect}connect(){this.shouldConnect=!0,this.signalingUrls.forEach(t=>{const n=w1(QM,t,()=>new Xse(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}disconnect(){this.shouldConnect=!1,this.signalingConns.forEach(t=>{t.providers.delete(this),t.providers.size===0&&(t.destroy(),QM.delete(t.url))}),this.room&&this.room.disconnect()}destroy(){this.doc.off("destroy",this.destroy),this.key.then(()=>{this.room.destroy(),pc.delete(this.roomName)}),super.destroy()}}function BNe(e,t){e.on("connect",()=>{R0(`connected (${t})`);const n=Array.from(pc.keys());e.send({type:"subscribe",topics:n}),pc.forEach(o=>Y5(e,o,{type:"announce",from:o.peerId}))}),e.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=pc.get(o);if(r===null||typeof o!="string"||r===void 0)return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i===null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew U4(e,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){R0("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){R0("offer answered by: ",i.from);const d=c.get(i.from);d&&(d.glareToken=void 0)}i.to===l&&(w1(c,i.from,()=>new U4(e,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&Fse(gB(n.data),r.key).then(s):s(n.data)}}}),e.on("disconnect",()=>R0(`disconnect (${t})`))}function IU(e){if(e.shouldConnect&&e.ws===null){const t=Math.floor(1e5+Math.random()*9e5),n=e.url,o=new window.EventSource(tn(n,{subscriber_id:t,action:"gutenberg_signaling_server"}));let r=null;o.onmessage=l=>{e.lastMessageReceived=Date.now();const u=l.data;if(u){const d=JSON.parse(u);Array.isArray(d)&&d.forEach(s)}},e.ws=o,e.connecting=!0,e.connected=!1;const s=l=>{l&&l.type==="pong"&&(clearTimeout(r),r=setTimeout(c,X4/2)),e.emit("message",[l,e])},i=l=>{e.ws!==null&&(e.ws.close(),e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:l},e])):e.unsuccessfulReconnects++),clearTimeout(r)},c=()=>{e.ws&&e.ws.readyState===window.EventSource.OPEN&&e.send({type:"ping"})};e.ws&&(e.ws.onclose=()=>{i(null)},e.ws.send=function(u){window.fetch(n,{body:new URLSearchParams({subscriber_id:t.toString(),action:"gutenberg_signaling_server",message:u}),method:"POST"}).catch(()=>{R0("Error sending to server with message: "+u)})}),o.onerror=()=>{},o.onopen=()=>{e.connected||o.readyState===window.EventSource.OPEN&&(e.lastMessageReceived=Date.now(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),r=setTimeout(c,X4/2))}}}const X4=3e4;class LNe extends d3{constructor(t){super(),this.url=t,this.ws=null,this.binaryType=null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&X4{const n=w1(QM,t,t.startsWith("ws://")||t.startsWith("wss://")?()=>new Xse(t):()=>new LNe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}}function jNe({signaling:e,password:t}){return function(n,o,r){const s=`${o}-${n}`;return new PNe(s,r,{signaling:e,password:t}),Promise.resolve(()=>!0)}}const INe=(e,t)=>{const n={},o={},r={};function s(u,d){n[u]=d}async function i(u,d,p){const f=new $h;r[u]=r[u]||{},r[u][d]=f;const b=()=>{const z=n[u].fromCRDTDoc(f);p(z)};f.on("update",b);const h=await e(d,u,f);t&&await t(d,u,f);const g=n[u].fetch;g&&g(d).then(z=>{f.transact(()=>{n[u].applyChangesToDoc(f,z)})}),o[u]=o[u]||{},o[u][d]=()=>{h(),f.off("update",b)}}async function c(u,d,p){const f=r[u][d];if(!f)throw"Error doc "+u+" "+d+" not found";f.transact(()=>{n[u].applyChangesToDoc(f,p)})}async function l(u,d){o?.[u]?.[d]&&o[u][d]()}return{register:s,bootstrap:i,update:c,discard:l}};let GS;function UE(){return GS||(GS=INe(uNe,jNe({signaling:[window?.wp?.ajax?.settings?.url],password:window?.__experimentalCollaborativeEditingSecret}))),GS}function DNe(e,t){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(t)?t:[t],queryID:e}}function FNe(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function $Ne(e){return{type:"ADD_ENTITIES",entities:e}}function VNe(e,t,n,o,r=!1,s,i){e==="postType"&&(n=(Array.isArray(n)?n:[n]).map(l=>l.status==="auto-draft"?{...l,title:""}:l));let c;return o?c=cqe(n,o,s,i):c=$0e(n,s,i),{...c,kind:e,name:t,invalidateCache:r}}function HNe(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function UNe(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function XNe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function GNe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function KNe(){return Ke("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function YNe(e,t){return Ke("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:e,revisions:t}}function ZNe(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const Gse=(e,t,n,o,{__unstableFetch:r=Tt,throwOnError:s=!1}={})=>async({dispatch:i,resolveSelect:c})=>{const u=(await c.getEntitiesConfig(e)).find(b=>b.kind===e&&b.name===t);let d,p=!1;if(!u)return;const f=await i.__unstableAcquireStoreLock(No,["entities","records",e,t,n],{exclusive:!0});try{i({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let b=!1;try{let h=`${u.baseURL}/${n}`;o&&(h=tn(h,o)),p=await r({path:h,method:"DELETE"}),await i(aqe(e,t,n,!0))}catch(h){b=!0,d=h}if(i({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:d}),b&&s)throw d;return p}finally{i.__unstableReleaseStoreLock(f)}},QNe=(e,t,n,o,r={})=>({select:s,dispatch:i})=>{const c=s.getEntityConfig(e,t);if(!c)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{mergedEdits:l={}}=c,u=s.getRawEntityRecord(e,t,n),d=s.getEditedEntityRecord(e,t,n),p={kind:e,name:t,recordId:n,edits:Object.keys(o).reduce((f,b)=>{const h=u[b],g=d[b],z=l[b]?{...g,...o[b]}:o[b];return f[b]=N0(h,z)?void 0:z,f},{})};if(window.__experimentalEnableSync&&c.syncConfig){if(globalThis.IS_GUTENBERG_PLUGIN){const f=c.getSyncObjectId(n);UE().update(c.syncObjectType+"--edit",f,p.edits)}}else r.undoIgnore||s.getUndoManager().addRecord([{id:{kind:e,name:t,recordId:n},changes:Object.keys(o).reduce((f,b)=>(f[b]={from:d[b],to:o[b]},f),{})}],r.isCached),i({type:"EDIT_ENTITY_RECORD",...p})},JNe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().undo();n&&t({type:"UNDO",record:n})},eBe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().redo();n&&t({type:"REDO",record:n})},tBe=()=>({select:e})=>{e.getUndoManager().addRecord()},Kse=(e,t,n,{isAutosave:o=!1,__unstableFetch:r=Tt,throwOnError:s=!1}={})=>async({select:i,resolveSelect:c,dispatch:l})=>{const d=(await c.getEntitiesConfig(e)).find(h=>h.kind===e&&h.name===t);if(!d)return;const p=d.key||e1,f=n[p],b=await l.__unstableAcquireStoreLock(No,["entities","records",e,t,f||Is()],{exclusive:!0});try{for(const[A,_]of Object.entries(n))if(typeof _=="function"){const v=_(i.getEditedEntityRecord(e,t,f));l.editEntityRecord(e,t,f,{[A]:v},{undoIgnore:!0}),n[A]=v}l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:f,isAutosave:o});let h,g,z=!1;try{const A=`${d.baseURL}${f?"/"+f:""}`,_=i.getRawEntityRecord(e,t,f);if(o){const v=i.getCurrentUser(),M=v?v.id:void 0,y=await c.getAutosave(_.type,_.id,M);let k={..._,...y,...n};if(k=Object.keys(k).reduce((S,C)=>(["title","excerpt","content","meta"].includes(C)&&(S[C]=k[C]),S),{status:k.status==="auto-draft"?"draft":void 0}),h=await r({path:`${A}/autosaves`,method:"POST",data:k}),_.id===h.id){let S={..._,...k,...h};S=Object.keys(S).reduce((C,R)=>(["title","excerpt","content"].includes(R)?C[R]=S[R]:R==="status"?C[R]=_.status==="auto-draft"&&S.status==="draft"?S.status:_.status:C[R]=_[R],C),{}),l.receiveEntityRecords(e,t,S,void 0,!0)}else l.receiveAutosaves(_.id,h)}else{let v=n;d.__unstablePrePersist&&(v={...v,...d.__unstablePrePersist(_,v)}),h=await r({path:A,method:f?"PUT":"POST",data:v}),l.receiveEntityRecords(e,t,h,void 0,!0,v)}}catch(A){z=!0,g=A}if(l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:f,error:g,isAutosave:o}),z&&s)throw g;return h}finally{l.__unstableReleaseStoreLock(b)}},nBe=e=>async({dispatch:t})=>{const n=tEe(),o={saveEntityRecord(i,c,l,u){return n.add(d=>t.saveEntityRecord(i,c,l,{...u,__unstableFetch:d}))},saveEditedEntityRecord(i,c,l,u){return n.add(d=>t.saveEditedEntityRecord(i,c,l,{...u,__unstableFetch:d}))},deleteEntityRecord(i,c,l,u,d){return n.add(p=>t.deleteEntityRecord(i,c,l,u,{...d,__unstableFetch:p}))}},r=e.map(i=>i(o)),[,...s]=await Promise.all([n.run(),...r]);return s},oBe=(e,t,n,o)=>async({select:r,dispatch:s,resolveSelect:i})=>{if(!r.hasEditsForEntityRecord(e,t,n))return;const l=(await i.getEntitiesConfig(e)).find(f=>f.kind===e&&f.name===t);if(!l)return;const u=l.key||e1,d=r.getEntityRecordNonTransientEdits(e,t,n),p={[u]:n,...d};return await s.saveEntityRecord(e,t,p,o)},rBe=(e,t,n,o,r)=>async({select:s,dispatch:i,resolveSelect:c})=>{if(!s.hasEditsForEntityRecord(e,t,n))return;const l=s.getEntityRecordNonTransientEdits(e,t,n),u={};for(const b of o)L5(u,b,sqe(l,b));const f=(await c.getEntitiesConfig(e)).find(b=>b.kind===e&&b.name===t)?.key||e1;return n&&(u[f]=n),await i.saveEntityRecord(e,t,u,r)};function sBe(e){return Ke("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),Yse("create/media",e)}function Yse(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function iBe(e){return{type:"RECEIVE_USER_PERMISSIONS",permissions:e}}function aBe(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Array.isArray(t)?t:[t]}}function cBe(e){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:e}}function lBe(e,t){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:e,templateId:t}}const uBe=(e,t,n,o,r,s=!1,i)=>async({dispatch:c,resolveSelect:l})=>{const d=(await l.getEntitiesConfig(e)).find(f=>f.kind===e&&f.name===t),p=d&&d?.revisionKey?d.revisionKey:e1;c({type:"RECEIVE_ITEM_REVISIONS",key:p,items:Array.isArray(o)?o:[o],recordKey:n,meta:i,query:r,kind:e,name:t,invalidateCache:s})},dBe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalBatch:nBe,__experimentalReceiveCurrentGlobalStylesId:UNe,__experimentalReceiveThemeBaseGlobalStyles:XNe,__experimentalReceiveThemeGlobalStyleVariations:GNe,__experimentalSaveSpecifiedEntityEdits:rBe,__unstableCreateUndoLevel:tBe,addEntities:$Ne,deleteEntityRecord:Gse,editEntityRecord:QNe,receiveAutosaves:aBe,receiveCurrentTheme:HNe,receiveCurrentUser:FNe,receiveDefaultTemplateId:lBe,receiveEmbedPreview:ZNe,receiveEntityRecords:VNe,receiveNavigationFallbackId:cBe,receiveRevisions:uBe,receiveThemeGlobalStyleRevisions:YNe,receiveThemeSupports:KNe,receiveUploadPermissions:sBe,receiveUserPermission:Yse,receiveUserPermissions:iBe,receiveUserQuery:DNe,redo:eBe,saveEditedEntityRecord:oBe,saveEntityRecord:Kse,undo:JNe},Symbol.toStringTag,{value:"Module"}));function pBe(e,t){return{type:"RECEIVE_REGISTERED_POST_META",postType:e,registeredPostMeta:t}}const fBe=Object.freeze(Object.defineProperty({__proto__:null,receiveRegisteredPostMeta:pBe},Symbol.toStringTag,{value:"Module"}));let $b;function Lt(e){if(typeof e!="string"||e.indexOf("&")===-1)return e;$b===void 0&&(document.implementation&&document.implementation.createHTMLDocument?$b=document.implementation.createHTMLDocument("").createElement("textarea"):$b=document.createElement("textarea")),$b.innerHTML=e;const t=$b.textContent;return $b.innerHTML="",t}async function bBe(e,t={},n={}){const o=t.isInitialSuggestions&&t.initialSuggestionsSearchOptions?{...t,...t.initialSuggestionsSearchOptions}:t,{type:r,subtype:s,page:i,perPage:c=t.isInitialSuggestions?3:20}=o,{disablePostFormats:l=!1}=n,u=[];(!r||r==="post")&&u.push(Tt({path:tn("/wp/v2/search",{search:e,page:i,per_page:c,type:"post",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:Lt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"post-type"}))).catch(()=>[])),(!r||r==="term")&&u.push(Tt({path:tn("/wp/v2/search",{search:e,page:i,per_page:c,type:"term",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:Lt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),!l&&(!r||r==="post-format")&&u.push(Tt({path:tn("/wp/v2/search",{search:e,page:i,per_page:c,type:"post-format",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:Lt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),(!r||r==="attachment")&&u.push(Tt({path:tn("/wp/v2/media",{search:e,page:i,per_page:c})}).then(f=>f.map(b=>({id:b.id,url:b.source_url,title:Lt(b.title.rendered||"")||m("(no title)"),type:b.type,kind:"media"}))).catch(()=>[]));let p=(await Promise.all(u)).flat();return p=p.filter(f=>!!f.id),p=hBe(p,e),p=p.slice(0,c),p}function hBe(e,t){const n=DU(t),o={};for(const r of e)if(r.title){const s=DU(r.title),i=s.filter(d=>n.some(p=>d===p)),c=s.filter(d=>n.some(p=>d!==p&&d.includes(p))),l=i.length/s.length*10,u=c.length/s.length;o[r.id]=l+u}else o[r.id]=0;return e.sort((r,s)=>o[s.id]-o[r.id])}function DU(e){return e.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}const KS=new Map,mBe=async(e,t={})=>{const n="/wp-block-editor/v1/url-details",o={url:jf(e)};if(!Pf(e))return Promise.reject(`${e} is not a valid URL.`);const r=x5(e);return!r||!NN(r)||!r.startsWith("http")||!/^https?:\/\/[^\/\s]/i.test(e)?Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`):KS.has(e)?KS.get(e):Tt({path:tn(n,o),...t}).then(s=>(KS.set(e,s),s))};async function gBe(){const e=await Tt({path:"/wp/v2/block-patterns/patterns"});return e?e.map(t=>Object.fromEntries(Object.entries(t).map(([n,o])=>[RN(n),o]))):[]}const MBe=e=>async({dispatch:t})=>{const n=tn("/wp/v2/users/?who=authors&per_page=100",e),o=await Tt({path:n});t.receiveUserQuery(n,o)},zBe=()=>async({dispatch:e})=>{const t=await Tt({path:"/wp/v2/users/me"});e.receiveCurrentUser(t)},Zse=(e,t,n="",o)=>async({select:r,dispatch:s,registry:i,resolveSelect:c})=>{const u=(await c.getEntitiesConfig(e)).find(p=>p.name===t&&p.kind===e);if(!u)return;const d=await s.__unstableAcquireStoreLock(No,["entities","records",e,t,n],{exclusive:!1});try{if(window.__experimentalEnableSync&&u.syncConfig&&!o){if(globalThis.IS_GUTENBERG_PLUGIN){const p=u.getSyncObjectId(n);await UE().bootstrap(u.syncObjectType,p,f=>{s.receiveEntityRecords(e,t,f,o)}),await UE().bootstrap(u.syncObjectType+"--edit",p,f=>{s({type:"EDIT_ENTITY_RECORD",kind:e,name:t,recordId:n,edits:f,meta:{undo:void 0}})})}}else{o!==void 0&&o._fields&&(o={...o,_fields:[...new Set([...Md(o._fields)||[],u.key||e1])].join()});const p=tn(u.baseURL+(n?"/"+n:""),{...u.baseURLParams,...o});if(o!==void 0&&o._fields&&(o={...o,include:[n]},r.hasEntityRecords(e,t,o)))return;const f=await Tt({path:p,parse:!1}),b=await f.json(),h=QN(f.headers?.get("allow")),g=[],z={};for(const A of zM)z[P5(A,{kind:e,name:t,id:n})]=h[A],g.push([A,{kind:e,name:t,id:n}]);i.batch(()=>{s.receiveEntityRecords(e,t,b,o),s.receiveUserPermissions(z),s.finishResolutions("canUser",g)})}}finally{s.__unstableReleaseStoreLock(d)}},OBe=ZN("getEntityRecord"),yBe=ZN("getEntityRecord"),G4=(e,t,n={})=>async({dispatch:o,registry:r,resolveSelect:s})=>{const c=(await s.getEntitiesConfig(e)).find(p=>p.name===t&&p.kind===e);if(!c)return;const l=await o.__unstableAcquireStoreLock(No,["entities","records",e,t],{exclusive:!1}),u=c.key||e1;function d(p){return p.filter(f=>f?.[u]).map(f=>[e,t,f[u]])}try{n._fields&&(n={...n,_fields:[...new Set([...Md(n._fields)||[],c.key||e1])].join()});const p=tn(c.baseURL,{...c.baseURLParams,...n});let f=[],b;if(c.supportsPagination&&n.per_page!==-1){const h=await Tt({path:p,parse:!1});f=Object.values(await h.json()),b={totalItems:parseInt(h.headers.get("X-WP-Total")),totalPages:parseInt(h.headers.get("X-WP-TotalPages"))}}else if(n.per_page===-1&&n[F0e]===!0){let h=1,g;do{const z=await Tt({path:tn(p,{page:h,per_page:100}),parse:!1}),A=Object.values(await z.json());g=parseInt(z.headers.get("X-WP-TotalPages")),f.push(...A),r.batch(()=>{o.receiveEntityRecords(e,t,f,n),o.finishResolutions("getEntityRecord",d(A))}),h++}while(h<=g);b={totalItems:f.length,totalPages:1}}else f=Object.values(await Tt({path:p})),b={totalItems:f.length,totalPages:1};n._fields&&(f=f.map(h=>(n._fields.split(",").forEach(g=>{h.hasOwnProperty(g)||(h[g]=void 0)}),h))),r.batch(()=>{if(o.receiveEntityRecords(e,t,f,n,!1,void 0,b),!n?._fields&&!n.context){const h=f.filter(A=>A?.[u]).map(A=>({id:A[u],permissions:QN(A?._links?.self?.[0].targetHints.allow)})),g=[],z={};for(const A of h)for(const _ of zM)g.push([_,{kind:e,name:t,id:A.id}]),z[P5(_,{kind:e,name:t,id:A.id})]=A.permissions[_];o.receiveUserPermissions(z),o.finishResolutions("getEntityRecord",d(f)),o.finishResolutions("canUser",g)}o.__unstableReleaseStoreLock(l)})}catch{o.__unstableReleaseStoreLock(l)}};G4.shouldInvalidate=(e,t,n)=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&t===e.kind&&n===e.name;const ABe=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("root","theme",{status:"active"});e.receiveCurrentTheme(n[0])},vBe=ZN("getCurrentTheme"),xBe=e=>async({dispatch:t})=>{try{const n=await Tt({path:tn("/oembed/1.0/proxy",{url:e})});t.receiveEmbedPreview(e,n)}catch{t.receiveEmbedPreview(e,!1)}},Qse=(e,t,n)=>async({dispatch:o,registry:r,resolveSelect:s})=>{if(!zM.includes(e))throw new Error(`'${e}' is not a valid action.`);const{hasStartedResolution:i}=r.select(No);for(const d of zM){if(d===e)continue;if(i("canUser",[d,t,n]))return}let c=null;if(typeof t=="object"){if(!t.kind||!t.name)throw new Error("The entity resource object is not valid.");const p=(await s.getEntitiesConfig(t.kind)).find(f=>f.name===t.name&&f.kind===t.kind);if(!p)return;c=p.baseURL+(t.id?"/"+t.id:"")}else c=`/wp/v2/${t}`+(n?"/"+n:"");let l;try{l=await Tt({path:c,method:"OPTIONS",parse:!1})}catch{return}const u=QN(l.headers?.get("allow"));r.batch(()=>{for(const d of zM){const p=P5(d,t,n);o.receiveUserPermission(p,u[d]),d!==e&&o.finishResolution("canUser",[d,t,n])}})},wBe=(e,t,n)=>async({dispatch:o})=>{await o(Qse("update",{kind:e,name:t,id:n}))},_Be=(e,t)=>async({dispatch:n,resolveSelect:o})=>{const{rest_base:r,rest_namespace:s="wp/v2",supports:i}=await o.getPostType(e);if(!i?.autosave)return;const c=await Tt({path:`/${s}/${r}/${t}/autosaves?context=edit`});c&&c.length&&n.receiveAutosaves(t,c)},kBe=(e,t)=>async({resolveSelect:n})=>{await n.getAutosaves(e,t)},SBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("root","theme",{status:"active"}))?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!o)return;const r=o.match(/\/(\d+)(?:\?|$)/),s=r?Number(r[1]):null;s&&e.__experimentalReceiveCurrentGlobalStylesId(s)},CBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await Tt({path:`/wp/v2/global-styles/themes/${n.stylesheet}?context=view`});t.__experimentalReceiveThemeBaseGlobalStyles(n.stylesheet,o)},qBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await Tt({path:`/wp/v2/global-styles/themes/${n.stylesheet}/variations?context=view`});t.__experimentalReceiveThemeGlobalStyleVariations(n.stylesheet,o)},Jse=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.__experimentalGetCurrentGlobalStylesId(),r=(n?await e.getEntityRecord("root","globalStyles",n):void 0)?._links?.["version-history"]?.[0]?.href;if(r){const i=(await Tt({url:r}))?.map(c=>Object.fromEntries(Object.entries(c).map(([l,u])=>[RN(l),u])));t.receiveThemeGlobalStyleRevisions(n,i)}};Jse.shouldInvalidate=e=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&e.kind==="root"&&!e.error&&e.name==="globalStyles";const RBe=()=>async({dispatch:e})=>{const t=await gBe();e({type:"RECEIVE_BLOCK_PATTERNS",patterns:t})},TBe=()=>async({dispatch:e})=>{const t=await Tt({path:"/wp/v2/block-patterns/categories"});e({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:t})},EBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"}))?.map(r=>({...r,label:Lt(r.name),name:r.slug}))||[];e({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:o})},WBe=()=>async({dispatch:e,select:t,registry:n})=>{const o=await Tt({path:tn("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),r=o?._embedded?.self;n.batch(()=>{if(e.receiveNavigationFallbackId(o?.id),!r)return;const i=!t.getEntityRecord("postType","wp_navigation",o.id);e.receiveEntityRecords("postType","wp_navigation",r,void 0,i),e.finishResolution("getEntityRecord",["postType","wp_navigation",o.id])})},NBe=e=>async({dispatch:t,registry:n,resolveSelect:o})=>{const r=await Tt({path:tn("/wp/v2/templates/lookup",e)});await o.getEntitiesConfig("postType"),r?.id&&n.batch(()=>{t.receiveDefaultTemplateId(e,r.id),t.receiveEntityRecords("postType","wp_template",[r]),t.finishResolution("getEntityRecord",["postType","wp_template",r.id])})},eie=(e,t,n,o={})=>async({dispatch:r,registry:s,resolveSelect:i})=>{const l=(await i.getEntitiesConfig(e)).find(h=>h.name===t&&h.kind===e);if(!l)return;o._fields&&(o={...o,_fields:[...new Set([...Md(o._fields)||[],l.revisionKey||e1])].join()});const u=tn(l.getRevisionsUrl(n),o);let d,p;const f={},b=l.supportsPagination&&o.per_page!==-1;try{p=await Tt({path:u,parse:!b})}catch{return}p&&(b?(d=Object.values(await p.json()),f.totalItems=parseInt(p.headers.get("X-WP-Total"))):d=Object.values(p),o._fields&&(d=d.map(h=>(o._fields.split(",").forEach(g=>{h.hasOwnProperty(g)||(h[g]=void 0)}),h))),s.batch(()=>{if(r.receiveRevisions(e,t,n,d,o,!1,f),!o?._fields&&!o.context){const h=l.key||e1,g=d.filter(z=>z[h]).map(z=>[e,t,n,z[h]]);r.finishResolutions("getRevision",g)}}))};eie.shouldInvalidate=(e,t,n,o)=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&n===e.name&&t===e.kind&&!e.error&&o===e.recordId;const BBe=(e,t,n,o,r)=>async({dispatch:s,resolveSelect:i})=>{const l=(await i.getEntitiesConfig(e)).find(p=>p.name===t&&p.kind===e);if(!l)return;r!==void 0&&r._fields&&(r={...r,_fields:[...new Set([...Md(r._fields)||[],l.revisionKey||e1])].join()});const u=tn(l.getRevisionsUrl(n,o),r);let d;try{d=await Tt({path:u})}catch{return}d&&s.receiveRevisions(e,t,n,d,r)},LBe=e=>async({dispatch:t,resolveSelect:n})=>{let o;try{const{rest_namespace:r="wp/v2",rest_base:s}=await n.getPostType(e)||{};o=await Tt({path:`${r}/${s}/?context=edit`,method:"OPTIONS"})}catch{return}o&&t.receiveRegisteredPostMeta(e,o?.schema?.properties?.meta?.properties)},PBe=e=>async({dispatch:t})=>{const n=s1e.find(o=>o.kind===e);if(n)try{const o=await n.loadEntities();if(!o.length)return;t.addEntities(o)}catch{}},jBe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:SBe,__experimentalGetCurrentThemeBaseGlobalStyles:CBe,__experimentalGetCurrentThemeGlobalStylesVariations:qBe,canUser:Qse,canUserEditEntityRecord:wBe,getAuthors:MBe,getAutosave:kBe,getAutosaves:_Be,getBlockPatternCategories:TBe,getBlockPatterns:RBe,getCurrentTheme:ABe,getCurrentThemeGlobalStylesRevisions:Jse,getCurrentUser:zBe,getDefaultTemplateId:NBe,getEditedEntityRecord:yBe,getEmbedPreview:xBe,getEntitiesConfig:PBe,getEntityRecord:Zse,getEntityRecords:G4,getNavigationFallbackId:WBe,getRawEntityRecord:OBe,getRegisteredPostMeta:LBe,getRevision:BBe,getRevisions:eie,getThemeSupports:vBe,getUserPatternCategories:EBe},Symbol.toStringTag,{value:"Module"}));function FU(e,t){const n={...e};let o=n;for(const r of t)o.children={...o.children,[r]:{locks:[],children:{},...o.children[r]}},o=o.children[r];return n}function XE(e,t){let n=e;for(const o of t){const r=n.children[o];if(!r)return null;n=r}return n}function*IBe(e,t){let n=e;yield n;for(const o of t){const r=n.children[o];if(!r)break;yield r,n=r}}function*DBe(e){const t=Object.values(e.children);for(;t.length;){const n=t.pop();yield n,t.push(...Object.values(n.children))}}function $U({exclusive:e},t){return!!(e&&t.length||!e&&t.filter(n=>n.exclusive).length)}const FBe={requests:[],tree:{locks:[],children:{}}};function MA(e=FBe,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:o}=t,{store:r,path:s}=o,i=[r,...s],c=FU(e.tree,i),l=XE(c,i);return l.locks=[...l.locks,n],{...e,requests:e.requests.filter(u=>u!==o),tree:c}}case"RELEASE_LOCK":{const{lock:n}=t,o=[n.store,...n.path],r=FU(e.tree,o),s=XE(r,o);return s.locks=s.locks.filter(i=>i!==n),{...e,tree:r}}}return e}function $Be(e){return e.requests}function VBe(e,t,n,{exclusive:o}){const r=[t,...n],s=e.tree;for(const c of IBe(s,r))if($U({exclusive:o},c.locks))return!1;const i=XE(s,r);if(!i)return!0;for(const c of DBe(i))if($U({exclusive:o},c.locks))return!1;return!0}function HBe(){let e=MA(void 0,{type:"@@INIT"});function t(){for(const r of $Be(e)){const{store:s,path:i,exclusive:c,notifyAcquired:l}=r;if(VBe(e,s,i,{exclusive:c})){const u={store:s,path:i,exclusive:c};e=MA(e,{type:"GRANT_LOCK_REQUEST",lock:u,request:r}),l(u)}}}function n(r,s,i){return new Promise(c=>{e=MA(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:r,path:s,exclusive:i,notifyAcquired:c}}),t()})}function o(r){e=MA(e,{type:"RELEASE_LOCK",lock:r}),t()}return{acquire:n,release:o}}function UBe(){const e=HBe();function t(o,r,{exclusive:s}){return()=>e.acquire(o,r,s)}function n(o){return()=>e.release(o)}return{__unstableAcquireStoreLock:t,__unstableReleaseStoreLock:n}}let XBe,GBe;const GE=x.createContext({});function KE({kind:e,type:t,id:n,children:o}){const r=x.useContext(GE),s=x.useMemo(()=>({...r,[e]:{...r?.[e],[t]:n}}),[r,e,t,n]);return a.jsx(GE.Provider,{value:s,children:o})}let is=function(e){return e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS",e}({});const KBe=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function NB(e,t){return G((n,o)=>e(s=>YBe(n(s)),o),t)}const YBe=Hs(e=>{const t={};for(const n in e)KBe.includes(n)||Object.defineProperty(t,n,{get:()=>(...o)=>{const r=e[n](...o),s=e.getResolutionState(n,o)?.status;let i;switch(s){case"resolving":i=is.Resolving;break;case"finished":i=is.Success;break;case"error":i=is.Error;break;case void 0:i=is.Idle;break}return{data:r,status:i,isResolving:i===is.Resolving,hasStarted:i!==is.Idle,hasResolved:i===is.Success||i===is.Error}}});return t}),VU={};function Z5(e,t,n,o={enabled:!0}){const{editEntityRecord:r,saveEditedEntityRecord:s}=Oe(Me),i=x.useMemo(()=>({edit:(f,b={})=>r(e,t,n,f,b),save:(f={})=>s(e,t,n,{throwOnError:!0,...f})}),[r,e,t,n,s]),{editedRecord:c,hasEdits:l,edits:u}=G(f=>o.enabled?{editedRecord:f(Me).getEditedEntityRecord(e,t,n),hasEdits:f(Me).hasEditsForEntityRecord(e,t,n),edits:f(Me).getEntityRecordNonTransientEdits(e,t,n)}:{editedRecord:VU,hasEdits:!1,edits:VU},[e,t,n,o.enabled]),{data:d,...p}=NB(f=>o.enabled?f(Me).getEntityRecord(e,t,n):{data:null},[e,t,n,o.enabled]);return{record:d,editedRecord:c,hasEdits:l,edits:u,...p,...i}}const ZBe=[];function vl(e,t,n={},o={enabled:!0}){const r=tn("",n),{data:s,...i}=NB(u=>o.enabled?u(Me).getEntityRecords(e,t,n):{data:ZBe},[e,t,r,o.enabled]),{totalItems:c,totalPages:l}=G(u=>o.enabled?{totalItems:u(Me).getEntityRecordsTotalItems(e,t,n),totalPages:u(Me).getEntityRecordsTotalPages(e,t,n)}:{totalItems:null,totalPages:null},[e,t,r,o.enabled]);return{records:s,totalItems:c,totalPages:l,...i}}function QBe(e,t,n={},o={enabled:!0}){const r=G(d=>d(Me).getEntityConfig(e,t),[e,t]),{records:s,...i}=vl(e,t,n,o),c=x.useMemo(()=>{var d;return(d=s?.map(p=>{var f;return p[(f=r?.key)!==null&&f!==void 0?f:"id"]}))!==null&&d!==void 0?d:[]},[s,r?.key]),l=G(d=>{const{getEntityRecordsPermissions:p}=eh(d(Me));return p(e,t,c)},[c,e,t]);return{records:x.useMemo(()=>{var d;return(d=s?.map((p,f)=>({...p,permissions:l[f]})))!==null&&d!==void 0?d:[]},[s,l]),...i}}const HU=new Set;function JBe(){return globalThis.SCRIPT_DEBUG===!0}function zn(e){if(JBe()&&!HU.has(e)){console.warn(e);try{throw Error(e)}catch{}HU.add(e)}}function tie(e,t){const n=typeof e=="object",o=n?JSON.stringify(e):e;return n&&typeof t<"u"&&globalThis.SCRIPT_DEBUG===!0&&zn("When 'resource' is an entity object, passing 'id' as a separate argument isn't supported."),NB(r=>{const s=n?!!e.id:!!t,{canUser:i}=r(Me),c=i("create",n?{kind:e.kind,name:e.name}:e);if(!s){const h=i("read",e),g=c.isResolving||h.isResolving,z=c.hasResolved&&h.hasResolved;let A=is.Idle;return g?A=is.Resolving:z&&(A=is.Success),{status:A,isResolving:g,hasResolved:z,canCreate:c.hasResolved&&c.data,canRead:h.hasResolved&&h.data}}const l=i("read",e,t),u=i("update",e,t),d=i("delete",e,t),p=l.isResolving||c.isResolving||u.isResolving||d.isResolving,f=l.hasResolved&&c.hasResolved&&u.hasResolved&&d.hasResolved;let b=is.Idle;return p?b=is.Resolving:f&&(b=is.Success),{status:b,isResolving:p,hasResolved:f,canRead:f&&l.data,canCreate:f&&c.data,canUpdate:f&&u.data,canDelete:f&&d.data}},[o,t])}var eLe={grad:.9,turn:360,rad:360/(2*Math.PI)},Qc=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},_0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Si=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},nie=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},UU=function(e){return{r:Si(e.r,0,255),g:Si(e.g,0,255),b:Si(e.b,0,255),a:Si(e.a)}},YS=function(e){return{r:_0(e.r),g:_0(e.g),b:_0(e.b),a:_0(e.a,3)}},tLe=/^#([0-9a-f]{3,8})$/i,zA=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},oie=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=Math.max(t,n,o),i=s-Math.min(t,n,o),c=i?s===t?(n-o)/i:s===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(c<0?c+6:c),s:s?i/s*100:0,v:s/255*100,a:r}},rie=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var s=Math.floor(t),i=o*(1-n),c=o*(1-(t-s)*n),l=o*(1-(1-t+s)*n),u=s%6;return{r:255*[o,c,i,i,l,o][u],g:255*[l,o,o,c,i,i][u],b:255*[i,i,l,o,o,c][u],a:r}},XU=function(e){return{h:nie(e.h),s:Si(e.s,0,100),l:Si(e.l,0,100),a:Si(e.a)}},GU=function(e){return{h:_0(e.h),s:_0(e.s),l:_0(e.l),a:_0(e.a,3)}},KU=function(e){return rie((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},AM=function(e){return{h:(t=oie(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},nLe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oLe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rLe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sLe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,YE={string:[[function(e){var t=tLe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?_0(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?_0(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=rLe.exec(e)||sLe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:UU({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=nLe.exec(e)||oLe.exec(e);if(!t)return null;var n,o,r=XU({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(eLe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return KU(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return Qc(t)&&Qc(n)&&Qc(o)?UU({r:Number(t),g:Number(n),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!Qc(t)||!Qc(n)||!Qc(o))return null;var i=XU({h:Number(t),s:Number(n),l:Number(o),a:Number(s)});return KU(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!Qc(t)||!Qc(n)||!Qc(o))return null;var i=function(c){return{h:nie(c.h),s:Si(c.s,0,100),v:Si(c.v,0,100),a:Si(c.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(s)});return rie(i)},"hsv"]]},YU=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=YS(this.rgba),n=t.r,o=t.g,r=t.b,i=(s=t.a)<1?zA(_0(255*s)):"","#"+zA(n)+zA(o)+zA(r)+i;var t,n,o,r,s,i},e.prototype.toRgb=function(){return YS(this.rgba)},e.prototype.toRgbString=function(){return t=YS(this.rgba),n=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+n+", "+o+", "+r+", "+s+")":"rgb("+n+", "+o+", "+r+")";var t,n,o,r,s},e.prototype.toHsl=function(){return GU(AM(this.rgba))},e.prototype.toHslString=function(){return t=GU(AM(this.rgba)),n=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+n+", "+o+"%, "+r+"%, "+s+")":"hsl("+n+", "+o+"%, "+r+"%)";var t,n,o,r,s},e.prototype.toHsv=function(){return t=oie(this.rgba),{h:_0(t.h),s:_0(t.s),v:_0(t.v),a:_0(t.a,3)};var t},e.prototype.invert=function(){return an({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),an(ZS(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),an(ZS(this.rgba,-t))},e.prototype.grayscale=function(){return an(ZS(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),an(ZU(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),an(ZU(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?an({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):_0(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=AM(this.rgba);return typeof t=="number"?an({h:t,s:n.s,l:n.l,a:n.a}):_0(n.h)},e.prototype.isEqual=function(t){return this.toHex()===an(t).toHex()},e}(),an=function(e){return e instanceof ZE?e:new ZE(e)},QU=[],Xs=function(e){e.forEach(function(t){QU.indexOf(t)<0&&(t(ZE,YE),QU.push(t))})};function Gs(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var s={};e.prototype.toName=function(i){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,l,u=o[this.toHex()];if(u)return u;if(i?.closest){var d=this.toRgb(),p=1/0,f="black";if(!s.length)for(var b in n)s[b]=new e(n[b]).toRgb();for(var h in n){var g=(c=d,l=s[h],Math.pow(c.r-l.r,2)+Math.pow(c.g-l.g,2)+Math.pow(c.b-l.b,2));gl?(c+.05)/(l+.05):(l+.05)/(c+.05),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(t,n){return t===void 0&&(t="#FFF"),n===void 0&&(n={}),this.contrast(t)>=(c=(i=(o=n).size)===void 0?"normal":i,(s=(r=o.level)===void 0?"AA":r)==="AAA"&&c==="normal"?7:s==="AA"&&c==="large"?3:4.5);var o,r,s,i,c}}const sie="block-default",QE=["attributes","supports","save","migrate","isEligible","apiVersion"],Pp={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},aspectRatio:{value:["dimensions","aspectRatio"],support:["dimensions","aspectRatio"],useEngine:!0},background:{value:["color","gradient"],support:["color","gradients"],useEngine:!0},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0,useEngine:!0},backgroundImage:{value:["background","backgroundImage"],support:["background","backgroundImage"],useEngine:!0},backgroundRepeat:{value:["background","backgroundRepeat"],support:["background","backgroundRepeat"],useEngine:!0},backgroundSize:{value:["background","backgroundSize"],support:["background","backgroundSize"],useEngine:!0},backgroundPosition:{value:["background","backgroundPosition"],support:["background","backgroundPosition"],useEngine:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"},useEngine:!0},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"],useEngine:!0},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"],useEngine:!0},borderTopColor:{value:["border","top","color"],support:["__experimentalBorder","color"],useEngine:!0},borderTopStyle:{value:["border","top","style"],support:["__experimentalBorder","style"],useEngine:!0},borderTopWidth:{value:["border","top","width"],support:["__experimentalBorder","width"],useEngine:!0},borderRightColor:{value:["border","right","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRightStyle:{value:["border","right","style"],support:["__experimentalBorder","style"],useEngine:!0},borderRightWidth:{value:["border","right","width"],support:["__experimentalBorder","width"],useEngine:!0},borderBottomColor:{value:["border","bottom","color"],support:["__experimentalBorder","color"],useEngine:!0},borderBottomStyle:{value:["border","bottom","style"],support:["__experimentalBorder","style"],useEngine:!0},borderBottomWidth:{value:["border","bottom","width"],support:["__experimentalBorder","width"],useEngine:!0},borderLeftColor:{value:["border","left","color"],support:["__experimentalBorder","color"],useEngine:!0},borderLeftStyle:{value:["border","left","style"],support:["__experimentalBorder","style"],useEngine:!0},borderLeftWidth:{value:["border","left","width"],support:["__experimentalBorder","width"],useEngine:!0},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0,useEngine:!0},columnCount:{value:["typography","textColumns"],support:["typography","textColumns"],useEngine:!0},filter:{value:["filter","duotone"],support:["filter","duotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},captionColor:{value:["elements","caption","color","text"],support:["color","caption"]},buttonColor:{value:["elements","button","color","text"],support:["color","button"]},buttonBackgroundColor:{value:["elements","button","color","background"],support:["color","button"]},headingColor:{value:["elements","heading","color","text"],support:["color","heading"]},headingBackgroundColor:{value:["elements","heading","color","background"],support:["color","heading"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"],useEngine:!0},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"],useEngine:!0},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"],useEngine:!0},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"],useEngine:!0},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"],useEngine:!0},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},minHeight:{value:["dimensions","minHeight"],support:["dimensions","minHeight"],useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textAlign:{value:["typography","textAlign"],support:["typography","textAlign"],useEngine:!1},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"],useEngine:!0},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"],useEngine:!0},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"],useEngine:!0},writingMode:{value:["typography","writingMode"],support:["typography","__experimentalWritingMode"],useEngine:!0},"--wp--style--root--padding":{value:["spacing","padding"],support:["spacing","padding"],properties:{"--wp--style--root--padding-top":"top","--wp--style--root--padding-right":"right","--wp--style--root--padding-bottom":"bottom","--wp--style--root--padding-left":"left"},rootOnly:!0}},Za={link:"a:where(:not(.wp-element-button))",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite"},aLe={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"dimensions.aspectRatios":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0},{lock:cLe,unlock:Mf}=P0("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/blocks"),JU={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]};function K4(e){return e!==null&&typeof e=="object"}function lLe({textdomain:e,...t}){const n=["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","selectors","supports","styles","example","variations","blockHooks","allowedBlocks"],o=Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)));return e&&Object.keys(JU).forEach(r=>{o[r]&&(o[r]=JE(JU[r],o[r],e))}),o}function uLe(e,t){const n=K4(e)?e.name:e;if(typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&zn("Block names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n)){globalThis.SCRIPT_DEBUG===!0&&zn("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");return}if(uo(kt).getBlockType(n)){globalThis.SCRIPT_DEBUG===!0&&zn('Block "'+n+'" is already registered.');return}const{addBootstrappedBlockType:o,addUnprocessedBlockType:r}=Mf(kr(kt));if(K4(e)){const s=lLe(e);o(n,s)}return r(n,t),uo(kt).getBlockType(n)}function JE(e,t,n){return typeof e=="string"&&typeof t=="string"?We(t,e,n):Array.isArray(e)&&e.length&&Array.isArray(t)?t.map(o=>JE(e[0],o,n)):K4(e)&&Object.entries(e).length&&K4(t)?Object.keys(t).reduce((o,r)=>e[r]?(o[r]=JE(e[r],t[r],n),o):(o[r]=t[r],o),{}):t}function dLe(e){kr(kt).setFreeformFallbackBlockName(e)}function yd(){return uo(kt).getFreeformFallbackBlockName()}function iie(){return uo(kt).getGroupingBlockName()}function pLe(e){kr(kt).setUnregisteredFallbackBlockName(e)}function g3(){return uo(kt).getUnregisteredFallbackBlockName()}function fLe(e){kr(kt).setDefaultBlockName(e)}function bLe(e){kr(kt).setGroupingBlockName(e)}function Mr(){return uo(kt).getDefaultBlockName()}function on(e){return uo(kt)?.getBlockType(e)}function gs(){return uo(kt).getBlockTypes()}function An(e,t,n){return uo(kt).getBlockSupport(e,t,n)}function Et(e,t,n){return uo(kt).hasBlockSupport(e,t,n)}function Qd(e){return e?.name==="core/block"}function Hh(e){return e?.name==="core/template-part"}const Q5=(e,t)=>uo(kt).getBlockVariations(e,t),eX=e=>{const{name:t,label:n,usesContext:o,getValues:r,setValues:s,canUserEditValue:i,getFieldsList:c}=e,l=Mf(uo(kt)).getBlockBindingsSource(t),u=["label","usesContext"];for(const d in l)if(!u.includes(d)&&l[d]){globalThis.SCRIPT_DEBUG===!0&&zn('Block bindings source "'+t+'" is already registered.');return}if(!t){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source must contain a name.");return}if(typeof t!="string"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source name must be a string.");return}if(/[A-Z]+/.test(t)){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source name must not contain uppercase characters.");return}if(!/^[a-z0-9/-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source name must contain only valid characters: lowercase characters, hyphens, or digits. Example: my-plugin/my-custom-source.");return}if(!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source name must contain a namespace and valid characters. Example: my-plugin/my-custom-source.");return}if(!n&&!l?.label){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source must contain a label.");return}if(n&&typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source label must be a string.");return}if(n&&l?.label&&n!==l?.label&&globalThis.SCRIPT_DEBUG===!0&&zn('Block bindings "'+t+'" source label was overridden.'),o&&!Array.isArray(o)){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source usesContext must be an array.");return}if(r&&typeof r!="function"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source getValues must be a function.");return}if(s&&typeof s!="function"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source setValues must be a function.");return}if(i&&typeof i!="function"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source canUserEditValue must be a function.");return}if(c&&typeof c!="function"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source getFieldsList must be a function.");return}return Mf(kr(kt)).addBlockBindingsSource(e)};function xl(e){return Mf(uo(kt)).getBlockBindingsSource(e)}function aie(){return Mf(uo(kt)).getAllBlockBindingsSources()}Xs([Gs,Uf]);const tX=["#191e23","#f8f9f9"];function E2(e){var t;return Object.entries((t=on(e.name)?.attributes)!==null&&t!==void 0?t:{}).every(([n,o])=>{const r=e.attributes[n];return o.hasOwnProperty("default")?r===o.default:o.type==="rich-text"?!r?.length:r===void 0})}function Wl(e){return e.name===Mr()&&E2(e)}function cie(e){return!!e&&(typeof e=="string"||x.isValidElement(e)||typeof e=="function"||e instanceof x.Component)}function hLe(e){if(e=e||sie,cie(e))return{src:e};if("background"in e){const t=an(e.background),n=r=>t.contrast(r),o=Math.max(...tX.map(n));return{...e,foreground:e.foreground?e.foreground:tX.find(r=>n(r)===o),shadowColor:t.alpha(.3).toRgbString()}}return e}function M3(e){return typeof e=="string"?on(e):e}function lie(e,t,n="visual"){const{__experimentalLabel:o,title:r}=e,s=o&&o(t,{context:n});return s?s.toPlainText?s.toPlainText():v1(s):r}function uie(e){if(e.default!==void 0)return e.default;if(e.type==="rich-text")return new Xo}function die(e){return on(e)!==void 0}function BB(e,t){const n=on(e);if(n===void 0)throw new Error(`Block type '${e}' is not registered.`);return Object.entries(n.attributes).reduce((o,[r,s])=>{const i=t[r];if(i!==void 0)s.type==="rich-text"?i instanceof Xo?o[r]=i:typeof i=="string"&&(o[r]=Xo.fromHTMLString(i)):s.type==="string"&&i instanceof Xo?o[r]=i.toHTMLString():o[r]=i;else{const c=uie(s);c!==void 0&&(o[r]=c)}return["node","children"].indexOf(s.source)!==-1&&(typeof o[r]=="string"?o[r]=[o[r]]:Array.isArray(o[r])||(o[r]=[])),o},{})}function mLe(e,t){const n=on(e)?.attributes;return n?Object.keys(n).filter(r=>{const s=n[r];return s?.role===t?!0:s?.__experimentalRole===t?(Ke("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${e} block.`}),!0):!1}):[]}function gLe(e){const t=on(e)?.attributes;return t?!!Object.keys(t)?.some(n=>{const o=t[n];return o?.role==="content"||o?.__experimentalRole==="content"}):!1}function Xf(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}const MLe=[{slug:"text",title:m("Text")},{slug:"media",title:m("Media")},{slug:"design",title:m("Design")},{slug:"widgets",title:m("Widgets")},{slug:"theme",title:m("Theme")},{slug:"embed",title:m("Embeds")},{slug:"reusable",title:m("Reusable blocks")}];function LB(e){return e.reduce((t,n)=>({...t,[n.name]:n}),{})}function Y4(e){return e.reduce((t,n)=>(t.some(o=>o.name===n.name)||t.push(n),t),[])}function zLe(e={},t){switch(t.type){case"ADD_BOOTSTRAPPED_BLOCK_TYPE":const{name:n,blockType:o}=t,r=e[n];let s;return r?(r.blockHooks===void 0&&o.blockHooks&&(s={...r,...s,blockHooks:o.blockHooks}),r.allowedBlocks===void 0&&o.allowedBlocks&&(s={...r,...s,allowedBlocks:o.allowedBlocks})):(s=Object.fromEntries(Object.entries(o).filter(([,i])=>i!=null).map(([i,c])=>[RN(i),c])),s.name=n),s?{...e,[n]:s}:e;case"REMOVE_BLOCK_TYPES":return Xf(e,t.names)}return e}function OLe(e={},t){switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return Xf(e,t.names)}return e}function yLe(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...LB(t.blockTypes)};case"REMOVE_BLOCK_TYPES":return Xf(e,t.names)}return e}function ALe(e={},t){var n;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(LB(t.blockTypes)).map(([r,s])=>{var i,c;return[r,Y4([...((i=s.styles)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_STYLES":const o={};return t.blockNames.forEach(r=>{var s;o[r]=Y4([...(s=e[r])!==null&&s!==void 0?s:[],...t.styles])}),{...e,...o};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:((n=e[t.blockName])!==null&&n!==void 0?n:[]).filter(r=>t.styleNames.indexOf(r.name)===-1)}}return e}function vLe(e={},t){var n,o;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(LB(t.blockTypes)).map(([r,s])=>{var i,c;return[r,Y4([...((i=s.variations)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:Y4([...(n=e[t.blockName])!==null&&n!==void 0?n:[],...t.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:((o=e[t.blockName])!==null&&o!==void 0?o:[]).filter(r=>t.variationNames.indexOf(r.name)===-1)}}return e}function J5(e){return(t=null,n)=>{switch(n.type){case"REMOVE_BLOCK_TYPES":return n.names.indexOf(t)!==-1?null:t;case e:return n.name||null}return t}}const xLe=J5("SET_DEFAULT_BLOCK_NAME"),wLe=J5("SET_FREEFORM_FALLBACK_BLOCK_NAME"),_Le=J5("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),kLe=J5("SET_GROUPING_BLOCK_NAME");function SLe(e=MLe,t){switch(t.type){case"SET_CATEGORIES":const n=new Map;return(t.categories||[]).forEach(o=>{n.set(o.slug,o)}),[...n.values()];case"UPDATE_CATEGORY":{if(!t.category||!Object.keys(t.category).length)return e;if(e.find(({slug:r})=>r===t.slug))return e.map(r=>r.slug===t.slug?{...r,...t.category}:r)}}return e}function CLe(e={},t){switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return Xf(e,t.namespace)}return e}function qLe(e=[],t=[]){const n=Array.from(new Set(e.concat(t)));return n.length>0?n:void 0}function RLe(e={},t){switch(t.type){case"ADD_BLOCK_BINDINGS_SOURCE":let n;return(globalThis.IS_GUTENBERG_PLUGIN||t.name==="core/post-meta")&&(n=t.getFieldsList),{...e,[t.name]:{label:t.label||e[t.name]?.label,usesContext:qLe(e[t.name]?.usesContext,t.usesContext),getValues:t.getValues,setValues:t.setValues,canUserEditValue:t.setValues&&t.canUserEditValue,getFieldsList:n}};case"REMOVE_BLOCK_BINDINGS_SOURCE":return Xf(e,t.name)}return e}const TLe=J0({bootstrappedBlockTypes:zLe,unprocessedBlockTypes:OLe,blockTypes:yLe,blockStyles:ALe,blockVariations:vLe,defaultBlockName:xLe,freeformFallbackBlockName:wLe,unregisteredFallbackBlockName:_Le,groupingBlockName:kLe,categories:SLe,collections:CLe,blockBindingsSources:RLe}),JM=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let s=e;return r.forEach(i=>{s=s?.[i]}),(o=s)!==null&&o!==void 0?o:n};function nX(e){return typeof e=="object"&&e.constructor===Object&&e!==null}function pie(e,t){return nX(e)&&nX(t)?Object.entries(t).every(([n,o])=>pie(e?.[n],o)):e===t}const ELe=["background","backgroundColor","color","linkColor","captionColor","buttonColor","headingColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","padding","contentSize","wideSize","blockGap","textDecoration","textTransform","letterSpacing"];function oX(e,t,n){return e.filter(o=>!(o==="fontSize"&&n==="heading"||o==="textDecoration"&&!t&&n!=="link"||o==="textTransform"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="letterSpacing"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="textColumns"&&!t))}const WLe=It((e,t,n)=>{if(!t)return oX(ELe,t,n);const o=z3(e,t);if(!o)return[];const r=[];return o?.supports?.spacing?.blockGap&&r.push("blockGap"),o?.supports?.shadow&&r.push("shadow"),Object.keys(Pp).forEach(s=>{if(Pp[s].support){if(Pp[s].requiresOptOut&&Pp[s].support[0]in o.supports&&JM(o.supports,Pp[s].support)!==!1){r.push(s);return}JM(o.supports,Pp[s].support,!1)&&r.push(s)}}),oX(r,t,n)},(e,t)=>[e.blockTypes[t]]);function NLe(e,t){return e.bootstrappedBlockTypes[t]}function BLe(e){return e.unprocessedBlockTypes}function LLe(e){return e.blockBindingsSources}function PLe(e,t){return e.blockBindingsSources[t]}const fie=(e,t)=>{const n=z3(e,t);return n?Object.values(n.attributes).some(({role:o,__experimentalRole:r})=>o==="content"?!0:r==="content"?(Ke("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${t} block.`}),!0):!1):!1},jLe=Object.freeze(Object.defineProperty({__proto__:null,getAllBlockBindingsSources:LLe,getBlockBindingsSource:PLe,getBootstrappedBlockType:NLe,getSupportedStyles:WLe,getUnprocessedBlockTypes:BLe,hasContentRoleAttribute:fie},Symbol.toStringTag,{value:"Module"})),bie=(e,t)=>typeof t=="string"?z3(e,t):t,hie=It(e=>Object.values(e.blockTypes),e=>[e.blockTypes]);function z3(e,t){return e.blockTypes[t]}function ILe(e,t){return e.blockStyles[t]}const PB=It((e,t,n)=>{const o=e.blockVariations[t];return!o||!n?o:o.filter(r=>(r.scope||["block","inserter"]).includes(n))},(e,t)=>[e.blockVariations[t]]);function DLe(e,t,n,o){const r=PB(e,t,o);if(!r)return r;const s=z3(e,t),i=Object.keys(s?.attributes||{});let c,l=0;for(const u of r)if(Array.isArray(u.isActive)){const d=u.isActive.filter(b=>{const h=b.split(".")[0];return i.includes(h)}),p=d.length;if(p===0)continue;d.every(b=>{const h=JM(u.attributes,b);if(h===void 0)return!1;let g=JM(n,b);return g instanceof Xo&&(g=g.toHTMLString()),pie(g,h)})&&p>l&&(c=u,l=p)}else if(u.isActive?.(n,u.attributes))return c||u;return c}function FLe(e,t,n){const o=PB(e,t,n);return[...o].reverse().find(({isDefault:s})=>!!s)||o[0]}function $Le(e){return e.categories}function VLe(e){return e.collections}function HLe(e){return e.defaultBlockName}function ULe(e){return e.freeformFallbackBlockName}function XLe(e){return e.unregisteredFallbackBlockName}function GLe(e){return e.groupingBlockName}const jB=It((e,t)=>hie(e).filter(n=>n.parent?.includes(t)).map(({name:n})=>n),e=>[e.blockTypes]),mie=(e,t,n,o)=>{const r=bie(e,t);return r?.supports?JM(r.supports,n,o):o};function gie(e,t,n,o){return!!mie(e,t,n,o)}function rX(e){return ms(e??"").toLowerCase().trim()}function KLe(e,t,n=""){const o=bie(e,t),r=rX(n),s=i=>rX(i).includes(r);return s(o.title)||o.keywords?.some(s)||s(o.category)||typeof o.description=="string"&&s(o.description)}const YLe=(e,t)=>jB(e,t).length>0,ZLe=(e,t)=>jB(e,t).some(n=>gie(e,n,"inserter",!0)),QLe=(...e)=>(Ke("__experimentalHasContentRoleAttribute",{since:"6.7",version:"6.8",hint:"This is a private selector."}),fie(...e)),JLe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalHasContentRoleAttribute:QLe,getActiveBlockVariation:DLe,getBlockStyles:ILe,getBlockSupport:mie,getBlockType:z3,getBlockTypes:hie,getBlockVariations:PB,getCategories:$Le,getChildBlockNames:jB,getCollections:VLe,getDefaultBlockName:HLe,getDefaultBlockVariation:FLe,getFreeformFallbackBlockName:ULe,getGroupingBlockName:GLe,getUnregisteredFallbackBlockName:XLe,hasBlockSupport:gie,hasChildBlocks:YLe,hasChildBlocksWithInserterSupport:ZLe,isMatchingSearchTerm:KLe},Symbol.toStringTag,{value:"Module"}));var tC={exports:{}},ko={};/** + */(function(e){const t=F5,n=fB,o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=d,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;const r=2147483647;e.kMaxLength=r;const{Uint8Array:s,ArrayBuffer:i,SharedArrayBuffer:c}=globalThis;d.TYPED_ARRAY_SUPPORT=l(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const ae=new s(1),H={foo:function(){return 42}};return Object.setPrototypeOf(H,s.prototype),Object.setPrototypeOf(ae,H),ae.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function u(ae){if(ae>r)throw new RangeError('The value "'+ae+'" is invalid for option "size"');const H=new s(ae);return Object.setPrototypeOf(H,d.prototype),H}function d(ae,H,Y){if(typeof ae=="number"){if(typeof H=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(ae)}return p(ae,H,Y)}d.poolSize=8192;function p(ae,H,Y){if(typeof ae=="string")return g(ae,H);if(i.isView(ae))return A(ae);if(ae==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ae);if(Pe(ae,i)||ae&&Pe(ae.buffer,i)||typeof c<"u"&&(Pe(ae,c)||ae&&Pe(ae.buffer,c)))return _(ae,H,Y);if(typeof ae=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const fe=ae.valueOf&&ae.valueOf();if(fe!=null&&fe!==ae)return d.from(fe,H,Y);const Re=v(ae);if(Re)return Re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ae[Symbol.toPrimitive]=="function")return d.from(ae[Symbol.toPrimitive]("string"),H,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ae)}d.from=function(ae,H,Y){return p(ae,H,Y)},Object.setPrototypeOf(d.prototype,s.prototype),Object.setPrototypeOf(d,s);function f(ae){if(typeof ae!="number")throw new TypeError('"size" argument must be of type number');if(ae<0)throw new RangeError('The value "'+ae+'" is invalid for option "size"')}function b(ae,H,Y){return f(ae),ae<=0?u(ae):H!==void 0?typeof Y=="string"?u(ae).fill(H,Y):u(ae).fill(H):u(ae)}d.alloc=function(ae,H,Y){return b(ae,H,Y)};function h(ae){return f(ae),u(ae<0?0:M(ae)|0)}d.allocUnsafe=function(ae){return h(ae)},d.allocUnsafeSlow=function(ae){return h(ae)};function g(ae,H){if((typeof H!="string"||H==="")&&(H="utf8"),!d.isEncoding(H))throw new TypeError("Unknown encoding: "+H);const Y=k(ae,H)|0;let fe=u(Y);const Re=fe.write(ae,H);return Re!==Y&&(fe=fe.slice(0,Re)),fe}function z(ae){const H=ae.length<0?0:M(ae.length)|0,Y=u(H);for(let fe=0;fe=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return ae|0}function y(ae){return+ae!=ae&&(ae=0),d.alloc(+ae)}d.isBuffer=function(H){return H!=null&&H._isBuffer===!0&&H!==d.prototype},d.compare=function(H,Y){if(Pe(H,s)&&(H=d.from(H,H.offset,H.byteLength)),Pe(Y,s)&&(Y=d.from(Y,Y.offset,Y.byteLength)),!d.isBuffer(H)||!d.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(H===Y)return 0;let fe=H.length,Re=Y.length;for(let be=0,ze=Math.min(fe,Re);beRe.length?(d.isBuffer(ze)||(ze=d.from(ze)),ze.copy(Re,be)):s.prototype.set.call(Re,ze,be);else if(d.isBuffer(ze))ze.copy(Re,be);else throw new TypeError('"list" argument must be an Array of Buffers');be+=ze.length}return Re};function k(ae,H){if(d.isBuffer(ae))return ae.length;if(i.isView(ae)||Pe(ae,i))return ae.byteLength;if(typeof ae!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ae);const Y=ae.length,fe=arguments.length>2&&arguments[2]===!0;if(!fe&&Y===0)return 0;let Re=!1;for(;;)switch(H){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return L(ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return ve(ae).length;default:if(Re)return fe?-1:L(ae).length;H=(""+H).toLowerCase(),Re=!0}}d.byteLength=k;function S(ae,H,Y){let fe=!1;if((H===void 0||H<0)&&(H=0),H>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,H>>>=0,Y<=H))return"";for(ae||(ae="utf8");;)switch(ae){case"hex":return ee(this,H,Y);case"utf8":case"utf-8":return $(this,H,Y);case"ascii":return Z(this,H,Y);case"latin1":case"binary":return V(this,H,Y);case"base64":return P(this,H,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,H,Y);default:if(fe)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),fe=!0}}d.prototype._isBuffer=!0;function C(ae,H,Y){const fe=ae[H];ae[H]=ae[Y],ae[Y]=fe}d.prototype.swap16=function(){const H=this.length;if(H%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;YY&&(H+=" ... "),""},o&&(d.prototype[o]=d.prototype.inspect),d.prototype.compare=function(H,Y,fe,Re,be){if(Pe(H,s)&&(H=d.from(H,H.offset,H.byteLength)),!d.isBuffer(H))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof H);if(Y===void 0&&(Y=0),fe===void 0&&(fe=H?H.length:0),Re===void 0&&(Re=0),be===void 0&&(be=this.length),Y<0||fe>H.length||Re<0||be>this.length)throw new RangeError("out of range index");if(Re>=be&&Y>=fe)return 0;if(Re>=be)return-1;if(Y>=fe)return 1;if(Y>>>=0,fe>>>=0,Re>>>=0,be>>>=0,this===H)return 0;let ze=be-Re,nt=fe-Y;const Mt=Math.min(ze,nt),ot=this.slice(Re,be),Ue=H.slice(Y,fe);for(let yt=0;yt2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,rt(Y)&&(Y=Re?0:ae.length-1),Y<0&&(Y=ae.length+Y),Y>=ae.length){if(Re)return-1;Y=ae.length-1}else if(Y<0)if(Re)Y=0;else return-1;if(typeof H=="string"&&(H=d.from(H,fe)),d.isBuffer(H))return H.length===0?-1:T(ae,H,Y,fe,Re);if(typeof H=="number")return H=H&255,typeof s.prototype.indexOf=="function"?Re?s.prototype.indexOf.call(ae,H,Y):s.prototype.lastIndexOf.call(ae,H,Y):T(ae,[H],Y,fe,Re);throw new TypeError("val must be string, number or Buffer")}function T(ae,H,Y,fe,Re){let be=1,ze=ae.length,nt=H.length;if(fe!==void 0&&(fe=String(fe).toLowerCase(),fe==="ucs2"||fe==="ucs-2"||fe==="utf16le"||fe==="utf-16le")){if(ae.length<2||H.length<2)return-1;be=2,ze/=2,nt/=2,Y/=2}function Mt(Ue,yt){return be===1?Ue[yt]:Ue.readUInt16BE(yt*be)}let ot;if(Re){let Ue=-1;for(ot=Y;otze&&(Y=ze-nt),ot=Y;ot>=0;ot--){let Ue=!0;for(let yt=0;ytRe&&(fe=Re)):fe=Re;const be=H.length;fe>be/2&&(fe=be/2);let ze;for(ze=0;ze>>0,isFinite(fe)?(fe=fe>>>0,Re===void 0&&(Re="utf8")):(Re=fe,fe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const be=this.length-Y;if((fe===void 0||fe>be)&&(fe=be),H.length>0&&(fe<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");Re||(Re="utf8");let ze=!1;for(;;)switch(Re){case"hex":return E(this,H,Y,fe);case"utf8":case"utf-8":return B(this,H,Y,fe);case"ascii":case"latin1":case"binary":return N(this,H,Y,fe);case"base64":return j(this,H,Y,fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,H,Y,fe);default:if(ze)throw new TypeError("Unknown encoding: "+Re);Re=(""+Re).toLowerCase(),ze=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(ae,H,Y){return H===0&&Y===ae.length?t.fromByteArray(ae):t.fromByteArray(ae.slice(H,Y))}function $(ae,H,Y){Y=Math.min(ae.length,Y);const fe=[];let Re=H;for(;Re239?4:be>223?3:be>191?2:1;if(Re+nt<=Y){let Mt,ot,Ue,yt;switch(nt){case 1:be<128&&(ze=be);break;case 2:Mt=ae[Re+1],(Mt&192)===128&&(yt=(be&31)<<6|Mt&63,yt>127&&(ze=yt));break;case 3:Mt=ae[Re+1],ot=ae[Re+2],(Mt&192)===128&&(ot&192)===128&&(yt=(be&15)<<12|(Mt&63)<<6|ot&63,yt>2047&&(yt<55296||yt>57343)&&(ze=yt));break;case 4:Mt=ae[Re+1],ot=ae[Re+2],Ue=ae[Re+3],(Mt&192)===128&&(ot&192)===128&&(Ue&192)===128&&(yt=(be&15)<<18|(Mt&63)<<12|(ot&63)<<6|Ue&63,yt>65535&&yt<1114112&&(ze=yt))}}ze===null?(ze=65533,nt=1):ze>65535&&(ze-=65536,fe.push(ze>>>10&1023|55296),ze=56320|ze&1023),fe.push(ze),Re+=nt}return X(fe)}const F=4096;function X(ae){const H=ae.length;if(H<=F)return String.fromCharCode.apply(String,ae);let Y="",fe=0;for(;fefe)&&(Y=fe);let Re="";for(let be=H;befe&&(H=fe),Y<0?(Y+=fe,Y<0&&(Y=0)):Y>fe&&(Y=fe),YY)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(H,Y,fe){H=H>>>0,Y=Y>>>0,fe||J(H,Y,this.length);let Re=this[H],be=1,ze=0;for(;++ze>>0,Y=Y>>>0,fe||J(H,Y,this.length);let Re=this[H+--Y],be=1;for(;Y>0&&(be*=256);)Re+=this[H+--Y]*be;return Re},d.prototype.readUint8=d.prototype.readUInt8=function(H,Y){return H=H>>>0,Y||J(H,1,this.length),this[H]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(H,Y){return H=H>>>0,Y||J(H,2,this.length),this[H]|this[H+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(H,Y){return H=H>>>0,Y||J(H,2,this.length),this[H]<<8|this[H+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),(this[H]|this[H+1]<<8|this[H+2]<<16)+this[H+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),this[H]*16777216+(this[H+1]<<16|this[H+2]<<8|this[H+3])},d.prototype.readBigUInt64LE=wt(function(H){H=H>>>0,pe(H,"offset");const Y=this[H],fe=this[H+7];(Y===void 0||fe===void 0)&&ke(H,this.length-8);const Re=Y+this[++H]*2**8+this[++H]*2**16+this[++H]*2**24,be=this[++H]+this[++H]*2**8+this[++H]*2**16+fe*2**24;return BigInt(Re)+(BigInt(be)<>>0,pe(H,"offset");const Y=this[H],fe=this[H+7];(Y===void 0||fe===void 0)&&ke(H,this.length-8);const Re=Y*2**24+this[++H]*2**16+this[++H]*2**8+this[++H],be=this[++H]*2**24+this[++H]*2**16+this[++H]*2**8+fe;return(BigInt(Re)<>>0,Y=Y>>>0,fe||J(H,Y,this.length);let Re=this[H],be=1,ze=0;for(;++ze=be&&(Re-=Math.pow(2,8*Y)),Re},d.prototype.readIntBE=function(H,Y,fe){H=H>>>0,Y=Y>>>0,fe||J(H,Y,this.length);let Re=Y,be=1,ze=this[H+--Re];for(;Re>0&&(be*=256);)ze+=this[H+--Re]*be;return be*=128,ze>=be&&(ze-=Math.pow(2,8*Y)),ze},d.prototype.readInt8=function(H,Y){return H=H>>>0,Y||J(H,1,this.length),this[H]&128?(255-this[H]+1)*-1:this[H]},d.prototype.readInt16LE=function(H,Y){H=H>>>0,Y||J(H,2,this.length);const fe=this[H]|this[H+1]<<8;return fe&32768?fe|4294901760:fe},d.prototype.readInt16BE=function(H,Y){H=H>>>0,Y||J(H,2,this.length);const fe=this[H+1]|this[H]<<8;return fe&32768?fe|4294901760:fe},d.prototype.readInt32LE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),this[H]|this[H+1]<<8|this[H+2]<<16|this[H+3]<<24},d.prototype.readInt32BE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),this[H]<<24|this[H+1]<<16|this[H+2]<<8|this[H+3]},d.prototype.readBigInt64LE=wt(function(H){H=H>>>0,pe(H,"offset");const Y=this[H],fe=this[H+7];(Y===void 0||fe===void 0)&&ke(H,this.length-8);const Re=this[H+4]+this[H+5]*2**8+this[H+6]*2**16+(fe<<24);return(BigInt(Re)<>>0,pe(H,"offset");const Y=this[H],fe=this[H+7];(Y===void 0||fe===void 0)&&ke(H,this.length-8);const Re=(Y<<24)+this[++H]*2**16+this[++H]*2**8+this[++H];return(BigInt(Re)<>>0,Y||J(H,4,this.length),n.read(this,H,!0,23,4)},d.prototype.readFloatBE=function(H,Y){return H=H>>>0,Y||J(H,4,this.length),n.read(this,H,!1,23,4)},d.prototype.readDoubleLE=function(H,Y){return H=H>>>0,Y||J(H,8,this.length),n.read(this,H,!0,52,8)},d.prototype.readDoubleBE=function(H,Y){return H=H>>>0,Y||J(H,8,this.length),n.read(this,H,!1,52,8)};function ue(ae,H,Y,fe,Re,be){if(!d.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(H>Re||Hae.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(H,Y,fe,Re){if(H=+H,Y=Y>>>0,fe=fe>>>0,!Re){const nt=Math.pow(2,8*fe)-1;ue(this,H,Y,fe,nt,0)}let be=1,ze=0;for(this[Y]=H&255;++ze>>0,fe=fe>>>0,!Re){const nt=Math.pow(2,8*fe)-1;ue(this,H,Y,fe,nt,0)}let be=fe-1,ze=1;for(this[Y+be]=H&255;--be>=0&&(ze*=256);)this[Y+be]=H/ze&255;return Y+fe},d.prototype.writeUint8=d.prototype.writeUInt8=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,1,255,0),this[Y]=H&255,Y+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,2,65535,0),this[Y]=H&255,this[Y+1]=H>>>8,Y+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,2,65535,0),this[Y]=H>>>8,this[Y+1]=H&255,Y+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,4,4294967295,0),this[Y+3]=H>>>24,this[Y+2]=H>>>16,this[Y+1]=H>>>8,this[Y]=H&255,Y+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,4,4294967295,0),this[Y]=H>>>24,this[Y+1]=H>>>16,this[Y+2]=H>>>8,this[Y+3]=H&255,Y+4};function ce(ae,H,Y,fe,Re){re(H,fe,Re,ae,Y,7);let be=Number(H&BigInt(4294967295));ae[Y++]=be,be=be>>8,ae[Y++]=be,be=be>>8,ae[Y++]=be,be=be>>8,ae[Y++]=be;let ze=Number(H>>BigInt(32)&BigInt(4294967295));return ae[Y++]=ze,ze=ze>>8,ae[Y++]=ze,ze=ze>>8,ae[Y++]=ze,ze=ze>>8,ae[Y++]=ze,Y}function me(ae,H,Y,fe,Re){re(H,fe,Re,ae,Y,7);let be=Number(H&BigInt(4294967295));ae[Y+7]=be,be=be>>8,ae[Y+6]=be,be=be>>8,ae[Y+5]=be,be=be>>8,ae[Y+4]=be;let ze=Number(H>>BigInt(32)&BigInt(4294967295));return ae[Y+3]=ze,ze=ze>>8,ae[Y+2]=ze,ze=ze>>8,ae[Y+1]=ze,ze=ze>>8,ae[Y]=ze,Y+8}d.prototype.writeBigUInt64LE=wt(function(H,Y=0){return ce(this,H,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=wt(function(H,Y=0){return me(this,H,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(H,Y,fe,Re){if(H=+H,Y=Y>>>0,!Re){const Mt=Math.pow(2,8*fe-1);ue(this,H,Y,fe,Mt-1,-Mt)}let be=0,ze=1,nt=0;for(this[Y]=H&255;++be>0)-nt&255;return Y+fe},d.prototype.writeIntBE=function(H,Y,fe,Re){if(H=+H,Y=Y>>>0,!Re){const Mt=Math.pow(2,8*fe-1);ue(this,H,Y,fe,Mt-1,-Mt)}let be=fe-1,ze=1,nt=0;for(this[Y+be]=H&255;--be>=0&&(ze*=256);)H<0&&nt===0&&this[Y+be+1]!==0&&(nt=1),this[Y+be]=(H/ze>>0)-nt&255;return Y+fe},d.prototype.writeInt8=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,1,127,-128),H<0&&(H=255+H+1),this[Y]=H&255,Y+1},d.prototype.writeInt16LE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,2,32767,-32768),this[Y]=H&255,this[Y+1]=H>>>8,Y+2},d.prototype.writeInt16BE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,2,32767,-32768),this[Y]=H>>>8,this[Y+1]=H&255,Y+2},d.prototype.writeInt32LE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,4,2147483647,-2147483648),this[Y]=H&255,this[Y+1]=H>>>8,this[Y+2]=H>>>16,this[Y+3]=H>>>24,Y+4},d.prototype.writeInt32BE=function(H,Y,fe){return H=+H,Y=Y>>>0,fe||ue(this,H,Y,4,2147483647,-2147483648),H<0&&(H=4294967295+H+1),this[Y]=H>>>24,this[Y+1]=H>>>16,this[Y+2]=H>>>8,this[Y+3]=H&255,Y+4},d.prototype.writeBigInt64LE=wt(function(H,Y=0){return ce(this,H,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=wt(function(H,Y=0){return me(this,H,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(ae,H,Y,fe,Re,be){if(Y+fe>ae.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function Ae(ae,H,Y,fe,Re){return H=+H,Y=Y>>>0,Re||de(ae,H,Y,4),n.write(ae,H,Y,fe,23,4),Y+4}d.prototype.writeFloatLE=function(H,Y,fe){return Ae(this,H,Y,!0,fe)},d.prototype.writeFloatBE=function(H,Y,fe){return Ae(this,H,Y,!1,fe)};function ye(ae,H,Y,fe,Re){return H=+H,Y=Y>>>0,Re||de(ae,H,Y,8),n.write(ae,H,Y,fe,52,8),Y+8}d.prototype.writeDoubleLE=function(H,Y,fe){return ye(this,H,Y,!0,fe)},d.prototype.writeDoubleBE=function(H,Y,fe){return ye(this,H,Y,!1,fe)},d.prototype.copy=function(H,Y,fe,Re){if(!d.isBuffer(H))throw new TypeError("argument should be a Buffer");if(fe||(fe=0),!Re&&Re!==0&&(Re=this.length),Y>=H.length&&(Y=H.length),Y||(Y=0),Re>0&&Re=this.length)throw new RangeError("Index out of range");if(Re<0)throw new RangeError("sourceEnd out of bounds");Re>this.length&&(Re=this.length),H.length-Y>>0,fe=fe===void 0?this.length:fe>>>0,H||(H=0);let be;if(typeof H=="number")for(be=Y;be2**32?Re=ie(String(Y)):typeof Y=="bigint"&&(Re=String(Y),(Y>BigInt(2)**BigInt(32)||Y<-(BigInt(2)**BigInt(32)))&&(Re=ie(Re)),Re+="n"),fe+=` It must be ${H}. Received ${Re}`,fe},RangeError);function ie(ae){let H="",Y=ae.length;const fe=ae[0]==="-"?1:0;for(;Y>=fe+4;Y-=3)H=`_${ae.slice(Y-3,Y)}${H}`;return`${ae.slice(0,Y)}${H}`}function we(ae,H,Y){pe(H,"offset"),(ae[H]===void 0||ae[H+Y]===void 0)&&ke(H,ae.length-(Y+1))}function re(ae,H,Y,fe,Re,be){if(ae>Y||ae= 0${ze} and < 2${ze} ** ${(be+1)*8}${ze}`:nt=`>= -(2${ze} ** ${(be+1)*8-1}${ze}) and < 2 ** ${(be+1)*8-1}${ze}`,new Ne.ERR_OUT_OF_RANGE("value",nt,ae)}we(fe,Re,be)}function pe(ae,H){if(typeof ae!="number")throw new Ne.ERR_INVALID_ARG_TYPE(H,"number",ae)}function ke(ae,H,Y){throw Math.floor(ae)!==ae?(pe(ae,Y),new Ne.ERR_OUT_OF_RANGE("offset","an integer",ae)):H<0?new Ne.ERR_BUFFER_OUT_OF_BOUNDS:new Ne.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${H}`,ae)}const Se=/[^+/0-9A-Za-z-_]/g;function se(ae){if(ae=ae.split("=")[0],ae=ae.trim().replace(Se,""),ae.length<2)return"";for(;ae.length%4!==0;)ae=ae+"=";return ae}function L(ae,H){H=H||1/0;let Y;const fe=ae.length;let Re=null;const be=[];for(let ze=0;ze55295&&Y<57344){if(!Re){if(Y>56319){(H-=3)>-1&&be.push(239,191,189);continue}else if(ze+1===fe){(H-=3)>-1&&be.push(239,191,189);continue}Re=Y;continue}if(Y<56320){(H-=3)>-1&&be.push(239,191,189),Re=Y;continue}Y=(Re-55296<<10|Y-56320)+65536}else Re&&(H-=3)>-1&&be.push(239,191,189);if(Re=null,Y<128){if((H-=1)<0)break;be.push(Y)}else if(Y<2048){if((H-=2)<0)break;be.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((H-=3)<0)break;be.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((H-=4)<0)break;be.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return be}function U(ae){const H=[];for(let Y=0;Y>8,Re=Y%256,be.push(Re),be.push(fe);return be}function ve(ae){return t.toByteArray(se(ae))}function qe(ae,H,Y,fe){let Re;for(Re=0;Re=H.length||Re>=ae.length);++Re)H[Re+Y]=ae[Re];return Re}function Pe(ae,H){return ae instanceof H||ae!=null&&ae.constructor!=null&&ae.constructor.name!=null&&ae.constructor.name===H.name}function rt(ae){return ae!==ae}const qt=function(){const ae="0123456789abcdef",H=new Array(256);for(let Y=0;Y<16;++Y){const fe=Y*16;for(let Re=0;Re<16;++Re)H[fe+Re]=ae[Y]+ae[Re]}return H}();function wt(ae){return typeof BigInt>"u"?Bt:ae}function Bt(){throw new Error("BigInt not supported")}})(x1e);const rh=x1e.Buffer;function GEe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _1e={exports:{}},Qr=_1e.exports={},Ka,Ya;function WE(){throw new Error("setTimeout has not been defined")}function NE(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ka=setTimeout:Ka=WE}catch{Ka=WE}try{typeof clearTimeout=="function"?Ya=clearTimeout:Ya=NE}catch{Ya=NE}})();function k1e(e){if(Ka===setTimeout)return setTimeout(e,0);if((Ka===WE||!Ka)&&setTimeout)return Ka=setTimeout,setTimeout(e,0);try{return Ka(e,0)}catch{try{return Ka.call(null,e,0)}catch{return Ka.call(this,e,0)}}}function KEe(e){if(Ya===clearTimeout)return clearTimeout(e);if((Ya===NE||!Ya)&&clearTimeout)return Ya=clearTimeout,clearTimeout(e);try{return Ya(e)}catch{try{return Ya.call(null,e)}catch{return Ya.call(this,e)}}}var fl=[],C2=!1,Xp,jv=-1;function YEe(){!C2||!Xp||(C2=!1,Xp.length?fl=Xp.concat(fl):jv=-1,fl.length&&S1e())}function S1e(){if(!C2){var e=k1e(YEe);C2=!0;for(var t=fl.length;t;){for(Xp=fl,fl=[];++jv1)for(var n=1;ne===void 0?null:e;class QEe{constructor(){this.map=new Map}setItem(t,n){this.map.set(t,n)}getItem(t){return this.map.get(t)}}let q1e=new QEe,bB=!0;try{typeof localStorage<"u"&&localStorage&&(q1e=localStorage,bB=!1)}catch{}const R1e=q1e,JEe=e=>bB||addEventListener("storage",e),e8e=e=>bB||removeEventListener("storage",e),t8e=Object.assign,T1e=Object.keys,n8e=(e,t)=>{for(const n in e)t(e[n],n)},vU=e=>T1e(e).length,xU=e=>T1e(e).length,o8e=e=>{for(const t in e)return!1;return!0},r8e=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},E1e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s8e=(e,t)=>e===t||xU(e)===xU(t)&&r8e(e,(n,o)=>(n!==void 0||E1e(t,o))&&t[o]===n),i8e=Object.freeze,W1e=e=>{for(const t in e){const n=e[t];(typeof n=="object"||typeof n=="function")&&W1e(e[t])}return i8e(e)},hB=(e,t,n=0)=>{try{for(;n{},c8e=e=>e,l8e=(e,t)=>e===t,yM=(e,t)=>{if(e==null||t==null)return l8e(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:{if(e.byteLength!==t.byteLength)return!1;for(let n=0;nt.includes(e);var N1e={};const sh=typeof Oi<"u"&&Oi.release&&/node|io\.js/.test(Oi.release.name)&&Object.prototype.toString.call(typeof Oi<"u"?Oi:0)==="[object process]",B1e=typeof window<"u"&&typeof document<"u"&&!sh;let Pa;const d8e=()=>{if(Pa===void 0)if(sh){Pa=fs();const e=Oi.argv;let t=null;for(let n=0;n{if(e.length!==0){const[t,n]=e.split("=");Pa.set(`--${mU(t,"-")}`,n),Pa.set(`-${mU(t,"-")}`,n)}})):Pa=fs();return Pa},BE=e=>d8e().has(e),XM=e=>AU(sh?N1e[e.toUpperCase().replaceAll("-","_")]:R1e.getItem(e)),L1e=e=>BE("--"+e)||XM(e)!==null;L1e("production");const p8e=sh&&u8e(N1e.FORCE_COLOR,["true","1","2"]),f8e=p8e||!BE("--no-colors")&&!L1e("no-color")&&(!sh||Oi.stdout.isTTY)&&(!sh||BE("--color")||XM("COLORTERM")!==null||(XM("TERM")||"").includes("color")),P1e=e=>new Uint8Array(e),b8e=(e,t,n)=>new Uint8Array(e,t,n),h8e=e=>new Uint8Array(e),m8e=e=>{let t="";for(let n=0;nrh.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),M8e=e=>{const t=atob(e),n=P1e(t.length);for(let o=0;o{const t=rh.from(e,"base64");return b8e(t.buffer,t.byteOffset,t.byteLength)},j1e=B1e?m8e:g8e,mB=B1e?M8e:z8e,O8e=e=>{const t=P1e(e.byteLength);return t.set(e),t};class y8e{constructor(t,n){this.left=t,this.right=n}}const Yc=(e,t)=>new y8e(e,t);typeof DOMParser<"u"&&new DOMParser;const A8e=e=>nEe(e,(t,n)=>`${n}:${t};`).join(""),v8e=JSON.stringify,Kl=Symbol,ki=Kl(),bf=Kl(),I1e=Kl(),gB=Kl(),D1e=Kl(),F1e=Kl(),$1e=Kl(),$5=Kl(),V5=Kl(),x8e=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[];let o=0;for(;o0&&n.push(t.join(""));o{const n=wU[PS],o=XM("log"),r=o!==null&&(o==="*"||o==="true"||new RegExp(o,"gi").test(t));return PS=(PS+1)%wU.length,t+=": ",r?(...s)=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const i=Tl(),c=i-_U;_U=i,e(n,t,V5,...s.map(l=>{switch(l!=null&&l.constructor===Uint8Array&&(l=Array.from(l)),typeof l){case"string":case"symbol":return l;default:return v8e(l)}}),n," +"+c+"ms")}:a8e},_8e={[ki]:Yc("font-weight","bold"),[bf]:Yc("font-weight","normal"),[I1e]:Yc("color","blue"),[D1e]:Yc("color","green"),[gB]:Yc("color","grey"),[F1e]:Yc("color","red"),[$1e]:Yc("color","purple"),[$5]:Yc("color","orange"),[V5]:Yc("color","black")},k8e=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[],o=fs();let r=[],s=0;for(;s0||l.length>0?(t.push("%c"+i),n.push(l)):t.push(i)}else break}}for(s>0&&(r=n,r.unshift(t.join("")));s{console.log(...V1e(e)),U1e.forEach(t=>t.print(e))},S8e=(...e)=>{console.warn(...V1e(e)),e.unshift($5),U1e.forEach(t=>t.print(e))},U1e=zd(),C8e=e=>w8e(H1e,e),X1e=e=>({[Symbol.iterator](){return this},next:e}),q8e=(e,t)=>X1e(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),jS=(e,t)=>X1e(()=>{const{done:n,value:o}=e.next();return{done:n,value:n?void 0:t(o)}});class MB{constructor(t,n){this.clock=t,this.len=n}}class f3{constructor(){this.clients=new Map}}const G1e=(e,t,n)=>t.clients.forEach((o,r)=>{const s=e.doc.store.clients.get(r);for(let i=0;i{let n=0,o=e.length-1;for(;n<=o;){const r=Oc((n+o)/2),s=e[r],i=s.clock;if(i<=t){if(t{const n=e.clients.get(t.client);return n!==void 0&&R8e(n,t.clock)!==null},zB=e=>{e.clients.forEach(t=>{t.sort((r,s)=>r.clock-s.clock);let n,o;for(n=1,o=1;n=s.clock?r.len=$f(r.len,s.clock+s.len-r.clock):(o{const t=new f3;for(let n=0;n{if(!t.clients.has(r)){const s=o.slice();for(let i=n+1;i{w1(e.clients,t,()=>[]).push(new MB(n,o))},E8e=()=>new f3,W8e=e=>{const t=E8e();return e.clients.forEach((n,o)=>{const r=[];for(let s=0;s0&&t.clients.set(o,r)}),t},Fh=(e,t)=>{sn(e.restEncoder,t.clients.size),Rl(t.clients.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{e.resetDsCurVal(),sn(e.restEncoder,n);const r=o.length;sn(e.restEncoder,r);for(let s=0;s{const t=new f3,n=_n(e.restDecoder);for(let o=0;o0){const i=w1(t.clients,r,()=>[]);for(let c=0;c{const o=new f3,r=_n(e.restDecoder);for(let s=0;s0){const s=new hf;return sn(s.restEncoder,0),Fh(s,o),s.toUint8Array()}return null},Y1e=A1e;class $h extends iEe{constructor({guid:t=v1e(),collectionid:n=null,gc:o=!0,gcFilter:r=()=>!0,meta:s=null,autoLoad:i=!1,shouldLoad:c=!0}={}){super(),this.gc=o,this.gcFilter=r,this.clientID=Y1e(),this.guid=t,this.collectionid=n,this.share=new Map,this.store=new ise,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=i,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=oh(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});const l=()=>oh(u=>{const d=p=>{(p===void 0||p===!0)&&(this.off("sync",d),u())};this.on("sync",d)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Ho(t.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Rl(this.subdocs).map(t=>t.guid))}transact(t,n=null){return Ho(this,t,n)}get(t,n=Y0){const o=w1(this.share,t,()=>{const s=new n;return s._integrate(this,null),s}),r=o.constructor;if(n!==Y0&&r!==n)if(r===Y0){const s=new n;s._map=o._map,o._map.forEach(i=>{for(;i!==null;i=i.left)i.parent=s}),s._start=o._start;for(let i=s._start;i!==null;i=i.right)i.parent=s;return s._length=o._length,this.share.set(t,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return o}getArray(t=""){return this.get(t,R2)}getText(t=""){return this.get(t,ch)}getMap(t=""){return this.get(t,ah)}getXmlElement(t=""){return this.get(t,lh)}getXmlFragment(t=""){return this.get(t,mf)}toJSON(){const t={};return this.share.forEach((n,o)=>{t[o]=n.toJSON()}),t}destroy(){this.isDestroyed=!0,Rl(this.subdocs).forEach(n=>n.destroy());const t=this._item;if(t!==null){this._item=null;const n=t.content;n.doc=new $h({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,Ho(t.parent.doc,o=>{const r=n.doc;t.deleted||o.subdocsAdded.add(r),o.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class Z1e{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return _n(this.restDecoder)}readDsLen(){return _n(this.restDecoder)}}class Q1e extends Z1e{readLeftID(){return to(_n(this.restDecoder),_n(this.restDecoder))}readRightID(){return to(_n(this.restDecoder),_n(this.restDecoder))}readClient(){return _n(this.restDecoder)}readInfo(){return ff(this.restDecoder)}readString(){return yl(this.restDecoder)}readParentInfo(){return _n(this.restDecoder)===1}readTypeRef(){return _n(this.restDecoder)}readLen(){return _n(this.restDecoder)}readAny(){return nh(this.restDecoder)}readBuf(){return O8e(w0(this.restDecoder))}readJSON(){return JSON.parse(yl(this.restDecoder))}readKey(){return yl(this.restDecoder)}}class N8e{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=_n(this.restDecoder),this.dsCurrVal}readDsLen(){const t=_n(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class ih extends N8e{constructor(t){super(t),this.keys=[],_n(t),this.keyClockDecoder=new BS(w0(t)),this.clientDecoder=new Pv(w0(t)),this.leftClockDecoder=new BS(w0(t)),this.rightClockDecoder=new BS(w0(t)),this.infoDecoder=new yU(w0(t),ff),this.stringDecoder=new NEe(w0(t)),this.parentInfoDecoder=new yU(w0(t),ff),this.typeRefDecoder=new Pv(w0(t)),this.lenDecoder=new Pv(w0(t))}readLeftID(){return new q2(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new q2(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return nh(this.restDecoder)}readBuf(){return w0(this.restDecoder)}readJSON(){return nh(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{o=$f(o,t[0].id.clock);const r=Ac(t,o);sn(e.restEncoder,t.length-r),e.writeClient(n),sn(e.restEncoder,o);const s=t[r];s.write(e,o-s.id.clock);for(let i=r+1;i{const o=new Map;n.forEach((r,s)=>{q0(t,s)>r&&o.set(s,r)}),H5(t).forEach((r,s)=>{n.has(s)||o.set(s,0)}),sn(e.restEncoder,o.size),Rl(o.entries()).sort((r,s)=>s[0]-r[0]).forEach(([r,s])=>{B8e(e,t.clients.get(r),r,s)})},L8e=(e,t)=>{const n=fs(),o=_n(e.restDecoder);for(let r=0;r{const o=[];let r=Rl(n.keys()).sort((b,h)=>b-h);if(r.length===0)return null;const s=()=>{if(r.length===0)return null;let b=n.get(r[r.length-1]);for(;b.refs.length===b.i;)if(r.pop(),r.length>0)b=n.get(r[r.length-1]);else return null;return b};let i=s();if(i===null)return null;const c=new ise,l=new Map,u=(b,h)=>{const g=l.get(b);(g==null||g>h)&&l.set(b,h)};let d=i.refs[i.i++];const p=new Map,f=()=>{for(const b of o){const h=b.id.client,g=n.get(h);g?(g.i--,c.clients.set(h,g.refs.slice(g.i)),n.delete(h),g.i=0,g.refs=[]):c.clients.set(h,[b]),r=r.filter(z=>z!==h)}o.length=0};for(;;){if(d.constructor!==Ai){const h=w1(p,d.id.client,()=>q0(t,d.id.client))-d.id.clock;if(h<0)o.push(d),u(d.id.client,d.id.clock-1),f();else{const g=d.getMissing(e,t);if(g!==null){o.push(d);const z=n.get(g)||{refs:[],i:0};if(z.refs.length===z.i)u(g,q0(t,g)),f();else{d=z.refs[z.i++];continue}}else(h===0||h0)d=o.pop();else if(i!==null&&i.i0){const b=new hf;return yB(b,c,new Map),sn(b.restEncoder,0),{missing:l,update:b.toUint8Array()}}return null},j8e=(e,t)=>yB(e,t.doc.store,t.beforeState),I8e=(e,t,n,o=new ih(e))=>Ho(t,r=>{r.local=!1;let s=!1;const i=r.doc,c=i.store,l=L8e(o,i),u=P8e(r,c,l),d=c.pendingStructs;if(d){for(const[f,b]of d.missing)if(bb)&&d.missing.set(f,b)}d.update=B4([d.update,u.update])}}else c.pendingStructs=u;const p=kU(o,r,c);if(c.pendingDs){const f=new ih(Rc(c.pendingDs));_n(f.restDecoder);const b=kU(f,r,c);p&&b?c.pendingDs=B4([p,b]):c.pendingDs=p||b}else c.pendingDs=p;if(s){const f=c.pendingStructs.update;c.pendingStructs=null,tse(r.doc,f)}},n,!1),tse=(e,t,n,o=ih)=>{const r=Rc(t);I8e(r,e,n,new o(r))},nse=(e,t,n)=>tse(e,t,n,Q1e),D8e=(e,t,n=new Map)=>{yB(e,t.store,n),Fh(e,W8e(t.store))},F8e=(e,t=new Uint8Array([0]),n=new hf)=>{const o=ose(t);D8e(n,e,o);const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(oWe(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===b3)return tWe(r.map((s,i)=>i===0?s:sWe(s)));if(n.constructor===hf)return B4(r)}return r[0]},AB=(e,t)=>F8e(e,t,new b3),$8e=e=>{const t=new Map,n=_n(e.restDecoder);for(let o=0;o$8e(new Z1e(Rc(e))),rse=(e,t)=>(sn(e.restEncoder,t.size),Rl(t.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{sn(e.restEncoder,n),sn(e.restEncoder,o)}),e),V8e=(e,t)=>rse(e,H5(t.store)),H8e=(e,t=new ese)=>(e instanceof Map?rse(t,e):V8e(t,e),t.toUint8Array()),U8e=e=>H8e(e,new J1e);class X8e{constructor(){this.l=[]}}const SU=()=>new X8e,CU=(e,t)=>e.l.push(t),qU=(e,t)=>{const n=e.l,o=n.length;e.l=n.filter(r=>t!==r),o===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},sse=(e,t,n)=>hB(e.l,[t,n]);class q2{constructor(t,n){this.client=t,this.clock=n}}const fA=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,to=(e,t)=>new q2(e,t),G8e=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw yc()},o2=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!K1e(t.ds,e.id),LE=(e,t)=>{const n=w1(e.meta,LE,zd),o=e.doc.store;n.has(t)||(t.sv.forEach((r,s)=>{r{}),n.add(t))};class ise{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const H5=e=>{const t=new Map;return e.clients.forEach((n,o)=>{const r=n[n.length-1];t.set(o,r.id.clock+r.length)}),t},q0=(e,t)=>{const n=e.clients.get(t);if(n===void 0)return 0;const o=n[n.length-1];return o.id.clock+o.length},ase=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{const o=n[n.length-1];if(o.id.clock+o.length!==t.id.clock)throw yc()}n.push(t)},Ac=(e,t)=>{let n=0,o=e.length-1,r=e[o],s=r.id.clock;if(s===t)return o;let i=Oc(t/(s+r.length-1)*o);for(;n<=o;){if(r=e[i],s=r.id.clock,s<=t){if(t{const n=e.clients.get(t.client);return n[Ac(n,t.clock)]},IS=K8e,PE=(e,t,n)=>{const o=Ac(t,n),r=t[o];return r.id.clock{const n=e.doc.store.clients.get(t.client);return n[PE(e,n,t.clock)]},RU=(e,t,n)=>{const o=t.clients.get(n.client),r=Ac(o,n.clock),s=o[r];return n.clock!==s.id.clock+s.length-1&&s.constructor!==yi&&o.splice(r+1,0,F4(e,s,n.clock-s.id.clock+1)),s},Y8e=(e,t,n)=>{const o=e.clients.get(t.id.client);o[Ac(o,t.id.clock)]=n},cse=(e,t,n,o,r)=>{if(o===0)return;const s=n+o;let i=PE(e,t,n),c;do c=t[i++],st.deleteSet.clients.size===0&&!oEe(t.afterState,(n,o)=>t.beforeState.get(o)!==n)?!1:(zB(t.deleteSet),j8e(e,t),Fh(e,t.deleteSet),!0),EU=(e,t,n)=>{const o=t._item;(o===null||o.id.clock<(e.beforeState.get(o.id.client)||0)&&!o.deleted)&&w1(e.changed,t,zd).add(n)},Iv=(e,t)=>{let n=e[t],o=e[t-1],r=t;for(;r>0;n=o,o=e[--r-1]){if(o.deleted===n.deleted&&o.constructor===n.constructor&&o.mergeWith(n)){n instanceof b1&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,o);continue}break}const s=t-r;return s&&e.splice(t+1-s,s),s},Q8e=(e,t,n)=>{for(const[o,r]of e.clients.entries()){const s=t.clients.get(o);for(let i=r.length-1;i>=0;i--){const c=r[i],l=c.clock+c.len;for(let u=Ac(s,c.clock),d=s[u];u{e.clients.forEach((n,o)=>{const r=t.clients.get(o);for(let s=n.length-1;s>=0;s--){const i=n[s],c=aB(r.length-1,1+Ac(r,i.clock+i.len-1));for(let l=c,u=r[l];l>0&&u.id.clock>=i.clock;u=r[l])l-=1+Iv(r,l)}})},lse=(e,t)=>{if(tc.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(n,l)})),c.push(()=>{n.changedParentTypes.forEach((l,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=u,d._path=null}),l.sort((d,p)=>d.path.length-p.path.length),sse(u._dEH,l,n))})}),c.push(()=>o.emit("afterTransaction",[n,o])),hB(c,[]),n._needFormattingCleanup&&zWe(n)}finally{o.gc&&Q8e(s,r,o.gcFilter),J8e(s,r),n.afterState.forEach((d,p)=>{const f=n.beforeState.get(p)||0;if(f!==d){const b=r.clients.get(p),h=$f(Ac(b,f),1);for(let g=b.length-1;g>=h;)g-=1+Iv(b,g)}});for(let d=i.length-1;d>=0;d--){const{client:p,clock:f}=i[d].id,b=r.clients.get(p),h=Ac(b,f);h+11||h>0&&Iv(b,h)}if(!n.local&&n.afterState.get(o.clientID)!==n.beforeState.get(o.clientID)&&(H1e($5,ki,"[yjs] ",bf,F1e,"Changed the client-id because another client seems to be using it."),o.clientID=Y1e()),o.emit("afterTransactionCleanup",[n,o]),o._observers.has("update")){const d=new b3;TU(d,n)&&o.emit("update",[d.toUint8Array(),n.origin,o,n])}if(o._observers.has("updateV2")){const d=new hf;TU(d,n)&&o.emit("updateV2",[d.toUint8Array(),n.origin,o,n])}const{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:u}=n;(c.size>0||u.size>0||l.size>0)&&(c.forEach(d=>{d.clientID=o.clientID,d.collectionid==null&&(d.collectionid=o.collectionid),o.subdocs.add(d)}),u.forEach(d=>o.subdocs.delete(d)),o.emit("subdocs",[{loaded:l,added:c,removed:u},o,n]),u.forEach(d=>d.destroy())),e.length<=t+1?(o._transactionCleanups=[],o.emit("afterAllTransactions",[o,e])):lse(e,t+1)}}},Ho=(e,t,n=null,o=!0)=>{const r=e._transactionCleanups;let s=!1,i=null;e._transaction===null&&(s=!0,e._transaction=new Z8e(e,n,o),r.push(e._transaction),r.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{i=t(e._transaction)}finally{if(s){const c=e._transaction===r[0];e._transaction=null,c&&lse(r,0)}}return i};function*eWe(e){const t=_n(e.restDecoder);for(let n=0;nB4(e,Q1e,b3),nWe=(e,t)=>{if(e.constructor===yi){const{client:n,clock:o}=e.id;return new yi(to(n,o+t),e.length-t)}else if(e.constructor===Ai){const{client:n,clock:o}=e.id;return new Ai(to(n,o+t),e.length-t)}else{const n=e,{client:o,clock:r}=n.id;return new b1(to(o,r+t),null,to(o,r+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},B4=(e,t=ih,n=hf)=>{if(e.length===1)return e[0];const o=e.map(d=>new t(Rc(d)));let r=o.map(d=>new vB(d,!0)),s=null;const i=new n,c=new xB(i);for(;r=r.filter(f=>f.curr!==null),r.sort((f,b)=>{if(f.curr.id.client===b.curr.id.client){const h=f.curr.id.clock-b.curr.id.clock;return h===0?f.curr.constructor===b.curr.constructor?0:f.curr.constructor===Ai?1:-1:h}else return b.curr.id.client-f.curr.id.client}),r.length!==0;){const d=r[0],p=d.curr.id.client;if(s!==null){let f=d.curr,b=!1;for(;f!==null&&f.id.clock+f.length<=s.struct.id.clock+s.struct.length&&f.id.client>=s.struct.id.client;)f=d.next(),b=!0;if(f===null||f.id.client!==p||b&&f.id.clock>s.struct.id.clock+s.struct.length)continue;if(p!==s.struct.id.client)Hu(c,s.struct,s.offset),s={struct:f,offset:0},d.next();else if(s.struct.id.clock+s.struct.length0&&(s.struct.constructor===Ai?s.struct.length-=h:f=nWe(f,h)),s.struct.mergeWith(f)||(Hu(c,s.struct,s.offset),s={struct:f,offset:0},d.next())}}else s={struct:d.curr,offset:0},d.next();for(let f=d.curr;f!==null&&f.id.client===p&&f.id.clock===s.struct.id.clock+s.struct.length&&f.constructor!==Ai;f=d.next())Hu(c,s.struct,s.offset),s={struct:f,offset:0}}s!==null&&(Hu(c,s.struct,s.offset),s=null),wB(c);const l=o.map(d=>OB(d)),u=T8e(l);return Fh(i,u),i.toUint8Array()},oWe=(e,t,n=ih,o=hf)=>{const r=ose(t),s=new o,i=new xB(s),c=new n(Rc(e)),l=new vB(c,!1);for(;l.curr;){const d=l.curr,p=d.id.client,f=r.get(p)||0;if(l.curr.constructor===Ai){l.next();continue}if(d.id.clock+d.length>f)for(Hu(i,d,$f(f-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===p;)Hu(i,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===p&&l.curr.id.clock+l.curr.length<=f;)l.next()}wB(i);const u=OB(c);return Fh(s,u),s.toUint8Array()},use=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:Sr(e.encoder.restEncoder)}),e.encoder.restEncoder=k0(),e.written=0)},Hu=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&use(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),sn(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},wB=e=>{use(e);const t=e.encoder.restEncoder;sn(t,e.clientStructs.length);for(let n=0;n{const r=new n(Rc(e)),s=new vB(r,!1),i=new o,c=new xB(i);for(let u=s.curr;u!==null;u=s.next())Hu(c,t(u),0);wB(c);const l=OB(r);return Fh(i,l),i.toUint8Array()},sWe=e=>rWe(e,c8e,ih,b3),WU="You must not compute changes after the event-handler fired.";class U5{constructor(t,n){this.target=t,this.currentTarget=t,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=iWe(this.currentTarget,this.target))}deletes(t){return K1e(this.transaction.deleteSet,t.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw fa(WU);const t=new Map,n=this.target;this.transaction.changed.get(n).forEach(r=>{if(r!==null){const s=n._map.get(r);let i,c;if(this.adds(s)){let l=s.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(s))if(l!==null&&this.deletes(l))i="delete",c=TS(l.content.getContent());else return;else l!==null&&this.deletes(l)?(i="update",c=TS(l.content.getContent())):(i="add",c=void 0)}else if(this.deletes(s))i="delete",c=TS(s.content.getContent());else return;t.set(r,{action:i,oldValue:c})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw fa(WU);const n=this.target,o=zd(),r=zd(),s=[];if(t={added:o,deleted:r,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let c=null;const l=()=>{c&&s.push(c)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=u.length,r.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),o.add(u)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&l()}this._changes=t}return t}}const iWe=(e,t)=>{const n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let o=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(o+=r.length),r=r.right;n.unshift(o)}t=t._item.parent}return n},z1=()=>{S8e("Invalid access: Add Yjs type to a document before reading data.")},dse=80;let _B=0;class aWe{constructor(t,n){t.marker=!0,this.p=t,this.index=n,this.timestamp=_B++}}const cWe=e=>{e.timestamp=_B++},pse=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=_B++},lWe=(e,t,n)=>{if(e.length>=dse){const o=e.reduce((r,s)=>r.timestamp{if(e._start===null||t===0||e._searchMarker===null)return null;const n=e._searchMarker.length===0?null:e._searchMarker.reduce((s,i)=>Bv(t-s.index)t;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);for(;o.left!==null&&o.left.id.client===o.id.client&&o.left.id.clock+o.left.length===o.id.clock;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);return n!==null&&Bv(n.index-r){for(let o=e.length-1;o>=0;o--){const r=e[o];if(n>0){let s=r.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(r.index-=s.length);if(s===null||s.marker===!0){e.splice(o,1);continue}r.p=s,s.marker=!0}(t0&&t===r.index)&&(r.index=$f(t,r.index+n))}},G5=(e,t,n)=>{const o=e,r=t.changedParentTypes;for(;w1(r,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;sse(o._eH,n,t)};class Y0{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=SU(),this._dEH=SU(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,n){this.doc=t,this._item=n}_copy(){throw dc()}clone(){throw dc()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,n){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){CU(this._eH,t)}observeDeep(t){CU(this._dEH,t)}unobserve(t){qU(this._eH,t)}unobserveDeep(t){qU(this._dEH,t)}toJSON(){}}const fse=(e,t,n)=>{e.doc??z1(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let o=n-t;const r=[];let s=e._start;for(;s!==null&&o>0;){if(s.countable&&!s.deleted){const i=s.content.getContent();if(i.length<=t)t-=i.length;else{for(let c=t;c0;c++)r.push(i[c]),o--;t=0}}s=s.right}return r},bse=e=>{e.doc??z1();const t=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const o=n.content.getContent();for(let r=0;r{let n=0,o=e._start;for(e.doc??z1();o!==null;){if(o.countable&&!o.deleted){const r=o.content.getContent();for(let s=0;s{const n=[];return KM(e,(o,r)=>{n.push(t(o,r,e))}),n},uWe=e=>{let t=e._start,n=null,o=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),o=0,t=t.right}const r=n[o++];return n.length<=o&&(n=null),{done:!1,value:r}}}},mse=(e,t)=>{e.doc??z1();const n=X5(e,t);let o=e._start;for(n!==null&&(o=n.p,t-=n.index);o!==null;o=o.right)if(!o.deleted&&o.countable){if(t{let r=n;const s=e.doc,i=s.clientID,c=s.store,l=n===null?t._start:n.right;let u=[];const d=()=>{u.length>0&&(r=new b1(to(i,q0(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new gf(u)),r.integrate(e,0),u=[])};o.forEach(p=>{if(p===null)u.push(p);else switch(p.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(p);break;default:switch(d(),p.constructor){case Uint8Array:case ArrayBuffer:r=new b1(to(i,q0(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new h3(new Uint8Array(p))),r.integrate(e,0);break;case $h:r=new b1(to(i,q0(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new m3(p)),r.integrate(e,0);break;default:if(p instanceof Y0)r=new b1(to(i,q0(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Yl(p)),r.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},gse=()=>fa("Length exceeded!"),Mse=(e,t,n,o)=>{if(n>t._length)throw gse();if(n===0)return t._searchMarker&&GM(t._searchMarker,n,o.length),L4(e,t,null,o);const r=n,s=X5(t,n);let i=t._start;for(s!==null&&(i=s.p,n-=s.index,n===0&&(i=i.prev,n+=i&&i.countable&&!i.deleted?i.length:0));i!==null;i=i.right)if(!i.deleted&&i.countable){if(n<=i.length){n{let r=(t._searchMarker||[]).reduce((s,i)=>i.index>s.index?i:s,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return L4(e,t,r,n)},zse=(e,t,n,o)=>{if(o===0)return;const r=n,s=o,i=X5(t,n);let c=t._start;for(i!==null&&(c=i.p,n-=i.index);c!==null&&n>0;c=c.right)!c.deleted&&c.countable&&(n0&&c!==null;)c.deleted||(o0)throw gse();t._searchMarker&&GM(t._searchMarker,r,-s+o)},P4=(e,t,n)=>{const o=t._map.get(n);o!==void 0&&o.delete(e)},kB=(e,t,n,o)=>{const r=t._map.get(n)||null,s=e.doc,i=s.clientID;let c;if(o==null)c=new gf([o]);else switch(o.constructor){case Number:case Object:case Boolean:case Array:case String:c=new gf([o]);break;case Uint8Array:c=new h3(o);break;case $h:c=new m3(o);break;default:if(o instanceof Y0)c=new Yl(o);else throw new Error("Unexpected content type")}new b1(to(i,q0(s.store,i)),r,r&&r.lastId,null,null,t,n,c).integrate(e,0)},SB=(e,t)=>{e.doc??z1();const n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},Ose=e=>{const t={};return e.doc??z1(),e._map.forEach((n,o)=>{n.deleted||(t[o]=n.content.getContent()[n.length-1])}),t},yse=(e,t)=>{e.doc??z1();const n=e._map.get(t);return n!==void 0&&!n.deleted},pWe=(e,t)=>{const n={};return e._map.forEach((o,r)=>{let s=o;for(;s!==null&&(!t.sv.has(s.id.client)||s.id.clock>=(t.sv.get(s.id.client)||0));)s=s.left;s!==null&&o2(s,t)&&(n[r]=s.content.getContent()[s.length-1])}),n},bA=e=>(e.doc??z1(),q8e(e._map.entries(),t=>!t[1].deleted));class fWe extends U5{}class R2 extends Y0{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const n=new R2;return n.push(t),n}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new R2}clone(){const t=new R2;return t.insert(0,this.toArray().map(n=>n instanceof Y0?n.clone():n)),t}get length(){return this.doc??z1(),this._length}_callObserver(t,n){super._callObserver(t,n),G5(this,t,new fWe(this,t))}insert(t,n){this.doc!==null?Ho(this.doc,o=>{Mse(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}push(t){this.doc!==null?Ho(this.doc,n=>{dWe(n,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,n=1){this.doc!==null?Ho(this.doc,o=>{zse(o,this,t,n)}):this._prelimContent.splice(t,n)}get(t){return mse(this,t)}toArray(){return bse(this)}slice(t=0,n=this.length){return fse(this,t,n)}toJSON(){return this.map(t=>t instanceof Y0?t.toJSON():t)}map(t){return hse(this,t)}forEach(t){KM(this,t)}[Symbol.iterator](){return uWe(this)}_write(t){t.writeTypeRef(PWe)}}const bWe=e=>new R2;class hWe extends U5{constructor(t,n,o){super(t,n),this.keysChanged=o}}class ah extends Y0{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,n){super._integrate(t,n),this._prelimContent.forEach((o,r)=>{this.set(r,o)}),this._prelimContent=null}_copy(){return new ah}clone(){const t=new ah;return this.forEach((n,o)=>{t.set(o,n instanceof Y0?n.clone():n)}),t}_callObserver(t,n){G5(this,t,new hWe(this,t,n))}toJSON(){this.doc??z1();const t={};return this._map.forEach((n,o)=>{if(!n.deleted){const r=n.content.getContent()[n.length-1];t[o]=r instanceof Y0?r.toJSON():r}}),t}get size(){return[...bA(this)].length}keys(){return jS(bA(this),t=>t[0])}values(){return jS(bA(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return jS(bA(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??z1(),this._map.forEach((n,o)=>{n.deleted||t(n.content.getContent()[n.length-1],o,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Ho(this.doc,n=>{P4(n,this,t)}):this._prelimContent.delete(t)}set(t,n){return this.doc!==null?Ho(this.doc,o=>{kB(o,this,t,n)}):this._prelimContent.set(t,n),n}get(t){return SB(this,t)}has(t){return yse(this,t)}clear(){this.doc!==null?Ho(this.doc,t=>{this.forEach(function(n,o,r){P4(t,r,o)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(jWe)}}const mWe=e=>new ah,Zu=(e,t)=>e===t||typeof e=="object"&&typeof t=="object"&&e&&t&&s8e(e,t);class jE{constructor(t,n,o,r){this.left=t,this.right=n,this.index=o,this.currentAttributes=r}forward(){switch(this.right===null&&yc(),this.right.content.constructor){case m0:this.right.deleted||Vh(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const NU=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case m0:t.right.deleted||Vh(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n{const r=new Map,s=o?X5(t,n):null;if(s){const i=new jE(s.p.left,s.p,s.index,r);return NU(e,i,n-s.index)}else{const i=new jE(null,t._start,0,r);return NU(e,i,n)}},Ase=(e,t,n,o)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===m0&&Zu(o.get(n.right.content.key),n.right.content.value));)n.right.deleted||o.delete(n.right.content.key),n.forward();const r=e.doc,s=r.clientID;o.forEach((i,c)=>{const l=n.left,u=n.right,d=new b1(to(s,q0(r.store,s)),l,l&&l.lastId,u,u&&u.id,t,null,new m0(c,i));d.integrate(e,0),n.right=d,n.forward()})},Vh=(e,t)=>{const{key:n,value:o}=t;o===null?e.delete(n):e.set(n,o)},vse=(e,t)=>{for(;e.right!==null;){if(!(e.right.deleted||e.right.content.constructor===m0&&Zu(t[e.right.content.key]??null,e.right.content.value)))break;e.forward()}},xse=(e,t,n,o)=>{const r=e.doc,s=r.clientID,i=new Map;for(const c in o){const l=o[c],u=n.currentAttributes.get(c)??null;if(!Zu(u,l)){i.set(c,u);const{left:d,right:p}=n;n.right=new b1(to(s,q0(r.store,s)),d,d&&d.lastId,p,p&&p.id,t,null,new m0(c,l)),n.right.integrate(e,0),n.forward()}}return i},DS=(e,t,n,o,r)=>{n.currentAttributes.forEach((f,b)=>{r[b]===void 0&&(r[b]=null)});const s=e.doc,i=s.clientID;vse(n,r);const c=xse(e,t,n,r),l=o.constructor===String?new vc(o):o instanceof Y0?new Yl(o):new Vf(o);let{left:u,right:d,index:p}=n;t._searchMarker&&GM(t._searchMarker,n.index,l.getLength()),d=new b1(to(i,q0(s.store,i)),u,u&&u.lastId,d,d&&d.id,t,null,l),d.integrate(e,0),n.right=d,n.index=p,n.forward(),Ase(e,t,n,c)},BU=(e,t,n,o,r)=>{const s=e.doc,i=s.clientID;vse(n,r);const c=xse(e,t,n,r);e:for(;n.right!==null&&(o>0||c.size>0&&(n.right.deleted||n.right.content.constructor===m0));){if(!n.right.deleted)switch(n.right.content.constructor){case m0:{const{key:l,value:u}=n.right.content,d=r[l];if(d!==void 0){if(Zu(d,u))c.delete(l);else{if(o===0)break e;c.set(l,u)}n.right.delete(e)}else n.currentAttributes.set(l,u);break}default:o0){let l="";for(;o>0;o--)l+=` +`;n.right=new b1(to(i,q0(s.store,i)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new vc(l)),n.right.integrate(e,0),n.forward()}Ase(e,t,n,c)},wse=(e,t,n,o,r)=>{let s=t;const i=fs();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===m0){const u=s.content;i.set(u.key,u)}s=s.right}let c=0,l=!1;for(;t!==s;){if(n===t&&(l=!0),!t.deleted){const u=t.content;switch(u.constructor){case m0:{const{key:d,value:p}=u,f=o.get(d)??null;(i.get(d)!==u||f===p)&&(t.delete(e),c++,!l&&(r.get(d)??null)===p&&f!==p&&(f===null?r.delete(d):r.set(d,f))),!l&&!t.deleted&&Vh(r,u);break}}}t=t.right}return c},gWe=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===m0){const o=t.content.key;n.has(o)?t.delete(e):n.add(o)}t=t.left}},MWe=e=>{let t=0;return Ho(e.doc,n=>{let o=e._start,r=e._start,s=fs();const i=qE(s);for(;r;){if(r.deleted===!1)switch(r.content.constructor){case m0:Vh(i,r.content);break;default:t+=wse(n,o,r,s,i),s=qE(i),o=r;break}r=r.right}}),t},zWe=e=>{const t=new Set,n=e.doc;for(const[o,r]of e.afterState.entries()){const s=e.beforeState.get(o)||0;r!==s&&cse(e,n.store.clients.get(o),s,r,i=>{!i.deleted&&i.content.constructor===m0&&i.constructor!==yi&&t.add(i.parent)})}Ho(n,o=>{G1e(e,e.deleteSet,r=>{if(r instanceof yi||!r.parent._hasFormatting||t.has(r.parent))return;const s=r.parent;r.content.constructor===m0?t.add(s):gWe(o,r)});for(const r of t)MWe(r)})},LU=(e,t,n)=>{const o=n,r=qE(t.currentAttributes),s=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Yl:case Vf:case vc:n{r===null?this.childListChanged=!0:this.keysChanged.add(r)})}get changes(){if(this._changes===null){const 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){const t=this.target.doc,n=[];Ho(t,o=>{const r=new Map,s=new Map;let i=this.target._start,c=null;const l={};let u="",d=0,p=0;const f=()=>{if(c!==null){let b=null;switch(c){case"delete":p>0&&(b={delete:p}),p=0;break;case"insert":(typeof u=="object"||u.length>0)&&(b={insert:u},r.size>0&&(b.attributes={},r.forEach((h,g)=>{h!==null&&(b.attributes[g]=h)}))),u="";break;case"retain":d>0&&(b={retain:d},o8e(l)||(b.attributes=t8e({},l))),d=0;break}b&&n.push(b),c=null}};for(;i!==null;){switch(i.content.constructor){case Yl:case Vf:this.adds(i)?this.deletes(i)||(f(),c="insert",u=i.content.getContent()[0],f()):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=1):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=1);break;case vc:this.adds(i)?this.deletes(i)||(c!=="insert"&&(f(),c="insert"),u+=i.content.str):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=i.length):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=i.length);break;case m0:{const{key:b,value:h}=i.content;if(this.adds(i)){if(!this.deletes(i)){const g=r.get(b)??null;Zu(g,h)?h!==null&&i.delete(o):(c==="retain"&&f(),Zu(h,s.get(b)??null)?delete l[b]:l[b]=h)}}else if(this.deletes(i)){s.set(b,h);const g=r.get(b)??null;Zu(g,h)||(c==="retain"&&f(),l[b]=g)}else if(!i.deleted){s.set(b,h);const g=l[b];g!==void 0&&(Zu(g,h)?g!==null&&i.delete(o):(c==="retain"&&f(),h===null?delete l[b]:l[b]=h))}i.deleted||(c==="insert"&&f(),Vh(r,i.content));break}}i=i.right}for(f();n.length>0;){const b=n[n.length-1];if(b.retain!==void 0&&b.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class ch extends Y0{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??z1(),this._length}_integrate(t,n){super._integrate(t,n);try{this._pending.forEach(o=>o())}catch(o){console.error(o)}this._pending=null}_copy(){return new ch}clone(){const t=new ch;return t.applyDelta(this.toDelta()),t}_callObserver(t,n){super._callObserver(t,n);const o=new OWe(this,t,n);G5(this,t,o),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??z1();let t="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===vc&&(t+=n.content.str),n=n.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:n=!0}={}){this.doc!==null?Ho(this.doc,o=>{const r=new jE(null,this._start,0,new Map);for(let s=0;s0)&&DS(o,this,r,c,i.attributes||{})}else i.retain!==void 0?BU(o,this,r,i.retain,i.attributes||{}):i.delete!==void 0&&LU(o,r,i.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,n,o){this.doc??z1();const r=[],s=new Map,i=this.doc;let c="",l=this._start;function u(){if(c.length>0){const p={};let f=!1;s.forEach((h,g)=>{f=!0,p[g]=h});const b={insert:c};f&&(b.attributes=p),r.push(b),c=""}}const d=()=>{for(;l!==null;){if(o2(l,t)||n!==void 0&&o2(l,n))switch(l.content.constructor){case vc:{const p=s.get("ychange");t!==void 0&&!o2(l,t)?(p===void 0||p.user!==l.id.client||p.type!=="removed")&&(u(),s.set("ychange",o?o("removed",l.id):{type:"removed"})):n!==void 0&&!o2(l,n)?(p===void 0||p.user!==l.id.client||p.type!=="added")&&(u(),s.set("ychange",o?o("added",l.id):{type:"added"})):p!==void 0&&(u(),s.delete("ychange")),c+=l.content.str;break}case Yl:case Vf:{u();const p={insert:l.content.getContent()[0]};if(s.size>0){const f={};p.attributes=f,s.forEach((b,h)=>{f[h]=b})}r.push(p);break}case m0:o2(l,t)&&(u(),Vh(s,l.content));break}l=l.right}u()};return t||n?Ho(i,p=>{t&&LE(p,t),n&&LE(p,n),d()},"cleanup"):d(),r}insert(t,n,o){if(n.length<=0)return;const r=this.doc;r!==null?Ho(r,s=>{const i=hA(s,this,t,!o);o||(o={},i.currentAttributes.forEach((c,l)=>{o[l]=c})),DS(s,this,i,n,o)}):this._pending.push(()=>this.insert(t,n,o))}insertEmbed(t,n,o){const r=this.doc;r!==null?Ho(r,s=>{const i=hA(s,this,t,!o);DS(s,this,i,n,o||{})}):this._pending.push(()=>this.insertEmbed(t,n,o||{}))}delete(t,n){if(n===0)return;const o=this.doc;o!==null?Ho(o,r=>{LU(r,hA(r,this,t,!0),n)}):this._pending.push(()=>this.delete(t,n))}format(t,n,o){if(n===0)return;const r=this.doc;r!==null?Ho(r,s=>{const i=hA(s,this,t,!1);i.right!==null&&BU(s,this,i,n,o)}):this._pending.push(()=>this.format(t,n,o))}removeAttribute(t){this.doc!==null?Ho(this.doc,n=>{P4(n,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,n){this.doc!==null?Ho(this.doc,o=>{kB(o,this,t,n)}):this._pending.push(()=>this.setAttribute(t,n))}getAttribute(t){return SB(this,t)}getAttributes(){return Ose(this)}_write(t){t.writeTypeRef(IWe)}}const yWe=e=>new ch;class FS{constructor(t,n=()=>!0){this._filter=n,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??z1()}[Symbol.iterator](){return this}next(){let t=this._currentNode,n=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(n)))do if(n=t.content.type,!t.deleted&&(n.constructor===lh||n.constructor===mf)&&n._start!==null)t=n._start;else for(;t!==null;)if(t.right!==null){t=t.right;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})}}class mf extends Y0{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new mf}clone(){const t=new mf;return t.insert(0,this.toArray().map(n=>n instanceof Y0?n.clone():n)),t}get length(){return this.doc??z1(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new FS(this,t)}querySelector(t){t=t.toUpperCase();const o=new FS(this,r=>r.nodeName&&r.nodeName.toUpperCase()===t).next();return o.done?null:o.value}querySelectorAll(t){return t=t.toUpperCase(),Rl(new FS(this,n=>n.nodeName&&n.nodeName.toUpperCase()===t))}_callObserver(t,n){G5(this,t,new xWe(this,n,t))}toString(){return hse(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,n={},o){const r=t.createDocumentFragment();return o!==void 0&&o._createAssociation(r,this),KM(this,s=>{r.insertBefore(s.toDOM(t,n,o),null)}),r}insert(t,n){this.doc!==null?Ho(this.doc,o=>{Mse(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}insertAfter(t,n){if(this.doc!==null)Ho(this.doc,o=>{const r=t&&t instanceof Y0?t._item:t;L4(o,this,r,n)});else{const o=this._prelimContent,r=t===null?0:o.findIndex(s=>s===t)+1;if(r===0&&t!==null)throw fa("Reference item not found");o.splice(r,0,...n)}}delete(t,n=1){this.doc!==null?Ho(this.doc,o=>{zse(o,this,t,n)}):this._prelimContent.splice(t,n)}toArray(){return bse(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return mse(this,t)}slice(t=0,n=this.length){return fse(this,t,n)}forEach(t){KM(this,t)}_write(t){t.writeTypeRef(FWe)}}const AWe=e=>new mf;class lh extends mf{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,n){super._integrate(t,n),this._prelimAttrs.forEach((o,r)=>{this.setAttribute(r,o)}),this._prelimAttrs=null}_copy(){return new lh(this.nodeName)}clone(){const t=new lh(this.nodeName),n=this.getAttributes();return n8e(n,(o,r)=>{typeof o=="string"&&t.setAttribute(r,o)}),t.insert(0,this.toArray().map(o=>o instanceof Y0?o.clone():o)),t}toString(){const t=this.getAttributes(),n=[],o=[];for(const c in t)o.push(c);o.sort();const r=o.length;for(let c=0;c0?" "+n.join(" "):"";return`<${s}${i}>${super.toString()}`}removeAttribute(t){this.doc!==null?Ho(this.doc,n=>{P4(n,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,n){this.doc!==null?Ho(this.doc,o=>{kB(o,this,t,n)}):this._prelimAttrs.set(t,n)}getAttribute(t){return SB(this,t)}hasAttribute(t){return yse(this,t)}getAttributes(t){return t?pWe(this,t):Ose(this)}toDOM(t=document,n={},o){const r=t.createElement(this.nodeName),s=this.getAttributes();for(const i in s){const c=s[i];typeof c=="string"&&r.setAttribute(i,c)}return KM(this,i=>{r.appendChild(i.toDOM(t,n,o))}),o!==void 0&&o._createAssociation(r,this),r}_write(t){t.writeTypeRef(DWe),t.writeKey(this.nodeName)}}const vWe=e=>new lh(e.readKey());class xWe extends U5{constructor(t,n,o){super(t,o),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(r=>{r===null?this.childListChanged=!0:this.attributesChanged.add(r)})}}class j4 extends ah{constructor(t){super(),this.hookName=t}_copy(){return new j4(this.hookName)}clone(){const t=new j4(this.hookName);return this.forEach((n,o)=>{t.set(o,n)}),t}toDOM(t=document,n={},o){const r=n[this.hookName];let s;return r!==void 0?s=r.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),o!==void 0&&o._createAssociation(s,this),s}_write(t){t.writeTypeRef($We),t.writeKey(this.hookName)}}const wWe=e=>new j4(e.readKey());class I4 extends ch{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new I4}clone(){const t=new I4;return t.applyDelta(this.toDelta()),t}toDOM(t=document,n,o){const r=t.createTextNode(this.toString());return o!==void 0&&o._createAssociation(r,this),r}toString(){return this.toDelta().map(t=>{const n=[];for(const r in t.attributes){const s=[];for(const i in t.attributes[r])s.push({key:i,value:t.attributes[r][i]});s.sort((i,c)=>i.keyr.nodeName=0;r--)o+=``;return o}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(VWe)}}const _We=e=>new I4;class CB{constructor(t,n){this.id=t,this.length=n}get deleted(){throw dc()}mergeWith(t){return!1}write(t,n,o){throw dc()}integrate(t,n){throw dc()}}const kWe=0;class yi extends CB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){n>0&&(this.id.clock+=n,this.length-=n),ase(t.doc.store,this)}write(t,n){t.writeInfo(kWe),t.writeLen(this.length-n)}getMissing(t,n){return null}}class h3{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new h3(this.content)}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeBuf(this.content)}getRef(){return 3}}const SWe=e=>new h3(e.readBuf());class YM{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new YM(this.len)}splice(t){const n=new YM(this.len-t);return this.len=t,n}mergeWith(t){return this.len+=t.len,!0}integrate(t,n){N4(t.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(t){}gc(t){}write(t,n){t.writeLen(this.len-n)}getRef(){return 1}}const CWe=e=>new YM(e.readLen()),_se=(e,t)=>new $h({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class m3{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const n={};this.opts=n,t.gc||(n.gc=!1),t.autoLoad&&(n.autoLoad=!0),t.meta!==null&&(n.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new m3(_se(this.doc.guid,this.opts))}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){this.doc._item=n,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,n){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const qWe=e=>new m3(_se(e.readString(),e.readAny()));class Vf{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Vf(this.embed)}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeJSON(this.embed)}getRef(){return 5}}const RWe=e=>new Vf(e.readJSON());class m0{constructor(t,n){this.key=t,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new m0(this.key,this.value)}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){const o=n.parent;o._searchMarker=null,o._hasFormatting=!0}delete(t){}gc(t){}write(t,n){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const TWe=e=>new m0(e.readKey(),e.readJSON());class D4{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new D4(this.arr)}splice(t){const n=new D4(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){const o=this.arr.length;t.writeLen(o-n);for(let r=n;r{const t=e.readLen(),n=[];for(let o=0;o{const t=e.readLen(),n=[];for(let o=0;o=55296&&o<=56319&&(this.str=this.str.slice(0,t-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(t){return this.str+=t.str,!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const BWe=e=>new vc(e.readString()),LWe=[bWe,mWe,yWe,vWe,AWe,wWe,_We],PWe=0,jWe=1,IWe=2,DWe=3,FWe=4,$We=5,VWe=6;class Yl{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Yl(this.type._copy())}splice(t){throw dc()}mergeWith(t){return!1}integrate(t,n){this.type._integrate(t.doc,n)}delete(t){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(t.beforeState.get(n.id.client)||0)&&t._mergeStructs.push(n):n.delete(t),n=n.right;this.type._map.forEach(o=>{o.deleted?o.id.clock<(t.beforeState.get(o.id.client)||0)&&t._mergeStructs.push(o):o.delete(t)}),t.changed.delete(this.type)}gc(t){let n=this.type._start;for(;n!==null;)n.gc(t,!0),n=n.right;this.type._start=null,this.type._map.forEach(o=>{for(;o!==null;)o.gc(t,!0),o=o.left}),this.type._map=new Map}write(t,n){this.type._write(t)}getRef(){return 7}}const HWe=e=>new Yl(LWe[e.readTypeRef()](e)),F4=(e,t,n)=>{const{client:o,clock:r}=t.id,s=new b1(to(o,r+n),t,to(o,r+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&s.markDeleted(),t.keep&&(s.keep=!0),t.redone!==null&&(s.redone=to(t.redone.client,t.redone.clock+n)),t.right=s,s.right!==null&&(s.right.left=s),e._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),t.length=n,s};let b1=class IE extends CB{constructor(t,n,o,r,s,i,c,l){super(t,l.getLength()),this.origin=o,this.left=n,this.right=r,this.rightOrigin=s,this.parent=i,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?hU:0}set marker(t){(this.info&WS)>0!==t&&(this.info^=WS)}get marker(){return(this.info&WS)>0}get keep(){return(this.info&bU)>0}set keep(t){this.keep!==t&&(this.info^=bU)}get countable(){return(this.info&hU)>0}get deleted(){return(this.info&ES)>0}set deleted(t){this.deleted!==t&&(this.info^=ES)}markDeleted(){this.info|=ES}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=q0(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=q0(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===q2&&this.id.client!==this.parent.client&&this.parent.clock>=q0(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=RU(t,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Od(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===yi||this.right&&this.right.constructor===yi)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===IE&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===IE&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===q2){const o=IS(n,this.parent);o.constructor===yi?this.parent=null:this.parent=o.content.type}return null}integrate(t,n){if(n>0&&(this.id.clock+=n,this.left=RU(t,t.doc.store,to(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let o=this.left,r;if(o!==null)r=o.right;else if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start;const s=new Set,i=new Set;for(;r!==null&&r!==this.right;){if(i.add(r),s.add(r),fA(this.origin,r.origin)){if(r.id.client{o.p===t&&(o.p=this,!this.deleted&&this.countable&&(o.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),N4(t.deleteSet,this.id.client,this.id.clock,this.length),EU(t,n,this.parentSub),this.content.delete(t)}}gc(t,n){if(!this.deleted)throw yc();this.content.gc(t),n?Y8e(t,this,new yi(this.id,this.length)):this.content=new YM(this.length)}write(t,n){const o=n>0?to(this.id.client,this.id.clock+n-1):this.origin,r=this.rightOrigin,s=this.parentSub,i=this.content.getRef()&j5|(o===null?0:Ns)|(r===null?0:Ol)|(s===null?0:VM);if(t.writeInfo(i),o!==null&&t.writeLeftID(o),r!==null&&t.writeRightID(r),o===null&&r===null){const c=this.parent;if(c._item!==void 0){const l=c._item;if(l===null){const u=G8e(c);t.writeParentInfo(!0),t.writeString(u)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else c.constructor===String?(t.writeParentInfo(!0),t.writeString(c)):c.constructor===q2?(t.writeParentInfo(!1),t.writeLeftID(c)):yc();s!==null&&t.writeString(s)}this.content.write(t,n)}};const kse=(e,t)=>UWe[t&j5](e),UWe=[()=>{yc()},CWe,EWe,SWe,BWe,RWe,TWe,HWe,NWe,qWe,()=>{yc()}],XWe=10;class Ai extends CB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){yc()}write(t,n){t.writeInfo(XWe),sn(t.restEncoder,this.length-n)}getMissing(t,n){return null}}const Sse=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof fU<"u"?fU:{},Cse="__ $YJS$ __";Sse[Cse]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");Sse[Cse]=!0;const Hf=e=>oh((t,n)=>{e.onerror=o=>n(new Error(o.target.error)),e.onsuccess=o=>t(o.target.result)}),GWe=(e,t)=>oh((n,o)=>{const r=indexedDB.open(e);r.onupgradeneeded=s=>t(s.target.result),r.onerror=s=>o(fa(s.target.error)),r.onsuccess=s=>{const i=s.target.result;i.onversionchange=()=>{i.close()},n(i)}}),KWe=e=>Hf(indexedDB.deleteDatabase(e)),YWe=(e,t)=>t.forEach(n=>e.createObjectStore.apply(e,n)),Qg=(e,t,n="readwrite")=>{const o=e.transaction(t,n);return t.map(r=>rNe(o,r))},qse=(e,t)=>Hf(e.count(t)),ZWe=(e,t)=>Hf(e.get(t)),Rse=(e,t)=>Hf(e.delete(t)),QWe=(e,t,n)=>Hf(e.put(t,n)),DE=(e,t)=>Hf(e.add(t)),JWe=(e,t,n)=>Hf(e.getAll(t,n)),eNe=(e,t,n)=>{let o=null;return oNe(e,t,r=>(o=r,!1),n).then(()=>o)},tNe=(e,t=null)=>eNe(e,t,"prev"),nNe=(e,t)=>oh((n,o)=>{e.onerror=o,e.onsuccess=async r=>{const s=r.target.result;if(s===null||await t(s)===!1)return n();s.continue()}}),oNe=(e,t,n,o="next")=>nNe(e.openKeyCursor(t,o),r=>n(r.key)),rNe=(e,t)=>e.objectStore(t),sNe=(e,t)=>IDBKeyRange.upperBound(e,t),iNe=(e,t)=>IDBKeyRange.lowerBound(e,t),$S="custom",Tse="updates",Ese=500,Wse=(e,t=()=>{},n=()=>{})=>{const[o]=Qg(e.db,[Tse]);return JWe(o,iNe(e._dbref,!1)).then(r=>{e._destroyed||(t(o),Ho(e.doc,()=>{r.forEach(s=>nse(e.doc,s))},e,!1),n(o))}).then(()=>tNe(o).then(r=>{e._dbref=r+1})).then(()=>qse(o).then(r=>{e._dbsize=r})).then(()=>o)},aNe=(e,t=!0)=>Wse(e).then(n=>{(t||e._dbsize>=Ese)&&DE(n,AB(e.doc)).then(()=>Rse(n,sNe(e._dbref,!0))).then(()=>qse(n).then(o=>{e._dbsize=o}))});class cNe extends d3{constructor(t,n){super(),this.doc=n,this.name=t,this._dbref=0,this._dbsize=0,this._destroyed=!1,this.db=null,this.synced=!1,this._db=GWe(t,o=>YWe(o,[["updates",{autoIncrement:!0}],["custom"]])),this.whenSynced=oh(o=>this.on("synced",()=>o(this))),this._db.then(o=>{this.db=o,Wse(this,i=>DE(i,AB(n)),()=>{if(this._destroyed)return this;this.synced=!0,this.emit("synced",[this])})}),this._storeTimeout=1e3,this._storeTimeoutId=null,this._storeUpdate=(o,r)=>{if(this.db&&r!==this){const[s]=Qg(this.db,[Tse]);DE(s,o),++this._dbsize>=Ese&&(this._storeTimeoutId!==null&&clearTimeout(this._storeTimeoutId),this._storeTimeoutId=setTimeout(()=>{aNe(this,!1),this._storeTimeoutId=null},this._storeTimeout))}},n.on("update",this._storeUpdate),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}destroy(){return this._storeTimeoutId&&clearTimeout(this._storeTimeoutId),this.doc.off("update",this._storeUpdate),this.doc.off("destroy",this.destroy),this._destroyed=!0,this._db.then(t=>{t.close()})}clearData(){return this.destroy().then(()=>{KWe(this.name)})}get(t){return this._db.then(n=>{const[o]=Qg(n,[$S],"readonly");return ZWe(o,t)})}set(t,n){return this._db.then(o=>{const[r]=Qg(o,[$S]);return QWe(r,n,t)})}del(t){return this._db.then(n=>{const[o]=Qg(n,[$S]);return Rse(o,t)})}}function lNe(e,t,n){const o=`${t}-${e}`,r=new cNe(o,n);return new Promise(s=>{r.on("synced",()=>{s(()=>r.destroy())})})}const uNe=1200,dNe=2500,$4=3e4,FE=e=>{if(e.shouldConnect&&e.ws===null){const t=new WebSocket(e.url),n=e.binaryType;let o=null;n&&(t.binaryType=n),e.ws=t,e.connecting=!0,e.connected=!1,t.onmessage=i=>{e.lastMessageReceived=Tl();const c=i.data,l=typeof c=="string"?JSON.parse(c):c;l&&l.type==="pong"&&(clearTimeout(o),o=setTimeout(s,$4/2)),e.emit("message",[l,e])};const r=i=>{e.ws!==null&&(e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:i},e])):e.unsuccessfulReconnects++,setTimeout(FE,aB(aEe(e.unsuccessfulReconnects+1)*uNe,dNe),e)),clearTimeout(o)},s=()=>{e.ws===t&&e.send({type:"ping"})};t.onclose=()=>r(null),t.onerror=i=>r(i),t.onopen=()=>{e.lastMessageReceived=Tl(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),o=setTimeout(s,$4/2)}}};class pNe extends d3{constructor(t,{binaryType:n}={}){super(),this.url=t,this.ws=null,this.binaryType=n||null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&$4n.key===t&&this.onmessage!==null&&this.onmessage({data:mB(n.newValue||"")}),JEe(this._onChange)}postMessage(t){R1e.setItem(this.room,j1e(h8e(t)))}close(){e8e(this._onChange)}}const bNe=typeof BroadcastChannel>"u"?fNe:BroadcastChannel,qB=e=>w1(Nse,e,()=>{const t=zd(),n=new bNe(e);return n.onmessage=o=>t.forEach(r=>r(o.data,"broadcastchannel")),{bc:n,subs:t}}),hNe=(e,t)=>(qB(e).subs.add(t),t),mNe=(e,t)=>{const n=qB(e),o=n.subs.delete(t);return o&&n.subs.size===0&&(n.bc.close(),Nse.delete(e)),o},gNe=(e,t,n=null)=>{const o=qB(e);o.bc.postMessage(t),o.subs.forEach(r=>r(t,n))},MNe=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}};function mA(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var VS={exports:{}},PU;function zNe(){return PU||(PU=1,function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,o=Math.abs,r=Math.pow;return function(){function s(i,c,l){function u(f,b){if(!c[f]){if(!i[f]){var h=typeof mA=="function"&&mA;if(!b&&h)return h(f,!0);if(d)return d(f,!0);var g=new Error("Cannot find module '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}var z=c[f]={exports:{}};i[f][0].call(z.exports,function(A){var _=i[f][1][A];return u(_||A)},z,z.exports,s,i,c,l)}return c[f].exports}for(var d=typeof mA=="function"&&mA,p=0;p>16,T[E++]=255&y>>8,T[E++]=255&y;return R===2&&(y=g[M.charCodeAt(k)]<<2|g[M.charCodeAt(k+1)]>>4,T[E++]=255&y),R===1&&(y=g[M.charCodeAt(k)]<<10|g[M.charCodeAt(k+1)]<<4|g[M.charCodeAt(k+2)]>>2,T[E++]=255&y>>8,T[E++]=255&y),T}function p(M){return h[63&M>>18]+h[63&M>>12]+h[63&M>>6]+h[63&M]}function f(M,y,k){for(var S,C=[],R=y;RE?E:T+R));return S===1?(y=M[k-1],C.push(h[y>>2]+h[63&y<<4]+"==")):S===2&&(y=(M[k-2]<<8)+M[k-1],C.push(h[y>>10]+h[63&y>>4]+h[63&y<<2]+"=")),C.join("")}c.byteLength=function(M){var y=l(M),k=y[0],S=y[1];return 3*(k+S)/4-S},c.toByteArray=d,c.fromByteArray=b;for(var h=[],g=[],z=typeof Uint8Array>"u"?Array:Uint8Array,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,v=A.length;_L)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function h(L,U,ne){return b(L),0>=L||U===void 0?d(L):typeof ne=="string"?d(L).fill(U,ne):d(L).fill(U)}function g(L){return b(L),d(0>L?0:0|M(L))}function z(L,U){if((typeof U!="string"||U==="")&&(U="utf8"),!p.isEncoding(U))throw new TypeError("Unknown encoding: "+U);var ne=0|y(L,U),ve=d(ne),qe=ve.write(L,U);return qe!==ne&&(ve=ve.slice(0,qe)),ve}function A(L){for(var U=0>L.length?0:0|M(L.length),ne=d(U),ve=0;veU||L.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|L}function y(L,U){if(p.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||re(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);var ne=L.length,ve=2>>1;case"base64":return ie(L).length;default:if(qe)return ve?-1:ye(L).length;U=(""+U).toLowerCase(),qe=!0}}function k(L,U,ne){var ve=!1;if((U===void 0||0>U)&&(U=0),U>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),0>=ne)||(ne>>>=0,U>>>=0,ne<=U))return"";for(L||(L="utf8");;)switch(L){case"hex":return V(this,U,ne);case"utf8":case"utf-8":return $(this,U,ne);case"ascii":return X(this,U,ne);case"latin1":case"binary":return Z(this,U,ne);case"base64":return P(this,U,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,U,ne);default:if(ve)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),ve=!0}}function S(L,U,ne){var ve=L[U];L[U]=L[ne],L[ne]=ve}function C(L,U,ne,ve,qe){if(L.length===0)return-1;if(typeof ne=="string"?(ve=ne,ne=0):2147483647ne&&(ne=-2147483648),ne=+ne,pe(ne)&&(ne=qe?0:L.length-1),0>ne&&(ne=L.length+ne),ne>=L.length){if(qe)return-1;ne=L.length-1}else if(0>ne)if(qe)ne=0;else return-1;if(typeof U=="string"&&(U=p.from(U,ve)),p.isBuffer(U))return U.length===0?-1:R(L,U,ne,ve,qe);if(typeof U=="number")return U&=255,typeof Uint8Array.prototype.indexOf=="function"?qe?Uint8Array.prototype.indexOf.call(L,U,ne):Uint8Array.prototype.lastIndexOf.call(L,U,ne):R(L,[U],ne,ve,qe);throw new TypeError("val must be string, number or Buffer")}function R(L,U,ne,ve,qe){function Pe(fe,Re){return rt===1?fe[Re]:fe.readUInt16BE(Re*rt)}var rt=1,qt=L.length,wt=U.length;if(ve!==void 0&&(ve=(ve+"").toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(2>L.length||2>U.length)return-1;rt=2,qt/=2,wt/=2,ne/=2}var Bt;if(qe){var ae=-1;for(Bt=ne;Btqt&&(ne=qt-wt),Bt=ne;0<=Bt;Bt--){for(var H=!0,Y=0;Yqe&&(ve=qe)):ve=qe;var Pe=U.length;ve>Pe/2&&(ve=Pe/2);for(var rt,qt=0;qtPe&&(rt=Pe):qt===2?(wt=L[qe+1],(192&wt)==128&&(H=(31&Pe)<<6|63&wt,127H||57343H&&(rt=H)))}rt===null?(rt=65533,qt=1):65535>>10),rt=56320|1023&rt),ve.push(rt),qe+=qt}return F(ve)}function F(L){var U=L.length;if(U<=4096)return l.apply(String,L);for(var ne="",ve=0;veU)&&(U=0),(!ne||0>ne||ne>ve)&&(ne=ve);for(var qe="",Pe=U;PeL)throw new RangeError("offset is not uint");if(L+U>ne)throw new RangeError("Trying to access beyond buffer length")}function J(L,U,ne,ve,qe,Pe){if(!p.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(U>qe||UL.length)throw new RangeError("Index out of range")}function ue(L,U,ne,ve){if(ne+ve>L.length)throw new RangeError("Index out of range");if(0>ne)throw new RangeError("Index out of range")}function ce(L,U,ne,ve,qe){return U=+U,ne>>>=0,qe||ue(L,U,ne,4),Se.write(L,U,ne,ve,23,4),ne+4}function me(L,U,ne,ve,qe){return U=+U,ne>>>=0,qe||ue(L,U,ne,8),Se.write(L,U,ne,ve,52,8),ne+8}function de(L){if(L=L.split("=")[0],L=L.trim().replace(se,""),2>L.length)return"";for(;L.length%4!=0;)L+="=";return L}function Ae(L){return 16>L?"0"+L.toString(16):L.toString(16)}function ye(L,U){U=U||1/0;for(var ne,ve=L.length,qe=null,Pe=[],rt=0;rtne){if(!qe){if(56319ne){-1<(U-=3)&&Pe.push(239,191,189),qe=ne;continue}ne=(qe-55296<<10|ne-56320)+65536}else qe&&-1<(U-=3)&&Pe.push(239,191,189);if(qe=null,128>ne){if(0>(U-=1))break;Pe.push(ne)}else if(2048>ne){if(0>(U-=2))break;Pe.push(192|ne>>6,128|63&ne)}else if(65536>ne){if(0>(U-=3))break;Pe.push(224|ne>>12,128|63&ne>>6,128|63&ne)}else if(1114112>ne){if(0>(U-=4))break;Pe.push(240|ne>>18,128|63&ne>>12,128|63&ne>>6,128|63&ne)}else throw new Error("Invalid code point")}return Pe}function Ne(L){for(var U=[],ne=0;ne(U-=2));++rt)ne=L.charCodeAt(rt),ve=ne>>8,qe=ne%256,Pe.push(qe),Pe.push(ve);return Pe}function ie(L){return ke.toByteArray(de(L))}function we(L,U,ne,ve){for(var qe=0;qe=U.length||qe>=L.length);++qe)U[qe+ne]=L[qe];return qe}function re(L,U){return L instanceof U||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===U.name}function pe(L){return L!==L}var ke=s("base64-js"),Se=s("ieee754");c.Buffer=p,c.SlowBuffer=function(L){return+L!=L&&(L=0),p.alloc(+L)},c.INSPECT_MAX_BYTES=50,c.kMaxLength=2147483647,p.TYPED_ARRAY_SUPPORT=function(){try{var L=new Uint8Array(1);return L.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},L.foo()===42}catch{return!1}}(),p.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){return p.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){return p.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),p.poolSize=8192,p.from=function(L,U,ne){return f(L,U,ne)},p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,p.alloc=function(L,U,ne){return h(L,U,ne)},p.allocUnsafe=function(L){return g(L)},p.allocUnsafeSlow=function(L){return g(L)},p.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==p.prototype},p.compare=function(L,U){if(re(L,Uint8Array)&&(L=p.from(L,L.offset,L.byteLength)),re(U,Uint8Array)&&(U=p.from(U,U.offset,U.byteLength)),!p.isBuffer(L)||!p.isBuffer(U))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===U)return 0;for(var ne=L.length,ve=U.length,qe=0,Pe=u(ne,ve);qeU&&(L+=" ... "),""},p.prototype.compare=function(L,U,ne,ve,qe){if(re(L,Uint8Array)&&(L=p.from(L,L.offset,L.byteLength)),!p.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if(U===void 0&&(U=0),ne===void 0&&(ne=L?L.length:0),ve===void 0&&(ve=0),qe===void 0&&(qe=this.length),0>U||ne>L.length||0>ve||qe>this.length)throw new RangeError("out of range index");if(ve>=qe&&U>=ne)return 0;if(ve>=qe)return-1;if(U>=ne)return 1;if(U>>>=0,ne>>>=0,ve>>>=0,qe>>>=0,this===L)return 0;for(var Pe=qe-ve,rt=ne-U,qt=u(Pe,rt),wt=this.slice(ve,qe),Bt=L.slice(U,ne),ae=0;ae>>=0,isFinite(ne)?(ne>>>=0,ve===void 0&&(ve="utf8")):(ve=ne,ne=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var qe=this.length-U;if((ne===void 0||ne>qe)&&(ne=qe),0ne||0>U)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");ve||(ve="utf8");for(var Pe=!1;;)switch(ve){case"hex":return T(this,L,U,ne);case"utf8":case"utf-8":return E(this,L,U,ne);case"ascii":return B(this,L,U,ne);case"latin1":case"binary":return N(this,L,U,ne);case"base64":return j(this,L,U,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,L,U,ne);default:if(Pe)throw new TypeError("Unknown encoding: "+ve);ve=(""+ve).toLowerCase(),Pe=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},p.prototype.slice=function(L,U){var ne=this.length;L=~~L,U=U===void 0?ne:~~U,0>L?(L+=ne,0>L&&(L=0)):L>ne&&(L=ne),0>U?(U+=ne,0>U&&(U=0)):U>ne&&(U=ne),U>>=0,U>>>=0,ne||te(L,U,this.length);for(var ve=this[L],qe=1,Pe=0;++Pe>>=0,U>>>=0,ne||te(L,U,this.length);for(var ve=this[L+--U],qe=1;0>>=0,U||te(L,1,this.length),this[L]},p.prototype.readUInt16LE=function(L,U){return L>>>=0,U||te(L,2,this.length),this[L]|this[L+1]<<8},p.prototype.readUInt16BE=function(L,U){return L>>>=0,U||te(L,2,this.length),this[L]<<8|this[L+1]},p.prototype.readUInt32LE=function(L,U){return L>>>=0,U||te(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+16777216*this[L+3]},p.prototype.readUInt32BE=function(L,U){return L>>>=0,U||te(L,4,this.length),16777216*this[L]+(this[L+1]<<16|this[L+2]<<8|this[L+3])},p.prototype.readIntLE=function(L,U,ne){L>>>=0,U>>>=0,ne||te(L,U,this.length);for(var ve=this[L],qe=1,Pe=0;++Pe=qe&&(ve-=r(2,8*U)),ve},p.prototype.readIntBE=function(L,U,ne){L>>>=0,U>>>=0,ne||te(L,U,this.length);for(var ve=U,qe=1,Pe=this[L+--ve];0=qe&&(Pe-=r(2,8*U)),Pe},p.prototype.readInt8=function(L,U){return L>>>=0,U||te(L,1,this.length),128&this[L]?-1*(255-this[L]+1):this[L]},p.prototype.readInt16LE=function(L,U){L>>>=0,U||te(L,2,this.length);var ne=this[L]|this[L+1]<<8;return 32768&ne?4294901760|ne:ne},p.prototype.readInt16BE=function(L,U){L>>>=0,U||te(L,2,this.length);var ne=this[L+1]|this[L]<<8;return 32768&ne?4294901760|ne:ne},p.prototype.readInt32LE=function(L,U){return L>>>=0,U||te(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},p.prototype.readInt32BE=function(L,U){return L>>>=0,U||te(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},p.prototype.readFloatLE=function(L,U){return L>>>=0,U||te(L,4,this.length),Se.read(this,L,!0,23,4)},p.prototype.readFloatBE=function(L,U){return L>>>=0,U||te(L,4,this.length),Se.read(this,L,!1,23,4)},p.prototype.readDoubleLE=function(L,U){return L>>>=0,U||te(L,8,this.length),Se.read(this,L,!0,52,8)},p.prototype.readDoubleBE=function(L,U){return L>>>=0,U||te(L,8,this.length),Se.read(this,L,!1,52,8)},p.prototype.writeUIntLE=function(L,U,ne,ve){if(L=+L,U>>>=0,ne>>>=0,!ve){var qe=r(2,8*ne)-1;J(this,L,U,ne,qe,0)}var Pe=1,rt=0;for(this[U]=255&L;++rt>>=0,ne>>>=0,!ve){var qe=r(2,8*ne)-1;J(this,L,U,ne,qe,0)}var Pe=ne-1,rt=1;for(this[U+Pe]=255&L;0<=--Pe&&(rt*=256);)this[U+Pe]=255&L/rt;return U+ne},p.prototype.writeUInt8=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,1,255,0),this[U]=255&L,U+1},p.prototype.writeUInt16LE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,2,65535,0),this[U]=255&L,this[U+1]=L>>>8,U+2},p.prototype.writeUInt16BE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,2,65535,0),this[U]=L>>>8,this[U+1]=255&L,U+2},p.prototype.writeUInt32LE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,4,4294967295,0),this[U+3]=L>>>24,this[U+2]=L>>>16,this[U+1]=L>>>8,this[U]=255&L,U+4},p.prototype.writeUInt32BE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,4,4294967295,0),this[U]=L>>>24,this[U+1]=L>>>16,this[U+2]=L>>>8,this[U+3]=255&L,U+4},p.prototype.writeIntLE=function(L,U,ne,ve){if(L=+L,U>>>=0,!ve){var qe=r(2,8*ne-1);J(this,L,U,ne,qe-1,-qe)}var Pe=0,rt=1,qt=0;for(this[U]=255&L;++PeL&&qt===0&&this[U+Pe-1]!==0&&(qt=1),this[U+Pe]=255&(L/rt>>0)-qt;return U+ne},p.prototype.writeIntBE=function(L,U,ne,ve){if(L=+L,U>>>=0,!ve){var qe=r(2,8*ne-1);J(this,L,U,ne,qe-1,-qe)}var Pe=ne-1,rt=1,qt=0;for(this[U+Pe]=255&L;0<=--Pe&&(rt*=256);)0>L&&qt===0&&this[U+Pe+1]!==0&&(qt=1),this[U+Pe]=255&(L/rt>>0)-qt;return U+ne},p.prototype.writeInt8=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,1,127,-128),0>L&&(L=255+L+1),this[U]=255&L,U+1},p.prototype.writeInt16LE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,2,32767,-32768),this[U]=255&L,this[U+1]=L>>>8,U+2},p.prototype.writeInt16BE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,2,32767,-32768),this[U]=L>>>8,this[U+1]=255&L,U+2},p.prototype.writeInt32LE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,4,2147483647,-2147483648),this[U]=255&L,this[U+1]=L>>>8,this[U+2]=L>>>16,this[U+3]=L>>>24,U+4},p.prototype.writeInt32BE=function(L,U,ne){return L=+L,U>>>=0,ne||J(this,L,U,4,2147483647,-2147483648),0>L&&(L=4294967295+L+1),this[U]=L>>>24,this[U+1]=L>>>16,this[U+2]=L>>>8,this[U+3]=255&L,U+4},p.prototype.writeFloatLE=function(L,U,ne){return ce(this,L,U,!0,ne)},p.prototype.writeFloatBE=function(L,U,ne){return ce(this,L,U,!1,ne)},p.prototype.writeDoubleLE=function(L,U,ne){return me(this,L,U,!0,ne)},p.prototype.writeDoubleBE=function(L,U,ne){return me(this,L,U,!1,ne)},p.prototype.copy=function(L,U,ne,ve){if(!p.isBuffer(L))throw new TypeError("argument should be a Buffer");if(ne||(ne=0),ve||ve===0||(ve=this.length),U>=L.length&&(U=L.length),U||(U=0),0U)throw new RangeError("targetStart out of bounds");if(0>ne||ne>=this.length)throw new RangeError("Index out of range");if(0>ve)throw new RangeError("sourceEnd out of bounds");ve>this.length&&(ve=this.length),L.length-Uqe||ve==="latin1")&&(L=qe)}}else typeof L=="number"&&(L&=255);if(0>U||this.length>>=0,ne=ne===void 0?this.length:ne>>>0,L||(L=0);var Pe;if(typeof L=="number")for(Pe=U;Pe{g==="%%"||(b++,g==="%c"&&(h=b))}),p.splice(h,0,f)},c.save=function(p){try{p?c.storage.setItem("debug",p):c.storage.removeItem("debug")}catch{}},c.load=u,c.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch{}}(),c.destroy=(()=>{let p=!1;return()=>{p||(p=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),c.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],c.log=console.debug||console.log||(()=>{}),i.exports=s("./common")(c);const{formatters:d}=i.exports;d.j=function(p){try{return JSON.stringify(p)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,s("_process"))},{"./common":5,_process:12}],5:[function(s,i){i.exports=function(c){function l(p){function f(...g){if(!f.enabled)return;const z=f,A=+new Date,_=A-(b||A);z.diff=_,z.prev=b,z.curr=A,b=A,g[0]=l.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let v=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(y,k)=>{if(y==="%%")return"%";v++;const S=l.formatters[k];if(typeof S=="function"){const C=g[v];y=S.call(z,C),g.splice(v,1),v--}return y}),l.formatArgs.call(z,g),(z.log||l.log).apply(z,g)}let b,h=null;return f.namespace=p,f.useColors=l.useColors(),f.color=l.selectColor(p),f.extend=u,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(p):h,set:g=>{h=g}}),typeof l.init=="function"&&l.init(f),f}function u(p,f){const b=l(this.namespace+(typeof f>"u"?":":f)+p);return b.log=this.log,b}function d(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(p){return p instanceof Error?p.stack||p.message:p},l.disable=function(){const p=[...l.names.map(d),...l.skips.map(d).map(f=>"-"+f)].join(",");return l.enable(""),p},l.enable=function(p){l.save(p),l.names=[],l.skips=[];let f;const b=(typeof p=="string"?p:"").split(/[\s,]+/),h=b.length;for(f=0;f{l[p]=c[p]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(p){let f=0;for(let b=0;bj&&!P.warned){P.warned=!0;var $=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+(E+" listeners added. Use emitter.setMaxListeners() to increase limit"));$.name="MaxListenersExceededWarning",$.emitter=T,$.type=E,$.count=P.length,c($)}return T}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(T,E,B){var N={fired:!1,wrapFn:void 0,target:T,type:E,listener:B},j=f.bind(N);return j.listener=B,N.wrapFn=j,j}function h(T,E,B){var N=T._events;if(N===void 0)return[];var j=N[E];return j===void 0?[]:typeof j=="function"?B?[j.listener||j]:[j]:B?_(j):z(j,j.length)}function g(T){var E=this._events;if(E!==void 0){var B=E[T];if(typeof B=="function")return 1;if(B!==void 0)return B.length}return 0}function z(T,E){for(var B=Array(E),N=0;NT||C(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");R=T}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(T){if(typeof T!="number"||0>T||C(T))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+T+".");return this._maxListeners=T,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(T){for(var E=[],B=1;Bj)return this;j===0?B.shift():A(B,j),B.length===1&&(N[T]=B[0]),N.removeListener!==void 0&&this.emit("removeListener",T,P||E)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(T){var E,B,N;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[T]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete B[T]),this;if(arguments.length===0){var j,I=Object.keys(B);for(N=0;N"u")return null;var c={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return c.RTCPeerConnection?c:null}},{}],9:[function(s,i,c){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */c.read=function(l,u,d,p,f){var b,h,g=8*f-p-1,z=(1<>1,_=-7,v=d?f-1:0,M=d?-1:1,y=l[u+v];for(v+=M,b=y&(1<<-_)-1,y>>=-_,_+=g;0<_;b=256*b+l[u+v],v+=M,_-=8);for(h=b&(1<<-_)-1,b>>=-_,_+=p;0<_;h=256*h+l[u+v],v+=M,_-=8);if(b===0)b=1-A;else{if(b===z)return h?NaN:(y?-1:1)*(1/0);h+=r(2,p),b-=A}return(y?-1:1)*h*r(2,b-p)},c.write=function(l,u,d,p,f,b){var h,g,z,A=Math.LN2,_=Math.log,v=8*b-f-1,M=(1<>1,k=f===23?r(2,-24)-r(2,-77):0,S=p?0:b-1,C=p?1:-1,R=0>u||u===0&&0>1/u?1:0;for(u=o(u),isNaN(u)||u===1/0?(g=isNaN(u)?1:0,h=M):(h=n(_(u)/A),1>u*(z=r(2,-h))&&(h--,z*=2),u+=1<=h+y?k/z:k*r(2,1-y),2<=u*z&&(h++,z/=2),h+y>=M?(g=0,h=M):1<=h+y?(g=(u*z-1)*r(2,f),h+=y):(g=u*r(2,y-1)*r(2,f),h=0));8<=f;l[d+S]=255&g,S+=C,g/=256,f-=8);for(h=h<=1.5*h?"s":"")}i.exports=function(f,b){b=b||{};var h=typeof f;if(h=="string"&&0 */let l;i.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?c:window):u=>(l||(l=Promise.resolve())).then(u).catch(d=>setTimeout(()=>{throw d},0))}).call(this)}).call(this,typeof p1>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{}],14:[function(s,i){(function(c,l){(function(){var u=s("safe-buffer").Buffer,d=l.crypto||l.msCrypto;i.exports=d&&d.getRandomValues?function(p,f){if(p>4294967295)throw new RangeError("requested too many random bytes");var b=u.allocUnsafe(p);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{_process:12,"safe-buffer":30}],15:[function(s,i){function c(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g}function l(h,g,z){function A(v,M,y){return typeof g=="string"?g:g(v,M,y)}z||(z=Error);var _=function(v){function M(y,k,S){return v.call(this,A(y,k,S))||this}return c(M,v),M}(z);_.prototype.name=z.name,_.prototype.code=h,b[h]=_}function u(h,g){if(Array.isArray(h)){var z=h.length;return h=h.map(function(A){return A+""}),2h.length)&&(z=h.length),h.substring(z-g.length,z)===g}function f(h,g,z){return typeof z!="number"&&(z=0),!(z+g.length>h.length)&&h.indexOf(g,z)!==-1}var b={};l("ERR_INVALID_OPT_VALUE",function(h,g){return'The value "'+g+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,g,z){var A;typeof g=="string"&&d(g,"not ")?(A="must not be",g=g.replace(/^not /,"")):A="must be";var _;if(p(h," argument"))_="The ".concat(h," ").concat(A," ").concat(u(g,"type"));else{var v=f(h,".")?"property":"argument";_='The "'.concat(h,'" ').concat(v," ").concat(A," ").concat(u(g,"type"))}return _+=". Received type ".concat(typeof z),_},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=b},{}],16:[function(s,i){(function(c){(function(){function l(A){return this instanceof l?(f.call(this,A),b.call(this,A),this.allowHalfOpen=!0,void(A&&(A.readable===!1&&(this.readable=!1),A.writable===!1&&(this.writable=!1),A.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u))))):new l(A)}function u(){this._writableState.ended||c.nextTick(d,this)}function d(A){A.end()}var p=Object.keys||function(A){var _=[];for(var v in A)_.push(v);return _};i.exports=l;var f=s("./_stream_readable"),b=s("./_stream_writable");s("inherits")(l,f);for(var h,g=p(b.prototype),z=0;z>>1,se|=se>>>2,se|=se>>>4,se|=se>>>8,se|=se>>>16,se++),se}function _(se,L){return 0>=se||L.length===0&&L.ended?0:L.objectMode?1:se===se?(se>L.highWaterMark&&(L.highWaterMark=A(se)),se<=L.length?se:L.ended?L.length:(L.needReadable=!0,0)):L.flowing&&L.length?L.buffer.head.data.length:L.length}function v(se,L){if(X("onEofChunk"),!L.ended){if(L.decoder){var U=L.decoder.end();U&&U.length&&(L.buffer.push(U),L.length+=L.objectMode?1:U.length)}L.ended=!0,L.sync?M(se):(L.needReadable=!1,!L.emittedReadable&&(L.emittedReadable=!0,y(se)))}}function M(se){var L=se._readableState;X("emitReadable",L.needReadable,L.emittedReadable),L.needReadable=!1,L.emittedReadable||(X("emitReadable",L.flowing),L.emittedReadable=!0,c.nextTick(y,se))}function y(se){var L=se._readableState;X("emitReadable_",L.destroyed,L.length,L.ended),!L.destroyed&&(L.length||L.ended)&&(se.emit("readable"),L.emittedReadable=!1),L.needReadable=!L.flowing&&!L.ended&&L.length<=L.highWaterMark,N(se)}function k(se,L){L.readingMore||(L.readingMore=!0,c.nextTick(S,se,L))}function S(se,L){for(;!L.reading&&!L.ended&&(L.length=L.length?(U=L.decoder?L.buffer.join(""):L.buffer.length===1?L.buffer.first():L.buffer.concat(L.length),L.buffer.clear()):U=L.buffer.consume(se,L.decoder),U}function I(se){var L=se._readableState;X("endReadable",L.endEmitted),L.endEmitted||(L.ended=!0,c.nextTick(P,L,se))}function P(se,L){if(X("endReadableNT",se.endEmitted,se.length),!se.endEmitted&&se.length===0&&(se.endEmitted=!0,L.readable=!1,L.emit("end"),se.autoDestroy)){var U=L._writableState;(!U||U.autoDestroy&&U.finished)&&L.destroy()}}function $(se,L){for(var U=0,ne=se.length;U=L.highWaterMark)||L.ended))return X("read: emitReadable",L.length,L.ended),L.length===0&&L.ended?I(this):M(this),null;if(se=_(se,L),se===0&&L.ended)return L.length===0&&I(this),null;var ne=L.needReadable;X("need readable",ne),(L.length===0||L.length-se"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(s,i){function c(A,_){var v=this._transformState;v.transforming=!1;var M=v.writecb;if(M===null)return this.emit("error",new b);v.writechunk=null,v.writecb=null,_!=null&&this.push(_),M(A);var y=this._readableState;y.reading=!1,(y.needReadable||y.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(s,i){(function(c){(function(){function l(C,R,T){return R in C?Object.defineProperty(C,R,{value:T,enumerable:!0,configurable:!0,writable:!0}):C[R]=T,C}function u(C,R){return{value:C,done:R}}function d(C){var R=C[g];if(R!==null){var T=C[y].read();T!==null&&(C[v]=null,C[g]=null,C[z]=null,R(u(T,!1)))}}function p(C){c.nextTick(d,C)}function f(C,R){return function(T,E){C.then(function(){return R[_]?void T(u(void 0,!0)):void R[M](T,E)},E)}}var b,h=s("./end-of-stream"),g=Symbol("lastResolve"),z=Symbol("lastReject"),A=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),M=Symbol("handlePromise"),y=Symbol("stream"),k=Object.getPrototypeOf(function(){}),S=Object.setPrototypeOf((b={get stream(){return this[y]},next:function(){var C=this,R=this[A];if(R!==null)return Promise.reject(R);if(this[_])return Promise.resolve(u(void 0,!0));if(this[y].destroyed)return new Promise(function(N,j){c.nextTick(function(){C[A]?j(C[A]):N(u(void 0,!0))})});var T,E=this[v];if(E)T=new Promise(f(E,this));else{var B=this[y].read();if(B!==null)return Promise.resolve(u(B,!1));T=new Promise(this[M])}return this[v]=T,T}},l(b,Symbol.asyncIterator,function(){return this}),l(b,"return",function(){var C=this;return new Promise(function(R,T){C[y].destroy(null,function(E){return E?void T(E):void R(u(void 0,!0))})})}),b),k);i.exports=function(C){var R,T=Object.create(S,(R={},l(R,y,{value:C,writable:!0}),l(R,g,{value:null,writable:!0}),l(R,z,{value:null,writable:!0}),l(R,A,{value:null,writable:!0}),l(R,_,{value:C._readableState.endEmitted,writable:!0}),l(R,M,{value:function(E,B){var N=T[y].read();N?(T[v]=null,T[g]=null,T[z]=null,E(u(N,!1))):(T[g]=E,T[z]=B)},writable:!0}),R));return T[v]=null,h(C,function(E){if(E&&E.code!=="ERR_STREAM_PREMATURE_CLOSE"){var B=T[z];return B!==null&&(T[v]=null,T[g]=null,T[z]=null,B(E)),void(T[A]=E)}var N=T[g];N!==null&&(T[v]=null,T[g]=null,T[z]=null,N(u(void 0,!0))),T[_]=!0}),C.on("readable",p.bind(null,T)),T}}).call(this)}).call(this,s("_process"))},{"./end-of-stream":24,_process:12}],22:[function(s,i){function c(v,M){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(v);M&&(k=k.filter(function(S){return Object.getOwnPropertyDescriptor(v,S).enumerable})),y.push.apply(y,k)}return y}function l(v){for(var M,y=1;y>>0),k=this.head,S=0;k;)b(k.data,y,S),S+=k.data.length,k=k.next;return y}},{key:"consume",value:function(M,y){var k;return MC.length?C.length:M;if(S+=R===C.length?C:C.slice(0,M),M-=R,M===0){R===C.length?(++k,this.head=y.next?y.next:this.tail=null):(this.head=y,y.data=C.slice(R));break}++k}return this.length-=k,S}},{key:"_getBuffer",value:function(M){var y=g.allocUnsafe(M),k=this.head,S=1;for(k.data.copy(y),M-=k.data.length;k=k.next;){var C=k.data,R=M>C.length?C.length:M;if(C.copy(y,y.length-M,0,R),M-=R,M===0){R===C.length?(++S,this.head=k.next?k.next:this.tail=null):(this.head=k,k.data=C.slice(R));break}++S}return this.length-=S,y}},{key:_,value:function(M,y){return A(this,l({},y,{depth:0,customInspect:!1}))}}]),v}()},{buffer:3,util:2}],23:[function(s,i){(function(c){(function(){function l(p,f){d(p,f),u(p)}function u(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit("close")}function d(p,f){p.emit("error",f)}i.exports={destroy:function(p,f){var b=this,h=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;return h||g?(f?f(p):p&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,c.nextTick(d,this,p)):c.nextTick(d,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(z){!f&&z?b._writableState?b._writableState.errorEmitted?c.nextTick(u,b):(b._writableState.errorEmitted=!0,c.nextTick(l,b,z)):c.nextTick(l,b,z):f?(c.nextTick(u,b),f(z)):c.nextTick(u,b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(p,f){var b=p._readableState,h=p._writableState;b&&b.autoDestroy||h&&h.autoDestroy?p.destroy(f):p.emit("error",f)}}}).call(this)}).call(this,s("_process"))},{_process:12}],24:[function(s,i){function c(f){var b=!1;return function(){if(!b){b=!0;for(var h=arguments.length,g=Array(h),z=0;zv.length)throw new z("streams");var k,S=v.map(function(C,R){var T=Rb){var h=f?p:"highWaterMark";throw new l(h,b)}return n(b)}return u.objectMode?16:16384}}},{"../../../errors":15}],28:[function(s,i){i.exports=s("events").EventEmitter},{events:7}],29:[function(s,i,c){c=i.exports=s("./lib/_stream_readable.js"),c.Stream=c,c.Readable=c,c.Writable=s("./lib/_stream_writable.js"),c.Duplex=s("./lib/_stream_duplex.js"),c.Transform=s("./lib/_stream_transform.js"),c.PassThrough=s("./lib/_stream_passthrough.js"),c.finished=s("./lib/internal/streams/end-of-stream.js"),c.pipeline=s("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(s,i,c){function l(f,b){for(var h in f)b[h]=f[h]}function u(f,b,h){return p(f,b,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var d=s("buffer"),p=d.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?i.exports=d:(l(d,c),c.Buffer=u),u.prototype=Object.create(p.prototype),l(p,u),u.from=function(f,b,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return p(f,b,h)},u.alloc=function(f,b,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var g=p(f);return b===void 0?g.fill(0):typeof h=="string"?g.fill(b,h):g.fill(b),g},u.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return p(f)},u.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(f)}},{buffer:3}],31:[function(s,i,c){function l(S){if(!S)return"utf8";for(var C;;)switch(S){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return S;default:if(C)return;S=(""+S).toLowerCase(),C=!0}}function u(S){var C=l(S);if(typeof C!="string"&&(y.isEncoding===k||!k(S)))throw new Error("Unknown encoding: "+S);return C||S}function d(S){this.encoding=u(S);var C;switch(this.encoding){case"utf16le":this.text=g,this.end=z,C=4;break;case"utf8":this.fillLast=h,C=4;break;case"base64":this.text=A,this.end=_,C=3;break;default:return this.write=v,void(this.end=M)}this.lastNeed=0,this.lastTotal=0,this.lastChar=y.allocUnsafe(C)}function p(S){return 127>=S?0:S>>5==6?2:S>>4==14?3:S>>3==30?4:S>>6==2?-1:-2}function f(S,C,R){var T=C.length-1;if(T=T)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1],R.slice(0,-1)}return R}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=S[S.length-1],S.toString("utf16le",C,S.length-1)}function z(S){var C=S&&S.length?this.write(S):"";if(this.lastNeed){var R=this.lastTotal-this.lastNeed;return C+this.lastChar.toString("utf16le",0,R)}return C}function A(S,C){var R=(S.length-C)%3;return R==0?S.toString("base64",C):(this.lastNeed=3-R,this.lastTotal=3,R==1?this.lastChar[0]=S[S.length-1]:(this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1]),S.toString("base64",C,S.length-R))}function _(S){var C=S&&S.length?this.write(S):"";return this.lastNeed?C+this.lastChar.toString("base64",0,3-this.lastNeed):C}function v(S){return S.toString(this.encoding)}function M(S){return S&&S.length?this.write(S):""}var y=s("safe-buffer").Buffer,k=y.isEncoding||function(S){switch(S=""+S,S&&S.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};c.StringDecoder=d,d.prototype.write=function(S){if(S.length===0)return"";var C,R;if(this.lastNeed){if(C=this.fillLast(S),C===void 0)return"";R=this.lastNeed,this.lastNeed=0}else R=0;return R"u"?typeof self>"u"?typeof window>"u"?{}:window:self:p1)},{}],"/":[function(s,i){function c(_){return _.replace(/a=ice-options:trickle\s\n/g,"")}function l(_){console.warn(_)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const u=s("debug")("simple-peer"),d=s("get-browser-rtc"),p=s("randombytes"),f=s("readable-stream"),b=s("queue-microtask"),h=s("err-code"),{Buffer:g}=s("buffer"),z=65536;class A extends f.Duplex{constructor(v){if(v=Object.assign({allowHalfOpen:!1},v),super(v),this._id=p(4).toString("hex").slice(0,7),this._debug("new peer %o",v),this.channelName=v.initiator?v.channelName||p(20).toString("hex"):null,this.initiator=v.initiator||!1,this.channelConfig=v.channelConfig||A.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},A.config,v.config),this.offerOptions=v.offerOptions||{},this.answerOptions=v.answerOptions||{},this.sdpTransform=v.sdpTransform||(M=>M),this.streams=v.streams||(v.stream?[v.stream]:[]),this.trickle=v.trickle===void 0||v.trickle,this.allowHalfTrickle=v.allowHalfTrickle!==void 0&&v.allowHalfTrickle,this.iceCompleteTimeout=v.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=v.wrtc&&typeof v.wrtc=="object"?v.wrtc:d(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(M){return void this.destroy(h(M,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=M=>{this._onIceCandidate(M)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(M=>{this.destroy(h(M,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=M=>{this._setupData(M)},this.streams&&this.streams.forEach(M=>{this.addStream(M)}),this._pc.ontrack=M=>{this._onTrack(M)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof v=="string")try{v=JSON.parse(v)}catch{v={}}this._debug("signal()"),v.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),v.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(v.transceiverRequest.kind,v.transceiverRequest.init)),v.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(v.candidate):this._pendingCandidates.push(v.candidate)),v.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(v)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(M=>{this._addIceCandidate(M)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(M=>{this.destroy(h(M,"ERR_SET_REMOTE_DESCRIPTION"))}),v.sdp||v.candidate||v.renegotiate||v.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(v){const M=new this._wrtc.RTCIceCandidate(v);this._pc.addIceCandidate(M).catch(y=>{!M.address||M.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(y,"ERR_ADD_ICE_CANDIDATE"))})}send(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(v)}}addTransceiver(v,M){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(v,M),this._needsNegotiation()}catch(y){this.destroy(h(y,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:v,init:M}})}}addStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),v.getTracks().forEach(M=>{this.addTrack(M,v)})}}addTrack(v,M){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const y=this._senderMap.get(v)||new Map;let k=y.get(M);if(!k)k=this._pc.addTrack(v,M),y.set(M,k),this._senderMap.set(v,y),this._needsNegotiation();else throw k.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(v,M,y){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const k=this._senderMap.get(v),S=k?k.get(y):null;if(!S)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");M&&this._senderMap.set(M,k),S.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):S.replaceTrack(M)}removeTrack(v,M){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const y=this._senderMap.get(v),k=y?y.get(M):null;if(!k)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{k.removed=!0,this._pc.removeTrack(k)}catch(S){S.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(k):this.destroy(h(S,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),v.getTracks().forEach(M=>{this.removeTrack(M,v)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,b(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(v){this._destroy(v,()=>{})}_destroy(v,M){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",v&&(v.message||v)),b(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",v&&(v.message||v)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,v&&this.emit("error",v),this.emit("close"),M()}))}_setupData(v){if(!v.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=v.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=z),this.channelName=this._channel.label,this._channel.onmessage=y=>{this._onChannelMessage(y)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=y=>{const k=y.error instanceof Error?y.error:new Error(`Datachannel error: ${y.message} ${y.filename}:${y.lineno}:${y.colno}`);this.destroy(h(k,"ERR_DATA_CHANNEL"))};let M=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(M&&this._onChannelClose(),M=!0):M=!1},5e3)}_read(){}_write(v,M,y){if(this.destroyed)return y(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(v)}catch(k){return this.destroy(h(k,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>z?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=y):y(null)}else this._debug("write before connect"),this._chunk=v,this._cb=y}_onFinish(){if(!this.destroyed){const v=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?v():this.once("connect",v)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const M=()=>{if(!this.destroyed){const y=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:y.type,sdp:y.sdp})}};this._pc.setLocalDescription(v).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?M():this.once("_iceComplete",M))}).catch(y=>{this.destroy(h(y,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(v=>{v.mid||!v.sender.track||v.requested||(v.requested=!0,this.addTransceiver(v.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const M=()=>{if(!this.destroyed){const y=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:y.type,sdp:y.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(v).then(()=>{this.destroyed||(this.trickle||this._iceComplete?M():this.once("_iceComplete",M))}).catch(y=>{this.destroy(h(y,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const v=this._pc.iceConnectionState,M=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",v,M),this.emit("iceStateChange",v,M),(v==="connected"||v==="completed")&&(this._pcReady=!0,this._maybeReady()),v==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),v==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(v){const M=y=>(Object.prototype.toString.call(y.values)==="[object Array]"&&y.values.forEach(k=>{Object.assign(y,k)}),y);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(y=>{const k=[];y.forEach(S=>{k.push(M(S))}),v(null,k)},y=>v(y)):0{if(this.destroyed)return;const k=[];y.result().forEach(S=>{const C={};S.names().forEach(R=>{C[R]=S.stat(R)}),C.id=S.id,C.type=S.type,C.timestamp=S.timestamp,k.push(M(C))}),v(null,k)},y=>v(y)):v(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const v=()=>{this.destroyed||this.getStats((M,y)=>{if(this.destroyed)return;M&&(y=[]);const k={},S={},C={};let R=!1;y.forEach(E=>{(E.type==="remotecandidate"||E.type==="remote-candidate")&&(k[E.id]=E),(E.type==="localcandidate"||E.type==="local-candidate")&&(S[E.id]=E),(E.type==="candidatepair"||E.type==="candidate-pair")&&(C[E.id]=E)});const T=E=>{R=!0;let B=S[E.localCandidateId];B&&(B.ip||B.address)?(this.localAddress=B.ip||B.address,this.localPort=+B.port):B&&B.ipAddress?(this.localAddress=B.ipAddress,this.localPort=+B.portNumber):typeof E.googLocalAddress=="string"&&(B=E.googLocalAddress.split(":"),this.localAddress=B[0],this.localPort=+B[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let N=k[E.remoteCandidateId];N&&(N.ip||N.address)?(this.remoteAddress=N.ip||N.address,this.remotePort=+N.port):N&&N.ipAddress?(this.remoteAddress=N.ipAddress,this.remotePort=+N.portNumber):typeof E.googRemoteAddress=="string"&&(N=E.googRemoteAddress.split(":"),this.remoteAddress=N[0],this.remotePort=+N[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(y.forEach(E=>{E.type==="transport"&&E.selectedCandidatePairId&&T(C[E.selectedCandidatePairId]),(E.type==="googCandidatePair"&&E.googActiveConnection==="true"||(E.type==="candidatepair"||E.type==="candidate-pair")&&E.selected)&&T(E)}),!R&&(!Object.keys(C).length||Object.keys(S).length))return void setTimeout(v,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(B){return this.destroy(h(B,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const E=this._cb;this._cb=null,E(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};v()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>z)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(v=>{this._pc.removeTrack(v),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(v){this.destroyed||(v.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:v.candidate.candidate,sdpMLineIndex:v.candidate.sdpMLineIndex,sdpMid:v.candidate.sdpMid}}):!v.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),v.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(v){if(this.destroyed)return;let M=v.data;M instanceof ArrayBuffer&&(M=g.from(M)),this.push(M)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const v=this._cb;this._cb=null,v(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(v){this.destroyed||v.streams.forEach(M=>{this._debug("on track"),this.emit("track",v.track,M),this._remoteTracks.push({track:v.track,stream:M}),this._remoteStreams.some(y=>y.id===M.id)||(this._remoteStreams.push(M),b(()=>{this._debug("on stream"),this.emit("stream",M)}))})}_debug(){const v=[].slice.call(arguments);v[0]="["+this._id+"] "+v[0],u.apply(null,v)}}A.WEBRTC_SUPPORT=!!d(),A.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},A.channelConfig={},i.exports=A},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})}(VS)),VS.exports}var ONe=zNe();const yNe=Zr(ONe),RB=0,TB=1,Bse=2,Lse=(e,t)=>{sn(e,RB);const n=U8e(t);jr(e,n)},Pse=(e,t,n)=>{sn(e,TB),jr(e,AB(t,n))},ANe=(e,t,n)=>Pse(t,n,w0(e)),jse=(e,t,n)=>{try{nse(t,w0(e),n)}catch(o){console.error("Caught error while handling a Yjs update",o)}},vNe=(e,t)=>{sn(e,Bse),jr(e,t)},xNe=jse,wNe=(e,t,n,o)=>{const r=_n(e);switch(r){case RB:ANe(e,t,n);break;case TB:jse(e,n,o);break;case Bse:xNe(e,n,o);break;default:throw new Error("Unknown message type")}return r},HS=3e4;class _Ne extends d3{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const n=Tl();this.getLocalState()!==null&&HS/2<=n-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const o=[];this.meta.forEach((r,s)=>{s!==this.clientID&&HS<=n-r.lastUpdated&&this.states.has(s)&&o.push(s)}),o.length>0&&$E(this,o,"timeout")},Oc(HS/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const n=this.clientID,o=this.meta.get(n),r=o===void 0?0:o.clock+1,s=this.states.get(n);t===null?this.states.delete(n):this.states.set(n,t),this.meta.set(n,{clock:r,lastUpdated:Tl()});const i=[],c=[],l=[],u=[];t===null?u.push(n):s==null?t!=null&&i.push(n):(c.push(n),yM(s,t)||l.push(n)),(i.length>0||l.length>0||u.length>0)&&this.emit("change",[{added:i,updated:l,removed:u},"local"]),this.emit("update",[{added:i,updated:c,removed:u},"local"])}setLocalStateField(t,n){const o=this.getLocalState();o!==null&&this.setLocalState({...o,[t]:n})}getStates(){return this.states}}const $E=(e,t,n)=>{const o=[];for(let r=0;r0&&(e.emit("change",[{added:[],updated:[],removed:o},n]),e.emit("update",[{added:[],updated:[],removed:o},n]))},V4=(e,t,n=e.states)=>{const o=t.length,r=k0();sn(r,o);for(let s=0;s{const o=Rc(t),r=Tl(),s=[],i=[],c=[],l=[],u=_n(o);for(let d=0;d0||c.length>0||l.length>0)&&e.emit("change",[{added:s,updated:c,removed:l},n]),(s.length>0||i.length>0||l.length>0)&&e.emit("update",[{added:s,updated:i,removed:l},n])},SNe=(e,t)=>{const n=TE(e).buffer,o=TE(t).buffer;return crypto.subtle.importKey("raw",n,"PBKDF2",!1,["deriveKey"]).then(r=>crypto.subtle.deriveKey({name:"PBKDF2",salt:o,iterations:1e5,hash:"SHA-256"},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},Ise=(e,t)=>{if(!t)return pB(e);const n=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,e).then(o=>{const r=k0();return uc(r,"AES-GCM"),jr(r,n),jr(r,new Uint8Array(o)),Sr(r)})},CNe=(e,t)=>{const n=k0();return th(n,e),Ise(Sr(n),t)},Dse=(e,t)=>{if(!t)return pB(e);const n=Rc(e);yl(n)!=="AES-GCM"&&jEe(fa("Unknown encryption algorithm"));const r=w0(n),s=w0(n);return crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,s).then(i=>new Uint8Array(i))},Fse=(e,t)=>Dse(e,t).then(n=>nh(Rc(new Uint8Array(n)))),R0=C8e("y-webrtc"),T2=0,$se=3,ZM=1,EB=4,QM=new Map,pc=new Map,Vse=e=>{let t=!0;e.webrtcConns.forEach(n=>{n.synced||(t=!1)}),(!t&&e.synced||t&&!e.synced)&&(e.synced=t,e.provider.emit("synced",[{synced:t}]),R0("synced ",ki,e.name,bf," with all peers"))},Hse=(e,t,n)=>{const o=Rc(t),r=k0(),s=_n(o);if(e===void 0)return null;const i=e.awareness,c=e.doc;let l=!1;switch(s){case T2:{sn(r,T2);const u=wNe(o,r,c,e);u===TB&&!e.synced&&n(),u===RB&&(l=!0);break}case $se:sn(r,ZM),jr(r,V4(i,Array.from(i.getStates().keys()))),l=!0;break;case ZM:kNe(i,w0(o),e);break;case EB:{const u=ff(o)===1,d=yl(o);if(d!==e.peerId&&(e.bcConns.has(d)&&!u||!e.bcConns.has(d)&&u)){const p=[],f=[];u?(e.bcConns.add(d),f.push(d)):(e.bcConns.delete(d),p.push(d)),e.provider.emit("peers",[{added:f,removed:p,webrtcPeers:Array.from(e.webrtcConns.keys()),bcPeers:Array.from(e.bcConns)}]),Use(e)}break}default:return console.error("Unable to compute message"),r}return l?r:null},qNe=(e,t)=>{const n=e.room;return R0("received message from ",ki,e.remotePeerId,gB," (",n.name,")",bf,V5),Hse(n,t,()=>{e.synced=!0,R0("synced ",ki,n.name,bf," with ",ki,e.remotePeerId),Vse(n)})},US=(e,t)=>{R0("send message to ",ki,e.remotePeerId,bf,gB," (",e.room.name,")",V5);try{e.peer.send(Sr(t))}catch{}},RNe=(e,t)=>{R0("broadcast message in ",ki,e.name,bf),e.webrtcConns.forEach(n=>{try{n.peer.send(t)}catch{}})};class H4{constructor(t,n,o,r){R0("establishing connection to ",ki,o),this.room=r,this.remotePeerId=o,this.glareToken=void 0,this.closed=!1,this.connected=!1,this.synced=!1,this.peer=new yNe({initiator:n,...r.provider.peerOpts}),this.peer.on("signal",s=>{this.glareToken===void 0&&(this.glareToken=Date.now()+Math.random()),K5(t,r,{to:o,from:r.peerId,type:"signal",token:this.glareToken,signal:s})}),this.peer.on("connect",()=>{R0("connected to ",ki,o),this.connected=!0;const i=r.provider.doc,c=r.awareness,l=k0();sn(l,T2),Lse(l,i),US(this,l);const u=c.getStates();if(u.size>0){const d=k0();sn(d,ZM),jr(d,V4(c,Array.from(u.keys()))),US(this,d)}}),this.peer.on("close",()=>{this.connected=!1,this.closed=!0,r.webrtcConns.has(this.remotePeerId)&&(r.webrtcConns.delete(this.remotePeerId),r.provider.emit("peers",[{removed:[this.remotePeerId],added:[],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}])),Vse(r),this.peer.destroy(),R0("closed connection to ",ki,o),VE(r)}),this.peer.on("error",s=>{R0("Error in connection to ",ki,o,": ",s),VE(r)}),this.peer.on("data",s=>{const i=qNe(this,s);i!==null&&US(this,i)})}destroy(){this.peer.destroy()}}const Du=(e,t)=>Ise(t,e.key).then(n=>e.mux(()=>gNe(e.name,n))),jU=(e,t)=>{e.bcconnected&&Du(e,t),RNe(e,t)},VE=e=>{QM.forEach(t=>{t.connected&&(t.send({type:"subscribe",topics:[e.name]}),e.webrtcConns.size{if(e.provider.filterBcConns){const t=k0();sn(t,EB),UM(t,1),uc(t,e.peerId),Du(e,Sr(t))}};class TNe{constructor(t,n,o,r){this.peerId=v1e(),this.doc=t,this.awareness=n.awareness,this.provider=n,this.synced=!1,this.name=o,this.key=r,this.webrtcConns=new Map,this.bcConns=new Set,this.mux=MNe(),this.bcconnected=!1,this._bcSubscriber=s=>Dse(new Uint8Array(s),r).then(i=>this.mux(()=>{const c=Hse(this,i,()=>{});c&&Du(this,Sr(c))})),this._docUpdateHandler=(s,i)=>{const c=k0();sn(c,T2),vNe(c,s),jU(this,Sr(c))},this._awarenessUpdateHandler=({added:s,updated:i,removed:c},l)=>{const u=s.concat(i).concat(c),d=k0();sn(d,ZM),jr(d,V4(this.awareness,u)),jU(this,Sr(d))},this._beforeUnloadHandler=()=>{$E(this.awareness,[t.clientID],"window unload"),pc.forEach(s=>{s.disconnect()})},typeof window<"u"?window.addEventListener("beforeunload",this._beforeUnloadHandler):typeof Oi<"u"&&Oi.on("exit",this._beforeUnloadHandler)}connect(){this.doc.on("update",this._docUpdateHandler),this.awareness.on("update",this._awarenessUpdateHandler),VE(this);const t=this.name;hNe(t,this._bcSubscriber),this.bcconnected=!0,Use(this);const n=k0();sn(n,T2),Lse(n,this.doc),Du(this,Sr(n));const o=k0();sn(o,T2),Pse(o,this.doc),Du(this,Sr(o));const r=k0();sn(r,$se),Du(this,Sr(r));const s=k0();sn(s,ZM),jr(s,V4(this.awareness,[this.doc.clientID])),Du(this,Sr(s))}disconnect(){QM.forEach(n=>{n.connected&&n.send({type:"unsubscribe",topics:[this.name]})}),$E(this.awareness,[this.doc.clientID],"disconnect");const t=k0();sn(t,EB),UM(t,0),uc(t,this.peerId),Du(this,Sr(t)),mNe(this.name,this._bcSubscriber),this.bcconnected=!1,this.doc.off("update",this._docUpdateHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.webrtcConns.forEach(n=>n.destroy())}destroy(){this.disconnect(),typeof window<"u"?window.removeEventListener("beforeunload",this._beforeUnloadHandler):typeof Oi<"u"&&Oi.off("exit",this._beforeUnloadHandler)}}const ENe=(e,t,n,o)=>{if(pc.has(n))throw fa(`A Yjs Doc connected to room "${n}" already exists!`);const r=new TNe(e,t,n,o);return pc.set(n,r),r},K5=(e,t,n)=>{t.key?CNe(n,t.key).then(o=>{e.send({type:"publish",topic:t.name,data:j1e(o)})}):e.send({type:"publish",topic:t.name,data:n})};class Xse extends pNe{constructor(t){super(t),this.providers=new Set,this.on("connect",()=>{R0(`connected (${t})`);const n=Array.from(pc.keys());this.send({type:"subscribe",topics:n}),pc.forEach(o=>K5(this,o,{type:"announce",from:o.peerId}))}),this.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=pc.get(o);if(r==null||typeof o!="string")return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i==null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew H4(this,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){R0("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){R0("offer answered by: ",i.from);const d=c.get(i.from);d.glareToken=void 0}i.to===l&&(w1(c,i.from,()=>new H4(this,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&Fse(mB(n.data),r.key).then(s):s(n.data)}}}),this.on("disconnect",()=>R0(`disconnect (${t})`))}}class WNe extends d3{constructor(t,n,{signaling:o=["wss://y-webrtc-eu.fly.dev"],password:r=null,awareness:s=new _Ne(n),maxConns:i=20+Oc(LEe()*15),filterBcConns:c=!0,peerOpts:l={}}={}){super(),this.roomName=t,this.doc=n,this.filterBcConns=c,this.awareness=s,this.shouldConnect=!1,this.signalingUrls=o,this.signalingConns=[],this.maxConns=i,this.peerOpts=l,this.key=r?SNe(r,t):pB(null),this.room=null,this.key.then(u=>{this.room=ENe(n,this,t,u),this.shouldConnect?this.room.connect():this.room.disconnect()}),this.connect(),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}get connected(){return this.room!==null&&this.shouldConnect}connect(){this.shouldConnect=!0,this.signalingUrls.forEach(t=>{const n=w1(QM,t,()=>new Xse(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}disconnect(){this.shouldConnect=!1,this.signalingConns.forEach(t=>{t.providers.delete(this),t.providers.size===0&&(t.destroy(),QM.delete(t.url))}),this.room&&this.room.disconnect()}destroy(){this.doc.off("destroy",this.destroy),this.key.then(()=>{this.room.destroy(),pc.delete(this.roomName)}),super.destroy()}}function NNe(e,t){e.on("connect",()=>{R0(`connected (${t})`);const n=Array.from(pc.keys());e.send({type:"subscribe",topics:n}),pc.forEach(o=>K5(e,o,{type:"announce",from:o.peerId}))}),e.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=pc.get(o);if(r===null||typeof o!="string"||r===void 0)return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i===null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew H4(e,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){R0("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){R0("offer answered by: ",i.from);const d=c.get(i.from);d&&(d.glareToken=void 0)}i.to===l&&(w1(c,i.from,()=>new H4(e,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&Fse(mB(n.data),r.key).then(s):s(n.data)}}}),e.on("disconnect",()=>R0(`disconnect (${t})`))}function IU(e){if(e.shouldConnect&&e.ws===null){const t=Math.floor(1e5+Math.random()*9e5),n=e.url,o=new window.EventSource(tn(n,{subscriber_id:t,action:"gutenberg_signaling_server"}));let r=null;o.onmessage=l=>{e.lastMessageReceived=Date.now();const u=l.data;if(u){const d=JSON.parse(u);Array.isArray(d)&&d.forEach(s)}},e.ws=o,e.connecting=!0,e.connected=!1;const s=l=>{l&&l.type==="pong"&&(clearTimeout(r),r=setTimeout(c,U4/2)),e.emit("message",[l,e])},i=l=>{e.ws!==null&&(e.ws.close(),e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:l},e])):e.unsuccessfulReconnects++),clearTimeout(r)},c=()=>{e.ws&&e.ws.readyState===window.EventSource.OPEN&&e.send({type:"ping"})};e.ws&&(e.ws.onclose=()=>{i(null)},e.ws.send=function(u){window.fetch(n,{body:new URLSearchParams({subscriber_id:t.toString(),action:"gutenberg_signaling_server",message:u}),method:"POST"}).catch(()=>{R0("Error sending to server with message: "+u)})}),o.onerror=()=>{},o.onopen=()=>{e.connected||o.readyState===window.EventSource.OPEN&&(e.lastMessageReceived=Date.now(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),r=setTimeout(c,U4/2))}}}const U4=3e4;class BNe extends d3{constructor(t){super(),this.url=t,this.ws=null,this.binaryType=null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&U4{const n=w1(QM,t,t.startsWith("ws://")||t.startsWith("wss://")?()=>new Xse(t):()=>new BNe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}}function PNe({signaling:e,password:t}){return function(n,o,r){const s=`${o}-${n}`;return new LNe(s,r,{signaling:e,password:t}),Promise.resolve(()=>!0)}}const jNe=(e,t)=>{const n={},o={},r={};function s(u,d){n[u]=d}async function i(u,d,p){const f=new $h;r[u]=r[u]||{},r[u][d]=f;const b=()=>{const z=n[u].fromCRDTDoc(f);p(z)};f.on("update",b);const h=await e(d,u,f);t&&await t(d,u,f);const g=n[u].fetch;g&&g(d).then(z=>{f.transact(()=>{n[u].applyChangesToDoc(f,z)})}),o[u]=o[u]||{},o[u][d]=()=>{h(),f.off("update",b)}}async function c(u,d,p){const f=r[u][d];if(!f)throw"Error doc "+u+" "+d+" not found";f.transact(()=>{n[u].applyChangesToDoc(f,p)})}async function l(u,d){o?.[u]?.[d]&&o[u][d]()}return{register:s,bootstrap:i,update:c,discard:l}};let XS;function HE(){return XS||(XS=jNe(lNe,PNe({signaling:[window?.wp?.ajax?.settings?.url],password:window?.__experimentalCollaborativeEditingSecret}))),XS}function INe(e,t){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(t)?t:[t],queryID:e}}function DNe(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function FNe(e){return{type:"ADD_ENTITIES",entities:e}}function $Ne(e,t,n,o,r=!1,s,i){e==="postType"&&(n=(Array.isArray(n)?n:[n]).map(l=>l.status==="auto-draft"?{...l,title:""}:l));let c;return o?c=aqe(n,o,s,i):c=$0e(n,s,i),{...c,kind:e,name:t,invalidateCache:r}}function VNe(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function HNe(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function UNe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function XNe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function GNe(){return Ke("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function KNe(e,t){return Ke("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:e,revisions:t}}function YNe(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const Gse=(e,t,n,o,{__unstableFetch:r=Tt,throwOnError:s=!1}={})=>async({dispatch:i,resolveSelect:c})=>{const u=(await c.getEntitiesConfig(e)).find(b=>b.kind===e&&b.name===t);let d,p=!1;if(!u)return;const f=await i.__unstableAcquireStoreLock(No,["entities","records",e,t,n],{exclusive:!0});try{i({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let b=!1;try{let h=`${u.baseURL}/${n}`;o&&(h=tn(h,o)),p=await r({path:h,method:"DELETE"}),await i(iqe(e,t,n,!0))}catch(h){b=!0,d=h}if(i({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:d}),b&&s)throw d;return p}finally{i.__unstableReleaseStoreLock(f)}},ZNe=(e,t,n,o,r={})=>({select:s,dispatch:i})=>{const c=s.getEntityConfig(e,t);if(!c)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{mergedEdits:l={}}=c,u=s.getRawEntityRecord(e,t,n),d=s.getEditedEntityRecord(e,t,n),p={kind:e,name:t,recordId:n,edits:Object.keys(o).reduce((f,b)=>{const h=u[b],g=d[b],z=l[b]?{...g,...o[b]}:o[b];return f[b]=N0(h,z)?void 0:z,f},{})};if(window.__experimentalEnableSync&&c.syncConfig){if(globalThis.IS_GUTENBERG_PLUGIN){const f=c.getSyncObjectId(n);HE().update(c.syncObjectType+"--edit",f,p.edits)}}else r.undoIgnore||s.getUndoManager().addRecord([{id:{kind:e,name:t,recordId:n},changes:Object.keys(o).reduce((f,b)=>(f[b]={from:d[b],to:o[b]},f),{})}],r.isCached),i({type:"EDIT_ENTITY_RECORD",...p})},QNe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().undo();n&&t({type:"UNDO",record:n})},JNe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().redo();n&&t({type:"REDO",record:n})},eBe=()=>({select:e})=>{e.getUndoManager().addRecord()},Kse=(e,t,n,{isAutosave:o=!1,__unstableFetch:r=Tt,throwOnError:s=!1}={})=>async({select:i,resolveSelect:c,dispatch:l})=>{const d=(await c.getEntitiesConfig(e)).find(h=>h.kind===e&&h.name===t);if(!d)return;const p=d.key||e1,f=n[p],b=await l.__unstableAcquireStoreLock(No,["entities","records",e,t,f||Is()],{exclusive:!0});try{for(const[A,_]of Object.entries(n))if(typeof _=="function"){const v=_(i.getEditedEntityRecord(e,t,f));l.editEntityRecord(e,t,f,{[A]:v},{undoIgnore:!0}),n[A]=v}l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:f,isAutosave:o});let h,g,z=!1;try{const A=`${d.baseURL}${f?"/"+f:""}`,_=i.getRawEntityRecord(e,t,f);if(o){const v=i.getCurrentUser(),M=v?v.id:void 0,y=await c.getAutosave(_.type,_.id,M);let k={..._,...y,...n};if(k=Object.keys(k).reduce((S,C)=>(["title","excerpt","content","meta"].includes(C)&&(S[C]=k[C]),S),{status:k.status==="auto-draft"?"draft":void 0}),h=await r({path:`${A}/autosaves`,method:"POST",data:k}),_.id===h.id){let S={..._,...k,...h};S=Object.keys(S).reduce((C,R)=>(["title","excerpt","content"].includes(R)?C[R]=S[R]:R==="status"?C[R]=_.status==="auto-draft"&&S.status==="draft"?S.status:_.status:C[R]=_[R],C),{}),l.receiveEntityRecords(e,t,S,void 0,!0)}else l.receiveAutosaves(_.id,h)}else{let v=n;d.__unstablePrePersist&&(v={...v,...d.__unstablePrePersist(_,v)}),h=await r({path:A,method:f?"PUT":"POST",data:v}),l.receiveEntityRecords(e,t,h,void 0,!0,v)}}catch(A){z=!0,g=A}if(l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:f,error:g,isAutosave:o}),z&&s)throw g;return h}finally{l.__unstableReleaseStoreLock(b)}},tBe=e=>async({dispatch:t})=>{const n=eEe(),o={saveEntityRecord(i,c,l,u){return n.add(d=>t.saveEntityRecord(i,c,l,{...u,__unstableFetch:d}))},saveEditedEntityRecord(i,c,l,u){return n.add(d=>t.saveEditedEntityRecord(i,c,l,{...u,__unstableFetch:d}))},deleteEntityRecord(i,c,l,u,d){return n.add(p=>t.deleteEntityRecord(i,c,l,u,{...d,__unstableFetch:p}))}},r=e.map(i=>i(o)),[,...s]=await Promise.all([n.run(),...r]);return s},nBe=(e,t,n,o)=>async({select:r,dispatch:s,resolveSelect:i})=>{if(!r.hasEditsForEntityRecord(e,t,n))return;const l=(await i.getEntitiesConfig(e)).find(f=>f.kind===e&&f.name===t);if(!l)return;const u=l.key||e1,d=r.getEntityRecordNonTransientEdits(e,t,n),p={[u]:n,...d};return await s.saveEntityRecord(e,t,p,o)},oBe=(e,t,n,o,r)=>async({select:s,dispatch:i,resolveSelect:c})=>{if(!s.hasEditsForEntityRecord(e,t,n))return;const l=s.getEntityRecordNonTransientEdits(e,t,n),u={};for(const b of o)B5(u,b,rqe(l,b));const f=(await c.getEntitiesConfig(e)).find(b=>b.kind===e&&b.name===t)?.key||e1;return n&&(u[f]=n),await i.saveEntityRecord(e,t,u,r)};function rBe(e){return Ke("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),Yse("create/media",e)}function Yse(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function sBe(e){return{type:"RECEIVE_USER_PERMISSIONS",permissions:e}}function iBe(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Array.isArray(t)?t:[t]}}function aBe(e){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:e}}function cBe(e,t){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:e,templateId:t}}const lBe=(e,t,n,o,r,s=!1,i)=>async({dispatch:c,resolveSelect:l})=>{const d=(await l.getEntitiesConfig(e)).find(f=>f.kind===e&&f.name===t),p=d&&d?.revisionKey?d.revisionKey:e1;c({type:"RECEIVE_ITEM_REVISIONS",key:p,items:Array.isArray(o)?o:[o],recordKey:n,meta:i,query:r,kind:e,name:t,invalidateCache:s})},uBe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalBatch:tBe,__experimentalReceiveCurrentGlobalStylesId:HNe,__experimentalReceiveThemeBaseGlobalStyles:UNe,__experimentalReceiveThemeGlobalStyleVariations:XNe,__experimentalSaveSpecifiedEntityEdits:oBe,__unstableCreateUndoLevel:eBe,addEntities:FNe,deleteEntityRecord:Gse,editEntityRecord:ZNe,receiveAutosaves:iBe,receiveCurrentTheme:VNe,receiveCurrentUser:DNe,receiveDefaultTemplateId:cBe,receiveEmbedPreview:YNe,receiveEntityRecords:$Ne,receiveNavigationFallbackId:aBe,receiveRevisions:lBe,receiveThemeGlobalStyleRevisions:KNe,receiveThemeSupports:GNe,receiveUploadPermissions:rBe,receiveUserPermission:Yse,receiveUserPermissions:sBe,receiveUserQuery:INe,redo:JNe,saveEditedEntityRecord:nBe,saveEntityRecord:Kse,undo:QNe},Symbol.toStringTag,{value:"Module"}));function dBe(e,t){return{type:"RECEIVE_REGISTERED_POST_META",postType:e,registeredPostMeta:t}}const pBe=Object.freeze(Object.defineProperty({__proto__:null,receiveRegisteredPostMeta:dBe},Symbol.toStringTag,{value:"Module"}));let $b;function Lt(e){if(typeof e!="string"||e.indexOf("&")===-1)return e;$b===void 0&&(document.implementation&&document.implementation.createHTMLDocument?$b=document.implementation.createHTMLDocument("").createElement("textarea"):$b=document.createElement("textarea")),$b.innerHTML=e;const t=$b.textContent;return $b.innerHTML="",t}async function fBe(e,t={},n={}){const o=t.isInitialSuggestions&&t.initialSuggestionsSearchOptions?{...t,...t.initialSuggestionsSearchOptions}:t,{type:r,subtype:s,page:i,perPage:c=t.isInitialSuggestions?3:20}=o,{disablePostFormats:l=!1}=n,u=[];(!r||r==="post")&&u.push(Tt({path:tn("/wp/v2/search",{search:e,page:i,per_page:c,type:"post",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:Lt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"post-type"}))).catch(()=>[])),(!r||r==="term")&&u.push(Tt({path:tn("/wp/v2/search",{search:e,page:i,per_page:c,type:"term",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:Lt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),!l&&(!r||r==="post-format")&&u.push(Tt({path:tn("/wp/v2/search",{search:e,page:i,per_page:c,type:"post-format",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:Lt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),(!r||r==="attachment")&&u.push(Tt({path:tn("/wp/v2/media",{search:e,page:i,per_page:c})}).then(f=>f.map(b=>({id:b.id,url:b.source_url,title:Lt(b.title.rendered||"")||m("(no title)"),type:b.type,kind:"media"}))).catch(()=>[]));let p=(await Promise.all(u)).flat();return p=p.filter(f=>!!f.id),p=bBe(p,e),p=p.slice(0,c),p}function bBe(e,t){const n=DU(t),o={};for(const r of e)if(r.title){const s=DU(r.title),i=s.filter(d=>n.some(p=>d===p)),c=s.filter(d=>n.some(p=>d!==p&&d.includes(p))),l=i.length/s.length*10,u=c.length/s.length;o[r.id]=l+u}else o[r.id]=0;return e.sort((r,s)=>o[s.id]-o[r.id])}function DU(e){return e.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}const GS=new Map,hBe=async(e,t={})=>{const n="/wp-block-editor/v1/url-details",o={url:jf(e)};if(!Pf(e))return Promise.reject(`${e} is not a valid URL.`);const r=v5(e);return!r||!WN(r)||!r.startsWith("http")||!/^https?:\/\/[^\/\s]/i.test(e)?Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`):GS.has(e)?GS.get(e):Tt({path:tn(n,o),...t}).then(s=>(GS.set(e,s),s))};async function mBe(){const e=await Tt({path:"/wp/v2/block-patterns/patterns"});return e?e.map(t=>Object.fromEntries(Object.entries(t).map(([n,o])=>[qN(n),o]))):[]}const gBe=e=>async({dispatch:t})=>{const n=tn("/wp/v2/users/?who=authors&per_page=100",e),o=await Tt({path:n});t.receiveUserQuery(n,o)},MBe=()=>async({dispatch:e})=>{const t=await Tt({path:"/wp/v2/users/me"});e.receiveCurrentUser(t)},Zse=(e,t,n="",o)=>async({select:r,dispatch:s,registry:i,resolveSelect:c})=>{const u=(await c.getEntitiesConfig(e)).find(p=>p.name===t&&p.kind===e);if(!u)return;const d=await s.__unstableAcquireStoreLock(No,["entities","records",e,t,n],{exclusive:!1});try{if(window.__experimentalEnableSync&&u.syncConfig&&!o){if(globalThis.IS_GUTENBERG_PLUGIN){const p=u.getSyncObjectId(n);await HE().bootstrap(u.syncObjectType,p,f=>{s.receiveEntityRecords(e,t,f,o)}),await HE().bootstrap(u.syncObjectType+"--edit",p,f=>{s({type:"EDIT_ENTITY_RECORD",kind:e,name:t,recordId:n,edits:f,meta:{undo:void 0}})})}}else{o!==void 0&&o._fields&&(o={...o,_fields:[...new Set([...Md(o._fields)||[],u.key||e1])].join()});const p=tn(u.baseURL+(n?"/"+n:""),{...u.baseURLParams,...o});if(o!==void 0&&o._fields&&(o={...o,include:[n]},r.hasEntityRecords(e,t,o)))return;const f=await Tt({path:p,parse:!1}),b=await f.json(),h=ZN(f.headers?.get("allow")),g=[],z={};for(const A of zM)z[L5(A,{kind:e,name:t,id:n})]=h[A],g.push([A,{kind:e,name:t,id:n}]);i.batch(()=>{s.receiveEntityRecords(e,t,b,o),s.receiveUserPermissions(z),s.finishResolutions("canUser",g)})}}finally{s.__unstableReleaseStoreLock(d)}},zBe=YN("getEntityRecord"),OBe=YN("getEntityRecord"),X4=(e,t,n={})=>async({dispatch:o,registry:r,resolveSelect:s})=>{const c=(await s.getEntitiesConfig(e)).find(p=>p.name===t&&p.kind===e);if(!c)return;const l=await o.__unstableAcquireStoreLock(No,["entities","records",e,t],{exclusive:!1}),u=c.key||e1;function d(p){return p.filter(f=>f?.[u]).map(f=>[e,t,f[u]])}try{n._fields&&(n={...n,_fields:[...new Set([...Md(n._fields)||[],c.key||e1])].join()});const p=tn(c.baseURL,{...c.baseURLParams,...n});let f=[],b;if(c.supportsPagination&&n.per_page!==-1){const h=await Tt({path:p,parse:!1});f=Object.values(await h.json()),b={totalItems:parseInt(h.headers.get("X-WP-Total")),totalPages:parseInt(h.headers.get("X-WP-TotalPages"))}}else if(n.per_page===-1&&n[F0e]===!0){let h=1,g;do{const z=await Tt({path:tn(p,{page:h,per_page:100}),parse:!1}),A=Object.values(await z.json());g=parseInt(z.headers.get("X-WP-TotalPages")),f.push(...A),r.batch(()=>{o.receiveEntityRecords(e,t,f,n),o.finishResolutions("getEntityRecord",d(A))}),h++}while(h<=g);b={totalItems:f.length,totalPages:1}}else f=Object.values(await Tt({path:p})),b={totalItems:f.length,totalPages:1};n._fields&&(f=f.map(h=>(n._fields.split(",").forEach(g=>{h.hasOwnProperty(g)||(h[g]=void 0)}),h))),r.batch(()=>{if(o.receiveEntityRecords(e,t,f,n,!1,void 0,b),!n?._fields&&!n.context){const h=f.filter(A=>A?.[u]).map(A=>({id:A[u],permissions:ZN(A?._links?.self?.[0].targetHints.allow)})),g=[],z={};for(const A of h)for(const _ of zM)g.push([_,{kind:e,name:t,id:A.id}]),z[L5(_,{kind:e,name:t,id:A.id})]=A.permissions[_];o.receiveUserPermissions(z),o.finishResolutions("getEntityRecord",d(f)),o.finishResolutions("canUser",g)}o.__unstableReleaseStoreLock(l)})}catch{o.__unstableReleaseStoreLock(l)}};X4.shouldInvalidate=(e,t,n)=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&t===e.kind&&n===e.name;const yBe=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("root","theme",{status:"active"});e.receiveCurrentTheme(n[0])},ABe=YN("getCurrentTheme"),vBe=e=>async({dispatch:t})=>{try{const n=await Tt({path:tn("/oembed/1.0/proxy",{url:e})});t.receiveEmbedPreview(e,n)}catch{t.receiveEmbedPreview(e,!1)}},Qse=(e,t,n)=>async({dispatch:o,registry:r,resolveSelect:s})=>{if(!zM.includes(e))throw new Error(`'${e}' is not a valid action.`);const{hasStartedResolution:i}=r.select(No);for(const d of zM){if(d===e)continue;if(i("canUser",[d,t,n]))return}let c=null;if(typeof t=="object"){if(!t.kind||!t.name)throw new Error("The entity resource object is not valid.");const p=(await s.getEntitiesConfig(t.kind)).find(f=>f.name===t.name&&f.kind===t.kind);if(!p)return;c=p.baseURL+(t.id?"/"+t.id:"")}else c=`/wp/v2/${t}`+(n?"/"+n:"");let l;try{l=await Tt({path:c,method:"OPTIONS",parse:!1})}catch{return}const u=ZN(l.headers?.get("allow"));r.batch(()=>{for(const d of zM){const p=L5(d,t,n);o.receiveUserPermission(p,u[d]),d!==e&&o.finishResolution("canUser",[d,t,n])}})},xBe=(e,t,n)=>async({dispatch:o})=>{await o(Qse("update",{kind:e,name:t,id:n}))},wBe=(e,t)=>async({dispatch:n,resolveSelect:o})=>{const{rest_base:r,rest_namespace:s="wp/v2",supports:i}=await o.getPostType(e);if(!i?.autosave)return;const c=await Tt({path:`/${s}/${r}/${t}/autosaves?context=edit`});c&&c.length&&n.receiveAutosaves(t,c)},_Be=(e,t)=>async({resolveSelect:n})=>{await n.getAutosaves(e,t)},kBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("root","theme",{status:"active"}))?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!o)return;const r=o.match(/\/(\d+)(?:\?|$)/),s=r?Number(r[1]):null;s&&e.__experimentalReceiveCurrentGlobalStylesId(s)},SBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await Tt({path:`/wp/v2/global-styles/themes/${n.stylesheet}?context=view`});t.__experimentalReceiveThemeBaseGlobalStyles(n.stylesheet,o)},CBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await Tt({path:`/wp/v2/global-styles/themes/${n.stylesheet}/variations?context=view`});t.__experimentalReceiveThemeGlobalStyleVariations(n.stylesheet,o)},Jse=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.__experimentalGetCurrentGlobalStylesId(),r=(n?await e.getEntityRecord("root","globalStyles",n):void 0)?._links?.["version-history"]?.[0]?.href;if(r){const i=(await Tt({url:r}))?.map(c=>Object.fromEntries(Object.entries(c).map(([l,u])=>[qN(l),u])));t.receiveThemeGlobalStyleRevisions(n,i)}};Jse.shouldInvalidate=e=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&e.kind==="root"&&!e.error&&e.name==="globalStyles";const qBe=()=>async({dispatch:e})=>{const t=await mBe();e({type:"RECEIVE_BLOCK_PATTERNS",patterns:t})},RBe=()=>async({dispatch:e})=>{const t=await Tt({path:"/wp/v2/block-patterns/categories"});e({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:t})},TBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"}))?.map(r=>({...r,label:Lt(r.name),name:r.slug}))||[];e({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:o})},EBe=()=>async({dispatch:e,select:t,registry:n})=>{const o=await Tt({path:tn("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),r=o?._embedded?.self;n.batch(()=>{if(e.receiveNavigationFallbackId(o?.id),!r)return;const i=!t.getEntityRecord("postType","wp_navigation",o.id);e.receiveEntityRecords("postType","wp_navigation",r,void 0,i),e.finishResolution("getEntityRecord",["postType","wp_navigation",o.id])})},WBe=e=>async({dispatch:t,registry:n,resolveSelect:o})=>{const r=await Tt({path:tn("/wp/v2/templates/lookup",e)});await o.getEntitiesConfig("postType"),r?.id&&n.batch(()=>{t.receiveDefaultTemplateId(e,r.id),t.receiveEntityRecords("postType","wp_template",[r]),t.finishResolution("getEntityRecord",["postType","wp_template",r.id])})},eie=(e,t,n,o={})=>async({dispatch:r,registry:s,resolveSelect:i})=>{const l=(await i.getEntitiesConfig(e)).find(h=>h.name===t&&h.kind===e);if(!l)return;o._fields&&(o={...o,_fields:[...new Set([...Md(o._fields)||[],l.revisionKey||e1])].join()});const u=tn(l.getRevisionsUrl(n),o);let d,p;const f={},b=l.supportsPagination&&o.per_page!==-1;try{p=await Tt({path:u,parse:!b})}catch{return}p&&(b?(d=Object.values(await p.json()),f.totalItems=parseInt(p.headers.get("X-WP-Total"))):d=Object.values(p),o._fields&&(d=d.map(h=>(o._fields.split(",").forEach(g=>{h.hasOwnProperty(g)||(h[g]=void 0)}),h))),s.batch(()=>{if(r.receiveRevisions(e,t,n,d,o,!1,f),!o?._fields&&!o.context){const h=l.key||e1,g=d.filter(z=>z[h]).map(z=>[e,t,n,z[h]]);r.finishResolutions("getRevision",g)}}))};eie.shouldInvalidate=(e,t,n,o)=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&n===e.name&&t===e.kind&&!e.error&&o===e.recordId;const NBe=(e,t,n,o,r)=>async({dispatch:s,resolveSelect:i})=>{const l=(await i.getEntitiesConfig(e)).find(p=>p.name===t&&p.kind===e);if(!l)return;r!==void 0&&r._fields&&(r={...r,_fields:[...new Set([...Md(r._fields)||[],l.revisionKey||e1])].join()});const u=tn(l.getRevisionsUrl(n,o),r);let d;try{d=await Tt({path:u})}catch{return}d&&s.receiveRevisions(e,t,n,d,r)},BBe=e=>async({dispatch:t,resolveSelect:n})=>{let o;try{const{rest_namespace:r="wp/v2",rest_base:s}=await n.getPostType(e)||{};o=await Tt({path:`${r}/${s}/?context=edit`,method:"OPTIONS"})}catch{return}o&&t.receiveRegisteredPostMeta(e,o?.schema?.properties?.meta?.properties)},LBe=e=>async({dispatch:t})=>{const n=s1e.find(o=>o.kind===e);if(n)try{const o=await n.loadEntities();if(!o.length)return;t.addEntities(o)}catch{}},PBe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:kBe,__experimentalGetCurrentThemeBaseGlobalStyles:SBe,__experimentalGetCurrentThemeGlobalStylesVariations:CBe,canUser:Qse,canUserEditEntityRecord:xBe,getAuthors:gBe,getAutosave:_Be,getAutosaves:wBe,getBlockPatternCategories:RBe,getBlockPatterns:qBe,getCurrentTheme:yBe,getCurrentThemeGlobalStylesRevisions:Jse,getCurrentUser:MBe,getDefaultTemplateId:WBe,getEditedEntityRecord:OBe,getEmbedPreview:vBe,getEntitiesConfig:LBe,getEntityRecord:Zse,getEntityRecords:X4,getNavigationFallbackId:EBe,getRawEntityRecord:zBe,getRegisteredPostMeta:BBe,getRevision:NBe,getRevisions:eie,getThemeSupports:ABe,getUserPatternCategories:TBe},Symbol.toStringTag,{value:"Module"}));function FU(e,t){const n={...e};let o=n;for(const r of t)o.children={...o.children,[r]:{locks:[],children:{},...o.children[r]}},o=o.children[r];return n}function UE(e,t){let n=e;for(const o of t){const r=n.children[o];if(!r)return null;n=r}return n}function*jBe(e,t){let n=e;yield n;for(const o of t){const r=n.children[o];if(!r)break;yield r,n=r}}function*IBe(e){const t=Object.values(e.children);for(;t.length;){const n=t.pop();yield n,t.push(...Object.values(n.children))}}function $U({exclusive:e},t){return!!(e&&t.length||!e&&t.filter(n=>n.exclusive).length)}const DBe={requests:[],tree:{locks:[],children:{}}};function gA(e=DBe,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:o}=t,{store:r,path:s}=o,i=[r,...s],c=FU(e.tree,i),l=UE(c,i);return l.locks=[...l.locks,n],{...e,requests:e.requests.filter(u=>u!==o),tree:c}}case"RELEASE_LOCK":{const{lock:n}=t,o=[n.store,...n.path],r=FU(e.tree,o),s=UE(r,o);return s.locks=s.locks.filter(i=>i!==n),{...e,tree:r}}}return e}function FBe(e){return e.requests}function $Be(e,t,n,{exclusive:o}){const r=[t,...n],s=e.tree;for(const c of jBe(s,r))if($U({exclusive:o},c.locks))return!1;const i=UE(s,r);if(!i)return!0;for(const c of IBe(i))if($U({exclusive:o},c.locks))return!1;return!0}function VBe(){let e=gA(void 0,{type:"@@INIT"});function t(){for(const r of FBe(e)){const{store:s,path:i,exclusive:c,notifyAcquired:l}=r;if($Be(e,s,i,{exclusive:c})){const u={store:s,path:i,exclusive:c};e=gA(e,{type:"GRANT_LOCK_REQUEST",lock:u,request:r}),l(u)}}}function n(r,s,i){return new Promise(c=>{e=gA(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:r,path:s,exclusive:i,notifyAcquired:c}}),t()})}function o(r){e=gA(e,{type:"RELEASE_LOCK",lock:r}),t()}return{acquire:n,release:o}}function HBe(){const e=VBe();function t(o,r,{exclusive:s}){return()=>e.acquire(o,r,s)}function n(o){return()=>e.release(o)}return{__unstableAcquireStoreLock:t,__unstableReleaseStoreLock:n}}let UBe,XBe;const XE=x.createContext({});function GE({kind:e,type:t,id:n,children:o}){const r=x.useContext(XE),s=x.useMemo(()=>({...r,[e]:{...r?.[e],[t]:n}}),[r,e,t,n]);return a.jsx(XE.Provider,{value:s,children:o})}let is=function(e){return e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS",e}({});const GBe=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function WB(e,t){return G((n,o)=>e(s=>KBe(n(s)),o),t)}const KBe=Hs(e=>{const t={};for(const n in e)GBe.includes(n)||Object.defineProperty(t,n,{get:()=>(...o)=>{const r=e[n](...o),s=e.getResolutionState(n,o)?.status;let i;switch(s){case"resolving":i=is.Resolving;break;case"finished":i=is.Success;break;case"error":i=is.Error;break;case void 0:i=is.Idle;break}return{data:r,status:i,isResolving:i===is.Resolving,hasStarted:i!==is.Idle,hasResolved:i===is.Success||i===is.Error}}});return t}),VU={};function Y5(e,t,n,o={enabled:!0}){const{editEntityRecord:r,saveEditedEntityRecord:s}=Oe(Me),i=x.useMemo(()=>({edit:(f,b={})=>r(e,t,n,f,b),save:(f={})=>s(e,t,n,{throwOnError:!0,...f})}),[r,e,t,n,s]),{editedRecord:c,hasEdits:l,edits:u}=G(f=>o.enabled?{editedRecord:f(Me).getEditedEntityRecord(e,t,n),hasEdits:f(Me).hasEditsForEntityRecord(e,t,n),edits:f(Me).getEntityRecordNonTransientEdits(e,t,n)}:{editedRecord:VU,hasEdits:!1,edits:VU},[e,t,n,o.enabled]),{data:d,...p}=WB(f=>o.enabled?f(Me).getEntityRecord(e,t,n):{data:null},[e,t,n,o.enabled]);return{record:d,editedRecord:c,hasEdits:l,edits:u,...p,...i}}const YBe=[];function Al(e,t,n={},o={enabled:!0}){const r=tn("",n),{data:s,...i}=WB(u=>o.enabled?u(Me).getEntityRecords(e,t,n):{data:YBe},[e,t,r,o.enabled]),{totalItems:c,totalPages:l}=G(u=>o.enabled?{totalItems:u(Me).getEntityRecordsTotalItems(e,t,n),totalPages:u(Me).getEntityRecordsTotalPages(e,t,n)}:{totalItems:null,totalPages:null},[e,t,r,o.enabled]);return{records:s,totalItems:c,totalPages:l,...i}}function ZBe(e,t,n={},o={enabled:!0}){const r=G(d=>d(Me).getEntityConfig(e,t),[e,t]),{records:s,...i}=Al(e,t,n,o),c=x.useMemo(()=>{var d;return(d=s?.map(p=>{var f;return p[(f=r?.key)!==null&&f!==void 0?f:"id"]}))!==null&&d!==void 0?d:[]},[s,r?.key]),l=G(d=>{const{getEntityRecordsPermissions:p}=eh(d(Me));return p(e,t,c)},[c,e,t]);return{records:x.useMemo(()=>{var d;return(d=s?.map((p,f)=>({...p,permissions:l[f]})))!==null&&d!==void 0?d:[]},[s,l]),...i}}const HU=new Set;function QBe(){return globalThis.SCRIPT_DEBUG===!0}function zn(e){if(QBe()&&!HU.has(e)){console.warn(e);try{throw Error(e)}catch{}HU.add(e)}}function tie(e,t){const n=typeof e=="object",o=n?JSON.stringify(e):e;return n&&typeof t<"u"&&globalThis.SCRIPT_DEBUG===!0&&zn("When 'resource' is an entity object, passing 'id' as a separate argument isn't supported."),WB(r=>{const s=n?!!e.id:!!t,{canUser:i}=r(Me),c=i("create",n?{kind:e.kind,name:e.name}:e);if(!s){const h=i("read",e),g=c.isResolving||h.isResolving,z=c.hasResolved&&h.hasResolved;let A=is.Idle;return g?A=is.Resolving:z&&(A=is.Success),{status:A,isResolving:g,hasResolved:z,canCreate:c.hasResolved&&c.data,canRead:h.hasResolved&&h.data}}const l=i("read",e,t),u=i("update",e,t),d=i("delete",e,t),p=l.isResolving||c.isResolving||u.isResolving||d.isResolving,f=l.hasResolved&&c.hasResolved&&u.hasResolved&&d.hasResolved;let b=is.Idle;return p?b=is.Resolving:f&&(b=is.Success),{status:b,isResolving:p,hasResolved:f,canRead:f&&l.data,canCreate:f&&c.data,canUpdate:f&&u.data,canDelete:f&&d.data}},[o,t])}var JBe={grad:.9,turn:360,rad:360/(2*Math.PI)},Zc=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},_0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Si=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},nie=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},UU=function(e){return{r:Si(e.r,0,255),g:Si(e.g,0,255),b:Si(e.b,0,255),a:Si(e.a)}},KS=function(e){return{r:_0(e.r),g:_0(e.g),b:_0(e.b),a:_0(e.a,3)}},eLe=/^#([0-9a-f]{3,8})$/i,MA=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},oie=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=Math.max(t,n,o),i=s-Math.min(t,n,o),c=i?s===t?(n-o)/i:s===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(c<0?c+6:c),s:s?i/s*100:0,v:s/255*100,a:r}},rie=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var s=Math.floor(t),i=o*(1-n),c=o*(1-(t-s)*n),l=o*(1-(1-t+s)*n),u=s%6;return{r:255*[o,c,i,i,l,o][u],g:255*[l,o,o,c,i,i][u],b:255*[i,i,l,o,o,c][u],a:r}},XU=function(e){return{h:nie(e.h),s:Si(e.s,0,100),l:Si(e.l,0,100),a:Si(e.a)}},GU=function(e){return{h:_0(e.h),s:_0(e.s),l:_0(e.l),a:_0(e.a,3)}},KU=function(e){return rie((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},AM=function(e){return{h:(t=oie(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},tLe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nLe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oLe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rLe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,KE={string:[[function(e){var t=eLe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?_0(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?_0(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=oLe.exec(e)||rLe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:UU({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=tLe.exec(e)||nLe.exec(e);if(!t)return null;var n,o,r=XU({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(JBe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return KU(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return Zc(t)&&Zc(n)&&Zc(o)?UU({r:Number(t),g:Number(n),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!Zc(t)||!Zc(n)||!Zc(o))return null;var i=XU({h:Number(t),s:Number(n),l:Number(o),a:Number(s)});return KU(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!Zc(t)||!Zc(n)||!Zc(o))return null;var i=function(c){return{h:nie(c.h),s:Si(c.s,0,100),v:Si(c.v,0,100),a:Si(c.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(s)});return rie(i)},"hsv"]]},YU=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=KS(this.rgba),n=t.r,o=t.g,r=t.b,i=(s=t.a)<1?MA(_0(255*s)):"","#"+MA(n)+MA(o)+MA(r)+i;var t,n,o,r,s,i},e.prototype.toRgb=function(){return KS(this.rgba)},e.prototype.toRgbString=function(){return t=KS(this.rgba),n=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+n+", "+o+", "+r+", "+s+")":"rgb("+n+", "+o+", "+r+")";var t,n,o,r,s},e.prototype.toHsl=function(){return GU(AM(this.rgba))},e.prototype.toHslString=function(){return t=GU(AM(this.rgba)),n=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+n+", "+o+"%, "+r+"%, "+s+")":"hsl("+n+", "+o+"%, "+r+"%)";var t,n,o,r,s},e.prototype.toHsv=function(){return t=oie(this.rgba),{h:_0(t.h),s:_0(t.s),v:_0(t.v),a:_0(t.a,3)};var t},e.prototype.invert=function(){return an({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),an(YS(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),an(YS(this.rgba,-t))},e.prototype.grayscale=function(){return an(YS(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),an(ZU(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),an(ZU(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?an({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):_0(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=AM(this.rgba);return typeof t=="number"?an({h:t,s:n.s,l:n.l,a:n.a}):_0(n.h)},e.prototype.isEqual=function(t){return this.toHex()===an(t).toHex()},e}(),an=function(e){return e instanceof YE?e:new YE(e)},QU=[],Xs=function(e){e.forEach(function(t){QU.indexOf(t)<0&&(t(YE,KE),QU.push(t))})};function Gs(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var s={};e.prototype.toName=function(i){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,l,u=o[this.toHex()];if(u)return u;if(i?.closest){var d=this.toRgb(),p=1/0,f="black";if(!s.length)for(var b in n)s[b]=new e(n[b]).toRgb();for(var h in n){var g=(c=d,l=s[h],Math.pow(c.r-l.r,2)+Math.pow(c.g-l.g,2)+Math.pow(c.b-l.b,2));gl?(c+.05)/(l+.05):(l+.05)/(c+.05),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(t,n){return t===void 0&&(t="#FFF"),n===void 0&&(n={}),this.contrast(t)>=(c=(i=(o=n).size)===void 0?"normal":i,(s=(r=o.level)===void 0?"AA":r)==="AAA"&&c==="normal"?7:s==="AA"&&c==="large"?3:4.5);var o,r,s,i,c}}const sie="block-default",ZE=["attributes","supports","save","migrate","isEligible","apiVersion"],Pp={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},aspectRatio:{value:["dimensions","aspectRatio"],support:["dimensions","aspectRatio"],useEngine:!0},background:{value:["color","gradient"],support:["color","gradients"],useEngine:!0},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0,useEngine:!0},backgroundImage:{value:["background","backgroundImage"],support:["background","backgroundImage"],useEngine:!0},backgroundRepeat:{value:["background","backgroundRepeat"],support:["background","backgroundRepeat"],useEngine:!0},backgroundSize:{value:["background","backgroundSize"],support:["background","backgroundSize"],useEngine:!0},backgroundPosition:{value:["background","backgroundPosition"],support:["background","backgroundPosition"],useEngine:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"},useEngine:!0},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"],useEngine:!0},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"],useEngine:!0},borderTopColor:{value:["border","top","color"],support:["__experimentalBorder","color"],useEngine:!0},borderTopStyle:{value:["border","top","style"],support:["__experimentalBorder","style"],useEngine:!0},borderTopWidth:{value:["border","top","width"],support:["__experimentalBorder","width"],useEngine:!0},borderRightColor:{value:["border","right","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRightStyle:{value:["border","right","style"],support:["__experimentalBorder","style"],useEngine:!0},borderRightWidth:{value:["border","right","width"],support:["__experimentalBorder","width"],useEngine:!0},borderBottomColor:{value:["border","bottom","color"],support:["__experimentalBorder","color"],useEngine:!0},borderBottomStyle:{value:["border","bottom","style"],support:["__experimentalBorder","style"],useEngine:!0},borderBottomWidth:{value:["border","bottom","width"],support:["__experimentalBorder","width"],useEngine:!0},borderLeftColor:{value:["border","left","color"],support:["__experimentalBorder","color"],useEngine:!0},borderLeftStyle:{value:["border","left","style"],support:["__experimentalBorder","style"],useEngine:!0},borderLeftWidth:{value:["border","left","width"],support:["__experimentalBorder","width"],useEngine:!0},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0,useEngine:!0},columnCount:{value:["typography","textColumns"],support:["typography","textColumns"],useEngine:!0},filter:{value:["filter","duotone"],support:["filter","duotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},captionColor:{value:["elements","caption","color","text"],support:["color","caption"]},buttonColor:{value:["elements","button","color","text"],support:["color","button"]},buttonBackgroundColor:{value:["elements","button","color","background"],support:["color","button"]},headingColor:{value:["elements","heading","color","text"],support:["color","heading"]},headingBackgroundColor:{value:["elements","heading","color","background"],support:["color","heading"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"],useEngine:!0},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"],useEngine:!0},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"],useEngine:!0},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"],useEngine:!0},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"],useEngine:!0},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},minHeight:{value:["dimensions","minHeight"],support:["dimensions","minHeight"],useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textAlign:{value:["typography","textAlign"],support:["typography","textAlign"],useEngine:!1},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"],useEngine:!0},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"],useEngine:!0},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"],useEngine:!0},writingMode:{value:["typography","writingMode"],support:["typography","__experimentalWritingMode"],useEngine:!0},"--wp--style--root--padding":{value:["spacing","padding"],support:["spacing","padding"],properties:{"--wp--style--root--padding-top":"top","--wp--style--root--padding-right":"right","--wp--style--root--padding-bottom":"bottom","--wp--style--root--padding-left":"left"},rootOnly:!0}},Za={link:"a:where(:not(.wp-element-button))",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite"},iLe={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"dimensions.aspectRatios":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0},{lock:aLe,unlock:Mf}=P0("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/blocks"),JU={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]};function G4(e){return e!==null&&typeof e=="object"}function cLe({textdomain:e,...t}){const n=["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","selectors","supports","styles","example","variations","blockHooks","allowedBlocks"],o=Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)));return e&&Object.keys(JU).forEach(r=>{o[r]&&(o[r]=QE(JU[r],o[r],e))}),o}function lLe(e,t){const n=G4(e)?e.name:e;if(typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&zn("Block names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n)){globalThis.SCRIPT_DEBUG===!0&&zn("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");return}if(uo(kt).getBlockType(n)){globalThis.SCRIPT_DEBUG===!0&&zn('Block "'+n+'" is already registered.');return}const{addBootstrappedBlockType:o,addUnprocessedBlockType:r}=Mf(kr(kt));if(G4(e)){const s=cLe(e);o(n,s)}return r(n,t),uo(kt).getBlockType(n)}function QE(e,t,n){return typeof e=="string"&&typeof t=="string"?We(t,e,n):Array.isArray(e)&&e.length&&Array.isArray(t)?t.map(o=>QE(e[0],o,n)):G4(e)&&Object.entries(e).length&&G4(t)?Object.keys(t).reduce((o,r)=>e[r]?(o[r]=QE(e[r],t[r],n),o):(o[r]=t[r],o),{}):t}function uLe(e){kr(kt).setFreeformFallbackBlockName(e)}function yd(){return uo(kt).getFreeformFallbackBlockName()}function iie(){return uo(kt).getGroupingBlockName()}function dLe(e){kr(kt).setUnregisteredFallbackBlockName(e)}function g3(){return uo(kt).getUnregisteredFallbackBlockName()}function pLe(e){kr(kt).setDefaultBlockName(e)}function fLe(e){kr(kt).setGroupingBlockName(e)}function Mr(){return uo(kt).getDefaultBlockName()}function on(e){return uo(kt)?.getBlockType(e)}function gs(){return uo(kt).getBlockTypes()}function An(e,t,n){return uo(kt).getBlockSupport(e,t,n)}function Et(e,t,n){return uo(kt).hasBlockSupport(e,t,n)}function Qd(e){return e?.name==="core/block"}function Hh(e){return e?.name==="core/template-part"}const Z5=(e,t)=>uo(kt).getBlockVariations(e,t),eX=e=>{const{name:t,label:n,usesContext:o,getValues:r,setValues:s,canUserEditValue:i,getFieldsList:c}=e,l=Mf(uo(kt)).getBlockBindingsSource(t),u=["label","usesContext"];for(const d in l)if(!u.includes(d)&&l[d]){globalThis.SCRIPT_DEBUG===!0&&zn('Block bindings source "'+t+'" is already registered.');return}if(!t){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source must contain a name.");return}if(typeof t!="string"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source name must be a string.");return}if(/[A-Z]+/.test(t)){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source name must not contain uppercase characters.");return}if(!/^[a-z0-9/-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source name must contain only valid characters: lowercase characters, hyphens, or digits. Example: my-plugin/my-custom-source.");return}if(!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source name must contain a namespace and valid characters. Example: my-plugin/my-custom-source.");return}if(!n&&!l?.label){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source must contain a label.");return}if(n&&typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source label must be a string.");return}if(n&&l?.label&&n!==l?.label&&globalThis.SCRIPT_DEBUG===!0&&zn('Block bindings "'+t+'" source label was overridden.'),o&&!Array.isArray(o)){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source usesContext must be an array.");return}if(r&&typeof r!="function"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source getValues must be a function.");return}if(s&&typeof s!="function"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source setValues must be a function.");return}if(i&&typeof i!="function"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source canUserEditValue must be a function.");return}if(c&&typeof c!="function"){globalThis.SCRIPT_DEBUG===!0&&zn("Block bindings source getFieldsList must be a function.");return}return Mf(kr(kt)).addBlockBindingsSource(e)};function vl(e){return Mf(uo(kt)).getBlockBindingsSource(e)}function aie(){return Mf(uo(kt)).getAllBlockBindingsSources()}Xs([Gs,Uf]);const tX=["#191e23","#f8f9f9"];function E2(e){var t;return Object.entries((t=on(e.name)?.attributes)!==null&&t!==void 0?t:{}).every(([n,o])=>{const r=e.attributes[n];return o.hasOwnProperty("default")?r===o.default:o.type==="rich-text"?!r?.length:r===void 0})}function El(e){return e.name===Mr()&&E2(e)}function cie(e){return!!e&&(typeof e=="string"||x.isValidElement(e)||typeof e=="function"||e instanceof x.Component)}function bLe(e){if(e=e||sie,cie(e))return{src:e};if("background"in e){const t=an(e.background),n=r=>t.contrast(r),o=Math.max(...tX.map(n));return{...e,foreground:e.foreground?e.foreground:tX.find(r=>n(r)===o),shadowColor:t.alpha(.3).toRgbString()}}return e}function M3(e){return typeof e=="string"?on(e):e}function lie(e,t,n="visual"){const{__experimentalLabel:o,title:r}=e,s=o&&o(t,{context:n});return s?s.toPlainText?s.toPlainText():v1(s):r}function uie(e){if(e.default!==void 0)return e.default;if(e.type==="rich-text")return new Xo}function die(e){return on(e)!==void 0}function NB(e,t){const n=on(e);if(n===void 0)throw new Error(`Block type '${e}' is not registered.`);return Object.entries(n.attributes).reduce((o,[r,s])=>{const i=t[r];if(i!==void 0)s.type==="rich-text"?i instanceof Xo?o[r]=i:typeof i=="string"&&(o[r]=Xo.fromHTMLString(i)):s.type==="string"&&i instanceof Xo?o[r]=i.toHTMLString():o[r]=i;else{const c=uie(s);c!==void 0&&(o[r]=c)}return["node","children"].indexOf(s.source)!==-1&&(typeof o[r]=="string"?o[r]=[o[r]]:Array.isArray(o[r])||(o[r]=[])),o},{})}function hLe(e,t){const n=on(e)?.attributes;return n?Object.keys(n).filter(r=>{const s=n[r];return s?.role===t?!0:s?.__experimentalRole===t?(Ke("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${e} block.`}),!0):!1}):[]}function mLe(e){const t=on(e)?.attributes;return t?!!Object.keys(t)?.some(n=>{const o=t[n];return o?.role==="content"||o?.__experimentalRole==="content"}):!1}function Xf(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}const gLe=[{slug:"text",title:m("Text")},{slug:"media",title:m("Media")},{slug:"design",title:m("Design")},{slug:"widgets",title:m("Widgets")},{slug:"theme",title:m("Theme")},{slug:"embed",title:m("Embeds")},{slug:"reusable",title:m("Reusable blocks")}];function BB(e){return e.reduce((t,n)=>({...t,[n.name]:n}),{})}function K4(e){return e.reduce((t,n)=>(t.some(o=>o.name===n.name)||t.push(n),t),[])}function MLe(e={},t){switch(t.type){case"ADD_BOOTSTRAPPED_BLOCK_TYPE":const{name:n,blockType:o}=t,r=e[n];let s;return r?(r.blockHooks===void 0&&o.blockHooks&&(s={...r,...s,blockHooks:o.blockHooks}),r.allowedBlocks===void 0&&o.allowedBlocks&&(s={...r,...s,allowedBlocks:o.allowedBlocks})):(s=Object.fromEntries(Object.entries(o).filter(([,i])=>i!=null).map(([i,c])=>[qN(i),c])),s.name=n),s?{...e,[n]:s}:e;case"REMOVE_BLOCK_TYPES":return Xf(e,t.names)}return e}function zLe(e={},t){switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return Xf(e,t.names)}return e}function OLe(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...BB(t.blockTypes)};case"REMOVE_BLOCK_TYPES":return Xf(e,t.names)}return e}function yLe(e={},t){var n;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(BB(t.blockTypes)).map(([r,s])=>{var i,c;return[r,K4([...((i=s.styles)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_STYLES":const o={};return t.blockNames.forEach(r=>{var s;o[r]=K4([...(s=e[r])!==null&&s!==void 0?s:[],...t.styles])}),{...e,...o};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:((n=e[t.blockName])!==null&&n!==void 0?n:[]).filter(r=>t.styleNames.indexOf(r.name)===-1)}}return e}function ALe(e={},t){var n,o;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(BB(t.blockTypes)).map(([r,s])=>{var i,c;return[r,K4([...((i=s.variations)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:K4([...(n=e[t.blockName])!==null&&n!==void 0?n:[],...t.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:((o=e[t.blockName])!==null&&o!==void 0?o:[]).filter(r=>t.variationNames.indexOf(r.name)===-1)}}return e}function Q5(e){return(t=null,n)=>{switch(n.type){case"REMOVE_BLOCK_TYPES":return n.names.indexOf(t)!==-1?null:t;case e:return n.name||null}return t}}const vLe=Q5("SET_DEFAULT_BLOCK_NAME"),xLe=Q5("SET_FREEFORM_FALLBACK_BLOCK_NAME"),wLe=Q5("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),_Le=Q5("SET_GROUPING_BLOCK_NAME");function kLe(e=gLe,t){switch(t.type){case"SET_CATEGORIES":const n=new Map;return(t.categories||[]).forEach(o=>{n.set(o.slug,o)}),[...n.values()];case"UPDATE_CATEGORY":{if(!t.category||!Object.keys(t.category).length)return e;if(e.find(({slug:r})=>r===t.slug))return e.map(r=>r.slug===t.slug?{...r,...t.category}:r)}}return e}function SLe(e={},t){switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return Xf(e,t.namespace)}return e}function CLe(e=[],t=[]){const n=Array.from(new Set(e.concat(t)));return n.length>0?n:void 0}function qLe(e={},t){switch(t.type){case"ADD_BLOCK_BINDINGS_SOURCE":let n;return(globalThis.IS_GUTENBERG_PLUGIN||t.name==="core/post-meta")&&(n=t.getFieldsList),{...e,[t.name]:{label:t.label||e[t.name]?.label,usesContext:CLe(e[t.name]?.usesContext,t.usesContext),getValues:t.getValues,setValues:t.setValues,canUserEditValue:t.setValues&&t.canUserEditValue,getFieldsList:n}};case"REMOVE_BLOCK_BINDINGS_SOURCE":return Xf(e,t.name)}return e}const RLe=J0({bootstrappedBlockTypes:MLe,unprocessedBlockTypes:zLe,blockTypes:OLe,blockStyles:yLe,blockVariations:ALe,defaultBlockName:vLe,freeformFallbackBlockName:xLe,unregisteredFallbackBlockName:wLe,groupingBlockName:_Le,categories:kLe,collections:SLe,blockBindingsSources:qLe}),JM=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let s=e;return r.forEach(i=>{s=s?.[i]}),(o=s)!==null&&o!==void 0?o:n};function nX(e){return typeof e=="object"&&e.constructor===Object&&e!==null}function pie(e,t){return nX(e)&&nX(t)?Object.entries(t).every(([n,o])=>pie(e?.[n],o)):e===t}const TLe=["background","backgroundColor","color","linkColor","captionColor","buttonColor","headingColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","padding","contentSize","wideSize","blockGap","textDecoration","textTransform","letterSpacing"];function oX(e,t,n){return e.filter(o=>!(o==="fontSize"&&n==="heading"||o==="textDecoration"&&!t&&n!=="link"||o==="textTransform"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="letterSpacing"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="textColumns"&&!t))}const ELe=It((e,t,n)=>{if(!t)return oX(TLe,t,n);const o=z3(e,t);if(!o)return[];const r=[];return o?.supports?.spacing?.blockGap&&r.push("blockGap"),o?.supports?.shadow&&r.push("shadow"),Object.keys(Pp).forEach(s=>{if(Pp[s].support){if(Pp[s].requiresOptOut&&Pp[s].support[0]in o.supports&&JM(o.supports,Pp[s].support)!==!1){r.push(s);return}JM(o.supports,Pp[s].support,!1)&&r.push(s)}}),oX(r,t,n)},(e,t)=>[e.blockTypes[t]]);function WLe(e,t){return e.bootstrappedBlockTypes[t]}function NLe(e){return e.unprocessedBlockTypes}function BLe(e){return e.blockBindingsSources}function LLe(e,t){return e.blockBindingsSources[t]}const fie=(e,t)=>{const n=z3(e,t);return n?Object.values(n.attributes).some(({role:o,__experimentalRole:r})=>o==="content"?!0:r==="content"?(Ke("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${t} block.`}),!0):!1):!1},PLe=Object.freeze(Object.defineProperty({__proto__:null,getAllBlockBindingsSources:BLe,getBlockBindingsSource:LLe,getBootstrappedBlockType:WLe,getSupportedStyles:ELe,getUnprocessedBlockTypes:NLe,hasContentRoleAttribute:fie},Symbol.toStringTag,{value:"Module"})),bie=(e,t)=>typeof t=="string"?z3(e,t):t,hie=It(e=>Object.values(e.blockTypes),e=>[e.blockTypes]);function z3(e,t){return e.blockTypes[t]}function jLe(e,t){return e.blockStyles[t]}const LB=It((e,t,n)=>{const o=e.blockVariations[t];return!o||!n?o:o.filter(r=>(r.scope||["block","inserter"]).includes(n))},(e,t)=>[e.blockVariations[t]]);function ILe(e,t,n,o){const r=LB(e,t,o);if(!r)return r;const s=z3(e,t),i=Object.keys(s?.attributes||{});let c,l=0;for(const u of r)if(Array.isArray(u.isActive)){const d=u.isActive.filter(b=>{const h=b.split(".")[0];return i.includes(h)}),p=d.length;if(p===0)continue;d.every(b=>{const h=JM(u.attributes,b);if(h===void 0)return!1;let g=JM(n,b);return g instanceof Xo&&(g=g.toHTMLString()),pie(g,h)})&&p>l&&(c=u,l=p)}else if(u.isActive?.(n,u.attributes))return c||u;return c}function DLe(e,t,n){const o=LB(e,t,n);return[...o].reverse().find(({isDefault:s})=>!!s)||o[0]}function FLe(e){return e.categories}function $Le(e){return e.collections}function VLe(e){return e.defaultBlockName}function HLe(e){return e.freeformFallbackBlockName}function ULe(e){return e.unregisteredFallbackBlockName}function XLe(e){return e.groupingBlockName}const PB=It((e,t)=>hie(e).filter(n=>n.parent?.includes(t)).map(({name:n})=>n),e=>[e.blockTypes]),mie=(e,t,n,o)=>{const r=bie(e,t);return r?.supports?JM(r.supports,n,o):o};function gie(e,t,n,o){return!!mie(e,t,n,o)}function rX(e){return ms(e??"").toLowerCase().trim()}function GLe(e,t,n=""){const o=bie(e,t),r=rX(n),s=i=>rX(i).includes(r);return s(o.title)||o.keywords?.some(s)||s(o.category)||typeof o.description=="string"&&s(o.description)}const KLe=(e,t)=>PB(e,t).length>0,YLe=(e,t)=>PB(e,t).some(n=>gie(e,n,"inserter",!0)),ZLe=(...e)=>(Ke("__experimentalHasContentRoleAttribute",{since:"6.7",version:"6.8",hint:"This is a private selector."}),fie(...e)),QLe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalHasContentRoleAttribute:ZLe,getActiveBlockVariation:ILe,getBlockStyles:jLe,getBlockSupport:mie,getBlockType:z3,getBlockTypes:hie,getBlockVariations:LB,getCategories:FLe,getChildBlockNames:PB,getCollections:$Le,getDefaultBlockName:VLe,getDefaultBlockVariation:DLe,getFreeformFallbackBlockName:HLe,getGroupingBlockName:XLe,getUnregisteredFallbackBlockName:ULe,hasBlockSupport:gie,hasChildBlocks:KLe,hasChildBlocksWithInserterSupport:YLe,isMatchingSearchTerm:GLe},Symbol.toStringTag,{value:"Module"}));var eC={exports:{}},ko={};/** * @license React * react-is.production.min.js * @@ -73,7 +73,7 @@ Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,s("_proc * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var sX;function ePe(){if(sX)return ko;sX=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),h;h=Symbol.for("react.module.reference");function g(z){if(typeof z=="object"&&z!==null){var A=z.$$typeof;switch(A){case e:switch(z=z.type,z){case n:case r:case o:case u:case d:return z;default:switch(z=z&&z.$$typeof,z){case c:case i:case l:case f:case p:case s:return z;default:return A}}case t:return A}}}return ko.ContextConsumer=i,ko.ContextProvider=s,ko.Element=e,ko.ForwardRef=l,ko.Fragment=n,ko.Lazy=f,ko.Memo=p,ko.Portal=t,ko.Profiler=r,ko.StrictMode=o,ko.Suspense=u,ko.SuspenseList=d,ko.isAsyncMode=function(){return!1},ko.isConcurrentMode=function(){return!1},ko.isContextConsumer=function(z){return g(z)===i},ko.isContextProvider=function(z){return g(z)===s},ko.isElement=function(z){return typeof z=="object"&&z!==null&&z.$$typeof===e},ko.isForwardRef=function(z){return g(z)===l},ko.isFragment=function(z){return g(z)===n},ko.isLazy=function(z){return g(z)===f},ko.isMemo=function(z){return g(z)===p},ko.isPortal=function(z){return g(z)===t},ko.isProfiler=function(z){return g(z)===r},ko.isStrictMode=function(z){return g(z)===o},ko.isSuspense=function(z){return g(z)===u},ko.isSuspenseList=function(z){return g(z)===d},ko.isValidElementType=function(z){return typeof z=="string"||typeof z=="function"||z===n||z===r||z===o||z===u||z===d||z===b||typeof z=="object"&&z!==null&&(z.$$typeof===f||z.$$typeof===p||z.$$typeof===s||z.$$typeof===i||z.$$typeof===l||z.$$typeof===h||z.getModuleId!==void 0)},ko.typeOf=g,ko}var iX;function tPe(){return iX||(iX=1,tC.exports=ePe()),tC.exports}var nPe=tPe();const aX={common:"text",formatting:"text",layout:"design"};function oPe(e=[],t=[]){const n=[...e];return t.forEach(o=>{const r=n.findIndex(s=>s.name===o.name);r!==-1?n[r]={...n[r],...o}:n.push(o)}),n}const Mie=(e,t)=>({select:n})=>{const o=n.getBootstrappedBlockType(e),r={name:e,icon:sie,keywords:[],attributes:{},providesContext:{},usesContext:[],selectors:{},supports:{},styles:[],blockHooks:{},save:()=>null,...o,...t,variations:oPe(Array.isArray(o?.variations)?o.variations:[],Array.isArray(t?.variations)?t.variations:[])},s=gr("blocks.registerBlockType",r,e,null);if(s.description&&typeof s.description!="string"&&Ke("Declaring non-string block descriptions",{since:"6.2"}),s.deprecated&&(s.deprecated=s.deprecated.map(i=>Object.fromEntries(Object.entries(gr("blocks.registerBlockType",{...Xf(r,QE),...i},r.name,i)).filter(([c])=>QE.includes(c))))),!a3(s)){globalThis.SCRIPT_DEBUG===!0&&zn("Block settings must be a valid object.");return}if(typeof s.save!="function"){globalThis.SCRIPT_DEBUG===!0&&zn('The "save" property must be a valid function.');return}if("edit"in s&&!nPe.isValidElementType(s.edit)){globalThis.SCRIPT_DEBUG===!0&&zn('The "edit" property must be a valid component.');return}if(aX.hasOwnProperty(s.category)&&(s.category=aX[s.category]),"category"in s&&!n.getCategories().some(({slug:i})=>i===s.category)&&(globalThis.SCRIPT_DEBUG===!0&&zn('The block "'+e+'" is registered with an invalid category "'+s.category+'".'),delete s.category),!("title"in s)||s.title===""){globalThis.SCRIPT_DEBUG===!0&&zn('The block "'+e+'" must have a title.');return}if(typeof s.title!="string"){globalThis.SCRIPT_DEBUG===!0&&zn("Block titles must be strings.");return}if(s.icon=hLe(s.icon),!cie(s.icon.src)){globalThis.SCRIPT_DEBUG===!0&&zn("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional");return}if((typeof s?.parent=="string"||s?.parent instanceof String)&&(s.parent=[s.parent],globalThis.SCRIPT_DEBUG===!0&&zn("Parent must be undefined or an array of strings (block types), but it is a string.")),!Array.isArray(s?.parent)&&s?.parent!==void 0){globalThis.SCRIPT_DEBUG===!0&&zn("Parent must be undefined or an array of block types, but it is ",s.parent);return}if(s?.parent?.length===1&&e===s.parent[0]){globalThis.SCRIPT_DEBUG===!0&&zn('Block "'+e+'" cannot be a parent of itself. Please remove the block name from the parent list.');return}return s};function rPe(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(e)?e:[e]}}function zie(){return({dispatch:e,select:t})=>{const n=[];for(const[o,r]of Object.entries(t.getUnprocessedBlockTypes())){const s=e(Mie(o,r));s&&n.push(s)}n.length&&e.addBlockTypes(n)}}function sPe(){return Ke('wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters',{since:"6.4",alternative:"reapplyBlockFilters"}),zie()}function iPe(e){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(e)?e:[e]}}function aPe(e,t){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(t)?t:[t],blockNames:Array.isArray(e)?e:[e]}}function cPe(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(t)?t:[t],blockName:e}}function lPe(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(t)?t:[t],blockName:e}}function uPe(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(t)?t:[t],blockName:e}}function dPe(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function pPe(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function fPe(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function bPe(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function hPe(e){return{type:"SET_CATEGORIES",categories:e}}function mPe(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function gPe(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function MPe(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const zPe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalReapplyBlockFilters:sPe,addBlockCollection:gPe,addBlockStyles:aPe,addBlockTypes:rPe,addBlockVariations:lPe,reapplyBlockTypeFilters:zie,removeBlockCollection:MPe,removeBlockStyles:cPe,removeBlockTypes:iPe,removeBlockVariations:uPe,setCategories:hPe,setDefaultBlockName:dPe,setFreeformFallbackBlockName:pPe,setGroupingBlockName:bPe,setUnregisteredFallbackBlockName:fPe,updateCategory:mPe},Symbol.toStringTag,{value:"Module"}));function OPe(e,t){return{type:"ADD_BOOTSTRAPPED_BLOCK_TYPE",name:e,blockType:t}}function yPe(e,t){return({dispatch:n})=>{n({type:"ADD_UNPROCESSED_BLOCK_TYPE",name:e,blockType:t});const o=n(Mie(e,t));o&&n.addBlockTypes(o)}}function APe(e){return{type:"ADD_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext,getValues:e.getValues,setValues:e.setValues,canUserEditValue:e.canUserEditValue,getFieldsList:e.getFieldsList}}function vPe(e){return{type:"REMOVE_BLOCK_BINDINGS_SOURCE",name:e}}const xPe=Object.freeze(Object.defineProperty({__proto__:null,addBlockBindingsSource:APe,addBootstrappedBlockType:OPe,addUnprocessedBlockType:yPe,removeBlockBindingsSource:vPe},Symbol.toStringTag,{value:"Module"})),wPe="core/blocks",kt=x1(wPe,{reducer:TLe,selectors:JLe,actions:zPe});Us(kt);Mf(kt).registerPrivateSelectors(jLe);Mf(kt).registerPrivateActions(xPe);function Ee(e,t={},n=[]){if(!die(e))return Ee("core/missing",{originalName:e,originalContent:"",originalUndelimitedContent:""});const o=BB(e,t);return{clientId:Is(),name:e,isValid:!0,attributes:o,innerBlocks:n}}function Ad(e=[]){return e.map(t=>{const n=Array.isArray(t)?t:[t.name,t.attributes,t.innerBlocks],[o,r,s=[]]=n;return Ee(o,r,Ad(s))})}function Oie(e,t={},n){const{name:o}=e;if(!die(o))return Ee("core/missing",{originalName:o,originalContent:"",originalUndelimitedContent:""});const r=Is(),s=BB(o,{...e.attributes,...t});return{...e,clientId:r,attributes:s,innerBlocks:n||e.innerBlocks.map(i=>Oie(i))}}function jo(e,t={},n){const o=Is();return{...e,clientId:o,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map(r=>jo(r))}}const yie=(e,t,n)=>{if(!n.length)return!1;const o=n.length>1,r=n[0].name;if(!(W2(e)||!o||e.isMultiBlock)||!W2(e)&&!n.every(u=>u.name===r)||!(e.type==="block"))return!1;const c=n[0];return!(!(t!=="from"||e.blocks.indexOf(c.name)!==-1||W2(e))||!o&&t==="from"&&cX(c.name)&&cX(e.blockName)||!e8(e,n))},_Pe=e=>e.length?gs().filter(o=>{const r=Ei("from",o.name);return!!xc(r,s=>yie(s,"from",e))}):[],kPe=e=>{if(!e.length)return[];const t=e[0],n=on(t.name);return(n?Ei("to",n.name):[]).filter(i=>i&&yie(i,"to",e)).map(i=>i.blocks).flat().map(on)},W2=e=>e&&e.type==="block"&&Array.isArray(e.blocks)&&e.blocks.includes("*"),cX=e=>e===iie();function Aie(e){if(!e.length)return[];const t=_Pe(e),n=kPe(e);return[...new Set([...t,...n])]}function xc(e,t){const n=Hre();for(let o=0;os||r,r.priority)}return n.applyFilters("transform",null)}function Ei(e,t){if(t===void 0)return gs().map(({name:c})=>Ei(e,c)).flat();const n=M3(t),{name:o,transforms:r}=n||{};if(!r||!Array.isArray(r[e]))return[];const s=r.supportedMobileTransforms&&Array.isArray(r.supportedMobileTransforms);return(s?r[e].filter(c=>c.type==="raw"||c.type==="prefix"?!0:!c.blocks||!c.blocks.length?!1:W2(c)?!0:c.blocks.every(l=>r.supportedMobileTransforms.includes(l))):r[e]).map(c=>({...c,blockName:o,usingMobileTransformations:s}))}function e8(e,t){if(typeof e.isMatch!="function")return!0;const n=t[0],o=e.isMultiBlock?t.map(s=>s.attributes):n.attributes,r=e.isMultiBlock?t:n;return e.isMatch(o,r)}function Kr(e,t){const n=Array.isArray(e)?e:[e],o=n.length>1,r=n[0],s=r.name,i=Ei("from",t),c=Ei("to",s),l=xc(c,f=>f.type==="block"&&(W2(f)||f.blocks.indexOf(t)!==-1)&&(!o||f.isMultiBlock)&&e8(f,n))||xc(i,f=>f.type==="block"&&(W2(f)||f.blocks.indexOf(s)!==-1)&&(!o||f.isMultiBlock)&&e8(f,n));if(!l)return null;let u;return l.isMultiBlock?"__experimentalConvert"in l?u=l.__experimentalConvert(n):u=l.transform(n.map(f=>f.attributes),n.map(f=>f.innerBlocks)):"__experimentalConvert"in l?u=l.__experimentalConvert(r):u=l.transform(r.attributes,r.innerBlocks),u===null||typeof u!="object"||(u=Array.isArray(u)?u:[u],u.some(f=>!on(f.name)))||!u.some(f=>f.name===t)?null:u.map((f,b,h)=>gr("blocks.switchToBlockType.transformedBlock",f,e,b,h))}const IB=(e,t)=>{var n;return Ee(e,t.attributes,((n=t.innerBlocks)!==null&&n!==void 0?n:[]).map(o=>IB(o.name,o)))};let fc,Qa,zf,Qu;const vie=/)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function Fv(e,t,n,o,r){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:o,innerContent:r}}function DB(e){return Fv(null,{},[],e,[e])}function SPe(e,t,n,o,r){return{block:e,tokenStart:t,tokenLength:n,prevOffset:o||t+n,leadingHtmlStart:r}}const xie=e=>{fc=e,Qa=0,zf=[],Qu=[],vie.lastIndex=0;do;while(CPe());return zf};function CPe(){const e=Qu.length,t=RPe(),[n,o,r,s,i]=t,c=s>Qa?Qa:null;switch(n){case"no-more-tokens":if(e===0)return nC(),!1;if(e===1)return oC(),!1;for(;0{const o="(<("+("(?=!--|!\\[CDATA\\[)((?=!-)"+"!(?:-(?!->)[^\\-]*)*(?:-->)?"+"|"+"!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?"+")")+"|[^>]*>?))";return new RegExp(o)})();function EPe(e){const t=[];let n=e,o;for(;o=n.match(TPe);){const r=o.index;t.push(n.slice(0,r)),t.push(o[0]),n=n.slice(r+o[0].length)}return n.length&&t.push(n),t}function WPe(e,t){const n=EPe(e);let o=!1;const r=Object.keys(t);for(let s=1;s{const r=n.findIndex(s=>s.name===o.name);r!==-1?n[r]={...n[r],...o}:n.push(o)}),n}const Mie=(e,t)=>({select:n})=>{const o=n.getBootstrappedBlockType(e),r={name:e,icon:sie,keywords:[],attributes:{},providesContext:{},usesContext:[],selectors:{},supports:{},styles:[],blockHooks:{},save:()=>null,...o,...t,variations:nPe(Array.isArray(o?.variations)?o.variations:[],Array.isArray(t?.variations)?t.variations:[])},s=gr("blocks.registerBlockType",r,e,null);if(s.description&&typeof s.description!="string"&&Ke("Declaring non-string block descriptions",{since:"6.2"}),s.deprecated&&(s.deprecated=s.deprecated.map(i=>Object.fromEntries(Object.entries(gr("blocks.registerBlockType",{...Xf(r,ZE),...i},r.name,i)).filter(([c])=>ZE.includes(c))))),!a3(s)){globalThis.SCRIPT_DEBUG===!0&&zn("Block settings must be a valid object.");return}if(typeof s.save!="function"){globalThis.SCRIPT_DEBUG===!0&&zn('The "save" property must be a valid function.');return}if("edit"in s&&!tPe.isValidElementType(s.edit)){globalThis.SCRIPT_DEBUG===!0&&zn('The "edit" property must be a valid component.');return}if(aX.hasOwnProperty(s.category)&&(s.category=aX[s.category]),"category"in s&&!n.getCategories().some(({slug:i})=>i===s.category)&&(globalThis.SCRIPT_DEBUG===!0&&zn('The block "'+e+'" is registered with an invalid category "'+s.category+'".'),delete s.category),!("title"in s)||s.title===""){globalThis.SCRIPT_DEBUG===!0&&zn('The block "'+e+'" must have a title.');return}if(typeof s.title!="string"){globalThis.SCRIPT_DEBUG===!0&&zn("Block titles must be strings.");return}if(s.icon=bLe(s.icon),!cie(s.icon.src)){globalThis.SCRIPT_DEBUG===!0&&zn("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional");return}if((typeof s?.parent=="string"||s?.parent instanceof String)&&(s.parent=[s.parent],globalThis.SCRIPT_DEBUG===!0&&zn("Parent must be undefined or an array of strings (block types), but it is a string.")),!Array.isArray(s?.parent)&&s?.parent!==void 0){globalThis.SCRIPT_DEBUG===!0&&zn("Parent must be undefined or an array of block types, but it is ",s.parent);return}if(s?.parent?.length===1&&e===s.parent[0]){globalThis.SCRIPT_DEBUG===!0&&zn('Block "'+e+'" cannot be a parent of itself. Please remove the block name from the parent list.');return}return s};function oPe(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(e)?e:[e]}}function zie(){return({dispatch:e,select:t})=>{const n=[];for(const[o,r]of Object.entries(t.getUnprocessedBlockTypes())){const s=e(Mie(o,r));s&&n.push(s)}n.length&&e.addBlockTypes(n)}}function rPe(){return Ke('wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters',{since:"6.4",alternative:"reapplyBlockFilters"}),zie()}function sPe(e){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(e)?e:[e]}}function iPe(e,t){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(t)?t:[t],blockNames:Array.isArray(e)?e:[e]}}function aPe(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(t)?t:[t],blockName:e}}function cPe(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(t)?t:[t],blockName:e}}function lPe(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(t)?t:[t],blockName:e}}function uPe(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function dPe(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function pPe(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function fPe(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function bPe(e){return{type:"SET_CATEGORIES",categories:e}}function hPe(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function mPe(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function gPe(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const MPe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalReapplyBlockFilters:rPe,addBlockCollection:mPe,addBlockStyles:iPe,addBlockTypes:oPe,addBlockVariations:cPe,reapplyBlockTypeFilters:zie,removeBlockCollection:gPe,removeBlockStyles:aPe,removeBlockTypes:sPe,removeBlockVariations:lPe,setCategories:bPe,setDefaultBlockName:uPe,setFreeformFallbackBlockName:dPe,setGroupingBlockName:fPe,setUnregisteredFallbackBlockName:pPe,updateCategory:hPe},Symbol.toStringTag,{value:"Module"}));function zPe(e,t){return{type:"ADD_BOOTSTRAPPED_BLOCK_TYPE",name:e,blockType:t}}function OPe(e,t){return({dispatch:n})=>{n({type:"ADD_UNPROCESSED_BLOCK_TYPE",name:e,blockType:t});const o=n(Mie(e,t));o&&n.addBlockTypes(o)}}function yPe(e){return{type:"ADD_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext,getValues:e.getValues,setValues:e.setValues,canUserEditValue:e.canUserEditValue,getFieldsList:e.getFieldsList}}function APe(e){return{type:"REMOVE_BLOCK_BINDINGS_SOURCE",name:e}}const vPe=Object.freeze(Object.defineProperty({__proto__:null,addBlockBindingsSource:yPe,addBootstrappedBlockType:zPe,addUnprocessedBlockType:OPe,removeBlockBindingsSource:APe},Symbol.toStringTag,{value:"Module"})),xPe="core/blocks",kt=x1(xPe,{reducer:RLe,selectors:QLe,actions:MPe});Us(kt);Mf(kt).registerPrivateSelectors(PLe);Mf(kt).registerPrivateActions(vPe);function Ee(e,t={},n=[]){if(!die(e))return Ee("core/missing",{originalName:e,originalContent:"",originalUndelimitedContent:""});const o=NB(e,t);return{clientId:Is(),name:e,isValid:!0,attributes:o,innerBlocks:n}}function Ad(e=[]){return e.map(t=>{const n=Array.isArray(t)?t:[t.name,t.attributes,t.innerBlocks],[o,r,s=[]]=n;return Ee(o,r,Ad(s))})}function Oie(e,t={},n){const{name:o}=e;if(!die(o))return Ee("core/missing",{originalName:o,originalContent:"",originalUndelimitedContent:""});const r=Is(),s=NB(o,{...e.attributes,...t});return{...e,clientId:r,attributes:s,innerBlocks:n||e.innerBlocks.map(i=>Oie(i))}}function jo(e,t={},n){const o=Is();return{...e,clientId:o,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map(r=>jo(r))}}const yie=(e,t,n)=>{if(!n.length)return!1;const o=n.length>1,r=n[0].name;if(!(W2(e)||!o||e.isMultiBlock)||!W2(e)&&!n.every(u=>u.name===r)||!(e.type==="block"))return!1;const c=n[0];return!(!(t!=="from"||e.blocks.indexOf(c.name)!==-1||W2(e))||!o&&t==="from"&&cX(c.name)&&cX(e.blockName)||!JE(e,n))},wPe=e=>e.length?gs().filter(o=>{const r=Ei("from",o.name);return!!xc(r,s=>yie(s,"from",e))}):[],_Pe=e=>{if(!e.length)return[];const t=e[0],n=on(t.name);return(n?Ei("to",n.name):[]).filter(i=>i&&yie(i,"to",e)).map(i=>i.blocks).flat().map(on)},W2=e=>e&&e.type==="block"&&Array.isArray(e.blocks)&&e.blocks.includes("*"),cX=e=>e===iie();function Aie(e){if(!e.length)return[];const t=wPe(e),n=_Pe(e);return[...new Set([...t,...n])]}function xc(e,t){const n=Hre();for(let o=0;os||r,r.priority)}return n.applyFilters("transform",null)}function Ei(e,t){if(t===void 0)return gs().map(({name:c})=>Ei(e,c)).flat();const n=M3(t),{name:o,transforms:r}=n||{};if(!r||!Array.isArray(r[e]))return[];const s=r.supportedMobileTransforms&&Array.isArray(r.supportedMobileTransforms);return(s?r[e].filter(c=>c.type==="raw"||c.type==="prefix"?!0:!c.blocks||!c.blocks.length?!1:W2(c)?!0:c.blocks.every(l=>r.supportedMobileTransforms.includes(l))):r[e]).map(c=>({...c,blockName:o,usingMobileTransformations:s}))}function JE(e,t){if(typeof e.isMatch!="function")return!0;const n=t[0],o=e.isMultiBlock?t.map(s=>s.attributes):n.attributes,r=e.isMultiBlock?t:n;return e.isMatch(o,r)}function Kr(e,t){const n=Array.isArray(e)?e:[e],o=n.length>1,r=n[0],s=r.name,i=Ei("from",t),c=Ei("to",s),l=xc(c,f=>f.type==="block"&&(W2(f)||f.blocks.indexOf(t)!==-1)&&(!o||f.isMultiBlock)&&JE(f,n))||xc(i,f=>f.type==="block"&&(W2(f)||f.blocks.indexOf(s)!==-1)&&(!o||f.isMultiBlock)&&JE(f,n));if(!l)return null;let u;return l.isMultiBlock?"__experimentalConvert"in l?u=l.__experimentalConvert(n):u=l.transform(n.map(f=>f.attributes),n.map(f=>f.innerBlocks)):"__experimentalConvert"in l?u=l.__experimentalConvert(r):u=l.transform(r.attributes,r.innerBlocks),u===null||typeof u!="object"||(u=Array.isArray(u)?u:[u],u.some(f=>!on(f.name)))||!u.some(f=>f.name===t)?null:u.map((f,b,h)=>gr("blocks.switchToBlockType.transformedBlock",f,e,b,h))}const jB=(e,t)=>{var n;return Ee(e,t.attributes,((n=t.innerBlocks)!==null&&n!==void 0?n:[]).map(o=>jB(o.name,o)))};let fc,Qa,zf,Qu;const vie=/)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function Dv(e,t,n,o,r){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:o,innerContent:r}}function IB(e){return Dv(null,{},[],e,[e])}function kPe(e,t,n,o,r){return{block:e,tokenStart:t,tokenLength:n,prevOffset:o||t+n,leadingHtmlStart:r}}const xie=e=>{fc=e,Qa=0,zf=[],Qu=[],vie.lastIndex=0;do;while(SPe());return zf};function SPe(){const e=Qu.length,t=qPe(),[n,o,r,s,i]=t,c=s>Qa?Qa:null;switch(n){case"no-more-tokens":if(e===0)return tC(),!1;if(e===1)return nC(),!1;for(;0{const o="(<("+("(?=!--|!\\[CDATA\\[)((?=!-)"+"!(?:-(?!->)[^\\-]*)*(?:-->)?"+"|"+"!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?"+")")+"|[^>]*>?))";return new RegExp(o)})();function TPe(e){const t=[];let n=e,o;for(;o=n.match(RPe);){const r=o.index;t.push(n.slice(0,r)),t.push(o[0]),n=n.slice(r+o[0].length)}return n.length&&t.push(n),t}function EPe(e,t){const n=TPe(e);let o=!1;const r=Object.keys(t);for(let s=1;s"),i=s.pop();e="";for(let c=0;c";n.push([d,l.substr(u)+""]),e+=l.substr(0,u)+d}e+=i}e=e.replace(/\s*/g,` `);const o="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";e=e.replace(new RegExp("(<"+o+"[\\s/>])","g"),` @@ -81,7 +81,7 @@ Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,s("_proc $1`),e=e.replace(new RegExp("()","g"),`$1 `),e=e.replace(/\r\n|\r/g,` -`),e=WPe(e,{"\n":" "}),e.indexOf("\s*/g,"")),e.indexOf("")!==-1&&(e=e.replace(/(]*>)\s*/g,"$1"),e=e.replace(/\s*<\/object>/g,""),e=e.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),(e.indexOf("\]]*[>\]])\s*/g,"$1"),e=e.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1"),e=e.replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),e.indexOf("]*>)/,"$1"),e=e.replace(/<\/figcaption>\s*/,"")),e=e.replace(/\n\n+/g,` +`),e=EPe(e,{"\n":" "}),e.indexOf("\s*/g,"")),e.indexOf("")!==-1&&(e=e.replace(/(]*>)\s*/g,"$1"),e=e.replace(/\s*<\/object>/g,""),e=e.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),(e.indexOf("\]]*[>\]])\s*/g,"$1"),e=e.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1"),e=e.replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),e.indexOf("]*>)/,"$1"),e=e.replace(/<\/figcaption>\s*/,"")),e=e.replace(/\n\n+/g,` `);const r=e.split(/\n\s*\n/).filter(Boolean);return e="",r.forEach(s=>{e+="

"+s.replace(/^\n*|\n*$/g,"")+`

`}),e=e.replace(/

\s*<\/p>/g,""),e=e.replace(/

([^<]+)<\/(div|address|form)>/g,"

$1

"),e=e.replace(new RegExp("

\\s*(]*>)\\s*

","g"),"$1"),e=e.replace(/

(/g,"$1"),e=e.replace(/

]*)>/gi,"

"),e=e.replace(/<\/blockquote><\/p>/g,"

"),e=e.replace(new RegExp("

\\s*(]*>)","g"),"$1"),e=e.replace(new RegExp("(]*>)\\s*

","g"),"$1"),t&&(e=e.replace(/<(script|style).*?<\/\\1>/g,s=>s[0].replace(/\n/g,"")),e=e.replace(/
|/g,"
"),e=e.replace(/(
)?\s*\n/g,(s,i)=>i?s:`
@@ -120,16 +120,16 @@ $1`),e=e.replace(new RegExp("()","g"),`$1 $1`),e=e.replace(/^\s+/,""),e=e.replace(/[\s\u00a0]+$/,""),s&&(e=e.replace(//g,` `)),i&&(e=e.replace(/]*)>/g,"")),r.length&&(e=e.replace(//g,()=>r.shift())),e):""}function ez(e,t={}){const{isCommentDelimited:n=!0}=t,{blockName:o,attrs:r={},innerBlocks:s=[],innerContent:i=[]}=e;let c=0;const l=i.map(u=>u!==null?u:ez(s[c++],t)).join(` `).replace(/\n+/g,` -`).trim();return n?Cie(o,r,l):l}function Z4(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return gr("blocks.getBlockDefaultClassName",t,e)}function FB(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return gr("blocks.getBlockMenuDefaultClassName",t,e)}const t8={},kie={};function Q4(e={}){const{blockType:t,attributes:n}=t8;return Q4.skipFilters?e:gr("blocks.getSaveContent.extraProps",{...e},t,n)}function NPe(e={}){const{innerBlocks:t}=kie;if(!Array.isArray(t))return{...e,children:t};const n=Ks(t,{isInnerBlocks:!0});return{...e,children:a.jsx(i0,{children:n})}}function Sie(e,t,n=[]){const o=M3(e);if(!o?.save)return null;let{save:r}=o;if(r.prototype instanceof x.Component){const i=new r({attributes:t});r=i.render.bind(i)}t8.blockType=o,t8.attributes=t,kie.innerBlocks=n;let s=r({attributes:t,innerBlocks:n});if(s!==null&&typeof s=="object"&&Xre("blocks.getSaveContent.extraProps")&&!(o.apiVersion>1)){const i=gr("blocks.getSaveContent.extraProps",{...s.props},o,t);ds(i,s.props)||(s=x.cloneElement(s,i))}return gr("blocks.getSaveElement",s,o,t)}function Gf(e,t,n){const o=M3(e);return M1(Sie(o,t,n))}function BPe(e,t){var n;return Object.entries((n=e.attributes)!==null&&n!==void 0?n:{}).reduce((o,[r,s])=>{const i=t[r];return i===void 0||s.source!==void 0||s.role==="local"?o:s.__experimentalRole==="local"?(Ke("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${e?.name} block.`}),o):("default"in s&&JSON.stringify(s.default)===JSON.stringify(i)||(o[r]=i),o)},{})}function LPe(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}function ew(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=Gf(e.name,e.attributes,e.innerBlocks)}catch{}return t}function Cie(e,t,n){const o=t&&Object.entries(t).length?LPe(t)+" ":"",r=e?.startsWith("core/")?e.slice(5):e;return n?` +`).trim();return n?Cie(o,r,l):l}function Y4(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return gr("blocks.getBlockDefaultClassName",t,e)}function DB(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return gr("blocks.getBlockMenuDefaultClassName",t,e)}const e8={},kie={};function Z4(e={}){const{blockType:t,attributes:n}=e8;return Z4.skipFilters?e:gr("blocks.getSaveContent.extraProps",{...e},t,n)}function WPe(e={}){const{innerBlocks:t}=kie;if(!Array.isArray(t))return{...e,children:t};const n=Ks(t,{isInnerBlocks:!0});return{...e,children:a.jsx(i0,{children:n})}}function Sie(e,t,n=[]){const o=M3(e);if(!o?.save)return null;let{save:r}=o;if(r.prototype instanceof x.Component){const i=new r({attributes:t});r=i.render.bind(i)}e8.blockType=o,e8.attributes=t,kie.innerBlocks=n;let s=r({attributes:t,innerBlocks:n});if(s!==null&&typeof s=="object"&&Xre("blocks.getSaveContent.extraProps")&&!(o.apiVersion>1)){const i=gr("blocks.getSaveContent.extraProps",{...s.props},o,t);ds(i,s.props)||(s=x.cloneElement(s,i))}return gr("blocks.getSaveElement",s,o,t)}function Gf(e,t,n){const o=M3(e);return M1(Sie(o,t,n))}function NPe(e,t){var n;return Object.entries((n=e.attributes)!==null&&n!==void 0?n:{}).reduce((o,[r,s])=>{const i=t[r];return i===void 0||s.source!==void 0||s.role==="local"?o:s.__experimentalRole==="local"?(Ke("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${e?.name} block.`}),o):("default"in s&&JSON.stringify(s.default)===JSON.stringify(i)||(o[r]=i),o)},{})}function BPe(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}function J5(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=Gf(e.name,e.attributes,e.innerBlocks)}catch{}return t}function Cie(e,t,n){const o=t&&Object.entries(t).length?BPe(t)+" ":"",r=e?.startsWith("core/")?e.slice(5):e;return n?` `+n+` -`:``}function PPe(e,{isInnerBlocks:t=!1}={}){if(!e.isValid&&e.__unstableBlockSource)return ez(e.__unstableBlockSource);const n=e.name,o=ew(e);if(n===g3()||!t&&n===yd())return o;const r=on(n);if(!r)return o;const s=BPe(r,e.attributes);return Cie(n,s,o)}function Jd(e){e.length===1&&Wl(e[0])&&(e=[]);let t=Ks(e);return e.length===1&&e[0].name===yd()&&e[0].name==="core/freeform"&&(t=_ie(t)),t}function Ks(e,t){return(Array.isArray(e)?e:[e]).map(o=>PPe(o,t)).join(` +`:``}function LPe(e,{isInnerBlocks:t=!1}={}){if(!e.isValid&&e.__unstableBlockSource)return ez(e.__unstableBlockSource);const n=e.name,o=J5(e);if(n===g3()||!t&&n===yd())return o;const r=on(n);if(!r)return o;const s=NPe(r,e.attributes);return Cie(n,s,o)}function Jd(e){e.length===1&&El(e[0])&&(e=[]);let t=Ks(e);return e.length===1&&e[0].name===yd()&&e[0].name==="core/freeform"&&(t=_ie(t)),t}function Ks(e,t){return(Array.isArray(e)?e:[e]).map(o=>LPe(o,t)).join(` -`)}var jPe=/[\t\n\f ]/,IPe=/[A-Za-z]/,DPe=/\r\n?/g;function c1(e){return jPe.test(e)}function uX(e){return IPe.test(e)}function FPe(e){return e.replace(DPe,` -`)}var $Pe=function(){function e(t,n,o){o===void 0&&(o="precompile"),this.delegate=t,this.entityParser=n,this.mode=o,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var r=this.peek();if(r==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&r===` -`){var s=this.tagNameBuffer.toLowerCase();(s==="pre"||s==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var r=this.peek(),s=this.tagNameBuffer;r==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):r==="&"&&s!=="script"&&s!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(r))},tagOpen:function(){var r=this.consume();r==="!"?this.transitionTo("markupDeclarationOpen"):r==="/"?this.transitionTo("endTagOpen"):(r==="@"||r===":"||uX(r))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(r))},markupDeclarationOpen:function(){var r=this.consume();if(r==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();s==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var r=this.consume();c1(r)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var r=this.consume();c1(r)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase()))},doctypeName:function(){var r=this.consume();c1(r)?this.transitionTo("afterDoctypeName"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase())},afterDoctypeName:function(){var r=this.consume();if(!c1(r))if(r===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),i=s.toUpperCase()==="PUBLIC",c=s.toUpperCase()==="SYSTEM";(i||c)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),i?this.transitionTo("afterDoctypePublicKeyword"):c&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var r=this.peek();c1(r)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):r==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):r==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):r===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},doctypePublicIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},afterDoctypePublicIdentifier:function(){var r=this.consume();c1(r)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var r=this.consume();c1(r)||(r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},doctypeSystemIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},afterDoctypeSystemIdentifier:function(){var r=this.consume();c1(r)||r===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var r=this.consume();r==="-"?this.transitionTo("commentStartDash"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(r),this.transitionTo("comment"))},commentStartDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var r=this.consume();r==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(r)},commentEndDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+r),this.transitionTo("comment"))},commentEnd:function(){var r=this.consume();r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+r),this.transitionTo("comment"))},tagName:function(){var r=this.consume();c1(r)?this.transitionTo("beforeAttributeName"):r==="/"?this.transitionTo("selfClosingStartTag"):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(r)},endTagName:function(){var r=this.consume();c1(r)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):r==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(r)},beforeAttributeName:function(){var r=this.peek();if(c1(r)){this.consume();return}else r==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var r=this.peek();c1(r)?(this.transitionTo("afterAttributeName"),this.consume()):r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==='"'||r==="'"||r==="<"?(this.delegate.reportSyntaxError(r+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(r)):(this.consume(),this.delegate.appendToAttributeName(r))},afterAttributeName:function(){var r=this.peek();if(c1(r)){this.consume();return}else r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r))},beforeAttributeValue:function(){var r=this.peek();c1(r)?this.consume():r==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(r))},attributeValueDoubleQuoted:function(){var r=this.consume();r==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueSingleQuoted:function(){var r=this.consume();r==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueUnquoted:function(){var r=this.peek();c1(r)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):r===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(r))},afterAttributeValueQuoted:function(){var r=this.peek();c1(r)?(this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var r=this.peek();r===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var r=this.consume();(r==="@"||r===":"||uX(r))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(r))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=FPe(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),VPe=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new $Pe(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;nt("Block validation: "+o,...r)}return{error:e(console.error),warning:e(console.warn),getItems(){return[]}}}function HPe(){const e=[],t=Uh();return{error(...n){e.push({log:t.error,args:n})},warning(...n){e.push({log:t.warning,args:n})},getItems(){return e}}}const UPe=e=>e,XPe=/[\t\n\r\v\f ]+/g,GPe=/^[\t\n\r\v\f ]*$/,KPe=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,qie=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],YPe=["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],ZPe=[...qie,...YPe],dX=[UPe,oje],QPe=/^[\da-z]+$/i,JPe=/^#\d+$/,eje=/^#x[\da-f]+$/i;function tje(e){return QPe.test(e)||JPe.test(e)||eje.test(e)}class nje{parse(t){if(tje(t))return Lt("&"+t+";")}}function $B(e){return e.trim().split(XPe)}function oje(e){return $B(e).join(" ")}function rje(e){return e.attributes.filter(t=>{const[n,o]=t;return o||n.indexOf("data-")===0||ZPe.includes(n)})}function pX(e,t,n=Uh()){let o=e.chars,r=t.chars;for(let s=0;s{const[o,...r]=n.split(":"),s=r.join(":");return[o.trim(),ije(s.trim())]});return Object.fromEntries(t)}const cje={class:(e,t)=>{const[n,o]=[e,t].map($B),r=n.filter(i=>!o.includes(i)),s=o.filter(i=>!n.includes(i));return r.length===0&&s.length===0},style:(e,t)=>N0(...[e,t].map(aje)),...Object.fromEntries(qie.map(e=>[e,()=>!0]))};function lje(e,t,n=Uh()){if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const o={};for(let r=0;re.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):lje(...[e,t].map(rje),n),Chars:pX,Comment:pX};function xg(e){let t;for(;t=e.shift();)if(t.type!=="Chars"||!GPe.test(t.chars))return t}function dje(e,t=Uh()){try{return new VPe(new nje).tokenize(e)}catch{t.warning("Malformed HTML detected: %s",e)}return null}function fX(e,t){return e.selfClosing?!!(t&&t.tagName===e.tagName&&t.type==="EndTag"):!1}function pje(e,t,n=Uh()){if(e===t)return!0;const[o,r]=[e,t].map(c=>dje(c,n));if(!o||!r)return!1;let s,i;for(;s=xg(o);){if(i=xg(r),!i)return n.warning("Expected end of content, instead saw %o.",s),!1;if(s.type!==i.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",i.type,i,s.type,s),!1;const c=uje[s.type];if(c&&!c(s,i,n))return!1;fX(s,r[0])?xg(r):fX(i,o[0])&&xg(o)}return(i=xg(r))?(n.warning("Expected %o, instead saw end of content.",i),!1):!0}function tz(e,t=e.name){if(e.name===yd()||e.name===g3())return[!0,[]];const o=HPe(),r=M3(t);let s;try{s=Gf(r,e.attributes)}catch(c){return o.error(`Block validation failed because an error occurred while generating block content: +`)}var PPe=/[\t\n\f ]/,jPe=/[A-Za-z]/,IPe=/\r\n?/g;function c1(e){return PPe.test(e)}function uX(e){return jPe.test(e)}function DPe(e){return e.replace(IPe,` +`)}var FPe=function(){function e(t,n,o){o===void 0&&(o="precompile"),this.delegate=t,this.entityParser=n,this.mode=o,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var r=this.peek();if(r==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&r===` +`){var s=this.tagNameBuffer.toLowerCase();(s==="pre"||s==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var r=this.peek(),s=this.tagNameBuffer;r==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):r==="&"&&s!=="script"&&s!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(r))},tagOpen:function(){var r=this.consume();r==="!"?this.transitionTo("markupDeclarationOpen"):r==="/"?this.transitionTo("endTagOpen"):(r==="@"||r===":"||uX(r))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(r))},markupDeclarationOpen:function(){var r=this.consume();if(r==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();s==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var r=this.consume();c1(r)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var r=this.consume();c1(r)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase()))},doctypeName:function(){var r=this.consume();c1(r)?this.transitionTo("afterDoctypeName"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase())},afterDoctypeName:function(){var r=this.consume();if(!c1(r))if(r===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),i=s.toUpperCase()==="PUBLIC",c=s.toUpperCase()==="SYSTEM";(i||c)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),i?this.transitionTo("afterDoctypePublicKeyword"):c&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var r=this.peek();c1(r)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):r==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):r==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):r===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},doctypePublicIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},afterDoctypePublicIdentifier:function(){var r=this.consume();c1(r)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var r=this.consume();c1(r)||(r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},doctypeSystemIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},afterDoctypeSystemIdentifier:function(){var r=this.consume();c1(r)||r===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var r=this.consume();r==="-"?this.transitionTo("commentStartDash"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(r),this.transitionTo("comment"))},commentStartDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var r=this.consume();r==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(r)},commentEndDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+r),this.transitionTo("comment"))},commentEnd:function(){var r=this.consume();r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+r),this.transitionTo("comment"))},tagName:function(){var r=this.consume();c1(r)?this.transitionTo("beforeAttributeName"):r==="/"?this.transitionTo("selfClosingStartTag"):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(r)},endTagName:function(){var r=this.consume();c1(r)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):r==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(r)},beforeAttributeName:function(){var r=this.peek();if(c1(r)){this.consume();return}else r==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var r=this.peek();c1(r)?(this.transitionTo("afterAttributeName"),this.consume()):r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==='"'||r==="'"||r==="<"?(this.delegate.reportSyntaxError(r+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(r)):(this.consume(),this.delegate.appendToAttributeName(r))},afterAttributeName:function(){var r=this.peek();if(c1(r)){this.consume();return}else r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r))},beforeAttributeValue:function(){var r=this.peek();c1(r)?this.consume():r==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(r))},attributeValueDoubleQuoted:function(){var r=this.consume();r==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueSingleQuoted:function(){var r=this.consume();r==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueUnquoted:function(){var r=this.peek();c1(r)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):r===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(r))},afterAttributeValueQuoted:function(){var r=this.peek();c1(r)?(this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var r=this.peek();r===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var r=this.consume();(r==="@"||r===":"||uX(r))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(r))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=DPe(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),$Pe=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new FPe(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;nt("Block validation: "+o,...r)}return{error:e(console.error),warning:e(console.warn),getItems(){return[]}}}function VPe(){const e=[],t=Uh();return{error(...n){e.push({log:t.error,args:n})},warning(...n){e.push({log:t.warning,args:n})},getItems(){return e}}}const HPe=e=>e,UPe=/[\t\n\r\v\f ]+/g,XPe=/^[\t\n\r\v\f ]*$/,GPe=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,qie=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],KPe=["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],YPe=[...qie,...KPe],dX=[HPe,nje],ZPe=/^[\da-z]+$/i,QPe=/^#\d+$/,JPe=/^#x[\da-f]+$/i;function eje(e){return ZPe.test(e)||QPe.test(e)||JPe.test(e)}class tje{parse(t){if(eje(t))return Lt("&"+t+";")}}function FB(e){return e.trim().split(UPe)}function nje(e){return FB(e).join(" ")}function oje(e){return e.attributes.filter(t=>{const[n,o]=t;return o||n.indexOf("data-")===0||YPe.includes(n)})}function pX(e,t,n=Uh()){let o=e.chars,r=t.chars;for(let s=0;s{const[o,...r]=n.split(":"),s=r.join(":");return[o.trim(),sje(s.trim())]});return Object.fromEntries(t)}const aje={class:(e,t)=>{const[n,o]=[e,t].map(FB),r=n.filter(i=>!o.includes(i)),s=o.filter(i=>!n.includes(i));return r.length===0&&s.length===0},style:(e,t)=>N0(...[e,t].map(ije)),...Object.fromEntries(qie.map(e=>[e,()=>!0]))};function cje(e,t,n=Uh()){if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const o={};for(let r=0;re.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):cje(...[e,t].map(oje),n),Chars:pX,Comment:pX};function xg(e){let t;for(;t=e.shift();)if(t.type!=="Chars"||!XPe.test(t.chars))return t}function uje(e,t=Uh()){try{return new $Pe(new tje).tokenize(e)}catch{t.warning("Malformed HTML detected: %s",e)}return null}function fX(e,t){return e.selfClosing?!!(t&&t.tagName===e.tagName&&t.type==="EndTag"):!1}function dje(e,t,n=Uh()){if(e===t)return!0;const[o,r]=[e,t].map(c=>uje(c,n));if(!o||!r)return!1;let s,i;for(;s=xg(o);){if(i=xg(r),!i)return n.warning("Expected end of content, instead saw %o.",s),!1;if(s.type!==i.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",i.type,i,s.type,s),!1;const c=lje[s.type];if(c&&!c(s,i,n))return!1;fX(s,r[0])?xg(r):fX(i,o[0])&&xg(o)}return(i=xg(r))?(n.warning("Expected %o, instead saw end of content.",i),!1):!0}function tz(e,t=e.name){if(e.name===yd()||e.name===g3())return[!0,[]];const o=VPe(),r=M3(t);let s;try{s=Gf(r,e.attributes)}catch(c){return o.error(`Block validation failed because an error occurred while generating block content: -%s`,c.toString()),[!1,o.getItems()]}const i=pje(e.originalContent,s,o);return i||o.error(`Block validation failed for \`%s\` (%o). +%s`,c.toString()),[!1,o.getItems()]}const i=dje(e.originalContent,s,o);return i||o.error(`Block validation failed for \`%s\` (%o). Content generated by \`save\` function: @@ -137,7 +137,7 @@ Content generated by \`save\` function: Content retrieved from post body: -%s`,r.name,r,s,e.originalContent),[i,o.getItems()]}function Rie(e,t){const n={...t};if(e==="core/cover-image"&&(e="core/cover"),(e==="core/text"||e==="core/cover-text")&&(e="core/paragraph"),e&&e.indexOf("core/social-link-")===0&&(n.service=e.substring(17),e="core/social-link"),e&&e.indexOf("core-embed/")===0){const o=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=o in r?r[o]:o,["amazon-kindle","wordpress"].includes(o)||(n.responsive=!0),e="core/embed"}if(e==="core/post-comment-author"&&(e="core/comment-author-name"),e==="core/post-comment-content"&&(e="core/comment-content"),e==="core/post-comment-date"&&(e="core/comment-date"),e==="core/comments-query-loop"){e="core/comments";const{className:o=""}=n;o.includes("wp-block-comments-query-loop")||(n.className=["wp-block-comments-query-loop",o].join(" "))}if(e==="core/post-comments"&&(e="core/comments",n.legacy=!0),t.layout?.type==="grid"&&typeof t.layout?.columnCount=="string"&&(n.layout={...n.layout,columnCount:parseInt(t.layout.columnCount,10)}),typeof t.style?.layout?.columnSpan=="string"){const o=parseInt(t.style.layout.columnSpan,10);n.style={...n.style,layout:{...n.style.layout,columnSpan:isNaN(o)?void 0:o}}}if(typeof t.style?.layout?.rowSpan=="string"){const o=parseInt(t.style.layout.rowSpan,10);n.style={...n.style,layout:{...n.style.layout,rowSpan:isNaN(o)?void 0:o}}}if(globalThis.IS_GUTENBERG_PLUGIN&&n.metadata?.bindings&&(e==="core/paragraph"||e==="core/heading"||e==="core/image"||e==="core/button")&&n.metadata.bindings.__default?.source!=="core/pattern-overrides"){const o=["content","url","title","id","alt","text","linkTarget"];let r=!1;o.forEach(s=>{n.metadata.bindings[s]?.source==="core/pattern-overrides"&&(r=!0,n.metadata={...n.metadata,bindings:{...n.metadata.bindings}},delete n.metadata.bindings[s])}),r&&(n.metadata.bindings.__default={source:"core/pattern-overrides"})}return[e,n]}function fje(e,t){for(var n=t.split("."),o;o=n.shift();){if(!(o in e))return;e=e[o]}return e}var bje=function(){var e;return function(){return e||(e=document.implementation.createHTMLDocument("")),e}}();function VB(e,t){if(t){if(typeof e=="string"){var n=bje();n.body.innerHTML=e,e=n.body}if(typeof t=="function")return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(o,r){var s=t[r];return o[r]=VB(e,s),o},{})}}function HB(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=r;if(o&&(s=r.querySelector(o)),s)return fje(s,n)}}function hje(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=HB(o,"attributes")(r);if(s&&Object.prototype.hasOwnProperty.call(s,n))return s[n].value}}function mje(e){return HB(e,"textContent")}function gje(e,t){return function(n){var o=n.querySelectorAll(e);return[].map.call(o,function(r){return VB(r,t)})}}function Mje(e){return Ke("wp.blocks.children.getChildrenArray",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e}function zje(...e){Ke("wp.blocks.children.concat",{since:"6.1",version:"6.3",alternative:"wp.richText.concat",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const t=[];for(let n=0;n{let n=t;return e&&(n=t.querySelector(e)),n?UB(n.childNodes):[]}}const n8={concat:zje,getChildrenArray:Mje,fromDOM:UB,toHTML:Oje,matcher:Tie};function yje(e){const t={};for(let n=0;n{let n=t;e&&(n=t.querySelector(e));try{return Eie(n)}catch{return null}}}function vje(e,t){return n=>{let o=n;if(e&&(o=n.querySelector(e)),!o)return"";if(t){let r="";const s=o.children.length;for(let i=0;in=>{const o=e?n.querySelector(e):n;return o?Xo.fromHTMLElement(o,{preserveWhiteSpace:t}):Xo.empty()},wje=e=>t=>e(t)!==void 0;function _je(e,t){switch(t){case"rich-text":return e instanceof Xo;case"string":return typeof e=="string";case"boolean":return typeof e=="boolean";case"object":return!!e&&e.constructor===Object;case"null":return e===null;case"array":return Array.isArray(e);case"integer":case"number":return typeof e=="number"}return!0}function kje(e,t){return t.some(n=>_je(e,n))}function Sje(e,t,n,o,r){let s;switch(t.source){case void 0:s=o?o[e]:void 0;break;case"raw":s=r;break;case"attribute":case"property":case"html":case"text":case"rich-text":case"children":case"node":case"query":case"tag":s=tw(n,t);break}return(!Cje(s,t.type)||!qje(s,t.enum))&&(s=void 0),s===void 0&&(s=uie(t)),s}function Cje(e,t){return t===void 0||kje(e,Array.isArray(t)?t:[t])}function qje(e,t){return!Array.isArray(t)||t.includes(e)}const Wie=Hs(e=>{switch(e.source){case"attribute":{let n=hje(e.selector,e.attribute);return e.type==="boolean"&&(n=wje(n)),n}case"html":return vje(e.selector,e.multiline);case"text":return mje(e.selector);case"rich-text":return xje(e.selector,e.__unstablePreserveWhiteSpace);case"children":return Tie(e.selector);case"node":return Aje(e.selector);case"query":const t=Object.fromEntries(Object.entries(e.query).map(([n,o])=>[n,Wie(o)]));return gje(e.selector,t);case"tag":{const n=HB(e.selector,"nodeName");return o=>n(o)?.toLowerCase()}default:console.error(`Unknown source type "${e.source}"`)}});function Nie(e){return VB(e,t=>t)}function tw(e,t){return Wie(t)(Nie(e))}function Nl(e,t,n={}){var o;const r=Nie(t),s=M3(e),i=Object.fromEntries(Object.entries((o=s.attributes)!==null&&o!==void 0?o:{}).map(([c,l])=>[c,Sje(c,l,r,n,t)]));return gr("blocks.getBlockAttributes",i,s,t,n)}const Rje={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function bX(e){const t=tw(`
${e}
`,Rje);return t?t.trim().split(/\s+/):[]}function Tje(e,t,n){if(!Et(t,"customClassName",!0))return e;const o={...e},{className:r,...s}=o,i=Gf(t,s),c=bX(i),u=bX(n).filter(d=>!c.includes(d));return u.length?o.className=u.join(" "):i&&delete o.className,o}const Eje={type:"string",source:"attribute",selector:"[data-aria-label] > *",attribute:"aria-label"};function Wje(e){return tw(`
${e}
`,Eje)}function Nje(e,t,n){if(!Et(t,"ariaLabel",!1))return e;const o={...e},r=Wje(n);return r&&(o.ariaLabel=r),o}function J4(e,t){const{attributes:n,originalContent:o}=e;let r=n;return r=Tje(n,t,o),r=Nje(r,t,o),{...e,attributes:r}}function Bje(){return!1}function Lje(e,t,n){const o=t.attrs,{deprecated:r}=n;if(!r||!r.length)return e;for(let s=0;sBie(d,t)).filter(d=>!!d),i=Ee(n.blockName,Nl(o,n.innerHTML,n.attrs),s);i.originalContent=n.innerHTML;const c=Dje(i,o),{validationIssues:l}=c,u=Lje(c,n,o);return u.isValid||(u.__unstableBlockSource=e),!c.isValid&&u.isValid&&!t?.__unstableSkipMigrationLogs?(console.groupCollapsed("Updated Block: %s",o.name),console.info(`Block successfully updated for \`%s\` (%o). +%s`,r.name,r,s,e.originalContent),[i,o.getItems()]}function Rie(e,t){const n={...t};if(e==="core/cover-image"&&(e="core/cover"),(e==="core/text"||e==="core/cover-text")&&(e="core/paragraph"),e&&e.indexOf("core/social-link-")===0&&(n.service=e.substring(17),e="core/social-link"),e&&e.indexOf("core-embed/")===0){const o=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=o in r?r[o]:o,["amazon-kindle","wordpress"].includes(o)||(n.responsive=!0),e="core/embed"}if(e==="core/post-comment-author"&&(e="core/comment-author-name"),e==="core/post-comment-content"&&(e="core/comment-content"),e==="core/post-comment-date"&&(e="core/comment-date"),e==="core/comments-query-loop"){e="core/comments";const{className:o=""}=n;o.includes("wp-block-comments-query-loop")||(n.className=["wp-block-comments-query-loop",o].join(" "))}if(e==="core/post-comments"&&(e="core/comments",n.legacy=!0),t.layout?.type==="grid"&&typeof t.layout?.columnCount=="string"&&(n.layout={...n.layout,columnCount:parseInt(t.layout.columnCount,10)}),typeof t.style?.layout?.columnSpan=="string"){const o=parseInt(t.style.layout.columnSpan,10);n.style={...n.style,layout:{...n.style.layout,columnSpan:isNaN(o)?void 0:o}}}if(typeof t.style?.layout?.rowSpan=="string"){const o=parseInt(t.style.layout.rowSpan,10);n.style={...n.style,layout:{...n.style.layout,rowSpan:isNaN(o)?void 0:o}}}if(globalThis.IS_GUTENBERG_PLUGIN&&n.metadata?.bindings&&(e==="core/paragraph"||e==="core/heading"||e==="core/image"||e==="core/button")&&n.metadata.bindings.__default?.source!=="core/pattern-overrides"){const o=["content","url","title","id","alt","text","linkTarget"];let r=!1;o.forEach(s=>{n.metadata.bindings[s]?.source==="core/pattern-overrides"&&(r=!0,n.metadata={...n.metadata,bindings:{...n.metadata.bindings}},delete n.metadata.bindings[s])}),r&&(n.metadata.bindings.__default={source:"core/pattern-overrides"})}return[e,n]}function pje(e,t){for(var n=t.split("."),o;o=n.shift();){if(!(o in e))return;e=e[o]}return e}var fje=function(){var e;return function(){return e||(e=document.implementation.createHTMLDocument("")),e}}();function $B(e,t){if(t){if(typeof e=="string"){var n=fje();n.body.innerHTML=e,e=n.body}if(typeof t=="function")return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(o,r){var s=t[r];return o[r]=$B(e,s),o},{})}}function VB(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=r;if(o&&(s=r.querySelector(o)),s)return pje(s,n)}}function bje(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=VB(o,"attributes")(r);if(s&&Object.prototype.hasOwnProperty.call(s,n))return s[n].value}}function hje(e){return VB(e,"textContent")}function mje(e,t){return function(n){var o=n.querySelectorAll(e);return[].map.call(o,function(r){return $B(r,t)})}}function gje(e){return Ke("wp.blocks.children.getChildrenArray",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e}function Mje(...e){Ke("wp.blocks.children.concat",{since:"6.1",version:"6.3",alternative:"wp.richText.concat",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const t=[];for(let n=0;n{let n=t;return e&&(n=t.querySelector(e)),n?HB(n.childNodes):[]}}const t8={concat:Mje,getChildrenArray:gje,fromDOM:HB,toHTML:zje,matcher:Tie};function Oje(e){const t={};for(let n=0;n{let n=t;e&&(n=t.querySelector(e));try{return Eie(n)}catch{return null}}}function Aje(e,t){return n=>{let o=n;if(e&&(o=n.querySelector(e)),!o)return"";if(t){let r="";const s=o.children.length;for(let i=0;in=>{const o=e?n.querySelector(e):n;return o?Xo.fromHTMLElement(o,{preserveWhiteSpace:t}):Xo.empty()},xje=e=>t=>e(t)!==void 0;function wje(e,t){switch(t){case"rich-text":return e instanceof Xo;case"string":return typeof e=="string";case"boolean":return typeof e=="boolean";case"object":return!!e&&e.constructor===Object;case"null":return e===null;case"array":return Array.isArray(e);case"integer":case"number":return typeof e=="number"}return!0}function _je(e,t){return t.some(n=>wje(e,n))}function kje(e,t,n,o,r){let s;switch(t.source){case void 0:s=o?o[e]:void 0;break;case"raw":s=r;break;case"attribute":case"property":case"html":case"text":case"rich-text":case"children":case"node":case"query":case"tag":s=ew(n,t);break}return(!Sje(s,t.type)||!Cje(s,t.enum))&&(s=void 0),s===void 0&&(s=uie(t)),s}function Sje(e,t){return t===void 0||_je(e,Array.isArray(t)?t:[t])}function Cje(e,t){return!Array.isArray(t)||t.includes(e)}const Wie=Hs(e=>{switch(e.source){case"attribute":{let n=bje(e.selector,e.attribute);return e.type==="boolean"&&(n=xje(n)),n}case"html":return Aje(e.selector,e.multiline);case"text":return hje(e.selector);case"rich-text":return vje(e.selector,e.__unstablePreserveWhiteSpace);case"children":return Tie(e.selector);case"node":return yje(e.selector);case"query":const t=Object.fromEntries(Object.entries(e.query).map(([n,o])=>[n,Wie(o)]));return mje(e.selector,t);case"tag":{const n=VB(e.selector,"nodeName");return o=>n(o)?.toLowerCase()}default:console.error(`Unknown source type "${e.source}"`)}});function Nie(e){return $B(e,t=>t)}function ew(e,t){return Wie(t)(Nie(e))}function Wl(e,t,n={}){var o;const r=Nie(t),s=M3(e),i=Object.fromEntries(Object.entries((o=s.attributes)!==null&&o!==void 0?o:{}).map(([c,l])=>[c,kje(c,l,r,n,t)]));return gr("blocks.getBlockAttributes",i,s,t,n)}const qje={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function bX(e){const t=ew(`
${e}
`,qje);return t?t.trim().split(/\s+/):[]}function Rje(e,t,n){if(!Et(t,"customClassName",!0))return e;const o={...e},{className:r,...s}=o,i=Gf(t,s),c=bX(i),u=bX(n).filter(d=>!c.includes(d));return u.length?o.className=u.join(" "):i&&delete o.className,o}const Tje={type:"string",source:"attribute",selector:"[data-aria-label] > *",attribute:"aria-label"};function Eje(e){return ew(`
${e}
`,Tje)}function Wje(e,t,n){if(!Et(t,"ariaLabel",!1))return e;const o={...e},r=Eje(n);return r&&(o.ariaLabel=r),o}function Q4(e,t){const{attributes:n,originalContent:o}=e;let r=n;return r=Rje(n,t,o),r=Wje(r,t,o),{...e,attributes:r}}function Nje(){return!1}function Bje(e,t,n){const o=t.attrs,{deprecated:r}=n;if(!r||!r.length)return e;for(let s=0;sBie(d,t)).filter(d=>!!d),i=Ee(n.blockName,Wl(o,n.innerHTML,n.attrs),s);i.originalContent=n.innerHTML;const c=Ije(i,o),{validationIssues:l}=c,u=Bje(c,n,o);return u.isValid||(u.__unstableBlockSource=e),!c.isValid&&u.isValid&&!t?.__unstableSkipMigrationLogs?(console.groupCollapsed("Updated Block: %s",o.name),console.info(`Block successfully updated for \`%s\` (%o). New content generated by \`save\` function: @@ -145,7 +145,7 @@ New content generated by \`save\` function: Content retrieved from post body: -%s`,o.name,o,Gf(o,u.attributes),u.originalContent),console.groupEnd()):!c.isValid&&!u.isValid&&l.forEach(({log:d,args:p})=>d(...p)),u}function Ko(e,t){return xie(e).reduce((n,o)=>{const r=Bie(o,t);return r&&n.push(r),n},[])}function Lie(){return Ei("from").filter(({type:e})=>e==="raw").map(e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)})}function Pie(e,t){const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Array.from(n.body.children).flatMap(o=>{const r=xc(Lie(),({isMatch:c})=>c(o));if(!r)return f0.isNative?Ko(`${o.outerHTML}`):Ee("core/html",Nl("core/html",o.outerHTML));const{transform:s,blockName:i}=r;if(s){const c=s(o,t);return o.hasAttribute("class")&&(c.attributes.className=o.getAttribute("class")),c}return Ee(i,Nl(i,o.outerHTML))})}function nw(e,t={}){const n=document.implementation.createHTMLDocument(""),o=document.implementation.createHTMLDocument(""),r=n.body,s=o.body;for(r.innerHTML=e;r.firstChild;){const i=r.firstChild;i.nodeType===i.TEXT_NODE?T4(i)?r.removeChild(i):((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):i.nodeType===i.ELEMENT_NODE?i.nodeName==="BR"?(i.nextSibling&&i.nextSibling.nodeName==="BR"&&(s.appendChild(o.createElement("P")),r.removeChild(i.nextSibling)),s.lastChild&&s.lastChild.nodeName==="P"&&s.lastChild.hasChildNodes()?s.lastChild.appendChild(i):r.removeChild(i)):i.nodeName==="P"?T4(i)&&!t.raw?r.removeChild(i):s.appendChild(i):k2(i)?((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):s.appendChild(i):r.removeChild(i)}return s.innerHTML}function jie(e,t){if(e.nodeType!==e.COMMENT_NODE||e.nodeValue!=="nextpage"&&e.nodeValue.indexOf("more")!==0)return;const n=Fje(e,t);if(!e.parentNode||e.parentNode.nodeName!=="P")wSe(e,n);else{const o=Array.from(e.parentNode.childNodes),r=o.indexOf(e),s=e.parentNode.parentNode||t.body,i=(c,l)=>(c||(c=t.createElement("p")),c.appendChild(l),c);[o.slice(0,r).reduce(i,null),n,o.slice(r+1).reduce(i,null)].forEach(c=>c&&s.insertBefore(c,e.parentNode)),pf(e.parentNode)}}function Fje(e,t){if(e.nodeValue==="nextpage")return Vje(t);const n=e.nodeValue.slice(4).trim();let o=e,r=!1;for(;o=o.nextSibling;)if(o.nodeType===o.COMMENT_NODE&&o.nodeValue==="noteaser"){r=!0,pf(o);break}return $je(n,r,t)}function $je(e,t,n){const o=n.createElement("wp-block");return o.dataset.block="core/more",e&&(o.dataset.customText=e),t&&(o.dataset.noTeaser=""),o}function Vje(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}function hX(e){return e.nodeName==="OL"||e.nodeName==="UL"}function Hje(e){return Array.from(e.childNodes).map(({nodeValue:t=""})=>t).join("")}function Iie(e){if(!hX(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&t.children.length===1){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const o=e.parentNode;if(o&&o.nodeName==="LI"&&o.children.length===1&&!/\S/.test(Hje(o))){const r=o,s=r.previousElementSibling,i=r.parentNode;s&&(s.appendChild(t),i.removeChild(r))}if(o&&hX(o)){const r=e.previousElementSibling;r?r.appendChild(e):mM(e)}}function Die(e){return t=>{t.nodeName==="BLOCKQUOTE"&&(t.innerHTML=nw(t.innerHTML,e))}}function Uje(e,t){var n;const o=e.nodeName.toLowerCase();return o==="figcaption"||M0e(e)?!1:o in((n=t?.figure?.children)!==null&&n!==void 0?n:{})}function Xje(e,t){var n;return e.nodeName.toLowerCase()in((n=t?.figure?.children?.a?.children)!==null&&n!==void 0?n:{})}function rC(e,t=e){const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function Fie(e,t,n){if(!Uje(e,n))return;let o=e;const r=e.parentNode;Xje(e,n)&&r.nodeName==="A"&&r.childNodes.length===1&&(o=e.parentNode);const s=o.closest("p,div");s?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!s.textContent.trim())&&rC(o,s):rC(o,s):rC(o)}function XB(e,t,n=0){const o=nz(e);o.lastIndex=n;const r=o.exec(t);if(!r)return;if(r[1]==="["&&r[7]==="]")return XB(e,t,o.lastIndex);const s={index:r.index,content:r[0],shortcode:GB(r)};return r[1]&&(s.content=s.content.slice(1),s.index++),r[7]&&(s.content=s.content.slice(0,-1)),s}function Gje(e,t,n){return t.replace(nz(e),function(o,r,s,i,c,l,u,d){if(r==="["&&d==="]")return o;const p=n(GB(arguments));return p||p===""?r+p+d:o})}function Kje(e){return new KB(e).string()}function nz(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const mX=Hs(e=>{const t={},n=[],o=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;e=e.replace(/[\u00a0\u200b]/g," ");let r;for(;r=o.exec(e);)r[1]?t[r[1].toLowerCase()]=r[2]:r[3]?t[r[3].toLowerCase()]=r[4]:r[5]?t[r[5].toLowerCase()]=r[6]:r[7]?n.push(r[7]):r[8]?n.push(r[8]):r[9]&&n.push(r[9]);return{named:t,numeric:n}});function GB(e){let t;return e[4]?t="self-closing":e[6]?t="closed":t="single",new KB({tag:e[2],attrs:e[3],type:t,content:e[5]})}const KB=Object.assign(function(e){const{tag:t,attrs:n,type:o,content:r}=e||{};if(Object.assign(this,{tag:t,type:o,content:r}),this.attrs={named:{},numeric:[]},!n)return;const s=["named","numeric"];typeof n=="string"?this.attrs=mX(n):n.length===s.length&&s.every((i,c)=>i===n[c])?this.attrs=n:Object.entries(n).forEach(([i,c])=>{this.set(i,c)})},{next:XB,replace:Gje,string:Kje,regexp:nz,attrs:mX,fromMatch:GB});Object.assign(KB.prototype,{get(e){return this.attrs[typeof e=="number"?"numeric":"named"][e]},set(e,t){return this.attrs[typeof e=="number"?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return this.attrs.numeric.forEach(t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t}),Object.entries(this.attrs.named).forEach(([t,n])=>{e+=" "+t+'="'+n+'"'}),this.type==="single"?e+"]":this.type==="self-closing"?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});const gX=e=>Array.isArray(e)?e:[e],MX=/(\n|

)\s*$/,zX=/^\s*(\n|<\/p>)/;function u2(e,t=0,n=[]){const o=Ei("from"),r=xc(o,u=>n.indexOf(u.blockName)===-1&&u.type==="shortcode"&&gX(u.tag).some(d=>nz(d).test(e)));if(!r)return[e];const i=gX(r.tag).find(u=>nz(u).test(e));let c;const l=t;if(c=XB(i,e,t)){t=c.index+c.content.length;const u=e.substr(0,c.index),d=e.substr(t);if(!c.shortcode.content?.includes("<")&&!(MX.test(u)&&zX.test(d)))return u2(e,t);if(r.isMatch&&!r.isMatch(c.shortcode.attrs))return u2(e,l,[...n,r.blockName]);let p=[];if(typeof r.transform=="function")p=[].concat(r.transform(c.shortcode.attrs,c)),p=p.map(f=>(f.originalContent=c.shortcode.content,J4(f,on(f.name))));else{const f=Object.fromEntries(Object.entries(r.attributes).filter(([,z])=>z.shortcode).map(([z,A])=>[z,A.shortcode(c.shortcode.attrs,c)])),b=on(r.blockName);if(!b)return[e];const h={...b,attributes:r.attributes};let g=Ee(r.blockName,Nl(h,c.shortcode.content,f));g.originalContent=c.shortcode.content,g=J4(g,h),p=[g]}return[...u2(u.replace(MX,"")),...p,...u2(d.replace(zX,""))]}return[e]}function Yje(e,t){const o={phrasingContentSchema:R5(t),isPaste:t==="paste"},r=e.map(({isMatch:l,blockName:u,schema:d})=>{const p=Et(u,"anchor");return d=typeof d=="function"?d(o):d,!p&&!l?d:d?Object.fromEntries(Object.entries(d).map(([f,b])=>{let h=b.attributes||[];return p&&(h=[...h,"id"]),[f,{...b,attributes:h,isMatch:l||void 0}]})):{}});function s(l,u,d){switch(d){case"children":return l==="*"||u==="*"?"*":{...l,...u};case"attributes":case"require":return[...l||[],...u||[]];case"isMatch":return!l||!u?void 0:(...p)=>l(...p)||u(...p)}}function i(l,u){for(const d in u)l[d]=l[d]?s(l[d],u[d],d):{...u[d]};return l}function c(l,u){for(const d in u)l[d]=l[d]?i(l[d],u[d]):{...u[d]};return l}return r.reduce(c,{})}function $ie(e){return Yje(Lie(),e)}function Zje(e){return!/<(?!br[ />])/i.test(e)}function Vie(e,t,n,o){Array.from(e).forEach(r=>{Vie(r.childNodes,t,n,o),t.forEach(s=>{n.contains(r)&&s(r,n,o)})})}function tf(e,t=[],n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,Vie(o.body.childNodes,t,o,n),o.body.innerHTML}function ex(e,t){const n=e[`${t}Sibling`];if(n&&k2(n))return n;const{parentNode:o}=e;if(!(!o||!k2(o)))return ex(o,t)}function Hie(e){e.nodeType===e.COMMENT_NODE&&pf(e)}function Qje(e,t){if(M0e(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(r=>[n,t].filter(s=>!r.includes(s)).length===0)}function Uie(e,t){return e.every(n=>Qje(n,t)&&Uie(Array.from(n.children),t))}function Jje(e){return e.nodeName==="BR"&&e.previousSibling&&e.previousSibling.nodeName==="BR"}function e7e(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const o=Array.from(n.body.children);return!o.some(Jje)&&Uie(o,t)}function Xie(e,t){if(e.nodeName==="SPAN"&&e.style){const{fontWeight:n,fontStyle:o,textDecorationLine:r,textDecoration:s,verticalAlign:i}=e.style;(n==="bold"||n==="700")&&Ag(t.createElement("strong"),e),o==="italic"&&Ag(t.createElement("em"),e),(r==="line-through"||s.includes("line-through"))&&Ag(t.createElement("s"),e),i==="super"?Ag(t.createElement("sup"),e):i==="sub"&&Ag(t.createElement("sub"),e)}else e.nodeName==="B"?e=IH(e,"strong"):e.nodeName==="I"?e=IH(e,"em"):e.nodeName==="A"&&(e.target&&e.target.toLowerCase()==="_blank"?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function Gie(e){e.nodeName!=="SCRIPT"&&e.nodeName!=="NOSCRIPT"&&e.nodeName!=="TEMPLATE"&&e.nodeName!=="STYLE"||e.parentNode.removeChild(e)}function Kie(e){if(e.nodeType!==e.ELEMENT_NODE)return;const t=e.getAttribute("style");if(!t||!t.includes("mso-list"))return;t.split(";").reduce((o,r)=>{const[s,i]=r.split(":");return s&&i&&(o[s.trim().toLowerCase()]=i.trim().toLowerCase()),o},{})["mso-list"]==="ignore"&&e.remove()}function sC(e){return e.nodeName==="OL"||e.nodeName==="UL"}function t7e(e,t){if(e.nodeName!=="P")return;const n=e.getAttribute("style");if(!n||!n.includes("mso-list"))return;const o=e.previousElementSibling;if(!o||!sC(o)){const d=e.textContent.trim().slice(0,1),p=/[1iIaA]/.test(d),f=t.createElement(p?"ol":"ul");p&&f.setAttribute("type",d),e.parentNode.insertBefore(f,e)}const r=e.previousElementSibling,s=r.nodeName,i=t.createElement("li");let c=r;i.innerHTML=tf(e.innerHTML,[Kie]);const l=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);let u=l&&parseInt(l[1],10)-1||0;for(;u--;)c=c.lastChild||c,sC(c)&&(c=c.lastChild||c);sC(c)||(c=c.appendChild(t.createElement(s))),c.appendChild(i),e.parentNode.removeChild(e)}const tx={};function ls(e){const t=window.URL.createObjectURL(e);return tx[t]=e,t}function Yie(e){return tx[e]}function Zie(e){return Yie(e)?.type.split("/")[0]}function nx(e){tx[e]&&window.URL.revokeObjectURL(e),delete tx[e]}function Nr(e){return!e||!e.indexOf?!1:e.indexOf("blob:")===0}function OX(e,t,n=""){if(!e||!t)return;const o=new window.Blob([t],{type:n}),r=window.URL.createObjectURL(o),s=document.createElement("a");s.href=r,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(r)}function n7e(e){if(e.nodeName==="IMG"){if(e.src.indexOf("file:")===0&&(e.src=""),e.src.indexOf("data:")===0){const[t,n]=e.src.split(","),[o]=t.slice(5).split(";");if(!n||!o){e.src="";return}let r;try{r=atob(n)}catch{e.src="";return}const s=new Uint8Array(r.length);for(let l=0;l (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:

foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(M===!1)return JSON.parse(JSON.stringify(y));var k={};for(var S in y)y.hasOwnProperty(S)&&(k[S]=y[S].defaultValue);return k}function n(){var M=t(!0),y={};for(var k in M)M.hasOwnProperty(k)&&(y[k]=!0);return y}var o={},r={},s={},i=t(!0),c="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};o.helper={},o.extensions={},o.setOption=function(M,y){return i[M]=y,this},o.getOption=function(M){return i[M]},o.getOptions=function(){return i},o.resetOptions=function(){i=t(!0)},o.setFlavor=function(M){if(!l.hasOwnProperty(M))throw Error(M+" flavor was not found");o.resetOptions();var y=l[M];c=M;for(var k in y)y.hasOwnProperty(k)&&(i[k]=y[k])},o.getFlavor=function(){return c},o.getFlavorOptions=function(M){if(l.hasOwnProperty(M))return l[M]},o.getDefaultOptions=function(M){return t(M)},o.subParser=function(M,y){if(o.helper.isString(M))if(typeof y<"u")r[M]=y;else{if(r.hasOwnProperty(M))return r[M];throw Error("SubParser named "+M+" not registered!")}},o.extension=function(M,y){if(!o.helper.isString(M))throw Error("Extension 'name' must be a string");if(M=o.helper.stdExtName(M),o.helper.isUndefined(y)){if(!s.hasOwnProperty(M))throw Error("Extension named "+M+" is not registered!");return s[M]}else{typeof y=="function"&&(y=y()),o.helper.isArray(y)||(y=[y]);var k=u(y,M);if(k.valid)s[M]=y;else throw Error(k.error)}},o.getAllExtensions=function(){return s},o.removeExtension=function(M){delete s[M]},o.resetExtensions=function(){s={}};function u(M,y){var k=y?"Error in "+y+" extension->":"Error in unnamed extension",S={valid:!0,error:""};o.helper.isArray(M)||(M=[M]);for(var C=0;C"u"},o.helper.forEach=function(M,y){if(o.helper.isUndefined(M))throw new Error("obj param is required");if(o.helper.isUndefined(y))throw new Error("callback param is required");if(!o.helper.isFunction(y))throw new Error("callback param must be a function/closure");if(typeof M.forEach=="function")M.forEach(y);else if(o.helper.isArray(M))for(var k=0;k").replace(/&/g,"&")};var p=function(M,y,k,S){var C=S||"",R=C.indexOf("g")>-1,T=new RegExp(y+"|"+k,"g"+C.replace(/g/g,"")),E=new RegExp(y,C.replace(/g/g,"")),B=[],N,j,I,P,$;do for(N=0;I=T.exec(M);)if(E.test(I[0]))N++||(j=T.lastIndex,P=j-I[0].length);else if(N&&!--N){$=I.index+I[0].length;var F={left:{start:P,end:j},match:{start:j,end:I.index},right:{start:I.index,end:$},wholeMatch:{start:P,end:$}};if(B.push(F),!R)return B}while(N&&(T.lastIndex=j));return B};o.helper.matchRecursiveRegExp=function(M,y,k,S){for(var C=p(M,y,k,S),R=[],T=0;T0){var N=[];T[0].wholeMatch.start!==0&&N.push(M.slice(0,T[0].wholeMatch.start));for(var j=0;j=0?S+(k||0):S},o.helper.splitAtIndex=function(M,y){if(!o.helper.isString(M))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[M.substring(0,y),M.substring(y)]},o.helper.encodeEmailAddress=function(M){var y=[function(k){return"&#"+k.charCodeAt(0)+";"},function(k){return"&#x"+k.charCodeAt(0).toString(16)+";"},function(k){return k}];return M=M.replace(/./g,function(k){if(k==="@")k=y[Math.floor(Math.random()*2)](k);else{var S=Math.random();k=S>.9?y[2](k):S>.45?y[1](k):y[0](k)}return k}),M},o.helper.padEnd=function(y,k,S){return k=k>>0,S=String(S||" "),y.length>k?String(y):(k=k-y.length,k>S.length&&(S+=S.repeat(k/S.length)),String(y)+S.slice(0,k))},typeof console>"u"&&(console={warn:function(M){alert(M)},log:function(M){alert(M)},error:function(M){throw M}}),o.helper.regexes={asteriskDashAndColon:/([*_:~])/g},o.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},o.Converter=function(M){var y={},k=[],S=[],C={},R=c,T={parsed:{},raw:"",format:""};E();function E(){M=M||{};for(var P in i)i.hasOwnProperty(P)&&(y[P]=i[P]);if(typeof M=="object")for(var $ in M)M.hasOwnProperty($)&&(y[$]=M[$]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof M+" was passed instead.");y.extensions&&o.helper.forEach(y.extensions,B)}function B(P,$){if($=$||null,o.helper.isString(P))if(P=o.helper.stdExtName(P),$=P,o.extensions[P]){console.warn("DEPRECATION WARNING: "+P+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),N(o.extensions[P],P);return}else if(!o.helper.isUndefined(s[P]))P=s[P];else throw Error('Extension "'+P+'" could not be loaded. It was either not found or is not a valid extension.');typeof P=="function"&&(P=P()),o.helper.isArray(P)||(P=[P]);var F=u(P,$);if(!F.valid)throw Error(F.error);for(var X=0;Xd(...p)),u}function Ko(e,t){return xie(e).reduce((n,o)=>{const r=Bie(o,t);return r&&n.push(r),n},[])}function Lie(){return Ei("from").filter(({type:e})=>e==="raw").map(e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)})}function Pie(e,t){const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Array.from(n.body.children).flatMap(o=>{const r=xc(Lie(),({isMatch:c})=>c(o));if(!r)return f0.isNative?Ko(`${o.outerHTML}`):Ee("core/html",Wl("core/html",o.outerHTML));const{transform:s,blockName:i}=r;if(s){const c=s(o,t);return o.hasAttribute("class")&&(c.attributes.className=o.getAttribute("class")),c}return Ee(i,Wl(i,o.outerHTML))})}function tw(e,t={}){const n=document.implementation.createHTMLDocument(""),o=document.implementation.createHTMLDocument(""),r=n.body,s=o.body;for(r.innerHTML=e;r.firstChild;){const i=r.firstChild;i.nodeType===i.TEXT_NODE?R4(i)?r.removeChild(i):((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):i.nodeType===i.ELEMENT_NODE?i.nodeName==="BR"?(i.nextSibling&&i.nextSibling.nodeName==="BR"&&(s.appendChild(o.createElement("P")),r.removeChild(i.nextSibling)),s.lastChild&&s.lastChild.nodeName==="P"&&s.lastChild.hasChildNodes()?s.lastChild.appendChild(i):r.removeChild(i)):i.nodeName==="P"?R4(i)&&!t.raw?r.removeChild(i):s.appendChild(i):k2(i)?((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):s.appendChild(i):r.removeChild(i)}return s.innerHTML}function jie(e,t){if(e.nodeType!==e.COMMENT_NODE||e.nodeValue!=="nextpage"&&e.nodeValue.indexOf("more")!==0)return;const n=Dje(e,t);if(!e.parentNode||e.parentNode.nodeName!=="P")xSe(e,n);else{const o=Array.from(e.parentNode.childNodes),r=o.indexOf(e),s=e.parentNode.parentNode||t.body,i=(c,l)=>(c||(c=t.createElement("p")),c.appendChild(l),c);[o.slice(0,r).reduce(i,null),n,o.slice(r+1).reduce(i,null)].forEach(c=>c&&s.insertBefore(c,e.parentNode)),pf(e.parentNode)}}function Dje(e,t){if(e.nodeValue==="nextpage")return $je(t);const n=e.nodeValue.slice(4).trim();let o=e,r=!1;for(;o=o.nextSibling;)if(o.nodeType===o.COMMENT_NODE&&o.nodeValue==="noteaser"){r=!0,pf(o);break}return Fje(n,r,t)}function Fje(e,t,n){const o=n.createElement("wp-block");return o.dataset.block="core/more",e&&(o.dataset.customText=e),t&&(o.dataset.noTeaser=""),o}function $je(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}function hX(e){return e.nodeName==="OL"||e.nodeName==="UL"}function Vje(e){return Array.from(e.childNodes).map(({nodeValue:t=""})=>t).join("")}function Iie(e){if(!hX(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&t.children.length===1){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const o=e.parentNode;if(o&&o.nodeName==="LI"&&o.children.length===1&&!/\S/.test(Vje(o))){const r=o,s=r.previousElementSibling,i=r.parentNode;s&&(s.appendChild(t),i.removeChild(r))}if(o&&hX(o)){const r=e.previousElementSibling;r?r.appendChild(e):mM(e)}}function Die(e){return t=>{t.nodeName==="BLOCKQUOTE"&&(t.innerHTML=tw(t.innerHTML,e))}}function Hje(e,t){var n;const o=e.nodeName.toLowerCase();return o==="figcaption"||M0e(e)?!1:o in((n=t?.figure?.children)!==null&&n!==void 0?n:{})}function Uje(e,t){var n;return e.nodeName.toLowerCase()in((n=t?.figure?.children?.a?.children)!==null&&n!==void 0?n:{})}function oC(e,t=e){const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function Fie(e,t,n){if(!Hje(e,n))return;let o=e;const r=e.parentNode;Uje(e,n)&&r.nodeName==="A"&&r.childNodes.length===1&&(o=e.parentNode);const s=o.closest("p,div");s?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!s.textContent.trim())&&oC(o,s):oC(o,s):oC(o)}function UB(e,t,n=0){const o=nz(e);o.lastIndex=n;const r=o.exec(t);if(!r)return;if(r[1]==="["&&r[7]==="]")return UB(e,t,o.lastIndex);const s={index:r.index,content:r[0],shortcode:XB(r)};return r[1]&&(s.content=s.content.slice(1),s.index++),r[7]&&(s.content=s.content.slice(0,-1)),s}function Xje(e,t,n){return t.replace(nz(e),function(o,r,s,i,c,l,u,d){if(r==="["&&d==="]")return o;const p=n(XB(arguments));return p||p===""?r+p+d:o})}function Gje(e){return new GB(e).string()}function nz(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const mX=Hs(e=>{const t={},n=[],o=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;e=e.replace(/[\u00a0\u200b]/g," ");let r;for(;r=o.exec(e);)r[1]?t[r[1].toLowerCase()]=r[2]:r[3]?t[r[3].toLowerCase()]=r[4]:r[5]?t[r[5].toLowerCase()]=r[6]:r[7]?n.push(r[7]):r[8]?n.push(r[8]):r[9]&&n.push(r[9]);return{named:t,numeric:n}});function XB(e){let t;return e[4]?t="self-closing":e[6]?t="closed":t="single",new GB({tag:e[2],attrs:e[3],type:t,content:e[5]})}const GB=Object.assign(function(e){const{tag:t,attrs:n,type:o,content:r}=e||{};if(Object.assign(this,{tag:t,type:o,content:r}),this.attrs={named:{},numeric:[]},!n)return;const s=["named","numeric"];typeof n=="string"?this.attrs=mX(n):n.length===s.length&&s.every((i,c)=>i===n[c])?this.attrs=n:Object.entries(n).forEach(([i,c])=>{this.set(i,c)})},{next:UB,replace:Xje,string:Gje,regexp:nz,attrs:mX,fromMatch:XB});Object.assign(GB.prototype,{get(e){return this.attrs[typeof e=="number"?"numeric":"named"][e]},set(e,t){return this.attrs[typeof e=="number"?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return this.attrs.numeric.forEach(t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t}),Object.entries(this.attrs.named).forEach(([t,n])=>{e+=" "+t+'="'+n+'"'}),this.type==="single"?e+"]":this.type==="self-closing"?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});const gX=e=>Array.isArray(e)?e:[e],MX=/(\n|

)\s*$/,zX=/^\s*(\n|<\/p>)/;function u2(e,t=0,n=[]){const o=Ei("from"),r=xc(o,u=>n.indexOf(u.blockName)===-1&&u.type==="shortcode"&&gX(u.tag).some(d=>nz(d).test(e)));if(!r)return[e];const i=gX(r.tag).find(u=>nz(u).test(e));let c;const l=t;if(c=UB(i,e,t)){t=c.index+c.content.length;const u=e.substr(0,c.index),d=e.substr(t);if(!c.shortcode.content?.includes("<")&&!(MX.test(u)&&zX.test(d)))return u2(e,t);if(r.isMatch&&!r.isMatch(c.shortcode.attrs))return u2(e,l,[...n,r.blockName]);let p=[];if(typeof r.transform=="function")p=[].concat(r.transform(c.shortcode.attrs,c)),p=p.map(f=>(f.originalContent=c.shortcode.content,Q4(f,on(f.name))));else{const f=Object.fromEntries(Object.entries(r.attributes).filter(([,z])=>z.shortcode).map(([z,A])=>[z,A.shortcode(c.shortcode.attrs,c)])),b=on(r.blockName);if(!b)return[e];const h={...b,attributes:r.attributes};let g=Ee(r.blockName,Wl(h,c.shortcode.content,f));g.originalContent=c.shortcode.content,g=Q4(g,h),p=[g]}return[...u2(u.replace(MX,"")),...p,...u2(d.replace(zX,""))]}return[e]}function Kje(e,t){const o={phrasingContentSchema:q5(t),isPaste:t==="paste"},r=e.map(({isMatch:l,blockName:u,schema:d})=>{const p=Et(u,"anchor");return d=typeof d=="function"?d(o):d,!p&&!l?d:d?Object.fromEntries(Object.entries(d).map(([f,b])=>{let h=b.attributes||[];return p&&(h=[...h,"id"]),[f,{...b,attributes:h,isMatch:l||void 0}]})):{}});function s(l,u,d){switch(d){case"children":return l==="*"||u==="*"?"*":{...l,...u};case"attributes":case"require":return[...l||[],...u||[]];case"isMatch":return!l||!u?void 0:(...p)=>l(...p)||u(...p)}}function i(l,u){for(const d in u)l[d]=l[d]?s(l[d],u[d],d):{...u[d]};return l}function c(l,u){for(const d in u)l[d]=l[d]?i(l[d],u[d]):{...u[d]};return l}return r.reduce(c,{})}function $ie(e){return Kje(Lie(),e)}function Yje(e){return!/<(?!br[ />])/i.test(e)}function Vie(e,t,n,o){Array.from(e).forEach(r=>{Vie(r.childNodes,t,n,o),t.forEach(s=>{n.contains(r)&&s(r,n,o)})})}function tf(e,t=[],n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,Vie(o.body.childNodes,t,o,n),o.body.innerHTML}function J4(e,t){const n=e[`${t}Sibling`];if(n&&k2(n))return n;const{parentNode:o}=e;if(!(!o||!k2(o)))return J4(o,t)}function Hie(e){e.nodeType===e.COMMENT_NODE&&pf(e)}function Zje(e,t){if(M0e(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(r=>[n,t].filter(s=>!r.includes(s)).length===0)}function Uie(e,t){return e.every(n=>Zje(n,t)&&Uie(Array.from(n.children),t))}function Qje(e){return e.nodeName==="BR"&&e.previousSibling&&e.previousSibling.nodeName==="BR"}function Jje(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const o=Array.from(n.body.children);return!o.some(Qje)&&Uie(o,t)}function Xie(e,t){if(e.nodeName==="SPAN"&&e.style){const{fontWeight:n,fontStyle:o,textDecorationLine:r,textDecoration:s,verticalAlign:i}=e.style;(n==="bold"||n==="700")&&Ag(t.createElement("strong"),e),o==="italic"&&Ag(t.createElement("em"),e),(r==="line-through"||s.includes("line-through"))&&Ag(t.createElement("s"),e),i==="super"?Ag(t.createElement("sup"),e):i==="sub"&&Ag(t.createElement("sub"),e)}else e.nodeName==="B"?e=IH(e,"strong"):e.nodeName==="I"?e=IH(e,"em"):e.nodeName==="A"&&(e.target&&e.target.toLowerCase()==="_blank"?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function Gie(e){e.nodeName!=="SCRIPT"&&e.nodeName!=="NOSCRIPT"&&e.nodeName!=="TEMPLATE"&&e.nodeName!=="STYLE"||e.parentNode.removeChild(e)}function Kie(e){if(e.nodeType!==e.ELEMENT_NODE)return;const t=e.getAttribute("style");if(!t||!t.includes("mso-list"))return;t.split(";").reduce((o,r)=>{const[s,i]=r.split(":");return s&&i&&(o[s.trim().toLowerCase()]=i.trim().toLowerCase()),o},{})["mso-list"]==="ignore"&&e.remove()}function rC(e){return e.nodeName==="OL"||e.nodeName==="UL"}function e7e(e,t){if(e.nodeName!=="P")return;const n=e.getAttribute("style");if(!n||!n.includes("mso-list"))return;const o=e.previousElementSibling;if(!o||!rC(o)){const d=e.textContent.trim().slice(0,1),p=/[1iIaA]/.test(d),f=t.createElement(p?"ol":"ul");p&&f.setAttribute("type",d),e.parentNode.insertBefore(f,e)}const r=e.previousElementSibling,s=r.nodeName,i=t.createElement("li");let c=r;i.innerHTML=tf(e.innerHTML,[Kie]);const l=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);let u=l&&parseInt(l[1],10)-1||0;for(;u--;)c=c.lastChild||c,rC(c)&&(c=c.lastChild||c);rC(c)||(c=c.appendChild(t.createElement(s))),c.appendChild(i),e.parentNode.removeChild(e)}const ex={};function ls(e){const t=window.URL.createObjectURL(e);return ex[t]=e,t}function Yie(e){return ex[e]}function Zie(e){return Yie(e)?.type.split("/")[0]}function tx(e){ex[e]&&window.URL.revokeObjectURL(e),delete ex[e]}function Nr(e){return!e||!e.indexOf?!1:e.indexOf("blob:")===0}function OX(e,t,n=""){if(!e||!t)return;const o=new window.Blob([t],{type:n}),r=window.URL.createObjectURL(o),s=document.createElement("a");s.href=r,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(r)}function t7e(e){if(e.nodeName==="IMG"){if(e.src.indexOf("file:")===0&&(e.src=""),e.src.indexOf("data:")===0){const[t,n]=e.src.split(","),[o]=t.slice(5).split(";");if(!n||!o){e.src="";return}let r;try{r=atob(n)}catch{e.src="";return}const s=new Uint8Array(r.length);for(let l=0;l (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:

foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(M===!1)return JSON.parse(JSON.stringify(y));var k={};for(var S in y)y.hasOwnProperty(S)&&(k[S]=y[S].defaultValue);return k}function n(){var M=t(!0),y={};for(var k in M)M.hasOwnProperty(k)&&(y[k]=!0);return y}var o={},r={},s={},i=t(!0),c="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};o.helper={},o.extensions={},o.setOption=function(M,y){return i[M]=y,this},o.getOption=function(M){return i[M]},o.getOptions=function(){return i},o.resetOptions=function(){i=t(!0)},o.setFlavor=function(M){if(!l.hasOwnProperty(M))throw Error(M+" flavor was not found");o.resetOptions();var y=l[M];c=M;for(var k in y)y.hasOwnProperty(k)&&(i[k]=y[k])},o.getFlavor=function(){return c},o.getFlavorOptions=function(M){if(l.hasOwnProperty(M))return l[M]},o.getDefaultOptions=function(M){return t(M)},o.subParser=function(M,y){if(o.helper.isString(M))if(typeof y<"u")r[M]=y;else{if(r.hasOwnProperty(M))return r[M];throw Error("SubParser named "+M+" not registered!")}},o.extension=function(M,y){if(!o.helper.isString(M))throw Error("Extension 'name' must be a string");if(M=o.helper.stdExtName(M),o.helper.isUndefined(y)){if(!s.hasOwnProperty(M))throw Error("Extension named "+M+" is not registered!");return s[M]}else{typeof y=="function"&&(y=y()),o.helper.isArray(y)||(y=[y]);var k=u(y,M);if(k.valid)s[M]=y;else throw Error(k.error)}},o.getAllExtensions=function(){return s},o.removeExtension=function(M){delete s[M]},o.resetExtensions=function(){s={}};function u(M,y){var k=y?"Error in "+y+" extension->":"Error in unnamed extension",S={valid:!0,error:""};o.helper.isArray(M)||(M=[M]);for(var C=0;C"u"},o.helper.forEach=function(M,y){if(o.helper.isUndefined(M))throw new Error("obj param is required");if(o.helper.isUndefined(y))throw new Error("callback param is required");if(!o.helper.isFunction(y))throw new Error("callback param must be a function/closure");if(typeof M.forEach=="function")M.forEach(y);else if(o.helper.isArray(M))for(var k=0;k").replace(/&/g,"&")};var p=function(M,y,k,S){var C=S||"",R=C.indexOf("g")>-1,T=new RegExp(y+"|"+k,"g"+C.replace(/g/g,"")),E=new RegExp(y,C.replace(/g/g,"")),B=[],N,j,I,P,$;do for(N=0;I=T.exec(M);)if(E.test(I[0]))N++||(j=T.lastIndex,P=j-I[0].length);else if(N&&!--N){$=I.index+I[0].length;var F={left:{start:P,end:j},match:{start:j,end:I.index},right:{start:I.index,end:$},wholeMatch:{start:P,end:$}};if(B.push(F),!R)return B}while(N&&(T.lastIndex=j));return B};o.helper.matchRecursiveRegExp=function(M,y,k,S){for(var C=p(M,y,k,S),R=[],T=0;T0){var N=[];T[0].wholeMatch.start!==0&&N.push(M.slice(0,T[0].wholeMatch.start));for(var j=0;j=0?S+(k||0):S},o.helper.splitAtIndex=function(M,y){if(!o.helper.isString(M))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[M.substring(0,y),M.substring(y)]},o.helper.encodeEmailAddress=function(M){var y=[function(k){return"&#"+k.charCodeAt(0)+";"},function(k){return"&#x"+k.charCodeAt(0).toString(16)+";"},function(k){return k}];return M=M.replace(/./g,function(k){if(k==="@")k=y[Math.floor(Math.random()*2)](k);else{var S=Math.random();k=S>.9?y[2](k):S>.45?y[1](k):y[0](k)}return k}),M},o.helper.padEnd=function(y,k,S){return k=k>>0,S=String(S||" "),y.length>k?String(y):(k=k-y.length,k>S.length&&(S+=S.repeat(k/S.length)),String(y)+S.slice(0,k))},typeof console>"u"&&(console={warn:function(M){alert(M)},log:function(M){alert(M)},error:function(M){throw M}}),o.helper.regexes={asteriskDashAndColon:/([*_:~])/g},o.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},o.Converter=function(M){var y={},k=[],S=[],C={},R=c,T={parsed:{},raw:"",format:""};E();function E(){M=M||{};for(var P in i)i.hasOwnProperty(P)&&(y[P]=i[P]);if(typeof M=="object")for(var $ in M)M.hasOwnProperty($)&&(y[$]=M[$]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof M+" was passed instead.");y.extensions&&o.helper.forEach(y.extensions,B)}function B(P,$){if($=$||null,o.helper.isString(P))if(P=o.helper.stdExtName(P),$=P,o.extensions[P]){console.warn("DEPRECATION WARNING: "+P+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),N(o.extensions[P],P);return}else if(!o.helper.isUndefined(s[P]))P=s[P];else throw Error('Extension "'+P+'" could not be loaded. It was either not found or is not a valid extension.');typeof P=="function"&&(P=P()),o.helper.isArray(P)||(P=[P]);var F=u(P,$);if(!F.valid)throw Error(F.error);for(var X=0;X"+y.preList[k]+""}),o.subParser("makeMarkdown.strikethrough",function(M,y){var k="";if(M.hasChildNodes()){k+="~~";for(var S=M.childNodes,C=S.length,R=0;Rtr>th"),R=M.querySelectorAll("tbody>tr"),T,E;for(T=0;TF&&(F=X)}for(T=0;T/g,"\\$1>"),y=y.replace(/^#/gm,"\\#"),y=y.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),y=y.replace(/^( {0,3}\d+)\./gm,"$1\\."),y=y.replace(/^( {0,3})([+-])/gm,"$1\\$2"),y=y.replace(/]([\s]*)\(/g,"\\]$1\\("),y=y.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),y});var v=this;e.exports?e.exports=o:v.showdown=o}).call(r7e)}($v)),$v.exports}var i7e=s7e();const a7e=Zr(i7e),c7e=new a7e.Converter({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function l7e(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,(t,n,o,r)=>`${n} +`}return k.trim()}),o.subParser("makeMarkdown.tableCell",function(M,y){var k="";if(!M.hasChildNodes())return"";for(var S=M.childNodes,C=S.length,R=0;R/g,"\\$1>"),y=y.replace(/^#/gm,"\\#"),y=y.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),y=y.replace(/^( {0,3}\d+)\./gm,"$1\\."),y=y.replace(/^( {0,3})([+-])/gm,"$1\\$2"),y=y.replace(/]([\s]*)\(/g,"\\]$1\\("),y=y.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),y});var v=this;e.exports?e.exports=o:v.showdown=o}).call(o7e)}(Fv)),Fv.exports}var s7e=r7e();const i7e=Zr(s7e),a7e=new i7e.Converter({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function c7e(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,(t,n,o,r)=>`${n} ${o} -${r}`)}function u7e(e){return e.replace(/(^|\n)•( +)/g,"$1*$2")}function d7e(e){return c7e.makeHtml(l7e(u7e(e)))}function p7e(e){if(e.nodeName==="IFRAME"){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function Qie(e){!e.id||e.id.indexOf("docs-internal-guid-")!==0||(e.tagName==="B"?mM(e):e.removeAttribute("id"))}function f7e(e){return e===" "||e==="\r"||e===` -`||e===" "}function Jie(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&t.nodeName==="PRE")return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(n[0]===" "){const o=ex(e,"previous");(!o||o.nodeName==="BR"||o.textContent.slice(-1)===" ")&&(n=n.slice(1))}if(n[n.length-1]===" "){const o=ex(e,"next");(!o||o.nodeName==="BR"||o.nodeType===o.TEXT_NODE&&f7e(o.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function eae(e){e.nodeName==="BR"&&(ex(e,"next")||e.parentNode.removeChild(e))}function b7e(e){e.nodeName==="P"&&(e.hasChildNodes()||e.parentNode.removeChild(e))}function h7e(e){if(e.nodeName!=="SPAN"||e.getAttribute("data-stringify-type")!=="paragraph-break")return;const{parentNode:t}=e;t.insertBefore(e.ownerDocument.createElement("br"),e),t.insertBefore(e.ownerDocument.createElement("br"),e),t.removeChild(e)}const tae=(...e)=>window?.console?.log?.(...e);function AX(e){return e=tf(e,[Gie,Qie,Kie,Xie,Hie]),e=_E(e,R5("paste"),{inline:!0}),e=tf(e,[Jie,eae]),tae(`Processed inline HTML: +${r}`)}function l7e(e){return e.replace(/(^|\n)•( +)/g,"$1*$2")}function u7e(e){return a7e.makeHtml(c7e(l7e(e)))}function d7e(e){if(e.nodeName==="IFRAME"){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function Qie(e){!e.id||e.id.indexOf("docs-internal-guid-")!==0||(e.tagName==="B"?mM(e):e.removeAttribute("id"))}function p7e(e){return e===" "||e==="\r"||e===` +`||e===" "}function Jie(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&t.nodeName==="PRE")return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(n[0]===" "){const o=J4(e,"previous");(!o||o.nodeName==="BR"||o.textContent.slice(-1)===" ")&&(n=n.slice(1))}if(n[n.length-1]===" "){const o=J4(e,"next");(!o||o.nodeName==="BR"||o.nodeType===o.TEXT_NODE&&p7e(o.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function eae(e){e.nodeName==="BR"&&(J4(e,"next")||e.parentNode.removeChild(e))}function f7e(e){e.nodeName==="P"&&(e.hasChildNodes()||e.parentNode.removeChild(e))}function b7e(e){if(e.nodeName!=="SPAN"||e.getAttribute("data-stringify-type")!=="paragraph-break")return;const{parentNode:t}=e;t.insertBefore(e.ownerDocument.createElement("br"),e),t.insertBefore(e.ownerDocument.createElement("br"),e),t.removeChild(e)}const tae=(...e)=>window?.console?.log?.(...e);function AX(e){return e=tf(e,[Gie,Qie,Kie,Xie,Hie]),e=wE(e,q5("paste"),{inline:!0}),e=tf(e,[Jie,eae]),tae(`Processed inline HTML: -`,e),e}function Xh({HTML:e="",plainText:t="",mode:n="AUTO",tagName:o}){if(e=e.replace(/]+>/g,""),e=e.replace(/^\s*]*>\s*]*>(?:\s*)?/i,""),e=e.replace(/(?:\s*)?<\/body>\s*<\/html>\s*$/i,""),n!=="INLINE"){const d=e||t;if(d.indexOf(")?/i,""),e=e.replace(/(?:\s*)?<\/body>\s*<\/html>\s*$/i,""),n!=="INLINE"){const d=e||t;if(d.indexOf("",n=e.indexOf(t);if(n>-1)e=e.substring(n+t.length);else return e;const r=e.indexOf("");return r>-1&&(e=e.substring(0,r)),e}function twt(e){const t="";return e.startsWith(t)?e.slice(t.length):e}function N7({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch{return}n=ewt(n),n=twt(n);const o=E4(e);return o.length&&!nwt(o,n)?{files:o}:{html:n,plainText:t,files:[]}}function nwt(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){const n=/<\s*img\b/gi;if(t.match(n)?.length!==1)return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}const Cme=Symbol("requiresWrapperOnCopy");function qme(e,t,n){let o=t;const[r]=t;if(r&&n.select(kt).getBlockType(r.name)[Cme]){const{getBlockRootClientId:c,getBlockName:l,getBlockAttributes:u}=n.select(Q),d=c(r.clientId),p=l(d);p&&(o=Ee(p,u(d),o))}const s=Ks(o);e.clipboardData.setData("text/plain",rwt(s)),e.clipboardData.setData("text/html",s)}function owt(e,t){const{plainText:n,html:o,files:r}=N7(e);let s=[];if(r.length){const i=Ei("from");s=r.reduce((c,l)=>{const u=xc(i,d=>d.type==="files"&&d.isMatch([l]));return u&&c.push(u.transform([l])),c},[]).flat()}else s=Xh({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return s}function rwt(e){return e=e.replace(/
/g,` +*/var jvt=cM.exports,iQ;function Ivt(){return iQ||(iQ=1,function(e,t){(function(n,o){o(e,t)})(jvt,function(n,o){var r=typeof Map=="function"?new Map:function(){var d=[],p=[];return{has:function(b){return d.indexOf(b)>-1},get:function(b){return p[d.indexOf(b)]},set:function(b,h){d.indexOf(b)===-1&&(d.push(b),p.push(h))},delete:function(b){var h=d.indexOf(b);h>-1&&(d.splice(h,1),p.splice(h,1))}}}(),s=function(p){return new Event(p,{bubbles:!0})};try{new Event("test")}catch{s=function(f){var b=document.createEvent("Event");return b.initEvent(f,!0,!1),b}}function i(d){if(!d||!d.nodeName||d.nodeName!=="TEXTAREA"||r.has(d))return;var p=null,f=null,b=null;function h(){var y=window.getComputedStyle(d,null);y.resize==="vertical"?d.style.resize="none":y.resize==="both"&&(d.style.resize="horizontal"),y.boxSizing==="content-box"?p=-(parseFloat(y.paddingTop)+parseFloat(y.paddingBottom)):p=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth),isNaN(p)&&(p=0),_()}function g(y){{var k=d.style.width;d.style.width="0px",d.offsetWidth,d.style.width=k}d.style.overflowY=y}function z(y){for(var k=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&k.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return k}function A(){if(d.scrollHeight!==0){var y=z(d),k=document.documentElement&&document.documentElement.scrollTop;d.style.height="",d.style.height=d.scrollHeight+p+"px",f=d.clientWidth,y.forEach(function(S){S.node.scrollTop=S.scrollTop}),k&&(document.documentElement.scrollTop=k)}}function _(){A();var y=Math.round(parseFloat(d.style.height)),k=window.getComputedStyle(d,null),S=k.boxSizing==="content-box"?Math.round(parseFloat(k.height)):d.offsetHeight;if(S"u"||typeof window.getComputedStyle!="function"?(u=function(p){return p},u.destroy=function(d){return d},u.update=function(d){return d}):(u=function(p,f){return p&&Array.prototype.forEach.call(p.length?p:[p],function(b){return i(b)}),p},u.destroy=function(d){return d&&Array.prototype.forEach.call(d.length?d:[d],c),d},u.update=function(d){return d&&Array.prototype.forEach.call(d.length?d:[d],l),d}),o.default=u,n.exports=o.default})}(cM,cM.exports)),cM.exports}var fq,aQ;function Dvt(){if(aQ)return fq;aQ=1;var e=function(t,n,o){return o=window.getComputedStyle,(o?o(t):t.currentStyle)[n.replace(/-(\w)/gi,function(r,s){return s.toUpperCase()})]};return fq=e,fq}var bq,cQ;function Fvt(){if(cQ)return bq;cQ=1;var e=Dvt();function t(n){var o=e(n,"line-height"),r=parseFloat(o,10);if(o===r+""){var s=n.style.lineHeight;n.style.lineHeight=o+"em",o=e(n,"line-height"),r=parseFloat(o,10),s?n.style.lineHeight=s:delete n.style.lineHeight}if(o.indexOf("pt")!==-1?(r*=4,r/=3):o.indexOf("mm")!==-1?(r*=96,r/=25.4):o.indexOf("cm")!==-1?(r*=96,r/=2.54):o.indexOf("in")!==-1?r*=96:o.indexOf("pc")!==-1&&(r*=16),r=Math.round(r),o==="normal"){var i=n.nodeName,c=document.createElement(i);c.innerHTML=" ",i.toUpperCase()==="TEXTAREA"&&c.setAttribute("rows","1");var l=e(n,"font-size");c.style.fontSize=l,c.style.padding="0px",c.style.border="0px";var u=document.body;u.appendChild(c);var d=c.offsetHeight;r=d,u.removeChild(c)}return r}return bq=t,bq}var lQ;function $vt(){if(lQ)return ja;lQ=1;var e=ja&&ja.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,f){p.__proto__=f}||function(p,f){for(var b in f)f.hasOwnProperty(b)&&(p[b]=f[b])};return function(p,f){d(p,f);function b(){this.constructor=p}p.prototype=f===null?Object.create(f):(b.prototype=f.prototype,new b)}}(),t=ja&&ja.__assign||Object.assign||function(d){for(var p,f=1,b=arguments.length;fi(Q).getBlock(e),[e]),{updateBlock:r}=Oe(Q),s=()=>{const i=on(o.name);if(!i)return;const c=Wl(i,t,o.attributes),l=t||Gf(i,c),[u]=t?tz({...o,attributes:c,originalContent:l}):[!0];r(e,{attributes:c,originalContent:l,isValid:u}),t||n(l)};return x.useEffect(()=>{n(J5(o))},[o]),a.jsx(m7,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:i=>n(i.target.value)})}var g7=wO(),kn=e=>xO(e,g7),M7=wO();kn.write=e=>xO(e,M7);var w_=wO();kn.onStart=e=>xO(e,w_);var z7=wO();kn.onFrame=e=>xO(e,z7);var O7=wO();kn.onFinish=e=>xO(e,O7);var F2=[];kn.setTimeout=(e,t)=>{const n=kn.now()+t,o=()=>{const s=F2.findIndex(i=>i.cancel==o);~s&&F2.splice(s,1),od-=~s?1:0},r={time:n,handler:e,cancel:o};return F2.splice(Bhe(n),0,r),od+=1,Lhe(),r};var Bhe=e=>~(~F2.findIndex(t=>t.time>e)||~F2.length);kn.cancel=e=>{w_.delete(e),z7.delete(e),O7.delete(e),g7.delete(e),M7.delete(e)};kn.sync=e=>{_W=!0,kn.batchedUpdates(e),_W=!1};kn.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...r){t=r,kn.onStart(n)}return o.handler=e,o.cancel=()=>{w_.delete(n),t=null},o};var y7=typeof window<"u"?window.requestAnimationFrame:()=>{};kn.use=e=>y7=e;kn.now=typeof performance<"u"?()=>performance.now():Date.now;kn.batchedUpdates=e=>e();kn.catch=console.error;kn.frameLoop="always";kn.advance=()=>{kn.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):jhe()};var nd=-1,od=0,_W=!1;function xO(e,t){_W?(t.delete(e),e(0)):(t.add(e),Lhe())}function Lhe(){nd<0&&(nd=0,kn.frameLoop!=="demand"&&y7(Phe))}function Xvt(){nd=-1}function Phe(){~nd&&(y7(Phe),kn.batchedUpdates(jhe))}function jhe(){const e=nd;nd=kn.now();const t=Bhe(nd);if(t&&(Ihe(F2.splice(0,t),n=>n.handler()),od-=t),!od){Xvt();return}w_.flush(),g7.flush(e?Math.min(64,nd-e):16.667),z7.flush(),M7.flush(),O7.flush()}function wO(){let e=new Set,t=e;return{add(n){od+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return od-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,od-=t.size,Ihe(t,o=>o(n)&&e.add(o)),od+=e.size,t=e)}}}function Ihe(e,t){e.forEach(n=>{try{t(n)}catch(o){kn.catch(o)}})}var Gvt=Object.defineProperty,Kvt=(e,t)=>{for(var n in t)Gvt(e,n,{get:t[n],enumerable:!0})},Oa={};Kvt(Oa,{assign:()=>Zvt,colors:()=>dd,createStringInterpolator:()=>v7,skipAnimation:()=>Fhe,to:()=>Dhe,willAdvance:()=>x7});function kW(){}var Yvt=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),_t={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function al(e,t){if(_t.arr(e)){if(!_t.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Dl(e,t,n){if(_t.arr(e)){for(let o=0;o_t.und(e)?[]:_t.arr(e)?e:[e];function EM(e,t){if(e.size){const n=Array.from(e);e.clear(),qr(n,t)}}var lM=(e,...t)=>EM(e,n=>n(...t)),A7=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),v7,Dhe,dd=null,Fhe=!1,x7=kW,Zvt=e=>{e.to&&(Dhe=e.to),e.now&&(kn.now=e.now),e.colors!==void 0&&(dd=e.colors),e.skipAnimation!=null&&(Fhe=e.skipAnimation),e.createStringInterpolator&&(v7=e.createStringInterpolator),e.requestAnimationFrame&&kn.use(e.requestAnimationFrame),e.batchedUpdates&&(kn.batchedUpdates=e.batchedUpdates),e.willAdvance&&(x7=e.willAdvance),e.frameLoop&&(kn.frameLoop=e.frameLoop)},WM=new Set,vi=[],hq=[],Bx=0,__={get idle(){return!WM.size&&!vi.length},start(e){Bx>e.priority?(WM.add(e),kn.onStart(Qvt)):($he(e),kn(SW))},advance:SW,sort(e){if(Bx)kn.onFrame(()=>__.sort(e));else{const t=vi.indexOf(e);~t&&(vi.splice(t,1),Vhe(e))}},clear(){vi=[],WM.clear()}};function Qvt(){WM.forEach($he),WM.clear(),kn(SW)}function $he(e){vi.includes(e)||Vhe(e)}function Vhe(e){vi.splice(Jvt(vi,t=>t.priority>e.priority),0,e)}function SW(e){const t=hq;for(let n=0;n0}function Jvt(e,t){const n=e.findIndex(t);return n<0?e.length:n}var e4t=(e,t,n)=>Math.min(Math.max(n,e),t),t4t={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ia="[-+]?\\d*\\.?\\d+",Lx=ia+"%";function k_(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var n4t=new RegExp("rgb"+k_(ia,ia,ia)),o4t=new RegExp("rgba"+k_(ia,ia,ia,ia)),r4t=new RegExp("hsl"+k_(ia,Lx,Lx)),s4t=new RegExp("hsla"+k_(ia,Lx,Lx,ia)),i4t=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,a4t=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,c4t=/^#([0-9a-fA-F]{6})$/,l4t=/^#([0-9a-fA-F]{8})$/;function u4t(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=c4t.exec(e))?parseInt(t[1]+"ff",16)>>>0:dd&&dd[e]!==void 0?dd[e]:(t=n4t.exec(e))?(Yb(t[1])<<24|Yb(t[2])<<16|Yb(t[3])<<8|255)>>>0:(t=o4t.exec(e))?(Yb(t[1])<<24|Yb(t[2])<<16|Yb(t[3])<<8|fQ(t[4]))>>>0:(t=i4t.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=l4t.exec(e))?parseInt(t[1],16)>>>0:(t=a4t.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=r4t.exec(e))?(dQ(pQ(t[1]),ZA(t[2]),ZA(t[3]))|255)>>>0:(t=s4t.exec(e))?(dQ(pQ(t[1]),ZA(t[2]),ZA(t[3]))|fQ(t[4]))>>>0:null}function mq(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dQ(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,s=mq(r,o,e+1/3),i=mq(r,o,e),c=mq(r,o,e-1/3);return Math.round(s*255)<<24|Math.round(i*255)<<16|Math.round(c*255)<<8}function Yb(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function pQ(e){return(parseFloat(e)%360+360)%360/360}function fQ(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ZA(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function bQ(e){let t=u4t(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,o=(t&16711680)>>>16,r=(t&65280)>>>8,s=(t&255)/255;return`rgba(${n}, ${o}, ${r}, ${s})`}var Fz=(e,t,n)=>{if(_t.fun(e))return e;if(_t.arr(e))return Fz({range:e,output:t,extrapolate:n});if(_t.str(e.output[0]))return v7(e);const o=e,r=o.output,s=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",c=o.extrapolateRight||o.extrapolate||"extend",l=o.easing||(u=>u);return u=>{const d=p4t(u,s);return d4t(u,s[d],s[d+1],r[d],r[d+1],l,i,c,o.map)}};function d4t(e,t,n,o,r,s,i,c,l){let u=l?l(e):e;if(un){if(c==="identity")return u;c==="clamp"&&(u=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=s(u),o===-1/0?u=-u:r===1/0?u=u+o:u=u*(r-o)+o,u)}function p4t(e,t){for(var n=1;n=e);++n);return n-1}var f4t=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const o=n*e,r=t==="end"?Math.floor(o):Math.ceil(o);return e4t(0,1,r/e)},Px=1.70158,QA=Px*1.525,hQ=Px+1,mQ=2*Math.PI/3,gQ=2*Math.PI/4.5,JA=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,b4t={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>hQ*e*e*e-Px*e*e,easeOutBack:e=>1+hQ*Math.pow(e-1,3)+Px*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((QA+1)*2*e-QA)/2:(Math.pow(2*e-2,2)*((QA+1)*(e*2-2)+QA)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*mQ),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*mQ)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*gQ))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*gQ)/2+1,easeInBounce:e=>1-JA(1-e),easeOutBounce:JA,easeInOutBounce:e=>e<.5?(1-JA(1-2*e))/2:(1+JA(2*e-1))/2,steps:f4t},$z=Symbol.for("FluidValue.get"),wh=Symbol.for("FluidValue.observers"),zi=e=>!!(e&&e[$z]),as=e=>e&&e[$z]?e[$z]():e,MQ=e=>e[wh]||null;function h4t(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Vz(e,t){const n=e[wh];n&&n.forEach(o=>{h4t(o,t)})}var Hhe=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");m4t(this,e)}},m4t=(e,t)=>Uhe(e,$z,t);function _O(e,t){if(e[$z]){let n=e[wh];n||Uhe(e,wh,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Hz(e,t){const n=e[wh];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[wh]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var Uhe=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),b4=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g4t=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,zQ=new RegExp(`(${b4.source})(%|[a-z]+)`,"i"),M4t=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,S_=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Xhe=e=>{const[t,n]=z4t(e);if(!t||A7())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){const r=window.getComputedStyle(document.documentElement).getPropertyValue(n);return r||e}else{if(n&&S_.test(n))return Xhe(n);if(n)return n}return e},z4t=e=>{const t=S_.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]},gq,O4t=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Ghe=e=>{gq||(gq=dd?new RegExp(`(${Object.keys(dd).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>as(s).replace(S_,Xhe).replace(g4t,bQ).replace(gq,bQ)),n=t.map(s=>s.match(b4).map(Number)),r=n[0].map((s,i)=>n.map(c=>{if(!(i in c))throw Error('The arity of each "output" value must be equal');return c[i]})).map(s=>Fz({...e,output:s}));return s=>{const i=!zQ.test(t[0])&&t.find(l=>zQ.test(l))?.replace(b4,"");let c=0;return t[0].replace(b4,()=>`${r[c++](s)}${i||""}`).replace(M4t,O4t)}},Khe="react-spring: ",Yhe=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Khe}once requires a function parameter`);return(...o)=>{n||(t(...o),n=!0)}},y4t=Yhe(console.warn);function A4t(){y4t(`${Khe}The "interpolate" function is deprecated in v9 (use "to" instead)`)}Yhe(console.warn);function C_(e){return _t.str(e)&&(e[0]=="#"||/\d/.test(e)||!A7()&&S_.test(e)||e in(dd||{}))}var Zhe=A7()?x.useEffect:x.useLayoutEffect,v4t=()=>{const e=x.useRef(!1);return Zhe(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function x4t(){const e=x.useState()[1],t=v4t();return()=>{t.current&&e(Math.random())}}function w4t(e,t){const[n]=x.useState(()=>({inputs:t,result:e()})),o=x.useRef(),r=o.current;let s=r;return s?t&&s.inputs&&_4t(t,s.inputs)||(s={inputs:t,result:e()}):s=n,x.useEffect(()=>{o.current=s,r==n&&(n.inputs=n.result=void 0)},[s]),s.result}function _4t(e,t){if(e.length!==t.length)return!1;for(let n=0;nx.useEffect(e,S4t),S4t=[],Uz=Symbol.for("Animated:node"),C4t=e=>!!e&&e[Uz]===e,ec=e=>e&&e[Uz],w7=(e,t)=>Yvt(e,Uz,t),q_=e=>e&&e[Uz]&&e[Uz].getPayload(),Qhe=class{constructor(){w7(this,this)}getPayload(){return this.payload||[]}},kO=class extends Qhe{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,_t.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new kO(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return _t.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,_t.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Xz=class extends kO{constructor(e){super(0),this._string=null,this._toString=Fz({output:[e,e]})}static create(e){return new Xz(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(_t.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Fz({output:[this.getValue(),e]})),this._value=0,super.reset()}},jx={dependencies:null},R_=class extends Qhe{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Dl(this.source,(n,o)=>{C4t(n)?t[o]=n.getValue(e):zi(n)?t[o]=as(n):e||(t[o]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&qr(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Dl(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){jx.dependencies&&zi(e)&&jx.dependencies.add(e);const t=q_(e);t&&qr(t,n=>this.add(n))}},Jhe=class extends R_{constructor(e){super(e)}static create(e){return new Jhe(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,o)=>n.setValue(e[o])).some(Boolean):(super.setValue(e.map(q4t)),!0)}};function q4t(e){return(C_(e)?Xz:kO).create(e)}function CW(e){const t=ec(e);return t?t.constructor:_t.arr(e)?Jhe:C_(e)?Xz:kO}var OQ=(e,t)=>{const n=!_t.fun(e)||e.prototype&&e.prototype.isReactComponent;return x.forwardRef((o,r)=>{const s=x.useRef(null),i=n&&x.useCallback(h=>{s.current=E4t(r,h)},[r]),[c,l]=T4t(o,t),u=x4t(),d=()=>{const h=s.current;if(n&&!h)return;(h?t.applyAnimatedValues(h,c.getValue(!0)):!1)===!1&&u()},p=new R4t(d,l),f=x.useRef();Zhe(()=>(f.current=p,qr(l,h=>_O(h,p)),()=>{f.current&&(qr(f.current.deps,h=>Hz(h,f.current)),kn.cancel(f.current.update))})),x.useEffect(d,[]),k4t(()=>()=>{const h=f.current;qr(h.deps,g=>Hz(g,h))});const b=t.getComponentProps(c.getValue());return x.createElement(e,{...b,ref:i})})},R4t=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&kn.write(this.update)}};function T4t(e,t){const n=new Set;return jx.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new R_(e),jx.dependencies=null,[e,n]}function E4t(e,t){return e&&(_t.fun(e)?e(t):e.current=t),t}var yQ=Symbol.for("AnimatedComponent"),W4t=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=r=>new R_(r),getComponentProps:o=r=>r}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},s=i=>{const c=AQ(i)||"Anonymous";return _t.str(i)?i=s[i]||(s[i]=OQ(i,r)):i=i[yQ]||(i[yQ]=OQ(i,r)),i.displayName=`Animated(${c})`,i};return Dl(e,(i,c)=>{_t.arr(e)&&(c=AQ(i)),s[c]=s(i)}),{animated:s}},AQ=e=>_t.str(e)?e:e&&_t.str(e.displayName)?e.displayName:_t.fun(e)&&e.name||null;function Hp(e,...t){return _t.fun(e)?e(...t):e}var NM=(e,t)=>e===!0||!!(t&&e&&(_t.fun(e)?e(t):Ci(e).includes(t))),eme=(e,t)=>_t.obj(e)?t&&e[t]:e,tme=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,N4t=e=>e,nme=(e,t=N4t)=>{let n=B4t;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const s=t(e[r],r);_t.und(s)||(o[r]=s)}return o},B4t=["config","onProps","onStart","onChange","onPause","onResume","onRest"],L4t={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function P4t(e){const t={};let n=0;if(Dl(e,(o,r)=>{L4t[r]||(t[r]=o,n++)}),n)return t}function ome(e){const t=P4t(e);if(t){const n={to:t};return Dl(e,(o,r)=>r in t||(n[r]=o)),n}return{...e}}function Gz(e){return e=as(e),_t.arr(e)?e.map(Gz):C_(e)?Oa.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function qW(e){return _t.fun(e)||_t.arr(e)&&_t.obj(e[0])}var j4t={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},RW={...j4t.default,mass:1,damping:1,easing:b4t.linear,clamp:!1},I4t=class{constructor(){this.velocity=0,Object.assign(this,RW)}};function D4t(e,t,n){n&&(n={...n},vQ(n,t),t={...n,...t}),vQ(e,t),Object.assign(e,t);for(const i in RW)e[i]==null&&(e[i]=RW[i]);let{frequency:o,damping:r}=e;const{mass:s}=e;return _t.und(o)||(o<.01&&(o=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/o,2)*s,e.friction=4*Math.PI*r*s/o),e}function vQ(e,t){if(!_t.und(t.decay))e.duration=void 0;else{const n=!_t.und(t.tension)||!_t.und(t.friction);(n||!_t.und(t.frequency)||!_t.und(t.damping)||!_t.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var xQ=[],F4t=class{constructor(){this.changed=!1,this.values=xQ,this.toValues=null,this.fromValues=xQ,this.config=new I4t,this.immediate=!1}};function rme(e,{key:t,props:n,defaultProps:o,state:r,actions:s}){return new Promise((i,c)=>{let l,u,d=NM(n.cancel??o?.cancel,t);if(d)b();else{_t.und(n.pause)||(r.paused=NM(n.pause,t));let h=o?.pause;h!==!0&&(h=r.paused||NM(h,t)),l=Hp(n.delay||0,t),h?(r.resumeQueue.add(f),s.pause()):(s.resume(),f())}function p(){r.resumeQueue.add(f),r.timeouts.delete(u),u.cancel(),l=u.time-kn.now()}function f(){l>0&&!Oa.skipAnimation?(r.delayed=!0,u=kn.setTimeout(b,l),r.pauseQueue.add(p),r.timeouts.add(u)):b()}function b(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{s.start({...n,callId:e,cancel:d},i)}catch(h){c(h)}}})}var _7=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?$2(e.get()):t.every(n=>n.noop)?sme(e.get()):na(e.get(),t.every(n=>n.finished)),sme=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),na=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),$2=e=>({value:e,cancelled:!0,finished:!1});function ime(e,t,n,o){const{callId:r,parentId:s,onRest:i}=t,{asyncTo:c,promise:l}=n;return!s&&e===c&&!t.reset?l:n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const u=nme(t,(z,A)=>A==="onRest"?void 0:z);let d,p;const f=new Promise((z,A)=>(d=z,p=A)),b=z=>{const A=r<=(n.cancelId||0)&&$2(o)||r!==n.asyncId&&na(o,!1);if(A)throw z.result=A,p(z),z},h=(z,A)=>{const _=new wQ,v=new _Q;return(async()=>{if(Oa.skipAnimation)throw Kz(n),v.result=na(o,!1),p(v),v;b(_);const M=_t.obj(z)?{...z}:{...A,to:z};M.parentId=r,Dl(u,(k,S)=>{_t.und(M[S])&&(M[S]=k)});const y=await o.start(M);return b(_),n.paused&&await new Promise(k=>{n.resumeQueue.add(k)}),y})()};let g;if(Oa.skipAnimation)return Kz(n),na(o,!1);try{let z;_t.arr(e)?z=(async A=>{for(const _ of A)await h(_)})(e):z=Promise.resolve(e(h,o.stop.bind(o))),await Promise.all([z.then(d),f]),g=na(o.get(),!0,!1)}catch(z){if(z instanceof wQ)g=z.result;else if(z instanceof _Q)g=z.result;else throw z}finally{r==n.asyncId&&(n.asyncId=s,n.asyncTo=s?c:void 0,n.promise=s?l:void 0)}return _t.fun(i)&&kn.batchedUpdates(()=>{i(g,o,o.item)}),g})()}function Kz(e,t){EM(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var wQ=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},_Q=class extends Error{constructor(){super("SkipAnimationSignal")}},TW=e=>e instanceof k7,$4t=1,k7=class extends Hhe{constructor(){super(...arguments),this.id=$4t++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ec(this);return e&&e.getValue()}to(...e){return Oa.to(this,e)}interpolate(...e){return A4t(),Oa.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Vz(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||__.sort(this),Vz(this,{type:"priority",parent:this,priority:e})}},Tf=Symbol.for("SpringPhase"),ame=1,EW=2,WW=4,Mq=e=>(e[Tf]&ame)>0,Nu=e=>(e[Tf]&EW)>0,Pg=e=>(e[Tf]&WW)>0,kQ=(e,t)=>t?e[Tf]|=EW|ame:e[Tf]&=~EW,SQ=(e,t)=>t?e[Tf]|=WW:e[Tf]&=~WW,V4t=class extends k7{constructor(e,t){if(super(),this.animation=new F4t,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!_t.und(e)||!_t.und(t)){const n=_t.obj(e)?{...e}:{...t,from:e};_t.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Nu(this)||this._state.asyncTo)||Pg(this)}get goal(){return as(this.animation.to)}get velocity(){const e=ec(this);return e instanceof kO?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Mq(this)}get isAnimating(){return Nu(this)}get isPaused(){return Pg(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const o=this.animation;let{toValues:r}=o;const{config:s}=o,i=q_(o.to);!i&&zi(o.to)&&(r=Ci(as(o.to))),o.values.forEach((u,d)=>{if(u.done)return;const p=u.constructor==Xz?1:i?i[d].lastPosition:r[d];let f=o.immediate,b=p;if(!f){if(b=u.lastPosition,s.tension<=0){u.done=!0;return}let h=u.elapsedTime+=e;const g=o.fromValues[d],z=u.v0!=null?u.v0:u.v0=_t.arr(s.velocity)?s.velocity[d]:s.velocity;let A;const _=s.precision||(g==p?.005:Math.min(1,Math.abs(p-g)*.001));if(_t.und(s.duration))if(s.decay){const v=s.decay===!0?.998:s.decay,M=Math.exp(-(1-v)*h);b=g+z/(1-v)*(1-M),f=Math.abs(u.lastPosition-b)<=_,A=z*M}else{A=u.lastVelocity==null?z:u.lastVelocity;const v=s.restVelocity||_/10,M=s.clamp?0:s.bounce,y=!_t.und(M),k=g==p?u.v0>0:gv,!(!S&&(f=Math.abs(p-b)<=_,f)));++E){y&&(C=b==p||b>p==k,C&&(A=-A*M,b=p));const B=-s.tension*1e-6*(b-p),N=-s.friction*.001*A,j=(B+N)/s.mass;A=A+j*R,b=b+A*R}}else{let v=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,u.durationProgress>0&&(u.elapsedTime=s.duration*u.durationProgress,h=u.elapsedTime+=e)),v=(s.progress||0)+h/this._memoizedDuration,v=v>1?1:v<0?0:v,u.durationProgress=v),b=g+s.easing(v)*(p-g),A=(b-u.lastPosition)/e,f=v==1}u.lastVelocity=A,Number.isNaN(b)&&(console.warn("Got NaN while animating:",this),f=!0)}i&&!i[d].done&&(f=!1),f?u.done=!0:t=!1,u.setValue(b,s.round)&&(n=!0)});const c=ec(this),l=c.getValue();if(t){const u=as(o.to);(l!==u||n)&&!s.decay?(c.setValue(u),this._onChange(u)):n&&s.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return kn.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Nu(this)){const{to:e,config:t}=this.animation;kn.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return _t.und(e)?(n=this.queue||[],this.queue=[]):n=[_t.obj(e)?e:{...t,to:e}],Promise.all(n.map(o=>this._update(o))).then(o=>_7(this,o))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Kz(this._state,e&&this._lastCallId),kn.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=_t.obj(n)?n[t]:n,(n==null||qW(n))&&(n=void 0),o=_t.obj(o)?o[t]:o,o==null&&(o=void 0);const r={to:n,from:o};return Mq(this)||(e.reverse&&([n,o]=[o,n]),o=as(o),_t.und(o)?ec(this)||this._set(n):this._set(o)),r}_update({...e},t){const{key:n,defaultProps:o}=this;e.default&&Object.assign(o,nme(e,(i,c)=>/^on/.test(c)?eme(i,n):i)),qQ(this,e,"onProps"),Ig(this,"onProps",e,this);const r=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return rme(++this._lastCallId,{key:n,props:e,defaultProps:o,state:s,actions:{pause:()=>{Pg(this)||(SQ(this,!0),lM(s.pauseQueue),Ig(this,"onPause",na(this,jg(this,this.animation.to)),this))},resume:()=>{Pg(this)&&(SQ(this,!1),Nu(this)&&this._resume(),lM(s.resumeQueue),Ig(this,"onResume",na(this,jg(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then(i=>{if(e.loop&&i.finished&&!(t&&i.noop)){const c=cme(e);if(c)return this._update(c,!0)}return i})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n($2(this));const o=!_t.und(e.to),r=!_t.und(e.from);if(o||r)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n($2(this));const{key:s,defaultProps:i,animation:c}=this,{to:l,from:u}=c;let{to:d=l,from:p=u}=e;r&&!o&&(!t.default||_t.und(d))&&(d=p),t.reverse&&([d,p]=[p,d]);const f=!al(p,u);f&&(c.from=p),p=as(p);const b=!al(d,l);b&&this._focus(d);const h=qW(t.to),{config:g}=c,{decay:z,velocity:A}=g;(o||r)&&(g.velocity=0),t.config&&!h&&D4t(g,Hp(t.config,s),t.config!==i.config?Hp(i.config,s):void 0);let _=ec(this);if(!_||_t.und(d))return n(na(this,!0));const v=_t.und(t.reset)?r&&!t.default:!_t.und(p)&&NM(t.reset,s),M=v?p:this.get(),y=Gz(d),k=_t.num(y)||_t.arr(y)||C_(y),S=!h&&(!k||NM(i.immediate||t.immediate,s));if(b){const E=CW(d);if(E!==_.constructor)if(S)_=this._set(y);else throw Error(`Cannot animate between ${_.constructor.name} and ${E.name}, as the "to" prop suggests`)}const C=_.constructor;let R=zi(d),T=!1;if(!R){const E=v||!Mq(this)&&f;(b||E)&&(T=al(Gz(M),y),R=!T),(!al(c.immediate,S)&&!S||!al(g.decay,z)||!al(g.velocity,A))&&(R=!0)}if(T&&Nu(this)&&(c.changed&&!v?R=!0:R||this._stop(l)),!h&&((R||zi(l))&&(c.values=_.getPayload(),c.toValues=zi(d)?null:C==Xz?[1]:Ci(y)),c.immediate!=S&&(c.immediate=S,!S&&!v&&this._set(l)),R)){const{onRest:E}=c;qr(H4t,N=>qQ(this,t,N));const B=na(this,jg(this,l));lM(this._pendingCalls,B),this._pendingCalls.add(n),c.changed&&kn.batchedUpdates(()=>{c.changed=!v,E?.(B,this),v?Hp(i.onRest,B):c.onStart?.(B,this)})}v&&this._set(M),h?n(ime(t.to,t,this._state,this)):R?this._start():Nu(this)&&!b?this._pendingCalls.add(n):n(sme(M))}_focus(e){const t=this.animation;e!==t.to&&(MQ(this)&&this._detach(),t.to=e,MQ(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;zi(t)&&(_O(t,this),TW(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;zi(e)&&Hz(e,this)}_set(e,t=!0){const n=as(e);if(!_t.und(n)){const o=ec(this);if(!o||!al(n,o.getValue())){const r=CW(n);!o||o.constructor!=r?w7(this,r.create(n)):o.setValue(n),o&&kn.batchedUpdates(()=>{this._onChange(n,t)})}}return ec(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ig(this,"onStart",na(this,jg(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Hp(this.animation.onChange,e,this)),Hp(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ec(this).reset(as(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Nu(this)||(kQ(this,!0),Pg(this)||this._resume())}_resume(){Oa.skipAnimation?this.finish():__.start(this)}_stop(e,t){if(Nu(this)){kQ(this,!1);const n=this.animation;qr(n.values,r=>{r.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Vz(this,{type:"idle",parent:this});const o=t?$2(this.get()):na(this.get(),jg(this,e??n.to));lM(this._pendingCalls,o),n.changed&&(n.changed=!1,Ig(this,"onRest",o,this))}}};function jg(e,t){const n=Gz(t),o=Gz(e.get());return al(o,n)}function cme(e,t=e.loop,n=e.to){const o=Hp(t);if(o){const r=o!==!0&&ome(o),s=(r||e).reverse,i=!r||r.reset;return NW({...e,loop:t,default:!1,pause:void 0,to:!s||qW(n)?n:void 0,from:i?e.from:void 0,reset:i,...r})}}function NW(e){const{to:t,from:n}=e=ome(e),o=new Set;return _t.obj(t)&&CQ(t,o),_t.obj(n)&&CQ(n,o),e.keys=o.size?Array.from(o):null,e}function CQ(e,t){Dl(e,(n,o)=>n!=null&&t.add(o))}var H4t=["onStart","onRest","onChange","onPause","onResume"];function qQ(e,t,n){e.animation[n]=t[n]!==tme(t,n)?eme(t[n],e.key):void 0}function Ig(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var U4t=["onStart","onChange","onRest"],X4t=1,G4t=class{constructor(e,t){this.id=X4t++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];_t.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(NW(e)),this}start(e){let{queue:t}=this;return e?t=Ci(e).map(NW):this.queue=[],this._flush?this._flush(this,t):(ume(this,t),K4t(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;qr(Ci(t),o=>n[o].stop(!!e))}else Kz(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(_t.und(e))this.start({pause:!0});else{const t=this.springs;qr(Ci(e),n=>t[n].pause())}return this}resume(e){if(_t.und(e))this.start({pause:!1});else{const t=this.springs;qr(Ci(e),n=>t[n].resume())}return this}each(e){Dl(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,EM(e,([c,l])=>{l.value=this.get(),c(l,this,this._item)}));const s=!o&&this._started,i=r||s&&n.size?this.get():null;r&&t.size&&EM(t,([c,l])=>{l.value=i,c(l,this,this._item)}),s&&(this._started=!1,EM(n,([c,l])=>{l.value=i,c(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;kn.onFrame(this._onFrame)}};function K4t(e,t){return Promise.all(t.map(n=>lme(e,n))).then(n=>_7(e,n))}async function lme(e,t,n){const{keys:o,to:r,from:s,loop:i,onRest:c,onResolve:l}=t,u=_t.obj(t.default)&&t.default;i&&(t.loop=!1),r===!1&&(t.to=null),s===!1&&(t.from=null);const d=_t.arr(r)||_t.fun(r)?r:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):qr(U4t,g=>{const z=t[g];if(_t.fun(z)){const A=e._events[g];t[g]=({finished:_,cancelled:v})=>{const M=A.get(z);M?(_||(M.finished=!1),v&&(M.cancelled=!0)):A.set(z,{value:null,finished:_||!1,cancelled:v||!1})},u&&(u[g]=t[g])}});const p=e._state;t.pause===!p.paused?(p.paused=t.pause,lM(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const f=(o||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),b=t.cancel===!0||tme(t,"cancel")===!0;(d||b&&p.asyncId)&&f.push(rme(++e._lastAsyncId,{props:t,state:p,actions:{pause:kW,resume:kW,start(g,z){b?(Kz(p,e._lastAsyncId),z($2(e))):(g.onRest=c,z(ime(d,g,p,e)))}}})),p.paused&&await new Promise(g=>{p.resumeQueue.add(g)});const h=_7(e,await Promise.all(f));if(i&&h.finished&&!(n&&h.noop)){const g=cme(t,i,r);if(g)return ume(e,[g]),lme(e,g,!0)}return l&&kn.batchedUpdates(()=>l(h,e,e.item)),h}function Y4t(e,t){const n=new V4t;return n.key=e,t&&_O(n,t),n}function Z4t(e,t,n){t.keys&&qr(t.keys,o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)})}function ume(e,t){qr(t,n=>{Z4t(e.springs,n,o=>Y4t(o,e))})}var S7=({children:e,...t})=>{const n=x.useContext(Ix),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=w4t(()=>({pause:o,immediate:r}),[o,r]);const{Provider:s}=Ix;return x.createElement(s,{value:t},e)},Ix=Q4t(S7,{});S7.Provider=Ix.Provider;S7.Consumer=Ix.Consumer;function Q4t(e,t){return Object.assign(e,x.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var J4t=class extends k7{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Fz(...t);const n=this._get(),o=CW(n);w7(this,o.create(n))}advance(e){const t=this._get(),n=this.get();al(t,n)||(ec(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&RQ(this._active)&&zq(this)}_get(){const e=_t.arr(this.source)?this.source.map(as):Ci(as(this.source));return this.calc(...e)}_start(){this.idle&&!RQ(this._active)&&(this.idle=!1,qr(q_(this),e=>{e.done=!1}),Oa.skipAnimation?(kn.batchedUpdates(()=>this.advance()),zq(this)):__.start(this))}_attach(){let e=1;qr(Ci(this.source),t=>{zi(t)&&_O(t,this),TW(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){qr(Ci(this.source),e=>{zi(e)&&Hz(e,this)}),this._active.clear(),zq(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Ci(this.source).reduce((t,n)=>Math.max(t,(TW(n)?n.priority:0)+1),0))}};function ext(e){return e.idle!==!1}function RQ(e){return!e.size||Array.from(e).every(ext)}function zq(e){e.idle||(e.idle=!0,qr(q_(e),t=>{t.done=!0}),Vz(e,{type:"idle",parent:e}))}Oa.assign({createStringInterpolator:Ghe,to:(e,t)=>new J4t(e,t)});var dme=/^--/;function txt(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!dme.test(e)&&!(BM.hasOwnProperty(e)&&BM[e])?t+"px":(""+t).trim()}var TQ={};function nxt(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:o,style:r,children:s,scrollTop:i,scrollLeft:c,viewBox:l,...u}=t,d=Object.values(u),p=Object.keys(u).map(f=>n||e.hasAttribute(f)?f:TQ[f]||(TQ[f]=f.replace(/([A-Z])/g,b=>"-"+b.toLowerCase())));s!==void 0&&(e.textContent=s);for(const f in r)if(r.hasOwnProperty(f)){const b=txt(f,r[f]);dme.test(f)?e.style.setProperty(f,b):e.style[f]=b}p.forEach((f,b)=>{e.setAttribute(f,d[b])}),o!==void 0&&(e.className=o),i!==void 0&&(e.scrollTop=i),c!==void 0&&(e.scrollLeft=c),l!==void 0&&e.setAttribute("viewBox",l)}var BM={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oxt=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),rxt=["Webkit","Ms","Moz","O"];BM=Object.keys(BM).reduce((e,t)=>(rxt.forEach(n=>e[oxt(n,t)]=e[t]),e),BM);var sxt=/^(matrix|translate|scale|rotate|skew)/,ixt=/^(translate)/,axt=/^(rotate|skew)/,Oq=(e,t)=>_t.num(e)&&e!==0?e+t:e,h4=(e,t)=>_t.arr(e)?e.every(n=>h4(n,t)):_t.num(e)?e===t:parseFloat(e)===t,cxt=class extends R_{constructor({x:e,y:t,z:n,...o}){const r=[],s=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),s.push(i=>[`translate3d(${i.map(c=>Oq(c,"px")).join(",")})`,h4(i,0)])),Dl(o,(i,c)=>{if(c==="transform")r.push([i||""]),s.push(l=>[l,l===""]);else if(sxt.test(c)){if(delete o[c],_t.und(i))return;const l=ixt.test(c)?"px":axt.test(c)?"deg":"";r.push(Ci(i)),s.push(c==="rotate3d"?([u,d,p,f])=>[`rotate3d(${u},${d},${p},${Oq(f,l)})`,h4(f,0)]:u=>[`${c}(${u.map(d=>Oq(d,l)).join(",")})`,h4(u,c.startsWith("scale")?1:0)])}}),r.length&&(o.transform=new lxt(r,s)),super(o)}},lxt=class extends Hhe{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return qr(this.inputs,(n,o)=>{const r=as(n[0]),[s,i]=this.transforms[o](_t.arr(r)?r:n.map(as));e+=" "+s,t=t&&i}),t?"none":e}observerAdded(e){e==1&&qr(this.inputs,t=>qr(t,n=>zi(n)&&_O(n,this)))}observerRemoved(e){e==0&&qr(this.inputs,t=>qr(t,n=>zi(n)&&Hz(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Vz(this,e)}},uxt=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Oa.assign({batchedUpdates:hs.unstable_batchedUpdates,createStringInterpolator:Ghe,colors:t4t});var dxt=W4t(uxt,{applyAnimatedValues:nxt,createAnimatedStyle:e=>new cxt(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),pxt=dxt.animated;const fxt=200;function EQ(e){return{top:e.offsetTop,left:e.offsetLeft}}function pme({triggerAnimationOnChange:e,clientId:t}){const n=x.useRef(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:s,isFirstMultiSelectedBlock:i,isBlockMultiSelected:c,isAncestorMultiSelected:l,isDraggingBlocks:u}=G(Q),{previous:d,prevRect:p}=x.useMemo(()=>({previous:n.current&&EQ(n.current),prevRect:n.current&&n.current.getBoundingClientRect()}),[e]);return x.useLayoutEffect(()=>{if(!d||!n.current)return;const f=ps(n.current),b=s(t),h=b||i(t),g=u();function z(){if(!g&&h&&p){const R=n.current.getBoundingClientRect().top-p.top;R&&(f.scrollTop+=R)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>fxt){z();return}const _=b||c(t)||l(t);if(_&&g)return;const v=_?"1":"",M=new G4t({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:C}){if(!n.current)return;let{x:R,y:T}=C;R=Math.round(R),T=Math.round(T);const E=R===0&&T===0;n.current.style.transformOrigin="center center",n.current.style.transform=E?null:`translate3d(${R}px,${T}px,0)`,n.current.style.zIndex=v,z()}});n.current.style.transform=void 0;const y=EQ(n.current),k=Math.round(d.left-y.left),S=Math.round(d.top-y.top);return M.start({x:0,y:0,from:{x:k,y:S}}),()=>{M.stop(),M.set({x:0,y:0})}},[d,p,t,o,r,s,i,c,l,u]),n}const Dx=".block-editor-block-list__block",bxt=".block-list-appender",hxt=".block-editor-button-block-appender";function fme(e,t){return e.closest(Dx)===t.closest(Dx)}function LM(e,t){return t.closest([Dx,bxt,hxt].join(","))===e}function PM(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const n=e.closest(Dx);if(n)return n.id.slice(6)}function bme(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),s=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,s,o-n,r-s)}function mxt(e){const t=e.ownerDocument.defaultView;if(!t||e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(n.width===0||n.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return!(o.display==="none"||o.visibility==="hidden"||o.opacity==="0")}function gxt(e){const t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}const Mxt=["core/navigation"];function m4(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=e.getAttribute("data-type");if(o&&Mxt.includes(o)){const i=[e];let c;for(;c=i.pop();)if(!gxt(c)){for(const l of c.children)if(mxt(l)){const u=l.getBoundingClientRect();n=bme(n,u),i.push(l)}}}const r=Math.max(n.left,0),s=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(r,n.top,s-r,n.height),n}function zxt({clientId:e,initialPosition:t}){const n=x.useRef(),{isBlockSelected:o,isMultiSelecting:r,isZoomOut:s}=ct(G(Q));return x.useEffect(()=>{if(!o(e)||r()||s()||t==null||!n.current)return;const{ownerDocument:i}=n.current;if(LM(n.current,i.activeElement))return;const c=Xr.tabbable.find(n.current).filter(d=>md(d)),l=t===-1,u=c[l?c.length-1:0]||n.current;if(!LM(n.current,u)){n.current.focus();return}if(!n.current.getAttribute("contenteditable")){const d=Xr.tabbable.findNext(n.current);if(d&&LM(n.current,d)&&u0e(d)){d.focus();return}}m0e(u,l)},[t,e]),n}function Oxt({clientId:e}){const{hoverBlock:t}=Oe(Q);function n(o){if(o.defaultPrevented)return;const r=o.type==="mouseover"?"add":"remove";o.preventDefault(),o.currentTarget.classList[r]("is-hovered"),t(r==="add"?e:null)}return Mn(o=>(o.addEventListener("mouseout",n),o.addEventListener("mouseover",n),()=>{o.removeEventListener("mouseout",n),o.removeEventListener("mouseover",n),o.classList.remove("is-hovered"),t(null)}),[])}function yxt(e){const{isBlockSelected:t}=G(Q),{selectBlock:n,selectionChange:o}=Oe(Q);return Mn(r=>{function s(i){if(!r.parentElement.closest('[contenteditable="true"]')){if(t(e)){i.target.isContentEditable||o(e);return}LM(r,i.target)&&n(e)}}return r.addEventListener("focusin",s),()=>{r.removeEventListener("focusin",s)}},[t,n])}function C7({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&m("Pattern");return a.jsx("div",{className:"block-editor-block-draggable-chip-wrapper",children:a.jsx("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:a.jsxs(Yo,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[a.jsx(Tn,{children:t?a.jsx(Zn,{icon:t}):r||xe(Dn("%d block","%d blocks",e),e)}),a.jsx(Tn,{children:a.jsx(Zn,{icon:nde})}),o&&a.jsx(Tn,{className:"block-editor-block-draggable-chip__disabled",children:a.jsx("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}function Axt({clientId:e,isSelected:t}){const{getBlockType:n}=G(kt),{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:s,getBlockName:i}=ct(G(Q)),{insertAfterBlock:c,removeBlock:l,resetZoomLevel:u,startDraggingBlocks:d,stopDraggingBlocks:p}=ct(Oe(Q));return Mn(f=>{if(!t)return;function b(g){const{keyCode:z,target:A}=g;z!==Gr&&z!==Mc&&z!==zl||A!==f||md(A)||(g.preventDefault(),z===Gr&&r()?u():z===Gr?c(e):l(e))}function h(g){if(f!==g.target||f.isContentEditable||f.ownerDocument.activeElement!==f||s()){g.preventDefault();return}const z=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});g.dataTransfer.effectAllowed="move",g.dataTransfer.clearData(),g.dataTransfer.setData("wp-blocks",z);const{ownerDocument:A}=f,{defaultView:_}=A;_.getSelection().removeAllRanges();const M=document.createElement("div");Nre.createRoot(M).render(a.jsx(C7,{icon:n(i(e)).icon})),document.body.appendChild(M),M.style.position="absolute",M.style.top="0",M.style.left="0",M.style.zIndex="1000",M.style.pointerEvents="none";const k=A.createElement("div");k.style.width="1px",k.style.height="1px",k.style.position="fixed",k.style.visibility="hidden",A.body.appendChild(k),g.dataTransfer.setDragImage(k,0,0);let S={x:0,y:0};if(document!==A){const T=_.frameElement;if(T){const E=T.getBoundingClientRect();S={x:E.left,y:E.top}}}S.x-=58;function C(T){M.style.transform=`translate( ${T.clientX+S.x}px, ${T.clientY+S.y}px )`}C(g);function R(){A.removeEventListener("dragover",C),A.removeEventListener("dragend",R),M.remove(),k.remove(),p(),document.body.classList.remove("is-dragging-components-draggable"),A.documentElement.classList.remove("is-dragging")}A.addEventListener("dragover",C),A.addEventListener("dragend",R),A.addEventListener("drop",R),d([e]),document.body.classList.add("is-dragging-components-draggable"),A.documentElement.classList.add("is-dragging")}return f.addEventListener("keydown",b),f.addEventListener("dragstart",h),()=>{f.removeEventListener("keydown",b),f.removeEventListener("dragstart",h)}},[e,t,o,c,l,r,u,s,d,p])}function vxt(){const e=x.useContext(Wge);return Mn(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}function xxt({isSelected:e}){const t=$1();return Mn(n=>{if(e){const{ownerDocument:o}=n,{defaultView:r}=o;if(!r.IntersectionObserver)return;const s=new r.IntersectionObserver(i=>{i[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),s.disconnect()});return s.observe(n),()=>{s.disconnect()}}},[e])}function hme({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=ct(G(Q));return Mn(o=>{if(!t)return;const r=()=>{n(e).forEach(({clientId:i})=>{const c=o.querySelector(`[data-block="${i}"]`);c&&(c.classList.remove("has-editable-outline"),c.offsetWidth,c.classList.add("has-editable-outline"))})},s=i=>{(i.target===o||i.target.classList.contains("is-root-container"))&&(i.defaultPrevented||(i.preventDefault(),r()))};return o.addEventListener("click",s),()=>o.removeEventListener("click",s)},[t])}const Yz=new Map;function wxt(e,t){let n=Yz.get(e);n||(n=new Set,Yz.set(e,n),e.addEventListener("pointerdown",gme)),n.add(t)}function _xt(e,t){const n=Yz.get(e);n&&(n.delete(t),mme(t),n.size===0&&(Yz.delete(e),e.removeEventListener("pointerdown",gme)))}function mme(e){const t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function gme(e){const{target:t}=e,{ownerDocument:n,isContentEditable:o}=t,r=Yz.get(n);if(o)for(const s of r)s.getAttribute("draggable")==="true"&&s.contains(t)&&(s.removeAttribute("draggable"),s.setAttribute("data-draggable","true"));else for(const s of r)mme(s)}function kxt(){return Mn(e=>(wxt(e.ownerDocument,e),()=>{_xt(e.ownerDocument,e)}),[])}function Be(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:s,index:i,mode:c,name:l,blockApiVersion:u,blockTitle:d,isSelected:p,isSubtreeDisabled:f,hasOverlay:b,initialPosition:h,blockEditingMode:g,isHighlighted:z,isMultiSelected:A,isPartiallySelected:_,isReusable:v,isDragging:M,hasChildSelected:y,isEditingDisabled:k,hasEditableOutline:S,isTemporarilyEditingAsBlocks:C,defaultClassName:R,isSectionBlock:T,canMove:E}=x.useContext(Pz),B=xe(m("Block: %s"),d),N=c==="html"&&!t?"-visual":"",j=kxt(),I=xn([e.ref,zxt({clientId:n,initialPosition:h}),wvt(n),yxt(n),Axt({clientId:n,isSelected:p}),Oxt({clientId:n}),vxt(),pme({triggerAnimationOnChange:i,clientId:n}),HN({isDisabled:!b}),hme({clientId:n,isEnabled:T}),xxt({isSelected:p}),E?j:void 0]),P=j0(),F=!!P[ZB]&&l7(l)?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};u<2&&n===P.clientId&&globalThis.SCRIPT_DEBUG===!0&&zn(`Block type "${l}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let X=!1;return(r?.style?.marginTop?.charAt(0)==="-"||r?.style?.marginBottom?.charAt(0)==="-"||r?.style?.marginLeft?.charAt(0)==="-"||r?.style?.marginRight?.charAt(0)==="-")&&(X=!0),{tabIndex:g==="disabled"?-1:0,draggable:E&&!y?!0:void 0,...r,...e,ref:I,id:`block-${n}${N}`,role:"document","aria-label":B,"data-block":n,"data-type":l,"data-title":d,inert:f?"true":void 0,className:oe("block-editor-block-list__block",{"wp-block":!s,"has-block-overlay":b,"is-selected":p,"is-highlighted":z,"is-multi-selected":A,"is-partially-selected":_,"is-reusable":v,"is-dragging":M,"has-child-selected":y,"is-editing-disabled":k,"has-editable-outline":S,"has-negative-margin":X,"is-content-locked-temporarily-editing-as-blocks":C},o,e.className,r.className,R),style:{...r.style,...e.style,...F}}}Be.save=Z4;function Sxt(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=oe(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}function ev({children:e,isHtml:t,...n}){return a.jsx("div",{...Be(n,{__unstableIsHtml:t}),children:e})}function BW({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:s,isSelectionEnabled:i,className:c,__unstableLayoutClassNames:l,name:u,isValid:d,attributes:p,wrapperProps:f,setAttributes:b,onReplace:h,onRemove:g,onInsertBlocksAfter:z,onMerge:A,toggleSelection:_}){var v;const{mayDisplayControls:M,mayDisplayParentControls:y,themeSupportsLayout:k,...S}=x.useContext(Pz),C=x_()||{};let R=a.jsx(byt,{name:u,isSelected:s,attributes:p,setAttributes:b,insertBlocksAfter:n?void 0:z,onReplace:o?h:void 0,onRemove:o?g:void 0,mergeBlocks:o?A:void 0,clientId:r,isSelectionEnabled:i,toggleSelection:_,__unstableLayoutClassNames:l,__unstableParentLayout:Object.keys(C).length?C:void 0,mayDisplayControls:M,mayDisplayParentControls:y,blockEditingMode:S.blockEditingMode,isPreviewMode:S.isPreviewMode});const T=on(u);T?.getEditWrapperProps&&(f=Sxt(f,T.getEditWrapperProps(p)));const E=f&&!!f["data-align"]&&!k,B=c?.includes("is-position-sticky");E&&(R=a.jsx("div",{className:oe("wp-block",B&&c),"data-align":f["data-align"],children:R}));let N;if(d)t==="html"?N=a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{display:"none"},children:R}),a.jsx(ev,{isHtml:!0,children:a.jsx(Uvt,{clientId:r})})]}):T?.apiVersion>1?N=R:N=a.jsx(ev,{children:R});else{const $=e?ez(e):Gf(T,p);N=a.jsxs(ev,{className:"has-warning",children:[a.jsx(Tvt,{clientId:r}),a.jsx(i0,{children:C5($)})]})}const{"data-align":j,...I}=(v=f)!==null&&v!==void 0?v:{},P={...I,className:oe(I.className,j&&k&&`align${j}`,!(j&&B)&&c)};return a.jsx(Pz.Provider,{value:{wrapperProps:P,isAligned:E,...S},children:a.jsx(Nvt,{fallback:a.jsx(ev,{className:"has-warning",children:a.jsx(Wvt,{})}),children:N})})}const Cxt=Ff((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:s,replaceBlocks:i,toggleSelection:c,__unstableMarkLastChangeAsPersistent:l,moveBlocksToPosition:u,removeBlock:d,selectBlock:p}=e(Q);return{setAttributes(f){const{getMultiSelectedBlockClientIds:b}=n.select(Q),h=b(),{clientId:g}=t,z=h.length?h:[g];o(z,f)},onInsertBlocks(f,b){const{rootClientId:h}=t;r(f,b,h)},onInsertBlocksAfter(f){const{clientId:b,rootClientId:h}=t,{getBlockIndex:g}=n.select(Q),z=g(b);r(f,z+1,h)},onMerge(f){const{clientId:b,rootClientId:h}=t,{getPreviousBlockClientId:g,getNextBlockClientId:z,getBlock:A,getBlockAttributes:_,getBlockName:v,getBlockOrder:M,getBlockIndex:y,getBlockRootClientId:k,canInsertBlockType:S}=n.select(Q);function C(){const T=A(b),E=Mr(),B=on(E);if(v(b)!==E){const N=Kr(T,E);N&&N.length&&i(b,N)}else if(El(T)){const N=z(b);N&&n.batch(()=>{d(b),p(N)})}else if(B.merge){const N=B.merge({},T.attributes);i([b],[Ee(E,N)])}}function R(T,E=!0){const B=v(T),j=on(B).category==="text",I=k(T),P=M(T),[$]=P;P.length===1&&E2(A($))?d(T):j?n.batch(()=>{if(S(v($),I))u([$],T,I,y(T));else{const F=Kr(A($),Mr());F&&F.length&&F.every(X=>S(X.name,I))?(r(F,y(T),I,E),d($,!1)):C()}!M(T).length&&E2(A(T))&&d(T,!1)}):C()}if(f){if(h){const E=z(h);if(E)if(v(h)===v(E)){const B=_(h),N=_(E);if(Object.keys(B).every(j=>B[j]===N[j])){n.batch(()=>{u(M(E),E,h),d(E,!1)});return}}else{s(h,E);return}}const T=z(b);if(!T)return;M(T).length?R(T,!1):s(b,T)}else{const T=g(b);if(T)s(T,b);else if(h){const E=g(h);if(E&&v(h)===v(E)){const B=_(h),N=_(E);if(Object.keys(B).every(j=>B[j]===N[j])){n.batch(()=>{u(M(h),h,E),d(h,!1)});return}}R(h)}else C()}},onReplace(f,b,h){f.length&&!El(f[f.length-1])&&l();const g=f?.length===1&&Array.isArray(f[0])?f[0]:f;i([t.clientId],g,b,h)},onRemove(){d(t.clientId)},toggleSelection(f){c(f)}}});BW=Co(Cxt,ap("editor.BlockListBlock"))(BW);function qxt(e){const{clientId:t,rootClientId:n}=e,o=G(J=>{const{isBlockSelected:ue,getBlockMode:ce,isSelectionEnabled:me,getTemplateLock:de,isSectionBlock:Ae,getBlockWithoutAttributes:ye,getBlockAttributes:Ne,canRemoveBlock:je,canMoveBlock:ie,getSettings:we,getTemporarilyEditingAsBlocks:re,getBlockEditingMode:pe,getBlockName:ke,isFirstMultiSelectedBlock:Se,getMultiSelectedBlockClientIds:se,hasSelectedInnerBlock:L,getBlocksByName:U,getBlockIndex:ne,isBlockMultiSelected:ve,isBlockSubtreeDisabled:qe,isBlockHighlighted:Pe,__unstableIsFullySelected:rt,__unstableSelectionHasUnmergeableBlock:qt,isBlockBeingDragged:wt,isDragging:Bt,__unstableHasActiveBlockOverlayActive:ae,getSelectedBlocksInitialCaretPosition:H}=ct(J(Q)),Y=ye(t);if(!Y)return;const{hasBlockSupport:fe,getActiveBlockVariation:Re}=J(kt),be=Ne(t),{name:ze,isValid:nt}=Y,Mt=on(ze),{supportsLayout:ot,isPreviewMode:Ue}=we(),yt=Mt?.apiVersion>1,fn={isPreviewMode:Ue,blockWithoutAttributes:Y,name:ze,attributes:be,isValid:nt,themeSupportsLayout:ot,index:ne(t),isReusable:Qd(Mt),className:yt?be.className:void 0,defaultClassName:yt?Y4(ze):void 0,blockTitle:Mt?.title};if(Ue)return fn;const Ln=ue(t),Mo=je(t),rr=ie(t),Jo=Re(ze,be),To=ve(t),Rt=L(t,!0),Qe=pe(t),Gt=Et(ze,"multiple",!0)?[]:U(ze),On=Gt.length&&Gt[0]!==t;return{...fn,mode:ce(t),isSelectionEnabled:me(),isLocked:!!de(n),isSectionBlock:Ae(t),canRemove:Mo,canMove:rr,isSelected:Ln,isTemporarilyEditingAsBlocks:re()===t,blockEditingMode:Qe,mayDisplayControls:Ln||Se(t)&&se().every($n=>ke($n)===ze),mayDisplayParentControls:fe(ke(t),"__experimentalExposeControlsToChildren",!1)&&L(t),blockApiVersion:Mt?.apiVersion||1,blockTitle:Jo?.title||Mt?.title,isSubtreeDisabled:Qe==="disabled"&&qe(t),hasOverlay:ae(t)&&!Bt(),initialPosition:Ln?H():void 0,isHighlighted:Pe(t),isMultiSelected:To,isPartiallySelected:To&&!rt()&&!qt(),isDragging:wt(t),hasChildSelected:Rt,isEditingDisabled:Qe==="disabled",hasEditableOutline:Qe!=="disabled"&&pe(n)==="disabled",originalBlockClientId:On?Gt[0]:!1}},[t,n]),{isPreviewMode:r,mode:s="visual",isSelectionEnabled:i=!1,isLocked:c=!1,canRemove:l=!1,canMove:u=!1,blockWithoutAttributes:d,name:p,attributes:f,isValid:b,isSelected:h=!1,themeSupportsLayout:g,isTemporarilyEditingAsBlocks:z,blockEditingMode:A,mayDisplayControls:_,mayDisplayParentControls:v,index:M,blockApiVersion:y,blockTitle:k,isSubtreeDisabled:S,hasOverlay:C,initialPosition:R,isHighlighted:T,isMultiSelected:E,isPartiallySelected:B,isReusable:N,isDragging:j,hasChildSelected:I,isSectionBlock:P,isEditingDisabled:$,hasEditableOutline:F,className:X,defaultClassName:Z,originalBlockClientId:V}=o,ee=x.useMemo(()=>({...d,attributes:f}),[d,f]);if(!o)return null;const te={isPreviewMode:r,clientId:t,className:X,index:M,mode:s,name:p,blockApiVersion:y,blockTitle:k,isSelected:h,isSubtreeDisabled:S,hasOverlay:C,initialPosition:R,blockEditingMode:A,isHighlighted:T,isMultiSelected:E,isPartiallySelected:B,isReusable:N,isDragging:j,hasChildSelected:I,isSectionBlock:P,isEditingDisabled:$,hasEditableOutline:F,isTemporarilyEditingAsBlocks:z,defaultClassName:Z,mayDisplayControls:_,mayDisplayParentControls:v,originalBlockClientId:V,themeSupportsLayout:g,canMove:u};return a.jsx(Pz.Provider,{value:te,children:a.jsx(BW,{...e,mode:s,isSelectionEnabled:i,isLocked:c,canRemove:l,canMove:u,block:ee,name:p,attributes:f,isValid:b,isSelected:h})})}const Rxt=x.memo(qxt),WQ=[cr(m("While writing, you can press / to quickly insert new blocks."),{kbd:a.jsx("kbd",{})}),cr(m("Indent a list by pressing space at the beginning of a line."),{kbd:a.jsx("kbd",{})}),cr(m("Outdent a list by pressing backspace at the beginning of a line."),{kbd:a.jsx("kbd",{})}),m("Drag files into the editor to automatically insert media blocks."),m("Change a block's type by pressing the block icon on the toolbar.")];function Txt(){const[e]=x.useState(Math.floor(Math.random()*WQ.length));return a.jsx(rht,{children:WQ[e]})}const{Badge:Ext}=ct(tr);function Mme({title:e,icon:t,description:n,blockType:o,className:r,name:s}){o&&(Ke("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:n}=o);const{parentNavBlockClientId:i}=G(l=>{const{getSelectedBlockClientId:u,getBlockParentsByBlockName:d}=l(Q),p=u();return{parentNavBlockClientId:d(p,"core/navigation",!0)[0]}},[]),{selectBlock:c}=Oe(Q);return a.jsxs("div",{className:oe("block-editor-block-card",r),children:[i&&a.jsx(Ce,{onClick:()=>c(i),label:m("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:jt()?ma:Ll,size:"small"}),a.jsx(Zn,{icon:t,showColors:!0}),a.jsxs(dt,{spacing:1,children:[a.jsxs("h2",{className:"block-editor-block-card__title",children:[a.jsx("span",{className:"block-editor-block-card__name",children:s?.length?s:e}),!!s?.length&&a.jsx(Ext,{children:e})]}),n&&a.jsx(Sn,{className:"block-editor-block-card__description",children:n})]})]})}let _r=function(e){return e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateSettings="UPDATE_SETTINGS",e}({}),zme=function(e){return e.Processing="PROCESSING",e.Paused="PAUSED",e}({}),Zz=function(e){return e.Prepare="PREPARE",e.Upload="UPLOAD",e}({});const Wxt=()=>{},Nxt={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:Wxt}};function Ome(e=Nxt,t={type:_r.Unknown}){switch(t.type){case _r.PauseQueue:return{...e,queueStatus:"paused"};case _r.ResumeQueue:return{...e,queueStatus:"active"};case _r.Add:return{...e,queue:[...e.queue,t.item]};case _r.Cancel:return{...e,queue:e.queue.map(n=>n.id===t.id?{...n,error:t.error}:n)};case _r.Remove:return{...e,queue:e.queue.filter(n=>n.id!==t.id)};case _r.OperationStart:return{...e,queue:e.queue.map(n=>n.id===t.id?{...n,currentOperation:t.operation}:n)};case _r.AddOperations:return{...e,queue:e.queue.map(n=>n.id!==t.id?n:{...n,operations:[...n.operations||[],...t.operations]})};case _r.OperationFinish:return{...e,queue:e.queue.map(n=>{if(n.id!==t.id)return n;const o=n.operations?n.operations.slice(1):[],r=n.attachment||t.item.attachment?{...n.attachment,...t.item.attachment}:void 0;return{...n,currentOperation:void 0,operations:o,...t.item,attachment:r,additionalData:{...n.additionalData,...t.item.additionalData}}})};case _r.CacheBlobUrl:{const n=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...n,t.blobUrl]}}}case _r.RevokeBlobUrls:{const n={...e.blobUrls};return delete n[t.id],{...e,blobUrls:n}}case _r.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e}function Bxt(e){return e.queue}function Lxt(e){return e.queue.length>=1}function Pxt(e,t){return e.queue.some(n=>n.attachment?.url===t||n.sourceUrl===t)}function jxt(e,t){return e.queue.some(n=>n.attachment?.id===t||n.sourceAttachmentId===t)}function Ixt(e){return e.settings}const yme=Object.freeze(Object.defineProperty({__proto__:null,getItems:Bxt,getSettings:Ixt,isUploading:Lxt,isUploadingById:jxt,isUploadingByUrl:Pxt},Symbol.toStringTag,{value:"Module"}));function Dxt(e){return e.queue}function Fxt(e,t){return e.queue.find(n=>n.id===t)}function $xt(e,t){return e.queue.filter(o=>t===o.batchId).length===0}function Vxt(e,t){return e.queue.some(n=>n.currentOperation===Zz.Upload&&n.additionalData.post===t)}function Hxt(e,t){return e.queue.find(n=>n.status===zme.Paused&&n.additionalData.post===t)}function Uxt(e){return e.queueStatus==="paused"}function Xxt(e,t){return e.blobUrls[t]||[]}const Gxt=Object.freeze(Object.defineProperty({__proto__:null,getAllItems:Dxt,getBlobUrls:Xxt,getItem:Fxt,getPausedUploadForPost:Hxt,isBatchUploaded:$xt,isPaused:Uxt,isUploadingToPost:Vxt},Symbol.toStringTag,{value:"Module"}));let Fx=class extends Error{constructor({code:t,message:n,file:o,cause:r}){super(n,{cause:r}),Object.setPrototypeOf(this,new.target.prototype),this.code=t,this.file=o}};function Kxt(e,t){if(!t)return;const n=t.some(o=>o.includes("/")?o===e.type:e.type.startsWith(`${o}/`));if(e.type&&!n)throw new Fx({code:"MIME_TYPE_NOT_SUPPORTED",message:xe(m("%s: Sorry, this file type is not supported here."),e.name),file:e})}function Yxt(e){return e?Object.entries(e).flatMap(([t,n])=>{const[o]=n.split("/"),r=t.split("|");return[n,...r.map(s=>`${o}/${s}`)]}):null}function Zxt(e,t){const n=Yxt(t);if(!n)return;const o=n.includes(e.type);if(e.type&&!o)throw new Fx({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:xe(m("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}function Qxt(e,t){if(e.size<=0)throw new Fx({code:"EMPTY_FILE",message:xe(m("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new Fx({code:"SIZE_ABOVE_LIMIT",message:xe(m("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Jxt({files:e,onChange:t,onSuccess:n,onError:o,onBatchSuccess:r,additionalData:s,allowedTypes:i}){return async({select:c,dispatch:l})=>{const u=Is();for(const d of e){try{Kxt(d,i),Zxt(d,c.getSettings().allowedMimeTypes)}catch(p){o?.(p);continue}try{Qxt(d,c.getSettings().maxUploadFileSize)}catch(p){o?.(p);continue}l.addItem({file:d,batchId:u,onChange:t,onSuccess:n,onBatchSuccess:r,onError:o,additionalData:s})}}}function e5t(e,t,n=!1){return async({select:o,dispatch:r})=>{const s=o.getItem(e);if(s){if(s.abortController?.abort(),!n){const{onError:i}=s;i?.(t??new Error("Upload cancelled")),!i&&t&&console.error("Upload cancelled",t)}r({type:_r.Cancel,id:e,error:t}),r.removeItem(e),r.revokeBlobUrls(e),s.batchId&&o.isBatchUploaded(s.batchId)&&s.onBatchSuccess?.()}}}const Ame=Object.freeze(Object.defineProperty({__proto__:null,addItems:Jxt,cancelItem:e5t},Symbol.toStringTag,{value:"Module"}));function t5t(e){if(e instanceof File)return e;const t=e.type.split("/")[1],n=e.type==="application/pdf"?"document":e.type.split("/")[0];return new File([e],`${n}.${t}`,{type:e.type})}function n5t(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}function o5t(e){return n5t(e,e.name)}class r5t extends File{constructor(t="stub-file"){super([],t)}}function s5t({file:e,batchId:t,onChange:n,onSuccess:o,onBatchSuccess:r,onError:s,additionalData:i={},sourceUrl:c,sourceAttachmentId:l,abortController:u,operations:d}){return async({dispatch:p})=>{const f=Is(),b=t5t(e);let h;b instanceof r5t||(h=ls(b),p({type:_r.CacheBlobUrl,id:f,blobUrl:h})),p({type:_r.Add,item:{id:f,batchId:t,status:zme.Processing,sourceFile:o5t(b),file:b,attachment:{url:h},additionalData:{convert_format:!1,...i},onChange:n,onSuccess:o,onBatchSuccess:r,onError:s,sourceUrl:c,sourceAttachmentId:l,abortController:u||new AbortController,operations:Array.isArray(d)?d:[Zz.Prepare]}}),p.processItem(f)}}function i5t(e){return async({select:t,dispatch:n})=>{if(t.isPaused())return;const o=t.getItem(e),{attachment:r,onChange:s,onSuccess:i,onBatchSuccess:c,batchId:l}=o,u=Array.isArray(o.operations?.[0])?o.operations[0][0]:o.operations?.[0];if(r&&s?.([r]),!u){r&&i?.([r]),n.revokeBlobUrls(e),l&&t.isBatchUploaded(l)&&c?.();return}if(u)switch(n({type:_r.OperationStart,id:e,operation:u}),u){case Zz.Prepare:n.prepareItem(o.id);break;case Zz.Upload:n.uploadItem(e);break}}}function a5t(){return{type:_r.PauseQueue}}function c5t(){return async({select:e,dispatch:t})=>{t({type:_r.ResumeQueue});for(const n of e.getAllItems())t.processItem(n.id)}}function l5t(e){return async({select:t,dispatch:n})=>{t.getItem(e)&&n({type:_r.Remove,id:e})}}function u5t(e,t){return async({dispatch:n})=>{n({type:_r.OperationFinish,id:e,item:t}),n.processItem(e)}}function d5t(e){return async({dispatch:t})=>{const n=[Zz.Upload];t({type:_r.AddOperations,id:e,operations:n}),t.finishOperation(e,{})}}function p5t(e){return async({select:t,dispatch:n})=>{const o=t.getItem(e);t.getSettings().mediaUpload({filesList:[o.file],additionalData:o.additionalData,signal:o.abortController?.signal,onFileChange:([r])=>{Nr(r.url)||n.finishOperation(e,{attachment:r})},onSuccess:([r])=>{n.finishOperation(e,{attachment:r})},onError:r=>{n.cancelItem(e,r)}})}}function f5t(e){return async({select:t,dispatch:n})=>{const o=t.getBlobUrls(e);for(const r of o)tx(r);n({type:_r.RevokeBlobUrls,id:e})}}function b5t(e){return{type:_r.UpdateSettings,settings:e}}const h5t=Object.freeze(Object.defineProperty({__proto__:null,addItem:s5t,finishOperation:u5t,pauseQueue:a5t,prepareItem:d5t,processItem:i5t,removeItem:l5t,resumeQueue:c5t,revokeBlobUrls:f5t,updateSettings:b5t,uploadItem:p5t},Symbol.toStringTag,{value:"Module"})),{lock:rgn,unlock:q7}=P0("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/upload-media"),vme="core/upload-media",m5t={reducer:Ome,selectors:yme,actions:Ame},SO=x1(vme,{reducer:Ome,selectors:yme,actions:Ame});Us(SO);q7(SO).registerPrivateActions(h5t);q7(SO).registerPrivateSelectors(Gxt);function g5t(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=W5({},t),o.registerStore(vme,m5t),e.set(t,o)),o}const M5t=Or(e=>({useSubRegistry:t=!0,...n})=>{const o=Fn(),[r]=x.useState(()=>new WeakMap),s=g5t(r,o,t);return s===o?a.jsx(e,{registry:o,...n}):a.jsx(KN,{value:s,children:a.jsx(e,{registry:s,...n})})},"withRegistryProvider"),z5t=M5t(e=>{const{children:t,settings:n}=e,{updateSettings:o}=q7(Oe(SO));return x.useEffect(()=>{o(n)},[n,o]),a.jsx(a.Fragment,{children:t})});function O5t(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=W5({},t),o.registerStore($r,f_),e.set(t,o)),o}const y5t=Or(e=>({useSubRegistry:t=!0,...n})=>{const o=Fn(),[r]=x.useState(()=>new WeakMap),s=O5t(r,o,t);return s===o?a.jsx(e,{registry:o,...n}):a.jsx(KN,{value:s,children:a.jsx(e,{registry:s,...n})})},"withRegistryProvider"),NQ=()=>{};function xme({clientId:e=null,value:t,selection:n,onChange:o=NQ,onInput:r=NQ}){const s=Fn(),{resetBlocks:i,resetSelection:c,replaceInnerBlocks:l,setHasControlledInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=s.dispatch(Q),{getBlockName:p,getBlocks:f,getSelectionStart:b,getSelectionEnd:h}=s.select(Q),g=G(S=>!e||S(Q).areInnerBlocksControlled(e),[e]),z=x.useRef({incoming:null,outgoing:[]}),A=x.useRef(!1),_=()=>{t&&(d(),e?s.batch(()=>{u(e,!0);const S=t.map(C=>jo(C));A.current&&(z.current.incoming=S),d(),l(e,S)}):(A.current&&(z.current.incoming=t),i(t)))},v=()=>{d(),e?(u(e,!1),d(),l(e,[])):i([])},M=x.useRef(r),y=x.useRef(o);x.useEffect(()=>{M.current=r,y.current=o},[r,o]),x.useEffect(()=>{z.current.outgoing.includes(t)?z.current.outgoing[z.current.outgoing.length-1]===t&&(z.current.outgoing=[]):f(e)!==t&&(z.current.outgoing=[],_(),n&&c(n.selectionStart,n.selectionEnd,n.initialPosition))},[t,e]);const k=x.useRef(!1);x.useEffect(()=>{if(!k.current){k.current=!0;return}g||(z.current.outgoing=[],_())},[g]),x.useEffect(()=>{const{getSelectedBlocksInitialCaretPosition:S,isLastBlockChangePersistent:C,__unstableIsLastBlockChangeIgnored:R,areInnerBlocksControlled:T}=s.select(Q);let E=f(e),B=C(),N=!1;A.current=!0;const j=s.subscribe(()=>{if(e!==null&&p(e)===null||!(!e||T(e)))return;const P=C(),$=f(e),F=$!==E;if(E=$,F&&(z.current.incoming||R())){z.current.incoming=null,B=P;return}(F||N&&!F&&P&&!B)&&(B=P,z.current.outgoing.push(E),(B?y.current:M.current)(E,{selection:{selectionStart:b(),selectionEnd:h(),initialPosition:S()}})),N=F},Q);return()=>{A.current=!1,j()}},[s,e]),x.useEffect(()=>()=>{v()},[])}function A5t(e={},t){switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":const{[t.name]:n,...o}=e;return o}return e}function v5t({name:e,category:t,description:n,keyCombination:o,aliases:r}){return{type:"REGISTER_SHORTCUT",name:e,category:t,keyCombination:o,aliases:r,description:n}}function x5t(e){return{type:"UNREGISTER_SHORTCUT",name:e}}const w5t=Object.freeze(Object.defineProperty({__proto__:null,registerShortcut:v5t,unregisterShortcut:x5t},Symbol.toStringTag,{value:"Module"})),_5t=[],k5t={display:j1,raw:BSe,ariaLabel:y0e};function wme(e,t){return e?e.modifier?k5t[t][e.modifier](e.character):e.character:null}function R7(e,t){return e[t]?e[t].keyCombination:null}function S5t(e,t,n="display"){const o=R7(e,t);return wme(o,n)}function C5t(e,t){return e[t]?e[t].description:null}function _me(e,t){return e[t]&&e[t].aliases?e[t].aliases:_5t}const kme=It((e,t)=>[R7(e,t),..._me(e,t)].filter(Boolean),(e,t)=>[e[t]]),q5t=It((e,t)=>kme(e,t).map(n=>wme(n,"raw")),(e,t)=>[e[t]]),R5t=It((e,t)=>Object.entries(e).filter(([,n])=>n.category===t).map(([n])=>n),e=>[e]),T5t=Object.freeze(Object.defineProperty({__proto__:null,getAllShortcutKeyCombinations:kme,getAllShortcutRawKeyCombinations:q5t,getCategoryShortcuts:R5t,getShortcutAliases:_me,getShortcutDescription:C5t,getShortcutKeyCombination:R7,getShortcutRepresentation:S5t},Symbol.toStringTag,{value:"Module"})),E5t="core/keyboard-shortcuts",Pi=x1(E5t,{reducer:A5t,actions:w5t,selectors:T5t});Us(Pi);function T_(){const{getAllShortcutKeyCombinations:e}=G(Pi);function t(n,o){return e(n).some(({modifier:r,character:s})=>lc[r](o,s))}return t}const uM=new Set,BQ=e=>{for(const t of uM)t(e)},W5t=x.createContext({add:e=>{uM.size===0&&document.addEventListener("keydown",BQ),uM.add(e)},delete:e=>{uM.delete(e),uM.size===0&&document.removeEventListener("keydown",BQ)}});function p0(e,t,{isDisabled:n=!1}={}){const o=x.useContext(W5t),r=T_(),s=x.useRef();x.useEffect(()=>{s.current=t},[t]),x.useEffect(()=>{if(n)return;function i(c){r(e,c)&&s.current(c)}return o.add(i),()=>{o.delete(i)}},[e,n,o])}function Sme(){return null}function N5t(){const{registerShortcut:e}=Oe(Pi);return x.useEffect(()=>{e({name:"core/block-editor/duplicate",category:"block",description:m("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:m("Remove the selected block(s)."),keyCombination:{modifier:"shift",character:"backspace"}}),e({name:"core/block-editor/insert-before",category:"block",description:m("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:m("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:m("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:m("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:m("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:m("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:m("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:m("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:m("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:m("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:m("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}})},[e]),null}Sme.Register=N5t;function B5t(e={}){return x.useMemo(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes}),[e])}const L5t=()=>{};function P5t(e,{allowedTypes:t,additionalData:n={},filesList:o,onError:r=L5t,onFileChange:s,onSuccess:i,onBatchSuccess:c}){e.dispatch(SO).addItems({files:o,onChange:s,onSuccess:i,onBatchSuccess:c,onError:({message:l})=>r(l),additionalData:n,allowedTypes:t})}const E_=y5t(e=>{const{settings:t,registry:n,stripExperimentalSettings:o=!1}=e,r=B5t(t);let s=t;window.__experimentalMediaProcessing&&t.mediaUpload&&(s=x.useMemo(()=>({...t,mediaUpload:P5t.bind(null,n)}),[t,n]));const{__experimentalUpdateSettings:i}=ct(Oe(Q));x.useEffect(()=>{i({...s,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})},[s,o,i]),xme(e);const c=a.jsxs(Spe,{passthrough:!0,children:[!s?.isPreviewMode&&a.jsx(Sme.Register,{}),a.jsx(xvt,{children:e.children})]});return window.__experimentalMediaProcessing?a.jsx(z5t,{settings:r,useSubRegistry:!1,children:c}):c}),j5t=e=>a.jsx(E_,{...e,stripExperimentalSettings:!1,children:e.children});function T7(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=G(Q),{clearSelectedBlock:o}=Oe(Q),{clearBlockSelection:r}=e();return Mn(s=>{if(!r)return;function i(c){!t()&&!n()||c.target===s&&o()}return s.addEventListener("mousedown",i),()=>{s.removeEventListener("mousedown",i)}},[t,n,o,r])}function I5t(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:s,__unstableIsFullySelected:i}=e(Q);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:s(),isFullSelection:i()}}function D5t(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:s}=G(I5t,[]);return Mn(i=>{const{ownerDocument:c}=i,{defaultView:l}=c;if(e==null||!o||t)return;const{length:u}=n;u<2||s&&(i.contentEditable=!0,i.focus(),l.getSelection().removeAllRanges())},[o,t,n,r,e,s])}function F5t(){const e=x.useRef(),t=x.useRef(),n=x.useRef(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:s,getBlockOrder:i,getLastFocus:c,getSectionRootClientId:l,isZoomOut:u}=ct(G(Q)),{setLastFocus:d}=ct(Oe(Q)),p=x.useRef();function f(A){const _=e.current.ownerDocument===A.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(p.current)p.current=null;else if(o())e.current.focus();else if(r())c()?.current?c().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else if(u()){const v=l(),M=i(v);M.length?e.current.querySelector(`[data-block="${M[0]}"]`).focus():v?e.current.querySelector(`[data-block="${v}"]`).focus():_.focus()}else{const v=A.target.compareDocumentPosition(_)&A.target.DOCUMENT_POSITION_FOLLOWING,M=Xr.tabbable.find(e.current);M.length&&(v?M[0]:M[M.length-1]).focus()}}const b=a.jsx("div",{ref:t,tabIndex:"0",onFocus:f}),h=a.jsx("div",{ref:n,tabIndex:"0",onFocus:f}),g=Mn(A=>{function _(S){if(S.defaultPrevented||S.keyCode!==Z2)return;const C=S.shiftKey,R=C?"findPrevious":"findNext",T=Xr.tabbable[R](S.target),E=S.target.closest("[data-block]"),B=E&&T&&(fme(E,T)||LM(E,T));if(u0e(T)&&B)return;const N=C?t:n;p.current=!0,N.current.focus({preventScroll:!0})}function v(S){d({...c(),current:S.target});const{ownerDocument:C}=A;!S.relatedTarget&&C.activeElement===C.body&&s()===0&&A.focus()}function M(S){if(S.keyCode!==Z2||S.target?.getAttribute("role")==="region"||e.current===S.target)return;const R=S.shiftKey?"findPrevious":"findNext",T=Xr.tabbable[R](S.target);(T===t.current||T===n.current)&&(S.preventDefault(),T.focus({preventScroll:!0}))}const{ownerDocument:y}=A,{defaultView:k}=y;return k.addEventListener("keydown",M),A.addEventListener("keydown",_),A.addEventListener("focusout",v),()=>{k.removeEventListener("keydown",M),A.removeEventListener("keydown",_),A.removeEventListener("focusout",v)}},[]),z=xn([e,g]);return[b,z,h]}function $5t(e,t,n){const o=t===cc||t===Ps,{tagName:r}=e,s=e.getAttribute("type");return o&&!n?r==="INPUT"?!["date","datetime-local","month","number","range","time","week"].includes(s):!0:r==="INPUT"?["button","checkbox","number","color","file","image","radio","reset","submit"].includes(s):r!=="TEXTAREA"}function yq(e,t,n,o){let r=Xr.focusable.find(n);t&&r.reverse(),r=r.slice(r.indexOf(e)+1);let s;o&&(s=e.getBoundingClientRect());function i(c){if(!c.closest("[inert]")&&!(c.children.length===1&&fme(c,c.firstElementChild)&&c.firstElementChild.getAttribute("contenteditable")==="true")){if(!Xr.tabbable.isTabbableIndex(c)||c.isContentEditable&&c.contentEditable!=="true")return!1;if(o){const l=c.getBoundingClientRect();if(l.left>=s.right||l.right<=s.left)return!1}return!0}}return r.find(i)}function V5t(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=G(Q),{selectBlock:s}=Oe(Q);return Mn(i=>{let c;function l(){c=null}function u(p,f){const b=yq(p,f,i);return b&&PM(b)}function d(p){if(p.defaultPrevented)return;const{keyCode:f,target:b,shiftKey:h,ctrlKey:g,altKey:z,metaKey:A}=p,_=f===cc,v=f===Ps,M=f===wi,y=f===_i,k=_||M,S=M||y,C=_||v,R=S||C,T=h||g||z||A,E=C?jH:OS,{ownerDocument:B}=i,{defaultView:N}=B;if(!R)return;if(o()){if(h||!r())return;p.preventDefault(),k?s(e()):s(t(),-1);return}if(!$5t(b,f,T))return;C?c||(c=xE(N)):c=null;const j=DN(b)?!k:k,{keepCaretInsideBlock:I}=n();if(h)u(b,k)&&E(b,k)&&(i.contentEditable=!0,i.focus());else if(C&&jH(b,k)&&(!z||OS(b,j))&&!I){const P=yq(b,k,i,!0);P&&(vSe(P,z?!k:k,z?void 0:c),p.preventDefault())}else if(S&&N.getSelection().isCollapsed&&OS(b,j)&&!I){const P=yq(b,j,i);m0e(P,k),p.preventDefault()}}return i.addEventListener("mousedown",l),i.addEventListener("keydown",d),()=>{i.removeEventListener("mousedown",l),i.removeEventListener("keydown",d)}},[])}function H5t(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=G(Q),{multiSelect:o,selectBlock:r}=Oe(Q),s=T_();return Mn(i=>{function c(l){if(!s("core/block-editor/select-all",l))return;const u=t();if(u.length<2&&!zSe(l.target))return;l.preventDefault();const[d]=u,p=n(d),f=e(p);if(u.length===f.length){p&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),r(p));return}o(f[0],f[f.length-1])}return i.addEventListener("keydown",c),()=>{i.removeEventListener("keydown",c)}},[])}function LQ(e,t){e.contentEditable=t,t&&e.focus()}function U5t(){const{startMultiSelect:e,stopMultiSelect:t}=Oe(Q),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:s}=G(Q);return Mn(i=>{const{ownerDocument:c}=i,{defaultView:l}=c;let u,d;function p(){t(),l.removeEventListener("mouseup",p),d=l.requestAnimationFrame(()=>{if(!o())return;LQ(i,!1);const g=l.getSelection();if(g.rangeCount){const z=g.getRangeAt(0),{commonAncestorContainer:A}=z,_=z.cloneRange();u.contains(A)&&(u.focus(),g.removeAllRanges(),g.addRange(_))}})}let f;function b({target:g}){f=g}function h({buttons:g,target:z,relatedTarget:A}){z.contains(f)&&(z.contains(A)||r()||g===1&&(s()||i!==z&&z.getAttribute("contenteditable")==="true"&&n()&&(u=z,e(),l.addEventListener("mouseup",p),LQ(i,!0))))}return i.addEventListener("mouseout",h),i.addEventListener("mousedown",b),()=>{i.removeEventListener("mouseout",h),l.removeEventListener("mouseup",p),l.cancelAnimationFrame(d)}},[e,t,n,o])}function X5t(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===0?t:t.childNodes[n-1]}function G5t(e){const{focusNode:t,focusOffset:n}=e;if(t.nodeType===t.TEXT_NODE||n===t.childNodes.length)return t;if(n===0&&d0e(e)){var o;return(o=t.previousSibling)!==null&&o!==void 0?o:t.parentElement}return t.childNodes[n]}function K5t(e,t){let n=0;for(;e[n]===t[n];)n++;return n}function PQ(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t)}function jQ(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function Y5t(){const{multiSelect:e,selectBlock:t,selectionChange:n}=Oe(Q),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:s}=G(Q);return Mn(i=>{const{ownerDocument:c}=i,{defaultView:l}=c;function u(d){const p=l.getSelection();if(!p.rangeCount)return;const f=X5t(p),b=G5t(p);if(!i.contains(f)||!i.contains(b))return;const h=d.shiftKey&&d.type==="mouseup";if(p.isCollapsed&&!h){if(i.contentEditable==="true"&&!s()){PQ(i,!1);let M=f.nodeType===f.ELEMENT_NODE?f:f.parentElement;M=M?.closest("[contenteditable]"),M?.focus()}return}let g=PM(f),z=PM(b);if(h){const M=r(),y=PM(d.target),k=y!==z;(g===z&&p.isCollapsed||!z||k)&&(z=y),g!==M&&(g=M)}if(g===void 0&&z===void 0){PQ(i,!1);return}if(g===z)s()?e(g,g):t(g);else{const M=[...o(g),g],y=[...o(z),z],k=K5t(M,y);if(M[k]!==g||y[k]!==z){e(M[k],y[k]);return}const S=jQ(f),C=jQ(b);if(S&&C){var _,v;const R=p.getRangeAt(0),T=eo({element:S,range:R,__unstableIsEditableTree:!0}),E=eo({element:C,range:R,__unstableIsEditableTree:!0}),B=(_=T.start)!==null&&_!==void 0?_:T.end,N=(v=E.start)!==null&&v!==void 0?v:E.end;n({start:{clientId:g,attributeKey:S.dataset.wpBlockAttributeKey,offset:B},end:{clientId:z,attributeKey:C.dataset.wpBlockAttributeKey,offset:N}})}else e(g,z)}}return c.addEventListener("selectionchange",u),l.addEventListener("mouseup",u),()=>{c.removeEventListener("selectionchange",u),l.removeEventListener("mouseup",u)}},[e,t,n,o])}function Z5t(){const{selectBlock:e}=Oe(Q),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=G(Q);return Mn(r=>{function s(i){if(!t()||i.button!==0)return;const c=n(),l=PM(i.target);i.shiftKey?c!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",s),()=>{r.removeEventListener("mousedown",s)}},[e,t,n,o])}function Q5t(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:s,canInsertBlockType:i,getBlockRootClientId:c,getSelectionStart:l,getSelectionEnd:u,getBlockAttributes:d}=G(Q),{replaceBlocks:p,__unstableSplitSelection:f,removeBlocks:b,__unstableDeleteSelection:h,__unstableExpandSelection:g,__unstableMarkAutomaticChange:z}=Oe(Q);return Mn(A=>{function _(y){A.contentEditable==="true"&&y.preventDefault()}function v(y){if(!y.defaultPrevented){if(!r()){if(y.keyCode===Gr){if(y.shiftKey||e())return;const k=n(),S=s(k),C=l(),R=u();if(C.attributeKey===R.attributeKey){const T=d(k)[C.attributeKey],E=Ei("from").filter(({type:N})=>N==="enter"),B=xc(E,N=>N.regExp.test(T));if(B){p(k,B.transform({content:T})),z();return}}if(!Et(S,"splitting",!1)&&!y.__deprecatedOnSplit)return;i(S,c(k))&&(f(),y.preventDefault())}return}y.keyCode===Gr?(A.contentEditable=!1,y.preventDefault(),e()?p(t(),Ee(Mr())):f()):y.keyCode===Mc||y.keyCode===zl?(A.contentEditable=!1,y.preventDefault(),e()?b(t()):o()?h(y.keyCode===zl):g()):y.key.length===1&&!(y.metaKey||y.ctrlKey)&&(A.contentEditable=!1,o()?h(y.keyCode===zl):(y.preventDefault(),A.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function M(y){r()&&(A.contentEditable=!1,o()?h():(y.preventDefault(),A.ownerDocument.defaultView.getSelection().removeAllRanges()))}return A.addEventListener("beforeinput",_),A.addEventListener("keydown",v),A.addEventListener("compositionstart",M),()=>{A.removeEventListener("beforeinput",_),A.removeEventListener("keydown",v),A.removeEventListener("compositionstart",M)}},[])}function E7(){const{getBlockName:e}=G(Q),{getBlockType:t}=G(kt),{createSuccessNotice:n}=Oe(mt);return x.useCallback((o,r)=>{let s="";if(o==="copyStyles")s=m("Styles copied to clipboard.");else if(r.length===1){const i=r[0],c=t(e(i))?.title;o==="copy"?s=xe(m('Copied "%s" to clipboard.'),c):s=xe(m('Moved "%s" to clipboard.'),c)}else o==="copy"?s=xe(Dn("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):s=xe(Dn("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(s,{type:"snackbar"})},[n,e,t])}function J5t(e){const t="",n=e.indexOf(t);if(n>-1)e=e.substring(n+t.length);else return e;const r=e.indexOf("");return r>-1&&(e=e.substring(0,r)),e}function ewt(e){const t="";return e.startsWith(t)?e.slice(t.length):e}function W7({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch{return}n=J5t(n),n=ewt(n);const o=T4(e);return o.length&&!twt(o,n)?{files:o}:{html:n,plainText:t,files:[]}}function twt(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){const n=/<\s*img\b/gi;if(t.match(n)?.length!==1)return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}const Cme=Symbol("requiresWrapperOnCopy");function qme(e,t,n){let o=t;const[r]=t;if(r&&n.select(kt).getBlockType(r.name)[Cme]){const{getBlockRootClientId:c,getBlockName:l,getBlockAttributes:u}=n.select(Q),d=c(r.clientId),p=l(d);p&&(o=Ee(p,u(d),o))}const s=Ks(o);e.clipboardData.setData("text/plain",owt(s)),e.clipboardData.setData("text/html",s)}function nwt(e,t){const{plainText:n,html:o,files:r}=W7(e);let s=[];if(r.length){const i=Ei("from");s=r.reduce((c,l)=>{const u=xc(i,d=>d.type==="files"&&d.isMatch([l]));return u&&c.push(u.transform([l])),c},[]).flat()}else s=Xh({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return s}function owt(e){return e=e.replace(/
/g,` `),v1(e).trim().replace(/\n\n+/g,` -`)}function swt(){const e=Fn(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:s,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:c,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:p}=G(Q),{flashBlock:f,removeBlocks:b,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:z,__unstableSplitSelection:A}=Oe(Q),_=W7();return Mn(v=>{function M(y){if(y.defaultPrevented)return;const k=n();if(k.length===0)return;if(!o()){const{target:E}=y,{ownerDocument:B}=E;if(y.type==="copy"||y.type==="cut"?MSe(B):zSe(B)&&!B.activeElement.isContentEditable)return}const{activeElement:S}=y.target.ownerDocument;if(!v.contains(S))return;const C=l(),R=c()||i(),T=!R&&!C;if(y.type==="copy"||y.type==="cut")if(y.preventDefault(),k.length===1&&f(k[0]),T)z();else{_(y.type,k);let E;if(R)E=t(k);else{const[B,N]=u(),j=t(k.slice(1,k.length-1));E=[B,...j,N]}qme(y,E,e)}if(y.type==="cut")R&&!T?b(k):(y.target.ownerDocument.activeElement.contentEditable=!1,g());else if(y.type==="paste"){const{__experimentalCanUserUseUnfilteredHTML:E}=r();if(y.clipboardData.getData("rich-text")==="true")return;const{plainText:N,html:j,files:I}=N7(y),P=i();let $=[];if(I.length){const V=Ei("from");$=I.reduce((ee,te)=>{const J=xc(V,ue=>ue.type==="files"&&ue.isMatch([te]));return J&&ee.push(J.transform([te])),ee},[]).flat()}else $=Xh({HTML:j,plainText:N,mode:P?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:E});if(typeof $=="string")return;if(P){h(k,$,$.length-1,-1),y.preventDefault();return}if(!o()&&!Et(s(k[0]),"splitting",!1)&&!y.__deprecatedOnSplit)return;const[F]=k,X=p(F),Z=[];for(const V of $)if(d(V.name,X))Z.push(V);else{const ee=s(X),te=V.name!==ee?Kr(V,ee):[V];if(!te)return;for(const J of te)for(const ue of J.innerBlocks)Z.push(ue)}A(Z),y.preventDefault()}}return v.ownerDocument.addEventListener("copy",M),v.ownerDocument.addEventListener("cut",M),v.ownerDocument.addEventListener("paste",M),()=>{v.ownerDocument.removeEventListener("copy",M),v.ownerDocument.removeEventListener("cut",M),v.ownerDocument.removeEventListener("paste",M)}},[])}function Rme(){const[e,t,n]=$5t(),o=G(r=>r(Q).hasMultiSelection(),[]);return[e,xn([t,swt(),J5t(),X5t(),Z5t(),Q5t(),F5t(),U5t(),H5t(),Mn(r=>(r.tabIndex=0,r.dataset.hasMultiSelection=o,o?(r.setAttribute("aria-label",m("Multiple selected blocks")),()=>{delete r.dataset.hasMultiSelection,r.removeAttribute("aria-label")}):()=>{delete r.dataset.hasMultiSelection}),[o])]),n]}function iwt({children:e,...t},n){const[o,r,s]=Rme();return a.jsxs(a.Fragment,{children:[o,a.jsx("div",{...t,ref:xn([r,n]),className:oe(t.className,"block-editor-writing-flow"),children:e}),s]})}const awt=x.forwardRef(iwt);let nv=null;function cwt(){return nv||(nv=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}const{ownerNode:n,cssRules:o}=t;if(n===null||!o||n.id.startsWith("wp-")||!n.id)return e;function r(s){return Array.from(s).find(({selectorText:i,conditionText:c,cssRules:l})=>c?r(l):i&&(i.includes(".editor-styles-wrapper")||i.includes(".wp-block")))}if(r(o)){const s=n.tagName==="STYLE";if(s){const i=n.id.replace("-inline-css","-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!s){const i=n.id.replace("-css","-inline-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}}return e},[]),nv)}function IQ({frameSize:e,containerWidth:t,maxContainerWidth:n,scaleContainerWidth:o}){return(Math.min(t,n)-e*2)/o}function lwt(e,t){const{scaleValue:n,scrollHeight:o}=e,{frameSize:r,scaleValue:s}=t;return o*(s/n)+r*2}function uwt(e,t){const{containerHeight:n,frameSize:o,scaleValue:r,scrollTop:s}=e,{containerHeight:i,frameSize:c,scaleValue:l,scrollHeight:u}=t;let d=s;d=(d+n/2-o)/r-n/2,d=(d+i/2)*l+c-i/2,d=s<=o?0:d;const p=u-i;return Math.round(Math.min(Math.max(0,d),Math.max(0,p)))}function dwt(e,t){const{scaleValue:n,frameSize:o,scrollTop:r}=e,{scaleValue:s,frameSize:i,scrollTop:c}=t;return[{translate:"0 0",scale:n,paddingTop:`${o/n}px`,paddingBottom:`${o/n}px`},{translate:`0 ${r-c}px`,scale:s,paddingTop:`${i/s}px`,paddingBottom:`${i/s}px`}]}function pwt({frameSize:e,iframeDocument:t,maxContainerWidth:n=750,scale:o}){const[r,{height:s}]=js(),[i,{width:c,height:l}]=js(),u=x.useRef(0),d=o!==1,p=$1(),f=o==="auto-scaled",b=x.useRef(!1),h=x.useRef(null);x.useEffect(()=>{d||(u.current=c)},[c,d]);const g=Math.max(u.current,c),z=f?IQ({frameSize:e,containerWidth:c,maxContainerWidth:n,scaleContainerWidth:g}):o,A=x.useRef({scaleValue:z,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),_=x.useRef({scaleValue:z,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),v=x.useCallback(()=>{const{scrollTop:k}=A.current,{scrollTop:S}=_.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${k}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${S}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",A.current.scrollHeight===A.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(dwt(A.current,_.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),M=x.useCallback(()=>{b.current=!1,h.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",_.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${_.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=_.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),A.current=_.current},[t]),y=x.useRef(!1);return x.useEffect(()=>{const k=t&&y.current!==d;if(y.current=d,!!k&&(b.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),x.useEffect(()=>{if(t&&(f&&A.current.scaleValue!==1&&(A.current.scaleValue=IQ({frameSize:A.current.frameSize,containerWidth:c,maxContainerWidth:n,scaleContainerWidth:c})),z<1&&(b.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",z),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${s}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${l}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${c}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${g}px`)),b.current))if(b.current=!1,h.current){h.current.reverse();const k=A.current,S=_.current;A.current=S,_.current=k}else A.current.scrollTop=t.documentElement.scrollTop,A.current.scrollHeight=t.documentElement.scrollHeight,A.current.containerHeight=l,_.current={scaleValue:z,frameSize:e,containerHeight:t.documentElement.clientHeight},_.current.scrollHeight=lwt(A.current,_.current),_.current.scrollTop=uwt(A.current,_.current),h.current=v(),p?M():h.current.onfinish=M},[v,M,p,f,z,e,t,s,c,l,n,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:r,containerResizeListener:i}}function Tme(e,t,n){const o={};for(const i in e)o[i]=e[i];if(e instanceof n.contentDocument.defaultView.MouseEvent){const i=n.getBoundingClientRect();o.clientX+=i.left,o.clientY+=i.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault(),!n.dispatchEvent(r)&&e.preventDefault()}function fwt(e){return Mn(()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],s={};for(const i of r)s[i]=c=>{const u=Object.getPrototypeOf(c).constructor.name,d=window[u];Tme(c,d,n)},o.addEventListener(i,s[i]);return()=>{for(const i of r)o.removeEventListener(i,s[i])}})}function bwt({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:s,forwardedRef:i,title:c=m("Editor canvas"),...l}){const{resolvedAssets:u,isPreviewMode:d}=G($=>{const{getSettings:F}=$(Q),X=F();return{resolvedAssets:X.__unstableResolvedAssets,isPreviewMode:X.isPreviewMode}},[]),{styles:p="",scripts:f=""}=u,[b,h]=x.useState(),[g,z]=x.useState([]),A=E7(),[_,v,M]=Rme(),y=Mn($=>{$._load=()=>{h($.contentDocument)};let F;function X(V){V.preventDefault()}function Z(){const{contentDocument:V,ownerDocument:ee}=$,{documentElement:te}=V;F=V,te.classList.add("block-editor-iframe__html"),A(te),z(Array.from(ee.body.classList).filter(J=>J.startsWith("admin-color-")||J.startsWith("post-type-")||J==="wp-embed-responsive")),V.dir=ee.dir;for(const J of cwt())V.getElementById(J.id)||(V.head.appendChild(J.cloneNode(!0)),d||console.warn(`${J.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,J));F.addEventListener("dragover",X,!1),F.addEventListener("drop",X,!1),F.addEventListener("click",J=>{if(J.target.tagName==="A"){J.preventDefault();const ue=J.target.getAttribute("href");ue?.startsWith("#")&&(F.defaultView.location.hash=ue.slice(1))}})}return $.addEventListener("load",Z),()=>{delete $._load,$.removeEventListener("load",Z),F?.removeEventListener("dragover",X),F?.removeEventListener("drop",X)}},[]),{contentResizeListener:k,containerResizeListener:S,isZoomedOut:C,scaleContainerWidth:R}=pwt({scale:o,frameSize:parseInt(r),iframeDocument:b}),T=UN({isDisabled:!s}),E=xn([fwt(b),e,A,v,T]),B=` +`)}function rwt(){const e=Fn(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:s,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:c,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:p}=G(Q),{flashBlock:f,removeBlocks:b,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:z,__unstableSplitSelection:A}=Oe(Q),_=E7();return Mn(v=>{function M(y){if(y.defaultPrevented)return;const k=n();if(k.length===0)return;if(!o()){const{target:E}=y,{ownerDocument:B}=E;if(y.type==="copy"||y.type==="cut"?gSe(B):MSe(B)&&!B.activeElement.isContentEditable)return}const{activeElement:S}=y.target.ownerDocument;if(!v.contains(S))return;const C=l(),R=c()||i(),T=!R&&!C;if(y.type==="copy"||y.type==="cut")if(y.preventDefault(),k.length===1&&f(k[0]),T)z();else{_(y.type,k);let E;if(R)E=t(k);else{const[B,N]=u(),j=t(k.slice(1,k.length-1));E=[B,...j,N]}qme(y,E,e)}if(y.type==="cut")R&&!T?b(k):(y.target.ownerDocument.activeElement.contentEditable=!1,g());else if(y.type==="paste"){const{__experimentalCanUserUseUnfilteredHTML:E}=r();if(y.clipboardData.getData("rich-text")==="true")return;const{plainText:N,html:j,files:I}=W7(y),P=i();let $=[];if(I.length){const V=Ei("from");$=I.reduce((ee,te)=>{const J=xc(V,ue=>ue.type==="files"&&ue.isMatch([te]));return J&&ee.push(J.transform([te])),ee},[]).flat()}else $=Xh({HTML:j,plainText:N,mode:P?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:E});if(typeof $=="string")return;if(P){h(k,$,$.length-1,-1),y.preventDefault();return}if(!o()&&!Et(s(k[0]),"splitting",!1)&&!y.__deprecatedOnSplit)return;const[F]=k,X=p(F),Z=[];for(const V of $)if(d(V.name,X))Z.push(V);else{const ee=s(X),te=V.name!==ee?Kr(V,ee):[V];if(!te)return;for(const J of te)for(const ue of J.innerBlocks)Z.push(ue)}A(Z),y.preventDefault()}}return v.ownerDocument.addEventListener("copy",M),v.ownerDocument.addEventListener("cut",M),v.ownerDocument.addEventListener("paste",M),()=>{v.ownerDocument.removeEventListener("copy",M),v.ownerDocument.removeEventListener("cut",M),v.ownerDocument.removeEventListener("paste",M)}},[])}function Rme(){const[e,t,n]=F5t(),o=G(r=>r(Q).hasMultiSelection(),[]);return[e,xn([t,rwt(),Q5t(),U5t(),Y5t(),Z5t(),D5t(),H5t(),V5t(),Mn(r=>(r.tabIndex=0,r.dataset.hasMultiSelection=o,o?(r.setAttribute("aria-label",m("Multiple selected blocks")),()=>{delete r.dataset.hasMultiSelection,r.removeAttribute("aria-label")}):()=>{delete r.dataset.hasMultiSelection}),[o])]),n]}function swt({children:e,...t},n){const[o,r,s]=Rme();return a.jsxs(a.Fragment,{children:[o,a.jsx("div",{...t,ref:xn([r,n]),className:oe(t.className,"block-editor-writing-flow"),children:e}),s]})}const iwt=x.forwardRef(swt);let tv=null;function awt(){return tv||(tv=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}const{ownerNode:n,cssRules:o}=t;if(n===null||!o||n.id.startsWith("wp-")||!n.id)return e;function r(s){return Array.from(s).find(({selectorText:i,conditionText:c,cssRules:l})=>c?r(l):i&&(i.includes(".editor-styles-wrapper")||i.includes(".wp-block")))}if(r(o)){const s=n.tagName==="STYLE";if(s){const i=n.id.replace("-inline-css","-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!s){const i=n.id.replace("-css","-inline-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}}return e},[]),tv)}function IQ({frameSize:e,containerWidth:t,maxContainerWidth:n,scaleContainerWidth:o}){return(Math.min(t,n)-e*2)/o}function cwt(e,t){const{scaleValue:n,scrollHeight:o}=e,{frameSize:r,scaleValue:s}=t;return o*(s/n)+r*2}function lwt(e,t){const{containerHeight:n,frameSize:o,scaleValue:r,scrollTop:s}=e,{containerHeight:i,frameSize:c,scaleValue:l,scrollHeight:u}=t;let d=s;d=(d+n/2-o)/r-n/2,d=(d+i/2)*l+c-i/2,d=s<=o?0:d;const p=u-i;return Math.round(Math.min(Math.max(0,d),Math.max(0,p)))}function uwt(e,t){const{scaleValue:n,frameSize:o,scrollTop:r}=e,{scaleValue:s,frameSize:i,scrollTop:c}=t;return[{translate:"0 0",scale:n,paddingTop:`${o/n}px`,paddingBottom:`${o/n}px`},{translate:`0 ${r-c}px`,scale:s,paddingTop:`${i/s}px`,paddingBottom:`${i/s}px`}]}function dwt({frameSize:e,iframeDocument:t,maxContainerWidth:n=750,scale:o}){const[r,{height:s}]=js(),[i,{width:c,height:l}]=js(),u=x.useRef(0),d=o!==1,p=$1(),f=o==="auto-scaled",b=x.useRef(!1),h=x.useRef(null);x.useEffect(()=>{d||(u.current=c)},[c,d]);const g=Math.max(u.current,c),z=f?IQ({frameSize:e,containerWidth:c,maxContainerWidth:n,scaleContainerWidth:g}):o,A=x.useRef({scaleValue:z,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),_=x.useRef({scaleValue:z,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),v=x.useCallback(()=>{const{scrollTop:k}=A.current,{scrollTop:S}=_.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${k}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${S}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",A.current.scrollHeight===A.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(uwt(A.current,_.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),M=x.useCallback(()=>{b.current=!1,h.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",_.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${_.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=_.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),A.current=_.current},[t]),y=x.useRef(!1);return x.useEffect(()=>{const k=t&&y.current!==d;if(y.current=d,!!k&&(b.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),x.useEffect(()=>{if(t&&(f&&A.current.scaleValue!==1&&(A.current.scaleValue=IQ({frameSize:A.current.frameSize,containerWidth:c,maxContainerWidth:n,scaleContainerWidth:c})),z<1&&(b.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",z),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${s}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${l}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${c}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${g}px`)),b.current))if(b.current=!1,h.current){h.current.reverse();const k=A.current,S=_.current;A.current=S,_.current=k}else A.current.scrollTop=t.documentElement.scrollTop,A.current.scrollHeight=t.documentElement.scrollHeight,A.current.containerHeight=l,_.current={scaleValue:z,frameSize:e,containerHeight:t.documentElement.clientHeight},_.current.scrollHeight=cwt(A.current,_.current),_.current.scrollTop=lwt(A.current,_.current),h.current=v(),p?M():h.current.onfinish=M},[v,M,p,f,z,e,t,s,c,l,n,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:r,containerResizeListener:i}}function Tme(e,t,n){const o={};for(const i in e)o[i]=e[i];if(e instanceof n.contentDocument.defaultView.MouseEvent){const i=n.getBoundingClientRect();o.clientX+=i.left,o.clientY+=i.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault(),!n.dispatchEvent(r)&&e.preventDefault()}function pwt(e){return Mn(()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],s={};for(const i of r)s[i]=c=>{const u=Object.getPrototypeOf(c).constructor.name,d=window[u];Tme(c,d,n)},o.addEventListener(i,s[i]);return()=>{for(const i of r)o.removeEventListener(i,s[i])}})}function fwt({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:s,forwardedRef:i,title:c=m("Editor canvas"),...l}){const{resolvedAssets:u,isPreviewMode:d}=G($=>{const{getSettings:F}=$(Q),X=F();return{resolvedAssets:X.__unstableResolvedAssets,isPreviewMode:X.isPreviewMode}},[]),{styles:p="",scripts:f=""}=u,[b,h]=x.useState(),[g,z]=x.useState([]),A=T7(),[_,v,M]=Rme(),y=Mn($=>{$._load=()=>{h($.contentDocument)};let F;function X(V){V.preventDefault()}function Z(){const{contentDocument:V,ownerDocument:ee}=$,{documentElement:te}=V;F=V,te.classList.add("block-editor-iframe__html"),A(te),z(Array.from(ee.body.classList).filter(J=>J.startsWith("admin-color-")||J.startsWith("post-type-")||J==="wp-embed-responsive")),V.dir=ee.dir;for(const J of awt())V.getElementById(J.id)||(V.head.appendChild(J.cloneNode(!0)),d||console.warn(`${J.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,J));F.addEventListener("dragover",X,!1),F.addEventListener("drop",X,!1),F.addEventListener("click",J=>{if(J.target.tagName==="A"){J.preventDefault();const ue=J.target.getAttribute("href");ue?.startsWith("#")&&(F.defaultView.location.hash=ue.slice(1))}})}return $.addEventListener("load",Z),()=>{delete $._load,$.removeEventListener("load",Z),F?.removeEventListener("dragover",X),F?.removeEventListener("drop",X)}},[]),{contentResizeListener:k,containerResizeListener:S,isZoomedOut:C,scaleContainerWidth:R}=dwt({scale:o,frameSize:parseInt(r),iframeDocument:b}),T=HN({isDisabled:!s}),E=xn([pwt(b),e,A,v,T]),B=` @@ -526,13 +526,13 @@ The screen with id ${t.id} will not be added.`),e):[...e,t]}function Nbt({screen + diff --git a/ios/Sources/GutenbergKit/Gutenberg/remote.html b/ios/Sources/GutenbergKit/Gutenberg/remote.html index 795933ec..211cfe13 100644 --- a/ios/Sources/GutenbergKit/Gutenberg/remote.html +++ b/ios/Sources/GutenbergKit/Gutenberg/remote.html @@ -7,7 +7,7 @@ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> Gutenberg - + diff --git a/patches/@wordpress+block-editor+14.11.0.patch b/patches/@wordpress+block-editor+14.11.0.patch index 08e70cc0..114ca0f3 100644 --- a/patches/@wordpress+block-editor+14.11.0.patch +++ b/patches/@wordpress+block-editor+14.11.0.patch @@ -10,3 +10,16 @@ index aa2e9a5..f2d8481 100644 expandOnMobile: true, headerTitle: __('Add a block'), renderToggle: this.renderToggle, +diff --git a/node_modules/@wordpress/block-editor/build-module/components/provider/index.js b/node_modules/@wordpress/block-editor/build-module/components/provider/index.js +index e89fa49..0f14ae8 100644 +--- a/node_modules/@wordpress/block-editor/build-module/components/provider/index.js ++++ b/node_modules/@wordpress/block-editor/build-module/components/provider/index.js +@@ -104,7 +104,7 @@ export const ExperimentalBlockEditorProvider = withRegistryProvider(props => { + export const BlockEditorProvider = props => { + return /*#__PURE__*/_jsx(ExperimentalBlockEditorProvider, { + ...props, +- stripExperimentalSettings: true, ++ stripExperimentalSettings: false, + children: props.children + }); + }; diff --git a/patches/@wordpress+editor+14.16.0.patch b/patches/@wordpress+editor+14.16.0.patch deleted file mode 100644 index 500f5ffd..00000000 --- a/patches/@wordpress+editor+14.16.0.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/node_modules/@wordpress/editor/build-module/private-apis.js b/node_modules/@wordpress/editor/build-module/private-apis.js -index c45347e..ab39c50 100644 ---- a/node_modules/@wordpress/editor/build-module/private-apis.js -+++ b/node_modules/@wordpress/editor/build-module/private-apis.js -@@ -9,6 +9,7 @@ import * as interfaceApis from '@wordpress/interface'; - import { lock } from './lock-unlock'; - import { EntitiesSavedStatesExtensible } from './components/entities-saved-states'; - import EditorContentSlotFill from './components/editor-interface/content-slot-fill'; -+import useBlockEditorSettings from './components/provider/use-block-editor-settings'; - import BackButton from './components/header/back-button'; - import Editor from './components/editor'; - import PluginPostExcerpt from './components/post-excerpt/plugin'; -@@ -47,6 +48,7 @@ lock(privateApis, { - registerCoreBlockBindingsSources, - getTemplateInfo, - // This is a temporary private API while we're updating the site editor to use EditorProvider. -+ useBlockEditorSettings, - interfaceStore, - ...remainingInterfaceApis - }); diff --git a/patches/README.md b/patches/README.md index 77f14a1b..64130f63 100644 --- a/patches/README.md +++ b/patches/README.md @@ -8,8 +8,5 @@ Existing patches should be described and justified here. ### `@wordpress/block-editor` -Expose an `open` prop on the `Inserter` component, allowing toggling the inserter visibility via the quick inserter's "Browse all" button. - -### `@wordpress/editor` - -Revert https://github.com/WordPress/gutenberg/pull/64892 and export the private `useBlockEditorSettings` API as it is required for GutenbergKit's use of the block editor settings. This can be removed once GutenbergKit resides in the Gutenberg repository, where we can access all the necessary APIs—both public and private. +- Expose an `open` prop on the `Inserter` component, allowing toggling the inserter visibility via the quick inserter's "Browse all" button. +- Disable `stripExperimentalSettings` in the `BlockEditorProvider` component so that the Patterns and Media inserter tabs function. diff --git a/src/components/editor/index.jsx b/src/components/editor/index.jsx index 9ca39ed3..4f04b13b 100644 --- a/src/components/editor/index.jsx +++ b/src/components/editor/index.jsx @@ -1,10 +1,9 @@ /** * WordPress dependencies */ -import { useEntityBlockEditor } from '@wordpress/core-data'; -import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor'; +import { store as coreStore } from '@wordpress/core-data'; import { useSelect } from '@wordpress/data'; -import { store as editorStore } from '@wordpress/editor'; +import { store as editorStore, EditorProvider } from '@wordpress/editor'; import { useRef } from '@wordpress/element'; /** @@ -17,18 +16,12 @@ import { useHostBridge } from './use-host-bridge'; import { useHostExceptionLogging } from './use-host-exception-logging'; import { useEditorSetup } from './use-editor-setup'; import { useMediaUpload } from './use-media-upload'; -import { useGBKitSettings } from './use-gbkit-settings'; -import { unlock } from '../../lock-unlock'; import TextEditor from '../text-editor'; /** * @typedef {import('../utils/bridge').Post} Post */ -const { ExperimentalBlockEditorProvider: BlockEditorProvider } = unlock( - blockEditorPrivateApis -); - /** * Entry component rendering the editor and surrounding UI. * @@ -47,31 +40,36 @@ export default function Editor( { post, children, hideTitle } ) { useEditorSetup( post ); useMediaUpload(); - const [ postBlocks, onInput, onChange ] = useEntityBlockEditor( - 'postType', - post.type, - { id: post.id } - ); - - const settings = useGBKitSettings( post ); + const { isReady, mode, isRichEditingEnabled, currentPost } = useSelect( + ( select ) => { + const { + __unstableIsEditorReady, + getEditorSettings, + getEditorMode, + } = select( editorStore ); + const editorSettings = getEditorSettings(); + const { getEntityRecord } = select( coreStore ); + const _currentPost = getEntityRecord( + 'postType', + post.type, + post.id + ); - const { isReady, mode, isRichEditingEnabled } = useSelect( ( select ) => { - const { __unstableIsEditorReady, getEditorSettings, getEditorMode } = - select( editorStore ); - const editorSettings = getEditorSettings(); - - return { - // TODO(Perf): The `__unstableIsEditorReady` selector is insufficient as - // it does not account for post type loading, which is first referenced - // within the post title component render. This results in the post title - // popping in after the editor mounted. The web editor does not experience - // this issue because the post type is loaded for "mode" selection before - // the editor is mounted. - isReady: __unstableIsEditorReady(), - mode: getEditorMode(), - isRichEditingEnabled: editorSettings.richEditingEnabled, - }; - }, [] ); + return { + // TODO(Perf): The `__unstableIsEditorReady` selector is insufficient as + // it does not account for post type loading, which is first referenced + // within the post title component render. This results in the post title + // popping in after the editor mounted. The web editor does not experience + // this issue because the post type is loaded for "mode" selection before + // the editor is mounted. + isReady: __unstableIsEditorReady(), + mode: getEditorMode(), + isRichEditingEnabled: editorSettings.richEditingEnabled, + currentPost: _currentPost, + }; + }, + [ post.id, post.type ] + ); if ( ! isReady ) { return null; @@ -79,10 +77,8 @@ export default function Editor( { post, children, hideTitle } ) { return (
- @@ -100,7 +96,9 @@ export default function Editor( { post, children, hideTitle } ) { ) } { children } - +
); } + +const settings = {}; diff --git a/src/components/editor/use-gbkit-settings.js b/src/components/editor/use-gbkit-settings.js deleted file mode 100644 index 51078a77..00000000 --- a/src/components/editor/use-gbkit-settings.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * WordPress dependencies - */ -import { useSelect } from '@wordpress/data'; -import { useMemo } from '@wordpress/element'; -import { store as coreStore } from '@wordpress/core-data'; -import { - store as editorStore, - mediaUpload, - privateApis as editorPrivateApis, -} from '@wordpress/editor'; - -/** - * Internal dependencies - */ -import { unlock } from '../../lock-unlock'; - -const { useBlockEditorSettings } = unlock( editorPrivateApis ); - -export function useGBKitSettings( post ) { - const { - blockPatterns, - editorSettings, - hasUploadPermissions, - reusableBlocks, - } = useSelect( - ( select ) => { - const { getEntityRecord, getEntityRecords } = select( coreStore ); - const { getEditorSettings } = select( editorStore ); - const user = getEntityRecord( 'root', 'user', post.author ); - - return { - editorSettings: getEditorSettings(), - blockPatterns: select( coreStore ).getBlockPatterns(), - hasUploadPermissions: user?.capabilities?.upload_files ?? true, - reusableBlocks: getEntityRecords( 'postType', 'wp_block' ), - }; - }, - [ post.author ] - ); - - const blockEditorSettings = useBlockEditorSettings( - editorSettings, - post.type, - post.id, - 'visual' - ); - - const settings = useMemo( - () => ( { - ...blockEditorSettings, - hasFixedToolbar: true, - mediaUpload: hasUploadPermissions ? mediaUpload : undefined, - __experimentalReusableBlocks: reusableBlocks, - __experimentalBlockPatterns: blockPatterns, - } ), - [ - blockEditorSettings, - blockPatterns, - hasUploadPermissions, - reusableBlocks, - ] - ); - - return settings; -} diff --git a/src/index.jsx b/src/index.jsx index 6839a597..26cd832c 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -39,7 +39,11 @@ function initializeEditor() { dispatch( editorStore ).updateEditorSettings( editorSettings ); } ); - dispatch( preferencesStore ).setDefaults( 'core/edit-post', { + const preferenceDispatch = dispatch( preferencesStore ); + preferenceDispatch.setDefaults( 'core', { + fixedToolbar: true, + } ); + preferenceDispatch.setDefaults( 'core/edit-post', { themeStyles, } ); diff --git a/src/remote.jsx b/src/remote.jsx index cc07db9d..7afbf86a 100644 --- a/src/remote.jsx +++ b/src/remote.jsx @@ -45,7 +45,11 @@ async function initalizeRemoteEditor() { dispatch( editorStore ).updateEditorSettings( editorSettings ); } ); - dispatch( preferencesStore ).setDefaults( 'core/edit-post', { + const preferenceDispatch = dispatch( preferencesStore ); + preferenceDispatch.setDefaults( 'core', { + fixedToolbar: true, + } ); + preferenceDispatch.setDefaults( 'core/edit-post', { themeStyles, } ); diff --git a/src/utils/bridge.js b/src/utils/bridge.js index 30bd6e6f..27e1985b 100644 --- a/src/utils/bridge.js +++ b/src/utils/bridge.js @@ -165,18 +165,21 @@ export function getPost() { if ( post ) { return { id: post.id, + type: post.type || 'post', + status: post.status, title: { raw: decodeURIComponent( post.title ) }, content: { raw: decodeURIComponent( post.content ) }, - type: post.type || 'post', }; } // Since we don't use the auto-save functionality, draft posts need to have an ID. // We assign a temporary ID of -1. return { + id: -1, type: 'post', status: 'auto-draft', - id: -1, + title: { raw: '' }, + content: { raw: '' }, }; }