@jackuait/blok 0.4.0 → 0.4.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/blok.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Ue,Ne){typeof exports=="object"&&typeof module!="undefined"?module.exports=Ne():typeof define=="function"&&define.amd?define(Ne):(Ue=typeof globalThis!="undefined"?globalThis:Ue||self,Ue.Blok=Ne())})(this,(function(){"use strict";var DA=Object.defineProperty,PA=Object.defineProperties;var MA=Object.getOwnPropertyDescriptors;var el=Object.getOwnPropertySymbols;var n0=Object.prototype.hasOwnProperty,r0=Object.prototype.propertyIsEnumerable;var t0=(Ue,Ne,ht)=>Ne in Ue?DA(Ue,Ne,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ue[Ne]=ht,be=(Ue,Ne)=>{for(var ht in Ne||(Ne={}))n0.call(Ne,ht)&&t0(Ue,ht,Ne[ht]);if(el)for(var ht of el(Ne))r0.call(Ne,ht)&&t0(Ue,ht,Ne[ht]);return Ue},Tt=(Ue,Ne)=>PA(Ue,MA(Ne));var o0=(Ue,Ne)=>{var ht={};for(var Xt in Ue)n0.call(Ue,Xt)&&Ne.indexOf(Xt)<0&&(ht[Xt]=Ue[Xt]);if(Ue!=null&&el)for(var Xt of el(Ue))Ne.indexOf(Xt)<0&&r0.call(Ue,Xt)&&(ht[Xt]=Ue[Xt]);return ht};var Mr;var Ue=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ne(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ht,Xt;function i0(){if(Xt)return ht;Xt=1;function a(){}return ht=Object.assign(a,{default:a,register:a,revert:function(){},__esModule:!0}),ht}i0(),typeof Element.prototype.scrollIntoViewIfNeeded=="undefined"&&(Element.prototype.scrollIntoViewIfNeeded=function(a){const e=a!=null?a:!0,t=this.parentElement;if(!t)return;const o=window.getComputedStyle(t,null),i=parseInt(o.getPropertyValue("border-top-width")),l=parseInt(o.getPropertyValue("border-left-width")),c=this.offsetTop-t.offsetTop<t.scrollTop,d=this.offsetTop-t.offsetTop+this.clientHeight-i>t.scrollTop+t.clientHeight,h=this.offsetLeft-t.offsetLeft<t.scrollLeft,g=this.offsetLeft-t.offsetLeft+this.clientWidth-l>t.scrollLeft+t.clientWidth,v=c&&!d;(c||d)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-i+this.clientHeight/2),(h||g)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-l+this.clientWidth/2),(c||d||h||g)&&!e&&this.scrollIntoView(v)});const s0=globalThis.setTimeout.bind(globalThis),a0=globalThis.clearTimeout.bind(globalThis),Qi=new Map,l0=a=>{const e=Number(a);return Number.isFinite(e)&&e>0?e:Date.now()};typeof window.requestIdleCallback=="undefined"&&(window.requestIdleCallback=function(a){const e=Date.now(),t={},o=s0(()=>{const l=t.value;typeof l=="number"&&Qi.delete(l),a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1),i=l0(o);return t.value=i,Qi.set(i,o),i}),typeof window.cancelIdleCallback=="undefined"&&(window.cancelIdleCallback=function(a){const e=Qi.get(a);e!==void 0&&(Qi.delete(a),a0(e)),globalThis.clearTimeout(a)});const c0="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let u0=(a=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(a|=0));for(;a--;)e+=c0[t[a]&63];return e};var tl,np;function d0(){if(np)return tl;np=1;var a="Expected a function";function e(t,o,i){if(typeof t!="function")throw new TypeError(a);return setTimeout(function(){t.apply(void 0,i)},o)}return tl=e,tl}var nl,rp;function op(){if(rp)return nl;rp=1;function a(e){return e}return nl=a,nl}var rl,ip;function f0(){if(ip)return rl;ip=1;function a(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}return rl=a,rl}var ol,sp;function h0(){if(sp)return ol;sp=1;var a=f0(),e=Math.max;function t(o,i,l){return i=e(i===void 0?o.length-1:i,0),function(){for(var c=arguments,d=-1,h=e(c.length-i,0),g=Array(h);++d<h;)g[d]=c[i+d];d=-1;for(var v=Array(i+1);++d<i;)v[d]=c[d];return v[i]=l(g),a(o,this,v)}}return ol=t,ol}var il,ap;function p0(){if(ap)return il;ap=1;function a(e){return function(){return e}}return il=a,il}var sl,lp;function cp(){if(lp)return sl;lp=1;var a=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue;return sl=a,sl}var al,up;function cn(){if(up)return al;up=1;var a=cp(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=a||e||Function("return this")();return al=t,al}var ll,dp;function Zi(){if(dp)return ll;dp=1;var a=cn(),e=a.Symbol;return ll=e,ll}var cl,fp;function g0(){if(fp)return cl;fp=1;var a=Zi(),e=Object.prototype,t=e.hasOwnProperty,o=e.toString,i=a?a.toStringTag:void 0;function l(c){var d=t.call(c,i),h=c[i];try{c[i]=void 0;var g=!0}catch(y){}var v=o.call(c);return g&&(d?c[i]=h:delete c[i]),v}return cl=l,cl}var ul,hp;function m0(){if(hp)return ul;hp=1;var a=Object.prototype,e=a.toString;function t(o){return e.call(o)}return ul=t,ul}var dl,pp;function Nn(){if(pp)return dl;pp=1;var a=Zi(),e=g0(),t=m0(),o="[object Null]",i="[object Undefined]",l=a?a.toStringTag:void 0;function c(d){return d==null?d===void 0?i:o:l&&l in Object(d)?e(d):t(d)}return dl=c,dl}var fl,gp;function kn(){if(gp)return fl;gp=1;function a(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return fl=a,fl}var hl,mp;function Ji(){if(mp)return hl;mp=1;var a=Nn(),e=kn(),t="[object AsyncFunction]",o="[object Function]",i="[object GeneratorFunction]",l="[object Proxy]";function c(d){if(!e(d))return!1;var h=a(d);return h==o||h==i||h==t||h==l}return hl=c,hl}var pl,vp;function v0(){if(vp)return pl;vp=1;var a=cn(),e=a["__core-js_shared__"];return pl=e,pl}var gl,yp;function y0(){if(yp)return gl;yp=1;var a=v0(),e=(function(){var o=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function t(o){return!!e&&e in o}return gl=t,gl}var ml,bp;function kp(){if(bp)return ml;bp=1;var a=Function.prototype,e=a.toString;function t(o){if(o!=null){try{return e.call(o)}catch(i){}try{return o+""}catch(i){}}return""}return ml=t,ml}var vl,wp;function b0(){if(wp)return vl;wp=1;var a=Ji(),e=y0(),t=kn(),o=kp(),i=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,h=c.toString,g=d.hasOwnProperty,v=RegExp("^"+h.call(g).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y(b){if(!t(b)||e(b))return!1;var x=a(b)?v:l;return x.test(o(b))}return vl=y,vl}var yl,Tp;function k0(){if(Tp)return yl;Tp=1;function a(e,t){return e==null?void 0:e[t]}return yl=a,yl}var bl,xp;function Tr(){if(xp)return bl;xp=1;var a=b0(),e=k0();function t(o,i){var l=e(o,i);return a(l)?l:void 0}return bl=t,bl}var kl,Ep;function Sp(){if(Ep)return kl;Ep=1;var a=Tr(),e=(function(){try{var t=a(Object,"defineProperty");return t({},"",{}),t}catch(o){}})();return kl=e,kl}var wl,Cp;function w0(){if(Cp)return wl;Cp=1;var a=p0(),e=Sp(),t=op(),o=e?function(i,l){return e(i,"toString",{configurable:!0,enumerable:!1,value:a(l),writable:!0})}:t;return wl=o,wl}var Tl,Bp;function T0(){if(Bp)return Tl;Bp=1;var a=800,e=16,t=Date.now;function o(i){var l=0,c=0;return function(){var d=t(),h=e-(d-c);if(c=d,h>0){if(++l>=a)return arguments[0]}else l=0;return i.apply(void 0,arguments)}}return Tl=o,Tl}var xl,Ap;function x0(){if(Ap)return xl;Ap=1;var a=w0(),e=T0(),t=e(a);return xl=t,xl}var El,Ip;function _p(){if(Ip)return El;Ip=1;var a=op(),e=h0(),t=x0();function o(i,l){return t(e(i,l,a),i+"")}return El=o,El}var Sl,Rp;function E0(){if(Rp)return Sl;Rp=1;var a=/\s/;function e(t){for(var o=t.length;o--&&a.test(t.charAt(o)););return o}return Sl=e,Sl}var Cl,Np;function S0(){if(Np)return Cl;Np=1;var a=E0(),e=/^\s+/;function t(o){return o&&o.slice(0,a(o)+1).replace(e,"")}return Cl=t,Cl}var Bl,Op;function wn(){if(Op)return Bl;Op=1;function a(e){return e!=null&&typeof e=="object"}return Bl=a,Bl}var Al,Lp;function C0(){if(Lp)return Al;Lp=1;var a=Nn(),e=wn(),t="[object Symbol]";function o(i){return typeof i=="symbol"||e(i)&&a(i)==t}return Al=o,Al}var Il,Dp;function Pp(){if(Dp)return Il;Dp=1;var a=S0(),e=kn(),t=C0(),o=NaN,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function h(g){if(typeof g=="number")return g;if(t(g))return o;if(e(g)){var v=typeof g.valueOf=="function"?g.valueOf():g;g=e(v)?v+"":v}if(typeof g!="string")return g===0?g:+g;g=a(g);var y=l.test(g);return y||c.test(g)?d(g.slice(2),y?2:8):i.test(g)?o:+g}return Il=h,Il}var _l,Mp;function B0(){if(Mp)return _l;Mp=1;var a=d0(),e=_p(),t=Pp(),o=e(function(i,l,c){return a(i,t(l)||0,c)});return _l=o,_l}var A0=B0();const I0=Ne(A0);var Rl,Fp;function _0(){if(Fp)return Rl;Fp=1;var a=Nn(),e=wn(),t="[object Boolean]";function o(i){return i===!0||i===!1||e(i)&&a(i)==t}return Rl=o,Rl}var R0=_0();const N0=Ne(R0);var Nl,zp;function es(){if(zp)return Nl;zp=1;var a=Object.prototype;function e(t){var o=t&&t.constructor,i=typeof o=="function"&&o.prototype||a;return t===i}return Nl=e,Nl}var Ol,Hp;function jp(){if(Hp)return Ol;Hp=1;function a(e,t){return function(o){return e(t(o))}}return Ol=a,Ol}var Ll,qp;function O0(){if(qp)return Ll;qp=1;var a=jp(),e=a(Object.keys,Object);return Ll=e,Ll}var Dl,Up;function Wp(){if(Up)return Dl;Up=1;var a=es(),e=O0(),t=Object.prototype,o=t.hasOwnProperty;function i(l){if(!a(l))return e(l);var c=[];for(var d in Object(l))o.call(l,d)&&d!="constructor"&&c.push(d);return c}return Dl=i,Dl}var Pl,Kp;function L0(){if(Kp)return Pl;Kp=1;var a=Tr(),e=cn(),t=a(e,"DataView");return Pl=t,Pl}var Ml,Vp;function Fl(){if(Vp)return Ml;Vp=1;var a=Tr(),e=cn(),t=a(e,"Map");return Ml=t,Ml}var zl,$p;function D0(){if($p)return zl;$p=1;var a=Tr(),e=cn(),t=a(e,"Promise");return zl=t,zl}var Hl,Gp;function P0(){if(Gp)return Hl;Gp=1;var a=Tr(),e=cn(),t=a(e,"Set");return Hl=t,Hl}var jl,Xp;function M0(){if(Xp)return jl;Xp=1;var a=Tr(),e=cn(),t=a(e,"WeakMap");return jl=t,jl}var ql,Yp;function Ul(){if(Yp)return ql;Yp=1;var a=L0(),e=Fl(),t=D0(),o=P0(),i=M0(),l=Nn(),c=kp(),d="[object Map]",h="[object Object]",g="[object Promise]",v="[object Set]",y="[object WeakMap]",b="[object DataView]",x=c(a),w=c(e),T=c(t),S=c(o),O=c(i),L=l;return(a&&L(new a(new ArrayBuffer(1)))!=b||e&&L(new e)!=d||t&&L(t.resolve())!=g||o&&L(new o)!=v||i&&L(new i)!=y)&&(L=function(U){var H=l(U),X=H==h?U.constructor:void 0,q=X?c(X):"";if(q)switch(q){case x:return b;case w:return d;case T:return g;case S:return v;case O:return y}return H}),ql=L,ql}var Wl,Qp;function F0(){if(Qp)return Wl;Qp=1;var a=Nn(),e=wn(),t="[object Arguments]";function o(i){return e(i)&&a(i)==t}return Wl=o,Wl}var Kl,Zp;function Vl(){if(Zp)return Kl;Zp=1;var a=F0(),e=wn(),t=Object.prototype,o=t.hasOwnProperty,i=t.propertyIsEnumerable,l=a((function(){return arguments})())?a:function(c){return e(c)&&o.call(c,"callee")&&!i.call(c,"callee")};return Kl=l,Kl}var $l,Jp;function Zr(){if(Jp)return $l;Jp=1;var a=Array.isArray;return $l=a,$l}var Gl,eg;function tg(){if(eg)return Gl;eg=1;var a=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=a}return Gl=e,Gl}var Xl,ng;function Jr(){if(ng)return Xl;ng=1;var a=Ji(),e=tg();function t(o){return o!=null&&e(o.length)&&!a(o)}return Xl=t,Xl}var Ho={exports:{}},Yl,rg;function z0(){if(rg)return Yl;rg=1;function a(){return!1}return Yl=a,Yl}Ho.exports;var og;function ts(){return og||(og=1,(function(a,e){var t=cn(),o=z0(),i=e&&!e.nodeType&&e,l=i&&!0&&a&&!a.nodeType&&a,c=l&&l.exports===i,d=c?t.Buffer:void 0,h=d?d.isBuffer:void 0,g=h||o;a.exports=g})(Ho,Ho.exports)),Ho.exports}var Ql,ig;function H0(){if(ig)return Ql;ig=1;var a=Nn(),e=tg(),t=wn(),o="[object Arguments]",i="[object Array]",l="[object Boolean]",c="[object Date]",d="[object Error]",h="[object Function]",g="[object Map]",v="[object Number]",y="[object Object]",b="[object RegExp]",x="[object Set]",w="[object String]",T="[object WeakMap]",S="[object ArrayBuffer]",O="[object DataView]",L="[object Float32Array]",U="[object Float64Array]",H="[object Int8Array]",X="[object Int16Array]",q="[object Int32Array]",W="[object Uint8Array]",F="[object Uint8ClampedArray]",ne="[object Uint16Array]",ce="[object Uint32Array]",Q={};Q[L]=Q[U]=Q[H]=Q[X]=Q[q]=Q[W]=Q[F]=Q[ne]=Q[ce]=!0,Q[o]=Q[i]=Q[S]=Q[l]=Q[O]=Q[c]=Q[d]=Q[h]=Q[g]=Q[v]=Q[y]=Q[b]=Q[x]=Q[w]=Q[T]=!1;function ye(Z){return t(Z)&&e(Z.length)&&!!Q[a(Z)]}return Ql=ye,Ql}var Zl,sg;function j0(){if(sg)return Zl;sg=1;function a(e){return function(t){return e(t)}}return Zl=a,Zl}var jo={exports:{}};jo.exports;var ag;function q0(){return ag||(ag=1,(function(a,e){var t=cp(),o=e&&!e.nodeType&&e,i=o&&!0&&a&&!a.nodeType&&a,l=i&&i.exports===o,c=l&&t.process,d=(function(){try{var h=i&&i.require&&i.require("util").types;return h||c&&c.binding&&c.binding("util")}catch(g){}})();a.exports=d})(jo,jo.exports)),jo.exports}var Jl,lg;function ns(){if(lg)return Jl;lg=1;var a=H0(),e=j0(),t=q0(),o=t&&t.isTypedArray,i=o?e(o):a;return Jl=i,Jl}var ec,cg;function U0(){if(cg)return ec;cg=1;var a=Wp(),e=Ul(),t=Vl(),o=Zr(),i=Jr(),l=ts(),c=es(),d=ns(),h="[object Map]",g="[object Set]",v=Object.prototype,y=v.hasOwnProperty;function b(x){if(x==null)return!0;if(i(x)&&(o(x)||typeof x=="string"||typeof x.splice=="function"||l(x)||d(x)||t(x)))return!x.length;var w=e(x);if(w==h||w==g)return!x.size;if(c(x))return!a(x).length;for(var T in x)if(y.call(x,T))return!1;return!0}return ec=b,ec}var W0=U0();const K0=Ne(W0);var tc,ug;function V0(){if(ug)return tc;ug=1;function a(){this.__data__=[],this.size=0}return tc=a,tc}var nc,dg;function qo(){if(dg)return nc;dg=1;function a(e,t){return e===t||e!==e&&t!==t}return nc=a,nc}var rc,fg;function rs(){if(fg)return rc;fg=1;var a=qo();function e(t,o){for(var i=t.length;i--;)if(a(t[i][0],o))return i;return-1}return rc=e,rc}var oc,hg;function $0(){if(hg)return oc;hg=1;var a=rs(),e=Array.prototype,t=e.splice;function o(i){var l=this.__data__,c=a(l,i);if(c<0)return!1;var d=l.length-1;return c==d?l.pop():t.call(l,c,1),--this.size,!0}return oc=o,oc}var ic,pg;function G0(){if(pg)return ic;pg=1;var a=rs();function e(t){var o=this.__data__,i=a(o,t);return i<0?void 0:o[i][1]}return ic=e,ic}var sc,gg;function X0(){if(gg)return sc;gg=1;var a=rs();function e(t){return a(this.__data__,t)>-1}return sc=e,sc}var ac,mg;function Y0(){if(mg)return ac;mg=1;var a=rs();function e(t,o){var i=this.__data__,l=a(i,t);return l<0?(++this.size,i.push([t,o])):i[l][1]=o,this}return ac=e,ac}var lc,vg;function os(){if(vg)return lc;vg=1;var a=V0(),e=$0(),t=G0(),o=X0(),i=Y0();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=o,l.prototype.set=i,lc=l,lc}var cc,yg;function Q0(){if(yg)return cc;yg=1;var a=os();function e(){this.__data__=new a,this.size=0}return cc=e,cc}var uc,bg;function Z0(){if(bg)return uc;bg=1;function a(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}return uc=a,uc}var dc,kg;function J0(){if(kg)return dc;kg=1;function a(e){return this.__data__.get(e)}return dc=a,dc}var fc,wg;function eT(){if(wg)return fc;wg=1;function a(e){return this.__data__.has(e)}return fc=a,fc}var hc,Tg;function is(){if(Tg)return hc;Tg=1;var a=Tr(),e=a(Object,"create");return hc=e,hc}var pc,xg;function tT(){if(xg)return pc;xg=1;var a=is();function e(){this.__data__=a?a(null):{},this.size=0}return pc=e,pc}var gc,Eg;function nT(){if(Eg)return gc;Eg=1;function a(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return gc=a,gc}var mc,Sg;function rT(){if(Sg)return mc;Sg=1;var a=is(),e="__lodash_hash_undefined__",t=Object.prototype,o=t.hasOwnProperty;function i(l){var c=this.__data__;if(a){var d=c[l];return d===e?void 0:d}return o.call(c,l)?c[l]:void 0}return mc=i,mc}var vc,Cg;function oT(){if(Cg)return vc;Cg=1;var a=is(),e=Object.prototype,t=e.hasOwnProperty;function o(i){var l=this.__data__;return a?l[i]!==void 0:t.call(l,i)}return vc=o,vc}var yc,Bg;function iT(){if(Bg)return yc;Bg=1;var a=is(),e="__lodash_hash_undefined__";function t(o,i){var l=this.__data__;return this.size+=this.has(o)?0:1,l[o]=a&&i===void 0?e:i,this}return yc=t,yc}var bc,Ag;function sT(){if(Ag)return bc;Ag=1;var a=tT(),e=nT(),t=rT(),o=oT(),i=iT();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=o,l.prototype.set=i,bc=l,bc}var kc,Ig;function aT(){if(Ig)return kc;Ig=1;var a=sT(),e=os(),t=Fl();function o(){this.size=0,this.__data__={hash:new a,map:new(t||e),string:new a}}return kc=o,kc}var wc,_g;function lT(){if(_g)return wc;_g=1;function a(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return wc=a,wc}var Tc,Rg;function ss(){if(Rg)return Tc;Rg=1;var a=lT();function e(t,o){var i=t.__data__;return a(o)?i[typeof o=="string"?"string":"hash"]:i.map}return Tc=e,Tc}var xc,Ng;function cT(){if(Ng)return xc;Ng=1;var a=ss();function e(t){var o=a(this,t).delete(t);return this.size-=o?1:0,o}return xc=e,xc}var Ec,Og;function uT(){if(Og)return Ec;Og=1;var a=ss();function e(t){return a(this,t).get(t)}return Ec=e,Ec}var Sc,Lg;function dT(){if(Lg)return Sc;Lg=1;var a=ss();function e(t){return a(this,t).has(t)}return Sc=e,Sc}var Cc,Dg;function fT(){if(Dg)return Cc;Dg=1;var a=ss();function e(t,o){var i=a(this,t),l=i.size;return i.set(t,o),this.size+=i.size==l?0:1,this}return Cc=e,Cc}var Bc,Pg;function Mg(){if(Pg)return Bc;Pg=1;var a=aT(),e=cT(),t=uT(),o=dT(),i=fT();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=o,l.prototype.set=i,Bc=l,Bc}var Ac,Fg;function hT(){if(Fg)return Ac;Fg=1;var a=os(),e=Fl(),t=Mg(),o=200;function i(l,c){var d=this.__data__;if(d instanceof a){var h=d.__data__;if(!e||h.length<o-1)return h.push([l,c]),this.size=++d.size,this;d=this.__data__=new t(h)}return d.set(l,c),this.size=d.size,this}return Ac=i,Ac}var Ic,zg;function Hg(){if(zg)return Ic;zg=1;var a=os(),e=Q0(),t=Z0(),o=J0(),i=eT(),l=hT();function c(d){var h=this.__data__=new a(d);this.size=h.size}return c.prototype.clear=e,c.prototype.delete=t,c.prototype.get=o,c.prototype.has=i,c.prototype.set=l,Ic=c,Ic}var _c,jg;function pT(){if(jg)return _c;jg=1;var a="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,a),this}return _c=e,_c}var Rc,qg;function gT(){if(qg)return Rc;qg=1;function a(e){return this.__data__.has(e)}return Rc=a,Rc}var Nc,Ug;function mT(){if(Ug)return Nc;Ug=1;var a=Mg(),e=pT(),t=gT();function o(i){var l=-1,c=i==null?0:i.length;for(this.__data__=new a;++l<c;)this.add(i[l])}return o.prototype.add=o.prototype.push=e,o.prototype.has=t,Nc=o,Nc}var Oc,Wg;function vT(){if(Wg)return Oc;Wg=1;function a(e,t){for(var o=-1,i=e==null?0:e.length;++o<i;)if(t(e[o],o,e))return!0;return!1}return Oc=a,Oc}var Lc,Kg;function yT(){if(Kg)return Lc;Kg=1;function a(e,t){return e.has(t)}return Lc=a,Lc}var Dc,Vg;function $g(){if(Vg)return Dc;Vg=1;var a=mT(),e=vT(),t=yT(),o=1,i=2;function l(c,d,h,g,v,y){var b=h&o,x=c.length,w=d.length;if(x!=w&&!(b&&w>x))return!1;var T=y.get(c),S=y.get(d);if(T&&S)return T==d&&S==c;var O=-1,L=!0,U=h&i?new a:void 0;for(y.set(c,d),y.set(d,c);++O<x;){var H=c[O],X=d[O];if(g)var q=b?g(X,H,O,d,c,y):g(H,X,O,c,d,y);if(q!==void 0){if(q)continue;L=!1;break}if(U){if(!e(d,function(W,F){if(!t(U,F)&&(H===W||v(H,W,h,g,y)))return U.push(F)})){L=!1;break}}else if(!(H===X||v(H,X,h,g,y))){L=!1;break}}return y.delete(c),y.delete(d),L}return Dc=l,Dc}var Pc,Gg;function Xg(){if(Gg)return Pc;Gg=1;var a=cn(),e=a.Uint8Array;return Pc=e,Pc}var Mc,Yg;function Qg(){if(Yg)return Mc;Yg=1;function a(e){var t=-1,o=Array(e.size);return e.forEach(function(i,l){o[++t]=[l,i]}),o}return Mc=a,Mc}var Fc,Zg;function Jg(){if(Zg)return Fc;Zg=1;function a(e){var t=-1,o=Array(e.size);return e.forEach(function(i){o[++t]=i}),o}return Fc=a,Fc}var zc,em;function bT(){if(em)return zc;em=1;var a=Zi(),e=Xg(),t=qo(),o=$g(),i=Qg(),l=Jg(),c=1,d=2,h="[object Boolean]",g="[object Date]",v="[object Error]",y="[object Map]",b="[object Number]",x="[object RegExp]",w="[object Set]",T="[object String]",S="[object Symbol]",O="[object ArrayBuffer]",L="[object DataView]",U=a?a.prototype:void 0,H=U?U.valueOf:void 0;function X(q,W,F,ne,ce,Q,ye){switch(F){case L:if(q.byteLength!=W.byteLength||q.byteOffset!=W.byteOffset)return!1;q=q.buffer,W=W.buffer;case O:return!(q.byteLength!=W.byteLength||!Q(new e(q),new e(W)));case h:case g:case b:return t(+q,+W);case v:return q.name==W.name&&q.message==W.message;case x:case T:return q==W+"";case y:var Z=i;case w:var we=ne&c;if(Z||(Z=l),q.size!=W.size&&!we)return!1;var Oe=ye.get(q);if(Oe)return Oe==W;ne|=d,ye.set(q,W);var xe=o(Z(q),Z(W),ne,ce,Q,ye);return ye.delete(q),xe;case S:if(H)return H.call(q)==H.call(W)}return!1}return zc=X,zc}var Hc,tm;function kT(){if(tm)return Hc;tm=1;function a(e,t){for(var o=-1,i=t.length,l=e.length;++o<i;)e[l+o]=t[o];return e}return Hc=a,Hc}var jc,nm;function wT(){if(nm)return jc;nm=1;var a=kT(),e=Zr();function t(o,i,l){var c=i(o);return e(o)?c:a(c,l(o))}return jc=t,jc}var qc,rm;function TT(){if(rm)return qc;rm=1;function a(e,t){for(var o=-1,i=e==null?0:e.length,l=0,c=[];++o<i;){var d=e[o];t(d,o,e)&&(c[l++]=d)}return c}return qc=a,qc}var Uc,om;function xT(){if(om)return Uc;om=1;function a(){return[]}return Uc=a,Uc}var Wc,im;function ET(){if(im)return Wc;im=1;var a=TT(),e=xT(),t=Object.prototype,o=t.propertyIsEnumerable,i=Object.getOwnPropertySymbols,l=i?function(c){return c==null?[]:(c=Object(c),a(i(c),function(d){return o.call(c,d)}))}:e;return Wc=l,Wc}var Kc,sm;function ST(){if(sm)return Kc;sm=1;function a(e,t){for(var o=-1,i=Array(e);++o<e;)i[o]=t(o);return i}return Kc=a,Kc}var Vc,am;function lm(){if(am)return Vc;am=1;var a=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(o,i){var l=typeof o;return i=i==null?a:i,!!i&&(l=="number"||l!="symbol"&&e.test(o))&&o>-1&&o%1==0&&o<i}return Vc=t,Vc}var $c,cm;function um(){if(cm)return $c;cm=1;var a=ST(),e=Vl(),t=Zr(),o=ts(),i=lm(),l=ns(),c=Object.prototype,d=c.hasOwnProperty;function h(g,v){var y=t(g),b=!y&&e(g),x=!y&&!b&&o(g),w=!y&&!b&&!x&&l(g),T=y||b||x||w,S=T?a(g.length,String):[],O=S.length;for(var L in g)(v||d.call(g,L))&&!(T&&(L=="length"||x&&(L=="offset"||L=="parent")||w&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||i(L,O)))&&S.push(L);return S}return $c=h,$c}var Gc,dm;function fm(){if(dm)return Gc;dm=1;var a=um(),e=Wp(),t=Jr();function o(i){return t(i)?a(i):e(i)}return Gc=o,Gc}var Xc,hm;function CT(){if(hm)return Xc;hm=1;var a=wT(),e=ET(),t=fm();function o(i){return a(i,t,e)}return Xc=o,Xc}var Yc,pm;function BT(){if(pm)return Yc;pm=1;var a=CT(),e=1,t=Object.prototype,o=t.hasOwnProperty;function i(l,c,d,h,g,v){var y=d&e,b=a(l),x=b.length,w=a(c),T=w.length;if(x!=T&&!y)return!1;for(var S=x;S--;){var O=b[S];if(!(y?O in c:o.call(c,O)))return!1}var L=v.get(l),U=v.get(c);if(L&&U)return L==c&&U==l;var H=!0;v.set(l,c),v.set(c,l);for(var X=y;++S<x;){O=b[S];var q=l[O],W=c[O];if(h)var F=y?h(W,q,O,c,l,v):h(q,W,O,l,c,v);if(!(F===void 0?q===W||g(q,W,d,h,v):F)){H=!1;break}X||(X=O=="constructor")}if(H&&!X){var ne=l.constructor,ce=c.constructor;ne!=ce&&"constructor"in l&&"constructor"in c&&!(typeof ne=="function"&&ne instanceof ne&&typeof ce=="function"&&ce instanceof ce)&&(H=!1)}return v.delete(l),v.delete(c),H}return Yc=i,Yc}var Qc,gm;function AT(){if(gm)return Qc;gm=1;var a=Hg(),e=$g(),t=bT(),o=BT(),i=Ul(),l=Zr(),c=ts(),d=ns(),h=1,g="[object Arguments]",v="[object Array]",y="[object Object]",b=Object.prototype,x=b.hasOwnProperty;function w(T,S,O,L,U,H){var X=l(T),q=l(S),W=X?v:i(T),F=q?v:i(S);W=W==g?y:W,F=F==g?y:F;var ne=W==y,ce=F==y,Q=W==F;if(Q&&c(T)){if(!c(S))return!1;X=!0,ne=!1}if(Q&&!ne)return H||(H=new a),X||d(T)?e(T,S,O,L,U,H):t(T,S,W,O,L,U,H);if(!(O&h)){var ye=ne&&x.call(T,"__wrapped__"),Z=ce&&x.call(S,"__wrapped__");if(ye||Z){var we=ye?T.value():T,Oe=Z?S.value():S;return H||(H=new a),U(we,Oe,O,L,H)}}return Q?(H||(H=new a),o(T,S,O,L,U,H)):!1}return Qc=w,Qc}var Zc,mm;function IT(){if(mm)return Zc;mm=1;var a=AT(),e=wn();function t(o,i,l,c,d){return o===i?!0:o==null||i==null||!e(o)&&!e(i)?o!==o&&i!==i:a(o,i,l,c,t,d)}return Zc=t,Zc}var Jc,vm;function _T(){if(vm)return Jc;vm=1;var a=IT();function e(t,o){return a(t,o)}return Jc=e,Jc}var RT=_T();const NT=Ne(RT);var OT=Ji();const LT=Ne(OT);var eu,ym;function DT(){if(ym)return eu;ym=1;var a=Nn(),e=wn(),t="[object Number]";function o(i){return typeof i=="number"||e(i)&&a(i)==t}return eu=o,eu}var PT=DT();const MT=Ne(PT);var tu,bm;function km(){if(bm)return tu;bm=1;var a=jp(),e=a(Object.getPrototypeOf,Object);return tu=e,tu}var nu,wm;function Tm(){if(wm)return nu;wm=1;var a=Nn(),e=km(),t=wn(),o="[object Object]",i=Function.prototype,l=Object.prototype,c=i.toString,d=l.hasOwnProperty,h=c.call(Object);function g(v){if(!t(v)||a(v)!=o)return!1;var y=e(v);if(y===null)return!0;var b=d.call(y,"constructor")&&y.constructor;return typeof b=="function"&&b instanceof b&&c.call(b)==h}return nu=g,nu}var FT=Tm();const zT=Ne(FT);var ru,xm;function Em(){if(xm)return ru;xm=1;var a=Nn(),e=Zr(),t=wn(),o="[object String]";function i(l){return typeof l=="string"||!e(l)&&t(l)&&a(l)==o}return ru=i,ru}var HT=Em();const jT=Ne(HT);var ou,Sm;function qT(){if(Sm)return ou;Sm=1;function a(e){return e===void 0}return ou=a,ou}var UT=qT();const WT=Ne(UT);var iu,Cm;function su(){if(Cm)return iu;Cm=1;var a=Sp();function e(t,o,i){o=="__proto__"&&a?a(t,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[o]=i}return iu=e,iu}var au,Bm;function Am(){if(Bm)return au;Bm=1;var a=su(),e=qo();function t(o,i,l){(l!==void 0&&!e(o[i],l)||l===void 0&&!(i in o))&&a(o,i,l)}return au=t,au}var lu,Im;function KT(){if(Im)return lu;Im=1;function a(e){return function(t,o,i){for(var l=-1,c=Object(t),d=i(t),h=d.length;h--;){var g=d[e?h:++l];if(o(c[g],g,c)===!1)break}return t}}return lu=a,lu}var cu,_m;function VT(){if(_m)return cu;_m=1;var a=KT(),e=a();return cu=e,cu}var Uo={exports:{}};Uo.exports;var Rm;function $T(){return Rm||(Rm=1,(function(a,e){var t=cn(),o=e&&!e.nodeType&&e,i=o&&!0&&a&&!a.nodeType&&a,l=i&&i.exports===o,c=l?t.Buffer:void 0,d=c?c.allocUnsafe:void 0;function h(g,v){if(v)return g.slice();var y=g.length,b=d?d(y):new g.constructor(y);return g.copy(b),b}a.exports=h})(Uo,Uo.exports)),Uo.exports}var uu,Nm;function GT(){if(Nm)return uu;Nm=1;var a=Xg();function e(t){var o=new t.constructor(t.byteLength);return new a(o).set(new a(t)),o}return uu=e,uu}var du,Om;function XT(){if(Om)return du;Om=1;var a=GT();function e(t,o){var i=o?a(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}return du=e,du}var fu,Lm;function Dm(){if(Lm)return fu;Lm=1;function a(e,t){var o=-1,i=e.length;for(t||(t=Array(i));++o<i;)t[o]=e[o];return t}return fu=a,fu}var hu,Pm;function YT(){if(Pm)return hu;Pm=1;var a=kn(),e=Object.create,t=(function(){function o(){}return function(i){if(!a(i))return{};if(e)return e(i);o.prototype=i;var l=new o;return o.prototype=void 0,l}})();return hu=t,hu}var pu,Mm;function QT(){if(Mm)return pu;Mm=1;var a=YT(),e=km(),t=es();function o(i){return typeof i.constructor=="function"&&!t(i)?a(e(i)):{}}return pu=o,pu}var gu,Fm;function ZT(){if(Fm)return gu;Fm=1;var a=Jr(),e=wn();function t(o){return e(o)&&a(o)}return gu=t,gu}var mu,zm;function Hm(){if(zm)return mu;zm=1;function a(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}return mu=a,mu}var vu,jm;function JT(){if(jm)return vu;jm=1;var a=su(),e=qo(),t=Object.prototype,o=t.hasOwnProperty;function i(l,c,d){var h=l[c];(!(o.call(l,c)&&e(h,d))||d===void 0&&!(c in l))&&a(l,c,d)}return vu=i,vu}var yu,qm;function e1(){if(qm)return yu;qm=1;var a=JT(),e=su();function t(o,i,l,c){var d=!l;l||(l={});for(var h=-1,g=i.length;++h<g;){var v=i[h],y=c?c(l[v],o[v],v,l,o):void 0;y===void 0&&(y=o[v]),d?e(l,v,y):a(l,v,y)}return l}return yu=t,yu}var bu,Um;function t1(){if(Um)return bu;Um=1;function a(e){var t=[];if(e!=null)for(var o in Object(e))t.push(o);return t}return bu=a,bu}var ku,Wm;function n1(){if(Wm)return ku;Wm=1;var a=kn(),e=es(),t=t1(),o=Object.prototype,i=o.hasOwnProperty;function l(c){if(!a(c))return t(c);var d=e(c),h=[];for(var g in c)g=="constructor"&&(d||!i.call(c,g))||h.push(g);return h}return ku=l,ku}var wu,Km;function Vm(){if(Km)return wu;Km=1;var a=um(),e=n1(),t=Jr();function o(i){return t(i)?a(i,!0):e(i)}return wu=o,wu}var Tu,$m;function r1(){if($m)return Tu;$m=1;var a=e1(),e=Vm();function t(o){return a(o,e(o))}return Tu=t,Tu}var xu,Gm;function o1(){if(Gm)return xu;Gm=1;var a=Am(),e=$T(),t=XT(),o=Dm(),i=QT(),l=Vl(),c=Zr(),d=ZT(),h=ts(),g=Ji(),v=kn(),y=Tm(),b=ns(),x=Hm(),w=r1();function T(S,O,L,U,H,X,q){var W=x(S,L),F=x(O,L),ne=q.get(F);if(ne){a(S,L,ne);return}var ce=X?X(W,F,L+"",S,O,q):void 0,Q=ce===void 0;if(Q){var ye=c(F),Z=!ye&&h(F),we=!ye&&!Z&&b(F);ce=F,ye||Z||we?c(W)?ce=W:d(W)?ce=o(W):Z?(Q=!1,ce=e(F,!0)):we?(Q=!1,ce=t(F,!0)):ce=[]:y(F)||l(F)?(ce=W,l(W)?ce=w(W):(!v(W)||g(W))&&(ce=i(F))):Q=!1}Q&&(q.set(F,ce),H(ce,F,U,X,q),q.delete(F)),a(S,L,ce)}return xu=T,xu}var Eu,Xm;function i1(){if(Xm)return Eu;Xm=1;var a=Hg(),e=Am(),t=VT(),o=o1(),i=kn(),l=Vm(),c=Hm();function d(h,g,v,y,b){h!==g&&t(g,function(x,w){if(b||(b=new a),i(x))o(h,g,w,v,d,y,b);else{var T=y?y(c(h,w),x,w+"",h,g,b):void 0;T===void 0&&(T=x),e(h,w,T)}},l)}return Eu=d,Eu}var Su,Ym;function s1(){if(Ym)return Su;Ym=1;var a=qo(),e=Jr(),t=lm(),o=kn();function i(l,c,d){if(!o(d))return!1;var h=typeof c;return(h=="number"?e(d)&&t(c,d.length):h=="string"&&c in d)?a(d[c],l):!1}return Su=i,Su}var Cu,Qm;function a1(){if(Qm)return Cu;Qm=1;var a=_p(),e=s1();function t(o){return a(function(i,l){var c=-1,d=l.length,h=d>1?l[d-1]:void 0,g=d>2?l[2]:void 0;for(h=o.length>3&&typeof h=="function"?(d--,h):void 0,g&&e(l[0],l[1],g)&&(h=d<3?void 0:h,d=1),i=Object(i);++c<d;){var v=l[c];v&&o(i,v,c,h)}return i})}return Cu=t,Cu}var Bu,Zm;function l1(){if(Zm)return Bu;Zm=1;var a=i1(),e=a1(),t=e(function(o,i,l,c){a(o,i,l,c)});return Bu=t,Bu}var c1=l1();const u1=Ne(c1);var Au,Jm;function d1(){if(Jm)return Au;Jm=1;var a=cn(),e=function(){return a.Date.now()};return Au=e,Au}var Iu,ev;function f1(){if(ev)return Iu;ev=1;var a=kn(),e=d1(),t=Pp(),o="Expected a function",i=Math.max,l=Math.min;function c(d,h,g){var v,y,b,x,w,T,S=0,O=!1,L=!1,U=!0;if(typeof d!="function")throw new TypeError(o);h=t(h)||0,a(g)&&(O=!!g.leading,L="maxWait"in g,b=L?i(t(g.maxWait)||0,h):b,U="trailing"in g?!!g.trailing:U);function H(Z){var we=v,Oe=y;return v=y=void 0,S=Z,x=d.apply(Oe,we),x}function X(Z){return S=Z,w=setTimeout(F,h),O?H(Z):x}function q(Z){var we=Z-T,Oe=Z-S,xe=h-we;return L?l(xe,b-Oe):xe}function W(Z){var we=Z-T,Oe=Z-S;return T===void 0||we>=h||we<0||L&&Oe>=b}function F(){var Z=e();if(W(Z))return ne(Z);w=setTimeout(F,q(Z))}function ne(Z){return w=void 0,U&&v?H(Z):(v=y=void 0,x)}function ce(){w!==void 0&&clearTimeout(w),S=0,v=T=y=w=void 0}function Q(){return w===void 0?x:ne(e())}function ye(){var Z=e(),we=W(Z);if(v=arguments,y=this,T=Z,we){if(w===void 0)return X(T);if(L)return clearTimeout(w),w=setTimeout(F,h),H(T)}return w===void 0&&(w=setTimeout(F,h)),x}return ye.cancel=ce,ye.flush=Q,ye}return Iu=c,Iu}var _u,tv;function h1(){if(tv)return _u;tv=1;var a=f1(),e=kn(),t="Expected a function";function o(i,l,c){var d=!0,h=!0;if(typeof i!="function")throw new TypeError(t);return e(c)&&(d="leading"in c?!!c.leading:d,h="trailing"in c?!!c.trailing:h),a(i,l,{leading:d,maxWait:l,trailing:h})}return _u=o,_u}var p1=h1();const g1=Ne(p1);var Ru,nv;function m1(){if(nv)return Ru;nv=1;function a(e){for(var t,o=[];!(t=e.next()).done;)o.push(t.value);return o}return Ru=a,Ru}var Nu,rv;function v1(){if(rv)return Nu;rv=1;function a(e){return e.split("")}return Nu=a,Nu}var Ou,ov;function y1(){if(ov)return Ou;ov=1;var a="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",i=e+t+o,l="\\ufe0e\\ufe0f",c="\\u200d",d=RegExp("["+c+a+i+l+"]");function h(g){return d.test(g)}return Ou=h,Ou}var Lu,iv;function b1(){if(iv)return Lu;iv=1;var a="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",i=e+t+o,l="\\ufe0e\\ufe0f",c="["+a+"]",d="["+i+"]",h="\\ud83c[\\udffb-\\udfff]",g="(?:"+d+"|"+h+")",v="[^"+a+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",w=g+"?",T="["+l+"]?",S="(?:"+x+"(?:"+[v,y,b].join("|")+")"+T+w+")*",O=T+w+S,L="(?:"+[v+d+"?",d,y,b,c].join("|")+")",U=RegExp(h+"(?="+h+")|"+L+O,"g");function H(X){return X.match(U)||[]}return Lu=H,Lu}var Du,sv;function k1(){if(sv)return Du;sv=1;var a=v1(),e=y1(),t=b1();function o(i){return e(i)?t(i):a(i)}return Du=o,Du}var Pu,av;function w1(){if(av)return Pu;av=1;function a(e,t){for(var o=-1,i=e==null?0:e.length,l=Array(i);++o<i;)l[o]=t(e[o],o,e);return l}return Pu=a,Pu}var Mu,lv;function T1(){if(lv)return Mu;lv=1;var a=w1();function e(t,o){return a(o,function(i){return t[i]})}return Mu=e,Mu}var Fu,cv;function x1(){if(cv)return Fu;cv=1;var a=T1(),e=fm();function t(o){return o==null?[]:a(o,e(o))}return Fu=t,Fu}var zu,uv;function E1(){if(uv)return zu;uv=1;var a=Zi(),e=Dm(),t=Ul(),o=Jr(),i=Em(),l=m1(),c=Qg(),d=Jg(),h=k1(),g=x1(),v="[object Map]",y="[object Set]",b=a?a.iterator:void 0;function x(w){if(!w)return[];if(o(w))return i(w)?h(w):e(w);if(b&&w[b])return l(w[b]());var T=t(w),S=T==v?c:T==y?d:g;return S(w)}return zu=x,zu}var S1=E1();const C1=Ne(S1);var dv=(a=>(a.VERBOSE="VERBOSE",a.INFO="INFO",a.WARN="WARN",a.ERROR="ERROR",a))(dv||{});const as=()=>"0.4.0",ie={BACKSPACE:8,TAB:9,ENTER:13,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46},B1={LEFT:0},A1=1e8,I1=16,Yt=(()=>{try{return Function("return this")()}catch(a){return}})();Yt&&typeof Yt.window=="undefined"&&(Yt.window=Yt);const ls=()=>{if(Yt!=null&&Yt.window)return Yt.window},fv=()=>{if(Yt!=null&&Yt.navigator)return Yt.navigator;const a=ls();return a==null?void 0:a.navigator},Wo=(a,e,t="log",o,i="color: inherit")=>{const l=typeof console=="undefined"?void 0:console;if(!l||typeof l[t]!="function")return;const c=["info","log","warn","error"].includes(t),d=[];switch(Wo.logLevel){case"ERROR":if(t!=="error")return;break;case"WARN":if(!["error","warn"].includes(t))return;break;case"INFO":if(!c||a)return;break}o&&d.push(o);const h=`Blok ${as()}`,g=`line-height: 1em;
1
+ (function(qe,Le){typeof exports=="object"&&typeof module!="undefined"?module.exports=Le():typeof define=="function"&&define.amd?define(Le):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe.Blok=Le())})(this,(function(){"use strict";var WA=Object.defineProperty,KA=Object.defineProperties;var VA=Object.getOwnPropertyDescriptors;var tl=Object.getOwnPropertySymbols;var s0=Object.prototype.hasOwnProperty,a0=Object.prototype.propertyIsEnumerable;var i0=(qe,Le,ht)=>Le in qe?WA(qe,Le,{enumerable:!0,configurable:!0,writable:!0,value:ht}):qe[Le]=ht,de=(qe,Le)=>{for(var ht in Le||(Le={}))s0.call(Le,ht)&&i0(qe,ht,Le[ht]);if(tl)for(var ht of tl(Le))a0.call(Le,ht)&&i0(qe,ht,Le[ht]);return qe},ot=(qe,Le)=>KA(qe,VA(Le));var l0=(qe,Le)=>{var ht={};for(var Zt in qe)s0.call(qe,Zt)&&Le.indexOf(Zt)<0&&(ht[Zt]=qe[Zt]);if(qe!=null&&tl)for(var Zt of tl(qe))Le.indexOf(Zt)<0&&a0.call(qe,Zt)&&(ht[Zt]=qe[Zt]);return ht};var Hr;var qe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Le(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ht,Zt;function c0(){if(Zt)return ht;Zt=1;function a(){}return ht=Object.assign(a,{default:a,register:a,revert:function(){},__esModule:!0}),ht}c0(),typeof Element.prototype.scrollIntoViewIfNeeded=="undefined"&&(Element.prototype.scrollIntoViewIfNeeded=function(a){const e=a!=null?a:!0,t=this.parentElement;if(!t)return;const r=window.getComputedStyle(t,null),i=parseInt(r.getPropertyValue("border-top-width")),l=parseInt(r.getPropertyValue("border-left-width")),c=this.offsetTop-t.offsetTop<t.scrollTop,d=this.offsetTop-t.offsetTop+this.clientHeight-i>t.scrollTop+t.clientHeight,h=this.offsetLeft-t.offsetLeft<t.scrollLeft,g=this.offsetLeft-t.offsetLeft+this.clientWidth-l>t.scrollLeft+t.clientWidth,m=c&&!d;(c||d)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-i+this.clientHeight/2),(h||g)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-l+this.clientWidth/2),(c||d||h||g)&&!e&&this.scrollIntoView(m)});const u0=globalThis.setTimeout.bind(globalThis),d0=globalThis.clearTimeout.bind(globalThis),Zi=new Map,f0=a=>{const e=Number(a);return Number.isFinite(e)&&e>0?e:Date.now()};typeof window.requestIdleCallback=="undefined"&&(window.requestIdleCallback=function(a){const e=Date.now(),t={},r=u0(()=>{const l=t.value;typeof l=="number"&&Zi.delete(l),a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1),i=f0(r);return t.value=i,Zi.set(i,r),i}),typeof window.cancelIdleCallback=="undefined"&&(window.cancelIdleCallback=function(a){const e=Zi.get(a);e!==void 0&&(Zi.delete(a),d0(e)),globalThis.clearTimeout(a)});const h0="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let p0=(a=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(a|=0));for(;a--;)e+=h0[t[a]&63];return e};var nl,rp;function g0(){if(rp)return nl;rp=1;var a="Expected a function";function e(t,r,i){if(typeof t!="function")throw new TypeError(a);return setTimeout(function(){t.apply(void 0,i)},r)}return nl=e,nl}var rl,op;function ip(){if(op)return rl;op=1;function a(e){return e}return rl=a,rl}var ol,sp;function m0(){if(sp)return ol;sp=1;function a(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}return ol=a,ol}var il,ap;function v0(){if(ap)return il;ap=1;var a=m0(),e=Math.max;function t(r,i,l){return i=e(i===void 0?r.length-1:i,0),function(){for(var c=arguments,d=-1,h=e(c.length-i,0),g=Array(h);++d<h;)g[d]=c[i+d];d=-1;for(var m=Array(i+1);++d<i;)m[d]=c[d];return m[i]=l(g),a(r,this,m)}}return il=t,il}var sl,lp;function y0(){if(lp)return sl;lp=1;function a(e){return function(){return e}}return sl=a,sl}var al,cp;function up(){if(cp)return al;cp=1;var a=typeof qe=="object"&&qe&&qe.Object===Object&&qe;return al=a,al}var ll,dp;function fn(){if(dp)return ll;dp=1;var a=up(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=a||e||Function("return this")();return ll=t,ll}var cl,fp;function Ji(){if(fp)return cl;fp=1;var a=fn(),e=a.Symbol;return cl=e,cl}var ul,hp;function b0(){if(hp)return ul;hp=1;var a=Ji(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,i=a?a.toStringTag:void 0;function l(c){var d=t.call(c,i),h=c[i];try{c[i]=void 0;var g=!0}catch(y){}var m=r.call(c);return g&&(d?c[i]=h:delete c[i]),m}return ul=l,ul}var dl,pp;function k0(){if(pp)return dl;pp=1;var a=Object.prototype,e=a.toString;function t(r){return e.call(r)}return dl=t,dl}var fl,gp;function On(){if(gp)return fl;gp=1;var a=Ji(),e=b0(),t=k0(),r="[object Null]",i="[object Undefined]",l=a?a.toStringTag:void 0;function c(d){return d==null?d===void 0?i:r:l&&l in Object(d)?e(d):t(d)}return fl=c,fl}var hl,mp;function xn(){if(mp)return hl;mp=1;function a(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return hl=a,hl}var pl,vp;function es(){if(vp)return pl;vp=1;var a=On(),e=xn(),t="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",l="[object Proxy]";function c(d){if(!e(d))return!1;var h=a(d);return h==r||h==i||h==t||h==l}return pl=c,pl}var gl,yp;function w0(){if(yp)return gl;yp=1;var a=fn(),e=a["__core-js_shared__"];return gl=e,gl}var ml,bp;function T0(){if(bp)return ml;bp=1;var a=w0(),e=(function(){var r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function t(r){return!!e&&e in r}return ml=t,ml}var vl,kp;function wp(){if(kp)return vl;kp=1;var a=Function.prototype,e=a.toString;function t(r){if(r!=null){try{return e.call(r)}catch(i){}try{return r+""}catch(i){}}return""}return vl=t,vl}var yl,Tp;function x0(){if(Tp)return yl;Tp=1;var a=es(),e=T0(),t=xn(),r=wp(),i=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,h=c.toString,g=d.hasOwnProperty,m=RegExp("^"+h.call(g).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y(b){if(!t(b)||e(b))return!1;var T=a(b)?m:l;return T.test(r(b))}return yl=y,yl}var bl,xp;function S0(){if(xp)return bl;xp=1;function a(e,t){return e==null?void 0:e[t]}return bl=a,bl}var kl,Sp;function Sr(){if(Sp)return kl;Sp=1;var a=x0(),e=S0();function t(r,i){var l=e(r,i);return a(l)?l:void 0}return kl=t,kl}var wl,Ep;function Cp(){if(Ep)return wl;Ep=1;var a=Sr(),e=(function(){try{var t=a(Object,"defineProperty");return t({},"",{}),t}catch(r){}})();return wl=e,wl}var Tl,Bp;function E0(){if(Bp)return Tl;Bp=1;var a=y0(),e=Cp(),t=ip(),r=e?function(i,l){return e(i,"toString",{configurable:!0,enumerable:!1,value:a(l),writable:!0})}:t;return Tl=r,Tl}var xl,Ap;function C0(){if(Ap)return xl;Ap=1;var a=800,e=16,t=Date.now;function r(i){var l=0,c=0;return function(){var d=t(),h=e-(d-c);if(c=d,h>0){if(++l>=a)return arguments[0]}else l=0;return i.apply(void 0,arguments)}}return xl=r,xl}var Sl,Ip;function B0(){if(Ip)return Sl;Ip=1;var a=E0(),e=C0(),t=e(a);return Sl=t,Sl}var El,Rp;function _p(){if(Rp)return El;Rp=1;var a=ip(),e=v0(),t=B0();function r(i,l){return t(e(i,l,a),i+"")}return El=r,El}var Cl,Np;function A0(){if(Np)return Cl;Np=1;var a=/\s/;function e(t){for(var r=t.length;r--&&a.test(t.charAt(r)););return r}return Cl=e,Cl}var Bl,Op;function I0(){if(Op)return Bl;Op=1;var a=A0(),e=/^\s+/;function t(r){return r&&r.slice(0,a(r)+1).replace(e,"")}return Bl=t,Bl}var Al,Lp;function Sn(){if(Lp)return Al;Lp=1;function a(e){return e!=null&&typeof e=="object"}return Al=a,Al}var Il,Dp;function R0(){if(Dp)return Il;Dp=1;var a=On(),e=Sn(),t="[object Symbol]";function r(i){return typeof i=="symbol"||e(i)&&a(i)==t}return Il=r,Il}var Rl,Pp;function Mp(){if(Pp)return Rl;Pp=1;var a=I0(),e=xn(),t=R0(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function h(g){if(typeof g=="number")return g;if(t(g))return r;if(e(g)){var m=typeof g.valueOf=="function"?g.valueOf():g;g=e(m)?m+"":m}if(typeof g!="string")return g===0?g:+g;g=a(g);var y=l.test(g);return y||c.test(g)?d(g.slice(2),y?2:8):i.test(g)?r:+g}return Rl=h,Rl}var _l,Fp;function _0(){if(Fp)return _l;Fp=1;var a=g0(),e=_p(),t=Mp(),r=e(function(i,l,c){return a(i,t(l)||0,c)});return _l=r,_l}var N0=_0();const O0=Le(N0);var Nl,Hp;function L0(){if(Hp)return Nl;Hp=1;var a=On(),e=Sn(),t="[object Boolean]";function r(i){return i===!0||i===!1||e(i)&&a(i)==t}return Nl=r,Nl}var D0=L0();const P0=Le(D0);var Ol,zp;function ts(){if(zp)return Ol;zp=1;var a=Object.prototype;function e(t){var r=t&&t.constructor,i=typeof r=="function"&&r.prototype||a;return t===i}return Ol=e,Ol}var Ll,jp;function qp(){if(jp)return Ll;jp=1;function a(e,t){return function(r){return e(t(r))}}return Ll=a,Ll}var Dl,Up;function M0(){if(Up)return Dl;Up=1;var a=qp(),e=a(Object.keys,Object);return Dl=e,Dl}var Pl,Wp;function Kp(){if(Wp)return Pl;Wp=1;var a=ts(),e=M0(),t=Object.prototype,r=t.hasOwnProperty;function i(l){if(!a(l))return e(l);var c=[];for(var d in Object(l))r.call(l,d)&&d!="constructor"&&c.push(d);return c}return Pl=i,Pl}var Ml,Vp;function F0(){if(Vp)return Ml;Vp=1;var a=Sr(),e=fn(),t=a(e,"DataView");return Ml=t,Ml}var Fl,$p;function Hl(){if($p)return Fl;$p=1;var a=Sr(),e=fn(),t=a(e,"Map");return Fl=t,Fl}var zl,Gp;function H0(){if(Gp)return zl;Gp=1;var a=Sr(),e=fn(),t=a(e,"Promise");return zl=t,zl}var jl,Xp;function z0(){if(Xp)return jl;Xp=1;var a=Sr(),e=fn(),t=a(e,"Set");return jl=t,jl}var ql,Yp;function j0(){if(Yp)return ql;Yp=1;var a=Sr(),e=fn(),t=a(e,"WeakMap");return ql=t,ql}var Ul,Qp;function Wl(){if(Qp)return Ul;Qp=1;var a=F0(),e=Hl(),t=H0(),r=z0(),i=j0(),l=On(),c=wp(),d="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",y="[object WeakMap]",b="[object DataView]",T=c(a),k=c(e),x=c(t),S=c(r),R=c(i),O=l;return(a&&O(new a(new ArrayBuffer(1)))!=b||e&&O(new e)!=d||t&&O(t.resolve())!=g||r&&O(new r)!=m||i&&O(new i)!=y)&&(O=function(H){var P=l(H),$=P==h?H.constructor:void 0,j=$?c($):"";if(j)switch(j){case T:return b;case k:return d;case x:return g;case S:return m;case R:return y}return P}),Ul=O,Ul}var Kl,Zp;function q0(){if(Zp)return Kl;Zp=1;var a=On(),e=Sn(),t="[object Arguments]";function r(i){return e(i)&&a(i)==t}return Kl=r,Kl}var Vl,Jp;function $l(){if(Jp)return Vl;Jp=1;var a=q0(),e=Sn(),t=Object.prototype,r=t.hasOwnProperty,i=t.propertyIsEnumerable,l=a((function(){return arguments})())?a:function(c){return e(c)&&r.call(c,"callee")&&!i.call(c,"callee")};return Vl=l,Vl}var Gl,eg;function eo(){if(eg)return Gl;eg=1;var a=Array.isArray;return Gl=a,Gl}var Xl,tg;function ng(){if(tg)return Xl;tg=1;var a=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=a}return Xl=e,Xl}var Yl,rg;function to(){if(rg)return Yl;rg=1;var a=es(),e=ng();function t(r){return r!=null&&e(r.length)&&!a(r)}return Yl=t,Yl}var qo={exports:{}},Ql,og;function U0(){if(og)return Ql;og=1;function a(){return!1}return Ql=a,Ql}qo.exports;var ig;function ns(){return ig||(ig=1,(function(a,e){var t=fn(),r=U0(),i=e&&!e.nodeType&&e,l=i&&!0&&a&&!a.nodeType&&a,c=l&&l.exports===i,d=c?t.Buffer:void 0,h=d?d.isBuffer:void 0,g=h||r;a.exports=g})(qo,qo.exports)),qo.exports}var Zl,sg;function W0(){if(sg)return Zl;sg=1;var a=On(),e=ng(),t=Sn(),r="[object Arguments]",i="[object Array]",l="[object Boolean]",c="[object Date]",d="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",y="[object Object]",b="[object RegExp]",T="[object Set]",k="[object String]",x="[object WeakMap]",S="[object ArrayBuffer]",R="[object DataView]",O="[object Float32Array]",H="[object Float64Array]",P="[object Int8Array]",$="[object Int16Array]",j="[object Int32Array]",U="[object Uint8Array]",M="[object Uint8ClampedArray]",X="[object Uint16Array]",ae="[object Uint32Array]",G={};G[O]=G[H]=G[P]=G[$]=G[j]=G[U]=G[M]=G[X]=G[ae]=!0,G[r]=G[i]=G[S]=G[l]=G[R]=G[c]=G[d]=G[h]=G[g]=G[m]=G[y]=G[b]=G[T]=G[k]=G[x]=!1;function ke(Z){return t(Z)&&e(Z.length)&&!!G[a(Z)]}return Zl=ke,Zl}var Jl,ag;function K0(){if(ag)return Jl;ag=1;function a(e){return function(t){return e(t)}}return Jl=a,Jl}var Uo={exports:{}};Uo.exports;var lg;function V0(){return lg||(lg=1,(function(a,e){var t=up(),r=e&&!e.nodeType&&e,i=r&&!0&&a&&!a.nodeType&&a,l=i&&i.exports===r,c=l&&t.process,d=(function(){try{var h=i&&i.require&&i.require("util").types;return h||c&&c.binding&&c.binding("util")}catch(g){}})();a.exports=d})(Uo,Uo.exports)),Uo.exports}var ec,cg;function rs(){if(cg)return ec;cg=1;var a=W0(),e=K0(),t=V0(),r=t&&t.isTypedArray,i=r?e(r):a;return ec=i,ec}var tc,ug;function $0(){if(ug)return tc;ug=1;var a=Kp(),e=Wl(),t=$l(),r=eo(),i=to(),l=ns(),c=ts(),d=rs(),h="[object Map]",g="[object Set]",m=Object.prototype,y=m.hasOwnProperty;function b(T){if(T==null)return!0;if(i(T)&&(r(T)||typeof T=="string"||typeof T.splice=="function"||l(T)||d(T)||t(T)))return!T.length;var k=e(T);if(k==h||k==g)return!T.size;if(c(T))return!a(T).length;for(var x in T)if(y.call(T,x))return!1;return!0}return tc=b,tc}var G0=$0();const X0=Le(G0);var nc,dg;function Y0(){if(dg)return nc;dg=1;function a(){this.__data__=[],this.size=0}return nc=a,nc}var rc,fg;function Wo(){if(fg)return rc;fg=1;function a(e,t){return e===t||e!==e&&t!==t}return rc=a,rc}var oc,hg;function os(){if(hg)return oc;hg=1;var a=Wo();function e(t,r){for(var i=t.length;i--;)if(a(t[i][0],r))return i;return-1}return oc=e,oc}var ic,pg;function Q0(){if(pg)return ic;pg=1;var a=os(),e=Array.prototype,t=e.splice;function r(i){var l=this.__data__,c=a(l,i);if(c<0)return!1;var d=l.length-1;return c==d?l.pop():t.call(l,c,1),--this.size,!0}return ic=r,ic}var sc,gg;function Z0(){if(gg)return sc;gg=1;var a=os();function e(t){var r=this.__data__,i=a(r,t);return i<0?void 0:r[i][1]}return sc=e,sc}var ac,mg;function J0(){if(mg)return ac;mg=1;var a=os();function e(t){return a(this.__data__,t)>-1}return ac=e,ac}var lc,vg;function eT(){if(vg)return lc;vg=1;var a=os();function e(t,r){var i=this.__data__,l=a(i,t);return l<0?(++this.size,i.push([t,r])):i[l][1]=r,this}return lc=e,lc}var cc,yg;function is(){if(yg)return cc;yg=1;var a=Y0(),e=Q0(),t=Z0(),r=J0(),i=eT();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=r,l.prototype.set=i,cc=l,cc}var uc,bg;function tT(){if(bg)return uc;bg=1;var a=is();function e(){this.__data__=new a,this.size=0}return uc=e,uc}var dc,kg;function nT(){if(kg)return dc;kg=1;function a(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}return dc=a,dc}var fc,wg;function rT(){if(wg)return fc;wg=1;function a(e){return this.__data__.get(e)}return fc=a,fc}var hc,Tg;function oT(){if(Tg)return hc;Tg=1;function a(e){return this.__data__.has(e)}return hc=a,hc}var pc,xg;function ss(){if(xg)return pc;xg=1;var a=Sr(),e=a(Object,"create");return pc=e,pc}var gc,Sg;function iT(){if(Sg)return gc;Sg=1;var a=ss();function e(){this.__data__=a?a(null):{},this.size=0}return gc=e,gc}var mc,Eg;function sT(){if(Eg)return mc;Eg=1;function a(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return mc=a,mc}var vc,Cg;function aT(){if(Cg)return vc;Cg=1;var a=ss(),e="__lodash_hash_undefined__",t=Object.prototype,r=t.hasOwnProperty;function i(l){var c=this.__data__;if(a){var d=c[l];return d===e?void 0:d}return r.call(c,l)?c[l]:void 0}return vc=i,vc}var yc,Bg;function lT(){if(Bg)return yc;Bg=1;var a=ss(),e=Object.prototype,t=e.hasOwnProperty;function r(i){var l=this.__data__;return a?l[i]!==void 0:t.call(l,i)}return yc=r,yc}var bc,Ag;function cT(){if(Ag)return bc;Ag=1;var a=ss(),e="__lodash_hash_undefined__";function t(r,i){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=a&&i===void 0?e:i,this}return bc=t,bc}var kc,Ig;function uT(){if(Ig)return kc;Ig=1;var a=iT(),e=sT(),t=aT(),r=lT(),i=cT();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=r,l.prototype.set=i,kc=l,kc}var wc,Rg;function dT(){if(Rg)return wc;Rg=1;var a=uT(),e=is(),t=Hl();function r(){this.size=0,this.__data__={hash:new a,map:new(t||e),string:new a}}return wc=r,wc}var Tc,_g;function fT(){if(_g)return Tc;_g=1;function a(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return Tc=a,Tc}var xc,Ng;function as(){if(Ng)return xc;Ng=1;var a=fT();function e(t,r){var i=t.__data__;return a(r)?i[typeof r=="string"?"string":"hash"]:i.map}return xc=e,xc}var Sc,Og;function hT(){if(Og)return Sc;Og=1;var a=as();function e(t){var r=a(this,t).delete(t);return this.size-=r?1:0,r}return Sc=e,Sc}var Ec,Lg;function pT(){if(Lg)return Ec;Lg=1;var a=as();function e(t){return a(this,t).get(t)}return Ec=e,Ec}var Cc,Dg;function gT(){if(Dg)return Cc;Dg=1;var a=as();function e(t){return a(this,t).has(t)}return Cc=e,Cc}var Bc,Pg;function mT(){if(Pg)return Bc;Pg=1;var a=as();function e(t,r){var i=a(this,t),l=i.size;return i.set(t,r),this.size+=i.size==l?0:1,this}return Bc=e,Bc}var Ac,Mg;function Fg(){if(Mg)return Ac;Mg=1;var a=dT(),e=hT(),t=pT(),r=gT(),i=mT();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=r,l.prototype.set=i,Ac=l,Ac}var Ic,Hg;function vT(){if(Hg)return Ic;Hg=1;var a=is(),e=Hl(),t=Fg(),r=200;function i(l,c){var d=this.__data__;if(d instanceof a){var h=d.__data__;if(!e||h.length<r-1)return h.push([l,c]),this.size=++d.size,this;d=this.__data__=new t(h)}return d.set(l,c),this.size=d.size,this}return Ic=i,Ic}var Rc,zg;function jg(){if(zg)return Rc;zg=1;var a=is(),e=tT(),t=nT(),r=rT(),i=oT(),l=vT();function c(d){var h=this.__data__=new a(d);this.size=h.size}return c.prototype.clear=e,c.prototype.delete=t,c.prototype.get=r,c.prototype.has=i,c.prototype.set=l,Rc=c,Rc}var _c,qg;function yT(){if(qg)return _c;qg=1;var a="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,a),this}return _c=e,_c}var Nc,Ug;function bT(){if(Ug)return Nc;Ug=1;function a(e){return this.__data__.has(e)}return Nc=a,Nc}var Oc,Wg;function kT(){if(Wg)return Oc;Wg=1;var a=Fg(),e=yT(),t=bT();function r(i){var l=-1,c=i==null?0:i.length;for(this.__data__=new a;++l<c;)this.add(i[l])}return r.prototype.add=r.prototype.push=e,r.prototype.has=t,Oc=r,Oc}var Lc,Kg;function wT(){if(Kg)return Lc;Kg=1;function a(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}return Lc=a,Lc}var Dc,Vg;function TT(){if(Vg)return Dc;Vg=1;function a(e,t){return e.has(t)}return Dc=a,Dc}var Pc,$g;function Gg(){if($g)return Pc;$g=1;var a=kT(),e=wT(),t=TT(),r=1,i=2;function l(c,d,h,g,m,y){var b=h&r,T=c.length,k=d.length;if(T!=k&&!(b&&k>T))return!1;var x=y.get(c),S=y.get(d);if(x&&S)return x==d&&S==c;var R=-1,O=!0,H=h&i?new a:void 0;for(y.set(c,d),y.set(d,c);++R<T;){var P=c[R],$=d[R];if(g)var j=b?g($,P,R,d,c,y):g(P,$,R,c,d,y);if(j!==void 0){if(j)continue;O=!1;break}if(H){if(!e(d,function(U,M){if(!t(H,M)&&(P===U||m(P,U,h,g,y)))return H.push(M)})){O=!1;break}}else if(!(P===$||m(P,$,h,g,y))){O=!1;break}}return y.delete(c),y.delete(d),O}return Pc=l,Pc}var Mc,Xg;function Yg(){if(Xg)return Mc;Xg=1;var a=fn(),e=a.Uint8Array;return Mc=e,Mc}var Fc,Qg;function Zg(){if(Qg)return Fc;Qg=1;function a(e){var t=-1,r=Array(e.size);return e.forEach(function(i,l){r[++t]=[l,i]}),r}return Fc=a,Fc}var Hc,Jg;function em(){if(Jg)return Hc;Jg=1;function a(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}return Hc=a,Hc}var zc,tm;function xT(){if(tm)return zc;tm=1;var a=Ji(),e=Yg(),t=Wo(),r=Gg(),i=Zg(),l=em(),c=1,d=2,h="[object Boolean]",g="[object Date]",m="[object Error]",y="[object Map]",b="[object Number]",T="[object RegExp]",k="[object Set]",x="[object String]",S="[object Symbol]",R="[object ArrayBuffer]",O="[object DataView]",H=a?a.prototype:void 0,P=H?H.valueOf:void 0;function $(j,U,M,X,ae,G,ke){switch(M){case O:if(j.byteLength!=U.byteLength||j.byteOffset!=U.byteOffset)return!1;j=j.buffer,U=U.buffer;case R:return!(j.byteLength!=U.byteLength||!G(new e(j),new e(U)));case h:case g:case b:return t(+j,+U);case m:return j.name==U.name&&j.message==U.message;case T:case x:return j==U+"";case y:var Z=i;case k:var Te=X&c;if(Z||(Z=l),j.size!=U.size&&!Te)return!1;var Re=ke.get(j);if(Re)return Re==U;X|=d,ke.set(j,U);var xe=r(Z(j),Z(U),X,ae,G,ke);return ke.delete(j),xe;case S:if(P)return P.call(j)==P.call(U)}return!1}return zc=$,zc}var jc,nm;function ST(){if(nm)return jc;nm=1;function a(e,t){for(var r=-1,i=t.length,l=e.length;++r<i;)e[l+r]=t[r];return e}return jc=a,jc}var qc,rm;function ET(){if(rm)return qc;rm=1;var a=ST(),e=eo();function t(r,i,l){var c=i(r);return e(r)?c:a(c,l(r))}return qc=t,qc}var Uc,om;function CT(){if(om)return Uc;om=1;function a(e,t){for(var r=-1,i=e==null?0:e.length,l=0,c=[];++r<i;){var d=e[r];t(d,r,e)&&(c[l++]=d)}return c}return Uc=a,Uc}var Wc,im;function BT(){if(im)return Wc;im=1;function a(){return[]}return Wc=a,Wc}var Kc,sm;function AT(){if(sm)return Kc;sm=1;var a=CT(),e=BT(),t=Object.prototype,r=t.propertyIsEnumerable,i=Object.getOwnPropertySymbols,l=i?function(c){return c==null?[]:(c=Object(c),a(i(c),function(d){return r.call(c,d)}))}:e;return Kc=l,Kc}var Vc,am;function IT(){if(am)return Vc;am=1;function a(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}return Vc=a,Vc}var $c,lm;function cm(){if(lm)return $c;lm=1;var a=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(r,i){var l=typeof r;return i=i==null?a:i,!!i&&(l=="number"||l!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<i}return $c=t,$c}var Gc,um;function dm(){if(um)return Gc;um=1;var a=IT(),e=$l(),t=eo(),r=ns(),i=cm(),l=rs(),c=Object.prototype,d=c.hasOwnProperty;function h(g,m){var y=t(g),b=!y&&e(g),T=!y&&!b&&r(g),k=!y&&!b&&!T&&l(g),x=y||b||T||k,S=x?a(g.length,String):[],R=S.length;for(var O in g)(m||d.call(g,O))&&!(x&&(O=="length"||T&&(O=="offset"||O=="parent")||k&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,R)))&&S.push(O);return S}return Gc=h,Gc}var Xc,fm;function hm(){if(fm)return Xc;fm=1;var a=dm(),e=Kp(),t=to();function r(i){return t(i)?a(i):e(i)}return Xc=r,Xc}var Yc,pm;function RT(){if(pm)return Yc;pm=1;var a=ET(),e=AT(),t=hm();function r(i){return a(i,t,e)}return Yc=r,Yc}var Qc,gm;function _T(){if(gm)return Qc;gm=1;var a=RT(),e=1,t=Object.prototype,r=t.hasOwnProperty;function i(l,c,d,h,g,m){var y=d&e,b=a(l),T=b.length,k=a(c),x=k.length;if(T!=x&&!y)return!1;for(var S=T;S--;){var R=b[S];if(!(y?R in c:r.call(c,R)))return!1}var O=m.get(l),H=m.get(c);if(O&&H)return O==c&&H==l;var P=!0;m.set(l,c),m.set(c,l);for(var $=y;++S<T;){R=b[S];var j=l[R],U=c[R];if(h)var M=y?h(U,j,R,c,l,m):h(j,U,R,l,c,m);if(!(M===void 0?j===U||g(j,U,d,h,m):M)){P=!1;break}$||($=R=="constructor")}if(P&&!$){var X=l.constructor,ae=c.constructor;X!=ae&&"constructor"in l&&"constructor"in c&&!(typeof X=="function"&&X instanceof X&&typeof ae=="function"&&ae instanceof ae)&&(P=!1)}return m.delete(l),m.delete(c),P}return Qc=i,Qc}var Zc,mm;function NT(){if(mm)return Zc;mm=1;var a=jg(),e=Gg(),t=xT(),r=_T(),i=Wl(),l=eo(),c=ns(),d=rs(),h=1,g="[object Arguments]",m="[object Array]",y="[object Object]",b=Object.prototype,T=b.hasOwnProperty;function k(x,S,R,O,H,P){var $=l(x),j=l(S),U=$?m:i(x),M=j?m:i(S);U=U==g?y:U,M=M==g?y:M;var X=U==y,ae=M==y,G=U==M;if(G&&c(x)){if(!c(S))return!1;$=!0,X=!1}if(G&&!X)return P||(P=new a),$||d(x)?e(x,S,R,O,H,P):t(x,S,U,R,O,H,P);if(!(R&h)){var ke=X&&T.call(x,"__wrapped__"),Z=ae&&T.call(S,"__wrapped__");if(ke||Z){var Te=ke?x.value():x,Re=Z?S.value():S;return P||(P=new a),H(Te,Re,R,O,P)}}return G?(P||(P=new a),r(x,S,R,O,H,P)):!1}return Zc=k,Zc}var Jc,vm;function OT(){if(vm)return Jc;vm=1;var a=NT(),e=Sn();function t(r,i,l,c,d){return r===i?!0:r==null||i==null||!e(r)&&!e(i)?r!==r&&i!==i:a(r,i,l,c,t,d)}return Jc=t,Jc}var eu,ym;function LT(){if(ym)return eu;ym=1;var a=OT();function e(t,r){return a(t,r)}return eu=e,eu}var DT=LT();const PT=Le(DT);var MT=es();const FT=Le(MT);var tu,bm;function HT(){if(bm)return tu;bm=1;var a=On(),e=Sn(),t="[object Number]";function r(i){return typeof i=="number"||e(i)&&a(i)==t}return tu=r,tu}var zT=HT();const jT=Le(zT);var nu,km;function wm(){if(km)return nu;km=1;var a=qp(),e=a(Object.getPrototypeOf,Object);return nu=e,nu}var ru,Tm;function xm(){if(Tm)return ru;Tm=1;var a=On(),e=wm(),t=Sn(),r="[object Object]",i=Function.prototype,l=Object.prototype,c=i.toString,d=l.hasOwnProperty,h=c.call(Object);function g(m){if(!t(m)||a(m)!=r)return!1;var y=e(m);if(y===null)return!0;var b=d.call(y,"constructor")&&y.constructor;return typeof b=="function"&&b instanceof b&&c.call(b)==h}return ru=g,ru}var qT=xm();const UT=Le(qT);var ou,Sm;function Em(){if(Sm)return ou;Sm=1;var a=On(),e=eo(),t=Sn(),r="[object String]";function i(l){return typeof l=="string"||!e(l)&&t(l)&&a(l)==r}return ou=i,ou}var WT=Em();const KT=Le(WT);var iu,Cm;function VT(){if(Cm)return iu;Cm=1;function a(e){return e===void 0}return iu=a,iu}var $T=VT();const GT=Le($T);var su,Bm;function au(){if(Bm)return su;Bm=1;var a=Cp();function e(t,r,i){r=="__proto__"&&a?a(t,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[r]=i}return su=e,su}var lu,Am;function Im(){if(Am)return lu;Am=1;var a=au(),e=Wo();function t(r,i,l){(l!==void 0&&!e(r[i],l)||l===void 0&&!(i in r))&&a(r,i,l)}return lu=t,lu}var cu,Rm;function XT(){if(Rm)return cu;Rm=1;function a(e){return function(t,r,i){for(var l=-1,c=Object(t),d=i(t),h=d.length;h--;){var g=d[e?h:++l];if(r(c[g],g,c)===!1)break}return t}}return cu=a,cu}var uu,_m;function YT(){if(_m)return uu;_m=1;var a=XT(),e=a();return uu=e,uu}var Ko={exports:{}};Ko.exports;var Nm;function QT(){return Nm||(Nm=1,(function(a,e){var t=fn(),r=e&&!e.nodeType&&e,i=r&&!0&&a&&!a.nodeType&&a,l=i&&i.exports===r,c=l?t.Buffer:void 0,d=c?c.allocUnsafe:void 0;function h(g,m){if(m)return g.slice();var y=g.length,b=d?d(y):new g.constructor(y);return g.copy(b),b}a.exports=h})(Ko,Ko.exports)),Ko.exports}var du,Om;function ZT(){if(Om)return du;Om=1;var a=Yg();function e(t){var r=new t.constructor(t.byteLength);return new a(r).set(new a(t)),r}return du=e,du}var fu,Lm;function JT(){if(Lm)return fu;Lm=1;var a=ZT();function e(t,r){var i=r?a(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}return fu=e,fu}var hu,Dm;function Pm(){if(Dm)return hu;Dm=1;function a(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}return hu=a,hu}var pu,Mm;function e1(){if(Mm)return pu;Mm=1;var a=xn(),e=Object.create,t=(function(){function r(){}return function(i){if(!a(i))return{};if(e)return e(i);r.prototype=i;var l=new r;return r.prototype=void 0,l}})();return pu=t,pu}var gu,Fm;function t1(){if(Fm)return gu;Fm=1;var a=e1(),e=wm(),t=ts();function r(i){return typeof i.constructor=="function"&&!t(i)?a(e(i)):{}}return gu=r,gu}var mu,Hm;function n1(){if(Hm)return mu;Hm=1;var a=to(),e=Sn();function t(r){return e(r)&&a(r)}return mu=t,mu}var vu,zm;function jm(){if(zm)return vu;zm=1;function a(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}return vu=a,vu}var yu,qm;function r1(){if(qm)return yu;qm=1;var a=au(),e=Wo(),t=Object.prototype,r=t.hasOwnProperty;function i(l,c,d){var h=l[c];(!(r.call(l,c)&&e(h,d))||d===void 0&&!(c in l))&&a(l,c,d)}return yu=i,yu}var bu,Um;function o1(){if(Um)return bu;Um=1;var a=r1(),e=au();function t(r,i,l,c){var d=!l;l||(l={});for(var h=-1,g=i.length;++h<g;){var m=i[h],y=c?c(l[m],r[m],m,l,r):void 0;y===void 0&&(y=r[m]),d?e(l,m,y):a(l,m,y)}return l}return bu=t,bu}var ku,Wm;function i1(){if(Wm)return ku;Wm=1;function a(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}return ku=a,ku}var wu,Km;function s1(){if(Km)return wu;Km=1;var a=xn(),e=ts(),t=i1(),r=Object.prototype,i=r.hasOwnProperty;function l(c){if(!a(c))return t(c);var d=e(c),h=[];for(var g in c)g=="constructor"&&(d||!i.call(c,g))||h.push(g);return h}return wu=l,wu}var Tu,Vm;function $m(){if(Vm)return Tu;Vm=1;var a=dm(),e=s1(),t=to();function r(i){return t(i)?a(i,!0):e(i)}return Tu=r,Tu}var xu,Gm;function a1(){if(Gm)return xu;Gm=1;var a=o1(),e=$m();function t(r){return a(r,e(r))}return xu=t,xu}var Su,Xm;function l1(){if(Xm)return Su;Xm=1;var a=Im(),e=QT(),t=JT(),r=Pm(),i=t1(),l=$l(),c=eo(),d=n1(),h=ns(),g=es(),m=xn(),y=xm(),b=rs(),T=jm(),k=a1();function x(S,R,O,H,P,$,j){var U=T(S,O),M=T(R,O),X=j.get(M);if(X){a(S,O,X);return}var ae=$?$(U,M,O+"",S,R,j):void 0,G=ae===void 0;if(G){var ke=c(M),Z=!ke&&h(M),Te=!ke&&!Z&&b(M);ae=M,ke||Z||Te?c(U)?ae=U:d(U)?ae=r(U):Z?(G=!1,ae=e(M,!0)):Te?(G=!1,ae=t(M,!0)):ae=[]:y(M)||l(M)?(ae=U,l(U)?ae=k(U):(!m(U)||g(U))&&(ae=i(M))):G=!1}G&&(j.set(M,ae),P(ae,M,H,$,j),j.delete(M)),a(S,O,ae)}return Su=x,Su}var Eu,Ym;function c1(){if(Ym)return Eu;Ym=1;var a=jg(),e=Im(),t=YT(),r=l1(),i=xn(),l=$m(),c=jm();function d(h,g,m,y,b){h!==g&&t(g,function(T,k){if(b||(b=new a),i(T))r(h,g,k,m,d,y,b);else{var x=y?y(c(h,k),T,k+"",h,g,b):void 0;x===void 0&&(x=T),e(h,k,x)}},l)}return Eu=d,Eu}var Cu,Qm;function u1(){if(Qm)return Cu;Qm=1;var a=Wo(),e=to(),t=cm(),r=xn();function i(l,c,d){if(!r(d))return!1;var h=typeof c;return(h=="number"?e(d)&&t(c,d.length):h=="string"&&c in d)?a(d[c],l):!1}return Cu=i,Cu}var Bu,Zm;function d1(){if(Zm)return Bu;Zm=1;var a=_p(),e=u1();function t(r){return a(function(i,l){var c=-1,d=l.length,h=d>1?l[d-1]:void 0,g=d>2?l[2]:void 0;for(h=r.length>3&&typeof h=="function"?(d--,h):void 0,g&&e(l[0],l[1],g)&&(h=d<3?void 0:h,d=1),i=Object(i);++c<d;){var m=l[c];m&&r(i,m,c,h)}return i})}return Bu=t,Bu}var Au,Jm;function f1(){if(Jm)return Au;Jm=1;var a=c1(),e=d1(),t=e(function(r,i,l,c){a(r,i,l,c)});return Au=t,Au}var h1=f1();const p1=Le(h1);var Iu,ev;function g1(){if(ev)return Iu;ev=1;var a=fn(),e=function(){return a.Date.now()};return Iu=e,Iu}var Ru,tv;function m1(){if(tv)return Ru;tv=1;var a=xn(),e=g1(),t=Mp(),r="Expected a function",i=Math.max,l=Math.min;function c(d,h,g){var m,y,b,T,k,x,S=0,R=!1,O=!1,H=!0;if(typeof d!="function")throw new TypeError(r);h=t(h)||0,a(g)&&(R=!!g.leading,O="maxWait"in g,b=O?i(t(g.maxWait)||0,h):b,H="trailing"in g?!!g.trailing:H);function P(Z){var Te=m,Re=y;return m=y=void 0,S=Z,T=d.apply(Re,Te),T}function $(Z){return S=Z,k=setTimeout(M,h),R?P(Z):T}function j(Z){var Te=Z-x,Re=Z-S,xe=h-Te;return O?l(xe,b-Re):xe}function U(Z){var Te=Z-x,Re=Z-S;return x===void 0||Te>=h||Te<0||O&&Re>=b}function M(){var Z=e();if(U(Z))return X(Z);k=setTimeout(M,j(Z))}function X(Z){return k=void 0,H&&m?P(Z):(m=y=void 0,T)}function ae(){k!==void 0&&clearTimeout(k),S=0,m=x=y=k=void 0}function G(){return k===void 0?T:X(e())}function ke(){var Z=e(),Te=U(Z);if(m=arguments,y=this,x=Z,Te){if(k===void 0)return $(x);if(O)return clearTimeout(k),k=setTimeout(M,h),P(x)}return k===void 0&&(k=setTimeout(M,h)),T}return ke.cancel=ae,ke.flush=G,ke}return Ru=c,Ru}var _u,nv;function v1(){if(nv)return _u;nv=1;var a=m1(),e=xn(),t="Expected a function";function r(i,l,c){var d=!0,h=!0;if(typeof i!="function")throw new TypeError(t);return e(c)&&(d="leading"in c?!!c.leading:d,h="trailing"in c?!!c.trailing:h),a(i,l,{leading:d,maxWait:l,trailing:h})}return _u=r,_u}var y1=v1();const b1=Le(y1);var Nu,rv;function k1(){if(rv)return Nu;rv=1;function a(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}return Nu=a,Nu}var Ou,ov;function w1(){if(ov)return Ou;ov=1;function a(e){return e.split("")}return Ou=a,Ou}var Lu,iv;function T1(){if(iv)return Lu;iv=1;var a="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=e+t+r,l="\\ufe0e\\ufe0f",c="\\u200d",d=RegExp("["+c+a+i+l+"]");function h(g){return d.test(g)}return Lu=h,Lu}var Du,sv;function x1(){if(sv)return Du;sv=1;var a="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=e+t+r,l="\\ufe0e\\ufe0f",c="["+a+"]",d="["+i+"]",h="\\ud83c[\\udffb-\\udfff]",g="(?:"+d+"|"+h+")",m="[^"+a+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",T="\\u200d",k=g+"?",x="["+l+"]?",S="(?:"+T+"(?:"+[m,y,b].join("|")+")"+x+k+")*",R=x+k+S,O="(?:"+[m+d+"?",d,y,b,c].join("|")+")",H=RegExp(h+"(?="+h+")|"+O+R,"g");function P($){return $.match(H)||[]}return Du=P,Du}var Pu,av;function S1(){if(av)return Pu;av=1;var a=w1(),e=T1(),t=x1();function r(i){return e(i)?t(i):a(i)}return Pu=r,Pu}var Mu,lv;function E1(){if(lv)return Mu;lv=1;function a(e,t){for(var r=-1,i=e==null?0:e.length,l=Array(i);++r<i;)l[r]=t(e[r],r,e);return l}return Mu=a,Mu}var Fu,cv;function C1(){if(cv)return Fu;cv=1;var a=E1();function e(t,r){return a(r,function(i){return t[i]})}return Fu=e,Fu}var Hu,uv;function B1(){if(uv)return Hu;uv=1;var a=C1(),e=hm();function t(r){return r==null?[]:a(r,e(r))}return Hu=t,Hu}var zu,dv;function A1(){if(dv)return zu;dv=1;var a=Ji(),e=Pm(),t=Wl(),r=to(),i=Em(),l=k1(),c=Zg(),d=em(),h=S1(),g=B1(),m="[object Map]",y="[object Set]",b=a?a.iterator:void 0;function T(k){if(!k)return[];if(r(k))return i(k)?h(k):e(k);if(b&&k[b])return l(k[b]());var x=t(k),S=x==m?c:x==y?d:g;return S(k)}return zu=T,zu}var I1=A1();const R1=Le(I1);var fv=(a=>(a.VERBOSE="VERBOSE",a.INFO="INFO",a.WARN="WARN",a.ERROR="ERROR",a))(fv||{});const ls=()=>"0.4.1-beta.1",re={BACKSPACE:8,TAB:9,ENTER:13,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46},_1={LEFT:0},N1=1e8,O1=16,Jt=(()=>{try{return Function("return this")()}catch(a){return}})();Jt&&typeof Jt.window=="undefined"&&(Jt.window=Jt);const cs=()=>{if(Jt!=null&&Jt.window)return Jt.window},hv=()=>{if(Jt!=null&&Jt.navigator)return Jt.navigator;const a=cs();return a==null?void 0:a.navigator},Vo=(a,e,t="log",r,i="color: inherit")=>{const l=typeof console=="undefined"?void 0:console;if(!l||typeof l[t]!="function")return;const c=["info","log","warn","error"].includes(t),d=[];switch(Vo.logLevel){case"ERROR":if(t!=="error")return;break;case"WARN":if(!["error","warn"].includes(t))return;break;case"INFO":if(!c||a)return;break}r&&d.push(r);const h=`Blok ${ls()}`,g=`line-height: 1em;
2
2
  color: #006FEA;
3
3
  display: inline-block;
4
4
  font-size: 11px;
@@ -7,18 +7,18 @@
7
7
  padding: 4px 9px;
8
8
  border-radius: 30px;
9
9
  border: 1px solid rgba(56, 138, 229, 0.16);
10
- margin: 4px 5px 4px 0;`,v=a?c?(d.unshift(g,i),`%c${h}%c ${e}`):`( ${h} )${e}`:e,y=c?o!==void 0?[`${v} %o`,...d]:[v,...d]:[v];try{l[t](...y)}catch(b){}};Wo.logLevel="VERBOSE";const _1=a=>{Wo.logLevel=a},Be=(a,e="log",t,o)=>{Wo(!1,a,e,t,o)},Qt=(a,e="log",t,o)=>{Wo(!0,a,e,t,o)},De=a=>LT(a),qe=a=>zT(a),un=a=>jT(a),hv=a=>N0(a),pv=a=>MT(a),R1=function(a){return WT(a)},ot=a=>K0(a),gv=a=>C1(a),cs=(a,e)=>function(...t){I0(()=>a.apply(this,t),e)},N1=a=>{var e;return(e=a.name.split(".").pop())!=null?e:""},O1=a=>/^[-\w]+\/([-+\w]+|\*)$/.test(a),mv=(a,e,t)=>{const o={timeoutId:null};return function(...i){const l=()=>{o.timeoutId=null,a.apply(this,i)};o.timeoutId!==null&&clearTimeout(o.timeoutId),o.timeoutId=setTimeout(l,e)}},Hu=(a,e,t)=>g1(a,e,t),vv=()=>{var i,l;const a={win:!1,mac:!1,x11:!1,linux:!1},e=fv(),t=(l=(i=e==null?void 0:e.userAgent)==null?void 0:i.toLowerCase())!=null?l:"",o=t?Object.keys(a).find(c=>t.indexOf(c)!==-1):void 0;return o!==void 0&&(a[o]=!0),a},us=a=>a&&a.slice(0,1).toUpperCase()+a.slice(1),L1=(a,e)=>{if(Array.isArray(e))return e},Ko=(a,...e)=>!qe(a)||e.length===0?a:e.reduce((t,o)=>qe(o)?u1(t,o,L1):t,a),yv=a=>{const e=vv(),t=a.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + ");return e.mac?t.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):t.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN")},D1=a=>{try{return new URL(a).href}catch(t){}const e=ls();return a.substring(0,2)==="//"?e?`${e.location.protocol}${a}`:a:e?`${e.location.origin}${a}`:a},P1=()=>u0(10),M1=a=>{const e=ls();e&&e.open(a,"_blank")},F1=(a="")=>`${a}${Math.floor(Math.random()*A1).toString(I1)}`,bv=650,Gn=()=>{const a=ls();return!a||typeof a.matchMedia!="function"?!1:a.matchMedia(`(max-width: ${bv}px)`).matches},ju=(()=>{var h;const a=fv();if(!a)return!1;const e=a.userAgent||"",t=a.userAgentData,o=t==null?void 0:t.platform;if(/iP(ad|hone|od)/.test(e)||o!==void 0&&o!==""&&/iP(ad|hone|od)/.test(o))return!0;const i=((h=a.maxTouchPoints)!=null?h:0)>1,l=()=>a.platform,c=o!==void 0&&o!==""?o:void 0;return(i?c!=null?c:l():void 0)==="MacIntel"})(),z1=(a,e)=>NT(a,e);class N{static isSingleTag(e){return!!e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return!!e&&["BR","WBR"].includes(e.tagName)}static isValidClassName(e){if(e===""||/\s/.test(e))return!1;try{return document.createElement("div").classList.add(e),!0}catch(t){return!1}}static safelyAddClasses(e,t){const o=[],i=[];for(const l of t)N.isValidClassName(l)?o.push(l):i.push(l);if(o.length>0&&e.classList.add(...o),i.length>0){const l=e.className,c=l?`${l} ${i.join(" ")}`:i.join(" ");e.setAttribute("class",c)}}static make(e,t=null,o={}){const i=document.createElement(e);if(Array.isArray(t)){const l=t.filter(c=>c!==void 0&&c!=="").flatMap(c=>c.split(" ")).filter(c=>c!=="");N.safelyAddClasses(i,l)}if(typeof t=="string"&&t!==""){const l=t.split(" ").filter(c=>c!=="");N.safelyAddClasses(i,l)}for(const l in o){if(!Object.prototype.hasOwnProperty.call(o,l))continue;const c=o[l];if(c!=null){if(l in i){i[l]=c;continue}i.setAttribute(l,String(c))}}return i}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach(o=>e.appendChild(o)):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?[...t].reverse().forEach(i=>e.prepend(i)):e.prepend(t)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map(t=>`input[type="${t}"]`).join(", ")}static findAllInputs(e){return gv(e.querySelectorAll(N.allInputsSelector)).reduce((t,o)=>N.isNativeInput(o)||N.containsOnlyInlineElements(o)?[...t,o]:[...t,...N.getDeepestBlockElements(o)],[])}static getDeepestNode(e,t=!1){var v;const o=t?"lastChild":"firstChild",i=t?"previousSibling":"nextSibling";if(e===null||e.nodeType!==Node.ELEMENT_NODE)return e;const l=e[o];if(l===null)return e;const c=l;if(!(N.isSingleTag(c)&&!N.isNativeInput(c)&&!N.isLineBreakTag(c)))return this.getDeepestNode(c,t);const h=c[i];if(h)return this.getDeepestNode(h,t);const g=(v=c.parentNode)==null?void 0:v[i];return g?this.getDeepestNode(g,t):c.parentNode}static isElement(e){return pv(e)?!1:e!=null&&e.nodeType!=null&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return pv(e)?!1:e!=null&&e.nodeType!=null&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isContentEditable(e){return e.contentEditable==="true"}static isNativeInput(e){const t=["INPUT","TEXTAREA"];return e!=null&&typeof e.tagName=="string"?t.includes(e.tagName):!1}static canSetCaret(e){return N.isNativeInput(e)?!new Set(["file","checkbox","radio","hidden","submit","button","image","reset"]).has(e.type):N.isContentEditable(e)}static isNodeEmpty(e,t){var l,c;if(this.isSingleTag(e)&&!this.isLineBreakTag(e))return!1;const o=this.isElement(e)&&this.isNativeInput(e)?e.value:(l=e.textContent)==null?void 0:l.replace("​",""),i=t?o==null?void 0:o.replace(new RegExp(t,"g"),""):o;return((c=i==null?void 0:i.length)!=null?c:0)===0}static isLeaf(e){return e?e.childNodes.length===0:!1}static isEmpty(e,t){const o=[e];for(;o.length>0;){const i=o.shift();if(i){if(this.isLeaf(i)&&!this.isNodeEmpty(i,t))return!1;i.childNodes&&o.push(...Array.from(i.childNodes))}}return!0}static isHTMLString(e){const t=N.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){var t,o;return N.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:(o=(t=e.textContent)==null?void 0:t.length)!=null?o:0}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){const t=un(e)?(()=>{const i=document.createElement("div");return i.innerHTML=e,i})():e,o=i=>!N.blockElements.includes(i.tagName.toLowerCase())&&Array.from(i.children).every(o);return Array.from(t.children).every(o)}static getDeepestBlockElements(e){return N.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((t,o)=>[...t,...N.getDeepestBlockElements(o)],[])}static getHolder(e){if(!un(e))return e;const t=document.getElementById(e);if(t!==null)return t;throw new Error(`Element with id "${e}" not found`)}static isAnchor(e){return e.tagName.toLowerCase()==="a"}static offset(e){const t=e.getBoundingClientRect(),o=window.scrollX||document.documentElement.scrollLeft,i=window.scrollY||document.documentElement.scrollTop,l=t.top+i,c=t.left+o;return{top:l,left:c,bottom:l+t.height,right:c+t.width}}static getNodeByOffset(e,t){const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),i=(g,v,y,b)=>{var S;if(!g&&y){const O=v-b,L=Math.max(t-O,0),U=Math.min(L,b);return{node:y,offset:U}}if(!g)return{node:null,offset:0};const w=((S=g.textContent)!=null?S:"").length;return v+w>=t?{node:g,offset:Math.min(t-v,w)}:i(o.nextNode(),v+w,g,w)},l=o.nextNode(),{node:c,offset:d}=i(l,0,null,0);if(!c)return{node:null,offset:0};const h=c.textContent;return!h||h.length===0?{node:null,offset:0}:{node:c,offset:d}}}const qu=a=>!/[^\t\n\r \u200B]/.test(a),H1=a=>{const e=window.getComputedStyle(a),t=parseFloat(e.fontSize),o=parseFloat(e.lineHeight)||t*1.2,i=parseFloat(e.paddingTop),l=parseFloat(e.borderTopWidth),c=parseFloat(e.marginTop),d=t*.8,h=(o-t)/2;return c+l+i+h+d},kv=a=>{a.setAttribute("data-blok-empty",N.isEmpty(a)?"true":"false")},wv={ui:{blockTunes:{toggler:{"Drag to move":"","Click to open the menu":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{"Click to add below":"","Option-click to add above":"","Ctrl-click to add above":""}},popover:{Filter:"","Nothing found":"","Convert to":""}},toolNames:{Text:"",Link:"",Bold:"",Italic:""},tools:{link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},blockTunes:{delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}}},er=class er{static ui(e,t){return er._t(e,t)}static t(e,t){return er._t(e,t)}static setDictionary(e){er.currentDictionary=e}static _t(e,t){const o=er.getNamespace(e);return!o||!o[t]?t:o[t]}static getNamespace(e){return e.split(".").reduce((o,i)=>{if(!o||!Object.keys(o).length)return{};const l=o[i];return typeof l=="string"?{}:l},er.currentDictionary)}};er.currentDictionary=wv;let $e=er;class Vo extends Error{}class $o{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const o=i=>{const l=t(i),c=this.subscribers[e].indexOf(o);return c!==-1&&this.subscribers[e].splice(c,1),l};this.subscribers[e].push(o)}emit(e,t){ot(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce((o,i)=>{const l=i(o);return l!==void 0?l:o},t)}off(e,t){const o=this.subscribers[e];if(o===void 0){console.warn(`EventDispatcher .off(): there is no subscribers for event "${e.toString()}". Probably, .off() called before .on()`);return}const i=o.indexOf(t);i!==-1&&o.splice(i,1)}destroy(){this.subscribers={}}}const On=function(e){return Object.setPrototypeOf(this,{get id(){return e.id},get name(){return e.name},get config(){return e.config},get holder(){return e.holder},get isEmpty(){return e.isEmpty},get selected(){return e.selected},set stretched(o){e.setStretchState(o)},get stretched(){return e.stretched},get focusable(){return e.focusable},call(o,i){return e.call(o,i)},save(){return e.save()},validate(o){return e.validate(o)},dispatchChange(){e.dispatchChange()},getActiveToolboxEntry(){return e.getActiveToolboxEntry()}}),Object.defineProperties(this,{id:{get(){return e.id},enumerable:!0,configurable:!0},name:{get(){return e.name},enumerable:!0,configurable:!0}}),this};class Go{constructor(){this.allListeners=[]}on(e,t,o,i=!1){if(this.findOne(e,t,o,i))return;const c=F1("l"),d={id:c,element:e,eventType:t,handler:o,options:i};return this.allListeners.push(d),e.addEventListener(t,o,i),c}off(e,t,o,i){const l=this.findAll(e,t,o,i);l.forEach((c,d)=>{const h=this.allListeners.indexOf(l[d]);h>-1&&(this.allListeners.splice(h,1),c.element.removeEventListener(c.eventType,c.handler,c.options))})}offById(e){const t=this.findById(e);if(!t)return;t.element.removeEventListener(t.eventType,t.handler,t.options);const o=this.allListeners.indexOf(t);o>-1&&this.allListeners.splice(o,1)}findOne(e,t,o,i){var c;return(c=this.findAll(e,t,o,i)[0])!=null?c:null}findAll(e,t,o,i){return e?this.findByEventTarget(e).filter(c=>{const d=t===void 0||c.eventType===t,h=o===void 0||c.handler===o,g=this.areOptionsEqual(c.options,i);return d&&h&&g}):[]}removeAll(){this.allListeners.forEach(e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)}),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter(t=>t.element===e)}findByType(e){return this.allListeners.filter(t=>t.eventType===e)}findByHandler(e){return this.allListeners.filter(t=>t.handler===e)}findById(e){return this.allListeners.find(t=>t.id===e)}normalizeListenerOptions(e){var t,o,i;return typeof e=="boolean"?{capture:e,once:!1,passive:!1}:e?{capture:(t=e.capture)!=null?t:!1,once:(o=e.once)!=null?o:!1,passive:(i=e.passive)!=null?i:!1,signal:e.signal}:{capture:!1,once:!1,passive:!1}}areOptionsEqual(e,t){if(t===void 0)return!0;const o=this.normalizeListenerOptions(e),i=this.normalizeListenerOptions(t);return o.capture===i.capture&&o.once===i.once&&o.passive===i.passive&&o.signal===i.signal}}class Se{constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new Go,this.readOnlyMutableListeners={on:(o,i,l,c=!1)=>{const d=this.listeners.on(o,i,l,c);d&&this.mutableListenerIds.push(d)},clearAll:()=>{for(const o of this.mutableListenerIds)this.listeners.offById(o);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===Se)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t,this.Blok={}}set state(e){this.Blok=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){var e;return((e=this.config.i18n)==null?void 0:e.direction)==="rtl"}}const j1=(a,e)=>{const t=new Array(a.length+e.length);for(let o=0;o<a.length;o++)t[o]=a[o];for(let o=0;o<e.length;o++)t[a.length+o]=e[o];return t},q1=(a,e)=>({classGroupId:a,validator:e}),Tv=(a=new Map,e=null,t)=>({nextPart:a,validators:e,classGroupId:t}),ds="-",xv=[],U1="arbitrary..",W1=a=>{const e=V1(a),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=a;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return K1(c);const d=c.split(ds),h=d[0]===""&&d.length>1?1:0;return Ev(d,h,e)},getConflictingClassGroupIds:(c,d)=>{if(d){const h=o[c],g=t[c];return h?g?j1(g,h):h:g||xv}return t[c]||xv}}},Ev=(a,e,t)=>{if(a.length-e===0)return t.classGroupId;const i=a[e],l=t.nextPart.get(i);if(l){const g=Ev(a,e+1,l);if(g)return g}const c=t.validators;if(c===null)return;const d=e===0?a.join(ds):a.slice(e).join(ds),h=c.length;for(let g=0;g<h;g++){const v=c[g];if(v.validator(d))return v.classGroupId}},K1=a=>a.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=a.slice(1,-1),t=e.indexOf(":"),o=e.slice(0,t);return o?U1+o:void 0})(),V1=a=>{const{theme:e,classGroups:t}=a;return $1(t,e)},$1=(a,e)=>{const t=Tv();for(const o in a){const i=a[o];Uu(i,t,o,e)}return t},Uu=(a,e,t,o)=>{const i=a.length;for(let l=0;l<i;l++){const c=a[l];G1(c,e,t,o)}},G1=(a,e,t,o)=>{if(typeof a=="string"){X1(a,e,t);return}if(typeof a=="function"){Y1(a,e,t,o);return}Q1(a,e,t,o)},X1=(a,e,t)=>{const o=a===""?e:Sv(e,a);o.classGroupId=t},Y1=(a,e,t,o)=>{if(Z1(a)){Uu(a(o),e,t,o);return}e.validators===null&&(e.validators=[]),e.validators.push(q1(t,a))},Q1=(a,e,t,o)=>{const i=Object.entries(a),l=i.length;for(let c=0;c<l;c++){const[d,h]=i[c];Uu(h,Sv(e,d),t,o)}},Sv=(a,e)=>{let t=a;const o=e.split(ds),i=o.length;for(let l=0;l<i;l++){const c=o[l];let d=t.nextPart.get(c);d||(d=Tv(),t.nextPart.set(c,d)),t=d}return t},Z1=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,J1=a=>{if(a<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),o=Object.create(null);const i=(l,c)=>{t[l]=c,e++,e>a&&(e=0,o=t,t=Object.create(null))};return{get(l){let c=t[l];if(c!==void 0)return c;if((c=o[l])!==void 0)return i(l,c),c},set(l,c){l in t?t[l]=c:i(l,c)}}},Wu="!",Cv=":",ex=[],Bv=(a,e,t,o,i)=>({modifiers:a,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:o,isExternal:i}),tx=a=>{const{prefix:e,experimentalParseClassName:t}=a;let o=i=>{const l=[];let c=0,d=0,h=0,g;const v=i.length;for(let T=0;T<v;T++){const S=i[T];if(c===0&&d===0){if(S===Cv){l.push(i.slice(h,T)),h=T+1;continue}if(S==="/"){g=T;continue}}S==="["?c++:S==="]"?c--:S==="("?d++:S===")"&&d--}const y=l.length===0?i:i.slice(h);let b=y,x=!1;y.endsWith(Wu)?(b=y.slice(0,-1),x=!0):y.startsWith(Wu)&&(b=y.slice(1),x=!0);const w=g&&g>h?g-h:void 0;return Bv(l,x,b,w)};if(e){const i=e+Cv,l=o;o=c=>c.startsWith(i)?l(c.slice(i.length)):Bv(ex,!1,c,void 0,!0)}if(t){const i=o;o=l=>t({className:l,parseClassName:i})}return o},nx=a=>{const e=new Map;return a.orderSensitiveModifiers.forEach((t,o)=>{e.set(t,1e6+o)}),t=>{const o=[];let i=[];for(let l=0;l<t.length;l++){const c=t[l],d=c[0]==="[",h=e.has(c);d||h?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(c)):i.push(c)}return i.length>0&&(i.sort(),o.push(...i)),o}},rx=a=>be({cache:J1(a.cacheSize),parseClassName:tx(a),sortModifiers:nx(a)},W1(a)),ox=/\s+/,ix=(a,e)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:l}=e,c=[],d=a.trim().split(ox);let h="";for(let g=d.length-1;g>=0;g-=1){const v=d[g],{isExternal:y,modifiers:b,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:T}=t(v);if(y){h=v+(h.length>0?" "+h:h);continue}let S=!!T,O=o(S?w.substring(0,T):w);if(!O){if(!S){h=v+(h.length>0?" "+h:h);continue}if(O=o(w),!O){h=v+(h.length>0?" "+h:h);continue}S=!1}const L=b.length===0?"":b.length===1?b[0]:l(b).join(":"),U=x?L+Wu:L,H=U+O;if(c.indexOf(H)>-1)continue;c.push(H);const X=i(O,S);for(let q=0;q<X.length;++q){const W=X[q];c.push(U+W)}h=v+(h.length>0?" "+h:h)}return h},Av=(...a)=>{let e=0,t,o,i="";for(;e<a.length;)(t=a[e++])&&(o=Iv(t))&&(i&&(i+=" "),i+=o);return i},Iv=a=>{if(typeof a=="string")return a;let e,t="";for(let o=0;o<a.length;o++)a[o]&&(e=Iv(a[o]))&&(t&&(t+=" "),t+=e);return t},sx=(a,...e)=>{let t,o,i,l;const c=h=>{const g=e.reduce((v,y)=>y(v),a());return t=rx(g),o=t.cache.get,i=t.cache.set,l=d,d(h)},d=h=>{const g=o(h);if(g)return g;const v=ix(h,t);return i(h,v),v};return l=c,(...h)=>l(Av(...h))},ax=[],ut=a=>{const e=t=>t[a]||ax;return e.isThemeGetter=!0,e},_v=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lx=/^\d+\/\d+$/,cx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ux=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,eo=a=>lx.test(a),ke=a=>!!a&&!Number.isNaN(Number(a)),Xn=a=>!!a&&Number.isInteger(Number(a)),Ku=a=>a.endsWith("%")&&ke(a.slice(0,-1)),Ln=a=>cx.test(a),px=()=>!0,gx=a=>ux.test(a)&&!dx.test(a),Nv=()=>!1,mx=a=>fx.test(a),vx=a=>hx.test(a),yx=a=>!J(a)&&!ee(a),bx=a=>to(a,Mv,Nv),J=a=>_v.test(a),xr=a=>to(a,Fv,gx),Vu=a=>to(a,Ex,ke),Ov=a=>to(a,Dv,Nv),kx=a=>to(a,Pv,vx),fs=a=>to(a,zv,mx),ee=a=>Rv.test(a),Xo=a=>no(a,Fv),wx=a=>no(a,Sx),Lv=a=>no(a,Dv),Tx=a=>no(a,Mv),xx=a=>no(a,Pv),hs=a=>no(a,zv,!0),to=(a,e,t)=>{const o=_v.exec(a);return o?o[1]?e(o[1]):t(o[2]):!1},no=(a,e,t=!1)=>{const o=Rv.exec(a);return o?o[1]?e(o[1]):t:!1},Dv=a=>a==="position"||a==="percentage",Pv=a=>a==="image"||a==="url",Mv=a=>a==="length"||a==="size"||a==="bg-size",Fv=a=>a==="length",Ex=a=>a==="number",Sx=a=>a==="family-name",zv=a=>a==="shadow",Ae=sx(()=>{const a=ut("color"),e=ut("font"),t=ut("text"),o=ut("font-weight"),i=ut("tracking"),l=ut("leading"),c=ut("breakpoint"),d=ut("container"),h=ut("spacing"),g=ut("radius"),v=ut("shadow"),y=ut("inset-shadow"),b=ut("text-shadow"),x=ut("drop-shadow"),w=ut("blur"),T=ut("perspective"),S=ut("aspect"),O=ut("ease"),L=ut("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...H(),ee,J],q=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],F=()=>[ee,J,h],ne=()=>[eo,"full","auto",...F()],ce=()=>[Xn,"none","subgrid",ee,J],Q=()=>["auto",{span:["full",Xn,ee,J]},Xn,ee,J],ye=()=>[Xn,"auto",ee,J],Z=()=>["auto","min","max","fr",ee,J],we=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Oe=()=>["start","end","center","stretch","center-safe","end-safe"],xe=()=>["auto",...F()],_e=()=>[eo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...F()],D=()=>[a,ee,J],le=()=>[...H(),Lv,Ov,{position:[ee,J]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",Tx,bx,{size:[ee,J]}],P=()=>[Ku,Xo,xr],ae=()=>["","none","full",g,ee,J],fe=()=>["",ke,Xo,xr],Ee=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[ke,Ku,Lv,Ov],Pe=()=>["","none",w,ee,J],ze=()=>["none",ke,ee,J],pt=()=>["none",ke,ee,J],nr=()=>[ke,ee,J],Fr=()=>[eo,"full",...F()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ln],breakpoint:[Ln],color:[px],container:[Ln],"drop-shadow":[Ln],ease:["in","out","in-out"],font:[yx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ln],shadow:[Ln],spacing:["px",ke],text:[Ln],"text-shadow":[Ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",eo,J,ee,S]}],container:["container"],columns:[{columns:[ke,J,ee,d]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:X()}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{start:ne()}],end:[{end:ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[Xn,"auto",ee,J]}],basis:[{basis:[eo,"full","auto",d,...F()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,eo,"auto","initial","none",J]}],grow:[{grow:["",ke,ee,J]}],shrink:[{shrink:["",ke,ee,J]}],order:[{order:[Xn,"first","last","none",ee,J]}],"grid-cols":[{"grid-cols":ce()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":ce()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:F()}],"gap-x":[{"gap-x":F()}],"gap-y":[{"gap-y":F()}],"justify-content":[{justify:[...we(),"normal"]}],"justify-items":[{"justify-items":[...Oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...Oe()]}],"align-content":[{content:["normal",...we()]}],"align-items":[{items:[...Oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":we()}],"place-items":[{"place-items":[...Oe(),"baseline"]}],"place-self":[{"place-self":["auto",...Oe()]}],p:[{p:F()}],px:[{px:F()}],py:[{py:F()}],ps:[{ps:F()}],pe:[{pe:F()}],pt:[{pt:F()}],pr:[{pr:F()}],pb:[{pb:F()}],pl:[{pl:F()}],m:[{m:xe()}],mx:[{mx:xe()}],my:[{my:xe()}],ms:[{ms:xe()}],me:[{me:xe()}],mt:[{mt:xe()}],mr:[{mr:xe()}],mb:[{mb:xe()}],ml:[{ml:xe()}],"space-x":[{"space-x":F()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":F()}],"space-y-reverse":["space-y-reverse"],size:[{size:_e()}],w:[{w:[d,"screen",..._e()]}],"min-w":[{"min-w":[d,"screen","none",..._e()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},..._e()]}],h:[{h:["screen","lh",..._e()]}],"min-h":[{"min-h":["screen","lh","none",..._e()]}],"max-h":[{"max-h":["screen","lh",..._e()]}],"font-size":[{text:["base",t,Xo,xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ee,Vu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ku,J]}],"font-family":[{font:[wx,J,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ee,J]}],"line-clamp":[{"line-clamp":[ke,"none",ee,Vu]}],leading:[{leading:[l,...F()]}],"list-image":[{"list-image":["none",ee,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",ee,xr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[ke,"auto",ee,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xn,ee,J],radial:["",ee,J],conic:[Xn,ee,J]},xx,kx]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,ee,J]}],"outline-w":[{outline:["",ke,Xo,xr]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",v,hs,fs]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",y,hs,fs]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[ke,xr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",b,hs,fs]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[ke,ee,J]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[ee,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":H()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,J]}],filter:[{filter:["","none",ee,J]}],blur:[{blur:Pe()}],brightness:[{brightness:[ke,ee,J]}],contrast:[{contrast:[ke,ee,J]}],"drop-shadow":[{"drop-shadow":["","none",x,hs,fs]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",ke,ee,J]}],"hue-rotate":[{"hue-rotate":[ke,ee,J]}],invert:[{invert:["",ke,ee,J]}],saturate:[{saturate:[ke,ee,J]}],sepia:[{sepia:["",ke,ee,J]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,J]}],"backdrop-blur":[{"backdrop-blur":Pe()}],"backdrop-brightness":[{"backdrop-brightness":[ke,ee,J]}],"backdrop-contrast":[{"backdrop-contrast":[ke,ee,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,ee,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,ee,J]}],"backdrop-invert":[{"backdrop-invert":["",ke,ee,J]}],"backdrop-opacity":[{"backdrop-opacity":[ke,ee,J]}],"backdrop-saturate":[{"backdrop-saturate":[ke,ee,J]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,ee,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":F()}],"border-spacing-x":[{"border-spacing-x":F()}],"border-spacing-y":[{"border-spacing-y":F()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",ee,J]}],ease:[{ease:["linear","initial",O,ee,J]}],delay:[{delay:[ke,ee,J]}],animate:[{animate:["none",L,ee,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,ee,J]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:ze()}],"rotate-x":[{"rotate-x":ze()}],"rotate-y":[{"rotate-y":ze()}],"rotate-z":[{"rotate-z":ze()}],scale:[{scale:pt()}],"scale-x":[{"scale-x":pt()}],"scale-y":[{"scale-y":pt()}],"scale-z":[{"scale-z":pt()}],"scale-3d":["scale-3d"],skew:[{skew:nr()}],"skew-x":[{"skew-x":nr()}],"skew-y":[{"skew-y":nr()}],transform:[{transform:[ee,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fr()}],"translate-x":[{"translate-x":Fr()}],"translate-y":[{"translate-y":Fr()}],"translate-z":[{"translate-z":Fr()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,J]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,J]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[ke,Xo,xr,Vu]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),yt=Av,Cx=180,Bx=400,ro="data-blok-interface",Ax="blok",Ix="inline-toolbar",$u="tooltip",Hv="[data-blok-interface=blok]",jv="[data-blok-interface=inline-toolbar]";typeof process!="undefined"&&process.platform?process.platform==="darwin"?"Meta":"Control":typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().includes("mac")?"Meta":"Control";const _x="data-blok-element",Gu="[data-blok-element]",Rx="data-blok-element-content",Xu="[data-blok-element-content]",Nx="data-blok-editor",qt="[data-blok-editor]",Ox="data-blok-redactor",qv="[data-blok-redactor]",Lx="data-blok-narrow",Dx="data-blok-rtl",Px="data-blok-fake-cursor",Uv="[data-blok-fake-cursor]",Mx="data-blok-overlay",Fx="data-blok-overlay-container",zx="data-blok-overlay-rectangle",Hx="data-blok-toolbar",Wv="[data-blok-toolbar]",jx="data-blok-settings-toggler",qx="data-blok-drag-handle",Ux="[data-blok-drag-handle]",Yu="data-blok-tool",Wx="data-blok-stub",Kx="data-blok-stub-info",Vx="data-blok-stub-title",$x="data-blok-stub-subtitle",Qu="data-blok-selected",Zu="data-blok-stretched",Gx="data-blok-empty",Kv="data-blok-dragging",Vv="data-blok-toolbox-opened";class se{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.fakeBackgroundElements=[]}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?N.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtBlok(){return this.isSelectionAtBlok(se.get())}static isSelectionAtBlok(e){if(!e)return!1;const t=e.anchorNode||e.focusNode,o=t&&t.nodeType===Node.TEXT_NODE?t.parentNode:t,i=o&&o instanceof Element?o.closest(qv):null;return i?i.nodeType===Node.ELEMENT_NODE:!1}static isRangeAtBlok(e){if(!e)return;const t=e.startContainer&&e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentNode:e.startContainer,o=t&&t instanceof Element?t.closest(qv):null;return o?o.nodeType===Node.ELEMENT_NODE:!1}static get isSelectionExists(){const e=se.get();return!!(e!=null&&e.anchorNode)}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){const e=document.selection,t={x:0,y:0,width:0,height:0};if(e&&e.type!=="Control"){const d=e.createRange();return t.x=d.boundingLeft,t.y=d.boundingTop,t.width=d.boundingWidth,t.height=d.boundingHeight,t}const o=window.getSelection();if(!o)return Be("Method window.getSelection returned null","warn"),t;if(o.rangeCount===null||isNaN(o.rangeCount))return Be("Method SelectionUtils.rangeCount is not supported","warn"),t;if(o.rangeCount===0)return t;const i=o.getRangeAt(0).cloneRange(),l=i.getBoundingClientRect();if(l.x===0&&l.y===0){const c=document.createElement("span");c.appendChild(document.createTextNode("​")),i.insertNode(c);const d=c.getBoundingClientRect(),h=c.parentNode;return h==null||h.removeChild(c),h==null||h.normalize(),d}return l}static get text(){var t;const e=window.getSelection();return(t=e==null?void 0:e.toString())!=null?t:""}static get(){return window.getSelection()}static setCursor(e,t=0){const o=document.createRange(),i=window.getSelection(),l=N.isNativeInput(e);if(l&&!N.canSetCaret(e))return e.getBoundingClientRect();if(l){const c=e;return c.focus(),c.selectionStart=t,c.selectionEnd=t,c.getBoundingClientRect()}return o.setStart(e,t),o.setEnd(e,t),i?(i.removeAllRanges(),i.addRange(o),o.getBoundingClientRect()):e.getBoundingClientRect()}static isRangeInsideContainer(e){const t=se.range;return t===null?!1:e.contains(t.startContainer)}static addFakeCursor(){const e=se.range;if(e===null)return;const t=N.make("span");t.setAttribute(Px,""),t.setAttribute("data-blok-mutation-free","true"),e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return N.find(e,Uv)!==null}static removeFakeCursor(e=document.body){const t=N.find(e,Uv);t&&t.remove()}removeFakeBackground(){var l;if(!this.fakeBackgroundElements.length){this.isFakeBackgroundEnabled=!1;return}const e=this.fakeBackgroundElements[0],t=this.fakeBackgroundElements[this.fakeBackgroundElements.length-1],o=e.firstChild,i=t.lastChild;if(this.fakeBackgroundElements.forEach(c=>{this.unwrapFakeBackground(c)}),o&&i){const c=document.createRange();c.setStart(o,0),c.setEnd(i,((l=i.textContent)==null?void 0:l.length)||0),this.savedSelectionRange=c}this.fakeBackgroundElements=[],this.isFakeBackgroundEnabled=!1}setFakeBackground(){this.removeFakeBackground();const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed)return;const o=this.collectTextNodes(t);if(o.length===0)return;const i=t.startContainer,l=t.startOffset,c=t.endContainer,d=t.endOffset;if(this.fakeBackgroundElements=[],o.forEach(g=>{var O,L;const v=document.createRange(),y=g===i,b=g===c,x=y?l:0,w=(L=(O=g.textContent)==null?void 0:O.length)!=null?L:0,T=b?d:w;if(x===T)return;v.setStart(g,x),v.setEnd(g,T);const S=this.wrapRangeWithFakeBackground(v);S&&this.fakeBackgroundElements.push(S)}),!this.fakeBackgroundElements.length)return;const h=document.createRange();h.setStartBefore(this.fakeBackgroundElements[0]),h.setEndAfter(this.fakeBackgroundElements[this.fakeBackgroundElements.length-1]),e.removeAllRanges(),e.addRange(h),this.isFakeBackgroundEnabled=!0}collectTextNodes(e){const t=[],{commonAncestorContainer:o}=e;if(o.nodeType===Node.TEXT_NODE)return t.push(o),t;const i=document.createTreeWalker(o,NodeFilter.SHOW_TEXT,{acceptNode:l=>e.intersectsNode(l)&&l.textContent&&l.textContent.length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});for(;i.nextNode();)t.push(i.currentNode);return t}wrapRangeWithFakeBackground(e){if(e.collapsed)return null;const t=N.make("span");t.setAttribute("data-blok-testid","fake-background"),t.setAttribute("data-blok-fake-background","true"),t.setAttribute("data-blok-mutation-free","true"),t.style.backgroundColor="#a8d6ff",t.style.color="inherit",t.style.display="inline",t.style.padding="0",t.style.margin="0";const o=e.extractContents();return o.childNodes.length===0?null:(t.appendChild(o),e.insertNode(t),t)}unwrapFakeBackground(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}save(){this.savedSelectionRange=se.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(this.savedSelectionRange))}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection();if(!e||!e.focusNode)return;const t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,o=10){const i=window.getSelection();if(!i||!i.anchorNode||!i.focusNode)return null;const l=[i.anchorNode,i.focusNode],c=d=>{const h=(g,v)=>{if(v<=0||!g)return null;const y=g.nodeType===Node.ELEMENT_NODE&&g.tagName===e,b=!t||g.classList&&g.classList.contains(t);if(y&&b)return g;if(!g.parentNode)return null;const x=g.parentNode,w=!t||x.classList&&x.classList.contains(t);return x.tagName===e&&w?x:h(x,v-1)};return h(d,o)};for(const d of l){const h=c(d);if(h)return h}return null}expandToTag(e){const t=window.getSelection();if(!t)return;t.removeAllRanges();const o=document.createRange();o.selectNodeContents(e),t.addRange(o)}}const Xx=(a,e)=>{const{type:t,target:o,addedNodes:i,removedNodes:l}=a;return a.type==="attributes"&&a.attributeName==="data-blok-empty"?!1:e.contains(o)?!0:t!=="childList"?!1:Array.from(i).some(h=>h===e)?!0:Array.from(l).some(h=>h===e)},Ju="redactor dom changed",$v="block changed",Gv="fake cursor is about to be toggled",Xv="fake cursor have been set",Er="blok mobile layout toggled",ed="block-settings-opened",td="block-settings-closed",nd=(a,e)=>{if(!a.conversionConfig)return!1;const t=a.conversionConfig[e];return De(t)||un(t)},ps=(a,e)=>nd(a.tool,e),Yv=(a,e)=>Object.entries(a).some((([t,o])=>e[t]&&z1(e[t],o))),Qv=async(a,e)=>{const o=(await a.save()).data,i=e.find(l=>l.name===a.name);return i!==void 0&&!nd(i,"export")?[]:e.reduce((l,c)=>{if(!nd(c,"import")||c.toolbox===void 0)return l;const d=c.toolbox.filter(h=>{if(ot(h)||h.icon===void 0)return!1;const g=h.data!==void 0;return!(g&&Yv(h.data,o)||!g&&c.name===a.name)});return l.push(Tt(be({},c),{toolbox:d})),l},[])},Zv=(a,e)=>a.mergeable?a.name===e.name?!0:ps(e,"export")&&ps(a,"import"):!1,Yx=(a,e)=>{const t=e==null?void 0:e.export;return De(t)?t(a):un(t)?a[t]:(t!==void 0&&Be("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")},Jv=(a,e,t)=>{const o=e==null?void 0:e.import;return De(o)?o(a,t):un(o)?{[o]:a}:(o!==void 0&&Be("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})};var tt=(a=>(a.Default="default",a.Separator="separator",a.Html="html",a))(tt||{}),Dn=(a=>(a.RENDERED="rendered",a.MOVED="moved",a.UPDATED="updated",a.REMOVED="removed",a.ON_PASTE="onPaste",a))(Dn||{});const tn=class tn extends $o{constructor({id:e=P1(),data:t,tool:o,readOnly:i,tunesData:l},c){super(),this.cachedInputs=[],this.lastSavedTunes={},this.toolRenderedElement=null,this.contentElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.readyResolver=null,this.unavailableTunesData={},this.inputIndex=0,this.blokEventBus=null,this.redactorDomChangedCallback=()=>{},this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(h=void 0)=>{const g=h===void 0,v=h instanceof InputEvent;!g&&!v&&this.detectToolRootChange(h),(g||v?!0:!(h.length>0&&h.every(x=>{const{addedNodes:w,removedNodes:T,target:S}=x;return[...Array.from(w),...Array.from(T),S].every(L=>{var H;const U=N.isElement(L)?L:(H=L.parentElement)!=null?H:null;return U===null?!1:U.closest('[data-blok-mutation-free="true"]')!==null})})))&&(this.dropInputsCache(),this.updateCurrentInput(),this.toggleInputsEmptyMark(),this.call("updated"),this.emit("didMutated",this))},this.ready=new Promise(h=>{this.readyResolver=h}),this.name=o.name,this.id=e,this.settings=o.settings,this.config=this.settings,this.blokEventBus=c||null,this.blockAPI=new On(this),this.lastSavedData=t!=null?t:{},this.lastSavedTunes=l!=null?l:{},this.tool=o,this.toolInstance=o.create(t,this.blockAPI,i),this.tunes=o.tunes,this.composeTunes(l);const d=this.compose();if(d==null)throw new Error(`Tool "${this.name}" did not return a block holder element during render()`);this.holder=d,window.requestIdleCallback(()=>{this.watchBlockMutations(),this.addInputEvents(),this.toggleInputsEmptyMark()})}call(e,t){const o=this.toolInstance[e];if(De(o))try{o.call(this.toolInstance,t)}catch(i){const l=i instanceof Error?i.message:String(i);Be(`Error during '${e}' call: ${l}`,"error")}}async mergeWith(e){if(!De(this.toolInstance.merge))throw new Error(`Block tool "${this.name}" does not support merging`);await this.toolInstance.merge(e)}async save(){const e=await this.extractToolData();if(e===void 0)return;const t=be({},this.unavailableTunesData);[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach(([l,c])=>{if(De(c.save))try{t[l]=c.save()}catch(d){Be(`Tune ${c.constructor.name} save method throws an Error %o`,"warn",d)}});const o=window.performance.now();this.lastSavedData=e,this.lastSavedTunes=be({},t);const i=window.performance.now();return{id:this.id,tool:this.name,data:e,tunes:t,time:i-o}}async extractToolData(){try{const e=await this.toolInstance.save(this.pluginsContent);if(!this.isEmpty||e===void 0||e===null||typeof e!="object")return e;const t=be({},e),o=i=>{const l=t[i];if(typeof l!="string")return;const c=document.createElement("div");c.innerHTML=l,N.isEmpty(c)&&(t[i]="")};return o("text"),o("html"),t}catch(e){const t=e instanceof Error?e:new Error(String(e));Be(`Saving process for ${this.name} tool failed due to the ${t}`,"log",t);return}}async validate(e){return this.toolInstance.validate instanceof Function?await this.toolInstance.validate(e):!0}getTunes(){const e=[],t=[],o=(c,d)=>{if(c){if(N.isElement(c)){d.push({type:tt.Html,element:c});return}if(Array.isArray(c)){d.push(...c);return}d.push(c)}},i=typeof this.toolInstance.renderSettings=="function"?this.toolInstance.renderSettings():[];return o(i,e),[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map(c=>c.render()).forEach(c=>{o(c,t)}),{toolTunes:e,commonTunes:t}}updateCurrentInput(){var l;const e=se.anchorNode,t=document.activeElement,o=c=>{if(!c)return;const d=c instanceof HTMLElement?c:c.parentElement;if(d===null)return;const h=this.inputs.find(y=>y===d||y.contains(d));if(h!==void 0)return h;const g=d.closest(N.allInputsSelector);if(!(g instanceof HTMLElement))return;const v=this.inputs.find(y=>y===g);if(v!==void 0)return v};if(N.isNativeInput(t)){this.currentInput=t;return}const i=(l=o(e))!=null?l:t instanceof HTMLElement?o(t):void 0;if(i!==void 0){this.currentInput=i;return}t instanceof HTMLElement&&this.inputs.includes(t)&&(this.currentInput=t)}dispatchChange(){this.didMutated()}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),De(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(!e)return;if(e.length===1)return Promise.resolve(e[0]);const t=await this.data;return e.find(o=>Yv(o.data,t))}async exportDataAsString(){const e=await this.data;return Yx(e,this.tool.conversionConfig)}get inputs(){if(this.cachedInputs.length!==0)return this.cachedInputs;const e=N.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){if(e===void 0)return;const t=this.inputs.findIndex(o=>o===e||o.contains(e));t!==-1&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then(e=>e&&!ot(e.data)?e.data:{})}get preservedData(){var e;return(e=this.lastSavedData)!=null?e:{}}get preservedTunes(){var e;return(e=this.lastSavedTunes)!=null?e:{}}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return De(this.toolInstance.merge)}get focusable(){return this.inputs.length!==0}get isEmpty(){const e=N.isEmpty(this.pluginsContent,"/"),t=!this.hasMedia;return e&&t}get hasMedia(){const e=["img","iframe","video","audio","source","input","textarea","twitterwidget"];return!!this.holder.querySelector(e.join(","))}set selected(e){var i,l;if(e?this.holder.setAttribute(Qu,"true"):this.holder.removeAttribute(Qu),this.contentElement){const c=this.stretched?tn.styles.contentStretched:"";this.contentElement.className=e?Ae(tn.styles.content,tn.styles.contentSelected):Ae(tn.styles.content,c)}const t=e===!0&&se.isRangeInsideContainer(this.holder),o=e===!1&&se.isFakeCursorInsideContainer(this.holder);!t&&!o||((i=this.blokEventBus)==null||i.emit(Gv,{state:e}),t&&se.addFakeCursor(),o&&se.removeFakeCursor(this.holder),(l=this.blokEventBus)==null||l.emit(Xv,{state:e}))}get selected(){return this.holder.getAttribute(Qu)==="true"}setStretchState(e){e?this.holder.setAttribute(Zu,"true"):this.holder.removeAttribute(Zu),this.contentElement&&!this.selected&&(this.contentElement.className=e?Ae(tn.styles.content,tn.styles.contentStretched):tn.styles.content)}set stretched(e){this.setStretchState(e)}get stretched(){return this.holder.getAttribute(Zu)==="true"}get pluginsContent(){if(this.toolRenderedElement===null)throw new Error("Block pluginsContent is not yet initialized");return this.toolRenderedElement}compose(){var l;const e=N.make("div",tn.styles.wrapper),t=N.make("div",tn.styles.content);this.contentElement=t,e.setAttribute(_x,""),t.setAttribute(Rx,""),t.setAttribute("data-blok-testid","block-content");const o=this.toolInstance.render();e.setAttribute("data-blok-testid","block-wrapper"),this.name&&!e.hasAttribute("data-blok-component")&&e.setAttribute("data-blok-component",this.name),e.setAttribute("data-blok-id",this.id),o instanceof Promise?o.then(c=>{var d;this.toolRenderedElement=c,this.addToolDataAttributes(c,e),t.appendChild(c),(d=this.readyResolver)==null||d.call(this)}).catch(c=>{var d;Be("Tool render promise rejected: %o","error",c),(d=this.readyResolver)==null||d.call(this)}):(this.toolRenderedElement=o,this.addToolDataAttributes(o,e),t.appendChild(o),(l=this.readyResolver)==null||l.call(this));const i=[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].reduce((c,d)=>{if(De(d.wrap))try{return d.wrap(c)}catch(h){return Be(`Tune ${d.constructor.name} wrap method throws an Error %o`,"warn",h),c}return c},t);return e.appendChild(i),e}addToolDataAttributes(e,t){var d;this.name&&!t.hasAttribute("data-blok-component")&&t.setAttribute("data-blok-component",this.name);const o="data-blok-placeholder",i=(d=this.config)==null?void 0:d.placeholder,l=typeof i=="string"?i.trim():"",c=["empty:before:pointer-events-none","empty:before:text-gray-text","empty:before:cursor-text","empty:before:content-[attr(data-blok-placeholder)]","[&[data-blok-empty=true]]:before:pointer-events-none","[&[data-blok-empty=true]]:before:text-gray-text","[&[data-blok-empty=true]]:before:cursor-text","[&[data-blok-empty=true]]:before:content-[attr(data-blok-placeholder)]"];if(l.length>0){e.setAttribute(o,l),e.classList.add(...c);return}i===!1&&e.hasAttribute(o)&&e.removeAttribute(o)}composeTunes(e){Array.from(this.tunes.values()).forEach(t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))}),Object.entries(e).forEach(([t,o])=>{this.tunesInstances.has(t)||(this.unavailableTunesData[t]=o)})}addInputEvents(){this.inputs.forEach(e=>{e.addEventListener("focus",this.handleFocus),N.isNativeInput(e)&&e.addEventListener("input",this.didMutated)})}removeInputEvents(){this.inputs.forEach(e=>{e.removeEventListener("focus",this.handleFocus),N.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)})}watchBlockMutations(){var e;this.redactorDomChangedCallback=t=>{const{mutations:o}=t,i=this.toolRenderedElement;if(i===null)return;const l=o.filter(c=>Xx(c,i));l.length>0&&this.didMutated(l)},(e=this.blokEventBus)==null||e.on(Ju,this.redactorDomChangedCallback)}unwatchBlockMutations(){var e;(e=this.blokEventBus)==null||e.off(Ju,this.redactorDomChangedCallback)}refreshToolRootElement(){const e=this.holder.querySelector(Xu);if(!e)return;const t=e.firstElementChild;t&&t!==this.toolRenderedElement&&(this.toolRenderedElement=t,this.dropInputsCache())}detectToolRootChange(e){const t=this.toolRenderedElement;t!==null&&e.forEach(o=>{if(Array.from(o.removedNodes).includes(t)){const l=o.addedNodes[o.addedNodes.length-1];this.toolRenderedElement=l}})}dropInputsCache(){this.cachedInputs=[]}toggleInputsEmptyMark(){this.inputs.forEach(kv)}};tn.styles={wrapper:"relative opacity-100 animate-fade-in first:mt-0 [&_a]:cursor-pointer [&_a]:underline [&_a]:text-link [&_b]:font-bold [&_i]:italic",content:"relative mx-auto transition-colors duration-150 ease-out max-w-content",contentSelected:"bg-selection [&_[contenteditable]]:select-none [&_img]:opacity-55 [&_[data-blok-tool=stub]]:opacity-55",contentStretched:"max-w-none"};let Yo=tn;class Qx extends Se{constructor(){super(...arguments),this.insert=(e,t={},o={},i,l,c,d)=>{const h=e!=null?e:this.config.defaultBlock,g=this.Blok.BlockManager.insert({id:d,tool:h,data:t,index:i,needToFocus:l,replace:c});return new On(g)},this.composeBlockData=async e=>{const t=this.Blok.Tools.blockTools.get(e);if(t===void 0)throw new Error(`Block Tool with type "${e}" not found`);return new Yo({tool:t,api:this.Blok.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t,o)=>{const{BlockManager:i}=this.Blok,l=i.getBlockById(e);if(l===void 0)throw new Error(`Block with id "${e}" not found`);const c=await i.update(l,t,o);return new On(c)},this.convert=async(e,t,o)=>{var y,b;const{BlockManager:i,Tools:l}=this.Blok,c=i.getBlockById(e);if(!c)throw new Error(`Block with id "${e}" not found`);const d=l.blockTools.get(c.name),h=l.blockTools.get(t);if(!h)throw new Error(`Block Tool with type "${t}" not found`);const g=((y=d==null?void 0:d.conversionConfig)==null?void 0:y.export)!==void 0,v=((b=h.conversionConfig)==null?void 0:b.import)!==void 0;if(g&&v){const x=await i.convert(c,t,o);return new On(x)}else{const x=[g?!1:us(c.name),v?!1:us(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${c.name}" to "${t}" is not possible. ${x} tool(s) should provide a "conversionConfig"`)}},this.insertMany=(e,t=this.Blok.BlockManager.blocks.length-1)=>{this.validateIndex(t);const o=e.map(({id:i,type:l,data:c})=>this.Blok.BlockManager.composeBlock({id:i,tool:l||this.config.defaultBlock,data:c}));return this.Blok.BlockManager.insertMany(o,t),o.map(i=>new On(i))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),getBlockByElement:e=>this.getBlockByElement(e),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert,stretchBlock:(e,t=!0)=>this.stretchBlock(e,t)}}getBlocksCount(){return this.Blok.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Blok.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Blok.BlockManager.getBlockById(e);if(!t){Qt("There is no block with id `"+e+"`","warn");return}return this.Blok.BlockManager.getBlockIndex(t)}getBlockByIndex(e){const t=this.Blok.BlockManager.getBlockByIndex(e);if(t===void 0){Qt("There is no block at index `"+e+"`","warn");return}return new On(t)}getById(e){const t=this.Blok.BlockManager.getBlockById(e);return t===void 0?(Qt("There is no block with id `"+e+"`","warn"),null):new On(t)}getBlockByElement(e){const t=this.Blok.BlockManager.getBlock(e);if(t===void 0){Qt("There is no block corresponding to element `"+e+"`","warn");return}return new On(t)}move(e,t){this.Blok.BlockManager.move(e,t)}delete(e=this.Blok.BlockManager.currentBlockIndex){const t=this.Blok.BlockManager.getBlockByIndex(e);if(t===void 0){Qt(`There is no block at index \`${e}\``,"warn");return}try{this.Blok.BlockManager.removeBlock(t)}catch(o){Qt(o,"warn");return}this.Blok.BlockManager.blocks.length===0&&this.Blok.BlockManager.insert(),this.Blok.BlockManager.currentBlock&&this.Blok.Caret.setToBlock(this.Blok.BlockManager.currentBlock,this.Blok.Caret.positions.END),this.Blok.Toolbar.close()}async clear(){await this.Blok.BlockManager.clear(!0),this.Blok.InlineToolbar.close()}async render(e){if(e===void 0||e.blocks===void 0)throw new Error("Incorrect data passed to the render() method");this.Blok.ModificationsObserver.disable(),await this.Blok.BlockManager.clear(),await this.Blok.Renderer.render(e.blocks),this.Blok.ModificationsObserver.enable()}async renderFromHTML(e){return await this.Blok.BlockManager.clear(),this.Blok.Paste.processText(e,!0)}stretchBlock(e,t=!0){const o=this.Blok.BlockManager.getBlockByIndex(e);o&&o.setStretchState(t)}validateIndex(e){if(typeof e!="number")throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(e===null)throw new Error("Index should be greater than or equal to 0")}}const Zx=(a,e)=>typeof a=="number"?e.BlockManager.getBlockByIndex(a):typeof a=="string"?e.BlockManager.getBlockById(a):e.BlockManager.getBlockById(a.id);class Jx extends Se{constructor(){super(...arguments),this.setToFirstBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.firstBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.firstBlock,e,t),!0):!1,this.setToLastBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.lastBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.lastBlock,e,t),!0):!1,this.setToPreviousBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.previousBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.previousBlock,e,t),!0):!1,this.setToNextBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.nextBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.nextBlock,e,t),!0):!1,this.setToBlock=(e,t=this.Blok.Caret.positions.DEFAULT,o=0)=>{const i=Zx(e,this.Blok);return i===void 0?!1:(this.Blok.Caret.setToBlock(i,t,o),!0)},this.focus=(e=!1)=>e?this.setToLastBlock(this.Blok.Caret.positions.END):this.setToFirstBlock(this.Blok.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}class eE extends Se{get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}}class rd extends Se{static getNamespace(e,t){return t?`blockTunes.${e}`:`tools.${e}`}get methods(){return{t:e=>(Qt("I18n.t() method can be accessed only from Tools","warn"),"")}}getMethodsForTool(e,t){return Object.assign(this.methods,{t:o=>$e.t(rd.getNamespace(e,t),o)})}}class tE extends Se{get methods(){return{blocks:this.Blok.BlocksAPI.methods,caret:this.Blok.CaretAPI.methods,tools:this.Blok.ToolsAPI.methods,events:this.Blok.EventsAPI.methods,listeners:this.Blok.ListenersAPI.methods,notifier:this.Blok.NotifierAPI.methods,sanitizer:this.Blok.SanitizerAPI.methods,saver:this.Blok.SaverAPI.methods,selection:this.Blok.SelectionAPI.methods,styles:this.Blok.StylesAPI.classes,toolbar:this.Blok.ToolbarAPI.methods,inlineToolbar:this.Blok.InlineToolbarAPI.methods,tooltip:this.Blok.TooltipAPI.methods,i18n:this.Blok.I18nAPI.methods,readOnly:this.Blok.ReadOnlyAPI.methods,ui:this.Blok.UiAPI.methods}}getMethodsForTool(e,t){return Object.assign(this.methods,{i18n:this.Blok.I18nAPI.getMethodsForTool(e,t)})}}class nE extends Se{get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Blok.InlineToolbar.tryToShow()}close(){this.Blok.InlineToolbar.close()}}class rE extends Se{get methods(){return{on:(e,t,o,i)=>this.on(e,t,o,i),off:(e,t,o,i)=>this.off(e,t,o,i),offById:e=>this.offById(e)}}on(e,t,o,i){return this.listeners.on(e,t,o,i)}off(e,t,o,i){this.listeners.off(e,t,o,i)}offById(e){this.listeners.offById(e)}}class oE{constructor(){this.notifierModule=null,this.loadingPromise=null}loadNotifierModule(){return this.notifierModule!==null?Promise.resolve(this.notifierModule):(this.loadingPromise===null&&(this.loadingPromise=Promise.resolve().then(()=>FC).then(e=>{var o;const t=(o=e==null?void 0:e.default)!=null?o:e;if(!this.isNotifierModule(t))throw new Error('notifier module does not expose a "show" method.');return this.notifierModule=t,t}).catch(e=>{throw this.loadingPromise=null,e})),this.loadingPromise)}show(e){this.loadNotifierModule().then(t=>{t.show(e)}).catch(t=>{console.error("[Blok] Failed to display notification. Reason:",t)})}isNotifierModule(e){return typeof e=="object"&&e!==null&&"show"in e&&typeof e.show=="function"}}class iE extends Se{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.notifier=new oE}get methods(){return{show:e=>this.show(e)}}show(e){return this.notifier.show(e)}}class sE extends Se{get methods(){const e=()=>this.isEnabled;return{toggle:t=>this.toggle(t),get isEnabled(){return e()}}}toggle(e){return this.Blok.ReadOnly.toggle(e)}get isEnabled(){return this.Blok.ReadOnly.isEnabled}}var gs={exports:{}},aE=gs.exports,ey;function lE(){return ey||(ey=1,(function(a,e){(function(t,o){a.exports=o()})(aE,function(){function t(y){var b=y.tags,x=Object.keys(b),w=x.map(function(T){return typeof b[T]}).every(function(T){return T==="object"||T==="boolean"||T==="function"});if(!w)throw new Error("The configuration was invalid");this.config=y}var o=["P","LI","TD","TH","DIV","H1","H2","H3","H4","H5","H6","PRE"];function i(y){return o.indexOf(y.nodeName)!==-1}var l=["A","B","STRONG","I","EM","SUB","SUP","U","STRIKE"];function c(y){return l.indexOf(y.nodeName)!==-1}t.prototype.clean=function(y){const b=document.implementation.createHTMLDocument(),x=b.createElement("div");return x.innerHTML=y,this._sanitize(b,x),x.innerHTML},t.prototype._sanitize=function(y,b){var x=d(y,b),w=x.firstChild();if(w)do{if(w.nodeType===Node.TEXT_NODE)if(w.data.trim()===""&&(w.previousElementSibling&&i(w.previousElementSibling)||w.nextElementSibling&&i(w.nextElementSibling))){b.removeChild(w),this._sanitize(y,b);break}else continue;if(w.nodeType===Node.COMMENT_NODE){b.removeChild(w),this._sanitize(y,b);break}var T=c(w),S;T&&(S=Array.prototype.some.call(w.childNodes,i));var O=!!b.parentNode,L=i(b)&&i(w)&&O,U=w.nodeName.toLowerCase(),H=h(this.config,U,w),X=T&&S;if(X||g(w,H)||!this.config.keepNestedBlockElements&&L){if(!(w.nodeName==="SCRIPT"||w.nodeName==="STYLE"))for(;w.childNodes.length>0;)b.insertBefore(w.childNodes[0],w);b.removeChild(w),this._sanitize(y,b);break}for(var q=0;q<w.attributes.length;q+=1){var W=w.attributes[q];v(W,H,w)&&(w.removeAttribute(W.name),q=q-1)}this._sanitize(y,w)}while(w=x.nextSibling())};function d(y,b){return y.createTreeWalker(b,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null,!1)}function h(y,b,x){return typeof y.tags[b]=="function"?y.tags[b](x):y.tags[b]}function g(y,b){return typeof b=="undefined"?!0:typeof b=="boolean"?!b:!1}function v(y,b,x){var w=y.name.toLowerCase();return b===!0?!1:typeof b[w]=="function"?!b[w](y.value,x):typeof b[w]=="undefined"||b[w]===!1?!0:typeof b[w]=="string"?b[w]!==y.value:!1}return t})})(gs)),gs.exports}var cE=lE();const uE=Ne(cE),dE=/^\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)/i,fE=/\s*(?:href|src)\s*=\s*(?:"\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^"]*"|'\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^']*|(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^ \t\r\n>]*)/gi,od=(a,e,t={})=>a.map(o=>{const i=De(e)?e(o.tool):e,l=i!=null?i:{};return qe(l)&&ot(l)&&ot(t)?o:Tt(be({},o),{data:id(o.data,l,t)})}),Tn=(a,e={})=>{const t={tags:e};return new uE(t).clean(a)},id=(a,e,t)=>Array.isArray(a)?hE(a,e,t):qe(a)?pE(a,e,t):un(a)?gE(a,e,t):a,hE=(a,e,t)=>a.map(o=>id(o,e,t)),pE=(a,e,t)=>{const o={},i=a;for(const l in a){if(!Object.prototype.hasOwnProperty.call(a,l))continue;const c=i[l],d=qe(e)?e:void 0,h=d==null?void 0:d[l],g=h!==void 0&&mE(h)?h:e;o[l]=id(c,g,t)}return o},gE=(a,e,t)=>{const o=TE(e,t);if(o){const i=Tn(a,o);return sd(ny(i,o))}if(!ot(t)){const i=Tn(a,t);return sd(ny(i,t))}return sd(a)},mE=a=>qe(a)||hv(a)||De(a),vE=a=>a?dE.test(a):!1,sd=a=>{if(!a||a.indexOf("<")===-1)return a;if(typeof document!="undefined"){const e=document.createElement("template");return e.innerHTML=a,e.content.querySelectorAll("[href],[src]").forEach(o=>{["href","src"].forEach(i=>{const l=o.getAttribute(i);vE(l)&&o.removeAttribute(i)})}),e.innerHTML}return a.replace(fE,"")},ad=a=>{if(ot(a))return{};const e={};for(const t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=Sr(a[t]));return e},ty=a=>function(t){const o=a.call(this,t);return o==null?{}:o},yE=new Set(["class","id","title","role","dir","lang"]),bE=a=>{const e=a.toLowerCase();return e.startsWith("data-")||e.startsWith("aria-")||yE.has(e)},kE=a=>{const e={};return Array.from(a.attributes).forEach(t=>{bE(t.name)&&(e[t.name]=!0)}),e},Sr=a=>a===!0?ty(kE):a===!1?!1:De(a)?ty(a):un(a)?a:qe(a)?Ko({},a):a,wE=(a,e)=>{if(ot(a))return ad(e);const t={};for(const o in a){if(!Object.prototype.hasOwnProperty.call(a,o))continue;const i=a[o],l=e?e[o]:void 0;if(De(l)){t[o]=Sr(l);continue}if(De(i)){t[o]=Sr(i);continue}if(qe(i)&&qe(l)){t[o]=Ko({},l,i);continue}if(l!==void 0){t[o]=Sr(l);continue}t[o]=Sr(i)}return t},TE=(a,e)=>qe(a)&&!De(a)?wE(e,a):a===!1?{}:ot(e)?null:ad(e),ld=(a,...e)=>{if(ot(a))return Object.assign({},...e);const t=ad(a);return e.forEach(o=>{if(o)for(const i in o){if(!Object.prototype.hasOwnProperty.call(o,i))continue;const l=o[i];if(!Object.prototype.hasOwnProperty.call(t,i))continue;const c=t[i];if(De(l)){t[i]=l;continue}if(!(l===!0&&De(c))){if(l===!0){const d=qe(c)&&!De(c);t[i]=d?Ko({},c):Sr(l);continue}if(qe(l)&&qe(c)){t[i]=Ko({},c,l);continue}t[i]=Sr(l)}}}),t},ny=(a,e)=>{if(typeof document=="undefined"||!a||a.indexOf("<")===-1)return a;const t=Object.entries(e).filter(([,i])=>De(i));if(t.length===0)return a;const o=document.createElement("template");return o.innerHTML=a,t.forEach(([i,l])=>{o.content.querySelectorAll(i).forEach(d=>{const h=l(d);if(!(hv(h)||De(h)||h==null))for(const[g,v]of Object.entries(h)){if(v===!1){d.removeAttribute(g);continue}v!==!0&&un(v)&&d.setAttribute(g,v)}})}),o.innerHTML};class xE extends Se{get methods(){return{clean:(e,t)=>this.clean(e,t)}}clean(e,t){return Tn(e,t)}}class EE extends Se{get methods(){return{save:()=>this.save()}}async save(){var l,c;const e="Blok's content can not be saved in read-only mode";if(this.Blok.ReadOnly.isEnabled)throw Qt(e,"warn"),new Error(e);const t=await this.Blok.Saver.save();if(t!==void 0)return t;const o=(c=(l=this.Blok.Saver).getLastSaveError)==null?void 0:c.call(l);if(o instanceof Error)throw o;const i=o!==void 0?String(o):"Blok's content can not be saved because collecting data failed";throw new Error(i)}}class SE extends Se{constructor(){super(...arguments),this.selectionUtils=new se}get methods(){return{findParentTag:(e,t)=>this.findParentTag(e,t),expandToTag:e=>this.expandToTag(e),save:()=>this.selectionUtils.save(),restore:()=>this.selectionUtils.restore(),setFakeBackground:()=>this.selectionUtils.setFakeBackground(),removeFakeBackground:()=>this.selectionUtils.removeFakeBackground()}}findParentTag(e,t){return this.selectionUtils.findParentTag(e,t)}expandToTag(e){this.selectionUtils.expandToTag(e)}}class CE extends Se{get methods(){return{getBlockTools:()=>Array.from(this.Blok.Tools.blockTools.values())}}}class BE extends Se{get classes(){return{block:"py-[theme(spacing.block-padding-vertical)] px-0 [&::-webkit-input-placeholder]:!leading-normal",inlineToolButton:"flex justify-center items-center border-0 rounded h-full p-0 w-7 bg-transparent cursor-pointer leading-normal text-black",inlineToolButtonActive:"bg-icon-active-bg text-icon-active-text",input:"w-full rounded-[3px] border border-line-gray px-3 py-2.5 outline-none shadow-input [&[data-blok-placeholder]]:before:!static [&[data-blok-placeholder]]:before:inline-block [&[data-blok-placeholder]]:before:w-0 [&[data-blok-placeholder]]:before:whitespace-nowrap [&[data-blok-placeholder]]:before:pointer-events-none",loader:"relative border border-line-gray before:absolute before:left-1/2 before:top-1/2 before:w-[18px] before:h-[18px] before:rounded-full before:content-[''] before:-ml-[11px] before:-mt-[11px] before:border-2 before:border-line-gray before:border-l-active-icon before:animate-rotation",button:"p-[13px] rounded-[3px] border border-line-gray text-[14.9px] bg-white text-center cursor-pointer text-gray-text shadow-button-base hover:bg-[#fbfcfe] hover:shadow-button-base-hover [&_svg]:h-5 [&_svg]:mr-[0.2em] [&_svg]:-mt-0.5",settingsButton:"inline-flex items-center justify-center rounded-[3px] cursor-pointer border-0 outline-none bg-transparent align-bottom text-inherit m-0 min-w-toolbox-btn min-h-toolbox-btn [&_svg]:w-auto [&_svg]:h-auto mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile mobile:rounded-lg mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile can-hover:hover:bg-bg-light",settingsButtonActive:"text-active-icon",settingsButtonFocused:"shadow-button-focused bg-item-focus-bg",settingsButtonFocusedAnimated:"animate-button-clicked"}}}class AE extends Se{get methods(){return{close:()=>this.close(),open:()=>this.open(),toggleBlockSettings:e=>this.toggleBlockSettings(e),toggleToolbox:e=>this.toggleToolbox(e)}}open(){this.Blok.Toolbar.moveAndOpen()}close(){this.Blok.Toolbar.close()}toggleBlockSettings(e){if(this.Blok.BlockManager.currentBlockIndex===-1){Qt("Could't toggle the Toolbar because there is no block selected ","warn");return}(e!=null?e:!this.Blok.BlockSettings.opened)?(this.Blok.Toolbar.moveAndOpen(),this.Blok.BlockSettings.open()):this.Blok.BlockSettings.close()}toggleToolbox(e){if(this.Blok.BlockManager.currentBlockIndex===-1){Qt("Could't toggle the Toolbox because there is no block selected ","warn");return}(e!=null?e:!this.Blok.Toolbar.toolbox.opened)?(this.Blok.Toolbar.moveAndOpen(),this.Blok.Toolbar.toolbox.open()):this.Blok.Toolbar.toolbox.close()}}const cd=10,IE="tooltip",_E="aria-hidden",RE="false",NE="true",OE="visibility",LE="visible",DE="hidden",tr=class tr{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=cd,this.offsetLeft=cd,this.offsetRight=cd,this.showingTimeout=null,this.hidingDelay=0,this.hidingTimeout=null,this.ariaObserver=null,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:yt("absolute z-overlay top-0 left-0","bg-tooltip-bg opacity-0","select-none pointer-events-none","transition-[opacity,transform] duration-[50ms,70ms] ease-in","rounded-lg shadow-tooltip","will-change-[opacity,top,left]","before:content-[''] before:absolute before:inset-0 before:bg-tooltip-bg before:-z-10 before:rounded-lg","mobile:hidden").split(" "),tooltipContent:yt("px-2.5 py-1.5","text-tooltip-font text-xs text-center","tracking-[0.02em] leading-[1em]").split(" "),tooltipShown:["opacity-100","transform-none"],placement:{left:["-translate-x-[5px]"],bottom:["translate-y-[5px]"],right:["translate-x-[5px]"],top:["-translate-y-[5px]"]}}}static getInstance(){return tr.instance||(tr.instance=new tr),tr.instance}show(e,t,o={}){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&(clearTimeout(this.hidingTimeout),this.hidingTimeout=null);const l=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},o);if(l.hidingDelay&&(this.hidingDelay=l.hidingDelay),!this.nodes.content||(this.nodes.content.innerHTML="",this.nodes.content.appendChild(this.createContentNode(t)),!this.nodes.wrapper))return;const c=Object.values(this.CSS.placement).flatMap(d=>Array.isArray(d)?d:[d]);switch(this.nodes.wrapper.classList.remove(...c),l.placement){case"top":this.placeTop(e,l);break;case"left":this.placeLeft(e,l);break;case"right":this.placeRight(e,l);break;case"bottom":default:this.placeBottom(e,l);break}if(l&&l.delay){this.showingTimeout=setTimeout(()=>{if(this.nodes.wrapper){const d=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.add(...d),this.updateTooltipVisibility()}this.showed=!0},l.delay);return}if(this.nodes.wrapper){const d=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.add(...d),this.updateTooltipVisibility()}this.showed=!0}createContentNode(e){if(typeof e=="string")return document.createTextNode(e);if(e instanceof Node)return e;throw Error("[Blok Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof e+" given.")}hide(e=!1){const t=!!this.hidingDelay&&!e;if(t&&this.hidingTimeout&&clearTimeout(this.hidingTimeout),t){this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay);return}if(this.nodes.wrapper){const o=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.remove(...o),this.updateTooltipVisibility()}this.showed=!1,this.showingTimeout&&(clearTimeout(this.showingTimeout),this.showingTimeout=null)}onHover(e,t,o={}){e.addEventListener("mouseenter",()=>{this.show(e,t,o)}),e.addEventListener("mouseleave",()=>{this.hide()})}destroy(){var e;(e=this.ariaObserver)==null||e.disconnect(),this.ariaObserver=null,this.nodes.wrapper&&this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll),tr.instance=null}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.wrapper.setAttribute(ro,$u),this.nodes.wrapper.setAttribute("data-blok-testid","tooltip"),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.nodes.content.setAttribute("data-blok-testid","tooltip-content"),this.nodes.wrapper&&this.nodes.content&&(this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper),this.ensureTooltipAttributes())}updateTooltipVisibility(){if(!this.nodes.wrapper)return;const e=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown[0]:this.CSS.tooltipShown,t=this.nodes.wrapper.classList.contains(e);this.nodes.wrapper.style.setProperty(OE,t?LE:DE),this.nodes.wrapper.setAttribute(_E,t?RE:NE),this.nodes.wrapper.setAttribute("data-blok-shown",t?"true":"false")}watchTooltipVisibility(){var e;this.nodes.wrapper&&((e=this.ariaObserver)==null||e.disconnect(),this.updateTooltipVisibility(),this.ariaObserver=new MutationObserver(()=>{this.updateTooltipVisibility()}),this.ariaObserver.observe(this.nodes.wrapper,{attributes:!0,attributeFilter:["class"]}))}ensureTooltipAttributes(){this.nodes.wrapper&&((!this.nodes.wrapper.hasAttribute(ro)||this.nodes.wrapper.getAttribute(ro)!==$u)&&this.nodes.wrapper.setAttribute(ro,$u),this.nodes.wrapper.setAttribute("role",IE),this.watchTooltipVisibility())}placeBottom(e,t){var c;if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,l=o.bottom+this.getScrollTop()+this.offsetTop+((c=t.marginTop)!=null?c:0);this.applyPlacement("bottom",i,l)}placeTop(e,t){if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,l=o.top+this.getScrollTop()-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",i,l)}placeLeft(e,t){var c;if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-((c=t.marginLeft)!=null?c:0),l=o.top+this.getScrollTop()+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",i,l)}placeRight(e,t){var c;if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.right+this.offsetRight+((c=t.marginRight)!=null?c:0),l=o.top+this.getScrollTop()+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",i,l)}applyPlacement(e,t,o){if(!this.nodes.wrapper)return;const i=Array.isArray(this.CSS.placement[e])?this.CSS.placement[e]:[this.CSS.placement[e]];this.nodes.wrapper.classList.add(...i),this.nodes.wrapper.setAttribute("data-blok-placement",e),this.nodes.wrapper.style.left=`${t}px`,this.nodes.wrapper.style.top=`${o}px`}getScrollTop(){var e,t,o;return typeof window.scrollY=="number"?window.scrollY:(o=(t=(e=document.documentElement)==null?void 0:e.scrollTop)!=null?t:document.body.scrollTop)!=null?o:0}make(e,t=null,o={}){const i=document.createElement(e);Array.isArray(t)&&i.classList.add(...t),typeof t=="string"&&i.classList.add(t);for(const l in o)Object.prototype.hasOwnProperty.call(o,l)&&(i[l]=o[l]);return i}append(e,t){Array.isArray(t)?t.forEach(o=>e.appendChild(o)):e.appendChild(t)}prepend(e,t){Array.isArray(t)?t.reverse().forEach(i=>e.prepend(i)):e.prepend(t)}};tr.instance=null;let ud=tr;const ms=()=>ud.getInstance(),PE=(a,e,t)=>{ms().show(a,e,t!=null?t:{})},Qo=(a=!1)=>{ms().hide(a)},vs=(a,e,t)=>{ms().onHover(a,e,t!=null?t:{})},ME=()=>{ms().destroy()};class FE extends Se{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t})}get methods(){return{show:(e,t,o)=>this.show(e,t,o),hide:()=>this.hide(),onHover:(e,t,o)=>this.onHover(e,t,o)}}show(e,t,o){PE(e,t,o)}hide(){Qo()}onHover(e,t,o){vs(e,t,o)}}class zE extends Se{get methods(){return{nodes:this.blokNodes}}get blokNodes(){return{wrapper:this.Blok.UI.nodes.wrapper,redactor:this.Blok.UI.nodes.redactor}}}const ry=(a,e)=>{const t={};return Object.entries(a).forEach(([o,i])=>{if(!qe(i)){t[o]=i;return}const l=e?`${e}.${o}`:o;if(!Object.values(i).every(d=>un(d))){t[o]=ry(i,l);return}t[o]=l}),t},it=ry(wv),Dr=class Dr{constructor(e,t){this.cursor=-1,this.items=[],this.items=e!=null?e:[],this.focusedCssClass=t}get currentItem(){return this.cursor===-1?null:this.items[this.cursor]}setCursor(e){e<this.items.length&&e>=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass),this.items[this.cursor].setAttribute("data-blok-focused","true"))}setItems(e){this.items=e}hasItems(){return this.items.length>0}next(){this.cursor=this.leafNodesAndReturnIndex(Dr.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(Dr.directions.LEFT)}dropCursor(){this.cursor!==-1&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.items[this.cursor].removeAttribute("data-blok-focused"),this.cursor=-1)}leafNodesAndReturnIndex(e){if(this.items.length===0)return this.cursor;const t=e===Dr.directions.RIGHT?-1:0,o=this.cursor===-1?t:this.cursor;o!==-1&&(this.items[o].classList.remove(this.focusedCssClass),this.items[o].removeAttribute("data-blok-focused"));const i=e===Dr.directions.RIGHT?(o+1)%this.items.length:(this.items.length+o-1)%this.items.length;return N.canSetCaret(this.items[i])&&cs(()=>se.setCursor(this.items[i]),50)(),this.items[i].classList.add(this.focusedCssClass),this.items[i].setAttribute("data-blok-focused","true"),i}};Dr.directions={RIGHT:"right",LEFT:"left"};let Cr=Dr;class Yn{constructor(e){var t,o;this.iterator=null,this.activated=!1,this.skipNextTabFocus=!1,this.flipCallbacks=[],this.onKeyDown=i=>{var g;const l=i.target;if(this.shouldSkipTarget(l,i))return;const c=this.getKeyCode(i),d=c===ie.LEFT||c===ie.RIGHT||c===ie.UP||c===ie.DOWN;if(!(i.shiftKey&&d||!this.isEventReadyForHandling(i))&&!(c===ie.ENTER&&!((g=this.iterator)!=null&&g.currentItem)))switch(i.stopPropagation(),i.stopImmediatePropagation(),c!==null&&Yn.usedKeys.includes(c)&&i.preventDefault(),c){case ie.TAB:this.handleTabPress(i);break;case ie.LEFT:case ie.UP:this.flipLeft();break;case ie.RIGHT:case ie.DOWN:this.flipRight();break;case ie.ENTER:this.handleEnterPress(i);break}},this.iterator=new Cr(e.items||[],(t=e.focusedItemClass)!=null?t:""),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||Yn.usedKeys,this.handleContentEditableTargets=(o=e.handleContentEditableTargets)!=null?o:!1}get isActivated(){return this.activated}static get usedKeys(){return[ie.TAB,ie.LEFT,ie.RIGHT,ie.ENTER,ie.UP,ie.DOWN]}activate(e,t){var o,i;this.activated=!0,e&&((o=this.iterator)==null||o.setItems(e)),t!==void 0&&((i=this.iterator)==null||i.setCursor(t)),document.addEventListener("keydown",this.onKeyDown,!0),window.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),this.skipNextTabFocus=!1,document.removeEventListener("keydown",this.onKeyDown,!0),window.removeEventListener("keydown",this.onKeyDown,!0)}focusFirst(){this.dropCursor(),this.flipRight()}focusItem(e){const t=this.iterator;if(t&&t.hasItems()){if(e<0){t.dropCursor();return}!t.currentItem&&e===0&&(this.skipNextTabFocus=!0),t.setCursor(e)}}flipLeft(){var e;(e=this.iterator)==null||e.previous(),this.flipCallback()}flipRight(){var e;(e=this.iterator)==null||e.next(),this.flipCallback()}hasFocus(){var e;return!!((e=this.iterator)!=null&&e.currentItem)}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter(t=>t!==e)}dropCursor(){var e;(e=this.iterator)==null||e.dropCursor()}getKeyCode(e){var o;return(o={Tab:ie.TAB,Enter:ie.ENTER,ArrowLeft:ie.LEFT,ArrowRight:ie.RIGHT,ArrowUp:ie.UP,ArrowDown:ie.DOWN}[e.key])!=null?o:null}isEventReadyForHandling(e){const t=this.getKeyCode(e);return this.activated&&t!==null&&this.allowedKeys.includes(t)}setHandleContentEditableTargets(e){this.handleContentEditableTargets=e}handleTabPress(e){const o=e.shiftKey?Cr.directions.LEFT:Cr.directions.RIGHT;if(this.skipNextTabFocus){this.skipNextTabFocus=!1;return}switch(o){case Cr.directions.RIGHT:this.flipRight();break;case Cr.directions.LEFT:this.flipLeft();break}}handleExternalKeydown(e){this.onKeyDown(e)}handleEnterPress(e){var t,o;this.activated&&((t=this.iterator)!=null&&t.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),De(this.activateCallback)&&((o=this.iterator)!=null&&o.currentItem)&&this.activateCallback(this.iterator.currentItem))}flipCallback(){var e,t,o;(e=this.iterator)!=null&&e.currentItem&&((o=(t=this.iterator.currentItem).scrollIntoViewIfNeeded)==null||o.call(t)),this.flipCallbacks.forEach(i=>i())}shouldSkipTarget(e,t){if(!e)return!1;const o=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,i=e.getAttribute("data-blok-flipper-tab-target")==="true"&&t.key==="Tab",l=e.isContentEditable,c=e.closest('[data-blok-link-tool-input-opened="true"]')!==null,d=l&&!this.handleContentEditableTargets;return o&&!i||d||c}}var dd={exports:{}},Zo={},fd={exports:{}},Te={};var oy;function HE(){if(oy)return Te;oy=1;var a=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=y&&A[y]||A["@@iterator"],typeof A=="function"?A:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function S(A,P,ae){this.props=A,this.context=P,this.refs=T,this.updater=ae||x}S.prototype.isReactComponent={},S.prototype.setState=function(A,P){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,P,"setState")},S.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=S.prototype;function L(A,P,ae){this.props=A,this.context=P,this.refs=T,this.updater=ae||x}var U=L.prototype=new O;U.constructor=L,w(U,S.prototype),U.isPureReactComponent=!0;var H=Array.isArray,X=Object.prototype.hasOwnProperty,q={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function F(A,P,ae){var fe,Ee={},Re=null,me=null;if(P!=null)for(fe in P.ref!==void 0&&(me=P.ref),P.key!==void 0&&(Re=""+P.key),P)X.call(P,fe)&&!W.hasOwnProperty(fe)&&(Ee[fe]=P[fe]);var Pe=arguments.length-2;if(Pe===1)Ee.children=ae;else if(1<Pe){for(var ze=Array(Pe),pt=0;pt<Pe;pt++)ze[pt]=arguments[pt+2];Ee.children=ze}if(A&&A.defaultProps)for(fe in Pe=A.defaultProps,Pe)Ee[fe]===void 0&&(Ee[fe]=Pe[fe]);return{$$typeof:a,type:A,key:Re,ref:me,props:Ee,_owner:q.current}}function ne(A,P){return{$$typeof:a,type:A.type,key:P,ref:A.ref,props:A.props,_owner:A._owner}}function ce(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function Q(A){var P={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(ae){return P[ae]})}var ye=/\/+/g;function Z(A,P){return typeof A=="object"&&A!==null&&A.key!=null?Q(""+A.key):P.toString(36)}function we(A,P,ae,fe,Ee){var Re=typeof A;(Re==="undefined"||Re==="boolean")&&(A=null);var me=!1;if(A===null)me=!0;else switch(Re){case"string":case"number":me=!0;break;case"object":switch(A.$$typeof){case a:case e:me=!0}}if(me)return me=A,Ee=Ee(me),A=fe===""?"."+Z(me,0):fe,H(Ee)?(ae="",A!=null&&(ae=A.replace(ye,"$&/")+"/"),we(Ee,P,ae,"",function(pt){return pt})):Ee!=null&&(ce(Ee)&&(Ee=ne(Ee,ae+(!Ee.key||me&&me.key===Ee.key?"":(""+Ee.key).replace(ye,"$&/")+"/")+A)),P.push(Ee)),1;if(me=0,fe=fe===""?".":fe+":",H(A))for(var Pe=0;Pe<A.length;Pe++){Re=A[Pe];var ze=fe+Z(Re,Pe);me+=we(Re,P,ae,ze,Ee)}else if(ze=b(A),typeof ze=="function")for(A=ze.call(A),Pe=0;!(Re=A.next()).done;)Re=Re.value,ze=fe+Z(Re,Pe++),me+=we(Re,P,ae,ze,Ee);else if(Re==="object")throw P=String(A),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.");return me}function Oe(A,P,ae){if(A==null)return A;var fe=[],Ee=0;return we(A,fe,"","",function(Re){return P.call(ae,Re,Ee++)}),fe}function xe(A){if(A._status===-1){var P=A._result;P=P(),P.then(function(ae){(A._status===0||A._status===-1)&&(A._status=1,A._result=ae)},function(ae){(A._status===0||A._status===-1)&&(A._status=2,A._result=ae)}),A._status===-1&&(A._status=0,A._result=P)}if(A._status===1)return A._result.default;throw A._result}var _e={current:null},D={transition:null},le={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:D,ReactCurrentOwner:q};function G(){throw Error("act(...) is not supported in production builds of React.")}return Te.Children={map:Oe,forEach:function(A,P,ae){Oe(A,function(){P.apply(this,arguments)},ae)},count:function(A){var P=0;return Oe(A,function(){P++}),P},toArray:function(A){return Oe(A,function(P){return P})||[]},only:function(A){if(!ce(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},Te.Component=S,Te.Fragment=t,Te.Profiler=i,Te.PureComponent=L,Te.StrictMode=o,Te.Suspense=h,Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,Te.act=G,Te.cloneElement=function(A,P,ae){if(A==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+A+".");var fe=w({},A.props),Ee=A.key,Re=A.ref,me=A._owner;if(P!=null){if(P.ref!==void 0&&(Re=P.ref,me=q.current),P.key!==void 0&&(Ee=""+P.key),A.type&&A.type.defaultProps)var Pe=A.type.defaultProps;for(ze in P)X.call(P,ze)&&!W.hasOwnProperty(ze)&&(fe[ze]=P[ze]===void 0&&Pe!==void 0?Pe[ze]:P[ze])}var ze=arguments.length-2;if(ze===1)fe.children=ae;else if(1<ze){Pe=Array(ze);for(var pt=0;pt<ze;pt++)Pe[pt]=arguments[pt+2];fe.children=Pe}return{$$typeof:a,type:A.type,key:Ee,ref:Re,props:fe,_owner:me}},Te.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},A.Provider={$$typeof:l,_context:A},A.Consumer=A},Te.createElement=F,Te.createFactory=function(A){var P=F.bind(null,A);return P.type=A,P},Te.createRef=function(){return{current:null}},Te.forwardRef=function(A){return{$$typeof:d,render:A}},Te.isValidElement=ce,Te.lazy=function(A){return{$$typeof:v,_payload:{_status:-1,_result:A},_init:xe}},Te.memo=function(A,P){return{$$typeof:g,type:A,compare:P===void 0?null:P}},Te.startTransition=function(A){var P=D.transition;D.transition={};try{A()}finally{D.transition=P}},Te.unstable_act=G,Te.useCallback=function(A,P){return _e.current.useCallback(A,P)},Te.useContext=function(A){return _e.current.useContext(A)},Te.useDebugValue=function(){},Te.useDeferredValue=function(A){return _e.current.useDeferredValue(A)},Te.useEffect=function(A,P){return _e.current.useEffect(A,P)},Te.useId=function(){return _e.current.useId()},Te.useImperativeHandle=function(A,P,ae){return _e.current.useImperativeHandle(A,P,ae)},Te.useInsertionEffect=function(A,P){return _e.current.useInsertionEffect(A,P)},Te.useLayoutEffect=function(A,P){return _e.current.useLayoutEffect(A,P)},Te.useMemo=function(A,P){return _e.current.useMemo(A,P)},Te.useReducer=function(A,P,ae){return _e.current.useReducer(A,P,ae)},Te.useRef=function(A){return _e.current.useRef(A)},Te.useState=function(A){return _e.current.useState(A)},Te.useSyncExternalStore=function(A,P,ae){return _e.current.useSyncExternalStore(A,P,ae)},Te.useTransition=function(){return _e.current.useTransition()},Te.version="18.3.1",Te}var iy;function hd(){return iy||(iy=1,fd.exports=HE()),fd.exports}var sy;function jE(){if(sy)return Zo;sy=1;var a=hd(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(d,h,g){var v,y={},b=null,x=null;g!==void 0&&(b=""+g),h.key!==void 0&&(b=""+h.key),h.ref!==void 0&&(x=h.ref);for(v in h)o.call(h,v)&&!l.hasOwnProperty(v)&&(y[v]=h[v]);if(d&&d.defaultProps)for(v in h=d.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:e,type:d,key:b,ref:x,props:y,_owner:i.current}}return Zo.Fragment=t,Zo.jsx=c,Zo.jsxs=c,Zo}var ay;function qE(){return ay||(ay=1,dd.exports=jE()),dd.exports}var xn=qE(),ys={},pd={exports:{}},Ot={},gd={exports:{}},md={};var ly;function UE(){return ly||(ly=1,(function(a){function e(D,le){var G=D.length;D.push(le);e:for(;0<G;){var A=G-1>>>1,P=D[A];if(0<i(P,le))D[A]=le,D[G]=P,G=A;else break e}}function t(D){return D.length===0?null:D[0]}function o(D){if(D.length===0)return null;var le=D[0],G=D.pop();if(G!==le){D[0]=G;e:for(var A=0,P=D.length,ae=P>>>1;A<ae;){var fe=2*(A+1)-1,Ee=D[fe],Re=fe+1,me=D[Re];if(0>i(Ee,G))Re<P&&0>i(me,Ee)?(D[A]=me,D[Re]=G,A=Re):(D[A]=Ee,D[fe]=G,A=fe);else if(Re<P&&0>i(me,G))D[A]=me,D[Re]=G,A=Re;else break e}}return le}function i(D,le){var G=D.sortIndex-le.sortIndex;return G!==0?G:D.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;a.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();a.unstable_now=function(){return c.now()-d}}var h=[],g=[],v=1,y=null,b=3,x=!1,w=!1,T=!1,S=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(D){for(var le=t(g);le!==null;){if(le.callback===null)o(g);else if(le.startTime<=D)o(g),le.sortIndex=le.expirationTime,e(h,le);else break;le=t(g)}}function H(D){if(T=!1,U(D),!w)if(t(h)!==null)w=!0,xe(X);else{var le=t(g);le!==null&&_e(H,le.startTime-D)}}function X(D,le){w=!1,T&&(T=!1,O(F),F=-1),x=!0;var G=b;try{for(U(le),y=t(h);y!==null&&(!(y.expirationTime>le)||D&&!Q());){var A=y.callback;if(typeof A=="function"){y.callback=null,b=y.priorityLevel;var P=A(y.expirationTime<=le);le=a.unstable_now(),typeof P=="function"?y.callback=P:y===t(h)&&o(h),U(le)}else o(h);y=t(h)}if(y!==null)var ae=!0;else{var fe=t(g);fe!==null&&_e(H,fe.startTime-le),ae=!1}return ae}finally{y=null,b=G,x=!1}}var q=!1,W=null,F=-1,ne=5,ce=-1;function Q(){return!(a.unstable_now()-ce<ne)}function ye(){if(W!==null){var D=a.unstable_now();ce=D;var le=!0;try{le=W(!0,D)}finally{le?Z():(q=!1,W=null)}}else q=!1}var Z;if(typeof L=="function")Z=function(){L(ye)};else if(typeof MessageChannel!="undefined"){var we=new MessageChannel,Oe=we.port2;we.port1.onmessage=ye,Z=function(){Oe.postMessage(null)}}else Z=function(){S(ye,0)};function xe(D){W=D,q||(q=!0,Z())}function _e(D,le){F=S(function(){D(a.unstable_now())},le)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(D){D.callback=null},a.unstable_continueExecution=function(){w||x||(w=!0,xe(X))},a.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<D?Math.floor(1e3/D):5},a.unstable_getCurrentPriorityLevel=function(){return b},a.unstable_getFirstCallbackNode=function(){return t(h)},a.unstable_next=function(D){switch(b){case 1:case 2:case 3:var le=3;break;default:le=b}var G=b;b=le;try{return D()}finally{b=G}},a.unstable_pauseExecution=function(){},a.unstable_requestPaint=function(){},a.unstable_runWithPriority=function(D,le){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var G=b;b=D;try{return le()}finally{b=G}},a.unstable_scheduleCallback=function(D,le,G){var A=a.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?A+G:A):G=A,D){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=G+P,D={id:v++,callback:le,priorityLevel:D,startTime:G,expirationTime:P,sortIndex:-1},G>A?(D.sortIndex=G,e(g,D),t(h)===null&&D===t(g)&&(T?(O(F),F=-1):T=!0,_e(H,G-A))):(D.sortIndex=P,e(h,D),w||x||(w=!0,xe(X))),D},a.unstable_shouldYield=Q,a.unstable_wrapCallback=function(D){var le=b;return function(){var G=b;b=le;try{return D.apply(this,arguments)}finally{b=G}}}})(md)),md}var cy;function WE(){return cy||(cy=1,gd.exports=UE()),gd.exports}var uy;function KE(){if(uy)return Ot;uy=1;var a=hd(),e=WE();function t(n){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+n,s=1;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function l(n,r){c(n,r),c(n+"Capture",r)}function c(n,r){for(i[n]=r,n=0;n<r.length;n++)o.add(r[n])}var d=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),h=Object.prototype.hasOwnProperty,g=/^[: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]*$/,v={},y={};function b(n){return h.call(y,n)?!0:h.call(v,n)?!1:g.test(n)?y[n]=!0:(v[n]=!0,!1)}function x(n,r,s,u){if(s!==null&&s.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return u?!1:s!==null?!s.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function w(n,r,s,u){if(r===null||typeof r=="undefined"||x(n,r,s,u))return!0;if(u)return!1;if(s!==null)switch(s.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function T(n,r,s,u,f,p,m){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=u,this.attributeNamespace=f,this.mustUseProperty=s,this.propertyName=n,this.type=r,this.sanitizeURL=p,this.removeEmptyString=m}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){S[n]=new T(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var r=n[0];S[r]=new T(r,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){S[n]=new T(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){S[n]=new T(n,2,!1,n,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(n){S[n]=new T(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){S[n]=new T(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){S[n]=new T(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){S[n]=new T(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){S[n]=new T(n,5,!1,n.toLowerCase(),null,!1,!1)});var O=/[\-:]([a-z])/g;function L(n){return n[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(n){var r=n.replace(O,L);S[r]=new T(r,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var r=n.replace(O,L);S[r]=new T(r,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var r=n.replace(O,L);S[r]=new T(r,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){S[n]=new T(n,1,!1,n.toLowerCase(),null,!1,!1)}),S.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){S[n]=new T(n,1,!1,n.toLowerCase(),null,!0,!0)});function U(n,r,s,u){var f=S.hasOwnProperty(r)?S[r]:null;(f!==null?f.type!==0:u||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(w(r,s,f,u)&&(s=null),u||f===null?b(r)&&(s===null?n.removeAttribute(r):n.setAttribute(r,""+s)):f.mustUseProperty?n[f.propertyName]=s===null?f.type===3?!1:"":s:(r=f.attributeName,u=f.attributeNamespace,s===null?n.removeAttribute(r):(f=f.type,s=f===3||f===4&&s===!0?"":""+s,u?n.setAttributeNS(u,r,s):n.setAttribute(r,s))))}var H=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),q=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),Q=Symbol.for("react.context"),ye=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),we=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),_e=Symbol.for("react.offscreen"),D=Symbol.iterator;function le(n){return n===null||typeof n!="object"?null:(n=D&&n[D]||n["@@iterator"],typeof n=="function"?n:null)}var G=Object.assign,A;function P(n){if(A===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);A=r&&r[1]||""}return`
11
- `+A+n}var ae=!1;function fe(n,r){if(!n||ae)return"";ae=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(R){var u=R}Reflect.construct(n,[],r)}else{try{r.call()}catch(R){u=R}n.call(r.prototype)}else{try{throw Error()}catch(R){u=R}n()}}catch(R){if(R&&u&&typeof R.stack=="string"){for(var f=R.stack.split(`
10
+ margin: 4px 5px 4px 0;`,m=a?c?(d.unshift(g,i),`%c${h}%c ${e}`):`( ${h} )${e}`:e,y=c?r!==void 0?[`${m} %o`,...d]:[m,...d]:[m];try{l[t](...y)}catch(b){}};Vo.logLevel="VERBOSE";const L1=a=>{Vo.logLevel=a},_e=(a,e="log",t,r)=>{Vo(!1,a,e,t,r)},en=(a,e="log",t,r)=>{Vo(!0,a,e,t,r)},Me=a=>FT(a),je=a=>UT(a),hn=a=>KT(a),pv=a=>P0(a),gv=a=>jT(a),D1=function(a){return GT(a)},it=a=>X0(a),mv=a=>R1(a),us=(a,e)=>function(...t){O0(()=>a.apply(this,t),e)},P1=a=>{var e;return(e=a.name.split(".").pop())!=null?e:""},M1=a=>/^[-\w]+\/([-+\w]+|\*)$/.test(a),vv=(a,e,t)=>{const r={timeoutId:null};return function(...i){const l=()=>{r.timeoutId=null,a.apply(this,i)};r.timeoutId!==null&&clearTimeout(r.timeoutId),r.timeoutId=setTimeout(l,e)}},ju=(a,e,t)=>b1(a,e,t),yv=()=>{var i,l;const a={win:!1,mac:!1,x11:!1,linux:!1},e=hv(),t=(l=(i=e==null?void 0:e.userAgent)==null?void 0:i.toLowerCase())!=null?l:"",r=t?Object.keys(a).find(c=>t.indexOf(c)!==-1):void 0;return r!==void 0&&(a[r]=!0),a},ds=a=>a&&a.slice(0,1).toUpperCase()+a.slice(1),F1=(a,e)=>{if(Array.isArray(e))return e},$o=(a,...e)=>!je(a)||e.length===0?a:e.reduce((t,r)=>je(r)?p1(t,r,F1):t,a),bv=a=>{const e=yv(),t=a.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + ");return e.mac?t.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):t.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN")},H1=a=>{try{return new URL(a).href}catch(t){}const e=cs();return a.substring(0,2)==="//"?e?`${e.location.protocol}${a}`:a:e?`${e.location.origin}${a}`:a},z1=()=>p0(10),j1=a=>{const e=cs();e&&e.open(a,"_blank")},q1=(a="")=>`${a}${Math.floor(Math.random()*N1).toString(O1)}`,kv=650,Yn=()=>{const a=cs();return!a||typeof a.matchMedia!="function"?!1:a.matchMedia(`(max-width: ${kv}px)`).matches},qu=(()=>{var h;const a=hv();if(!a)return!1;const e=a.userAgent||"",t=a.userAgentData,r=t==null?void 0:t.platform;if(/iP(ad|hone|od)/.test(e)||r!==void 0&&r!==""&&/iP(ad|hone|od)/.test(r))return!0;const i=((h=a.maxTouchPoints)!=null?h:0)>1,l=()=>a.platform,c=r!==void 0&&r!==""?r:void 0;return(i?c!=null?c:l():void 0)==="MacIntel"})(),U1=(a,e)=>PT(a,e);class L{static isSingleTag(e){return!!e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return!!e&&["BR","WBR"].includes(e.tagName)}static isValidClassName(e){if(e===""||/\s/.test(e))return!1;try{return document.createElement("div").classList.add(e),!0}catch(t){return!1}}static safelyAddClasses(e,t){const r=[],i=[];for(const l of t)L.isValidClassName(l)?r.push(l):i.push(l);if(r.length>0&&e.classList.add(...r),i.length>0){const l=e.className,c=l?`${l} ${i.join(" ")}`:i.join(" ");e.setAttribute("class",c)}}static make(e,t=null,r={}){const i=document.createElement(e);if(Array.isArray(t)){const l=t.filter(c=>c!==void 0&&c!=="").flatMap(c=>c.split(" ")).filter(c=>c!=="");L.safelyAddClasses(i,l)}if(typeof t=="string"&&t!==""){const l=t.split(" ").filter(c=>c!=="");L.safelyAddClasses(i,l)}for(const l in r){if(!Object.prototype.hasOwnProperty.call(r,l))continue;const c=r[l];if(c!=null){if(l in i){i[l]=c;continue}i.setAttribute(l,String(c))}}return i}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach(r=>e.appendChild(r)):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?[...t].reverse().forEach(i=>e.prepend(i)):e.prepend(t)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map(t=>`input[type="${t}"]`).join(", ")}static findAllInputs(e){return mv(e.querySelectorAll(L.allInputsSelector)).reduce((t,r)=>L.isNativeInput(r)||L.containsOnlyInlineElements(r)?[...t,r]:[...t,...L.getDeepestBlockElements(r)],[])}static getDeepestNode(e,t=!1){var m;const r=t?"lastChild":"firstChild",i=t?"previousSibling":"nextSibling";if(e===null||e.nodeType!==Node.ELEMENT_NODE)return e;const l=e[r];if(l===null)return e;const c=l;if(!(L.isSingleTag(c)&&!L.isNativeInput(c)&&!L.isLineBreakTag(c)))return this.getDeepestNode(c,t);const h=c[i];if(h)return this.getDeepestNode(h,t);const g=(m=c.parentNode)==null?void 0:m[i];return g?this.getDeepestNode(g,t):c.parentNode}static isElement(e){return gv(e)?!1:e!=null&&e.nodeType!=null&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return gv(e)?!1:e!=null&&e.nodeType!=null&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isContentEditable(e){return e.contentEditable==="true"}static isNativeInput(e){const t=["INPUT","TEXTAREA"];return e!=null&&typeof e.tagName=="string"?t.includes(e.tagName):!1}static canSetCaret(e){return L.isNativeInput(e)?!new Set(["file","checkbox","radio","hidden","submit","button","image","reset"]).has(e.type):L.isContentEditable(e)}static isNodeEmpty(e,t){var l,c;if(this.isSingleTag(e)&&!this.isLineBreakTag(e))return!1;const r=this.isElement(e)&&this.isNativeInput(e)?e.value:(l=e.textContent)==null?void 0:l.replace("​",""),i=t?r==null?void 0:r.replace(new RegExp(t,"g"),""):r;return((c=i==null?void 0:i.length)!=null?c:0)===0}static isLeaf(e){return e?e.childNodes.length===0:!1}static isEmpty(e,t){const r=[e];for(;r.length>0;){const i=r.shift();if(i){if(this.isLeaf(i)&&!this.isNodeEmpty(i,t))return!1;i.childNodes&&r.push(...Array.from(i.childNodes))}}return!0}static isHTMLString(e){const t=L.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){var t,r;return L.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:(r=(t=e.textContent)==null?void 0:t.length)!=null?r:0}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){const t=hn(e)?(()=>{const i=document.createElement("div");return i.innerHTML=e,i})():e,r=i=>!L.blockElements.includes(i.tagName.toLowerCase())&&Array.from(i.children).every(r);return Array.from(t.children).every(r)}static getDeepestBlockElements(e){return L.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((t,r)=>[...t,...L.getDeepestBlockElements(r)],[])}static getHolder(e){if(!hn(e))return e;const t=document.getElementById(e);if(t!==null)return t;throw new Error(`Element with id "${e}" not found`)}static isAnchor(e){return e.tagName.toLowerCase()==="a"}static offset(e){const t=e.getBoundingClientRect(),r=window.scrollX||document.documentElement.scrollLeft,i=window.scrollY||document.documentElement.scrollTop,l=t.top+i,c=t.left+r;return{top:l,left:c,bottom:l+t.height,right:c+t.width}}static getNodeByOffset(e,t){const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),i=(g,m,y,b)=>{var S;if(!g&&y){const R=m-b,O=Math.max(t-R,0),H=Math.min(O,b);return{node:y,offset:H}}if(!g)return{node:null,offset:0};const k=((S=g.textContent)!=null?S:"").length;return m+k>=t?{node:g,offset:Math.min(t-m,k)}:i(r.nextNode(),m+k,g,k)},l=r.nextNode(),{node:c,offset:d}=i(l,0,null,0);if(!c)return{node:null,offset:0};const h=c.textContent;return!h||h.length===0?{node:null,offset:0}:{node:c,offset:d}}}const Uu=a=>!/[^\t\n\r \u200B]/.test(a),W1=a=>{const e=window.getComputedStyle(a),t=parseFloat(e.fontSize),r=parseFloat(e.lineHeight)||t*1.2,i=parseFloat(e.paddingTop),l=parseFloat(e.borderTopWidth),c=parseFloat(e.marginTop),d=t*.8,h=(r-t)/2;return c+l+i+h+d},wv=a=>{a.setAttribute("data-blok-empty",L.isEmpty(a)?"true":"false")},Tv={ui:{blockTunes:{toggler:{"Drag to move":"","Click to open the menu":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{"Click to add below":"","Option-click to add above":"","Ctrl-click to add above":""}},popover:{Filter:"","Nothing found":"","Convert to":""}},toolNames:{Text:"",Link:"",Bold:"",Italic:""},tools:{link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},blockTunes:{delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}}},nr=class nr{static ui(e,t){return nr._t(e,t)}static t(e,t){return nr._t(e,t)}static setDictionary(e){nr.currentDictionary=e}static _t(e,t){const r=nr.getNamespace(e);return!r||!r[t]?t:r[t]}static getNamespace(e){return e.split(".").reduce((r,i)=>{if(!r||!Object.keys(r).length)return{};const l=r[i];return typeof l=="string"?{}:l},nr.currentDictionary)}};nr.currentDictionary=Tv;let Qe=nr;class Go extends Error{}class Xo{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const r=i=>{const l=t(i),c=this.subscribers[e].indexOf(r);return c!==-1&&this.subscribers[e].splice(c,1),l};this.subscribers[e].push(r)}emit(e,t){it(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce((r,i)=>{const l=i(r);return l!==void 0?l:r},t)}off(e,t){const r=this.subscribers[e];if(r===void 0){console.warn(`EventDispatcher .off(): there is no subscribers for event "${e.toString()}". Probably, .off() called before .on()`);return}const i=r.indexOf(t);i!==-1&&r.splice(i,1)}destroy(){this.subscribers={}}}const Ln=function(e){return Object.setPrototypeOf(this,{get id(){return e.id},get name(){return e.name},get config(){return e.config},get holder(){return e.holder},get isEmpty(){return e.isEmpty},get selected(){return e.selected},set stretched(r){e.setStretchState(r)},get stretched(){return e.stretched},get focusable(){return e.focusable},call(r,i){return e.call(r,i)},save(){return e.save()},validate(r){return e.validate(r)},dispatchChange(){e.dispatchChange()},getActiveToolboxEntry(){return e.getActiveToolboxEntry()}}),Object.defineProperties(this,{id:{get(){return e.id},enumerable:!0,configurable:!0},name:{get(){return e.name},enumerable:!0,configurable:!0}}),this};class Yo{constructor(){this.allListeners=[]}on(e,t,r,i=!1){if(this.findOne(e,t,r,i))return;const c=q1("l"),d={id:c,element:e,eventType:t,handler:r,options:i};return this.allListeners.push(d),e.addEventListener(t,r,i),c}off(e,t,r,i){const l=this.findAll(e,t,r,i);l.forEach((c,d)=>{const h=this.allListeners.indexOf(l[d]);h>-1&&(this.allListeners.splice(h,1),c.element.removeEventListener(c.eventType,c.handler,c.options))})}offById(e){const t=this.findById(e);if(!t)return;t.element.removeEventListener(t.eventType,t.handler,t.options);const r=this.allListeners.indexOf(t);r>-1&&this.allListeners.splice(r,1)}findOne(e,t,r,i){var c;return(c=this.findAll(e,t,r,i)[0])!=null?c:null}findAll(e,t,r,i){return e?this.findByEventTarget(e).filter(c=>{const d=t===void 0||c.eventType===t,h=r===void 0||c.handler===r,g=this.areOptionsEqual(c.options,i);return d&&h&&g}):[]}removeAll(){this.allListeners.forEach(e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)}),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter(t=>t.element===e)}findByType(e){return this.allListeners.filter(t=>t.eventType===e)}findByHandler(e){return this.allListeners.filter(t=>t.handler===e)}findById(e){return this.allListeners.find(t=>t.id===e)}normalizeListenerOptions(e){var t,r,i;return typeof e=="boolean"?{capture:e,once:!1,passive:!1}:e?{capture:(t=e.capture)!=null?t:!1,once:(r=e.once)!=null?r:!1,passive:(i=e.passive)!=null?i:!1,signal:e.signal}:{capture:!1,once:!1,passive:!1}}areOptionsEqual(e,t){if(t===void 0)return!0;const r=this.normalizeListenerOptions(e),i=this.normalizeListenerOptions(t);return r.capture===i.capture&&r.once===i.once&&r.passive===i.passive&&r.signal===i.signal}}class Be{constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new Yo,this.readOnlyMutableListeners={on:(r,i,l,c=!1)=>{const d=this.listeners.on(r,i,l,c);d&&this.mutableListenerIds.push(d)},clearAll:()=>{for(const r of this.mutableListenerIds)this.listeners.offById(r);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===Be)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t,this.Blok={}}set state(e){this.Blok=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){var e;return((e=this.config.i18n)==null?void 0:e.direction)==="rtl"}}const K1=(a,e)=>{const t=new Array(a.length+e.length);for(let r=0;r<a.length;r++)t[r]=a[r];for(let r=0;r<e.length;r++)t[a.length+r]=e[r];return t},V1=(a,e)=>({classGroupId:a,validator:e}),xv=(a=new Map,e=null,t)=>({nextPart:a,validators:e,classGroupId:t}),fs="-",Sv=[],$1="arbitrary..",G1=a=>{const e=Y1(a),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=a;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return X1(c);const d=c.split(fs),h=d[0]===""&&d.length>1?1:0;return Ev(d,h,e)},getConflictingClassGroupIds:(c,d)=>{if(d){const h=r[c],g=t[c];return h?g?K1(g,h):h:g||Sv}return t[c]||Sv}}},Ev=(a,e,t)=>{if(a.length-e===0)return t.classGroupId;const i=a[e],l=t.nextPart.get(i);if(l){const g=Ev(a,e+1,l);if(g)return g}const c=t.validators;if(c===null)return;const d=e===0?a.join(fs):a.slice(e).join(fs),h=c.length;for(let g=0;g<h;g++){const m=c[g];if(m.validator(d))return m.classGroupId}},X1=a=>a.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=a.slice(1,-1),t=e.indexOf(":"),r=e.slice(0,t);return r?$1+r:void 0})(),Y1=a=>{const{theme:e,classGroups:t}=a;return Q1(t,e)},Q1=(a,e)=>{const t=xv();for(const r in a){const i=a[r];Wu(i,t,r,e)}return t},Wu=(a,e,t,r)=>{const i=a.length;for(let l=0;l<i;l++){const c=a[l];Z1(c,e,t,r)}},Z1=(a,e,t,r)=>{if(typeof a=="string"){J1(a,e,t);return}if(typeof a=="function"){ex(a,e,t,r);return}tx(a,e,t,r)},J1=(a,e,t)=>{const r=a===""?e:Cv(e,a);r.classGroupId=t},ex=(a,e,t,r)=>{if(nx(a)){Wu(a(r),e,t,r);return}e.validators===null&&(e.validators=[]),e.validators.push(V1(t,a))},tx=(a,e,t,r)=>{const i=Object.entries(a),l=i.length;for(let c=0;c<l;c++){const[d,h]=i[c];Wu(h,Cv(e,d),t,r)}},Cv=(a,e)=>{let t=a;const r=e.split(fs),i=r.length;for(let l=0;l<i;l++){const c=r[l];let d=t.nextPart.get(c);d||(d=xv(),t.nextPart.set(c,d)),t=d}return t},nx=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,rx=a=>{if(a<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),r=Object.create(null);const i=(l,c)=>{t[l]=c,e++,e>a&&(e=0,r=t,t=Object.create(null))};return{get(l){let c=t[l];if(c!==void 0)return c;if((c=r[l])!==void 0)return i(l,c),c},set(l,c){l in t?t[l]=c:i(l,c)}}},Ku="!",Bv=":",ox=[],Av=(a,e,t,r,i)=>({modifiers:a,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:r,isExternal:i}),ix=a=>{const{prefix:e,experimentalParseClassName:t}=a;let r=i=>{const l=[];let c=0,d=0,h=0,g;const m=i.length;for(let x=0;x<m;x++){const S=i[x];if(c===0&&d===0){if(S===Bv){l.push(i.slice(h,x)),h=x+1;continue}if(S==="/"){g=x;continue}}S==="["?c++:S==="]"?c--:S==="("?d++:S===")"&&d--}const y=l.length===0?i:i.slice(h);let b=y,T=!1;y.endsWith(Ku)?(b=y.slice(0,-1),T=!0):y.startsWith(Ku)&&(b=y.slice(1),T=!0);const k=g&&g>h?g-h:void 0;return Av(l,T,b,k)};if(e){const i=e+Bv,l=r;r=c=>c.startsWith(i)?l(c.slice(i.length)):Av(ox,!1,c,void 0,!0)}if(t){const i=r;r=l=>t({className:l,parseClassName:i})}return r},sx=a=>{const e=new Map;return a.orderSensitiveModifiers.forEach((t,r)=>{e.set(t,1e6+r)}),t=>{const r=[];let i=[];for(let l=0;l<t.length;l++){const c=t[l],d=c[0]==="[",h=e.has(c);d||h?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(c)):i.push(c)}return i.length>0&&(i.sort(),r.push(...i)),r}},ax=a=>de({cache:rx(a.cacheSize),parseClassName:ix(a),sortModifiers:sx(a)},G1(a)),lx=/\s+/,cx=(a,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:l}=e,c=[],d=a.trim().split(lx);let h="";for(let g=d.length-1;g>=0;g-=1){const m=d[g],{isExternal:y,modifiers:b,hasImportantModifier:T,baseClassName:k,maybePostfixModifierPosition:x}=t(m);if(y){h=m+(h.length>0?" "+h:h);continue}let S=!!x,R=r(S?k.substring(0,x):k);if(!R){if(!S){h=m+(h.length>0?" "+h:h);continue}if(R=r(k),!R){h=m+(h.length>0?" "+h:h);continue}S=!1}const O=b.length===0?"":b.length===1?b[0]:l(b).join(":"),H=T?O+Ku:O,P=H+R;if(c.indexOf(P)>-1)continue;c.push(P);const $=i(R,S);for(let j=0;j<$.length;++j){const U=$[j];c.push(H+U)}h=m+(h.length>0?" "+h:h)}return h},Iv=(...a)=>{let e=0,t,r,i="";for(;e<a.length;)(t=a[e++])&&(r=Rv(t))&&(i&&(i+=" "),i+=r);return i},Rv=a=>{if(typeof a=="string")return a;let e,t="";for(let r=0;r<a.length;r++)a[r]&&(e=Rv(a[r]))&&(t&&(t+=" "),t+=e);return t},ux=(a,...e)=>{let t,r,i,l;const c=h=>{const g=e.reduce((m,y)=>y(m),a());return t=ax(g),r=t.cache.get,i=t.cache.set,l=d,d(h)},d=h=>{const g=r(h);if(g)return g;const m=cx(h,t);return i(h,m),m};return l=c,(...h)=>l(Iv(...h))},dx=[],ut=a=>{const e=t=>t[a]||dx;return e.isThemeGetter=!0,e},_v=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fx=/^\d+\/\d+$/,hx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,px=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,no=a=>fx.test(a),Ee=a=>!!a&&!Number.isNaN(Number(a)),Qn=a=>!!a&&Number.isInteger(Number(a)),Vu=a=>a.endsWith("%")&&Ee(a.slice(0,-1)),Dn=a=>hx.test(a),yx=()=>!0,bx=a=>px.test(a)&&!gx.test(a),Ov=()=>!1,kx=a=>mx.test(a),wx=a=>vx.test(a),Tx=a=>!ee(a)&&!te(a),xx=a=>ro(a,Fv,Ov),ee=a=>_v.test(a),Er=a=>ro(a,Hv,bx),$u=a=>ro(a,Ax,Ee),Lv=a=>ro(a,Pv,Ov),Sx=a=>ro(a,Mv,wx),hs=a=>ro(a,zv,kx),te=a=>Nv.test(a),Qo=a=>oo(a,Hv),Ex=a=>oo(a,Ix),Dv=a=>oo(a,Pv),Cx=a=>oo(a,Fv),Bx=a=>oo(a,Mv),ps=a=>oo(a,zv,!0),ro=(a,e,t)=>{const r=_v.exec(a);return r?r[1]?e(r[1]):t(r[2]):!1},oo=(a,e,t=!1)=>{const r=Nv.exec(a);return r?r[1]?e(r[1]):t:!1},Pv=a=>a==="position"||a==="percentage",Mv=a=>a==="image"||a==="url",Fv=a=>a==="length"||a==="size"||a==="bg-size",Hv=a=>a==="length",Ax=a=>a==="number",Ix=a=>a==="family-name",zv=a=>a==="shadow",De=ux(()=>{const a=ut("color"),e=ut("font"),t=ut("text"),r=ut("font-weight"),i=ut("tracking"),l=ut("leading"),c=ut("breakpoint"),d=ut("container"),h=ut("spacing"),g=ut("radius"),m=ut("shadow"),y=ut("inset-shadow"),b=ut("text-shadow"),T=ut("drop-shadow"),k=ut("blur"),x=ut("perspective"),S=ut("aspect"),R=ut("ease"),O=ut("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...P(),te,ee],j=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],M=()=>[te,ee,h],X=()=>[no,"full","auto",...M()],ae=()=>[Qn,"none","subgrid",te,ee],G=()=>["auto",{span:["full",Qn,te,ee]},Qn,te,ee],ke=()=>[Qn,"auto",te,ee],Z=()=>["auto","min","max","fr",te,ee],Te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Re=()=>["start","end","center","stretch","center-safe","end-safe"],xe=()=>["auto",...M()],Ce=()=>[no,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],D=()=>[a,te,ee],ce=()=>[...P(),Dv,Lv,{position:[te,ee]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",Cx,xx,{size:[te,ee]}],F=()=>[Vu,Qo,Er],se=()=>["","none","full",g,te,ee],ue=()=>["",Ee,Qo,Er],Se=()=>["solid","dashed","dotted","double"],Ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[Ee,Vu,Dv,Lv],fe=()=>["","none",k,te,ee],He=()=>["none",Ee,te,ee],yt=()=>["none",Ee,te,ee],or=()=>[Ee,te,ee],zr=()=>[no,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dn],breakpoint:[Dn],color:[yx],container:[Dn],"drop-shadow":[Dn],ease:["in","out","in-out"],font:[Tx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dn],shadow:[Dn],spacing:["px",Ee],text:[Dn],"text-shadow":[Dn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",no,ee,te,S]}],container:["container"],columns:[{columns:[Ee,ee,te,d]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{start:X()}],end:[{end:X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[Qn,"auto",te,ee]}],basis:[{basis:[no,"full","auto",d,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ee,no,"auto","initial","none",ee]}],grow:[{grow:["",Ee,te,ee]}],shrink:[{shrink:["",Ee,te,ee]}],order:[{order:[Qn,"first","last","none",te,ee]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":ke()}],"col-end":[{"col-end":ke()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":ke()}],"row-end":[{"row-end":ke()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Te(),"normal"]}],"justify-items":[{"justify-items":[...Re(),"normal"]}],"justify-self":[{"justify-self":["auto",...Re()]}],"align-content":[{content:["normal",...Te()]}],"align-items":[{items:[...Re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Re(),{baseline:["","last"]}]}],"place-content":[{"place-content":Te()}],"place-items":[{"place-items":[...Re(),"baseline"]}],"place-self":[{"place-self":["auto",...Re()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:xe()}],mx:[{mx:xe()}],my:[{my:xe()}],ms:[{ms:xe()}],me:[{me:xe()}],mt:[{mt:xe()}],mr:[{mr:xe()}],mb:[{mb:xe()}],ml:[{ml:xe()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ce()}],w:[{w:[d,"screen",...Ce()]}],"min-w":[{"min-w":[d,"screen","none",...Ce()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...Ce()]}],h:[{h:["screen","lh",...Ce()]}],"min-h":[{"min-h":["screen","lh","none",...Ce()]}],"max-h":[{"max-h":["screen","lh",...Ce()]}],"font-size":[{text:["base",t,Qo,Er]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,te,$u]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vu,ee]}],"font-family":[{font:[Ex,ee,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,te,ee]}],"line-clamp":[{"line-clamp":[Ee,"none",te,$u]}],leading:[{leading:[l,...M()]}],"list-image":[{"list-image":["none",te,ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",te,ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ee,"from-font","auto",te,Er]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Ee,"auto",te,ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te,ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te,ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qn,te,ee],radial:["",te,ee],conic:[Qn,te,ee]},Bx,Sx]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ee,te,ee]}],"outline-w":[{outline:["",Ee,Qo,Er]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",m,ps,hs]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",y,ps,hs]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Ee,Er]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",b,ps,hs]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Ee,te,ee]}],"mix-blend":[{"mix-blend":[...Ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[te,ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[Ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",te,ee]}],filter:[{filter:["","none",te,ee]}],blur:[{blur:fe()}],brightness:[{brightness:[Ee,te,ee]}],contrast:[{contrast:[Ee,te,ee]}],"drop-shadow":[{"drop-shadow":["","none",T,ps,hs]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Ee,te,ee]}],"hue-rotate":[{"hue-rotate":[Ee,te,ee]}],invert:[{invert:["",Ee,te,ee]}],saturate:[{saturate:[Ee,te,ee]}],sepia:[{sepia:["",Ee,te,ee]}],"backdrop-filter":[{"backdrop-filter":["","none",te,ee]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[Ee,te,ee]}],"backdrop-contrast":[{"backdrop-contrast":[Ee,te,ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ee,te,ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ee,te,ee]}],"backdrop-invert":[{"backdrop-invert":["",Ee,te,ee]}],"backdrop-opacity":[{"backdrop-opacity":[Ee,te,ee]}],"backdrop-saturate":[{"backdrop-saturate":[Ee,te,ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Ee,te,ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",te,ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ee,"initial",te,ee]}],ease:[{ease:["linear","initial",R,te,ee]}],delay:[{delay:[Ee,te,ee]}],animate:[{animate:["none",O,te,ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,te,ee]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:yt()}],"scale-x":[{"scale-x":yt()}],"scale-y":[{"scale-y":yt()}],"scale-z":[{"scale-z":yt()}],"scale-3d":["scale-3d"],skew:[{skew:or()}],"skew-x":[{"skew-x":or()}],"skew-y":[{"skew-y":or()}],transform:[{transform:[te,ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:zr()}],"translate-x":[{"translate-x":zr()}],"translate-y":[{"translate-y":zr()}],"translate-z":[{"translate-z":zr()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te,ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te,ee]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Ee,Qo,Er,$u]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),Tt=Iv,Rx=180,_x=400,io="data-blok-interface",Nx="blok",Ox="inline-toolbar",Gu="tooltip",jv="[data-blok-interface=blok]",qv="[data-blok-interface=inline-toolbar]";typeof process!="undefined"&&process.platform?process.platform==="darwin"?"Meta":"Control":typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().includes("mac")?"Meta":"Control";const Lx="data-blok-element",Xu="[data-blok-element]",Dx="data-blok-element-content",Yu="[data-blok-element-content]",Px="data-blok-editor",Kt="[data-blok-editor]",Mx="data-blok-redactor",Uv="[data-blok-redactor]",Fx="data-blok-narrow",Hx="data-blok-rtl",zx="data-blok-fake-cursor",Wv="[data-blok-fake-cursor]",jx="data-blok-overlay",qx="data-blok-overlay-container",Ux="data-blok-overlay-rectangle",Wx="data-blok-toolbar",Kv="[data-blok-toolbar]",Kx="data-blok-settings-toggler",Vx="data-blok-drag-handle",$x="[data-blok-drag-handle]",Qu="data-blok-tool",Gx="data-blok-stub",Xx="data-blok-stub-info",Yx="data-blok-stub-title",Qx="data-blok-stub-subtitle",Zu="data-blok-selected",Ju="data-blok-stretched",Zx="data-blok-empty",Vv="data-blok-dragging",$v="data-blok-toolbox-opened";class le{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.fakeBackgroundElements=[]}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?L.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtBlok(){return this.isSelectionAtBlok(le.get())}static isSelectionAtBlok(e){if(!e)return!1;const t=e.anchorNode||e.focusNode,r=t&&t.nodeType===Node.TEXT_NODE?t.parentNode:t,i=r&&r instanceof Element?r.closest(Uv):null;return i?i.nodeType===Node.ELEMENT_NODE:!1}static isRangeAtBlok(e){if(!e)return;const t=e.startContainer&&e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentNode:e.startContainer,r=t&&t instanceof Element?t.closest(Uv):null;return r?r.nodeType===Node.ELEMENT_NODE:!1}static get isSelectionExists(){const e=le.get();return!!(e!=null&&e.anchorNode)}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){const e=document.selection,t={x:0,y:0,width:0,height:0};if(e&&e.type!=="Control"){const d=e.createRange();return t.x=d.boundingLeft,t.y=d.boundingTop,t.width=d.boundingWidth,t.height=d.boundingHeight,t}const r=window.getSelection();if(!r)return _e("Method window.getSelection returned null","warn"),t;if(r.rangeCount===null||isNaN(r.rangeCount))return _e("Method SelectionUtils.rangeCount is not supported","warn"),t;if(r.rangeCount===0)return t;const i=r.getRangeAt(0).cloneRange(),l=i.getBoundingClientRect();if(l.x===0&&l.y===0){const c=document.createElement("span");c.appendChild(document.createTextNode("​")),i.insertNode(c);const d=c.getBoundingClientRect(),h=c.parentNode;return h==null||h.removeChild(c),h==null||h.normalize(),d}return l}static get text(){var t;const e=window.getSelection();return(t=e==null?void 0:e.toString())!=null?t:""}static get(){return window.getSelection()}static setCursor(e,t=0){const r=document.createRange(),i=window.getSelection(),l=L.isNativeInput(e);if(l&&!L.canSetCaret(e))return e.getBoundingClientRect();if(l){const c=e;return c.focus(),c.selectionStart=t,c.selectionEnd=t,c.getBoundingClientRect()}return r.setStart(e,t),r.setEnd(e,t),i?(i.removeAllRanges(),i.addRange(r),r.getBoundingClientRect()):e.getBoundingClientRect()}static isRangeInsideContainer(e){const t=le.range;return t===null?!1:e.contains(t.startContainer)}static addFakeCursor(){const e=le.range;if(e===null)return;const t=L.make("span");t.setAttribute(zx,""),t.setAttribute("data-blok-mutation-free","true"),e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return L.find(e,Wv)!==null}static removeFakeCursor(e=document.body){const t=L.find(e,Wv);t&&t.remove()}removeFakeBackground(){var l;if(!this.fakeBackgroundElements.length){this.isFakeBackgroundEnabled=!1;return}const e=this.fakeBackgroundElements[0],t=this.fakeBackgroundElements[this.fakeBackgroundElements.length-1],r=e.firstChild,i=t.lastChild;if(this.fakeBackgroundElements.forEach(c=>{this.unwrapFakeBackground(c)}),r&&i){const c=document.createRange();c.setStart(r,0),c.setEnd(i,((l=i.textContent)==null?void 0:l.length)||0),this.savedSelectionRange=c}this.fakeBackgroundElements=[],this.isFakeBackgroundEnabled=!1}setFakeBackground(){this.removeFakeBackground();const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed)return;const r=this.collectTextNodes(t);if(r.length===0)return;const i=t.startContainer,l=t.startOffset,c=t.endContainer,d=t.endOffset;if(this.fakeBackgroundElements=[],r.forEach(g=>{var R,O;const m=document.createRange(),y=g===i,b=g===c,T=y?l:0,k=(O=(R=g.textContent)==null?void 0:R.length)!=null?O:0,x=b?d:k;if(T===x)return;m.setStart(g,T),m.setEnd(g,x);const S=this.wrapRangeWithFakeBackground(m);S&&this.fakeBackgroundElements.push(S)}),!this.fakeBackgroundElements.length)return;const h=document.createRange();h.setStartBefore(this.fakeBackgroundElements[0]),h.setEndAfter(this.fakeBackgroundElements[this.fakeBackgroundElements.length-1]),e.removeAllRanges(),e.addRange(h),this.isFakeBackgroundEnabled=!0}collectTextNodes(e){const t=[],{commonAncestorContainer:r}=e;if(r.nodeType===Node.TEXT_NODE)return t.push(r),t;const i=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode:l=>e.intersectsNode(l)&&l.textContent&&l.textContent.length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});for(;i.nextNode();)t.push(i.currentNode);return t}wrapRangeWithFakeBackground(e){if(e.collapsed)return null;const t=L.make("span");t.setAttribute("data-blok-testid","fake-background"),t.setAttribute("data-blok-fake-background","true"),t.setAttribute("data-blok-mutation-free","true"),t.style.backgroundColor="#a8d6ff",t.style.color="inherit",t.style.display="inline",t.style.padding="0",t.style.margin="0";const r=e.extractContents();return r.childNodes.length===0?null:(t.appendChild(r),e.insertNode(t),t)}unwrapFakeBackground(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}save(){this.savedSelectionRange=le.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(this.savedSelectionRange))}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection();if(!e||!e.focusNode)return;const t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,r=10){const i=window.getSelection();if(!i||!i.anchorNode||!i.focusNode)return null;const l=[i.anchorNode,i.focusNode],c=d=>{const h=(g,m)=>{if(m<=0||!g)return null;const y=g.nodeType===Node.ELEMENT_NODE&&g.tagName===e,b=!t||g.classList&&g.classList.contains(t);if(y&&b)return g;if(!g.parentNode)return null;const T=g.parentNode,k=!t||T.classList&&T.classList.contains(t);return T.tagName===e&&k?T:h(T,m-1)};return h(d,r)};for(const d of l){const h=c(d);if(h)return h}return null}expandToTag(e){const t=window.getSelection();if(!t)return;t.removeAllRanges();const r=document.createRange();r.selectNodeContents(e),t.addRange(r)}}const Jx=(a,e)=>{const{type:t,target:r,addedNodes:i,removedNodes:l}=a;return a.type==="attributes"&&a.attributeName==="data-blok-empty"?!1:e.contains(r)?!0:t!=="childList"?!1:Array.from(i).some(h=>h===e)?!0:Array.from(l).some(h=>h===e)},ed="redactor dom changed",td="block changed",Gv="fake cursor is about to be toggled",Xv="fake cursor have been set",Cr="blok mobile layout toggled",nd="block-settings-opened",rd="block-settings-closed",eS="history:state-changed",od=(a,e)=>{if(!a.conversionConfig)return!1;const t=a.conversionConfig[e];return Me(t)||hn(t)},gs=(a,e)=>od(a.tool,e),Yv=(a,e)=>Object.entries(a).some((([t,r])=>e[t]&&U1(e[t],r))),Qv=async(a,e)=>{const r=(await a.save()).data,i=e.find(l=>l.name===a.name);return i!==void 0&&!od(i,"export")?[]:e.reduce((l,c)=>{if(!od(c,"import")||c.toolbox===void 0)return l;const d=c.toolbox.filter(h=>{if(it(h)||h.icon===void 0)return!1;const g=h.data!==void 0;return!(g&&Yv(h.data,r)||!g&&c.name===a.name)});return l.push(ot(de({},c),{toolbox:d})),l},[])},Zv=(a,e)=>a.mergeable?a.name===e.name?!0:gs(e,"export")&&gs(a,"import"):!1,tS=(a,e)=>{const t=e==null?void 0:e.export;return Me(t)?t(a):hn(t)?a[t]:(t!==void 0&&_e("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")},Jv=(a,e,t)=>{const r=e==null?void 0:e.import;return Me(r)?r(a,t):hn(r)?{[r]:a}:(r!==void 0&&_e("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})};var et=(a=>(a.Default="default",a.Separator="separator",a.Html="html",a))(et||{}),Pn=(a=>(a.RENDERED="rendered",a.MOVED="moved",a.UPDATED="updated",a.REMOVED="removed",a.ON_PASTE="onPaste",a))(Pn||{});const on=class on extends Xo{constructor({id:e=z1(),data:t,tool:r,readOnly:i,tunesData:l},c){super(),this.cachedInputs=[],this.lastSavedTunes={},this.toolRenderedElement=null,this.contentElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.readyResolver=null,this.unavailableTunesData={},this.inputIndex=0,this.blokEventBus=null,this.redactorDomChangedCallback=()=>{},this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(h=void 0)=>{const g=h===void 0,m=h instanceof InputEvent;!g&&!m&&this.detectToolRootChange(h),(g||m?!0:!(h.length>0&&h.every(T=>{const{addedNodes:k,removedNodes:x,target:S}=T;return[...Array.from(k),...Array.from(x),S].every(O=>{var P;const H=L.isElement(O)?O:(P=O.parentElement)!=null?P:null;return H===null?!1:H.closest('[data-blok-mutation-free="true"]')!==null})})))&&(this.dropInputsCache(),this.updateCurrentInput(),this.toggleInputsEmptyMark(),this.call("updated"),this.emit("didMutated",this))},this.ready=new Promise(h=>{this.readyResolver=h}),this.name=r.name,this.id=e,this.settings=r.settings,this.config=this.settings,this.blokEventBus=c||null,this.blockAPI=new Ln(this),this.lastSavedData=t!=null?t:{},this.lastSavedTunes=l!=null?l:{},this.tool=r,this.toolInstance=r.create(t,this.blockAPI,i),this.tunes=r.tunes,this.composeTunes(l);const d=this.compose();if(d==null)throw new Error(`Tool "${this.name}" did not return a block holder element during render()`);this.holder=d,window.requestIdleCallback(()=>{this.watchBlockMutations(),this.addInputEvents(),this.toggleInputsEmptyMark()})}call(e,t){const r=this.toolInstance[e];if(Me(r))try{r.call(this.toolInstance,t)}catch(i){const l=i instanceof Error?i.message:String(i);_e(`Error during '${e}' call: ${l}`,"error")}}async mergeWith(e){if(!Me(this.toolInstance.merge))throw new Error(`Block tool "${this.name}" does not support merging`);await this.toolInstance.merge(e)}async save(){const e=await this.extractToolData();if(e===void 0)return;const t=de({},this.unavailableTunesData);[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach(([l,c])=>{if(Me(c.save))try{t[l]=c.save()}catch(d){_e(`Tune ${c.constructor.name} save method throws an Error %o`,"warn",d)}});const r=window.performance.now();this.lastSavedData=e,this.lastSavedTunes=de({},t);const i=window.performance.now();return{id:this.id,tool:this.name,data:e,tunes:t,time:i-r}}async extractToolData(){try{const e=await this.toolInstance.save(this.pluginsContent);if(!this.isEmpty||e===void 0||e===null||typeof e!="object")return e;const t=de({},e),r=i=>{const l=t[i];if(typeof l!="string")return;const c=document.createElement("div");c.innerHTML=l,L.isEmpty(c)&&(t[i]="")};return r("text"),r("html"),t}catch(e){const t=e instanceof Error?e:new Error(String(e));_e(`Saving process for ${this.name} tool failed due to the ${t}`,"log",t);return}}async validate(e){return this.toolInstance.validate instanceof Function?await this.toolInstance.validate(e):!0}getTunes(){const e=[],t=[],r=(c,d)=>{if(c){if(L.isElement(c)){d.push({type:et.Html,element:c});return}if(Array.isArray(c)){d.push(...c);return}d.push(c)}},i=typeof this.toolInstance.renderSettings=="function"?this.toolInstance.renderSettings():[];return r(i,e),[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map(c=>c.render()).forEach(c=>{r(c,t)}),{toolTunes:e,commonTunes:t}}updateCurrentInput(){var l;const e=le.anchorNode,t=document.activeElement,r=c=>{if(!c)return;const d=c instanceof HTMLElement?c:c.parentElement;if(d===null)return;const h=this.inputs.find(y=>y===d||y.contains(d));if(h!==void 0)return h;const g=d.closest(L.allInputsSelector);if(!(g instanceof HTMLElement))return;const m=this.inputs.find(y=>y===g);if(m!==void 0)return m};if(L.isNativeInput(t)){this.currentInput=t;return}const i=(l=r(e))!=null?l:t instanceof HTMLElement?r(t):void 0;if(i!==void 0){this.currentInput=i;return}t instanceof HTMLElement&&this.inputs.includes(t)&&(this.currentInput=t)}dispatchChange(){this.didMutated()}async setData(e){const t=this.toolInstance.setData;if(typeof t=="function")try{return await t.call(this.toolInstance,e),this.lastSavedData=e,!0}catch(c){return _e(`Tool ${this.name} setData failed: ${c instanceof Error?c.message:String(c)}`,"warn"),!1}const r=this.toolRenderedElement;if(!r)return!1;const i="text"in e&&typeof e.text=="string",l=r.getAttribute("contenteditable")==="true";return i&&l?(r.innerHTML=e.text,this.lastSavedData=e,this.dropInputsCache(),this.toggleInputsEmptyMark(),this.call("updated"),!0):!1}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),Me(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(!e)return;if(e.length===1)return Promise.resolve(e[0]);const t=await this.data;return e.find(r=>Yv(r.data,t))}async exportDataAsString(){const e=await this.data;return tS(e,this.tool.conversionConfig)}get inputs(){if(this.cachedInputs.length!==0)return this.cachedInputs;const e=L.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){if(e===void 0)return;const t=this.inputs.findIndex(r=>r===e||r.contains(e));t!==-1&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then(e=>e&&!it(e.data)?e.data:{})}get preservedData(){var e;return(e=this.lastSavedData)!=null?e:{}}get preservedTunes(){var e;return(e=this.lastSavedTunes)!=null?e:{}}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return Me(this.toolInstance.merge)}get focusable(){return this.inputs.length!==0}get isEmpty(){const e=L.isEmpty(this.pluginsContent,"/"),t=!this.hasMedia;return e&&t}get hasMedia(){const e=["img","iframe","video","audio","source","input","textarea","twitterwidget"];return!!this.holder.querySelector(e.join(","))}set selected(e){var i,l;if(e?this.holder.setAttribute(Zu,"true"):this.holder.removeAttribute(Zu),this.contentElement){const c=this.stretched?on.styles.contentStretched:"";this.contentElement.className=e?De(on.styles.content,on.styles.contentSelected):De(on.styles.content,c)}const t=e===!0&&le.isRangeInsideContainer(this.holder),r=e===!1&&le.isFakeCursorInsideContainer(this.holder);!t&&!r||((i=this.blokEventBus)==null||i.emit(Gv,{state:e}),t&&le.addFakeCursor(),r&&le.removeFakeCursor(this.holder),(l=this.blokEventBus)==null||l.emit(Xv,{state:e}))}get selected(){return this.holder.getAttribute(Zu)==="true"}setStretchState(e){e?this.holder.setAttribute(Ju,"true"):this.holder.removeAttribute(Ju),this.contentElement&&!this.selected&&(this.contentElement.className=e?De(on.styles.content,on.styles.contentStretched):on.styles.content)}set stretched(e){this.setStretchState(e)}get stretched(){return this.holder.getAttribute(Ju)==="true"}get pluginsContent(){if(this.toolRenderedElement===null)throw new Error("Block pluginsContent is not yet initialized");return this.toolRenderedElement}compose(){var l;const e=L.make("div",on.styles.wrapper),t=L.make("div",on.styles.content);this.contentElement=t,e.setAttribute(Lx,""),t.setAttribute(Dx,""),t.setAttribute("data-blok-testid","block-content");const r=this.toolInstance.render();e.setAttribute("data-blok-testid","block-wrapper"),this.name&&!e.hasAttribute("data-blok-component")&&e.setAttribute("data-blok-component",this.name),e.setAttribute("data-blok-id",this.id),r instanceof Promise?r.then(c=>{var d;this.toolRenderedElement=c,this.addToolDataAttributes(c,e),t.appendChild(c),(d=this.readyResolver)==null||d.call(this)}).catch(c=>{var d;_e("Tool render promise rejected: %o","error",c),(d=this.readyResolver)==null||d.call(this)}):(this.toolRenderedElement=r,this.addToolDataAttributes(r,e),t.appendChild(r),(l=this.readyResolver)==null||l.call(this));const i=[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].reduce((c,d)=>{if(Me(d.wrap))try{return d.wrap(c)}catch(h){return _e(`Tune ${d.constructor.name} wrap method throws an Error %o`,"warn",h),c}return c},t);return e.appendChild(i),e}addToolDataAttributes(e,t){var d;this.name&&!t.hasAttribute("data-blok-component")&&t.setAttribute("data-blok-component",this.name);const r="data-blok-placeholder",i=(d=this.config)==null?void 0:d.placeholder,l=typeof i=="string"?i.trim():"",c=["empty:before:pointer-events-none","empty:before:text-gray-text","empty:before:cursor-text","empty:before:content-[attr(data-blok-placeholder)]","[&[data-blok-empty=true]]:before:pointer-events-none","[&[data-blok-empty=true]]:before:text-gray-text","[&[data-blok-empty=true]]:before:cursor-text","[&[data-blok-empty=true]]:before:content-[attr(data-blok-placeholder)]"];if(l.length>0){e.setAttribute(r,l),e.classList.add(...c);return}i===!1&&e.hasAttribute(r)&&e.removeAttribute(r)}composeTunes(e){Array.from(this.tunes.values()).forEach(t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))}),Object.entries(e).forEach(([t,r])=>{this.tunesInstances.has(t)||(this.unavailableTunesData[t]=r)})}addInputEvents(){this.inputs.forEach(e=>{e.addEventListener("focus",this.handleFocus),L.isNativeInput(e)&&e.addEventListener("input",this.didMutated)})}removeInputEvents(){this.inputs.forEach(e=>{e.removeEventListener("focus",this.handleFocus),L.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)})}watchBlockMutations(){var e;this.redactorDomChangedCallback=t=>{const{mutations:r}=t,i=this.toolRenderedElement;if(i===null)return;const l=r.filter(c=>Jx(c,i));l.length>0&&this.didMutated(l)},(e=this.blokEventBus)==null||e.on(ed,this.redactorDomChangedCallback)}unwatchBlockMutations(){var e;(e=this.blokEventBus)==null||e.off(ed,this.redactorDomChangedCallback)}refreshToolRootElement(){const e=this.holder.querySelector(Yu);if(!e)return;const t=e.firstElementChild;t&&t!==this.toolRenderedElement&&(this.toolRenderedElement=t,this.dropInputsCache())}detectToolRootChange(e){const t=this.toolRenderedElement;t!==null&&e.forEach(r=>{if(Array.from(r.removedNodes).includes(t)){const l=r.addedNodes[r.addedNodes.length-1];this.toolRenderedElement=l}})}dropInputsCache(){this.cachedInputs=[]}toggleInputsEmptyMark(){this.inputs.forEach(wv)}};on.styles={wrapper:"relative opacity-100 animate-fade-in first:mt-0 [&_a]:cursor-pointer [&_a]:underline [&_a]:text-link [&_b]:font-bold [&_i]:italic",content:"relative mx-auto transition-colors duration-150 ease-out max-w-content",contentSelected:"bg-selection [&_[contenteditable]]:select-none [&_img]:opacity-55 [&_[data-blok-tool=stub]]:opacity-55",contentStretched:"max-w-none"};let Zo=on;class nS extends Be{constructor(){super(...arguments),this.insert=(e,t={},r={},i,l,c,d)=>{const h=e!=null?e:this.config.defaultBlock,g=this.Blok.BlockManager.insert({id:d,tool:h,data:t,index:i,needToFocus:l,replace:c});return new Ln(g)},this.composeBlockData=async e=>{const t=this.Blok.Tools.blockTools.get(e);if(t===void 0)throw new Error(`Block Tool with type "${e}" not found`);return new Zo({tool:t,api:this.Blok.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t,r)=>{const{BlockManager:i}=this.Blok,l=i.getBlockById(e);if(l===void 0)throw new Error(`Block with id "${e}" not found`);const c=await i.update(l,t,r);return new Ln(c)},this.convert=async(e,t,r)=>{var y,b;const{BlockManager:i,Tools:l}=this.Blok,c=i.getBlockById(e);if(!c)throw new Error(`Block with id "${e}" not found`);const d=l.blockTools.get(c.name),h=l.blockTools.get(t);if(!h)throw new Error(`Block Tool with type "${t}" not found`);const g=((y=d==null?void 0:d.conversionConfig)==null?void 0:y.export)!==void 0,m=((b=h.conversionConfig)==null?void 0:b.import)!==void 0;if(g&&m){const T=await i.convert(c,t,r);return new Ln(T)}else{const T=[g?!1:ds(c.name),m?!1:ds(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${c.name}" to "${t}" is not possible. ${T} tool(s) should provide a "conversionConfig"`)}},this.insertMany=(e,t=this.Blok.BlockManager.blocks.length-1)=>{this.validateIndex(t);const r=e.map(({id:i,type:l,data:c})=>this.Blok.BlockManager.composeBlock({id:i,tool:l||this.config.defaultBlock,data:c}));return this.Blok.BlockManager.insertMany(r,t),r.map(i=>new Ln(i))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),getBlockByElement:e=>this.getBlockByElement(e),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert,stretchBlock:(e,t=!0)=>this.stretchBlock(e,t)}}getBlocksCount(){return this.Blok.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Blok.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Blok.BlockManager.getBlockById(e);if(!t){en("There is no block with id `"+e+"`","warn");return}return this.Blok.BlockManager.getBlockIndex(t)}getBlockByIndex(e){const t=this.Blok.BlockManager.getBlockByIndex(e);if(t===void 0){en("There is no block at index `"+e+"`","warn");return}return new Ln(t)}getById(e){const t=this.Blok.BlockManager.getBlockById(e);return t===void 0?(en("There is no block with id `"+e+"`","warn"),null):new Ln(t)}getBlockByElement(e){const t=this.Blok.BlockManager.getBlock(e);if(t===void 0){en("There is no block corresponding to element `"+e+"`","warn");return}return new Ln(t)}move(e,t){this.Blok.BlockManager.move(e,t)}delete(e=this.Blok.BlockManager.currentBlockIndex){const t=this.Blok.BlockManager.getBlockByIndex(e);if(t===void 0){en(`There is no block at index \`${e}\``,"warn");return}try{this.Blok.BlockManager.removeBlock(t)}catch(r){en(r,"warn");return}this.Blok.BlockManager.blocks.length===0&&this.Blok.BlockManager.insert(),this.Blok.BlockManager.currentBlock&&this.Blok.Caret.setToBlock(this.Blok.BlockManager.currentBlock,this.Blok.Caret.positions.END),this.Blok.Toolbar.close()}async clear(){await this.Blok.BlockManager.clear(!0),this.Blok.InlineToolbar.close()}async render(e){if(e===void 0||e.blocks===void 0)throw new Error("Incorrect data passed to the render() method");this.Blok.ModificationsObserver.disable(),await this.Blok.BlockManager.clear(),await this.Blok.Renderer.render(e.blocks),this.Blok.ModificationsObserver.enable()}async renderFromHTML(e){return await this.Blok.BlockManager.clear(),this.Blok.Paste.processText(e,!0)}stretchBlock(e,t=!0){const r=this.Blok.BlockManager.getBlockByIndex(e);r&&r.setStretchState(t)}validateIndex(e){if(typeof e!="number")throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(e===null)throw new Error("Index should be greater than or equal to 0")}}const rS=(a,e)=>typeof a=="number"?e.BlockManager.getBlockByIndex(a):typeof a=="string"?e.BlockManager.getBlockById(a):e.BlockManager.getBlockById(a.id);class oS extends Be{constructor(){super(...arguments),this.setToFirstBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.firstBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.firstBlock,e,t),!0):!1,this.setToLastBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.lastBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.lastBlock,e,t),!0):!1,this.setToPreviousBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.previousBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.previousBlock,e,t),!0):!1,this.setToNextBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.nextBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.nextBlock,e,t),!0):!1,this.setToBlock=(e,t=this.Blok.Caret.positions.DEFAULT,r=0)=>{const i=rS(e,this.Blok);return i===void 0?!1:(this.Blok.Caret.setToBlock(i,t,r),!0)},this.focus=(e=!1)=>e?this.setToLastBlock(this.Blok.Caret.positions.END):this.setToFirstBlock(this.Blok.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}class iS extends Be{get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}}class id extends Be{static getNamespace(e,t){return t?`blockTunes.${e}`:`tools.${e}`}get methods(){return{t:e=>(en("I18n.t() method can be accessed only from Tools","warn"),"")}}getMethodsForTool(e,t){return Object.assign(this.methods,{t:r=>Qe.t(id.getNamespace(e,t),r)})}}class sS extends Be{get methods(){return{blocks:this.Blok.BlocksAPI.methods,caret:this.Blok.CaretAPI.methods,tools:this.Blok.ToolsAPI.methods,events:this.Blok.EventsAPI.methods,history:this.Blok.HistoryAPI.methods,listeners:this.Blok.ListenersAPI.methods,notifier:this.Blok.NotifierAPI.methods,sanitizer:this.Blok.SanitizerAPI.methods,saver:this.Blok.SaverAPI.methods,selection:this.Blok.SelectionAPI.methods,styles:this.Blok.StylesAPI.classes,toolbar:this.Blok.ToolbarAPI.methods,inlineToolbar:this.Blok.InlineToolbarAPI.methods,tooltip:this.Blok.TooltipAPI.methods,i18n:this.Blok.I18nAPI.methods,readOnly:this.Blok.ReadOnlyAPI.methods,ui:this.Blok.UiAPI.methods}}getMethodsForTool(e,t){return Object.assign(this.methods,{i18n:this.Blok.I18nAPI.getMethodsForTool(e,t)})}}class aS extends Be{get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Blok.InlineToolbar.tryToShow()}close(){this.Blok.InlineToolbar.close()}}class lS extends Be{get methods(){return{on:(e,t,r,i)=>this.on(e,t,r,i),off:(e,t,r,i)=>this.off(e,t,r,i),offById:e=>this.offById(e)}}on(e,t,r,i){return this.listeners.on(e,t,r,i)}off(e,t,r,i){this.listeners.off(e,t,r,i)}offById(e){this.listeners.offById(e)}}class cS{constructor(){this.notifierModule=null,this.loadingPromise=null}loadNotifierModule(){return this.notifierModule!==null?Promise.resolve(this.notifierModule):(this.loadingPromise===null&&(this.loadingPromise=Promise.resolve().then(()=>$C).then(e=>{var r;const t=(r=e==null?void 0:e.default)!=null?r:e;if(!this.isNotifierModule(t))throw new Error('notifier module does not expose a "show" method.');return this.notifierModule=t,t}).catch(e=>{throw this.loadingPromise=null,e})),this.loadingPromise)}show(e){this.loadNotifierModule().then(t=>{t.show(e)}).catch(t=>{console.error("[Blok] Failed to display notification. Reason:",t)})}isNotifierModule(e){return typeof e=="object"&&e!==null&&"show"in e&&typeof e.show=="function"}}class uS extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.notifier=new cS}get methods(){return{show:e=>this.show(e)}}show(e){return this.notifier.show(e)}}class dS extends Be{get methods(){const e=()=>this.isEnabled;return{toggle:t=>this.toggle(t),get isEnabled(){return e()}}}toggle(e){return this.Blok.ReadOnly.toggle(e)}get isEnabled(){return this.Blok.ReadOnly.isEnabled}}var ms={exports:{}},fS=ms.exports,ey;function hS(){return ey||(ey=1,(function(a,e){(function(t,r){a.exports=r()})(fS,function(){function t(y){var b=y.tags,T=Object.keys(b),k=T.map(function(x){return typeof b[x]}).every(function(x){return x==="object"||x==="boolean"||x==="function"});if(!k)throw new Error("The configuration was invalid");this.config=y}var r=["P","LI","TD","TH","DIV","H1","H2","H3","H4","H5","H6","PRE"];function i(y){return r.indexOf(y.nodeName)!==-1}var l=["A","B","STRONG","I","EM","SUB","SUP","U","STRIKE"];function c(y){return l.indexOf(y.nodeName)!==-1}t.prototype.clean=function(y){const b=document.implementation.createHTMLDocument(),T=b.createElement("div");return T.innerHTML=y,this._sanitize(b,T),T.innerHTML},t.prototype._sanitize=function(y,b){var T=d(y,b),k=T.firstChild();if(k)do{if(k.nodeType===Node.TEXT_NODE)if(k.data.trim()===""&&(k.previousElementSibling&&i(k.previousElementSibling)||k.nextElementSibling&&i(k.nextElementSibling))){b.removeChild(k),this._sanitize(y,b);break}else continue;if(k.nodeType===Node.COMMENT_NODE){b.removeChild(k),this._sanitize(y,b);break}var x=c(k),S;x&&(S=Array.prototype.some.call(k.childNodes,i));var R=!!b.parentNode,O=i(b)&&i(k)&&R,H=k.nodeName.toLowerCase(),P=h(this.config,H,k),$=x&&S;if($||g(k,P)||!this.config.keepNestedBlockElements&&O){if(!(k.nodeName==="SCRIPT"||k.nodeName==="STYLE"))for(;k.childNodes.length>0;)b.insertBefore(k.childNodes[0],k);b.removeChild(k),this._sanitize(y,b);break}for(var j=0;j<k.attributes.length;j+=1){var U=k.attributes[j];m(U,P,k)&&(k.removeAttribute(U.name),j=j-1)}this._sanitize(y,k)}while(k=T.nextSibling())};function d(y,b){return y.createTreeWalker(b,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null,!1)}function h(y,b,T){return typeof y.tags[b]=="function"?y.tags[b](T):y.tags[b]}function g(y,b){return typeof b=="undefined"?!0:typeof b=="boolean"?!b:!1}function m(y,b,T){var k=y.name.toLowerCase();return b===!0?!1:typeof b[k]=="function"?!b[k](y.value,T):typeof b[k]=="undefined"||b[k]===!1?!0:typeof b[k]=="string"?b[k]!==y.value:!1}return t})})(ms)),ms.exports}var pS=hS();const gS=Le(pS),mS=/^\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)/i,vS=/\s*(?:href|src)\s*=\s*(?:"\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^"]*"|'\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^']*|(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^ \t\r\n>]*)/gi,sd=(a,e,t={})=>a.map(r=>{const i=Me(e)?e(r.tool):e,l=i!=null?i:{};return je(l)&&it(l)&&it(t)?r:ot(de({},r),{data:ad(r.data,l,t)})}),En=(a,e={})=>{const t={tags:e};return new gS(t).clean(a)},ad=(a,e,t)=>Array.isArray(a)?yS(a,e,t):je(a)?bS(a,e,t):hn(a)?kS(a,e,t):a,yS=(a,e,t)=>a.map(r=>ad(r,e,t)),bS=(a,e,t)=>{const r={},i=a;for(const l in a){if(!Object.prototype.hasOwnProperty.call(a,l))continue;const c=i[l],d=je(e)?e:void 0,h=d==null?void 0:d[l],g=h!==void 0&&wS(h)?h:e;r[l]=ad(c,g,t)}return r},kS=(a,e,t)=>{const r=BS(e,t);if(r){const i=En(a,r);return ld(ny(i,r))}if(!it(t)){const i=En(a,t);return ld(ny(i,t))}return ld(a)},wS=a=>je(a)||pv(a)||Me(a),TS=a=>a?mS.test(a):!1,ld=a=>{if(!a||a.indexOf("<")===-1)return a;if(typeof document!="undefined"){const e=document.createElement("template");return e.innerHTML=a,e.content.querySelectorAll("[href],[src]").forEach(r=>{["href","src"].forEach(i=>{const l=r.getAttribute(i);TS(l)&&r.removeAttribute(i)})}),e.innerHTML}return a.replace(vS,"")},cd=a=>{if(it(a))return{};const e={};for(const t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=Br(a[t]));return e},ty=a=>function(t){const r=a.call(this,t);return r==null?{}:r},xS=new Set(["class","id","title","role","dir","lang"]),SS=a=>{const e=a.toLowerCase();return e.startsWith("data-")||e.startsWith("aria-")||xS.has(e)},ES=a=>{const e={};return Array.from(a.attributes).forEach(t=>{SS(t.name)&&(e[t.name]=!0)}),e},Br=a=>a===!0?ty(ES):a===!1?!1:Me(a)?ty(a):hn(a)?a:je(a)?$o({},a):a,CS=(a,e)=>{if(it(a))return cd(e);const t={};for(const r in a){if(!Object.prototype.hasOwnProperty.call(a,r))continue;const i=a[r],l=e?e[r]:void 0;if(Me(l)){t[r]=Br(l);continue}if(Me(i)){t[r]=Br(i);continue}if(je(i)&&je(l)){t[r]=$o({},l,i);continue}if(l!==void 0){t[r]=Br(l);continue}t[r]=Br(i)}return t},BS=(a,e)=>je(a)&&!Me(a)?CS(e,a):a===!1?{}:it(e)?null:cd(e),ud=(a,...e)=>{if(it(a))return Object.assign({},...e);const t=cd(a);return e.forEach(r=>{if(r)for(const i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;const l=r[i];if(!Object.prototype.hasOwnProperty.call(t,i))continue;const c=t[i];if(Me(l)){t[i]=l;continue}if(!(l===!0&&Me(c))){if(l===!0){const d=je(c)&&!Me(c);t[i]=d?$o({},c):Br(l);continue}if(je(l)&&je(c)){t[i]=$o({},c,l);continue}t[i]=Br(l)}}}),t},ny=(a,e)=>{if(typeof document=="undefined"||!a||a.indexOf("<")===-1)return a;const t=Object.entries(e).filter(([,i])=>Me(i));if(t.length===0)return a;const r=document.createElement("template");return r.innerHTML=a,t.forEach(([i,l])=>{r.content.querySelectorAll(i).forEach(d=>{const h=l(d);if(!(pv(h)||Me(h)||h==null))for(const[g,m]of Object.entries(h)){if(m===!1){d.removeAttribute(g);continue}m!==!0&&hn(m)&&d.setAttribute(g,m)}})}),r.innerHTML};class AS extends Be{get methods(){return{clean:(e,t)=>this.clean(e,t)}}clean(e,t){return En(e,t)}}class IS extends Be{get methods(){return{save:()=>this.save()}}async save(){var l,c;const e="Blok's content can not be saved in read-only mode";if(this.Blok.ReadOnly.isEnabled)throw en(e,"warn"),new Error(e);const t=await this.Blok.Saver.save();if(t!==void 0)return t;const r=(c=(l=this.Blok.Saver).getLastSaveError)==null?void 0:c.call(l);if(r instanceof Error)throw r;const i=r!==void 0?String(r):"Blok's content can not be saved because collecting data failed";throw new Error(i)}}class RS extends Be{constructor(){super(...arguments),this.selectionUtils=new le}get methods(){return{findParentTag:(e,t)=>this.findParentTag(e,t),expandToTag:e=>this.expandToTag(e),save:()=>this.selectionUtils.save(),restore:()=>this.selectionUtils.restore(),setFakeBackground:()=>this.selectionUtils.setFakeBackground(),removeFakeBackground:()=>this.selectionUtils.removeFakeBackground()}}findParentTag(e,t){return this.selectionUtils.findParentTag(e,t)}expandToTag(e){this.selectionUtils.expandToTag(e)}}class _S extends Be{get methods(){return{getBlockTools:()=>Array.from(this.Blok.Tools.blockTools.values())}}}class NS extends Be{get classes(){return{block:"py-[theme(spacing.block-padding-vertical)] px-0 [&::-webkit-input-placeholder]:!leading-normal",inlineToolButton:"flex justify-center items-center border-0 rounded h-full p-0 w-7 bg-transparent cursor-pointer leading-normal text-black",inlineToolButtonActive:"bg-icon-active-bg text-icon-active-text",input:"w-full rounded-[3px] border border-line-gray px-3 py-2.5 outline-none shadow-input [&[data-blok-placeholder]]:before:!static [&[data-blok-placeholder]]:before:inline-block [&[data-blok-placeholder]]:before:w-0 [&[data-blok-placeholder]]:before:whitespace-nowrap [&[data-blok-placeholder]]:before:pointer-events-none",loader:"relative border border-line-gray before:absolute before:left-1/2 before:top-1/2 before:w-[18px] before:h-[18px] before:rounded-full before:content-[''] before:-ml-[11px] before:-mt-[11px] before:border-2 before:border-line-gray before:border-l-active-icon before:animate-rotation",button:"p-[13px] rounded-[3px] border border-line-gray text-[14.9px] bg-white text-center cursor-pointer text-gray-text shadow-button-base hover:bg-[#fbfcfe] hover:shadow-button-base-hover [&_svg]:h-5 [&_svg]:mr-[0.2em] [&_svg]:-mt-0.5",settingsButton:"inline-flex items-center justify-center rounded-[3px] cursor-pointer border-0 outline-none bg-transparent align-bottom text-inherit m-0 min-w-toolbox-btn min-h-toolbox-btn [&_svg]:w-auto [&_svg]:h-auto mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile mobile:rounded-lg mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile can-hover:hover:bg-bg-light",settingsButtonActive:"text-active-icon",settingsButtonFocused:"shadow-button-focused bg-item-focus-bg",settingsButtonFocusedAnimated:"animate-button-clicked"}}}class OS extends Be{get methods(){return{close:()=>this.close(),open:()=>this.open(),toggleBlockSettings:e=>this.toggleBlockSettings(e),toggleToolbox:e=>this.toggleToolbox(e)}}open(){this.Blok.Toolbar.moveAndOpen()}close(){this.Blok.Toolbar.close()}toggleBlockSettings(e){if(this.Blok.BlockManager.currentBlockIndex===-1){en("Could't toggle the Toolbar because there is no block selected ","warn");return}(e!=null?e:!this.Blok.BlockSettings.opened)?(this.Blok.Toolbar.moveAndOpen(),this.Blok.BlockSettings.open()):this.Blok.BlockSettings.close()}toggleToolbox(e){if(this.Blok.BlockManager.currentBlockIndex===-1){en("Could't toggle the Toolbox because there is no block selected ","warn");return}(e!=null?e:!this.Blok.Toolbar.toolbox.opened)?(this.Blok.Toolbar.moveAndOpen(),this.Blok.Toolbar.toolbox.open()):this.Blok.Toolbar.toolbox.close()}}const dd=10,LS="tooltip",DS="aria-hidden",PS="false",MS="true",FS="visibility",HS="visible",zS="hidden",rr=class rr{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=dd,this.offsetLeft=dd,this.offsetRight=dd,this.showingTimeout=null,this.hidingDelay=0,this.hidingTimeout=null,this.ariaObserver=null,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:Tt("absolute z-overlay top-0 left-0","bg-tooltip-bg opacity-0","select-none pointer-events-none","transition-[opacity,transform] duration-[50ms,70ms] ease-in","rounded-lg shadow-tooltip","will-change-[opacity,top,left]","before:content-[''] before:absolute before:inset-0 before:bg-tooltip-bg before:-z-10 before:rounded-lg","mobile:hidden").split(" "),tooltipContent:Tt("px-2.5 py-1.5","text-tooltip-font text-xs text-center","tracking-[0.02em] leading-[1em]").split(" "),tooltipShown:["opacity-100","transform-none"],placement:{left:["-translate-x-[5px]"],bottom:["translate-y-[5px]"],right:["translate-x-[5px]"],top:["-translate-y-[5px]"]}}}static getInstance(){return rr.instance||(rr.instance=new rr),rr.instance}show(e,t,r={}){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&(clearTimeout(this.hidingTimeout),this.hidingTimeout=null);const l=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},r);if(l.hidingDelay&&(this.hidingDelay=l.hidingDelay),!this.nodes.content||(this.nodes.content.innerHTML="",this.nodes.content.appendChild(this.createContentNode(t)),!this.nodes.wrapper))return;const c=Object.values(this.CSS.placement).flatMap(d=>Array.isArray(d)?d:[d]);switch(this.nodes.wrapper.classList.remove(...c),l.placement){case"top":this.placeTop(e,l);break;case"left":this.placeLeft(e,l);break;case"right":this.placeRight(e,l);break;case"bottom":default:this.placeBottom(e,l);break}if(l&&l.delay){this.showingTimeout=setTimeout(()=>{if(this.nodes.wrapper){const d=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.add(...d),this.updateTooltipVisibility()}this.showed=!0},l.delay);return}if(this.nodes.wrapper){const d=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.add(...d),this.updateTooltipVisibility()}this.showed=!0}createContentNode(e){if(typeof e=="string")return document.createTextNode(e);if(e instanceof Node)return e;throw Error("[Blok Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof e+" given.")}hide(e=!1){const t=!!this.hidingDelay&&!e;if(t&&this.hidingTimeout&&clearTimeout(this.hidingTimeout),t){this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay);return}if(this.nodes.wrapper){const r=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.remove(...r),this.updateTooltipVisibility()}this.showed=!1,this.showingTimeout&&(clearTimeout(this.showingTimeout),this.showingTimeout=null)}onHover(e,t,r={}){e.addEventListener("mouseenter",()=>{this.show(e,t,r)}),e.addEventListener("mouseleave",()=>{this.hide()})}destroy(){var e;(e=this.ariaObserver)==null||e.disconnect(),this.ariaObserver=null,this.nodes.wrapper&&this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll),rr.instance=null}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.wrapper.setAttribute(io,Gu),this.nodes.wrapper.setAttribute("data-blok-testid","tooltip"),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.nodes.content.setAttribute("data-blok-testid","tooltip-content"),this.nodes.wrapper&&this.nodes.content&&(this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper),this.ensureTooltipAttributes())}updateTooltipVisibility(){if(!this.nodes.wrapper)return;const e=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown[0]:this.CSS.tooltipShown,t=this.nodes.wrapper.classList.contains(e);this.nodes.wrapper.style.setProperty(FS,t?HS:zS),this.nodes.wrapper.setAttribute(DS,t?PS:MS),this.nodes.wrapper.setAttribute("data-blok-shown",t?"true":"false")}watchTooltipVisibility(){var e;this.nodes.wrapper&&((e=this.ariaObserver)==null||e.disconnect(),this.updateTooltipVisibility(),this.ariaObserver=new MutationObserver(()=>{this.updateTooltipVisibility()}),this.ariaObserver.observe(this.nodes.wrapper,{attributes:!0,attributeFilter:["class"]}))}ensureTooltipAttributes(){this.nodes.wrapper&&((!this.nodes.wrapper.hasAttribute(io)||this.nodes.wrapper.getAttribute(io)!==Gu)&&this.nodes.wrapper.setAttribute(io,Gu),this.nodes.wrapper.setAttribute("role",LS),this.watchTooltipVisibility())}placeBottom(e,t){var c;if(!this.nodes.wrapper)return;const r=e.getBoundingClientRect(),i=r.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,l=r.bottom+this.getScrollTop()+this.offsetTop+((c=t.marginTop)!=null?c:0);this.applyPlacement("bottom",i,l)}placeTop(e,t){if(!this.nodes.wrapper)return;const r=e.getBoundingClientRect(),i=r.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,l=r.top+this.getScrollTop()-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",i,l)}placeLeft(e,t){var c;if(!this.nodes.wrapper)return;const r=e.getBoundingClientRect(),i=r.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-((c=t.marginLeft)!=null?c:0),l=r.top+this.getScrollTop()+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",i,l)}placeRight(e,t){var c;if(!this.nodes.wrapper)return;const r=e.getBoundingClientRect(),i=r.right+this.offsetRight+((c=t.marginRight)!=null?c:0),l=r.top+this.getScrollTop()+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",i,l)}applyPlacement(e,t,r){if(!this.nodes.wrapper)return;const i=Array.isArray(this.CSS.placement[e])?this.CSS.placement[e]:[this.CSS.placement[e]];this.nodes.wrapper.classList.add(...i),this.nodes.wrapper.setAttribute("data-blok-placement",e),this.nodes.wrapper.style.left=`${t}px`,this.nodes.wrapper.style.top=`${r}px`}getScrollTop(){var e,t,r;return typeof window.scrollY=="number"?window.scrollY:(r=(t=(e=document.documentElement)==null?void 0:e.scrollTop)!=null?t:document.body.scrollTop)!=null?r:0}make(e,t=null,r={}){const i=document.createElement(e);Array.isArray(t)&&i.classList.add(...t),typeof t=="string"&&i.classList.add(t);for(const l in r)Object.prototype.hasOwnProperty.call(r,l)&&(i[l]=r[l]);return i}append(e,t){Array.isArray(t)?t.forEach(r=>e.appendChild(r)):e.appendChild(t)}prepend(e,t){Array.isArray(t)?t.reverse().forEach(i=>e.prepend(i)):e.prepend(t)}};rr.instance=null;let fd=rr;const vs=()=>fd.getInstance(),jS=(a,e,t)=>{vs().show(a,e,t!=null?t:{})},Jo=(a=!1)=>{vs().hide(a)},ys=(a,e,t)=>{vs().onHover(a,e,t!=null?t:{})},qS=()=>{vs().destroy()};class US extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t})}get methods(){return{show:(e,t,r)=>this.show(e,t,r),hide:()=>this.hide(),onHover:(e,t,r)=>this.onHover(e,t,r)}}show(e,t,r){jS(e,t,r)}hide(){Jo()}onHover(e,t,r){ys(e,t,r)}}class WS extends Be{get methods(){return{nodes:this.blokNodes}}get blokNodes(){return{wrapper:this.Blok.UI.nodes.wrapper,redactor:this.Blok.UI.nodes.redactor}}}class KS extends Be{get methods(){return{undo:()=>this.undo(),redo:()=>this.redo(),canUndo:()=>this.canUndo(),canRedo:()=>this.canRedo(),clear:()=>this.clear()}}async undo(){return this.Blok.History.undo()}async redo(){return this.Blok.History.redo()}canUndo(){return this.Blok.History.canUndo()}canRedo(){return this.Blok.History.canRedo()}clear(){this.Blok.History.clear()}}const ry=(a,e)=>{const t={};return Object.entries(a).forEach(([r,i])=>{if(!je(i)){t[r]=i;return}const l=e?`${e}.${r}`:r;if(!Object.values(i).every(d=>hn(d))){t[r]=ry(i,l);return}t[r]=l}),t},pt=ry(Tv),Mr=class Mr{constructor(e,t){this.cursor=-1,this.items=[],this.items=e!=null?e:[],this.focusedCssClass=t}get currentItem(){return this.cursor===-1?null:this.items[this.cursor]}setCursor(e){e<this.items.length&&e>=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass),this.items[this.cursor].setAttribute("data-blok-focused","true"))}setItems(e){this.items=e}hasItems(){return this.items.length>0}next(){this.cursor=this.leafNodesAndReturnIndex(Mr.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(Mr.directions.LEFT)}dropCursor(){this.cursor!==-1&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.items[this.cursor].removeAttribute("data-blok-focused"),this.cursor=-1)}leafNodesAndReturnIndex(e){if(this.items.length===0)return this.cursor;const t=e===Mr.directions.RIGHT?-1:0,r=this.cursor===-1?t:this.cursor;r!==-1&&(this.items[r].classList.remove(this.focusedCssClass),this.items[r].removeAttribute("data-blok-focused"));const i=e===Mr.directions.RIGHT?(r+1)%this.items.length:(this.items.length+r-1)%this.items.length;return L.canSetCaret(this.items[i])&&us(()=>le.setCursor(this.items[i]),50)(),this.items[i].classList.add(this.focusedCssClass),this.items[i].setAttribute("data-blok-focused","true"),i}};Mr.directions={RIGHT:"right",LEFT:"left"};let Ar=Mr;class Zn{constructor(e){var t,r;this.iterator=null,this.activated=!1,this.skipNextTabFocus=!1,this.flipCallbacks=[],this.onKeyDown=i=>{var g,m;const l=i.target;if(this.shouldSkipTarget(l,i))return;const c=this.getKeyCode(i),d=c===re.LEFT||c===re.RIGHT||c===re.UP||c===re.DOWN;if(!(i.shiftKey&&d||!this.isEventReadyForHandling(i))&&!(c===re.ENTER&&!((g=this.iterator)!=null&&g.currentItem)))switch(i.stopPropagation(),i.stopImmediatePropagation(),c!==null&&Zn.usedKeys.includes(c)&&i.preventDefault(),c){case re.TAB:this.handleTabPress(i);break;case re.LEFT:this.onArrowLeftCallback&&this.onArrowLeftCallback();break;case re.UP:this.flipLeft();break;case re.RIGHT:(m=this.iterator)!=null&&m.currentItem&&this.currentItemHasChildren()&&this.handleEnterPress(i);break;case re.DOWN:this.flipRight();break;case re.ENTER:this.handleEnterPress(i);break}},this.iterator=new Ar(e.items||[],(t=e.focusedItemClass)!=null?t:""),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||Zn.usedKeys,this.handleContentEditableTargets=(r=e.handleContentEditableTargets)!=null?r:!1,this.onArrowLeftCallback=e.onArrowLeft}get isActivated(){return this.activated}static get usedKeys(){return[re.TAB,re.LEFT,re.RIGHT,re.ENTER,re.UP,re.DOWN]}activate(e,t){var r,i;this.activated=!0,e&&((r=this.iterator)==null||r.setItems(e)),t!==void 0&&((i=this.iterator)==null||i.setCursor(t)),document.addEventListener("keydown",this.onKeyDown,!0),window.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),this.skipNextTabFocus=!1,document.removeEventListener("keydown",this.onKeyDown,!0),window.removeEventListener("keydown",this.onKeyDown,!0)}focusFirst(){this.dropCursor(),this.flipRight()}focusItem(e){const t=this.iterator;if(t&&t.hasItems()){if(e<0){t.dropCursor();return}!t.currentItem&&e===0&&(this.skipNextTabFocus=!0),t.setCursor(e)}}flipLeft(){var e;(e=this.iterator)==null||e.previous(),this.flipCallback()}flipRight(){var e;(e=this.iterator)==null||e.next(),this.flipCallback()}hasFocus(){var e;return!!((e=this.iterator)!=null&&e.currentItem)}currentItemHasChildren(){var t;const e=(t=this.iterator)==null?void 0:t.currentItem;return e?e.hasAttribute("data-blok-has-children"):!1}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter(t=>t!==e)}dropCursor(){var e;(e=this.iterator)==null||e.dropCursor()}getKeyCode(e){var r;return(r={Tab:re.TAB,Enter:re.ENTER,ArrowLeft:re.LEFT,ArrowRight:re.RIGHT,ArrowUp:re.UP,ArrowDown:re.DOWN}[e.key])!=null?r:null}isEventReadyForHandling(e){const t=this.getKeyCode(e);return this.activated&&t!==null&&this.allowedKeys.includes(t)}setHandleContentEditableTargets(e){this.handleContentEditableTargets=e}handleTabPress(e){const r=e.shiftKey?Ar.directions.LEFT:Ar.directions.RIGHT;if(this.skipNextTabFocus){this.skipNextTabFocus=!1;return}switch(r){case Ar.directions.RIGHT:this.flipRight();break;case Ar.directions.LEFT:this.flipLeft();break}}handleExternalKeydown(e){this.onKeyDown(e)}handleEnterPress(e){var t,r;this.activated&&((t=this.iterator)!=null&&t.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),Me(this.activateCallback)&&((r=this.iterator)!=null&&r.currentItem)&&this.activateCallback(this.iterator.currentItem))}flipCallback(){var e,t,r;(e=this.iterator)!=null&&e.currentItem&&((r=(t=this.iterator.currentItem).scrollIntoViewIfNeeded)==null||r.call(t)),this.flipCallbacks.forEach(i=>i())}shouldSkipTarget(e,t){if(!e)return!1;const r=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,i=t.key==="Tab"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Enter"||t.key==="ArrowRight"||t.key==="ArrowLeft",l=e.getAttribute("data-blok-flipper-navigation-target")==="true"&&i,c=e.isContentEditable,d=e.closest('[data-blok-link-tool-input-opened="true"]')!==null,h=c&&!this.handleContentEditableTargets;return r&&!l||h||d}}var hd={exports:{}},ei={},pd={exports:{}},Ae={};var oy;function VS(){if(oy)return Ae;oy=1;var a=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=y&&A[y]||A["@@iterator"],typeof A=="function"?A:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,x={};function S(A,F,se){this.props=A,this.context=F,this.refs=x,this.updater=se||T}S.prototype.isReactComponent={},S.prototype.setState=function(A,F){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,F,"setState")},S.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function R(){}R.prototype=S.prototype;function O(A,F,se){this.props=A,this.context=F,this.refs=x,this.updater=se||T}var H=O.prototype=new R;H.constructor=O,k(H,S.prototype),H.isPureReactComponent=!0;var P=Array.isArray,$=Object.prototype.hasOwnProperty,j={current:null},U={key:!0,ref:!0,__self:!0,__source:!0};function M(A,F,se){var ue,Se={},Ie=null,ye=null;if(F!=null)for(ue in F.ref!==void 0&&(ye=F.ref),F.key!==void 0&&(Ie=""+F.key),F)$.call(F,ue)&&!U.hasOwnProperty(ue)&&(Se[ue]=F[ue]);var fe=arguments.length-2;if(fe===1)Se.children=se;else if(1<fe){for(var He=Array(fe),yt=0;yt<fe;yt++)He[yt]=arguments[yt+2];Se.children=He}if(A&&A.defaultProps)for(ue in fe=A.defaultProps,fe)Se[ue]===void 0&&(Se[ue]=fe[ue]);return{$$typeof:a,type:A,key:Ie,ref:ye,props:Se,_owner:j.current}}function X(A,F){return{$$typeof:a,type:A.type,key:F,ref:A.ref,props:A.props,_owner:A._owner}}function ae(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function G(A){var F={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(se){return F[se]})}var ke=/\/+/g;function Z(A,F){return typeof A=="object"&&A!==null&&A.key!=null?G(""+A.key):F.toString(36)}function Te(A,F,se,ue,Se){var Ie=typeof A;(Ie==="undefined"||Ie==="boolean")&&(A=null);var ye=!1;if(A===null)ye=!0;else switch(Ie){case"string":case"number":ye=!0;break;case"object":switch(A.$$typeof){case a:case e:ye=!0}}if(ye)return ye=A,Se=Se(ye),A=ue===""?"."+Z(ye,0):ue,P(Se)?(se="",A!=null&&(se=A.replace(ke,"$&/")+"/"),Te(Se,F,se,"",function(yt){return yt})):Se!=null&&(ae(Se)&&(Se=X(Se,se+(!Se.key||ye&&ye.key===Se.key?"":(""+Se.key).replace(ke,"$&/")+"/")+A)),F.push(Se)),1;if(ye=0,ue=ue===""?".":ue+":",P(A))for(var fe=0;fe<A.length;fe++){Ie=A[fe];var He=ue+Z(Ie,fe);ye+=Te(Ie,F,se,He,Se)}else if(He=b(A),typeof He=="function")for(A=He.call(A),fe=0;!(Ie=A.next()).done;)Ie=Ie.value,He=ue+Z(Ie,fe++),ye+=Te(Ie,F,se,He,Se);else if(Ie==="object")throw F=String(A),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return ye}function Re(A,F,se){if(A==null)return A;var ue=[],Se=0;return Te(A,ue,"","",function(Ie){return F.call(se,Ie,Se++)}),ue}function xe(A){if(A._status===-1){var F=A._result;F=F(),F.then(function(se){(A._status===0||A._status===-1)&&(A._status=1,A._result=se)},function(se){(A._status===0||A._status===-1)&&(A._status=2,A._result=se)}),A._status===-1&&(A._status=0,A._result=F)}if(A._status===1)return A._result.default;throw A._result}var Ce={current:null},D={transition:null},ce={ReactCurrentDispatcher:Ce,ReactCurrentBatchConfig:D,ReactCurrentOwner:j};function Y(){throw Error("act(...) is not supported in production builds of React.")}return Ae.Children={map:Re,forEach:function(A,F,se){Re(A,function(){F.apply(this,arguments)},se)},count:function(A){var F=0;return Re(A,function(){F++}),F},toArray:function(A){return Re(A,function(F){return F})||[]},only:function(A){if(!ae(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},Ae.Component=S,Ae.Fragment=t,Ae.Profiler=i,Ae.PureComponent=O,Ae.StrictMode=r,Ae.Suspense=h,Ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce,Ae.act=Y,Ae.cloneElement=function(A,F,se){if(A==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+A+".");var ue=k({},A.props),Se=A.key,Ie=A.ref,ye=A._owner;if(F!=null){if(F.ref!==void 0&&(Ie=F.ref,ye=j.current),F.key!==void 0&&(Se=""+F.key),A.type&&A.type.defaultProps)var fe=A.type.defaultProps;for(He in F)$.call(F,He)&&!U.hasOwnProperty(He)&&(ue[He]=F[He]===void 0&&fe!==void 0?fe[He]:F[He])}var He=arguments.length-2;if(He===1)ue.children=se;else if(1<He){fe=Array(He);for(var yt=0;yt<He;yt++)fe[yt]=arguments[yt+2];ue.children=fe}return{$$typeof:a,type:A.type,key:Se,ref:Ie,props:ue,_owner:ye}},Ae.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},A.Provider={$$typeof:l,_context:A},A.Consumer=A},Ae.createElement=M,Ae.createFactory=function(A){var F=M.bind(null,A);return F.type=A,F},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(A){return{$$typeof:d,render:A}},Ae.isValidElement=ae,Ae.lazy=function(A){return{$$typeof:m,_payload:{_status:-1,_result:A},_init:xe}},Ae.memo=function(A,F){return{$$typeof:g,type:A,compare:F===void 0?null:F}},Ae.startTransition=function(A){var F=D.transition;D.transition={};try{A()}finally{D.transition=F}},Ae.unstable_act=Y,Ae.useCallback=function(A,F){return Ce.current.useCallback(A,F)},Ae.useContext=function(A){return Ce.current.useContext(A)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(A){return Ce.current.useDeferredValue(A)},Ae.useEffect=function(A,F){return Ce.current.useEffect(A,F)},Ae.useId=function(){return Ce.current.useId()},Ae.useImperativeHandle=function(A,F,se){return Ce.current.useImperativeHandle(A,F,se)},Ae.useInsertionEffect=function(A,F){return Ce.current.useInsertionEffect(A,F)},Ae.useLayoutEffect=function(A,F){return Ce.current.useLayoutEffect(A,F)},Ae.useMemo=function(A,F){return Ce.current.useMemo(A,F)},Ae.useReducer=function(A,F,se){return Ce.current.useReducer(A,F,se)},Ae.useRef=function(A){return Ce.current.useRef(A)},Ae.useState=function(A){return Ce.current.useState(A)},Ae.useSyncExternalStore=function(A,F,se){return Ce.current.useSyncExternalStore(A,F,se)},Ae.useTransition=function(){return Ce.current.useTransition()},Ae.version="18.3.1",Ae}var iy;function gd(){return iy||(iy=1,pd.exports=VS()),pd.exports}var sy;function $S(){if(sy)return ei;sy=1;var a=gd(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(d,h,g){var m,y={},b=null,T=null;g!==void 0&&(b=""+g),h.key!==void 0&&(b=""+h.key),h.ref!==void 0&&(T=h.ref);for(m in h)r.call(h,m)&&!l.hasOwnProperty(m)&&(y[m]=h[m]);if(d&&d.defaultProps)for(m in h=d.defaultProps,h)y[m]===void 0&&(y[m]=h[m]);return{$$typeof:e,type:d,key:b,ref:T,props:y,_owner:i.current}}return ei.Fragment=t,ei.jsx=c,ei.jsxs=c,ei}var ay;function GS(){return ay||(ay=1,hd.exports=$S()),hd.exports}var tt=GS(),ge=gd();const bs=Le(ge);var ks={},md={exports:{}},Pt={},vd={exports:{}},yd={};var ly;function XS(){return ly||(ly=1,(function(a){function e(D,ce){var Y=D.length;D.push(ce);e:for(;0<Y;){var A=Y-1>>>1,F=D[A];if(0<i(F,ce))D[A]=ce,D[Y]=F,Y=A;else break e}}function t(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var ce=D[0],Y=D.pop();if(Y!==ce){D[0]=Y;e:for(var A=0,F=D.length,se=F>>>1;A<se;){var ue=2*(A+1)-1,Se=D[ue],Ie=ue+1,ye=D[Ie];if(0>i(Se,Y))Ie<F&&0>i(ye,Se)?(D[A]=ye,D[Ie]=Y,A=Ie):(D[A]=Se,D[ue]=Y,A=ue);else if(Ie<F&&0>i(ye,Y))D[A]=ye,D[Ie]=Y,A=Ie;else break e}}return ce}function i(D,ce){var Y=D.sortIndex-ce.sortIndex;return Y!==0?Y:D.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;a.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();a.unstable_now=function(){return c.now()-d}}var h=[],g=[],m=1,y=null,b=3,T=!1,k=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function H(D){for(var ce=t(g);ce!==null;){if(ce.callback===null)r(g);else if(ce.startTime<=D)r(g),ce.sortIndex=ce.expirationTime,e(h,ce);else break;ce=t(g)}}function P(D){if(x=!1,H(D),!k)if(t(h)!==null)k=!0,xe($);else{var ce=t(g);ce!==null&&Ce(P,ce.startTime-D)}}function $(D,ce){k=!1,x&&(x=!1,R(M),M=-1),T=!0;var Y=b;try{for(H(ce),y=t(h);y!==null&&(!(y.expirationTime>ce)||D&&!G());){var A=y.callback;if(typeof A=="function"){y.callback=null,b=y.priorityLevel;var F=A(y.expirationTime<=ce);ce=a.unstable_now(),typeof F=="function"?y.callback=F:y===t(h)&&r(h),H(ce)}else r(h);y=t(h)}if(y!==null)var se=!0;else{var ue=t(g);ue!==null&&Ce(P,ue.startTime-ce),se=!1}return se}finally{y=null,b=Y,T=!1}}var j=!1,U=null,M=-1,X=5,ae=-1;function G(){return!(a.unstable_now()-ae<X)}function ke(){if(U!==null){var D=a.unstable_now();ae=D;var ce=!0;try{ce=U(!0,D)}finally{ce?Z():(j=!1,U=null)}}else j=!1}var Z;if(typeof O=="function")Z=function(){O(ke)};else if(typeof MessageChannel!="undefined"){var Te=new MessageChannel,Re=Te.port2;Te.port1.onmessage=ke,Z=function(){Re.postMessage(null)}}else Z=function(){S(ke,0)};function xe(D){U=D,j||(j=!0,Z())}function Ce(D,ce){M=S(function(){D(a.unstable_now())},ce)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(D){D.callback=null},a.unstable_continueExecution=function(){k||T||(k=!0,xe($))},a.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<D?Math.floor(1e3/D):5},a.unstable_getCurrentPriorityLevel=function(){return b},a.unstable_getFirstCallbackNode=function(){return t(h)},a.unstable_next=function(D){switch(b){case 1:case 2:case 3:var ce=3;break;default:ce=b}var Y=b;b=ce;try{return D()}finally{b=Y}},a.unstable_pauseExecution=function(){},a.unstable_requestPaint=function(){},a.unstable_runWithPriority=function(D,ce){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var Y=b;b=D;try{return ce()}finally{b=Y}},a.unstable_scheduleCallback=function(D,ce,Y){var A=a.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?A+Y:A):Y=A,D){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=Y+F,D={id:m++,callback:ce,priorityLevel:D,startTime:Y,expirationTime:F,sortIndex:-1},Y>A?(D.sortIndex=Y,e(g,D),t(h)===null&&D===t(g)&&(x?(R(M),M=-1):x=!0,Ce(P,Y-A))):(D.sortIndex=F,e(h,D),k||T||(k=!0,xe($))),D},a.unstable_shouldYield=G,a.unstable_wrapCallback=function(D){var ce=b;return function(){var Y=b;b=ce;try{return D.apply(this,arguments)}finally{b=Y}}}})(yd)),yd}var cy;function YS(){return cy||(cy=1,vd.exports=XS()),vd.exports}var uy;function QS(){if(uy)return Pt;uy=1;var a=gd(),e=YS();function t(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,s=1;s<arguments.length;s++)o+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function l(n,o){c(n,o),c(n+"Capture",o)}function c(n,o){for(i[n]=o,n=0;n<o.length;n++)r.add(o[n])}var d=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),h=Object.prototype.hasOwnProperty,g=/^[: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]*$/,m={},y={};function b(n){return h.call(y,n)?!0:h.call(m,n)?!1:g.test(n)?y[n]=!0:(m[n]=!0,!1)}function T(n,o,s,u){if(s!==null&&s.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return u?!1:s!==null?!s.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,o,s,u){if(o===null||typeof o=="undefined"||T(n,o,s,u))return!0;if(u)return!1;if(s!==null)switch(s.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function x(n,o,s,u,f,p,v){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=u,this.attributeNamespace=f,this.mustUseProperty=s,this.propertyName=n,this.type=o,this.sanitizeURL=p,this.removeEmptyString=v}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){S[n]=new x(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];S[o]=new x(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){S[n]=new x(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){S[n]=new x(n,2,!1,n,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(n){S[n]=new x(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){S[n]=new x(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){S[n]=new x(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){S[n]=new x(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){S[n]=new x(n,5,!1,n.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function O(n){return n[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(n){var o=n.replace(R,O);S[o]=new x(o,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var o=n.replace(R,O);S[o]=new x(o,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var o=n.replace(R,O);S[o]=new x(o,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){S[n]=new x(n,1,!1,n.toLowerCase(),null,!1,!1)}),S.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){S[n]=new x(n,1,!1,n.toLowerCase(),null,!0,!0)});function H(n,o,s,u){var f=S.hasOwnProperty(o)?S[o]:null;(f!==null?f.type!==0:u||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(k(o,s,f,u)&&(s=null),u||f===null?b(o)&&(s===null?n.removeAttribute(o):n.setAttribute(o,""+s)):f.mustUseProperty?n[f.propertyName]=s===null?f.type===3?!1:"":s:(o=f.attributeName,u=f.attributeNamespace,s===null?n.removeAttribute(o):(f=f.type,s=f===3||f===4&&s===!0?"":""+s,u?n.setAttributeNS(u,o,s):n.setAttribute(o,s))))}var P=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),j=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),ae=Symbol.for("react.provider"),G=Symbol.for("react.context"),ke=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),Ce=Symbol.for("react.offscreen"),D=Symbol.iterator;function ce(n){return n===null||typeof n!="object"?null:(n=D&&n[D]||n["@@iterator"],typeof n=="function"?n:null)}var Y=Object.assign,A;function F(n){if(A===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);A=o&&o[1]||""}return`
11
+ `+A+n}var se=!1;function ue(n,o){if(!n||se)return"";se=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(N){var u=N}Reflect.construct(n,[],o)}else{try{o.call()}catch(N){u=N}n.call(o.prototype)}else{try{throw Error()}catch(N){u=N}n()}}catch(N){if(N&&u&&typeof N.stack=="string"){for(var f=N.stack.split(`
12
12
  `),p=u.stack.split(`
13
- `),m=f.length-1,k=p.length-1;1<=m&&0<=k&&f[m]!==p[k];)k--;for(;1<=m&&0<=k;m--,k--)if(f[m]!==p[k]){if(m!==1||k!==1)do if(m--,k--,0>k||f[m]!==p[k]){var E=`
14
- `+f[m].replace(" at new "," at ");return n.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",n.displayName)),E}while(1<=m&&0<=k);break}}}finally{ae=!1,Error.prepareStackTrace=s}return(n=n?n.displayName||n.name:"")?P(n):""}function Ee(n){switch(n.tag){case 5:return P(n.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return n=fe(n.type,!1),n;case 11:return n=fe(n.type.render,!1),n;case 1:return n=fe(n.type,!0),n;default:return""}}function Re(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case W:return"Fragment";case q:return"Portal";case ne:return"Profiler";case F:return"StrictMode";case Z:return"Suspense";case we:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case Q:return(n.displayName||"Context")+".Consumer";case ce:return(n._context.displayName||"Context")+".Provider";case ye:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Oe:return r=n.displayName||null,r!==null?r:Re(n.type)||"Memo";case xe:r=n._payload,n=n._init;try{return Re(n(r))}catch(s){}}return null}function me(n){var r=n.type;switch(n.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=r.render,n=n.displayName||n.name||"",r.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Re(r);case 8:return r===F?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Pe(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ze(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function pt(n){var r=ze(n)?"checked":"value",s=Object.getOwnPropertyDescriptor(n.constructor.prototype,r),u=""+n[r];if(!n.hasOwnProperty(r)&&typeof s!="undefined"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,p=s.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return f.call(this)},set:function(m){u=""+m,p.call(this,m)}}),Object.defineProperty(n,r,{enumerable:s.enumerable}),{getValue:function(){return u},setValue:function(m){u=""+m},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function nr(n){n._valueTracker||(n._valueTracker=pt(n))}function Fr(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var s=r.getValue(),u="";return n&&(u=ze(n)?n.checked?"true":"false":n.value),n=u,n!==s?(r.setValue(n),!0):!1}function Ks(n){if(n=n||(typeof document!="undefined"?document:void 0),typeof n=="undefined")return null;try{return n.activeElement||n.body}catch(r){return n.body}}function cf(n,r){var s=r.checked;return G({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s!=null?s:n._wrapperState.initialChecked})}function lb(n,r){var s=r.defaultValue==null?"":r.defaultValue,u=r.checked!=null?r.checked:r.defaultChecked;s=Pe(r.value!=null?r.value:s),n._wrapperState={initialChecked:u,initialValue:s,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function cb(n,r){r=r.checked,r!=null&&U(n,"checked",r,!1)}function uf(n,r){cb(n,r);var s=Pe(r.value),u=r.type;if(s!=null)u==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+s):n.value!==""+s&&(n.value=""+s);else if(u==="submit"||u==="reset"){n.removeAttribute("value");return}r.hasOwnProperty("value")?df(n,r.type,s):r.hasOwnProperty("defaultValue")&&df(n,r.type,Pe(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(n.defaultChecked=!!r.defaultChecked)}function ub(n,r,s){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var u=r.type;if(!(u!=="submit"&&u!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+n._wrapperState.initialValue,s||r===n.value||(n.value=r),n.defaultValue=r}s=n.name,s!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,s!==""&&(n.name=s)}function df(n,r,s){(r!=="number"||Ks(n.ownerDocument)!==n)&&(s==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+s&&(n.defaultValue=""+s))}var fi=Array.isArray;function go(n,r,s,u){if(n=n.options,r){r={};for(var f=0;f<s.length;f++)r["$"+s[f]]=!0;for(s=0;s<n.length;s++)f=r.hasOwnProperty("$"+n[s].value),n[s].selected!==f&&(n[s].selected=f),f&&u&&(n[s].defaultSelected=!0)}else{for(s=""+Pe(s),r=null,f=0;f<n.length;f++){if(n[f].value===s){n[f].selected=!0,u&&(n[f].defaultSelected=!0);return}r!==null||n[f].disabled||(r=n[f])}r!==null&&(r.selected=!0)}}function ff(n,r){if(r.dangerouslySetInnerHTML!=null)throw Error(t(91));return G({},r,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function db(n,r){var s=r.value;if(s==null){if(s=r.children,r=r.defaultValue,s!=null){if(r!=null)throw Error(t(92));if(fi(s)){if(1<s.length)throw Error(t(93));s=s[0]}r=s}r==null&&(r=""),s=r}n._wrapperState={initialValue:Pe(s)}}function fb(n,r){var s=Pe(r.value),u=Pe(r.defaultValue);s!=null&&(s=""+s,s!==n.value&&(n.value=s),r.defaultValue==null&&n.defaultValue!==s&&(n.defaultValue=s)),u!=null&&(n.defaultValue=""+u)}function hb(n){var r=n.textContent;r===n._wrapperState.initialValue&&r!==""&&r!==null&&(n.value=r)}function pb(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hf(n,r){return n==null||n==="http://www.w3.org/1999/xhtml"?pb(r):n==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var Vs,gb=(function(n){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(r,s,u,f){MSApp.execUnsafeLocalFunction(function(){return n(r,s,u,f)})}:n})(function(n,r){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=r;else{for(Vs=Vs||document.createElement("div"),Vs.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=Vs.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;r.firstChild;)n.appendChild(r.firstChild)}});function hi(n,r){if(r){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=r;return}}n.textContent=r}var pi={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},zC=["Webkit","ms","Moz","O"];Object.keys(pi).forEach(function(n){zC.forEach(function(r){r=r+n.charAt(0).toUpperCase()+n.substring(1),pi[r]=pi[n]})});function mb(n,r,s){return r==null||typeof r=="boolean"||r===""?"":s||typeof r!="number"||r===0||pi.hasOwnProperty(n)&&pi[n]?(""+r).trim():r+"px"}function vb(n,r){n=n.style;for(var s in r)if(r.hasOwnProperty(s)){var u=s.indexOf("--")===0,f=mb(s,r[s],u);s==="float"&&(s="cssFloat"),u?n.setProperty(s,f):n[s]=f}}var HC=G({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 pf(n,r){if(r){if(HC[n]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(t(137,n));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(t(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(t(61))}if(r.style!=null&&typeof r.style!="object")throw Error(t(62))}}function gf(n,r){if(n.indexOf("-")===-1)return typeof r.is=="string";switch(n){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 mf=null;function vf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var yf=null,mo=null,vo=null;function yb(n){if(n=Pi(n)){if(typeof yf!="function")throw Error(t(280));var r=n.stateNode;r&&(r=ga(r),yf(n.stateNode,n.type,r))}}function bb(n){mo?vo?vo.push(n):vo=[n]:mo=n}function kb(){if(mo){var n=mo,r=vo;if(vo=mo=null,yb(n),r)for(n=0;n<r.length;n++)yb(r[n])}}function wb(n,r){return n(r)}function Tb(){}var bf=!1;function xb(n,r,s){if(bf)return n(r,s);bf=!0;try{return wb(n,r,s)}finally{bf=!1,(mo!==null||vo!==null)&&(Tb(),kb())}}function gi(n,r){var s=n.stateNode;if(s===null)return null;var u=ga(s);if(u===null)return null;s=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(t(231,r,typeof s));return s}var kf=!1;if(d)try{var mi={};Object.defineProperty(mi,"passive",{get:function(){kf=!0}}),window.addEventListener("test",mi,mi),window.removeEventListener("test",mi,mi)}catch(n){kf=!1}function jC(n,r,s,u,f,p,m,k,E){var R=Array.prototype.slice.call(arguments,3);try{r.apply(s,R)}catch(z){this.onError(z)}}var vi=!1,$s=null,Gs=!1,wf=null,qC={onError:function(n){vi=!0,$s=n}};function UC(n,r,s,u,f,p,m,k,E){vi=!1,$s=null,jC.apply(qC,arguments)}function WC(n,r,s,u,f,p,m,k,E){if(UC.apply(this,arguments),vi){if(vi){var R=$s;vi=!1,$s=null}else throw Error(t(198));Gs||(Gs=!0,wf=R)}}function zr(n){var r=n,s=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(s=r.return),n=r.return;while(n)}return r.tag===3?s:null}function Eb(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function Sb(n){if(zr(n)!==n)throw Error(t(188))}function KC(n){var r=n.alternate;if(!r){if(r=zr(n),r===null)throw Error(t(188));return r!==n?null:n}for(var s=n,u=r;;){var f=s.return;if(f===null)break;var p=f.alternate;if(p===null){if(u=f.return,u!==null){s=u;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===s)return Sb(f),n;if(p===u)return Sb(f),r;p=p.sibling}throw Error(t(188))}if(s.return!==u.return)s=f,u=p;else{for(var m=!1,k=f.child;k;){if(k===s){m=!0,s=f,u=p;break}if(k===u){m=!0,u=f,s=p;break}k=k.sibling}if(!m){for(k=p.child;k;){if(k===s){m=!0,s=p,u=f;break}if(k===u){m=!0,u=p,s=f;break}k=k.sibling}if(!m)throw Error(t(189))}}if(s.alternate!==u)throw Error(t(190))}if(s.tag!==3)throw Error(t(188));return s.stateNode.current===s?n:r}function Cb(n){return n=KC(n),n!==null?Bb(n):null}function Bb(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var r=Bb(n);if(r!==null)return r;n=n.sibling}return null}var Ab=e.unstable_scheduleCallback,Ib=e.unstable_cancelCallback,VC=e.unstable_shouldYield,$C=e.unstable_requestPaint,nt=e.unstable_now,GC=e.unstable_getCurrentPriorityLevel,Tf=e.unstable_ImmediatePriority,_b=e.unstable_UserBlockingPriority,Xs=e.unstable_NormalPriority,XC=e.unstable_LowPriority,Rb=e.unstable_IdlePriority,Ys=null,Bn=null;function YC(n){if(Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(Ys,n,void 0,(n.current.flags&128)===128)}catch(r){}}var hn=Math.clz32?Math.clz32:JC,QC=Math.log,ZC=Math.LN2;function JC(n){return n>>>=0,n===0?32:31-(QC(n)/ZC|0)|0}var Qs=64,Zs=4194304;function yi(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Js(n,r){var s=n.pendingLanes;if(s===0)return 0;var u=0,f=n.suspendedLanes,p=n.pingedLanes,m=s&268435455;if(m!==0){var k=m&~f;k!==0?u=yi(k):(p&=m,p!==0&&(u=yi(p)))}else m=s&~f,m!==0?u=yi(m):p!==0&&(u=yi(p));if(u===0)return 0;if(r!==0&&r!==u&&(r&f)===0&&(f=u&-u,p=r&-r,f>=p||f===16&&(p&4194240)!==0))return r;if((u&4)!==0&&(u|=s&16),r=n.entangledLanes,r!==0)for(n=n.entanglements,r&=u;0<r;)s=31-hn(r),f=1<<s,u|=n[s],r&=~f;return u}function eB(n,r){switch(n){case 1:case 2:case 4:return r+250;case 8:case 16:case 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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tB(n,r){for(var s=n.suspendedLanes,u=n.pingedLanes,f=n.expirationTimes,p=n.pendingLanes;0<p;){var m=31-hn(p),k=1<<m,E=f[m];E===-1?((k&s)===0||(k&u)!==0)&&(f[m]=eB(k,r)):E<=r&&(n.expiredLanes|=k),p&=~k}}function xf(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Nb(){var n=Qs;return Qs<<=1,(Qs&4194240)===0&&(Qs=64),n}function Ef(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function bi(n,r,s){n.pendingLanes|=r,r!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,r=31-hn(r),n[r]=s}function nB(n,r){var s=n.pendingLanes&~r;n.pendingLanes=r,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=r,n.mutableReadLanes&=r,n.entangledLanes&=r,r=n.entanglements;var u=n.eventTimes;for(n=n.expirationTimes;0<s;){var f=31-hn(s),p=1<<f;r[f]=0,u[f]=-1,n[f]=-1,s&=~p}}function Sf(n,r){var s=n.entangledLanes|=r;for(n=n.entanglements;s;){var u=31-hn(s),f=1<<u;f&r|n[u]&r&&(n[u]|=r),s&=~f}}var He=0;function Ob(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var Lb,Cf,Db,Pb,Mb,Bf=!1,ea=[],rr=null,or=null,ir=null,ki=new Map,wi=new Map,sr=[],rB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Fb(n,r){switch(n){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":ki.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":wi.delete(r.pointerId)}}function Ti(n,r,s,u,f,p){return n===null||n.nativeEvent!==p?(n={blockedOn:r,domEventName:s,eventSystemFlags:u,nativeEvent:p,targetContainers:[f]},r!==null&&(r=Pi(r),r!==null&&Cf(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),n)}function oB(n,r,s,u,f){switch(r){case"focusin":return rr=Ti(rr,n,r,s,u,f),!0;case"dragenter":return or=Ti(or,n,r,s,u,f),!0;case"mouseover":return ir=Ti(ir,n,r,s,u,f),!0;case"pointerover":var p=f.pointerId;return ki.set(p,Ti(ki.get(p)||null,n,r,s,u,f)),!0;case"gotpointercapture":return p=f.pointerId,wi.set(p,Ti(wi.get(p)||null,n,r,s,u,f)),!0}return!1}function zb(n){var r=Hr(n.target);if(r!==null){var s=zr(r);if(s!==null){if(r=s.tag,r===13){if(r=Eb(s),r!==null){n.blockedOn=r,Mb(n.priority,function(){Db(s)});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ta(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var s=If(n.domEventName,n.eventSystemFlags,r[0],n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);mf=u,s.target.dispatchEvent(u),mf=null}else return r=Pi(s),r!==null&&Cf(r),n.blockedOn=s,!1;r.shift()}return!0}function Hb(n,r,s){ta(n)&&s.delete(r)}function iB(){Bf=!1,rr!==null&&ta(rr)&&(rr=null),or!==null&&ta(or)&&(or=null),ir!==null&&ta(ir)&&(ir=null),ki.forEach(Hb),wi.forEach(Hb)}function xi(n,r){n.blockedOn===r&&(n.blockedOn=null,Bf||(Bf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,iB)))}function Ei(n){function r(f){return xi(f,n)}if(0<ea.length){xi(ea[0],n);for(var s=1;s<ea.length;s++){var u=ea[s];u.blockedOn===n&&(u.blockedOn=null)}}for(rr!==null&&xi(rr,n),or!==null&&xi(or,n),ir!==null&&xi(ir,n),ki.forEach(r),wi.forEach(r),s=0;s<sr.length;s++)u=sr[s],u.blockedOn===n&&(u.blockedOn=null);for(;0<sr.length&&(s=sr[0],s.blockedOn===null);)zb(s),s.blockedOn===null&&sr.shift()}var yo=H.ReactCurrentBatchConfig,na=!0;function sB(n,r,s,u){var f=He,p=yo.transition;yo.transition=null;try{He=1,Af(n,r,s,u)}finally{He=f,yo.transition=p}}function aB(n,r,s,u){var f=He,p=yo.transition;yo.transition=null;try{He=4,Af(n,r,s,u)}finally{He=f,yo.transition=p}}function Af(n,r,s,u){if(na){var f=If(n,r,s,u);if(f===null)Vf(n,r,u,ra,s),Fb(n,u);else if(oB(f,n,r,s,u))u.stopPropagation();else if(Fb(n,u),r&4&&-1<rB.indexOf(n)){for(;f!==null;){var p=Pi(f);if(p!==null&&Lb(p),p=If(n,r,s,u),p===null&&Vf(n,r,u,ra,s),p===f)break;f=p}f!==null&&u.stopPropagation()}else Vf(n,r,u,null,s)}}var ra=null;function If(n,r,s,u){if(ra=null,n=vf(u),n=Hr(n),n!==null)if(r=zr(n),r===null)n=null;else if(s=r.tag,s===13){if(n=Eb(r),n!==null)return n;n=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null);return ra=n,null}function jb(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(GC()){case Tf:return 1;case _b:return 4;case Xs:case XC:return 16;case Rb:return 536870912;default:return 16}default:return 16}}var ar=null,_f=null,oa=null;function qb(){if(oa)return oa;var n,r=_f,s=r.length,u,f="value"in ar?ar.value:ar.textContent,p=f.length;for(n=0;n<s&&r[n]===f[n];n++);var m=s-n;for(u=1;u<=m&&r[s-u]===f[p-u];u++);return oa=f.slice(n,1<u?1-u:void 0)}function ia(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function sa(){return!0}function Ub(){return!1}function Kt(n){function r(s,u,f,p,m){this._reactName=s,this._targetInst=f,this.type=u,this.nativeEvent=p,this.target=m,this.currentTarget=null;for(var k in n)n.hasOwnProperty(k)&&(s=n[k],this[k]=s?s(p):p[k]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?sa:Ub,this.isPropagationStopped=Ub,this}return G(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=sa)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=sa)},persist:function(){},isPersistent:sa}),r}var bo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rf=Kt(bo),Si=G({},bo,{view:0,detail:0}),lB=Kt(Si),Nf,Of,Ci,aa=G({},Si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Df,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Ci&&(Ci&&n.type==="mousemove"?(Nf=n.screenX-Ci.screenX,Of=n.screenY-Ci.screenY):Of=Nf=0,Ci=n),Nf)},movementY:function(n){return"movementY"in n?n.movementY:Of}}),Wb=Kt(aa),cB=G({},aa,{dataTransfer:0}),uB=Kt(cB),dB=G({},Si,{relatedTarget:0}),Lf=Kt(dB),fB=G({},bo,{animationName:0,elapsedTime:0,pseudoElement:0}),hB=Kt(fB),pB=G({},bo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),gB=Kt(pB),mB=G({},bo,{data:0}),Kb=Kt(mB),vB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kB(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=bB[n])?!!r[n]:!1}function Df(){return kB}var wB=G({},Si,{key:function(n){if(n.key){var r=vB[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=ia(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?yB[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Df,charCode:function(n){return n.type==="keypress"?ia(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ia(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),TB=Kt(wB),xB=G({},aa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vb=Kt(xB),EB=G({},Si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Df}),SB=Kt(EB),CB=G({},bo,{propertyName:0,elapsedTime:0,pseudoElement:0}),BB=Kt(CB),AB=G({},aa,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),IB=Kt(AB),_B=[9,13,27,32],Pf=d&&"CompositionEvent"in window,Bi=null;d&&"documentMode"in document&&(Bi=document.documentMode);var RB=d&&"TextEvent"in window&&!Bi,$b=d&&(!Pf||Bi&&8<Bi&&11>=Bi),Gb=" ",Xb=!1;function Yb(n,r){switch(n){case"keyup":return _B.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qb(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ko=!1;function NB(n,r){switch(n){case"compositionend":return Qb(r);case"keypress":return r.which!==32?null:(Xb=!0,Gb);case"textInput":return n=r.data,n===Gb&&Xb?null:n;default:return null}}function OB(n,r){if(ko)return n==="compositionend"||!Pf&&Yb(n,r)?(n=qb(),oa=_f=ar=null,ko=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return $b&&r.locale!=="ko"?null:r.data;default:return null}}var LB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zb(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!LB[n.type]:r==="textarea"}function Jb(n,r,s,u){bb(u),r=fa(r,"onChange"),0<r.length&&(s=new Rf("onChange","change",null,s,u),n.push({event:s,listeners:r}))}var Ai=null,Ii=null;function DB(n){vk(n,0)}function la(n){var r=So(n);if(Fr(r))return n}function PB(n,r){if(n==="change")return r}var ek=!1;if(d){var Mf;if(d){var Ff="oninput"in document;if(!Ff){var tk=document.createElement("div");tk.setAttribute("oninput","return;"),Ff=typeof tk.oninput=="function"}Mf=Ff}else Mf=!1;ek=Mf&&(!document.documentMode||9<document.documentMode)}function nk(){Ai&&(Ai.detachEvent("onpropertychange",rk),Ii=Ai=null)}function rk(n){if(n.propertyName==="value"&&la(Ii)){var r=[];Jb(r,Ii,n,vf(n)),xb(DB,r)}}function MB(n,r,s){n==="focusin"?(nk(),Ai=r,Ii=s,Ai.attachEvent("onpropertychange",rk)):n==="focusout"&&nk()}function FB(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return la(Ii)}function zB(n,r){if(n==="click")return la(r)}function HB(n,r){if(n==="input"||n==="change")return la(r)}function jB(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var pn=typeof Object.is=="function"?Object.is:jB;function _i(n,r){if(pn(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var s=Object.keys(n),u=Object.keys(r);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var f=s[u];if(!h.call(r,f)||!pn(n[f],r[f]))return!1}return!0}function ok(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ik(n,r){var s=ok(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=r&&u>=r)return{node:s,offset:r-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ok(s)}}function sk(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?sk(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function ak(){for(var n=window,r=Ks();r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch(u){s=!1}if(s)n=r.contentWindow;else break;r=Ks(n.document)}return r}function zf(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}function qB(n){var r=ak(),s=n.focusedElem,u=n.selectionRange;if(r!==s&&s&&s.ownerDocument&&sk(s.ownerDocument.documentElement,s)){if(u!==null&&zf(s)){if(r=u.start,n=u.end,n===void 0&&(n=r),"selectionStart"in s)s.selectionStart=r,s.selectionEnd=Math.min(n,s.value.length);else if(n=(r=s.ownerDocument||document)&&r.defaultView||window,n.getSelection){n=n.getSelection();var f=s.textContent.length,p=Math.min(u.start,f);u=u.end===void 0?p:Math.min(u.end,f),!n.extend&&p>u&&(f=u,u=p,p=f),f=ik(s,p);var m=ik(s,u);f&&m&&(n.rangeCount!==1||n.anchorNode!==f.node||n.anchorOffset!==f.offset||n.focusNode!==m.node||n.focusOffset!==m.offset)&&(r=r.createRange(),r.setStart(f.node,f.offset),n.removeAllRanges(),p>u?(n.addRange(r),n.extend(m.node,m.offset)):(r.setEnd(m.node,m.offset),n.addRange(r)))}}for(r=[],n=s;n=n.parentNode;)n.nodeType===1&&r.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<r.length;s++)n=r[s],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var UB=d&&"documentMode"in document&&11>=document.documentMode,wo=null,Hf=null,Ri=null,jf=!1;function lk(n,r,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;jf||wo==null||wo!==Ks(u)||(u=wo,"selectionStart"in u&&zf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ri&&_i(Ri,u)||(Ri=u,u=fa(Hf,"onSelect"),0<u.length&&(r=new Rf("onSelect","select",null,r,s),n.push({event:r,listeners:u}),r.target=wo)))}function ca(n,r){var s={};return s[n.toLowerCase()]=r.toLowerCase(),s["Webkit"+n]="webkit"+r,s["Moz"+n]="moz"+r,s}var To={animationend:ca("Animation","AnimationEnd"),animationiteration:ca("Animation","AnimationIteration"),animationstart:ca("Animation","AnimationStart"),transitionend:ca("Transition","TransitionEnd")},qf={},ck={};d&&(ck=document.createElement("div").style,"AnimationEvent"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),"TransitionEvent"in window||delete To.transitionend.transition);function ua(n){if(qf[n])return qf[n];if(!To[n])return n;var r=To[n],s;for(s in r)if(r.hasOwnProperty(s)&&s in ck)return qf[n]=r[s];return n}var uk=ua("animationend"),dk=ua("animationiteration"),fk=ua("animationstart"),hk=ua("transitionend"),pk=new Map,gk="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function lr(n,r){pk.set(n,r),l(r,[n])}for(var Uf=0;Uf<gk.length;Uf++){var Wf=gk[Uf],WB=Wf.toLowerCase(),KB=Wf[0].toUpperCase()+Wf.slice(1);lr(WB,"on"+KB)}lr(uk,"onAnimationEnd"),lr(dk,"onAnimationIteration"),lr(fk,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(hk,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ni="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),VB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ni));function mk(n,r,s){var u=n.type||"unknown-event";n.currentTarget=s,WC(u,r,void 0,n),n.currentTarget=null}function vk(n,r){r=(r&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],f=u.event;u=u.listeners;e:{var p=void 0;if(r)for(var m=u.length-1;0<=m;m--){var k=u[m],E=k.instance,R=k.currentTarget;if(k=k.listener,E!==p&&f.isPropagationStopped())break e;mk(f,k,R),p=E}else for(m=0;m<u.length;m++){if(k=u[m],E=k.instance,R=k.currentTarget,k=k.listener,E!==p&&f.isPropagationStopped())break e;mk(f,k,R),p=E}}}if(Gs)throw n=wf,Gs=!1,wf=null,n}function Ke(n,r){var s=r[Zf];s===void 0&&(s=r[Zf]=new Set);var u=n+"__bubble";s.has(u)||(yk(r,n,2,!1),s.add(u))}function Kf(n,r,s){var u=0;r&&(u|=4),yk(s,n,u,r)}var da="_reactListening"+Math.random().toString(36).slice(2);function Oi(n){if(!n[da]){n[da]=!0,o.forEach(function(s){s!=="selectionchange"&&(VB.has(s)||Kf(s,!1,n),Kf(s,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[da]||(r[da]=!0,Kf("selectionchange",!1,r))}}function yk(n,r,s,u){switch(jb(r)){case 1:var f=sB;break;case 4:f=aB;break;default:f=Af}s=f.bind(null,r,s,n),f=void 0,!kf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),u?f!==void 0?n.addEventListener(r,s,{capture:!0,passive:f}):n.addEventListener(r,s,!0):f!==void 0?n.addEventListener(r,s,{passive:f}):n.addEventListener(r,s,!1)}function Vf(n,r,s,u,f){var p=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var m=u.tag;if(m===3||m===4){var k=u.stateNode.containerInfo;if(k===f||k.nodeType===8&&k.parentNode===f)break;if(m===4)for(m=u.return;m!==null;){var E=m.tag;if((E===3||E===4)&&(E=m.stateNode.containerInfo,E===f||E.nodeType===8&&E.parentNode===f))return;m=m.return}for(;k!==null;){if(m=Hr(k),m===null)return;if(E=m.tag,E===5||E===6){u=p=m;continue e}k=k.parentNode}}u=u.return}xb(function(){var R=p,z=vf(s),j=[];e:{var M=pk.get(n);if(M!==void 0){var $=Rf,te=n;switch(n){case"keypress":if(ia(s)===0)break e;case"keydown":case"keyup":$=TB;break;case"focusin":te="focus",$=Lf;break;case"focusout":te="blur",$=Lf;break;case"beforeblur":case"afterblur":$=Lf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=Wb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=uB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=SB;break;case uk:case dk:case fk:$=hB;break;case hk:$=BB;break;case"scroll":$=lB;break;case"wheel":$=IB;break;case"copy":case"cut":case"paste":$=gB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Vb}var re=(r&4)!==0,rt=!re&&n==="scroll",I=re?M!==null?M+"Capture":null:M;re=[];for(var C=R,_;C!==null;){_=C;var K=_.stateNode;if(_.tag===5&&K!==null&&(_=K,I!==null&&(K=gi(C,I),K!=null&&re.push(Li(C,K,_)))),rt)break;C=C.return}0<re.length&&(M=new $(M,te,null,s,z),j.push({event:M,listeners:re}))}}if((r&7)===0){e:{if(M=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",M&&s!==mf&&(te=s.relatedTarget||s.fromElement)&&(Hr(te)||te[Hn]))break e;if(($||M)&&(M=z.window===z?z:(M=z.ownerDocument)?M.defaultView||M.parentWindow:window,$?(te=s.relatedTarget||s.toElement,$=R,te=te?Hr(te):null,te!==null&&(rt=zr(te),te!==rt||te.tag!==5&&te.tag!==6)&&(te=null)):($=null,te=R),$!==te)){if(re=Wb,K="onMouseLeave",I="onMouseEnter",C="mouse",(n==="pointerout"||n==="pointerover")&&(re=Vb,K="onPointerLeave",I="onPointerEnter",C="pointer"),rt=$==null?M:So($),_=te==null?M:So(te),M=new re(K,C+"leave",$,s,z),M.target=rt,M.relatedTarget=_,K=null,Hr(z)===R&&(re=new re(I,C+"enter",te,s,z),re.target=_,re.relatedTarget=rt,K=re),rt=K,$&&te)t:{for(re=$,I=te,C=0,_=re;_;_=xo(_))C++;for(_=0,K=I;K;K=xo(K))_++;for(;0<C-_;)re=xo(re),C--;for(;0<_-C;)I=xo(I),_--;for(;C--;){if(re===I||I!==null&&re===I.alternate)break t;re=xo(re),I=xo(I)}re=null}else re=null;$!==null&&bk(j,M,$,re,!1),te!==null&&rt!==null&&bk(j,rt,te,re,!0)}}e:{if(M=R?So(R):window,$=M.nodeName&&M.nodeName.toLowerCase(),$==="select"||$==="input"&&M.type==="file")var oe=PB;else if(Zb(M))if(ek)oe=HB;else{oe=FB;var ue=MB}else($=M.nodeName)&&$.toLowerCase()==="input"&&(M.type==="checkbox"||M.type==="radio")&&(oe=zB);if(oe&&(oe=oe(n,R))){Jb(j,oe,s,z);break e}ue&&ue(n,M,R),n==="focusout"&&(ue=M._wrapperState)&&ue.controlled&&M.type==="number"&&df(M,"number",M.value)}switch(ue=R?So(R):window,n){case"focusin":(Zb(ue)||ue.contentEditable==="true")&&(wo=ue,Hf=R,Ri=null);break;case"focusout":Ri=Hf=wo=null;break;case"mousedown":jf=!0;break;case"contextmenu":case"mouseup":case"dragend":jf=!1,lk(j,s,z);break;case"selectionchange":if(UB)break;case"keydown":case"keyup":lk(j,s,z)}var de;if(Pf)e:{switch(n){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else ko?Yb(n,s)&&(ge="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(ge="onCompositionStart");ge&&($b&&s.locale!=="ko"&&(ko||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&ko&&(de=qb()):(ar=z,_f="value"in ar?ar.value:ar.textContent,ko=!0)),ue=fa(R,ge),0<ue.length&&(ge=new Kb(ge,n,null,s,z),j.push({event:ge,listeners:ue}),de?ge.data=de:(de=Qb(s),de!==null&&(ge.data=de)))),(de=RB?NB(n,s):OB(n,s))&&(R=fa(R,"onBeforeInput"),0<R.length&&(z=new Kb("onBeforeInput","beforeinput",null,s,z),j.push({event:z,listeners:R}),z.data=de))}vk(j,r)})}function Li(n,r,s){return{instance:n,listener:r,currentTarget:s}}function fa(n,r){for(var s=r+"Capture",u=[];n!==null;){var f=n,p=f.stateNode;f.tag===5&&p!==null&&(f=p,p=gi(n,s),p!=null&&u.unshift(Li(n,p,f)),p=gi(n,r),p!=null&&u.push(Li(n,p,f))),n=n.return}return u}function xo(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function bk(n,r,s,u,f){for(var p=r._reactName,m=[];s!==null&&s!==u;){var k=s,E=k.alternate,R=k.stateNode;if(E!==null&&E===u)break;k.tag===5&&R!==null&&(k=R,f?(E=gi(s,p),E!=null&&m.unshift(Li(s,E,k))):f||(E=gi(s,p),E!=null&&m.push(Li(s,E,k)))),s=s.return}m.length!==0&&n.push({event:r,listeners:m})}var $B=/\r\n?/g,GB=/\u0000|\uFFFD/g;function kk(n){return(typeof n=="string"?n:""+n).replace($B,`
15
- `).replace(GB,"")}function ha(n,r,s){if(r=kk(r),kk(n)!==r&&s)throw Error(t(425))}function pa(){}var $f=null,Gf=null;function Xf(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Yf=typeof setTimeout=="function"?setTimeout:void 0,XB=typeof clearTimeout=="function"?clearTimeout:void 0,wk=typeof Promise=="function"?Promise:void 0,YB=typeof queueMicrotask=="function"?queueMicrotask:typeof wk!="undefined"?function(n){return wk.resolve(null).then(n).catch(QB)}:Yf;function QB(n){setTimeout(function(){throw n})}function Qf(n,r){var s=r,u=0;do{var f=s.nextSibling;if(n.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"){if(u===0){n.removeChild(f),Ei(r);return}u--}else s!=="$"&&s!=="$?"&&s!=="$!"||u++;s=f}while(s);Ei(r)}function cr(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return n}function Tk(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"){if(r===0)return n;r--}else s==="/$"&&r++}n=n.previousSibling}return null}var Eo=Math.random().toString(36).slice(2),An="__reactFiber$"+Eo,Di="__reactProps$"+Eo,Hn="__reactContainer$"+Eo,Zf="__reactEvents$"+Eo,ZB="__reactListeners$"+Eo,JB="__reactHandles$"+Eo;function Hr(n){var r=n[An];if(r)return r;for(var s=n.parentNode;s;){if(r=s[Hn]||s[An]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(n=Tk(n);n!==null;){if(s=n[An])return s;n=Tk(n)}return r}n=s,s=n.parentNode}return null}function Pi(n){return n=n[An]||n[Hn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function So(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(t(33))}function ga(n){return n[Di]||null}var Jf=[],Co=-1;function ur(n){return{current:n}}function Ve(n){0>Co||(n.current=Jf[Co],Jf[Co]=null,Co--)}function We(n,r){Co++,Jf[Co]=n.current,n.current=r}var dr={},Ct=ur(dr),Mt=ur(!1),jr=dr;function Bo(n,r){var s=n.type.contextTypes;if(!s)return dr;var u=n.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===r)return u.__reactInternalMemoizedMaskedChildContext;var f={},p;for(p in s)f[p]=r[p];return u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=r,n.__reactInternalMemoizedMaskedChildContext=f),f}function Ft(n){return n=n.childContextTypes,n!=null}function ma(){Ve(Mt),Ve(Ct)}function xk(n,r,s){if(Ct.current!==dr)throw Error(t(168));We(Ct,r),We(Mt,s)}function Ek(n,r,s){var u=n.stateNode;if(r=r.childContextTypes,typeof u.getChildContext!="function")return s;u=u.getChildContext();for(var f in u)if(!(f in r))throw Error(t(108,me(n)||"Unknown",f));return G({},s,u)}function va(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||dr,jr=Ct.current,We(Ct,n),We(Mt,Mt.current),!0}function Sk(n,r,s){var u=n.stateNode;if(!u)throw Error(t(169));s?(n=Ek(n,r,jr),u.__reactInternalMemoizedMergedChildContext=n,Ve(Mt),Ve(Ct),We(Ct,n)):Ve(Mt),We(Mt,s)}var jn=null,ya=!1,eh=!1;function Ck(n){jn===null?jn=[n]:jn.push(n)}function eA(n){ya=!0,Ck(n)}function fr(){if(!eh&&jn!==null){eh=!0;var n=0,r=He;try{var s=jn;for(He=1;n<s.length;n++){var u=s[n];do u=u(!0);while(u!==null)}jn=null,ya=!1}catch(f){throw jn!==null&&(jn=jn.slice(n+1)),Ab(Tf,fr),f}finally{He=r,eh=!1}}return null}var Ao=[],Io=0,ba=null,ka=0,nn=[],rn=0,qr=null,qn=1,Un="";function Ur(n,r){Ao[Io++]=ka,Ao[Io++]=ba,ba=n,ka=r}function Bk(n,r,s){nn[rn++]=qn,nn[rn++]=Un,nn[rn++]=qr,qr=n;var u=qn;n=Un;var f=32-hn(u)-1;u&=~(1<<f),s+=1;var p=32-hn(r)+f;if(30<p){var m=f-f%5;p=(u&(1<<m)-1).toString(32),u>>=m,f-=m,qn=1<<32-hn(r)+f|s<<f|u,Un=p+n}else qn=1<<p|s<<f|u,Un=n}function th(n){n.return!==null&&(Ur(n,1),Bk(n,1,0))}function nh(n){for(;n===ba;)ba=Ao[--Io],Ao[Io]=null,ka=Ao[--Io],Ao[Io]=null;for(;n===qr;)qr=nn[--rn],nn[rn]=null,Un=nn[--rn],nn[rn]=null,qn=nn[--rn],nn[rn]=null}var Vt=null,$t=null,Xe=!1,gn=null;function Ak(n,r){var s=ln(5,null,null,0);s.elementType="DELETED",s.stateNode=r,s.return=n,r=n.deletions,r===null?(n.deletions=[s],n.flags|=16):r.push(s)}function Ik(n,r){switch(n.tag){case 5:var s=n.type;return r=r.nodeType!==1||s.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(n.stateNode=r,Vt=n,$t=cr(r.firstChild),!0):!1;case 6:return r=n.pendingProps===""||r.nodeType!==3?null:r,r!==null?(n.stateNode=r,Vt=n,$t=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(s=qr!==null?{id:qn,overflow:Un}:null,n.memoizedState={dehydrated:r,treeContext:s,retryLane:1073741824},s=ln(18,null,null,0),s.stateNode=r,s.return=n,n.child=s,Vt=n,$t=null,!0):!1;default:return!1}}function rh(n){return(n.mode&1)!==0&&(n.flags&128)===0}function oh(n){if(Xe){var r=$t;if(r){var s=r;if(!Ik(n,r)){if(rh(n))throw Error(t(418));r=cr(s.nextSibling);var u=Vt;r&&Ik(n,r)?Ak(u,s):(n.flags=n.flags&-4097|2,Xe=!1,Vt=n)}}else{if(rh(n))throw Error(t(418));n.flags=n.flags&-4097|2,Xe=!1,Vt=n}}}function _k(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Vt=n}function wa(n){if(n!==Vt)return!1;if(!Xe)return _k(n),Xe=!0,!1;var r;if((r=n.tag!==3)&&!(r=n.tag!==5)&&(r=n.type,r=r!=="head"&&r!=="body"&&!Xf(n.type,n.memoizedProps)),r&&(r=$t)){if(rh(n))throw Rk(),Error(t(418));for(;r;)Ak(n,r),r=cr(r.nextSibling)}if(_k(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(t(317));e:{for(n=n.nextSibling,r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"){if(r===0){$t=cr(n.nextSibling);break e}r--}else s!=="$"&&s!=="$!"&&s!=="$?"||r++}n=n.nextSibling}$t=null}}else $t=Vt?cr(n.stateNode.nextSibling):null;return!0}function Rk(){for(var n=$t;n;)n=cr(n.nextSibling)}function _o(){$t=Vt=null,Xe=!1}function ih(n){gn===null?gn=[n]:gn.push(n)}var tA=H.ReactCurrentBatchConfig;function Mi(n,r,s){if(n=s.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(t(309));var u=s.stateNode}if(!u)throw Error(t(147,n));var f=u,p=""+n;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===p?r.ref:(r=function(m){var k=f.refs;m===null?delete k[p]:k[p]=m},r._stringRef=p,r)}if(typeof n!="string")throw Error(t(284));if(!s._owner)throw Error(t(290,n))}return n}function Ta(n,r){throw n=Object.prototype.toString.call(r),Error(t(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n))}function Nk(n){var r=n._init;return r(n._payload)}function Ok(n){function r(I,C){if(n){var _=I.deletions;_===null?(I.deletions=[C],I.flags|=16):_.push(C)}}function s(I,C){if(!n)return null;for(;C!==null;)r(I,C),C=C.sibling;return null}function u(I,C){for(I=new Map;C!==null;)C.key!==null?I.set(C.key,C):I.set(C.index,C),C=C.sibling;return I}function f(I,C){return I=kr(I,C),I.index=0,I.sibling=null,I}function p(I,C,_){return I.index=_,n?(_=I.alternate,_!==null?(_=_.index,_<C?(I.flags|=2,C):_):(I.flags|=2,C)):(I.flags|=1048576,C)}function m(I){return n&&I.alternate===null&&(I.flags|=2),I}function k(I,C,_,K){return C===null||C.tag!==6?(C=Yh(_,I.mode,K),C.return=I,C):(C=f(C,_),C.return=I,C)}function E(I,C,_,K){var oe=_.type;return oe===W?z(I,C,_.props.children,K,_.key):C!==null&&(C.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===xe&&Nk(oe)===C.type)?(K=f(C,_.props),K.ref=Mi(I,C,_),K.return=I,K):(K=Va(_.type,_.key,_.props,null,I.mode,K),K.ref=Mi(I,C,_),K.return=I,K)}function R(I,C,_,K){return C===null||C.tag!==4||C.stateNode.containerInfo!==_.containerInfo||C.stateNode.implementation!==_.implementation?(C=Qh(_,I.mode,K),C.return=I,C):(C=f(C,_.children||[]),C.return=I,C)}function z(I,C,_,K,oe){return C===null||C.tag!==7?(C=Qr(_,I.mode,K,oe),C.return=I,C):(C=f(C,_),C.return=I,C)}function j(I,C,_){if(typeof C=="string"&&C!==""||typeof C=="number")return C=Yh(""+C,I.mode,_),C.return=I,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case X:return _=Va(C.type,C.key,C.props,null,I.mode,_),_.ref=Mi(I,null,C),_.return=I,_;case q:return C=Qh(C,I.mode,_),C.return=I,C;case xe:var K=C._init;return j(I,K(C._payload),_)}if(fi(C)||le(C))return C=Qr(C,I.mode,_,null),C.return=I,C;Ta(I,C)}return null}function M(I,C,_,K){var oe=C!==null?C.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return oe!==null?null:k(I,C,""+_,K);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case X:return _.key===oe?E(I,C,_,K):null;case q:return _.key===oe?R(I,C,_,K):null;case xe:return oe=_._init,M(I,C,oe(_._payload),K)}if(fi(_)||le(_))return oe!==null?null:z(I,C,_,K,null);Ta(I,_)}return null}function $(I,C,_,K,oe){if(typeof K=="string"&&K!==""||typeof K=="number")return I=I.get(_)||null,k(C,I,""+K,oe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case X:return I=I.get(K.key===null?_:K.key)||null,E(C,I,K,oe);case q:return I=I.get(K.key===null?_:K.key)||null,R(C,I,K,oe);case xe:var ue=K._init;return $(I,C,_,ue(K._payload),oe)}if(fi(K)||le(K))return I=I.get(_)||null,z(C,I,K,oe,null);Ta(C,K)}return null}function te(I,C,_,K){for(var oe=null,ue=null,de=C,ge=C=0,vt=null;de!==null&&ge<_.length;ge++){de.index>ge?(vt=de,de=null):vt=de.sibling;var Me=M(I,de,_[ge],K);if(Me===null){de===null&&(de=vt);break}n&&de&&Me.alternate===null&&r(I,de),C=p(Me,C,ge),ue===null?oe=Me:ue.sibling=Me,ue=Me,de=vt}if(ge===_.length)return s(I,de),Xe&&Ur(I,ge),oe;if(de===null){for(;ge<_.length;ge++)de=j(I,_[ge],K),de!==null&&(C=p(de,C,ge),ue===null?oe=de:ue.sibling=de,ue=de);return Xe&&Ur(I,ge),oe}for(de=u(I,de);ge<_.length;ge++)vt=$(de,I,ge,_[ge],K),vt!==null&&(n&&vt.alternate!==null&&de.delete(vt.key===null?ge:vt.key),C=p(vt,C,ge),ue===null?oe=vt:ue.sibling=vt,ue=vt);return n&&de.forEach(function(wr){return r(I,wr)}),Xe&&Ur(I,ge),oe}function re(I,C,_,K){var oe=le(_);if(typeof oe!="function")throw Error(t(150));if(_=oe.call(_),_==null)throw Error(t(151));for(var ue=oe=null,de=C,ge=C=0,vt=null,Me=_.next();de!==null&&!Me.done;ge++,Me=_.next()){de.index>ge?(vt=de,de=null):vt=de.sibling;var wr=M(I,de,Me.value,K);if(wr===null){de===null&&(de=vt);break}n&&de&&wr.alternate===null&&r(I,de),C=p(wr,C,ge),ue===null?oe=wr:ue.sibling=wr,ue=wr,de=vt}if(Me.done)return s(I,de),Xe&&Ur(I,ge),oe;if(de===null){for(;!Me.done;ge++,Me=_.next())Me=j(I,Me.value,K),Me!==null&&(C=p(Me,C,ge),ue===null?oe=Me:ue.sibling=Me,ue=Me);return Xe&&Ur(I,ge),oe}for(de=u(I,de);!Me.done;ge++,Me=_.next())Me=$(de,I,ge,Me.value,K),Me!==null&&(n&&Me.alternate!==null&&de.delete(Me.key===null?ge:Me.key),C=p(Me,C,ge),ue===null?oe=Me:ue.sibling=Me,ue=Me);return n&&de.forEach(function(LA){return r(I,LA)}),Xe&&Ur(I,ge),oe}function rt(I,C,_,K){if(typeof _=="object"&&_!==null&&_.type===W&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case X:e:{for(var oe=_.key,ue=C;ue!==null;){if(ue.key===oe){if(oe=_.type,oe===W){if(ue.tag===7){s(I,ue.sibling),C=f(ue,_.props.children),C.return=I,I=C;break e}}else if(ue.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===xe&&Nk(oe)===ue.type){s(I,ue.sibling),C=f(ue,_.props),C.ref=Mi(I,ue,_),C.return=I,I=C;break e}s(I,ue);break}else r(I,ue);ue=ue.sibling}_.type===W?(C=Qr(_.props.children,I.mode,K,_.key),C.return=I,I=C):(K=Va(_.type,_.key,_.props,null,I.mode,K),K.ref=Mi(I,C,_),K.return=I,I=K)}return m(I);case q:e:{for(ue=_.key;C!==null;){if(C.key===ue)if(C.tag===4&&C.stateNode.containerInfo===_.containerInfo&&C.stateNode.implementation===_.implementation){s(I,C.sibling),C=f(C,_.children||[]),C.return=I,I=C;break e}else{s(I,C);break}else r(I,C);C=C.sibling}C=Qh(_,I.mode,K),C.return=I,I=C}return m(I);case xe:return ue=_._init,rt(I,C,ue(_._payload),K)}if(fi(_))return te(I,C,_,K);if(le(_))return re(I,C,_,K);Ta(I,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,C!==null&&C.tag===6?(s(I,C.sibling),C=f(C,_),C.return=I,I=C):(s(I,C),C=Yh(_,I.mode,K),C.return=I,I=C),m(I)):s(I,C)}return rt}var Ro=Ok(!0),Lk=Ok(!1),xa=ur(null),Ea=null,No=null,sh=null;function ah(){sh=No=Ea=null}function lh(n){var r=xa.current;Ve(xa),n._currentValue=r}function ch(n,r,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===s)break;n=n.return}}function Oo(n,r){Ea=n,sh=No=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&r)!==0&&(zt=!0),n.firstContext=null)}function on(n){var r=n._currentValue;if(sh!==n)if(n={context:n,memoizedValue:r,next:null},No===null){if(Ea===null)throw Error(t(308));No=n,Ea.dependencies={lanes:0,firstContext:n}}else No=No.next=n;return r}var Wr=null;function uh(n){Wr===null?Wr=[n]:Wr.push(n)}function Dk(n,r,s,u){var f=r.interleaved;return f===null?(s.next=s,uh(r)):(s.next=f.next,f.next=s),r.interleaved=s,Wn(n,u)}function Wn(n,r){n.lanes|=r;var s=n.alternate;for(s!==null&&(s.lanes|=r),s=n,n=n.return;n!==null;)n.childLanes|=r,s=n.alternate,s!==null&&(s.childLanes|=r),s=n,n=n.return;return s.tag===3?s.stateNode:null}var hr=!1;function dh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pk(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Kn(n,r){return{eventTime:n,lane:r,tag:0,payload:null,callback:null,next:null}}function pr(n,r,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Le&2)!==0){var f=u.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),u.pending=r,Wn(n,s)}return f=u.interleaved,f===null?(r.next=r,uh(u)):(r.next=f.next,f.next=r),u.interleaved=r,Wn(n,s)}function Sa(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194240)!==0)){var u=r.lanes;u&=n.pendingLanes,s|=u,r.lanes=s,Sf(n,s)}}function Mk(n,r){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var f=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var m={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};p===null?f=p=m:p=p.next=m,s=s.next}while(s!==null);p===null?f=p=r:p=p.next=r}else f=p=r;s={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:u.shared,effects:u.effects},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}function Ca(n,r,s,u){var f=n.updateQueue;hr=!1;var p=f.firstBaseUpdate,m=f.lastBaseUpdate,k=f.shared.pending;if(k!==null){f.shared.pending=null;var E=k,R=E.next;E.next=null,m===null?p=R:m.next=R,m=E;var z=n.alternate;z!==null&&(z=z.updateQueue,k=z.lastBaseUpdate,k!==m&&(k===null?z.firstBaseUpdate=R:k.next=R,z.lastBaseUpdate=E))}if(p!==null){var j=f.baseState;m=0,z=R=E=null,k=p;do{var M=k.lane,$=k.eventTime;if((u&M)===M){z!==null&&(z=z.next={eventTime:$,lane:0,tag:k.tag,payload:k.payload,callback:k.callback,next:null});e:{var te=n,re=k;switch(M=r,$=s,re.tag){case 1:if(te=re.payload,typeof te=="function"){j=te.call($,j,M);break e}j=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=re.payload,M=typeof te=="function"?te.call($,j,M):te,M==null)break e;j=G({},j,M);break e;case 2:hr=!0}}k.callback!==null&&k.lane!==0&&(n.flags|=64,M=f.effects,M===null?f.effects=[k]:M.push(k))}else $={eventTime:$,lane:M,tag:k.tag,payload:k.payload,callback:k.callback,next:null},z===null?(R=z=$,E=j):z=z.next=$,m|=M;if(k=k.next,k===null){if(k=f.shared.pending,k===null)break;M=k,k=M.next,M.next=null,f.lastBaseUpdate=M,f.shared.pending=null}}while(!0);if(z===null&&(E=j),f.baseState=E,f.firstBaseUpdate=R,f.lastBaseUpdate=z,r=f.shared.interleaved,r!==null){f=r;do m|=f.lane,f=f.next;while(f!==r)}else p===null&&(f.shared.lanes=0);$r|=m,n.lanes=m,n.memoizedState=j}}function Fk(n,r,s){if(n=r.effects,r.effects=null,n!==null)for(r=0;r<n.length;r++){var u=n[r],f=u.callback;if(f!==null){if(u.callback=null,u=s,typeof f!="function")throw Error(t(191,f));f.call(u)}}}var Fi={},In=ur(Fi),zi=ur(Fi),Hi=ur(Fi);function Kr(n){if(n===Fi)throw Error(t(174));return n}function fh(n,r){switch(We(Hi,r),We(zi,n),We(In,Fi),n=r.nodeType,n){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:hf(null,"");break;default:n=n===8?r.parentNode:r,r=n.namespaceURI||null,n=n.tagName,r=hf(r,n)}Ve(In),We(In,r)}function Lo(){Ve(In),Ve(zi),Ve(Hi)}function zk(n){Kr(Hi.current);var r=Kr(In.current),s=hf(r,n.type);r!==s&&(We(zi,n),We(In,s))}function hh(n){zi.current===n&&(Ve(In),Ve(zi))}var Qe=ur(0);function Ba(n){for(var r=n;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ph=[];function gh(){for(var n=0;n<ph.length;n++)ph[n]._workInProgressVersionPrimary=null;ph.length=0}var Aa=H.ReactCurrentDispatcher,mh=H.ReactCurrentBatchConfig,Vr=0,Ze=null,dt=null,gt=null,Ia=!1,ji=!1,qi=0,nA=0;function Bt(){throw Error(t(321))}function vh(n,r){if(r===null)return!1;for(var s=0;s<r.length&&s<n.length;s++)if(!pn(n[s],r[s]))return!1;return!0}function yh(n,r,s,u,f,p){if(Vr=p,Ze=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Aa.current=n===null||n.memoizedState===null?sA:aA,n=s(u,f),ji){p=0;do{if(ji=!1,qi=0,25<=p)throw Error(t(301));p+=1,gt=dt=null,r.updateQueue=null,Aa.current=lA,n=s(u,f)}while(ji)}if(Aa.current=Na,r=dt!==null&&dt.next!==null,Vr=0,gt=dt=Ze=null,Ia=!1,r)throw Error(t(300));return n}function bh(){var n=qi!==0;return qi=0,n}function _n(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Ze.memoizedState=gt=n:gt=gt.next=n,gt}function sn(){if(dt===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=dt.next;var r=gt===null?Ze.memoizedState:gt.next;if(r!==null)gt=r,dt=n;else{if(n===null)throw Error(t(310));dt=n,n={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},gt===null?Ze.memoizedState=gt=n:gt=gt.next=n}return gt}function Ui(n,r){return typeof r=="function"?r(n):r}function kh(n){var r=sn(),s=r.queue;if(s===null)throw Error(t(311));s.lastRenderedReducer=n;var u=dt,f=u.baseQueue,p=s.pending;if(p!==null){if(f!==null){var m=f.next;f.next=p.next,p.next=m}u.baseQueue=f=p,s.pending=null}if(f!==null){p=f.next,u=u.baseState;var k=m=null,E=null,R=p;do{var z=R.lane;if((Vr&z)===z)E!==null&&(E=E.next={lane:0,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),u=R.hasEagerState?R.eagerState:n(u,R.action);else{var j={lane:z,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null};E===null?(k=E=j,m=u):E=E.next=j,Ze.lanes|=z,$r|=z}R=R.next}while(R!==null&&R!==p);E===null?m=u:E.next=k,pn(u,r.memoizedState)||(zt=!0),r.memoizedState=u,r.baseState=m,r.baseQueue=E,s.lastRenderedState=u}if(n=s.interleaved,n!==null){f=n;do p=f.lane,Ze.lanes|=p,$r|=p,f=f.next;while(f!==n)}else f===null&&(s.lanes=0);return[r.memoizedState,s.dispatch]}function wh(n){var r=sn(),s=r.queue;if(s===null)throw Error(t(311));s.lastRenderedReducer=n;var u=s.dispatch,f=s.pending,p=r.memoizedState;if(f!==null){s.pending=null;var m=f=f.next;do p=n(p,m.action),m=m.next;while(m!==f);pn(p,r.memoizedState)||(zt=!0),r.memoizedState=p,r.baseQueue===null&&(r.baseState=p),s.lastRenderedState=p}return[p,u]}function Hk(){}function jk(n,r){var s=Ze,u=sn(),f=r(),p=!pn(u.memoizedState,f);if(p&&(u.memoizedState=f,zt=!0),u=u.queue,Th(Wk.bind(null,s,u,n),[n]),u.getSnapshot!==r||p||gt!==null&&gt.memoizedState.tag&1){if(s.flags|=2048,Wi(9,Uk.bind(null,s,u,f,r),void 0,null),mt===null)throw Error(t(349));(Vr&30)!==0||qk(s,r,f)}return f}function qk(n,r,s){n.flags|=16384,n={getSnapshot:r,value:s},r=Ze.updateQueue,r===null?(r={lastEffect:null,stores:null},Ze.updateQueue=r,r.stores=[n]):(s=r.stores,s===null?r.stores=[n]:s.push(n))}function Uk(n,r,s,u){r.value=s,r.getSnapshot=u,Kk(r)&&Vk(n)}function Wk(n,r,s){return s(function(){Kk(r)&&Vk(n)})}function Kk(n){var r=n.getSnapshot;n=n.value;try{var s=r();return!pn(n,s)}catch(u){return!0}}function Vk(n){var r=Wn(n,1);r!==null&&bn(r,n,1,-1)}function $k(n){var r=_n();return typeof n=="function"&&(n=n()),r.memoizedState=r.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ui,lastRenderedState:n},r.queue=n,n=n.dispatch=iA.bind(null,Ze,n),[r.memoizedState,n]}function Wi(n,r,s,u){return n={tag:n,create:r,destroy:s,deps:u,next:null},r=Ze.updateQueue,r===null?(r={lastEffect:null,stores:null},Ze.updateQueue=r,r.lastEffect=n.next=n):(s=r.lastEffect,s===null?r.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,r.lastEffect=n)),n}function Gk(){return sn().memoizedState}function _a(n,r,s,u){var f=_n();Ze.flags|=n,f.memoizedState=Wi(1|r,s,void 0,u===void 0?null:u)}function Ra(n,r,s,u){var f=sn();u=u===void 0?null:u;var p=void 0;if(dt!==null){var m=dt.memoizedState;if(p=m.destroy,u!==null&&vh(u,m.deps)){f.memoizedState=Wi(r,s,p,u);return}}Ze.flags|=n,f.memoizedState=Wi(1|r,s,p,u)}function Xk(n,r){return _a(8390656,8,n,r)}function Th(n,r){return Ra(2048,8,n,r)}function Yk(n,r){return Ra(4,2,n,r)}function Qk(n,r){return Ra(4,4,n,r)}function Zk(n,r){if(typeof r=="function")return n=n(),r(n),function(){r(null)};if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Jk(n,r,s){return s=s!=null?s.concat([n]):null,Ra(4,4,Zk.bind(null,r,n),s)}function xh(){}function ew(n,r){var s=sn();r=r===void 0?null:r;var u=s.memoizedState;return u!==null&&r!==null&&vh(r,u[1])?u[0]:(s.memoizedState=[n,r],n)}function tw(n,r){var s=sn();r=r===void 0?null:r;var u=s.memoizedState;return u!==null&&r!==null&&vh(r,u[1])?u[0]:(n=n(),s.memoizedState=[n,r],n)}function nw(n,r,s){return(Vr&21)===0?(n.baseState&&(n.baseState=!1,zt=!0),n.memoizedState=s):(pn(s,r)||(s=Nb(),Ze.lanes|=s,$r|=s,n.baseState=!0),r)}function rA(n,r){var s=He;He=s!==0&&4>s?s:4,n(!0);var u=mh.transition;mh.transition={};try{n(!1),r()}finally{He=s,mh.transition=u}}function rw(){return sn().memoizedState}function oA(n,r,s){var u=yr(n);if(s={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null},ow(n))iw(r,s);else if(s=Dk(n,r,s,u),s!==null){var f=Nt();bn(s,n,u,f),sw(s,r,u)}}function iA(n,r,s){var u=yr(n),f={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null};if(ow(n))iw(r,f);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=r.lastRenderedReducer,p!==null))try{var m=r.lastRenderedState,k=p(m,s);if(f.hasEagerState=!0,f.eagerState=k,pn(k,m)){var E=r.interleaved;E===null?(f.next=f,uh(r)):(f.next=E.next,E.next=f),r.interleaved=f;return}}catch(R){}finally{}s=Dk(n,r,f,u),s!==null&&(f=Nt(),bn(s,n,u,f),sw(s,r,u))}}function ow(n){var r=n.alternate;return n===Ze||r!==null&&r===Ze}function iw(n,r){ji=Ia=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function sw(n,r,s){if((s&4194240)!==0){var u=r.lanes;u&=n.pendingLanes,s|=u,r.lanes=s,Sf(n,s)}}var Na={readContext:on,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},sA={readContext:on,useCallback:function(n,r){return _n().memoizedState=[n,r===void 0?null:r],n},useContext:on,useEffect:Xk,useImperativeHandle:function(n,r,s){return s=s!=null?s.concat([n]):null,_a(4194308,4,Zk.bind(null,r,n),s)},useLayoutEffect:function(n,r){return _a(4194308,4,n,r)},useInsertionEffect:function(n,r){return _a(4,2,n,r)},useMemo:function(n,r){var s=_n();return r=r===void 0?null:r,n=n(),s.memoizedState=[n,r],n},useReducer:function(n,r,s){var u=_n();return r=s!==void 0?s(r):r,u.memoizedState=u.baseState=r,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:r},u.queue=n,n=n.dispatch=oA.bind(null,Ze,n),[u.memoizedState,n]},useRef:function(n){var r=_n();return n={current:n},r.memoizedState=n},useState:$k,useDebugValue:xh,useDeferredValue:function(n){return _n().memoizedState=n},useTransition:function(){var n=$k(!1),r=n[0];return n=rA.bind(null,n[1]),_n().memoizedState=n,[r,n]},useMutableSource:function(){},useSyncExternalStore:function(n,r,s){var u=Ze,f=_n();if(Xe){if(s===void 0)throw Error(t(407));s=s()}else{if(s=r(),mt===null)throw Error(t(349));(Vr&30)!==0||qk(u,r,s)}f.memoizedState=s;var p={value:s,getSnapshot:r};return f.queue=p,Xk(Wk.bind(null,u,p,n),[n]),u.flags|=2048,Wi(9,Uk.bind(null,u,p,s,r),void 0,null),s},useId:function(){var n=_n(),r=mt.identifierPrefix;if(Xe){var s=Un,u=qn;s=(u&~(1<<32-hn(u)-1)).toString(32)+s,r=":"+r+"R"+s,s=qi++,0<s&&(r+="H"+s.toString(32)),r+=":"}else s=nA++,r=":"+r+"r"+s.toString(32)+":";return n.memoizedState=r},unstable_isNewReconciler:!1},aA={readContext:on,useCallback:ew,useContext:on,useEffect:Th,useImperativeHandle:Jk,useInsertionEffect:Yk,useLayoutEffect:Qk,useMemo:tw,useReducer:kh,useRef:Gk,useState:function(){return kh(Ui)},useDebugValue:xh,useDeferredValue:function(n){var r=sn();return nw(r,dt.memoizedState,n)},useTransition:function(){var n=kh(Ui)[0],r=sn().memoizedState;return[n,r]},useMutableSource:Hk,useSyncExternalStore:jk,useId:rw,unstable_isNewReconciler:!1},lA={readContext:on,useCallback:ew,useContext:on,useEffect:Th,useImperativeHandle:Jk,useInsertionEffect:Yk,useLayoutEffect:Qk,useMemo:tw,useReducer:wh,useRef:Gk,useState:function(){return wh(Ui)},useDebugValue:xh,useDeferredValue:function(n){var r=sn();return dt===null?r.memoizedState=n:nw(r,dt.memoizedState,n)},useTransition:function(){var n=wh(Ui)[0],r=sn().memoizedState;return[n,r]},useMutableSource:Hk,useSyncExternalStore:jk,useId:rw,unstable_isNewReconciler:!1};function mn(n,r){if(n&&n.defaultProps){r=G({},r),n=n.defaultProps;for(var s in n)r[s]===void 0&&(r[s]=n[s]);return r}return r}function Eh(n,r,s,u){r=n.memoizedState,s=s(u,r),s=s==null?r:G({},r,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var Oa={isMounted:function(n){return(n=n._reactInternals)?zr(n)===n:!1},enqueueSetState:function(n,r,s){n=n._reactInternals;var u=Nt(),f=yr(n),p=Kn(u,f);p.payload=r,s!=null&&(p.callback=s),r=pr(n,p,f),r!==null&&(bn(r,n,f,u),Sa(r,n,f))},enqueueReplaceState:function(n,r,s){n=n._reactInternals;var u=Nt(),f=yr(n),p=Kn(u,f);p.tag=1,p.payload=r,s!=null&&(p.callback=s),r=pr(n,p,f),r!==null&&(bn(r,n,f,u),Sa(r,n,f))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var s=Nt(),u=yr(n),f=Kn(s,u);f.tag=2,r!=null&&(f.callback=r),r=pr(n,f,u),r!==null&&(bn(r,n,u,s),Sa(r,n,u))}};function aw(n,r,s,u,f,p,m){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,p,m):r.prototype&&r.prototype.isPureReactComponent?!_i(s,u)||!_i(f,p):!0}function lw(n,r,s){var u=!1,f=dr,p=r.contextType;return typeof p=="object"&&p!==null?p=on(p):(f=Ft(r)?jr:Ct.current,u=r.contextTypes,p=(u=u!=null)?Bo(n,f):dr),r=new r(s,p),n.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Oa,n.stateNode=r,r._reactInternals=n,u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=f,n.__reactInternalMemoizedMaskedChildContext=p),r}function cw(n,r,s,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,u),r.state!==n&&Oa.enqueueReplaceState(r,r.state,null)}function Sh(n,r,s,u){var f=n.stateNode;f.props=s,f.state=n.memoizedState,f.refs={},dh(n);var p=r.contextType;typeof p=="object"&&p!==null?f.context=on(p):(p=Ft(r)?jr:Ct.current,f.context=Bo(n,p)),f.state=n.memoizedState,p=r.getDerivedStateFromProps,typeof p=="function"&&(Eh(n,r,p,s),f.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(r=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),r!==f.state&&Oa.enqueueReplaceState(f,f.state,null),Ca(n,s,f,u),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308)}function Do(n,r){try{var s="",u=r;do s+=Ee(u),u=u.return;while(u);var f=s}catch(p){f=`
13
+ `),v=f.length-1,w=p.length-1;1<=v&&0<=w&&f[v]!==p[w];)w--;for(;1<=v&&0<=w;v--,w--)if(f[v]!==p[w]){if(v!==1||w!==1)do if(v--,w--,0>w||f[v]!==p[w]){var E=`
14
+ `+f[v].replace(" at new "," at ");return n.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",n.displayName)),E}while(1<=v&&0<=w);break}}}finally{se=!1,Error.prepareStackTrace=s}return(n=n?n.displayName||n.name:"")?F(n):""}function Se(n){switch(n.tag){case 5:return F(n.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return n=ue(n.type,!1),n;case 11:return n=ue(n.type.render,!1),n;case 1:return n=ue(n.type,!0),n;default:return""}}function Ie(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case U:return"Fragment";case j:return"Portal";case X:return"Profiler";case M:return"StrictMode";case Z:return"Suspense";case Te:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case G:return(n.displayName||"Context")+".Consumer";case ae:return(n._context.displayName||"Context")+".Provider";case ke:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Re:return o=n.displayName||null,o!==null?o:Ie(n.type)||"Memo";case xe:o=n._payload,n=n._init;try{return Ie(n(o))}catch(s){}}return null}function ye(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ie(o);case 8:return o===M?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function fe(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function He(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function yt(n){var o=He(n)?"checked":"value",s=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),u=""+n[o];if(!n.hasOwnProperty(o)&&typeof s!="undefined"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,p=s.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return f.call(this)},set:function(v){u=""+v,p.call(this,v)}}),Object.defineProperty(n,o,{enumerable:s.enumerable}),{getValue:function(){return u},setValue:function(v){u=""+v},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function or(n){n._valueTracker||(n._valueTracker=yt(n))}function zr(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var s=o.getValue(),u="";return n&&(u=He(n)?n.checked?"true":"false":n.value),n=u,n!==s?(o.setValue(n),!0):!1}function Vs(n){if(n=n||(typeof document!="undefined"?document:void 0),typeof n=="undefined")return null;try{return n.activeElement||n.body}catch(o){return n.body}}function uf(n,o){var s=o.checked;return Y({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s!=null?s:n._wrapperState.initialChecked})}function fb(n,o){var s=o.defaultValue==null?"":o.defaultValue,u=o.checked!=null?o.checked:o.defaultChecked;s=fe(o.value!=null?o.value:s),n._wrapperState={initialChecked:u,initialValue:s,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function hb(n,o){o=o.checked,o!=null&&H(n,"checked",o,!1)}function df(n,o){hb(n,o);var s=fe(o.value),u=o.type;if(s!=null)u==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+s):n.value!==""+s&&(n.value=""+s);else if(u==="submit"||u==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?ff(n,o.type,s):o.hasOwnProperty("defaultValue")&&ff(n,o.type,fe(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function pb(n,o,s){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var u=o.type;if(!(u!=="submit"&&u!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+n._wrapperState.initialValue,s||o===n.value||(n.value=o),n.defaultValue=o}s=n.name,s!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,s!==""&&(n.name=s)}function ff(n,o,s){(o!=="number"||Vs(n.ownerDocument)!==n)&&(s==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+s&&(n.defaultValue=""+s))}var hi=Array.isArray;function vo(n,o,s,u){if(n=n.options,o){o={};for(var f=0;f<s.length;f++)o["$"+s[f]]=!0;for(s=0;s<n.length;s++)f=o.hasOwnProperty("$"+n[s].value),n[s].selected!==f&&(n[s].selected=f),f&&u&&(n[s].defaultSelected=!0)}else{for(s=""+fe(s),o=null,f=0;f<n.length;f++){if(n[f].value===s){n[f].selected=!0,u&&(n[f].defaultSelected=!0);return}o!==null||n[f].disabled||(o=n[f])}o!==null&&(o.selected=!0)}}function hf(n,o){if(o.dangerouslySetInnerHTML!=null)throw Error(t(91));return Y({},o,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function gb(n,o){var s=o.value;if(s==null){if(s=o.children,o=o.defaultValue,s!=null){if(o!=null)throw Error(t(92));if(hi(s)){if(1<s.length)throw Error(t(93));s=s[0]}o=s}o==null&&(o=""),s=o}n._wrapperState={initialValue:fe(s)}}function mb(n,o){var s=fe(o.value),u=fe(o.defaultValue);s!=null&&(s=""+s,s!==n.value&&(n.value=s),o.defaultValue==null&&n.defaultValue!==s&&(n.defaultValue=s)),u!=null&&(n.defaultValue=""+u)}function vb(n){var o=n.textContent;o===n._wrapperState.initialValue&&o!==""&&o!==null&&(n.value=o)}function yb(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pf(n,o){return n==null||n==="http://www.w3.org/1999/xhtml"?yb(o):n==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var $s,bb=(function(n){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,s,u,f){MSApp.execUnsafeLocalFunction(function(){return n(o,s,u,f)})}:n})(function(n,o){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=o;else{for($s=$s||document.createElement("div"),$s.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=$s.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild)}});function pi(n,o){if(o){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=o;return}}n.textContent=o}var gi={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},GC=["Webkit","ms","Moz","O"];Object.keys(gi).forEach(function(n){GC.forEach(function(o){o=o+n.charAt(0).toUpperCase()+n.substring(1),gi[o]=gi[n]})});function kb(n,o,s){return o==null||typeof o=="boolean"||o===""?"":s||typeof o!="number"||o===0||gi.hasOwnProperty(n)&&gi[n]?(""+o).trim():o+"px"}function wb(n,o){n=n.style;for(var s in o)if(o.hasOwnProperty(s)){var u=s.indexOf("--")===0,f=kb(s,o[s],u);s==="float"&&(s="cssFloat"),u?n.setProperty(s,f):n[s]=f}}var XC=Y({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 gf(n,o){if(o){if(XC[n]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(t(137,n));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(t(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(t(61))}if(o.style!=null&&typeof o.style!="object")throw Error(t(62))}}function mf(n,o){if(n.indexOf("-")===-1)return typeof o.is=="string";switch(n){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 vf=null;function yf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var bf=null,yo=null,bo=null;function Tb(n){if(n=Mi(n)){if(typeof bf!="function")throw Error(t(280));var o=n.stateNode;o&&(o=ma(o),bf(n.stateNode,n.type,o))}}function xb(n){yo?bo?bo.push(n):bo=[n]:yo=n}function Sb(){if(yo){var n=yo,o=bo;if(bo=yo=null,Tb(n),o)for(n=0;n<o.length;n++)Tb(o[n])}}function Eb(n,o){return n(o)}function Cb(){}var kf=!1;function Bb(n,o,s){if(kf)return n(o,s);kf=!0;try{return Eb(n,o,s)}finally{kf=!1,(yo!==null||bo!==null)&&(Cb(),Sb())}}function mi(n,o){var s=n.stateNode;if(s===null)return null;var u=ma(s);if(u===null)return null;s=u[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(t(231,o,typeof s));return s}var wf=!1;if(d)try{var vi={};Object.defineProperty(vi,"passive",{get:function(){wf=!0}}),window.addEventListener("test",vi,vi),window.removeEventListener("test",vi,vi)}catch(n){wf=!1}function YC(n,o,s,u,f,p,v,w,E){var N=Array.prototype.slice.call(arguments,3);try{o.apply(s,N)}catch(q){this.onError(q)}}var yi=!1,Gs=null,Xs=!1,Tf=null,QC={onError:function(n){yi=!0,Gs=n}};function ZC(n,o,s,u,f,p,v,w,E){yi=!1,Gs=null,YC.apply(QC,arguments)}function JC(n,o,s,u,f,p,v,w,E){if(ZC.apply(this,arguments),yi){if(yi){var N=Gs;yi=!1,Gs=null}else throw Error(t(198));Xs||(Xs=!0,Tf=N)}}function jr(n){var o=n,s=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(s=o.return),n=o.return;while(n)}return o.tag===3?s:null}function Ab(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function Ib(n){if(jr(n)!==n)throw Error(t(188))}function eB(n){var o=n.alternate;if(!o){if(o=jr(n),o===null)throw Error(t(188));return o!==n?null:n}for(var s=n,u=o;;){var f=s.return;if(f===null)break;var p=f.alternate;if(p===null){if(u=f.return,u!==null){s=u;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===s)return Ib(f),n;if(p===u)return Ib(f),o;p=p.sibling}throw Error(t(188))}if(s.return!==u.return)s=f,u=p;else{for(var v=!1,w=f.child;w;){if(w===s){v=!0,s=f,u=p;break}if(w===u){v=!0,u=f,s=p;break}w=w.sibling}if(!v){for(w=p.child;w;){if(w===s){v=!0,s=p,u=f;break}if(w===u){v=!0,u=p,s=f;break}w=w.sibling}if(!v)throw Error(t(189))}}if(s.alternate!==u)throw Error(t(190))}if(s.tag!==3)throw Error(t(188));return s.stateNode.current===s?n:o}function Rb(n){return n=eB(n),n!==null?_b(n):null}function _b(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var o=_b(n);if(o!==null)return o;n=n.sibling}return null}var Nb=e.unstable_scheduleCallback,Ob=e.unstable_cancelCallback,tB=e.unstable_shouldYield,nB=e.unstable_requestPaint,nt=e.unstable_now,rB=e.unstable_getCurrentPriorityLevel,xf=e.unstable_ImmediatePriority,Lb=e.unstable_UserBlockingPriority,Ys=e.unstable_NormalPriority,oB=e.unstable_LowPriority,Db=e.unstable_IdlePriority,Qs=null,An=null;function iB(n){if(An&&typeof An.onCommitFiberRoot=="function")try{An.onCommitFiberRoot(Qs,n,void 0,(n.current.flags&128)===128)}catch(o){}}var mn=Math.clz32?Math.clz32:lB,sB=Math.log,aB=Math.LN2;function lB(n){return n>>>=0,n===0?32:31-(sB(n)/aB|0)|0}var Zs=64,Js=4194304;function bi(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function ea(n,o){var s=n.pendingLanes;if(s===0)return 0;var u=0,f=n.suspendedLanes,p=n.pingedLanes,v=s&268435455;if(v!==0){var w=v&~f;w!==0?u=bi(w):(p&=v,p!==0&&(u=bi(p)))}else v=s&~f,v!==0?u=bi(v):p!==0&&(u=bi(p));if(u===0)return 0;if(o!==0&&o!==u&&(o&f)===0&&(f=u&-u,p=o&-o,f>=p||f===16&&(p&4194240)!==0))return o;if((u&4)!==0&&(u|=s&16),o=n.entangledLanes,o!==0)for(n=n.entanglements,o&=u;0<o;)s=31-mn(o),f=1<<s,u|=n[s],o&=~f;return u}function cB(n,o){switch(n){case 1:case 2:case 4:return o+250;case 8:case 16:case 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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uB(n,o){for(var s=n.suspendedLanes,u=n.pingedLanes,f=n.expirationTimes,p=n.pendingLanes;0<p;){var v=31-mn(p),w=1<<v,E=f[v];E===-1?((w&s)===0||(w&u)!==0)&&(f[v]=cB(w,o)):E<=o&&(n.expiredLanes|=w),p&=~w}}function Sf(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Pb(){var n=Zs;return Zs<<=1,(Zs&4194240)===0&&(Zs=64),n}function Ef(n){for(var o=[],s=0;31>s;s++)o.push(n);return o}function ki(n,o,s){n.pendingLanes|=o,o!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,o=31-mn(o),n[o]=s}function dB(n,o){var s=n.pendingLanes&~o;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=o,n.mutableReadLanes&=o,n.entangledLanes&=o,o=n.entanglements;var u=n.eventTimes;for(n=n.expirationTimes;0<s;){var f=31-mn(s),p=1<<f;o[f]=0,u[f]=-1,n[f]=-1,s&=~p}}function Cf(n,o){var s=n.entangledLanes|=o;for(n=n.entanglements;s;){var u=31-mn(s),f=1<<u;f&o|n[u]&o&&(n[u]|=o),s&=~f}}var ze=0;function Mb(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var Fb,Bf,Hb,zb,jb,Af=!1,ta=[],ir=null,sr=null,ar=null,wi=new Map,Ti=new Map,lr=[],fB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function qb(n,o){switch(n){case"focusin":case"focusout":ir=null;break;case"dragenter":case"dragleave":sr=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":wi.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ti.delete(o.pointerId)}}function xi(n,o,s,u,f,p){return n===null||n.nativeEvent!==p?(n={blockedOn:o,domEventName:s,eventSystemFlags:u,nativeEvent:p,targetContainers:[f]},o!==null&&(o=Mi(o),o!==null&&Bf(o)),n):(n.eventSystemFlags|=u,o=n.targetContainers,f!==null&&o.indexOf(f)===-1&&o.push(f),n)}function hB(n,o,s,u,f){switch(o){case"focusin":return ir=xi(ir,n,o,s,u,f),!0;case"dragenter":return sr=xi(sr,n,o,s,u,f),!0;case"mouseover":return ar=xi(ar,n,o,s,u,f),!0;case"pointerover":var p=f.pointerId;return wi.set(p,xi(wi.get(p)||null,n,o,s,u,f)),!0;case"gotpointercapture":return p=f.pointerId,Ti.set(p,xi(Ti.get(p)||null,n,o,s,u,f)),!0}return!1}function Ub(n){var o=qr(n.target);if(o!==null){var s=jr(o);if(s!==null){if(o=s.tag,o===13){if(o=Ab(s),o!==null){n.blockedOn=o,jb(n.priority,function(){Hb(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function na(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var s=Rf(n.domEventName,n.eventSystemFlags,o[0],n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);vf=u,s.target.dispatchEvent(u),vf=null}else return o=Mi(s),o!==null&&Bf(o),n.blockedOn=s,!1;o.shift()}return!0}function Wb(n,o,s){na(n)&&s.delete(o)}function pB(){Af=!1,ir!==null&&na(ir)&&(ir=null),sr!==null&&na(sr)&&(sr=null),ar!==null&&na(ar)&&(ar=null),wi.forEach(Wb),Ti.forEach(Wb)}function Si(n,o){n.blockedOn===o&&(n.blockedOn=null,Af||(Af=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,pB)))}function Ei(n){function o(f){return Si(f,n)}if(0<ta.length){Si(ta[0],n);for(var s=1;s<ta.length;s++){var u=ta[s];u.blockedOn===n&&(u.blockedOn=null)}}for(ir!==null&&Si(ir,n),sr!==null&&Si(sr,n),ar!==null&&Si(ar,n),wi.forEach(o),Ti.forEach(o),s=0;s<lr.length;s++)u=lr[s],u.blockedOn===n&&(u.blockedOn=null);for(;0<lr.length&&(s=lr[0],s.blockedOn===null);)Ub(s),s.blockedOn===null&&lr.shift()}var ko=P.ReactCurrentBatchConfig,ra=!0;function gB(n,o,s,u){var f=ze,p=ko.transition;ko.transition=null;try{ze=1,If(n,o,s,u)}finally{ze=f,ko.transition=p}}function mB(n,o,s,u){var f=ze,p=ko.transition;ko.transition=null;try{ze=4,If(n,o,s,u)}finally{ze=f,ko.transition=p}}function If(n,o,s,u){if(ra){var f=Rf(n,o,s,u);if(f===null)$f(n,o,u,oa,s),qb(n,u);else if(hB(f,n,o,s,u))u.stopPropagation();else if(qb(n,u),o&4&&-1<fB.indexOf(n)){for(;f!==null;){var p=Mi(f);if(p!==null&&Fb(p),p=Rf(n,o,s,u),p===null&&$f(n,o,u,oa,s),p===f)break;f=p}f!==null&&u.stopPropagation()}else $f(n,o,u,null,s)}}var oa=null;function Rf(n,o,s,u){if(oa=null,n=yf(u),n=qr(n),n!==null)if(o=jr(n),o===null)n=null;else if(s=o.tag,s===13){if(n=Ab(o),n!==null)return n;n=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null);return oa=n,null}function Kb(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(rB()){case xf:return 1;case Lb:return 4;case Ys:case oB:return 16;case Db:return 536870912;default:return 16}default:return 16}}var cr=null,_f=null,ia=null;function Vb(){if(ia)return ia;var n,o=_f,s=o.length,u,f="value"in cr?cr.value:cr.textContent,p=f.length;for(n=0;n<s&&o[n]===f[n];n++);var v=s-n;for(u=1;u<=v&&o[s-u]===f[p-u];u++);return ia=f.slice(n,1<u?1-u:void 0)}function sa(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function aa(){return!0}function $b(){return!1}function Gt(n){function o(s,u,f,p,v){this._reactName=s,this._targetInst=f,this.type=u,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var w in n)n.hasOwnProperty(w)&&(s=n[w],this[w]=s?s(p):p[w]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?aa:$b,this.isPropagationStopped=$b,this}return Y(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=aa)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=aa)},persist:function(){},isPersistent:aa}),o}var wo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nf=Gt(wo),Ci=Y({},wo,{view:0,detail:0}),vB=Gt(Ci),Of,Lf,Bi,la=Y({},Ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Bi&&(Bi&&n.type==="mousemove"?(Of=n.screenX-Bi.screenX,Lf=n.screenY-Bi.screenY):Lf=Of=0,Bi=n),Of)},movementY:function(n){return"movementY"in n?n.movementY:Lf}}),Gb=Gt(la),yB=Y({},la,{dataTransfer:0}),bB=Gt(yB),kB=Y({},Ci,{relatedTarget:0}),Df=Gt(kB),wB=Y({},wo,{animationName:0,elapsedTime:0,pseudoElement:0}),TB=Gt(wB),xB=Y({},wo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),SB=Gt(xB),EB=Y({},wo,{data:0}),Xb=Gt(EB),CB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},AB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IB(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=AB[n])?!!o[n]:!1}function Pf(){return IB}var RB=Y({},Ci,{key:function(n){if(n.key){var o=CB[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=sa(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?BB[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pf,charCode:function(n){return n.type==="keypress"?sa(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?sa(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),_B=Gt(RB),NB=Y({},la,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yb=Gt(NB),OB=Y({},Ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pf}),LB=Gt(OB),DB=Y({},wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),PB=Gt(DB),MB=Y({},la,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),FB=Gt(MB),HB=[9,13,27,32],Mf=d&&"CompositionEvent"in window,Ai=null;d&&"documentMode"in document&&(Ai=document.documentMode);var zB=d&&"TextEvent"in window&&!Ai,Qb=d&&(!Mf||Ai&&8<Ai&&11>=Ai),Zb=" ",Jb=!1;function ek(n,o){switch(n){case"keyup":return HB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tk(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var To=!1;function jB(n,o){switch(n){case"compositionend":return tk(o);case"keypress":return o.which!==32?null:(Jb=!0,Zb);case"textInput":return n=o.data,n===Zb&&Jb?null:n;default:return null}}function qB(n,o){if(To)return n==="compositionend"||!Mf&&ek(n,o)?(n=Vb(),ia=_f=cr=null,To=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Qb&&o.locale!=="ko"?null:o.data;default:return null}}var UB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nk(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!UB[n.type]:o==="textarea"}function rk(n,o,s,u){xb(u),o=ha(o,"onChange"),0<o.length&&(s=new Nf("onChange","change",null,s,u),n.push({event:s,listeners:o}))}var Ii=null,Ri=null;function WB(n){wk(n,0)}function ca(n){var o=Bo(n);if(zr(o))return n}function KB(n,o){if(n==="change")return o}var ok=!1;if(d){var Ff;if(d){var Hf="oninput"in document;if(!Hf){var ik=document.createElement("div");ik.setAttribute("oninput","return;"),Hf=typeof ik.oninput=="function"}Ff=Hf}else Ff=!1;ok=Ff&&(!document.documentMode||9<document.documentMode)}function sk(){Ii&&(Ii.detachEvent("onpropertychange",ak),Ri=Ii=null)}function ak(n){if(n.propertyName==="value"&&ca(Ri)){var o=[];rk(o,Ri,n,yf(n)),Bb(WB,o)}}function VB(n,o,s){n==="focusin"?(sk(),Ii=o,Ri=s,Ii.attachEvent("onpropertychange",ak)):n==="focusout"&&sk()}function $B(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return ca(Ri)}function GB(n,o){if(n==="click")return ca(o)}function XB(n,o){if(n==="input"||n==="change")return ca(o)}function YB(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var vn=typeof Object.is=="function"?Object.is:YB;function _i(n,o){if(vn(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var s=Object.keys(n),u=Object.keys(o);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var f=s[u];if(!h.call(o,f)||!vn(n[f],o[f]))return!1}return!0}function lk(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ck(n,o){var s=lk(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=o&&u>=o)return{node:s,offset:o-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=lk(s)}}function uk(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?uk(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function dk(){for(var n=window,o=Vs();o instanceof n.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href=="string"}catch(u){s=!1}if(s)n=o.contentWindow;else break;o=Vs(n.document)}return o}function zf(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function QB(n){var o=dk(),s=n.focusedElem,u=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&uk(s.ownerDocument.documentElement,s)){if(u!==null&&zf(s)){if(o=u.start,n=u.end,n===void 0&&(n=o),"selectionStart"in s)s.selectionStart=o,s.selectionEnd=Math.min(n,s.value.length);else if(n=(o=s.ownerDocument||document)&&o.defaultView||window,n.getSelection){n=n.getSelection();var f=s.textContent.length,p=Math.min(u.start,f);u=u.end===void 0?p:Math.min(u.end,f),!n.extend&&p>u&&(f=u,u=p,p=f),f=ck(s,p);var v=ck(s,u);f&&v&&(n.rangeCount!==1||n.anchorNode!==f.node||n.anchorOffset!==f.offset||n.focusNode!==v.node||n.focusOffset!==v.offset)&&(o=o.createRange(),o.setStart(f.node,f.offset),n.removeAllRanges(),p>u?(n.addRange(o),n.extend(v.node,v.offset)):(o.setEnd(v.node,v.offset),n.addRange(o)))}}for(o=[],n=s;n=n.parentNode;)n.nodeType===1&&o.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<o.length;s++)n=o[s],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var ZB=d&&"documentMode"in document&&11>=document.documentMode,xo=null,jf=null,Ni=null,qf=!1;function fk(n,o,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;qf||xo==null||xo!==Vs(u)||(u=xo,"selectionStart"in u&&zf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ni&&_i(Ni,u)||(Ni=u,u=ha(jf,"onSelect"),0<u.length&&(o=new Nf("onSelect","select",null,o,s),n.push({event:o,listeners:u}),o.target=xo)))}function ua(n,o){var s={};return s[n.toLowerCase()]=o.toLowerCase(),s["Webkit"+n]="webkit"+o,s["Moz"+n]="moz"+o,s}var So={animationend:ua("Animation","AnimationEnd"),animationiteration:ua("Animation","AnimationIteration"),animationstart:ua("Animation","AnimationStart"),transitionend:ua("Transition","TransitionEnd")},Uf={},hk={};d&&(hk=document.createElement("div").style,"AnimationEvent"in window||(delete So.animationend.animation,delete So.animationiteration.animation,delete So.animationstart.animation),"TransitionEvent"in window||delete So.transitionend.transition);function da(n){if(Uf[n])return Uf[n];if(!So[n])return n;var o=So[n],s;for(s in o)if(o.hasOwnProperty(s)&&s in hk)return Uf[n]=o[s];return n}var pk=da("animationend"),gk=da("animationiteration"),mk=da("animationstart"),vk=da("transitionend"),yk=new Map,bk="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ur(n,o){yk.set(n,o),l(o,[n])}for(var Wf=0;Wf<bk.length;Wf++){var Kf=bk[Wf],JB=Kf.toLowerCase(),eA=Kf[0].toUpperCase()+Kf.slice(1);ur(JB,"on"+eA)}ur(pk,"onAnimationEnd"),ur(gk,"onAnimationIteration"),ur(mk,"onAnimationStart"),ur("dblclick","onDoubleClick"),ur("focusin","onFocus"),ur("focusout","onBlur"),ur(vk,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),tA=new Set("cancel close invalid load scroll toggle".split(" ").concat(Oi));function kk(n,o,s){var u=n.type||"unknown-event";n.currentTarget=s,JC(u,o,void 0,n),n.currentTarget=null}function wk(n,o){o=(o&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],f=u.event;u=u.listeners;e:{var p=void 0;if(o)for(var v=u.length-1;0<=v;v--){var w=u[v],E=w.instance,N=w.currentTarget;if(w=w.listener,E!==p&&f.isPropagationStopped())break e;kk(f,w,N),p=E}else for(v=0;v<u.length;v++){if(w=u[v],E=w.instance,N=w.currentTarget,w=w.listener,E!==p&&f.isPropagationStopped())break e;kk(f,w,N),p=E}}}if(Xs)throw n=Tf,Xs=!1,Tf=null,n}function We(n,o){var s=o[Jf];s===void 0&&(s=o[Jf]=new Set);var u=n+"__bubble";s.has(u)||(Tk(o,n,2,!1),s.add(u))}function Vf(n,o,s){var u=0;o&&(u|=4),Tk(s,n,u,o)}var fa="_reactListening"+Math.random().toString(36).slice(2);function Li(n){if(!n[fa]){n[fa]=!0,r.forEach(function(s){s!=="selectionchange"&&(tA.has(s)||Vf(s,!1,n),Vf(s,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[fa]||(o[fa]=!0,Vf("selectionchange",!1,o))}}function Tk(n,o,s,u){switch(Kb(o)){case 1:var f=gB;break;case 4:f=mB;break;default:f=If}s=f.bind(null,o,s,n),f=void 0,!wf||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(f=!0),u?f!==void 0?n.addEventListener(o,s,{capture:!0,passive:f}):n.addEventListener(o,s,!0):f!==void 0?n.addEventListener(o,s,{passive:f}):n.addEventListener(o,s,!1)}function $f(n,o,s,u,f){var p=u;if((o&1)===0&&(o&2)===0&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var w=u.stateNode.containerInfo;if(w===f||w.nodeType===8&&w.parentNode===f)break;if(v===4)for(v=u.return;v!==null;){var E=v.tag;if((E===3||E===4)&&(E=v.stateNode.containerInfo,E===f||E.nodeType===8&&E.parentNode===f))return;v=v.return}for(;w!==null;){if(v=qr(w),v===null)return;if(E=v.tag,E===5||E===6){u=p=v;continue e}w=w.parentNode}}u=u.return}Bb(function(){var N=p,q=yf(s),W=[];e:{var z=yk.get(n);if(z!==void 0){var Q=Nf,ne=n;switch(n){case"keypress":if(sa(s)===0)break e;case"keydown":case"keyup":Q=_B;break;case"focusin":ne="focus",Q=Df;break;case"focusout":ne="blur",Q=Df;break;case"beforeblur":case"afterblur":Q=Df;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=Gb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=bB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=LB;break;case pk:case gk:case mk:Q=TB;break;case vk:Q=PB;break;case"scroll":Q=vB;break;case"wheel":Q=FB;break;case"copy":case"cut":case"paste":Q=SB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=Yb}var oe=(o&4)!==0,rt=!oe&&n==="scroll",I=oe?z!==null?z+"Capture":null:z;oe=[];for(var C=N,_;C!==null;){_=C;var K=_.stateNode;if(_.tag===5&&K!==null&&(_=K,I!==null&&(K=mi(C,I),K!=null&&oe.push(Di(C,K,_)))),rt)break;C=C.return}0<oe.length&&(z=new Q(z,ne,null,s,q),W.push({event:z,listeners:oe}))}}if((o&7)===0){e:{if(z=n==="mouseover"||n==="pointerover",Q=n==="mouseout"||n==="pointerout",z&&s!==vf&&(ne=s.relatedTarget||s.fromElement)&&(qr(ne)||ne[qn]))break e;if((Q||z)&&(z=q.window===q?q:(z=q.ownerDocument)?z.defaultView||z.parentWindow:window,Q?(ne=s.relatedTarget||s.toElement,Q=N,ne=ne?qr(ne):null,ne!==null&&(rt=jr(ne),ne!==rt||ne.tag!==5&&ne.tag!==6)&&(ne=null)):(Q=null,ne=N),Q!==ne)){if(oe=Gb,K="onMouseLeave",I="onMouseEnter",C="mouse",(n==="pointerout"||n==="pointerover")&&(oe=Yb,K="onPointerLeave",I="onPointerEnter",C="pointer"),rt=Q==null?z:Bo(Q),_=ne==null?z:Bo(ne),z=new oe(K,C+"leave",Q,s,q),z.target=rt,z.relatedTarget=_,K=null,qr(q)===N&&(oe=new oe(I,C+"enter",ne,s,q),oe.target=_,oe.relatedTarget=rt,K=oe),rt=K,Q&&ne)t:{for(oe=Q,I=ne,C=0,_=oe;_;_=Eo(_))C++;for(_=0,K=I;K;K=Eo(K))_++;for(;0<C-_;)oe=Eo(oe),C--;for(;0<_-C;)I=Eo(I),_--;for(;C--;){if(oe===I||I!==null&&oe===I.alternate)break t;oe=Eo(oe),I=Eo(I)}oe=null}else oe=null;Q!==null&&xk(W,z,Q,oe,!1),ne!==null&&rt!==null&&xk(W,rt,ne,oe,!0)}}e:{if(z=N?Bo(N):window,Q=z.nodeName&&z.nodeName.toLowerCase(),Q==="select"||Q==="input"&&z.type==="file")var ie=KB;else if(nk(z))if(ok)ie=XB;else{ie=$B;var he=VB}else(Q=z.nodeName)&&Q.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")&&(ie=GB);if(ie&&(ie=ie(n,N))){rk(W,ie,s,q);break e}he&&he(n,z,N),n==="focusout"&&(he=z._wrapperState)&&he.controlled&&z.type==="number"&&ff(z,"number",z.value)}switch(he=N?Bo(N):window,n){case"focusin":(nk(he)||he.contentEditable==="true")&&(xo=he,jf=N,Ni=null);break;case"focusout":Ni=jf=xo=null;break;case"mousedown":qf=!0;break;case"contextmenu":case"mouseup":case"dragend":qf=!1,fk(W,s,q);break;case"selectionchange":if(ZB)break;case"keydown":case"keyup":fk(W,s,q)}var pe;if(Mf)e:{switch(n){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else To?ek(n,s)&&(be="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(be="onCompositionStart");be&&(Qb&&s.locale!=="ko"&&(To||be!=="onCompositionStart"?be==="onCompositionEnd"&&To&&(pe=Vb()):(cr=q,_f="value"in cr?cr.value:cr.textContent,To=!0)),he=ha(N,be),0<he.length&&(be=new Xb(be,n,null,s,q),W.push({event:be,listeners:he}),pe?be.data=pe:(pe=tk(s),pe!==null&&(be.data=pe)))),(pe=zB?jB(n,s):qB(n,s))&&(N=ha(N,"onBeforeInput"),0<N.length&&(q=new Xb("onBeforeInput","beforeinput",null,s,q),W.push({event:q,listeners:N}),q.data=pe))}wk(W,o)})}function Di(n,o,s){return{instance:n,listener:o,currentTarget:s}}function ha(n,o){for(var s=o+"Capture",u=[];n!==null;){var f=n,p=f.stateNode;f.tag===5&&p!==null&&(f=p,p=mi(n,s),p!=null&&u.unshift(Di(n,p,f)),p=mi(n,o),p!=null&&u.push(Di(n,p,f))),n=n.return}return u}function Eo(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function xk(n,o,s,u,f){for(var p=o._reactName,v=[];s!==null&&s!==u;){var w=s,E=w.alternate,N=w.stateNode;if(E!==null&&E===u)break;w.tag===5&&N!==null&&(w=N,f?(E=mi(s,p),E!=null&&v.unshift(Di(s,E,w))):f||(E=mi(s,p),E!=null&&v.push(Di(s,E,w)))),s=s.return}v.length!==0&&n.push({event:o,listeners:v})}var nA=/\r\n?/g,rA=/\u0000|\uFFFD/g;function Sk(n){return(typeof n=="string"?n:""+n).replace(nA,`
15
+ `).replace(rA,"")}function pa(n,o,s){if(o=Sk(o),Sk(n)!==o&&s)throw Error(t(425))}function ga(){}var Gf=null,Xf=null;function Yf(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Qf=typeof setTimeout=="function"?setTimeout:void 0,oA=typeof clearTimeout=="function"?clearTimeout:void 0,Ek=typeof Promise=="function"?Promise:void 0,iA=typeof queueMicrotask=="function"?queueMicrotask:typeof Ek!="undefined"?function(n){return Ek.resolve(null).then(n).catch(sA)}:Qf;function sA(n){setTimeout(function(){throw n})}function Zf(n,o){var s=o,u=0;do{var f=s.nextSibling;if(n.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"){if(u===0){n.removeChild(f),Ei(o);return}u--}else s!=="$"&&s!=="$?"&&s!=="$!"||u++;s=f}while(s);Ei(o)}function dr(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return n}function Ck(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"){if(o===0)return n;o--}else s==="/$"&&o++}n=n.previousSibling}return null}var Co=Math.random().toString(36).slice(2),In="__reactFiber$"+Co,Pi="__reactProps$"+Co,qn="__reactContainer$"+Co,Jf="__reactEvents$"+Co,aA="__reactListeners$"+Co,lA="__reactHandles$"+Co;function qr(n){var o=n[In];if(o)return o;for(var s=n.parentNode;s;){if(o=s[qn]||s[In]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(n=Ck(n);n!==null;){if(s=n[In])return s;n=Ck(n)}return o}n=s,s=n.parentNode}return null}function Mi(n){return n=n[In]||n[qn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function Bo(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(t(33))}function ma(n){return n[Pi]||null}var eh=[],Ao=-1;function fr(n){return{current:n}}function Ke(n){0>Ao||(n.current=eh[Ao],eh[Ao]=null,Ao--)}function Ue(n,o){Ao++,eh[Ao]=n.current,n.current=o}var hr={},It=fr(hr),zt=fr(!1),Ur=hr;function Io(n,o){var s=n.type.contextTypes;if(!s)return hr;var u=n.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===o)return u.__reactInternalMemoizedMaskedChildContext;var f={},p;for(p in s)f[p]=o[p];return u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=f),f}function jt(n){return n=n.childContextTypes,n!=null}function va(){Ke(zt),Ke(It)}function Bk(n,o,s){if(It.current!==hr)throw Error(t(168));Ue(It,o),Ue(zt,s)}function Ak(n,o,s){var u=n.stateNode;if(o=o.childContextTypes,typeof u.getChildContext!="function")return s;u=u.getChildContext();for(var f in u)if(!(f in o))throw Error(t(108,ye(n)||"Unknown",f));return Y({},s,u)}function ya(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||hr,Ur=It.current,Ue(It,n),Ue(zt,zt.current),!0}function Ik(n,o,s){var u=n.stateNode;if(!u)throw Error(t(169));s?(n=Ak(n,o,Ur),u.__reactInternalMemoizedMergedChildContext=n,Ke(zt),Ke(It),Ue(It,n)):Ke(zt),Ue(zt,s)}var Un=null,ba=!1,th=!1;function Rk(n){Un===null?Un=[n]:Un.push(n)}function cA(n){ba=!0,Rk(n)}function pr(){if(!th&&Un!==null){th=!0;var n=0,o=ze;try{var s=Un;for(ze=1;n<s.length;n++){var u=s[n];do u=u(!0);while(u!==null)}Un=null,ba=!1}catch(f){throw Un!==null&&(Un=Un.slice(n+1)),Nb(xf,pr),f}finally{ze=o,th=!1}}return null}var Ro=[],_o=0,ka=null,wa=0,sn=[],an=0,Wr=null,Wn=1,Kn="";function Kr(n,o){Ro[_o++]=wa,Ro[_o++]=ka,ka=n,wa=o}function _k(n,o,s){sn[an++]=Wn,sn[an++]=Kn,sn[an++]=Wr,Wr=n;var u=Wn;n=Kn;var f=32-mn(u)-1;u&=~(1<<f),s+=1;var p=32-mn(o)+f;if(30<p){var v=f-f%5;p=(u&(1<<v)-1).toString(32),u>>=v,f-=v,Wn=1<<32-mn(o)+f|s<<f|u,Kn=p+n}else Wn=1<<p|s<<f|u,Kn=n}function nh(n){n.return!==null&&(Kr(n,1),_k(n,1,0))}function rh(n){for(;n===ka;)ka=Ro[--_o],Ro[_o]=null,wa=Ro[--_o],Ro[_o]=null;for(;n===Wr;)Wr=sn[--an],sn[an]=null,Kn=sn[--an],sn[an]=null,Wn=sn[--an],sn[an]=null}var Xt=null,Yt=null,$e=!1,yn=null;function Nk(n,o){var s=dn(5,null,null,0);s.elementType="DELETED",s.stateNode=o,s.return=n,o=n.deletions,o===null?(n.deletions=[s],n.flags|=16):o.push(s)}function Ok(n,o){switch(n.tag){case 5:var s=n.type;return o=o.nodeType!==1||s.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(n.stateNode=o,Xt=n,Yt=dr(o.firstChild),!0):!1;case 6:return o=n.pendingProps===""||o.nodeType!==3?null:o,o!==null?(n.stateNode=o,Xt=n,Yt=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(s=Wr!==null?{id:Wn,overflow:Kn}:null,n.memoizedState={dehydrated:o,treeContext:s,retryLane:1073741824},s=dn(18,null,null,0),s.stateNode=o,s.return=n,n.child=s,Xt=n,Yt=null,!0):!1;default:return!1}}function oh(n){return(n.mode&1)!==0&&(n.flags&128)===0}function ih(n){if($e){var o=Yt;if(o){var s=o;if(!Ok(n,o)){if(oh(n))throw Error(t(418));o=dr(s.nextSibling);var u=Xt;o&&Ok(n,o)?Nk(u,s):(n.flags=n.flags&-4097|2,$e=!1,Xt=n)}}else{if(oh(n))throw Error(t(418));n.flags=n.flags&-4097|2,$e=!1,Xt=n}}}function Lk(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Xt=n}function Ta(n){if(n!==Xt)return!1;if(!$e)return Lk(n),$e=!0,!1;var o;if((o=n.tag!==3)&&!(o=n.tag!==5)&&(o=n.type,o=o!=="head"&&o!=="body"&&!Yf(n.type,n.memoizedProps)),o&&(o=Yt)){if(oh(n))throw Dk(),Error(t(418));for(;o;)Nk(n,o),o=dr(o.nextSibling)}if(Lk(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(t(317));e:{for(n=n.nextSibling,o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"){if(o===0){Yt=dr(n.nextSibling);break e}o--}else s!=="$"&&s!=="$!"&&s!=="$?"||o++}n=n.nextSibling}Yt=null}}else Yt=Xt?dr(n.stateNode.nextSibling):null;return!0}function Dk(){for(var n=Yt;n;)n=dr(n.nextSibling)}function No(){Yt=Xt=null,$e=!1}function sh(n){yn===null?yn=[n]:yn.push(n)}var uA=P.ReactCurrentBatchConfig;function Fi(n,o,s){if(n=s.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(t(309));var u=s.stateNode}if(!u)throw Error(t(147,n));var f=u,p=""+n;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===p?o.ref:(o=function(v){var w=f.refs;v===null?delete w[p]:w[p]=v},o._stringRef=p,o)}if(typeof n!="string")throw Error(t(284));if(!s._owner)throw Error(t(290,n))}return n}function xa(n,o){throw n=Object.prototype.toString.call(o),Error(t(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n))}function Pk(n){var o=n._init;return o(n._payload)}function Mk(n){function o(I,C){if(n){var _=I.deletions;_===null?(I.deletions=[C],I.flags|=16):_.push(C)}}function s(I,C){if(!n)return null;for(;C!==null;)o(I,C),C=C.sibling;return null}function u(I,C){for(I=new Map;C!==null;)C.key!==null?I.set(C.key,C):I.set(C.index,C),C=C.sibling;return I}function f(I,C){return I=Tr(I,C),I.index=0,I.sibling=null,I}function p(I,C,_){return I.index=_,n?(_=I.alternate,_!==null?(_=_.index,_<C?(I.flags|=2,C):_):(I.flags|=2,C)):(I.flags|=1048576,C)}function v(I){return n&&I.alternate===null&&(I.flags|=2),I}function w(I,C,_,K){return C===null||C.tag!==6?(C=Qh(_,I.mode,K),C.return=I,C):(C=f(C,_),C.return=I,C)}function E(I,C,_,K){var ie=_.type;return ie===U?q(I,C,_.props.children,K,_.key):C!==null&&(C.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===xe&&Pk(ie)===C.type)?(K=f(C,_.props),K.ref=Fi(I,C,_),K.return=I,K):(K=$a(_.type,_.key,_.props,null,I.mode,K),K.ref=Fi(I,C,_),K.return=I,K)}function N(I,C,_,K){return C===null||C.tag!==4||C.stateNode.containerInfo!==_.containerInfo||C.stateNode.implementation!==_.implementation?(C=Zh(_,I.mode,K),C.return=I,C):(C=f(C,_.children||[]),C.return=I,C)}function q(I,C,_,K,ie){return C===null||C.tag!==7?(C=Jr(_,I.mode,K,ie),C.return=I,C):(C=f(C,_),C.return=I,C)}function W(I,C,_){if(typeof C=="string"&&C!==""||typeof C=="number")return C=Qh(""+C,I.mode,_),C.return=I,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case $:return _=$a(C.type,C.key,C.props,null,I.mode,_),_.ref=Fi(I,null,C),_.return=I,_;case j:return C=Zh(C,I.mode,_),C.return=I,C;case xe:var K=C._init;return W(I,K(C._payload),_)}if(hi(C)||ce(C))return C=Jr(C,I.mode,_,null),C.return=I,C;xa(I,C)}return null}function z(I,C,_,K){var ie=C!==null?C.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return ie!==null?null:w(I,C,""+_,K);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case $:return _.key===ie?E(I,C,_,K):null;case j:return _.key===ie?N(I,C,_,K):null;case xe:return ie=_._init,z(I,C,ie(_._payload),K)}if(hi(_)||ce(_))return ie!==null?null:q(I,C,_,K,null);xa(I,_)}return null}function Q(I,C,_,K,ie){if(typeof K=="string"&&K!==""||typeof K=="number")return I=I.get(_)||null,w(C,I,""+K,ie);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case $:return I=I.get(K.key===null?_:K.key)||null,E(C,I,K,ie);case j:return I=I.get(K.key===null?_:K.key)||null,N(C,I,K,ie);case xe:var he=K._init;return Q(I,C,_,he(K._payload),ie)}if(hi(K)||ce(K))return I=I.get(_)||null,q(C,I,K,ie,null);xa(C,K)}return null}function ne(I,C,_,K){for(var ie=null,he=null,pe=C,be=C=0,wt=null;pe!==null&&be<_.length;be++){pe.index>be?(wt=pe,pe=null):wt=pe.sibling;var Fe=z(I,pe,_[be],K);if(Fe===null){pe===null&&(pe=wt);break}n&&pe&&Fe.alternate===null&&o(I,pe),C=p(Fe,C,be),he===null?ie=Fe:he.sibling=Fe,he=Fe,pe=wt}if(be===_.length)return s(I,pe),$e&&Kr(I,be),ie;if(pe===null){for(;be<_.length;be++)pe=W(I,_[be],K),pe!==null&&(C=p(pe,C,be),he===null?ie=pe:he.sibling=pe,he=pe);return $e&&Kr(I,be),ie}for(pe=u(I,pe);be<_.length;be++)wt=Q(pe,I,be,_[be],K),wt!==null&&(n&&wt.alternate!==null&&pe.delete(wt.key===null?be:wt.key),C=p(wt,C,be),he===null?ie=wt:he.sibling=wt,he=wt);return n&&pe.forEach(function(xr){return o(I,xr)}),$e&&Kr(I,be),ie}function oe(I,C,_,K){var ie=ce(_);if(typeof ie!="function")throw Error(t(150));if(_=ie.call(_),_==null)throw Error(t(151));for(var he=ie=null,pe=C,be=C=0,wt=null,Fe=_.next();pe!==null&&!Fe.done;be++,Fe=_.next()){pe.index>be?(wt=pe,pe=null):wt=pe.sibling;var xr=z(I,pe,Fe.value,K);if(xr===null){pe===null&&(pe=wt);break}n&&pe&&xr.alternate===null&&o(I,pe),C=p(xr,C,be),he===null?ie=xr:he.sibling=xr,he=xr,pe=wt}if(Fe.done)return s(I,pe),$e&&Kr(I,be),ie;if(pe===null){for(;!Fe.done;be++,Fe=_.next())Fe=W(I,Fe.value,K),Fe!==null&&(C=p(Fe,C,be),he===null?ie=Fe:he.sibling=Fe,he=Fe);return $e&&Kr(I,be),ie}for(pe=u(I,pe);!Fe.done;be++,Fe=_.next())Fe=Q(pe,I,be,Fe.value,K),Fe!==null&&(n&&Fe.alternate!==null&&pe.delete(Fe.key===null?be:Fe.key),C=p(Fe,C,be),he===null?ie=Fe:he.sibling=Fe,he=Fe);return n&&pe.forEach(function(UA){return o(I,UA)}),$e&&Kr(I,be),ie}function rt(I,C,_,K){if(typeof _=="object"&&_!==null&&_.type===U&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case $:e:{for(var ie=_.key,he=C;he!==null;){if(he.key===ie){if(ie=_.type,ie===U){if(he.tag===7){s(I,he.sibling),C=f(he,_.props.children),C.return=I,I=C;break e}}else if(he.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===xe&&Pk(ie)===he.type){s(I,he.sibling),C=f(he,_.props),C.ref=Fi(I,he,_),C.return=I,I=C;break e}s(I,he);break}else o(I,he);he=he.sibling}_.type===U?(C=Jr(_.props.children,I.mode,K,_.key),C.return=I,I=C):(K=$a(_.type,_.key,_.props,null,I.mode,K),K.ref=Fi(I,C,_),K.return=I,I=K)}return v(I);case j:e:{for(he=_.key;C!==null;){if(C.key===he)if(C.tag===4&&C.stateNode.containerInfo===_.containerInfo&&C.stateNode.implementation===_.implementation){s(I,C.sibling),C=f(C,_.children||[]),C.return=I,I=C;break e}else{s(I,C);break}else o(I,C);C=C.sibling}C=Zh(_,I.mode,K),C.return=I,I=C}return v(I);case xe:return he=_._init,rt(I,C,he(_._payload),K)}if(hi(_))return ne(I,C,_,K);if(ce(_))return oe(I,C,_,K);xa(I,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,C!==null&&C.tag===6?(s(I,C.sibling),C=f(C,_),C.return=I,I=C):(s(I,C),C=Qh(_,I.mode,K),C.return=I,I=C),v(I)):s(I,C)}return rt}var Oo=Mk(!0),Fk=Mk(!1),Sa=fr(null),Ea=null,Lo=null,ah=null;function lh(){ah=Lo=Ea=null}function ch(n){var o=Sa.current;Ke(Sa),n._currentValue=o}function uh(n,o,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,u!==null&&(u.childLanes|=o)):u!==null&&(u.childLanes&o)!==o&&(u.childLanes|=o),n===s)break;n=n.return}}function Do(n,o){Ea=n,ah=Lo=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&o)!==0&&(qt=!0),n.firstContext=null)}function ln(n){var o=n._currentValue;if(ah!==n)if(n={context:n,memoizedValue:o,next:null},Lo===null){if(Ea===null)throw Error(t(308));Lo=n,Ea.dependencies={lanes:0,firstContext:n}}else Lo=Lo.next=n;return o}var Vr=null;function dh(n){Vr===null?Vr=[n]:Vr.push(n)}function Hk(n,o,s,u){var f=o.interleaved;return f===null?(s.next=s,dh(o)):(s.next=f.next,f.next=s),o.interleaved=s,Vn(n,u)}function Vn(n,o){n.lanes|=o;var s=n.alternate;for(s!==null&&(s.lanes|=o),s=n,n=n.return;n!==null;)n.childLanes|=o,s=n.alternate,s!==null&&(s.childLanes|=o),s=n,n=n.return;return s.tag===3?s.stateNode:null}var gr=!1;function fh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zk(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function $n(n,o){return{eventTime:n,lane:o,tag:0,payload:null,callback:null,next:null}}function mr(n,o,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Pe&2)!==0){var f=u.pending;return f===null?o.next=o:(o.next=f.next,f.next=o),u.pending=o,Vn(n,s)}return f=u.interleaved,f===null?(o.next=o,dh(u)):(o.next=f.next,f.next=o),u.interleaved=o,Vn(n,s)}function Ca(n,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194240)!==0)){var u=o.lanes;u&=n.pendingLanes,s|=u,o.lanes=s,Cf(n,s)}}function jk(n,o){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var f=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var v={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};p===null?f=p=v:p=p.next=v,s=s.next}while(s!==null);p===null?f=p=o:p=p.next=o}else f=p=o;s={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:u.shared,effects:u.effects},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=o:n.next=o,s.lastBaseUpdate=o}function Ba(n,o,s,u){var f=n.updateQueue;gr=!1;var p=f.firstBaseUpdate,v=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var E=w,N=E.next;E.next=null,v===null?p=N:v.next=N,v=E;var q=n.alternate;q!==null&&(q=q.updateQueue,w=q.lastBaseUpdate,w!==v&&(w===null?q.firstBaseUpdate=N:w.next=N,q.lastBaseUpdate=E))}if(p!==null){var W=f.baseState;v=0,q=N=E=null,w=p;do{var z=w.lane,Q=w.eventTime;if((u&z)===z){q!==null&&(q=q.next={eventTime:Q,lane:0,tag:w.tag,payload:w.payload,callback:w.callback,next:null});e:{var ne=n,oe=w;switch(z=o,Q=s,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){W=ne.call(Q,W,z);break e}W=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,z=typeof ne=="function"?ne.call(Q,W,z):ne,z==null)break e;W=Y({},W,z);break e;case 2:gr=!0}}w.callback!==null&&w.lane!==0&&(n.flags|=64,z=f.effects,z===null?f.effects=[w]:z.push(w))}else Q={eventTime:Q,lane:z,tag:w.tag,payload:w.payload,callback:w.callback,next:null},q===null?(N=q=Q,E=W):q=q.next=Q,v|=z;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;z=w,w=z.next,z.next=null,f.lastBaseUpdate=z,f.shared.pending=null}}while(!0);if(q===null&&(E=W),f.baseState=E,f.firstBaseUpdate=N,f.lastBaseUpdate=q,o=f.shared.interleaved,o!==null){f=o;do v|=f.lane,f=f.next;while(f!==o)}else p===null&&(f.shared.lanes=0);Xr|=v,n.lanes=v,n.memoizedState=W}}function qk(n,o,s){if(n=o.effects,o.effects=null,n!==null)for(o=0;o<n.length;o++){var u=n[o],f=u.callback;if(f!==null){if(u.callback=null,u=s,typeof f!="function")throw Error(t(191,f));f.call(u)}}}var Hi={},Rn=fr(Hi),zi=fr(Hi),ji=fr(Hi);function $r(n){if(n===Hi)throw Error(t(174));return n}function hh(n,o){switch(Ue(ji,o),Ue(zi,n),Ue(Rn,Hi),n=o.nodeType,n){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:pf(null,"");break;default:n=n===8?o.parentNode:o,o=n.namespaceURI||null,n=n.tagName,o=pf(o,n)}Ke(Rn),Ue(Rn,o)}function Po(){Ke(Rn),Ke(zi),Ke(ji)}function Uk(n){$r(ji.current);var o=$r(Rn.current),s=pf(o,n.type);o!==s&&(Ue(zi,n),Ue(Rn,s))}function ph(n){zi.current===n&&(Ke(Rn),Ke(zi))}var Xe=fr(0);function Aa(n){for(var o=n;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var gh=[];function mh(){for(var n=0;n<gh.length;n++)gh[n]._workInProgressVersionPrimary=null;gh.length=0}var Ia=P.ReactCurrentDispatcher,vh=P.ReactCurrentBatchConfig,Gr=0,Ye=null,dt=null,bt=null,Ra=!1,qi=!1,Ui=0,dA=0;function Rt(){throw Error(t(321))}function yh(n,o){if(o===null)return!1;for(var s=0;s<o.length&&s<n.length;s++)if(!vn(n[s],o[s]))return!1;return!0}function bh(n,o,s,u,f,p){if(Gr=p,Ye=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Ia.current=n===null||n.memoizedState===null?gA:mA,n=s(u,f),qi){p=0;do{if(qi=!1,Ui=0,25<=p)throw Error(t(301));p+=1,bt=dt=null,o.updateQueue=null,Ia.current=vA,n=s(u,f)}while(qi)}if(Ia.current=Oa,o=dt!==null&&dt.next!==null,Gr=0,bt=dt=Ye=null,Ra=!1,o)throw Error(t(300));return n}function kh(){var n=Ui!==0;return Ui=0,n}function _n(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Ye.memoizedState=bt=n:bt=bt.next=n,bt}function cn(){if(dt===null){var n=Ye.alternate;n=n!==null?n.memoizedState:null}else n=dt.next;var o=bt===null?Ye.memoizedState:bt.next;if(o!==null)bt=o,dt=n;else{if(n===null)throw Error(t(310));dt=n,n={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},bt===null?Ye.memoizedState=bt=n:bt=bt.next=n}return bt}function Wi(n,o){return typeof o=="function"?o(n):o}function wh(n){var o=cn(),s=o.queue;if(s===null)throw Error(t(311));s.lastRenderedReducer=n;var u=dt,f=u.baseQueue,p=s.pending;if(p!==null){if(f!==null){var v=f.next;f.next=p.next,p.next=v}u.baseQueue=f=p,s.pending=null}if(f!==null){p=f.next,u=u.baseState;var w=v=null,E=null,N=p;do{var q=N.lane;if((Gr&q)===q)E!==null&&(E=E.next={lane:0,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),u=N.hasEagerState?N.eagerState:n(u,N.action);else{var W={lane:q,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null};E===null?(w=E=W,v=u):E=E.next=W,Ye.lanes|=q,Xr|=q}N=N.next}while(N!==null&&N!==p);E===null?v=u:E.next=w,vn(u,o.memoizedState)||(qt=!0),o.memoizedState=u,o.baseState=v,o.baseQueue=E,s.lastRenderedState=u}if(n=s.interleaved,n!==null){f=n;do p=f.lane,Ye.lanes|=p,Xr|=p,f=f.next;while(f!==n)}else f===null&&(s.lanes=0);return[o.memoizedState,s.dispatch]}function Th(n){var o=cn(),s=o.queue;if(s===null)throw Error(t(311));s.lastRenderedReducer=n;var u=s.dispatch,f=s.pending,p=o.memoizedState;if(f!==null){s.pending=null;var v=f=f.next;do p=n(p,v.action),v=v.next;while(v!==f);vn(p,o.memoizedState)||(qt=!0),o.memoizedState=p,o.baseQueue===null&&(o.baseState=p),s.lastRenderedState=p}return[p,u]}function Wk(){}function Kk(n,o){var s=Ye,u=cn(),f=o(),p=!vn(u.memoizedState,f);if(p&&(u.memoizedState=f,qt=!0),u=u.queue,xh(Gk.bind(null,s,u,n),[n]),u.getSnapshot!==o||p||bt!==null&&bt.memoizedState.tag&1){if(s.flags|=2048,Ki(9,$k.bind(null,s,u,f,o),void 0,null),kt===null)throw Error(t(349));(Gr&30)!==0||Vk(s,o,f)}return f}function Vk(n,o,s){n.flags|=16384,n={getSnapshot:o,value:s},o=Ye.updateQueue,o===null?(o={lastEffect:null,stores:null},Ye.updateQueue=o,o.stores=[n]):(s=o.stores,s===null?o.stores=[n]:s.push(n))}function $k(n,o,s,u){o.value=s,o.getSnapshot=u,Xk(o)&&Yk(n)}function Gk(n,o,s){return s(function(){Xk(o)&&Yk(n)})}function Xk(n){var o=n.getSnapshot;n=n.value;try{var s=o();return!vn(n,s)}catch(u){return!0}}function Yk(n){var o=Vn(n,1);o!==null&&Tn(o,n,1,-1)}function Qk(n){var o=_n();return typeof n=="function"&&(n=n()),o.memoizedState=o.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:n},o.queue=n,n=n.dispatch=pA.bind(null,Ye,n),[o.memoizedState,n]}function Ki(n,o,s,u){return n={tag:n,create:o,destroy:s,deps:u,next:null},o=Ye.updateQueue,o===null?(o={lastEffect:null,stores:null},Ye.updateQueue=o,o.lastEffect=n.next=n):(s=o.lastEffect,s===null?o.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,o.lastEffect=n)),n}function Zk(){return cn().memoizedState}function _a(n,o,s,u){var f=_n();Ye.flags|=n,f.memoizedState=Ki(1|o,s,void 0,u===void 0?null:u)}function Na(n,o,s,u){var f=cn();u=u===void 0?null:u;var p=void 0;if(dt!==null){var v=dt.memoizedState;if(p=v.destroy,u!==null&&yh(u,v.deps)){f.memoizedState=Ki(o,s,p,u);return}}Ye.flags|=n,f.memoizedState=Ki(1|o,s,p,u)}function Jk(n,o){return _a(8390656,8,n,o)}function xh(n,o){return Na(2048,8,n,o)}function ew(n,o){return Na(4,2,n,o)}function tw(n,o){return Na(4,4,n,o)}function nw(n,o){if(typeof o=="function")return n=n(),o(n),function(){o(null)};if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function rw(n,o,s){return s=s!=null?s.concat([n]):null,Na(4,4,nw.bind(null,o,n),s)}function Sh(){}function ow(n,o){var s=cn();o=o===void 0?null:o;var u=s.memoizedState;return u!==null&&o!==null&&yh(o,u[1])?u[0]:(s.memoizedState=[n,o],n)}function iw(n,o){var s=cn();o=o===void 0?null:o;var u=s.memoizedState;return u!==null&&o!==null&&yh(o,u[1])?u[0]:(n=n(),s.memoizedState=[n,o],n)}function sw(n,o,s){return(Gr&21)===0?(n.baseState&&(n.baseState=!1,qt=!0),n.memoizedState=s):(vn(s,o)||(s=Pb(),Ye.lanes|=s,Xr|=s,n.baseState=!0),o)}function fA(n,o){var s=ze;ze=s!==0&&4>s?s:4,n(!0);var u=vh.transition;vh.transition={};try{n(!1),o()}finally{ze=s,vh.transition=u}}function aw(){return cn().memoizedState}function hA(n,o,s){var u=kr(n);if(s={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null},lw(n))cw(o,s);else if(s=Hk(n,o,s,u),s!==null){var f=Dt();Tn(s,n,u,f),uw(s,o,u)}}function pA(n,o,s){var u=kr(n),f={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null};if(lw(n))cw(o,f);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=o.lastRenderedReducer,p!==null))try{var v=o.lastRenderedState,w=p(v,s);if(f.hasEagerState=!0,f.eagerState=w,vn(w,v)){var E=o.interleaved;E===null?(f.next=f,dh(o)):(f.next=E.next,E.next=f),o.interleaved=f;return}}catch(N){}finally{}s=Hk(n,o,f,u),s!==null&&(f=Dt(),Tn(s,n,u,f),uw(s,o,u))}}function lw(n){var o=n.alternate;return n===Ye||o!==null&&o===Ye}function cw(n,o){qi=Ra=!0;var s=n.pending;s===null?o.next=o:(o.next=s.next,s.next=o),n.pending=o}function uw(n,o,s){if((s&4194240)!==0){var u=o.lanes;u&=n.pendingLanes,s|=u,o.lanes=s,Cf(n,s)}}var Oa={readContext:ln,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useInsertionEffect:Rt,useLayoutEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useMutableSource:Rt,useSyncExternalStore:Rt,useId:Rt,unstable_isNewReconciler:!1},gA={readContext:ln,useCallback:function(n,o){return _n().memoizedState=[n,o===void 0?null:o],n},useContext:ln,useEffect:Jk,useImperativeHandle:function(n,o,s){return s=s!=null?s.concat([n]):null,_a(4194308,4,nw.bind(null,o,n),s)},useLayoutEffect:function(n,o){return _a(4194308,4,n,o)},useInsertionEffect:function(n,o){return _a(4,2,n,o)},useMemo:function(n,o){var s=_n();return o=o===void 0?null:o,n=n(),s.memoizedState=[n,o],n},useReducer:function(n,o,s){var u=_n();return o=s!==void 0?s(o):o,u.memoizedState=u.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},u.queue=n,n=n.dispatch=hA.bind(null,Ye,n),[u.memoizedState,n]},useRef:function(n){var o=_n();return n={current:n},o.memoizedState=n},useState:Qk,useDebugValue:Sh,useDeferredValue:function(n){return _n().memoizedState=n},useTransition:function(){var n=Qk(!1),o=n[0];return n=fA.bind(null,n[1]),_n().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,s){var u=Ye,f=_n();if($e){if(s===void 0)throw Error(t(407));s=s()}else{if(s=o(),kt===null)throw Error(t(349));(Gr&30)!==0||Vk(u,o,s)}f.memoizedState=s;var p={value:s,getSnapshot:o};return f.queue=p,Jk(Gk.bind(null,u,p,n),[n]),u.flags|=2048,Ki(9,$k.bind(null,u,p,s,o),void 0,null),s},useId:function(){var n=_n(),o=kt.identifierPrefix;if($e){var s=Kn,u=Wn;s=(u&~(1<<32-mn(u)-1)).toString(32)+s,o=":"+o+"R"+s,s=Ui++,0<s&&(o+="H"+s.toString(32)),o+=":"}else s=dA++,o=":"+o+"r"+s.toString(32)+":";return n.memoizedState=o},unstable_isNewReconciler:!1},mA={readContext:ln,useCallback:ow,useContext:ln,useEffect:xh,useImperativeHandle:rw,useInsertionEffect:ew,useLayoutEffect:tw,useMemo:iw,useReducer:wh,useRef:Zk,useState:function(){return wh(Wi)},useDebugValue:Sh,useDeferredValue:function(n){var o=cn();return sw(o,dt.memoizedState,n)},useTransition:function(){var n=wh(Wi)[0],o=cn().memoizedState;return[n,o]},useMutableSource:Wk,useSyncExternalStore:Kk,useId:aw,unstable_isNewReconciler:!1},vA={readContext:ln,useCallback:ow,useContext:ln,useEffect:xh,useImperativeHandle:rw,useInsertionEffect:ew,useLayoutEffect:tw,useMemo:iw,useReducer:Th,useRef:Zk,useState:function(){return Th(Wi)},useDebugValue:Sh,useDeferredValue:function(n){var o=cn();return dt===null?o.memoizedState=n:sw(o,dt.memoizedState,n)},useTransition:function(){var n=Th(Wi)[0],o=cn().memoizedState;return[n,o]},useMutableSource:Wk,useSyncExternalStore:Kk,useId:aw,unstable_isNewReconciler:!1};function bn(n,o){if(n&&n.defaultProps){o=Y({},o),n=n.defaultProps;for(var s in n)o[s]===void 0&&(o[s]=n[s]);return o}return o}function Eh(n,o,s,u){o=n.memoizedState,s=s(u,o),s=s==null?o:Y({},o,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var La={isMounted:function(n){return(n=n._reactInternals)?jr(n)===n:!1},enqueueSetState:function(n,o,s){n=n._reactInternals;var u=Dt(),f=kr(n),p=$n(u,f);p.payload=o,s!=null&&(p.callback=s),o=mr(n,p,f),o!==null&&(Tn(o,n,f,u),Ca(o,n,f))},enqueueReplaceState:function(n,o,s){n=n._reactInternals;var u=Dt(),f=kr(n),p=$n(u,f);p.tag=1,p.payload=o,s!=null&&(p.callback=s),o=mr(n,p,f),o!==null&&(Tn(o,n,f,u),Ca(o,n,f))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var s=Dt(),u=kr(n),f=$n(s,u);f.tag=2,o!=null&&(f.callback=o),o=mr(n,f,u),o!==null&&(Tn(o,n,u,s),Ca(o,n,u))}};function dw(n,o,s,u,f,p,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,p,v):o.prototype&&o.prototype.isPureReactComponent?!_i(s,u)||!_i(f,p):!0}function fw(n,o,s){var u=!1,f=hr,p=o.contextType;return typeof p=="object"&&p!==null?p=ln(p):(f=jt(o)?Ur:It.current,u=o.contextTypes,p=(u=u!=null)?Io(n,f):hr),o=new o(s,p),n.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=La,n.stateNode=o,o._reactInternals=n,u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=f,n.__reactInternalMemoizedMaskedChildContext=p),o}function hw(n,o,s,u){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(s,u),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(s,u),o.state!==n&&La.enqueueReplaceState(o,o.state,null)}function Ch(n,o,s,u){var f=n.stateNode;f.props=s,f.state=n.memoizedState,f.refs={},fh(n);var p=o.contextType;typeof p=="object"&&p!==null?f.context=ln(p):(p=jt(o)?Ur:It.current,f.context=Io(n,p)),f.state=n.memoizedState,p=o.getDerivedStateFromProps,typeof p=="function"&&(Eh(n,o,p,s),f.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(o=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),o!==f.state&&La.enqueueReplaceState(f,f.state,null),Ba(n,s,f,u),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308)}function Mo(n,o){try{var s="",u=o;do s+=Se(u),u=u.return;while(u);var f=s}catch(p){f=`
16
16
  Error generating stack: `+p.message+`
17
- `+p.stack}return{value:n,source:r,stack:f,digest:null}}function Ch(n,r,s){return{value:n,source:null,stack:s!=null?s:null,digest:r!=null?r:null}}function Bh(n,r){try{console.error(r.value)}catch(s){setTimeout(function(){throw s})}}var cA=typeof WeakMap=="function"?WeakMap:Map;function uw(n,r,s){s=Kn(-1,s),s.tag=3,s.payload={element:null};var u=r.value;return s.callback=function(){Ha||(Ha=!0,qh=u),Bh(n,r)},s}function dw(n,r,s){s=Kn(-1,s),s.tag=3;var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var f=r.value;s.payload=function(){return u(f)},s.callback=function(){Bh(n,r)}}var p=n.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(s.callback=function(){Bh(n,r),typeof u!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var m=r.stack;this.componentDidCatch(r.value,{componentStack:m!==null?m:""})}),s}function fw(n,r,s){var u=n.pingCache;if(u===null){u=n.pingCache=new cA;var f=new Set;u.set(r,f)}else f=u.get(r),f===void 0&&(f=new Set,u.set(r,f));f.has(s)||(f.add(s),n=xA.bind(null,n,r,s),r.then(n,n))}function hw(n){do{var r;if((r=n.tag===13)&&(r=n.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return n;n=n.return}while(n!==null);return null}function pw(n,r,s,u,f){return(n.mode&1)===0?(n===r?n.flags|=65536:(n.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(r=Kn(-1,1),r.tag=2,pr(s,r,1))),s.lanes|=1),n):(n.flags|=65536,n.lanes=f,n)}var uA=H.ReactCurrentOwner,zt=!1;function Rt(n,r,s,u){r.child=n===null?Lk(r,null,s,u):Ro(r,n.child,s,u)}function gw(n,r,s,u,f){s=s.render;var p=r.ref;return Oo(r,f),u=yh(n,r,s,u,p,f),s=bh(),n!==null&&!zt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~f,Vn(n,r,f)):(Xe&&s&&th(r),r.flags|=1,Rt(n,r,u,f),r.child)}function mw(n,r,s,u,f){if(n===null){var p=s.type;return typeof p=="function"&&!Xh(p)&&p.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(r.tag=15,r.type=p,vw(n,r,p,u,f)):(n=Va(s.type,null,u,r,r.mode,f),n.ref=r.ref,n.return=r,r.child=n)}if(p=n.child,(n.lanes&f)===0){var m=p.memoizedProps;if(s=s.compare,s=s!==null?s:_i,s(m,u)&&n.ref===r.ref)return Vn(n,r,f)}return r.flags|=1,n=kr(p,u),n.ref=r.ref,n.return=r,r.child=n}function vw(n,r,s,u,f){if(n!==null){var p=n.memoizedProps;if(_i(p,u)&&n.ref===r.ref)if(zt=!1,r.pendingProps=u=p,(n.lanes&f)!==0)(n.flags&131072)!==0&&(zt=!0);else return r.lanes=n.lanes,Vn(n,r,f)}return Ah(n,r,s,u,f)}function yw(n,r,s){var u=r.pendingProps,f=u.children,p=n!==null?n.memoizedState:null;if(u.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(Mo,Gt),Gt|=s;else{if((s&1073741824)===0)return n=p!==null?p.baseLanes|s:s,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:n,cachePool:null,transitions:null},r.updateQueue=null,We(Mo,Gt),Gt|=n,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=p!==null?p.baseLanes:s,We(Mo,Gt),Gt|=u}else p!==null?(u=p.baseLanes|s,r.memoizedState=null):u=s,We(Mo,Gt),Gt|=u;return Rt(n,r,f,s),r.child}function bw(n,r){var s=r.ref;(n===null&&s!==null||n!==null&&n.ref!==s)&&(r.flags|=512,r.flags|=2097152)}function Ah(n,r,s,u,f){var p=Ft(s)?jr:Ct.current;return p=Bo(r,p),Oo(r,f),s=yh(n,r,s,u,p,f),u=bh(),n!==null&&!zt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~f,Vn(n,r,f)):(Xe&&u&&th(r),r.flags|=1,Rt(n,r,s,f),r.child)}function kw(n,r,s,u,f){if(Ft(s)){var p=!0;va(r)}else p=!1;if(Oo(r,f),r.stateNode===null)Da(n,r),lw(r,s,u),Sh(r,s,u,f),u=!0;else if(n===null){var m=r.stateNode,k=r.memoizedProps;m.props=k;var E=m.context,R=s.contextType;typeof R=="object"&&R!==null?R=on(R):(R=Ft(s)?jr:Ct.current,R=Bo(r,R));var z=s.getDerivedStateFromProps,j=typeof z=="function"||typeof m.getSnapshotBeforeUpdate=="function";j||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==u||E!==R)&&cw(r,m,u,R),hr=!1;var M=r.memoizedState;m.state=M,Ca(r,u,m,f),E=r.memoizedState,k!==u||M!==E||Mt.current||hr?(typeof z=="function"&&(Eh(r,s,z,u),E=r.memoizedState),(k=hr||aw(r,s,k,u,M,E,R))?(j||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=E),m.props=u,m.state=E,m.context=R,u=k):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,Pk(n,r),k=r.memoizedProps,R=r.type===r.elementType?k:mn(r.type,k),m.props=R,j=r.pendingProps,M=m.context,E=s.contextType,typeof E=="object"&&E!==null?E=on(E):(E=Ft(s)?jr:Ct.current,E=Bo(r,E));var $=s.getDerivedStateFromProps;(z=typeof $=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==j||M!==E)&&cw(r,m,u,E),hr=!1,M=r.memoizedState,m.state=M,Ca(r,u,m,f);var te=r.memoizedState;k!==j||M!==te||Mt.current||hr?(typeof $=="function"&&(Eh(r,s,$,u),te=r.memoizedState),(R=hr||aw(r,s,R,u,M,te,E)||!1)?(z||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,te,E),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,te,E)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===n.memoizedProps&&M===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&M===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=te),m.props=u,m.state=te,m.context=E,u=R):(typeof m.componentDidUpdate!="function"||k===n.memoizedProps&&M===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&M===n.memoizedState||(r.flags|=1024),u=!1)}return Ih(n,r,s,u,p,f)}function Ih(n,r,s,u,f,p){bw(n,r);var m=(r.flags&128)!==0;if(!u&&!m)return f&&Sk(r,s,!1),Vn(n,r,p);u=r.stateNode,uA.current=r;var k=m&&typeof s.getDerivedStateFromError!="function"?null:u.render();return r.flags|=1,n!==null&&m?(r.child=Ro(r,n.child,null,p),r.child=Ro(r,null,k,p)):Rt(n,r,k,p),r.memoizedState=u.state,f&&Sk(r,s,!0),r.child}function ww(n){var r=n.stateNode;r.pendingContext?xk(n,r.pendingContext,r.pendingContext!==r.context):r.context&&xk(n,r.context,!1),fh(n,r.containerInfo)}function Tw(n,r,s,u,f){return _o(),ih(f),r.flags|=256,Rt(n,r,s,u),r.child}var _h={dehydrated:null,treeContext:null,retryLane:0};function Rh(n){return{baseLanes:n,cachePool:null,transitions:null}}function xw(n,r,s){var u=r.pendingProps,f=Qe.current,p=!1,m=(r.flags&128)!==0,k;if((k=m)||(k=n!==null&&n.memoizedState===null?!1:(f&2)!==0),k?(p=!0,r.flags&=-129):(n===null||n.memoizedState!==null)&&(f|=1),We(Qe,f&1),n===null)return oh(r),n=r.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((r.mode&1)===0?r.lanes=1:n.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(m=u.children,n=u.fallback,p?(u=r.mode,p=r.child,m={mode:"hidden",children:m},(u&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=m):p=$a(m,u,0,null),n=Qr(n,u,s,null),p.return=r,n.return=r,p.sibling=n,r.child=p,r.child.memoizedState=Rh(s),r.memoizedState=_h,n):Nh(r,m));if(f=n.memoizedState,f!==null&&(k=f.dehydrated,k!==null))return dA(n,r,m,u,k,f,s);if(p){p=u.fallback,m=r.mode,f=n.child,k=f.sibling;var E={mode:"hidden",children:u.children};return(m&1)===0&&r.child!==f?(u=r.child,u.childLanes=0,u.pendingProps=E,r.deletions=null):(u=kr(f,E),u.subtreeFlags=f.subtreeFlags&14680064),k!==null?p=kr(k,p):(p=Qr(p,m,s,null),p.flags|=2),p.return=r,u.return=r,u.sibling=p,r.child=u,u=p,p=r.child,m=n.child.memoizedState,m=m===null?Rh(s):{baseLanes:m.baseLanes|s,cachePool:null,transitions:m.transitions},p.memoizedState=m,p.childLanes=n.childLanes&~s,r.memoizedState=_h,u}return p=n.child,n=p.sibling,u=kr(p,{mode:"visible",children:u.children}),(r.mode&1)===0&&(u.lanes=s),u.return=r,u.sibling=null,n!==null&&(s=r.deletions,s===null?(r.deletions=[n],r.flags|=16):s.push(n)),r.child=u,r.memoizedState=null,u}function Nh(n,r){return r=$a({mode:"visible",children:r},n.mode,0,null),r.return=n,n.child=r}function La(n,r,s,u){return u!==null&&ih(u),Ro(r,n.child,null,s),n=Nh(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function dA(n,r,s,u,f,p,m){if(s)return r.flags&256?(r.flags&=-257,u=Ch(Error(t(422))),La(n,r,m,u)):r.memoizedState!==null?(r.child=n.child,r.flags|=128,null):(p=u.fallback,f=r.mode,u=$a({mode:"visible",children:u.children},f,0,null),p=Qr(p,f,m,null),p.flags|=2,u.return=r,p.return=r,u.sibling=p,r.child=u,(r.mode&1)!==0&&Ro(r,n.child,null,m),r.child.memoizedState=Rh(m),r.memoizedState=_h,p);if((r.mode&1)===0)return La(n,r,m,null);if(f.data==="$!"){if(u=f.nextSibling&&f.nextSibling.dataset,u)var k=u.dgst;return u=k,p=Error(t(419)),u=Ch(p,u,void 0),La(n,r,m,u)}if(k=(m&n.childLanes)!==0,zt||k){if(u=mt,u!==null){switch(m&-m){case 4:f=2;break;case 16:f=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:f=32;break;case 536870912:f=268435456;break;default:f=0}f=(f&(u.suspendedLanes|m))!==0?0:f,f!==0&&f!==p.retryLane&&(p.retryLane=f,Wn(n,f),bn(u,n,f,-1))}return Gh(),u=Ch(Error(t(421))),La(n,r,m,u)}return f.data==="$?"?(r.flags|=128,r.child=n.child,r=EA.bind(null,n),f._reactRetry=r,null):(n=p.treeContext,$t=cr(f.nextSibling),Vt=r,Xe=!0,gn=null,n!==null&&(nn[rn++]=qn,nn[rn++]=Un,nn[rn++]=qr,qn=n.id,Un=n.overflow,qr=r),r=Nh(r,u.children),r.flags|=4096,r)}function Ew(n,r,s){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),ch(n.return,r,s)}function Oh(n,r,s,u,f){var p=n.memoizedState;p===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:f}:(p.isBackwards=r,p.rendering=null,p.renderingStartTime=0,p.last=u,p.tail=s,p.tailMode=f)}function Sw(n,r,s){var u=r.pendingProps,f=u.revealOrder,p=u.tail;if(Rt(n,r,u.children,s),u=Qe.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Ew(n,s,r);else if(n.tag===19)Ew(n,s,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}u&=1}if(We(Qe,u),(r.mode&1)===0)r.memoizedState=null;else switch(f){case"forwards":for(s=r.child,f=null;s!==null;)n=s.alternate,n!==null&&Ba(n)===null&&(f=s),s=s.sibling;s=f,s===null?(f=r.child,r.child=null):(f=s.sibling,s.sibling=null),Oh(r,!1,f,s,p);break;case"backwards":for(s=null,f=r.child,r.child=null;f!==null;){if(n=f.alternate,n!==null&&Ba(n)===null){r.child=f;break}n=f.sibling,f.sibling=s,s=f,f=n}Oh(r,!0,s,null,p);break;case"together":Oh(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Da(n,r){(r.mode&1)===0&&n!==null&&(n.alternate=null,r.alternate=null,r.flags|=2)}function Vn(n,r,s){if(n!==null&&(r.dependencies=n.dependencies),$r|=r.lanes,(s&r.childLanes)===0)return null;if(n!==null&&r.child!==n.child)throw Error(t(153));if(r.child!==null){for(n=r.child,s=kr(n,n.pendingProps),r.child=s,s.return=r;n.sibling!==null;)n=n.sibling,s=s.sibling=kr(n,n.pendingProps),s.return=r;s.sibling=null}return r.child}function fA(n,r,s){switch(r.tag){case 3:ww(r),_o();break;case 5:zk(r);break;case 1:Ft(r.type)&&va(r);break;case 4:fh(r,r.stateNode.containerInfo);break;case 10:var u=r.type._context,f=r.memoizedProps.value;We(xa,u._currentValue),u._currentValue=f;break;case 13:if(u=r.memoizedState,u!==null)return u.dehydrated!==null?(We(Qe,Qe.current&1),r.flags|=128,null):(s&r.child.childLanes)!==0?xw(n,r,s):(We(Qe,Qe.current&1),n=Vn(n,r,s),n!==null?n.sibling:null);We(Qe,Qe.current&1);break;case 19:if(u=(s&r.childLanes)!==0,(n.flags&128)!==0){if(u)return Sw(n,r,s);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),We(Qe,Qe.current),u)break;return null;case 22:case 23:return r.lanes=0,yw(n,r,s)}return Vn(n,r,s)}var Cw,Lh,Bw,Aw;Cw=function(n,r){for(var s=r.child;s!==null;){if(s.tag===5||s.tag===6)n.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Lh=function(){},Bw=function(n,r,s,u){var f=n.memoizedProps;if(f!==u){n=r.stateNode,Kr(In.current);var p=null;switch(s){case"input":f=cf(n,f),u=cf(n,u),p=[];break;case"select":f=G({},f,{value:void 0}),u=G({},u,{value:void 0}),p=[];break;case"textarea":f=ff(n,f),u=ff(n,u),p=[];break;default:typeof f.onClick!="function"&&typeof u.onClick=="function"&&(n.onclick=pa)}pf(s,u);var m;s=null;for(R in f)if(!u.hasOwnProperty(R)&&f.hasOwnProperty(R)&&f[R]!=null)if(R==="style"){var k=f[R];for(m in k)k.hasOwnProperty(m)&&(s||(s={}),s[m]="")}else R!=="dangerouslySetInnerHTML"&&R!=="children"&&R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(i.hasOwnProperty(R)?p||(p=[]):(p=p||[]).push(R,null));for(R in u){var E=u[R];if(k=f!=null?f[R]:void 0,u.hasOwnProperty(R)&&E!==k&&(E!=null||k!=null))if(R==="style")if(k){for(m in k)!k.hasOwnProperty(m)||E&&E.hasOwnProperty(m)||(s||(s={}),s[m]="");for(m in E)E.hasOwnProperty(m)&&k[m]!==E[m]&&(s||(s={}),s[m]=E[m])}else s||(p||(p=[]),p.push(R,s)),s=E;else R==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,k=k?k.__html:void 0,E!=null&&k!==E&&(p=p||[]).push(R,E)):R==="children"?typeof E!="string"&&typeof E!="number"||(p=p||[]).push(R,""+E):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&(i.hasOwnProperty(R)?(E!=null&&R==="onScroll"&&Ke("scroll",n),p||k===E||(p=[])):(p=p||[]).push(R,E))}s&&(p=p||[]).push("style",s);var R=p;(r.updateQueue=R)&&(r.flags|=4)}},Aw=function(n,r,s,u){s!==u&&(r.flags|=4)};function Ki(n,r){if(!Xe)switch(n.tailMode){case"hidden":r=n.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function At(n){var r=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(r)for(var f=n.child;f!==null;)s|=f.lanes|f.childLanes,u|=f.subtreeFlags&14680064,u|=f.flags&14680064,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)s|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=u,n.childLanes=s,r}function hA(n,r,s){var u=r.pendingProps;switch(nh(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(r),null;case 1:return Ft(r.type)&&ma(),At(r),null;case 3:return u=r.stateNode,Lo(),Ve(Mt),Ve(Ct),gh(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(n===null||n.child===null)&&(wa(r)?r.flags|=4:n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,gn!==null&&(Kh(gn),gn=null))),Lh(n,r),At(r),null;case 5:hh(r);var f=Kr(Hi.current);if(s=r.type,n!==null&&r.stateNode!=null)Bw(n,r,s,u,f),n.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!u){if(r.stateNode===null)throw Error(t(166));return At(r),null}if(n=Kr(In.current),wa(r)){u=r.stateNode,s=r.type;var p=r.memoizedProps;switch(u[An]=r,u[Di]=p,n=(r.mode&1)!==0,s){case"dialog":Ke("cancel",u),Ke("close",u);break;case"iframe":case"object":case"embed":Ke("load",u);break;case"video":case"audio":for(f=0;f<Ni.length;f++)Ke(Ni[f],u);break;case"source":Ke("error",u);break;case"img":case"image":case"link":Ke("error",u),Ke("load",u);break;case"details":Ke("toggle",u);break;case"input":lb(u,p),Ke("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!p.multiple},Ke("invalid",u);break;case"textarea":db(u,p),Ke("invalid",u)}pf(s,p),f=null;for(var m in p)if(p.hasOwnProperty(m)){var k=p[m];m==="children"?typeof k=="string"?u.textContent!==k&&(p.suppressHydrationWarning!==!0&&ha(u.textContent,k,n),f=["children",k]):typeof k=="number"&&u.textContent!==""+k&&(p.suppressHydrationWarning!==!0&&ha(u.textContent,k,n),f=["children",""+k]):i.hasOwnProperty(m)&&k!=null&&m==="onScroll"&&Ke("scroll",u)}switch(s){case"input":nr(u),ub(u,p,!0);break;case"textarea":nr(u),hb(u);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(u.onclick=pa)}u=f,r.updateQueue=u,u!==null&&(r.flags|=4)}else{m=f.nodeType===9?f:f.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=pb(s)),n==="http://www.w3.org/1999/xhtml"?s==="script"?(n=m.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof u.is=="string"?n=m.createElement(s,{is:u.is}):(n=m.createElement(s),s==="select"&&(m=n,u.multiple?m.multiple=!0:u.size&&(m.size=u.size))):n=m.createElementNS(n,s),n[An]=r,n[Di]=u,Cw(n,r,!1,!1),r.stateNode=n;e:{switch(m=gf(s,u),s){case"dialog":Ke("cancel",n),Ke("close",n),f=u;break;case"iframe":case"object":case"embed":Ke("load",n),f=u;break;case"video":case"audio":for(f=0;f<Ni.length;f++)Ke(Ni[f],n);f=u;break;case"source":Ke("error",n),f=u;break;case"img":case"image":case"link":Ke("error",n),Ke("load",n),f=u;break;case"details":Ke("toggle",n),f=u;break;case"input":lb(n,u),f=cf(n,u),Ke("invalid",n);break;case"option":f=u;break;case"select":n._wrapperState={wasMultiple:!!u.multiple},f=G({},u,{value:void 0}),Ke("invalid",n);break;case"textarea":db(n,u),f=ff(n,u),Ke("invalid",n);break;default:f=u}pf(s,f),k=f;for(p in k)if(k.hasOwnProperty(p)){var E=k[p];p==="style"?vb(n,E):p==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&gb(n,E)):p==="children"?typeof E=="string"?(s!=="textarea"||E!=="")&&hi(n,E):typeof E=="number"&&hi(n,""+E):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(i.hasOwnProperty(p)?E!=null&&p==="onScroll"&&Ke("scroll",n):E!=null&&U(n,p,E,m))}switch(s){case"input":nr(n),ub(n,u,!1);break;case"textarea":nr(n),hb(n);break;case"option":u.value!=null&&n.setAttribute("value",""+Pe(u.value));break;case"select":n.multiple=!!u.multiple,p=u.value,p!=null?go(n,!!u.multiple,p,!1):u.defaultValue!=null&&go(n,!!u.multiple,u.defaultValue,!0);break;default:typeof f.onClick=="function"&&(n.onclick=pa)}switch(s){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return At(r),null;case 6:if(n&&r.stateNode!=null)Aw(n,r,n.memoizedProps,u);else{if(typeof u!="string"&&r.stateNode===null)throw Error(t(166));if(s=Kr(Hi.current),Kr(In.current),wa(r)){if(u=r.stateNode,s=r.memoizedProps,u[An]=r,(p=u.nodeValue!==s)&&(n=Vt,n!==null))switch(n.tag){case 3:ha(u.nodeValue,s,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&ha(u.nodeValue,s,(n.mode&1)!==0)}p&&(r.flags|=4)}else u=(s.nodeType===9?s:s.ownerDocument).createTextNode(u),u[An]=r,r.stateNode=u}return At(r),null;case 13:if(Ve(Qe),u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Xe&&$t!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Rk(),_o(),r.flags|=98560,p=!1;else if(p=wa(r),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(t(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(t(317));p[An]=r}else _o(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;At(r),p=!1}else gn!==null&&(Kh(gn),gn=null),p=!0;if(!p)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=s,r):(u=u!==null,u!==(n!==null&&n.memoizedState!==null)&&u&&(r.child.flags|=8192,(r.mode&1)!==0&&(n===null||(Qe.current&1)!==0?ft===0&&(ft=3):Gh())),r.updateQueue!==null&&(r.flags|=4),At(r),null);case 4:return Lo(),Lh(n,r),n===null&&Oi(r.stateNode.containerInfo),At(r),null;case 10:return lh(r.type._context),At(r),null;case 17:return Ft(r.type)&&ma(),At(r),null;case 19:if(Ve(Qe),p=r.memoizedState,p===null)return At(r),null;if(u=(r.flags&128)!==0,m=p.rendering,m===null)if(u)Ki(p,!1);else{if(ft!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=Ba(n),m!==null){for(r.flags|=128,Ki(p,!1),u=m.updateQueue,u!==null&&(r.updateQueue=u,r.flags|=4),r.subtreeFlags=0,u=s,s=r.child;s!==null;)p=s,n=u,p.flags&=14680066,m=p.alternate,m===null?(p.childLanes=0,p.lanes=n,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=m.childLanes,p.lanes=m.lanes,p.child=m.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=m.memoizedProps,p.memoizedState=m.memoizedState,p.updateQueue=m.updateQueue,p.type=m.type,n=m.dependencies,p.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),s=s.sibling;return We(Qe,Qe.current&1|2),r.child}n=n.sibling}p.tail!==null&&nt()>Fo&&(r.flags|=128,u=!0,Ki(p,!1),r.lanes=4194304)}else{if(!u)if(n=Ba(m),n!==null){if(r.flags|=128,u=!0,s=n.updateQueue,s!==null&&(r.updateQueue=s,r.flags|=4),Ki(p,!0),p.tail===null&&p.tailMode==="hidden"&&!m.alternate&&!Xe)return At(r),null}else 2*nt()-p.renderingStartTime>Fo&&s!==1073741824&&(r.flags|=128,u=!0,Ki(p,!1),r.lanes=4194304);p.isBackwards?(m.sibling=r.child,r.child=m):(s=p.last,s!==null?s.sibling=m:r.child=m,p.last=m)}return p.tail!==null?(r=p.tail,p.rendering=r,p.tail=r.sibling,p.renderingStartTime=nt(),r.sibling=null,s=Qe.current,We(Qe,u?s&1|2:s&1),r):(At(r),null);case 22:case 23:return $h(),u=r.memoizedState!==null,n!==null&&n.memoizedState!==null!==u&&(r.flags|=8192),u&&(r.mode&1)!==0?(Gt&1073741824)!==0&&(At(r),r.subtreeFlags&6&&(r.flags|=8192)):At(r),null;case 24:return null;case 25:return null}throw Error(t(156,r.tag))}function pA(n,r){switch(nh(r),r.tag){case 1:return Ft(r.type)&&ma(),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Lo(),Ve(Mt),Ve(Ct),gh(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 5:return hh(r),null;case 13:if(Ve(Qe),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(t(340));_o()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return Ve(Qe),null;case 4:return Lo(),null;case 10:return lh(r.type._context),null;case 22:case 23:return $h(),null;case 24:return null;default:return null}}var Pa=!1,It=!1,gA=typeof WeakSet=="function"?WeakSet:Set,Y=null;function Po(n,r){var s=n.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(u){et(n,r,u)}else s.current=null}function Dh(n,r,s){try{s()}catch(u){et(n,r,u)}}var Iw=!1;function mA(n,r){if($f=na,n=ak(),zf(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var f=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{s.nodeType,p.nodeType}catch(K){s=null;break e}var m=0,k=-1,E=-1,R=0,z=0,j=n,M=null;t:for(;;){for(var $;j!==s||f!==0&&j.nodeType!==3||(k=m+f),j!==p||u!==0&&j.nodeType!==3||(E=m+u),j.nodeType===3&&(m+=j.nodeValue.length),($=j.firstChild)!==null;)M=j,j=$;for(;;){if(j===n)break t;if(M===s&&++R===f&&(k=m),M===p&&++z===u&&(E=m),($=j.nextSibling)!==null)break;j=M,M=j.parentNode}j=$}s=k===-1||E===-1?null:{start:k,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(Gf={focusedElem:n,selectionRange:s},na=!1,Y=r;Y!==null;)if(r=Y,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,Y=n;else for(;Y!==null;){r=Y;try{var te=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(te!==null){var re=te.memoizedProps,rt=te.memoizedState,I=r.stateNode,C=I.getSnapshotBeforeUpdate(r.elementType===r.type?re:mn(r.type,re),rt);I.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var _=r.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(K){et(r,r.return,K)}if(n=r.sibling,n!==null){n.return=r.return,Y=n;break}Y=r.return}return te=Iw,Iw=!1,te}function Vi(n,r,s){var u=r.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var f=u=u.next;do{if((f.tag&n)===n){var p=f.destroy;f.destroy=void 0,p!==void 0&&Dh(r,s,p)}f=f.next}while(f!==u)}}function Ma(n,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&n)===n){var u=s.create;s.destroy=u()}s=s.next}while(s!==r)}}function Ph(n){var r=n.ref;if(r!==null){var s=n.stateNode;switch(n.tag){case 5:n=s;break;default:n=s}typeof r=="function"?r(n):r.current=n}}function _w(n){var r=n.alternate;r!==null&&(n.alternate=null,_w(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&(delete r[An],delete r[Di],delete r[Zf],delete r[ZB],delete r[JB])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Rw(n){return n.tag===5||n.tag===3||n.tag===4}function Nw(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Rw(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Mh(n,r,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?s.nodeType===8?s.parentNode.insertBefore(n,r):s.insertBefore(n,r):(s.nodeType===8?(r=s.parentNode,r.insertBefore(n,s)):(r=s,r.appendChild(n)),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=pa));else if(u!==4&&(n=n.child,n!==null))for(Mh(n,r,s),n=n.sibling;n!==null;)Mh(n,r,s),n=n.sibling}function Fh(n,r,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?s.insertBefore(n,r):s.appendChild(n);else if(u!==4&&(n=n.child,n!==null))for(Fh(n,r,s),n=n.sibling;n!==null;)Fh(n,r,s),n=n.sibling}var kt=null,vn=!1;function gr(n,r,s){for(s=s.child;s!==null;)Ow(n,r,s),s=s.sibling}function Ow(n,r,s){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(Ys,s)}catch(k){}switch(s.tag){case 5:It||Po(s,r);case 6:var u=kt,f=vn;kt=null,gr(n,r,s),kt=u,vn=f,kt!==null&&(vn?(n=kt,s=s.stateNode,n.nodeType===8?n.parentNode.removeChild(s):n.removeChild(s)):kt.removeChild(s.stateNode));break;case 18:kt!==null&&(vn?(n=kt,s=s.stateNode,n.nodeType===8?Qf(n.parentNode,s):n.nodeType===1&&Qf(n,s),Ei(n)):Qf(kt,s.stateNode));break;case 4:u=kt,f=vn,kt=s.stateNode.containerInfo,vn=!0,gr(n,r,s),kt=u,vn=f;break;case 0:case 11:case 14:case 15:if(!It&&(u=s.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){f=u=u.next;do{var p=f,m=p.destroy;p=p.tag,m!==void 0&&((p&2)!==0||(p&4)!==0)&&Dh(s,r,m),f=f.next}while(f!==u)}gr(n,r,s);break;case 1:if(!It&&(Po(s,r),u=s.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=s.memoizedProps,u.state=s.memoizedState,u.componentWillUnmount()}catch(k){et(s,r,k)}gr(n,r,s);break;case 21:gr(n,r,s);break;case 22:s.mode&1?(It=(u=It)||s.memoizedState!==null,gr(n,r,s),It=u):gr(n,r,s);break;default:gr(n,r,s)}}function Lw(n){var r=n.updateQueue;if(r!==null){n.updateQueue=null;var s=n.stateNode;s===null&&(s=n.stateNode=new gA),r.forEach(function(u){var f=SA.bind(null,n,u);s.has(u)||(s.add(u),u.then(f,f))})}}function yn(n,r){var s=r.deletions;if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];try{var p=n,m=r,k=m;e:for(;k!==null;){switch(k.tag){case 5:kt=k.stateNode,vn=!1;break e;case 3:kt=k.stateNode.containerInfo,vn=!0;break e;case 4:kt=k.stateNode.containerInfo,vn=!0;break e}k=k.return}if(kt===null)throw Error(t(160));Ow(p,m,f),kt=null,vn=!1;var E=f.alternate;E!==null&&(E.return=null),f.return=null}catch(R){et(f,r,R)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)Dw(r,n),r=r.sibling}function Dw(n,r){var s=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(yn(r,n),Rn(n),u&4){try{Vi(3,n,n.return),Ma(3,n)}catch(re){et(n,n.return,re)}try{Vi(5,n,n.return)}catch(re){et(n,n.return,re)}}break;case 1:yn(r,n),Rn(n),u&512&&s!==null&&Po(s,s.return);break;case 5:if(yn(r,n),Rn(n),u&512&&s!==null&&Po(s,s.return),n.flags&32){var f=n.stateNode;try{hi(f,"")}catch(re){et(n,n.return,re)}}if(u&4&&(f=n.stateNode,f!=null)){var p=n.memoizedProps,m=s!==null?s.memoizedProps:p,k=n.type,E=n.updateQueue;if(n.updateQueue=null,E!==null)try{k==="input"&&p.type==="radio"&&p.name!=null&&cb(f,p),gf(k,m);var R=gf(k,p);for(m=0;m<E.length;m+=2){var z=E[m],j=E[m+1];z==="style"?vb(f,j):z==="dangerouslySetInnerHTML"?gb(f,j):z==="children"?hi(f,j):U(f,z,j,R)}switch(k){case"input":uf(f,p);break;case"textarea":fb(f,p);break;case"select":var M=f._wrapperState.wasMultiple;f._wrapperState.wasMultiple=!!p.multiple;var $=p.value;$!=null?go(f,!!p.multiple,$,!1):M!==!!p.multiple&&(p.defaultValue!=null?go(f,!!p.multiple,p.defaultValue,!0):go(f,!!p.multiple,p.multiple?[]:"",!1))}f[Di]=p}catch(re){et(n,n.return,re)}}break;case 6:if(yn(r,n),Rn(n),u&4){if(n.stateNode===null)throw Error(t(162));f=n.stateNode,p=n.memoizedProps;try{f.nodeValue=p}catch(re){et(n,n.return,re)}}break;case 3:if(yn(r,n),Rn(n),u&4&&s!==null&&s.memoizedState.isDehydrated)try{Ei(r.containerInfo)}catch(re){et(n,n.return,re)}break;case 4:yn(r,n),Rn(n);break;case 13:yn(r,n),Rn(n),f=n.child,f.flags&8192&&(p=f.memoizedState!==null,f.stateNode.isHidden=p,!p||f.alternate!==null&&f.alternate.memoizedState!==null||(jh=nt())),u&4&&Lw(n);break;case 22:if(z=s!==null&&s.memoizedState!==null,n.mode&1?(It=(R=It)||z,yn(r,n),It=R):yn(r,n),Rn(n),u&8192){if(R=n.memoizedState!==null,(n.stateNode.isHidden=R)&&!z&&(n.mode&1)!==0)for(Y=n,z=n.child;z!==null;){for(j=Y=z;Y!==null;){switch(M=Y,$=M.child,M.tag){case 0:case 11:case 14:case 15:Vi(4,M,M.return);break;case 1:Po(M,M.return);var te=M.stateNode;if(typeof te.componentWillUnmount=="function"){u=M,s=M.return;try{r=u,te.props=r.memoizedProps,te.state=r.memoizedState,te.componentWillUnmount()}catch(re){et(u,s,re)}}break;case 5:Po(M,M.return);break;case 22:if(M.memoizedState!==null){Fw(j);continue}}$!==null?($.return=M,Y=$):Fw(j)}z=z.sibling}e:for(z=null,j=n;;){if(j.tag===5){if(z===null){z=j;try{f=j.stateNode,R?(p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(k=j.stateNode,E=j.memoizedProps.style,m=E!=null&&E.hasOwnProperty("display")?E.display:null,k.style.display=mb("display",m))}catch(re){et(n,n.return,re)}}}else if(j.tag===6){if(z===null)try{j.stateNode.nodeValue=R?"":j.memoizedProps}catch(re){et(n,n.return,re)}}else if((j.tag!==22&&j.tag!==23||j.memoizedState===null||j===n)&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===n)break e;for(;j.sibling===null;){if(j.return===null||j.return===n)break e;z===j&&(z=null),j=j.return}z===j&&(z=null),j.sibling.return=j.return,j=j.sibling}}break;case 19:yn(r,n),Rn(n),u&4&&Lw(n);break;case 21:break;default:yn(r,n),Rn(n)}}function Rn(n){var r=n.flags;if(r&2){try{e:{for(var s=n.return;s!==null;){if(Rw(s)){var u=s;break e}s=s.return}throw Error(t(160))}switch(u.tag){case 5:var f=u.stateNode;u.flags&32&&(hi(f,""),u.flags&=-33);var p=Nw(n);Fh(n,p,f);break;case 3:case 4:var m=u.stateNode.containerInfo,k=Nw(n);Mh(n,k,m);break;default:throw Error(t(161))}}catch(E){et(n,n.return,E)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function vA(n,r,s){Y=n,Pw(n)}function Pw(n,r,s){for(var u=(n.mode&1)!==0;Y!==null;){var f=Y,p=f.child;if(f.tag===22&&u){var m=f.memoizedState!==null||Pa;if(!m){var k=f.alternate,E=k!==null&&k.memoizedState!==null||It;k=Pa;var R=It;if(Pa=m,(It=E)&&!R)for(Y=f;Y!==null;)m=Y,E=m.child,m.tag===22&&m.memoizedState!==null?zw(f):E!==null?(E.return=m,Y=E):zw(f);for(;p!==null;)Y=p,Pw(p),p=p.sibling;Y=f,Pa=k,It=R}Mw(n)}else(f.subtreeFlags&8772)!==0&&p!==null?(p.return=f,Y=p):Mw(n)}}function Mw(n){for(;Y!==null;){var r=Y;if((r.flags&8772)!==0){var s=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:It||Ma(5,r);break;case 1:var u=r.stateNode;if(r.flags&4&&!It)if(s===null)u.componentDidMount();else{var f=r.elementType===r.type?s.memoizedProps:mn(r.type,s.memoizedProps);u.componentDidUpdate(f,s.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var p=r.updateQueue;p!==null&&Fk(r,p,u);break;case 3:var m=r.updateQueue;if(m!==null){if(s=null,r.child!==null)switch(r.child.tag){case 5:s=r.child.stateNode;break;case 1:s=r.child.stateNode}Fk(r,m,s)}break;case 5:var k=r.stateNode;if(s===null&&r.flags&4){s=k;var E=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&s.focus();break;case"img":E.src&&(s.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var R=r.alternate;if(R!==null){var z=R.memoizedState;if(z!==null){var j=z.dehydrated;j!==null&&Ei(j)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}It||r.flags&512&&Ph(r)}catch(M){et(r,r.return,M)}}if(r===n){Y=null;break}if(s=r.sibling,s!==null){s.return=r.return,Y=s;break}Y=r.return}}function Fw(n){for(;Y!==null;){var r=Y;if(r===n){Y=null;break}var s=r.sibling;if(s!==null){s.return=r.return,Y=s;break}Y=r.return}}function zw(n){for(;Y!==null;){var r=Y;try{switch(r.tag){case 0:case 11:case 15:var s=r.return;try{Ma(4,r)}catch(E){et(r,s,E)}break;case 1:var u=r.stateNode;if(typeof u.componentDidMount=="function"){var f=r.return;try{u.componentDidMount()}catch(E){et(r,f,E)}}var p=r.return;try{Ph(r)}catch(E){et(r,p,E)}break;case 5:var m=r.return;try{Ph(r)}catch(E){et(r,m,E)}}}catch(E){et(r,r.return,E)}if(r===n){Y=null;break}var k=r.sibling;if(k!==null){k.return=r.return,Y=k;break}Y=r.return}}var yA=Math.ceil,Fa=H.ReactCurrentDispatcher,zh=H.ReactCurrentOwner,an=H.ReactCurrentBatchConfig,Le=0,mt=null,ct=null,wt=0,Gt=0,Mo=ur(0),ft=0,$i=null,$r=0,za=0,Hh=0,Gi=null,Ht=null,jh=0,Fo=1/0,$n=null,Ha=!1,qh=null,mr=null,ja=!1,vr=null,qa=0,Xi=0,Uh=null,Ua=-1,Wa=0;function Nt(){return(Le&6)!==0?nt():Ua!==-1?Ua:Ua=nt()}function yr(n){return(n.mode&1)===0?1:(Le&2)!==0&&wt!==0?wt&-wt:tA.transition!==null?(Wa===0&&(Wa=Nb()),Wa):(n=He,n!==0||(n=window.event,n=n===void 0?16:jb(n.type)),n)}function bn(n,r,s,u){if(50<Xi)throw Xi=0,Uh=null,Error(t(185));bi(n,s,u),((Le&2)===0||n!==mt)&&(n===mt&&((Le&2)===0&&(za|=s),ft===4&&br(n,wt)),jt(n,u),s===1&&Le===0&&(r.mode&1)===0&&(Fo=nt()+500,ya&&fr()))}function jt(n,r){var s=n.callbackNode;tB(n,r);var u=Js(n,n===mt?wt:0);if(u===0)s!==null&&Ib(s),n.callbackNode=null,n.callbackPriority=0;else if(r=u&-u,n.callbackPriority!==r){if(s!=null&&Ib(s),r===1)n.tag===0?eA(jw.bind(null,n)):Ck(jw.bind(null,n)),YB(function(){(Le&6)===0&&fr()}),s=null;else{switch(Ob(u)){case 1:s=Tf;break;case 4:s=_b;break;case 16:s=Xs;break;case 536870912:s=Rb;break;default:s=Xs}s=Xw(s,Hw.bind(null,n))}n.callbackPriority=r,n.callbackNode=s}}function Hw(n,r){if(Ua=-1,Wa=0,(Le&6)!==0)throw Error(t(327));var s=n.callbackNode;if(zo()&&n.callbackNode!==s)return null;var u=Js(n,n===mt?wt:0);if(u===0)return null;if((u&30)!==0||(u&n.expiredLanes)!==0||r)r=Ka(n,u);else{r=u;var f=Le;Le|=2;var p=Uw();(mt!==n||wt!==r)&&($n=null,Fo=nt()+500,Xr(n,r));do try{wA();break}catch(k){qw(n,k)}while(!0);ah(),Fa.current=p,Le=f,ct!==null?r=0:(mt=null,wt=0,r=ft)}if(r!==0){if(r===2&&(f=xf(n),f!==0&&(u=f,r=Wh(n,f))),r===1)throw s=$i,Xr(n,0),br(n,u),jt(n,nt()),s;if(r===6)br(n,u);else{if(f=n.current.alternate,(u&30)===0&&!bA(f)&&(r=Ka(n,u),r===2&&(p=xf(n),p!==0&&(u=p,r=Wh(n,p))),r===1))throw s=$i,Xr(n,0),br(n,u),jt(n,nt()),s;switch(n.finishedWork=f,n.finishedLanes=u,r){case 0:case 1:throw Error(t(345));case 2:Yr(n,Ht,$n);break;case 3:if(br(n,u),(u&130023424)===u&&(r=jh+500-nt(),10<r)){if(Js(n,0)!==0)break;if(f=n.suspendedLanes,(f&u)!==u){Nt(),n.pingedLanes|=n.suspendedLanes&f;break}n.timeoutHandle=Yf(Yr.bind(null,n,Ht,$n),r);break}Yr(n,Ht,$n);break;case 4:if(br(n,u),(u&4194240)===u)break;for(r=n.eventTimes,f=-1;0<u;){var m=31-hn(u);p=1<<m,m=r[m],m>f&&(f=m),u&=~p}if(u=f,u=nt()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*yA(u/1960))-u,10<u){n.timeoutHandle=Yf(Yr.bind(null,n,Ht,$n),u);break}Yr(n,Ht,$n);break;case 5:Yr(n,Ht,$n);break;default:throw Error(t(329))}}}return jt(n,nt()),n.callbackNode===s?Hw.bind(null,n):null}function Wh(n,r){var s=Gi;return n.current.memoizedState.isDehydrated&&(Xr(n,r).flags|=256),n=Ka(n,r),n!==2&&(r=Ht,Ht=s,r!==null&&Kh(r)),n}function Kh(n){Ht===null?Ht=n:Ht.push.apply(Ht,n)}function bA(n){for(var r=n;;){if(r.flags&16384){var s=r.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var u=0;u<s.length;u++){var f=s[u],p=f.getSnapshot;f=f.value;try{if(!pn(p(),f))return!1}catch(m){return!1}}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function br(n,r){for(r&=~Hh,r&=~za,n.suspendedLanes|=r,n.pingedLanes&=~r,n=n.expirationTimes;0<r;){var s=31-hn(r),u=1<<s;n[s]=-1,r&=~u}}function jw(n){if((Le&6)!==0)throw Error(t(327));zo();var r=Js(n,0);if((r&1)===0)return jt(n,nt()),null;var s=Ka(n,r);if(n.tag!==0&&s===2){var u=xf(n);u!==0&&(r=u,s=Wh(n,u))}if(s===1)throw s=$i,Xr(n,0),br(n,r),jt(n,nt()),s;if(s===6)throw Error(t(345));return n.finishedWork=n.current.alternate,n.finishedLanes=r,Yr(n,Ht,$n),jt(n,nt()),null}function Vh(n,r){var s=Le;Le|=1;try{return n(r)}finally{Le=s,Le===0&&(Fo=nt()+500,ya&&fr())}}function Gr(n){vr!==null&&vr.tag===0&&(Le&6)===0&&zo();var r=Le;Le|=1;var s=an.transition,u=He;try{if(an.transition=null,He=1,n)return n()}finally{He=u,an.transition=s,Le=r,(Le&6)===0&&fr()}}function $h(){Gt=Mo.current,Ve(Mo)}function Xr(n,r){n.finishedWork=null,n.finishedLanes=0;var s=n.timeoutHandle;if(s!==-1&&(n.timeoutHandle=-1,XB(s)),ct!==null)for(s=ct.return;s!==null;){var u=s;switch(nh(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&ma();break;case 3:Lo(),Ve(Mt),Ve(Ct),gh();break;case 5:hh(u);break;case 4:Lo();break;case 13:Ve(Qe);break;case 19:Ve(Qe);break;case 10:lh(u.type._context);break;case 22:case 23:$h()}s=s.return}if(mt=n,ct=n=kr(n.current,null),wt=Gt=r,ft=0,$i=null,Hh=za=$r=0,Ht=Gi=null,Wr!==null){for(r=0;r<Wr.length;r++)if(s=Wr[r],u=s.interleaved,u!==null){s.interleaved=null;var f=u.next,p=s.pending;if(p!==null){var m=p.next;p.next=f,u.next=m}s.pending=u}Wr=null}return n}function qw(n,r){do{var s=ct;try{if(ah(),Aa.current=Na,Ia){for(var u=Ze.memoizedState;u!==null;){var f=u.queue;f!==null&&(f.pending=null),u=u.next}Ia=!1}if(Vr=0,gt=dt=Ze=null,ji=!1,qi=0,zh.current=null,s===null||s.return===null){ft=1,$i=r,ct=null;break}e:{var p=n,m=s.return,k=s,E=r;if(r=wt,k.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var R=E,z=k,j=z.tag;if((z.mode&1)===0&&(j===0||j===11||j===15)){var M=z.alternate;M?(z.updateQueue=M.updateQueue,z.memoizedState=M.memoizedState,z.lanes=M.lanes):(z.updateQueue=null,z.memoizedState=null)}var $=hw(m);if($!==null){$.flags&=-257,pw($,m,k,p,r),$.mode&1&&fw(p,R,r),r=$,E=R;var te=r.updateQueue;if(te===null){var re=new Set;re.add(E),r.updateQueue=re}else te.add(E);break e}else{if((r&1)===0){fw(p,R,r),Gh();break e}E=Error(t(426))}}else if(Xe&&k.mode&1){var rt=hw(m);if(rt!==null){(rt.flags&65536)===0&&(rt.flags|=256),pw(rt,m,k,p,r),ih(Do(E,k));break e}}p=E=Do(E,k),ft!==4&&(ft=2),Gi===null?Gi=[p]:Gi.push(p),p=m;do{switch(p.tag){case 3:p.flags|=65536,r&=-r,p.lanes|=r;var I=uw(p,E,r);Mk(p,I);break e;case 1:k=E;var C=p.type,_=p.stateNode;if((p.flags&128)===0&&(typeof C.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(mr===null||!mr.has(_)))){p.flags|=65536,r&=-r,p.lanes|=r;var K=dw(p,k,r);Mk(p,K);break e}}p=p.return}while(p!==null)}Kw(s)}catch(oe){r=oe,ct===s&&s!==null&&(ct=s=s.return);continue}break}while(!0)}function Uw(){var n=Fa.current;return Fa.current=Na,n===null?Na:n}function Gh(){(ft===0||ft===3||ft===2)&&(ft=4),mt===null||($r&268435455)===0&&(za&268435455)===0||br(mt,wt)}function Ka(n,r){var s=Le;Le|=2;var u=Uw();(mt!==n||wt!==r)&&($n=null,Xr(n,r));do try{kA();break}catch(f){qw(n,f)}while(!0);if(ah(),Le=s,Fa.current=u,ct!==null)throw Error(t(261));return mt=null,wt=0,ft}function kA(){for(;ct!==null;)Ww(ct)}function wA(){for(;ct!==null&&!VC();)Ww(ct)}function Ww(n){var r=Gw(n.alternate,n,Gt);n.memoizedProps=n.pendingProps,r===null?Kw(n):ct=r,zh.current=null}function Kw(n){var r=n;do{var s=r.alternate;if(n=r.return,(r.flags&32768)===0){if(s=hA(s,r,Gt),s!==null){ct=s;return}}else{if(s=pA(s,r),s!==null){s.flags&=32767,ct=s;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{ft=6,ct=null;return}}if(r=r.sibling,r!==null){ct=r;return}ct=r=n}while(r!==null);ft===0&&(ft=5)}function Yr(n,r,s){var u=He,f=an.transition;try{an.transition=null,He=1,TA(n,r,s,u)}finally{an.transition=f,He=u}return null}function TA(n,r,s,u){do zo();while(vr!==null);if((Le&6)!==0)throw Error(t(327));s=n.finishedWork;var f=n.finishedLanes;if(s===null)return null;if(n.finishedWork=null,n.finishedLanes=0,s===n.current)throw Error(t(177));n.callbackNode=null,n.callbackPriority=0;var p=s.lanes|s.childLanes;if(nB(n,p),n===mt&&(ct=mt=null,wt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||ja||(ja=!0,Xw(Xs,function(){return zo(),null})),p=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||p){p=an.transition,an.transition=null;var m=He;He=1;var k=Le;Le|=4,zh.current=null,mA(n,s),Dw(s,n),qB(Gf),na=!!$f,Gf=$f=null,n.current=s,vA(s),$C(),Le=k,He=m,an.transition=p}else n.current=s;if(ja&&(ja=!1,vr=n,qa=f),p=n.pendingLanes,p===0&&(mr=null),YC(s.stateNode),jt(n,nt()),r!==null)for(u=n.onRecoverableError,s=0;s<r.length;s++)f=r[s],u(f.value,{componentStack:f.stack,digest:f.digest});if(Ha)throw Ha=!1,n=qh,qh=null,n;return(qa&1)!==0&&n.tag!==0&&zo(),p=n.pendingLanes,(p&1)!==0?n===Uh?Xi++:(Xi=0,Uh=n):Xi=0,fr(),null}function zo(){if(vr!==null){var n=Ob(qa),r=an.transition,s=He;try{if(an.transition=null,He=16>n?16:n,vr===null)var u=!1;else{if(n=vr,vr=null,qa=0,(Le&6)!==0)throw Error(t(331));var f=Le;for(Le|=4,Y=n.current;Y!==null;){var p=Y,m=p.child;if((Y.flags&16)!==0){var k=p.deletions;if(k!==null){for(var E=0;E<k.length;E++){var R=k[E];for(Y=R;Y!==null;){var z=Y;switch(z.tag){case 0:case 11:case 15:Vi(8,z,p)}var j=z.child;if(j!==null)j.return=z,Y=j;else for(;Y!==null;){z=Y;var M=z.sibling,$=z.return;if(_w(z),z===R){Y=null;break}if(M!==null){M.return=$,Y=M;break}Y=$}}}var te=p.alternate;if(te!==null){var re=te.child;if(re!==null){te.child=null;do{var rt=re.sibling;re.sibling=null,re=rt}while(re!==null)}}Y=p}}if((p.subtreeFlags&2064)!==0&&m!==null)m.return=p,Y=m;else e:for(;Y!==null;){if(p=Y,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:Vi(9,p,p.return)}var I=p.sibling;if(I!==null){I.return=p.return,Y=I;break e}Y=p.return}}var C=n.current;for(Y=C;Y!==null;){m=Y;var _=m.child;if((m.subtreeFlags&2064)!==0&&_!==null)_.return=m,Y=_;else e:for(m=C;Y!==null;){if(k=Y,(k.flags&2048)!==0)try{switch(k.tag){case 0:case 11:case 15:Ma(9,k)}}catch(oe){et(k,k.return,oe)}if(k===m){Y=null;break e}var K=k.sibling;if(K!==null){K.return=k.return,Y=K;break e}Y=k.return}}if(Le=f,fr(),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(Ys,n)}catch(oe){}u=!0}return u}finally{He=s,an.transition=r}}return!1}function Vw(n,r,s){r=Do(s,r),r=uw(n,r,1),n=pr(n,r,1),r=Nt(),n!==null&&(bi(n,1,r),jt(n,r))}function et(n,r,s){if(n.tag===3)Vw(n,n,s);else for(;r!==null;){if(r.tag===3){Vw(r,n,s);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(mr===null||!mr.has(u))){n=Do(s,n),n=dw(r,n,1),r=pr(r,n,1),n=Nt(),r!==null&&(bi(r,1,n),jt(r,n));break}}r=r.return}}function xA(n,r,s){var u=n.pingCache;u!==null&&u.delete(r),r=Nt(),n.pingedLanes|=n.suspendedLanes&s,mt===n&&(wt&s)===s&&(ft===4||ft===3&&(wt&130023424)===wt&&500>nt()-jh?Xr(n,0):Hh|=s),jt(n,r)}function $w(n,r){r===0&&((n.mode&1)===0?r=1:(r=Zs,Zs<<=1,(Zs&130023424)===0&&(Zs=4194304)));var s=Nt();n=Wn(n,r),n!==null&&(bi(n,r,s),jt(n,s))}function EA(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),$w(n,s)}function SA(n,r){var s=0;switch(n.tag){case 13:var u=n.stateNode,f=n.memoizedState;f!==null&&(s=f.retryLane);break;case 19:u=n.stateNode;break;default:throw Error(t(314))}u!==null&&u.delete(r),$w(n,s)}var Gw;Gw=function(n,r,s){if(n!==null)if(n.memoizedProps!==r.pendingProps||Mt.current)zt=!0;else{if((n.lanes&s)===0&&(r.flags&128)===0)return zt=!1,fA(n,r,s);zt=(n.flags&131072)!==0}else zt=!1,Xe&&(r.flags&1048576)!==0&&Bk(r,ka,r.index);switch(r.lanes=0,r.tag){case 2:var u=r.type;Da(n,r),n=r.pendingProps;var f=Bo(r,Ct.current);Oo(r,s),f=yh(null,r,u,n,f,s);var p=bh();return r.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Ft(u)?(p=!0,va(r)):p=!1,r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,dh(r),f.updater=Oa,r.stateNode=f,f._reactInternals=r,Sh(r,u,n,s),r=Ih(null,r,u,!0,p,s)):(r.tag=0,Xe&&p&&th(r),Rt(null,r,f,s),r=r.child),r;case 16:u=r.elementType;e:{switch(Da(n,r),n=r.pendingProps,f=u._init,u=f(u._payload),r.type=u,f=r.tag=BA(u),n=mn(u,n),f){case 0:r=Ah(null,r,u,n,s);break e;case 1:r=kw(null,r,u,n,s);break e;case 11:r=gw(null,r,u,n,s);break e;case 14:r=mw(null,r,u,mn(u.type,n),s);break e}throw Error(t(306,u,""))}return r;case 0:return u=r.type,f=r.pendingProps,f=r.elementType===u?f:mn(u,f),Ah(n,r,u,f,s);case 1:return u=r.type,f=r.pendingProps,f=r.elementType===u?f:mn(u,f),kw(n,r,u,f,s);case 3:e:{if(ww(r),n===null)throw Error(t(387));u=r.pendingProps,p=r.memoizedState,f=p.element,Pk(n,r),Ca(r,u,null,s);var m=r.memoizedState;if(u=m.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},r.updateQueue.baseState=p,r.memoizedState=p,r.flags&256){f=Do(Error(t(423)),r),r=Tw(n,r,u,s,f);break e}else if(u!==f){f=Do(Error(t(424)),r),r=Tw(n,r,u,s,f);break e}else for($t=cr(r.stateNode.containerInfo.firstChild),Vt=r,Xe=!0,gn=null,s=Lk(r,null,u,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(_o(),u===f){r=Vn(n,r,s);break e}Rt(n,r,u,s)}r=r.child}return r;case 5:return zk(r),n===null&&oh(r),u=r.type,f=r.pendingProps,p=n!==null?n.memoizedProps:null,m=f.children,Xf(u,f)?m=null:p!==null&&Xf(u,p)&&(r.flags|=32),bw(n,r),Rt(n,r,m,s),r.child;case 6:return n===null&&oh(r),null;case 13:return xw(n,r,s);case 4:return fh(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=Ro(r,null,u,s):Rt(n,r,u,s),r.child;case 11:return u=r.type,f=r.pendingProps,f=r.elementType===u?f:mn(u,f),gw(n,r,u,f,s);case 7:return Rt(n,r,r.pendingProps,s),r.child;case 8:return Rt(n,r,r.pendingProps.children,s),r.child;case 12:return Rt(n,r,r.pendingProps.children,s),r.child;case 10:e:{if(u=r.type._context,f=r.pendingProps,p=r.memoizedProps,m=f.value,We(xa,u._currentValue),u._currentValue=m,p!==null)if(pn(p.value,m)){if(p.children===f.children&&!Mt.current){r=Vn(n,r,s);break e}}else for(p=r.child,p!==null&&(p.return=r);p!==null;){var k=p.dependencies;if(k!==null){m=p.child;for(var E=k.firstContext;E!==null;){if(E.context===u){if(p.tag===1){E=Kn(-1,s&-s),E.tag=2;var R=p.updateQueue;if(R!==null){R=R.shared;var z=R.pending;z===null?E.next=E:(E.next=z.next,z.next=E),R.pending=E}}p.lanes|=s,E=p.alternate,E!==null&&(E.lanes|=s),ch(p.return,s,r),k.lanes|=s;break}E=E.next}}else if(p.tag===10)m=p.type===r.type?null:p.child;else if(p.tag===18){if(m=p.return,m===null)throw Error(t(341));m.lanes|=s,k=m.alternate,k!==null&&(k.lanes|=s),ch(m,s,r),m=p.sibling}else m=p.child;if(m!==null)m.return=p;else for(m=p;m!==null;){if(m===r){m=null;break}if(p=m.sibling,p!==null){p.return=m.return,m=p;break}m=m.return}p=m}Rt(n,r,f.children,s),r=r.child}return r;case 9:return f=r.type,u=r.pendingProps.children,Oo(r,s),f=on(f),u=u(f),r.flags|=1,Rt(n,r,u,s),r.child;case 14:return u=r.type,f=mn(u,r.pendingProps),f=mn(u.type,f),mw(n,r,u,f,s);case 15:return vw(n,r,r.type,r.pendingProps,s);case 17:return u=r.type,f=r.pendingProps,f=r.elementType===u?f:mn(u,f),Da(n,r),r.tag=1,Ft(u)?(n=!0,va(r)):n=!1,Oo(r,s),lw(r,u,f),Sh(r,u,f,s),Ih(null,r,u,!0,n,s);case 19:return Sw(n,r,s);case 22:return yw(n,r,s)}throw Error(t(156,r.tag))};function Xw(n,r){return Ab(n,r)}function CA(n,r,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(n,r,s,u){return new CA(n,r,s,u)}function Xh(n){return n=n.prototype,!(!n||!n.isReactComponent)}function BA(n){if(typeof n=="function")return Xh(n)?1:0;if(n!=null){if(n=n.$$typeof,n===ye)return 11;if(n===Oe)return 14}return 2}function kr(n,r){var s=n.alternate;return s===null?(s=ln(n.tag,r,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=r,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&14680064,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,r=n.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s}function Va(n,r,s,u,f,p){var m=2;if(u=n,typeof n=="function")Xh(n)&&(m=1);else if(typeof n=="string")m=5;else e:switch(n){case W:return Qr(s.children,f,p,r);case F:m=8,f|=8;break;case ne:return n=ln(12,s,r,f|2),n.elementType=ne,n.lanes=p,n;case Z:return n=ln(13,s,r,f),n.elementType=Z,n.lanes=p,n;case we:return n=ln(19,s,r,f),n.elementType=we,n.lanes=p,n;case _e:return $a(s,f,p,r);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ce:m=10;break e;case Q:m=9;break e;case ye:m=11;break e;case Oe:m=14;break e;case xe:m=16,u=null;break e}throw Error(t(130,n==null?n:typeof n,""))}return r=ln(m,s,r,f),r.elementType=n,r.type=u,r.lanes=p,r}function Qr(n,r,s,u){return n=ln(7,n,u,r),n.lanes=s,n}function $a(n,r,s,u){return n=ln(22,n,u,r),n.elementType=_e,n.lanes=s,n.stateNode={isHidden:!1},n}function Yh(n,r,s){return n=ln(6,n,null,r),n.lanes=s,n}function Qh(n,r,s){return r=ln(4,n.children!==null?n.children:[],n.key,r),r.lanes=s,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}function AA(n,r,s,u,f){this.tag=r,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ef(0),this.expirationTimes=Ef(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ef(0),this.identifierPrefix=u,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function Zh(n,r,s,u,f,p,m,k,E){return n=new AA(n,r,s,k,E),r===1?(r=1,p===!0&&(r|=8)):r=0,p=ln(3,null,null,r),n.current=p,p.stateNode=n,p.memoizedState={element:u,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},dh(p),n}function IA(n,r,s){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:q,key:u==null?null:""+u,children:n,containerInfo:r,implementation:s}}function Yw(n){if(!n)return dr;n=n._reactInternals;e:{if(zr(n)!==n||n.tag!==1)throw Error(t(170));var r=n;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(Ft(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(t(171))}if(n.tag===1){var s=n.type;if(Ft(s))return Ek(n,s,r)}return r}function Qw(n,r,s,u,f,p,m,k,E){return n=Zh(s,u,!0,n,f,p,m,k,E),n.context=Yw(null),s=n.current,u=Nt(),f=yr(s),p=Kn(u,f),p.callback=r!=null?r:null,pr(s,p,f),n.current.lanes=f,bi(n,f,u),jt(n,u),n}function Ga(n,r,s,u){var f=r.current,p=Nt(),m=yr(f);return s=Yw(s),r.context===null?r.context=s:r.pendingContext=s,r=Kn(p,m),r.payload={element:n},u=u===void 0?null:u,u!==null&&(r.callback=u),n=pr(f,r,m),n!==null&&(bn(n,f,m,p),Sa(n,f,m)),m}function Xa(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Zw(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<r?s:r}}function Jh(n,r){Zw(n,r),(n=n.alternate)&&Zw(n,r)}function _A(){return null}var Jw=typeof reportError=="function"?reportError:function(n){console.error(n)};function ep(n){this._internalRoot=n}Ya.prototype.render=ep.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(t(409));Ga(n,r,null,null)},Ya.prototype.unmount=ep.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Gr(function(){Ga(null,n,null,null)}),r[Hn]=null}};function Ya(n){this._internalRoot=n}Ya.prototype.unstable_scheduleHydration=function(n){if(n){var r=Pb();n={blockedOn:null,target:n,priority:r};for(var s=0;s<sr.length&&r!==0&&r<sr[s].priority;s++);sr.splice(s,0,n),s===0&&zb(n)}};function tp(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Qa(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function e0(){}function RA(n,r,s,u,f){if(f){if(typeof u=="function"){var p=u;u=function(){var R=Xa(m);p.call(R)}}var m=Qw(r,u,n,0,null,!1,!1,"",e0);return n._reactRootContainer=m,n[Hn]=m.current,Oi(n.nodeType===8?n.parentNode:n),Gr(),m}for(;f=n.lastChild;)n.removeChild(f);if(typeof u=="function"){var k=u;u=function(){var R=Xa(E);k.call(R)}}var E=Zh(n,0,!1,null,null,!1,!1,"",e0);return n._reactRootContainer=E,n[Hn]=E.current,Oi(n.nodeType===8?n.parentNode:n),Gr(function(){Ga(r,E,s,u)}),E}function Za(n,r,s,u,f){var p=s._reactRootContainer;if(p){var m=p;if(typeof f=="function"){var k=f;f=function(){var E=Xa(m);k.call(E)}}Ga(r,m,n,f)}else m=RA(s,r,n,f,u);return Xa(m)}Lb=function(n){switch(n.tag){case 3:var r=n.stateNode;if(r.current.memoizedState.isDehydrated){var s=yi(r.pendingLanes);s!==0&&(Sf(r,s|1),jt(r,nt()),(Le&6)===0&&(Fo=nt()+500,fr()))}break;case 13:Gr(function(){var u=Wn(n,1);if(u!==null){var f=Nt();bn(u,n,1,f)}}),Jh(n,1)}},Cf=function(n){if(n.tag===13){var r=Wn(n,134217728);if(r!==null){var s=Nt();bn(r,n,134217728,s)}Jh(n,134217728)}},Db=function(n){if(n.tag===13){var r=yr(n),s=Wn(n,r);if(s!==null){var u=Nt();bn(s,n,r,u)}Jh(n,r)}},Pb=function(){return He},Mb=function(n,r){var s=He;try{return He=n,r()}finally{He=s}},yf=function(n,r,s){switch(r){case"input":if(uf(n,s),r=s.name,s.type==="radio"&&r!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<s.length;r++){var u=s[r];if(u!==n&&u.form===n.form){var f=ga(u);if(!f)throw Error(t(90));Fr(u),uf(u,f)}}}break;case"textarea":fb(n,s);break;case"select":r=s.value,r!=null&&go(n,!!s.multiple,r,!1)}},wb=Vh,Tb=Gr;var NA={usingClientEntryPoint:!1,Events:[Pi,So,ga,bb,kb,Vh]},Yi={findFiberByHostInstance:Hr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},OA={bundleType:Yi.bundleType,version:Yi.version,rendererPackageName:Yi.rendererPackageName,rendererConfig:Yi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Cb(n),n===null?null:n.stateNode},findFiberByHostInstance:Yi.findFiberByHostInstance||_A,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Ja=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ja.isDisabled&&Ja.supportsFiber)try{Ys=Ja.inject(OA),Bn=Ja}catch(n){}}return Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NA,Ot.createPortal=function(n,r){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!tp(r))throw Error(t(200));return IA(n,r,null,s)},Ot.createRoot=function(n,r){if(!tp(n))throw Error(t(299));var s=!1,u="",f=Jw;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onRecoverableError!==void 0&&(f=r.onRecoverableError)),r=Zh(n,1,!1,null,null,s,!1,u,f),n[Hn]=r.current,Oi(n.nodeType===8?n.parentNode:n),new ep(r)},Ot.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(t(188)):(n=Object.keys(n).join(","),Error(t(268,n)));return n=Cb(r),n=n===null?null:n.stateNode,n},Ot.flushSync=function(n){return Gr(n)},Ot.hydrate=function(n,r,s){if(!Qa(r))throw Error(t(200));return Za(null,n,r,!0,s)},Ot.hydrateRoot=function(n,r,s){if(!tp(n))throw Error(t(405));var u=s!=null&&s.hydratedSources||null,f=!1,p="",m=Jw;if(s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(m=s.onRecoverableError)),r=Qw(r,null,n,1,s!=null?s:null,f,!1,p,m),n[Hn]=r.current,Oi(n),u)for(n=0;n<u.length;n++)s=u[n],f=s._getVersion,f=f(s._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[s,f]:r.mutableSourceEagerHydrationData.push(s,f);return new Ya(r)},Ot.render=function(n,r,s){if(!Qa(r))throw Error(t(200));return Za(null,n,r,!1,s)},Ot.unmountComponentAtNode=function(n){if(!Qa(n))throw Error(t(40));return n._reactRootContainer?(Gr(function(){Za(null,null,n,!1,function(){n._reactRootContainer=null,n[Hn]=null})}),!0):!1},Ot.unstable_batchedUpdates=Vh,Ot.unstable_renderSubtreeIntoContainer=function(n,r,s,u){if(!Qa(s))throw Error(t(200));if(n==null||n._reactInternals===void 0)throw Error(t(38));return Za(n,r,s,!1,u)},Ot.version="18.3.1-next-f1338f8080-20240426",Ot}var dy;function fy(){if(dy)return pd.exports;dy=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(e){console.error(e)}}return a(),pd.exports=KE(),pd.exports}var hy;function VE(){if(hy)return ys;hy=1;var a=fy();return ys.createRoot=a.createRoot,ys.hydrateRoot=a.hydrateRoot,ys}var py=VE(),$E=fy();const Jo={root:"",alignedStart:"text-start",alignedCenter:"text-center",title:"",description:"opacity-60 mt-[3px]"};class GE{constructor(e){const t=e.alignment==="center"?"center":"start";this.nodes={root:N.make("div",[Jo.root,t==="center"?Jo.alignedCenter:Jo.alignedStart]),title:N.make("div",Jo.title,{textContent:e.title})},this.nodes.root.setAttribute("data-alignment",t),this.nodes.root.appendChild(this.nodes.title),e.description!==void 0&&(this.nodes.description=N.make("div",Jo.description,{textContent:e.description}),this.nodes.root.appendChild(this.nodes.description))}getElement(){return this.nodes.root}}class vd{constructor(e){this.params=e}get name(){if(this.params!==void 0&&"name"in this.params)return this.params.name}destroy(){Qo()}onChildrenOpen(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onOpen)=="function"&&this.params.children.onOpen()}onChildrenClose(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onClose)=="function"&&this.params.children.onClose()}handleClick(){var e,t;this.params!==void 0&&"onActivate"in this.params&&((t=(e=this.params).onActivate)==null||t.call(e,this.params))}addHint(e,t){const o=new GE(t);vs(e,o.getElement(),{placement:t.position,hidingDelay:100})}get children(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.items)!==void 0?this.params.children.items:[]}get hasChildren(){return this.children.length>0}get isChildrenOpen(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.isOpen)===!0}get isChevronHidden(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.hideChevron)===!0}get isChildrenFlippable(){var e;return!(this.params===void 0||!("children"in this.params)||((e=this.params.children)==null?void 0:e.isFlippable)===!1)}get isChildrenSearchable(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.searchable)===!0}get closeOnActivate(){return this.params!==void 0&&"closeOnActivate"in this.params&&this.params.closeOnActivate}get isActive(){return this.params===void 0||!("isActive"in this.params)?!1:typeof this.params.isActive=="function"?this.params.isActive():this.params.isActive===!0}}const En={item:'flex items-center select-none border-none bg-transparent rounded-md p-[var(--item-padding)] text-text-primary mb-px can-hover:hover:cursor-pointer can-hover:hover:bg-item-hover-bg [&[data-blok-force-hover]]:cursor-pointer [&[data-blok-force-hover]]:bg-item-hover-bg [&[data-blok-focused="true"]]:bg-item-focus-bg [&[data-blok-popover-item-no-hover]]:hover:bg-transparent [&[data-blok-popover-item-no-hover]]:cursor-default',itemActive:"bg-icon-active-bg text-icon-active-text",itemDisabled:"cursor-default pointer-events-none text-text-secondary",icon:"flex items-center justify-center w-[26px] h-[26px] [&_svg]:w-icon [&_svg]:h-icon",focused:"is-focused"},gy={item:"rounded p-1"},my={item:"rounded-md p-[3px] mobile:p-1"},je={item:"data-blok-popover-item",icon:"data-blok-popover-item-icon",iconTool:"data-blok-tool",iconChevronRight:"data-blok-popover-item-icon-chevron-right",title:"data-blok-popover-item-title",secondaryTitle:"data-blok-popover-item-secondary-title",active:"data-blok-popover-item-active",hidden:"data-blok-hidden",confirmation:"data-blok-popover-item-confirmation",noHover:"data-blok-popover-item-no-hover",noFocus:"data-blok-popover-item-no-focus",focused:"data-blok-focused",wobble:"data-blok-popover-item-wobble",disabled:"data-blok-disabled"},XE=`
17
+ `+p.stack}return{value:n,source:o,stack:f,digest:null}}function Bh(n,o,s){return{value:n,source:null,stack:s!=null?s:null,digest:o!=null?o:null}}function Ah(n,o){try{console.error(o.value)}catch(s){setTimeout(function(){throw s})}}var yA=typeof WeakMap=="function"?WeakMap:Map;function pw(n,o,s){s=$n(-1,s),s.tag=3,s.payload={element:null};var u=o.value;return s.callback=function(){ja||(ja=!0,Uh=u),Ah(n,o)},s}function gw(n,o,s){s=$n(-1,s),s.tag=3;var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var f=o.value;s.payload=function(){return u(f)},s.callback=function(){Ah(n,o)}}var p=n.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(s.callback=function(){Ah(n,o),typeof u!="function"&&(yr===null?yr=new Set([this]):yr.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})}),s}function mw(n,o,s){var u=n.pingCache;if(u===null){u=n.pingCache=new yA;var f=new Set;u.set(o,f)}else f=u.get(o),f===void 0&&(f=new Set,u.set(o,f));f.has(s)||(f.add(s),n=NA.bind(null,n,o,s),o.then(n,n))}function vw(n){do{var o;if((o=n.tag===13)&&(o=n.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return n;n=n.return}while(n!==null);return null}function yw(n,o,s,u,f){return(n.mode&1)===0?(n===o?n.flags|=65536:(n.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(o=$n(-1,1),o.tag=2,mr(s,o,1))),s.lanes|=1),n):(n.flags|=65536,n.lanes=f,n)}var bA=P.ReactCurrentOwner,qt=!1;function Lt(n,o,s,u){o.child=n===null?Fk(o,null,s,u):Oo(o,n.child,s,u)}function bw(n,o,s,u,f){s=s.render;var p=o.ref;return Do(o,f),u=bh(n,o,s,u,p,f),s=kh(),n!==null&&!qt?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~f,Gn(n,o,f)):($e&&s&&nh(o),o.flags|=1,Lt(n,o,u,f),o.child)}function kw(n,o,s,u,f){if(n===null){var p=s.type;return typeof p=="function"&&!Yh(p)&&p.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(o.tag=15,o.type=p,ww(n,o,p,u,f)):(n=$a(s.type,null,u,o,o.mode,f),n.ref=o.ref,n.return=o,o.child=n)}if(p=n.child,(n.lanes&f)===0){var v=p.memoizedProps;if(s=s.compare,s=s!==null?s:_i,s(v,u)&&n.ref===o.ref)return Gn(n,o,f)}return o.flags|=1,n=Tr(p,u),n.ref=o.ref,n.return=o,o.child=n}function ww(n,o,s,u,f){if(n!==null){var p=n.memoizedProps;if(_i(p,u)&&n.ref===o.ref)if(qt=!1,o.pendingProps=u=p,(n.lanes&f)!==0)(n.flags&131072)!==0&&(qt=!0);else return o.lanes=n.lanes,Gn(n,o,f)}return Ih(n,o,s,u,f)}function Tw(n,o,s){var u=o.pendingProps,f=u.children,p=n!==null?n.memoizedState:null;if(u.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ue(Ho,Qt),Qt|=s;else{if((s&1073741824)===0)return n=p!==null?p.baseLanes|s:s,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:n,cachePool:null,transitions:null},o.updateQueue=null,Ue(Ho,Qt),Qt|=n,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=p!==null?p.baseLanes:s,Ue(Ho,Qt),Qt|=u}else p!==null?(u=p.baseLanes|s,o.memoizedState=null):u=s,Ue(Ho,Qt),Qt|=u;return Lt(n,o,f,s),o.child}function xw(n,o){var s=o.ref;(n===null&&s!==null||n!==null&&n.ref!==s)&&(o.flags|=512,o.flags|=2097152)}function Ih(n,o,s,u,f){var p=jt(s)?Ur:It.current;return p=Io(o,p),Do(o,f),s=bh(n,o,s,u,p,f),u=kh(),n!==null&&!qt?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~f,Gn(n,o,f)):($e&&u&&nh(o),o.flags|=1,Lt(n,o,s,f),o.child)}function Sw(n,o,s,u,f){if(jt(s)){var p=!0;ya(o)}else p=!1;if(Do(o,f),o.stateNode===null)Pa(n,o),fw(o,s,u),Ch(o,s,u,f),u=!0;else if(n===null){var v=o.stateNode,w=o.memoizedProps;v.props=w;var E=v.context,N=s.contextType;typeof N=="object"&&N!==null?N=ln(N):(N=jt(s)?Ur:It.current,N=Io(o,N));var q=s.getDerivedStateFromProps,W=typeof q=="function"||typeof v.getSnapshotBeforeUpdate=="function";W||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(w!==u||E!==N)&&hw(o,v,u,N),gr=!1;var z=o.memoizedState;v.state=z,Ba(o,u,v,f),E=o.memoizedState,w!==u||z!==E||zt.current||gr?(typeof q=="function"&&(Eh(o,s,q,u),E=o.memoizedState),(w=gr||dw(o,s,w,u,z,E,N))?(W||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=u,o.memoizedState=E),v.props=u,v.state=E,v.context=N,u=w):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),u=!1)}else{v=o.stateNode,zk(n,o),w=o.memoizedProps,N=o.type===o.elementType?w:bn(o.type,w),v.props=N,W=o.pendingProps,z=v.context,E=s.contextType,typeof E=="object"&&E!==null?E=ln(E):(E=jt(s)?Ur:It.current,E=Io(o,E));var Q=s.getDerivedStateFromProps;(q=typeof Q=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(w!==W||z!==E)&&hw(o,v,u,E),gr=!1,z=o.memoizedState,v.state=z,Ba(o,u,v,f);var ne=o.memoizedState;w!==W||z!==ne||zt.current||gr?(typeof Q=="function"&&(Eh(o,s,Q,u),ne=o.memoizedState),(N=gr||dw(o,s,N,u,z,ne,E)||!1)?(q||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(u,ne,E),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(u,ne,E)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||w===n.memoizedProps&&z===n.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&z===n.memoizedState||(o.flags|=1024),o.memoizedProps=u,o.memoizedState=ne),v.props=u,v.state=ne,v.context=E,u=N):(typeof v.componentDidUpdate!="function"||w===n.memoizedProps&&z===n.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&z===n.memoizedState||(o.flags|=1024),u=!1)}return Rh(n,o,s,u,p,f)}function Rh(n,o,s,u,f,p){xw(n,o);var v=(o.flags&128)!==0;if(!u&&!v)return f&&Ik(o,s,!1),Gn(n,o,p);u=o.stateNode,bA.current=o;var w=v&&typeof s.getDerivedStateFromError!="function"?null:u.render();return o.flags|=1,n!==null&&v?(o.child=Oo(o,n.child,null,p),o.child=Oo(o,null,w,p)):Lt(n,o,w,p),o.memoizedState=u.state,f&&Ik(o,s,!0),o.child}function Ew(n){var o=n.stateNode;o.pendingContext?Bk(n,o.pendingContext,o.pendingContext!==o.context):o.context&&Bk(n,o.context,!1),hh(n,o.containerInfo)}function Cw(n,o,s,u,f){return No(),sh(f),o.flags|=256,Lt(n,o,s,u),o.child}var _h={dehydrated:null,treeContext:null,retryLane:0};function Nh(n){return{baseLanes:n,cachePool:null,transitions:null}}function Bw(n,o,s){var u=o.pendingProps,f=Xe.current,p=!1,v=(o.flags&128)!==0,w;if((w=v)||(w=n!==null&&n.memoizedState===null?!1:(f&2)!==0),w?(p=!0,o.flags&=-129):(n===null||n.memoizedState!==null)&&(f|=1),Ue(Xe,f&1),n===null)return ih(o),n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((o.mode&1)===0?o.lanes=1:n.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(v=u.children,n=u.fallback,p?(u=o.mode,p=o.child,v={mode:"hidden",children:v},(u&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=v):p=Ga(v,u,0,null),n=Jr(n,u,s,null),p.return=o,n.return=o,p.sibling=n,o.child=p,o.child.memoizedState=Nh(s),o.memoizedState=_h,n):Oh(o,v));if(f=n.memoizedState,f!==null&&(w=f.dehydrated,w!==null))return kA(n,o,v,u,w,f,s);if(p){p=u.fallback,v=o.mode,f=n.child,w=f.sibling;var E={mode:"hidden",children:u.children};return(v&1)===0&&o.child!==f?(u=o.child,u.childLanes=0,u.pendingProps=E,o.deletions=null):(u=Tr(f,E),u.subtreeFlags=f.subtreeFlags&14680064),w!==null?p=Tr(w,p):(p=Jr(p,v,s,null),p.flags|=2),p.return=o,u.return=o,u.sibling=p,o.child=u,u=p,p=o.child,v=n.child.memoizedState,v=v===null?Nh(s):{baseLanes:v.baseLanes|s,cachePool:null,transitions:v.transitions},p.memoizedState=v,p.childLanes=n.childLanes&~s,o.memoizedState=_h,u}return p=n.child,n=p.sibling,u=Tr(p,{mode:"visible",children:u.children}),(o.mode&1)===0&&(u.lanes=s),u.return=o,u.sibling=null,n!==null&&(s=o.deletions,s===null?(o.deletions=[n],o.flags|=16):s.push(n)),o.child=u,o.memoizedState=null,u}function Oh(n,o){return o=Ga({mode:"visible",children:o},n.mode,0,null),o.return=n,n.child=o}function Da(n,o,s,u){return u!==null&&sh(u),Oo(o,n.child,null,s),n=Oh(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function kA(n,o,s,u,f,p,v){if(s)return o.flags&256?(o.flags&=-257,u=Bh(Error(t(422))),Da(n,o,v,u)):o.memoizedState!==null?(o.child=n.child,o.flags|=128,null):(p=u.fallback,f=o.mode,u=Ga({mode:"visible",children:u.children},f,0,null),p=Jr(p,f,v,null),p.flags|=2,u.return=o,p.return=o,u.sibling=p,o.child=u,(o.mode&1)!==0&&Oo(o,n.child,null,v),o.child.memoizedState=Nh(v),o.memoizedState=_h,p);if((o.mode&1)===0)return Da(n,o,v,null);if(f.data==="$!"){if(u=f.nextSibling&&f.nextSibling.dataset,u)var w=u.dgst;return u=w,p=Error(t(419)),u=Bh(p,u,void 0),Da(n,o,v,u)}if(w=(v&n.childLanes)!==0,qt||w){if(u=kt,u!==null){switch(v&-v){case 4:f=2;break;case 16:f=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:f=32;break;case 536870912:f=268435456;break;default:f=0}f=(f&(u.suspendedLanes|v))!==0?0:f,f!==0&&f!==p.retryLane&&(p.retryLane=f,Vn(n,f),Tn(u,n,f,-1))}return Xh(),u=Bh(Error(t(421))),Da(n,o,v,u)}return f.data==="$?"?(o.flags|=128,o.child=n.child,o=OA.bind(null,n),f._reactRetry=o,null):(n=p.treeContext,Yt=dr(f.nextSibling),Xt=o,$e=!0,yn=null,n!==null&&(sn[an++]=Wn,sn[an++]=Kn,sn[an++]=Wr,Wn=n.id,Kn=n.overflow,Wr=o),o=Oh(o,u.children),o.flags|=4096,o)}function Aw(n,o,s){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o),uh(n.return,o,s)}function Lh(n,o,s,u,f){var p=n.memoizedState;p===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:f}:(p.isBackwards=o,p.rendering=null,p.renderingStartTime=0,p.last=u,p.tail=s,p.tailMode=f)}function Iw(n,o,s){var u=o.pendingProps,f=u.revealOrder,p=u.tail;if(Lt(n,o,u.children,s),u=Xe.current,(u&2)!==0)u=u&1|2,o.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Aw(n,s,o);else if(n.tag===19)Aw(n,s,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}u&=1}if(Ue(Xe,u),(o.mode&1)===0)o.memoizedState=null;else switch(f){case"forwards":for(s=o.child,f=null;s!==null;)n=s.alternate,n!==null&&Aa(n)===null&&(f=s),s=s.sibling;s=f,s===null?(f=o.child,o.child=null):(f=s.sibling,s.sibling=null),Lh(o,!1,f,s,p);break;case"backwards":for(s=null,f=o.child,o.child=null;f!==null;){if(n=f.alternate,n!==null&&Aa(n)===null){o.child=f;break}n=f.sibling,f.sibling=s,s=f,f=n}Lh(o,!0,s,null,p);break;case"together":Lh(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Pa(n,o){(o.mode&1)===0&&n!==null&&(n.alternate=null,o.alternate=null,o.flags|=2)}function Gn(n,o,s){if(n!==null&&(o.dependencies=n.dependencies),Xr|=o.lanes,(s&o.childLanes)===0)return null;if(n!==null&&o.child!==n.child)throw Error(t(153));if(o.child!==null){for(n=o.child,s=Tr(n,n.pendingProps),o.child=s,s.return=o;n.sibling!==null;)n=n.sibling,s=s.sibling=Tr(n,n.pendingProps),s.return=o;s.sibling=null}return o.child}function wA(n,o,s){switch(o.tag){case 3:Ew(o),No();break;case 5:Uk(o);break;case 1:jt(o.type)&&ya(o);break;case 4:hh(o,o.stateNode.containerInfo);break;case 10:var u=o.type._context,f=o.memoizedProps.value;Ue(Sa,u._currentValue),u._currentValue=f;break;case 13:if(u=o.memoizedState,u!==null)return u.dehydrated!==null?(Ue(Xe,Xe.current&1),o.flags|=128,null):(s&o.child.childLanes)!==0?Bw(n,o,s):(Ue(Xe,Xe.current&1),n=Gn(n,o,s),n!==null?n.sibling:null);Ue(Xe,Xe.current&1);break;case 19:if(u=(s&o.childLanes)!==0,(n.flags&128)!==0){if(u)return Iw(n,o,s);o.flags|=128}if(f=o.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Ue(Xe,Xe.current),u)break;return null;case 22:case 23:return o.lanes=0,Tw(n,o,s)}return Gn(n,o,s)}var Rw,Dh,_w,Nw;Rw=function(n,o){for(var s=o.child;s!==null;){if(s.tag===5||s.tag===6)n.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Dh=function(){},_w=function(n,o,s,u){var f=n.memoizedProps;if(f!==u){n=o.stateNode,$r(Rn.current);var p=null;switch(s){case"input":f=uf(n,f),u=uf(n,u),p=[];break;case"select":f=Y({},f,{value:void 0}),u=Y({},u,{value:void 0}),p=[];break;case"textarea":f=hf(n,f),u=hf(n,u),p=[];break;default:typeof f.onClick!="function"&&typeof u.onClick=="function"&&(n.onclick=ga)}gf(s,u);var v;s=null;for(N in f)if(!u.hasOwnProperty(N)&&f.hasOwnProperty(N)&&f[N]!=null)if(N==="style"){var w=f[N];for(v in w)w.hasOwnProperty(v)&&(s||(s={}),s[v]="")}else N!=="dangerouslySetInnerHTML"&&N!=="children"&&N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(i.hasOwnProperty(N)?p||(p=[]):(p=p||[]).push(N,null));for(N in u){var E=u[N];if(w=f!=null?f[N]:void 0,u.hasOwnProperty(N)&&E!==w&&(E!=null||w!=null))if(N==="style")if(w){for(v in w)!w.hasOwnProperty(v)||E&&E.hasOwnProperty(v)||(s||(s={}),s[v]="");for(v in E)E.hasOwnProperty(v)&&w[v]!==E[v]&&(s||(s={}),s[v]=E[v])}else s||(p||(p=[]),p.push(N,s)),s=E;else N==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,w=w?w.__html:void 0,E!=null&&w!==E&&(p=p||[]).push(N,E)):N==="children"?typeof E!="string"&&typeof E!="number"||(p=p||[]).push(N,""+E):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&(i.hasOwnProperty(N)?(E!=null&&N==="onScroll"&&We("scroll",n),p||w===E||(p=[])):(p=p||[]).push(N,E))}s&&(p=p||[]).push("style",s);var N=p;(o.updateQueue=N)&&(o.flags|=4)}},Nw=function(n,o,s,u){s!==u&&(o.flags|=4)};function Vi(n,o){if(!$e)switch(n.tailMode){case"hidden":o=n.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function _t(n){var o=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(o)for(var f=n.child;f!==null;)s|=f.lanes|f.childLanes,u|=f.subtreeFlags&14680064,u|=f.flags&14680064,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)s|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=u,n.childLanes=s,o}function TA(n,o,s){var u=o.pendingProps;switch(rh(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(o),null;case 1:return jt(o.type)&&va(),_t(o),null;case 3:return u=o.stateNode,Po(),Ke(zt),Ke(It),mh(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(n===null||n.child===null)&&(Ta(o)?o.flags|=4:n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,yn!==null&&(Vh(yn),yn=null))),Dh(n,o),_t(o),null;case 5:ph(o);var f=$r(ji.current);if(s=o.type,n!==null&&o.stateNode!=null)_w(n,o,s,u,f),n.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!u){if(o.stateNode===null)throw Error(t(166));return _t(o),null}if(n=$r(Rn.current),Ta(o)){u=o.stateNode,s=o.type;var p=o.memoizedProps;switch(u[In]=o,u[Pi]=p,n=(o.mode&1)!==0,s){case"dialog":We("cancel",u),We("close",u);break;case"iframe":case"object":case"embed":We("load",u);break;case"video":case"audio":for(f=0;f<Oi.length;f++)We(Oi[f],u);break;case"source":We("error",u);break;case"img":case"image":case"link":We("error",u),We("load",u);break;case"details":We("toggle",u);break;case"input":fb(u,p),We("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!p.multiple},We("invalid",u);break;case"textarea":gb(u,p),We("invalid",u)}gf(s,p),f=null;for(var v in p)if(p.hasOwnProperty(v)){var w=p[v];v==="children"?typeof w=="string"?u.textContent!==w&&(p.suppressHydrationWarning!==!0&&pa(u.textContent,w,n),f=["children",w]):typeof w=="number"&&u.textContent!==""+w&&(p.suppressHydrationWarning!==!0&&pa(u.textContent,w,n),f=["children",""+w]):i.hasOwnProperty(v)&&w!=null&&v==="onScroll"&&We("scroll",u)}switch(s){case"input":or(u),pb(u,p,!0);break;case"textarea":or(u),vb(u);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(u.onclick=ga)}u=f,o.updateQueue=u,u!==null&&(o.flags|=4)}else{v=f.nodeType===9?f:f.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=yb(s)),n==="http://www.w3.org/1999/xhtml"?s==="script"?(n=v.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof u.is=="string"?n=v.createElement(s,{is:u.is}):(n=v.createElement(s),s==="select"&&(v=n,u.multiple?v.multiple=!0:u.size&&(v.size=u.size))):n=v.createElementNS(n,s),n[In]=o,n[Pi]=u,Rw(n,o,!1,!1),o.stateNode=n;e:{switch(v=mf(s,u),s){case"dialog":We("cancel",n),We("close",n),f=u;break;case"iframe":case"object":case"embed":We("load",n),f=u;break;case"video":case"audio":for(f=0;f<Oi.length;f++)We(Oi[f],n);f=u;break;case"source":We("error",n),f=u;break;case"img":case"image":case"link":We("error",n),We("load",n),f=u;break;case"details":We("toggle",n),f=u;break;case"input":fb(n,u),f=uf(n,u),We("invalid",n);break;case"option":f=u;break;case"select":n._wrapperState={wasMultiple:!!u.multiple},f=Y({},u,{value:void 0}),We("invalid",n);break;case"textarea":gb(n,u),f=hf(n,u),We("invalid",n);break;default:f=u}gf(s,f),w=f;for(p in w)if(w.hasOwnProperty(p)){var E=w[p];p==="style"?wb(n,E):p==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&bb(n,E)):p==="children"?typeof E=="string"?(s!=="textarea"||E!=="")&&pi(n,E):typeof E=="number"&&pi(n,""+E):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(i.hasOwnProperty(p)?E!=null&&p==="onScroll"&&We("scroll",n):E!=null&&H(n,p,E,v))}switch(s){case"input":or(n),pb(n,u,!1);break;case"textarea":or(n),vb(n);break;case"option":u.value!=null&&n.setAttribute("value",""+fe(u.value));break;case"select":n.multiple=!!u.multiple,p=u.value,p!=null?vo(n,!!u.multiple,p,!1):u.defaultValue!=null&&vo(n,!!u.multiple,u.defaultValue,!0);break;default:typeof f.onClick=="function"&&(n.onclick=ga)}switch(s){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return _t(o),null;case 6:if(n&&o.stateNode!=null)Nw(n,o,n.memoizedProps,u);else{if(typeof u!="string"&&o.stateNode===null)throw Error(t(166));if(s=$r(ji.current),$r(Rn.current),Ta(o)){if(u=o.stateNode,s=o.memoizedProps,u[In]=o,(p=u.nodeValue!==s)&&(n=Xt,n!==null))switch(n.tag){case 3:pa(u.nodeValue,s,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&pa(u.nodeValue,s,(n.mode&1)!==0)}p&&(o.flags|=4)}else u=(s.nodeType===9?s:s.ownerDocument).createTextNode(u),u[In]=o,o.stateNode=u}return _t(o),null;case 13:if(Ke(Xe),u=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if($e&&Yt!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Dk(),No(),o.flags|=98560,p=!1;else if(p=Ta(o),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(t(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(t(317));p[In]=o}else No(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;_t(o),p=!1}else yn!==null&&(Vh(yn),yn=null),p=!0;if(!p)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=s,o):(u=u!==null,u!==(n!==null&&n.memoizedState!==null)&&u&&(o.child.flags|=8192,(o.mode&1)!==0&&(n===null||(Xe.current&1)!==0?ft===0&&(ft=3):Xh())),o.updateQueue!==null&&(o.flags|=4),_t(o),null);case 4:return Po(),Dh(n,o),n===null&&Li(o.stateNode.containerInfo),_t(o),null;case 10:return ch(o.type._context),_t(o),null;case 17:return jt(o.type)&&va(),_t(o),null;case 19:if(Ke(Xe),p=o.memoizedState,p===null)return _t(o),null;if(u=(o.flags&128)!==0,v=p.rendering,v===null)if(u)Vi(p,!1);else{if(ft!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(v=Aa(n),v!==null){for(o.flags|=128,Vi(p,!1),u=v.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),o.subtreeFlags=0,u=s,s=o.child;s!==null;)p=s,n=u,p.flags&=14680066,v=p.alternate,v===null?(p.childLanes=0,p.lanes=n,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=v.childLanes,p.lanes=v.lanes,p.child=v.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=v.memoizedProps,p.memoizedState=v.memoizedState,p.updateQueue=v.updateQueue,p.type=v.type,n=v.dependencies,p.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),s=s.sibling;return Ue(Xe,Xe.current&1|2),o.child}n=n.sibling}p.tail!==null&&nt()>zo&&(o.flags|=128,u=!0,Vi(p,!1),o.lanes=4194304)}else{if(!u)if(n=Aa(v),n!==null){if(o.flags|=128,u=!0,s=n.updateQueue,s!==null&&(o.updateQueue=s,o.flags|=4),Vi(p,!0),p.tail===null&&p.tailMode==="hidden"&&!v.alternate&&!$e)return _t(o),null}else 2*nt()-p.renderingStartTime>zo&&s!==1073741824&&(o.flags|=128,u=!0,Vi(p,!1),o.lanes=4194304);p.isBackwards?(v.sibling=o.child,o.child=v):(s=p.last,s!==null?s.sibling=v:o.child=v,p.last=v)}return p.tail!==null?(o=p.tail,p.rendering=o,p.tail=o.sibling,p.renderingStartTime=nt(),o.sibling=null,s=Xe.current,Ue(Xe,u?s&1|2:s&1),o):(_t(o),null);case 22:case 23:return Gh(),u=o.memoizedState!==null,n!==null&&n.memoizedState!==null!==u&&(o.flags|=8192),u&&(o.mode&1)!==0?(Qt&1073741824)!==0&&(_t(o),o.subtreeFlags&6&&(o.flags|=8192)):_t(o),null;case 24:return null;case 25:return null}throw Error(t(156,o.tag))}function xA(n,o){switch(rh(o),o.tag){case 1:return jt(o.type)&&va(),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return Po(),Ke(zt),Ke(It),mh(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 5:return ph(o),null;case 13:if(Ke(Xe),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(t(340));No()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return Ke(Xe),null;case 4:return Po(),null;case 10:return ch(o.type._context),null;case 22:case 23:return Gh(),null;case 24:return null;default:return null}}var Ma=!1,Nt=!1,SA=typeof WeakSet=="function"?WeakSet:Set,J=null;function Fo(n,o){var s=n.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(u){Je(n,o,u)}else s.current=null}function Ph(n,o,s){try{s()}catch(u){Je(n,o,u)}}var Ow=!1;function EA(n,o){if(Gf=ra,n=dk(),zf(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var f=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{s.nodeType,p.nodeType}catch(K){s=null;break e}var v=0,w=-1,E=-1,N=0,q=0,W=n,z=null;t:for(;;){for(var Q;W!==s||f!==0&&W.nodeType!==3||(w=v+f),W!==p||u!==0&&W.nodeType!==3||(E=v+u),W.nodeType===3&&(v+=W.nodeValue.length),(Q=W.firstChild)!==null;)z=W,W=Q;for(;;){if(W===n)break t;if(z===s&&++N===f&&(w=v),z===p&&++q===u&&(E=v),(Q=W.nextSibling)!==null)break;W=z,z=W.parentNode}W=Q}s=w===-1||E===-1?null:{start:w,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(Xf={focusedElem:n,selectionRange:s},ra=!1,J=o;J!==null;)if(o=J,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,J=n;else for(;J!==null;){o=J;try{var ne=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,rt=ne.memoizedState,I=o.stateNode,C=I.getSnapshotBeforeUpdate(o.elementType===o.type?oe:bn(o.type,oe),rt);I.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var _=o.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(K){Je(o,o.return,K)}if(n=o.sibling,n!==null){n.return=o.return,J=n;break}J=o.return}return ne=Ow,Ow=!1,ne}function $i(n,o,s){var u=o.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var f=u=u.next;do{if((f.tag&n)===n){var p=f.destroy;f.destroy=void 0,p!==void 0&&Ph(o,s,p)}f=f.next}while(f!==u)}}function Fa(n,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var s=o=o.next;do{if((s.tag&n)===n){var u=s.create;s.destroy=u()}s=s.next}while(s!==o)}}function Mh(n){var o=n.ref;if(o!==null){var s=n.stateNode;switch(n.tag){case 5:n=s;break;default:n=s}typeof o=="function"?o(n):o.current=n}}function Lw(n){var o=n.alternate;o!==null&&(n.alternate=null,Lw(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&(delete o[In],delete o[Pi],delete o[Jf],delete o[aA],delete o[lA])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Dw(n){return n.tag===5||n.tag===3||n.tag===4}function Pw(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Dw(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Fh(n,o,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,o?s.nodeType===8?s.parentNode.insertBefore(n,o):s.insertBefore(n,o):(s.nodeType===8?(o=s.parentNode,o.insertBefore(n,s)):(o=s,o.appendChild(n)),s=s._reactRootContainer,s!=null||o.onclick!==null||(o.onclick=ga));else if(u!==4&&(n=n.child,n!==null))for(Fh(n,o,s),n=n.sibling;n!==null;)Fh(n,o,s),n=n.sibling}function Hh(n,o,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,o?s.insertBefore(n,o):s.appendChild(n);else if(u!==4&&(n=n.child,n!==null))for(Hh(n,o,s),n=n.sibling;n!==null;)Hh(n,o,s),n=n.sibling}var St=null,kn=!1;function vr(n,o,s){for(s=s.child;s!==null;)Mw(n,o,s),s=s.sibling}function Mw(n,o,s){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(Qs,s)}catch(w){}switch(s.tag){case 5:Nt||Fo(s,o);case 6:var u=St,f=kn;St=null,vr(n,o,s),St=u,kn=f,St!==null&&(kn?(n=St,s=s.stateNode,n.nodeType===8?n.parentNode.removeChild(s):n.removeChild(s)):St.removeChild(s.stateNode));break;case 18:St!==null&&(kn?(n=St,s=s.stateNode,n.nodeType===8?Zf(n.parentNode,s):n.nodeType===1&&Zf(n,s),Ei(n)):Zf(St,s.stateNode));break;case 4:u=St,f=kn,St=s.stateNode.containerInfo,kn=!0,vr(n,o,s),St=u,kn=f;break;case 0:case 11:case 14:case 15:if(!Nt&&(u=s.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){f=u=u.next;do{var p=f,v=p.destroy;p=p.tag,v!==void 0&&((p&2)!==0||(p&4)!==0)&&Ph(s,o,v),f=f.next}while(f!==u)}vr(n,o,s);break;case 1:if(!Nt&&(Fo(s,o),u=s.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=s.memoizedProps,u.state=s.memoizedState,u.componentWillUnmount()}catch(w){Je(s,o,w)}vr(n,o,s);break;case 21:vr(n,o,s);break;case 22:s.mode&1?(Nt=(u=Nt)||s.memoizedState!==null,vr(n,o,s),Nt=u):vr(n,o,s);break;default:vr(n,o,s)}}function Fw(n){var o=n.updateQueue;if(o!==null){n.updateQueue=null;var s=n.stateNode;s===null&&(s=n.stateNode=new SA),o.forEach(function(u){var f=LA.bind(null,n,u);s.has(u)||(s.add(u),u.then(f,f))})}}function wn(n,o){var s=o.deletions;if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];try{var p=n,v=o,w=v;e:for(;w!==null;){switch(w.tag){case 5:St=w.stateNode,kn=!1;break e;case 3:St=w.stateNode.containerInfo,kn=!0;break e;case 4:St=w.stateNode.containerInfo,kn=!0;break e}w=w.return}if(St===null)throw Error(t(160));Mw(p,v,f),St=null,kn=!1;var E=f.alternate;E!==null&&(E.return=null),f.return=null}catch(N){Je(f,o,N)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Hw(o,n),o=o.sibling}function Hw(n,o){var s=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(wn(o,n),Nn(n),u&4){try{$i(3,n,n.return),Fa(3,n)}catch(oe){Je(n,n.return,oe)}try{$i(5,n,n.return)}catch(oe){Je(n,n.return,oe)}}break;case 1:wn(o,n),Nn(n),u&512&&s!==null&&Fo(s,s.return);break;case 5:if(wn(o,n),Nn(n),u&512&&s!==null&&Fo(s,s.return),n.flags&32){var f=n.stateNode;try{pi(f,"")}catch(oe){Je(n,n.return,oe)}}if(u&4&&(f=n.stateNode,f!=null)){var p=n.memoizedProps,v=s!==null?s.memoizedProps:p,w=n.type,E=n.updateQueue;if(n.updateQueue=null,E!==null)try{w==="input"&&p.type==="radio"&&p.name!=null&&hb(f,p),mf(w,v);var N=mf(w,p);for(v=0;v<E.length;v+=2){var q=E[v],W=E[v+1];q==="style"?wb(f,W):q==="dangerouslySetInnerHTML"?bb(f,W):q==="children"?pi(f,W):H(f,q,W,N)}switch(w){case"input":df(f,p);break;case"textarea":mb(f,p);break;case"select":var z=f._wrapperState.wasMultiple;f._wrapperState.wasMultiple=!!p.multiple;var Q=p.value;Q!=null?vo(f,!!p.multiple,Q,!1):z!==!!p.multiple&&(p.defaultValue!=null?vo(f,!!p.multiple,p.defaultValue,!0):vo(f,!!p.multiple,p.multiple?[]:"",!1))}f[Pi]=p}catch(oe){Je(n,n.return,oe)}}break;case 6:if(wn(o,n),Nn(n),u&4){if(n.stateNode===null)throw Error(t(162));f=n.stateNode,p=n.memoizedProps;try{f.nodeValue=p}catch(oe){Je(n,n.return,oe)}}break;case 3:if(wn(o,n),Nn(n),u&4&&s!==null&&s.memoizedState.isDehydrated)try{Ei(o.containerInfo)}catch(oe){Je(n,n.return,oe)}break;case 4:wn(o,n),Nn(n);break;case 13:wn(o,n),Nn(n),f=n.child,f.flags&8192&&(p=f.memoizedState!==null,f.stateNode.isHidden=p,!p||f.alternate!==null&&f.alternate.memoizedState!==null||(qh=nt())),u&4&&Fw(n);break;case 22:if(q=s!==null&&s.memoizedState!==null,n.mode&1?(Nt=(N=Nt)||q,wn(o,n),Nt=N):wn(o,n),Nn(n),u&8192){if(N=n.memoizedState!==null,(n.stateNode.isHidden=N)&&!q&&(n.mode&1)!==0)for(J=n,q=n.child;q!==null;){for(W=J=q;J!==null;){switch(z=J,Q=z.child,z.tag){case 0:case 11:case 14:case 15:$i(4,z,z.return);break;case 1:Fo(z,z.return);var ne=z.stateNode;if(typeof ne.componentWillUnmount=="function"){u=z,s=z.return;try{o=u,ne.props=o.memoizedProps,ne.state=o.memoizedState,ne.componentWillUnmount()}catch(oe){Je(u,s,oe)}}break;case 5:Fo(z,z.return);break;case 22:if(z.memoizedState!==null){qw(W);continue}}Q!==null?(Q.return=z,J=Q):qw(W)}q=q.sibling}e:for(q=null,W=n;;){if(W.tag===5){if(q===null){q=W;try{f=W.stateNode,N?(p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(w=W.stateNode,E=W.memoizedProps.style,v=E!=null&&E.hasOwnProperty("display")?E.display:null,w.style.display=kb("display",v))}catch(oe){Je(n,n.return,oe)}}}else if(W.tag===6){if(q===null)try{W.stateNode.nodeValue=N?"":W.memoizedProps}catch(oe){Je(n,n.return,oe)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===n)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===n)break e;for(;W.sibling===null;){if(W.return===null||W.return===n)break e;q===W&&(q=null),W=W.return}q===W&&(q=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:wn(o,n),Nn(n),u&4&&Fw(n);break;case 21:break;default:wn(o,n),Nn(n)}}function Nn(n){var o=n.flags;if(o&2){try{e:{for(var s=n.return;s!==null;){if(Dw(s)){var u=s;break e}s=s.return}throw Error(t(160))}switch(u.tag){case 5:var f=u.stateNode;u.flags&32&&(pi(f,""),u.flags&=-33);var p=Pw(n);Hh(n,p,f);break;case 3:case 4:var v=u.stateNode.containerInfo,w=Pw(n);Fh(n,w,v);break;default:throw Error(t(161))}}catch(E){Je(n,n.return,E)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function CA(n,o,s){J=n,zw(n)}function zw(n,o,s){for(var u=(n.mode&1)!==0;J!==null;){var f=J,p=f.child;if(f.tag===22&&u){var v=f.memoizedState!==null||Ma;if(!v){var w=f.alternate,E=w!==null&&w.memoizedState!==null||Nt;w=Ma;var N=Nt;if(Ma=v,(Nt=E)&&!N)for(J=f;J!==null;)v=J,E=v.child,v.tag===22&&v.memoizedState!==null?Uw(f):E!==null?(E.return=v,J=E):Uw(f);for(;p!==null;)J=p,zw(p),p=p.sibling;J=f,Ma=w,Nt=N}jw(n)}else(f.subtreeFlags&8772)!==0&&p!==null?(p.return=f,J=p):jw(n)}}function jw(n){for(;J!==null;){var o=J;if((o.flags&8772)!==0){var s=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Nt||Fa(5,o);break;case 1:var u=o.stateNode;if(o.flags&4&&!Nt)if(s===null)u.componentDidMount();else{var f=o.elementType===o.type?s.memoizedProps:bn(o.type,s.memoizedProps);u.componentDidUpdate(f,s.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var p=o.updateQueue;p!==null&&qk(o,p,u);break;case 3:var v=o.updateQueue;if(v!==null){if(s=null,o.child!==null)switch(o.child.tag){case 5:s=o.child.stateNode;break;case 1:s=o.child.stateNode}qk(o,v,s)}break;case 5:var w=o.stateNode;if(s===null&&o.flags&4){s=w;var E=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&s.focus();break;case"img":E.src&&(s.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var N=o.alternate;if(N!==null){var q=N.memoizedState;if(q!==null){var W=q.dehydrated;W!==null&&Ei(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Nt||o.flags&512&&Mh(o)}catch(z){Je(o,o.return,z)}}if(o===n){J=null;break}if(s=o.sibling,s!==null){s.return=o.return,J=s;break}J=o.return}}function qw(n){for(;J!==null;){var o=J;if(o===n){J=null;break}var s=o.sibling;if(s!==null){s.return=o.return,J=s;break}J=o.return}}function Uw(n){for(;J!==null;){var o=J;try{switch(o.tag){case 0:case 11:case 15:var s=o.return;try{Fa(4,o)}catch(E){Je(o,s,E)}break;case 1:var u=o.stateNode;if(typeof u.componentDidMount=="function"){var f=o.return;try{u.componentDidMount()}catch(E){Je(o,f,E)}}var p=o.return;try{Mh(o)}catch(E){Je(o,p,E)}break;case 5:var v=o.return;try{Mh(o)}catch(E){Je(o,v,E)}}}catch(E){Je(o,o.return,E)}if(o===n){J=null;break}var w=o.sibling;if(w!==null){w.return=o.return,J=w;break}J=o.return}}var BA=Math.ceil,Ha=P.ReactCurrentDispatcher,zh=P.ReactCurrentOwner,un=P.ReactCurrentBatchConfig,Pe=0,kt=null,ct=null,Et=0,Qt=0,Ho=fr(0),ft=0,Gi=null,Xr=0,za=0,jh=0,Xi=null,Ut=null,qh=0,zo=1/0,Xn=null,ja=!1,Uh=null,yr=null,qa=!1,br=null,Ua=0,Yi=0,Wh=null,Wa=-1,Ka=0;function Dt(){return(Pe&6)!==0?nt():Wa!==-1?Wa:Wa=nt()}function kr(n){return(n.mode&1)===0?1:(Pe&2)!==0&&Et!==0?Et&-Et:uA.transition!==null?(Ka===0&&(Ka=Pb()),Ka):(n=ze,n!==0||(n=window.event,n=n===void 0?16:Kb(n.type)),n)}function Tn(n,o,s,u){if(50<Yi)throw Yi=0,Wh=null,Error(t(185));ki(n,s,u),((Pe&2)===0||n!==kt)&&(n===kt&&((Pe&2)===0&&(za|=s),ft===4&&wr(n,Et)),Wt(n,u),s===1&&Pe===0&&(o.mode&1)===0&&(zo=nt()+500,ba&&pr()))}function Wt(n,o){var s=n.callbackNode;uB(n,o);var u=ea(n,n===kt?Et:0);if(u===0)s!==null&&Ob(s),n.callbackNode=null,n.callbackPriority=0;else if(o=u&-u,n.callbackPriority!==o){if(s!=null&&Ob(s),o===1)n.tag===0?cA(Kw.bind(null,n)):Rk(Kw.bind(null,n)),iA(function(){(Pe&6)===0&&pr()}),s=null;else{switch(Mb(u)){case 1:s=xf;break;case 4:s=Lb;break;case 16:s=Ys;break;case 536870912:s=Db;break;default:s=Ys}s=Jw(s,Ww.bind(null,n))}n.callbackPriority=o,n.callbackNode=s}}function Ww(n,o){if(Wa=-1,Ka=0,(Pe&6)!==0)throw Error(t(327));var s=n.callbackNode;if(jo()&&n.callbackNode!==s)return null;var u=ea(n,n===kt?Et:0);if(u===0)return null;if((u&30)!==0||(u&n.expiredLanes)!==0||o)o=Va(n,u);else{o=u;var f=Pe;Pe|=2;var p=$w();(kt!==n||Et!==o)&&(Xn=null,zo=nt()+500,Qr(n,o));do try{RA();break}catch(w){Vw(n,w)}while(!0);lh(),Ha.current=p,Pe=f,ct!==null?o=0:(kt=null,Et=0,o=ft)}if(o!==0){if(o===2&&(f=Sf(n),f!==0&&(u=f,o=Kh(n,f))),o===1)throw s=Gi,Qr(n,0),wr(n,u),Wt(n,nt()),s;if(o===6)wr(n,u);else{if(f=n.current.alternate,(u&30)===0&&!AA(f)&&(o=Va(n,u),o===2&&(p=Sf(n),p!==0&&(u=p,o=Kh(n,p))),o===1))throw s=Gi,Qr(n,0),wr(n,u),Wt(n,nt()),s;switch(n.finishedWork=f,n.finishedLanes=u,o){case 0:case 1:throw Error(t(345));case 2:Zr(n,Ut,Xn);break;case 3:if(wr(n,u),(u&130023424)===u&&(o=qh+500-nt(),10<o)){if(ea(n,0)!==0)break;if(f=n.suspendedLanes,(f&u)!==u){Dt(),n.pingedLanes|=n.suspendedLanes&f;break}n.timeoutHandle=Qf(Zr.bind(null,n,Ut,Xn),o);break}Zr(n,Ut,Xn);break;case 4:if(wr(n,u),(u&4194240)===u)break;for(o=n.eventTimes,f=-1;0<u;){var v=31-mn(u);p=1<<v,v=o[v],v>f&&(f=v),u&=~p}if(u=f,u=nt()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*BA(u/1960))-u,10<u){n.timeoutHandle=Qf(Zr.bind(null,n,Ut,Xn),u);break}Zr(n,Ut,Xn);break;case 5:Zr(n,Ut,Xn);break;default:throw Error(t(329))}}}return Wt(n,nt()),n.callbackNode===s?Ww.bind(null,n):null}function Kh(n,o){var s=Xi;return n.current.memoizedState.isDehydrated&&(Qr(n,o).flags|=256),n=Va(n,o),n!==2&&(o=Ut,Ut=s,o!==null&&Vh(o)),n}function Vh(n){Ut===null?Ut=n:Ut.push.apply(Ut,n)}function AA(n){for(var o=n;;){if(o.flags&16384){var s=o.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var u=0;u<s.length;u++){var f=s[u],p=f.getSnapshot;f=f.value;try{if(!vn(p(),f))return!1}catch(v){return!1}}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function wr(n,o){for(o&=~jh,o&=~za,n.suspendedLanes|=o,n.pingedLanes&=~o,n=n.expirationTimes;0<o;){var s=31-mn(o),u=1<<s;n[s]=-1,o&=~u}}function Kw(n){if((Pe&6)!==0)throw Error(t(327));jo();var o=ea(n,0);if((o&1)===0)return Wt(n,nt()),null;var s=Va(n,o);if(n.tag!==0&&s===2){var u=Sf(n);u!==0&&(o=u,s=Kh(n,u))}if(s===1)throw s=Gi,Qr(n,0),wr(n,o),Wt(n,nt()),s;if(s===6)throw Error(t(345));return n.finishedWork=n.current.alternate,n.finishedLanes=o,Zr(n,Ut,Xn),Wt(n,nt()),null}function $h(n,o){var s=Pe;Pe|=1;try{return n(o)}finally{Pe=s,Pe===0&&(zo=nt()+500,ba&&pr())}}function Yr(n){br!==null&&br.tag===0&&(Pe&6)===0&&jo();var o=Pe;Pe|=1;var s=un.transition,u=ze;try{if(un.transition=null,ze=1,n)return n()}finally{ze=u,un.transition=s,Pe=o,(Pe&6)===0&&pr()}}function Gh(){Qt=Ho.current,Ke(Ho)}function Qr(n,o){n.finishedWork=null,n.finishedLanes=0;var s=n.timeoutHandle;if(s!==-1&&(n.timeoutHandle=-1,oA(s)),ct!==null)for(s=ct.return;s!==null;){var u=s;switch(rh(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&va();break;case 3:Po(),Ke(zt),Ke(It),mh();break;case 5:ph(u);break;case 4:Po();break;case 13:Ke(Xe);break;case 19:Ke(Xe);break;case 10:ch(u.type._context);break;case 22:case 23:Gh()}s=s.return}if(kt=n,ct=n=Tr(n.current,null),Et=Qt=o,ft=0,Gi=null,jh=za=Xr=0,Ut=Xi=null,Vr!==null){for(o=0;o<Vr.length;o++)if(s=Vr[o],u=s.interleaved,u!==null){s.interleaved=null;var f=u.next,p=s.pending;if(p!==null){var v=p.next;p.next=f,u.next=v}s.pending=u}Vr=null}return n}function Vw(n,o){do{var s=ct;try{if(lh(),Ia.current=Oa,Ra){for(var u=Ye.memoizedState;u!==null;){var f=u.queue;f!==null&&(f.pending=null),u=u.next}Ra=!1}if(Gr=0,bt=dt=Ye=null,qi=!1,Ui=0,zh.current=null,s===null||s.return===null){ft=1,Gi=o,ct=null;break}e:{var p=n,v=s.return,w=s,E=o;if(o=Et,w.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var N=E,q=w,W=q.tag;if((q.mode&1)===0&&(W===0||W===11||W===15)){var z=q.alternate;z?(q.updateQueue=z.updateQueue,q.memoizedState=z.memoizedState,q.lanes=z.lanes):(q.updateQueue=null,q.memoizedState=null)}var Q=vw(v);if(Q!==null){Q.flags&=-257,yw(Q,v,w,p,o),Q.mode&1&&mw(p,N,o),o=Q,E=N;var ne=o.updateQueue;if(ne===null){var oe=new Set;oe.add(E),o.updateQueue=oe}else ne.add(E);break e}else{if((o&1)===0){mw(p,N,o),Xh();break e}E=Error(t(426))}}else if($e&&w.mode&1){var rt=vw(v);if(rt!==null){(rt.flags&65536)===0&&(rt.flags|=256),yw(rt,v,w,p,o),sh(Mo(E,w));break e}}p=E=Mo(E,w),ft!==4&&(ft=2),Xi===null?Xi=[p]:Xi.push(p),p=v;do{switch(p.tag){case 3:p.flags|=65536,o&=-o,p.lanes|=o;var I=pw(p,E,o);jk(p,I);break e;case 1:w=E;var C=p.type,_=p.stateNode;if((p.flags&128)===0&&(typeof C.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(yr===null||!yr.has(_)))){p.flags|=65536,o&=-o,p.lanes|=o;var K=gw(p,w,o);jk(p,K);break e}}p=p.return}while(p!==null)}Xw(s)}catch(ie){o=ie,ct===s&&s!==null&&(ct=s=s.return);continue}break}while(!0)}function $w(){var n=Ha.current;return Ha.current=Oa,n===null?Oa:n}function Xh(){(ft===0||ft===3||ft===2)&&(ft=4),kt===null||(Xr&268435455)===0&&(za&268435455)===0||wr(kt,Et)}function Va(n,o){var s=Pe;Pe|=2;var u=$w();(kt!==n||Et!==o)&&(Xn=null,Qr(n,o));do try{IA();break}catch(f){Vw(n,f)}while(!0);if(lh(),Pe=s,Ha.current=u,ct!==null)throw Error(t(261));return kt=null,Et=0,ft}function IA(){for(;ct!==null;)Gw(ct)}function RA(){for(;ct!==null&&!tB();)Gw(ct)}function Gw(n){var o=Zw(n.alternate,n,Qt);n.memoizedProps=n.pendingProps,o===null?Xw(n):ct=o,zh.current=null}function Xw(n){var o=n;do{var s=o.alternate;if(n=o.return,(o.flags&32768)===0){if(s=TA(s,o,Qt),s!==null){ct=s;return}}else{if(s=xA(s,o),s!==null){s.flags&=32767,ct=s;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{ft=6,ct=null;return}}if(o=o.sibling,o!==null){ct=o;return}ct=o=n}while(o!==null);ft===0&&(ft=5)}function Zr(n,o,s){var u=ze,f=un.transition;try{un.transition=null,ze=1,_A(n,o,s,u)}finally{un.transition=f,ze=u}return null}function _A(n,o,s,u){do jo();while(br!==null);if((Pe&6)!==0)throw Error(t(327));s=n.finishedWork;var f=n.finishedLanes;if(s===null)return null;if(n.finishedWork=null,n.finishedLanes=0,s===n.current)throw Error(t(177));n.callbackNode=null,n.callbackPriority=0;var p=s.lanes|s.childLanes;if(dB(n,p),n===kt&&(ct=kt=null,Et=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||qa||(qa=!0,Jw(Ys,function(){return jo(),null})),p=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||p){p=un.transition,un.transition=null;var v=ze;ze=1;var w=Pe;Pe|=4,zh.current=null,EA(n,s),Hw(s,n),QB(Xf),ra=!!Gf,Xf=Gf=null,n.current=s,CA(s),nB(),Pe=w,ze=v,un.transition=p}else n.current=s;if(qa&&(qa=!1,br=n,Ua=f),p=n.pendingLanes,p===0&&(yr=null),iB(s.stateNode),Wt(n,nt()),o!==null)for(u=n.onRecoverableError,s=0;s<o.length;s++)f=o[s],u(f.value,{componentStack:f.stack,digest:f.digest});if(ja)throw ja=!1,n=Uh,Uh=null,n;return(Ua&1)!==0&&n.tag!==0&&jo(),p=n.pendingLanes,(p&1)!==0?n===Wh?Yi++:(Yi=0,Wh=n):Yi=0,pr(),null}function jo(){if(br!==null){var n=Mb(Ua),o=un.transition,s=ze;try{if(un.transition=null,ze=16>n?16:n,br===null)var u=!1;else{if(n=br,br=null,Ua=0,(Pe&6)!==0)throw Error(t(331));var f=Pe;for(Pe|=4,J=n.current;J!==null;){var p=J,v=p.child;if((J.flags&16)!==0){var w=p.deletions;if(w!==null){for(var E=0;E<w.length;E++){var N=w[E];for(J=N;J!==null;){var q=J;switch(q.tag){case 0:case 11:case 15:$i(8,q,p)}var W=q.child;if(W!==null)W.return=q,J=W;else for(;J!==null;){q=J;var z=q.sibling,Q=q.return;if(Lw(q),q===N){J=null;break}if(z!==null){z.return=Q,J=z;break}J=Q}}}var ne=p.alternate;if(ne!==null){var oe=ne.child;if(oe!==null){ne.child=null;do{var rt=oe.sibling;oe.sibling=null,oe=rt}while(oe!==null)}}J=p}}if((p.subtreeFlags&2064)!==0&&v!==null)v.return=p,J=v;else e:for(;J!==null;){if(p=J,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:$i(9,p,p.return)}var I=p.sibling;if(I!==null){I.return=p.return,J=I;break e}J=p.return}}var C=n.current;for(J=C;J!==null;){v=J;var _=v.child;if((v.subtreeFlags&2064)!==0&&_!==null)_.return=v,J=_;else e:for(v=C;J!==null;){if(w=J,(w.flags&2048)!==0)try{switch(w.tag){case 0:case 11:case 15:Fa(9,w)}}catch(ie){Je(w,w.return,ie)}if(w===v){J=null;break e}var K=w.sibling;if(K!==null){K.return=w.return,J=K;break e}J=w.return}}if(Pe=f,pr(),An&&typeof An.onPostCommitFiberRoot=="function")try{An.onPostCommitFiberRoot(Qs,n)}catch(ie){}u=!0}return u}finally{ze=s,un.transition=o}}return!1}function Yw(n,o,s){o=Mo(s,o),o=pw(n,o,1),n=mr(n,o,1),o=Dt(),n!==null&&(ki(n,1,o),Wt(n,o))}function Je(n,o,s){if(n.tag===3)Yw(n,n,s);else for(;o!==null;){if(o.tag===3){Yw(o,n,s);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(yr===null||!yr.has(u))){n=Mo(s,n),n=gw(o,n,1),o=mr(o,n,1),n=Dt(),o!==null&&(ki(o,1,n),Wt(o,n));break}}o=o.return}}function NA(n,o,s){var u=n.pingCache;u!==null&&u.delete(o),o=Dt(),n.pingedLanes|=n.suspendedLanes&s,kt===n&&(Et&s)===s&&(ft===4||ft===3&&(Et&130023424)===Et&&500>nt()-qh?Qr(n,0):jh|=s),Wt(n,o)}function Qw(n,o){o===0&&((n.mode&1)===0?o=1:(o=Js,Js<<=1,(Js&130023424)===0&&(Js=4194304)));var s=Dt();n=Vn(n,o),n!==null&&(ki(n,o,s),Wt(n,s))}function OA(n){var o=n.memoizedState,s=0;o!==null&&(s=o.retryLane),Qw(n,s)}function LA(n,o){var s=0;switch(n.tag){case 13:var u=n.stateNode,f=n.memoizedState;f!==null&&(s=f.retryLane);break;case 19:u=n.stateNode;break;default:throw Error(t(314))}u!==null&&u.delete(o),Qw(n,s)}var Zw;Zw=function(n,o,s){if(n!==null)if(n.memoizedProps!==o.pendingProps||zt.current)qt=!0;else{if((n.lanes&s)===0&&(o.flags&128)===0)return qt=!1,wA(n,o,s);qt=(n.flags&131072)!==0}else qt=!1,$e&&(o.flags&1048576)!==0&&_k(o,wa,o.index);switch(o.lanes=0,o.tag){case 2:var u=o.type;Pa(n,o),n=o.pendingProps;var f=Io(o,It.current);Do(o,s),f=bh(null,o,u,n,f,s);var p=kh();return o.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,jt(u)?(p=!0,ya(o)):p=!1,o.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,fh(o),f.updater=La,o.stateNode=f,f._reactInternals=o,Ch(o,u,n,s),o=Rh(null,o,u,!0,p,s)):(o.tag=0,$e&&p&&nh(o),Lt(null,o,f,s),o=o.child),o;case 16:u=o.elementType;e:{switch(Pa(n,o),n=o.pendingProps,f=u._init,u=f(u._payload),o.type=u,f=o.tag=PA(u),n=bn(u,n),f){case 0:o=Ih(null,o,u,n,s);break e;case 1:o=Sw(null,o,u,n,s);break e;case 11:o=bw(null,o,u,n,s);break e;case 14:o=kw(null,o,u,bn(u.type,n),s);break e}throw Error(t(306,u,""))}return o;case 0:return u=o.type,f=o.pendingProps,f=o.elementType===u?f:bn(u,f),Ih(n,o,u,f,s);case 1:return u=o.type,f=o.pendingProps,f=o.elementType===u?f:bn(u,f),Sw(n,o,u,f,s);case 3:e:{if(Ew(o),n===null)throw Error(t(387));u=o.pendingProps,p=o.memoizedState,f=p.element,zk(n,o),Ba(o,u,null,s);var v=o.memoizedState;if(u=v.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},o.updateQueue.baseState=p,o.memoizedState=p,o.flags&256){f=Mo(Error(t(423)),o),o=Cw(n,o,u,s,f);break e}else if(u!==f){f=Mo(Error(t(424)),o),o=Cw(n,o,u,s,f);break e}else for(Yt=dr(o.stateNode.containerInfo.firstChild),Xt=o,$e=!0,yn=null,s=Fk(o,null,u,s),o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(No(),u===f){o=Gn(n,o,s);break e}Lt(n,o,u,s)}o=o.child}return o;case 5:return Uk(o),n===null&&ih(o),u=o.type,f=o.pendingProps,p=n!==null?n.memoizedProps:null,v=f.children,Yf(u,f)?v=null:p!==null&&Yf(u,p)&&(o.flags|=32),xw(n,o),Lt(n,o,v,s),o.child;case 6:return n===null&&ih(o),null;case 13:return Bw(n,o,s);case 4:return hh(o,o.stateNode.containerInfo),u=o.pendingProps,n===null?o.child=Oo(o,null,u,s):Lt(n,o,u,s),o.child;case 11:return u=o.type,f=o.pendingProps,f=o.elementType===u?f:bn(u,f),bw(n,o,u,f,s);case 7:return Lt(n,o,o.pendingProps,s),o.child;case 8:return Lt(n,o,o.pendingProps.children,s),o.child;case 12:return Lt(n,o,o.pendingProps.children,s),o.child;case 10:e:{if(u=o.type._context,f=o.pendingProps,p=o.memoizedProps,v=f.value,Ue(Sa,u._currentValue),u._currentValue=v,p!==null)if(vn(p.value,v)){if(p.children===f.children&&!zt.current){o=Gn(n,o,s);break e}}else for(p=o.child,p!==null&&(p.return=o);p!==null;){var w=p.dependencies;if(w!==null){v=p.child;for(var E=w.firstContext;E!==null;){if(E.context===u){if(p.tag===1){E=$n(-1,s&-s),E.tag=2;var N=p.updateQueue;if(N!==null){N=N.shared;var q=N.pending;q===null?E.next=E:(E.next=q.next,q.next=E),N.pending=E}}p.lanes|=s,E=p.alternate,E!==null&&(E.lanes|=s),uh(p.return,s,o),w.lanes|=s;break}E=E.next}}else if(p.tag===10)v=p.type===o.type?null:p.child;else if(p.tag===18){if(v=p.return,v===null)throw Error(t(341));v.lanes|=s,w=v.alternate,w!==null&&(w.lanes|=s),uh(v,s,o),v=p.sibling}else v=p.child;if(v!==null)v.return=p;else for(v=p;v!==null;){if(v===o){v=null;break}if(p=v.sibling,p!==null){p.return=v.return,v=p;break}v=v.return}p=v}Lt(n,o,f.children,s),o=o.child}return o;case 9:return f=o.type,u=o.pendingProps.children,Do(o,s),f=ln(f),u=u(f),o.flags|=1,Lt(n,o,u,s),o.child;case 14:return u=o.type,f=bn(u,o.pendingProps),f=bn(u.type,f),kw(n,o,u,f,s);case 15:return ww(n,o,o.type,o.pendingProps,s);case 17:return u=o.type,f=o.pendingProps,f=o.elementType===u?f:bn(u,f),Pa(n,o),o.tag=1,jt(u)?(n=!0,ya(o)):n=!1,Do(o,s),fw(o,u,f),Ch(o,u,f,s),Rh(null,o,u,!0,n,s);case 19:return Iw(n,o,s);case 22:return Tw(n,o,s)}throw Error(t(156,o.tag))};function Jw(n,o){return Nb(n,o)}function DA(n,o,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(n,o,s,u){return new DA(n,o,s,u)}function Yh(n){return n=n.prototype,!(!n||!n.isReactComponent)}function PA(n){if(typeof n=="function")return Yh(n)?1:0;if(n!=null){if(n=n.$$typeof,n===ke)return 11;if(n===Re)return 14}return 2}function Tr(n,o){var s=n.alternate;return s===null?(s=dn(n.tag,o,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=o,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&14680064,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,o=n.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s}function $a(n,o,s,u,f,p){var v=2;if(u=n,typeof n=="function")Yh(n)&&(v=1);else if(typeof n=="string")v=5;else e:switch(n){case U:return Jr(s.children,f,p,o);case M:v=8,f|=8;break;case X:return n=dn(12,s,o,f|2),n.elementType=X,n.lanes=p,n;case Z:return n=dn(13,s,o,f),n.elementType=Z,n.lanes=p,n;case Te:return n=dn(19,s,o,f),n.elementType=Te,n.lanes=p,n;case Ce:return Ga(s,f,p,o);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ae:v=10;break e;case G:v=9;break e;case ke:v=11;break e;case Re:v=14;break e;case xe:v=16,u=null;break e}throw Error(t(130,n==null?n:typeof n,""))}return o=dn(v,s,o,f),o.elementType=n,o.type=u,o.lanes=p,o}function Jr(n,o,s,u){return n=dn(7,n,u,o),n.lanes=s,n}function Ga(n,o,s,u){return n=dn(22,n,u,o),n.elementType=Ce,n.lanes=s,n.stateNode={isHidden:!1},n}function Qh(n,o,s){return n=dn(6,n,null,o),n.lanes=s,n}function Zh(n,o,s){return o=dn(4,n.children!==null?n.children:[],n.key,o),o.lanes=s,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function MA(n,o,s,u,f){this.tag=o,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ef(0),this.expirationTimes=Ef(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ef(0),this.identifierPrefix=u,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function Jh(n,o,s,u,f,p,v,w,E){return n=new MA(n,o,s,w,E),o===1?(o=1,p===!0&&(o|=8)):o=0,p=dn(3,null,null,o),n.current=p,p.stateNode=n,p.memoizedState={element:u,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},fh(p),n}function FA(n,o,s){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:u==null?null:""+u,children:n,containerInfo:o,implementation:s}}function e0(n){if(!n)return hr;n=n._reactInternals;e:{if(jr(n)!==n||n.tag!==1)throw Error(t(170));var o=n;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(jt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(t(171))}if(n.tag===1){var s=n.type;if(jt(s))return Ak(n,s,o)}return o}function t0(n,o,s,u,f,p,v,w,E){return n=Jh(s,u,!0,n,f,p,v,w,E),n.context=e0(null),s=n.current,u=Dt(),f=kr(s),p=$n(u,f),p.callback=o!=null?o:null,mr(s,p,f),n.current.lanes=f,ki(n,f,u),Wt(n,u),n}function Xa(n,o,s,u){var f=o.current,p=Dt(),v=kr(f);return s=e0(s),o.context===null?o.context=s:o.pendingContext=s,o=$n(p,v),o.payload={element:n},u=u===void 0?null:u,u!==null&&(o.callback=u),n=mr(f,o,v),n!==null&&(Tn(n,f,v,p),Ca(n,f,v)),v}function Ya(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function n0(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<o?s:o}}function ep(n,o){n0(n,o),(n=n.alternate)&&n0(n,o)}function HA(){return null}var r0=typeof reportError=="function"?reportError:function(n){console.error(n)};function tp(n){this._internalRoot=n}Qa.prototype.render=tp.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(t(409));Xa(n,o,null,null)},Qa.prototype.unmount=tp.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;Yr(function(){Xa(null,n,null,null)}),o[qn]=null}};function Qa(n){this._internalRoot=n}Qa.prototype.unstable_scheduleHydration=function(n){if(n){var o=zb();n={blockedOn:null,target:n,priority:o};for(var s=0;s<lr.length&&o!==0&&o<lr[s].priority;s++);lr.splice(s,0,n),s===0&&Ub(n)}};function np(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Za(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function o0(){}function zA(n,o,s,u,f){if(f){if(typeof u=="function"){var p=u;u=function(){var N=Ya(v);p.call(N)}}var v=t0(o,u,n,0,null,!1,!1,"",o0);return n._reactRootContainer=v,n[qn]=v.current,Li(n.nodeType===8?n.parentNode:n),Yr(),v}for(;f=n.lastChild;)n.removeChild(f);if(typeof u=="function"){var w=u;u=function(){var N=Ya(E);w.call(N)}}var E=Jh(n,0,!1,null,null,!1,!1,"",o0);return n._reactRootContainer=E,n[qn]=E.current,Li(n.nodeType===8?n.parentNode:n),Yr(function(){Xa(o,E,s,u)}),E}function Ja(n,o,s,u,f){var p=s._reactRootContainer;if(p){var v=p;if(typeof f=="function"){var w=f;f=function(){var E=Ya(v);w.call(E)}}Xa(o,v,n,f)}else v=zA(s,o,n,f,u);return Ya(v)}Fb=function(n){switch(n.tag){case 3:var o=n.stateNode;if(o.current.memoizedState.isDehydrated){var s=bi(o.pendingLanes);s!==0&&(Cf(o,s|1),Wt(o,nt()),(Pe&6)===0&&(zo=nt()+500,pr()))}break;case 13:Yr(function(){var u=Vn(n,1);if(u!==null){var f=Dt();Tn(u,n,1,f)}}),ep(n,1)}},Bf=function(n){if(n.tag===13){var o=Vn(n,134217728);if(o!==null){var s=Dt();Tn(o,n,134217728,s)}ep(n,134217728)}},Hb=function(n){if(n.tag===13){var o=kr(n),s=Vn(n,o);if(s!==null){var u=Dt();Tn(s,n,o,u)}ep(n,o)}},zb=function(){return ze},jb=function(n,o){var s=ze;try{return ze=n,o()}finally{ze=s}},bf=function(n,o,s){switch(o){case"input":if(df(n,s),o=s.name,s.type==="radio"&&o!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<s.length;o++){var u=s[o];if(u!==n&&u.form===n.form){var f=ma(u);if(!f)throw Error(t(90));zr(u),df(u,f)}}}break;case"textarea":mb(n,s);break;case"select":o=s.value,o!=null&&vo(n,!!s.multiple,o,!1)}},Eb=$h,Cb=Yr;var jA={usingClientEntryPoint:!1,Events:[Mi,Bo,ma,xb,Sb,$h]},Qi={findFiberByHostInstance:qr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},qA={bundleType:Qi.bundleType,version:Qi.version,rendererPackageName:Qi.rendererPackageName,rendererConfig:Qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Rb(n),n===null?null:n.stateNode},findFiberByHostInstance:Qi.findFiberByHostInstance||HA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var el=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!el.isDisabled&&el.supportsFiber)try{Qs=el.inject(qA),An=el}catch(n){}}return Pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jA,Pt.createPortal=function(n,o){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!np(o))throw Error(t(200));return FA(n,o,null,s)},Pt.createRoot=function(n,o){if(!np(n))throw Error(t(299));var s=!1,u="",f=r0;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(u=o.identifierPrefix),o.onRecoverableError!==void 0&&(f=o.onRecoverableError)),o=Jh(n,1,!1,null,null,s,!1,u,f),n[qn]=o.current,Li(n.nodeType===8?n.parentNode:n),new tp(o)},Pt.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(t(188)):(n=Object.keys(n).join(","),Error(t(268,n)));return n=Rb(o),n=n===null?null:n.stateNode,n},Pt.flushSync=function(n){return Yr(n)},Pt.hydrate=function(n,o,s){if(!Za(o))throw Error(t(200));return Ja(null,n,o,!0,s)},Pt.hydrateRoot=function(n,o,s){if(!np(n))throw Error(t(405));var u=s!=null&&s.hydratedSources||null,f=!1,p="",v=r0;if(s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),o=t0(o,null,n,1,s!=null?s:null,f,!1,p,v),n[qn]=o.current,Li(n),u)for(n=0;n<u.length;n++)s=u[n],f=s._getVersion,f=f(s._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[s,f]:o.mutableSourceEagerHydrationData.push(s,f);return new Qa(o)},Pt.render=function(n,o,s){if(!Za(o))throw Error(t(200));return Ja(null,n,o,!1,s)},Pt.unmountComponentAtNode=function(n){if(!Za(n))throw Error(t(40));return n._reactRootContainer?(Yr(function(){Ja(null,null,n,!1,function(){n._reactRootContainer=null,n[qn]=null})}),!0):!1},Pt.unstable_batchedUpdates=$h,Pt.unstable_renderSubtreeIntoContainer=function(n,o,s,u){if(!Za(s))throw Error(t(200));if(n==null||n._reactInternals===void 0)throw Error(t(38));return Ja(n,o,s,!1,u)},Pt.version="18.3.1-next-f1338f8080-20240426",Pt}var dy;function fy(){if(dy)return md.exports;dy=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(e){console.error(e)}}return a(),md.exports=QS(),md.exports}var hy;function ZS(){if(hy)return ks;hy=1;var a=fy();return ks.createRoot=a.createRoot,ks.hydrateRoot=a.hydrateRoot,ks}var so=ZS(),st=fy();const ti={root:"",alignedStart:"text-start",alignedCenter:"text-center",title:"",description:"opacity-60 mt-[3px]"};class JS{constructor(e){const t=e.alignment==="center"?"center":"start";this.nodes={root:L.make("div",[ti.root,t==="center"?ti.alignedCenter:ti.alignedStart]),title:L.make("div",ti.title,{textContent:e.title})},this.nodes.root.setAttribute("data-alignment",t),this.nodes.root.appendChild(this.nodes.title),e.description!==void 0&&(this.nodes.description=L.make("div",ti.description,{textContent:e.description}),this.nodes.root.appendChild(this.nodes.description))}getElement(){return this.nodes.root}}class bd{constructor(e){this.params=e}get name(){if(this.params!==void 0&&"name"in this.params)return this.params.name}destroy(){Jo()}onChildrenOpen(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onOpen)=="function"&&this.params.children.onOpen()}onChildrenClose(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onClose)=="function"&&this.params.children.onClose()}handleClick(){var e,t;this.params!==void 0&&"onActivate"in this.params&&((t=(e=this.params).onActivate)==null||t.call(e,this.params))}addHint(e,t){const r=new JS(t);ys(e,r.getElement(),{placement:t.position,hidingDelay:100})}get children(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.items)!==void 0?this.params.children.items:[]}get hasChildren(){return this.children.length>0}get isChildrenOpen(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.isOpen)===!0}get isChevronHidden(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.hideChevron)===!0}get isChildrenFlippable(){var e;return!(this.params===void 0||!("children"in this.params)||((e=this.params.children)==null?void 0:e.isFlippable)===!1)}get isChildrenSearchable(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.searchable)===!0}get closeOnActivate(){return this.params!==void 0&&"closeOnActivate"in this.params&&this.params.closeOnActivate}get isActive(){return this.params===void 0||!("isActive"in this.params)?!1:typeof this.params.isActive=="function"?this.params.isActive():this.params.isActive===!0}}const Ir={item:'flex items-center select-none border-none bg-transparent rounded-md p-[var(--item-padding)] text-text-primary mb-px can-hover:hover:cursor-pointer can-hover:hover:bg-item-hover-bg [&[data-blok-force-hover]]:cursor-pointer [&[data-blok-force-hover]]:bg-item-hover-bg [&[data-blok-focused="true"]]:bg-item-focus-bg [&[data-blok-popover-item-no-hover]]:hover:bg-transparent [&[data-blok-popover-item-no-hover]]:cursor-default',itemActive:"bg-icon-active-bg text-icon-active-text",itemDisabled:"cursor-default pointer-events-none text-text-secondary",icon:"flex items-center justify-center w-[26px] h-[26px] [&_svg]:w-icon [&_svg]:h-icon",focused:"is-focused"},eE={item:"rounded p-1"},tE={item:"rounded-md p-[3px] mobile:p-1"},gt={item:"data-blok-popover-item",icon:"data-blok-popover-item-icon",iconTool:"data-blok-tool",iconChevronRight:"data-blok-popover-item-icon-chevron-right",title:"data-blok-popover-item-title",secondaryTitle:"data-blok-popover-item-secondary-title",active:"data-blok-popover-item-active",hidden:"data-blok-hidden",confirmation:"data-blok-popover-item-confirmation",noHover:"data-blok-popover-item-no-hover",noFocus:"data-blok-popover-item-no-focus",focused:"data-blok-focused",wobble:"data-blok-popover-item-wobble",disabled:"data-blok-disabled",hasChildren:"data-blok-has-children"},nE=`
18
18
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
19
19
  <path d="m4.5 15 11-11m0 11L4.5 4" stroke="currentColor" stroke-linecap="round"/>
20
20
  </svg>
21
- `,YE=`
21
+ `,rE=`
22
22
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
23
23
  <path
24
24
  d="M5.5 11h4.9231c.6528 0 1.2789-.3161 1.7405-.8787.4617-.56259.721-1.32565.721-2.1213 0-.79565-.2593-1.55871-.721-2.12132C11.702 5.31607 11.0759 5 10.4231 5H5.5v6Zm0 0h5.5385c.6528 0 1.2789.3161 1.7405.8787.4617.5626.721 1.3257.721 2.1213 0 .7956-.2593 1.5587-.721 2.1213-.4616.5626-1.0877.8787-1.7405.8787H5.5v-6Z"
@@ -28,7 +28,7 @@ Error generating stack: `+p.message+`
28
28
  stroke-linejoin="round"
29
29
  />
30
30
  </svg>
31
- `,QE=`
31
+ `,oE=`
32
32
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
33
33
  <path
34
34
  d="M8.5 5h6m-10 12h6m1-12-4 12"
@@ -37,7 +37,7 @@ Error generating stack: `+p.message+`
37
37
  stroke-linejoin="round"
38
38
  />
39
39
  </svg>
40
- `,ZE=`
40
+ `,iE=`
41
41
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
42
42
  <path
43
43
  d="m9.98288 15.0959-.91628.9157c-.29867.3092-.65593.5559-1.05095.7255-.39502.1697-.81987.259-1.24978.2628-.4299.0037-.85625-.0782-1.25415-.241-.39791-.1628-.75941-.4032-1.06341-.7072-.304-.304-.54441-.6655-.70721-1.0634-.16279-.3979-.24471-.8243-.24098-1.2542.00374-.4299.09306-.8547.26274-1.2497.16969-.3951.41635-.7523.72558-1.051l.91499-.9163m8.24197.9156.9163-.9156c.6028-.60809.9402-1.43021.9383-2.28645-.0019-.85625-.3429-1.67688-.9483-2.28234-.6055-.60546-1.4261-.94643-2.2823-.9483-.8563-.00188-1.6784.3355-2.28652.9383l-.91628.91563M7.258 13.2413l4.5328-4.53278"
@@ -47,7 +47,7 @@ Error generating stack: `+p.message+`
47
47
  stroke-linejoin="round"
48
48
  />
49
49
  </svg>
50
- `,JE=`
50
+ `,sE=`
51
51
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
52
52
  <path
53
53
  d="M15.5 14.003h-3v-3.0004m-9-6.00078h3v3.0004m1.55478-3.80901A5.2170862 5.2170862 0 0 1 9.5 4.00014c1.1682.00058 2.3059.37321 3.2481 1.06388.9422.69067 1.64 1.66348 1.9923 2.77744.3523 1.11396.3407 2.31114-.033 3.41814-.3738 1.1069-1.0903 2.0661-2.0457 2.7384m-1.7165.8088c-.4703.1317-.9568.1967-1.4452.1931-1.16819-.0006-2.30585-.3733-3.24807-1.0639-.94222-.6907-1.64004-1.6635-1.99232-2.7775-.35229-1.1139-.34072-2.31114.03302-3.41808.37375-1.10694 1.09024-2.06608 2.04563-2.73841"
@@ -56,26 +56,26 @@ Error generating stack: `+p.message+`
56
56
  stroke-linecap="round"
57
57
  />
58
58
  </svg>
59
- `,eS=`
59
+ `,aE=`
60
60
  <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
61
61
  <path
62
62
  d="M8 6c0-.55228.44772-1 1-1s1 .44772 1 1-.44772 1-1 1-1-.44772-1-1Zm0 6c0-.5523.44772-1 1-1s1 .4477 1 1-.44772 1-1 1-1-.4477-1-1Zm0 6c0-.5523.44772-1 1-1s1 .4477 1 1-.44772 1-1 1-1-.4477-1-1Zm6-12c0-.55228.4477-1 1-1s1 .44772 1 1-.4477 1-1 1-1-.44772-1-1Zm0 6c0-.5523.4477-1 1-1s1 .4477 1 1-.4477 1-1 1-1-.4477-1-1Zm0 6c0-.5523.4477-1 1-1s1 .4477 1 1-.4477 1-1 1-1-.4477-1-1Z"
63
63
  fill="currentColor"
64
64
  />
65
65
  </svg>
66
- `,tS=`
66
+ `,lE=`
67
67
  <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
68
68
  <path d="M4.5 11.0711h14.1421m-7.071 7.071V4" stroke="currentColor" stroke-linecap="round"/>
69
69
  </svg>
70
- `,nS=`
70
+ `,cE=`
71
71
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
72
72
  <path d="m12.5 5-5 5 5 5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
73
73
  </svg>
74
- `,rS=`
74
+ `,uE=`
75
75
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
76
76
  <path d="m7.5 15 5-5-5-5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
77
77
  </svg>
78
- `,oS=`
78
+ `,dE=`
79
79
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
80
80
  <path
81
81
  d="m17.5 17.5-5-5m1.6667-4.16667c0 .76605-.1509 1.52459-.4441 2.23237-.2931.7077-.7228 1.3507-1.2645 1.8924-.5417.5417-1.1847.9714-1.8924 1.2645-.70778.2932-1.46632.4441-2.23237.4441-.76604 0-1.52458-.1509-2.23232-.4441-.70773-.2931-1.35079-.7228-1.89247-1.2645-.54167-.5417-.97135-1.1847-1.2645-1.8924C2.65088 9.85792 2.5 9.09938 2.5 8.33333c0-1.54709.61458-3.03082 1.70854-4.12479C5.30251 3.11458 6.78624 2.5 8.33333 2.5c1.5471 0 3.03087.61458 4.12477 1.70854 1.094 1.09397 1.7086 2.5777 1.7086 4.12479Z"
@@ -84,7 +84,7 @@ Error generating stack: `+p.message+`
84
84
  stroke-linejoin="round"
85
85
  />
86
86
  </svg>
87
- `,iS=`
87
+ `,fE=`
88
88
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
89
89
  <path
90
90
  d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.1667 5 2.5-1.66667V15"
@@ -93,7 +93,7 @@ Error generating stack: `+p.message+`
93
93
  stroke-linejoin="round"
94
94
  />
95
95
  </svg>
96
- `,sS=`
96
+ `,hE=`
97
97
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
98
98
  <path
99
99
  d="M3.33334 10H10m-6.66666 5V5M10 15V5m7.5 10h-3.3333c0-3.3333 3.3333-2.5 3.3333-5 0-1.25-1.6667-2.08333-3.3333-.83333"
@@ -102,7 +102,7 @@ Error generating stack: `+p.message+`
102
102
  stroke-linejoin="round"
103
103
  />
104
104
  </svg>
105
- `,aS=`
105
+ `,pE=`
106
106
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
107
107
  <path
108
108
  d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.5833 3.75C16 7.91667 17.5 8.75 17.5 10c0 .442-.1756.866-.4882 1.1785-.3125.3126-.7364.4882-1.1785.4882.4421 0 .866.1756 1.1785.4881.3126.3126.4882.7365.4882 1.1785 0 1.5-1.6667 2.5-3.3333 1.25"
@@ -111,7 +111,7 @@ Error generating stack: `+p.message+`
111
111
  stroke-linejoin="round"
112
112
  />
113
113
  </svg>
114
- `,lS=`
114
+ `,gE=`
115
115
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
116
116
  <path
117
117
  d="M10 15V5M14.1667 8.33333V10.8333C14.1667 11.0543 14.2545 11.2663 14.4107 11.4226C14.567 11.5789 14.779 11.6667 15 11.6667H17.5M17.5 8.33333V15M3.33334 10H10M3.33334 15V5"
@@ -120,7 +120,7 @@ Error generating stack: `+p.message+`
120
120
  stroke-linejoin="round"
121
121
  />
122
122
  </svg>
123
- `,cS=`
123
+ `,mE=`
124
124
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
125
125
  <path
126
126
  d="M3.33334 10H10M3.33334 15V5M10 15V5M17.5 8.33333H14.1667V10.8333H15.25C16.5 10.8333 17.5 11.75 17.5 12.9167C17.5 14.0833 16.5 15 15.25 15C14.8333 15 14.5 14.9167 14.1667 14.75"
@@ -129,7 +129,7 @@ Error generating stack: `+p.message+`
129
129
  stroke-linejoin="round"
130
130
  />
131
131
  </svg>
132
- `,uS=`
132
+ `,vE=`
133
133
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
134
134
  <path
135
135
  d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.1667 8.3333c0 .9205.7462 1.6667 1.6666 1.6667.9205 0 1.6667-.7462 1.6667-1.6667 0-.9204-.7462-1.6666-1.6667-1.6666-.9204 0-1.6666.7462-1.6666 1.6666Zm0 0c0-2.0833.8333-3.3333 2.5-4.99997"
@@ -138,7 +138,7 @@ Error generating stack: `+p.message+`
138
138
  stroke-linejoin="round"
139
139
  />
140
140
  </svg>
141
- `,dS=`
141
+ `,yE=`
142
142
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
143
143
  <path
144
144
  d="M6.5 10h6.6667M6.5 15V5m6.6667 10V5"
@@ -147,7 +147,7 @@ Error generating stack: `+p.message+`
147
147
  stroke-linejoin="round"
148
148
  />
149
149
  </svg>
150
- `,fS=`
150
+ `,bE=`
151
151
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
152
152
  <path
153
153
  d="M14.5 7.28571V6h-9v1.28571M10 6v9m0 0H8.71429M10 15h1.2857"
@@ -156,7 +156,7 @@ Error generating stack: `+p.message+`
156
156
  stroke-linejoin="round"
157
157
  />
158
158
  </svg>
159
- `,hS=`
159
+ `,kE=`
160
160
  <svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
161
161
  <path
162
162
  d="M18.5667 18H1.5l8.5333-16 8.5334 16Z"
@@ -168,7 +168,7 @@ Error generating stack: `+p.message+`
168
168
  <rect x="9.75" y="14.25" width=".5" height=".5" rx=".25" fill="currentColor" stroke="currentColor" stroke-width=".5"/>
169
169
  <rect x="9.75" y="8.25" width=".5" height="4.5" rx=".25" fill="currentColor" stroke="currentColor" stroke-width=".5"/>
170
170
  </svg>
171
- `,pS=({icon:a,title:e,secondaryLabel:t,isActive:o=!1,isDisabled:i=!1,hasChildren:l=!1,hideChevron:c=!1,wrapperTag:d="div",name:h,iconWithGap:g=!0,isInline:v=!1,isNestedInline:y=!1})=>{const b=Ae(En.item,v&&gy.item,y&&my.item,o&&En.itemActive,i&&En.itemDisabled),x=Ae(En.icon,v&&"w-auto h-auto [&_svg]:w-icon [&_svg]:h-icon mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile",y&&"w-toolbox-btn h-toolbox-btn",g&&"mr-2",g&&v&&"shadow-none bg-transparent !mr-0",g&&y&&"!mr-2"),w=Ae(En.icon,v&&"rotate-90"),T=l&&!c,S=xn.jsxs(xn.Fragment,{children:[a&&xn.jsx("div",Tt(be({[je.icon]:""},g&&{[je.iconTool]:""}),{className:x,"data-blok-testid":"popover-item-icon",dangerouslySetInnerHTML:{__html:a}})),e!==void 0&&xn.jsx("div",{[je.title]:"",className:"mr-auto truncate text-sm font-medium leading-5","data-blok-testid":"popover-item-title",children:e}),t&&xn.jsx("div",{[je.secondaryTitle]:"",className:"whitespace-nowrap pr-1.5 text-xs -tracking-widest text-text-secondary opacity-60","data-blok-testid":"popover-item-secondary-title",children:t}),T&&xn.jsx("div",{[je.icon]:"",[je.iconChevronRight]:"",className:w,"data-blok-testid":"popover-item-chevron-right",dangerouslySetInnerHTML:{__html:rS}})]}),O=be(be(be({className:b,[je.item]:"","data-blok-testid":"popover-item"},h&&{"data-blok-item-name":h}),i&&{[je.disabled]:"true"}),o&&{[je.active]:"true"});return d==="button"?xn.jsx("button",Tt(be({type:"button"},O),{children:S})):xn.jsx("div",Tt(be({},O),{children:S}))},yd='[data-blok-testid="popover-item-icon"]',gS=a=>{const e=document.createElement("div"),t=py.createRoot(e);$E.flushSync(()=>{t.render(a)});const o=e.firstElementChild;return t.unmount(),o};class Pn extends vd{constructor(e,t){super(e),this.params=e,this.nodes={root:null,icon:null},this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{var o;(o=this.nodes.root)==null||o.removeAttribute(je.noFocus)},this.removeSpecialHoverBehavior=()=>{var o;(o=this.nodes.root)==null||o.removeAttribute(je.noHover)},this.onErrorAnimationEnd=()=>{var o,i,l;(o=this.nodes.icon)==null||o.removeAttribute(je.wobble),(i=this.nodes.icon)==null||i.classList.remove("animate-wobble"),(l=this.nodes.icon)==null||l.removeEventListener("animationend",this.onErrorAnimationEnd)},this.renderParams=t,this.nodes.root=this.make(e,t)}get isDisabled(){return this.params.isDisabled===!0}get toggle(){return this.params.toggle}get title(){return this.params.title||this.params.label}get isConfirmationStateEnabled(){return this.confirmationState!==null}get isFocused(){return this.nodes.root===null?!1:this.nodes.root.hasAttribute(je.focused)}getElement(){return this.nodes.root}handleClick(){if(this.isConfirmationStateEnabled&&this.confirmationState!==null){this.activateOrEnableConfirmationMode(this.confirmationState);return}this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){if(this.nodes.root===null)return;(e!==void 0?e:!this.nodes.root.hasAttribute(je.active))?this.nodes.root.setAttribute(je.active,"true"):this.nodes.root.removeAttribute(je.active),this.updateRootClasses()}toggleHidden(e){var t,o;e?(t=this.nodes.root)==null||t.setAttribute(je.hidden,"true"):(o=this.nodes.root)==null||o.removeAttribute(je.hidden),this.updateRootClasses()}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}make(e,t){var l,c,d;const o=e.title||e.label,i=gS(xn.jsx(pS,{icon:e.icon,title:o,secondaryLabel:e.secondaryLabel,isActive:this.isActive,isDisabled:e.isDisabled,hasChildren:this.hasChildren,hideChevron:this.isChevronHidden,wrapperTag:t==null?void 0:t.wrapperTag,name:e.name,iconWithGap:t==null?void 0:t.iconWithGap,isInline:t==null?void 0:t.isInline,isNestedInline:t==null?void 0:t.isNestedInline}));return this.nodes.icon=i.querySelector(yd),e.hint!==void 0&&((l=t==null?void 0:t.hint)==null?void 0:l.enabled)!==!1&&this.addHint(i,Tt(be({},e.hint),{position:((c=t==null?void 0:t.hint)==null?void 0:c.position)||"right",alignment:((d=t==null?void 0:t.hint)==null?void 0:d.alignment)||"center"})),i}enableConfirmationMode(e){if(this.nodes.root===null)return;const t=Tt(be(be({},this.params),e),{confirmation:"confirmation"in e?e.confirmation:void 0}),o=this.make(t,this.renderParams);this.nodes.root.innerHTML=o.innerHTML,this.nodes.root.setAttribute(je.confirmation,"true"),this.nodes.icon=this.nodes.root.querySelector(yd),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior(),this.updateRootClasses()}disableConfirmationMode(){if(this.nodes.root===null)return;const e=this.make(this.params,this.renderParams);this.nodes.root.innerHTML=e.innerHTML,this.nodes.root.removeAttribute(je.confirmation),this.nodes.icon=this.nodes.root.querySelector(yd),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior(),this.updateRootClasses()}enableSpecialHoverAndFocusBehavior(){var e,t,o;(e=this.nodes.root)==null||e.setAttribute(je.noHover,"true"),(t=this.nodes.root)==null||t.setAttribute(je.noFocus,"true"),(o=this.nodes.root)==null||o.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){var e;this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),(e=this.nodes.root)==null||e.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){var t;if(!("confirmation"in e)||e.confirmation===void 0)try{(t=e.onActivate)==null||t.call(e,e),this.disableConfirmationMode()}catch(o){this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){var e,t,o,i;(e=this.nodes.icon)!=null&&e.hasAttribute(je.wobble)||((t=this.nodes.icon)==null||t.setAttribute(je.wobble,"true"),(o=this.nodes.icon)==null||o.classList.add("animate-wobble"),(i=this.nodes.icon)==null||i.addEventListener("animationend",this.onErrorAnimationEnd))}updateRootClasses(){var d,h,g,v;if(this.nodes.root===null)return;const e=this.nodes.root.hasAttribute(je.active),t=this.nodes.root.hasAttribute(je.hidden),o=this.nodes.root.hasAttribute(je.confirmation),i=this.nodes.root.hasAttribute(je.focused),l=(h=(d=this.renderParams)==null?void 0:d.isInline)!=null?h:!1,c=(v=(g=this.renderParams)==null?void 0:g.isNestedInline)!=null?v:!1;this.nodes.root.className=Ae(En.item,l&&gy.item,c&&my.item,e&&En.itemActive,this.isDisabled&&En.itemDisabled,i&&"!bg-item-focus-bg",o&&"!bg-item-confirm-bg !text-white",t&&"!hidden")}}const Br={container:"py-1 px-[3px]",containerHidden:"hidden",line:"h-px w-full bg-popover-border"},bs={container:"px-1 py-0",line:"h-full w-px",nestedContainer:"py-1 px-[3px]",nestedLine:"w-full h-px"},ks={root:"data-blok-popover-item-separator",line:"data-blok-popover-item-separator-line",hidden:"data-blok-hidden"};class vy extends vd{constructor(e){var i,l;super(),this.isInline=(i=e==null?void 0:e.isInline)!=null?i:!1,this.isNestedInline=(l=e==null?void 0:e.isNestedInline)!=null?l:!1;const t=this.getContainerClass(),o=this.getLineClass();this.nodes={root:N.make("div",t,{[ks.root]:""}),line:N.make("div",o,{[ks.line]:""})},this.nodes.root.setAttribute("data-blok-testid","popover-item-separator"),this.nodes.root.appendChild(this.nodes.line)}getElement(){return this.nodes.root}toggleHidden(e){var t,o;e?((t=this.nodes.root)==null||t.setAttribute(ks.hidden,"true"),this.nodes.root.className=Ae(this.getContainerClass(),Br.containerHidden)):((o=this.nodes.root)==null||o.removeAttribute(ks.hidden),this.nodes.root.className=this.getContainerClass())}getContainerClass(){return this.isNestedInline?Ae(Br.container,bs.nestedContainer):this.isInline?Ae(Br.container,bs.container):Br.container}getLineClass(){return this.isNestedInline?Ae(Br.line,bs.nestedLine):this.isInline?Ae(Br.line,bs.line):Br.line}}var Zt=(a=>(a.Closed="closed",a.ClosedOnActivate="closed-on-activate",a))(Zt||{});const st={popoverContainer:"absolute flex flex-col overflow-hidden box-border opacity-0 pointer-events-none p-0 border-none z-[4] max-h-0 min-w-[var(--width)] w-[var(--width)] rounded-lg shadow-[0_3px_15px_-3px_theme(colors.popover-shadow)] left-[var(--popover-left)] top-[var(--popover-top)] bg-popover-bg",popoverContainerMobile:"fixed max-w-none rounded-[10px] min-w-[calc(100%-var(--offset)*2)] inset-[auto_var(--offset)_calc(var(--offset)+env(safe-area-inset-bottom))_var(--offset)]",popoverContainerOpened:"opacity-100 pointer-events-auto p-1 max-h-[var(--max-height)] border border-popover-border animate-[panelShowing_100ms_ease]",popoverOverlay:"hidden bg-dark",items:"overflow-y-auto overscroll-contain"},oo={popover:"relative",popoverContainer:"flex-row top-0 min-w-max w-max p-1 mobile:absolute"},Fe={popover:"data-blok-popover",popoverContainer:"data-blok-popover-container",popoverItems:"data-blok-popover-items",popoverOverlay:"data-blok-popover-overlay",popoverInline:"data-blok-popover-inline",nested:"data-blok-nested",nestedLevel:"data-blok-nested-level",opened:"data-blok-popover-opened",openTop:"data-blok-popover-open-top",openLeft:"data-blok-popover-open-left",overlayHidden:"data-blok-overlay-hidden",nothingFoundDisplayed:"data-blok-nothing-found-displayed"},mS=a=>`level-${a}`;var Jt=(a=>(a.NestingLevel="--nesting-level",a.PopoverHeight="--popover-height",a.InlinePopoverWidth="--inline-popover-width",a.PopoverTop="--popover-top",a.PopoverLeft="--popover-left",a.TriggerItemLeft="--trigger-item-left",a.TriggerItemTop="--trigger-item-top",a))(Jt||{});const ei={root:"",rootHidden:"hidden"},yy={root:"flex items-center"},bd={root:"data-blok-popover-item-html",hidden:"data-blok-hidden"};class ti extends vd{constructor(e,t){var i,l,c,d;super(e),this.isInline=(i=t==null?void 0:t.isInline)!=null?i:!1;const o=this.isInline?Ae(ei.root,yy.root):ei.root;this.nodes={root:N.make("div",o,{[bd.root]:""})},this.nodes.root.appendChild(e.element),this.nodes.root.setAttribute("data-blok-testid","popover-item-html"),e.name&&this.nodes.root.setAttribute("data-blok-item-name",e.name),e.hint!==void 0&&((l=t==null?void 0:t.hint)==null?void 0:l.enabled)!==!1&&this.addHint(this.nodes.root,Tt(be({},e.hint),{position:((c=t==null?void 0:t.hint)==null?void 0:c.position)||"right",alignment:((d=t==null?void 0:t.hint)==null?void 0:d.alignment)||"center"}))}getElement(){return this.nodes.root}toggleHidden(e){var o,i;const t=this.isInline?Ae(ei.root,yy.root):ei.root;e?((o=this.nodes.root)==null||o.setAttribute(bd.hidden,"true"),this.nodes.root.className=Ae(t,ei.rootHidden)):((i=this.nodes.root)==null||i.removeAttribute(bd.hidden),this.nodes.root.className=t)}getControls(){const e=this.nodes.root.querySelectorAll(`button, ${N.allInputsSelector}`);return Array.from(e)}}class by extends $o{constructor(e,t={}){super(),this.params=e,this.itemsRenderParams=t,this.listeners=new Go,this.messages={nothingFound:"Nothing found",search:"Search"},this.items=this.buildItems(e.items),e.messages&&(this.messages=be(be({},this.messages),e.messages)),this.nodes={},this.nodes.popoverContainer=N.make("div",[st.popoverContainer],{[Fe.popoverContainer]:"","data-blok-testid":"popover-container"}),this.nodes.nothingFoundMessage=N.make("div",["hidden cursor-default text-sm leading-5 font-medium whitespace-nowrap overflow-hidden text-ellipsis text-gray-text p-[3px]"],{textContent:this.messages.nothingFound,"data-blok-testid":"popover-nothing-found"}),this.nodes.popoverContainer.appendChild(this.nodes.nothingFoundMessage),this.nodes.items=N.make("div",[st.items],{[Fe.popoverItems]:"","data-blok-testid":"popover-items"}),this.items.forEach(o=>{const i=o.getElement();i!==null&&this.nodes.items.appendChild(i)}),this.nodes.popoverContainer.appendChild(this.nodes.items),this.listeners.on(this.nodes.popoverContainer,"click",o=>this.handleClick(o)),this.nodes.popover=N.make("div",[this.params.class],{[Fe.popover]:"","data-blok-testid":"popover"}),this.nodes.popover.style.setProperty("--width","200px"),this.nodes.popover.style.setProperty("--max-height","270px"),this.nodes.popover.style.setProperty("--item-padding","3px"),this.nodes.popover.style.setProperty("--item-height","calc(1.25rem + 2 * var(--item-padding))"),this.nodes.popover.style.setProperty("--popover-top","calc(100% + 0.5rem)"),this.nodes.popover.style.setProperty("--popover-left","0"),this.nodes.popover.style.setProperty("--nested-popover-overlap","0.25rem"),this.params.class&&this.nodes.popover.setAttribute("data-blok-popover-custom-class",this.params.class),this.nodes.popover.appendChild(this.nodes.popoverContainer)}get itemsDefault(){return this.items.filter(e=>e instanceof Pn)}getElement(){return this.nodes.popover}show(){!this.nodes.popover.isConnected&&!this.nodes.popover.parentNode&&document.body.appendChild(this.nodes.popover),this.nodes.popover.setAttribute(Fe.opened,"true"),this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerOpened),this.itemsDefault.forEach(e=>this.refreshItemActiveState(e)),this.search!==void 0&&this.search.focus()}hide(){this.nodes.popover.removeAttribute(Fe.opened),this.nodes.popover.removeAttribute(Fe.openTop),this.nodes.popover.removeAttribute(Fe.openLeft),this.nodes.popoverContainer.className=st.popoverContainer,this.itemsDefault.forEach(e=>e.reset()),this.search!==void 0&&this.search.clear(),this.emit(Zt.Closed)}destroy(){var e;this.items.forEach(t=>t.destroy()),this.nodes.popover.remove(),this.listeners.removeAll(),(e=this.search)==null||e.destroy()}activateItemByName(e){const t=this.items.find(o=>o.name===e);t!==void 0&&this.handleItemClick(t)}buildItems(e){return e.map(t=>{switch(t.type){case tt.Separator:return new vy(this.itemsRenderParams[tt.Separator]);case tt.Html:return new ti(t,this.itemsRenderParams[tt.Html]);default:return new Pn(t,this.itemsRenderParams[tt.Default])}})}getTargetItem(e){return this.items.filter(t=>t instanceof Pn||t instanceof ti).find(t=>{const o=t.getElement();return o===null?!1:e.composedPath().includes(o)})}handleItemClick(e){if(!(e instanceof Pn&&e.isDisabled)){if(e.hasChildren){this.showNestedItems(e),this.callHandleClickIfPresent(e);return}this.itemsDefault.filter(t=>t!==e).forEach(t=>t.reset()),this.callHandleClickIfPresent(e),this.toggleItemActivenessIfNeeded(e),this.refreshItemActiveState(e),e.closeOnActivate===!0&&(this.hide(),this.emit(Zt.ClosedOnActivate))}}handleClick(e){const t=this.getTargetItem(e);t!==void 0&&this.handleItemClick(t)}toggleItemActivenessIfNeeded(e){if(!(e instanceof Pn)||(e.toggle===!0&&e.toggleActive(),typeof e.toggle!="string"))return;const t=this.itemsDefault.filter(o=>o.toggle===e.toggle);if(t.length===1){e.toggleActive();return}t.forEach(o=>{o.toggleActive(o===e)})}refreshItemActiveState(e){e instanceof Pn&&e.toggle===void 0&&e.toggleActive(e.isActive)}callHandleClickIfPresent(e){"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick()}hasNode(e){return this.nodes.popover.contains(e)}}var kd=(a=>(a.Search="search",a))(kd||{});const wd={wrapper:"bg-[#F8F8F8] border border-[rgba(226,226,229,0.20)] rounded p-0.5 grid grid-cols-[auto_auto_1fr] grid-rows-[auto]",icon:"w-toolbox-btn h-toolbox-btn flex items-center justify-center mr-2 [&_svg]:w-icon [&_svg]:h-icon [&_svg]:text-gray-text",input:"text-sm outline-none font-medium font-inherit border-0 bg-transparent m-0 p-0 leading-[22px] min-w-[calc(100%-theme('spacing.6')-10px)] placeholder:text-gray-text placeholder:font-medium"};class vS extends $o{constructor({items:e,placeholder:t}){super(),this.searchQuery="",this.handleValueChange=()=>{this.applySearch(this.input.value)},this.listeners=new Go,this.items=e,this.wrapper=N.make("div",wd.wrapper),this.wrapper.setAttribute("data-blok-testid","popover-search-field");const o=N.make("div",wd.icon,{innerHTML:oS});this.input=N.make("input",wd.input,{type:"search",placeholder:t,tabIndex:-1}),this.input.setAttribute("data-blok-flipper-tab-target","true"),this.input.setAttribute("data-blok-testid","popover-search-input"),this.wrapper.appendChild(o),this.wrapper.appendChild(this.input),this.overrideValueProperty(),["input","keyup","search","change"].forEach(l=>{this.listeners.on(this.input,l,this.handleValueChange)})}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value=""}applySearch(e){this.searchQuery!==e&&(this.searchQuery=e,this.emit(kd.Search,{query:e,items:this.foundItems}))}overrideValueProperty(){var i,l;const e=Object.getPrototypeOf(this.input),t=Object.getOwnPropertyDescriptor(e,"value");if((t==null?void 0:t.set)===void 0||t.get===void 0)return;const o=this.applySearch.bind(this);Object.defineProperty(this.input,"value",{configurable:(i=t.configurable)!=null?i:!0,enumerable:(l=t.enumerable)!=null?l:!1,get(){var c,d;return(d=(c=t.get)==null?void 0:c.call(this))!=null?d:""},set(c){var d;(d=t.set)==null||d.call(this,c),o(c)}})}destroy(){this.listeners.removeAll()}get foundItems(){return this.items.filter(e=>this.checkItem(e))}checkItem(e){var i,l;const t=((i=e.title)==null?void 0:i.toLowerCase())||"",o=(l=this.searchQuery)==null?void 0:l.toLowerCase();return o!==void 0?t.includes(o):!1}}class Ar extends by{constructor(e,t){super(e,t),this.nestingLevel=0,this.nestedPopoverTriggerItem=null,this.previouslyHoveredItem=null,this.scopeElement=document.body,this.hide=()=>{var o;super.hide(),this.destroyNestedPopoverIfExists(),(o=this.flipper)==null||o.deactivate(),this.previouslyHoveredItem=null},this.onFlip=()=>{const o=this.itemsDefault.find(i=>i.isFocused);o==null||o.onFocus()},this.onSearch=o=>{var d;const i=o.query==="",l=o.items.length===0;this.items.forEach(h=>{const g=h instanceof Pn,v=h instanceof vy||h instanceof ti,y=g?!o.items.includes(h):v&&(l||!i);h.toggleHidden(y)}),this.toggleNothingFoundMessage(l);const c=o.query===""?this.flippableElements:o.items.map(h=>h.getElement());(d=this.flipper)!=null&&d.isActivated&&(this.flipper.deactivate(),this.flipper.activate(c))},e.trigger&&(this.trigger=e.trigger),e.nestingLevel!==void 0&&(this.nestingLevel=e.nestingLevel),this.nestingLevel>0&&this.nodes.popover.setAttribute(Fe.nested,"true"),e.scopeElement!==void 0&&(this.scopeElement=e.scopeElement),this.nodes.popoverContainer!==null&&this.listeners.on(this.nodes.popoverContainer,"mouseover",o=>this.handleHover(o)),e.searchable&&this.addSearch(),e.flippable!==!1&&(e.flipper!==void 0?(e.flipper.deactivate(),e.flipper.removeOnFlip(this.onFlip),this.flipper=e.flipper):this.flipper=new Yn({items:this.flippableElements,focusedItemClass:En.focused,allowedKeys:[ie.TAB,ie.UP,ie.DOWN,ie.ENTER]}),this.flipper.onFlip(this.onFlip))}hasFocus(){return this.flipper===void 0?!1:this.flipper.hasFocus()}get scrollTop(){return this.nodes.items===null?0:this.nodes.items.scrollTop}get offsetTop(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetTop}show(){var e;if(this.trigger){document.body.appendChild(this.nodes.popover);const{top:t,left:o}=this.calculatePosition();this.nodes.popover.style.position="absolute",this.nodes.popover.style.top=`${t}px`,this.nodes.popover.style.left=`${o}px`,this.nodes.popover.style.setProperty(Jt.PopoverTop,"0px"),this.nodes.popover.style.setProperty(Jt.PopoverLeft,"0px")}this.nodes.popover.style.setProperty(Jt.PopoverHeight,this.size.height+"px"),!this.trigger&&!this.shouldOpenBottom&&(this.nodes.popover.setAttribute(Fe.openTop,"true"),this.nodes.popover.style.setProperty(Jt.PopoverTop,"calc(-1 * (0.5rem + var(--popover-height)))")),!this.trigger&&!this.shouldOpenRight&&(this.nodes.popover.setAttribute(Fe.openLeft,"true"),this.nodes.popover.style.setProperty(Jt.PopoverLeft,"calc(-1 * var(--width) + 100%)")),super.show(),(e=this.flipper)==null||e.activate(this.flippableElements)}calculatePosition(){if(!this.trigger)return{top:0,left:0};const e=this.trigger.getBoundingClientRect(),t=this.size,o=window.innerWidth,i=window.innerHeight,l=8,c=e.bottom+l+window.scrollY,h=e.bottom+l+t.height>i+window.scrollY&&e.top-l-t.height>window.scrollY?e.top-l-t.height+window.scrollY:c,g=e.left+window.scrollX,y=g+t.width>o+window.scrollX?Math.max(0,e.right-t.width+window.scrollX):g;return{top:h,left:y}}destroy(){this.hide(),super.destroy()}hasNode(e){return super.hasNode(e)?!0:this.nestedPopover!==void 0&&this.nestedPopover!==null?this.nestedPopover.hasNode(e):!1}showNestedItems(e){this.nestedPopover!==null&&this.nestedPopover!==void 0||(this.nestedPopoverTriggerItem=e,this.showNestedPopoverForItem(e))}handleHover(e){const t=this.getTargetItem(e);t!==void 0&&this.previouslyHoveredItem!==t&&(this.destroyNestedPopoverIfExists(),this.previouslyHoveredItem=t,t.hasChildren&&this.showNestedPopoverForItem(t))}setTriggerItemPosition(e,t){const o=t.getElement(),i=(o?o.offsetTop:0)-this.scrollTop,l=this.offsetTop+i;e.style.setProperty(Jt.TriggerItemTop,l+"px")}destroyNestedPopoverIfExists(){var e,t;this.nestedPopover===void 0||this.nestedPopover===null||(this.nestedPopover.off(Zt.ClosedOnActivate,this.hide),this.nestedPopover.hide(),this.nestedPopover.destroy(),this.nestedPopover.getElement().remove(),this.nestedPopover=null,(e=this.flipper)==null||e.activate(this.flippableElements),requestAnimationFrame(()=>{var o;(o=this.flipper)==null||o.focusFirst()}),(t=this.nestedPopoverTriggerItem)==null||t.onChildrenClose())}showNestedPopoverForItem(e){var o;this.nestedPopover=new Ar({searchable:e.isChildrenSearchable,items:e.children,nestingLevel:this.nestingLevel+1,flippable:e.isChildrenFlippable,messages:this.messages}),e.onChildrenOpen(),this.nestedPopover.on(Zt.ClosedOnActivate,this.hide);const t=this.nestedPopover.getElement();return this.nodes.popover.appendChild(t),this.setTriggerItemPosition(t,e),t.style.setProperty(Jt.NestingLevel,this.nestedPopover.nestingLevel.toString()),this.applyNestedPopoverPositioning(t),this.nestedPopover.show(),(o=this.flipper)==null||o.deactivate(),this.nestedPopover}applyNestedPopoverPositioning(e){const t=e.querySelector(`[${Fe.popoverContainer}]`);if(!t)return;const o=this.nodes.popover.hasAttribute(Fe.openTop),i=this.nodes.popover.hasAttribute(Fe.openLeft);t.style.position="absolute",i?e.style.setProperty(Jt.PopoverLeft,"calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)"):e.style.setProperty(Jt.PopoverLeft,"calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)))"),o?t.style.top="calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + 0.5rem + var(--nested-popover-overlap))":t.style.top="calc(var(--trigger-item-top) - var(--nested-popover-overlap))"}get shouldOpenBottom(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popoverContainer.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),o=this.size.height,i=e.top+o,l=e.top-o,c=Math.min(window.innerHeight,t.bottom);return l<t.top||i<=c}get shouldOpenRight(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popover.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),o=this.size.width,i=e.right+o,l=e.left-o,c=Math.min(window.innerWidth,t.right);return l<t.left||i<=c}get size(){var i;if(this._size)return this._size;const e={height:0,width:0};if(this.nodes.popover===null)return e;const t=this.nodes.popover.cloneNode(!0);t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000px",t.setAttribute(Fe.opened,"true"),(i=t.querySelector(`[${Fe.nested}]`))==null||i.remove(),document.body.appendChild(t);const o=t.querySelector(`[${Fe.popoverContainer}]`);return e.height=o.offsetHeight,e.width=o.offsetWidth,t.remove(),this._size=e,e}get flippableElements(){return this.items.flatMap(t=>{if(!(t instanceof Pn))return t instanceof ti?t.getControls():[];if(t.isDisabled)return[];const o=t.getElement();return o?[o]:[]}).filter(t=>t!=null)}addSearch(){this.search=new vS({items:this.itemsDefault,placeholder:this.messages.search}),this.search.on(kd.Search,this.onSearch);const e=this.search.getElement();e.classList.add("mb-1.5"),this.nodes.popoverContainer.insertBefore(e,this.nodes.popoverContainer.firstChild)}toggleNothingFoundMessage(e){this.nodes.nothingFoundMessage.classList.toggle("!block",e),e?this.nodes.nothingFoundMessage.setAttribute(Fe.nothingFoundDisplayed,"true"):this.nodes.nothingFoundMessage.removeAttribute(Fe.nothingFoundDisplayed)}}const yS="38px",bS="46px";class Td extends Ar{constructor(e){var o;const t=!Gn();super(be({},e),{[tt.Default]:{wrapperTag:"button",hint:{position:"top",alignment:"center",enabled:t},iconWithGap:!1,isInline:!0},[tt.Html]:{hint:{position:"top",alignment:"center",enabled:t},isInline:!0},[tt.Separator]:{isInline:!0}}),this.hide=()=>{var i;this.nodes.popover.removeAttribute(Fe.opened),this.nodes.popover.removeAttribute(Fe.openTop),this.nodes.popover.removeAttribute(Fe.openLeft),this.itemsDefault.forEach(l=>l.reset()),this.search!==void 0&&this.search.clear(),this.destroyNestedPopoverIfExists(),(i=this.flipper)==null||i.deactivate(),this.nodes.popover.className=Ae(oo.popover),this.nodes.popoverContainer&&(this.nodes.popoverContainer.className=Ae(st.popoverContainer,oo.popoverContainer),this.nodes.popoverContainer.style.height=""),this.emit(Zt.Closed)},this.nodes.popover.className=Ae(oo.popover),this.nodes.popoverContainer&&(this.nodes.popoverContainer.className=Ae(st.popoverContainer,oo.popoverContainer)),this.nodes.items&&(this.nodes.items.className=Ae(st.items,"flex")),this.nodes.popover.style.setProperty("--height",yS),this.nodes.popover.style.setProperty("--height-mobile",bS),this.nodes.popover.setAttribute(Fe.popoverInline,""),(o=this.flipper)==null||o.setHandleContentEditableTargets(!0),this.items.forEach(i=>{!(i instanceof Pn)&&!(i instanceof ti)||i.hasChildren&&i.isChildrenOpen&&this.showNestedItems(i)})}get offsetLeft(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetLeft}show(){var t;if(super.show(),this.nodes.popover.className=Ae(oo.popover,"inline-block"),this.nodes.popoverContainer){this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerOpened,oo.popoverContainer,"animate-none");const o=Gn()?"var(--height-mobile)":"var(--height)";this.nodes.popoverContainer.style.height=o}const e=this.nestingLevel===0?(t=this.nodes.popoverContainer)==null?void 0:t.getBoundingClientRect():void 0;if(e!==void 0){const o=`${e.width}px`,i=`${e.height}px`;this.nodes.popover.style.setProperty(Jt.InlinePopoverWidth,o),this.nodes.popover.style.width=o,this.nodes.popover.style.height=i}requestAnimationFrame(()=>{var o,i;(o=this.flipper)==null||o.deactivate(),(i=this.flipper)==null||i.activate(this.flippableElements)})}handleHover(){}setTriggerItemPosition(e,t){const o=t.getElement(),i=o?o.offsetLeft:0,l=this.offsetLeft+i;e.style.setProperty(Jt.TriggerItemLeft,l+"px")}showNestedItems(e){if(this.nestedPopoverTriggerItem===e){this.destroyNestedPopoverIfExists(),this.nestedPopoverTriggerItem=null;return}super.showNestedItems(e)}showNestedPopoverForItem(e){var d;const t=super.showNestedPopoverForItem(e),o=t.getElement();(d=t.flipper)==null||d.setHandleContentEditableTargets(!0);const i=o.querySelector(`[${Fe.popoverContainer}]`);i&&(i.className=Ae(i.className,"h-fit p-1.5 flex-col"));const l=o.querySelector(`[${Fe.popoverItems}]`);l&&(l.className=Ae(l.className,"block w-full"));const c=h=>{var g,v;if(!(h.key!=="Tab"||h.shiftKey)){if(this.nestedPopover!==t){document.removeEventListener("keydown",c,!0);return}h.preventDefault(),h.stopPropagation(),(g=t.flipper)==null||g.activate(t.flippableElements),(v=t.flipper)==null||v.focusFirst(),document.removeEventListener("keydown",c,!0)}};if(document.addEventListener("keydown",c,!0),t.on(Zt.Closed,()=>{document.removeEventListener("keydown",c,!0)}),o.setAttribute(Fe.nestedLevel,mS(t.nestingLevel)),t.nestingLevel===1&&i){i.className=Ae(i.className,"left-0");const h=Gn()?"calc(var(--height-mobile) + 3px)":"calc(var(--height) + 3px)";i.style.top=h}return t}handleItemClick(e){var t;e!==this.nestedPopoverTriggerItem&&((t=this.nestedPopoverTriggerItem)==null||t.handleClick(),super.destroyNestedPopoverIfExists()),super.handleItemClick(e)}}const St=class St{constructor(){this.scrollPosition=null}lock(){ju?this.lockHard():(document.body.classList.add(St.CSS.overflowHidden),document.body.setAttribute(St.DATA_ATTR.scrollLocked,"true"))}unlock(){ju?this.unlockHard():(document.body.classList.remove(St.CSS.overflowHidden),document.body.removeAttribute(St.DATA_ATTR.scrollLocked))}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(St.CSS.overflowHidden,St.CSS.fixed,St.CSS.wFull),document.body.style.top="calc(-1 * var(--window-scroll-offset))",document.body.setAttribute(St.DATA_ATTR.scrollLockedHard,"true")}unlockHard(){document.body.classList.remove(St.CSS.overflowHidden,St.CSS.fixed,St.CSS.wFull),document.body.style.top="",document.body.removeAttribute(St.DATA_ATTR.scrollLockedHard),this.scrollPosition!==null&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};St.CSS={overflowHidden:"overflow-hidden",fixed:"fixed",wFull:"w-full"},St.DATA_ATTR={scrollLocked:"data-blok-scroll-locked",scrollLockedHard:"data-blok-scroll-locked-hard"};let xd=St;const Ed={root:"flex items-center mb-2 mt-1",text:"text-lg font-semibold text-text-primary",backButton:"border-0 bg-transparent w-9 h-9 text-text-primary cursor-pointer [&_svg]:block [&_svg]:w-7 [&_svg]:h-7"},Sd={root:"data-blok-popover-header",text:"data-blok-popover-header-text",backButton:"data-blok-popover-header-back-button"};class kS{constructor({text:e,onBackButtonClick:t}){this.listeners=new Go,this.text=e,this.onBackButtonClick=t,this.nodes={root:N.make("div",[Ed.root],{"data-blok-testid":"popover-header",[Sd.root]:""}),backButton:N.make("button",[Ed.backButton],{"data-blok-testid":"popover-header-back-button",[Sd.backButton]:""}),text:N.make("div",[Ed.text],{"data-blok-testid":"popover-header-text",[Sd.text]:""})},this.nodes.backButton.innerHTML=nS,this.nodes.root.appendChild(this.nodes.backButton),this.listeners.on(this.nodes.backButton,"click",this.onBackButtonClick),this.nodes.text.innerText=this.text,this.nodes.root.appendChild(this.nodes.text)}getElement(){return this.nodes.root}destroy(){this.nodes.root.remove(),this.listeners.destroy()}}class wS{constructor(){this.history=[]}push(e){this.history.push(e)}pop(){return this.history.pop()}get currentTitle(){return this.history.length===0?"":this.history[this.history.length-1].title}get currentItems(){return this.history.length===0?[]:this.history[this.history.length-1].items}reset(){for(;this.history.length>1;)this.pop()}}class ky extends by{constructor(e){super(e,{[tt.Default]:{hint:{enabled:!1}},[tt.Html]:{hint:{enabled:!1}}}),this.scrollLocker=new xd,this.history=new wS,this.isHidden=!0,this.nodes.overlay=N.make("div",[st.popoverOverlay],{[Fe.popoverOverlay]:"",[Fe.overlayHidden]:"","data-blok-testid":"popover-overlay"}),this.nodes.popover.insertBefore(this.nodes.overlay,this.nodes.popover.firstChild),this.listeners.on(this.nodes.overlay,"click",()=>{this.hide()}),this.history.push({items:e.items}),this.nodes.popoverContainer.style.setProperty("--offset","5px"),this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerMobile)}show(){this.nodes.overlay.removeAttribute(Fe.overlayHidden),this.nodes.overlay.className=Ae(st.popoverOverlay,"fixed inset-0 block visible z-[3] opacity-50 transition-opacity duration-[120ms] ease-in will-change-[opacity]"),super.show(),this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerMobile,st.popoverContainerOpened,"animate-[panelShowingMobile_250ms_ease]"),this.scrollLocker.lock(),this.isHidden=!1}hide(){this.isHidden||(super.hide(),this.nodes.overlay.setAttribute(Fe.overlayHidden,""),this.nodes.overlay.className=st.popoverOverlay,this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerMobile),this.scrollLocker.unlock(),this.history.reset(),this.isHidden=!0)}destroy(){super.destroy(),this.scrollLocker.unlock()}showNestedItems(e){this.updateItemsAndHeader(e.children,e.title),this.history.push({title:e.title,items:e.children})}updateItemsAndHeader(e,t){var l,c;this.header!==null&&this.header!==void 0&&(this.header.destroy(),this.header=null);const o=t!==void 0;o&&(this.header=new kS({text:t,onBackButtonClick:()=>{this.history.pop(),this.updateItemsAndHeader(this.history.currentItems,this.history.currentTitle)}}));const i=(c=(l=this.header)==null?void 0:l.getElement())!=null?c:null;o&&i!==null&&this.nodes.popoverContainer.insertBefore(i,this.nodes.popoverContainer.firstChild),this.items.forEach(d=>{var h;return(h=d.getElement())==null?void 0:h.remove()}),this.items=this.buildItems(e),this.items.forEach(d=>{var g;const h=d.getElement();h!==null&&((g=this.nodes.items)==null||g.appendChild(h))})}}class TS extends Se{constructor(){super(...arguments),this.opened=!1,this.selection=new se,this.popover=null,this.flipperInstance=new Yn({focusedItemClass:En.focused,allowedKeys:[ie.TAB,ie.UP,ie.DOWN,ie.ENTER]}),this.flipperKeydownHandler=null,this.flipperKeydownSource=null,this.close=()=>{this.opened&&(this.opened=!1,se.isAtBlok||this.selection.restore(),this.selection.clearSaved(),this.detachFlipperKeydownListener(),!this.Blok.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Blok.BlockManager.currentBlock&&this.Blok.BlockSelection.unselectBlock(this.Blok.BlockManager.currentBlock),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(Zt.Closed,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null))},this.onPopoverClose=()=>{this.close()}}get events(){return{opened:ed,closed:td}}get CSS(){return{settings:""}}get flipper(){return this.flipperInstance}make(){this.nodes.wrapper=N.make("div"),this.nodes.wrapper.setAttribute("data-blok-testid","block-tunes-wrapper"),this.eventsDispatcher.on(Er,this.close)}destroy(){this.detachFlipperKeydownListener(),this.removeAllNodes(),this.listeners.destroy(),this.eventsDispatcher.off(Er,this.close)}async open(e,t){const o=e!=null?e:this.Blok.BlockManager.currentBlock;if(o===void 0)return;this.opened=!0,this.selection.save(),this.Blok.BlockSelection.selectBlock(o),this.Blok.BlockSelection.clearCache();const{toolTunes:i,commonTunes:l}=o.getTunes();this.eventsDispatcher.emit(this.events.opened);const c=Gn()?ky:Ar,d={searchable:!0,trigger:t||this.nodes.wrapper,items:await this.getTunesItems(o,l,i),scopeElement:this.Blok.API.methods.ui.nodes.redactor,messages:{nothingFound:$e.ui(it.ui.popover,"Nothing found"),search:$e.ui(it.ui.popover,"Filter")}};c===Ar&&(d.flipper=this.flipperInstance),this.popover=new c(d),this.popover.getElement().setAttribute("data-blok-testid","block-tunes-popover"),this.popover.on(Zt.Closed,this.onPopoverClose),this.popover.show(),c===Ar&&this.flipperInstance.focusItem(0),this.attachFlipperKeydownListener(o)}getElement(){return this.nodes.wrapper}contains(e){var t,o;return!!((t=this.nodes.wrapper)!=null&&t.contains(e)||(o=this.popover)!=null&&o.hasNode(e))}async getTunesItems(e,t,o){const i=[];o!==void 0&&o.length>0&&(i.push(...o),i.push({type:tt.Separator}));const l=Array.from(this.Blok.Tools.blockTools.values()),d=(await Qv(e,l)).reduce((h,g)=>(g.toolbox===void 0||g.toolbox.forEach(v=>{var b;const y=(b=v.title)!=null?b:g.name;h.push({icon:v.icon,title:$e.t(it.toolNames,y),name:g.name,closeOnActivate:!0,onActivate:async()=>{const{BlockManager:x,Caret:w,Toolbar:T}=this.Blok,S=await x.convert(e,g.name,v.data);T.close(),w.setToBlock(S,w.positions.END)}})}),h),[]);return d.length>0&&(i.push({icon:JE,name:"convert-to",title:$e.ui(it.ui.popover,"Convert to"),children:{searchable:!0,items:d}}),i.push({type:tt.Separator})),i.push(...t),i}attachFlipperKeydownListener(e){this.detachFlipperKeydownListener();const t=e==null?void 0:e.pluginsContent;t instanceof HTMLElement&&(this.flipperInstance.setHandleContentEditableTargets(!0),this.flipperKeydownHandler=o=>{this.flipperInstance.handleExternalKeydown(o)},t.addEventListener("keydown",this.flipperKeydownHandler,!0),this.flipperKeydownSource=t)}detachFlipperKeydownListener(){this.flipperKeydownSource!==null&&this.flipperKeydownHandler!==null&&this.flipperKeydownSource.removeEventListener("keydown",this.flipperKeydownHandler,!0),this.flipperInstance.setHandleContentEditableTargets(!1),this.flipperKeydownSource=null,this.flipperKeydownHandler=null}}const wy={SHIFT:["SHIFT"],CMD:["CMD","CONTROL","COMMAND","WINDOWS","CTRL"],ALT:["ALT","OPTION"]},xS={0:"Digit0",1:"Digit1",2:"Digit2",3:"Digit3",4:"Digit4",5:"Digit5",6:"Digit6",7:"Digit7",8:"Digit8",9:"Digit9",A:"KeyA",B:"KeyB",C:"KeyC",D:"KeyD",E:"KeyE",F:"KeyF",G:"KeyG",H:"KeyH",I:"KeyI",J:"KeyJ",K:"KeyK",L:"KeyL",M:"KeyM",N:"KeyN",O:"KeyO",P:"KeyP",Q:"KeyQ",R:"KeyR",S:"KeyS",T:"KeyT",U:"KeyU",V:"KeyV",W:"KeyW",X:"KeyX",Y:"KeyY",Z:"KeyZ",BACKSPACE:"Backspace",ENTER:"Enter",ESCAPE:"Escape",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",INSERT:"Insert",DELETE:"Delete",".":"Period"},ES=a=>Object.keys(wy).find(t=>wy[t].includes(a));class SS{constructor(e){this.commands={SHIFT:!1,CMD:!1,ALT:!1},this.keys={},this.name=e.name,this.element=e.on,this.callback=e.callback,this.parseShortcutName(e.name),this.executeShortcut=t=>{this.execute(t)},this.element.addEventListener("keydown",this.executeShortcut,!1)}remove(){this.element.removeEventListener("keydown",this.executeShortcut)}parseShortcutName(e){const t=e.split("+");for(const o of t){const i=o.toUpperCase(),l=ES(i);l!==void 0?this.commands[l]=!0:this.keys[i]=!0}}checkModifiers(e){const t={CMD:e.ctrlKey||e.metaKey,SHIFT:e.shiftKey,ALT:e.altKey};return Object.keys(this.commands).every(i=>this.commands[i]===t[i])}checkKeys(e){return Object.keys(this.keys).every(o=>{const i=xS[o];return e.code===i})}execute(e){const t=this.checkModifiers(e),o=this.checkKeys(e);t&&o&&this.callback(e)}}let CS=class{constructor(){this.registeredShortcuts=new Map}add(e){if(this.findShortcut(e.on,e.name))throw Error(`Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`);const o=new SS({name:e.name,on:e.on,callback:e.handler}),i=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[...i,o])}remove(e,t){const o=this.findShortcut(e,t);if(!o)return;o.remove();const i=this.registeredShortcuts.get(e);if(!i)return;const l=i.filter(c=>c!==o);if(l.length===0){this.registeredShortcuts.delete(e);return}this.registeredShortcuts.set(e,l)}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find(({name:i})=>i===t)}};const io=new CS;var ws=(a=>(a.Opened="toolbox-opened",a.Closed="toolbox-closed",a.BlockAdded="toolbox-block-added",a))(ws||{});class BS extends $o{constructor({api:e,tools:t,i18nLabels:o,triggerElement:i}){super(),this.opened=!1,this.listeners=new Go,this.popover=null,this.handleMobileLayoutToggle=()=>{this.destroyPopover(),this.initPopover()},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=o,this.triggerElement=i,this.enableShortcuts(),this.nodes={toolbox:N.make("div")},this.nodes.toolbox.setAttribute("data-blok-testid","toolbox"),this.initPopover(),this.api.events.on(Er,this.handleMobileLayoutToggle)}get isEmpty(){return this.toolsToBeDisplayed.length===0}static get CSS(){return{toolbox:""}}getElement(){return this.nodes.toolbox}contains(e){var t;return!!(this.nodes.toolbox.contains(e)||(t=this.popover)!=null&&t.getElement().contains(e))}hasFocus(){if(this.popover!==null)return"hasFocus"in this.popover?this.popover.hasFocus():void 0}destroy(){var e;super.destroy(),this.nodes&&this.nodes.toolbox&&this.nodes.toolbox.remove(),this.removeAllShortcuts(),(e=this.popover)==null||e.off(Zt.Closed,this.onPopoverClose),this.listeners.destroy(),this.api.events.off(Er,this.handleMobileLayoutToggle)}async toolButtonActivated(e,t){await this.insertNewBlock(e,t)}open(){var e;this.isEmpty||((e=this.popover)==null||e.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){var e;(e=this.popover)==null||e.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}initPopover(){const e=Gn()?ky:Ar;this.popover=new e({scopeElement:this.api.ui.nodes.redactor,trigger:this.triggerElement||this.nodes.toolbox,searchable:!0,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on(Zt.Closed,this.onPopoverClose),this.popover.getElement().setAttribute("data-blok-testid","toolbox-popover")}destroyPopover(){this.popover!==null&&(this.popover.hide(),this.popover.off(Zt.Closed,this.onPopoverClose),this.popover.destroy(),this.popover=null),this.nodes.toolbox!==null&&(this.nodes.toolbox.innerHTML="")}get toolsToBeDisplayed(){if(this._toolsToBeDisplayed)return this._toolsToBeDisplayed;const e=[];return this.tools.forEach(t=>{t.toolbox&&e.push(t)}),this._toolsToBeDisplayed=e,e}get toolboxItemsToBeDisplayed(){if(this._toolboxItemsToBeDisplayed)return this._toolboxItemsToBeDisplayed;const e=(o,i,l=!0)=>({icon:o.icon,title:$e.t(it.toolNames,o.title||us(i.name)),name:i.name,onActivate:()=>{this.toolButtonActivated(i.name,o.data)},secondaryLabel:i.shortcut&&l?yv(i.shortcut):""}),t=this.toolsToBeDisplayed.reduce((o,i)=>{const{toolbox:l}=i;return l===void 0||(Array.isArray(l)?l:[l]).forEach((d,h)=>{o.push(e(d,i,h===0))}),o},[]);return this._toolboxItemsToBeDisplayed=t,t}enableShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)})}enableShortcutForTool(e,t){io.add({name:t,on:this.api.ui.nodes.redactor,handler:async o=>{o.preventDefault();const i=this.api.blocks.getCurrentBlockIndex(),l=this.api.blocks.getBlockByIndex(i);if(l)try{const c=await this.api.blocks.convert(l.id,e);this.api.caret.setToBlock(c,"end");return}catch(c){}await this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&io.remove(this.api.ui.nodes.redactor,t)})}async insertNewBlock(e,t){const o=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(o);if(!i)return;const l=i.isEmpty?o:o+1,d=t!==void 0&&Object.keys(t).length>0?Object.assign(await this.api.blocks.composeBlockData(e),t):void 0,h=this.api.blocks.insert(e,d,void 0,l,void 0,i.isEmpty);this.api.caret.setToBlock(l),this.emit("toolbox-block-added",{block:h}),this.api.toolbar.close()}}const Ty="block hovered",xy=1e3;class AS extends Se{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.hoveredBlock=null,this.toolboxInstance=null,this.settingsTogglerMouseDownPosition=null,this.onBlockSettingsOpen=()=>{var o;(o=this.nodes.settingsToggler)==null||o.classList.add(this.CSS.settingsTogglerOpened)},this.onBlockSettingsClose=()=>{var o;(o=this.nodes.settingsToggler)==null||o.classList.remove(this.CSS.settingsTogglerOpened)}}get CSS(){return{toolbar:yt("absolute left-0 right-0 top-0 transition-opacity duration-100 ease-linear will-change-[opacity,top]"),toolbarOpened:"block",toolbarClosed:"hidden",content:yt("relative mx-auto max-w-content"),actions:yt("absolute flex opacity-0 pr-[5px]","right-full","mobile:right-auto","group-data-[blok-rtl=true]:right-auto group-data-[blok-rtl=true]:left-[calc(-1*theme(width.toolbox-btn))]","mobile:group-data-[blok-rtl=true]:ml-0 mobile:group-data-[blok-rtl=true]:mr-auto mobile:group-data-[blok-rtl=true]:pr-0 mobile:group-data-[blok-rtl=true]:pl-[10px]"),actionsOpened:"opacity-100",plusButton:yt("text-dark cursor-pointer w-toolbox-btn h-toolbox-btn rounded-[7px] inline-flex justify-center items-center select-none","shrink-0","[&_svg]:h-6 [&_svg]:w-6","can-hover:hover:bg-bg-light","mobile:bg-white mobile:border mobile:border-[#e8e8eb] mobile:shadow-overlay-pane mobile:rounded-[6px] mobile:z-[2]","mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile","group-data-[blok-rtl=true]:right-[calc(-1*theme(width.toolbox-btn))] group-data-[blok-rtl=true]:left-auto","not-mobile:group-data-[blok-narrow=true]:left-[5px]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-0 not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:right-[5px]"),plusButtonShortcutKey:"text-white",settingsToggler:yt("text-dark cursor-pointer w-toolbox-btn h-toolbox-btn rounded-[7px] inline-flex justify-center items-center select-none","cursor-pointer select-none","[&_svg]:h-6 [&_svg]:w-6","active:cursor-grabbing","can-hover:hover:bg-bg-light can-hover:hover:cursor-grab","group-data-[blok-toolbox-opened=true]:can-hover:hover:cursor-pointer","mobile:bg-white mobile:border mobile:border-[#e8e8eb] mobile:shadow-overlay-pane mobile:rounded-[6px] mobile:z-[2]","mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile","not-mobile:w-6"),settingsTogglerHidden:"hidden",settingsTogglerOpened:yt("can-hover:hover:cursor-pointer")}}get opened(){var e,t;return(t=(e=this.nodes.wrapper)==null?void 0:e.classList.contains(this.CSS.toolbarOpened))!=null?t:!1}contains(e){var t,o;return!!((t=this.nodes.wrapper)!=null&&t.contains(e)||(o=this.toolboxInstance)!=null&&o.contains(e)||this.Blok.BlockSettings.contains(e))}get toolbox(){var e;return{opened:(e=this.toolboxInstance)==null?void 0:e.opened,close:()=>{var t;(t=this.toolboxInstance)==null||t.close()},open:()=>{if(this.toolboxInstance===null){Be("toolbox.open() called before initialization is finished","warn");return}this.hoveredBlock&&(this.Blok.BlockManager.currentBlock=this.hoveredBlock),this.toolboxInstance.open()},toggle:()=>{if(this.toolboxInstance===null){Be("toolbox.toggle() called before initialization is finished","warn");return}this.toolboxInstance.toggle()},hasFocus:()=>{var t;return(t=this.toolboxInstance)==null?void 0:t.hasFocus()}}}get blockActions(){return{hide:()=>{var e,t;(e=this.nodes.actions)==null||e.classList.remove(this.CSS.actionsOpened),(t=this.nodes.actions)==null||t.removeAttribute("data-blok-opened")},show:()=>{var e,t;(e=this.nodes.actions)==null||e.classList.add(this.CSS.actionsOpened),(t=this.nodes.actions)==null||t.setAttribute("data-blok-opened","true")}}}get blockTunesToggler(){return{hide:()=>{var e;return(e=this.nodes.settingsToggler)==null?void 0:e.classList.add(this.CSS.settingsTogglerHidden)},show:()=>{var e;return(e=this.nodes.settingsToggler)==null?void 0:e.classList.remove(this.CSS.settingsTogglerHidden)}}}toggleReadOnly(e){e?(this.destroy(),this.Blok.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback(async()=>{await this.drawUI(),this.enableModuleBindings()},{timeout:2e3})}moveAndOpen(e){if(this.toolboxInstance===null){Be("Can't open Toolbar since Blok initialization is not finished yet","warn");return}this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Blok.BlockSettings.opened&&this.Blok.BlockSettings.close();const t=e!=null?e:this.Blok.BlockManager.currentBlock;if(!t)return;this.hoveredBlock=t;const{wrapper:o,plusButton:i}=this.nodes;if(!o||!i)return;const l=t.holder,{isMobile:c}=this.Blok.UI,d=20,h=t.firstInput,g=l.getBoundingClientRect(),v=h!==void 0?h.getBoundingClientRect():null,y=v!==null?v.top-g.top:null,b=(()=>{const T=parseInt(window.getComputedStyle(t.pluginsContent).paddingTop,10);if(c){const H=parseInt(window.getComputedStyle(i).height,10);return T-H}if(h===void 0||y===null||y>d)return T;const S=H1(h),O=parseInt(window.getComputedStyle(i).height,10);return S-O+8+y})();o.style.top=`${Math.floor(b)}px`,l.appendChild(o);const x=t.getTunes(),w=x.toolTunes.length>0||x.commonTunes.length>0;this.Blok.BlockManager.blocks.length===1&&t.isEmpty&&!w?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){var e,t,o,i;this.Blok.ReadOnly.isEnabled||((e=this.nodes.wrapper)==null||e.classList.remove(this.CSS.toolbarOpened),(t=this.nodes.wrapper)==null||t.classList.add(this.CSS.toolbarClosed),(o=this.nodes.wrapper)==null||o.removeAttribute("data-blok-opened"),this.blockActions.hide(),(i=this.toolboxInstance)==null||i.close(),this.Blok.BlockSettings.close(),this.reset())}reset(){this.nodes.wrapper&&(this.nodes.wrapper.style.top="unset",this.Blok.UI.nodes.wrapper.appendChild(this.nodes.wrapper))}open(e=!0){var t,o,i;(t=this.nodes.wrapper)==null||t.classList.remove(this.CSS.toolbarClosed),(o=this.nodes.wrapper)==null||o.classList.add(this.CSS.toolbarOpened),(i=this.nodes.wrapper)==null||i.setAttribute("data-blok-opened","true"),e?this.blockActions.show():this.blockActions.hide()}async make(){const e=N.make("div",[this.CSS.toolbar,this.CSS.toolbarClosed,"group-data-[blok-dragging=true]:pointer-events-none"]);this.nodes.wrapper=e,e.setAttribute(Hx,""),e.setAttribute("data-blok-testid","toolbar");const t=N.make("div",this.CSS.content),o=N.make("div",[this.CSS.actions,"not-mobile:group-data-[blok-narrow=true]:right-[calc(-1*theme(spacing.narrow-mode-right-padding)-5px)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:right-auto","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-[calc(-1*theme(spacing.narrow-mode-right-padding)-5px)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-[-5px]"]);this.nodes.content=t,this.nodes.actions=o,o.setAttribute("data-blok-testid","toolbar-actions"),N.append(e,t),N.append(t,o);const i=N.make("div",this.CSS.plusButton,{innerHTML:tS});i.setAttribute("data-blok-testid","plus-button"),this.nodes.plusButton=i,N.append(o,i),this.readOnlyMutableListeners.on(i,"click",()=>{Qo(!0),this.plusButtonClicked()},!1);const l=N.make("div"),c=T=>{const S=document.createDocumentFragment(),O=T.indexOf(" ");if(O>0){const L=T.substring(0,O),U=T.substring(O);S.appendChild(N.make("span",this.CSS.plusButtonShortcutKey,{textContent:L})),S.appendChild(document.createTextNode(U))}else S.appendChild(document.createTextNode(T));return S};l.appendChild(c($e.ui(it.ui.toolbar.toolbox,"Click to add below"))),l.appendChild(N.make("br"));const h=vv().win?$e.ui(it.ui.toolbar.toolbox,"Ctrl-click to add above"):$e.ui(it.ui.toolbar.toolbox,"Option-click to add above");l.appendChild(c(h)),vs(i,l,{hidingDelay:400});const g=N.make("span",[this.CSS.settingsToggler,"group-data-[blok-dragging=true]:cursor-grabbing"],{innerHTML:eS});g.setAttribute(jx,""),g.setAttribute(qx,""),g.setAttribute("data-blok-testid","settings-toggler"),this.nodes.settingsToggler=g,N.append(o,g);const v=N.make("div"),y=T=>{const S=N.make("div"),[O,...L]=T.split(" "),U=N.make("span",null,{textContent:O});return U.style.color="white",S.appendChild(U),L.length>0&&S.appendChild(N.text(" "+L.join(" "))),S},b=$e.ui(it.ui.blockTunes.toggler,"Drag to move"),x=$e.ui(it.ui.blockTunes.toggler,"Click to open the menu");v.appendChild(y(b)),v.appendChild(y(x)),vs(g,v,{hidingDelay:400}),N.append(o,this.makeToolbox());const w=this.Blok.BlockSettings.getElement();if(!w)throw new Error("Block Settings element was not created");N.append(o,w),N.append(this.Blok.UI.nodes.wrapper,e)}makeToolbox(){this.toolboxInstance=new BS({api:this.Blok.API.methods,tools:this.Blok.Tools.blockTools,i18nLabels:{filter:$e.ui(it.ui.popover,"Filter"),nothingFound:$e.ui(it.ui.popover,"Nothing found")},triggerElement:this.nodes.plusButton}),this.toolboxInstance.on(ws.Opened,()=>{this.Blok.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier),this.Blok.UI.nodes.wrapper.setAttribute(Vv,"true")}),this.toolboxInstance.on(ws.Closed,()=>{this.Blok.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier),this.Blok.UI.nodes.wrapper.removeAttribute(Vv)}),this.toolboxInstance.on(ws.BlockAdded,({block:t})=>{const{BlockManager:o,Caret:i}=this.Blok,l=o.getBlockById(t.id);if(!l||l.inputs.length!==0)return;if(l===o.lastBlock){o.insertAtEnd(),i.setToBlock(o.lastBlock);return}const c=o.nextBlock;c&&i.setToBlock(c)});const e=this.toolboxInstance.getElement();if(e===null)throw new Error("Toolbox element was not created");return e}plusButtonClicked(){var e;this.hoveredBlock&&(this.Blok.BlockManager.currentBlock=this.hoveredBlock),this.Blok.BlockSettings.opened&&this.Blok.BlockSettings.close(),(e=this.toolboxInstance)==null||e.toggle()}enableModuleBindings(){const e=this.nodes.settingsToggler;e&&(this.readOnlyMutableListeners.on(e,"mousedown",t=>{t.stopPropagation(),Qo(!0);const o=t;this.settingsTogglerMouseDownPosition={x:o.clientX,y:o.clientY}},!0),this.readOnlyMutableListeners.on(e,"click",t=>{var c;t.stopPropagation();const o=t,i=this.settingsTogglerMouseDownPosition;this.settingsTogglerMouseDownPosition=null,!(i!==null&&(Math.abs(o.clientX-i.x)>xy||Math.abs(o.clientY-i.y)>xy))&&(this.settingsTogglerClicked(),(c=this.toolboxInstance)!=null&&c.opened&&this.toolboxInstance.close())},!0)),Gn()||this.eventsDispatcher.on(Ty,t=>{var i;const o=t.block;o instanceof Yo&&(this.Blok.BlockSettings.opened||(i=this.toolboxInstance)!=null&&i.opened||this.moveAndOpen(o))}),this.eventsDispatcher.on(ed,this.onBlockSettingsOpen),this.eventsDispatcher.on(td,this.onBlockSettingsClose)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll(),this.eventsDispatcher.off(ed,this.onBlockSettingsOpen),this.eventsDispatcher.off(td,this.onBlockSettingsClose)}settingsTogglerClicked(){const e=this.hoveredBlock;e&&(this.Blok.BlockManager.currentBlock=e,this.Blok.BlockSettings.opened?this.Blok.BlockSettings.close():this.Blok.BlockSettings.open(e,this.nodes.settingsToggler))}async drawUI(){this.Blok.BlockSettings.make(),await this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy()}}var Ir=(a=>(a[a.Block=0]="Block",a[a.Inline=1]="Inline",a[a.Tune=2]="Tune",a))(Ir||{}),Ts=(a=>(a.Shortcut="shortcut",a.Toolbox="toolbox",a.EnabledInlineTools="inlineToolbar",a.EnabledBlockTunes="tunes",a.Config="config",a))(Ts||{}),Ey=(a=>(a.Shortcut="shortcut",a.SanitizeConfig="sanitize",a))(Ey||{}),so=(a=>(a.IsEnabledLineBreaks="enableLineBreaks",a.Toolbox="toolbox",a.ConversionConfig="conversionConfig",a.IsReadOnlySupported="isReadOnlySupported",a.PasteConfig="pasteConfig",a))(so||{}),Sy=(a=>(a.IsInline="isInline",a.Title="title",a.IsReadOnlySupported="isReadOnlySupported",a))(Sy||{}),Cd=(a=>(a.IsTune="isTune",a))(Cd||{});class Bd{constructor({name:e,constructable:t,config:o,api:i,isDefault:l,isInternal:c=!1,defaultPlaceholder:d}){this.api=i,this.name=e,this.constructable=t,this.config=o,this.isDefault=l,this.isInternal=c,this.defaultPlaceholder=d}get settings(){var t;const e=(t=this.config.config)!=null?t:{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(De(this.constructable.reset))return this.constructable.reset()}prepare(){const e=this.constructable.prepare;if(!De(e))return;const t={toolName:this.name,config:this.settings};return e.call(this.constructable,t)}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return this.type===Ir.Inline}isBlock(){return this.type===Ir.Block}isTune(){return this.type===Ir.Tune}}const IS="absolute top-0 left-0 z-[3] opacity-100 visible transition-opacity duration-[250ms] ease-out will-change-[opacity,left,top] [&_[hidden]]:!hidden";class _S extends Se{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.opened=!1,this.popover=null,this.toolbarVerticalMargin=Gn()?20:6,this.initialized=!1,this.initializationScheduled=!1,this.tools=new Map,this.registeredShortcuts=new Map,this.shortcutsRegistered=!1,this.shortcutRegistrationScheduled=!1,this.listeners.on(document,"keydown",o=>{const i=o;i.shiftKey&&(i.key==="ArrowDown"||i.key==="ArrowUp")&&this.tryToShow()},!0),this.scheduleInitialization(),this.tryRegisterShortcuts()}set state(e){super.state=e,this.tryRegisterShortcuts()}initialize(){var e,t,o;if(!this.initialized){if(!((o=(t=(e=this.Blok)==null?void 0:e.UI)==null?void 0:t.nodes)!=null&&o.wrapper)||this.Blok.Tools===void 0){this.scheduleInitialization();return}this.make(),this.tryRegisterShortcuts(),this.initialized=!0}}tryRegisterShortcuts(){var t;if(this.shortcutsRegistered)return;if(((t=this.Blok)==null?void 0:t.Tools)===void 0){this.scheduleShortcutRegistration();return}this.registerInitialShortcuts()&&(this.shortcutsRegistered=!0)}scheduleShortcutRegistration(){if(this.shortcutsRegistered||this.shortcutRegistrationScheduled)return;this.shortcutRegistrationScheduled=!0;const e=()=>{this.shortcutRegistrationScheduled=!1,this.tryRegisterShortcuts()};typeof window!="undefined"&&typeof window.setTimeout=="function"?window.setTimeout(e,0):e()}scheduleInitialization(){if(this.initialized||this.initializationScheduled)return;this.initializationScheduled=!0;const e=()=>{this.initializationScheduled=!1,this.initialize()},t=()=>{window.setTimeout(e,0)};typeof window!="undefined"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{t()},{timeout:2e3}):t()}async tryToShow(e=!1){e&&this.close(),this.initialize(),this.allowedToShow()&&(await this.open(),this.Blok.Toolbar.close())}close(){var i,l,c,d,h,g,v;if(!this.opened)return;for(const y of this.tools.values());this.tools=new Map,this.reset(),this.opened=!1;const e=(i=this.popover)!=null?i:this.createFallbackPopover();(l=e==null?void 0:e.hide)==null||l.call(e),(c=e==null?void 0:e.destroy)==null||c.call(e);const t=Td.mock,o=(h=(d=t==null?void 0:t.results)==null?void 0:d.at(-1))==null?void 0:h.value;o&&o!==e&&((g=o.hide)==null||g.call(o),(v=o.destroy)==null||v.call(o)),this.popover=null}containsNode(e){return this.nodes.wrapper===void 0?!1:this.nodes.wrapper.contains(e)}destroy(){var e;this.removeAllNodes(),(e=this.popover)==null||e.destroy(),this.popover=null}make(){this.nodes.wrapper=N.make("div"),this.nodes.wrapper.className=Ae(IS),this.nodes.wrapper.setAttribute(ro,Ix),this.nodes.wrapper.setAttribute("data-blok-testid","inline-toolbar"),N.append(this.Blok.UI.nodes.wrapper,this.nodes.wrapper)}async open(){var i,l,c,d,h,g,v,y,b,x,w,T,S;if(this.opened)return;this.initialize(),this.opened=!0,this.popover!==null&&this.popover.destroy(),this.createToolsInstances();const e=await this.getPopoverItems();this.popover=new Td({items:e,scopeElement:(h=(d=(c=(l=(i=this.Blok.API)==null?void 0:i.methods)==null?void 0:l.ui)==null?void 0:c.nodes)==null?void 0:d.redactor)!=null?h:this.Blok.UI.nodes.redactor,messages:{nothingFound:$e.ui(it.ui.popover,"Nothing found"),search:$e.ui(it.ui.popover,"Filter")}});const t=(v=(g=this.popover).getElement)==null?void 0:v.call(g),o=(x=(b=(y=this.popover.size)==null?void 0:y.width)!=null?b:t==null?void 0:t.getBoundingClientRect().width)!=null?x:0;this.move(o),t&&((w=this.nodes.wrapper)==null||w.append(t)),(S=(T=this.popover).show)==null||S.call(T)}move(e){const t=se.rect,o=this.Blok.UI.nodes.wrapper.getBoundingClientRect(),i={x:t.x-o.x,y:t.y+t.height-o.top+this.toolbarVerticalMargin};i.x+e+o.x>this.Blok.UI.contentRect.right&&(i.x=this.Blok.UI.contentRect.right-e-o.x),this.nodes.wrapper.style.left=Math.floor(i.x)+"px",this.nodes.wrapper.style.top=Math.floor(i.y)+"px"}reset(){this.nodes.wrapper!==void 0&&(this.nodes.wrapper.style.left="0",this.nodes.wrapper.style.top="0")}allowedToShow(){const e=["IMG","INPUT"],t=this.resolveSelection(),o=se.text;if(!t||!t.anchorNode||t.isCollapsed||o.length<1)return!1;const i=N.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(i===null||t!==null&&e.includes(i.tagName))return!1;const l=N.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement,c=l?this.Blok.BlockManager.getBlock(l):null,d=c!=null?c:this.Blok.BlockManager.currentBlock;if(d==null||this.getTools().some(w=>d.tool.inlineTools.has(w.name))===!1)return!1;const v="[contenteditable]";if(i.closest(v)!==null)return!0;const b=d.holder;return b&&(b.matches(v)?b:b.closest(v))?!0:this.Blok.ReadOnly.isEnabled?se.isSelectionAtBlok(t):!1}getTools(){var o;const e=(o=this.Blok.BlockManager.currentBlock)!=null?o:(()=>{const i=this.resolveSelection(),l=i==null?void 0:i.anchorNode;if(!l)return null;const c=N.isElement(l)?l:l.parentElement;return c?this.Blok.BlockManager.getBlock(c):null})();return e?Array.from(e.tool.inlineTools.values()).filter(i=>!(this.Blok.ReadOnly.isEnabled&&i.isReadOnlySupported!==!0)):[]}createToolsInstances(){this.tools=new Map,this.getTools().forEach(t=>{const o=t.create();this.tools.set(t,o)})}async getPopoverItems(){const e=[],t=Array.from(this.tools.entries());for(const[o,[i,l]]of t.entries()){const c=await l.render(),d=this.getToolShortcut(i.name);this.tryEnableShortcut(i.name,d);const h=d!==void 0?yv(d):void 0,g=$e.t(it.toolNames,i.title||us(i.name));[c].flat().forEach(v=>{this.processPopoverItem(v,i.name,l,g,h,e,o)})}return e}tryEnableShortcut(e,t){if(t!==void 0)try{this.enableShortcuts(e,t)}catch(o){}}processPopoverItem(e,t,o,i,l,c,d){const h={name:t,hint:{title:i,description:l}};if(!N.isElement(e)){if(e.type===tt.Html){c.push(Tt(be(be({},h),e),{type:tt.Html}));return}if(e.type===tt.Separator){c.push({type:tt.Separator});return}this.processDefaultItem(e,h,c,d)}}processDefaultItem(e,t,o,i){const l=Tt(be(be({},t),e),{type:tt.Default});o.push(l),"children"in l&&i===0&&o.push({type:tt.Separator})}getToolShortcut(e){const{Tools:t}=this.Blok,o=t.inlineTools.get(e),i=t.internal.inlineTools;return Array.from(i.keys()).includes(e)?this.inlineTools[e][Ey.Shortcut]:o==null?void 0:o.shortcut}enableShortcuts(e,t){const o=this.registeredShortcuts.get(e);o!==t&&(this.isShortcutTakenByAnotherTool(e,t)||(o!==void 0&&(io.remove(document,o),this.registeredShortcuts.delete(e)),io.add({name:t,handler:i=>{const{currentBlock:l}=this.Blok.BlockManager;l&&l.tool.enabledInlineTools!==!1&&(i.preventDefault(),this.activateToolByShortcut(e))},on:document}),this.registeredShortcuts.set(e,t)))}isShortcutTakenByAnotherTool(e,t){return Array.from(this.registeredShortcuts.entries()).some(([o,i])=>o!==e&&i===t)}async activateToolByShortcut(e){if(this.opened||await this.tryToShow(),this.popover){this.popover.activateItemByName(e);return}this.invokeToolActionDirectly(e)}invokeToolActionDirectly(e){const t=this.Blok.Tools.inlineTools.get(e);if(!t)return;const i=t.create().render(),l=Array.isArray(i)?i:[i];for(const c of l)if("onActivate"in c&&typeof c.onActivate=="function"){c.onActivate(c);return}}get inlineTools(){const e={};return Array.from(this.Blok.Tools.inlineTools.entries()).forEach(([t,o])=>{e[t]=o.create()}),e}registerInitialShortcuts(){var o;const e=(o=this.Blok.Tools)==null?void 0:o.inlineTools;return e?(Array.from(e.keys()).forEach(i=>{const l=this.getToolShortcut(i);this.tryEnableShortcut(i,l)}),!0):(this.scheduleShortcutRegistration(),!1)}createFallbackPopover(){var e,t,o,i,l;try{const c=(l=(i=(o=(t=(e=this.Blok.API)==null?void 0:e.methods)==null?void 0:t.ui)==null?void 0:o.nodes)==null?void 0:i.redactor)!=null?l:this.Blok.UI.nodes.redactor;return new Td({items:[],scopeElement:c,messages:{nothingFound:$e.ui(it.ui.popover,"Nothing found"),search:$e.ui(it.ui.popover,"Filter")}})}catch(c){return null}}resolveSelection(){const e=se.selection;if(e!==void 0)return e;const t=se.instance;return t!==void 0?t:se.get()}}var _r=hd();const RS=Ne(_r),NS=_r.createContext(null),OS=({modules:a,config:e,eventsDispatcher:t,children:o})=>{var g,v,y;const[i,l]=_r.useState((g=e.readOnly)!=null?g:!1),[c,d]=_r.useState((y=(v=a.UI)==null?void 0:v.isMobile)!=null?y:!1);_r.useEffect(()=>(a.ReadOnly&&l(a.ReadOnly.isEnabled),()=>{}),[a.ReadOnly]),_r.useEffect(()=>{const b=x=>{d(x.isEnabled)};return t.on(Er,b),()=>{t.off(Er,b)}},[t]);const h=_r.useMemo(()=>({modules:a,config:e,eventsDispatcher:t,readOnly:i,isMobile:c}),[a,e,t,i,c]);return xn.jsx(NS.Provider,{value:h,children:o})};class LS extends Se{constructor(){super(...arguments),this.root=null,this.currentComponent=null,this.isMounted=!1}async prepare(){this.createReactContainer()}render(e){this.root||this.initializeRoot(),this.currentComponent=e,this.performRender()}forceUpdate(){this.isMounted&&this.currentComponent&&this.performRender()}destroy(){var e;this.root&&(this.root.unmount(),this.root=null),(e=this.nodes.reactRoot)!=null&&e.parentNode&&this.nodes.reactRoot.remove(),this.isMounted=!1,this.currentComponent=null}getContainer(){var e;return(e=this.nodes.reactRoot)!=null?e:null}get mounted(){return this.isMounted}getModulesWithSelf(){return Tt(be({},this.Blok),{ReactAdapter:this})}createReactContainer(){const e=document.createElement("div");e.setAttribute("data-blok-react-root",""),e.setAttribute("data-blok-testid","react-root"),e.style.cssText=`
171
+ `,py=ge.forwardRef(({icon:a,title:e,secondaryLabel:t,isActive:r=!1,isDisabled:i=!1,hasChildren:l=!1,hideChevron:c=!1,wrapperTag:d="div",name:h,iconWithGap:g=!0,isInline:m=!1,isNestedInline:y=!1},b)=>{var Se,Ie,ye;const[T,k]=ge.useState(r),[x,S]=ge.useState(!1),[R,O]=ge.useState(!1),[H,P]=ge.useState(!1),[$,j]=ge.useState(!1),[U,M]=ge.useState(!1),[X,ae]=ge.useState(!1),[G,ke]=ge.useState(null),Z=(Se=G==null?void 0:G.icon)!=null?Se:a,Te=(Ie=G==null?void 0:G.title)!=null?Ie:e,Re=(ye=G==null?void 0:G.secondaryLabel)!=null?ye:t,xe=i,Ce=bs.useRef(null),D=ge.useCallback(()=>{st.flushSync(()=>ae(!1))},[]);bs.useEffect(()=>{const fe=Ce.current;if(!(!fe||!X))return fe.addEventListener("animationend",D),()=>{fe.removeEventListener("animationend",D)}},[X,D]),ge.useImperativeHandle(b,()=>({setActive:fe=>{st.flushSync(()=>k(fe))},setHidden:fe=>{st.flushSync(()=>S(fe))},setFocused:fe=>{st.flushSync(()=>O(fe))},setConfirmation:fe=>{st.flushSync(()=>{fe===null?(P(!1),ke(null)):(P(!0),ke({icon:fe.icon,title:fe.title||fe.label,secondaryLabel:fe.secondaryLabel}))})},setNoHover:fe=>{st.flushSync(()=>j(fe))},setNoFocus:fe=>{st.flushSync(()=>M(fe))},triggerWobble:()=>{X||st.flushSync(()=>ae(!0))},getIconElement:()=>Ce.current}),[X]);const ce=De(Ir.item,m&&eE.item,y&&tE.item,T&&Ir.itemActive,xe&&Ir.itemDisabled,R&&"!bg-item-focus-bg",H&&"!bg-item-confirm-bg !text-white",x&&"!hidden"),Y=De(Ir.icon,m&&"w-auto h-auto [&_svg]:w-icon [&_svg]:h-icon mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile",y&&"w-toolbox-btn h-toolbox-btn",g&&"mr-2",g&&m&&"shadow-none bg-transparent !mr-0",g&&y&&"!mr-2",X&&"animate-wobble"),A=De(Ir.icon,m&&"rotate-90"),F=l&&!c,se=tt.jsxs(tt.Fragment,{children:[Z&&tt.jsx("div",ot(de(de({ref:Ce,[gt.icon]:""},g&&{[gt.iconTool]:""}),X&&{[gt.wobble]:"true"}),{className:Y,"data-blok-testid":"popover-item-icon",dangerouslySetInnerHTML:{__html:Z}})),Te!==void 0&&tt.jsx("div",{[gt.title]:"",className:"mr-auto truncate text-sm font-medium leading-5","data-blok-testid":"popover-item-title",children:Te}),Re&&tt.jsx("div",{[gt.secondaryTitle]:"",className:"whitespace-nowrap pr-1.5 text-xs -tracking-widest text-text-secondary opacity-60","data-blok-testid":"popover-item-secondary-title",children:Re}),F&&tt.jsx("div",{[gt.icon]:"",[gt.iconChevronRight]:"",className:A,"data-blok-testid":"popover-item-chevron-right",dangerouslySetInnerHTML:{__html:uE}})]}),ue=de(de(de(de(de(de(de(de(de({className:ce,[gt.item]:"","data-blok-testid":"popover-item"},h&&{"data-blok-item-name":h}),xe&&{[gt.disabled]:"true"}),T&&{[gt.active]:"true"}),x&&{[gt.hidden]:"true"}),H&&{[gt.confirmation]:"true"}),R&&{[gt.focused]:"true"}),$&&{[gt.noHover]:"true"}),U&&{[gt.noFocus]:"true"}),l&&{[gt.hasChildren]:"true"});return d==="button"?tt.jsx("button",ot(de({type:"button"},ue),{children:se})):tt.jsx("div",ot(de({},ue),{children:se}))});py.displayName="PopoverItemDefaultComponent";const kd='[data-blok-testid="popover-item-icon"]';class Mn extends bd{constructor(e,t){super(e),this.params=e,this.nodes={root:null,icon:null},this.reactRoot=null,this.componentRef=ge.createRef(),this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{var r;(r=this.componentRef.current)==null||r.setNoFocus(!1)},this.removeSpecialHoverBehavior=()=>{var r;(r=this.componentRef.current)==null||r.setNoHover(!1)},this.renderParams=t,this.nodes.root=this.createRootElement(e,t)}get isDisabled(){return this.params.isDisabled===!0}get toggle(){return this.params.toggle}get title(){return this.params.title||this.params.label}get isConfirmationStateEnabled(){return this.confirmationState!==null}get isFocused(){return this.nodes.root===null?!1:this.nodes.root.hasAttribute(gt.focused)}getElement(){return this.nodes.root}handleClick(){if(this.isConfirmationStateEnabled&&this.confirmationState!==null){this.activateOrEnableConfirmationMode(this.confirmationState);return}this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){var i;if(this.nodes.root===null)return;const t=this.nodes.root.hasAttribute(gt.active),r=e!==void 0?e:!t;(i=this.componentRef.current)==null||i.setActive(r)}toggleHidden(e){var t;(t=this.componentRef.current)==null||t.setHidden(e)}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}destroy(){if(super.destroy(),this.reactRoot){try{this.reactRoot.unmount()}catch(e){}this.reactRoot=null}}createRootElement(e,t){var c,d,h;const r=document.createElement("div");r.style.display="contents",this.reactRoot=so.createRoot(r),this.renderComponent(e,t);const i=r.firstElementChild;return i?(this.nodes.icon=i.querySelector(kd),e.hint!==void 0&&((c=t==null?void 0:t.hint)==null?void 0:c.enabled)!==!1&&e.hint!==void 0&&this.addHint(i,ot(de({},e.hint),{position:((d=t==null?void 0:t.hint)==null?void 0:d.position)||"right",alignment:((h=t==null?void 0:t.hint)==null?void 0:h.alignment)||"center"})),i):r}renderComponent(e,t){if(!this.reactRoot)return;const r=e.title||e.label;st.flushSync(()=>{var i;(i=this.reactRoot)==null||i.render(tt.jsx(py,{ref:this.componentRef,icon:e.icon,title:r,secondaryLabel:e.secondaryLabel,isActive:this.isActive,isDisabled:e.isDisabled,hasChildren:this.hasChildren,hideChevron:this.isChevronHidden,wrapperTag:t==null?void 0:t.wrapperTag,name:e.name,iconWithGap:t==null?void 0:t.iconWithGap,isInline:t==null?void 0:t.isInline,isNestedInline:t==null?void 0:t.isNestedInline}))})}enableConfirmationMode(e){var r,i,l;if(this.nodes.root===null)return;const t=ot(de(de({},this.params),e),{confirmation:"confirmation"in e?e.confirmation:void 0});(r=this.componentRef.current)==null||r.setConfirmation(t),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior(),this.nodes.icon=(l=(i=this.componentRef.current)==null?void 0:i.getIconElement())!=null?l:this.nodes.root.querySelector(kd)}disableConfirmationMode(){var e,t,r;this.nodes.root!==null&&((e=this.componentRef.current)==null||e.setConfirmation(null),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior(),this.nodes.icon=(r=(t=this.componentRef.current)==null?void 0:t.getIconElement())!=null?r:this.nodes.root.querySelector(kd))}enableSpecialHoverAndFocusBehavior(){var e,t,r;(e=this.componentRef.current)==null||e.setNoHover(!0),(t=this.componentRef.current)==null||t.setNoFocus(!0),(r=this.nodes.root)==null||r.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){var e;this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),(e=this.nodes.root)==null||e.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){var t;if(!("confirmation"in e)||e.confirmation===void 0)try{(t=e.onActivate)==null||t.call(e,e),this.disableConfirmationMode()}catch(r){this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){var e;(e=this.componentRef.current)==null||e.triggerWobble()}}const Rr={container:"py-1 px-[3px]",containerHidden:"hidden",line:"h-px w-full bg-popover-border"},ws={container:"px-1 py-0",line:"h-full w-px",nestedContainer:"py-1 px-[3px]",nestedLine:"w-full h-px"},wd={root:"data-blok-popover-item-separator",line:"data-blok-popover-item-separator-line",hidden:"data-blok-hidden"},gy=ge.forwardRef(({isInline:a=!1,isNestedInline:e=!1},t)=>{const[r,i]=ge.useState(!1);ge.useImperativeHandle(t,()=>({setHidden:d=>{st.flushSync(()=>i(d))}}),[]);const l=()=>{const d=Rr.container;return e?De(d,ws.nestedContainer,r&&Rr.containerHidden):a?De(d,ws.container,r&&Rr.containerHidden):De(d,r&&Rr.containerHidden)},c=()=>e?De(Rr.line,ws.nestedLine):a?De(Rr.line,ws.line):Rr.line;return tt.jsx("div",ot(de({className:l(),[wd.root]:""},r&&{[wd.hidden]:"true"}),{"data-blok-testid":"popover-item-separator",children:tt.jsx("div",{className:c(),[wd.line]:""})}))});gy.displayName="PopoverItemSeparatorComponent";class my extends bd{constructor(e){var t,r;super(),this.nodes={root:null},this.reactRoot=null,this.componentRef=ge.createRef(),this.isInline=(t=e==null?void 0:e.isInline)!=null?t:!1,this.isNestedInline=(r=e==null?void 0:e.isNestedInline)!=null?r:!1,this.nodes.root=this.createRootElement()}getElement(){return this.nodes.root}toggleHidden(e){var t;(t=this.componentRef.current)==null||t.setHidden(e)}destroy(){if(super.destroy(),this.reactRoot){try{this.reactRoot.unmount()}catch(e){}this.reactRoot=null}}createRootElement(){const e=document.createElement("div");e.style.display="contents",this.reactRoot=so.createRoot(e),st.flushSync(()=>{var r;(r=this.reactRoot)==null||r.render(tt.jsx(gy,{ref:this.componentRef,isInline:this.isInline,isNestedInline:this.isNestedInline}))});const t=e.firstElementChild;return t!=null?t:e}}var tn=(a=>(a.Closed="closed",a.ClosedOnActivate="closed-on-activate",a))(tn||{});const vy={root:"",rootHidden:"hidden"},wE={root:"flex items-center"},yy={root:"data-blok-popover-item-html",hidden:"data-blok-hidden"},by=ge.forwardRef(({element:a,name:e,isInline:t=!1},r)=>{const[i,l]=ge.useState(!1),c=ge.useRef(null);ge.useEffect(()=>(c.current&&a&&c.current.appendChild(a),()=>{}),[a]),ge.useImperativeHandle(r,()=>({setHidden:h=>{st.flushSync(()=>l(h))},getRootElement:()=>c.current}),[]);const d=De(vy.root,t&&wE.root,i&&vy.rootHidden);return tt.jsx("div",de(ot(de({ref:c,className:d,[yy.root]:""},i&&{[yy.hidden]:"true"}),{"data-blok-testid":"popover-item-html"}),e&&{"data-blok-item-name":e}))});by.displayName="PopoverItemHtmlComponent";class ni extends bd{constructor(e,t){var r;super(e),this.nodes={root:null},this.reactRoot=null,this.componentRef=ge.createRef(),this.itemParams=e,this.isInline=(r=t==null?void 0:t.isInline)!=null?r:!1,this.nodes.root=this.createRootElement(e,t)}getElement(){return this.nodes.root}toggleHidden(e){var t;(t=this.componentRef.current)==null||t.setHidden(e)}getControls(){if(!this.nodes.root)return[];const e=this.nodes.root.querySelectorAll(`button, ${L.allInputsSelector}`);return Array.from(e)}destroy(){if(super.destroy(),this.reactRoot){try{this.reactRoot.unmount()}catch(e){}this.reactRoot=null}}createRootElement(e,t){var l,c,d;const r=document.createElement("div");r.style.display="contents",this.reactRoot=so.createRoot(r),st.flushSync(()=>{var h;(h=this.reactRoot)==null||h.render(tt.jsx(by,{ref:this.componentRef,element:e.element,name:e.name,isInline:this.isInline}))});const i=r.firstElementChild;return i?(e.hint!==void 0&&((l=t==null?void 0:t.hint)==null?void 0:l.enabled)!==!1&&this.addHint(i,ot(de({},e.hint),{position:((c=t==null?void 0:t.hint)==null?void 0:c.position)||"right",alignment:((d=t==null?void 0:t.hint)==null?void 0:d.alignment)||"center"})),i):r}}const mt={popoverContainer:"absolute flex flex-col overflow-hidden box-border opacity-0 pointer-events-none p-0 border-none z-[4] max-h-0 min-w-[var(--width)] w-[var(--width)] rounded-lg shadow-[0_3px_15px_-3px_theme(colors.popover-shadow)] left-[var(--popover-left)] top-[var(--popover-top)] bg-popover-bg",popoverContainerMobile:"fixed max-w-none rounded-[10px] min-w-[calc(100%-var(--offset)*2)] inset-[auto_var(--offset)_calc(var(--offset)+env(safe-area-inset-bottom))_var(--offset)]",popoverContainerOpened:"opacity-100 pointer-events-auto p-1 max-h-[var(--max-height)] border border-popover-border animate-[panelShowing_100ms_ease]",popoverOverlay:"hidden bg-dark",items:"overflow-y-auto overscroll-contain"},ao={popover:"relative",popoverContainer:"flex-row top-0 min-w-max w-max p-1 mobile:absolute"},vt={popoverContainer:"data-blok-popover-container",popoverItems:"data-blok-popover-items",popoverOverlay:"data-blok-popover-overlay",popoverInline:"data-blok-popover-inline",nested:"data-blok-nested",nestedLevel:"data-blok-nested-level",opened:"data-blok-popover-opened",openTop:"data-blok-popover-open-top",openLeft:"data-blok-popover-open-left",overlayHidden:"data-blok-overlay-hidden",nothingFoundDisplayed:"data-blok-nothing-found-displayed"},TE=a=>`level-${a}`;var nn=(a=>(a.NestingLevel="--nesting-level",a.PopoverHeight="--popover-height",a.InlinePopoverWidth="--inline-popover-width",a.PopoverTop="--popover-top",a.PopoverLeft="--popover-left",a.TriggerItemLeft="--trigger-item-left",a.TriggerItemTop="--trigger-item-top",a))(nn||{});const ky=ge.forwardRef(({customClass:a,messages:e,children:t},r)=>{const[i,l]=ge.useState(!1),[c,d]=ge.useState(!1),[h,g]=ge.useState(!1),[m,y]=ge.useState(!1),[b,T]=ge.useState(!1),k=ge.useRef(null),x=ge.useRef(null),S=ge.useRef(null),R=ge.useRef(null);ge.useImperativeHandle(r,()=>({getPopoverElement:()=>k.current,getContainerElement:()=>x.current,getItemsElement:()=>S.current,getNothingFoundElement:()=>R.current,setOpened:P=>{st.flushSync(()=>l(P))},setOpenTop:P=>{st.flushSync(()=>d(P))},setOpenLeft:P=>{st.flushSync(()=>g(P))},setNothingFoundVisible:P=>{st.flushSync(()=>y(P))},setContainerOpened:P=>{st.flushSync(()=>T(P))}}),[]);const O=De(mt.popoverContainer,b&&mt.popoverContainerOpened),H=De("cursor-default text-sm leading-5 font-medium whitespace-nowrap overflow-hidden text-ellipsis text-gray-text p-[3px]",!m&&"hidden");return tt.jsx("div",ot(de({ref:k,className:a,"data-blok-popover":"","data-blok-popover-opened":i?"true":void 0,"data-blok-popover-open-top":c?"true":void 0,"data-blok-popover-open-left":h?"true":void 0},a&&{"data-blok-popover-custom-class":a}),{"data-blok-testid":"popover",style:{"--width":"200px","--item-padding":"3px","--item-height":"calc(1.25rem + 2 * var(--item-padding))","--popover-top":"calc(100% + 0.5rem)","--popover-left":"0","--nested-popover-overlap":"0.25rem"},children:tt.jsxs("div",{ref:x,className:O,[vt.popoverContainer]:"","data-blok-testid":"popover-container",children:[tt.jsx("div",ot(de({ref:R,className:H},m&&{[vt.nothingFoundDisplayed]:"true"}),{"data-blok-testid":"popover-nothing-found",children:e.nothingFound})),tt.jsx("div",{ref:S,className:mt.items,[vt.popoverItems]:"","data-blok-testid":"popover-items",children:t})]})}))});ky.displayName="PopoverAbstractComponent";class wy extends Xo{constructor(e,t={}){super(),this.params=e,this.itemsRenderParams=t,this.listeners=new Yo,this.messages={nothingFound:"Nothing found",search:"Search"},this.reactRoot=null,this.reactContainer=null,this.componentRef=ge.createRef(),this.items=this.buildItems(e.items),e.messages&&(this.messages=de(de({},this.messages),e.messages)),this.nodes={},this.initializeReactRoot(),this.renderComponent(),this.syncNodesFromReact(),this.appendItemElements(),this.nodes.popoverContainer&&this.listeners.on(this.nodes.popoverContainer,"click",r=>this.handleClick(r))}get itemsDefault(){return this.items.filter(e=>e instanceof Mn)}getElement(){return this.nodes.popover}show(){var e,t;this.nodes.popover.isConnected||document.body.appendChild(this.nodes.popover),(e=this.componentRef.current)==null||e.setOpened(!0),(t=this.componentRef.current)==null||t.setContainerOpened(!0),this.itemsDefault.forEach(r=>this.refreshItemActiveState(r)),this.search!==void 0&&this.search.focus()}hide(){var e,t,r,i;(e=this.componentRef.current)==null||e.setOpened(!1),(t=this.componentRef.current)==null||t.setOpenTop(!1),(r=this.componentRef.current)==null||r.setOpenLeft(!1),(i=this.componentRef.current)==null||i.setContainerOpened(!1),this.itemsDefault.forEach(l=>l.reset()),this.search!==void 0&&this.search.clear(),this.emit(tn.Closed)}destroy(){var e,t;if(this.items.forEach(r=>r.destroy()),(e=this.nodes.popover)==null||e.remove(),this.listeners.removeAll(),(t=this.search)==null||t.destroy(),this.reactRoot){try{this.reactRoot.unmount()}catch(r){}this.reactRoot=null}}activateItemByName(e){const t=this.items.find(r=>r.name===e);t!==void 0&&this.handleItemClick(t)}buildItems(e){return e.map(t=>{switch(t.type){case et.Separator:return new my(this.itemsRenderParams[et.Separator]);case et.Html:return new ni(t,this.itemsRenderParams[et.Html]);default:return new Mn(t,this.itemsRenderParams[et.Default])}})}getTargetItem(e){return this.items.filter(t=>t instanceof Mn||t instanceof ni).find(t=>{const r=t.getElement();return r===null?!1:e.composedPath().includes(r)})}handleItemClick(e){if(!(e instanceof Mn&&e.isDisabled)){if(e.hasChildren){this.showNestedItems(e),this.callHandleClickIfPresent(e);return}this.itemsDefault.filter(t=>t!==e).forEach(t=>t.reset()),this.callHandleClickIfPresent(e),this.toggleItemActivenessIfNeeded(e),this.refreshItemActiveState(e),e.closeOnActivate===!0&&(this.hide(),this.emit(tn.ClosedOnActivate))}}handleClick(e){const t=this.getTargetItem(e);t!==void 0&&this.handleItemClick(t)}toggleItemActivenessIfNeeded(e){if(!(e instanceof Mn)||(e.toggle===!0&&e.toggleActive(),typeof e.toggle!="string"))return;const t=this.itemsDefault.filter(r=>r.toggle===e.toggle);if(t.length===1){e.toggleActive();return}t.forEach(r=>{r.toggleActive(r===e)})}refreshItemActiveState(e){e instanceof Mn&&e.toggle===void 0&&e.toggleActive(e.isActive)}callHandleClickIfPresent(e){"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick()}toggleNothingFoundMessage(e){var t;(t=this.componentRef.current)==null||t.setNothingFoundVisible(e)}setOpenTop(e){var t;(t=this.componentRef.current)==null||t.setOpenTop(e)}setOpenLeft(e){var t;(t=this.componentRef.current)==null||t.setOpenLeft(e)}hasNode(e){return this.nodes.popover.contains(e)}initializeReactRoot(){this.reactContainer=document.createElement("div"),this.reactContainer.style.display="contents",this.reactRoot=so.createRoot(this.reactContainer)}renderComponent(){this.reactRoot&&st.flushSync(()=>{var e;(e=this.reactRoot)==null||e.render(tt.jsx(ky,{ref:this.componentRef,customClass:this.params.class,messages:this.messages}))})}syncNodesFromReact(){var l,c,d,h;const e=(l=this.componentRef.current)==null?void 0:l.getPopoverElement(),t=(c=this.componentRef.current)==null?void 0:c.getContainerElement(),r=(d=this.componentRef.current)==null?void 0:d.getItemsElement(),i=(h=this.componentRef.current)==null?void 0:h.getNothingFoundElement();e&&(this.nodes.popover=e),t&&(this.nodes.popoverContainer=t),r&&(this.nodes.items=r),i&&(this.nodes.nothingFoundMessage=i)}appendItemElements(){this.items.forEach(e=>{var r;const t=e.getElement();t!==null&&((r=this.nodes.items)==null||r.appendChild(t))})}}var Td=(a=>(a.Search="search",a))(Td||{});const xd={wrapper:"bg-[#F8F8F8] border border-[rgba(226,226,229,0.20)] rounded p-0.5 grid grid-cols-[auto_auto_1fr] grid-rows-[auto]",icon:"w-toolbox-btn h-toolbox-btn flex items-center justify-center mr-2 [&_svg]:w-icon [&_svg]:h-icon [&_svg]:text-gray-text",input:"text-sm outline-none font-medium font-inherit border-0 bg-transparent m-0 p-0 leading-[22px] min-w-[calc(100%-theme('spacing.6')-10px)] placeholder:text-gray-text placeholder:font-medium"};class xE extends Xo{constructor({items:e,placeholder:t}){super(),this.searchQuery="",this.handleValueChange=()=>{this.applySearch(this.input.value)},this.listeners=new Yo,this.items=e,this.wrapper=L.make("div",xd.wrapper),this.wrapper.setAttribute("data-blok-testid","popover-search-field");const r=L.make("div",xd.icon,{innerHTML:dE});this.input=L.make("input",xd.input,{type:"search",placeholder:t,tabIndex:-1}),this.input.setAttribute("data-blok-flipper-navigation-target","true"),this.input.setAttribute("data-blok-testid","popover-search-input"),this.wrapper.appendChild(r),this.wrapper.appendChild(this.input),this.overrideValueProperty(),["input","keyup","search","change"].forEach(l=>{this.listeners.on(this.input,l,this.handleValueChange)})}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value=""}applySearch(e){this.searchQuery!==e&&(this.searchQuery=e,this.emit(Td.Search,{query:e,items:this.foundItems}))}overrideValueProperty(){var i,l;const e=Object.getPrototypeOf(this.input),t=Object.getOwnPropertyDescriptor(e,"value");if((t==null?void 0:t.set)===void 0||t.get===void 0)return;const r=this.applySearch.bind(this);Object.defineProperty(this.input,"value",{configurable:(i=t.configurable)!=null?i:!0,enumerable:(l=t.enumerable)!=null?l:!1,get(){var c,d;return(d=(c=t.get)==null?void 0:c.call(this))!=null?d:""},set(c){var d;(d=t.set)==null||d.call(this,c),r(c)}})}destroy(){this.listeners.removeAll()}get foundItems(){return this.items.filter(e=>this.checkItem(e))}checkItem(e){var i,l;const t=((i=e.title)==null?void 0:i.toLowerCase())||"",r=(l=this.searchQuery)==null?void 0:l.toLowerCase();return r!==void 0?t.includes(r):!1}}class _r extends wy{constructor(e,t){super(e,t),this.nestingLevel=0,this.nestedPopoverTriggerItem=null,this.previouslyHoveredItem=null,this.scopeElement=document.body,this.hide=()=>{var r;super.hide(),this.destroyNestedPopoverIfExists(),(r=this.flipper)==null||r.deactivate(),this.previouslyHoveredItem=null},this.onFlip=()=>{const r=this.itemsDefault.find(i=>i.isFocused);r==null||r.onFocus()},this.onSearch=r=>{var d;const i=r.query==="",l=r.items.length===0;this.items.forEach(h=>{const g=h instanceof Mn,m=h instanceof my||h instanceof ni,y=g?!r.items.includes(h):m&&(l||!i);h.toggleHidden(y)}),this.toggleNothingFoundMessage(l);const c=r.query===""?this.flippableElements:r.items.map(h=>h.getElement());(d=this.flipper)!=null&&d.isActivated&&(this.flipper.deactivate(),this.flipper.activate(c))},e.trigger&&(this.trigger=e.trigger),e.nestingLevel!==void 0&&(this.nestingLevel=e.nestingLevel),this.nestingLevel>0&&this.nodes.popover.setAttribute(vt.nested,"true"),e.scopeElement!==void 0&&(this.scopeElement=e.scopeElement),this.nodes.popoverContainer!==null&&this.listeners.on(this.nodes.popoverContainer,"mouseover",r=>this.handleHover(r)),e.searchable&&this.addSearch(),e.flippable!==!1&&(e.flipper!==void 0?(e.flipper.deactivate(),e.flipper.removeOnFlip(this.onFlip),this.flipper=e.flipper):this.flipper=new Zn({items:this.flippableElements,focusedItemClass:Ir.focused,allowedKeys:[re.TAB,re.UP,re.DOWN,re.ENTER,re.RIGHT,re.LEFT],onArrowLeft:e.onNavigateBack}),this.flipper.onFlip(this.onFlip))}hasFocus(){return this.flipper===void 0?!1:this.flipper.hasFocus()}get scrollTop(){return this.nodes.items===null?0:this.nodes.items.scrollTop}get offsetTop(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetTop}show(){var e;if(this.trigger){document.body.appendChild(this.nodes.popover);const{top:t,left:r}=this.calculatePosition();this.nodes.popover.style.position="absolute",this.nodes.popover.style.top=`${t}px`,this.nodes.popover.style.left=`${r}px`,this.nodes.popover.style.setProperty(nn.PopoverTop,"0px"),this.nodes.popover.style.setProperty(nn.PopoverLeft,"0px")}this.nodes.popover.style.setProperty(nn.PopoverHeight,this.size.height+"px"),!this.trigger&&!this.shouldOpenBottom&&(this.setOpenTop(!0),this.nodes.popover.style.setProperty(nn.PopoverTop,"calc(-1 * (0.5rem + var(--popover-height)))")),!this.trigger&&!this.shouldOpenRight&&(this.setOpenLeft(!0),this.nodes.popover.style.setProperty(nn.PopoverLeft,"calc(-1 * var(--width) + 100%)")),super.show(),(e=this.flipper)==null||e.activate(this.flippableElements),requestAnimationFrame(()=>{this.focusInitialElement()})}focusInitialElement(){var e;if(this.search){this.search.focus();return}(e=this.flipper)==null||e.focusFirst()}calculatePosition(){if(!this.trigger)return{top:0,left:0};const e=this.trigger.getBoundingClientRect(),t=this.size,r=window.innerWidth,i=window.innerHeight,l=8,c=e.bottom+l+window.scrollY,h=e.bottom+l+t.height>i+window.scrollY&&e.top-l-t.height>window.scrollY?e.top-l-t.height+window.scrollY:c,g=e.left+window.scrollX,y=g+t.width>r+window.scrollX?Math.max(0,e.right-t.width+window.scrollX):g;return{top:h,left:y}}destroy(){this.hide(),super.destroy()}hasNode(e){return super.hasNode(e)?!0:this.nestedPopover!==void 0&&this.nestedPopover!==null?this.nestedPopover.hasNode(e):!1}showNestedItems(e){this.nestedPopover!==null&&this.nestedPopover!==void 0||(this.nestedPopoverTriggerItem=e,this.showNestedPopoverForItem(e))}handleHover(e){const t=this.getTargetItem(e);t!==void 0&&this.previouslyHoveredItem!==t&&(this.destroyNestedPopoverIfExists(),this.previouslyHoveredItem=t,t.hasChildren&&this.showNestedPopoverForItem(t))}setTriggerItemPosition(e,t){const r=t.getElement(),i=(r?r.offsetTop:0)-this.scrollTop,l=this.offsetTop+i;e.style.setProperty(nn.TriggerItemTop,l+"px")}destroyNestedPopoverIfExists(){var t,r,i;if(this.nestedPopover===void 0||this.nestedPopover===null)return;const e=(t=this.nestedPopoverTriggerItem)==null?void 0:t.getElement();this.nestedPopover.off(tn.ClosedOnActivate,this.hide),this.nestedPopover.hide(),this.nestedPopover.destroy(),this.nestedPopover.getElement().remove(),this.nestedPopover=null,(r=this.flipper)==null||r.activate(this.flippableElements),requestAnimationFrame(()=>{this.focusAfterNestedPopoverClose(e)}),(i=this.nestedPopoverTriggerItem)==null||i.onChildrenClose()}focusAfterNestedPopoverClose(e){var r;if(!e||!this.flipper){(r=this.flipper)==null||r.focusFirst();return}const t=this.flippableElements.indexOf(e);if(t!==-1){this.flipper.focusItem(t);return}this.flipper.focusFirst()}showNestedPopoverForItem(e){var r;this.nestedPopover=new _r({searchable:e.isChildrenSearchable,items:e.children,nestingLevel:this.nestingLevel+1,flippable:e.isChildrenFlippable,messages:this.messages,onNavigateBack:this.destroyNestedPopoverIfExists.bind(this)}),e.onChildrenOpen(),this.nestedPopover.on(tn.ClosedOnActivate,this.hide);const t=this.nestedPopover.getElement();return this.nodes.popover.appendChild(t),this.setTriggerItemPosition(t,e),t.style.setProperty(nn.NestingLevel,this.nestedPopover.nestingLevel.toString()),this.applyNestedPopoverPositioning(t),this.nestedPopover.show(),(r=this.flipper)==null||r.deactivate(),this.nestedPopover}applyNestedPopoverPositioning(e){const t=e.querySelector(`[${vt.popoverContainer}]`);if(!t)return;const r=this.nodes.popover.hasAttribute(vt.openTop),i=this.nodes.popover.hasAttribute(vt.openLeft);t.style.position="absolute",i?e.style.setProperty(nn.PopoverLeft,"calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)"):e.style.setProperty(nn.PopoverLeft,"calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)))"),r?t.style.top="calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + 0.5rem + var(--nested-popover-overlap))":t.style.top="calc(var(--trigger-item-top) - var(--nested-popover-overlap))"}get shouldOpenBottom(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popoverContainer.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),r=this.size.height,i=e.top+r,l=e.top-r,c=Math.min(window.innerHeight,t.bottom);return l<t.top||i<=c}get shouldOpenRight(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popover.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),r=this.size.width,i=e.right+r,l=e.left-r,c=Math.min(window.innerWidth,t.right);return l<t.left||i<=c}get size(){var i;if(this._size)return this._size;const e={height:0,width:0};if(this.nodes.popover===null)return e;const t=this.nodes.popover.cloneNode(!0);t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000px",t.setAttribute(vt.opened,"true"),(i=t.querySelector(`[${vt.nested}]`))==null||i.remove(),document.body.appendChild(t);const r=t.querySelector(`[${vt.popoverContainer}]`);return e.height=r.offsetHeight,e.width=r.offsetWidth,t.remove(),this._size=e,e}get flippableElements(){return this.items.flatMap(t=>this.getFlippableElementsForItem(t)).filter(t=>t!=null)}getFlippableElementsForItem(e){if(!(e instanceof Mn))return e instanceof ni?e.getControls():[];if(e.isDisabled)return[];const t=e.getElement();return t?[t]:[]}addSearch(){this.search=new xE({items:this.itemsDefault,placeholder:this.messages.search}),this.search.on(Td.Search,this.onSearch);const e=this.search.getElement();e.classList.add("mb-1.5"),this.nodes.popoverContainer.insertBefore(e,this.nodes.popoverContainer.firstChild)}}const SE="38px",EE="46px";class Ty extends _r{constructor(e){var r;const t=!Yn();super(de({},e),{[et.Default]:{wrapperTag:"button",hint:{position:"top",alignment:"center",enabled:t},iconWithGap:!1,isInline:!0},[et.Html]:{hint:{position:"top",alignment:"center",enabled:t},isInline:!0},[et.Separator]:{isInline:!0}}),this.hide=()=>{var i;this.setOpenTop(!1),this.setOpenLeft(!1),this.itemsDefault.forEach(l=>l.reset()),this.search!==void 0&&this.search.clear(),this.destroyNestedPopoverIfExists(),(i=this.flipper)==null||i.deactivate(),this.nodes.popover.className=De(ao.popover),this.nodes.popoverContainer&&(this.nodes.popoverContainer.className=De(mt.popoverContainer,ao.popoverContainer),this.nodes.popoverContainer.style.height=""),this.emit(tn.Closed)},this.nodes.popover.className=De(ao.popover),this.nodes.popoverContainer&&(this.nodes.popoverContainer.className=De(mt.popoverContainer,ao.popoverContainer)),this.nodes.items&&(this.nodes.items.className=De(mt.items,"flex")),this.nodes.popover.style.setProperty("--height",SE),this.nodes.popover.style.setProperty("--height-mobile",EE),this.nodes.popover.setAttribute(vt.popoverInline,""),(r=this.flipper)==null||r.setHandleContentEditableTargets(!0),this.items.forEach(i=>{!(i instanceof Mn)&&!(i instanceof ni)||i.hasChildren&&i.isChildrenOpen&&this.showNestedItems(i)})}get offsetLeft(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetLeft}show(){var t;if(super.show(),this.nodes.popover.className=De(ao.popover,"inline-block"),this.nodes.popoverContainer){this.nodes.popoverContainer.className=De(mt.popoverContainer,mt.popoverContainerOpened,ao.popoverContainer,"animate-none");const r=Yn()?"var(--height-mobile)":"var(--height)";this.nodes.popoverContainer.style.height=r}const e=this.nestingLevel===0?(t=this.nodes.popoverContainer)==null?void 0:t.getBoundingClientRect():void 0;if(e!==void 0){const r=`${e.width}px`,i=`${e.height}px`;this.nodes.popover.style.setProperty(nn.InlinePopoverWidth,r),this.nodes.popover.style.width=r,this.nodes.popover.style.height=i}requestAnimationFrame(()=>{var r,i;(r=this.flipper)==null||r.deactivate(),(i=this.flipper)==null||i.activate(this.flippableElements)})}handleHover(){}setTriggerItemPosition(e,t){const r=t.getElement(),i=r?r.offsetLeft:0,l=this.offsetLeft+i;e.style.setProperty(nn.TriggerItemLeft,l+"px")}showNestedItems(e){if(this.nestedPopoverTriggerItem===e){this.destroyNestedPopoverIfExists(),this.nestedPopoverTriggerItem=null;return}super.showNestedItems(e)}showNestedPopoverForItem(e){var d;const t=super.showNestedPopoverForItem(e),r=t.getElement();(d=t.flipper)==null||d.setHandleContentEditableTargets(!0),requestAnimationFrame(()=>{var h;(h=t.flipper)==null||h.focusItem(-1)});const i=r.querySelector(`[${vt.popoverContainer}]`);i&&(i.className=De(i.className,"h-fit p-1.5 flex-col"));const l=r.querySelector(`[${vt.popoverItems}]`);l&&(l.className=De(l.className,"block w-full"));const c=h=>{var g,m;if(!(h.key!=="Tab"||h.shiftKey)){if(this.nestedPopover!==t){document.removeEventListener("keydown",c,!0);return}h.preventDefault(),h.stopPropagation(),(g=t.flipper)==null||g.activate(t.flippableElements),(m=t.flipper)==null||m.focusFirst(),document.removeEventListener("keydown",c,!0)}};if(document.addEventListener("keydown",c,!0),t.on(tn.Closed,()=>{document.removeEventListener("keydown",c,!0)}),r.setAttribute(vt.nestedLevel,TE(t.nestingLevel)),t.nestingLevel===1&&i){i.className=De(i.className,"left-0");const h=Yn()?"calc(var(--height-mobile) + 3px)":"calc(var(--height) + 3px)";i.style.top=h}return t}handleItemClick(e){var t;e!==this.nestedPopoverTriggerItem&&((t=this.nestedPopoverTriggerItem)==null||t.handleClick(),super.destroyNestedPopoverIfExists()),super.handleItemClick(e)}}const At=class At{constructor(){this.scrollPosition=null}lock(){qu?this.lockHard():(document.body.classList.add(At.CSS.overflowHidden),document.body.setAttribute(At.DATA_ATTR.scrollLocked,"true"))}unlock(){qu?this.unlockHard():(document.body.classList.remove(At.CSS.overflowHidden),document.body.removeAttribute(At.DATA_ATTR.scrollLocked))}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(At.CSS.overflowHidden,At.CSS.fixed,At.CSS.wFull),document.body.style.top="calc(-1 * var(--window-scroll-offset))",document.body.setAttribute(At.DATA_ATTR.scrollLockedHard,"true")}unlockHard(){document.body.classList.remove(At.CSS.overflowHidden,At.CSS.fixed,At.CSS.wFull),document.body.style.top="",document.body.removeAttribute(At.DATA_ATTR.scrollLockedHard),this.scrollPosition!==null&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};At.CSS={overflowHidden:"overflow-hidden",fixed:"fixed",wFull:"w-full"},At.DATA_ATTR={scrollLocked:"data-blok-scroll-locked",scrollLockedHard:"data-blok-scroll-locked-hard"};let Sd=At;const Ed={root:"flex items-center mb-2 mt-1",text:"text-lg font-semibold text-text-primary",backButton:"border-0 bg-transparent w-9 h-9 text-text-primary cursor-pointer [&_svg]:block [&_svg]:w-7 [&_svg]:h-7"},Cd={root:"data-blok-popover-header",text:"data-blok-popover-header-text",backButton:"data-blok-popover-header-back-button"};class CE{constructor({text:e,onBackButtonClick:t}){this.listeners=new Yo,this.text=e,this.onBackButtonClick=t,this.nodes={root:L.make("div",[Ed.root],{"data-blok-testid":"popover-header",[Cd.root]:""}),backButton:L.make("button",[Ed.backButton],{"data-blok-testid":"popover-header-back-button",[Cd.backButton]:""}),text:L.make("div",[Ed.text],{"data-blok-testid":"popover-header-text",[Cd.text]:""})},this.nodes.backButton.innerHTML=cE,this.nodes.root.appendChild(this.nodes.backButton),this.listeners.on(this.nodes.backButton,"click",this.onBackButtonClick),this.nodes.text.innerText=this.text,this.nodes.root.appendChild(this.nodes.text)}getElement(){return this.nodes.root}destroy(){this.nodes.root.remove(),this.listeners.destroy()}}class BE{constructor(){this.history=[]}push(e){this.history.push(e)}pop(){return this.history.pop()}get currentTitle(){return this.history.length===0?"":this.history[this.history.length-1].title}get currentItems(){return this.history.length===0?[]:this.history[this.history.length-1].items}reset(){for(;this.history.length>1;)this.pop()}}class xy extends wy{constructor(e){super(e,{[et.Default]:{hint:{enabled:!1}},[et.Html]:{hint:{enabled:!1}}}),this.scrollLocker=new Sd,this.history=new BE,this.isHidden=!0,this.nodes.overlay=L.make("div",[mt.popoverOverlay],{[vt.popoverOverlay]:"",[vt.overlayHidden]:"","data-blok-testid":"popover-overlay"}),this.nodes.popover.insertBefore(this.nodes.overlay,this.nodes.popover.firstChild),this.listeners.on(this.nodes.overlay,"click",()=>{this.hide()}),this.history.push({items:e.items}),this.nodes.popoverContainer.style.setProperty("--offset","5px"),this.nodes.popoverContainer.className=De(mt.popoverContainer,mt.popoverContainerMobile)}show(){this.nodes.overlay.removeAttribute(vt.overlayHidden),this.nodes.overlay.className=De(mt.popoverOverlay,"fixed inset-0 block visible z-[3] opacity-50 transition-opacity duration-[120ms] ease-in will-change-[opacity]"),super.show(),this.nodes.popoverContainer.className=De(mt.popoverContainer,mt.popoverContainerMobile,mt.popoverContainerOpened,"animate-[panelShowingMobile_250ms_ease]"),this.scrollLocker.lock(),this.isHidden=!1}hide(){this.isHidden||(super.hide(),this.nodes.overlay.setAttribute(vt.overlayHidden,""),this.nodes.overlay.className=mt.popoverOverlay,this.nodes.popoverContainer.className=De(mt.popoverContainer,mt.popoverContainerMobile),this.scrollLocker.unlock(),this.history.reset(),this.isHidden=!0)}destroy(){super.destroy(),this.scrollLocker.unlock()}showNestedItems(e){this.updateItemsAndHeader(e.children,e.title),this.history.push({title:e.title,items:e.children})}updateItemsAndHeader(e,t){var l,c;this.header!==null&&this.header!==void 0&&(this.header.destroy(),this.header=null);const r=t!==void 0;r&&(this.header=new CE({text:t,onBackButtonClick:()=>{this.history.pop(),this.updateItemsAndHeader(this.history.currentItems,this.history.currentTitle)}}));const i=(c=(l=this.header)==null?void 0:l.getElement())!=null?c:null;r&&i!==null&&this.nodes.popoverContainer.insertBefore(i,this.nodes.popoverContainer.firstChild),this.items.forEach(d=>{var h;return(h=d.getElement())==null?void 0:h.remove()}),this.items=this.buildItems(e),this.items.forEach(d=>{var g;const h=d.getElement();h!==null&&((g=this.nodes.items)==null||g.appendChild(h))})}}class AE extends Be{constructor(){super(...arguments),this.opened=!1,this.selection=new le,this.popover=null,this.flipperInstance=new Zn({focusedItemClass:Ir.focused,allowedKeys:[re.TAB,re.UP,re.DOWN,re.ENTER,re.RIGHT,re.LEFT]}),this.flipperKeydownHandler=null,this.flipperKeydownSource=null,this.close=()=>{this.opened&&(this.opened=!1,le.isAtBlok||this.selection.restore(),this.selection.clearSaved(),this.detachFlipperKeydownListener(),!this.Blok.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Blok.BlockManager.currentBlock&&this.Blok.BlockSelection.unselectBlock(this.Blok.BlockManager.currentBlock),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(tn.Closed,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null))},this.onPopoverClose=()=>{this.close()}}get events(){return{opened:nd,closed:rd}}get CSS(){return{settings:""}}get flipper(){return this.flipperInstance}make(){this.nodes.wrapper=L.make("div"),this.nodes.wrapper.setAttribute("data-blok-testid","block-tunes-wrapper"),this.eventsDispatcher.on(Cr,this.close)}destroy(){this.detachFlipperKeydownListener(),this.removeAllNodes(),this.listeners.destroy(),this.eventsDispatcher.off(Cr,this.close)}async open(e,t){const r=e!=null?e:this.Blok.BlockManager.currentBlock;if(r===void 0)return;this.opened=!0,this.selection.save(),this.Blok.BlockSelection.selectBlock(r),this.Blok.BlockSelection.clearCache();const{toolTunes:i,commonTunes:l}=r.getTunes();this.eventsDispatcher.emit(this.events.opened);const c=Yn()?xy:_r,d={searchable:!0,trigger:t||this.nodes.wrapper,items:await this.getTunesItems(r,l,i),scopeElement:this.Blok.API.methods.ui.nodes.redactor,messages:{nothingFound:Qe.ui(pt.ui.popover,"Nothing found"),search:Qe.ui(pt.ui.popover,"Filter")}};c===_r&&(d.flipper=this.flipperInstance),this.popover=new c(d),this.popover.getElement().setAttribute("data-blok-testid","block-tunes-popover"),this.popover.on(tn.Closed,this.onPopoverClose),this.popover.show(),c===_r&&this.flipperInstance.focusItem(0),this.attachFlipperKeydownListener(r)}getElement(){return this.nodes.wrapper}contains(e){var t,r;return!!((t=this.nodes.wrapper)!=null&&t.contains(e)||(r=this.popover)!=null&&r.hasNode(e))}async getTunesItems(e,t,r){const i=[];r!==void 0&&r.length>0&&(i.push(...r),i.push({type:et.Separator}));const l=Array.from(this.Blok.Tools.blockTools.values()),d=(await Qv(e,l)).reduce((h,g)=>(g.toolbox===void 0||g.toolbox.forEach(m=>{var b;const y=(b=m.title)!=null?b:g.name;h.push({icon:m.icon,title:Qe.t(pt.toolNames,y),name:g.name,closeOnActivate:!0,onActivate:async()=>{const{BlockManager:T,Caret:k,Toolbar:x}=this.Blok,S=await T.convert(e,g.name,m.data);x.close(),k.setToBlock(S,k.positions.END)}})}),h),[]);return d.length>0&&(i.push({icon:sE,name:"convert-to",title:Qe.ui(pt.ui.popover,"Convert to"),children:{items:d}}),i.push({type:et.Separator})),i.push(...t),i}attachFlipperKeydownListener(e){this.detachFlipperKeydownListener();const t=e==null?void 0:e.pluginsContent;t instanceof HTMLElement&&(this.flipperInstance.setHandleContentEditableTargets(!0),this.flipperKeydownHandler=r=>{this.flipperInstance.handleExternalKeydown(r)},t.addEventListener("keydown",this.flipperKeydownHandler,!0),this.flipperKeydownSource=t)}detachFlipperKeydownListener(){this.flipperKeydownSource!==null&&this.flipperKeydownHandler!==null&&this.flipperKeydownSource.removeEventListener("keydown",this.flipperKeydownHandler,!0),this.flipperInstance.setHandleContentEditableTargets(!1),this.flipperKeydownSource=null,this.flipperKeydownHandler=null}}const Sy={SHIFT:["SHIFT"],CMD:["CMD","CONTROL","COMMAND","WINDOWS","CTRL"],ALT:["ALT","OPTION"]},IE={0:"Digit0",1:"Digit1",2:"Digit2",3:"Digit3",4:"Digit4",5:"Digit5",6:"Digit6",7:"Digit7",8:"Digit8",9:"Digit9",A:"KeyA",B:"KeyB",C:"KeyC",D:"KeyD",E:"KeyE",F:"KeyF",G:"KeyG",H:"KeyH",I:"KeyI",J:"KeyJ",K:"KeyK",L:"KeyL",M:"KeyM",N:"KeyN",O:"KeyO",P:"KeyP",Q:"KeyQ",R:"KeyR",S:"KeyS",T:"KeyT",U:"KeyU",V:"KeyV",W:"KeyW",X:"KeyX",Y:"KeyY",Z:"KeyZ",BACKSPACE:"Backspace",ENTER:"Enter",ESCAPE:"Escape",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",INSERT:"Insert",DELETE:"Delete",".":"Period"},RE=a=>Object.keys(Sy).find(t=>Sy[t].includes(a));class _E{constructor(e){this.commands={SHIFT:!1,CMD:!1,ALT:!1},this.keys={},this.name=e.name,this.element=e.on,this.callback=e.callback,this.parseShortcutName(e.name),this.executeShortcut=t=>{this.execute(t)},this.element.addEventListener("keydown",this.executeShortcut,!1)}remove(){this.element.removeEventListener("keydown",this.executeShortcut)}parseShortcutName(e){const t=e.split("+");for(const r of t){const i=r.toUpperCase(),l=RE(i);l!==void 0?this.commands[l]=!0:this.keys[i]=!0}}checkModifiers(e){const t={CMD:e.ctrlKey||e.metaKey,SHIFT:e.shiftKey,ALT:e.altKey};return Object.keys(this.commands).every(i=>this.commands[i]===t[i])}checkKeys(e){return Object.keys(this.keys).every(r=>{const i=IE[r];return e.code===i})}execute(e){const t=this.checkModifiers(e),r=this.checkKeys(e);t&&r&&this.callback(e)}}let NE=class{constructor(){this.registeredShortcuts=new Map}add(e){if(this.findShortcut(e.on,e.name))throw Error(`Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`);const r=new _E({name:e.name,on:e.on,callback:e.handler}),i=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[...i,r])}remove(e,t){const r=this.findShortcut(e,t);if(!r)return;r.remove();const i=this.registeredShortcuts.get(e);if(!i)return;const l=i.filter(c=>c!==r);if(l.length===0){this.registeredShortcuts.delete(e);return}this.registeredShortcuts.set(e,l)}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find(({name:i})=>i===t)}};const Fn=new NE;var Ts=(a=>(a.Opened="toolbox-opened",a.Closed="toolbox-closed",a.BlockAdded="toolbox-block-added",a))(Ts||{});class OE extends Xo{constructor({api:e,tools:t,i18nLabels:r,triggerElement:i}){super(),this.opened=!1,this.listeners=new Yo,this.popover=null,this.handleMobileLayoutToggle=()=>{this.destroyPopover(),this.initPopover()},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=r,this.triggerElement=i,this.enableShortcuts(),this.nodes={toolbox:L.make("div")},this.nodes.toolbox.setAttribute("data-blok-testid","toolbox"),this.initPopover(),this.api.events.on(Cr,this.handleMobileLayoutToggle)}get isEmpty(){return this.toolsToBeDisplayed.length===0}static get CSS(){return{toolbox:""}}getElement(){return this.nodes.toolbox}contains(e){var t;return!!(this.nodes.toolbox.contains(e)||(t=this.popover)!=null&&t.getElement().contains(e))}hasFocus(){if(this.popover!==null)return"hasFocus"in this.popover?this.popover.hasFocus():void 0}destroy(){var e;super.destroy(),this.nodes&&this.nodes.toolbox&&this.nodes.toolbox.remove(),this.removeAllShortcuts(),(e=this.popover)==null||e.off(tn.Closed,this.onPopoverClose),this.listeners.destroy(),this.api.events.off(Cr,this.handleMobileLayoutToggle)}async toolButtonActivated(e,t){await this.insertNewBlock(e,t)}open(){var e;this.isEmpty||((e=this.popover)==null||e.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){var e;(e=this.popover)==null||e.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}initPopover(){const e=Yn()?xy:_r;this.popover=new e({scopeElement:this.api.ui.nodes.redactor,trigger:this.triggerElement||this.nodes.toolbox,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on(tn.Closed,this.onPopoverClose),this.popover.getElement().setAttribute("data-blok-testid","toolbox-popover")}destroyPopover(){this.popover!==null&&(this.popover.hide(),this.popover.off(tn.Closed,this.onPopoverClose),this.popover.destroy(),this.popover=null),this.nodes.toolbox!==null&&(this.nodes.toolbox.innerHTML="")}get toolsToBeDisplayed(){if(this._toolsToBeDisplayed)return this._toolsToBeDisplayed;const e=[];return this.tools.forEach(t=>{t.toolbox&&e.push(t)}),this._toolsToBeDisplayed=e,e}get toolboxItemsToBeDisplayed(){if(this._toolboxItemsToBeDisplayed)return this._toolboxItemsToBeDisplayed;const e=(r,i,l=!0)=>({icon:r.icon,title:Qe.t(pt.toolNames,r.title||ds(i.name)),name:i.name,onActivate:()=>{this.toolButtonActivated(i.name,r.data)},secondaryLabel:i.shortcut&&l?bv(i.shortcut):""}),t=this.toolsToBeDisplayed.reduce((r,i)=>{const{toolbox:l}=i;return l===void 0||(Array.isArray(l)?l:[l]).forEach((d,h)=>{r.push(e(d,i,h===0))}),r},[]);return this._toolboxItemsToBeDisplayed=t,t}enableShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)})}enableShortcutForTool(e,t){Fn.add({name:t,on:this.api.ui.nodes.redactor,handler:async r=>{r.preventDefault();const i=this.api.blocks.getCurrentBlockIndex(),l=this.api.blocks.getBlockByIndex(i);if(l)try{const c=await this.api.blocks.convert(l.id,e);this.api.caret.setToBlock(c,"end");return}catch(c){}await this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&Fn.remove(this.api.ui.nodes.redactor,t)})}async insertNewBlock(e,t){const r=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(r);if(!i)return;const l=i.isEmpty?r:r+1,d=t!==void 0&&Object.keys(t).length>0?Object.assign(await this.api.blocks.composeBlockData(e),t):void 0,h=this.api.blocks.insert(e,d,void 0,l,void 0,i.isEmpty);this.api.caret.setToBlock(l),this.emit("toolbox-block-added",{block:h}),this.api.toolbar.close()}}const Ey="block hovered",Cy=1e3;class LE extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.hoveredBlock=null,this.toolboxInstance=null,this.settingsTogglerMouseDownPosition=null,this.onBlockSettingsOpen=()=>{var r;(r=this.nodes.settingsToggler)==null||r.classList.add(this.CSS.settingsTogglerOpened)},this.onBlockSettingsClose=()=>{var r;(r=this.nodes.settingsToggler)==null||r.classList.remove(this.CSS.settingsTogglerOpened)}}get CSS(){return{toolbar:Tt("absolute left-0 right-0 top-0 transition-opacity duration-100 ease-linear will-change-[opacity,top]"),toolbarOpened:"block",toolbarClosed:"hidden",content:Tt("relative mx-auto max-w-content"),actions:Tt("absolute flex opacity-0 pr-[5px]","right-full","mobile:right-auto","group-data-[blok-rtl=true]:right-auto group-data-[blok-rtl=true]:left-[calc(-1*theme(width.toolbox-btn))]","mobile:group-data-[blok-rtl=true]:ml-0 mobile:group-data-[blok-rtl=true]:mr-auto mobile:group-data-[blok-rtl=true]:pr-0 mobile:group-data-[blok-rtl=true]:pl-[10px]"),actionsOpened:"opacity-100",plusButton:Tt("text-dark cursor-pointer w-toolbox-btn h-toolbox-btn rounded-[7px] inline-flex justify-center items-center select-none","shrink-0","[&_svg]:h-6 [&_svg]:w-6","can-hover:hover:bg-bg-light","mobile:bg-white mobile:border mobile:border-[#e8e8eb] mobile:shadow-overlay-pane mobile:rounded-[6px] mobile:z-[2]","mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile","group-data-[blok-rtl=true]:right-[calc(-1*theme(width.toolbox-btn))] group-data-[blok-rtl=true]:left-auto","not-mobile:group-data-[blok-narrow=true]:left-[5px]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-0 not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:right-[5px]"),plusButtonShortcutKey:"text-white",settingsToggler:Tt("text-dark cursor-pointer w-toolbox-btn h-toolbox-btn rounded-[7px] inline-flex justify-center items-center select-none","cursor-pointer select-none","[&_svg]:h-6 [&_svg]:w-6","active:cursor-grabbing","can-hover:hover:bg-bg-light can-hover:hover:cursor-grab","group-data-[blok-toolbox-opened=true]:can-hover:hover:cursor-pointer","mobile:bg-white mobile:border mobile:border-[#e8e8eb] mobile:shadow-overlay-pane mobile:rounded-[6px] mobile:z-[2]","mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile","not-mobile:w-6"),settingsTogglerHidden:"hidden",settingsTogglerOpened:Tt("can-hover:hover:cursor-pointer")}}get opened(){var e,t;return(t=(e=this.nodes.wrapper)==null?void 0:e.classList.contains(this.CSS.toolbarOpened))!=null?t:!1}contains(e){var t,r;return!!((t=this.nodes.wrapper)!=null&&t.contains(e)||(r=this.toolboxInstance)!=null&&r.contains(e)||this.Blok.BlockSettings.contains(e))}get toolbox(){var e;return{opened:(e=this.toolboxInstance)==null?void 0:e.opened,close:()=>{var t;(t=this.toolboxInstance)==null||t.close()},open:()=>{if(this.toolboxInstance===null){_e("toolbox.open() called before initialization is finished","warn");return}this.hoveredBlock&&(this.Blok.BlockManager.currentBlock=this.hoveredBlock),this.toolboxInstance.open()},toggle:()=>{if(this.toolboxInstance===null){_e("toolbox.toggle() called before initialization is finished","warn");return}this.toolboxInstance.toggle()},hasFocus:()=>{var t;return(t=this.toolboxInstance)==null?void 0:t.hasFocus()}}}get blockActions(){return{hide:()=>{var e,t;(e=this.nodes.actions)==null||e.classList.remove(this.CSS.actionsOpened),(t=this.nodes.actions)==null||t.removeAttribute("data-blok-opened")},show:()=>{var e,t;(e=this.nodes.actions)==null||e.classList.add(this.CSS.actionsOpened),(t=this.nodes.actions)==null||t.setAttribute("data-blok-opened","true")}}}get blockTunesToggler(){return{hide:()=>{var e;return(e=this.nodes.settingsToggler)==null?void 0:e.classList.add(this.CSS.settingsTogglerHidden)},show:()=>{var e;return(e=this.nodes.settingsToggler)==null?void 0:e.classList.remove(this.CSS.settingsTogglerHidden)}}}toggleReadOnly(e){e?(this.destroy(),this.Blok.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback(async()=>{await this.drawUI(),this.enableModuleBindings()},{timeout:2e3})}moveAndOpen(e){if(this.toolboxInstance===null){_e("Can't open Toolbar since Blok initialization is not finished yet","warn");return}this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Blok.BlockSettings.opened&&this.Blok.BlockSettings.close();const t=e!=null?e:this.Blok.BlockManager.currentBlock;if(!t)return;this.hoveredBlock=t;const{wrapper:r,plusButton:i}=this.nodes;if(!r||!i)return;const l=t.holder,{isMobile:c}=this.Blok.UI,d=20,h=t.firstInput,g=l.getBoundingClientRect(),m=h!==void 0?h.getBoundingClientRect():null,y=m!==null?m.top-g.top:null,b=(()=>{const x=parseInt(window.getComputedStyle(t.pluginsContent).paddingTop,10);if(c){const P=parseInt(window.getComputedStyle(i).height,10);return x-P}if(h===void 0||y===null||y>d)return x;const S=W1(h),R=parseInt(window.getComputedStyle(i).height,10);return S-R+8+y})();r.style.top=`${Math.floor(b)}px`,l.appendChild(r);const T=t.getTunes(),k=T.toolTunes.length>0||T.commonTunes.length>0;this.Blok.BlockManager.blocks.length===1&&t.isEmpty&&!k?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){var e,t,r,i;this.Blok.ReadOnly.isEnabled||((e=this.nodes.wrapper)==null||e.classList.remove(this.CSS.toolbarOpened),(t=this.nodes.wrapper)==null||t.classList.add(this.CSS.toolbarClosed),(r=this.nodes.wrapper)==null||r.removeAttribute("data-blok-opened"),this.blockActions.hide(),(i=this.toolboxInstance)==null||i.close(),this.Blok.BlockSettings.close(),this.reset())}reset(){this.nodes.wrapper&&(this.nodes.wrapper.style.top="unset",this.Blok.UI.nodes.wrapper.appendChild(this.nodes.wrapper))}open(e=!0){var t,r,i;(t=this.nodes.wrapper)==null||t.classList.remove(this.CSS.toolbarClosed),(r=this.nodes.wrapper)==null||r.classList.add(this.CSS.toolbarOpened),(i=this.nodes.wrapper)==null||i.setAttribute("data-blok-opened","true"),e?this.blockActions.show():this.blockActions.hide()}async make(){const e=L.make("div",[this.CSS.toolbar,this.CSS.toolbarClosed,"group-data-[blok-dragging=true]:pointer-events-none"]);this.nodes.wrapper=e,e.setAttribute(Wx,""),e.setAttribute("data-blok-testid","toolbar");const t=L.make("div",this.CSS.content),r=L.make("div",[this.CSS.actions,"not-mobile:group-data-[blok-narrow=true]:right-[calc(-1*theme(spacing.narrow-mode-right-padding)-5px)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:right-auto","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-[calc(-1*theme(spacing.narrow-mode-right-padding)-5px)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-[-5px]"]);this.nodes.content=t,this.nodes.actions=r,r.setAttribute("data-blok-testid","toolbar-actions"),L.append(e,t),L.append(t,r);const i=L.make("div",this.CSS.plusButton,{innerHTML:lE});i.setAttribute("data-blok-testid","plus-button"),this.nodes.plusButton=i,L.append(r,i),this.readOnlyMutableListeners.on(i,"click",()=>{Jo(!0),this.plusButtonClicked()},!1);const l=L.make("div"),c=x=>{const S=document.createDocumentFragment(),R=x.indexOf(" ");if(R>0){const O=x.substring(0,R),H=x.substring(R);S.appendChild(L.make("span",this.CSS.plusButtonShortcutKey,{textContent:O})),S.appendChild(document.createTextNode(H))}else S.appendChild(document.createTextNode(x));return S};l.appendChild(c(Qe.ui(pt.ui.toolbar.toolbox,"Click to add below"))),l.appendChild(L.make("br"));const h=yv().win?Qe.ui(pt.ui.toolbar.toolbox,"Ctrl-click to add above"):Qe.ui(pt.ui.toolbar.toolbox,"Option-click to add above");l.appendChild(c(h)),ys(i,l,{hidingDelay:400});const g=L.make("span",[this.CSS.settingsToggler,"group-data-[blok-dragging=true]:cursor-grabbing"],{innerHTML:aE});g.setAttribute(Kx,""),g.setAttribute(Vx,""),g.setAttribute("data-blok-testid","settings-toggler"),this.nodes.settingsToggler=g,L.append(r,g);const m=L.make("div"),y=x=>{const S=L.make("div"),[R,...O]=x.split(" "),H=L.make("span",null,{textContent:R});return H.style.color="white",S.appendChild(H),O.length>0&&S.appendChild(L.text(" "+O.join(" "))),S},b=Qe.ui(pt.ui.blockTunes.toggler,"Drag to move"),T=Qe.ui(pt.ui.blockTunes.toggler,"Click to open the menu");m.appendChild(y(b)),m.appendChild(y(T)),ys(g,m,{hidingDelay:400}),L.append(r,this.makeToolbox());const k=this.Blok.BlockSettings.getElement();if(!k)throw new Error("Block Settings element was not created");L.append(r,k),L.append(this.Blok.UI.nodes.wrapper,e)}makeToolbox(){this.toolboxInstance=new OE({api:this.Blok.API.methods,tools:this.Blok.Tools.blockTools,i18nLabels:{filter:Qe.ui(pt.ui.popover,"Filter"),nothingFound:Qe.ui(pt.ui.popover,"Nothing found")},triggerElement:this.nodes.plusButton}),this.toolboxInstance.on(Ts.Opened,()=>{this.Blok.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier),this.Blok.UI.nodes.wrapper.setAttribute($v,"true")}),this.toolboxInstance.on(Ts.Closed,()=>{this.Blok.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier),this.Blok.UI.nodes.wrapper.removeAttribute($v)}),this.toolboxInstance.on(Ts.BlockAdded,({block:t})=>{const{BlockManager:r,Caret:i}=this.Blok,l=r.getBlockById(t.id);if(!l||l.inputs.length!==0)return;if(l===r.lastBlock){r.insertAtEnd(),i.setToBlock(r.lastBlock);return}const c=r.nextBlock;c&&i.setToBlock(c)});const e=this.toolboxInstance.getElement();if(e===null)throw new Error("Toolbox element was not created");return e}plusButtonClicked(){var e;this.hoveredBlock&&(this.Blok.BlockManager.currentBlock=this.hoveredBlock),this.Blok.BlockSettings.opened&&this.Blok.BlockSettings.close(),(e=this.toolboxInstance)==null||e.toggle()}enableModuleBindings(){const e=this.nodes.settingsToggler;e&&(this.readOnlyMutableListeners.on(e,"mousedown",t=>{t.stopPropagation(),Jo(!0);const r=t;this.settingsTogglerMouseDownPosition={x:r.clientX,y:r.clientY}},!0),this.readOnlyMutableListeners.on(e,"click",t=>{var c;t.stopPropagation();const r=t,i=this.settingsTogglerMouseDownPosition;this.settingsTogglerMouseDownPosition=null,!(i!==null&&(Math.abs(r.clientX-i.x)>Cy||Math.abs(r.clientY-i.y)>Cy))&&(this.settingsTogglerClicked(),(c=this.toolboxInstance)!=null&&c.opened&&this.toolboxInstance.close())},!0)),Yn()||this.eventsDispatcher.on(Ey,t=>{var i;const r=t.block;r instanceof Zo&&(this.Blok.BlockSettings.opened||(i=this.toolboxInstance)!=null&&i.opened||this.moveAndOpen(r))}),this.eventsDispatcher.on(nd,this.onBlockSettingsOpen),this.eventsDispatcher.on(rd,this.onBlockSettingsClose)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll(),this.eventsDispatcher.off(nd,this.onBlockSettingsOpen),this.eventsDispatcher.off(rd,this.onBlockSettingsClose)}settingsTogglerClicked(){var t;const e=(t=this.hoveredBlock)!=null?t:this.Blok.BlockManager.currentBlock;e&&(this.hoveredBlock=e,this.Blok.BlockManager.currentBlock=e,this.Blok.BlockSettings.opened?this.Blok.BlockSettings.close():this.Blok.BlockSettings.open(e,this.nodes.settingsToggler))}async drawUI(){this.Blok.BlockSettings.make(),await this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy()}}var Nr=(a=>(a[a.Block=0]="Block",a[a.Inline=1]="Inline",a[a.Tune=2]="Tune",a))(Nr||{}),xs=(a=>(a.Shortcut="shortcut",a.Toolbox="toolbox",a.EnabledInlineTools="inlineToolbar",a.EnabledBlockTunes="tunes",a.Config="config",a))(xs||{}),By=(a=>(a.Shortcut="shortcut",a.SanitizeConfig="sanitize",a))(By||{}),lo=(a=>(a.IsEnabledLineBreaks="enableLineBreaks",a.Toolbox="toolbox",a.ConversionConfig="conversionConfig",a.IsReadOnlySupported="isReadOnlySupported",a.PasteConfig="pasteConfig",a))(lo||{}),Ay=(a=>(a.IsInline="isInline",a.Title="title",a.IsReadOnlySupported="isReadOnlySupported",a))(Ay||{}),Bd=(a=>(a.IsTune="isTune",a))(Bd||{});class Ad{constructor({name:e,constructable:t,config:r,api:i,isDefault:l,isInternal:c=!1,defaultPlaceholder:d}){this.api=i,this.name=e,this.constructable=t,this.config=r,this.isDefault=l,this.isInternal=c,this.defaultPlaceholder=d}get settings(){var t;const e=(t=this.config.config)!=null?t:{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(Me(this.constructable.reset))return this.constructable.reset()}prepare(){const e=this.constructable.prepare;if(!Me(e))return;const t={toolName:this.name,config:this.settings};return e.call(this.constructable,t)}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return this.type===Nr.Inline}isBlock(){return this.type===Nr.Block}isTune(){return this.type===Nr.Tune}}const DE=(a,e,t,r,i)=>{const l=[],c={name:e,hint:{title:t,description:r}};if(a instanceof HTMLElement)return l;if(a.type===et.Html)return l.push(ot(de(de({},c),a),{type:et.Html})),l;if(a.type===et.Separator)return l.push({type:et.Separator}),l;const d=ot(de(de({},c),a),{type:et.Default});return l.push(d),"children"in d&&i&&l.push({type:et.Separator}),l},Iy=ge.forwardRef(({toolsMap:a,scopeElement:e,wrapperOffset:t,contentRect:r,toolbarVerticalMargin:i,onClose:l,onReady:c,getToolShortcut:d},h)=>{const g=ge.useRef(null),m=ge.useRef(null),y=ge.useRef(c);y.current=c;const b=ge.useCallback(async()=>{const k=[],x=Array.from(a.entries());for(const[S,[R,O]]of x.entries()){const H=await O.render(),P=d(R.name),$=P!==void 0?bv(P):void 0,j=Qe.t(pt.toolNames,R.title||ds(R.name)),U=Array.isArray(H)?H:[H],M=S===0;for(const X of U){const ae=DE(X,R.name,j,$,M);k.push(...ae)}}return k},[a,d]),T=ge.useCallback(k=>{if(!g.current)return;const x=le.rect,S={x:x.x-t.x,y:x.y+x.height-t.top+i};S.x+k+t.x>r.right&&(S.x=r.right-k-t.x),g.current.style.left=Math.floor(S.x)+"px",g.current.style.top=Math.floor(S.y)+"px"},[t,r,i]);return ge.useLayoutEffect(()=>{const k={current:!0};return(async()=>{var P,$,j,U,M,X;if(!g.current||!k.current)return;m.current&&(m.current.destroy(),m.current=null);const S=await b();if(!k.current)return;const R=new Ty({items:S,scopeElement:e,messages:{nothingFound:Qe.ui(pt.ui.popover,"Nothing found"),search:Qe.ui(pt.ui.popover,"Filter")}});m.current=R;const O=(P=R.getElement)==null?void 0:P.call(R),H=(U=(j=($=R.size)==null?void 0:$.width)!=null?j:O==null?void 0:O.getBoundingClientRect().width)!=null?U:0;T(H),O&&g.current&&g.current.appendChild(O),(M=R.show)==null||M.call(R),(X=y.current)==null||X.call(y)})(),()=>{var S,R,O,H;k.current=!1,m.current&&((R=(S=m.current).hide)==null||R.call(S),(H=(O=m.current).destroy)==null||H.call(O),m.current=null)}},[b,e,T]),ge.useImperativeHandle(h,()=>({getWrapperElement:()=>g.current,close:()=>{var k,x,S,R;m.current&&((x=(k=m.current).hide)==null||x.call(k),(R=(S=m.current).destroy)==null||R.call(S),m.current=null),l()},getPopover:()=>m.current}),[l]),tt.jsx("div",{ref:g,className:De("absolute top-0 left-0 z-[3] opacity-100 visible transition-opacity duration-[250ms] ease-out will-change-[opacity,left,top] [&_[hidden]]:!hidden"),[io]:Ox,"data-blok-testid":"inline-toolbar"})});Iy.displayName="InlineToolbarComponent";class PE extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.opened=!1,this.reactRoot=null,this.componentRef={current:null},this.toolbarVerticalMargin=Yn()?20:6,this.initialized=!1,this.initializationScheduled=!1,this.tools=new Map,this.registeredShortcuts=new Map,this.shortcutsRegistered=!1,this.shortcutRegistrationScheduled=!1,this.popoverReadyResolver=null,this.listeners.on(document,"keydown",r=>{const i=r;i.shiftKey&&(i.key==="ArrowDown"||i.key==="ArrowUp")&&this.tryToShow()},!0),this.scheduleInitialization(),this.tryRegisterShortcuts()}get popover(){var e,t;return(t=(e=this.componentRef.current)==null?void 0:e.getPopover())!=null?t:null}set state(e){super.state=e,this.tryRegisterShortcuts()}initialize(){var e,t,r;if(!this.initialized){if(!((r=(t=(e=this.Blok)==null?void 0:e.UI)==null?void 0:t.nodes)!=null&&r.wrapper)||this.Blok.Tools===void 0){this.scheduleInitialization();return}this.make(),this.tryRegisterShortcuts(),this.initialized=!0}}tryRegisterShortcuts(){var t;if(this.shortcutsRegistered)return;if(((t=this.Blok)==null?void 0:t.Tools)===void 0){this.scheduleShortcutRegistration();return}this.registerInitialShortcuts()&&(this.shortcutsRegistered=!0)}scheduleShortcutRegistration(){if(this.shortcutsRegistered||this.shortcutRegistrationScheduled)return;this.shortcutRegistrationScheduled=!0;const e=()=>{this.shortcutRegistrationScheduled=!1,this.tryRegisterShortcuts()};typeof window!="undefined"&&typeof window.setTimeout=="function"?window.setTimeout(e,0):e()}scheduleInitialization(){if(this.initialized||this.initializationScheduled)return;this.initializationScheduled=!0;const e=()=>{this.initializationScheduled=!1,this.initialize()},t=()=>{window.setTimeout(e,0)};typeof window!="undefined"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{t()},{timeout:2e3}):t()}async tryToShow(e=!1){e&&this.close(),this.initialize(),this.allowedToShow()&&(await this.open(),this.Blok.Toolbar.close())}close(){var r,i,l,c,d;if(!this.opened)return;for(const h of this.tools.values());this.tools=new Map,this.opened=!1,(r=this.componentRef.current)==null||r.close(),this.reactRoot&&(this.reactRoot.unmount(),this.reactRoot=null),this.nodes.reactContainer&&(this.nodes.reactContainer.innerHTML="");const e=Ty.mock,t=(l=(i=e==null?void 0:e.results)==null?void 0:i.at(-1))==null?void 0:l.value;t&&((c=t.hide)==null||c.call(t),(d=t.destroy)==null||d.call(t))}containsNode(e){var r;const t=(r=this.componentRef.current)==null?void 0:r.getWrapperElement();return t==null?!1:t.contains(e)}destroy(){var e;(e=this.componentRef.current)==null||e.close(),this.reactRoot&&(this.reactRoot.unmount(),this.reactRoot=null),this.removeAllNodes()}make(){this.nodes.reactContainer=L.make("div"),this.nodes.reactContainer.setAttribute("data-blok-inline-toolbar-root",""),L.append(this.Blok.UI.nodes.wrapper,this.nodes.reactContainer)}async open(){var l,c,d,h,g;if(this.opened||(this.initialize(),this.opened=!0,this.reactRoot&&(this.reactRoot.unmount(),this.reactRoot=null),this.createToolsInstances(),!this.nodes.reactContainer))return;this.reactRoot=so.createRoot(this.nodes.reactContainer);const e=(g=(h=(d=(c=(l=this.Blok.API)==null?void 0:l.methods)==null?void 0:c.ui)==null?void 0:d.nodes)==null?void 0:h.redactor)!=null?g:this.Blok.UI.nodes.redactor,t=this.Blok.UI.nodes.wrapper.getBoundingClientRect(),r=this.Blok.UI.contentRect,i=new Promise(m=>{this.popoverReadyResolver=m});st.flushSync(()=>{var m;(m=this.reactRoot)==null||m.render(bs.createElement(Iy,{ref:this.componentRef,toolsMap:this.tools,scopeElement:e,wrapperOffset:t,contentRect:r,toolbarVerticalMargin:this.toolbarVerticalMargin,onClose:()=>{},onReady:()=>{var y;(y=this.popoverReadyResolver)==null||y.call(this),this.popoverReadyResolver=null},getToolShortcut:y=>this.getToolShortcut(y)}))}),await i}allowedToShow(){const e=["IMG","INPUT"],t=this.resolveSelection(),r=le.text;if(!t||!t.anchorNode||t.isCollapsed||r.length<1)return!1;const i=L.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(i===null||t!==null&&e.includes(i.tagName))return!1;const l=L.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement,c=l?this.Blok.BlockManager.getBlock(l):null,d=c!=null?c:this.Blok.BlockManager.currentBlock;if(d==null||this.getTools().some(k=>d.tool.inlineTools.has(k.name))===!1)return!1;const m="[contenteditable]";if(i.closest(m)!==null)return!0;const b=d.holder;return b&&(b.matches(m)?b:b.closest(m))?!0:this.Blok.ReadOnly.isEnabled?le.isSelectionAtBlok(t):!1}getTools(){var r;const e=(r=this.Blok.BlockManager.currentBlock)!=null?r:(()=>{const i=this.resolveSelection(),l=i==null?void 0:i.anchorNode;if(!l)return null;const c=L.isElement(l)?l:l.parentElement;return c?this.Blok.BlockManager.getBlock(c):null})();return e?Array.from(e.tool.inlineTools.values()).filter(i=>!(this.Blok.ReadOnly.isEnabled&&i.isReadOnlySupported!==!0)):[]}createToolsInstances(){this.tools=new Map,this.getTools().forEach(t=>{const r=t.create();this.tools.set(t,r)})}tryEnableShortcut(e,t){if(t!==void 0)try{this.enableShortcuts(e,t)}catch(r){}}getToolShortcut(e){const{Tools:t}=this.Blok,r=t.inlineTools.get(e),i=t.internal.inlineTools;return Array.from(i.keys()).includes(e)?this.inlineTools[e][By.Shortcut]:r==null?void 0:r.shortcut}enableShortcuts(e,t){const r=this.registeredShortcuts.get(e);r!==t&&(this.isShortcutTakenByAnotherTool(e,t)||(r!==void 0&&(Fn.remove(document,r),this.registeredShortcuts.delete(e)),Fn.add({name:t,handler:i=>{const{currentBlock:l}=this.Blok.BlockManager;l&&l.tool.enabledInlineTools!==!1&&(i.preventDefault(),this.activateToolByShortcut(e))},on:document}),this.registeredShortcuts.set(e,t)))}isShortcutTakenByAnotherTool(e,t){return Array.from(this.registeredShortcuts.entries()).some(([r,i])=>r!==e&&i===t)}async activateToolByShortcut(e){if(this.opened||await this.tryToShow(),this.popover){this.popover.activateItemByName(e);return}this.invokeToolActionDirectly(e)}invokeToolActionDirectly(e){const t=this.Blok.Tools.inlineTools.get(e);if(!t)return;const i=t.create().render(),l=Array.isArray(i)?i:[i];for(const c of l)if("onActivate"in c&&typeof c.onActivate=="function"){c.onActivate(c);return}}get inlineTools(){const e={};return Array.from(this.Blok.Tools.inlineTools.entries()).forEach(([t,r])=>{e[t]=r.create()}),e}registerInitialShortcuts(){var r;const e=(r=this.Blok.Tools)==null?void 0:r.inlineTools;if(!e)return this.scheduleShortcutRegistration(),!1;const t=Array.from(e.keys());return t.length===0?(this.scheduleShortcutRegistration(),!1):(t.forEach(i=>{const l=this.getToolShortcut(i);this.tryEnableShortcut(i,l)}),!0)}resolveSelection(){const e=le.selection;if(e!==void 0)return e;const t=le.instance;return t!==void 0?t:le.get()}}const ME=ge.createContext(null),FE=({modules:a,config:e,eventsDispatcher:t,children:r})=>{var g,m,y;const[i,l]=ge.useState((g=e.readOnly)!=null?g:!1),[c,d]=ge.useState((y=(m=a.UI)==null?void 0:m.isMobile)!=null?y:!1);ge.useEffect(()=>(a.ReadOnly&&l(a.ReadOnly.isEnabled),()=>{}),[a.ReadOnly]),ge.useEffect(()=>{const b=T=>{d(T.isEnabled)};return t.on(Cr,b),()=>{t.off(Cr,b)}},[t]);const h=ge.useMemo(()=>({modules:a,config:e,eventsDispatcher:t,readOnly:i,isMobile:c}),[a,e,t,i,c]);return tt.jsx(ME.Provider,{value:h,children:r})};class HE extends Be{constructor(){super(...arguments),this.root=null,this.currentComponent=null,this.isMounted=!1}async prepare(){this.createReactContainer()}render(e){this.root||this.initializeRoot(),this.currentComponent=e,this.performRender()}forceUpdate(){this.isMounted&&this.currentComponent&&this.performRender()}destroy(){var e;this.root&&(this.root.unmount(),this.root=null),(e=this.nodes.reactRoot)!=null&&e.parentNode&&this.nodes.reactRoot.remove(),this.isMounted=!1,this.currentComponent=null}getContainer(){var e;return(e=this.nodes.reactRoot)!=null?e:null}get mounted(){return this.isMounted}getModulesWithSelf(){return ot(de({},this.Blok),{ReactAdapter:this})}createReactContainer(){const e=document.createElement("div");e.setAttribute("data-blok-react-root",""),e.setAttribute("data-blok-testid","react-root"),e.style.cssText=`
172
172
  position: absolute;
173
173
  top: 0;
174
174
  left: 0;
@@ -176,6 +176,6 @@ Error generating stack: `+p.message+`
176
176
  bottom: 0;
177
177
  pointer-events: none;
178
178
  z-index: 2;
179
- `,this.nodes.reactRoot=e}appendContainer(){var i;const{UI:e}=this.Blok;if(!((i=e==null?void 0:e.nodes)!=null&&i.wrapper)){console.warn("[ReactAdapter] UI module not ready, cannot append React container");return}const t=e.nodes.holder;if(!t||t.contains(this.nodes.reactRoot))return;window.getComputedStyle(t).position==="static"&&(t.style.position="relative"),t.appendChild(this.nodes.reactRoot)}initializeRoot(){this.nodes.reactRoot||this.createReactContainer(),this.appendContainer(),this.root=py.createRoot(this.nodes.reactRoot),this.isMounted=!0}performRender(){if(!this.root)return;const e=RS.createElement(OS,{modules:this.getModulesWithSelf(),config:this.config,eventsDispatcher:this.eventsDispatcher},this.currentComponent);this.root.render(e)}}const Ad=" ",Id=new WeakSet,_d=()=>{var c,d;const a=window.getSelection();if(a===null)return[null,0];const e=a.focusNode,t=a.focusOffset;if(e===null)return[null,0];if(e.nodeType===Node.TEXT_NODE||e.childNodes.length===0)return[e,t];const o=e.childNodes[t];if(o!==void 0)return[o,0];const i=(c=e.childNodes[t-1])!=null?c:null,l=(d=i==null?void 0:i.textContent)!=null?d:null;return[i,l!==null?l.length:0]},Cy=a=>{var t;if(!(a instanceof HTMLElement)||N.isSingleTag(a)||N.isNativeInput(a))return!1;if(a.childNodes.length===0)return!0;const e=(t=a.textContent)!=null?t:"";return e.includes(Ad)||!qu(e)?!1:Array.from(a.children).every(o=>Cy(o))},By=typeof window!="undefined"&&typeof window.MutationObserver!="undefined"?new window.MutationObserver(a=>{for(const e of a){const t=e.nextSibling;e.removedNodes.forEach(o=>{var h,g,v;if(!(o instanceof Element)||!Cy(o))return;const i=t instanceof Text?t:null;if(i===null||!i.isConnected)return;const l=i.parentElement;if(!((h=l==null?void 0:l.isContentEditable)!=null&&h))return;const c=(v=(g=i.textContent)==null?void 0:g[0])!=null?v:null;(c===Ad||c===" ")&&Id.add(i)})}}):null,Ay=new WeakSet,Iy=a=>{if(By===null||Ay.has(a))return;const e=()=>{a.body!==null&&(By.observe(a.body,{childList:!0,subtree:!0}),Ay.add(a))};a.readyState==="loading"?a.addEventListener("DOMContentLoaded",e,{once:!0}):e()};typeof window!="undefined"&&typeof window.document!="undefined"&&Iy(window.document);const DS=a=>{var i,l;Iy(a.ownerDocument);const[e,t]=_d();if(e===null||!a.contains(e)||e.nodeType===Node.TEXT_NODE&&t<((i=e.textContent)!=null?i:"").length)return null;const o=document.createTreeWalker(a,NodeFilter.SHOW_TEXT);for(o.currentNode=e;;){const c=o.nextNode();if(c===null)return null;const d=(l=c.textContent)!=null?l:"";if(d.length===0)continue;const h=d[0];if(!(h===Ad||h===" ")||c===e)return null;const v=document.createRange();try{v.setStart(e,t),v.setEnd(c,0)}catch(T){return null}const y=v.cloneContents(),b=document.createElement("div");b.appendChild(y);const x=Array.from(b.querySelectorAll("*")).some(T=>{var O;const S=(O=T.textContent)!=null?O:"";return S.length===0||qu(S)}),w=Id.has(c);if(!(!x&&!w))return w&&Id.delete(c),{node:c,offset:0}}},_y=(a,e,t,o)=>{const i=document.createRange();o==="left"?(i.selectNodeContents(a),i.setEnd(e,t)):(i.selectNodeContents(a),i.setStart(e,t));const l=i.cloneContents(),c=document.createElement("div");c.appendChild(l);const d=c.textContent||"";if(c.querySelectorAll("img, br, hr, input, area, base, col, embed, link, meta, param, source, track, wbr").length>0)return!1;const g=d.includes(" ")||c.innerHTML.includes("&nbsp;")||i.toString().includes(" "),v=e.nodeType===Node.TEXT_NODE&&(o==="left"?(e.textContent||"").slice(0,t):(e.textContent||"").slice(t)).includes(" ");if(g||v)return!1;c.style.position="absolute",c.style.visibility="hidden",c.style.height="auto",c.style.width="auto",c.style.whiteSpace=window.getComputedStyle(a).whiteSpace,document.body.appendChild(c);const y=c.getBoundingClientRect().width;return document.body.removeChild(c),!(y>0||!qu(d)||window.getComputedStyle(a).whiteSpace.startsWith("pre")&&d.length>0)},xs=a=>{var c;const e=N.getDeepestNode(a);if(e===null||N.isEmpty(a))return!0;if(N.isNativeInput(e))return e.selectionEnd===0;if(N.isEmpty(a))return!0;const[t,o]=_d();if(t===null)return!1;const i=window.getSelection(),l=(c=i==null?void 0:i.focusNode)!=null?c:null;return l!==null&&l!==a&&!(l.nodeType===Node.TEXT_NODE&&l.parentNode===a)?!1:_y(a,t,o,"left")},Es=a=>{const e=N.getDeepestNode(a,!0);if(e===null)return!0;if(N.isNativeInput(e))return e.selectionEnd===e.value.length;const[t,o]=_d();return t===null?!1:_y(a,t,o,"right")},PS=(a,e=!0)=>{var y,b,x,w;if(N.isNativeInput(a)){a.focus();const T=e?0:a.value.length;a.setSelectionRange(T,T);return}const t=document.createRange(),o=window.getSelection();if(!o)return;const i=(T,S=!1)=>{const O=document.createTextNode("");S?T.insertBefore(O,T.firstChild):T.appendChild(O),t.setStart(O,0),t.setEnd(O,0)},l=(T,S)=>{if(T===null)return null;if(T.nodeType===Node.TEXT_NODE)return T;const O=S?T.firstChild:T.lastChild;return l(O,S)},c=a.childNodes,d=e?(y=c[0])!=null?y:null:(b=c[c.length-1])!=null?b:null,h=l(d,e);if(d===null){i(a),o.removeAllRanges(),o.addRange(t);return}if(h===null||h.nodeType!==Node.TEXT_NODE){i(a,e),o.removeAllRanges(),o.addRange(t);return}const g=(w=(x=h.textContent)==null?void 0:x.length)!=null?w:0,v=e?0:g;t.setStart(h,v),t.setEnd(h,v),o.removeAllRanges(),o.addRange(t)},Ry={Backspace:ie.BACKSPACE,Delete:ie.DELETE,Enter:ie.ENTER,Tab:ie.TAB,ArrowDown:ie.DOWN,ArrowRight:ie.RIGHT,ArrowUp:ie.UP,ArrowLeft:ie.LEFT},MS=new Set(["Enter","Process","Spacebar","Space","Dead"]),Ss='[contenteditable="true"], textarea, input';class FS extends Se{keydown(e){if(this.beforeKeydownProcessing(e),this.handleSelectedBlocksDeletion(e)||e.defaultPrevented)return;switch(this.getKeyCode(e)){case ie.BACKSPACE:this.backspace(e);break;case ie.DELETE:this.delete(e);break;case ie.ENTER:this.enter(e);break;case ie.DOWN:case ie.RIGHT:this.arrowRightAndDown(e);break;case ie.UP:case ie.LEFT:this.arrowLeftAndUp(e);break;case ie.TAB:this.tabPressed(e);break}e.key==="/"&&!e.ctrlKey&&!e.metaKey&&this.slashPressed(e),e.code==="Slash"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.commandSlashPressed())}handleSelectedBlocksDeletion(e){const{BlockSelection:t,BlockManager:o,Caret:i,BlockSettings:l}=this.Blok;if(l.contains(e.target))return!1;const c=e.key==="Backspace"||e.key==="Delete",d=se.isSelectionExists,h=se.isCollapsed===!0;if(!(c&&t.anyBlockSelected&&(!d||h)))return!1;const v=o.removeSelectedBlocks();if(v!==void 0){const y=o.insertDefaultBlockAtIndex(v,!0);i.setToBlock(y,i.positions.START)}return t.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),!0}beforeKeydownProcessing(e){!this.needToolbarClosing(e)||!this.isPrintableKeyEvent(e)||(this.Blok.Toolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)||this.Blok.BlockSelection.clearSelection(e)}keyup(e){e.shiftKey||this.Blok.UI.checkEmptiness()}handleCommandC(e){const{BlockSelection:t}=this.Blok;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:o,Caret:i}=this.Blok;t.anyBlockSelected&&t.copySelectedBlocks(e).then(()=>{const l=o.removeSelectedBlocks();if(l!==void 0){const c=o.insertDefaultBlockAtIndex(l,!0);i.setToBlock(c,i.positions.START)}t.clearSelection(e)}).catch(()=>{})}tabPressed(e){const{InlineToolbar:t,Caret:o}=this.Blok;if(t.opened)return;(e.shiftKey?o.navigatePrevious(!0):o.navigateNext(!0))&&e.preventDefault()}commandSlashPressed(){this.Blok.BlockSelection.selectedBlocks.length>1||this.activateBlockSettings()}slashPressed(e){if(!this.Blok.UI.nodes.wrapper.contains(e.target))return;const o=this.Blok.BlockManager.currentBlock;o!=null&&o.isEmpty&&(e.preventDefault(),this.Blok.Caret.insertContentAtCaretPosition("/"),this.activateToolbox())}enter(e){const{BlockManager:t,UI:o}=this.Blok,i=t.currentBlock;if(i===void 0||i.tool.isLineBreaksEnabled||o.someToolbarOpened&&o.someFlipperButtonFocused||e.shiftKey&&!ju)return;const l=i.currentInput!==void 0&&xs(i.currentInput)&&!i.hasMedia?(this.Blok.BlockManager.insertDefaultBlockAtIndex(this.Blok.BlockManager.currentBlockIndex),i):i.currentInput&&Es(i.currentInput)?this.Blok.BlockManager.insertDefaultBlockAtIndex(this.Blok.BlockManager.currentBlockIndex+1):this.Blok.BlockManager.split();this.Blok.Caret.setToBlock(l),this.Blok.Toolbar.moveAndOpen(l),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:o}=this.Blok,{currentBlock:i,previousBlock:l}=t;if(i===void 0||!se.isCollapsed||!i.currentInput||!xs(i.currentInput))return;if(e.preventDefault(),this.Blok.Toolbar.close(),!(i.currentInput===i.firstInput)){o.navigatePrevious();return}if(l===null)return;if(l.isEmpty){t.removeBlock(l);return}if(i.isEmpty){t.removeBlock(i);const h=t.currentBlock;h&&o.setToBlock(h,o.positions.END);return}Zv(l,i)?this.mergeBlocks(l,i):o.setToBlock(l,o.positions.END)}delete(e){const{BlockManager:t,Caret:o}=this.Blok,{currentBlock:i,nextBlock:l}=t;if(i===void 0||!se.isCollapsed||!i.currentInput||!Es(i.currentInput))return;if(e.preventDefault(),this.Blok.Toolbar.close(),!(i.currentInput===i.lastInput)){o.navigateNext();return}if(l===null)return;if(l.isEmpty){t.removeBlock(l);return}if(i.isEmpty){t.removeBlock(i),o.setToBlock(l,o.positions.START);return}Zv(i,l)?this.mergeBlocks(i,l):o.setToBlock(l,o.positions.START)}mergeBlocks(e,t){const{BlockManager:o,Toolbar:i}=this.Blok;e.lastInput!==void 0&&(PS(e.lastInput,!1),o.mergeBlocks(e,t).then(()=>{i.close()}).catch(()=>{}))}arrowRightAndDown(e){var O;const t=this.getKeyCode(e);if(t===null)return;const o=Yn.usedKeys.includes(t)&&(!e.shiftKey||t===ie.TAB);if(this.Blok.UI.someToolbarOpened&&o)return;e.shiftKey||this.Blok.Toolbar.close();const i=se.get();i!=null&&i.anchorNode&&!this.Blok.BlockSelection.anyBlockSelected&&this.Blok.BlockManager.setCurrentBlockByChildNode(i.anchorNode);const{currentBlock:l}=this.Blok.BlockManager,c=e.target,d=document.activeElement instanceof HTMLElement?document.activeElement:null,h=[l==null?void 0:l.inputs.find(L=>c!==null&&L.contains(c)),l==null?void 0:l.inputs.find(L=>d!==null&&L.contains(d)),c==null?void 0:c.closest(Ss),d==null?void 0:d.closest(Ss)],g=(O=l==null?void 0:l.currentInput)!=null?O:h.find(L=>L instanceof HTMLElement),y=(g!==void 0?Es(g):void 0)||this.Blok.BlockSelection.anyBlockSelected,b=e.shiftKey&&t===ie.DOWN;if(b&&y){this.Blok.CrossBlockSelection.toggleBlockSelectedState();return}b&&this.Blok.InlineToolbar.tryToShow();const w=t===ie.RIGHT&&!e.shiftKey&&!this.isRtl&&g instanceof HTMLElement?DS(g):null;if(w!==null){se.setCursor(w.node,w.offset),e.preventDefault();return}if(t===ie.DOWN||t===ie.RIGHT&&!this.isRtl?this.Blok.Caret.navigateNext():this.Blok.Caret.navigatePrevious()){e.preventDefault();return}cs(()=>{this.Blok.BlockManager.currentBlock&&this.Blok.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Blok.BlockSelection.clearSelection(e)}arrowLeftAndUp(e){var T;const t=this.Blok.UI.someToolbarOpened,o=this.getKeyCode(e);if(o===null||t&&Yn.usedKeys.includes(o)&&(!e.shiftKey||o===ie.TAB))return;t&&this.Blok.UI.closeAllToolbars(),e.shiftKey||this.Blok.Toolbar.close();const i=window.getSelection();i!=null&&i.anchorNode&&!this.Blok.BlockSelection.anyBlockSelected&&this.Blok.BlockManager.setCurrentBlockByChildNode(i.anchorNode);const{currentBlock:l}=this.Blok.BlockManager,c=e.target,d=document.activeElement instanceof HTMLElement?document.activeElement:null,h=[l==null?void 0:l.inputs.find(S=>c!==null&&S.contains(c)),l==null?void 0:l.inputs.find(S=>d!==null&&S.contains(d)),c==null?void 0:c.closest(Ss),d==null?void 0:d.closest(Ss)],g=(T=l==null?void 0:l.currentInput)!=null?T:h.find(S=>S instanceof HTMLElement),y=(g!==void 0?xs(g):void 0)||this.Blok.BlockSelection.anyBlockSelected,b=e.shiftKey&&o===ie.UP;if(b&&y){this.Blok.CrossBlockSelection.toggleBlockSelectedState(!1);return}if(b&&this.Blok.InlineToolbar.tryToShow(),o===ie.UP||o===ie.LEFT&&!this.isRtl?this.Blok.Caret.navigatePrevious():this.Blok.Caret.navigateNext()){e.preventDefault();return}cs(()=>{this.Blok.BlockManager.currentBlock&&this.Blok.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Blok.BlockSelection.clearSelection(e)}needToolbarClosing(e){const t=this.getKeyCode(e),o=t===ie.ENTER,i=t===ie.TAB,l=o&&this.Blok.Toolbar.toolbox.opened,c=o&&this.Blok.BlockSettings.opened,d=o&&this.Blok.InlineToolbar.opened,h=i;return!(e.shiftKey||h||l||c||d)}activateToolbox(){this.Blok.Toolbar.opened||this.Blok.Toolbar.moveAndOpen(),this.Blok.Toolbar.toolbox.open()}activateBlockSettings(){this.Blok.Toolbar.opened||this.Blok.Toolbar.moveAndOpen(),this.Blok.BlockSettings.opened||Promise.resolve(this.Blok.BlockSettings.open()).catch(()=>{})}getKeyCode(e){const t=e.key&&Ry[e.key];if(t!==void 0&&typeof t=="number")return t;const o=e.code&&Ry[e.code];return o!==void 0&&typeof o=="number"?o:null}isPrintableKeyEvent(e){return e.key?e.key.length===1||MS.has(e.key):!1}}class Rd{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return gv(this.workingArea.children)}static set(e,t,o){return isNaN(Number(t))?(Reflect.set(e,t,o),!0):(e.insert(+t,o),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}move(e,t,o=!1){const i=this.blocks.splice(t,1)[0];if(!o){const c=e-1,d=Math.max(0,c),h=this.blocks[d],g=e>0?"afterend":"beforebegin";this.insertToDOM(i,g,h)}this.blocks.splice(e,0,i);const l=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});i.call(Dn.MOVED,l)}insert(e,t,o=!1){if(!this.length){this.push(t);return}const i=e>this.length?this.length:e;o&&(this.blocks[i].holder.remove(),this.blocks[i].call(Dn.REMOVED));const l=o?1:0;if(this.blocks.splice(i,l,t),i>0){const d=this.blocks[i-1];this.insertToDOM(t,"afterend",d);return}const c=this.blocks[i+1];if(c!==void 0){this.insertToDOM(t,"beforebegin",c);return}this.insertToDOM(t)}replace(e,t){if(this.blocks[e]===void 0)throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const o=new DocumentFragment;for(const i of e)o.appendChild(i.holder);if(!this.length){this.blocks.push(...e),this.workingArea.appendChild(o),e.forEach(i=>i.call(Dn.RENDERED));return}if(t>0){const i=Math.min(t-1,this.length-1);this.blocks[i].holder.after(o)}t===0&&this.workingArea.prepend(o),this.blocks.splice(t,0,...e),e.forEach(i=>i.call(Dn.RENDERED))}remove(e){const t=isNaN(e)?this.length-1:e;this.blocks[t].holder.remove(),this.blocks[t].call(Dn.REMOVED),this.blocks.splice(t,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach(e=>e.call(Dn.REMOVED)),this.blocks.length=0}insertAfter(e,t){const o=this.blocks.indexOf(e);this.insert(o+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,o){t&&o!==void 0?o.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(Dn.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}function Ny(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,o)}return t}function Sn(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ny(Object(t),!0).forEach(function(o){zS(a,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Ny(Object(t)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(t,o))})}return a}function Cs(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cs=function(e){return typeof e}:Cs=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cs(a)}function zS(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function Mn(){return Mn=Object.assign||function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(a[o]=t[o])}return a},Mn.apply(this,arguments)}function HS(a,e){if(a==null)return{};var t={},o=Object.keys(a),i,l;for(l=0;l<o.length;l++)i=o[l],!(e.indexOf(i)>=0)&&(t[i]=a[i]);return t}function jS(a,e){if(a==null)return{};var t=HS(a,e),o,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(i=0;i<l.length;i++)o=l[i],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(t[o]=a[o])}return t}var qS="1.15.6";function Fn(a){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(a)}var zn=Fn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ni=Fn(/Edge/i),Oy=Fn(/firefox/i),ri=Fn(/safari/i)&&!Fn(/chrome/i)&&!Fn(/android/i),Nd=Fn(/iP(ad|od|hone)/i),Ly=Fn(/chrome/i)&&Fn(/android/i),Dy={capture:!1,passive:!1};function Ie(a,e,t){a.addEventListener(e,t,!zn&&Dy)}function Ce(a,e,t){a.removeEventListener(e,t,!zn&&Dy)}function Bs(a,e){if(e){if(e[0]===">"&&(e=e.substring(1)),a)try{if(a.matches)return a.matches(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Py(a){return a.host&&a!==document&&a.host.nodeType?a.host:a.parentNode}function dn(a,e,t,o){if(a){t=t||document;do{if(e!=null&&(e[0]===">"?a.parentNode===t&&Bs(a,e):Bs(a,e))||o&&a===t)return a;if(a===t)break}while(a=Py(a))}return null}var My=/\s+/g;function Ut(a,e,t){if(a&&e)if(a.classList)a.classList[t?"add":"remove"](e);else{var o=(" "+a.className+" ").replace(My," ").replace(" "+e+" "," ");a.className=(o+(t?" "+e:"")).replace(My," ")}}function he(a,e,t){var o=a&&a.style;if(o){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(a,""):a.currentStyle&&(t=a.currentStyle),e===void 0?t:t[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=t+(typeof t=="string"?"":"px")}}function ao(a,e){var t="";if(typeof a=="string")t=a;else do{var o=he(a,"transform");o&&o!=="none"&&(t=o+" "+t)}while(!e&&(a=a.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function Fy(a,e,t){if(a){var o=a.getElementsByTagName(e),i=0,l=o.length;if(t)for(;i<l;i++)t(o[i],i);return o}return[]}function Cn(){var a=document.scrollingElement;return a||document.documentElement}function at(a,e,t,o,i){if(!(!a.getBoundingClientRect&&a!==window)){var l,c,d,h,g,v,y;if(a!==window&&a.parentNode&&a!==Cn()?(l=a.getBoundingClientRect(),c=l.top,d=l.left,h=l.bottom,g=l.right,v=l.height,y=l.width):(c=0,d=0,h=window.innerHeight,g=window.innerWidth,v=window.innerHeight,y=window.innerWidth),(e||t)&&a!==window&&(i=i||a.parentNode,!zn))do if(i&&i.getBoundingClientRect&&(he(i,"transform")!=="none"||t&&he(i,"position")!=="static")){var b=i.getBoundingClientRect();c-=b.top+parseInt(he(i,"border-top-width")),d-=b.left+parseInt(he(i,"border-left-width")),h=c+l.height,g=d+l.width;break}while(i=i.parentNode);if(o&&a!==window){var x=ao(i||a),w=x&&x.a,T=x&&x.d;x&&(c/=T,d/=w,y/=w,v/=T,h=c+v,g=d+y)}return{top:c,left:d,bottom:h,right:g,width:y,height:v}}}function zy(a,e,t){for(var o=Qn(a,!0),i=at(a)[e];o;){var l=at(o)[t],c=void 0;if(c=i>=l,!c)return o;if(o===Cn())break;o=Qn(o,!1)}return!1}function lo(a,e,t,o){for(var i=0,l=0,c=a.children;l<c.length;){if(c[l].style.display!=="none"&&c[l]!==pe.ghost&&(o||c[l]!==pe.dragged)&&dn(c[l],t.draggable,a,!1)){if(i===e)return c[l];i++}l++}return null}function Od(a,e){for(var t=a.lastElementChild;t&&(t===pe.ghost||he(t,"display")==="none"||e&&!Bs(t,e));)t=t.previousElementSibling;return t||null}function en(a,e){var t=0;if(!a||!a.parentNode)return-1;for(;a=a.previousElementSibling;)a.nodeName.toUpperCase()!=="TEMPLATE"&&a!==pe.clone&&(!e||Bs(a,e))&&t++;return t}function Hy(a){var e=0,t=0,o=Cn();if(a)do{var i=ao(a),l=i.a,c=i.d;e+=a.scrollLeft*l,t+=a.scrollTop*c}while(a!==o&&(a=a.parentNode));return[e,t]}function US(a,e){for(var t in a)if(a.hasOwnProperty(t)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===a[t][o])return Number(t)}return-1}function Qn(a,e){if(!a||!a.getBoundingClientRect)return Cn();var t=a,o=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=he(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Cn();if(o||e)return t;o=!0}}while(t=t.parentNode);return Cn()}function WS(a,e){if(a&&e)for(var t in e)e.hasOwnProperty(t)&&(a[t]=e[t]);return a}function Ld(a,e){return Math.round(a.top)===Math.round(e.top)&&Math.round(a.left)===Math.round(e.left)&&Math.round(a.height)===Math.round(e.height)&&Math.round(a.width)===Math.round(e.width)}var oi;function jy(a,e){return function(){if(!oi){var t=arguments,o=this;t.length===1?a.call(o,t[0]):a.apply(o,t),oi=setTimeout(function(){oi=void 0},e)}}}function KS(){clearTimeout(oi),oi=void 0}function qy(a,e,t){a.scrollLeft+=e,a.scrollTop+=t}function Uy(a){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(a).cloneNode(!0):t?t(a).clone(!0)[0]:a.cloneNode(!0)}function Wy(a,e,t){var o={};return Array.from(a.children).forEach(function(i){var l,c,d,h;if(!(!dn(i,e.draggable,a,!1)||i.animated||i===t)){var g=at(i);o.left=Math.min((l=o.left)!==null&&l!==void 0?l:1/0,g.left),o.top=Math.min((c=o.top)!==null&&c!==void 0?c:1/0,g.top),o.right=Math.max((d=o.right)!==null&&d!==void 0?d:-1/0,g.right),o.bottom=Math.max((h=o.bottom)!==null&&h!==void 0?h:-1/0,g.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var Lt="Sortable"+new Date().getTime();function VS(){var a=[],e;return{captureAnimationState:function(){if(a=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(he(i,"display")==="none"||i===pe.ghost)){a.push({target:i,rect:at(i)});var l=Sn({},a[a.length-1].rect);if(i.thisAnimationDuration){var c=ao(i,!0);c&&(l.top-=c.f,l.left-=c.e)}i.fromRect=l}})}},addAnimationState:function(o){a.push(o)},removeAnimationState:function(o){a.splice(US(a,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var l=!1,c=0;a.forEach(function(d){var h=0,g=d.target,v=g.fromRect,y=at(g),b=g.prevFromRect,x=g.prevToRect,w=d.rect,T=ao(g,!0);T&&(y.top-=T.f,y.left-=T.e),g.toRect=y,g.thisAnimationDuration&&Ld(b,y)&&!Ld(v,y)&&(w.top-y.top)/(w.left-y.left)===(v.top-y.top)/(v.left-y.left)&&(h=GS(w,b,x,i.options)),Ld(y,v)||(g.prevFromRect=v,g.prevToRect=y,h||(h=i.options.animation),i.animate(g,w,y,h)),h&&(l=!0,c=Math.max(c,h),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},h),g.thisAnimationDuration=h)}),clearTimeout(e),l?e=setTimeout(function(){typeof o=="function"&&o()},c):typeof o=="function"&&o(),a=[]},animate:function(o,i,l,c){if(c){he(o,"transition",""),he(o,"transform","");var d=ao(this.el),h=d&&d.a,g=d&&d.d,v=(i.left-l.left)/(h||1),y=(i.top-l.top)/(g||1);o.animatingX=!!v,o.animatingY=!!y,he(o,"transform","translate3d("+v+"px,"+y+"px,0)"),this.forRepaintDummy=$S(o),he(o,"transition","transform "+c+"ms"+(this.options.easing?" "+this.options.easing:"")),he(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){he(o,"transition",""),he(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},c)}}}}function $S(a){return a.offsetWidth}function GS(a,e,t,o){return Math.sqrt(Math.pow(e.top-a.top,2)+Math.pow(e.left-a.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*o.animation}var co=[],Dd={initializeByDefault:!0},ii={mount:function(e){for(var t in Dd)Dd.hasOwnProperty(t)&&!(t in e)&&(e[t]=Dd[t]);co.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),co.push(e)},pluginEvent:function(e,t,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var l=e+"Global";co.forEach(function(c){t[c.pluginName]&&(t[c.pluginName][l]&&t[c.pluginName][l](Sn({sortable:t},o)),t.options[c.pluginName]&&t[c.pluginName][e]&&t[c.pluginName][e](Sn({sortable:t},o)))})},initializePlugins:function(e,t,o,i){co.forEach(function(d){var h=d.pluginName;if(!(!e.options[h]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[h]=g,Mn(o,g.defaults)}});for(var l in e.options)if(e.options.hasOwnProperty(l)){var c=this.modifyOption(e,l,e.options[l]);typeof c!="undefined"&&(e.options[l]=c)}},getEventProperties:function(e,t){var o={};return co.forEach(function(i){typeof i.eventProperties=="function"&&Mn(o,i.eventProperties.call(t[i.pluginName],e))}),o},modifyOption:function(e,t,o){var i;return co.forEach(function(l){e[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[t]=="function"&&(i=l.optionListeners[t].call(e[l.pluginName],o))}),i}};function XS(a){var e=a.sortable,t=a.rootEl,o=a.name,i=a.targetEl,l=a.cloneEl,c=a.toEl,d=a.fromEl,h=a.oldIndex,g=a.newIndex,v=a.oldDraggableIndex,y=a.newDraggableIndex,b=a.originalEvent,x=a.putSortable,w=a.extraEventProperties;if(e=e||t&&t[Lt],!!e){var T,S=e.options,O="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!zn&&!ni?T=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(T=document.createEvent("Event"),T.initEvent(o,!0,!0)),T.to=c||t,T.from=d||t,T.item=i||t,T.clone=l,T.oldIndex=h,T.newIndex=g,T.oldDraggableIndex=v,T.newDraggableIndex=y,T.originalEvent=b,T.pullMode=x?x.lastPutMode:void 0;var L=Sn(Sn({},w),ii.getEventProperties(o,e));for(var U in L)T[U]=L[U];t&&t.dispatchEvent(T),S[O]&&S[O].call(e,T)}}var YS=["evt"],Dt=function(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,l=jS(o,YS);ii.pluginEvent.bind(pe)(e,t,Sn({dragEl:V,parentEl:Je,ghostEl:ve,rootEl:Ge,nextEl:Rr,lastDownEl:As,cloneEl:Ye,cloneHidden:Zn,dragStarted:ai,putSortable:bt,activeSortable:pe.active,originalEvent:i,oldIndex:uo,oldDraggableIndex:si,newIndex:Wt,newDraggableIndex:Jn,hideGhostForTarget:Qy,unhideGhostForTarget:Zy,cloneNowHidden:function(){Zn=!0},cloneNowShown:function(){Zn=!1},dispatchSortableEvent:function(d){_t({sortable:t,name:d,originalEvent:i})}},l))};function _t(a){XS(Sn({putSortable:bt,cloneEl:Ye,targetEl:V,rootEl:Ge,oldIndex:uo,oldDraggableIndex:si,newIndex:Wt,newDraggableIndex:Jn},a))}var V,Je,ve,Ge,Rr,As,Ye,Zn,uo,Wt,si,Jn,Is,bt,fo=!1,_s=!1,Rs=[],Nr,fn,Pd,Md,Ky,Vy,ai,ho,li,ci=!1,Ns=!1,Os,xt,Fd=[],zd=!1,Ls=[],Ds=typeof document!="undefined",Ps=Nd,$y=ni||zn?"cssFloat":"float",QS=Ds&&!Ly&&!Nd&&"draggable"in document.createElement("div"),Gy=(function(){if(Ds){if(zn)return!1;var a=document.createElement("x");return a.style.cssText="pointer-events:auto",a.style.pointerEvents==="auto"}})(),Xy=function(e,t){var o=he(e),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),l=lo(e,0,t),c=lo(e,1,t),d=l&&he(l),h=c&&he(c),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+at(l).width,v=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+at(c).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&d.float&&d.float!=="none"){var y=d.float==="left"?"left":"right";return c&&(h.clear==="both"||h.clear===y)?"vertical":"horizontal"}return l&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&o[$y]==="none"||c&&o[$y]==="none"&&g+v>i)?"vertical":"horizontal"},ZS=function(e,t,o){var i=o?e.left:e.top,l=o?e.right:e.bottom,c=o?e.width:e.height,d=o?t.left:t.top,h=o?t.right:t.bottom,g=o?t.width:t.height;return i===d||l===h||i+c/2===d+g/2},JS=function(e,t){var o;return Rs.some(function(i){var l=i[Lt].options.emptyInsertThreshold;if(!(!l||Od(i))){var c=at(i),d=e>=c.left-l&&e<=c.right+l,h=t>=c.top-l&&t<=c.bottom+l;if(d&&h)return o=i}}),o},Yy=function(e){function t(l,c){return function(d,h,g,v){var y=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(l==null&&(c||y))return!0;if(l==null||l===!1)return!1;if(c&&l==="clone")return l;if(typeof l=="function")return t(l(d,h,g,v),c)(d,h,g,v);var b=(c?d:h).options.group.name;return l===!0||typeof l=="string"&&l===b||l.join&&l.indexOf(b)>-1}}var o={},i=e.group;(!i||Cs(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=t(i.pull,!0),o.checkPut=t(i.put),o.revertClone=i.revertClone,e.group=o},Qy=function(){!Gy&&ve&&he(ve,"display","none")},Zy=function(){!Gy&&ve&&he(ve,"display","")};Ds&&!Ly&&document.addEventListener("click",function(a){if(_s)return a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),_s=!1,!1},!0);var Or=function(e){if(V){e=e.touches?e.touches[0]:e;var t=JS(e.clientX,e.clientY);if(t){var o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[Lt]._onDragOver(o)}}},eC=function(e){V&&V.parentNode[Lt]._isOutsideThisEl(e.target)};function pe(a,e){if(!(a&&a.nodeType&&a.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(a));this.el=a,this.options=e=Mn({},e),a[Lt]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(a.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Xy(a,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(c,d){c.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:pe.supportPointer!==!1&&"PointerEvent"in window&&(!ri||Nd),emptyInsertThreshold:5};ii.initializePlugins(this,a,t);for(var o in t)!(o in e)&&(e[o]=t[o]);Yy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:QS,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ie(a,"pointerdown",this._onTapStart):(Ie(a,"mousedown",this._onTapStart),Ie(a,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ie(a,"dragover",this),Ie(a,"dragenter",this)),Rs.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Mn(this,VS())}pe.prototype={constructor:pe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(ho=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,V):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,i=this.options,l=i.preventOnFilter,c=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,v=i.filter;if(lC(o),!V&&!(/mousedown|pointerdown/.test(c)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&ri&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=dn(h,i.draggable,o,!1),!(h&&h.animated)&&As!==h)){if(uo=en(h),si=en(h,i.draggable),typeof v=="function"){if(v.call(this,e,h,this)){_t({sortable:t,rootEl:g,name:"filter",targetEl:h,toEl:o,fromEl:o}),Dt("filter",t,{evt:e}),l&&e.preventDefault();return}}else if(v&&(v=v.split(",").some(function(y){if(y=dn(g,y.trim(),o,!1),y)return _t({sortable:t,rootEl:y,name:"filter",targetEl:h,fromEl:o,toEl:o}),Dt("filter",t,{evt:e}),!0}),v)){l&&e.preventDefault();return}i.handle&&!dn(g,i.handle,o,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,t,o){var i=this,l=i.el,c=i.options,d=l.ownerDocument,h;if(o&&!V&&o.parentNode===l){var g=at(o);if(Ge=l,V=o,Je=V.parentNode,Rr=V.nextSibling,As=o,Is=c.group,pe.dragged=V,Nr={target:V,clientX:(t||e).clientX,clientY:(t||e).clientY},Ky=Nr.clientX-g.left,Vy=Nr.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,V.style["will-change"]="all",h=function(){if(Dt("delayEnded",i,{evt:e}),pe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Oy&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(e,t),_t({sortable:i,name:"choose",originalEvent:e}),Ut(V,c.chosenClass,!0)},c.ignore.split(",").forEach(function(v){Fy(V,v.trim(),Hd)}),Ie(d,"dragover",Or),Ie(d,"mousemove",Or),Ie(d,"touchmove",Or),c.supportPointer?(Ie(d,"pointerup",i._onDrop),!this.nativeDraggable&&Ie(d,"pointercancel",i._onDrop)):(Ie(d,"mouseup",i._onDrop),Ie(d,"touchend",i._onDrop),Ie(d,"touchcancel",i._onDrop)),Oy&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),Dt("delayStart",this,{evt:e}),c.delay&&(!c.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(ni||zn))){if(pe.eventCanceled){this._onDrop();return}c.supportPointer?(Ie(d,"pointerup",i._disableDelayedDrag),Ie(d,"pointercancel",i._disableDelayedDrag)):(Ie(d,"mouseup",i._disableDelayedDrag),Ie(d,"touchend",i._disableDelayedDrag),Ie(d,"touchcancel",i._disableDelayedDrag)),Ie(d,"mousemove",i._delayedDragTouchMoveHandler),Ie(d,"touchmove",i._delayedDragTouchMoveHandler),c.supportPointer&&Ie(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(h,c.delay)}else h()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){V&&Hd(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"pointerup",this._disableDelayedDrag),Ce(e,"pointercancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Ie(document,"pointermove",this._onTouchMove):t?Ie(document,"touchmove",this._onTouchMove):Ie(document,"mousemove",this._onTouchMove):(Ie(V,"dragend",this),Ie(Ge,"dragstart",this._onDragStart));try{document.selection?Fs(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(e,t){if(fo=!1,Ge&&V){Dt("dragStarted",this,{evt:t}),this.nativeDraggable&&Ie(document,"dragover",eC);var o=this.options;!e&&Ut(V,o.dragClass,!1),Ut(V,o.ghostClass,!0),pe.active=this,e&&this._appendGhost(),_t({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(fn){this._lastX=fn.clientX,this._lastY=fn.clientY,Qy();for(var e=document.elementFromPoint(fn.clientX,fn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(fn.clientX,fn.clientY),e!==t);)t=e;if(V.parentNode[Lt]._isOutsideThisEl(e),t)do{if(t[Lt]){var o=void 0;if(o=t[Lt]._onDragOver({clientX:fn.clientX,clientY:fn.clientY,target:e,rootEl:t}),o&&!this.options.dragoverBubble)break}e=t}while(t=Py(t));Zy()}},_onTouchMove:function(e){if(Nr){var t=this.options,o=t.fallbackTolerance,i=t.fallbackOffset,l=e.touches?e.touches[0]:e,c=ve&&ao(ve,!0),d=ve&&c&&c.a,h=ve&&c&&c.d,g=Ps&&xt&&Hy(xt),v=(l.clientX-Nr.clientX+i.x)/(d||1)+(g?g[0]-Fd[0]:0)/(d||1),y=(l.clientY-Nr.clientY+i.y)/(h||1)+(g?g[1]-Fd[1]:0)/(h||1);if(!pe.active&&!fo){if(o&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(ve){c?(c.e+=v-(Pd||0),c.f+=y-(Md||0)):c={a:1,b:0,c:0,d:1,e:v,f:y};var b="matrix(".concat(c.a,",").concat(c.b,",").concat(c.c,",").concat(c.d,",").concat(c.e,",").concat(c.f,")");he(ve,"webkitTransform",b),he(ve,"mozTransform",b),he(ve,"msTransform",b),he(ve,"transform",b),Pd=v,Md=y,fn=l}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ve){var e=this.options.fallbackOnBody?document.body:Ge,t=at(V,!0,Ps,!0,e),o=this.options;if(Ps){for(xt=e;he(xt,"position")==="static"&&he(xt,"transform")==="none"&&xt!==document;)xt=xt.parentNode;xt!==document.body&&xt!==document.documentElement?(xt===document&&(xt=Cn()),t.top+=xt.scrollTop,t.left+=xt.scrollLeft):xt=Cn(),Fd=Hy(xt)}ve=V.cloneNode(!0),Ut(ve,o.ghostClass,!1),Ut(ve,o.fallbackClass,!0),Ut(ve,o.dragClass,!0),he(ve,"transition",""),he(ve,"transform",""),he(ve,"box-sizing","border-box"),he(ve,"margin",0),he(ve,"top",t.top),he(ve,"left",t.left),he(ve,"width",t.width),he(ve,"height",t.height),he(ve,"opacity","0.8"),he(ve,"position",Ps?"absolute":"fixed"),he(ve,"zIndex","100000"),he(ve,"pointerEvents","none"),pe.ghost=ve,e.appendChild(ve),he(ve,"transform-origin",Ky/parseInt(ve.style.width)*100+"% "+Vy/parseInt(ve.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,i=e.dataTransfer,l=o.options;if(Dt("dragStart",this,{evt:e}),pe.eventCanceled){this._onDrop();return}Dt("setupClone",this),pe.eventCanceled||(Ye=Uy(V),Ye.removeAttribute("id"),Ye.draggable=!1,Ye.style["will-change"]="",this._hideClone(),Ut(Ye,this.options.chosenClass,!1),pe.clone=Ye),o.cloneId=Fs(function(){Dt("clone",o),!pe.eventCanceled&&(o.options.removeCloneOnHide||Ge.insertBefore(Ye,V),o._hideClone(),_t({sortable:o,name:"clone"}))}),!t&&Ut(V,l.dragClass,!0),t?(_s=!0,o._loopId=setInterval(o._emulateDragOver,50)):(Ce(document,"mouseup",o._onDrop),Ce(document,"touchend",o._onDrop),Ce(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",l.setData&&l.setData.call(o,i,V)),Ie(document,"drop",o),he(V,"transform","translateZ(0)")),fo=!0,o._dragStartId=Fs(o._dragStarted.bind(o,t,e)),Ie(document,"selectstart",o),ai=!0,window.getSelection().removeAllRanges(),ri&&he(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,o=e.target,i,l,c,d=this.options,h=d.group,g=pe.active,v=Is===h,y=d.sort,b=bt||g,x,w=this,T=!1;if(zd)return;function S(D,le){Dt(D,w,Sn({evt:e,isOwner:v,axis:x?"vertical":"horizontal",revert:c,dragRect:i,targetRect:l,canSort:y,fromSortable:b,target:o,completed:L,onMove:function(A,P){return Ms(Ge,t,V,i,A,at(A),e,P)},changed:U},le))}function O(){S("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function L(D){return S("dragOverCompleted",{insertion:D}),D&&(v?g._hideClone():g._showClone(w),w!==b&&(Ut(V,bt?bt.options.ghostClass:g.options.ghostClass,!1),Ut(V,d.ghostClass,!0)),bt!==w&&w!==pe.active?bt=w:w===pe.active&&bt&&(bt=null),b===w&&(w._ignoreWhileAnimating=o),w.animateAll(function(){S("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(o===V&&!V.animated||o===t&&!o.animated)&&(ho=null),!d.dragoverBubble&&!e.rootEl&&o!==document&&(V.parentNode[Lt]._isOutsideThisEl(e.target),!D&&Or(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),T=!0}function U(){Wt=en(V),Jn=en(V,d.draggable),_t({sortable:w,name:"change",toEl:t,newIndex:Wt,newDraggableIndex:Jn,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=dn(o,d.draggable,t,!0),S("dragOver"),pe.eventCanceled)return T;if(V.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||w._ignoreWhileAnimating===o)return L(!1);if(_s=!1,g&&!d.disabled&&(v?y||(c=Je!==Ge):bt===this||(this.lastPutMode=Is.checkPull(this,g,V,e))&&h.checkPut(this,g,V,e))){if(x=this._getDirection(e,o)==="vertical",i=at(V),S("dragOverValid"),pe.eventCanceled)return T;if(c)return Je=Ge,O(),this._hideClone(),S("revert"),pe.eventCanceled||(Rr?Ge.insertBefore(V,Rr):Ge.appendChild(V)),L(!0);var H=Od(t,d.draggable);if(!H||oC(e,x,this)&&!H.animated){if(H===V)return L(!1);if(H&&t===e.target&&(o=H),o&&(l=at(o)),Ms(Ge,t,V,i,o,l,e,!!o)!==!1)return O(),H&&H.nextSibling?t.insertBefore(V,H.nextSibling):t.appendChild(V),Je=t,U(),L(!0)}else if(H&&rC(e,x,this)){var X=lo(t,0,d,!0);if(X===V)return L(!1);if(o=X,l=at(o),Ms(Ge,t,V,i,o,l,e,!1)!==!1)return O(),t.insertBefore(V,X),Je=t,U(),L(!0)}else if(o.parentNode===t){l=at(o);var q=0,W,F=V.parentNode!==t,ne=!ZS(V.animated&&V.toRect||i,o.animated&&o.toRect||l,x),ce=x?"top":"left",Q=zy(o,"top","top")||zy(V,"top","top"),ye=Q?Q.scrollTop:void 0;ho!==o&&(W=l[ce],ci=!1,Ns=!ne&&d.invertSwap||F),q=iC(e,o,l,x,ne?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Ns,ho===o);var Z;if(q!==0){var we=en(V);do we-=q,Z=Je.children[we];while(Z&&(he(Z,"display")==="none"||Z===ve))}if(q===0||Z===o)return L(!1);ho=o,li=q;var Oe=o.nextElementSibling,xe=!1;xe=q===1;var _e=Ms(Ge,t,V,i,o,l,e,xe);if(_e!==!1)return(_e===1||_e===-1)&&(xe=_e===1),zd=!0,setTimeout(nC,30),O(),xe&&!Oe?t.appendChild(V):o.parentNode.insertBefore(V,xe?Oe:o),Q&&qy(Q,0,ye-Q.scrollTop),Je=V.parentNode,W!==void 0&&!Ns&&(Os=Math.abs(W-at(o)[ce])),U(),L(!0)}if(t.contains(V))return L(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",Or),Ce(document,"mousemove",Or),Ce(document,"touchmove",Or)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"pointercancel",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;if(Wt=en(V),Jn=en(V,o.draggable),Dt("drop",this,{evt:e}),Je=V&&V.parentNode,Wt=en(V),Jn=en(V,o.draggable),pe.eventCanceled){this._nulling();return}fo=!1,Ns=!1,ci=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),jd(this.cloneId),jd(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ri&&he(document.body,"user-select",""),he(V,"transform",""),e&&(ai&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),ve&&ve.parentNode&&ve.parentNode.removeChild(ve),(Ge===Je||bt&&bt.lastPutMode!=="clone")&&Ye&&Ye.parentNode&&Ye.parentNode.removeChild(Ye),V&&(this.nativeDraggable&&Ce(V,"dragend",this),Hd(V),V.style["will-change"]="",ai&&!fo&&Ut(V,bt?bt.options.ghostClass:this.options.ghostClass,!1),Ut(V,this.options.chosenClass,!1),_t({sortable:this,name:"unchoose",toEl:Je,newIndex:null,newDraggableIndex:null,originalEvent:e}),Ge!==Je?(Wt>=0&&(_t({rootEl:Je,name:"add",toEl:Je,fromEl:Ge,originalEvent:e}),_t({sortable:this,name:"remove",toEl:Je,originalEvent:e}),_t({rootEl:Je,name:"sort",toEl:Je,fromEl:Ge,originalEvent:e}),_t({sortable:this,name:"sort",toEl:Je,originalEvent:e})),bt&&bt.save()):Wt!==uo&&Wt>=0&&(_t({sortable:this,name:"update",toEl:Je,originalEvent:e}),_t({sortable:this,name:"sort",toEl:Je,originalEvent:e})),pe.active&&((Wt==null||Wt===-1)&&(Wt=uo,Jn=si),_t({sortable:this,name:"end",toEl:Je,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Dt("nulling",this),Ge=V=Je=ve=Rr=Ye=As=Zn=Nr=fn=ai=Wt=Jn=uo=si=ho=li=bt=Is=pe.dragged=pe.ghost=pe.clone=pe.active=null,Ls.forEach(function(e){e.checked=!0}),Ls.length=Pd=Md=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":V&&(this._onDragOver(e),tC(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,o=this.el.children,i=0,l=o.length,c=this.options;i<l;i++)t=o[i],dn(t,c.draggable,this.el,!1)&&e.push(t.getAttribute(c.dataIdAttr)||aC(t));return e},sort:function(e,t){var o={},i=this.el;this.toArray().forEach(function(l,c){var d=i.children[c];dn(d,this.options.draggable,i,!1)&&(o[l]=d)},this),t&&this.captureAnimationState(),e.forEach(function(l){o[l]&&(i.removeChild(o[l]),i.appendChild(o[l]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return dn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(t===void 0)return o[e];var i=ii.modifyOption(this,e,t);typeof i!="undefined"?o[e]=i:o[e]=t,e==="group"&&Yy(o)},destroy:function(){Dt("destroy",this);var e=this.el;e[Lt]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Rs.splice(Rs.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Zn){if(Dt("hideClone",this),pe.eventCanceled)return;he(Ye,"display","none"),this.options.removeCloneOnHide&&Ye.parentNode&&Ye.parentNode.removeChild(Ye),Zn=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Zn){if(Dt("showClone",this),pe.eventCanceled)return;V.parentNode==Ge&&!this.options.group.revertClone?Ge.insertBefore(Ye,V):Rr?Ge.insertBefore(Ye,Rr):Ge.appendChild(Ye),this.options.group.revertClone&&this.animate(V,Ye),he(Ye,"display",""),Zn=!1}}};function tC(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.cancelable&&a.preventDefault()}function Ms(a,e,t,o,i,l,c,d){var h,g=a[Lt],v=g.options.onMove,y;return window.CustomEvent&&!zn&&!ni?h=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent("move",!0,!0)),h.to=e,h.from=a,h.dragged=t,h.draggedRect=o,h.related=i||e,h.relatedRect=l||at(e),h.willInsertAfter=d,h.originalEvent=c,a.dispatchEvent(h),v&&(y=v.call(g,h,c)),y}function Hd(a){a.draggable=!1}function nC(){zd=!1}function rC(a,e,t){var o=at(lo(t.el,0,t.options,!0)),i=Wy(t.el,t.options,ve),l=10;return e?a.clientX<i.left-l||a.clientY<o.top&&a.clientX<o.right:a.clientY<i.top-l||a.clientY<o.bottom&&a.clientX<o.left}function oC(a,e,t){var o=at(Od(t.el,t.options.draggable)),i=Wy(t.el,t.options,ve),l=10;return e?a.clientX>i.right+l||a.clientY>o.bottom&&a.clientX>o.left:a.clientY>i.bottom+l||a.clientX>o.right&&a.clientY>o.top}function iC(a,e,t,o,i,l,c,d){var h=o?a.clientY:a.clientX,g=o?t.height:t.width,v=o?t.top:t.left,y=o?t.bottom:t.right,b=!1;if(!c){if(d&&Os<g*i){if(!ci&&(li===1?h>v+g*l/2:h<y-g*l/2)&&(ci=!0),ci)b=!0;else if(li===1?h<v+Os:h>y-Os)return-li}else if(h>v+g*(1-i)/2&&h<y-g*(1-i)/2)return sC(e)}return b=b||c,b&&(h<v+g*l/2||h>y-g*l/2)?h>v+g/2?1:-1:0}function sC(a){return en(V)<en(a)?1:-1}function aC(a){for(var e=a.tagName+a.className+a.src+a.href+a.textContent,t=e.length,o=0;t--;)o+=e.charCodeAt(t);return o.toString(36)}function lC(a){Ls.length=0;for(var e=a.getElementsByTagName("input"),t=e.length;t--;){var o=e[t];o.checked&&Ls.push(o)}}function Fs(a){return setTimeout(a,0)}function jd(a){return clearTimeout(a)}Ds&&Ie(document,"touchmove",function(a){(pe.active||fo)&&a.cancelable&&a.preventDefault()}),pe.utils={on:Ie,off:Ce,css:he,find:Fy,is:function(e,t){return!!dn(e,t,e,!1)},extend:WS,throttle:jy,closest:dn,toggleClass:Ut,clone:Uy,index:en,nextTick:Fs,cancelNextTick:jd,detectDirection:Xy,getChild:lo,expando:Lt},pe.get=function(a){return a[Lt]},pe.mount=function(){for(var a=arguments.length,e=new Array(a),t=0;t<a;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(pe.utils=Sn(Sn({},pe.utils),o.utils)),ii.mount(o)})},pe.create=function(a,e){return new pe(a,e)},pe.version=qS;var lt=[],ui,qd,Ud=!1,Wd,Kd,zs,di;function cC(){function a(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return a.prototype={dragStarted:function(t){var o=t.originalEvent;this.sortable.nativeDraggable?Ie(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ie(document,"pointermove",this._handleFallbackAutoScroll):o.touches?Ie(document,"touchmove",this._handleFallbackAutoScroll):Ie(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var o=t.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),Jy(),Hs(),KS()},nulling:function(){zs=qd=ui=Ud=di=Wd=Kd=null,lt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,o){var i=this,l=(t.touches?t.touches[0]:t).clientX,c=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(l,c);if(zs=t,o||this.options.forceAutoScrollFallback||ni||zn||ri){Vd(t,this.options,d,o);var h=Qn(d,!0);Ud&&(!di||l!==Wd||c!==Kd)&&(di&&Jy(),di=setInterval(function(){var g=Qn(document.elementFromPoint(l,c),!0);g!==h&&(h=g,Hs()),Vd(t,i.options,g,o)},10),Wd=l,Kd=c)}else{if(!this.options.bubbleScroll||Qn(d,!0)===Cn()){Hs();return}Vd(t,this.options,Qn(d,!1),!1)}}},Mn(a,{pluginName:"scroll",initializeByDefault:!0})}function Hs(){lt.forEach(function(a){clearInterval(a.pid)}),lt=[]}function Jy(){clearInterval(di)}var Vd=jy(function(a,e,t,o){if(e.scroll){var i=(a.touches?a.touches[0]:a).clientX,l=(a.touches?a.touches[0]:a).clientY,c=e.scrollSensitivity,d=e.scrollSpeed,h=Cn(),g=!1,v;qd!==t&&(qd=t,Hs(),ui=e.scroll,v=e.scrollFn,ui===!0&&(ui=Qn(t,!0)));var y=0,b=ui;do{var x=b,w=at(x),T=w.top,S=w.bottom,O=w.left,L=w.right,U=w.width,H=w.height,X=void 0,q=void 0,W=x.scrollWidth,F=x.scrollHeight,ne=he(x),ce=x.scrollLeft,Q=x.scrollTop;x===h?(X=U<W&&(ne.overflowX==="auto"||ne.overflowX==="scroll"||ne.overflowX==="visible"),q=H<F&&(ne.overflowY==="auto"||ne.overflowY==="scroll"||ne.overflowY==="visible")):(X=U<W&&(ne.overflowX==="auto"||ne.overflowX==="scroll"),q=H<F&&(ne.overflowY==="auto"||ne.overflowY==="scroll"));var ye=X&&(Math.abs(L-i)<=c&&ce+U<W)-(Math.abs(O-i)<=c&&!!ce),Z=q&&(Math.abs(S-l)<=c&&Q+H<F)-(Math.abs(T-l)<=c&&!!Q);if(!lt[y])for(var we=0;we<=y;we++)lt[we]||(lt[we]={});(lt[y].vx!=ye||lt[y].vy!=Z||lt[y].el!==x)&&(lt[y].el=x,lt[y].vx=ye,lt[y].vy=Z,clearInterval(lt[y].pid),(ye!=0||Z!=0)&&(g=!0,lt[y].pid=setInterval(function(){o&&this.layer===0&&pe.active._onTouchMove(zs);var Oe=lt[this.layer].vy?lt[this.layer].vy*d:0,xe=lt[this.layer].vx?lt[this.layer].vx*d:0;typeof v=="function"&&v.call(pe.dragged.parentNode[Lt],xe,Oe,a,zs,lt[this.layer].el)!=="continue"||qy(lt[this.layer].el,xe,Oe)}.bind({layer:y}),24))),y++}while(e.bubbleScroll&&b!==h&&(b=Qn(b,!1)));Ud=g}},30),eb=function(e){var t=e.originalEvent,o=e.putSortable,i=e.dragEl,l=e.activeSortable,c=e.dispatchSortableEvent,d=e.hideGhostForTarget,h=e.unhideGhostForTarget;if(t){var g=o||l;d();var v=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,y=document.elementFromPoint(v.clientX,v.clientY);h(),g&&!g.el.contains(y)&&(c("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function $d(){}$d.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=lo(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:eb},Mn($d,{pluginName:"revertOnSpill"});function Gd(){}Gd.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable,i=o||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:eb},Mn(Gd,{pluginName:"removeOnSpill"}),pe.mount(new cC),pe.mount(Gd,$d);const tb="block-removed",uC="block-added",dC="block-moved",nb="block-changed";class rb{constructor(){this.tail=Promise.resolve()}get completed(){return this.failure?Promise.reject(this.failure):this.tail}add(e){if(this.failure)return Promise.reject(this.failure);const t=this.tail.then(()=>e());return this.tail=t.catch(o=>{this.failure=o}),t}}class fC extends Se{constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null,this.sortable=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this.blocksStore[0]}get lastBlock(){return this.blocksStore[this.blocksStore.length-1]}get currentBlock(){return this.blocksStore[this.currentBlockIndex]}set currentBlock(e){if(e===void 0){this.unsetCurrentBlock();return}this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){if(this.currentBlockIndex===this.blocksStore.length-1)return null;const t=this.blocksStore[this.currentBlockIndex+1];return t!=null?t:null}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find(t=>!!t.inputs.length)}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find(t=>!!t.inputs.length)}get previousBlock(){if(this.currentBlockIndex===0)return null;const t=this.blocksStore[this.currentBlockIndex-1];return t!=null?t:null}get blocks(){return this.blocksStore.array}get isBlokEmpty(){return this.blocks.every(e=>e.isEmpty)}prepare(){const e=new Rd(this.Blok.UI.nodes.redactor);this._blocks=new Proxy(e,{set:Rd.set,get:Rd.get}),this.listeners.on(document,"copy",t=>{this.Blok.BlockEvents.handleCommandC(t)}),this.sortable=new pe(this.Blok.UI.nodes.redactor,{animation:150,forceFallback:!0,handle:Ux,onStart:()=>{this.Blok.UI.nodes.wrapper.setAttribute(Kv,"true"),Qo(!0)},onEnd:t=>{this.Blok.UI.nodes.wrapper.removeAttribute(Kv),!(t.newIndex===void 0||t.oldIndex===void 0)&&this.move(t.newIndex,t.oldIndex,!0)}})}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:o=void 0,tunes:i={}}){const l=this.Blok.ReadOnly.isEnabled,c=this.Blok.Tools.blockTools.get(e);if(c===void 0)throw new Error(`Could not compose Block. Tool «${e}» not found.`);const d=new Yo({id:o,data:t,tool:c,api:this.Blok.API,readOnly:l,tunesData:i},this.eventsDispatcher);return l||window.requestIdleCallback(()=>{this.bindBlockEvents(d)},{timeout:2e3}),d}insert({id:e=void 0,tool:t,data:o,index:i,needToFocus:l=!0,replace:c=!1,tunes:d}={}){const h=i!=null?i:this.currentBlockIndex+(c?0:1),g=t!=null?t:this.config.defaultBlock;if(g===void 0)throw new Error("Could not insert Block. Tool name is not specified.");const v={tool:g};e!==void 0&&(v.id=e),o!==void 0&&(v.data=o),d!==void 0&&(v.tunes=d);const y=this.composeBlock(v),b=c?this.getBlockByIndex(h):void 0;if(c&&b===void 0)throw new Error(`Could not replace Block at index ${h}. Block not found.`);return c&&b!==void 0&&this.blockDidMutated(tb,b,{index:h}),this.blocksStore.insert(h,y,c),this.blockDidMutated(uC,y,{index:h}),l&&(this.currentBlockIndex=h),!l&&h<=this.currentBlockIndex&&this.currentBlockIndex++,y}insertMany(e,t=0){this.blocksStore.insertMany(e,t)}async update(e,t,o){if(!t&&!o)return e;const i=await e.data,l=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},i,t!=null?t:{}),tunes:o!=null?o:e.tunes}),c=this.getBlockIndex(e);return this.blocksStore.replace(c,l),this.blockDidMutated(nb,l,{index:c}),l}replace(e,t,o){const i=this.getBlockIndex(e);return this.insert({tool:t,data:o,index:i,replace:!0})}get blocksStore(){if(this._blocks===null)throw new Error("BlockManager: blocks store is not initialized. Call prepare() before accessing blocks.");return this._blocks}async paste(e,t,o=!1){const i=this.insert({tool:e,replace:o});try{await i.ready,i.call(Dn.ON_PASTE,t),i.refreshToolRootElement()}catch(l){Be(`${e}: onPaste callback call is failed`,"error",l)}return i}insertDefaultBlockAtIndex(e,t=!1){const o=this.config.defaultBlock;if(o===void 0)throw new Error("Could not insert default Block. Default block tool is not defined in the configuration.");return this.insert({tool:o,index:e,needToFocus:t})}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){const o=async c=>{await e.mergeWith(c),await this.removeBlock(t),this.currentBlockIndex=this.blocksStore.indexOf(e)},i=e.name===t.name&&e.mergeable,l=i?await t.data:void 0;if(i&&ot(l)){console.error("Could not merge Block. Failed to extract original Block data.");return}if(i&&l!==void 0){const[c]=od([{data:l,tool:t.name}],e.tool.sanitizeConfig,this.config.sanitizer);await o(c.data);return}if(e.mergeable&&ps(t,"export")&&ps(e,"import")){const c=await t.exportDataAsString(),d=Tn(c,e.tool.sanitizeConfig),h=Jv(d,e.tool.conversionConfig);await o(h)}}removeBlock(e,t=!0){return new Promise(o=>{const i=this.blocksStore.indexOf(e);if(!this.validateIndex(i))throw new Error("Can't find a Block to remove");this.blocksStore.remove(i),e.destroy(),this.blockDidMutated(tb,e,{index:i}),this.currentBlockIndex>=i&&this.currentBlockIndex--;const l=this.blocks.length===0;l&&this.unsetCurrentBlock(),l&&t&&this.insert(),!l&&i===0&&(this.currentBlockIndex=0),o()})}removeSelectedBlocks(){const e=this.blocks.map((t,o)=>({block:t,index:o})).filter(({block:t})=>t.selected).sort((t,o)=>o.index-t.index);return e.forEach(({block:t})=>{this.removeBlock(t,!1)}),e.length>0?e[e.length-1].index:void 0}removeAllBlocks(){const e=i=>{i<0||(this.blocksStore.remove(i),e(i-1))};e(this.blocksStore.length-1),this.unsetCurrentBlock(),this.insert();const t=this.currentBlock,o=t==null?void 0:t.firstInput;o!==void 0&&o.focus()}split(){const e=this.Blok.Caret.extractFragmentFromCaretPosition(),t=N.make("div");t.appendChild(e);const o={text:N.isEmpty(t)?"":t.innerHTML};return this.insert({data:o})}getBlockByIndex(e){const t=e===-1?this.blocksStore.length-1:e;return this.blocksStore[t]}getBlockIndex(e){return this.blocksStore.indexOf(e)}getBlockById(e){return this.blocksStore.array.find(t=>t.id===e)}getBlock(e){const t=N.isElement(e)?e:e.parentNode;if(!t)return;const o=this.blocksStore.nodes,i=t.closest(Gu);if(!i)return;const l=o.indexOf(i);if(l>=0)return this.blocksStore[l]}setCurrentBlockByChildNode(e){const t=N.isElement(e)?e:e.parentNode;if(!t)return;const o=t.closest(Gu);if(!o)return;const i=o.closest(qt);if(!(i==null?void 0:i.isEqualNode(this.Blok.UI.nodes.wrapper))||!(o instanceof HTMLElement))return;this.currentBlockIndex=this.blocksStore.nodes.indexOf(o);const c=this.currentBlock;return c==null||c.updateCurrentInput(),c}getBlockByChildNode(e){if(!(e instanceof Node))return;const t=N.isElement(e)?e:e.parentNode;if(!t)return;const o=t.closest(Gu);if(o)return this.blocks.find(i=>i.holder===o)}move(e,t=this.currentBlockIndex,o=!1){if(isNaN(e)||isNaN(t)){Be("Warning during 'move' call: incorrect indices provided.","warn");return}if(!this.validateIndex(e)||!this.validateIndex(t)){Be("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn");return}this.blocksStore.move(e,t,o),this.currentBlockIndex=e;const i=this.currentBlock;if(i===void 0)throw new Error(`Could not move Block. Block at index ${e} is not available.`);this.blockDidMutated(dC,i,{fromIndex:t,toIndex:e})}async convert(e,t,o){const i=await e.save();if(!i||i.data===void 0)throw new Error("Could not convert Block. Failed to extract original Block data.");const l=this.Blok.Tools.blockTools.get(t);if(!l)throw new Error(`Could not convert Block. Tool «${t}» not found.`);const c=await e.exportDataAsString(),d=Tn(c,ld(this.config.sanitizer,l.sanitizeConfig)),h=Jv(d,l.conversionConfig,l.settings),g=o?Object.assign(h,o):h;return this.replace(e,l.name,g)}unsetCurrentBlock(){this.currentBlockIndex=-1}async clear(e=!1){const t=new rb;[...this.blocks].forEach(i=>{t.add(async()=>{await this.removeBlock(i,!1)})}),await t.completed,this.unsetCurrentBlock(),e&&this.insert(),this.Blok.UI.checkEmptiness()}async destroy(){this.sortable&&(this.sortable.destroy(),this.sortable=null),await Promise.all(this.blocks.map(e=>e.destroy()))}bindBlockEvents(e){const{BlockEvents:t}=this.Blok;this.readOnlyMutableListeners.on(e.holder,"keydown",o=>{o instanceof KeyboardEvent&&t.keydown(o)}),this.readOnlyMutableListeners.on(e.holder,"keyup",o=>{o instanceof KeyboardEvent&&t.keyup(o)}),e.on("didMutated",o=>this.blockDidMutated(nb,o,{index:this.getBlockIndex(o)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",e=>{this.Blok.BlockEvents.handleCommandX(e)}),this.blocks.forEach(e=>{this.bindBlockEvents(e)})}validateIndex(e){return!(e<0||e>=this.blocksStore.length)}blockDidMutated(e,t,o){const i=be({target:new On(t)},o),l=new CustomEvent(e,{detail:be({},i)});return Object.prototype.propertyIsEnumerable.call(l,"type")||Object.defineProperty(l,"type",{value:e,enumerable:!0,configurable:!0}),Object.prototype.propertyIsEnumerable.call(l,"detail")||Object.defineProperty(l,"detail",{value:i,enumerable:!0,configurable:!0}),this.eventsDispatcher.emit($v,{event:l}),t}}class hC extends Se{constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1,this.selection=new se}get sanitizerConfig(){const e={p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}};return ld(this.config.sanitizer,e)}get allBlocksSelected(){const{BlockManager:e}=this.Blok;return e.blocks.every(t=>t.selected===!0)}set allBlocksSelected(e){const{BlockManager:t}=this.Blok;for(const o of t.blocks)o.selected=e;this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Blok;return this.anyBlockSelectedCache===null&&(this.anyBlockSelectedCache=e.blocks.some(t=>t.selected===!0)),this.anyBlockSelectedCache}get selectedBlocks(){return this.Blok.BlockManager.blocks.filter(e=>e.selected)}prepare(){this.selection=new se,io.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:o}=this.Blok;if(o.isEnabled){e.preventDefault(),this.selectAllBlocks();return}t.currentBlock&&this.handleCommandA(e)},on:this.Blok.UI.nodes.redactor})}toggleReadOnly(){const e=se.get();e==null||e.removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Blok,o=typeof e=="number"?t.getBlockByIndex(e):t.currentBlock;o&&(o.selected=!1,this.clearCache())}clearSelection(e,t=!1){const{RectangleSelection:o}=this.Blok;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const i=e&&e instanceof KeyboardEvent,l=e,c=i&&l.key&&l.key.length===1;if(this.anyBlockSelected&&i&&c&&!se.isSelectionExists&&this.replaceSelectedBlocksWithPrintableKey(e),this.Blok.CrossBlockSelection.clear(e),t&&this.selection.restore(),!this.anyBlockSelected||o.isRectActivated()){this.Blok.RectangleSelection.clearSelection();return}this.allBlocksSelected=!1}async copySelectedBlocks(e){e.preventDefault();const t=e.clipboardData;if(!t)return;const o=N.make("div"),i=[];this.selectedBlocks.forEach(d=>{var x;const h=Tn(d.holder.innerHTML,this.sanitizerConfig),g=N.make("div");g.innerHTML=h;const v=(x=g.textContent)!=null?x:"";if(i.push(v),!Array.from(g.childNodes).some(w=>w.nodeType===Node.ELEMENT_NODE)&&v.trim().length>0){const w=N.make("p");w.innerHTML=g.innerHTML,o.appendChild(w)}else for(;g.firstChild;)o.appendChild(g.firstChild)});const l=i.join(`
179
+ `,this.nodes.reactRoot=e}appendContainer(){var i;const{UI:e}=this.Blok;if(!((i=e==null?void 0:e.nodes)!=null&&i.wrapper)){console.warn("[ReactAdapter] UI module not ready, cannot append React container");return}const t=e.nodes.holder;if(!t||t.contains(this.nodes.reactRoot))return;window.getComputedStyle(t).position==="static"&&(t.style.position="relative"),t.appendChild(this.nodes.reactRoot)}initializeRoot(){this.nodes.reactRoot||this.createReactContainer(),this.appendContainer(),this.root=so.createRoot(this.nodes.reactRoot),this.isMounted=!0}performRender(){if(!this.root)return;const e=bs.createElement(FE,{modules:this.getModulesWithSelf(),config:this.config,eventsDispatcher:this.eventsDispatcher},this.currentComponent);this.root.render(e)}}const Id=" ",Rd=new WeakSet,_d=()=>{var c,d;const a=window.getSelection();if(a===null)return[null,0];const e=a.focusNode,t=a.focusOffset;if(e===null)return[null,0];if(e.nodeType===Node.TEXT_NODE||e.childNodes.length===0)return[e,t];const r=e.childNodes[t];if(r!==void 0)return[r,0];const i=(c=e.childNodes[t-1])!=null?c:null,l=(d=i==null?void 0:i.textContent)!=null?d:null;return[i,l!==null?l.length:0]},Ry=a=>{var t;if(!(a instanceof HTMLElement)||L.isSingleTag(a)||L.isNativeInput(a))return!1;if(a.childNodes.length===0)return!0;const e=(t=a.textContent)!=null?t:"";return e.includes(Id)||!Uu(e)?!1:Array.from(a.children).every(r=>Ry(r))},_y=typeof window!="undefined"&&typeof window.MutationObserver!="undefined"?new window.MutationObserver(a=>{for(const e of a){const t=e.nextSibling;e.removedNodes.forEach(r=>{var h,g,m;if(!(r instanceof Element)||!Ry(r))return;const i=t instanceof Text?t:null;if(i===null||!i.isConnected)return;const l=i.parentElement;if(!((h=l==null?void 0:l.isContentEditable)!=null&&h))return;const c=(m=(g=i.textContent)==null?void 0:g[0])!=null?m:null;(c===Id||c===" ")&&Rd.add(i)})}}):null,Ny=new WeakSet,Oy=a=>{if(_y===null||Ny.has(a))return;const e=()=>{a.body!==null&&(_y.observe(a.body,{childList:!0,subtree:!0}),Ny.add(a))};a.readyState==="loading"?a.addEventListener("DOMContentLoaded",e,{once:!0}):e()};typeof window!="undefined"&&typeof window.document!="undefined"&&Oy(window.document);const zE=a=>{var i,l;Oy(a.ownerDocument);const[e,t]=_d();if(e===null||!a.contains(e)||e.nodeType===Node.TEXT_NODE&&t<((i=e.textContent)!=null?i:"").length)return null;const r=document.createTreeWalker(a,NodeFilter.SHOW_TEXT);for(r.currentNode=e;;){const c=r.nextNode();if(c===null)return null;const d=(l=c.textContent)!=null?l:"";if(d.length===0)continue;const h=d[0];if(!(h===Id||h===" ")||c===e)return null;const m=document.createRange();try{m.setStart(e,t),m.setEnd(c,0)}catch(x){return null}const y=m.cloneContents(),b=document.createElement("div");b.appendChild(y);const T=Array.from(b.querySelectorAll("*")).some(x=>{var R;const S=(R=x.textContent)!=null?R:"";return S.length===0||Uu(S)}),k=Rd.has(c);if(!(!T&&!k))return k&&Rd.delete(c),{node:c,offset:0}}},Ly=(a,e,t,r)=>{const i=document.createRange();r==="left"?(i.selectNodeContents(a),i.setEnd(e,t)):(i.selectNodeContents(a),i.setStart(e,t));const l=i.cloneContents(),c=document.createElement("div");c.appendChild(l);const d=c.textContent||"";if(c.querySelectorAll("img, br, hr, input, area, base, col, embed, link, meta, param, source, track, wbr").length>0)return!1;const g=d.includes(" ")||c.innerHTML.includes("&nbsp;")||i.toString().includes(" "),m=e.nodeType===Node.TEXT_NODE&&(r==="left"?(e.textContent||"").slice(0,t):(e.textContent||"").slice(t)).includes(" ");if(g||m)return!1;c.style.position="absolute",c.style.visibility="hidden",c.style.height="auto",c.style.width="auto",c.style.whiteSpace=window.getComputedStyle(a).whiteSpace,document.body.appendChild(c);const y=c.getBoundingClientRect().width;return document.body.removeChild(c),!(y>0||!Uu(d)||window.getComputedStyle(a).whiteSpace.startsWith("pre")&&d.length>0)},Ss=a=>{var c;const e=L.getDeepestNode(a);if(e===null||L.isEmpty(a))return!0;if(L.isNativeInput(e))return e.selectionEnd===0;if(L.isEmpty(a))return!0;const[t,r]=_d();if(t===null)return!1;const i=window.getSelection(),l=(c=i==null?void 0:i.focusNode)!=null?c:null;return l!==null&&l!==a&&!(l.nodeType===Node.TEXT_NODE&&l.parentNode===a)?!1:Ly(a,t,r,"left")},Es=a=>{const e=L.getDeepestNode(a,!0);if(e===null)return!0;if(L.isNativeInput(e))return e.selectionEnd===e.value.length;const[t,r]=_d();return t===null?!1:Ly(a,t,r,"right")},jE=(a,e=!0)=>{var y,b,T,k;if(L.isNativeInput(a)){a.focus();const x=e?0:a.value.length;a.setSelectionRange(x,x);return}const t=document.createRange(),r=window.getSelection();if(!r)return;const i=(x,S=!1)=>{const R=document.createTextNode("");S?x.insertBefore(R,x.firstChild):x.appendChild(R),t.setStart(R,0),t.setEnd(R,0)},l=(x,S)=>{if(x===null)return null;if(x.nodeType===Node.TEXT_NODE)return x;const R=S?x.firstChild:x.lastChild;return l(R,S)},c=a.childNodes,d=e?(y=c[0])!=null?y:null:(b=c[c.length-1])!=null?b:null,h=l(d,e);if(d===null){i(a),r.removeAllRanges(),r.addRange(t);return}if(h===null||h.nodeType!==Node.TEXT_NODE){i(a,e),r.removeAllRanges(),r.addRange(t);return}const g=(k=(T=h.textContent)==null?void 0:T.length)!=null?k:0,m=e?0:g;t.setStart(h,m),t.setEnd(h,m),r.removeAllRanges(),r.addRange(t)},Dy={Backspace:re.BACKSPACE,Delete:re.DELETE,Enter:re.ENTER,Tab:re.TAB,ArrowDown:re.DOWN,ArrowRight:re.RIGHT,ArrowUp:re.UP,ArrowLeft:re.LEFT},qE=new Set(["Enter","Process","Spacebar","Space","Dead"]),Cs='[contenteditable="true"], textarea, input';class UE extends Be{keydown(e){if(this.beforeKeydownProcessing(e),this.handleSelectedBlocksDeletion(e)||e.defaultPrevented)return;switch(this.getKeyCode(e)){case re.BACKSPACE:this.backspace(e);break;case re.DELETE:this.delete(e);break;case re.ENTER:this.enter(e);break;case re.DOWN:case re.RIGHT:this.arrowRightAndDown(e);break;case re.UP:case re.LEFT:this.arrowLeftAndUp(e);break;case re.TAB:this.tabPressed(e);break}e.key==="/"&&!e.ctrlKey&&!e.metaKey&&this.slashPressed(e),e.code==="Slash"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.commandSlashPressed())}handleSelectedBlocksDeletion(e){const{BlockSelection:t,BlockManager:r,Caret:i,BlockSettings:l}=this.Blok;if(l.contains(e.target))return!1;const c=e.key==="Backspace"||e.key==="Delete",d=le.isSelectionExists,h=le.isCollapsed===!0;if(!(c&&t.anyBlockSelected&&(!d||h)))return!1;const m=r.removeSelectedBlocks();if(m!==void 0){const y=r.insertDefaultBlockAtIndex(m,!0);i.setToBlock(y,i.positions.START)}return t.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),!0}beforeKeydownProcessing(e){!this.needToolbarClosing(e)||!this.isPrintableKeyEvent(e)||(this.Blok.Toolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)||this.Blok.BlockSelection.clearSelection(e)}keyup(e){e.shiftKey||this.Blok.UI.checkEmptiness()}handleCommandC(e){const{BlockSelection:t}=this.Blok;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:r,Caret:i}=this.Blok;t.anyBlockSelected&&t.copySelectedBlocks(e).then(()=>{const l=r.removeSelectedBlocks();if(l!==void 0){const c=r.insertDefaultBlockAtIndex(l,!0);i.setToBlock(c,i.positions.START)}t.clearSelection(e)}).catch(()=>{})}tabPressed(e){const{InlineToolbar:t,Caret:r}=this.Blok;if(t.opened)return;(e.shiftKey?r.navigatePrevious(!0):r.navigateNext(!0))&&e.preventDefault()}commandSlashPressed(){this.Blok.BlockSelection.selectedBlocks.length>1||this.activateBlockSettings()}slashPressed(e){if(!this.Blok.UI.nodes.wrapper.contains(e.target))return;const r=this.Blok.BlockManager.currentBlock;r!=null&&r.isEmpty&&(e.preventDefault(),this.Blok.Caret.insertContentAtCaretPosition("/"),this.activateToolbox())}enter(e){const{BlockManager:t,UI:r}=this.Blok,i=t.currentBlock;if(i===void 0||i.tool.isLineBreaksEnabled||r.someToolbarOpened&&r.someFlipperButtonFocused||e.shiftKey&&!qu)return;const l=i.currentInput!==void 0&&Ss(i.currentInput)&&!i.hasMedia?(this.Blok.BlockManager.insertDefaultBlockAtIndex(this.Blok.BlockManager.currentBlockIndex),i):i.currentInput&&Es(i.currentInput)?this.Blok.BlockManager.insertDefaultBlockAtIndex(this.Blok.BlockManager.currentBlockIndex+1):this.Blok.BlockManager.split();this.Blok.Caret.setToBlock(l),this.Blok.Toolbar.moveAndOpen(l),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:r}=this.Blok,{currentBlock:i,previousBlock:l}=t;if(i===void 0||!le.isCollapsed||!i.currentInput||!Ss(i.currentInput))return;if(e.preventDefault(),this.Blok.Toolbar.close(),!(i.currentInput===i.firstInput)){r.navigatePrevious();return}if(l===null)return;if(l.isEmpty){t.removeBlock(l);return}if(i.isEmpty){t.removeBlock(i);const h=t.currentBlock;h&&r.setToBlock(h,r.positions.END);return}Zv(l,i)?this.mergeBlocks(l,i):r.setToBlock(l,r.positions.END)}delete(e){const{BlockManager:t,Caret:r}=this.Blok,{currentBlock:i,nextBlock:l}=t;if(i===void 0||!le.isCollapsed||!i.currentInput||!Es(i.currentInput))return;if(e.preventDefault(),this.Blok.Toolbar.close(),!(i.currentInput===i.lastInput)){r.navigateNext();return}if(l===null)return;if(l.isEmpty){t.removeBlock(l);return}if(i.isEmpty){t.removeBlock(i),r.setToBlock(l,r.positions.START);return}Zv(i,l)?this.mergeBlocks(i,l):r.setToBlock(l,r.positions.START)}mergeBlocks(e,t){const{BlockManager:r,Toolbar:i}=this.Blok;e.lastInput!==void 0&&(jE(e.lastInput,!1),r.mergeBlocks(e,t).then(()=>{i.close()}).catch(()=>{}))}arrowRightAndDown(e){var R;const t=this.getKeyCode(e);if(t===null)return;const r=Zn.usedKeys.includes(t)&&(!e.shiftKey||t===re.TAB);if(this.Blok.UI.someToolbarOpened&&r)return;e.shiftKey||this.Blok.Toolbar.close();const i=le.get();i!=null&&i.anchorNode&&!this.Blok.BlockSelection.anyBlockSelected&&this.Blok.BlockManager.setCurrentBlockByChildNode(i.anchorNode);const{currentBlock:l}=this.Blok.BlockManager,c=e.target,d=document.activeElement instanceof HTMLElement?document.activeElement:null,h=[l==null?void 0:l.inputs.find(O=>c!==null&&O.contains(c)),l==null?void 0:l.inputs.find(O=>d!==null&&O.contains(d)),c==null?void 0:c.closest(Cs),d==null?void 0:d.closest(Cs)],g=(R=l==null?void 0:l.currentInput)!=null?R:h.find(O=>O instanceof HTMLElement),y=(g!==void 0?Es(g):void 0)||this.Blok.BlockSelection.anyBlockSelected,b=e.shiftKey&&t===re.DOWN;if(b&&y){this.Blok.CrossBlockSelection.toggleBlockSelectedState();return}b&&this.Blok.InlineToolbar.tryToShow();const k=t===re.RIGHT&&!e.shiftKey&&!this.isRtl&&g instanceof HTMLElement?zE(g):null;if(k!==null){le.setCursor(k.node,k.offset),e.preventDefault();return}if(t===re.DOWN||t===re.RIGHT&&!this.isRtl?this.Blok.Caret.navigateNext():this.Blok.Caret.navigatePrevious()){e.preventDefault();return}us(()=>{this.Blok.BlockManager.currentBlock&&this.Blok.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Blok.BlockSelection.clearSelection(e)}arrowLeftAndUp(e){var x;const t=this.Blok.UI.someToolbarOpened,r=this.getKeyCode(e);if(r===null||t&&Zn.usedKeys.includes(r)&&(!e.shiftKey||r===re.TAB))return;t&&this.Blok.UI.closeAllToolbars(),e.shiftKey||this.Blok.Toolbar.close();const i=window.getSelection();i!=null&&i.anchorNode&&!this.Blok.BlockSelection.anyBlockSelected&&this.Blok.BlockManager.setCurrentBlockByChildNode(i.anchorNode);const{currentBlock:l}=this.Blok.BlockManager,c=e.target,d=document.activeElement instanceof HTMLElement?document.activeElement:null,h=[l==null?void 0:l.inputs.find(S=>c!==null&&S.contains(c)),l==null?void 0:l.inputs.find(S=>d!==null&&S.contains(d)),c==null?void 0:c.closest(Cs),d==null?void 0:d.closest(Cs)],g=(x=l==null?void 0:l.currentInput)!=null?x:h.find(S=>S instanceof HTMLElement),y=(g!==void 0?Ss(g):void 0)||this.Blok.BlockSelection.anyBlockSelected,b=e.shiftKey&&r===re.UP;if(b&&y){this.Blok.CrossBlockSelection.toggleBlockSelectedState(!1);return}if(b&&this.Blok.InlineToolbar.tryToShow(),r===re.UP||r===re.LEFT&&!this.isRtl?this.Blok.Caret.navigatePrevious():this.Blok.Caret.navigateNext()){e.preventDefault();return}us(()=>{this.Blok.BlockManager.currentBlock&&this.Blok.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Blok.BlockSelection.clearSelection(e)}needToolbarClosing(e){const t=this.getKeyCode(e),r=t===re.ENTER,i=t===re.TAB,l=r&&this.Blok.Toolbar.toolbox.opened,c=r&&this.Blok.BlockSettings.opened,d=r&&this.Blok.InlineToolbar.opened,h=i;return!(e.shiftKey||h||l||c||d)}activateToolbox(){this.Blok.Toolbar.opened||this.Blok.Toolbar.moveAndOpen(),this.Blok.Toolbar.toolbox.open()}activateBlockSettings(){this.Blok.Toolbar.opened||this.Blok.Toolbar.moveAndOpen(),this.Blok.BlockSettings.opened||Promise.resolve(this.Blok.BlockSettings.open()).catch(()=>{})}getKeyCode(e){const t=e.key&&Dy[e.key];if(t!==void 0&&typeof t=="number")return t;const r=e.code&&Dy[e.code];return r!==void 0&&typeof r=="number"?r:null}isPrintableKeyEvent(e){return e.key?e.key.length===1||qE.has(e.key):!1}}class Nd{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return mv(this.workingArea.children)}static set(e,t,r){return isNaN(Number(t))?(Reflect.set(e,t,r),!0):(e.insert(+t,r),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}move(e,t,r=!1){const i=this.blocks.splice(t,1)[0];if(!r){const c=e-1,d=Math.max(0,c),h=this.blocks[d],g=e>0?"afterend":"beforebegin";this.insertToDOM(i,g,h)}this.blocks.splice(e,0,i);const l=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});i.call(Pn.MOVED,l)}insert(e,t,r=!1){if(!this.length){this.push(t);return}const i=e>this.length?this.length:e;r&&(this.blocks[i].holder.remove(),this.blocks[i].call(Pn.REMOVED));const l=r?1:0;if(this.blocks.splice(i,l,t),i>0){const d=this.blocks[i-1];this.insertToDOM(t,"afterend",d);return}const c=this.blocks[i+1];if(c!==void 0){this.insertToDOM(t,"beforebegin",c);return}this.insertToDOM(t)}replace(e,t){if(this.blocks[e]===void 0)throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const r=new DocumentFragment;for(const i of e)r.appendChild(i.holder);if(!this.length){this.blocks.push(...e),this.workingArea.appendChild(r),e.forEach(i=>i.call(Pn.RENDERED));return}if(t>0){const i=Math.min(t-1,this.length-1);this.blocks[i].holder.after(r)}t===0&&this.workingArea.prepend(r),this.blocks.splice(t,0,...e),e.forEach(i=>i.call(Pn.RENDERED))}remove(e){const t=isNaN(e)?this.length-1:e;this.blocks[t].holder.remove(),this.blocks[t].call(Pn.REMOVED),this.blocks.splice(t,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach(e=>e.call(Pn.REMOVED)),this.blocks.length=0}insertAfter(e,t){const r=this.blocks.indexOf(e);this.insert(r+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,r){t&&r!==void 0?r.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(Pn.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}function Py(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function Cn(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Py(Object(t),!0).forEach(function(r){WE(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Py(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function Bs(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bs=function(e){return typeof e}:Bs=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bs(a)}function WE(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function Hn(){return Hn=Object.assign||function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},Hn.apply(this,arguments)}function KE(a,e){if(a==null)return{};var t={},r=Object.keys(a),i,l;for(l=0;l<r.length;l++)i=r[l],!(e.indexOf(i)>=0)&&(t[i]=a[i]);return t}function VE(a,e){if(a==null)return{};var t=KE(a,e),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(i=0;i<l.length;i++)r=l[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(a,r)&&(t[r]=a[r])}return t}var $E="1.15.6";function zn(a){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(a)}var jn=zn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ri=zn(/Edge/i),My=zn(/firefox/i),oi=zn(/safari/i)&&!zn(/chrome/i)&&!zn(/android/i),Od=zn(/iP(ad|od|hone)/i),Fy=zn(/chrome/i)&&zn(/android/i),Hy={capture:!1,passive:!1};function Oe(a,e,t){a.addEventListener(e,t,!jn&&Hy)}function Ne(a,e,t){a.removeEventListener(e,t,!jn&&Hy)}function As(a,e){if(e){if(e[0]===">"&&(e=e.substring(1)),a)try{if(a.matches)return a.matches(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function zy(a){return a.host&&a!==document&&a.host.nodeType?a.host:a.parentNode}function pn(a,e,t,r){if(a){t=t||document;do{if(e!=null&&(e[0]===">"?a.parentNode===t&&As(a,e):As(a,e))||r&&a===t)return a;if(a===t)break}while(a=zy(a))}return null}var jy=/\s+/g;function Vt(a,e,t){if(a&&e)if(a.classList)a.classList[t?"add":"remove"](e);else{var r=(" "+a.className+" ").replace(jy," ").replace(" "+e+" "," ");a.className=(r+(t?" "+e:"")).replace(jy," ")}}function me(a,e,t){var r=a&&a.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(a,""):a.currentStyle&&(t=a.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function co(a,e){var t="";if(typeof a=="string")t=a;else do{var r=me(a,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(a=a.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function qy(a,e,t){if(a){var r=a.getElementsByTagName(e),i=0,l=r.length;if(t)for(;i<l;i++)t(r[i],i);return r}return[]}function Bn(){var a=document.scrollingElement;return a||document.documentElement}function at(a,e,t,r,i){if(!(!a.getBoundingClientRect&&a!==window)){var l,c,d,h,g,m,y;if(a!==window&&a.parentNode&&a!==Bn()?(l=a.getBoundingClientRect(),c=l.top,d=l.left,h=l.bottom,g=l.right,m=l.height,y=l.width):(c=0,d=0,h=window.innerHeight,g=window.innerWidth,m=window.innerHeight,y=window.innerWidth),(e||t)&&a!==window&&(i=i||a.parentNode,!jn))do if(i&&i.getBoundingClientRect&&(me(i,"transform")!=="none"||t&&me(i,"position")!=="static")){var b=i.getBoundingClientRect();c-=b.top+parseInt(me(i,"border-top-width")),d-=b.left+parseInt(me(i,"border-left-width")),h=c+l.height,g=d+l.width;break}while(i=i.parentNode);if(r&&a!==window){var T=co(i||a),k=T&&T.a,x=T&&T.d;T&&(c/=x,d/=k,y/=k,m/=x,h=c+m,g=d+y)}return{top:c,left:d,bottom:h,right:g,width:y,height:m}}}function Uy(a,e,t){for(var r=Jn(a,!0),i=at(a)[e];r;){var l=at(r)[t],c=void 0;if(c=i>=l,!c)return r;if(r===Bn())break;r=Jn(r,!1)}return!1}function uo(a,e,t,r){for(var i=0,l=0,c=a.children;l<c.length;){if(c[l].style.display!=="none"&&c[l]!==ve.ghost&&(r||c[l]!==ve.dragged)&&pn(c[l],t.draggable,a,!1)){if(i===e)return c[l];i++}l++}return null}function Ld(a,e){for(var t=a.lastElementChild;t&&(t===ve.ghost||me(t,"display")==="none"||e&&!As(t,e));)t=t.previousElementSibling;return t||null}function rn(a,e){var t=0;if(!a||!a.parentNode)return-1;for(;a=a.previousElementSibling;)a.nodeName.toUpperCase()!=="TEMPLATE"&&a!==ve.clone&&(!e||As(a,e))&&t++;return t}function Wy(a){var e=0,t=0,r=Bn();if(a)do{var i=co(a),l=i.a,c=i.d;e+=a.scrollLeft*l,t+=a.scrollTop*c}while(a!==r&&(a=a.parentNode));return[e,t]}function GE(a,e){for(var t in a)if(a.hasOwnProperty(t)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===a[t][r])return Number(t)}return-1}function Jn(a,e){if(!a||!a.getBoundingClientRect)return Bn();var t=a,r=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=me(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Bn();if(r||e)return t;r=!0}}while(t=t.parentNode);return Bn()}function XE(a,e){if(a&&e)for(var t in e)e.hasOwnProperty(t)&&(a[t]=e[t]);return a}function Dd(a,e){return Math.round(a.top)===Math.round(e.top)&&Math.round(a.left)===Math.round(e.left)&&Math.round(a.height)===Math.round(e.height)&&Math.round(a.width)===Math.round(e.width)}var ii;function Ky(a,e){return function(){if(!ii){var t=arguments,r=this;t.length===1?a.call(r,t[0]):a.apply(r,t),ii=setTimeout(function(){ii=void 0},e)}}}function YE(){clearTimeout(ii),ii=void 0}function Vy(a,e,t){a.scrollLeft+=e,a.scrollTop+=t}function $y(a){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(a).cloneNode(!0):t?t(a).clone(!0)[0]:a.cloneNode(!0)}function Gy(a,e,t){var r={};return Array.from(a.children).forEach(function(i){var l,c,d,h;if(!(!pn(i,e.draggable,a,!1)||i.animated||i===t)){var g=at(i);r.left=Math.min((l=r.left)!==null&&l!==void 0?l:1/0,g.left),r.top=Math.min((c=r.top)!==null&&c!==void 0?c:1/0,g.top),r.right=Math.max((d=r.right)!==null&&d!==void 0?d:-1/0,g.right),r.bottom=Math.max((h=r.bottom)!==null&&h!==void 0?h:-1/0,g.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var Mt="Sortable"+new Date().getTime();function QE(){var a=[],e;return{captureAnimationState:function(){if(a=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(me(i,"display")==="none"||i===ve.ghost)){a.push({target:i,rect:at(i)});var l=Cn({},a[a.length-1].rect);if(i.thisAnimationDuration){var c=co(i,!0);c&&(l.top-=c.f,l.left-=c.e)}i.fromRect=l}})}},addAnimationState:function(r){a.push(r)},removeAnimationState:function(r){a.splice(GE(a,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var l=!1,c=0;a.forEach(function(d){var h=0,g=d.target,m=g.fromRect,y=at(g),b=g.prevFromRect,T=g.prevToRect,k=d.rect,x=co(g,!0);x&&(y.top-=x.f,y.left-=x.e),g.toRect=y,g.thisAnimationDuration&&Dd(b,y)&&!Dd(m,y)&&(k.top-y.top)/(k.left-y.left)===(m.top-y.top)/(m.left-y.left)&&(h=JE(k,b,T,i.options)),Dd(y,m)||(g.prevFromRect=m,g.prevToRect=y,h||(h=i.options.animation),i.animate(g,k,y,h)),h&&(l=!0,c=Math.max(c,h),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},h),g.thisAnimationDuration=h)}),clearTimeout(e),l?e=setTimeout(function(){typeof r=="function"&&r()},c):typeof r=="function"&&r(),a=[]},animate:function(r,i,l,c){if(c){me(r,"transition",""),me(r,"transform","");var d=co(this.el),h=d&&d.a,g=d&&d.d,m=(i.left-l.left)/(h||1),y=(i.top-l.top)/(g||1);r.animatingX=!!m,r.animatingY=!!y,me(r,"transform","translate3d("+m+"px,"+y+"px,0)"),this.forRepaintDummy=ZE(r),me(r,"transition","transform "+c+"ms"+(this.options.easing?" "+this.options.easing:"")),me(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){me(r,"transition",""),me(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},c)}}}}function ZE(a){return a.offsetWidth}function JE(a,e,t,r){return Math.sqrt(Math.pow(e.top-a.top,2)+Math.pow(e.left-a.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*r.animation}var fo=[],Pd={initializeByDefault:!0},si={mount:function(e){for(var t in Pd)Pd.hasOwnProperty(t)&&!(t in e)&&(e[t]=Pd[t]);fo.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),fo.push(e)},pluginEvent:function(e,t,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var l=e+"Global";fo.forEach(function(c){t[c.pluginName]&&(t[c.pluginName][l]&&t[c.pluginName][l](Cn({sortable:t},r)),t.options[c.pluginName]&&t[c.pluginName][e]&&t[c.pluginName][e](Cn({sortable:t},r)))})},initializePlugins:function(e,t,r,i){fo.forEach(function(d){var h=d.pluginName;if(!(!e.options[h]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[h]=g,Hn(r,g.defaults)}});for(var l in e.options)if(e.options.hasOwnProperty(l)){var c=this.modifyOption(e,l,e.options[l]);typeof c!="undefined"&&(e.options[l]=c)}},getEventProperties:function(e,t){var r={};return fo.forEach(function(i){typeof i.eventProperties=="function"&&Hn(r,i.eventProperties.call(t[i.pluginName],e))}),r},modifyOption:function(e,t,r){var i;return fo.forEach(function(l){e[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[t]=="function"&&(i=l.optionListeners[t].call(e[l.pluginName],r))}),i}};function eC(a){var e=a.sortable,t=a.rootEl,r=a.name,i=a.targetEl,l=a.cloneEl,c=a.toEl,d=a.fromEl,h=a.oldIndex,g=a.newIndex,m=a.oldDraggableIndex,y=a.newDraggableIndex,b=a.originalEvent,T=a.putSortable,k=a.extraEventProperties;if(e=e||t&&t[Mt],!!e){var x,S=e.options,R="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!jn&&!ri?x=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(x=document.createEvent("Event"),x.initEvent(r,!0,!0)),x.to=c||t,x.from=d||t,x.item=i||t,x.clone=l,x.oldIndex=h,x.newIndex=g,x.oldDraggableIndex=m,x.newDraggableIndex=y,x.originalEvent=b,x.pullMode=T?T.lastPutMode:void 0;var O=Cn(Cn({},k),si.getEventProperties(r,e));for(var H in O)x[H]=O[H];t&&t.dispatchEvent(x),S[R]&&S[R].call(e,x)}}var tC=["evt"],Ft=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,l=VE(r,tC);si.pluginEvent.bind(ve)(e,t,Cn({dragEl:V,parentEl:Ze,ghostEl:we,rootEl:Ve,nextEl:Or,lastDownEl:Is,cloneEl:Ge,cloneHidden:er,dragStarted:li,putSortable:xt,activeSortable:ve.active,originalEvent:i,oldIndex:ho,oldDraggableIndex:ai,newIndex:$t,newDraggableIndex:tr,hideGhostForTarget:tb,unhideGhostForTarget:nb,cloneNowHidden:function(){er=!0},cloneNowShown:function(){er=!1},dispatchSortableEvent:function(d){Ot({sortable:t,name:d,originalEvent:i})}},l))};function Ot(a){eC(Cn({putSortable:xt,cloneEl:Ge,targetEl:V,rootEl:Ve,oldIndex:ho,oldDraggableIndex:ai,newIndex:$t,newDraggableIndex:tr},a))}var V,Ze,we,Ve,Or,Is,Ge,er,ho,$t,ai,tr,Rs,xt,po=!1,_s=!1,Ns=[],Lr,gn,Md,Fd,Xy,Yy,li,go,ci,ui=!1,Os=!1,Ls,Ct,Hd=[],zd=!1,Ds=[],Ps=typeof document!="undefined",Ms=Od,Qy=ri||jn?"cssFloat":"float",nC=Ps&&!Fy&&!Od&&"draggable"in document.createElement("div"),Zy=(function(){if(Ps){if(jn)return!1;var a=document.createElement("x");return a.style.cssText="pointer-events:auto",a.style.pointerEvents==="auto"}})(),Jy=function(e,t){var r=me(e),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),l=uo(e,0,t),c=uo(e,1,t),d=l&&me(l),h=c&&me(c),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+at(l).width,m=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+at(c).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&d.float&&d.float!=="none"){var y=d.float==="left"?"left":"right";return c&&(h.clear==="both"||h.clear===y)?"vertical":"horizontal"}return l&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&r[Qy]==="none"||c&&r[Qy]==="none"&&g+m>i)?"vertical":"horizontal"},rC=function(e,t,r){var i=r?e.left:e.top,l=r?e.right:e.bottom,c=r?e.width:e.height,d=r?t.left:t.top,h=r?t.right:t.bottom,g=r?t.width:t.height;return i===d||l===h||i+c/2===d+g/2},oC=function(e,t){var r;return Ns.some(function(i){var l=i[Mt].options.emptyInsertThreshold;if(!(!l||Ld(i))){var c=at(i),d=e>=c.left-l&&e<=c.right+l,h=t>=c.top-l&&t<=c.bottom+l;if(d&&h)return r=i}}),r},eb=function(e){function t(l,c){return function(d,h,g,m){var y=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(l==null&&(c||y))return!0;if(l==null||l===!1)return!1;if(c&&l==="clone")return l;if(typeof l=="function")return t(l(d,h,g,m),c)(d,h,g,m);var b=(c?d:h).options.group.name;return l===!0||typeof l=="string"&&l===b||l.join&&l.indexOf(b)>-1}}var r={},i=e.group;(!i||Bs(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=t(i.pull,!0),r.checkPut=t(i.put),r.revertClone=i.revertClone,e.group=r},tb=function(){!Zy&&we&&me(we,"display","none")},nb=function(){!Zy&&we&&me(we,"display","")};Ps&&!Fy&&document.addEventListener("click",function(a){if(_s)return a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),_s=!1,!1},!0);var Dr=function(e){if(V){e=e.touches?e.touches[0]:e;var t=oC(e.clientX,e.clientY);if(t){var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[Mt]._onDragOver(r)}}},iC=function(e){V&&V.parentNode[Mt]._isOutsideThisEl(e.target)};function ve(a,e){if(!(a&&a.nodeType&&a.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(a));this.el=a,this.options=e=Hn({},e),a[Mt]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(a.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Jy(a,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(c,d){c.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ve.supportPointer!==!1&&"PointerEvent"in window&&(!oi||Od),emptyInsertThreshold:5};si.initializePlugins(this,a,t);for(var r in t)!(r in e)&&(e[r]=t[r]);eb(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:nC,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Oe(a,"pointerdown",this._onTapStart):(Oe(a,"mousedown",this._onTapStart),Oe(a,"touchstart",this._onTapStart)),this.nativeDraggable&&(Oe(a,"dragover",this),Oe(a,"dragenter",this)),Ns.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Hn(this,QE())}ve.prototype={constructor:ve,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(go=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,V):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,r=this.el,i=this.options,l=i.preventOnFilter,c=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,m=i.filter;if(hC(r),!V&&!(/mousedown|pointerdown/.test(c)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&oi&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=pn(h,i.draggable,r,!1),!(h&&h.animated)&&Is!==h)){if(ho=rn(h),ai=rn(h,i.draggable),typeof m=="function"){if(m.call(this,e,h,this)){Ot({sortable:t,rootEl:g,name:"filter",targetEl:h,toEl:r,fromEl:r}),Ft("filter",t,{evt:e}),l&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(y){if(y=pn(g,y.trim(),r,!1),y)return Ot({sortable:t,rootEl:y,name:"filter",targetEl:h,fromEl:r,toEl:r}),Ft("filter",t,{evt:e}),!0}),m)){l&&e.preventDefault();return}i.handle&&!pn(g,i.handle,r,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,t,r){var i=this,l=i.el,c=i.options,d=l.ownerDocument,h;if(r&&!V&&r.parentNode===l){var g=at(r);if(Ve=l,V=r,Ze=V.parentNode,Or=V.nextSibling,Is=r,Rs=c.group,ve.dragged=V,Lr={target:V,clientX:(t||e).clientX,clientY:(t||e).clientY},Xy=Lr.clientX-g.left,Yy=Lr.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,V.style["will-change"]="all",h=function(){if(Ft("delayEnded",i,{evt:e}),ve.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!My&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(e,t),Ot({sortable:i,name:"choose",originalEvent:e}),Vt(V,c.chosenClass,!0)},c.ignore.split(",").forEach(function(m){qy(V,m.trim(),jd)}),Oe(d,"dragover",Dr),Oe(d,"mousemove",Dr),Oe(d,"touchmove",Dr),c.supportPointer?(Oe(d,"pointerup",i._onDrop),!this.nativeDraggable&&Oe(d,"pointercancel",i._onDrop)):(Oe(d,"mouseup",i._onDrop),Oe(d,"touchend",i._onDrop),Oe(d,"touchcancel",i._onDrop)),My&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),Ft("delayStart",this,{evt:e}),c.delay&&(!c.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(ri||jn))){if(ve.eventCanceled){this._onDrop();return}c.supportPointer?(Oe(d,"pointerup",i._disableDelayedDrag),Oe(d,"pointercancel",i._disableDelayedDrag)):(Oe(d,"mouseup",i._disableDelayedDrag),Oe(d,"touchend",i._disableDelayedDrag),Oe(d,"touchcancel",i._disableDelayedDrag)),Oe(d,"mousemove",i._delayedDragTouchMoveHandler),Oe(d,"touchmove",i._delayedDragTouchMoveHandler),c.supportPointer&&Oe(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(h,c.delay)}else h()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){V&&jd(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ne(e,"mouseup",this._disableDelayedDrag),Ne(e,"touchend",this._disableDelayedDrag),Ne(e,"touchcancel",this._disableDelayedDrag),Ne(e,"pointerup",this._disableDelayedDrag),Ne(e,"pointercancel",this._disableDelayedDrag),Ne(e,"mousemove",this._delayedDragTouchMoveHandler),Ne(e,"touchmove",this._delayedDragTouchMoveHandler),Ne(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Oe(document,"pointermove",this._onTouchMove):t?Oe(document,"touchmove",this._onTouchMove):Oe(document,"mousemove",this._onTouchMove):(Oe(V,"dragend",this),Oe(Ve,"dragstart",this._onDragStart));try{document.selection?Hs(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(e,t){if(po=!1,Ve&&V){Ft("dragStarted",this,{evt:t}),this.nativeDraggable&&Oe(document,"dragover",iC);var r=this.options;!e&&Vt(V,r.dragClass,!1),Vt(V,r.ghostClass,!0),ve.active=this,e&&this._appendGhost(),Ot({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(gn){this._lastX=gn.clientX,this._lastY=gn.clientY,tb();for(var e=document.elementFromPoint(gn.clientX,gn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(gn.clientX,gn.clientY),e!==t);)t=e;if(V.parentNode[Mt]._isOutsideThisEl(e),t)do{if(t[Mt]){var r=void 0;if(r=t[Mt]._onDragOver({clientX:gn.clientX,clientY:gn.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=zy(t));nb()}},_onTouchMove:function(e){if(Lr){var t=this.options,r=t.fallbackTolerance,i=t.fallbackOffset,l=e.touches?e.touches[0]:e,c=we&&co(we,!0),d=we&&c&&c.a,h=we&&c&&c.d,g=Ms&&Ct&&Wy(Ct),m=(l.clientX-Lr.clientX+i.x)/(d||1)+(g?g[0]-Hd[0]:0)/(d||1),y=(l.clientY-Lr.clientY+i.y)/(h||1)+(g?g[1]-Hd[1]:0)/(h||1);if(!ve.active&&!po){if(r&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(we){c?(c.e+=m-(Md||0),c.f+=y-(Fd||0)):c={a:1,b:0,c:0,d:1,e:m,f:y};var b="matrix(".concat(c.a,",").concat(c.b,",").concat(c.c,",").concat(c.d,",").concat(c.e,",").concat(c.f,")");me(we,"webkitTransform",b),me(we,"mozTransform",b),me(we,"msTransform",b),me(we,"transform",b),Md=m,Fd=y,gn=l}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!we){var e=this.options.fallbackOnBody?document.body:Ve,t=at(V,!0,Ms,!0,e),r=this.options;if(Ms){for(Ct=e;me(Ct,"position")==="static"&&me(Ct,"transform")==="none"&&Ct!==document;)Ct=Ct.parentNode;Ct!==document.body&&Ct!==document.documentElement?(Ct===document&&(Ct=Bn()),t.top+=Ct.scrollTop,t.left+=Ct.scrollLeft):Ct=Bn(),Hd=Wy(Ct)}we=V.cloneNode(!0),Vt(we,r.ghostClass,!1),Vt(we,r.fallbackClass,!0),Vt(we,r.dragClass,!0),me(we,"transition",""),me(we,"transform",""),me(we,"box-sizing","border-box"),me(we,"margin",0),me(we,"top",t.top),me(we,"left",t.left),me(we,"width",t.width),me(we,"height",t.height),me(we,"opacity","0.8"),me(we,"position",Ms?"absolute":"fixed"),me(we,"zIndex","100000"),me(we,"pointerEvents","none"),ve.ghost=we,e.appendChild(we),me(we,"transform-origin",Xy/parseInt(we.style.width)*100+"% "+Yy/parseInt(we.style.height)*100+"%")}},_onDragStart:function(e,t){var r=this,i=e.dataTransfer,l=r.options;if(Ft("dragStart",this,{evt:e}),ve.eventCanceled){this._onDrop();return}Ft("setupClone",this),ve.eventCanceled||(Ge=$y(V),Ge.removeAttribute("id"),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Vt(Ge,this.options.chosenClass,!1),ve.clone=Ge),r.cloneId=Hs(function(){Ft("clone",r),!ve.eventCanceled&&(r.options.removeCloneOnHide||Ve.insertBefore(Ge,V),r._hideClone(),Ot({sortable:r,name:"clone"}))}),!t&&Vt(V,l.dragClass,!0),t?(_s=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Ne(document,"mouseup",r._onDrop),Ne(document,"touchend",r._onDrop),Ne(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",l.setData&&l.setData.call(r,i,V)),Oe(document,"drop",r),me(V,"transform","translateZ(0)")),po=!0,r._dragStartId=Hs(r._dragStarted.bind(r,t,e)),Oe(document,"selectstart",r),li=!0,window.getSelection().removeAllRanges(),oi&&me(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,r=e.target,i,l,c,d=this.options,h=d.group,g=ve.active,m=Rs===h,y=d.sort,b=xt||g,T,k=this,x=!1;if(zd)return;function S(D,ce){Ft(D,k,Cn({evt:e,isOwner:m,axis:T?"vertical":"horizontal",revert:c,dragRect:i,targetRect:l,canSort:y,fromSortable:b,target:r,completed:O,onMove:function(A,F){return Fs(Ve,t,V,i,A,at(A),e,F)},changed:H},ce))}function R(){S("dragOverAnimationCapture"),k.captureAnimationState(),k!==b&&b.captureAnimationState()}function O(D){return S("dragOverCompleted",{insertion:D}),D&&(m?g._hideClone():g._showClone(k),k!==b&&(Vt(V,xt?xt.options.ghostClass:g.options.ghostClass,!1),Vt(V,d.ghostClass,!0)),xt!==k&&k!==ve.active?xt=k:k===ve.active&&xt&&(xt=null),b===k&&(k._ignoreWhileAnimating=r),k.animateAll(function(){S("dragOverAnimationComplete"),k._ignoreWhileAnimating=null}),k!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(r===V&&!V.animated||r===t&&!r.animated)&&(go=null),!d.dragoverBubble&&!e.rootEl&&r!==document&&(V.parentNode[Mt]._isOutsideThisEl(e.target),!D&&Dr(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),x=!0}function H(){$t=rn(V),tr=rn(V,d.draggable),Ot({sortable:k,name:"change",toEl:t,newIndex:$t,newDraggableIndex:tr,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=pn(r,d.draggable,t,!0),S("dragOver"),ve.eventCanceled)return x;if(V.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||k._ignoreWhileAnimating===r)return O(!1);if(_s=!1,g&&!d.disabled&&(m?y||(c=Ze!==Ve):xt===this||(this.lastPutMode=Rs.checkPull(this,g,V,e))&&h.checkPut(this,g,V,e))){if(T=this._getDirection(e,r)==="vertical",i=at(V),S("dragOverValid"),ve.eventCanceled)return x;if(c)return Ze=Ve,R(),this._hideClone(),S("revert"),ve.eventCanceled||(Or?Ve.insertBefore(V,Or):Ve.appendChild(V)),O(!0);var P=Ld(t,d.draggable);if(!P||cC(e,T,this)&&!P.animated){if(P===V)return O(!1);if(P&&t===e.target&&(r=P),r&&(l=at(r)),Fs(Ve,t,V,i,r,l,e,!!r)!==!1)return R(),P&&P.nextSibling?t.insertBefore(V,P.nextSibling):t.appendChild(V),Ze=t,H(),O(!0)}else if(P&&lC(e,T,this)){var $=uo(t,0,d,!0);if($===V)return O(!1);if(r=$,l=at(r),Fs(Ve,t,V,i,r,l,e,!1)!==!1)return R(),t.insertBefore(V,$),Ze=t,H(),O(!0)}else if(r.parentNode===t){l=at(r);var j=0,U,M=V.parentNode!==t,X=!rC(V.animated&&V.toRect||i,r.animated&&r.toRect||l,T),ae=T?"top":"left",G=Uy(r,"top","top")||Uy(V,"top","top"),ke=G?G.scrollTop:void 0;go!==r&&(U=l[ae],ui=!1,Os=!X&&d.invertSwap||M),j=uC(e,r,l,T,X?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Os,go===r);var Z;if(j!==0){var Te=rn(V);do Te-=j,Z=Ze.children[Te];while(Z&&(me(Z,"display")==="none"||Z===we))}if(j===0||Z===r)return O(!1);go=r,ci=j;var Re=r.nextElementSibling,xe=!1;xe=j===1;var Ce=Fs(Ve,t,V,i,r,l,e,xe);if(Ce!==!1)return(Ce===1||Ce===-1)&&(xe=Ce===1),zd=!0,setTimeout(aC,30),R(),xe&&!Re?t.appendChild(V):r.parentNode.insertBefore(V,xe?Re:r),G&&Vy(G,0,ke-G.scrollTop),Ze=V.parentNode,U!==void 0&&!Os&&(Ls=Math.abs(U-at(r)[ae])),H(),O(!0)}if(t.contains(V))return O(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ne(document,"mousemove",this._onTouchMove),Ne(document,"touchmove",this._onTouchMove),Ne(document,"pointermove",this._onTouchMove),Ne(document,"dragover",Dr),Ne(document,"mousemove",Dr),Ne(document,"touchmove",Dr)},_offUpEvents:function(){var e=this.el.ownerDocument;Ne(e,"mouseup",this._onDrop),Ne(e,"touchend",this._onDrop),Ne(e,"pointerup",this._onDrop),Ne(e,"pointercancel",this._onDrop),Ne(e,"touchcancel",this._onDrop),Ne(document,"selectstart",this)},_onDrop:function(e){var t=this.el,r=this.options;if($t=rn(V),tr=rn(V,r.draggable),Ft("drop",this,{evt:e}),Ze=V&&V.parentNode,$t=rn(V),tr=rn(V,r.draggable),ve.eventCanceled){this._nulling();return}po=!1,Os=!1,ui=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qd(this.cloneId),qd(this._dragStartId),this.nativeDraggable&&(Ne(document,"drop",this),Ne(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),oi&&me(document.body,"user-select",""),me(V,"transform",""),e&&(li&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),we&&we.parentNode&&we.parentNode.removeChild(we),(Ve===Ze||xt&&xt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),V&&(this.nativeDraggable&&Ne(V,"dragend",this),jd(V),V.style["will-change"]="",li&&!po&&Vt(V,xt?xt.options.ghostClass:this.options.ghostClass,!1),Vt(V,this.options.chosenClass,!1),Ot({sortable:this,name:"unchoose",toEl:Ze,newIndex:null,newDraggableIndex:null,originalEvent:e}),Ve!==Ze?($t>=0&&(Ot({rootEl:Ze,name:"add",toEl:Ze,fromEl:Ve,originalEvent:e}),Ot({sortable:this,name:"remove",toEl:Ze,originalEvent:e}),Ot({rootEl:Ze,name:"sort",toEl:Ze,fromEl:Ve,originalEvent:e}),Ot({sortable:this,name:"sort",toEl:Ze,originalEvent:e})),xt&&xt.save()):$t!==ho&&$t>=0&&(Ot({sortable:this,name:"update",toEl:Ze,originalEvent:e}),Ot({sortable:this,name:"sort",toEl:Ze,originalEvent:e})),ve.active&&(($t==null||$t===-1)&&($t=ho,tr=ai),Ot({sortable:this,name:"end",toEl:Ze,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Ft("nulling",this),Ve=V=Ze=we=Or=Ge=Is=er=Lr=gn=li=$t=tr=ho=ai=go=ci=xt=Rs=ve.dragged=ve.ghost=ve.clone=ve.active=null,Ds.forEach(function(e){e.checked=!0}),Ds.length=Md=Fd=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":V&&(this._onDragOver(e),sC(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,i=0,l=r.length,c=this.options;i<l;i++)t=r[i],pn(t,c.draggable,this.el,!1)&&e.push(t.getAttribute(c.dataIdAttr)||fC(t));return e},sort:function(e,t){var r={},i=this.el;this.toArray().forEach(function(l,c){var d=i.children[c];pn(d,this.options.draggable,i,!1)&&(r[l]=d)},this),t&&this.captureAnimationState(),e.forEach(function(l){r[l]&&(i.removeChild(r[l]),i.appendChild(r[l]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return pn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var r=this.options;if(t===void 0)return r[e];var i=si.modifyOption(this,e,t);typeof i!="undefined"?r[e]=i:r[e]=t,e==="group"&&eb(r)},destroy:function(){Ft("destroy",this);var e=this.el;e[Mt]=null,Ne(e,"mousedown",this._onTapStart),Ne(e,"touchstart",this._onTapStart),Ne(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ne(e,"dragover",this),Ne(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ns.splice(Ns.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!er){if(Ft("hideClone",this),ve.eventCanceled)return;me(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),er=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(er){if(Ft("showClone",this),ve.eventCanceled)return;V.parentNode==Ve&&!this.options.group.revertClone?Ve.insertBefore(Ge,V):Or?Ve.insertBefore(Ge,Or):Ve.appendChild(Ge),this.options.group.revertClone&&this.animate(V,Ge),me(Ge,"display",""),er=!1}}};function sC(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.cancelable&&a.preventDefault()}function Fs(a,e,t,r,i,l,c,d){var h,g=a[Mt],m=g.options.onMove,y;return window.CustomEvent&&!jn&&!ri?h=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent("move",!0,!0)),h.to=e,h.from=a,h.dragged=t,h.draggedRect=r,h.related=i||e,h.relatedRect=l||at(e),h.willInsertAfter=d,h.originalEvent=c,a.dispatchEvent(h),m&&(y=m.call(g,h,c)),y}function jd(a){a.draggable=!1}function aC(){zd=!1}function lC(a,e,t){var r=at(uo(t.el,0,t.options,!0)),i=Gy(t.el,t.options,we),l=10;return e?a.clientX<i.left-l||a.clientY<r.top&&a.clientX<r.right:a.clientY<i.top-l||a.clientY<r.bottom&&a.clientX<r.left}function cC(a,e,t){var r=at(Ld(t.el,t.options.draggable)),i=Gy(t.el,t.options,we),l=10;return e?a.clientX>i.right+l||a.clientY>r.bottom&&a.clientX>r.left:a.clientY>i.bottom+l||a.clientX>r.right&&a.clientY>r.top}function uC(a,e,t,r,i,l,c,d){var h=r?a.clientY:a.clientX,g=r?t.height:t.width,m=r?t.top:t.left,y=r?t.bottom:t.right,b=!1;if(!c){if(d&&Ls<g*i){if(!ui&&(ci===1?h>m+g*l/2:h<y-g*l/2)&&(ui=!0),ui)b=!0;else if(ci===1?h<m+Ls:h>y-Ls)return-ci}else if(h>m+g*(1-i)/2&&h<y-g*(1-i)/2)return dC(e)}return b=b||c,b&&(h<m+g*l/2||h>y-g*l/2)?h>m+g/2?1:-1:0}function dC(a){return rn(V)<rn(a)?1:-1}function fC(a){for(var e=a.tagName+a.className+a.src+a.href+a.textContent,t=e.length,r=0;t--;)r+=e.charCodeAt(t);return r.toString(36)}function hC(a){Ds.length=0;for(var e=a.getElementsByTagName("input"),t=e.length;t--;){var r=e[t];r.checked&&Ds.push(r)}}function Hs(a){return setTimeout(a,0)}function qd(a){return clearTimeout(a)}Ps&&Oe(document,"touchmove",function(a){(ve.active||po)&&a.cancelable&&a.preventDefault()}),ve.utils={on:Oe,off:Ne,css:me,find:qy,is:function(e,t){return!!pn(e,t,e,!1)},extend:XE,throttle:Ky,closest:pn,toggleClass:Vt,clone:$y,index:rn,nextTick:Hs,cancelNextTick:qd,detectDirection:Jy,getChild:uo,expando:Mt},ve.get=function(a){return a[Mt]},ve.mount=function(){for(var a=arguments.length,e=new Array(a),t=0;t<a;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(ve.utils=Cn(Cn({},ve.utils),r.utils)),si.mount(r)})},ve.create=function(a,e){return new ve(a,e)},ve.version=$E;var lt=[],di,Ud,Wd=!1,Kd,Vd,zs,fi;function pC(){function a(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return a.prototype={dragStarted:function(t){var r=t.originalEvent;this.sortable.nativeDraggable?Oe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Oe(document,"pointermove",this._handleFallbackAutoScroll):r.touches?Oe(document,"touchmove",this._handleFallbackAutoScroll):Oe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var r=t.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Ne(document,"dragover",this._handleAutoScroll):(Ne(document,"pointermove",this._handleFallbackAutoScroll),Ne(document,"touchmove",this._handleFallbackAutoScroll),Ne(document,"mousemove",this._handleFallbackAutoScroll)),rb(),js(),YE()},nulling:function(){zs=Ud=di=Wd=fi=Kd=Vd=null,lt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,r){var i=this,l=(t.touches?t.touches[0]:t).clientX,c=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(l,c);if(zs=t,r||this.options.forceAutoScrollFallback||ri||jn||oi){$d(t,this.options,d,r);var h=Jn(d,!0);Wd&&(!fi||l!==Kd||c!==Vd)&&(fi&&rb(),fi=setInterval(function(){var g=Jn(document.elementFromPoint(l,c),!0);g!==h&&(h=g,js()),$d(t,i.options,g,r)},10),Kd=l,Vd=c)}else{if(!this.options.bubbleScroll||Jn(d,!0)===Bn()){js();return}$d(t,this.options,Jn(d,!1),!1)}}},Hn(a,{pluginName:"scroll",initializeByDefault:!0})}function js(){lt.forEach(function(a){clearInterval(a.pid)}),lt=[]}function rb(){clearInterval(fi)}var $d=Ky(function(a,e,t,r){if(e.scroll){var i=(a.touches?a.touches[0]:a).clientX,l=(a.touches?a.touches[0]:a).clientY,c=e.scrollSensitivity,d=e.scrollSpeed,h=Bn(),g=!1,m;Ud!==t&&(Ud=t,js(),di=e.scroll,m=e.scrollFn,di===!0&&(di=Jn(t,!0)));var y=0,b=di;do{var T=b,k=at(T),x=k.top,S=k.bottom,R=k.left,O=k.right,H=k.width,P=k.height,$=void 0,j=void 0,U=T.scrollWidth,M=T.scrollHeight,X=me(T),ae=T.scrollLeft,G=T.scrollTop;T===h?($=H<U&&(X.overflowX==="auto"||X.overflowX==="scroll"||X.overflowX==="visible"),j=P<M&&(X.overflowY==="auto"||X.overflowY==="scroll"||X.overflowY==="visible")):($=H<U&&(X.overflowX==="auto"||X.overflowX==="scroll"),j=P<M&&(X.overflowY==="auto"||X.overflowY==="scroll"));var ke=$&&(Math.abs(O-i)<=c&&ae+H<U)-(Math.abs(R-i)<=c&&!!ae),Z=j&&(Math.abs(S-l)<=c&&G+P<M)-(Math.abs(x-l)<=c&&!!G);if(!lt[y])for(var Te=0;Te<=y;Te++)lt[Te]||(lt[Te]={});(lt[y].vx!=ke||lt[y].vy!=Z||lt[y].el!==T)&&(lt[y].el=T,lt[y].vx=ke,lt[y].vy=Z,clearInterval(lt[y].pid),(ke!=0||Z!=0)&&(g=!0,lt[y].pid=setInterval(function(){r&&this.layer===0&&ve.active._onTouchMove(zs);var Re=lt[this.layer].vy?lt[this.layer].vy*d:0,xe=lt[this.layer].vx?lt[this.layer].vx*d:0;typeof m=="function"&&m.call(ve.dragged.parentNode[Mt],xe,Re,a,zs,lt[this.layer].el)!=="continue"||Vy(lt[this.layer].el,xe,Re)}.bind({layer:y}),24))),y++}while(e.bubbleScroll&&b!==h&&(b=Jn(b,!1)));Wd=g}},30),ob=function(e){var t=e.originalEvent,r=e.putSortable,i=e.dragEl,l=e.activeSortable,c=e.dispatchSortableEvent,d=e.hideGhostForTarget,h=e.unhideGhostForTarget;if(t){var g=r||l;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,y=document.elementFromPoint(m.clientX,m.clientY);h(),g&&!g.el.contains(y)&&(c("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function Gd(){}Gd.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=uo(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),r&&r.animateAll()},drop:ob},Hn(Gd,{pluginName:"revertOnSpill"});function Xd(){}Xd.prototype={onSpill:function(e){var t=e.dragEl,r=e.putSortable,i=r||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:ob},Hn(Xd,{pluginName:"removeOnSpill"}),ve.mount(new pC),ve.mount(Xd,Gd);const ib="block-removed",gC="block-added",mC="block-moved",sb="block-changed";class ab{constructor(){this.tail=Promise.resolve()}get completed(){return this.failure?Promise.reject(this.failure):this.tail}add(e){if(this.failure)return Promise.reject(this.failure);const t=this.tail.then(()=>e());return this.tail=t.catch(r=>{this.failure=r}),t}}class vC extends Be{constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null,this.sortable=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this.blocksStore[0]}get lastBlock(){return this.blocksStore[this.blocksStore.length-1]}get currentBlock(){return this.blocksStore[this.currentBlockIndex]}set currentBlock(e){if(e===void 0){this.unsetCurrentBlock();return}this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){if(this.currentBlockIndex===this.blocksStore.length-1)return null;const t=this.blocksStore[this.currentBlockIndex+1];return t!=null?t:null}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find(t=>!!t.inputs.length)}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find(t=>!!t.inputs.length)}get previousBlock(){if(this.currentBlockIndex===0)return null;const t=this.blocksStore[this.currentBlockIndex-1];return t!=null?t:null}get blocks(){return this.blocksStore.array}get isBlokEmpty(){return this.blocks.every(e=>e.isEmpty)}prepare(){const e=new Nd(this.Blok.UI.nodes.redactor);this._blocks=new Proxy(e,{set:Nd.set,get:Nd.get}),this.listeners.on(document,"copy",t=>{this.Blok.BlockEvents.handleCommandC(t)}),this.sortable=new ve(this.Blok.UI.nodes.redactor,{animation:150,forceFallback:!0,handle:$x,onStart:()=>{this.Blok.UI.nodes.wrapper.setAttribute(Vv,"true"),Jo(!0)},onEnd:t=>{this.Blok.UI.nodes.wrapper.removeAttribute(Vv),!(t.newIndex===void 0||t.oldIndex===void 0)&&this.move(t.newIndex,t.oldIndex,!0)}})}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:r=void 0,tunes:i={}}){const l=this.Blok.ReadOnly.isEnabled,c=this.Blok.Tools.blockTools.get(e);if(c===void 0)throw new Error(`Could not compose Block. Tool «${e}» not found.`);const d=new Zo({id:r,data:t,tool:c,api:this.Blok.API,readOnly:l,tunesData:i},this.eventsDispatcher);return l||window.requestIdleCallback(()=>{this.bindBlockEvents(d)},{timeout:2e3}),d}insert({id:e=void 0,tool:t,data:r,index:i,needToFocus:l=!0,replace:c=!1,tunes:d}={}){const h=i!=null?i:this.currentBlockIndex+(c?0:1),g=t!=null?t:this.config.defaultBlock;if(g===void 0)throw new Error("Could not insert Block. Tool name is not specified.");const m={tool:g};e!==void 0&&(m.id=e),r!==void 0&&(m.data=r),d!==void 0&&(m.tunes=d);const y=this.composeBlock(m),b=c?this.getBlockByIndex(h):void 0;if(c&&b===void 0)throw new Error(`Could not replace Block at index ${h}. Block not found.`);return c&&b!==void 0&&this.blockDidMutated(ib,b,{index:h}),this.blocksStore.insert(h,y,c),this.blockDidMutated(gC,y,{index:h}),l&&(this.currentBlockIndex=h),!l&&h<=this.currentBlockIndex&&this.currentBlockIndex++,y}insertMany(e,t=0){this.blocksStore.insertMany(e,t)}async update(e,t,r){if(!t&&!r)return e;const i=await e.data,l=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},i,t!=null?t:{}),tunes:r!=null?r:e.tunes}),c=this.getBlockIndex(e);return this.blocksStore.replace(c,l),this.blockDidMutated(sb,l,{index:c}),l}replace(e,t,r){const i=this.getBlockIndex(e);return this.insert({tool:t,data:r,index:i,replace:!0})}get blocksStore(){if(this._blocks===null)throw new Error("BlockManager: blocks store is not initialized. Call prepare() before accessing blocks.");return this._blocks}async paste(e,t,r=!1){const i=this.insert({tool:e,replace:r});try{await i.ready,i.call(Pn.ON_PASTE,t),i.refreshToolRootElement()}catch(l){_e(`${e}: onPaste callback call is failed`,"error",l)}return i}insertDefaultBlockAtIndex(e,t=!1){const r=this.config.defaultBlock;if(r===void 0)throw new Error("Could not insert default Block. Default block tool is not defined in the configuration.");return this.insert({tool:r,index:e,needToFocus:t})}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){const r=async c=>{await e.mergeWith(c),await this.removeBlock(t),this.currentBlockIndex=this.blocksStore.indexOf(e)},i=e.name===t.name&&e.mergeable,l=i?await t.data:void 0;if(i&&it(l)){console.error("Could not merge Block. Failed to extract original Block data.");return}if(i&&l!==void 0){const[c]=sd([{data:l,tool:t.name}],e.tool.sanitizeConfig,this.config.sanitizer);await r(c.data);return}if(e.mergeable&&gs(t,"export")&&gs(e,"import")){const c=await t.exportDataAsString(),d=En(c,e.tool.sanitizeConfig),h=Jv(d,e.tool.conversionConfig);await r(h)}}removeBlock(e,t=!0){return new Promise(r=>{const i=this.blocksStore.indexOf(e);if(!this.validateIndex(i))throw new Error("Can't find a Block to remove");this.blocksStore.remove(i),e.destroy(),this.blockDidMutated(ib,e,{index:i}),this.currentBlockIndex>=i&&this.currentBlockIndex--;const l=this.blocks.length===0;l&&this.unsetCurrentBlock(),l&&t&&this.insert(),!l&&i===0&&(this.currentBlockIndex=0),r()})}removeSelectedBlocks(){const e=this.blocks.map((t,r)=>({block:t,index:r})).filter(({block:t})=>t.selected).sort((t,r)=>r.index-t.index);return e.forEach(({block:t})=>{this.removeBlock(t,!1)}),e.length>0?e[e.length-1].index:void 0}removeAllBlocks(){const e=i=>{i<0||(this.blocksStore.remove(i),e(i-1))};e(this.blocksStore.length-1),this.unsetCurrentBlock(),this.insert();const t=this.currentBlock,r=t==null?void 0:t.firstInput;r!==void 0&&r.focus()}split(){const e=this.Blok.Caret.extractFragmentFromCaretPosition(),t=L.make("div");t.appendChild(e);const r={text:L.isEmpty(t)?"":t.innerHTML};return this.insert({data:r})}getBlockByIndex(e){const t=e===-1?this.blocksStore.length-1:e;return this.blocksStore[t]}getBlockIndex(e){return this.blocksStore.indexOf(e)}getBlockById(e){return this.blocksStore.array.find(t=>t.id===e)}getBlock(e){const t=L.isElement(e)?e:e.parentNode;if(!t)return;const r=this.blocksStore.nodes,i=t.closest(Xu);if(!i)return;const l=r.indexOf(i);if(l>=0)return this.blocksStore[l]}setCurrentBlockByChildNode(e){const t=L.isElement(e)?e:e.parentNode;if(!t)return;const r=t.closest(Xu);if(!r)return;const i=r.closest(Kt);if(!(i==null?void 0:i.isEqualNode(this.Blok.UI.nodes.wrapper))||!(r instanceof HTMLElement))return;this.currentBlockIndex=this.blocksStore.nodes.indexOf(r);const c=this.currentBlock;return c==null||c.updateCurrentInput(),c}getBlockByChildNode(e){if(!(e instanceof Node))return;const t=L.isElement(e)?e:e.parentNode;if(!t)return;const r=t.closest(Xu);if(r)return this.blocks.find(i=>i.holder===r)}move(e,t=this.currentBlockIndex,r=!1){if(isNaN(e)||isNaN(t)){_e("Warning during 'move' call: incorrect indices provided.","warn");return}if(!this.validateIndex(e)||!this.validateIndex(t)){_e("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn");return}this.blocksStore.move(e,t,r),this.currentBlockIndex=e;const i=this.currentBlock;if(i===void 0)throw new Error(`Could not move Block. Block at index ${e} is not available.`);this.blockDidMutated(mC,i,{fromIndex:t,toIndex:e})}async convert(e,t,r){const i=await e.save();if(!i||i.data===void 0)throw new Error("Could not convert Block. Failed to extract original Block data.");const l=this.Blok.Tools.blockTools.get(t);if(!l)throw new Error(`Could not convert Block. Tool «${t}» not found.`);const c=await e.exportDataAsString(),d=En(c,ud(this.config.sanitizer,l.sanitizeConfig)),h=Jv(d,l.conversionConfig,l.settings),g=r?Object.assign(h,r):h;return this.replace(e,l.name,g)}unsetCurrentBlock(){this.currentBlockIndex=-1}async clear(e=!1){const t=new ab;[...this.blocks].forEach(i=>{t.add(async()=>{await this.removeBlock(i,!1)})}),await t.completed,this.unsetCurrentBlock(),e&&this.insert(),this.Blok.UI.checkEmptiness()}async destroy(){this.sortable&&(this.sortable.destroy(),this.sortable=null),await Promise.all(this.blocks.map(e=>e.destroy()))}bindBlockEvents(e){const{BlockEvents:t}=this.Blok;this.readOnlyMutableListeners.on(e.holder,"keydown",r=>{r instanceof KeyboardEvent&&t.keydown(r)}),this.readOnlyMutableListeners.on(e.holder,"keyup",r=>{r instanceof KeyboardEvent&&t.keyup(r)}),e.on("didMutated",r=>this.blockDidMutated(sb,r,{index:this.getBlockIndex(r)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",e=>{this.Blok.BlockEvents.handleCommandX(e)}),this.blocks.forEach(e=>{this.bindBlockEvents(e)})}validateIndex(e){return!(e<0||e>=this.blocksStore.length)}blockDidMutated(e,t,r){const i=de({target:new Ln(t)},r),l=new CustomEvent(e,{detail:de({},i)});return Object.prototype.propertyIsEnumerable.call(l,"type")||Object.defineProperty(l,"type",{value:e,enumerable:!0,configurable:!0}),Object.prototype.propertyIsEnumerable.call(l,"detail")||Object.defineProperty(l,"detail",{value:i,enumerable:!0,configurable:!0}),this.eventsDispatcher.emit(td,{event:l}),t}}class yC extends Be{constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1,this.selection=new le}get sanitizerConfig(){const e={p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}};return ud(this.config.sanitizer,e)}get allBlocksSelected(){const{BlockManager:e}=this.Blok;return e.blocks.every(t=>t.selected===!0)}set allBlocksSelected(e){const{BlockManager:t}=this.Blok;for(const r of t.blocks)r.selected=e;this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Blok;return this.anyBlockSelectedCache===null&&(this.anyBlockSelectedCache=e.blocks.some(t=>t.selected===!0)),this.anyBlockSelectedCache}get selectedBlocks(){return this.Blok.BlockManager.blocks.filter(e=>e.selected)}prepare(){this.selection=new le,Fn.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:r}=this.Blok;if(r.isEnabled){e.preventDefault(),this.selectAllBlocks();return}t.currentBlock&&this.handleCommandA(e)},on:this.Blok.UI.nodes.redactor})}toggleReadOnly(){const e=le.get();e==null||e.removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Blok,r=typeof e=="number"?t.getBlockByIndex(e):t.currentBlock;r&&(r.selected=!1,this.clearCache())}clearSelection(e,t=!1){const{RectangleSelection:r}=this.Blok;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const i=e&&e instanceof KeyboardEvent,l=e,c=i&&l.key&&l.key.length===1;if(this.anyBlockSelected&&i&&c&&!le.isSelectionExists&&this.replaceSelectedBlocksWithPrintableKey(e),this.Blok.CrossBlockSelection.clear(e),t&&this.selection.restore(),!this.anyBlockSelected||r.isRectActivated()){this.Blok.RectangleSelection.clearSelection();return}this.allBlocksSelected=!1}async copySelectedBlocks(e){e.preventDefault();const t=e.clipboardData;if(!t)return;const r=L.make("div"),i=[];this.selectedBlocks.forEach(d=>{var T;const h=En(d.holder.innerHTML,this.sanitizerConfig),g=L.make("div");g.innerHTML=h;const m=(T=g.textContent)!=null?T:"";if(i.push(m),!Array.from(g.childNodes).some(k=>k.nodeType===Node.ELEMENT_NODE)&&m.trim().length>0){const k=L.make("p");k.innerHTML=g.innerHTML,r.appendChild(k)}else for(;g.firstChild;)r.appendChild(g.firstChild)});const l=i.join(`
180
180
 
181
- `),c=o.innerHTML;t.setData("text/plain",l),t.setData("text/html",c);try{const d=await Promise.all(this.selectedBlocks.map(h=>h.save()));t.setData(this.Blok.Paste.MIME_TYPE,JSON.stringify(d))}catch(d){}}selectBlockByIndex(e){const{BlockManager:t}=this.Blok,o=t.getBlockByIndex(e);o!==void 0&&this.selectBlock(o)}selectBlock(e){this.selection.save();const t=se.get();t==null||t.removeAllRanges();const o=e;o.selected=!0,this.clearCache(),this.Blok.InlineToolbar.close()}unselectBlock(e){const t=e;t.selected=!1,this.clearCache()}clearCache(){this.anyBlockSelectedCache=null}destroy(){io.remove(this.Blok.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Blok.RectangleSelection.clearSelection(),N.isNativeInput(e.target)&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}const t=this.Blok.BlockManager.getBlock(e.target);if(!t)return;const o=t.inputs;if(o.length>1&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}if(o.length===1&&!this.needToSelectAll){this.needToSelectAll=!0;return}if(this.needToSelectAll){e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1;return}this.readyToBlockSelection&&(e.preventDefault(),this.selectBlock(t),this.needToSelectAll=!0)}selectAllBlocks(){this.selection.save();const e=se.get();e==null||e.removeAllRanges(),this.allBlocksSelected=!0,this.Blok.InlineToolbar.close()}replaceSelectedBlocksWithPrintableKey(e){const{BlockManager:t,Caret:o}=this.Blok,i=t.removeSelectedBlocks();if(i===void 0)return;t.insertDefaultBlockAtIndex(i,!0);const l=t.currentBlock;l&&o.setToBlock(l),cs(()=>{const c=e.key;o.insertContentAtCaretPosition(c.length>1?"":c)},20)()}}const pC=127,ob=a=>{for(const e of a){if(e.trim().length===0)continue;if(e>="0"&&e<="9"||e.toLowerCase()!==e.toUpperCase())return!1;const t=e.codePointAt(0);if(typeof t=="number"&&t>pC)return!1}return!0},ib=a=>{var e;return a.nodeType===Node.TEXT_NODE?[a]:(e=a.hasChildNodes)!=null&&e.call(a)?Array.from(a.childNodes).flatMap(t=>ib(t)):[]},gC=a=>{var i,l;const e=ib(a);if(e.length===0)return null;const t=e[e.length-1],o=(i=[...e].reverse().find(c=>{var d;return!ob((d=c.textContent)!=null?d:"")}))!=null?i:null;return o&&o!==t&&ob((l=t.textContent)!=null?l:"")&&o.parentNode!==a?o:t};class Xd extends Se{get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get DATA_ATTR(){return{shadowCaret:"data-blok-shadow-caret"}}setToBlock(e,t=this.positions.DEFAULT,o=0){var y;const{BlockManager:i,BlockSelection:l}=this.Blok;if(l.clearSelection(),!e.focusable){(y=window.getSelection())==null||y.removeAllRanges(),l.selectBlock(e),i.currentBlock=e;return}const d=t===this.positions.START?e.firstInput:t===this.positions.END?e.lastInput:e.currentInput;if(!d)return;const h=b=>{if(t===this.positions.START)return{node:N.getDeepestNode(b,!1),offset:0};if(t===this.positions.END)return this.resolveEndPositionNode(b);const{node:x,offset:w}=N.getNodeByOffset(b,o);return x?{node:x,offset:w}:{node:N.getDeepestNode(b,!1),offset:0}},{node:g,offset:v}=h(d);g&&(this.set(g,v),i.setCurrentBlockByChildNode(e.holder),i.currentBlock.currentInput=d)}resolveEndPositionNode(e){const t=N.getDeepestNode(e,!0);if(t instanceof HTMLElement&&N.isNativeInput(t))return{node:t,offset:N.getContentLength(t)};const o=gC(e);return o?{node:o,offset:N.getContentLength(o)}:t?{node:t,offset:N.getContentLength(t)}:{node:null,offset:0}}setToInput(e,t=this.positions.DEFAULT,o=0){const{currentBlock:i}=this.Blok.BlockManager,l=N.getDeepestNode(e);switch(t){case this.positions.START:this.set(l,0);break;case this.positions.END:l&&this.set(l,N.getContentLength(l));break;default:o&&this.set(l,o)}i&&(i.currentInput=e)}set(e,t=0){const{top:i,bottom:l}=se.setCursor(e,t),{innerHeight:c}=window;if(i<0){window.scrollBy(0,i-30);return}l>c&&window.scrollBy(0,l-c+30)}setToTheLastBlock(){const e=this.Blok.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const t=this.Blok.BlockManager.insertAtEnd();this.setToBlock(t)}}extractFragmentFromCaretPosition(){var c;const e=se.get();if(!e||!e.rangeCount)return;const t=e.getRangeAt(0),o=this.Blok.BlockManager.currentBlock;if(!o)return;const i=o.currentInput;if(t.deleteContents(),!i)return;if(N.isNativeInput(i)){const d=i,h=document.createDocumentFragment(),g=(c=d.selectionStart)!=null?c:0,v=d.value.substring(0,g),y=d.value.substring(g);return h.textContent=y,d.value=v,h}const l=t.cloneRange();return l.selectNodeContents(i),l.setStart(t.endContainer,t.endOffset),l.extractContents()}navigateNext(e=!1){const{BlockManager:t}=this.Blok,{currentBlock:o,nextBlock:i}=t;if(o===void 0)return!1;const{nextInput:l,currentInput:c}=o,d=c!==void 0?Es(c):void 0,h=e||d||!o.focusable;if(l&&h)return this.setToInput(l,this.positions.START),!0;const v=i!==null?i:o.tool.isDefault||!h?null:t.insertAtEnd();return v!==null&&h?(this.setToBlock(v,this.positions.START),!0):!1}navigatePrevious(e=!1){const{currentBlock:t,previousBlock:o}=this.Blok.BlockManager;if(!t)return!1;const{previousInput:i,currentInput:l}=t,c=l!==void 0?xs(l):void 0,d=e||c||!t.focusable;return i&&d?(this.setToInput(i,this.positions.END),!0):o!==null&&d?(this.setToBlock(o,this.positions.END),!0):!1}createShadow(e){const t=document.createElement("span");t.setAttribute(Xd.DATA_ATTR.shadowCaret,""),t.setAttribute("data-blok-testid","shadow-caret"),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector('[data-blok-testid="shadow-caret"]');if(!t)return;new se().expandToTag(t);const i=document.createRange();i.selectNode(t),i.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),o=document.createElement("div"),i=se.get(),l=se.range;if(!i||!l)return;o.innerHTML=e,Array.from(o.childNodes).forEach(g=>t.appendChild(g)),t.childNodes.length===0&&t.appendChild(new Text);const c=t.lastChild;l.deleteContents(),l.insertNode(t);const d=document.createRange(),h=c.nodeType===Node.TEXT_NODE?c:c.firstChild;h!==null&&h.textContent!==null&&d.setStart(h,h.textContent.length),i.removeAllRanges(),i.addRange(d)}}class mC extends Se{constructor(){super(...arguments),this.firstSelectedBlock=null,this.lastSelectedBlock=null,this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{var d;const t=e,{BlockManager:o,BlockSelection:i}=this.Blok;if(t.relatedTarget===null&&t.target===null)return;const l=o.getBlockByChildNode(t.relatedTarget)||this.lastSelectedBlock,c=o.getBlockByChildNode(t.target);if(!(!l||!c)&&c!==l){if(this.firstSelectedBlock&&l===this.firstSelectedBlock){(d=se.get())==null||d.removeAllRanges(),l.selected=!0,c.selected=!0,i.clearCache();return}if(this.firstSelectedBlock&&c===this.firstSelectedBlock){l.selected=!1,c.selected=!1,i.clearCache();return}this.Blok.InlineToolbar.close(),this.toggleBlocksSelectedState(l,c),this.lastSelectedBlock=c}}}async prepare(){this.listeners.on(document,"mousedown",e=>{this.enableCrossBlockSelection(e)})}watchSelection(e){if(e.button!==B1.LEFT)return;const{BlockManager:t}=this.Blok,o=t.getBlock(e.target);o&&(this.firstSelectedBlock=o,this.lastSelectedBlock=o,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp))}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock&&this.firstSelectedBlock!==this.lastSelectedBlock}toggleBlockSelectedState(e=!0){var d;const{BlockManager:t,BlockSelection:o}=this.Blok,i=t.currentBlock;if(!this.lastSelectedBlock&&!i||(!this.lastSelectedBlock&&i&&(this.lastSelectedBlock=this.firstSelectedBlock=i),this.firstSelectedBlock===this.lastSelectedBlock&&this.firstSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),(d=se.get())==null||d.removeAllRanges(),this.Blok.Toolbar.close()),!this.lastSelectedBlock))return;const l=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),c=t.blocks[l];c&&(this.lastSelectedBlock.selected!==c.selected?(c.selected=!0,o.clearCache(),this.Blok.Toolbar.close()):(this.lastSelectedBlock.selected=!1,o.clearCache(),this.Blok.Toolbar.close()),this.lastSelectedBlock=c,this.Blok.InlineToolbar.close(),c.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:o,Caret:i}=this.Blok;if(!this.firstSelectedBlock||!this.lastSelectedBlock)return;const l=t.blocks.indexOf(this.firstSelectedBlock),c=t.blocks.indexOf(this.lastSelectedBlock);if(!o.anyBlockSelected||l===-1||c===-1){this.firstSelectedBlock=this.lastSelectedBlock=null;return}if(e&&e instanceof KeyboardEvent)switch(e.key){case"ArrowDown":case"ArrowRight":i.setToBlock(t.blocks[Math.max(l,c)],i.positions.END);break;case"ArrowUp":case"ArrowLeft":i.setToBlock(t.blocks[Math.min(l,c)],i.positions.START);break;default:i.setToBlock(t.blocks[Math.max(l,c)],i.positions.END)}this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Blok;se.isCollapsed||this.Blok.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Blok.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:o,BlockSelection:i}=this.Blok,l=o.blocks.indexOf(e),c=o.blocks.indexOf(t),d=e.selected!==t.selected,h=Math.min(l,c),g=Math.max(l,c);for(const v of Array.from({length:g-h+1},(y,b)=>h+b)){const y=o.blocks[v];y!==this.firstSelectedBlock&&y!==(d?e:t)&&(o.blocks[v].selected=!o.blocks[v].selected,i.clearCache())}this.Blok.Toolbar.close()}}class vC extends Se{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=Bx,this.mutationObserver=new MutationObserver(o=>{this.redactorChanged(o)}),this.eventsDispatcher.on($v,o=>{this.particularBlockChanged(o.event)}),this.eventsDispatcher.on(Gv,()=>{this.disable()}),this.eventsDispatcher.on(Xv,()=>{this.enable()})}enable(){this.mutationObserver.observe(this.Blok.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!De(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout(()=>{const t=Array.from(this.batchingOnChangeQueue.values());if(t.length===0)return;const o=t.length===1?t[0]:t;this.config.onChange&&this.config.onChange(this.Blok.API.methods,o),this.batchingOnChangeQueue.clear()},this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(Ju,{mutations:e})}}const sb=new Set(["table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","ul","ol","li","dl","dt","dd"]),qs=class qs extends Se{constructor(){super(...arguments),this.MIME_TYPE="application/x-blok",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.handlePasteEventWrapper=e=>{this.handlePasteEvent(e)},this.processTool=e=>{try{if(e.pasteConfig===!1){this.exceptionList.push(e.name);return}if(!e.hasOnPasteHandler)return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){Be(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:o}=this.Blok,i=t.setCurrentBlockByChildNode(e.target);!i||e.target&&this.isNativeBehaviour(e.target)&&e.clipboardData&&!e.clipboardData.types.includes("Files")||this.exceptionList.includes(i.name)||(e.preventDefault(),e.clipboardData&&await this.processDataTransfer(e.clipboardData),o.close())}}async prepare(){this.processTools()}shouldReplaceCurrentBlockForFile(e){const{BlockManager:t}=this.Blok,o=t.currentBlock;return o?e&&o.name===e?!0:!!o.tool.isDefault&&o.isEmpty:!1}getStructuralTagsSanitizeConfig(e){var i;const t={},o=[e];for(;o.length>0;){const l=o.pop();if(!l)continue;const c=l.tagName.toLowerCase();sb.has(c)&&(t[c]=(i=t[c])!=null?i:{}),o.push(...Array.from(l.children))}return t}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}containsFiles(e){var o;if(Array.from(e.types).includes("Files")||(o=e.files)!=null&&o.length)return!0;try{const i=e.types;if(typeof(i==null?void 0:i.contains)=="function"&&i.contains("Files"))return!0}catch(i){}return!1}async processDataTransfer(e){const{Tools:t}=this.Blok;if(this.containsFiles(e)&&!ot(this.toolsFiles)){await this.processFiles(e.files);return}const i=e.getData(this.MIME_TYPE),l=e.getData("text/plain"),d=e.getData("text/html");if(i)try{this.insertBlokData(JSON.parse(i));return}catch(w){}const h=Object.fromEntries(Object.keys(this.toolsTags).map(w=>{var T;return[w.toLowerCase(),(T=this.toolsTags[w].sanitizationConfig)!=null?T:{}]})),g=t.getAllInlineToolsSanitizeConfig(),v=ld(this.config.sanitizer,h,g,{br:{}}),y=Tn(d,v),b=N.isHTMLString(y);!y.trim()||y.trim()===l||!b?await this.processText(l):await this.processText(y,!0)}async processText(e,t=!1){var d,h;const{Caret:o,BlockManager:i}=this.Blok,l=t?this.processHTML(e):this.processPlain(e);if(!l.length)return;if(l.length>1){const v=!!((d=i.currentBlock)!=null&&d.tool.isDefault)&&!!((h=i.currentBlock)!=null&&h.isEmpty);for(const[y,b]of l.entries())await this.insertBlock(b,y===0&&v);i.currentBlock&&o.setToBlock(i.currentBlock,o.positions.END);return}const[c]=l;if(c.isBlock){await this.processSingleBlock(c);return}await this.processInlinePaste(c)}setCallback(){this.listeners.on(this.Blok.UI.nodes.holder,"paste",this.handlePasteEventWrapper)}unsetCallback(){this.listeners.off(this.Blok.UI.nodes.holder,"paste",this.handlePasteEventWrapper)}processTools(){const e=this.Blok.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return un(e)?[e]:qe(e)?Object.keys(e):[]}getTagsConfig(e){if(e.pasteConfig===!1)return;const t=e.pasteConfig.tags||[],o=[];t.forEach(i=>{const l=this.collectTagNames(i);o.push(...l),l.forEach(c=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,c)){Be(`Paste handler for «${e.name}» Tool on «${c}» tag is skipped because it is already used by «${this.toolsTags[c].tool.name}» Tool.`,"warn");return}const d=qe(i)?i[c]:void 0;this.toolsTags[c.toUpperCase()]={tool:e,sanitizationConfig:d}})}),this.tagsByTool[e.name]=o.map(i=>i.toUpperCase())}getFilesConfig(e){if(e.pasteConfig===!1)return;const{files:t={}}=e.pasteConfig,{extensions:o,mimeTypes:i}=t;if(!o&&!i)return;const l=o==null?[]:Array.isArray(o)?o:(Be(`«extensions» property of the paste config for «${e.name}» Tool should be an array`),[]),c=i==null?[]:Array.isArray(i)?i.filter(d=>O1(d)?!0:(Be(`MIME type value «${d}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1)):(Be(`«mimeTypes» property of the paste config for «${e.name}» Tool should be an array`),[]);this.toolsFiles[e.name]={extensions:l,mimeTypes:c}}getPatternsConfig(e){e.pasteConfig===!1||!e.pasteConfig.patterns||ot(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach(([t,o])=>{o instanceof RegExp||Be(`Pattern ${o} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:o,tool:e})})}isNativeBehaviour(e){return N.isNativeInput(e)}async processFiles(e){var c;const{BlockManager:t}=this.Blok,i=(await Promise.all(Array.from(e).map(d=>this.processFile(d)))).filter(d=>d!=null);if(i.length===0)return;const l=this.shouldReplaceCurrentBlockForFile((c=i[0])==null?void 0:c.type);for(const[d,h]of i.entries())await t.paste(h.type,h.event,d===0&&l)}async processFile(e){const t=N1(e),o=Object.entries(this.toolsFiles).find(([c,{mimeTypes:d,extensions:h}])=>{const[g,v]=e.type.split("/"),y=h.find(x=>x.toLowerCase()===t.toLowerCase()),b=d.find(x=>{const[w,T]=x.split("/");return w===g&&(T===v||T==="*")});return y!==void 0||b!==void 0});if(!o)return;const[i]=o;return{event:this.composePasteEvent("file",{file:e}),type:i}}processHTML(e){const{Tools:t}=this.Blok,o=N.make("DIV");return o.innerHTML=e,this.getNodes(o).map(l=>{var S;const c=(()=>{var O;switch(l.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:{const L=N.make("div");return L.appendChild(l),{content:L,tool:t.defaultTool,isBlock:!1}}case Node.ELEMENT_NODE:{const L=l,U=this.toolsTags[L.tagName];return{content:L,tool:(O=U==null?void 0:U.tool)!=null?O:t.defaultTool,isBlock:!0}}default:return null}})();if(!c)return null;const{content:d,tool:h,isBlock:g}=c,y=(h.pasteConfig===!1?[]:((S=h.pasteConfig)==null?void 0:S.tags)||[]).reduce((O,L)=>{const U=this.collectTagNames(L),H=be({},O);return U.forEach(X=>{const q=qe(L)?L[X]:null;H[X.toLowerCase()]=q!=null?q:{}}),H},{}),b=this.getStructuralTagsSanitizeConfig(d),x=Object.assign({},b,y,h.baseSanitizeConfig),w=(()=>{if(d.tagName.toLowerCase()!=="table")return d.innerHTML=Tn(d.innerHTML,x),d;const O=Tn(d.outerHTML,x),U=N.make("div",void 0,{innerHTML:O}).firstChild;return!U||!(U instanceof HTMLElement)?null:U})();if(!w)return null;const T=this.composePasteEvent("tag",{data:w});return{content:w,isBlock:g,tool:h.name,event:T}}).filter(l=>{if(!l)return!1;const c=N.isEmpty(l.content),d=N.isSingleTag(l.content);return!c||d})}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const o=t;return e.split(/\r?\n/).filter(i=>i.trim()).map(i=>{const l=N.make("div");l.textContent=i;const c=this.composePasteEvent("tag",{data:l});return{content:l,tool:o,isBlock:!1,event:c}})}async processSingleBlock(e){const{Caret:t,BlockManager:o}=this.Blok,{currentBlock:i}=o;if(!i||e.tool!==i.name||!N.containsOnlyInlineElements(e.content.innerHTML)){await this.insertBlock(e,i?i.tool.isDefault&&i.isEmpty:!1);return}t.insertContentAtCaretPosition(e.content.innerHTML)}async processInlinePaste(e){var g,v;const{BlockManager:t,Caret:o}=this.Blok,{content:i}=e,l=(v=(g=t.currentBlock)==null?void 0:g.tool.isDefault)!=null?v:!1,c=i.textContent,h=l&&c!==null&&c.length<qs.PATTERN_PROCESSING_MAX_LENGTH&&c!==null?await this.processPattern(c):void 0;if(h){const y=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty,b=await t.paste(h.tool,h.event,y);o.setToBlock(b,o.positions.END);return}if(t.currentBlock&&t.currentBlock.currentInput){const y=t.currentBlock.tool.baseSanitizeConfig;o.insertContentAtCaretPosition(Tn(i.innerHTML,y))}else await this.insertBlock(e)}async processPattern(e){const t=this.toolsPatterns.find(i=>{const l=i.pattern.exec(e);return l?e===l.shift():!1});return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}async insertBlock(e,t=!1){const{BlockManager:o,Caret:i}=this.Blok,{currentBlock:l}=o;if(t&&l&&l.isEmpty){const d=await o.paste(e.tool,e.event,!0);i.setToBlock(d,i.positions.END);return}const c=await o.paste(e.tool,e.event);i.setToBlock(c,i.positions.END)}insertBlokData(e){const{BlockManager:t,Caret:o,Tools:i}=this.Blok;od(e,c=>{var d,h;return(h=(d=i.blockTools.get(c))==null?void 0:d.sanitizeConfig)!=null?h:{}},this.config.sanitizer).forEach(({tool:c,data:d},h)=>{var y,b;const g=h===0&&!!((y=t.currentBlock)!=null&&y.tool.isDefault)&&!!((b=t.currentBlock)!=null&&b.isEmpty),v=t.insert({tool:c,data:d,replace:g});o.setToBlock(v,o.positions.END)})}processElementNode(e,t,o){var w,T;const i=Object.keys(this.toolsTags),l=e,c=this.toolsTags[l.tagName],d=c==null?void 0:c.tool,h=(T=this.tagsByTool[(w=d==null?void 0:d.name)!=null?w:""])!=null?T:[],g=i.includes(l.tagName),v=N.blockElements.includes(l.tagName.toLowerCase()),y=sb.has(l.tagName.toLowerCase()),b=Array.from(l.children).some(({tagName:S})=>i.includes(S)&&!h.includes(S)),x=Array.from(l.children).some(({tagName:S})=>N.blockElements.includes(S.toLowerCase()));if(!v&&!g&&!b)return o.appendChild(l),[...t,o];if(g&&!b||v&&!x&&!b||y&&!b)return[...t,o,l]}getNodes(e){const t=Array.from(e.childNodes),o=(i,l)=>{if(N.isEmpty(l)&&!N.isSingleTag(l))return i;const c=i[i.length-1],d=c!==void 0&&N.isFragment(c),{destNode:h,remainingNodes:g}=d?{destNode:c,remainingNodes:i.slice(0,-1)}:{destNode:new DocumentFragment,remainingNodes:i};if(l.nodeType===Node.TEXT_NODE)return h.appendChild(l),[...g,h];if(l.nodeType!==Node.ELEMENT_NODE)return[...g,h];const v=this.processElementNode(l,g,h);if(v)return v;const y=Array.from(l.childNodes).reduce(o,[]);return[...g,...y]};return t.reduce(o,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};qs.PATTERN_PROCESSING_MAX_LENGTH=450;let Yd=qs;class yC extends Se{constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Blok,{blockTools:t}=e,o=[];Array.from(t.entries()).forEach(([i,l])=>{l.isReadOnlySupported||o.push(i)}),this.toolsDontSupportReadOnly=o,this.config.readOnly===!0&&o.length>0&&this.throwCriticalError(),await this.toggle(this.config.readOnly,!0)}async toggle(e=!this.readOnlyEnabled,t=!1){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const o=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const l of Object.values(this.Blok))l!=null&&typeof l.toggleReadOnly=="function"&&l.toggleReadOnly(e);if(o===e)return this.readOnlyEnabled;if(t)return this.readOnlyEnabled;this.Blok.ModificationsObserver.disable();const i=await this.Blok.Saver.save();return i===void 0?(this.Blok.ModificationsObserver.enable(),this.readOnlyEnabled):(await this.Blok.BlockManager.clear(),await this.Blok.Renderer.render(i.blocks),this.Blok.ModificationsObserver.enable(),this.readOnlyEnabled)}throwCriticalError(){throw new Vo(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}}class bC extends Se{constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.rectCrossesBlocks=!1,this.overlayRectangle=null,this.listenerIds=[]}static get CSS(){return{overlay:"",overlayContainer:"",rect:"",topScrollZone:"",bottomScrollZone:""}}prepare(){this.enableModuleBindings()}startSelection(e,t){const o=this.getScrollLeft(),i=this.getScrollTop(),l=document.elementFromPoint(e-o,t-i);if(!l)return;l.closest(Wv)||(this.Blok.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const d=[Xu,Wv,jv],h=l.closest(qt),g=d.some(v=>!!l.closest(v));!h||g||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle!==null&&(this.overlayRectangle.style.display="none")}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",i=>{this.processMouseDown(i)},!1);const t=Hu(i=>{i instanceof MouseEvent&&this.processMouseMove(i)},10);this.listeners.on(document.body,"mousemove",t,{passive:!0}),this.listeners.on(document.body,"mouseleave",()=>{this.processMouseLeave()});const o=Hu(i=>{this.processScroll(i)},10);this.listeners.on(window,"scroll",o,{passive:!0}),this.listeners.on(document.body,"mouseup",()=>{this.processMouseUp()},!1)}processMouseDown(e){if(e.button!==this.MAIN_MOUSE_BUTTON)return;e.target.closest(N.allInputsSelector)!==null||this.startSelection(e.pageX,e.pageY)}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){if(this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),!this.inScrollZone){this.isScrolling=!1;return}this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0)}genHTML(){const{UI:e}=this.Blok,t=e.nodes.holder.querySelector(qt),o=N.make("div",["fixed","inset-0","z-overlay","pointer-events-none","overflow-hidden"],{}),i=N.make("div",["relative","pointer-events-auto","z-0"],{}),l=N.make("div",["absolute","pointer-events-none","bg-selection-highlight","border","border-transparent"],{});if(o.setAttribute(Mx,""),i.setAttribute(Fx,""),l.setAttribute(zx,""),o.setAttribute("data-blok-testid","overlay"),l.setAttribute("data-blok-testid","overlay-rectangle"),!t)throw new Error("RectangleSelection: blok wrapper not found");return i.appendChild(l),o.appendChild(i),t.appendChild(o),this.overlayRectangle=l,{container:t,overlay:o}}scrollVertical(e){if(!(this.inScrollZone&&this.mousedown))return;const t=this.getScrollTop();window.scrollBy(0,e),this.mouseY+=this.getScrollTop()-t,setTimeout(()=>{this.scrollVertical(e)},0)}changingRectangle(e){if(!this.mousedown)return;const t=this.overlayRectangle;if(t===null)return;e.pageY!==void 0&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:o,leftPos:i,index:l}=this.genInfoForMouseSelection(),c=this.startX>o&&this.mouseX>o,d=this.startX<i&&this.mouseX<i;if(this.rectCrossesBlocks=!(c||d),this.isRectSelectionActivated||(this.rectCrossesBlocks=!1,this.isRectSelectionActivated=!0,this.shrinkRectangleToPoint(),t.style.display="block"),this.updateRectangleSize(),this.Blok.Toolbar.close(),l===void 0)return;this.trySelectNextBlock(l),this.inverseSelection();const h=se.get();h&&h.removeAllRanges()}shrinkRectangleToPoint(){if(this.overlayRectangle===null)return;const e=this.getScrollLeft(),t=this.getScrollTop();this.overlayRectangle.style.left=`${this.startX-e}px`,this.overlayRectangle.style.top=`${this.startY-t}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-t}px)`,this.overlayRectangle.style.right=`calc(100% - ${this.startX-e}px)`}inverseSelection(){if(this.stackOfSelected.length===0)return;const e=this.Blok.BlockManager.getBlockByIndex(this.stackOfSelected[0]);if(!e)return;const t=e.selected;if(this.rectCrossesBlocks&&!t)for(const o of this.stackOfSelected)this.Blok.BlockSelection.selectBlockByIndex(o);if(!this.rectCrossesBlocks&&t)for(const o of this.stackOfSelected)this.Blok.BlockSelection.unSelectBlockByIndex(o)}updateRectangleSize(){if(this.overlayRectangle===null)return;const e=this.getScrollLeft(),t=this.getScrollTop();this.mouseY>=this.startY?(this.overlayRectangle.style.top=`${this.startY-t}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-t}px)`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-t}px)`,this.overlayRectangle.style.top=`${this.mouseY-t}px`),this.mouseX>=this.startX?(this.overlayRectangle.style.left=`${this.startX-e}px`,this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-e}px)`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-e}px)`,this.overlayRectangle.style.left=`${this.mouseX-e}px`)}genInfoForMouseSelection(){var w;const t=document.body.offsetWidth/2,o=this.getScrollTop(),i=this.mouseY-o,l=document.elementFromPoint(t,i),c=(w=this.Blok.BlockManager.lastBlock)==null?void 0:w.holder,d=c==null?void 0:c.querySelector(Xu),g=(d?Number.parseInt(window.getComputedStyle(d).width,10):0)/2,v=t-g,y=t+g;if(!l)return{index:void 0,leftPos:v,rightPos:y};const b=this.Blok.BlockManager.getBlockByChildNode(l);return{index:b!==void 0?this.Blok.BlockManager.blocks.findIndex(T=>T.holder===b.holder):void 0,leftPos:v,rightPos:y}}getScrollTop(){var e,t,o,i;return typeof window.scrollY=="number"?window.scrollY:(i=(o=(e=document.documentElement)==null?void 0:e.scrollTop)!=null?o:(t=document.body)==null?void 0:t.scrollTop)!=null?i:0}getScrollLeft(){var e,t,o,i;return typeof window.scrollX=="number"?window.scrollX:(i=(o=(e=document.documentElement)==null?void 0:e.scrollLeft)!=null?o:(t=document.body)==null?void 0:t.scrollLeft)!=null?i:0}addBlockInSelection(e){this.rectCrossesBlocks&&this.Blok.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected.length,o=this.stackOfSelected[t-1];if(o===e)return;const l=this.stackOfSelected[t-2],c=l!==void 0&&o!==void 0?o-l>0:!1,d=t<=1,h=o!==void 0&&e>o&&c,g=o!==void 0&&e<o&&t>1&&!c,y=!(h||g||d);if(!y&&(o===void 0||e>o)){const w=o!==void 0?o+1:e;Array.from({length:e-w+1},(T,S)=>w+S).forEach(T=>{this.addBlockInSelection(T)});return}if(!y&&o!==void 0&&e<o){Array.from({length:o-e},(w,T)=>o-1-T).forEach(w=>{this.addBlockInSelection(w)});return}if(!y)return;const b=w=>o===void 0?!1:e>o?e>w:e<w,x=[];for(const w of[...this.stackOfSelected].reverse()){if(!b(w))break;this.rectCrossesBlocks&&this.Blok.BlockSelection.unSelectBlockByIndex(w),x.push(w)}x.length>0&&this.stackOfSelected.splice(this.stackOfSelected.length-x.length,x.length)}}class kC extends Se{render(e){return new Promise(t=>{const{Tools:o,BlockManager:i}=this.Blok;if(e.length===0)i.insert();else{const l=e.map(c=>{const{tunes:d,id:h}=c,g=c.type,v=o.available.has(g)?{tool:g,data:c.data}:(Qt(`Tool «${g}» is not found. Check 'tools' property at the Blok config.`,"warn"),{tool:o.stubTool,data:this.composeStubDataForTool(g,c.data,h)});return((b,x)=>{try{return i.composeBlock({id:h,tool:b,data:x,tunes:d})}catch(w){Be(`Block «${b}» skipped because of plugins error`,"error",{data:x,error:w});const T=this.composeStubDataForTool(b,x,h);return i.composeBlock({id:h,tool:o.stubTool,data:T,tunes:d})}})(v.tool,v.data)});i.insertMany(l)}window.requestIdleCallback(()=>{t()},{timeout:2e3})})}composeStubDataForTool(e,t,o){const{Tools:i}=this.Blok,l=(()=>{if(!i.unavailable.has(e))return e;const c=i.unavailable.get(e).toolbox;return c!==void 0&&c[0].title!==void 0?c[0].title:e})();return{savedData:{id:o,type:e,data:t},title:l}}}class wC extends Se{async save(){const{BlockManager:e,Tools:t}=this.Blok,o=e.blocks;if(o.length===1&&o[0].isEmpty)return{time:+new Date,blocks:[],version:as()};const i=o.map(l=>this.getSavedData(l));this.lastSaveError=void 0;try{const l=await Promise.all(i),c=this.sanitizeExtractedData(l,d=>{var h;return(h=t.blockTools.get(d))==null?void 0:h.sanitizeConfig},this.config.sanitizer);return this.makeOutput(c)}catch(l){this.lastSaveError=l;const c=l instanceof Error?l:new Error(String(l));Qt("Saving failed due to the Error %o","error",c);return}}async getSavedData(e){const t=await e.save(),o=e.name,i=(t==null?void 0:t.data)!==void 0?t:this.getPreservedSavedData(e);if(i===void 0)return{tool:o,isValid:!1};const l=await e.validate(i.data);return Tt(be({},i),{isValid:l})}makeOutput(e){const t=[];return e.forEach(({id:o,tool:i,data:l,tunes:c,isValid:d})=>{if(!d){Be(`Block «${i}» skipped because saved data is invalid`);return}if(i===void 0||l===void 0){Be("Block skipped because saved data is missing required fields");return}if(i===this.Blok.Tools.stubTool&&this.isStubSavedData(l)){t.push(l);return}if(i===this.Blok.Tools.stubTool){Be("Stub block data is malformed and was skipped");return}const h=c===void 0||ot(c),g=be({id:o,type:i,data:l},!h&&{tunes:c});t.push(g)}),{time:+new Date,blocks:t,version:as()}}sanitizeExtractedData(e,t,o){const i=[];if(e.forEach((d,h)=>{this.hasSanitizableData(d)&&i.push({index:h,data:d})}),i.length===0)return e;const l=od(i.map(({data:d})=>d),t,o),c=e.map(d=>be({},d));return i.forEach(({index:d},h)=>{const g=l[h];c[d]=Tt(be({},c[d]),{data:g.data})}),c}hasSanitizableData(e){return e.data!==void 0&&typeof e.tool=="string"}isStubSavedData(e){if(!qe(e))return!1;const t=e;return typeof t.type=="string"&&t.data!==void 0}getLastSaveError(){return this.lastSaveError}getPreservedSavedData(e){const t=e.preservedData;if(ot(t))return;const o=e.preservedTunes;return Tt(be({id:e.id,tool:e.name,data:t},ot(o)?{}:{tunes:o}),{time:0})}}const TC=a=>{const e=document.createElement("div");e.innerHTML=a.trim();const t=document.createDocumentFragment();return t.append(...Array.from(e.childNodes)),t},Pr=class Pr{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:o,readOnly:i}){var l,c;this.api=o,this.readOnly=i,this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=(l=t==null?void 0:t.placeholder)!=null?l:Pr.DEFAULT_PLACEHOLDER,this._data=e!=null?e:{text:""},this._element=null,this._preserveBlank=(c=t==null?void 0:t.preserveBlank)!=null?c:!1}onKeyUp(e){if(e.code!=="Backspace"&&e.code!=="Delete"||!this._element)return;const{textContent:t}=this._element;t===""&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.className=Ae(this.api.styles.block,Pr.WRAPPER_CLASSES,Pr.PLACEHOLDER_CLASSES),e.setAttribute(Yu,"paragraph"),e.contentEditable="false",e.setAttribute("data-placeholder-active",this.api.i18n.t(this._placeholder)),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable="true",e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){if(!this._element)return;this._data.text+=e.text;const t=TC(e.text);this._element.appendChild(t),this._element.normalize()}validate(e){return!(e.text.trim()===""&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t=e.detail;if(!("data"in t))return;const i={text:t.data.innerHTML};this._data=i,window.requestAnimationFrame(()=>{this._element&&(this._element.innerHTML=this._data.text||"")})}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:fS,title:"Text"}}};Pr.WRAPPER_CLASSES=["leading-[1.6em]","outline-none","[&>p:first-of-type]:mt-0","[&>p:last-of-type]:mb-0"],Pr.PLACEHOLDER_CLASSES=["empty:before:pointer-events-none","empty:before:text-gray-text","empty:before:cursor-text","empty:before:content-[attr(data-placeholder-active)]","[&[data-empty=true]]:before:pointer-events-none","[&[data-empty=true]]:before:text-gray-text","[&[data-empty=true]]:before:cursor-text","[&[data-empty=true]]:before:content-[attr(data-placeholder-active)]"];let js=Pr;const B=class B{static get sanitize(){return{strong:{},b:{}}}static normalizeAllBoldTags(){if(typeof document=="undefined")return;const e=`${Hv} b, ${qt} b`;document.querySelectorAll(e).forEach(t=>{B.ensureStrongElement(t)})}static normalizeBoldInNode(e){var i;const t=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;!t||typeof t.closest!="function"||!t.closest(`${Hv}, ${qt}`)||(t.tagName==="B"&&B.ensureStrongElement(t),(i=t.querySelectorAll)==null||i.call(t,"b").forEach(l=>{B.ensureStrongElement(l)}))}constructor(){typeof document!="undefined"&&(B.instances.add(this),B.initializeGlobalListeners())}static initializeGlobalListeners(){return typeof document=="undefined"?!1:(B.shortcutListenerRegistered||(document.addEventListener("keydown",B.handleShortcut,!0),B.shortcutListenerRegistered=!0),B.selectionListenerRegistered||(document.addEventListener("selectionchange",B.handleGlobalSelectionChange,!0),B.selectionListenerRegistered=!0),B.inputListenerRegistered||(document.addEventListener("input",B.handleGlobalInput,!0),B.inputListenerRegistered=!0),B.beforeInputListenerRegistered||(document.addEventListener("beforeinput",B.handleBeforeInput,!0),B.beforeInputListenerRegistered=!0),B.ensureMutationObserver(),!0)}static maintainCollapsedExitState(){var e,t,o,i,l;if(typeof document!="undefined")for(const c of Array.from(B.collapsedExitRecords)){const d=B.resolveBoundary(c);if(!d){B.collapsedExitRecords.delete(c);continue}c.boundary=d.boundary,c.boldElement=d.boldElement;const h=d.boundary,g=d.boldElement,v=c.allowedLength,y=(e=g.textContent)!=null?e:"";if(y.length>v){const q=y.slice(0,v),W=y.slice(v);g.textContent=q,h.textContent=((t=h.textContent)!=null?t:"")+W}const b=(o=h.textContent)!=null?o:"";b.length>1&&b.startsWith("​")&&(h.textContent=b.slice(1));const x=window.getSelection();B.ensureCaretAtBoundary(x,h),B.scheduleBoundaryCaretAdjustment(h);const w=(i=h.textContent)!=null?i:"",T=w.replace(/\u200B/g,""),S=T.match(/^\s+/),O=/\S/.test(T),L=w.startsWith("​");S&&(c.hasLeadingSpace=!0,c.leadingWhitespace=S[0]),O&&(c.hasTypedContent=!0);const U=/^\s/.test(T),H=c.hasTypedContent&&!L&&((l=g.textContent)!=null?l:"").length<=v,X=c.hasLeadingSpace&&c.hasTypedContent&&!U;if(H&&X){const q=w.replace(/^[\u200B\s]+/,""),W=c.leadingWhitespace||" ";h.textContent=`${W}${q}`,B.ensureCaretAtBoundary(x,h)}H&&B.collapsedExitRecords.delete(c)}}static ensureCaretAtBoundary(e,t){!e||!e.isCollapsed||B.setCaretToBoundaryEnd(e,t)}static scheduleBoundaryCaretAdjustment(e){B.pendingBoundaryCaretAdjustments.has(e)||(B.pendingBoundaryCaretAdjustments.add(e),setTimeout(()=>{var l,c,d;B.pendingBoundaryCaretAdjustments.delete(e);const t=(l=e.ownerDocument)!=null?l:typeof document!="undefined"?document:null;if(!t)return;const o=t.getSelection();if(!o||!o.isCollapsed||o.anchorNode!==e)return;const i=(d=(c=e.textContent)==null?void 0:c.length)!=null?d:0;o.anchorOffset!==i&&B.setCaret(o,e,i)},0))}static ensureTextNodeAfter(e){var c;const t=e.nextSibling;if((t==null?void 0:t.nodeType)===Node.TEXT_NODE)return t;const o=e.parentNode;if(!o)return null;const i=(c=e.ownerDocument)!=null?c:typeof document!="undefined"?document:null;if(!i)return null;const l=i.createTextNode("");return o.insertBefore(l,t),l}static resolveBoundary(e){if(!e.boldElement.isConnected)return null;const t=B.ensureStrongElement(e.boldElement),o=e.boundary,l=o.isConnected&&o.previousSibling===t?o:B.ensureTextNodeAfter(t);return l?{boundary:l,boldElement:t}:null}static setCaretToBoundaryEnd(e,t){var l,c;const o=document.createRange(),i=(c=(l=t.textContent)==null?void 0:l.length)!=null?c:0;o.setStart(t,i),o.collapse(!0),e.removeAllRanges(),e.addRange(o)}static hasBoldParent(e){return e?e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e)?!0:B.hasBoldParent(e.parentNode):!1}static findBoldElement(e){return e?e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e)?B.ensureStrongElement(e):B.findBoldElement(e.parentNode):null}static isBoldTag(e){const t=e.tagName;return t==="B"||t==="STRONG"}static ensureStrongElement(e){if(e.tagName==="STRONG")return e;const t=document.createElement("strong");for(e.hasAttributes()&&Array.from(e.attributes).forEach(o=>{t.setAttribute(o.name,o.value)});e.firstChild;)t.appendChild(e.firstChild);return e.replaceWith(t),t}static mergeStrongNodes(e,t){const o=B.ensureStrongElement(e),i=B.ensureStrongElement(t);for(;i.firstChild;)o.appendChild(i.firstChild);return i.remove(),o}render(){return{icon:YE,name:"bold",onActivate:()=>{this.toggleBold()},isActive:()=>{const e=window.getSelection();return e?this.isSelectionVisuallyBold(e):!1}}}toggleBold(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed){this.toggleCollapsedSelection();return}this.isRangeBold(t,{ignoreWhitespace:!0})?this.unwrapBoldTags(t):this.wrapWithBold(t)}isSelectionVisuallyBold(e){if(!e||e.rangeCount===0)return!1;const t=e.getRangeAt(0);return this.isRangeBold(t,{ignoreWhitespace:!0})}wrapWithBold(e){const t=this.getRangeHtmlWithoutBold(e),o=this.replaceRangeWithHtml(e,`<strong>${t}</strong>`),i=window.getSelection();i&&o&&(i.removeAllRanges(),i.addRange(o)),B.normalizeAllBoldTags();const l=i?B.findBoldElement(i.focusNode):null;if(!l)return;const c=this.mergeAdjacentBold(l);this.normalizeWhitespaceAround(c),this.selectElementContents(c),B.normalizeBoldTagsWithinBlok(window.getSelection()),B.replaceNbspInBlock(window.getSelection()),this.notifySelectionChange()}unwrapBoldTags(e){const t=this.collectBoldAncestors(e),o=window.getSelection();if(!o)return;const i=document.createElement("span"),l=e.extractContents();i.setAttribute("data-blok-bold-marker",`unwrap-${B.markerSequence++}`),i.appendChild(l),this.removeNestedBold(i),e.insertNode(i);const c=document.createRange();for(c.selectNodeContents(i),o.removeAllRanges(),o.addRange(c);;){const v=B.findBoldElement(i);if(!v)break;this.moveMarkerOutOfBold(i,v)}const d=i.firstChild,h=i.lastChild;this.unwrapElement(i);const g=d&&h?(()=>{const v=document.createRange();return v.setStartBefore(d),v.setEndAfter(h),o.removeAllRanges(),o.addRange(v),v})():void 0;g||o.removeAllRanges(),this.replaceNbspWithinRange(g),B.normalizeBoldTagsWithinBlok(o),B.replaceNbspInBlock(o),B.removeEmptyBoldElements(o),t.forEach(v=>{B.isElementEmpty(v)&&v.remove()}),this.notifySelectionChange()}replaceRangeWithHtml(e,t){var d,h;const o=B.createFragmentFromHtml(t),i=(d=o.firstChild)!=null?d:null,l=(h=o.lastChild)!=null?h:null;if(e.deleteContents(),!i||!l)return;e.insertNode(o);const c=document.createRange();return c.setStartBefore(i),c.setEndAfter(l),c}moveMarkerOutOfBold(e,t){const o=t.parentNode;if(!o)return;if(Array.from(t.childNodes).forEach(h=>{var g;h.nodeType===Node.TEXT_NODE&&((g=h.textContent)!=null?g:"").length===0&&h.remove()}),t.childNodes.length===1&&t.firstChild===e){t.replaceWith(e);return}if(t.firstChild===e){o.insertBefore(e,t);return}if(t.lastChild===e){o.insertBefore(e,t.nextSibling);return}const d=t.cloneNode(!1);for(;e.nextSibling;)d.appendChild(e.nextSibling);o.insertBefore(d,t.nextSibling),o.insertBefore(e,d)}selectElementContents(e){const t=window.getSelection();if(!t)return;const o=document.createRange();o.selectNodeContents(e),t.removeAllRanges(),t.addRange(o)}get shortcut(){return"CMD+B"}isRangeBold(e,t){var l;if(e.collapsed)return!!B.findBoldElement(e.startContainer);const o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:c=>{try{return e.intersectsNode(c)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(d){const h=document.createRange();h.selectNodeContents(c);const g=e.compareBoundaryPoints(Range.END_TO_START,h)>0,v=e.compareBoundaryPoints(Range.START_TO_END,h)<0;return g&&v?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}}),i=[];for(;o.nextNode();){const c=o.currentNode,d=(l=c.textContent)!=null?l:"";t.ignoreWhitespace&&d.trim().length===0||d.length!==0&&i.push(c)}return i.length===0?!!B.findBoldElement(e.startContainer):i.every(c=>B.hasBoldParent(c))}removeNestedBold(e){var o;const t=(o=e.querySelectorAll)==null?void 0:o.call(e,"b,strong");t&&t.forEach(i=>{this.unwrapElement(i)})}unwrapElement(e){const t=e.parentNode;if(!t){e.remove();return}for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}mergeAdjacentBold(e){const t=B.ensureStrongElement(e),o=t.previousSibling,i=o&&o.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(o)?B.mergeStrongNodes(o,t):t,l=i.nextSibling;return l&&l.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(l)?B.mergeStrongNodes(i,l):i}toggleCollapsedSelection(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0),o=B.findBoldElement(t.startContainer),i=(()=>{if(o&&o.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE)!=="true")return B.exitCollapsedBold(e,o);const l=o!=null?o:B.getBoundaryBold(t);return l?B.exitCollapsedBold(e,l):this.startCollapsedBold(t)})();document.dispatchEvent(new Event("selectionchange")),i&&(e.removeAllRanges(),e.addRange(i)),B.normalizeBoldTagsWithinBlok(e),B.replaceNbspInBlock(e),B.removeEmptyBoldElements(e),this.notifySelectionChange()}startCollapsedBold(e){if(!e.collapsed)return;const t=document.createElement("strong"),o=document.createTextNode("");t.appendChild(o),t.setAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE,"true");const i=e.startContainer,l=e.startOffset;if(!(i.nodeType===Node.TEXT_NODE?this.insertCollapsedBoldIntoText(i,t,l):i.nodeType===Node.ELEMENT_NODE?(this.insertCollapsedBoldIntoElement(i,t,l),!0):!1))return;const d=window.getSelection(),h=document.createRange();h.setStart(o,0),h.collapse(!0);const g=this.mergeAdjacentBold(t);return B.normalizeBoldTagsWithinBlok(d),B.replaceNbspInBlock(d),B.removeEmptyBoldElements(d),d&&(d.removeAllRanges(),d.addRange(h)),this.notifySelectionChange(),g.firstChild instanceof Text?(()=>{var y,b;const v=document.createRange();return v.setStart(g.firstChild,(b=(y=g.firstChild.textContent)==null?void 0:y.length)!=null?b:0),v.collapse(!0),v})():h}insertCollapsedBoldIntoText(e,t,o){var v;const i=e,l=i.parentNode;if(!l)return!1;const c=(v=i.textContent)!=null?v:"",d=c.slice(0,o),h=c.slice(o);i.textContent=d;const g=h.length?document.createTextNode(h):null;return g&&l.insertBefore(g,i.nextSibling),l.insertBefore(t,g!=null?g:i.nextSibling),t.setAttribute(B.DATA_ATTR_PREV_LENGTH,d.length.toString()),!0}insertCollapsedBoldIntoElement(e,t,o){var l;const i=(l=e.childNodes[o])!=null?l:null;e.insertBefore(t,i),t.setAttribute(B.DATA_ATTR_PREV_LENGTH,"0")}static isElementEmpty(e){var t;return((t=e.textContent)!=null?t:"").length===0}notifySelectionChange(){B.enforceCollapsedBoldLengths(window.getSelection()),document.dispatchEvent(new Event("selectionchange")),this.updateToolbarButtonState()}updateToolbarButtonState(){const e=window.getSelection();if(!e)return;const t=e.anchorNode,o=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:t==null?void 0:t.parentElement,i=o==null?void 0:o.closest(qt);if(!i)return;const l=i.querySelector("[data-blok-testid=inline-toolbar]");if(!(l instanceof HTMLElement))return;const c=l.querySelector('[data-blok-item-name="bold"]');if(!(c instanceof HTMLElement))return;this.isSelectionVisuallyBold(e)?c.setAttribute("data-blok-popover-item-active","true"):c.removeAttribute("data-blok-popover-item-active")}normalizeWhitespaceAround(e){B.replaceNbspWithSpace(e.previousSibling),B.replaceNbspWithSpace(e.nextSibling)}static replaceNbspWithSpace(e){var i;if(!e||e.nodeType!==Node.TEXT_NODE)return;const t=e,o=(i=t.textContent)!=null?i:"";o.includes(" ")&&(t.textContent=o.replace(/\u00A0/g," "))}restoreSelectionFromMarkers(e){const t=document.querySelector(`[data-blok-bold-marker="${e}-start"]`),o=document.querySelector(`[data-blok-bold-marker="${e}-end"]`);if(!t||!o){t==null||t.remove(),o==null||o.remove();return}const i=window.getSelection();if(!i){t.remove(),o.remove();return}const l=document.createRange();return l.setStartAfter(t),l.setEndBefore(o),i.removeAllRanges(),i.addRange(l),t.remove(),o.remove(),l}replaceNbspWithinRange(e){if(!e)return;const t=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:o=>{try{return e.intersectsNode(o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(i){const l=document.createRange();l.selectNodeContents(o);const c=e.compareBoundaryPoints(Range.END_TO_START,l)>0,d=e.compareBoundaryPoints(Range.START_TO_END,l)<0;return c&&d?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;t.nextNode();)B.replaceNbspWithSpace(t.currentNode)}static normalizeBoldTagsWithinBlok(e){var l;const t=(l=e==null?void 0:e.anchorNode)!=null?l:e==null?void 0:e.focusNode;if(!t)return;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=o==null?void 0:o.closest(qt);i&&i.querySelectorAll("b").forEach(c=>{B.ensureStrongElement(c)})}static replaceNbspInBlock(e){var c;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=o==null?void 0:o.closest('[data-blok-component="paragraph"]');if(!i)return;const l=document.createTreeWalker(i,NodeFilter.SHOW_TEXT);for(;l.nextNode();)B.replaceNbspWithSpace(l.currentNode);i.querySelectorAll("b").forEach(d=>{B.ensureStrongElement(d)})}static removeEmptyBoldElements(e){var c,d;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=o==null?void 0:o.closest('[data-blok-component="paragraph"]');if(!i)return;const l=(d=e==null?void 0:e.focusNode)!=null?d:null;i.querySelectorAll("strong").forEach(h=>{var y;const g=h.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE)==="true",v=h.hasAttribute(B.DATA_ATTR_COLLAPSED_LENGTH);g||v||((y=h.textContent)!=null?y:"").length===0&&!B.isNodeWithin(l,h)&&h.remove()})}static synchronizeCollapsedBold(e){var c,d;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode,o=t&&t.nodeType===Node.ELEMENT_NODE?t:t==null?void 0:t.parentElement,i=(d=o==null?void 0:o.closest(qt))!=null?d:o==null?void 0:o.ownerDocument;if(!i)return;const l=`strong[${B.DATA_ATTR_COLLAPSED_ACTIVE}="true"]`;i.querySelectorAll(l).forEach(h=>{var ne,ce,Q,ye,Z;const g=h.getAttribute(B.DATA_ATTR_PREV_LENGTH),v=h.previousSibling;if(!g||!v||v.nodeType!==Node.TEXT_NODE)return;const y=Number(g);if(!Number.isFinite(y))return;const b=v,x=(ne=b.textContent)!=null?ne:"";if(x.length<=y)return;const w=x.slice(0,y),T=x.slice(y);b.textContent=w;const S=T.match(/^[\u00A0\s]+/);if(S&&!h.hasAttribute(B.DATA_ATTR_LEADING_WHITESPACE)&&h.setAttribute(B.DATA_ATTR_LEADING_WHITESPACE,S[0]),T.length===0)return;const O=(ce=h.textContent)!=null?ce:"",L=O+T,U=(Q=h.getAttribute(B.DATA_ATTR_LEADING_WHITESPACE))!=null?Q:"",X=U.length>0&&O.length===0&&!L.startsWith(U)?U+L:L,q=document.createTextNode(X);for(;h.firstChild;)h.removeChild(h.firstChild);if(h.appendChild(q),!(e!=null&&e.isCollapsed)||!B.isNodeWithin(e.focusNode,b))return;const W=document.createRange(),F=(Z=(ye=q.textContent)==null?void 0:ye.length)!=null?Z:0;W.setStart(q,F),W.collapse(!0),e.removeAllRanges(),e.addRange(W)})}static moveCaretAfterBoundaryBold(e){if(!e.rangeCount)return;const t=e.getRangeAt(0);if(!t.collapsed)return;const o=B.findBoldElement(t.startContainer);(o==null?void 0:o.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE))!=="true"&&(B.moveCaretFromElementContainer(e,t)||B.moveCaretFromTextContainer(e,t))}static getAdjacentBold(e){const t=e.startContainer;return t.nodeType===Node.TEXT_NODE?B.getBoldAdjacentToText(e,t):t.nodeType===Node.ELEMENT_NODE?B.getBoldAdjacentToElement(e,t):null}static getBoldAdjacentToText(e,t){var c,d;const o=(d=(c=t.textContent)==null?void 0:c.length)!=null?d:0,i=t.previousSibling;if(e.startOffset===0&&B.isBoldElement(i))return i;if(e.startOffset!==o)return null;const l=t.nextSibling;return B.isBoldElement(l)?l:null}static getBoldAdjacentToElement(e,t){var l,c;const o=e.startOffset>0&&(l=t.childNodes[e.startOffset-1])!=null?l:null;if(B.isBoldElement(o))return o;const i=(c=t.childNodes[e.startOffset])!=null?c:null;return B.isBoldElement(i)?i:null}static exitCollapsedIfNeeded(e,t){var c;if(!!B.findBoldElement(t.startContainer))return;const i=(c=B.getBoundaryBold(t))!=null?c:B.getAdjacentBold(t);if(!i)return;const l=B.exitCollapsedBold(e,i);l&&(e.removeAllRanges(),e.addRange(l))}static moveCaretFromElementContainer(e,t){if(t.startContainer.nodeType!==Node.ELEMENT_NODE)return!1;const o=t.startContainer;return B.moveCaretAfterPreviousBold(e,o,t.startOffset)?!0:B.moveCaretBeforeNextBold(e,o,t.startOffset)}static moveCaretAfterPreviousBold(e,t,o){var d,h,g;const i=o>0&&(d=t.childNodes[o-1])!=null?d:null;if(!B.isBoldElement(i))return!1;const l=B.ensureFollowingTextNode(i,i.nextSibling);if(!l)return!1;const c=(g=(h=l.textContent)==null?void 0:h.length)!=null?g:0;return B.setCaret(e,l,c),!0}static moveCaretBeforeNextBold(e,t,o){var c;const i=(c=t.childNodes[o])!=null?c:null;if(!B.isBoldElement(i))return!1;const l=B.ensureFollowingTextNode(i,i.nextSibling);return l?(B.setCaret(e,l,0),!0):(B.setCaretAfterNode(e,i),!0)}static moveCaretFromTextContainer(e,t){var g,v,y;if(t.startContainer.nodeType!==Node.TEXT_NODE)return;const o=t.startContainer,i=o.previousSibling,l=(g=o.textContent)!=null?g:"",c=/^\s/.test(l);if(t.startOffset===0&&B.isBoldElement(i)&&(l.length===0||c)){B.setCaret(e,o,l.length);return}const d=B.findBoldElement(o);if(!d||t.startOffset!==((y=(v=o.textContent)==null?void 0:v.length)!=null?y:0))return;const h=B.ensureFollowingTextNode(d,d.nextSibling);if(h){B.setCaret(e,h,0);return}B.setCaretAfterNode(e,d)}static guardCollapsedBoundaryKeydown(e){var h;if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey||e.key.length!==1)return;const o=window.getSelection();if(!o||!o.isCollapsed||o.rangeCount===0)return;const i=o.getRangeAt(0);if(i.startContainer.nodeType!==Node.TEXT_NODE)return;const l=i.startContainer,c=(h=l.textContent)!=null?h:"";if(c.length===0||i.startOffset!==0)return;const d=l.previousSibling;B.isBoldElement(d)&&/^\s/.test(c)&&B.setCaret(o,l,c.length)}static isBoldElement(e){return!!(e&&e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e))}static setCaret(e,t,o){const i=document.createRange();i.setStart(t,o),i.collapse(!0),e.removeAllRanges(),e.addRange(i)}static setCaretAfterNode(e,t){if(!t)return;const o=document.createRange();o.setStartAfter(t),o.collapse(!0),e.removeAllRanges(),e.addRange(o)}static ensureFollowingTextNode(e,t){const o=e.parentNode;if(!o)return null;if(t&&t.nodeType===Node.TEXT_NODE)return t;const i=document.createTextNode("");return o.insertBefore(i,t),i}static enforceCollapsedBoldLengths(e){var c;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=o==null?void 0:o.closest(qt);if(!i)return;i.querySelectorAll(`strong[${B.DATA_ATTR_COLLAPSED_LENGTH}]`).forEach(d=>{var H,X,q,W,F;const h=d,g=h.getAttribute(B.DATA_ATTR_COLLAPSED_LENGTH);if(!g)return;const v=Number(g),y=(H=h.textContent)!=null?H:"";if(!Number.isFinite(v))return;const b=y.length>v,x=b?B.splitCollapsedBoldText(h,v,y):null,w=h.getAttribute(B.DATA_ATTR_PREV_LENGTH),T=w?Number(w):NaN,S=h.previousSibling,O=(S==null?void 0:S.nodeType)===Node.TEXT_NODE?S:null,L=(X=O==null?void 0:O.textContent)!=null?X:"",U=!!(w&&Number.isFinite(T)&&O&&L.length>T);if(U&&O){const ne=L.slice(0,T),ce=L.slice(T);O.textContent=ne;const Q=document.createTextNode(ce);(q=h.parentNode)==null||q.insertBefore(Q,h.nextSibling)}if(U&&h.removeAttribute(B.DATA_ATTR_PREV_LENGTH),e!=null&&e.isCollapsed&&x&&B.isNodeWithin(e.focusNode,h)){const ne=document.createRange(),ce=(F=(W=x.textContent)==null?void 0:W.length)!=null?F:0;ne.setStart(x,ce),ne.collapse(!0),e.removeAllRanges(),e.addRange(ne)}b&&h.removeAttribute(B.DATA_ATTR_COLLAPSED_LENGTH)})}static splitCollapsedBoldText(e,t,o){const i=e,l=i.parentNode;if(!l)return null;const c=o.slice(0,t),d=o.slice(t);i.textContent=c;const h=document.createTextNode(d);return l.insertBefore(h,i.nextSibling),h}static isNodeWithin(e,t){return e?e===t||t.contains(e):!1}static handleGlobalSelectionChange(){B.refreshSelectionState("selectionchange")}static handleGlobalInput(){B.refreshSelectionState("input")}static refreshSelectionState(e){const t=window.getSelection();B.enforceCollapsedBoldLengths(t),B.maintainCollapsedExitState(),B.synchronizeCollapsedBold(t),B.normalizeBoldTagsWithinBlok(t),B.removeEmptyBoldElements(t),e==="input"&&t&&B.moveCaretAfterBoundaryBold(t),B.normalizeAllBoldTags()}static ensureMutationObserver(){if(typeof MutationObserver=="undefined"||B.mutationObserver)return;const e=new MutationObserver(t=>{if(!B.isProcessingMutation){B.isProcessingMutation=!0;try{t.forEach(o=>{o.addedNodes.forEach(i=>{B.normalizeBoldInNode(i)}),o.type==="characterData"&&o.target&&B.normalizeBoldInNode(o.target)})}finally{B.isProcessingMutation=!1}}});e.observe(document.body,{subtree:!0,childList:!0,characterData:!0}),B.mutationObserver=e}static handleBeforeInput(e){if(e.inputType!=="formatBold")return;const t=window.getSelection(),o=!!(t&&B.isSelectionInsideBlok(t)),i=B.isEventTargetInsideBlok(e.target);!o&&!i||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),B.normalizeAllBoldTags())}static exitCollapsedBold(e,t){const o=B.ensureStrongElement(t),i=o.parentNode;if(i)return B.isElementEmpty(o)?B.removeEmptyBoldElement(e,o,i):B.exitCollapsedBoldWithContent(e,o,i)}static removeEmptyBoldElement(e,t,o){const i=document.createRange();return i.setStartBefore(t),i.collapse(!0),o.removeChild(t),e.removeAllRanges(),e.addRange(i),i}static exitCollapsedBoldWithContent(e,t,o){var b,x,w,T,S,O;t.setAttribute(B.DATA_ATTR_COLLAPSED_LENGTH,((x=(b=t.textContent)==null?void 0:b.length)!=null?x:0).toString()),t.removeAttribute(B.DATA_ATTR_PREV_LENGTH),t.removeAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE),t.removeAttribute(B.DATA_ATTR_LEADING_WHITESPACE);const i=t.nextSibling,l=!i||i.nodeType!==Node.TEXT_NODE,c=l?document.createTextNode("​"):null;c&&o.insertBefore(c,i);const d=c!=null?c:i;!l&&((w=d.textContent)!=null?w:"").length===0&&(d.textContent="​");const h=document.createRange(),v=((T=d.textContent)!=null?T:"").startsWith("​")?1:0;h.setStart(d,v),h.collapse(!0),e.removeAllRanges(),e.addRange(h);const y=B.ensureStrongElement(t);return B.collapsedExitRecords.add({boundary:d,boldElement:y,allowedLength:(O=(S=y.textContent)==null?void 0:S.length)!=null?O:0,hasLeadingSpace:!1,hasTypedContent:!1,leadingWhitespace:""}),h}static getBoundaryBold(e){const t=e.startContainer;return t.nodeType===Node.TEXT_NODE?B.getBoundaryBoldForText(e,t):t.nodeType===Node.ELEMENT_NODE?B.getBoundaryBoldForElement(e,t):null}static getBoundaryBoldForText(e,t){var l,c;const o=(c=(l=t.textContent)==null?void 0:l.length)!=null?c:0;if(e.startOffset===o)return B.findBoldElement(t);if(e.startOffset!==0)return null;const i=t.previousSibling;return B.isBoldElement(i)?i:null}static getBoundaryBoldForElement(e,t){if(e.startOffset<=0)return null;const o=t.childNodes[e.startOffset-1];return B.isBoldElement(o)?o:null}static handleShortcut(e){var i;if(B.guardCollapsedBoundaryKeydown(e),!B.isBoldShortcut(e))return;const t=window.getSelection();if(!t||!t.rangeCount||!B.isSelectionInsideBlok(t))return;const o=(i=B.instances.values().next().value)!=null?i:new B;o&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),o.toggleBold())}static isBoldShortcut(e){return!((typeof navigator!="undefined"?navigator.userAgent.toLowerCase():"").includes("mac")?e.metaKey:e.ctrlKey)||e.altKey?!1:e.key.toLowerCase()==="b"}static isSelectionInsideBlok(e){const t=e.anchorNode;if(!t)return!1;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;return!!(o!=null&&o.closest(qt))}static isEventTargetInsideBlok(e){var o;if(!e||typeof Node=="undefined")return!1;if(e instanceof Element)return!!e.closest(qt);if(e instanceof Text)return!!((o=e.parentElement)!=null&&o.closest(qt));if(typeof ShadowRoot!="undefined"&&e instanceof ShadowRoot)return B.isEventTargetInsideBlok(e.host);if(!(e instanceof Node))return!1;const t=e.parentNode;return t?t instanceof Element?!!t.closest(qt):B.isEventTargetInsideBlok(t):!1}getRangeHtmlWithoutBold(e){const t=e.cloneContents();this.removeNestedBold(t);const o=document.createElement("div");return o.appendChild(t),o.innerHTML}static createFragmentFromHtml(e){const t=document.createElement("template");return t.innerHTML=e,t.content}collectBoldAncestors(e){const t=new Set,o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:i=>{try{return e.intersectsNode(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(l){const c=document.createRange();c.selectNodeContents(i);const d=e.compareBoundaryPoints(Range.END_TO_START,c)>0,h=e.compareBoundaryPoints(Range.START_TO_END,c)<0;return d&&h?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;o.nextNode();){const i=B.findBoldElement(o.currentNode);i&&t.add(i)}return Array.from(t)}};B.isInline=!0,B.title="Bold",B.shortcutListenerRegistered=!1,B.selectionListenerRegistered=!1,B.inputListenerRegistered=!1,B.beforeInputListenerRegistered=!1,B.globalListenersInitialized=B.initializeGlobalListeners(),B.collapsedExitRecords=new Set,B.markerSequence=0,B.isProcessingMutation=!1,B.DATA_ATTR_COLLAPSED_LENGTH="data-blok-bold-collapsed-length",B.DATA_ATTR_COLLAPSED_ACTIVE="data-blok-bold-collapsed-active",B.DATA_ATTR_PREV_LENGTH="data-blok-bold-prev-length",B.DATA_ATTR_LEADING_WHITESPACE="data-blok-bold-leading-ws",B.instances=new Set,B.pendingBoundaryCaretAdjustments=new WeakSet;let Qd=B;const Us=class Us{static get sanitize(){return{i:{},em:{}}}render(){return{icon:QE,name:"italic",onActivate:()=>{this.toggleItalic()},isActive:()=>{const e=window.getSelection();return e?this.isSelectionVisuallyItalic(e):!1}}}get shortcut(){return"CMD+I"}toggleItalic(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed){this.toggleCollapsedItalic(t,e);return}this.isRangeItalic(t,{ignoreWhitespace:!0})?this.unwrapItalicTags(t):this.wrapWithItalic(t)}toggleCollapsedItalic(e,t){if(this.isRangeItalic(e,{ignoreWhitespace:!0})){const i=document.createTextNode("​");e.insertNode(i),e.selectNode(i),this.unwrapItalicTags(e);const l=document.createRange();l.setStart(i,1),l.setEnd(i,1),t.removeAllRanges(),t.addRange(l)}else{const i=document.createElement("i"),l=document.createTextNode("​");i.appendChild(l),e.insertNode(i);const c=document.createRange();c.setStart(l,1),c.setEnd(l,1),t.removeAllRanges(),t.addRange(c)}}isSelectionVisuallyItalic(e){if(!e||e.rangeCount===0)return!1;const t=e.getRangeAt(0);return this.isRangeItalic(t,{ignoreWhitespace:!0})}isRangeItalic(e,t){var l;if(e.collapsed)return!!this.findItalicElement(e.startContainer);const o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:c=>{try{return e.intersectsNode(c)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(d){const h=document.createRange();h.selectNodeContents(c);const g=e.compareBoundaryPoints(Range.END_TO_START,h)>0,v=e.compareBoundaryPoints(Range.START_TO_END,h)<0;return g&&v?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}}),i=[];for(;o.nextNode();){const c=o.currentNode,d=(l=c.textContent)!=null?l:"";t.ignoreWhitespace&&d.trim().length===0||d.length!==0&&i.push(c)}return i.length===0?!!this.findItalicElement(e.startContainer):i.every(c=>this.hasItalicParent(c))}wrapWithItalic(e){const t=this.getRangeHtmlWithoutItalic(e),o=this.replaceRangeWithHtml(e,`<i>${t}</i>`),i=window.getSelection();i&&o&&(i.removeAllRanges(),i.addRange(o))}unwrapItalicTags(e){const t=this.collectItalicAncestors(e),o=window.getSelection();if(!o)return;const i=document.createElement("span"),l=e.extractContents();i.appendChild(l),this.removeNestedItalic(i),e.insertNode(i);const c=document.createRange();for(c.selectNodeContents(i),o.removeAllRanges(),o.addRange(c);;){const v=this.findItalicElement(i);if(!v)break;this.moveMarkerOutOfItalic(i,v)}const d=i.firstChild,h=i.lastChild;this.unwrapElement(i),(d&&h?(()=>{const v=document.createRange();return v.setStartBefore(d),v.setEndAfter(h),o.removeAllRanges(),o.addRange(v),v})():void 0)||o.removeAllRanges(),t.forEach(v=>{var y;((y=v.textContent)!=null?y:"").length===0&&v.remove()})}hasItalicParent(e){return e?e.nodeType===Node.ELEMENT_NODE&&this.isItalicTag(e)?!0:this.hasItalicParent(e.parentNode):!1}findItalicElement(e){return e?e.nodeType===Node.ELEMENT_NODE&&this.isItalicTag(e)?e:this.findItalicElement(e.parentNode):null}isItalicTag(e){const t=e.tagName;return t==="I"||t==="EM"}collectItalicAncestors(e){const t=new Set,o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:i=>{try{return e.intersectsNode(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(l){const c=document.createRange();c.selectNodeContents(i);const d=e.compareBoundaryPoints(Range.END_TO_START,c)>0,h=e.compareBoundaryPoints(Range.START_TO_END,c)<0;return d&&h?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;o.nextNode();){const i=this.findItalicElement(o.currentNode);i&&t.add(i)}return Array.from(t)}getRangeHtmlWithoutItalic(e){const t=e.cloneContents();this.removeNestedItalic(t);const o=document.createElement("div");return o.appendChild(t),o.innerHTML}removeNestedItalic(e){var o;const t=(o=e.querySelectorAll)==null?void 0:o.call(e,"i,em");t&&t.forEach(i=>{this.unwrapElement(i)})}unwrapElement(e){const t=e.parentNode;if(!t){e.remove();return}for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}replaceRangeWithHtml(e,t){var d,h;const o=this.createFragmentFromHtml(t),i=(d=o.firstChild)!=null?d:null,l=(h=o.lastChild)!=null?h:null;if(e.deleteContents(),!i||!l)return;e.insertNode(o);const c=document.createRange();return c.setStartBefore(i),c.setEndAfter(l),c}createFragmentFromHtml(e){const t=document.createElement("template");return t.innerHTML=e,t.content}moveMarkerOutOfItalic(e,t){const o=t.parentNode;if(!o)return;if(Array.from(t.childNodes).forEach(h=>{var g;h.nodeType===Node.TEXT_NODE&&((g=h.textContent)!=null?g:"").length===0&&h.remove()}),t.childNodes.length===1&&t.firstChild===e){t.replaceWith(e);return}if(t.firstChild===e){o.insertBefore(e,t);return}if(t.lastChild===e){o.insertBefore(e,t.nextSibling);return}const d=t.cloneNode(!1);for(;e.nextSibling;)d.appendChild(e.nextSibling);o.insertBefore(d,t.nextSibling),o.insertBefore(e,d)}};Us.isInline=!0,Us.title="Italic";let Zd=Us;const xC=(Mr=class{constructor({api:e}){this.INPUT_BASE_CLASSES="hidden w-full m-0 px-2 py-1 text-sm leading-[22px] font-medium bg-item-hover-bg border border-[rgba(226,226,229,0.2)] rounded-md outline-none box-border appearance-none font-[inherit] placeholder:text-gray-text mobile:text-[15px] mobile:font-medium",this.DATA_ATTRIBUTES={buttonActive:"data-blok-link-tool-active",buttonUnlink:"data-blok-link-tool-unlink",inputOpened:"data-blok-link-tool-input-opened"},this.nodes={input:null,button:null},this.inputOpened=!1,this.unlinkAvailable=!1,this.handleButtonClick=t=>{!this.inputOpened||!this.unlinkAvailable||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.restoreSelection(),this.unlink(),this.inlineToolbar.close())},this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new se,this.nodes.input=this.createInput()}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return{icon:ZE,isActive:()=>!!this.selection.findParentTag("A"),children:{hideChevron:!0,items:[{type:tt.Html,element:this.nodes.input}],onOpen:()=>{this.openActions(!0)},onClose:()=>{this.closeActions()}}}}createInput(){const e=document.createElement("input");return e.placeholder=this.i18n.t("Add a link"),e.enterKeyHint="done",e.className=this.INPUT_BASE_CLASSES,e.setAttribute("data-blok-testid","inline-tool-input"),this.setBooleanStateAttribute(e,this.DATA_ATTRIBUTES.inputOpened,!1),e.addEventListener("keydown",t=>{t.key==="Enter"&&this.enterPressed(t)}),e}get shortcut(){return"CMD+K"}openActions(e=!1){if(!this.nodes.input)return;const t=this.selection.findParentTag("A"),o=!!t;if(this.updateButtonStateAttributes(o),this.unlinkAvailable=o,t){const i=t.getAttribute("href");this.nodes.input.value=i!==null?i:""}else this.nodes.input.value="";this.nodes.input.className=Ae(this.INPUT_BASE_CLASSES,"block"),this.setBooleanStateAttribute(this.nodes.input,this.DATA_ATTRIBUTES.inputOpened,!0),this.selection.save(),e&&this.focusInputWithRetry(),this.inputOpened=!0}focusInputWithRetry(){this.nodes.input&&(this.nodes.input.focus(),!(typeof window=="undefined"||typeof document=="undefined")&&window.setTimeout(()=>{var e;document.activeElement!==this.nodes.input&&((e=this.nodes.input)==null||e.focus())},0))}getButtonElement(){if(this.nodes.button&&document.contains(this.nodes.button))return this.nodes.button;const e=document.querySelector(`${jv} [data-blok-item-name="link"]`);return e&&e.addEventListener("click",this.handleButtonClick,!0),this.nodes.button=e!=null?e:null,this.nodes.button}updateButtonStateAttributes(e){const t=this.getButtonElement();if(!t)return;const o=typeof e=="boolean"?e:!!this.selection.findParentTag("A");this.setBooleanStateAttribute(t,this.DATA_ATTRIBUTES.buttonActive,o),this.setBooleanStateAttribute(t,this.DATA_ATTRIBUTES.buttonUnlink,o)}closeActions(e=!0){(this.selection.isFakeBackgroundEnabled||e&&this.selection.savedSelectionRange)&&this.restoreSelection(),this.nodes.input&&(this.nodes.input.className=this.INPUT_BASE_CLASSES,this.setBooleanStateAttribute(this.nodes.input,this.DATA_ATTRIBUTES.inputOpened,!1),this.nodes.input.value="",this.updateButtonStateAttributes(!1),this.unlinkAvailable=!1,e&&this.selection.clearSaved(),this.inputOpened=!1)}restoreSelection(){const e=new se,t=se.isAtBlok;if(t&&e.save(),this.selection.removeFakeBackground(),this.selection.restore(),!t&&this.selection.savedSelectionRange){const l=this.selection.savedSelectionRange.commonAncestorContainer,c=l.nodeType===Node.ELEMENT_NODE?l:l.parentElement;c==null||c.focus()}if(!t)return;e.restore();const o=e.savedSelectionRange;if(o){const i=o.commonAncestorContainer,l=i.nodeType===Node.ELEMENT_NODE?i:i.parentElement;l==null||l.focus()}}enterPressed(e){if(!this.nodes.input)return;const t=this.nodes.input.value||"";if(!t.trim()){this.selection.restore(),this.unlink(),e.preventDefault(),this.closeActions(),this.inlineToolbar.close();return}if(!this.validateURL(t)){this.notifier.show({message:"Pasted link is not valid.",style:"error"}),Be("Incorrect Link pasted","warn",t);return}const o=this.prepareLink(t);this.selection.removeFakeBackground(),this.selection.restore(),this.insertLink(o),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}validateURL(e){return!/\s/.test(e)}prepareLink(e){return this.addProtocol(e.trim())}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),o=e.substring(0,1)==="#",i=/^\/\/[^/\s]/.test(e);return!t&&!o&&!i?"http://"+e:e}insertLink(e){const t=this.selection.findParentTag("A");if(t){this.selection.expandToTag(t),t.href=e,t.target="_blank",t.rel="nofollow";return}const o=se.range;if(!o)return;const i=document.createElement("a");i.href=e,i.target="_blank",i.rel="nofollow",i.appendChild(o.extractContents()),o.insertNode(i),this.selection.expandToTag(i)}unlink(){const e=this.selection.findParentTag("A");e&&(this.unwrap(e),this.updateButtonStateAttributes(!1),this.unlinkAvailable=!1)}unwrap(e){var o;const t=document.createDocumentFragment();for(;e.firstChild;)t.appendChild(e.firstChild);(o=e.parentNode)==null||o.replaceChild(t,e)}setBooleanStateAttribute(e,t,o){e&&e.setAttribute(t,o?"true":"false")}},Mr.isInline=!0,Mr.title="Link",Mr),sf=class sf{constructor({api:e}){this.i18nAPI=e.i18n,this.blocksAPI=e.blocks,this.selectionAPI=e.selection,this.toolsAPI=e.tools,this.caretAPI=e.caret}async render(){var g;const e=se.get();if(e===null)return[];const t=this.blocksAPI.getBlockByElement(e.anchorNode);if(t===void 0)return[];const o=this.toolsAPI.getBlockTools(),i=await Qv(t,o);if(i.length===0)return[];const l=i.reduce((v,y)=>{var b;return(b=y.toolbox)==null||b.forEach(x=>{x.title!==void 0&&v.push({icon:x.icon,title:$e.t(it.toolNames,x.title),name:y.name,closeOnActivate:!0,onActivate:async()=>{const w=await this.blocksAPI.convert(t.id,y.name,x.data);this.caretAPI.setToBlock(w,"end")}})}),v},[]),c=await t.getActiveToolboxEntry(),d=(g=c==null?void 0:c.title)!=null?g:t.name,h=!Gn();return{name:"convert-to",title:$e.t(it.toolNames,d),hint:{title:$e.ui(it.ui.inlineToolbar.converter,"Convert to")},children:{searchable:h,items:l,onOpen:()=>{h&&(this.selectionAPI.setFakeBackground(),this.selectionAPI.save())},onClose:()=>{h&&(this.selectionAPI.restore(),this.selectionAPI.removeFakeBackground())}}}}};sf.isInline=!0;let Jd=sf;const af=class af{constructor({data:e,api:t}){this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=N.make("div","flex items-center py-3 px-[18px] my-2.5 rounded-[10px] bg-bg-light border border-line-gray text-gray-text text-sm [&_svg]:size-icon"),t=hS,o=N.make("div","ml-3.5"),i=N.make("div","font-medium capitalize",{textContent:this.title}),l=N.make("div","",{textContent:this.subtitle});return e.setAttribute(Yu,"stub"),e.setAttribute(Wx,""),o.setAttribute(Kx,""),i.setAttribute(Vx,""),l.setAttribute($x,""),e.innerHTML=t,o.appendChild(i),o.appendChild(l),e.appendChild(o),e}};af.isReadOnlySupported=!0;let ef=af;class EC extends Bd{constructor(){super(...arguments),this.type=Ir.Inline}getMissingMethods(e){const t=this.constructable,o=t==null?void 0:t.prototype;return o?e.filter(i=>typeof o[i]!="function"):[...e]}create(){const e=this.constructable;return new e({api:this.api,config:this.settings})}get isReadOnlySupported(){var t;const e=this.constructable;return(t=e==null?void 0:e.isReadOnlySupported)!=null?t:!1}get title(){return this.constructable.title||""}}class SC extends Bd{constructor(){super(...arguments),this.type=Ir.Tune}create(e,t){const o=this.constructable;return new o({api:this.api,config:this.settings,block:t,data:e})}}class Et extends Map{get blockTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isBlock());return new Et(e)}get inlineTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInline());return new Et(e)}get blockTunes(){const e=Array.from(this.entries()).filter(([,t])=>t.isTune());return new Et(e)}get internalTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInternal);return new Et(e)}get externalTools(){const e=Array.from(this.entries()).filter(([,t])=>!t.isInternal);return new Et(e)}}class CC extends Bd{constructor(){super(...arguments),this.type=Ir.Block,this.inlineTools=new Et,this.tunes=new Et}create(e,t,o){return new this.constructable({data:e,block:t,readOnly:o,api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[so.IsReadOnlySupported]===!0}get isLineBreaksEnabled(){var e;return(e=this.constructable[so.IsEnabledLineBreaks])!=null?e:!1}get toolbox(){const e=this.constructable[so.Toolbox],t=this.config[Ts.Toolbox];if(!(!e||ot(e))&&t!==!1)return t==null?Array.isArray(e)?e:[e]:!Array.isArray(t)&&Array.isArray(e)?[t]:Array.isArray(t)?Array.isArray(e)?t.map((o,i)=>{const l=e[i];return l?be(be({},l),o):o}):t:[be(be({},e),t)]}get conversionConfig(){return this.constructable[so.ConversionConfig]}get enabledInlineTools(){return this.config[Ts.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[Ts.EnabledBlockTunes]}get pasteConfig(){var e;return(e=this.constructable[so.PasteConfig])!=null?e:{}}get hasOnPasteHandler(){var t;const e=(t=this.constructable)==null?void 0:t.prototype;return typeof(e==null?void 0:e.onPaste)=="function"}get sanitizeConfig(){if(this._sanitizeConfig)return this._sanitizeConfig;const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(ot(e))return this._sanitizeConfig=t,t;const o={};for(const i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;const l=e[i];qe(l)?o[i]=Object.assign({},t,l):o[i]=l}return this._sanitizeConfig=o,o}get baseSanitizeConfig(){if(this._baseSanitizeConfig)return this._baseSanitizeConfig;const e={};return Array.from(this.inlineTools.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),Array.from(this.tunes.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),this._baseSanitizeConfig=e,e}}class BC{constructor(e,t,o){this.api=o,this.config=e,this.blokConfig=t}get(e){const h=this.config[e],{class:t,isInternal:o=!1}=h,i=o0(h,["class","isInternal"]),l=t;if(l===void 0)throw new Error(`Tool "${e}" does not provide a class.`);const c=this.getConstructor(l),d=!!Reflect.get(l,Cd.IsTune);return new c({name:e,constructable:l,config:i,api:this.api.getMethodsForTool(e,d),isDefault:e===this.blokConfig.defaultBlock,defaultPlaceholder:this.blokConfig.placeholder,isInternal:o})}getConstructor(e){switch(!0){case!!Reflect.get(e,Sy.IsInline):return EC;case!!Reflect.get(e,Cd.IsTune):return SC;default:return CC}}}const lf=class lf{constructor({api:e}){this.api=e}render(){return{icon:XE,title:this.api.i18n.t("Delete"),name:"delete",confirmation:{title:this.api.i18n.t("Click to delete"),onActivate:()=>this.handleClick()}}}handleClick(){this.api.blocks.delete()}};lf.isTune=!0;let tf=lf;const Lr=a=>{if(!De(a))throw new Error("Tool constructable must be a function");return a};class AC extends Se{constructor(){super(...arguments),this.stubTool="stub",this.factory=null,this.toolsAvailable=new Et,this.toolsUnavailable=new Et,this.inlineToolsSanitizeConfigCache=null}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){const e=this.config.defaultBlock;if(!e)throw new Error("Default block tool name is not configured");const t=this.blockTools.get(e);if(!t)throw new Error(`Default block tool "${e}" not found in available block tools`);return t}get internal(){return this.available.internalTools}async prepare(){var h;const e=(h=this.config.tools)!=null?h:{};this.config.tools=Ko({},this.internalTools,e),this.validateTools();const t=this.config.tools;if(!t||Object.keys(t).length===0)throw Error("Can't start without tools");const o=this.prepareConfig(t);this.factory=new BC(o,this.config,this.Blok.API);const i=this.getListOfPrepareFunctions(o);if(i.length===0)return Promise.resolve();const l=g=>{this.isToolPrepareData(g)&&this.toolPrepareMethodSuccess({toolName:g.toolName})},c=g=>{this.isToolPrepareData(g)&&this.toolPrepareMethodFallback({toolName:g.toolName})},d=new rb;i.forEach(g=>{d.add(async()=>{const v=R1(g.data)?{}:g.data;try{await g.function(g.data),l(v)}catch(y){c(v)}})}),await d.completed,this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){if(this.inlineToolsSanitizeConfigCache)return this.inlineToolsSanitizeConfigCache;const e={};return Array.from(this.inlineTools.values()).forEach(t=>{Object.assign(e,t.sanitizeConfig)}),this.inlineToolsSanitizeConfigCache=e,e}destroy(){for(const e of this.available.values()){const t=(()=>{try{return e.reset()}catch(o){Be(`Tool "${e.name}" reset failed`,"warn",o);return}})();t instanceof Promise&&t.catch(o=>{Be(`Tool "${e.name}" reset failed`,"warn",o)})}}get internalTools(){return{convertTo:{class:Lr(Jd),isInternal:!0},link:{class:Lr(xC),isInternal:!0},bold:{class:Lr(Qd),isInternal:!0},italic:{class:Lr(Zd),isInternal:!0},paragraph:{class:Lr(js),inlineToolbar:!0,config:{preserveBlank:!0},isInternal:!0},stub:{class:Lr(ef),isInternal:!0},delete:{class:Lr(tf),isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.getFactory().get(e.toolName);if(!t.isInline()){this.toolsAvailable.set(t.name,t);return}const o=["render"],i=t.getMissingMethods(o);if(i.length){Be(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",i),this.toolsUnavailable.set(t.name,t);return}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){const t=this.getFactory();this.toolsUnavailable.set(e.toolName,t.get(e.toolName))}getListOfPrepareFunctions(e){return Object.entries(e).map(([t,o])=>{var c;const i={toolName:t,config:(c=o.config)!=null?c:{}};return{function:async d=>{const h=o.class;if(!h||!De(h.prepare))return;const g=d!=null?d:i;return h.prepare.call(h,g)},data:i}})}prepareBlockTools(){Array.from(this.blockTools.values()).forEach(e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)})}assignInlineToolsToBlockTool(e){const t=e;if(this.config.inlineToolbar!==!1){if(t.enabledInlineTools===!0){const o=Array.isArray(this.config.inlineToolbar)?this.createInlineToolsCollection(this.config.inlineToolbar):new Et(Array.from(this.inlineTools.entries()));t.inlineTools=o;return}if(Array.isArray(t.enabledInlineTools)){const o=this.createInlineToolsCollection(["convertTo",...t.enabledInlineTools]);t.inlineTools=o}}}assignBlockTunesToBlockTool(e){const t=e;if(t.enabledBlockTunes!==!1){if(Array.isArray(t.enabledBlockTunes)){const o=this.createBlockTunesCollection(t.enabledBlockTunes),i=[...Array.from(o.entries()),...Array.from(this.blockTunes.internalTools.entries())];t.tunes=new Et(i);return}if(Array.isArray(this.config.tunes)){const o=this.createBlockTunesCollection(this.config.tunes),i=[...Array.from(o.entries()),...Array.from(this.blockTunes.internalTools.entries())];t.tunes=new Et(i);return}t.tunes=new Et(Array.from(this.blockTunes.internalTools.entries()))}}validateTools(){const e=this.config.tools;if(!e)return;const t=this.internalTools;for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o in t)continue;const i=e[o],l=De(i),d=De(i.class);if(!l&&!d)throw new Vo(`Tool «${o}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(e){const t={};for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;const i=e[o];if(qe(i)){t[o]=i;continue}t[o]={class:i}}return t}isToolPrepareData(e){const t=e;return typeof(t==null?void 0:t.toolName)=="string"}getFactory(){if(this.factory===null)throw new Error("Tools factory is not initialized");return this.factory}createInlineToolsCollection(e){const t=[];for(const o of e){const i=this.inlineTools.get(o);if(!i){Be(`Inline tool "${o}" is not available and will be skipped`,"warn");continue}t.push([o,i])}return new Et(t)}createBlockTunesCollection(e){const t=[];for(const o of e){const i=this.blockTunes.get(o);if(!i){Be(`Block tune "${o}" is not available and will be skipped`,"warn");continue}t.push([o,i])}return new Et(t)}}const IC=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:PT Mono,Menlo,Monaco,Consolas,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:651px){.\\!container{max-width:651px!important}.container{max-width:651px}}@media(min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-\\[auto_var\\(--offset\\)_calc\\(var\\(--offset\\)\\+env\\(safe-area-inset-bottom\\)\\)_var\\(--offset\\)\\]{inset:auto var(--offset) calc(var(--offset) + env(safe-area-inset-bottom)) var(--offset)}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.left-0{left:0}.left-5{left:1.25rem}.left-\\[var\\(--popover-left\\)\\]{left:var(--popover-left)}.right-0{right:0}.right-\\[15px\\]{right:15px}.right-full{right:100%}.top-0{top:0}.top-\\[7px\\]{top:7px}.top-\\[var\\(--popover-top\\)\\]{top:var(--popover-top)}.z-0{z-index:0}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.z-\\[4\\]{z-index:4}.z-overlay{z-index:999}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2\\.5{margin-top:.625rem;margin-bottom:.625rem}.my-4{margin-top:1rem;margin-bottom:1rem}.\\!mr-0{margin-right:0!important}.\\!mr-2{margin-right:.5rem!important}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-\\[30px\\]{margin-bottom:30px}.mb-px{margin-bottom:1px}.ml-3\\.5{margin-left:.875rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-\\[15px\\]{margin-top:15px}.mt-\\[3px\\]{margin-top:3px}.mt-\\[5px\\]{margin-top:5px}.box-border{box-sizing:border-box}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.\\!hidden{display:none!important}.hidden{display:none}.h-2\\.5{height:.625rem}.h-9{height:2.25rem}.h-\\[26px\\]{height:26px}.h-\\[50px\\]{height:50px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-toolbox-btn{height:26px}.max-h-0{max-height:0px}.max-h-\\[var\\(--max-height\\)\\]{max-height:var(--max-height)}.min-h-toolbox-btn{min-height:26px}.w-2\\.5{width:.625rem}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-\\[230px\\]{width:230px}.w-\\[26px\\]{width:26px}.w-\\[var\\(--width\\)\\]{width:var(--width)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-toolbox-btn{width:26px}.min-w-\\[calc\\(100\\%-theme\\(\\'spacing\\.6\\'\\)-10px\\)\\]{min-width:calc(100% - 1.5rem - 10px)}.min-w-\\[calc\\(100\\%-var\\(--offset\\)\\*2\\)\\]{min-width:calc(100% - var(--offset) * 2)}.min-w-\\[var\\(--width\\)\\]{min-width:var(--width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.min-w-toolbox-btn{min-width:26px}.max-w-\\[1100px\\]{max-width:1100px}.max-w-\\[130px\\]{max-width:130px}.max-w-content{max-width:650px}.max-w-none{max-width:none}.shrink-0{flex-shrink:0}.-translate-x-\\[5px\\]{--tw-translate-x: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[5px\\]{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[5px\\]{--tw-translate-x: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[5px\\]{--tw-translate-y: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes panelShowingMobile{0%{opacity:0;transform:translateY(14px) scale(.98)}70%{opacity:1;transform:translateY(-4px)}to{transform:translateY(0)}}.animate-\\[panelShowingMobile_250ms_ease\\]{animation:panelShowingMobile .25s ease}@keyframes panelShowing{0%{opacity:0;transform:translateY(-8px) scale(.9)}70%{opacity:1;transform:translateY(2px)}to{transform:translateY(0)}}.animate-\\[panelShowing_100ms_ease\\]{animation:panelShowing .1s ease}@keyframes buttonClicked{0%{transform:scale3d(.95,.95,.95)}60%{transform:scale3d(1.02,1.02,1.02)}80%,to{transform:scaleZ(1)}}.animate-button-clicked{animation:buttonClicked .75s cubic-bezier(.215,.61,.355,1) forwards}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in .3s ease forwards}.animate-none{animation:none}@keyframes notifyBounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}to{transform:scale(1)}}.animate-notify-bounce-in{animation:notifyBounceIn .6s 1}@keyframes wobble{0%{transform:translateZ(0)}15%{transform:translate3d(-9%,0,0)}30%{transform:translate3d(9%,0,0)}45%{transform:translate3d(-4%,0,0)}60%{transform:translate3d(4%,0,0)}75%{transform:translate3d(-1%,0,0)}to{transform:translateZ(0)}}.animate-wobble{animation:wobble .4s}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-\\[auto_auto_1fr\\]{grid-template-columns:auto auto 1fr}.grid-rows-\\[auto\\]{grid-template-rows:auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[7px\\]{border-radius:7px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-\\[\\#e8e8eb\\]{--tw-border-opacity: 1;border-color:rgb(232 232 235 / var(--tw-border-opacity, 1))}.border-\\[rgba\\(226\\,226\\,229\\,0\\.2\\)\\],.border-\\[rgba\\(226\\,226\\,229\\,0\\.20\\)\\]{border-color:#e2e2e533}.border-line-gray,.border-popover-border{--tw-border-opacity: 1;border-color:rgb(239 240 241 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.\\!bg-\\[\\#fafffe\\]{--tw-bg-opacity: 1 !important;background-color:rgb(250 255 254 / var(--tw-bg-opacity, 1))!important}.\\!bg-\\[\\#fffbfb\\]{--tw-bg-opacity: 1 !important;background-color:rgb(255 251 251 / var(--tw-bg-opacity, 1))!important}.\\!bg-item-confirm-bg{--tw-bg-opacity: 1 !important;background-color:rgb(226 74 74 / var(--tw-bg-opacity, 1))!important}.\\!bg-item-focus-bg{background-color:#22baff14!important}.bg-\\[\\#34c992\\]{--tw-bg-opacity: 1;background-color:rgb(52 201 146 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F8F8F8\\]{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.bg-\\[\\#eff1f4\\]{--tw-bg-opacity: 1;background-color:rgb(239 241 244 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f2f5f7\\]{--tw-bg-opacity: 1;background-color:rgb(242 245 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f7f7\\]{--tw-bg-opacity: 1;background-color:rgb(247 247 247 / var(--tw-bg-opacity, 1))}.bg-bg-light{--tw-bg-opacity: 1;background-color:rgb(239 242 245 / var(--tw-bg-opacity, 1))}.bg-dark{--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-icon-active-bg{background-color:#388ae51a}.bg-item-focus-bg{background-color:#22baff14}.bg-item-hover-bg{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.bg-popover-bg{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-popover-border{--tw-bg-opacity: 1;background-color:rgb(239 240 241 / var(--tw-bg-opacity, 1))}.bg-selection{--tw-bg-opacity: 1;background-color:rgb(225 242 255 / var(--tw-bg-opacity, 1))}.bg-selection-highlight{background-color:#2eaadc33}.bg-tooltip-bg{--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[13px\\]{padding:13px}.p-\\[3px\\]{padding:3px}.p-\\[5px\\]{padding:5px}.p-\\[var\\(--item-padding\\)\\]{padding:var(--item-padding)}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.px-\\[3px\\]{padding-left:3px;padding-right:3px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-\\[0\\.6em\\]{padding-top:.6em;padding-bottom:.6em}.py-\\[13px\\]{padding-top:13px;padding-bottom:13px}.py-\\[3px\\]{padding-top:3px;padding-bottom:3px}.py-\\[5px\\]{padding-top:5px;padding-bottom:5px}.py-\\[theme\\(spacing\\.block-padding-vertical\\)\\]{padding-top:.4em;padding-bottom:.4em}.pb-\\[3px\\]{padding-bottom:3px}.pr-1\\.5{padding-right:.375rem}.pr-\\[5px\\]{padding-right:5px}.text-center{text-align:center}.text-start{text-align:start}.align-bottom{vertical-align:bottom}.font-\\[-apple-system\\,BlinkMacSystemFont\\,\\"Segoe_UI\\"\\,\\"Roboto\\"\\,\\"Oxygen\\"\\,\\"Ubuntu\\"\\,\\"Cantarell\\"\\,\\"Fira_Sans\\"\\,\\"Droid_Sans\\"\\,\\"Helvetica_Neue\\"\\,sans-serif\\]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.font-\\[inherit\\]{font-family:inherit}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-\\[1\\.25em\\]{font-size:1.25em}.text-\\[1\\.5em\\]{font-size:1.5em}.text-\\[1\\.75em\\]{font-size:1.75em}.text-\\[13px\\]{font-size:13px}.text-\\[14\\.9px\\]{font-size:14.9px}.text-\\[2\\.5em\\]{font-size:2.5em}.text-\\[2em\\]{font-size:2em}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-\\[1\\.25em\\]{line-height:1.25em}.leading-\\[1\\.4em\\]{line-height:1.4em}.leading-\\[1\\.6em\\]{line-height:1.6em}.leading-\\[1em\\]{line-height:1em}.leading-\\[22px\\]{line-height:22px}.leading-\\[50px\\]{line-height:50px}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.-tracking-widest{letter-spacing:-.1em}.tracking-\\[0\\.02em\\]{letter-spacing:.02em}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.text-\\[\\#656b7c\\]{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.text-active-icon{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-dark{--tw-text-opacity: 1;color:rgb(29 32 43 / var(--tw-text-opacity, 1))}.text-gray-text{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.text-icon-active-text{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.text-inherit{color:inherit}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-text-primary{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-text-secondary{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.text-tooltip-font{--tw-text-opacity: 1;color:rgb(205 209 224 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_11px_17px_0_rgba\\(23\\,32\\,61\\,0\\.13\\)\\]{--tw-shadow: 0 11px 17px 0 rgba(23,32,61,.13);--tw-shadow-colored: 0 11px 17px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_1px_1px_0_rgba\\(18\\,49\\,35\\,0\\.05\\)\\]{--tw-shadow: 0 1px 1px 0 rgba(18,49,35,.05);--tw-shadow-colored: 0 1px 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_2px_1px_0_rgba\\(16\\,19\\,29\\,0\\)\\]{--tw-shadow: 0 2px 1px 0 rgba(16,19,29,0);--tw-shadow-colored: 0 2px 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_3px_15px_-3px_theme\\(colors\\.popover-shadow\\)\\]{--tw-shadow: 0 3px 15px -3px rgba(13, 20, 33, .1);--tw-shadow-colored: 0 3px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-base{--tw-shadow: 0 2px 2px 0 rgba(18, 30, 57, .04);--tw-shadow-colored: 0 2px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-focused{--tw-shadow: inset 0 0 0 1px rgba(7, 161, 227, .08);--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-input{--tw-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, .06);--tw-shadow-colored: inset 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-tooltip{--tw-shadow: 0 8px 12px 0 rgba(29, 32, 43, .17), 0 4px 5px -3px rgba(5, 6, 12, .49);--tw-shadow-colored: 0 8px 12px 0 var(--tw-shadow-color), 0 4px 5px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-\\[120ms\\]{transition-duration:.12s}.duration-\\[250ms\\]{transition-duration:.25s}.duration-\\[50ms\\,70ms\\]{transition-duration:50ms,70ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-\\[opacity\\,left\\,top\\]{will-change:opacity,left,top}.will-change-\\[opacity\\,top\\,left\\]{will-change:opacity,top,left}.will-change-\\[opacity\\,top\\]{will-change:opacity,top}.will-change-\\[opacity\\]{will-change:opacity}.\\[direction\\:rtl\\]{direction:rtl}.placeholder\\:font-medium::-moz-placeholder{font-weight:500}.placeholder\\:font-medium::placeholder{font-weight:500}.placeholder\\:text-\\[\\#656b7c\\]::-moz-placeholder{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.placeholder\\:text-\\[\\#656b7c\\]::placeholder{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-text::-moz-placeholder{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-text::placeholder{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);inset:0}.before\\:left-0:before{content:var(--tw-content);left:0}.before\\:left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:left-\\[9px\\]:before{content:var(--tw-content);left:9px}.before\\:top-0:before{content:var(--tw-content);top:0}.before\\:top-1\\/2:before{content:var(--tw-content);top:50%}.before\\:top-\\[5px\\]:before{content:var(--tw-content);top:5px}.before\\:-z-10:before{content:var(--tw-content);z-index:-10}.before\\:m-\\[3px\\]:before{content:var(--tw-content);margin:3px}.before\\:-ml-\\[11px\\]:before{content:var(--tw-content);margin-left:-11px}.before\\:-mt-\\[11px\\]:before{content:var(--tw-content);margin-top:-11px}.before\\:block:before{content:var(--tw-content);display:block}.before\\:h-3:before{content:var(--tw-content);height:.75rem}.before\\:h-\\[18px\\]:before{content:var(--tw-content);height:18px}.before\\:h-\\[calc\\(100\\%-6px\\)\\]:before{content:var(--tw-content);height:calc(100% - 6px)}.before\\:w-0\\.5:before{content:var(--tw-content);width:.125rem}.before\\:w-\\[18px\\]:before{content:var(--tw-content);width:18px}.before\\:w-\\[3px\\]:before{content:var(--tw-content);width:3px}.before\\:rotate-\\[-45deg\\]:before{content:var(--tw-content);--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rotation{0%{content:var(--tw-content);transform:rotate(0)}to{content:var(--tw-content);transform:rotate(360deg)}}.before\\:animate-rotation:before{content:var(--tw-content);animation:rotation 1.2s infinite linear}.before\\:rounded-\\[5px\\]:before{content:var(--tw-content);border-radius:5px}.before\\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\\:rounded-lg:before{content:var(--tw-content);border-radius:.5rem}.before\\:border-2:before{content:var(--tw-content);border-width:2px}.before\\:border-line-gray:before{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(239 240 241 / var(--tw-border-opacity, 1))}.before\\:border-l-active-icon:before{content:var(--tw-content);--tw-border-opacity: 1;border-left-color:rgb(56 138 229 / var(--tw-border-opacity, 1))}.before\\:\\!bg-\\[\\#41ffb1\\]:before{content:var(--tw-content);--tw-bg-opacity: 1 !important;background-color:rgb(65 255 177 / var(--tw-bg-opacity, 1))!important}.before\\:\\!bg-\\[\\#fb5d5d\\]:before{content:var(--tw-content);--tw-bg-opacity: 1 !important;background-color:rgb(251 93 93 / var(--tw-bg-opacity, 1))!important}.before\\:bg-\\[\\#575d67\\]:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(87 93 103 / var(--tw-bg-opacity, 1))}.before\\:bg-tooltip-bg:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.before\\:bg-transparent:before{content:var(--tw-content);background-color:transparent}.before\\:content-\\[\\"\\"\\]:before{--tw-content: "";content:var(--tw-content)}.before\\:content-\\[\\\\\\'\\\\\\'\\]:before{--tw-content: \\'\\';content:var(--tw-content)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:left-\\[9px\\]:after{content:var(--tw-content);left:9px}.after\\:top-\\[5px\\]:after{content:var(--tw-content);top:5px}.after\\:mx-3:after{content:var(--tw-content);margin-left:.75rem;margin-right:.75rem}.after\\:h-3:after{content:var(--tw-content);height:.75rem}.after\\:w-0\\.5:after{content:var(--tw-content);width:.125rem}.after\\:rotate-45:after{content:var(--tw-content);--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\\:bg-\\[\\#575d67\\]:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(87 93 103 / var(--tw-bg-opacity, 1))}.after\\:text-\\[\\#ddd\\]:after{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(221 221 221 / var(--tw-text-opacity, 1))}.after\\:content-\\[\\"\\"\\]:after{--tw-content: "";content:var(--tw-content)}.after\\:content-\\[\\'\\|\\'\\]:after{--tw-content: "|";content:var(--tw-content)}.first\\:mt-0:first-child{margin-top:0}.last\\:ml-2\\.5:last-child{margin-left:.625rem}.empty\\:before\\:pointer-events-none:empty:before{content:var(--tw-content);pointer-events:none}.empty\\:before\\:cursor-text:empty:before{content:var(--tw-content);cursor:text}.empty\\:before\\:text-gray-text:empty:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.empty\\:before\\:content-\\[attr\\(data-blok-placeholder\\)\\]:empty:before{--tw-content: attr(data-blok-placeholder);content:var(--tw-content)}.empty\\:before\\:content-\\[attr\\(data-placeholder-active\\)\\]:empty:before{--tw-content: attr(data-placeholder-active);content:var(--tw-content)}.hover\\:bg-\\[\\#2db583\\]:hover{--tw-bg-opacity: 1;background-color:rgb(45 181 131 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#e0e4eb\\]:hover{--tw-bg-opacity: 1;background-color:rgb(224 228 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#e9ecee\\]:hover{--tw-bg-opacity: 1;background-color:rgb(233 236 238 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#fbfcfe\\]:hover{--tw-bg-opacity: 1;background-color:rgb(251 252 254 / var(--tw-bg-opacity, 1))}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-button-base-hover:hover{--tw-shadow: 0 1px 3px 0 rgba(18, 30, 57, .08);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:placeholder\\:text-\\[rgba\\(101\\,107\\,124\\,0\\.3\\)\\]:focus::-moz-placeholder{color:#656b7c4d}.focus\\:placeholder\\:text-\\[rgba\\(101\\,107\\,124\\,0\\.3\\)\\]:focus::placeholder{color:#656b7c4d}.active\\:cursor-grabbing:active{cursor:grabbing}.group[data-blok-dragging=true] .group-data-\\[blok-dragging\\=true\\]\\:pointer-events-none{pointer-events:none}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:left-\\[calc\\(-1\\*theme\\(width\\.toolbox-btn\\)\\)\\]{left:-26px}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:left-auto{left:auto}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:right-\\[calc\\(-1\\*theme\\(width\\.toolbox-btn\\)\\)\\]{right:-26px}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:right-auto{right:auto}.group[data-blok-dragging=true] .group-data-\\[blok-dragging\\=true\\]\\:cursor-grabbing{cursor:grabbing}@media(max-width:650px){.mobile\\:absolute{position:absolute}.mobile\\:right-auto{right:auto}.mobile\\:z-\\[2\\]{z-index:2}.mobile\\:hidden{display:none}.mobile\\:h-toolbox-btn-mobile{height:36px}.mobile\\:w-toolbox-btn-mobile{width:36px}.mobile\\:rounded-\\[6px\\]{border-radius:6px}.mobile\\:rounded-lg{border-radius:.5rem}.mobile\\:border{border-width:1px}.mobile\\:border-\\[\\#e8e8eb\\]{--tw-border-opacity: 1;border-color:rgb(232 232 235 / var(--tw-border-opacity, 1))}.mobile\\:bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.mobile\\:p-1{padding:.25rem}.mobile\\:text-\\[15px\\]{font-size:15px}.mobile\\:font-medium{font-weight:500}.mobile\\:shadow-overlay-pane{--tw-shadow: 0 3px 15px -3px rgba(13, 20, 33, .13);--tw-shadow-colored: 0 3px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:ml-0{margin-left:0}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:mr-auto{margin-right:auto}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:pl-\\[10px\\]{padding-left:10px}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:pr-0{padding-right:0}}@media(min-width:651px){.not-mobile\\:w-6{width:1.5rem}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-0{left:0}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-\\[-5px\\]{left:-5px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-\\[calc\\(-1\\*theme\\(spacing\\.narrow-mode-right-padding\\)-5px\\)\\]{left:-55px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:right-\\[5px\\]{right:5px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:right-auto{right:auto}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:left-\\[5px\\]{left:5px}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:right-\\[calc\\(-1\\*theme\\(spacing\\.narrow-mode-right-padding\\)-5px\\)\\]{right:-55px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:ml-\\[theme\\(spacing\\.narrow-mode-right-padding\\)\\]{margin-left:50px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:mr-0{margin-right:0}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:mr-\\[theme\\(spacing\\.narrow-mode-right-padding\\)\\]{margin-right:50px}}@media(hover:hover){.can-hover\\:hover\\:cursor-grab:hover{cursor:grab}.can-hover\\:hover\\:cursor-pointer:hover{cursor:pointer}.can-hover\\:hover\\:bg-bg-light:hover{--tw-bg-opacity: 1;background-color:rgb(239 242 245 / var(--tw-bg-opacity, 1))}.can-hover\\:hover\\:bg-item-hover-bg:hover{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.group[data-blok-toolbox-opened=true] .group-data-\\[blok-toolbox-opened\\=true\\]\\:can-hover\\:hover\\:cursor-pointer:hover{cursor:pointer}}.\\[\\&\\:\\:-webkit-input-placeholder\\]\\:\\!leading-normal::-webkit-input-placeholder{line-height:1.5!important}.\\[\\&\\>p\\:first-of-type\\]\\:mt-0>p:first-of-type{margin-top:0}.\\[\\&\\>p\\:last-of-type\\]\\:mb-0>p:last-of-type{margin-bottom:0}.\\[\\&\\[data-blok-dragging\\=true\\]\\]\\:cursor-grabbing[data-blok-dragging=true]{cursor:grabbing}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:pointer-events-none[data-blok-empty=true]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:cursor-text[data-blok-empty=true]:before{content:var(--tw-content);cursor:text}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:text-gray-text[data-blok-empty=true]:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:content-\\[attr\\(data-blok-placeholder\\)\\][data-blok-empty=true]:before{--tw-content: attr(data-blok-placeholder);content:var(--tw-content)}.\\[\\&\\[data-blok-focused\\=\\"true\\"\\]\\]\\:bg-item-focus-bg[data-blok-focused=true]{background-color:#22baff14}.\\[\\&\\[data-blok-force-hover\\]\\]\\:cursor-pointer[data-blok-force-hover]{cursor:pointer}.\\[\\&\\[data-blok-force-hover\\]\\]\\:bg-item-hover-bg[data-blok-force-hover]{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:pointer-events-none[data-blok-placeholder]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:\\!static[data-blok-placeholder]:before{content:var(--tw-content);position:static!important}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:inline-block[data-blok-placeholder]:before{content:var(--tw-content);display:inline-block}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:w-0[data-blok-placeholder]:before{content:var(--tw-content);width:0px}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:whitespace-nowrap[data-blok-placeholder]:before{content:var(--tw-content);white-space:nowrap}.\\[\\&\\[data-blok-popover-item-no-hover\\]\\]\\:cursor-default[data-blok-popover-item-no-hover]{cursor:default}.\\[\\&\\[data-blok-popover-item-no-hover\\]\\]\\:hover\\:bg-transparent:hover[data-blok-popover-item-no-hover]{background-color:transparent}.\\[\\&\\[data-blok-toolbox-opened\\=true\\]_\\[contentEditable\\=true\\]\\[data-blok-placeholder\\]\\:focus\\]\\:before\\:\\!opacity-0[data-blok-toolbox-opened=true] [contentEditable=true][data-blok-placeholder]:focus:before{content:var(--tw-content);opacity:0!important}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:pointer-events-none[data-empty=true]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:cursor-text[data-empty=true]:before{content:var(--tw-content);cursor:text}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:text-gray-text[data-empty=true]:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:content-\\[attr\\(data-placeholder-active\\)\\][data-empty=true]:before{--tw-content: attr(data-placeholder-active);content:var(--tw-content)}.\\[\\&_\\:\\:selection\\]\\:bg-selection-inline ::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(212 236 255 / var(--tw-bg-opacity, 1))}.\\[\\&_\\:\\:selection\\]\\:bg-selection-inline ::selection{--tw-bg-opacity: 1;background-color:rgb(212 236 255 / var(--tw-bg-opacity, 1))}.\\[\\&_\\[contenteditable\\]\\:empty\\]\\:after\\:content-\\[\\"\\\\\\\\feff_\\"\\] [contenteditable]:empty:after{--tw-content: "\\\\feff ";content:var(--tw-content)}.\\[\\&_\\[contenteditable\\]\\]\\:select-none [contenteditable]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[\\&_\\[data-blok-tool\\=stub\\]\\]\\:opacity-55 [data-blok-tool=stub]{opacity:.55}.\\[\\&_\\[hidden\\]\\]\\:\\!hidden [hidden]{display:none!important}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\]\\:text-link a{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.\\[\\&_a\\]\\:underline a{text-decoration-line:underline}.\\[\\&_b\\]\\:font-bold b{font-weight:700}.\\[\\&_div\\]\\:\\!m-0 div{margin:0!important}.\\[\\&_div\\]\\:\\!p-0 div{padding:0!important}.\\[\\&_i\\]\\:italic i{font-style:italic}.\\[\\&_img\\]\\:opacity-55 img{opacity:.55}.\\[\\&_p\\]\\:\\!m-0 p{margin:0!important}.\\[\\&_p\\]\\:\\!p-0 p{padding:0!important}.\\[\\&_path\\]\\:stroke-current path{stroke:currentColor}.\\[\\&_svg\\]\\:-mt-0\\.5 svg{margin-top:-.125rem}.\\[\\&_svg\\]\\:mr-\\[0\\.2em\\] svg{margin-right:.2em}.\\[\\&_svg\\]\\:block svg{display:block}.\\[\\&_svg\\]\\:size-icon svg{width:20px;height:20px}.\\[\\&_svg\\]\\:h-5 svg{height:1.25rem}.\\[\\&_svg\\]\\:h-6 svg{height:1.5rem}.\\[\\&_svg\\]\\:h-7 svg{height:1.75rem}.\\[\\&_svg\\]\\:h-auto svg{height:auto}.\\[\\&_svg\\]\\:h-icon svg{height:20px}.\\[\\&_svg\\]\\:max-h-full svg{max-height:100%}.\\[\\&_svg\\]\\:w-6 svg{width:1.5rem}.\\[\\&_svg\\]\\:w-7 svg{width:1.75rem}.\\[\\&_svg\\]\\:w-auto svg{width:auto}.\\[\\&_svg\\]\\:w-icon svg{width:20px}.\\[\\&_svg\\]\\:text-gray-text svg{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}@media(max-width:650px){.mobile\\:\\[\\&_svg\\]\\:h-icon-mobile svg{height:28px}.mobile\\:\\[\\&_svg\\]\\:w-icon-mobile svg{width:28px}}`;class _C extends Se{constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=null,this.resizeDebouncer=mv(()=>{this.windowResize()},200),this.selectionChangeDebounced=mv(()=>{this.selectionChanged()},Cx),this.documentTouchedListener=e=>{this.documentTouched(e)}}get contentRect(){if(this.contentRectCache!==null)return this.contentRectCache;const e=this.nodes.wrapper.querySelector('[data-blok-testid="block-content"]');return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.setIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){if(e){this.unbindReadOnlySensitiveListeners();return}const t=()=>{this.bindReadOnlySensitiveListeners()};t();const o=window.requestIdleCallback;typeof o=="function"&&o(t,{timeout:2e3})}checkEmptiness(){const{BlockManager:e}=this.Blok;this.nodes.wrapper.setAttribute(Gx,e.isBlokEmpty?"true":"false")}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o}=this.Blok;return!!(t.opened||o.opened||e.toolbox.opened)}get someFlipperButtonFocused(){return this.Blok.Toolbar.toolbox.hasFocus()?!0:Object.entries(this.Blok).filter(([e,t])=>t.flipper instanceof Yn).some(([e,t])=>t.flipper.hasFocus())}destroy(){this.nodes.holder.innerHTML="",this.unbindReadOnlyInsensitiveListeners()}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o}=this.Blok;t.close(),o.close(),e.toolbox.close()}setIsMobile(){const e=window.innerWidth<bv;e!==this.isMobile&&this.eventsDispatcher.emit(Er,{isEnabled:this.isMobile}),this.isMobile=e}make(){const e=this.config.holder;if(!e)throw new Error("Blok holder is not specified in the configuration.");this.nodes.holder=N.getHolder(e),this.nodes.wrapper=N.make("div",["group","relative","box-border","z-[1]","[&[data-blok-dragging=true]]:cursor-grabbing","[&_svg]:max-h-full","[&_path]:stroke-current","[&_::selection]:bg-selection-inline","[&[data-blok-toolbox-opened=true]_[contentEditable=true][data-blok-placeholder]:focus]:before:!opacity-0",...this.isRtl?["[direction:rtl]"]:[]]),this.nodes.wrapper.setAttribute(ro,Ax),this.nodes.wrapper.setAttribute(Nx,""),this.nodes.wrapper.setAttribute("data-blok-testid","blok-editor"),this.isRtl&&this.nodes.wrapper.setAttribute(Dx,"true"),this.nodes.redactor=N.make("div",["not-mobile:group-data-[blok-narrow=true]:mr-[theme(spacing.narrow-mode-right-padding)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:ml-[theme(spacing.narrow-mode-right-padding)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:mr-0",'[&_[contenteditable]:empty]:after:content-["\\feff_"]']),this.nodes.redactor.setAttribute(Ox,""),this.nodes.redactor.setAttribute("data-blok-testid","redactor"),this.nodes.holder.offsetWidth<this.contentRect.width&&this.nodes.wrapper.setAttribute(Lx,"true"),this.nodes.redactor.style.paddingBottom=this.config.minHeight+"px",this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper),this.bindReadOnlyInsensitiveListeners()}loadStyles(){const e="blok-styles";if(N.get(e))return;const t=N.make("style",null,{id:e,textContent:IC.toString()});this.config.style&&!ot(this.config.style)&&this.config.style.nonce&&t.setAttribute("nonce",this.config.style.nonce),N.prepend(document.head,t)}bindReadOnlyInsensitiveListeners(){this.listeners.on(document,"selectionchange",this.selectionChangeDebounced),this.listeners.on(window,"resize",this.resizeDebouncer,{passive:!0}),this.listeners.on(this.nodes.redactor,"mousedown",this.documentTouchedListener,{capture:!0,passive:!0}),this.listeners.on(this.nodes.redactor,"touchstart",this.documentTouchedListener,{capture:!0,passive:!0})}unbindReadOnlyInsensitiveListeners(){this.listeners.off(document,"selectionchange",this.selectionChangeDebounced),this.listeners.off(window,"resize",this.resizeDebouncer),this.listeners.off(this.nodes.redactor,"mousedown",this.documentTouchedListener),this.listeners.off(this.nodes.redactor,"touchstart",this.documentTouchedListener)}bindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.on(this.nodes.redactor,"click",e=>{e instanceof MouseEvent&&this.redactorClicked(e)},!1),this.readOnlyMutableListeners.on(document,"keydown",e=>{e instanceof KeyboardEvent&&this.documentKeydown(e)},!0),this.readOnlyMutableListeners.on(document,"mousedown",e=>{e instanceof MouseEvent&&this.documentClicked(e)},!0),this.watchBlockHoveredEvents(),this.enableInputsEmptyMark()}watchBlockHoveredEvents(){const e={lastHovered:null},o=Hu(i=>{var g;const l=typeof MouseEvent!="undefined"&&i instanceof MouseEvent,c=typeof TouchEvent!="undefined"&&i instanceof TouchEvent;if(!l&&!c)return;const d=(g=i.target)==null?void 0:g.closest('[data-blok-testid="block-wrapper"]');if(this.Blok.BlockSelection.anyBlockSelected||!d||e.lastHovered===d)return;e.lastHovered=d;const h=this.Blok.BlockManager.getBlockByChildNode(d);h&&this.eventsDispatcher.emit(Ty,{block:h})},20);this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",i=>{o(i)},{passive:!0})}unbindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.setIsMobile()}documentKeydown(e){var o;switch((o=e.key)!=null?o:""){case"Enter":this.enterPressed(e);break;case"Backspace":case"Delete":this.backspacePressed(e);break;case"Escape":this.escapePressed(e);break;default:this.defaultBehaviour(e);break}}defaultBehaviour(e){const{currentBlock:t}=this.Blok.BlockManager,o=e.target.closest('[data-blok-testid="blok-editor"]'),i=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;if(!this.Blok.BlockSettings.contains(e.target)){if(t!==void 0&&o===null){this.Blok.BlockEvents.keydown(e);return}o||t&&i||(this.Blok.BlockManager.unsetCurrentBlock(),this.Blok.Toolbar.close())}}backspacePressed(e){if(this.Blok.BlockSettings.contains(e.target))return;const{BlockManager:t,BlockSelection:o,Caret:i}=this.Blok,l=se.isSelectionExists,c=se.isCollapsed;if(!(o.anyBlockSelected&&(!l||c===!0||this.Blok.CrossBlockSelection.isCrossBlockSelectionStarted)))return;const h=t.removeSelectedBlocks();if(h===void 0)return;const g=t.insertDefaultBlockAtIndex(h,!0);i.setToBlock(g,i.positions.START),o.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}escapePressed(e){if(this.Blok.BlockSelection.clearSelection(e),this.Blok.Toolbar.toolbox.opened){this.Blok.Toolbar.toolbox.close(),this.Blok.BlockManager.currentBlock&&this.Blok.Caret.setToBlock(this.Blok.BlockManager.currentBlock,this.Blok.Caret.positions.END);return}if(this.Blok.BlockSettings.opened){this.Blok.BlockSettings.close();return}if(this.Blok.InlineToolbar.opened){this.Blok.InlineToolbar.close();return}this.Blok.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:o}=this.Blok;if(this.someToolbarOpened)return;const i=t.currentBlockIndex>=0,l=se.isSelectionExists,c=se.isCollapsed;if(o.anyBlockSelected&&(!l||c===!0)){o.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation();return}if(!this.someToolbarOpened&&i&&e.target.tagName==="BODY"){const d=this.Blok.BlockManager.insert();e.preventDefault(),this.Blok.Caret.setToBlock(d),this.Blok.Toolbar.moveAndOpen(d)}this.Blok.BlockSelection.clearSelection(e)}documentClicked(e){var x,w;if(!e.isTrusted)return;const t=e.target,o=this.nodes.holder.contains(t)||se.isAtBlok,i=this.nodes.redactor.contains(t),l=this.Blok.Toolbar.contains(t);(!(o||l)||!i&&!l)&&(this.Blok.BlockManager.unsetCurrentBlock(),this.Blok.Toolbar.close());const h=this.Blok.BlockSettings.contains(t),g=(x=this.Blok.Toolbar.nodes.settingsToggler)==null?void 0:x.contains(t),v=(w=this.Blok.Toolbar.nodes.plusButton)==null?void 0:w.contains(t),y=h||g||v,b=this.Blok.BlockSettings.opened&&!y;if(b&&this.Blok.BlockSettings.close(),b&&i){const T=this.Blok.BlockManager.getBlockByChildNode(t);this.Blok.Toolbar.moveAndOpen(T)}this.Blok.BlockSelection.clearSelection(e)}documentTouched(e){const t=e.target,o=(()=>{if(t!==this.nodes.redactor)return t;if(e instanceof MouseEvent){const i=document.elementFromPoint(e.clientX,e.clientY);return i!=null?i:t}if(e instanceof TouchEvent&&e.touches.length>0){const{clientX:i,clientY:l}=e.touches[0],c=document.elementFromPoint(i,l);return c!=null?c:t}return t})();try{this.Blok.BlockManager.setCurrentBlockByChildNode(o)}catch(i){this.Blok.RectangleSelection.isRectActivated()||this.Blok.Caret.setToTheLastBlock()}!this.Blok.ReadOnly.isEnabled&&!this.Blok.Toolbar.contains(t)&&this.Blok.Toolbar.moveAndOpen()}redactorClicked(e){if(!se.isCollapsed)return;const t=e.target,o=e.metaKey||e.ctrlKey;if(!(N.isAnchor(t)&&o)){this.processBottomZoneClick(e);return}e.stopImmediatePropagation(),e.stopPropagation();const l=t.getAttribute("href");if(!l)return;const c=D1(l);M1(c)}processBottomZoneClick(e){var v,y;const t=this.Blok.BlockManager.getBlockByIndex(-1),o=N.offset(t.holder).bottom,i=e.pageY,{BlockSelection:l}=this.Blok;if(!(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!l.anyBlockSelected&&o<i))return;e.stopImmediatePropagation(),e.stopPropagation();const{BlockManager:d,Caret:h,Toolbar:g}=this.Blok;(!((v=d.lastBlock)!=null&&v.tool.isDefault)||!((y=d.lastBlock)!=null&&y.isEmpty))&&d.insertAtEnd(),h.setToTheLastBlock(),g.moveAndOpen(d.lastBlock)}selectionChanged(){var h;const{CrossBlockSelection:e,BlockSelection:t}=this.Blok,o=se.anchorElement;if(e.isCrossBlockSelectionStarted&&t.anyBlockSelected&&((h=se.get())==null||h.removeAllRanges()),!o&&!se.range&&this.Blok.InlineToolbar.close(),!o)return;const i=o.closest('[data-blok-testid="block-content"]'),l=i===null||i.closest('[data-blok-testid="blok-editor"]')!==this.nodes.wrapper,c=o.getAttribute("data-blok-inline-toolbar")==="true";l&&!this.Blok.InlineToolbar.containsNode(o)&&this.Blok.InlineToolbar.close(),!(l&&!c)&&(this.Blok.BlockManager.currentBlock||this.Blok.BlockManager.setCurrentBlockByChildNode(o),this.Blok.InlineToolbar.tryToShow(!0))}enableInputsEmptyMark(){const e=t=>{const o=t.target;kv(o)};this.readOnlyMutableListeners.on(this.nodes.wrapper,"input",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusin",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusout",e)}}const RC={BlocksAPI:Qx,CaretAPI:Jx,EventsAPI:eE,I18nAPI:rd,API:tE,InlineToolbarAPI:nE,ListenersAPI:rE,NotifierAPI:iE,ReadOnlyAPI:sE,SanitizerAPI:xE,SaverAPI:EE,SelectionAPI:SE,ToolsAPI:CE,StylesAPI:BE,ToolbarAPI:AE,TooltipAPI:FE,UiAPI:zE,BlockSettings:TS,Toolbar:AS,InlineToolbar:_S,ReactAdapter:LS,BlockEvents:FS,BlockManager:fC,BlockSelection:hC,Caret:Xd,CrossBlockSelection:mC,ModificationsObserver:vC,Paste:Yd,ReadOnly:yC,RectangleSelection:bC,Renderer:kC,Saver:wC,Tools:AC,UI:_C};class NC{constructor(e){this.moduleInstances={},this.eventsDispatcher=new $o,this.config={},this.isReady=new Promise((t,o)=>{Promise.resolve().then(async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:i,Caret:l,UI:c,ModificationsObserver:d}=this.moduleInstances;c.checkEmptiness(),d.enable(),this.configuration.autofocus===!0&&this.configuration.readOnly!==!0&&l.setToBlock(i.blocks[0],l.positions.START),t()}).catch(i=>{Be(`Blok is not ready because of ${i}`,"error"),o(i)})})}set configuration(e){var h,g,v,y,b,x;qe(e)?this.config=be({},e):this.config={holder:e},this.config.holder==null&&(this.config.holder="blok"),this.config.logLevel==null&&(this.config.logLevel=dv.VERBOSE),_1(this.config.logLevel),this.config.defaultBlock=(h=this.config.defaultBlock)!=null?h:"paragraph";const t=this.config.tools,o=this.config.defaultBlock,i=t!=null&&Object.prototype.hasOwnProperty.call(t,o!=null?o:""),l=(g=this.config.data)==null?void 0:g.blocks,c=Array.isArray(l)&&l.length>0;if(o&&o!=="paragraph"&&!i&&!c){Be(`Default block "${o}" is not configured. Falling back to "paragraph" tool.`,"warn"),this.config.defaultBlock="paragraph";const w=this.config.tools,T=be({},w!=null?w:{}),S=T.paragraph;T.paragraph=this.createParagraphToolConfig(S),this.config.tools=T}this.config.minHeight=this.config.minHeight!==void 0?this.config.minHeight:300;const d={type:this.config.defaultBlock,data:{}};this.config.placeholder===void 0&&(this.config.placeholder=!1),this.config.sanitizer=(v=this.config.sanitizer)!=null?v:{},this.config.hideToolbar=(y=this.config.hideToolbar)!=null?y:!1,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=this.config.inlineToolbar!==void 0?this.config.inlineToolbar:!0,(ot(this.config.data)||!this.config.data.blocks||this.config.data.blocks.length===0)&&(this.config.data={blocks:[d]}),this.config.readOnly=this.config.readOnly||!1,(b=this.config.i18n)!=null&&b.messages&&$e.setDictionary(this.config.i18n.messages),this.config.i18n.direction=((x=this.config.i18n)==null?void 0:x.direction)||"ltr"}get configuration(){return this.config}validate(){const{holder:e}=this.config;if(un(e)&&!N.get(e))throw Error(`element with ID «${e}» is missing. Pass correct holder's ID.`);if(e&&qe(e)&&!N.isElement(e))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"].reduce((t,o)=>t.then(async()=>{try{await this.moduleInstances[o].prepare()}catch(i){if(i instanceof Vo)throw new Error(i.message);Be(`Module ${o} was skipped because of %o`,"warn",i)}}),Promise.resolve())}render(){const e=this.moduleInstances.Renderer;if(!e)throw new Vo("Renderer module is not initialized");if(!this.config.data)throw new Vo("Blok data is not initialized");return e.render(this.config.data.blocks)}constructModules(){Object.entries(RC).forEach(([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(o){Be(`[constructModules] Module ${e} skipped because`,"error",o)}})}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}createParagraphToolConfig(e){if(e===void 0)return{config:{preserveBlank:!0}};if(De(e))return{class:e,config:{preserveBlank:!0}};if(qe(e)){const t=e,o=t.config;return Tt(be({},t),{config:Tt(be({},qe(o)?o:{}),{preserveBlank:!0})})}return{config:{preserveBlank:!0}}}getModulesDiff(e){const t={};for(const o in this.moduleInstances)o!==e&&(t[o]=this.moduleInstances[o]);return t}}const Ws=class Ws{constructor({data:e,config:t,api:o,readOnly:i}){this.api=o,this.readOnly=i,this._settings=t||{},this._data=this.normalizeData(e),this._element=this.getTag()}get _CSS(){return{block:this.api.styles.block,wrapper:""}}isHeaderData(e){return typeof e=="object"&&e!==null&&"text"in e}normalizeData(e){if(!this.isHeaderData(e))return{text:"",level:this.defaultLevel.number};const t=parseInt(String(e.level)),o=e.level!==void 0&&!isNaN(t);return{text:e.text||"",level:o?t:this.defaultLevel.number}}render(){return this._element}renderSettings(){return this.levels.map(e=>({icon:e.svg,label:this.api.i18n.t(`Heading ${e.number}`),onActivate:()=>this.setLevel(e.number),closeOnActivate:!0,isActive:this.currentLevel.number===e.number}))}setLevel(e){this.data={level:e,text:this.data.text}}merge(e){this._element.insertAdjacentHTML("beforeend",e.text)}validate(e){return e.text.trim()!==""}save(e){return{text:e.innerHTML,level:this.currentLevel.number}}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{level:!1,text:{}}}static get isReadOnlySupported(){return!0}get data(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data}set data(e){if(this._data=this.normalizeData(e),e.level!==void 0&&this._element.parentNode){const t=this.getTag();t.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(t,this._element),this._element=t}e.text!==void 0&&(this._element.innerHTML=this._data.text||"")}getTag(){const e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.className=Ae(Ws.BASE_STYLES,this.currentLevel.styles),e.setAttribute(Yu,"header"),e.contentEditable=this.readOnly?"false":"true",e.setAttribute("data-placeholder",this.api.i18n.t(this._settings.placeholder||"")),e}get currentLevel(){const e=this.levels.find(t=>t.number===this._data.level);return e!=null?e:this.defaultLevel}get defaultLevel(){if(!this._settings.defaultLevel)return this.levels[1];const e=this.levels.find(t=>t.number===this._settings.defaultLevel);return e||(console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels"),this.levels[1])}get levels(){const e=[{number:1,tag:"H1",svg:iS,styles:"text-[2.5em] font-bold"},{number:2,tag:"H2",svg:sS,styles:"text-[2em] font-semibold"},{number:3,tag:"H3",svg:aS,styles:"text-[1.75em] font-semibold"},{number:4,tag:"H4",svg:lS,styles:"text-[1.5em] font-semibold"},{number:5,tag:"H5",svg:cS,styles:"text-[1.25em] font-semibold"},{number:6,tag:"H6",svg:uS,styles:"text-base font-semibold"}];return this._settings.levels?e.filter(t=>this._settings.levels.includes(t.number)):e}onPaste(e){var d;const t=e.detail;if(!("data"in t))return;const o=t.data,l=(d={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[o.tagName])!=null?d:this.defaultLevel.number,c=this._settings.levels?this._settings.levels.reduce((h,g)=>Math.abs(g-l)<Math.abs(h-l)?g:h):l;this.data={level:c,text:o.innerHTML}}static get pasteConfig(){return{tags:["H1","H2","H3","H4","H5","H6"]}}static get toolbox(){return{icon:dS,title:"Heading"}}};Ws.BASE_STYLES="py-[0.6em] pb-[3px] px-0 m-0 leading-[1.25em] outline-none [&_p]:!p-0 [&_p]:!m-0 [&_div]:!p-0 [&_div]:!m-0";let nf=Ws;const po=class po{static get version(){return as()}constructor(e){this.initialConfiguration=qe(e)?be({},e):e;const t=qe(e)&&De(e.onReady)?e.onReady:()=>{},o=new NC(e);this.destroy=()=>{},this.isReady=o.isReady.then(()=>{this.exportAPI(o),t()})}exportAPI(e){var w,T;const t=["configuration"],o=()=>{Object.values(e.moduleInstances).forEach(S=>{if(S==null)return;De(S.destroy)&&S.destroy();const O=S.listeners;O&&De(O.removeAll)&&O.removeAll()}),ME();for(const S in this)Object.prototype.hasOwnProperty.call(this,S)&&delete this[S];Object.setPrototypeOf(this,null)};t.forEach(S=>{if(S!=="configuration"){this[S]=e[S];return}const O=e.configuration,L=qe(this.initialConfiguration)?this.initialConfiguration:O!=null?O:this.initialConfiguration;L!==void 0&&(this[S]=L)}),this.destroy=o;const i=e.moduleInstances.API.methods,l=(T=(w=e.moduleInstances.EventsAPI)==null?void 0:w.methods)!=null?T:i.events;if(l!==void 0){const S=O=>{Object.prototype.hasOwnProperty.call(O,"eventsDispatcher")||Object.defineProperty(O,"eventsDispatcher",{value:l,configurable:!0,enumerable:!0,writable:!1})};S(i),S(this)}Object.getPrototypeOf(i)!==po.prototype&&Object.setPrototypeOf(i,po.prototype),Object.setPrototypeOf(this,i);const c=Object.create(null),d=e.moduleInstances,h=d,g=S=>/^[A-Z]+$/.test(S)?S.toLowerCase():S.charAt(0).toLowerCase()+S.slice(1);Object.keys(h).forEach(S=>{const O=g(S);Object.defineProperty(c,O,{configurable:!0,enumerable:!0,get:()=>h[S]})});const v=d.Toolbar,y=d.BlockSettings;v!==void 0&&y!==void 0&&v.blockSettings===void 0&&(v.blockSettings=y);const b=d.InlineToolbar;v!==void 0&&b!==void 0&&v.inlineToolbar===void 0&&(v.inlineToolbar=b),Object.defineProperty(this,"module",{value:c,configurable:!0,enumerable:!1,writable:!1}),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([S,O])=>{Object.entries(O).forEach(([L,U])=>{const H=S,X=e.moduleInstances.API.methods[H];this[U]=X[L]})})}};po.Header=nf,po.Paragraph=js;let rf=po;const Pt={wrapper:yt("fixed z-[2] bottom-5 left-5",'font-[-apple-system,BlinkMacSystemFont,"Segoe_UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira_Sans","Droid_Sans","Helvetica_Neue",sans-serif]'),notification:yt("relative w-[230px] mt-[15px] py-[13px] px-4","bg-white shadow-[0_11px_17px_0_rgba(23,32,61,0.13)] rounded-[5px]","text-sm leading-[1.4em] break-words",'before:content-[""] before:absolute before:block before:top-0 before:left-0',"before:w-[3px] before:h-[calc(100%-6px)] before:m-[3px] before:rounded-[5px] before:bg-transparent"),crossBtn:yt("absolute top-[7px] right-[15px] w-2.5 h-2.5 p-[5px] opacity-55 cursor-pointer",'before:content-[""] before:absolute before:left-[9px] before:top-[5px] before:h-3 before:w-0.5 before:bg-[#575d67] before:rotate-[-45deg]','after:content-[""] after:absolute after:left-[9px] after:top-[5px] after:h-3 after:w-0.5 after:bg-[#575d67] after:rotate-45',"hover:opacity-100"),btnsWrapper:"flex flex-row flex-nowrap mt-[5px]",btn:"border-none rounded-[3px] text-[13px] py-[5px] px-2.5 cursor-pointer last:ml-2.5",okBtn:"bg-[#34c992] shadow-[0_1px_1px_0_rgba(18,49,35,0.05)] text-white hover:bg-[#2db583]",cancelBtn:"bg-[#f2f5f7] shadow-[0_2px_1px_0_rgba(16,19,29,0)] text-[#656b7c] hover:bg-[#e9ecee]",input:yt("max-w-[130px] py-[5px] px-2.5 bg-[#f7f7f7] border-0 rounded-[3px]","text-[13px] text-[#656b7c] outline-none","placeholder:text-[#656b7c] focus:placeholder:text-[rgba(101,107,124,0.3)]"),successNotification:yt("!bg-[#fafffe]","before:!bg-[#41ffb1]"),errorNotification:yt("!bg-[#fffbfb]","before:!bg-[#fb5d5d]")},of=a=>{const e=document.createElement("DIV"),t=document.createElement("DIV"),o=a.message,i=a.style,l=()=>i==="success"?Pt.successNotification:i==="error"?Pt.errorNotification:"";return e.className=Ae(Pt.notification,l()),i?e.setAttribute("data-blok-testid",`notification-${i}`):e.setAttribute("data-blok-testid","notification"),e.innerHTML=o,t.className=Pt.crossBtn,t.setAttribute("data-blok-testid","notification-cross"),t.addEventListener("click",()=>e.remove()),e.appendChild(t),e},OC=a=>{const e=of(a),t=document.createElement("div"),o=document.createElement("button"),i=document.createElement("button"),l=e.querySelector('[data-blok-testid="notification-cross"]'),c=a.cancelHandler,d=a.okHandler;return t.className=Pt.btnsWrapper,t.setAttribute("data-blok-testid","notification-buttons-wrapper"),o.innerHTML=a.okText||"Confirm",i.innerHTML=a.cancelText||"Cancel",o.className=yt(Pt.btn,Pt.okBtn),i.className=yt(Pt.btn,Pt.cancelBtn),o.setAttribute("data-blok-testid","notification-confirm-button"),i.setAttribute("data-blok-testid","notification-cancel-button"),c&&typeof c=="function"&&i.addEventListener("click",c),c&&typeof c=="function"&&l&&l.addEventListener("click",c),d&&typeof d=="function"&&o.addEventListener("click",d),o.addEventListener("click",()=>e.remove()),i.addEventListener("click",()=>e.remove()),t.appendChild(o),t.appendChild(i),e.appendChild(t),e},LC=a=>{const e=of(a),t=document.createElement("div"),o=document.createElement("button"),i=document.createElement("input"),l=e.querySelector('[data-blok-testid="notification-cross"]'),c=a.cancelHandler,d=a.okHandler;return t.className=Pt.btnsWrapper,o.innerHTML=a.okText||"Ok",o.className=yt(Pt.btn,Pt.okBtn),i.className=Pt.input,i.setAttribute("data-blok-testid","notification-input"),a.placeholder&&i.setAttribute("placeholder",a.placeholder),a.default&&(i.value=a.default),a.inputType&&(i.type=a.inputType),c&&typeof c=="function"&&l&&l.addEventListener("click",c),d&&typeof d=="function"&&o.addEventListener("click",()=>{d(i.value)}),o.addEventListener("click",()=>e.remove()),t.appendChild(i),t.appendChild(o),e.appendChild(t),e},DC=()=>{const a=document.createElement("DIV");return a.className=Pt.wrapper,a.setAttribute("data-blok-testid","notifier-container"),a},PC=8e3,MC=()=>{const a=document.querySelector('[data-blok-testid="notifier-container"]');if(a)return a;const e=DC();return document.body.appendChild(e),e},ab=a=>{if(!a.message)return;const e=MC(),t=a.time||PC,o=(()=>{switch(a.type){case"confirm":return OC(a);case"prompt":return LC(a);default:{const i=of(a);return window.setTimeout(()=>{i.remove()},t),i}}})();e&&o&&(e.appendChild(o),o.className=`${o.className} animate-notify-bounce-in`,o.setAttribute("data-blok-bounce-in","true"))},FC=Object.freeze(Object.defineProperty({__proto__:null,default:{show:ab},show:ab},Symbol.toStringTag,{value:"Module"}));return rf}));
181
+ `),c=r.innerHTML;t.setData("text/plain",l),t.setData("text/html",c);try{const d=await Promise.all(this.selectedBlocks.map(h=>h.save()));t.setData(this.Blok.Paste.MIME_TYPE,JSON.stringify(d))}catch(d){}}selectBlockByIndex(e){const{BlockManager:t}=this.Blok,r=t.getBlockByIndex(e);r!==void 0&&this.selectBlock(r)}selectBlock(e){this.selection.save();const t=le.get();t==null||t.removeAllRanges();const r=e;r.selected=!0,this.clearCache(),this.Blok.InlineToolbar.close()}unselectBlock(e){const t=e;t.selected=!1,this.clearCache()}clearCache(){this.anyBlockSelectedCache=null}destroy(){Fn.remove(this.Blok.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Blok.RectangleSelection.clearSelection(),L.isNativeInput(e.target)&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}const t=this.Blok.BlockManager.getBlock(e.target);if(!t)return;const r=t.inputs;if(r.length>1&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}if(r.length===1&&!this.needToSelectAll){this.needToSelectAll=!0;return}if(this.needToSelectAll){e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1;return}this.readyToBlockSelection&&(e.preventDefault(),this.selectBlock(t),this.needToSelectAll=!0)}selectAllBlocks(){this.selection.save();const e=le.get();e==null||e.removeAllRanges(),this.allBlocksSelected=!0,this.Blok.InlineToolbar.close()}replaceSelectedBlocksWithPrintableKey(e){const{BlockManager:t,Caret:r}=this.Blok,i=t.removeSelectedBlocks();if(i===void 0)return;t.insertDefaultBlockAtIndex(i,!0);const l=t.currentBlock;l&&r.setToBlock(l),us(()=>{const c=e.key;r.insertContentAtCaretPosition(c.length>1?"":c)},20)()}}const bC=127,lb=a=>{for(const e of a){if(e.trim().length===0)continue;if(e>="0"&&e<="9"||e.toLowerCase()!==e.toUpperCase())return!1;const t=e.codePointAt(0);if(typeof t=="number"&&t>bC)return!1}return!0},cb=a=>{var e;return a.nodeType===Node.TEXT_NODE?[a]:(e=a.hasChildNodes)!=null&&e.call(a)?Array.from(a.childNodes).flatMap(t=>cb(t)):[]},kC=a=>{var i,l;const e=cb(a);if(e.length===0)return null;const t=e[e.length-1],r=(i=[...e].reverse().find(c=>{var d;return!lb((d=c.textContent)!=null?d:"")}))!=null?i:null;return r&&r!==t&&lb((l=t.textContent)!=null?l:"")&&r.parentNode!==a?r:t};class Yd extends Be{get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get DATA_ATTR(){return{shadowCaret:"data-blok-shadow-caret"}}setToBlock(e,t=this.positions.DEFAULT,r=0){var y;const{BlockManager:i,BlockSelection:l}=this.Blok;if(l.clearSelection(),!e.focusable){(y=window.getSelection())==null||y.removeAllRanges(),l.selectBlock(e),i.currentBlock=e;return}const d=t===this.positions.START?e.firstInput:t===this.positions.END?e.lastInput:e.currentInput;if(!d)return;const h=b=>{if(t===this.positions.START)return{node:L.getDeepestNode(b,!1),offset:0};if(t===this.positions.END)return this.resolveEndPositionNode(b);const{node:T,offset:k}=L.getNodeByOffset(b,r);return T?{node:T,offset:k}:{node:L.getDeepestNode(b,!1),offset:0}},{node:g,offset:m}=h(d);g&&(this.set(g,m),i.setCurrentBlockByChildNode(e.holder),i.currentBlock.currentInput=d)}resolveEndPositionNode(e){const t=L.getDeepestNode(e,!0);if(t instanceof HTMLElement&&L.isNativeInput(t))return{node:t,offset:L.getContentLength(t)};const r=kC(e);return r?{node:r,offset:L.getContentLength(r)}:t?{node:t,offset:L.getContentLength(t)}:{node:null,offset:0}}setToInput(e,t=this.positions.DEFAULT,r=0){const{currentBlock:i}=this.Blok.BlockManager;this.setCaretToInputPosition(e,t,r),i&&(i.currentInput=e)}setCaretToInputPosition(e,t,r){if(t===this.positions.START){this.setCaretToStart(e);return}if(t===this.positions.END){this.setCaretToEnd(e);return}this.setCaretToOffset(e,r)}setCaretToStart(e){const t=L.getDeepestNode(e,!1);t&&this.set(t,0)}setCaretToEnd(e){const t=L.getDeepestNode(e,!0);t&&this.set(t,L.getContentLength(t))}setCaretToOffset(e,t){const{node:r,offset:i}=L.getNodeByOffset(e,t);if(r){this.set(r,i);return}this.setCaretToEnd(e)}set(e,t=0){const{top:i,bottom:l}=le.setCursor(e,t),{innerHeight:c}=window;if(i<0){window.scrollBy(0,i-30);return}l>c&&window.scrollBy(0,l-c+30)}setToTheLastBlock(){const e=this.Blok.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const t=this.Blok.BlockManager.insertAtEnd();this.setToBlock(t)}}extractFragmentFromCaretPosition(){var c;const e=le.get();if(!e||!e.rangeCount)return;const t=e.getRangeAt(0),r=this.Blok.BlockManager.currentBlock;if(!r)return;const i=r.currentInput;if(t.deleteContents(),!i)return;if(L.isNativeInput(i)){const d=i,h=document.createDocumentFragment(),g=(c=d.selectionStart)!=null?c:0,m=d.value.substring(0,g),y=d.value.substring(g);return h.textContent=y,d.value=m,h}const l=t.cloneRange();return l.selectNodeContents(i),l.setStart(t.endContainer,t.endOffset),l.extractContents()}navigateNext(e=!1){const{BlockManager:t}=this.Blok,{currentBlock:r,nextBlock:i}=t;if(r===void 0)return!1;const{nextInput:l,currentInput:c}=r,d=c!==void 0?Es(c):void 0,h=e||d||!r.focusable;if(l&&h)return this.setToInput(l,this.positions.START),!0;const m=i!==null?i:r.tool.isDefault||!h?null:t.insertAtEnd();return m!==null&&h?(this.setToBlock(m,this.positions.START),!0):!1}navigatePrevious(e=!1){const{currentBlock:t,previousBlock:r}=this.Blok.BlockManager;if(!t)return!1;const{previousInput:i,currentInput:l}=t,c=l!==void 0?Ss(l):void 0,d=e||c||!t.focusable;return i&&d?(this.setToInput(i,this.positions.END),!0):r!==null&&d?(this.setToBlock(r,this.positions.END),!0):!1}createShadow(e){const t=document.createElement("span");t.setAttribute(Yd.DATA_ATTR.shadowCaret,""),t.setAttribute("data-blok-testid","shadow-caret"),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector('[data-blok-testid="shadow-caret"]');if(!t)return;new le().expandToTag(t);const i=document.createRange();i.selectNode(t),i.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),r=document.createElement("div"),i=le.get(),l=le.range;if(!i||!l)return;r.innerHTML=e,Array.from(r.childNodes).forEach(g=>t.appendChild(g)),t.childNodes.length===0&&t.appendChild(new Text);const c=t.lastChild;l.deleteContents(),l.insertNode(t);const d=document.createRange(),h=c.nodeType===Node.TEXT_NODE?c:c.firstChild;h!==null&&h.textContent!==null&&d.setStart(h,h.textContent.length),i.removeAllRanges(),i.addRange(d)}}class wC extends Be{constructor(){super(...arguments),this.firstSelectedBlock=null,this.lastSelectedBlock=null,this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{var d;const t=e,{BlockManager:r,BlockSelection:i}=this.Blok;if(t.relatedTarget===null&&t.target===null)return;const l=r.getBlockByChildNode(t.relatedTarget)||this.lastSelectedBlock,c=r.getBlockByChildNode(t.target);if(!(!l||!c)&&c!==l){if(this.firstSelectedBlock&&l===this.firstSelectedBlock){(d=le.get())==null||d.removeAllRanges(),l.selected=!0,c.selected=!0,i.clearCache();return}if(this.firstSelectedBlock&&c===this.firstSelectedBlock){l.selected=!1,c.selected=!1,i.clearCache();return}this.Blok.InlineToolbar.close(),this.toggleBlocksSelectedState(l,c),this.lastSelectedBlock=c}}}async prepare(){this.listeners.on(document,"mousedown",e=>{this.enableCrossBlockSelection(e)})}watchSelection(e){if(e.button!==_1.LEFT)return;const{BlockManager:t}=this.Blok,r=t.getBlock(e.target);r&&(this.firstSelectedBlock=r,this.lastSelectedBlock=r,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp))}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock&&this.firstSelectedBlock!==this.lastSelectedBlock}toggleBlockSelectedState(e=!0){var d;const{BlockManager:t,BlockSelection:r}=this.Blok,i=t.currentBlock;if(!this.lastSelectedBlock&&!i||(!this.lastSelectedBlock&&i&&(this.lastSelectedBlock=this.firstSelectedBlock=i),this.firstSelectedBlock===this.lastSelectedBlock&&this.firstSelectedBlock&&(this.firstSelectedBlock.selected=!0,r.clearCache(),(d=le.get())==null||d.removeAllRanges(),this.Blok.Toolbar.close()),!this.lastSelectedBlock))return;const l=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),c=t.blocks[l];c&&(this.lastSelectedBlock.selected!==c.selected?(c.selected=!0,r.clearCache(),this.Blok.Toolbar.close()):(this.lastSelectedBlock.selected=!1,r.clearCache(),this.Blok.Toolbar.close()),this.lastSelectedBlock=c,this.Blok.InlineToolbar.close(),c.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:r,Caret:i}=this.Blok;if(!this.firstSelectedBlock||!this.lastSelectedBlock)return;const l=t.blocks.indexOf(this.firstSelectedBlock),c=t.blocks.indexOf(this.lastSelectedBlock);if(!r.anyBlockSelected||l===-1||c===-1){this.firstSelectedBlock=this.lastSelectedBlock=null;return}if(e&&e instanceof KeyboardEvent)switch(e.key){case"ArrowDown":case"ArrowRight":i.setToBlock(t.blocks[Math.max(l,c)],i.positions.END);break;case"ArrowUp":case"ArrowLeft":i.setToBlock(t.blocks[Math.min(l,c)],i.positions.START);break;default:i.setToBlock(t.blocks[Math.max(l,c)],i.positions.END)}this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Blok;le.isCollapsed||this.Blok.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Blok.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:r,BlockSelection:i}=this.Blok,l=r.blocks.indexOf(e),c=r.blocks.indexOf(t),d=e.selected!==t.selected,h=Math.min(l,c),g=Math.max(l,c);for(const m of Array.from({length:g-h+1},(y,b)=>h+b)){const y=r.blocks[m];y!==this.firstSelectedBlock&&y!==(d?e:t)&&(r.blocks[m].selected=!r.blocks[m].selected,i.clearCache())}this.Blok.Toolbar.close()}}class TC extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=_x,this.mutationObserver=new MutationObserver(r=>{this.redactorChanged(r)}),this.eventsDispatcher.on(td,r=>{this.particularBlockChanged(r.event)}),this.eventsDispatcher.on(Gv,()=>{this.disable()}),this.eventsDispatcher.on(Xv,()=>{this.enable()})}enable(){this.mutationObserver.observe(this.Blok.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!Me(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout(()=>{const t=Array.from(this.batchingOnChangeQueue.values());if(t.length===0)return;const r=t.length===1?t[0]:t;this.config.onChange&&this.config.onChange(this.Blok.API.methods,r),this.batchingOnChangeQueue.clear()},this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(ed,{mutations:e})}}const ub=new Set(["table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","ul","ol","li","dl","dt","dd"]),Us=class Us extends Be{constructor(){super(...arguments),this.MIME_TYPE="application/x-blok",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.handlePasteEventWrapper=e=>{this.handlePasteEvent(e)},this.processTool=e=>{try{if(e.pasteConfig===!1){this.exceptionList.push(e.name);return}if(!e.hasOnPasteHandler)return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){_e(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:r}=this.Blok,i=t.setCurrentBlockByChildNode(e.target);!i||e.target&&this.isNativeBehaviour(e.target)&&e.clipboardData&&!e.clipboardData.types.includes("Files")||this.exceptionList.includes(i.name)||(e.preventDefault(),e.clipboardData&&await this.processDataTransfer(e.clipboardData),r.close())}}async prepare(){this.processTools()}shouldReplaceCurrentBlockForFile(e){const{BlockManager:t}=this.Blok,r=t.currentBlock;return r?e&&r.name===e?!0:!!r.tool.isDefault&&r.isEmpty:!1}getStructuralTagsSanitizeConfig(e){var i;const t={},r=[e];for(;r.length>0;){const l=r.pop();if(!l)continue;const c=l.tagName.toLowerCase();ub.has(c)&&(t[c]=(i=t[c])!=null?i:{}),r.push(...Array.from(l.children))}return t}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}containsFiles(e){var r;if(Array.from(e.types).includes("Files")||(r=e.files)!=null&&r.length)return!0;try{const i=e.types;if(typeof(i==null?void 0:i.contains)=="function"&&i.contains("Files"))return!0}catch(i){}return!1}async processDataTransfer(e){const{Tools:t}=this.Blok;if(this.containsFiles(e)&&!it(this.toolsFiles)){await this.processFiles(e.files);return}const i=e.getData(this.MIME_TYPE),l=e.getData("text/plain"),d=e.getData("text/html");if(i)try{this.insertBlokData(JSON.parse(i));return}catch(k){}const h=Object.fromEntries(Object.keys(this.toolsTags).map(k=>{var x;return[k.toLowerCase(),(x=this.toolsTags[k].sanitizationConfig)!=null?x:{}]})),g=t.getAllInlineToolsSanitizeConfig(),m=ud(this.config.sanitizer,h,g,{br:{}}),y=En(d,m),b=L.isHTMLString(y);!y.trim()||y.trim()===l||!b?await this.processText(l):await this.processText(y,!0)}async processText(e,t=!1){var d,h;const{Caret:r,BlockManager:i}=this.Blok,l=t?this.processHTML(e):this.processPlain(e);if(!l.length)return;if(l.length>1){const m=!!((d=i.currentBlock)!=null&&d.tool.isDefault)&&!!((h=i.currentBlock)!=null&&h.isEmpty);for(const[y,b]of l.entries())await this.insertBlock(b,y===0&&m);i.currentBlock&&r.setToBlock(i.currentBlock,r.positions.END);return}const[c]=l;if(c.isBlock){await this.processSingleBlock(c);return}await this.processInlinePaste(c)}setCallback(){this.listeners.on(this.Blok.UI.nodes.holder,"paste",this.handlePasteEventWrapper)}unsetCallback(){this.listeners.off(this.Blok.UI.nodes.holder,"paste",this.handlePasteEventWrapper)}processTools(){const e=this.Blok.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return hn(e)?[e]:je(e)?Object.keys(e):[]}getTagsConfig(e){if(e.pasteConfig===!1)return;const t=e.pasteConfig.tags||[],r=[];t.forEach(i=>{const l=this.collectTagNames(i);r.push(...l),l.forEach(c=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,c)){_e(`Paste handler for «${e.name}» Tool on «${c}» tag is skipped because it is already used by «${this.toolsTags[c].tool.name}» Tool.`,"warn");return}const d=je(i)?i[c]:void 0;this.toolsTags[c.toUpperCase()]={tool:e,sanitizationConfig:d}})}),this.tagsByTool[e.name]=r.map(i=>i.toUpperCase())}getFilesConfig(e){if(e.pasteConfig===!1)return;const{files:t={}}=e.pasteConfig,{extensions:r,mimeTypes:i}=t;if(!r&&!i)return;const l=r==null?[]:Array.isArray(r)?r:(_e(`«extensions» property of the paste config for «${e.name}» Tool should be an array`),[]),c=i==null?[]:Array.isArray(i)?i.filter(d=>M1(d)?!0:(_e(`MIME type value «${d}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1)):(_e(`«mimeTypes» property of the paste config for «${e.name}» Tool should be an array`),[]);this.toolsFiles[e.name]={extensions:l,mimeTypes:c}}getPatternsConfig(e){e.pasteConfig===!1||!e.pasteConfig.patterns||it(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach(([t,r])=>{r instanceof RegExp||_e(`Pattern ${r} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:r,tool:e})})}isNativeBehaviour(e){return L.isNativeInput(e)}async processFiles(e){var c;const{BlockManager:t}=this.Blok,i=(await Promise.all(Array.from(e).map(d=>this.processFile(d)))).filter(d=>d!=null);if(i.length===0)return;const l=this.shouldReplaceCurrentBlockForFile((c=i[0])==null?void 0:c.type);for(const[d,h]of i.entries())await t.paste(h.type,h.event,d===0&&l)}async processFile(e){const t=P1(e),r=Object.entries(this.toolsFiles).find(([c,{mimeTypes:d,extensions:h}])=>{const[g,m]=e.type.split("/"),y=h.find(T=>T.toLowerCase()===t.toLowerCase()),b=d.find(T=>{const[k,x]=T.split("/");return k===g&&(x===m||x==="*")});return y!==void 0||b!==void 0});if(!r)return;const[i]=r;return{event:this.composePasteEvent("file",{file:e}),type:i}}processHTML(e){const{Tools:t}=this.Blok,r=L.make("DIV");return r.innerHTML=e,this.getNodes(r).map(l=>{var S;const c=(()=>{var R;switch(l.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:{const O=L.make("div");return O.appendChild(l),{content:O,tool:t.defaultTool,isBlock:!1}}case Node.ELEMENT_NODE:{const O=l,H=this.toolsTags[O.tagName];return{content:O,tool:(R=H==null?void 0:H.tool)!=null?R:t.defaultTool,isBlock:!0}}default:return null}})();if(!c)return null;const{content:d,tool:h,isBlock:g}=c,y=(h.pasteConfig===!1?[]:((S=h.pasteConfig)==null?void 0:S.tags)||[]).reduce((R,O)=>{const H=this.collectTagNames(O),P=de({},R);return H.forEach($=>{const j=je(O)?O[$]:null;P[$.toLowerCase()]=j!=null?j:{}}),P},{}),b=this.getStructuralTagsSanitizeConfig(d),T=Object.assign({},b,y,h.baseSanitizeConfig),k=(()=>{if(d.tagName.toLowerCase()!=="table")return d.innerHTML=En(d.innerHTML,T),d;const R=En(d.outerHTML,T),H=L.make("div",void 0,{innerHTML:R}).firstChild;return!H||!(H instanceof HTMLElement)?null:H})();if(!k)return null;const x=this.composePasteEvent("tag",{data:k});return{content:k,isBlock:g,tool:h.name,event:x}}).filter(l=>{if(!l)return!1;const c=L.isEmpty(l.content),d=L.isSingleTag(l.content);return!c||d})}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const r=t;return e.split(/\r?\n/).filter(i=>i.trim()).map(i=>{const l=L.make("div");l.textContent=i;const c=this.composePasteEvent("tag",{data:l});return{content:l,tool:r,isBlock:!1,event:c}})}async processSingleBlock(e){const{Caret:t,BlockManager:r}=this.Blok,{currentBlock:i}=r;if(!i||e.tool!==i.name||!L.containsOnlyInlineElements(e.content.innerHTML)){await this.insertBlock(e,i?i.tool.isDefault&&i.isEmpty:!1);return}t.insertContentAtCaretPosition(e.content.innerHTML)}async processInlinePaste(e){var g,m;const{BlockManager:t,Caret:r}=this.Blok,{content:i}=e,l=(m=(g=t.currentBlock)==null?void 0:g.tool.isDefault)!=null?m:!1,c=i.textContent,h=l&&c!==null&&c.length<Us.PATTERN_PROCESSING_MAX_LENGTH&&c!==null?await this.processPattern(c):void 0;if(h){const y=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty,b=await t.paste(h.tool,h.event,y);r.setToBlock(b,r.positions.END);return}if(t.currentBlock&&t.currentBlock.currentInput){const y=t.currentBlock.tool.baseSanitizeConfig;r.insertContentAtCaretPosition(En(i.innerHTML,y))}else await this.insertBlock(e)}async processPattern(e){const t=this.toolsPatterns.find(i=>{const l=i.pattern.exec(e);return l?e===l.shift():!1});return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}async insertBlock(e,t=!1){const{BlockManager:r,Caret:i}=this.Blok,{currentBlock:l}=r;if(t&&l&&l.isEmpty){const d=await r.paste(e.tool,e.event,!0);i.setToBlock(d,i.positions.END);return}const c=await r.paste(e.tool,e.event);i.setToBlock(c,i.positions.END)}insertBlokData(e){const{BlockManager:t,Caret:r,Tools:i}=this.Blok;sd(e,c=>{var d,h;return(h=(d=i.blockTools.get(c))==null?void 0:d.sanitizeConfig)!=null?h:{}},this.config.sanitizer).forEach(({tool:c,data:d},h)=>{var y,b;const g=h===0&&!!((y=t.currentBlock)!=null&&y.tool.isDefault)&&!!((b=t.currentBlock)!=null&&b.isEmpty),m=t.insert({tool:c,data:d,replace:g});r.setToBlock(m,r.positions.END)})}processElementNode(e,t,r){var k,x;const i=Object.keys(this.toolsTags),l=e,c=this.toolsTags[l.tagName],d=c==null?void 0:c.tool,h=(x=this.tagsByTool[(k=d==null?void 0:d.name)!=null?k:""])!=null?x:[],g=i.includes(l.tagName),m=L.blockElements.includes(l.tagName.toLowerCase()),y=ub.has(l.tagName.toLowerCase()),b=Array.from(l.children).some(({tagName:S})=>i.includes(S)&&!h.includes(S)),T=Array.from(l.children).some(({tagName:S})=>L.blockElements.includes(S.toLowerCase()));if(!m&&!g&&!b)return r.appendChild(l),[...t,r];if(g&&!b||m&&!T&&!b||y&&!b)return[...t,r,l]}getNodes(e){const t=Array.from(e.childNodes),r=(i,l)=>{if(L.isEmpty(l)&&!L.isSingleTag(l))return i;const c=i[i.length-1],d=c!==void 0&&L.isFragment(c),{destNode:h,remainingNodes:g}=d?{destNode:c,remainingNodes:i.slice(0,-1)}:{destNode:new DocumentFragment,remainingNodes:i};if(l.nodeType===Node.TEXT_NODE)return h.appendChild(l),[...g,h];if(l.nodeType!==Node.ELEMENT_NODE)return[...g,h];const m=this.processElementNode(l,g,h);if(m)return m;const y=Array.from(l.childNodes).reduce(r,[]);return[...g,...y]};return t.reduce(r,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};Us.PATTERN_PROCESSING_MAX_LENGTH=450;let Qd=Us;class xC extends Be{constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Blok,{blockTools:t}=e,r=[];Array.from(t.entries()).forEach(([i,l])=>{l.isReadOnlySupported||r.push(i)}),this.toolsDontSupportReadOnly=r,this.config.readOnly===!0&&r.length>0&&this.throwCriticalError(),await this.toggle(this.config.readOnly,!0)}async toggle(e=!this.readOnlyEnabled,t=!1){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const r=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const l of Object.values(this.Blok))l!=null&&typeof l.toggleReadOnly=="function"&&l.toggleReadOnly(e);if(r===e)return this.readOnlyEnabled;if(t)return this.readOnlyEnabled;this.Blok.ModificationsObserver.disable();const i=await this.Blok.Saver.save();return i===void 0?(this.Blok.ModificationsObserver.enable(),this.readOnlyEnabled):(await this.Blok.BlockManager.clear(),await this.Blok.Renderer.render(i.blocks),this.Blok.ModificationsObserver.enable(),this.readOnlyEnabled)}throwCriticalError(){throw new Go(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}}class SC extends Be{constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.rectCrossesBlocks=!1,this.overlayRectangle=null,this.listenerIds=[]}static get CSS(){return{overlay:"",overlayContainer:"",rect:"",topScrollZone:"",bottomScrollZone:""}}prepare(){this.enableModuleBindings()}startSelection(e,t){const r=this.getScrollLeft(),i=this.getScrollTop(),l=document.elementFromPoint(e-r,t-i);if(!l)return;l.closest(Kv)||(this.Blok.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const d=[Yu,Kv,qv],h=l.closest(Kt),g=d.some(m=>!!l.closest(m));!h||g||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle!==null&&(this.overlayRectangle.style.display="none")}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",i=>{this.processMouseDown(i)},!1);const t=ju(i=>{i instanceof MouseEvent&&this.processMouseMove(i)},10);this.listeners.on(document.body,"mousemove",t,{passive:!0}),this.listeners.on(document.body,"mouseleave",()=>{this.processMouseLeave()});const r=ju(i=>{this.processScroll(i)},10);this.listeners.on(window,"scroll",r,{passive:!0}),this.listeners.on(document.body,"mouseup",()=>{this.processMouseUp()},!1)}processMouseDown(e){if(e.button!==this.MAIN_MOUSE_BUTTON)return;e.target.closest(L.allInputsSelector)!==null||this.startSelection(e.pageX,e.pageY)}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){if(this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),!this.inScrollZone){this.isScrolling=!1;return}this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0)}genHTML(){const{UI:e}=this.Blok,t=e.nodes.holder.querySelector(Kt),r=L.make("div",["fixed","inset-0","z-overlay","pointer-events-none","overflow-hidden"],{}),i=L.make("div",["relative","pointer-events-auto","z-0"],{}),l=L.make("div",["absolute","pointer-events-none","bg-selection-highlight","border","border-transparent"],{});if(r.setAttribute(jx,""),i.setAttribute(qx,""),l.setAttribute(Ux,""),r.setAttribute("data-blok-testid","overlay"),l.setAttribute("data-blok-testid","overlay-rectangle"),!t)throw new Error("RectangleSelection: blok wrapper not found");return i.appendChild(l),r.appendChild(i),t.appendChild(r),this.overlayRectangle=l,{container:t,overlay:r}}scrollVertical(e){if(!(this.inScrollZone&&this.mousedown))return;const t=this.getScrollTop();window.scrollBy(0,e),this.mouseY+=this.getScrollTop()-t,setTimeout(()=>{this.scrollVertical(e)},0)}changingRectangle(e){if(!this.mousedown)return;const t=this.overlayRectangle;if(t===null)return;e.pageY!==void 0&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:r,leftPos:i,index:l}=this.genInfoForMouseSelection(),c=this.startX>r&&this.mouseX>r,d=this.startX<i&&this.mouseX<i;if(this.rectCrossesBlocks=!(c||d),this.isRectSelectionActivated||(this.rectCrossesBlocks=!1,this.isRectSelectionActivated=!0,this.shrinkRectangleToPoint(),t.style.display="block"),this.updateRectangleSize(),this.Blok.Toolbar.close(),l===void 0)return;this.trySelectNextBlock(l),this.inverseSelection();const h=le.get();h&&h.removeAllRanges()}shrinkRectangleToPoint(){if(this.overlayRectangle===null)return;const e=this.getScrollLeft(),t=this.getScrollTop();this.overlayRectangle.style.left=`${this.startX-e}px`,this.overlayRectangle.style.top=`${this.startY-t}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-t}px)`,this.overlayRectangle.style.right=`calc(100% - ${this.startX-e}px)`}inverseSelection(){if(this.stackOfSelected.length===0)return;const e=this.Blok.BlockManager.getBlockByIndex(this.stackOfSelected[0]);if(!e)return;const t=e.selected;if(this.rectCrossesBlocks&&!t)for(const r of this.stackOfSelected)this.Blok.BlockSelection.selectBlockByIndex(r);if(!this.rectCrossesBlocks&&t)for(const r of this.stackOfSelected)this.Blok.BlockSelection.unSelectBlockByIndex(r)}updateRectangleSize(){if(this.overlayRectangle===null)return;const e=this.getScrollLeft(),t=this.getScrollTop();this.mouseY>=this.startY?(this.overlayRectangle.style.top=`${this.startY-t}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-t}px)`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-t}px)`,this.overlayRectangle.style.top=`${this.mouseY-t}px`),this.mouseX>=this.startX?(this.overlayRectangle.style.left=`${this.startX-e}px`,this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-e}px)`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-e}px)`,this.overlayRectangle.style.left=`${this.mouseX-e}px`)}genInfoForMouseSelection(){var k;const t=document.body.offsetWidth/2,r=this.getScrollTop(),i=this.mouseY-r,l=document.elementFromPoint(t,i),c=(k=this.Blok.BlockManager.lastBlock)==null?void 0:k.holder,d=c==null?void 0:c.querySelector(Yu),g=(d?Number.parseInt(window.getComputedStyle(d).width,10):0)/2,m=t-g,y=t+g;if(!l)return{index:void 0,leftPos:m,rightPos:y};const b=this.Blok.BlockManager.getBlockByChildNode(l);return{index:b!==void 0?this.Blok.BlockManager.blocks.findIndex(x=>x.holder===b.holder):void 0,leftPos:m,rightPos:y}}getScrollTop(){var e,t,r,i;return typeof window.scrollY=="number"?window.scrollY:(i=(r=(e=document.documentElement)==null?void 0:e.scrollTop)!=null?r:(t=document.body)==null?void 0:t.scrollTop)!=null?i:0}getScrollLeft(){var e,t,r,i;return typeof window.scrollX=="number"?window.scrollX:(i=(r=(e=document.documentElement)==null?void 0:e.scrollLeft)!=null?r:(t=document.body)==null?void 0:t.scrollLeft)!=null?i:0}addBlockInSelection(e){this.rectCrossesBlocks&&this.Blok.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected.length,r=this.stackOfSelected[t-1];if(r===e)return;const l=this.stackOfSelected[t-2],c=l!==void 0&&r!==void 0?r-l>0:!1,d=t<=1,h=r!==void 0&&e>r&&c,g=r!==void 0&&e<r&&t>1&&!c,y=!(h||g||d);if(!y&&(r===void 0||e>r)){const k=r!==void 0?r+1:e;Array.from({length:e-k+1},(x,S)=>k+S).forEach(x=>{this.addBlockInSelection(x)});return}if(!y&&r!==void 0&&e<r){Array.from({length:r-e},(k,x)=>r-1-x).forEach(k=>{this.addBlockInSelection(k)});return}if(!y)return;const b=k=>r===void 0?!1:e>r?e>k:e<k,T=[];for(const k of[...this.stackOfSelected].reverse()){if(!b(k))break;this.rectCrossesBlocks&&this.Blok.BlockSelection.unSelectBlockByIndex(k),T.push(k)}T.length>0&&this.stackOfSelected.splice(this.stackOfSelected.length-T.length,T.length)}}class EC extends Be{render(e){return new Promise(t=>{const{Tools:r,BlockManager:i}=this.Blok;if(e.length===0)i.insert();else{const l=e.map(c=>{const{tunes:d,id:h}=c,g=c.type,m=r.available.has(g)?{tool:g,data:c.data}:(en(`Tool «${g}» is not found. Check 'tools' property at the Blok config.`,"warn"),{tool:r.stubTool,data:this.composeStubDataForTool(g,c.data,h)});return((b,T)=>{try{return i.composeBlock({id:h,tool:b,data:T,tunes:d})}catch(k){_e(`Block «${b}» skipped because of plugins error`,"error",{data:T,error:k});const x=this.composeStubDataForTool(b,T,h);return i.composeBlock({id:h,tool:r.stubTool,data:x,tunes:d})}})(m.tool,m.data)});i.insertMany(l)}window.requestIdleCallback(()=>{t()},{timeout:2e3})})}composeStubDataForTool(e,t,r){const{Tools:i}=this.Blok,l=(()=>{if(!i.unavailable.has(e))return e;const c=i.unavailable.get(e).toolbox;return c!==void 0&&c[0].title!==void 0?c[0].title:e})();return{savedData:{id:r,type:e,data:t},title:l}}}class CC extends Be{async save(){const{BlockManager:e,Tools:t}=this.Blok,r=e.blocks;if(r.length===1&&r[0].isEmpty)return{time:+new Date,blocks:[],version:ls()};const i=r.map(l=>this.getSavedData(l));this.lastSaveError=void 0;try{const l=await Promise.all(i),c=this.sanitizeExtractedData(l,d=>{var h;return(h=t.blockTools.get(d))==null?void 0:h.sanitizeConfig},this.config.sanitizer);return this.makeOutput(c)}catch(l){this.lastSaveError=l;const c=l instanceof Error?l:new Error(String(l));en("Saving failed due to the Error %o","error",c);return}}async getSavedData(e){const t=await e.save(),r=e.name,i=(t==null?void 0:t.data)!==void 0?t:this.getPreservedSavedData(e);if(i===void 0)return{tool:r,isValid:!1};const l=await e.validate(i.data);return ot(de({},i),{isValid:l})}makeOutput(e){const t=[];return e.forEach(({id:r,tool:i,data:l,tunes:c,isValid:d})=>{if(!d){_e(`Block «${i}» skipped because saved data is invalid`);return}if(i===void 0||l===void 0){_e("Block skipped because saved data is missing required fields");return}if(i===this.Blok.Tools.stubTool&&this.isStubSavedData(l)){t.push(l);return}if(i===this.Blok.Tools.stubTool){_e("Stub block data is malformed and was skipped");return}const h=c===void 0||it(c),g=de({id:r,type:i,data:l},!h&&{tunes:c});t.push(g)}),{time:+new Date,blocks:t,version:ls()}}sanitizeExtractedData(e,t,r){const i=[];if(e.forEach((d,h)=>{this.hasSanitizableData(d)&&i.push({index:h,data:d})}),i.length===0)return e;const l=sd(i.map(({data:d})=>d),t,r),c=e.map(d=>de({},d));return i.forEach(({index:d},h)=>{const g=l[h];c[d]=ot(de({},c[d]),{data:g.data})}),c}hasSanitizableData(e){return e.data!==void 0&&typeof e.tool=="string"}isStubSavedData(e){if(!je(e))return!1;const t=e;return typeof t.type=="string"&&t.data!==void 0}getLastSaveError(){return this.lastSaveError}getPreservedSavedData(e){const t=e.preservedData;if(it(t))return;const r=e.preservedTunes;return ot(de({id:e.id,tool:e.name,data:t},it(r)?{}:{tunes:r}),{time:0})}}const BC=a=>{const e=document.createElement("div");e.innerHTML=a.trim();const t=document.createDocumentFragment();return t.append(...Array.from(e.childNodes)),t},Fr=class Fr{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:r,readOnly:i}){var l,c;this.api=r,this.readOnly=i,this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=(l=t==null?void 0:t.placeholder)!=null?l:Fr.DEFAULT_PLACEHOLDER,this._data=e!=null?e:{text:""},this._element=null,this._preserveBlank=(c=t==null?void 0:t.preserveBlank)!=null?c:!1}onKeyUp(e){if(e.code!=="Backspace"&&e.code!=="Delete"||!this._element)return;const{textContent:t}=this._element;t===""&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.className=De(this.api.styles.block,Fr.WRAPPER_CLASSES,Fr.PLACEHOLDER_CLASSES),e.setAttribute(Qu,"paragraph"),e.contentEditable="false",e.setAttribute("data-placeholder-active",this.api.i18n.t(this._placeholder)),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable="true",e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){if(!this._element)return;this._data.text+=e.text;const t=BC(e.text);this._element.appendChild(t),this._element.normalize()}validate(e){return!(e.text.trim()===""&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t=e.detail;if(!("data"in t))return;const i={text:t.data.innerHTML};this._data=i,window.requestAnimationFrame(()=>{this._element&&(this._element.innerHTML=this._data.text||"")})}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:bE,title:"Text"}}};Fr.WRAPPER_CLASSES=["leading-[1.6em]","outline-none","[&>p:first-of-type]:mt-0","[&>p:last-of-type]:mb-0"],Fr.PLACEHOLDER_CLASSES=["empty:before:pointer-events-none","empty:before:text-gray-text","empty:before:cursor-text","empty:before:content-[attr(data-placeholder-active)]","[&[data-empty=true]]:before:pointer-events-none","[&[data-empty=true]]:before:text-gray-text","[&[data-empty=true]]:before:cursor-text","[&[data-empty=true]]:before:content-[attr(data-placeholder-active)]"];let qs=Fr;const B=class B{static get sanitize(){return{strong:{},b:{}}}static normalizeAllBoldTags(){if(typeof document=="undefined")return;const e=`${jv} b, ${Kt} b`;document.querySelectorAll(e).forEach(t=>{B.ensureStrongElement(t)})}static normalizeBoldInNode(e){var i;const t=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;!t||typeof t.closest!="function"||!t.closest(`${jv}, ${Kt}`)||(t.tagName==="B"&&B.ensureStrongElement(t),(i=t.querySelectorAll)==null||i.call(t,"b").forEach(l=>{B.ensureStrongElement(l)}))}constructor(){typeof document!="undefined"&&(B.instances.add(this),B.initializeGlobalListeners())}static initializeGlobalListeners(){return typeof document=="undefined"?!1:(B.shortcutListenerRegistered||(document.addEventListener("keydown",B.handleShortcut,!0),B.shortcutListenerRegistered=!0),B.selectionListenerRegistered||(document.addEventListener("selectionchange",B.handleGlobalSelectionChange,!0),B.selectionListenerRegistered=!0),B.inputListenerRegistered||(document.addEventListener("input",B.handleGlobalInput,!0),B.inputListenerRegistered=!0),B.beforeInputListenerRegistered||(document.addEventListener("beforeinput",B.handleBeforeInput,!0),B.beforeInputListenerRegistered=!0),B.ensureMutationObserver(),!0)}static maintainCollapsedExitState(){var e,t,r,i,l;if(typeof document!="undefined")for(const c of Array.from(B.collapsedExitRecords)){const d=B.resolveBoundary(c);if(!d){B.collapsedExitRecords.delete(c);continue}c.boundary=d.boundary,c.boldElement=d.boldElement;const h=d.boundary,g=d.boldElement,m=c.allowedLength,y=(e=g.textContent)!=null?e:"";if(y.length>m){const j=y.slice(0,m),U=y.slice(m);g.textContent=j,h.textContent=((t=h.textContent)!=null?t:"")+U}const b=(r=h.textContent)!=null?r:"";b.length>1&&b.startsWith("​")&&(h.textContent=b.slice(1));const T=window.getSelection();B.ensureCaretAtBoundary(T,h),B.scheduleBoundaryCaretAdjustment(h);const k=(i=h.textContent)!=null?i:"",x=k.replace(/\u200B/g,""),S=x.match(/^\s+/),R=/\S/.test(x),O=k.startsWith("​");S&&(c.hasLeadingSpace=!0,c.leadingWhitespace=S[0]),R&&(c.hasTypedContent=!0);const H=/^\s/.test(x),P=c.hasTypedContent&&!O&&((l=g.textContent)!=null?l:"").length<=m,$=c.hasLeadingSpace&&c.hasTypedContent&&!H;if(P&&$){const j=k.replace(/^[\u200B\s]+/,""),U=c.leadingWhitespace||" ";h.textContent=`${U}${j}`,B.ensureCaretAtBoundary(T,h)}P&&B.collapsedExitRecords.delete(c)}}static ensureCaretAtBoundary(e,t){!e||!e.isCollapsed||B.setCaretToBoundaryEnd(e,t)}static scheduleBoundaryCaretAdjustment(e){B.pendingBoundaryCaretAdjustments.has(e)||(B.pendingBoundaryCaretAdjustments.add(e),setTimeout(()=>{var l,c,d;B.pendingBoundaryCaretAdjustments.delete(e);const t=(l=e.ownerDocument)!=null?l:typeof document!="undefined"?document:null;if(!t)return;const r=t.getSelection();if(!r||!r.isCollapsed||r.anchorNode!==e)return;const i=(d=(c=e.textContent)==null?void 0:c.length)!=null?d:0;r.anchorOffset!==i&&B.setCaret(r,e,i)},0))}static ensureTextNodeAfter(e){var c;const t=e.nextSibling;if((t==null?void 0:t.nodeType)===Node.TEXT_NODE)return t;const r=e.parentNode;if(!r)return null;const i=(c=e.ownerDocument)!=null?c:typeof document!="undefined"?document:null;if(!i)return null;const l=i.createTextNode("");return r.insertBefore(l,t),l}static resolveBoundary(e){if(!e.boldElement.isConnected)return null;const t=B.ensureStrongElement(e.boldElement),r=e.boundary,l=r.isConnected&&r.previousSibling===t?r:B.ensureTextNodeAfter(t);return l?{boundary:l,boldElement:t}:null}static setCaretToBoundaryEnd(e,t){var l,c;const r=document.createRange(),i=(c=(l=t.textContent)==null?void 0:l.length)!=null?c:0;r.setStart(t,i),r.collapse(!0),e.removeAllRanges(),e.addRange(r)}static hasBoldParent(e){return e?e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e)?!0:B.hasBoldParent(e.parentNode):!1}static findBoldElement(e){return e?e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e)?B.ensureStrongElement(e):B.findBoldElement(e.parentNode):null}static isBoldTag(e){const t=e.tagName;return t==="B"||t==="STRONG"}static ensureStrongElement(e){if(e.tagName==="STRONG")return e;const t=document.createElement("strong");for(e.hasAttributes()&&Array.from(e.attributes).forEach(r=>{t.setAttribute(r.name,r.value)});e.firstChild;)t.appendChild(e.firstChild);return e.replaceWith(t),t}static mergeStrongNodes(e,t){const r=B.ensureStrongElement(e),i=B.ensureStrongElement(t);for(;i.firstChild;)r.appendChild(i.firstChild);return i.remove(),r}render(){return{icon:rE,name:"bold",onActivate:()=>{this.toggleBold()},isActive:()=>{const e=window.getSelection();return e?this.isSelectionVisuallyBold(e):!1}}}toggleBold(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed){this.toggleCollapsedSelection();return}this.isRangeBold(t,{ignoreWhitespace:!0})?this.unwrapBoldTags(t):this.wrapWithBold(t)}isSelectionVisuallyBold(e){if(!e||e.rangeCount===0)return!1;const t=e.getRangeAt(0);return this.isRangeBold(t,{ignoreWhitespace:!0})}wrapWithBold(e){const t=this.getRangeHtmlWithoutBold(e),r=this.replaceRangeWithHtml(e,`<strong>${t}</strong>`),i=window.getSelection();i&&r&&(i.removeAllRanges(),i.addRange(r)),B.normalizeAllBoldTags();const l=i?B.findBoldElement(i.focusNode):null;if(!l)return;const c=this.mergeAdjacentBold(l);this.normalizeWhitespaceAround(c),this.selectElementContents(c),B.normalizeBoldTagsWithinBlok(window.getSelection()),B.replaceNbspInBlock(window.getSelection()),this.notifySelectionChange()}unwrapBoldTags(e){const t=this.collectBoldAncestors(e),r=window.getSelection();if(!r)return;const i=document.createElement("span"),l=e.extractContents();i.setAttribute("data-blok-bold-marker",`unwrap-${B.markerSequence++}`),i.appendChild(l),this.removeNestedBold(i),e.insertNode(i);const c=document.createRange();for(c.selectNodeContents(i),r.removeAllRanges(),r.addRange(c);;){const m=B.findBoldElement(i);if(!m)break;this.moveMarkerOutOfBold(i,m)}const d=i.firstChild,h=i.lastChild;this.unwrapElement(i);const g=d&&h?(()=>{const m=document.createRange();return m.setStartBefore(d),m.setEndAfter(h),r.removeAllRanges(),r.addRange(m),m})():void 0;g||r.removeAllRanges(),this.replaceNbspWithinRange(g),B.normalizeBoldTagsWithinBlok(r),B.replaceNbspInBlock(r),B.removeEmptyBoldElements(r),t.forEach(m=>{B.isElementEmpty(m)&&m.remove()}),this.notifySelectionChange()}replaceRangeWithHtml(e,t){var d,h;const r=B.createFragmentFromHtml(t),i=(d=r.firstChild)!=null?d:null,l=(h=r.lastChild)!=null?h:null;if(e.deleteContents(),!i||!l)return;e.insertNode(r);const c=document.createRange();return c.setStartBefore(i),c.setEndAfter(l),c}moveMarkerOutOfBold(e,t){const r=t.parentNode;if(!r)return;if(Array.from(t.childNodes).forEach(h=>{var g;h.nodeType===Node.TEXT_NODE&&((g=h.textContent)!=null?g:"").length===0&&h.remove()}),t.childNodes.length===1&&t.firstChild===e){t.replaceWith(e);return}if(t.firstChild===e){r.insertBefore(e,t);return}if(t.lastChild===e){r.insertBefore(e,t.nextSibling);return}const d=t.cloneNode(!1);for(;e.nextSibling;)d.appendChild(e.nextSibling);r.insertBefore(d,t.nextSibling),r.insertBefore(e,d)}selectElementContents(e){const t=window.getSelection();if(!t)return;const r=document.createRange();r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r)}get shortcut(){return"CMD+B"}isRangeBold(e,t){var l;if(e.collapsed)return!!B.findBoldElement(e.startContainer);const r=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:c=>{try{return e.intersectsNode(c)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(d){const h=document.createRange();h.selectNodeContents(c);const g=e.compareBoundaryPoints(Range.END_TO_START,h)>0,m=e.compareBoundaryPoints(Range.START_TO_END,h)<0;return g&&m?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}}),i=[];for(;r.nextNode();){const c=r.currentNode,d=(l=c.textContent)!=null?l:"";t.ignoreWhitespace&&d.trim().length===0||d.length!==0&&i.push(c)}return i.length===0?!!B.findBoldElement(e.startContainer):i.every(c=>B.hasBoldParent(c))}removeNestedBold(e){var r;const t=(r=e.querySelectorAll)==null?void 0:r.call(e,"b,strong");t&&t.forEach(i=>{this.unwrapElement(i)})}unwrapElement(e){const t=e.parentNode;if(!t){e.remove();return}for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}mergeAdjacentBold(e){const t=B.ensureStrongElement(e),r=t.previousSibling,i=r&&r.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(r)?B.mergeStrongNodes(r,t):t,l=i.nextSibling;return l&&l.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(l)?B.mergeStrongNodes(i,l):i}toggleCollapsedSelection(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0),r=B.findBoldElement(t.startContainer),i=(()=>{if(r&&r.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE)!=="true")return B.exitCollapsedBold(e,r);const l=r!=null?r:B.getBoundaryBold(t);return l?B.exitCollapsedBold(e,l):this.startCollapsedBold(t)})();document.dispatchEvent(new Event("selectionchange")),i&&(e.removeAllRanges(),e.addRange(i)),B.normalizeBoldTagsWithinBlok(e),B.replaceNbspInBlock(e),B.removeEmptyBoldElements(e),this.notifySelectionChange()}startCollapsedBold(e){if(!e.collapsed)return;const t=document.createElement("strong"),r=document.createTextNode("");t.appendChild(r),t.setAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE,"true");const i=e.startContainer,l=e.startOffset;if(!(i.nodeType===Node.TEXT_NODE?this.insertCollapsedBoldIntoText(i,t,l):i.nodeType===Node.ELEMENT_NODE?(this.insertCollapsedBoldIntoElement(i,t,l),!0):!1))return;const d=window.getSelection(),h=document.createRange();h.setStart(r,0),h.collapse(!0);const g=this.mergeAdjacentBold(t);return B.normalizeBoldTagsWithinBlok(d),B.replaceNbspInBlock(d),B.removeEmptyBoldElements(d),d&&(d.removeAllRanges(),d.addRange(h)),this.notifySelectionChange(),g.firstChild instanceof Text?(()=>{var y,b;const m=document.createRange();return m.setStart(g.firstChild,(b=(y=g.firstChild.textContent)==null?void 0:y.length)!=null?b:0),m.collapse(!0),m})():h}insertCollapsedBoldIntoText(e,t,r){var m;const i=e,l=i.parentNode;if(!l)return!1;const c=(m=i.textContent)!=null?m:"",d=c.slice(0,r),h=c.slice(r);i.textContent=d;const g=h.length?document.createTextNode(h):null;return g&&l.insertBefore(g,i.nextSibling),l.insertBefore(t,g!=null?g:i.nextSibling),t.setAttribute(B.DATA_ATTR_PREV_LENGTH,d.length.toString()),!0}insertCollapsedBoldIntoElement(e,t,r){var l;const i=(l=e.childNodes[r])!=null?l:null;e.insertBefore(t,i),t.setAttribute(B.DATA_ATTR_PREV_LENGTH,"0")}static isElementEmpty(e){var t;return((t=e.textContent)!=null?t:"").length===0}notifySelectionChange(){B.enforceCollapsedBoldLengths(window.getSelection()),document.dispatchEvent(new Event("selectionchange")),this.updateToolbarButtonState()}updateToolbarButtonState(){const e=window.getSelection();if(!e)return;const t=e.anchorNode,r=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:t==null?void 0:t.parentElement,i=r==null?void 0:r.closest(Kt);if(!i)return;const l=i.querySelector("[data-blok-testid=inline-toolbar]");if(!(l instanceof HTMLElement))return;const c=l.querySelector('[data-blok-item-name="bold"]');if(!(c instanceof HTMLElement))return;this.isSelectionVisuallyBold(e)?c.setAttribute("data-blok-popover-item-active","true"):c.removeAttribute("data-blok-popover-item-active")}normalizeWhitespaceAround(e){B.replaceNbspWithSpace(e.previousSibling),B.replaceNbspWithSpace(e.nextSibling)}static replaceNbspWithSpace(e){var i;if(!e||e.nodeType!==Node.TEXT_NODE)return;const t=e,r=(i=t.textContent)!=null?i:"";r.includes(" ")&&(t.textContent=r.replace(/\u00A0/g," "))}restoreSelectionFromMarkers(e){const t=document.querySelector(`[data-blok-bold-marker="${e}-start"]`),r=document.querySelector(`[data-blok-bold-marker="${e}-end"]`);if(!t||!r){t==null||t.remove(),r==null||r.remove();return}const i=window.getSelection();if(!i){t.remove(),r.remove();return}const l=document.createRange();return l.setStartAfter(t),l.setEndBefore(r),i.removeAllRanges(),i.addRange(l),t.remove(),r.remove(),l}replaceNbspWithinRange(e){if(!e)return;const t=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:r=>{try{return e.intersectsNode(r)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(i){const l=document.createRange();l.selectNodeContents(r);const c=e.compareBoundaryPoints(Range.END_TO_START,l)>0,d=e.compareBoundaryPoints(Range.START_TO_END,l)<0;return c&&d?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;t.nextNode();)B.replaceNbspWithSpace(t.currentNode)}static normalizeBoldTagsWithinBlok(e){var l;const t=(l=e==null?void 0:e.anchorNode)!=null?l:e==null?void 0:e.focusNode;if(!t)return;const r=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=r==null?void 0:r.closest(Kt);i&&i.querySelectorAll("b").forEach(c=>{B.ensureStrongElement(c)})}static replaceNbspInBlock(e){var c;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const r=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=r==null?void 0:r.closest('[data-blok-component="paragraph"]');if(!i)return;const l=document.createTreeWalker(i,NodeFilter.SHOW_TEXT);for(;l.nextNode();)B.replaceNbspWithSpace(l.currentNode);i.querySelectorAll("b").forEach(d=>{B.ensureStrongElement(d)})}static removeEmptyBoldElements(e){var c,d;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const r=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=r==null?void 0:r.closest('[data-blok-component="paragraph"]');if(!i)return;const l=(d=e==null?void 0:e.focusNode)!=null?d:null;i.querySelectorAll("strong").forEach(h=>{var y;const g=h.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE)==="true",m=h.hasAttribute(B.DATA_ATTR_COLLAPSED_LENGTH);g||m||((y=h.textContent)!=null?y:"").length===0&&!B.isNodeWithin(l,h)&&h.remove()})}static synchronizeCollapsedBold(e){var c,d;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode,r=t&&t.nodeType===Node.ELEMENT_NODE?t:t==null?void 0:t.parentElement,i=(d=r==null?void 0:r.closest(Kt))!=null?d:r==null?void 0:r.ownerDocument;if(!i)return;const l=`strong[${B.DATA_ATTR_COLLAPSED_ACTIVE}="true"]`;i.querySelectorAll(l).forEach(h=>{var X,ae,G,ke,Z;const g=h.getAttribute(B.DATA_ATTR_PREV_LENGTH),m=h.previousSibling;if(!g||!m||m.nodeType!==Node.TEXT_NODE)return;const y=Number(g);if(!Number.isFinite(y))return;const b=m,T=(X=b.textContent)!=null?X:"";if(T.length<=y)return;const k=T.slice(0,y),x=T.slice(y);b.textContent=k;const S=x.match(/^[\u00A0\s]+/);if(S&&!h.hasAttribute(B.DATA_ATTR_LEADING_WHITESPACE)&&h.setAttribute(B.DATA_ATTR_LEADING_WHITESPACE,S[0]),x.length===0)return;const R=(ae=h.textContent)!=null?ae:"",O=R+x,H=(G=h.getAttribute(B.DATA_ATTR_LEADING_WHITESPACE))!=null?G:"",$=H.length>0&&R.length===0&&!O.startsWith(H)?H+O:O,j=document.createTextNode($);for(;h.firstChild;)h.removeChild(h.firstChild);if(h.appendChild(j),!(e!=null&&e.isCollapsed)||!B.isNodeWithin(e.focusNode,b))return;const U=document.createRange(),M=(Z=(ke=j.textContent)==null?void 0:ke.length)!=null?Z:0;U.setStart(j,M),U.collapse(!0),e.removeAllRanges(),e.addRange(U)})}static moveCaretAfterBoundaryBold(e){if(!e.rangeCount)return;const t=e.getRangeAt(0);if(!t.collapsed)return;const r=B.findBoldElement(t.startContainer);(r==null?void 0:r.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE))!=="true"&&(B.moveCaretFromElementContainer(e,t)||B.moveCaretFromTextContainer(e,t))}static getAdjacentBold(e){const t=e.startContainer;return t.nodeType===Node.TEXT_NODE?B.getBoldAdjacentToText(e,t):t.nodeType===Node.ELEMENT_NODE?B.getBoldAdjacentToElement(e,t):null}static getBoldAdjacentToText(e,t){var c,d;const r=(d=(c=t.textContent)==null?void 0:c.length)!=null?d:0,i=t.previousSibling;if(e.startOffset===0&&B.isBoldElement(i))return i;if(e.startOffset!==r)return null;const l=t.nextSibling;return B.isBoldElement(l)?l:null}static getBoldAdjacentToElement(e,t){var l,c;const r=e.startOffset>0&&(l=t.childNodes[e.startOffset-1])!=null?l:null;if(B.isBoldElement(r))return r;const i=(c=t.childNodes[e.startOffset])!=null?c:null;return B.isBoldElement(i)?i:null}static exitCollapsedIfNeeded(e,t){var c;if(!!B.findBoldElement(t.startContainer))return;const i=(c=B.getBoundaryBold(t))!=null?c:B.getAdjacentBold(t);if(!i)return;const l=B.exitCollapsedBold(e,i);l&&(e.removeAllRanges(),e.addRange(l))}static moveCaretFromElementContainer(e,t){if(t.startContainer.nodeType!==Node.ELEMENT_NODE)return!1;const r=t.startContainer;return B.moveCaretAfterPreviousBold(e,r,t.startOffset)?!0:B.moveCaretBeforeNextBold(e,r,t.startOffset)}static moveCaretAfterPreviousBold(e,t,r){var d,h,g;const i=r>0&&(d=t.childNodes[r-1])!=null?d:null;if(!B.isBoldElement(i))return!1;const l=B.ensureFollowingTextNode(i,i.nextSibling);if(!l)return!1;const c=(g=(h=l.textContent)==null?void 0:h.length)!=null?g:0;return B.setCaret(e,l,c),!0}static moveCaretBeforeNextBold(e,t,r){var c;const i=(c=t.childNodes[r])!=null?c:null;if(!B.isBoldElement(i))return!1;const l=B.ensureFollowingTextNode(i,i.nextSibling);return l?(B.setCaret(e,l,0),!0):(B.setCaretAfterNode(e,i),!0)}static moveCaretFromTextContainer(e,t){var g,m,y;if(t.startContainer.nodeType!==Node.TEXT_NODE)return;const r=t.startContainer,i=r.previousSibling,l=(g=r.textContent)!=null?g:"",c=/^\s/.test(l);if(t.startOffset===0&&B.isBoldElement(i)&&(l.length===0||c)){B.setCaret(e,r,l.length);return}const d=B.findBoldElement(r);if(!d||t.startOffset!==((y=(m=r.textContent)==null?void 0:m.length)!=null?y:0))return;const h=B.ensureFollowingTextNode(d,d.nextSibling);if(h){B.setCaret(e,h,0);return}B.setCaretAfterNode(e,d)}static guardCollapsedBoundaryKeydown(e){var h;if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey||e.key.length!==1)return;const r=window.getSelection();if(!r||!r.isCollapsed||r.rangeCount===0)return;const i=r.getRangeAt(0);if(i.startContainer.nodeType!==Node.TEXT_NODE)return;const l=i.startContainer,c=(h=l.textContent)!=null?h:"";if(c.length===0||i.startOffset!==0)return;const d=l.previousSibling;B.isBoldElement(d)&&/^\s/.test(c)&&B.setCaret(r,l,c.length)}static isBoldElement(e){return!!(e&&e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e))}static setCaret(e,t,r){const i=document.createRange();i.setStart(t,r),i.collapse(!0),e.removeAllRanges(),e.addRange(i)}static setCaretAfterNode(e,t){if(!t)return;const r=document.createRange();r.setStartAfter(t),r.collapse(!0),e.removeAllRanges(),e.addRange(r)}static ensureFollowingTextNode(e,t){const r=e.parentNode;if(!r)return null;if(t&&t.nodeType===Node.TEXT_NODE)return t;const i=document.createTextNode("");return r.insertBefore(i,t),i}static enforceCollapsedBoldLengths(e){var c;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const r=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=r==null?void 0:r.closest(Kt);if(!i)return;i.querySelectorAll(`strong[${B.DATA_ATTR_COLLAPSED_LENGTH}]`).forEach(d=>{var P,$,j,U,M;const h=d,g=h.getAttribute(B.DATA_ATTR_COLLAPSED_LENGTH);if(!g)return;const m=Number(g),y=(P=h.textContent)!=null?P:"";if(!Number.isFinite(m))return;const b=y.length>m,T=b?B.splitCollapsedBoldText(h,m,y):null,k=h.getAttribute(B.DATA_ATTR_PREV_LENGTH),x=k?Number(k):NaN,S=h.previousSibling,R=(S==null?void 0:S.nodeType)===Node.TEXT_NODE?S:null,O=($=R==null?void 0:R.textContent)!=null?$:"",H=!!(k&&Number.isFinite(x)&&R&&O.length>x);if(H&&R){const X=O.slice(0,x),ae=O.slice(x);R.textContent=X;const G=document.createTextNode(ae);(j=h.parentNode)==null||j.insertBefore(G,h.nextSibling)}if(H&&h.removeAttribute(B.DATA_ATTR_PREV_LENGTH),e!=null&&e.isCollapsed&&T&&B.isNodeWithin(e.focusNode,h)){const X=document.createRange(),ae=(M=(U=T.textContent)==null?void 0:U.length)!=null?M:0;X.setStart(T,ae),X.collapse(!0),e.removeAllRanges(),e.addRange(X)}b&&h.removeAttribute(B.DATA_ATTR_COLLAPSED_LENGTH)})}static splitCollapsedBoldText(e,t,r){const i=e,l=i.parentNode;if(!l)return null;const c=r.slice(0,t),d=r.slice(t);i.textContent=c;const h=document.createTextNode(d);return l.insertBefore(h,i.nextSibling),h}static isNodeWithin(e,t){return e?e===t||t.contains(e):!1}static handleGlobalSelectionChange(){B.refreshSelectionState("selectionchange")}static handleGlobalInput(){B.refreshSelectionState("input")}static refreshSelectionState(e){const t=window.getSelection();B.enforceCollapsedBoldLengths(t),B.maintainCollapsedExitState(),B.synchronizeCollapsedBold(t),B.normalizeBoldTagsWithinBlok(t),B.removeEmptyBoldElements(t),e==="input"&&t&&B.moveCaretAfterBoundaryBold(t),B.normalizeAllBoldTags()}static ensureMutationObserver(){if(typeof MutationObserver=="undefined"||B.mutationObserver)return;const e=new MutationObserver(t=>{if(!B.isProcessingMutation){B.isProcessingMutation=!0;try{t.forEach(r=>{r.addedNodes.forEach(i=>{B.normalizeBoldInNode(i)}),r.type==="characterData"&&r.target&&B.normalizeBoldInNode(r.target)})}finally{B.isProcessingMutation=!1}}});e.observe(document.body,{subtree:!0,childList:!0,characterData:!0}),B.mutationObserver=e}static handleBeforeInput(e){if(e.inputType!=="formatBold")return;const t=window.getSelection(),r=!!(t&&B.isSelectionInsideBlok(t)),i=B.isEventTargetInsideBlok(e.target);!r&&!i||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),B.normalizeAllBoldTags())}static exitCollapsedBold(e,t){const r=B.ensureStrongElement(t),i=r.parentNode;if(i)return B.isElementEmpty(r)?B.removeEmptyBoldElement(e,r,i):B.exitCollapsedBoldWithContent(e,r,i)}static removeEmptyBoldElement(e,t,r){const i=document.createRange();return i.setStartBefore(t),i.collapse(!0),r.removeChild(t),e.removeAllRanges(),e.addRange(i),i}static exitCollapsedBoldWithContent(e,t,r){var b,T,k,x,S,R;t.setAttribute(B.DATA_ATTR_COLLAPSED_LENGTH,((T=(b=t.textContent)==null?void 0:b.length)!=null?T:0).toString()),t.removeAttribute(B.DATA_ATTR_PREV_LENGTH),t.removeAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE),t.removeAttribute(B.DATA_ATTR_LEADING_WHITESPACE);const i=t.nextSibling,l=!i||i.nodeType!==Node.TEXT_NODE,c=l?document.createTextNode("​"):null;c&&r.insertBefore(c,i);const d=c!=null?c:i;!l&&((k=d.textContent)!=null?k:"").length===0&&(d.textContent="​");const h=document.createRange(),m=((x=d.textContent)!=null?x:"").startsWith("​")?1:0;h.setStart(d,m),h.collapse(!0),e.removeAllRanges(),e.addRange(h);const y=B.ensureStrongElement(t);return B.collapsedExitRecords.add({boundary:d,boldElement:y,allowedLength:(R=(S=y.textContent)==null?void 0:S.length)!=null?R:0,hasLeadingSpace:!1,hasTypedContent:!1,leadingWhitespace:""}),h}static getBoundaryBold(e){const t=e.startContainer;return t.nodeType===Node.TEXT_NODE?B.getBoundaryBoldForText(e,t):t.nodeType===Node.ELEMENT_NODE?B.getBoundaryBoldForElement(e,t):null}static getBoundaryBoldForText(e,t){var l,c;const r=(c=(l=t.textContent)==null?void 0:l.length)!=null?c:0;if(e.startOffset===r)return B.findBoldElement(t);if(e.startOffset!==0)return null;const i=t.previousSibling;return B.isBoldElement(i)?i:null}static getBoundaryBoldForElement(e,t){if(e.startOffset<=0)return null;const r=t.childNodes[e.startOffset-1];return B.isBoldElement(r)?r:null}static handleShortcut(e){var i;if(B.guardCollapsedBoundaryKeydown(e),!B.isBoldShortcut(e))return;const t=window.getSelection();if(!t||!t.rangeCount||!B.isSelectionInsideBlok(t))return;const r=(i=B.instances.values().next().value)!=null?i:new B;r&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),r.toggleBold())}static isBoldShortcut(e){return!((typeof navigator!="undefined"?navigator.userAgent.toLowerCase():"").includes("mac")?e.metaKey:e.ctrlKey)||e.altKey?!1:e.key.toLowerCase()==="b"}static isSelectionInsideBlok(e){const t=e.anchorNode;if(!t)return!1;const r=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;return!!(r!=null&&r.closest(Kt))}static isEventTargetInsideBlok(e){var r;if(!e||typeof Node=="undefined")return!1;if(e instanceof Element)return!!e.closest(Kt);if(e instanceof Text)return!!((r=e.parentElement)!=null&&r.closest(Kt));if(typeof ShadowRoot!="undefined"&&e instanceof ShadowRoot)return B.isEventTargetInsideBlok(e.host);if(!(e instanceof Node))return!1;const t=e.parentNode;return t?t instanceof Element?!!t.closest(Kt):B.isEventTargetInsideBlok(t):!1}getRangeHtmlWithoutBold(e){const t=e.cloneContents();this.removeNestedBold(t);const r=document.createElement("div");return r.appendChild(t),r.innerHTML}static createFragmentFromHtml(e){const t=document.createElement("template");return t.innerHTML=e,t.content}collectBoldAncestors(e){const t=new Set,r=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:i=>{try{return e.intersectsNode(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(l){const c=document.createRange();c.selectNodeContents(i);const d=e.compareBoundaryPoints(Range.END_TO_START,c)>0,h=e.compareBoundaryPoints(Range.START_TO_END,c)<0;return d&&h?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;r.nextNode();){const i=B.findBoldElement(r.currentNode);i&&t.add(i)}return Array.from(t)}};B.isInline=!0,B.title="Bold",B.shortcutListenerRegistered=!1,B.selectionListenerRegistered=!1,B.inputListenerRegistered=!1,B.beforeInputListenerRegistered=!1,B.globalListenersInitialized=B.initializeGlobalListeners(),B.collapsedExitRecords=new Set,B.markerSequence=0,B.isProcessingMutation=!1,B.DATA_ATTR_COLLAPSED_LENGTH="data-blok-bold-collapsed-length",B.DATA_ATTR_COLLAPSED_ACTIVE="data-blok-bold-collapsed-active",B.DATA_ATTR_PREV_LENGTH="data-blok-bold-prev-length",B.DATA_ATTR_LEADING_WHITESPACE="data-blok-bold-leading-ws",B.instances=new Set,B.pendingBoundaryCaretAdjustments=new WeakSet;let Zd=B;const Ws=class Ws{static get sanitize(){return{i:{},em:{}}}render(){return{icon:oE,name:"italic",onActivate:()=>{this.toggleItalic()},isActive:()=>{const e=window.getSelection();return e?this.isSelectionVisuallyItalic(e):!1}}}get shortcut(){return"CMD+I"}toggleItalic(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed){this.toggleCollapsedItalic(t,e);return}this.isRangeItalic(t,{ignoreWhitespace:!0})?this.unwrapItalicTags(t):this.wrapWithItalic(t)}toggleCollapsedItalic(e,t){if(this.isRangeItalic(e,{ignoreWhitespace:!0})){const i=document.createTextNode("​");e.insertNode(i),e.selectNode(i),this.unwrapItalicTags(e);const l=document.createRange();l.setStart(i,1),l.setEnd(i,1),t.removeAllRanges(),t.addRange(l)}else{const i=document.createElement("i"),l=document.createTextNode("​");i.appendChild(l),e.insertNode(i);const c=document.createRange();c.setStart(l,1),c.setEnd(l,1),t.removeAllRanges(),t.addRange(c)}}isSelectionVisuallyItalic(e){if(!e||e.rangeCount===0)return!1;const t=e.getRangeAt(0);return this.isRangeItalic(t,{ignoreWhitespace:!0})}isRangeItalic(e,t){var l;if(e.collapsed)return!!this.findItalicElement(e.startContainer);const r=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:c=>{try{return e.intersectsNode(c)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(d){const h=document.createRange();h.selectNodeContents(c);const g=e.compareBoundaryPoints(Range.END_TO_START,h)>0,m=e.compareBoundaryPoints(Range.START_TO_END,h)<0;return g&&m?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}}),i=[];for(;r.nextNode();){const c=r.currentNode,d=(l=c.textContent)!=null?l:"";t.ignoreWhitespace&&d.trim().length===0||d.length!==0&&i.push(c)}return i.length===0?!!this.findItalicElement(e.startContainer):i.every(c=>this.hasItalicParent(c))}wrapWithItalic(e){const t=this.getRangeHtmlWithoutItalic(e),r=this.replaceRangeWithHtml(e,`<i>${t}</i>`),i=window.getSelection();i&&r&&(i.removeAllRanges(),i.addRange(r))}unwrapItalicTags(e){const t=this.collectItalicAncestors(e),r=window.getSelection();if(!r)return;const i=document.createElement("span"),l=e.extractContents();i.appendChild(l),this.removeNestedItalic(i),e.insertNode(i);const c=document.createRange();for(c.selectNodeContents(i),r.removeAllRanges(),r.addRange(c);;){const m=this.findItalicElement(i);if(!m)break;this.moveMarkerOutOfItalic(i,m)}const d=i.firstChild,h=i.lastChild;this.unwrapElement(i),(d&&h?(()=>{const m=document.createRange();return m.setStartBefore(d),m.setEndAfter(h),r.removeAllRanges(),r.addRange(m),m})():void 0)||r.removeAllRanges(),t.forEach(m=>{var y;((y=m.textContent)!=null?y:"").length===0&&m.remove()})}hasItalicParent(e){return e?e.nodeType===Node.ELEMENT_NODE&&this.isItalicTag(e)?!0:this.hasItalicParent(e.parentNode):!1}findItalicElement(e){return e?e.nodeType===Node.ELEMENT_NODE&&this.isItalicTag(e)?e:this.findItalicElement(e.parentNode):null}isItalicTag(e){const t=e.tagName;return t==="I"||t==="EM"}collectItalicAncestors(e){const t=new Set,r=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:i=>{try{return e.intersectsNode(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(l){const c=document.createRange();c.selectNodeContents(i);const d=e.compareBoundaryPoints(Range.END_TO_START,c)>0,h=e.compareBoundaryPoints(Range.START_TO_END,c)<0;return d&&h?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;r.nextNode();){const i=this.findItalicElement(r.currentNode);i&&t.add(i)}return Array.from(t)}getRangeHtmlWithoutItalic(e){const t=e.cloneContents();this.removeNestedItalic(t);const r=document.createElement("div");return r.appendChild(t),r.innerHTML}removeNestedItalic(e){var r;const t=(r=e.querySelectorAll)==null?void 0:r.call(e,"i,em");t&&t.forEach(i=>{this.unwrapElement(i)})}unwrapElement(e){const t=e.parentNode;if(!t){e.remove();return}for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}replaceRangeWithHtml(e,t){var d,h;const r=this.createFragmentFromHtml(t),i=(d=r.firstChild)!=null?d:null,l=(h=r.lastChild)!=null?h:null;if(e.deleteContents(),!i||!l)return;e.insertNode(r);const c=document.createRange();return c.setStartBefore(i),c.setEndAfter(l),c}createFragmentFromHtml(e){const t=document.createElement("template");return t.innerHTML=e,t.content}moveMarkerOutOfItalic(e,t){const r=t.parentNode;if(!r)return;if(Array.from(t.childNodes).forEach(h=>{var g;h.nodeType===Node.TEXT_NODE&&((g=h.textContent)!=null?g:"").length===0&&h.remove()}),t.childNodes.length===1&&t.firstChild===e){t.replaceWith(e);return}if(t.firstChild===e){r.insertBefore(e,t);return}if(t.lastChild===e){r.insertBefore(e,t.nextSibling);return}const d=t.cloneNode(!1);for(;e.nextSibling;)d.appendChild(e.nextSibling);r.insertBefore(d,t.nextSibling),r.insertBefore(e,d)}};Ws.isInline=!0,Ws.title="Italic";let Jd=Ws;const AC=(Hr=class{constructor({api:e}){this.INPUT_BASE_CLASSES="hidden w-full m-0 px-2 py-1 text-sm leading-[22px] font-medium bg-item-hover-bg border border-[rgba(226,226,229,0.2)] rounded-md outline-none box-border appearance-none font-[inherit] placeholder:text-gray-text mobile:text-[15px] mobile:font-medium",this.DATA_ATTRIBUTES={buttonActive:"data-blok-link-tool-active",buttonUnlink:"data-blok-link-tool-unlink",inputOpened:"data-blok-link-tool-input-opened"},this.nodes={input:null,button:null},this.inputOpened=!1,this.unlinkAvailable=!1,this.handleButtonClick=t=>{!this.inputOpened||!this.unlinkAvailable||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.restoreSelection(),this.unlink(),this.inlineToolbar.close())},this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new le,this.nodes.input=this.createInput()}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return{icon:iE,isActive:()=>!!this.selection.findParentTag("A"),children:{hideChevron:!0,items:[{type:et.Html,element:this.nodes.input}],onOpen:()=>{this.openActions(!0)},onClose:()=>{this.closeActions()}}}}createInput(){const e=document.createElement("input");return e.placeholder=this.i18n.t("Add a link"),e.enterKeyHint="done",e.className=this.INPUT_BASE_CLASSES,e.setAttribute("data-blok-testid","inline-tool-input"),this.setBooleanStateAttribute(e,this.DATA_ATTRIBUTES.inputOpened,!1),e.addEventListener("keydown",t=>{t.key==="Enter"&&this.enterPressed(t)}),e}get shortcut(){return"CMD+K"}openActions(e=!1){if(!this.nodes.input)return;const t=this.selection.findParentTag("A"),r=!!t;if(this.updateButtonStateAttributes(r),this.unlinkAvailable=r,t){const i=t.getAttribute("href");this.nodes.input.value=i!==null?i:""}else this.nodes.input.value="";this.nodes.input.className=De(this.INPUT_BASE_CLASSES,"block"),this.setBooleanStateAttribute(this.nodes.input,this.DATA_ATTRIBUTES.inputOpened,!0),this.selection.save(),e&&this.focusInputWithRetry(),this.inputOpened=!0}focusInputWithRetry(){this.nodes.input&&(this.nodes.input.focus(),!(typeof window=="undefined"||typeof document=="undefined")&&window.setTimeout(()=>{var e;document.activeElement!==this.nodes.input&&((e=this.nodes.input)==null||e.focus())},0))}getButtonElement(){if(this.nodes.button&&document.contains(this.nodes.button))return this.nodes.button;const e=document.querySelector(`${qv} [data-blok-item-name="link"]`);return e&&e.addEventListener("click",this.handleButtonClick,!0),this.nodes.button=e!=null?e:null,this.nodes.button}updateButtonStateAttributes(e){const t=this.getButtonElement();if(!t)return;const r=typeof e=="boolean"?e:!!this.selection.findParentTag("A");this.setBooleanStateAttribute(t,this.DATA_ATTRIBUTES.buttonActive,r),this.setBooleanStateAttribute(t,this.DATA_ATTRIBUTES.buttonUnlink,r)}closeActions(e=!0){(this.selection.isFakeBackgroundEnabled||e&&this.selection.savedSelectionRange)&&this.restoreSelection(),this.nodes.input&&(this.nodes.input.className=this.INPUT_BASE_CLASSES,this.setBooleanStateAttribute(this.nodes.input,this.DATA_ATTRIBUTES.inputOpened,!1),this.nodes.input.value="",this.updateButtonStateAttributes(!1),this.unlinkAvailable=!1,e&&this.selection.clearSaved(),this.inputOpened=!1)}restoreSelection(){const e=new le,t=le.isAtBlok;if(t&&e.save(),this.selection.removeFakeBackground(),this.selection.restore(),!t&&this.selection.savedSelectionRange){const l=this.selection.savedSelectionRange.commonAncestorContainer,c=l.nodeType===Node.ELEMENT_NODE?l:l.parentElement;c==null||c.focus()}if(!t)return;e.restore();const r=e.savedSelectionRange;if(r){const i=r.commonAncestorContainer,l=i.nodeType===Node.ELEMENT_NODE?i:i.parentElement;l==null||l.focus()}}enterPressed(e){if(!this.nodes.input)return;const t=this.nodes.input.value||"";if(!t.trim()){this.selection.restore(),this.unlink(),e.preventDefault(),this.closeActions(),this.inlineToolbar.close();return}if(!this.validateURL(t)){this.notifier.show({message:"Pasted link is not valid.",style:"error"}),_e("Incorrect Link pasted","warn",t);return}const r=this.prepareLink(t);this.selection.removeFakeBackground(),this.selection.restore(),this.insertLink(r),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}validateURL(e){return!/\s/.test(e)}prepareLink(e){return this.addProtocol(e.trim())}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),r=e.substring(0,1)==="#",i=/^\/\/[^/\s]/.test(e);return!t&&!r&&!i?"http://"+e:e}insertLink(e){const t=this.selection.findParentTag("A");if(t){this.selection.expandToTag(t),t.href=e,t.target="_blank",t.rel="nofollow";return}const r=le.range;if(!r)return;const i=document.createElement("a");i.href=e,i.target="_blank",i.rel="nofollow",i.appendChild(r.extractContents()),r.insertNode(i),this.selection.expandToTag(i)}unlink(){const e=this.selection.findParentTag("A");e&&(this.unwrap(e),this.updateButtonStateAttributes(!1),this.unlinkAvailable=!1)}unwrap(e){var r;const t=document.createDocumentFragment();for(;e.firstChild;)t.appendChild(e.firstChild);(r=e.parentNode)==null||r.replaceChild(t,e)}setBooleanStateAttribute(e,t,r){e&&e.setAttribute(t,r?"true":"false")}},Hr.isInline=!0,Hr.title="Link",Hr),af=class af{constructor({api:e}){this.i18nAPI=e.i18n,this.blocksAPI=e.blocks,this.selectionAPI=e.selection,this.toolsAPI=e.tools,this.caretAPI=e.caret}async render(){var g;const e=le.get();if(e===null)return[];const t=this.blocksAPI.getBlockByElement(e.anchorNode);if(t===void 0)return[];const r=this.toolsAPI.getBlockTools(),i=await Qv(t,r);if(i.length===0)return[];const l=i.reduce((m,y)=>{var b;return(b=y.toolbox)==null||b.forEach(T=>{T.title!==void 0&&m.push({icon:T.icon,title:Qe.t(pt.toolNames,T.title),name:y.name,closeOnActivate:!0,onActivate:async()=>{const k=await this.blocksAPI.convert(t.id,y.name,T.data);this.caretAPI.setToBlock(k,"end")}})}),m},[]),c=await t.getActiveToolboxEntry(),d=(g=c==null?void 0:c.title)!=null?g:t.name,h=!Yn();return{name:"convert-to",title:Qe.t(pt.toolNames,d),hint:{title:Qe.ui(pt.ui.inlineToolbar.converter,"Convert to")},children:{items:l,onOpen:()=>{h&&(this.selectionAPI.setFakeBackground(),this.selectionAPI.save())},onClose:()=>{h&&(this.selectionAPI.restore(),this.selectionAPI.removeFakeBackground())}}}}};af.isInline=!0;let ef=af;const lf=class lf{constructor({data:e,api:t}){this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=L.make("div","flex items-center py-3 px-[18px] my-2.5 rounded-[10px] bg-bg-light border border-line-gray text-gray-text text-sm [&_svg]:size-icon"),t=kE,r=L.make("div","ml-3.5"),i=L.make("div","font-medium capitalize",{textContent:this.title}),l=L.make("div","",{textContent:this.subtitle});return e.setAttribute(Qu,"stub"),e.setAttribute(Gx,""),r.setAttribute(Xx,""),i.setAttribute(Yx,""),l.setAttribute(Qx,""),e.innerHTML=t,r.appendChild(i),r.appendChild(l),e.appendChild(r),e}};lf.isReadOnlySupported=!0;let tf=lf;class IC extends Ad{constructor(){super(...arguments),this.type=Nr.Inline}getMissingMethods(e){const t=this.constructable,r=t==null?void 0:t.prototype;return r?e.filter(i=>typeof r[i]!="function"):[...e]}create(){const e=this.constructable;return new e({api:this.api,config:this.settings})}get isReadOnlySupported(){var t;const e=this.constructable;return(t=e==null?void 0:e.isReadOnlySupported)!=null?t:!1}get title(){return this.constructable.title||""}}class RC extends Ad{constructor(){super(...arguments),this.type=Nr.Tune}create(e,t){const r=this.constructable;return new r({api:this.api,config:this.settings,block:t,data:e})}}class Bt extends Map{get blockTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isBlock());return new Bt(e)}get inlineTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInline());return new Bt(e)}get blockTunes(){const e=Array.from(this.entries()).filter(([,t])=>t.isTune());return new Bt(e)}get internalTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInternal);return new Bt(e)}get externalTools(){const e=Array.from(this.entries()).filter(([,t])=>!t.isInternal);return new Bt(e)}}class _C extends Ad{constructor(){super(...arguments),this.type=Nr.Block,this.inlineTools=new Bt,this.tunes=new Bt}create(e,t,r){return new this.constructable({data:e,block:t,readOnly:r,api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[lo.IsReadOnlySupported]===!0}get isLineBreaksEnabled(){var e;return(e=this.constructable[lo.IsEnabledLineBreaks])!=null?e:!1}get toolbox(){const e=this.constructable[lo.Toolbox],t=this.config[xs.Toolbox];if(!(!e||it(e))&&t!==!1)return t==null?Array.isArray(e)?e:[e]:!Array.isArray(t)&&Array.isArray(e)?[t]:Array.isArray(t)?Array.isArray(e)?t.map((r,i)=>{const l=e[i];return l?de(de({},l),r):r}):t:[de(de({},e),t)]}get conversionConfig(){return this.constructable[lo.ConversionConfig]}get enabledInlineTools(){return this.config[xs.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[xs.EnabledBlockTunes]}get pasteConfig(){var e;return(e=this.constructable[lo.PasteConfig])!=null?e:{}}get hasOnPasteHandler(){var t;const e=(t=this.constructable)==null?void 0:t.prototype;return typeof(e==null?void 0:e.onPaste)=="function"}get sanitizeConfig(){if(this._sanitizeConfig)return this._sanitizeConfig;const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(it(e))return this._sanitizeConfig=t,t;const r={};for(const i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;const l=e[i];je(l)?r[i]=Object.assign({},t,l):r[i]=l}return this._sanitizeConfig=r,r}get baseSanitizeConfig(){if(this._baseSanitizeConfig)return this._baseSanitizeConfig;const e={};return Array.from(this.inlineTools.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),Array.from(this.tunes.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),this._baseSanitizeConfig=e,e}}class NC{constructor(e,t,r){this.api=r,this.config=e,this.blokConfig=t}get(e){const h=this.config[e],{class:t,isInternal:r=!1}=h,i=l0(h,["class","isInternal"]),l=t;if(l===void 0)throw new Error(`Tool "${e}" does not provide a class.`);const c=this.getConstructor(l),d=!!Reflect.get(l,Bd.IsTune);return new c({name:e,constructable:l,config:i,api:this.api.getMethodsForTool(e,d),isDefault:e===this.blokConfig.defaultBlock,defaultPlaceholder:this.blokConfig.placeholder,isInternal:r})}getConstructor(e){switch(!0){case!!Reflect.get(e,Ay.IsInline):return IC;case!!Reflect.get(e,Bd.IsTune):return RC;default:return _C}}}const cf=class cf{constructor({api:e}){this.api=e}render(){return{icon:nE,title:this.api.i18n.t("Delete"),name:"delete",confirmation:{title:this.api.i18n.t("Click to delete"),onActivate:()=>this.handleClick()}}}handleClick(){this.api.blocks.delete()}};cf.isTune=!0;let nf=cf;const Pr=a=>{if(!Me(a))throw new Error("Tool constructable must be a function");return a};class OC extends Be{constructor(){super(...arguments),this.stubTool="stub",this.factory=null,this.toolsAvailable=new Bt,this.toolsUnavailable=new Bt,this.inlineToolsSanitizeConfigCache=null}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){const e=this.config.defaultBlock;if(!e)throw new Error("Default block tool name is not configured");const t=this.blockTools.get(e);if(!t)throw new Error(`Default block tool "${e}" not found in available block tools`);return t}get internal(){return this.available.internalTools}async prepare(){var h;const e=(h=this.config.tools)!=null?h:{};this.config.tools=$o({},this.internalTools,e),this.validateTools();const t=this.config.tools;if(!t||Object.keys(t).length===0)throw Error("Can't start without tools");const r=this.prepareConfig(t);this.factory=new NC(r,this.config,this.Blok.API);const i=this.getListOfPrepareFunctions(r);if(i.length===0)return Promise.resolve();const l=g=>{this.isToolPrepareData(g)&&this.toolPrepareMethodSuccess({toolName:g.toolName})},c=g=>{this.isToolPrepareData(g)&&this.toolPrepareMethodFallback({toolName:g.toolName})},d=new ab;i.forEach(g=>{d.add(async()=>{const m=D1(g.data)?{}:g.data;try{await g.function(g.data),l(m)}catch(y){c(m)}})}),await d.completed,this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){if(this.inlineToolsSanitizeConfigCache)return this.inlineToolsSanitizeConfigCache;const e={};return Array.from(this.inlineTools.values()).forEach(t=>{Object.assign(e,t.sanitizeConfig)}),this.inlineToolsSanitizeConfigCache=e,e}destroy(){for(const e of this.available.values()){const t=(()=>{try{return e.reset()}catch(r){_e(`Tool "${e.name}" reset failed`,"warn",r);return}})();t instanceof Promise&&t.catch(r=>{_e(`Tool "${e.name}" reset failed`,"warn",r)})}}get internalTools(){return{convertTo:{class:Pr(ef),isInternal:!0},link:{class:Pr(AC),isInternal:!0},bold:{class:Pr(Zd),isInternal:!0},italic:{class:Pr(Jd),isInternal:!0},paragraph:{class:Pr(qs),inlineToolbar:!0,config:{preserveBlank:!0},isInternal:!0},stub:{class:Pr(tf),isInternal:!0},delete:{class:Pr(nf),isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.getFactory().get(e.toolName);if(!t.isInline()){this.toolsAvailable.set(t.name,t);return}const r=["render"],i=t.getMissingMethods(r);if(i.length){_e(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",i),this.toolsUnavailable.set(t.name,t);return}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){const t=this.getFactory();this.toolsUnavailable.set(e.toolName,t.get(e.toolName))}getListOfPrepareFunctions(e){return Object.entries(e).map(([t,r])=>{var c;const i={toolName:t,config:(c=r.config)!=null?c:{}};return{function:async d=>{const h=r.class;if(!h||!Me(h.prepare))return;const g=d!=null?d:i;return h.prepare.call(h,g)},data:i}})}prepareBlockTools(){Array.from(this.blockTools.values()).forEach(e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)})}assignInlineToolsToBlockTool(e){const t=e;if(this.config.inlineToolbar!==!1){if(t.enabledInlineTools===!0){const r=Array.isArray(this.config.inlineToolbar)?this.createInlineToolsCollection(this.config.inlineToolbar):new Bt(Array.from(this.inlineTools.entries()));t.inlineTools=r;return}if(Array.isArray(t.enabledInlineTools)){const r=this.createInlineToolsCollection(["convertTo",...t.enabledInlineTools]);t.inlineTools=r}}}assignBlockTunesToBlockTool(e){const t=e;if(t.enabledBlockTunes!==!1){if(Array.isArray(t.enabledBlockTunes)){const r=this.createBlockTunesCollection(t.enabledBlockTunes),i=[...Array.from(r.entries()),...Array.from(this.blockTunes.internalTools.entries())];t.tunes=new Bt(i);return}if(Array.isArray(this.config.tunes)){const r=this.createBlockTunesCollection(this.config.tunes),i=[...Array.from(r.entries()),...Array.from(this.blockTunes.internalTools.entries())];t.tunes=new Bt(i);return}t.tunes=new Bt(Array.from(this.blockTunes.internalTools.entries()))}}validateTools(){const e=this.config.tools;if(!e)return;const t=this.internalTools;for(const r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r in t)continue;const i=e[r],l=Me(i),d=Me(i.class);if(!l&&!d)throw new Go(`Tool «${r}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(e){const t={};for(const r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const i=e[r];if(je(i)){t[r]=i;continue}t[r]={class:i}}return t}isToolPrepareData(e){const t=e;return typeof(t==null?void 0:t.toolName)=="string"}getFactory(){if(this.factory===null)throw new Error("Tools factory is not initialized");return this.factory}createInlineToolsCollection(e){const t=[];for(const r of e){const i=this.inlineTools.get(r);if(!i){_e(`Inline tool "${r}" is not available and will be skipped`,"warn");continue}t.push([r,i])}return new Bt(t)}createBlockTunesCollection(e){const t=[];for(const r of e){const i=this.blockTunes.get(r);if(!i){_e(`Block tune "${r}" is not available and will be skipped`,"warn");continue}t.push([r,i])}return new Bt(t)}}const LC=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:PT Mono,Menlo,Monaco,Consolas,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:651px){.\\!container{max-width:651px!important}.container{max-width:651px}}@media(min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-\\[auto_var\\(--offset\\)_calc\\(var\\(--offset\\)\\+env\\(safe-area-inset-bottom\\)\\)_var\\(--offset\\)\\]{inset:auto var(--offset) calc(var(--offset) + env(safe-area-inset-bottom)) var(--offset)}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.left-0{left:0}.left-5{left:1.25rem}.left-\\[var\\(--popover-left\\)\\]{left:var(--popover-left)}.right-0{right:0}.right-\\[15px\\]{right:15px}.right-full{right:100%}.top-0{top:0}.top-\\[7px\\]{top:7px}.top-\\[var\\(--popover-top\\)\\]{top:var(--popover-top)}.z-0{z-index:0}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.z-\\[4\\]{z-index:4}.z-overlay{z-index:999}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2\\.5{margin-top:.625rem;margin-bottom:.625rem}.my-4{margin-top:1rem;margin-bottom:1rem}.\\!mr-0{margin-right:0!important}.\\!mr-2{margin-right:.5rem!important}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-\\[30px\\]{margin-bottom:30px}.mb-px{margin-bottom:1px}.ml-3\\.5{margin-left:.875rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-\\[15px\\]{margin-top:15px}.mt-\\[3px\\]{margin-top:3px}.mt-\\[5px\\]{margin-top:5px}.box-border{box-sizing:border-box}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.\\!hidden{display:none!important}.hidden{display:none}.h-2\\.5{height:.625rem}.h-9{height:2.25rem}.h-\\[26px\\]{height:26px}.h-\\[50px\\]{height:50px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-toolbox-btn{height:26px}.max-h-0{max-height:0px}.max-h-\\[var\\(--max-height\\)\\]{max-height:var(--max-height)}.min-h-toolbox-btn{min-height:26px}.w-2\\.5{width:.625rem}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-\\[230px\\]{width:230px}.w-\\[26px\\]{width:26px}.w-\\[var\\(--width\\)\\]{width:var(--width)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-toolbox-btn{width:26px}.min-w-\\[calc\\(100\\%-theme\\(\\'spacing\\.6\\'\\)-10px\\)\\]{min-width:calc(100% - 1.5rem - 10px)}.min-w-\\[calc\\(100\\%-var\\(--offset\\)\\*2\\)\\]{min-width:calc(100% - var(--offset) * 2)}.min-w-\\[var\\(--width\\)\\]{min-width:var(--width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.min-w-toolbox-btn{min-width:26px}.max-w-\\[1100px\\]{max-width:1100px}.max-w-\\[130px\\]{max-width:130px}.max-w-content{max-width:650px}.max-w-none{max-width:none}.shrink-0{flex-shrink:0}.-translate-x-\\[5px\\]{--tw-translate-x: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[5px\\]{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[5px\\]{--tw-translate-x: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[5px\\]{--tw-translate-y: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes panelShowingMobile{0%{opacity:0;transform:translateY(14px) scale(.98)}70%{opacity:1;transform:translateY(-4px)}to{transform:translateY(0)}}.animate-\\[panelShowingMobile_250ms_ease\\]{animation:panelShowingMobile .25s ease}@keyframes panelShowing{0%{opacity:0;transform:translateY(-8px) scale(.9)}70%{opacity:1;transform:translateY(2px)}to{transform:translateY(0)}}.animate-\\[panelShowing_100ms_ease\\]{animation:panelShowing .1s ease}@keyframes buttonClicked{0%{transform:scale3d(.95,.95,.95)}60%{transform:scale3d(1.02,1.02,1.02)}80%,to{transform:scaleZ(1)}}.animate-button-clicked{animation:buttonClicked .75s cubic-bezier(.215,.61,.355,1) forwards}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in .3s ease forwards}.animate-none{animation:none}@keyframes notifyBounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}to{transform:scale(1)}}.animate-notify-bounce-in{animation:notifyBounceIn .6s 1}@keyframes wobble{0%{transform:translateZ(0)}15%{transform:translate3d(-9%,0,0)}30%{transform:translate3d(9%,0,0)}45%{transform:translate3d(-4%,0,0)}60%{transform:translate3d(4%,0,0)}75%{transform:translate3d(-1%,0,0)}to{transform:translateZ(0)}}.animate-wobble{animation:wobble .4s}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-\\[auto_auto_1fr\\]{grid-template-columns:auto auto 1fr}.grid-rows-\\[auto\\]{grid-template-rows:auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[7px\\]{border-radius:7px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-\\[\\#e8e8eb\\]{--tw-border-opacity: 1;border-color:rgb(232 232 235 / var(--tw-border-opacity, 1))}.border-\\[rgba\\(226\\,226\\,229\\,0\\.2\\)\\],.border-\\[rgba\\(226\\,226\\,229\\,0\\.20\\)\\]{border-color:#e2e2e533}.border-line-gray,.border-popover-border{--tw-border-opacity: 1;border-color:rgb(239 240 241 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.\\!bg-\\[\\#fafffe\\]{--tw-bg-opacity: 1 !important;background-color:rgb(250 255 254 / var(--tw-bg-opacity, 1))!important}.\\!bg-\\[\\#fffbfb\\]{--tw-bg-opacity: 1 !important;background-color:rgb(255 251 251 / var(--tw-bg-opacity, 1))!important}.\\!bg-item-confirm-bg{--tw-bg-opacity: 1 !important;background-color:rgb(226 74 74 / var(--tw-bg-opacity, 1))!important}.\\!bg-item-focus-bg{background-color:#22baff14!important}.bg-\\[\\#34c992\\]{--tw-bg-opacity: 1;background-color:rgb(52 201 146 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F8F8F8\\]{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.bg-\\[\\#eff1f4\\]{--tw-bg-opacity: 1;background-color:rgb(239 241 244 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f2f5f7\\]{--tw-bg-opacity: 1;background-color:rgb(242 245 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f7f7\\]{--tw-bg-opacity: 1;background-color:rgb(247 247 247 / var(--tw-bg-opacity, 1))}.bg-bg-light{--tw-bg-opacity: 1;background-color:rgb(239 242 245 / var(--tw-bg-opacity, 1))}.bg-dark{--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-icon-active-bg{background-color:#388ae51a}.bg-item-focus-bg{background-color:#22baff14}.bg-item-hover-bg{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.bg-popover-bg{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-popover-border{--tw-bg-opacity: 1;background-color:rgb(239 240 241 / var(--tw-bg-opacity, 1))}.bg-selection{--tw-bg-opacity: 1;background-color:rgb(225 242 255 / var(--tw-bg-opacity, 1))}.bg-selection-highlight{background-color:#2eaadc33}.bg-tooltip-bg{--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[13px\\]{padding:13px}.p-\\[3px\\]{padding:3px}.p-\\[5px\\]{padding:5px}.p-\\[var\\(--item-padding\\)\\]{padding:var(--item-padding)}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.px-\\[3px\\]{padding-left:3px;padding-right:3px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-\\[0\\.6em\\]{padding-top:.6em;padding-bottom:.6em}.py-\\[13px\\]{padding-top:13px;padding-bottom:13px}.py-\\[3px\\]{padding-top:3px;padding-bottom:3px}.py-\\[5px\\]{padding-top:5px;padding-bottom:5px}.py-\\[theme\\(spacing\\.block-padding-vertical\\)\\]{padding-top:.4em;padding-bottom:.4em}.pb-\\[3px\\]{padding-bottom:3px}.pr-1\\.5{padding-right:.375rem}.pr-\\[5px\\]{padding-right:5px}.text-center{text-align:center}.text-start{text-align:start}.align-bottom{vertical-align:bottom}.font-\\[-apple-system\\,BlinkMacSystemFont\\,\\"Segoe_UI\\"\\,\\"Roboto\\"\\,\\"Oxygen\\"\\,\\"Ubuntu\\"\\,\\"Cantarell\\"\\,\\"Fira_Sans\\"\\,\\"Droid_Sans\\"\\,\\"Helvetica_Neue\\"\\,sans-serif\\]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.font-\\[inherit\\]{font-family:inherit}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-\\[1\\.25em\\]{font-size:1.25em}.text-\\[1\\.5em\\]{font-size:1.5em}.text-\\[1\\.75em\\]{font-size:1.75em}.text-\\[13px\\]{font-size:13px}.text-\\[14\\.9px\\]{font-size:14.9px}.text-\\[2\\.5em\\]{font-size:2.5em}.text-\\[2em\\]{font-size:2em}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-\\[1\\.25em\\]{line-height:1.25em}.leading-\\[1\\.4em\\]{line-height:1.4em}.leading-\\[1\\.6em\\]{line-height:1.6em}.leading-\\[1em\\]{line-height:1em}.leading-\\[22px\\]{line-height:22px}.leading-\\[50px\\]{line-height:50px}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.-tracking-widest{letter-spacing:-.1em}.tracking-\\[0\\.02em\\]{letter-spacing:.02em}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.text-\\[\\#656b7c\\]{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.text-active-icon{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-dark{--tw-text-opacity: 1;color:rgb(29 32 43 / var(--tw-text-opacity, 1))}.text-gray-text{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.text-icon-active-text{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.text-inherit{color:inherit}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-text-primary{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-text-secondary{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.text-tooltip-font{--tw-text-opacity: 1;color:rgb(205 209 224 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_11px_17px_0_rgba\\(23\\,32\\,61\\,0\\.13\\)\\]{--tw-shadow: 0 11px 17px 0 rgba(23,32,61,.13);--tw-shadow-colored: 0 11px 17px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_1px_1px_0_rgba\\(18\\,49\\,35\\,0\\.05\\)\\]{--tw-shadow: 0 1px 1px 0 rgba(18,49,35,.05);--tw-shadow-colored: 0 1px 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_2px_1px_0_rgba\\(16\\,19\\,29\\,0\\)\\]{--tw-shadow: 0 2px 1px 0 rgba(16,19,29,0);--tw-shadow-colored: 0 2px 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_3px_15px_-3px_theme\\(colors\\.popover-shadow\\)\\]{--tw-shadow: 0 3px 15px -3px rgba(13, 20, 33, .1);--tw-shadow-colored: 0 3px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-base{--tw-shadow: 0 2px 2px 0 rgba(18, 30, 57, .04);--tw-shadow-colored: 0 2px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-focused{--tw-shadow: inset 0 0 0 1px rgba(7, 161, 227, .08);--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-input{--tw-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, .06);--tw-shadow-colored: inset 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-tooltip{--tw-shadow: 0 8px 12px 0 rgba(29, 32, 43, .17), 0 4px 5px -3px rgba(5, 6, 12, .49);--tw-shadow-colored: 0 8px 12px 0 var(--tw-shadow-color), 0 4px 5px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-\\[120ms\\]{transition-duration:.12s}.duration-\\[250ms\\]{transition-duration:.25s}.duration-\\[50ms\\,70ms\\]{transition-duration:50ms,70ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-\\[opacity\\,left\\,top\\]{will-change:opacity,left,top}.will-change-\\[opacity\\,top\\,left\\]{will-change:opacity,top,left}.will-change-\\[opacity\\,top\\]{will-change:opacity,top}.will-change-\\[opacity\\]{will-change:opacity}.\\[direction\\:rtl\\]{direction:rtl}.placeholder\\:font-medium::-moz-placeholder{font-weight:500}.placeholder\\:font-medium::placeholder{font-weight:500}.placeholder\\:text-\\[\\#656b7c\\]::-moz-placeholder{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.placeholder\\:text-\\[\\#656b7c\\]::placeholder{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-text::-moz-placeholder{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-text::placeholder{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);inset:0}.before\\:left-0:before{content:var(--tw-content);left:0}.before\\:left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:left-\\[9px\\]:before{content:var(--tw-content);left:9px}.before\\:top-0:before{content:var(--tw-content);top:0}.before\\:top-1\\/2:before{content:var(--tw-content);top:50%}.before\\:top-\\[5px\\]:before{content:var(--tw-content);top:5px}.before\\:-z-10:before{content:var(--tw-content);z-index:-10}.before\\:m-\\[3px\\]:before{content:var(--tw-content);margin:3px}.before\\:-ml-\\[11px\\]:before{content:var(--tw-content);margin-left:-11px}.before\\:-mt-\\[11px\\]:before{content:var(--tw-content);margin-top:-11px}.before\\:block:before{content:var(--tw-content);display:block}.before\\:h-3:before{content:var(--tw-content);height:.75rem}.before\\:h-\\[18px\\]:before{content:var(--tw-content);height:18px}.before\\:h-\\[calc\\(100\\%-6px\\)\\]:before{content:var(--tw-content);height:calc(100% - 6px)}.before\\:w-0\\.5:before{content:var(--tw-content);width:.125rem}.before\\:w-\\[18px\\]:before{content:var(--tw-content);width:18px}.before\\:w-\\[3px\\]:before{content:var(--tw-content);width:3px}.before\\:rotate-\\[-45deg\\]:before{content:var(--tw-content);--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rotation{0%{content:var(--tw-content);transform:rotate(0)}to{content:var(--tw-content);transform:rotate(360deg)}}.before\\:animate-rotation:before{content:var(--tw-content);animation:rotation 1.2s infinite linear}.before\\:rounded-\\[5px\\]:before{content:var(--tw-content);border-radius:5px}.before\\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\\:rounded-lg:before{content:var(--tw-content);border-radius:.5rem}.before\\:border-2:before{content:var(--tw-content);border-width:2px}.before\\:border-line-gray:before{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(239 240 241 / var(--tw-border-opacity, 1))}.before\\:border-l-active-icon:before{content:var(--tw-content);--tw-border-opacity: 1;border-left-color:rgb(56 138 229 / var(--tw-border-opacity, 1))}.before\\:\\!bg-\\[\\#41ffb1\\]:before{content:var(--tw-content);--tw-bg-opacity: 1 !important;background-color:rgb(65 255 177 / var(--tw-bg-opacity, 1))!important}.before\\:\\!bg-\\[\\#fb5d5d\\]:before{content:var(--tw-content);--tw-bg-opacity: 1 !important;background-color:rgb(251 93 93 / var(--tw-bg-opacity, 1))!important}.before\\:bg-\\[\\#575d67\\]:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(87 93 103 / var(--tw-bg-opacity, 1))}.before\\:bg-tooltip-bg:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.before\\:bg-transparent:before{content:var(--tw-content);background-color:transparent}.before\\:content-\\[\\"\\"\\]:before{--tw-content: "";content:var(--tw-content)}.before\\:content-\\[\\\\\\'\\\\\\'\\]:before{--tw-content: \\'\\';content:var(--tw-content)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:left-\\[9px\\]:after{content:var(--tw-content);left:9px}.after\\:top-\\[5px\\]:after{content:var(--tw-content);top:5px}.after\\:mx-3:after{content:var(--tw-content);margin-left:.75rem;margin-right:.75rem}.after\\:h-3:after{content:var(--tw-content);height:.75rem}.after\\:w-0\\.5:after{content:var(--tw-content);width:.125rem}.after\\:rotate-45:after{content:var(--tw-content);--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\\:bg-\\[\\#575d67\\]:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(87 93 103 / var(--tw-bg-opacity, 1))}.after\\:text-\\[\\#ddd\\]:after{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(221 221 221 / var(--tw-text-opacity, 1))}.after\\:content-\\[\\"\\"\\]:after{--tw-content: "";content:var(--tw-content)}.after\\:content-\\[\\'\\|\\'\\]:after{--tw-content: "|";content:var(--tw-content)}.first\\:mt-0:first-child{margin-top:0}.last\\:ml-2\\.5:last-child{margin-left:.625rem}.empty\\:before\\:pointer-events-none:empty:before{content:var(--tw-content);pointer-events:none}.empty\\:before\\:cursor-text:empty:before{content:var(--tw-content);cursor:text}.empty\\:before\\:text-gray-text:empty:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.empty\\:before\\:content-\\[attr\\(data-blok-placeholder\\)\\]:empty:before{--tw-content: attr(data-blok-placeholder);content:var(--tw-content)}.empty\\:before\\:content-\\[attr\\(data-placeholder-active\\)\\]:empty:before{--tw-content: attr(data-placeholder-active);content:var(--tw-content)}.hover\\:bg-\\[\\#2db583\\]:hover{--tw-bg-opacity: 1;background-color:rgb(45 181 131 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#e0e4eb\\]:hover{--tw-bg-opacity: 1;background-color:rgb(224 228 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#e9ecee\\]:hover{--tw-bg-opacity: 1;background-color:rgb(233 236 238 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#fbfcfe\\]:hover{--tw-bg-opacity: 1;background-color:rgb(251 252 254 / var(--tw-bg-opacity, 1))}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-button-base-hover:hover{--tw-shadow: 0 1px 3px 0 rgba(18, 30, 57, .08);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:placeholder\\:text-\\[rgba\\(101\\,107\\,124\\,0\\.3\\)\\]:focus::-moz-placeholder{color:#656b7c4d}.focus\\:placeholder\\:text-\\[rgba\\(101\\,107\\,124\\,0\\.3\\)\\]:focus::placeholder{color:#656b7c4d}.active\\:cursor-grabbing:active{cursor:grabbing}.group[data-blok-dragging=true] .group-data-\\[blok-dragging\\=true\\]\\:pointer-events-none{pointer-events:none}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:left-\\[calc\\(-1\\*theme\\(width\\.toolbox-btn\\)\\)\\]{left:-26px}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:left-auto{left:auto}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:right-\\[calc\\(-1\\*theme\\(width\\.toolbox-btn\\)\\)\\]{right:-26px}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:right-auto{right:auto}.group[data-blok-dragging=true] .group-data-\\[blok-dragging\\=true\\]\\:cursor-grabbing{cursor:grabbing}@media(max-width:650px){.mobile\\:absolute{position:absolute}.mobile\\:right-auto{right:auto}.mobile\\:z-\\[2\\]{z-index:2}.mobile\\:hidden{display:none}.mobile\\:h-toolbox-btn-mobile{height:36px}.mobile\\:w-toolbox-btn-mobile{width:36px}.mobile\\:rounded-\\[6px\\]{border-radius:6px}.mobile\\:rounded-lg{border-radius:.5rem}.mobile\\:border{border-width:1px}.mobile\\:border-\\[\\#e8e8eb\\]{--tw-border-opacity: 1;border-color:rgb(232 232 235 / var(--tw-border-opacity, 1))}.mobile\\:bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.mobile\\:p-1{padding:.25rem}.mobile\\:text-\\[15px\\]{font-size:15px}.mobile\\:font-medium{font-weight:500}.mobile\\:shadow-overlay-pane{--tw-shadow: 0 3px 15px -3px rgba(13, 20, 33, .13);--tw-shadow-colored: 0 3px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:ml-0{margin-left:0}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:mr-auto{margin-right:auto}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:pl-\\[10px\\]{padding-left:10px}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:pr-0{padding-right:0}}@media(min-width:651px){.not-mobile\\:w-6{width:1.5rem}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-0{left:0}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-\\[-5px\\]{left:-5px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-\\[calc\\(-1\\*theme\\(spacing\\.narrow-mode-right-padding\\)-5px\\)\\]{left:-55px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:right-\\[5px\\]{right:5px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:right-auto{right:auto}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:left-\\[5px\\]{left:5px}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:right-\\[calc\\(-1\\*theme\\(spacing\\.narrow-mode-right-padding\\)-5px\\)\\]{right:-55px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:ml-\\[theme\\(spacing\\.narrow-mode-right-padding\\)\\]{margin-left:50px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:mr-0{margin-right:0}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:mr-\\[theme\\(spacing\\.narrow-mode-right-padding\\)\\]{margin-right:50px}}@media(hover:hover){.can-hover\\:hover\\:cursor-grab:hover{cursor:grab}.can-hover\\:hover\\:cursor-pointer:hover{cursor:pointer}.can-hover\\:hover\\:bg-bg-light:hover{--tw-bg-opacity: 1;background-color:rgb(239 242 245 / var(--tw-bg-opacity, 1))}.can-hover\\:hover\\:bg-item-hover-bg:hover{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.group[data-blok-toolbox-opened=true] .group-data-\\[blok-toolbox-opened\\=true\\]\\:can-hover\\:hover\\:cursor-pointer:hover{cursor:pointer}}.\\[\\&\\:\\:-webkit-input-placeholder\\]\\:\\!leading-normal::-webkit-input-placeholder{line-height:1.5!important}.\\[\\&\\>p\\:first-of-type\\]\\:mt-0>p:first-of-type{margin-top:0}.\\[\\&\\>p\\:last-of-type\\]\\:mb-0>p:last-of-type{margin-bottom:0}.\\[\\&\\[data-blok-dragging\\=true\\]\\]\\:cursor-grabbing[data-blok-dragging=true]{cursor:grabbing}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:pointer-events-none[data-blok-empty=true]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:cursor-text[data-blok-empty=true]:before{content:var(--tw-content);cursor:text}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:text-gray-text[data-blok-empty=true]:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:content-\\[attr\\(data-blok-placeholder\\)\\][data-blok-empty=true]:before{--tw-content: attr(data-blok-placeholder);content:var(--tw-content)}.\\[\\&\\[data-blok-focused\\=\\"true\\"\\]\\]\\:bg-item-focus-bg[data-blok-focused=true]{background-color:#22baff14}.\\[\\&\\[data-blok-force-hover\\]\\]\\:cursor-pointer[data-blok-force-hover]{cursor:pointer}.\\[\\&\\[data-blok-force-hover\\]\\]\\:bg-item-hover-bg[data-blok-force-hover]{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:pointer-events-none[data-blok-placeholder]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:\\!static[data-blok-placeholder]:before{content:var(--tw-content);position:static!important}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:inline-block[data-blok-placeholder]:before{content:var(--tw-content);display:inline-block}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:w-0[data-blok-placeholder]:before{content:var(--tw-content);width:0px}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:whitespace-nowrap[data-blok-placeholder]:before{content:var(--tw-content);white-space:nowrap}.\\[\\&\\[data-blok-popover-item-no-hover\\]\\]\\:cursor-default[data-blok-popover-item-no-hover]{cursor:default}.\\[\\&\\[data-blok-popover-item-no-hover\\]\\]\\:hover\\:bg-transparent:hover[data-blok-popover-item-no-hover]{background-color:transparent}.\\[\\&\\[data-blok-toolbox-opened\\=true\\]_\\[contentEditable\\=true\\]\\[data-blok-placeholder\\]\\:focus\\]\\:before\\:\\!opacity-0[data-blok-toolbox-opened=true] [contentEditable=true][data-blok-placeholder]:focus:before{content:var(--tw-content);opacity:0!important}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:pointer-events-none[data-empty=true]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:cursor-text[data-empty=true]:before{content:var(--tw-content);cursor:text}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:text-gray-text[data-empty=true]:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:content-\\[attr\\(data-placeholder-active\\)\\][data-empty=true]:before{--tw-content: attr(data-placeholder-active);content:var(--tw-content)}.\\[\\&_\\:\\:selection\\]\\:bg-selection-inline ::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(212 236 255 / var(--tw-bg-opacity, 1))}.\\[\\&_\\:\\:selection\\]\\:bg-selection-inline ::selection{--tw-bg-opacity: 1;background-color:rgb(212 236 255 / var(--tw-bg-opacity, 1))}.\\[\\&_\\[contenteditable\\]\\:empty\\]\\:after\\:content-\\[\\"\\\\\\\\feff_\\"\\] [contenteditable]:empty:after{--tw-content: "\\\\feff ";content:var(--tw-content)}.\\[\\&_\\[contenteditable\\]\\]\\:select-none [contenteditable]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[\\&_\\[data-blok-tool\\=stub\\]\\]\\:opacity-55 [data-blok-tool=stub]{opacity:.55}.\\[\\&_\\[hidden\\]\\]\\:\\!hidden [hidden]{display:none!important}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\]\\:text-link a{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.\\[\\&_a\\]\\:underline a{text-decoration-line:underline}.\\[\\&_b\\]\\:font-bold b{font-weight:700}.\\[\\&_div\\]\\:\\!m-0 div{margin:0!important}.\\[\\&_div\\]\\:\\!p-0 div{padding:0!important}.\\[\\&_i\\]\\:italic i{font-style:italic}.\\[\\&_img\\]\\:opacity-55 img{opacity:.55}.\\[\\&_p\\]\\:\\!m-0 p{margin:0!important}.\\[\\&_p\\]\\:\\!p-0 p{padding:0!important}.\\[\\&_path\\]\\:stroke-current path{stroke:currentColor}.\\[\\&_svg\\]\\:-mt-0\\.5 svg{margin-top:-.125rem}.\\[\\&_svg\\]\\:mr-\\[0\\.2em\\] svg{margin-right:.2em}.\\[\\&_svg\\]\\:block svg{display:block}.\\[\\&_svg\\]\\:size-icon svg{width:20px;height:20px}.\\[\\&_svg\\]\\:h-5 svg{height:1.25rem}.\\[\\&_svg\\]\\:h-6 svg{height:1.5rem}.\\[\\&_svg\\]\\:h-7 svg{height:1.75rem}.\\[\\&_svg\\]\\:h-auto svg{height:auto}.\\[\\&_svg\\]\\:h-icon svg{height:20px}.\\[\\&_svg\\]\\:max-h-full svg{max-height:100%}.\\[\\&_svg\\]\\:w-6 svg{width:1.5rem}.\\[\\&_svg\\]\\:w-7 svg{width:1.75rem}.\\[\\&_svg\\]\\:w-auto svg{width:auto}.\\[\\&_svg\\]\\:w-icon svg{width:20px}.\\[\\&_svg\\]\\:text-gray-text svg{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}@media(max-width:650px){.mobile\\:\\[\\&_svg\\]\\:h-icon-mobile svg{height:28px}.mobile\\:\\[\\&_svg\\]\\:w-icon-mobile svg{width:28px}}`;class DC extends Be{constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=null,this.resizeDebouncer=vv(()=>{this.windowResize()},200),this.selectionChangeDebounced=vv(()=>{this.selectionChanged()},Rx),this.documentTouchedListener=e=>{this.documentTouched(e)}}get contentRect(){if(this.contentRectCache!==null)return this.contentRectCache;const e=this.nodes.wrapper.querySelector('[data-blok-testid="block-content"]');return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.setIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){if(e){this.unbindReadOnlySensitiveListeners();return}const t=()=>{this.bindReadOnlySensitiveListeners()};t();const r=window.requestIdleCallback;typeof r=="function"&&r(t,{timeout:2e3})}checkEmptiness(){const{BlockManager:e}=this.Blok;this.nodes.wrapper.setAttribute(Zx,e.isBlokEmpty?"true":"false")}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:r}=this.Blok;return!!(t.opened||r.opened||e.toolbox.opened)}get someFlipperButtonFocused(){return this.Blok.Toolbar.toolbox.hasFocus()?!0:Object.entries(this.Blok).filter(([e,t])=>t.flipper instanceof Zn).some(([e,t])=>t.flipper.hasFocus())}destroy(){this.nodes.holder.innerHTML="",this.unbindReadOnlyInsensitiveListeners()}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:r}=this.Blok;t.close(),r.close(),e.toolbox.close()}setIsMobile(){const e=window.innerWidth<kv;e!==this.isMobile&&this.eventsDispatcher.emit(Cr,{isEnabled:this.isMobile}),this.isMobile=e}make(){const e=this.config.holder;if(!e)throw new Error("Blok holder is not specified in the configuration.");this.nodes.holder=L.getHolder(e),this.nodes.wrapper=L.make("div",["group","relative","box-border","z-[1]","[&[data-blok-dragging=true]]:cursor-grabbing","[&_svg]:max-h-full","[&_path]:stroke-current","[&_::selection]:bg-selection-inline","[&[data-blok-toolbox-opened=true]_[contentEditable=true][data-blok-placeholder]:focus]:before:!opacity-0",...this.isRtl?["[direction:rtl]"]:[]]),this.nodes.wrapper.setAttribute(io,Nx),this.nodes.wrapper.setAttribute(Px,""),this.nodes.wrapper.setAttribute("data-blok-testid","blok-editor"),this.isRtl&&this.nodes.wrapper.setAttribute(Hx,"true"),this.nodes.redactor=L.make("div",["not-mobile:group-data-[blok-narrow=true]:mr-[theme(spacing.narrow-mode-right-padding)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:ml-[theme(spacing.narrow-mode-right-padding)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:mr-0",'[&_[contenteditable]:empty]:after:content-["\\feff_"]']),this.nodes.redactor.setAttribute(Mx,""),this.nodes.redactor.setAttribute("data-blok-testid","redactor"),this.nodes.holder.offsetWidth<this.contentRect.width&&this.nodes.wrapper.setAttribute(Fx,"true"),this.nodes.redactor.style.paddingBottom=this.config.minHeight+"px",this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper),this.bindReadOnlyInsensitiveListeners()}loadStyles(){const e="blok-styles";if(L.get(e))return;const t=L.make("style",null,{id:e,textContent:LC.toString()});this.config.style&&!it(this.config.style)&&this.config.style.nonce&&t.setAttribute("nonce",this.config.style.nonce),L.prepend(document.head,t)}bindReadOnlyInsensitiveListeners(){this.listeners.on(document,"selectionchange",this.selectionChangeDebounced),this.listeners.on(window,"resize",this.resizeDebouncer,{passive:!0}),this.listeners.on(this.nodes.redactor,"mousedown",this.documentTouchedListener,{capture:!0,passive:!0}),this.listeners.on(this.nodes.redactor,"touchstart",this.documentTouchedListener,{capture:!0,passive:!0})}unbindReadOnlyInsensitiveListeners(){this.listeners.off(document,"selectionchange",this.selectionChangeDebounced),this.listeners.off(window,"resize",this.resizeDebouncer),this.listeners.off(this.nodes.redactor,"mousedown",this.documentTouchedListener),this.listeners.off(this.nodes.redactor,"touchstart",this.documentTouchedListener)}bindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.on(this.nodes.redactor,"click",e=>{e instanceof MouseEvent&&this.redactorClicked(e)},!1),this.readOnlyMutableListeners.on(document,"keydown",e=>{e instanceof KeyboardEvent&&this.documentKeydown(e)},!0),this.readOnlyMutableListeners.on(document,"mousedown",e=>{e instanceof MouseEvent&&this.documentClicked(e)},!0),this.watchBlockHoveredEvents(),this.enableInputsEmptyMark()}watchBlockHoveredEvents(){const e={lastHovered:null},r=ju(i=>{var g;const l=typeof MouseEvent!="undefined"&&i instanceof MouseEvent,c=typeof TouchEvent!="undefined"&&i instanceof TouchEvent;if(!l&&!c)return;const d=(g=i.target)==null?void 0:g.closest('[data-blok-testid="block-wrapper"]');if(this.Blok.BlockSelection.anyBlockSelected||!d||e.lastHovered===d)return;e.lastHovered=d;const h=this.Blok.BlockManager.getBlockByChildNode(d);h&&this.eventsDispatcher.emit(Ey,{block:h})},20);this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",i=>{r(i)},{passive:!0})}unbindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.setIsMobile()}documentKeydown(e){var r;switch((r=e.key)!=null?r:""){case"Enter":this.enterPressed(e);break;case"Backspace":case"Delete":this.backspacePressed(e);break;case"Escape":this.escapePressed(e);break;default:this.defaultBehaviour(e);break}}defaultBehaviour(e){const{currentBlock:t}=this.Blok.BlockManager,r=e.target.closest('[data-blok-testid="blok-editor"]'),i=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;if(!this.Blok.BlockSettings.contains(e.target)){if(t!==void 0&&r===null){this.Blok.BlockEvents.keydown(e);return}r||t&&i||(this.Blok.BlockManager.unsetCurrentBlock(),this.Blok.Toolbar.close())}}backspacePressed(e){if(this.Blok.BlockSettings.contains(e.target))return;const{BlockManager:t,BlockSelection:r,Caret:i}=this.Blok,l=le.isSelectionExists,c=le.isCollapsed;if(!(r.anyBlockSelected&&(!l||c===!0||this.Blok.CrossBlockSelection.isCrossBlockSelectionStarted)))return;const h=t.removeSelectedBlocks();if(h===void 0)return;const g=t.insertDefaultBlockAtIndex(h,!0);i.setToBlock(g,i.positions.START),r.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}escapePressed(e){if(this.Blok.BlockSelection.clearSelection(e),this.Blok.Toolbar.toolbox.opened){this.Blok.Toolbar.toolbox.close(),this.Blok.BlockManager.currentBlock&&this.Blok.Caret.setToBlock(this.Blok.BlockManager.currentBlock,this.Blok.Caret.positions.END);return}if(this.Blok.BlockSettings.opened){this.Blok.BlockSettings.close();return}if(this.Blok.InlineToolbar.opened){this.Blok.InlineToolbar.close();return}this.Blok.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:r}=this.Blok;if(this.someToolbarOpened)return;const i=t.currentBlockIndex>=0,l=le.isSelectionExists,c=le.isCollapsed;if(r.anyBlockSelected&&(!l||c===!0)){r.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation();return}if(!this.someToolbarOpened&&i&&e.target.tagName==="BODY"){const d=this.Blok.BlockManager.insert();e.preventDefault(),this.Blok.Caret.setToBlock(d),this.Blok.Toolbar.moveAndOpen(d)}this.Blok.BlockSelection.clearSelection(e)}documentClicked(e){var T,k;if(!e.isTrusted)return;const t=e.target,r=this.nodes.holder.contains(t)||le.isAtBlok,i=this.nodes.redactor.contains(t),l=this.Blok.Toolbar.contains(t);(!(r||l)||!i&&!l)&&(this.Blok.BlockManager.unsetCurrentBlock(),this.Blok.Toolbar.close());const h=this.Blok.BlockSettings.contains(t),g=(T=this.Blok.Toolbar.nodes.settingsToggler)==null?void 0:T.contains(t),m=(k=this.Blok.Toolbar.nodes.plusButton)==null?void 0:k.contains(t),y=h||g||m,b=this.Blok.BlockSettings.opened&&!y;if(b&&this.Blok.BlockSettings.close(),b&&i){const x=this.Blok.BlockManager.getBlockByChildNode(t);this.Blok.Toolbar.moveAndOpen(x)}this.Blok.BlockSelection.clearSelection(e)}documentTouched(e){const t=e.target,r=(()=>{if(t!==this.nodes.redactor)return t;if(e instanceof MouseEvent){const i=document.elementFromPoint(e.clientX,e.clientY);return i!=null?i:t}if(e instanceof TouchEvent&&e.touches.length>0){const{clientX:i,clientY:l}=e.touches[0],c=document.elementFromPoint(i,l);return c!=null?c:t}return t})();try{this.Blok.BlockManager.setCurrentBlockByChildNode(r)}catch(i){this.Blok.RectangleSelection.isRectActivated()||this.Blok.Caret.setToTheLastBlock()}!this.Blok.ReadOnly.isEnabled&&!this.Blok.Toolbar.contains(t)&&this.Blok.Toolbar.moveAndOpen()}redactorClicked(e){if(!le.isCollapsed)return;const t=e.target,r=e.metaKey||e.ctrlKey;if(!(L.isAnchor(t)&&r)){this.processBottomZoneClick(e);return}e.stopImmediatePropagation(),e.stopPropagation();const l=t.getAttribute("href");if(!l)return;const c=H1(l);j1(c)}processBottomZoneClick(e){var m,y;const t=this.Blok.BlockManager.getBlockByIndex(-1),r=L.offset(t.holder).bottom,i=e.pageY,{BlockSelection:l}=this.Blok;if(!(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!l.anyBlockSelected&&r<i))return;e.stopImmediatePropagation(),e.stopPropagation();const{BlockManager:d,Caret:h,Toolbar:g}=this.Blok;(!((m=d.lastBlock)!=null&&m.tool.isDefault)||!((y=d.lastBlock)!=null&&y.isEmpty))&&d.insertAtEnd(),h.setToTheLastBlock(),g.moveAndOpen(d.lastBlock)}selectionChanged(){var g,m,y;const{CrossBlockSelection:e,BlockSelection:t}=this.Blok,r=le.anchorElement;if(e.isCrossBlockSelectionStarted&&t.anyBlockSelected&&((g=le.get())==null||g.removeAllRanges()),document.querySelector('[data-blok-fake-background="true"]')!==null&&((y=(m=this.Blok)==null?void 0:m.InlineToolbar)!=null&&y.opened)||(!r&&!le.range&&this.Blok.InlineToolbar.close(),!r))return;const l=r.closest('[data-blok-testid="block-content"]'),c=l===null||l.closest('[data-blok-testid="blok-editor"]')!==this.nodes.wrapper,d=r.getAttribute("data-blok-inline-toolbar")==="true";c&&!this.Blok.InlineToolbar.containsNode(r)&&this.Blok.InlineToolbar.close(),!(c&&!d)&&(this.Blok.BlockManager.currentBlock||this.Blok.BlockManager.setCurrentBlockByChildNode(r),this.Blok.InlineToolbar.tryToShow(!0))}enableInputsEmptyMark(){const e=t=>{const r=t.target;wv(r)};this.readOnlyMutableListeners.on(this.nodes.wrapper,"input",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusin",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusout",e)}}const PC=30,MC=300,FC=100;class HC extends Be{constructor(){super(...arguments),this.undoStack=[],this.redoStack=[],this.debounceTimeout=null,this.isPerformingUndoRedo=!1,this.initialStateCaptured=!1}get maxHistoryLength(){var e;return(e=this.config.maxHistoryLength)!=null?e:PC}get debounceTime(){var e;return(e=this.config.historyDebounceTime)!=null?e:MC}async prepare(){this.setupEventListeners(),this.setupKeyboardShortcuts()}async captureInitialState(){if(this.initialStateCaptured)return;const e=await this.getCurrentState();e&&(this.undoStack=[{state:e,timestamp:Date.now()}],this.initialStateCaptured=!0,this.emitStateChanged())}async undo(){if(this.undoStack.length<2||this.isPerformingUndoRedo)return!1;this.isPerformingUndoRedo=!0,this.clearDebounce();try{const e=this.undoStack.pop();e&&this.redoStack.push(e);const t=this.undoStack[this.undoStack.length-1];return t?(await this.restoreState(t.state,t.caretPosition),this.emitStateChanged(),await this.cooldown(),!0):!1}finally{this.isPerformingUndoRedo=!1}}async redo(){if(this.redoStack.length===0||this.isPerformingUndoRedo)return!1;this.isPerformingUndoRedo=!0,this.clearDebounce();try{const e=this.redoStack.pop();return e?(this.undoStack.push(e),await this.restoreState(e.state,e.caretPosition),this.emitStateChanged(),await this.cooldown(),!0):!1}finally{this.isPerformingUndoRedo=!1}}canUndo(){return this.undoStack.length>1}canRedo(){return this.redoStack.length>0}clear(){this.clearDebounce(),this.undoStack=[],this.redoStack=[],this.initialStateCaptured=!1,this.emitStateChanged()}setupEventListeners(){this.eventsDispatcher.on(td,e=>{this.handleBlockMutation(e.event)})}setupKeyboardShortcuts(){setTimeout(()=>{var t,r;const e=(r=(t=this.Blok.UI)==null?void 0:t.nodes)==null?void 0:r.redactor;e&&(Fn.add({name:"CMD+Z",on:e,handler:i=>{i.preventDefault(),this.undo()}}),Fn.add({name:"CMD+SHIFT+Z",on:e,handler:i=>{i.preventDefault(),this.redo()}}),Fn.add({name:"CMD+Y",on:e,handler:i=>{i.preventDefault(),this.redo()}}))},0)}handleBlockMutation(e){if(!this.isPerformingUndoRedo){if(!this.initialStateCaptured){this.captureInitialState();return}this.clearDebounce(),this.debounceTimeout=setTimeout(()=>{this.recordState()},this.debounceTime)}}async recordState(){if(this.isPerformingUndoRedo)return;const e=await this.getCurrentState();if(!e)return;const t=this.getCaretPosition();for(this.redoStack=[],this.undoStack.push({state:e,timestamp:Date.now(),caretPosition:t});this.undoStack.length>this.maxHistoryLength;)this.undoStack.shift();this.emitStateChanged()}async getCurrentState(){try{const e=await this.Blok.Saver.save();return e!=null?e:null}catch(e){return null}}async restoreState(e,t){this.Blok.ModificationsObserver.disable();try{await this.applyStateDiff(e)}finally{this.Blok.ModificationsObserver.enable()}this.restoreCaretPosition(t)}async applyStateDiff(e){const{BlockManager:t,Renderer:r}=this.Blok,i=t.blocks,l=e.blocks,c=new Map;i.forEach((T,k)=>{c.set(T.id,{block:T,index:k})});const d=new Map;l.forEach((T,k)=>{T.id&&d.set(T.id,{data:T,index:k})});const h=[];for(const T of i)d.has(T.id)||h.push(T);const g=[];for(const[T,{data:k,index:x}]of d)c.has(T)||g.push({data:k,index:x});const m=[];for(const[T,{data:k,index:x}]of d){const S=c.get(T);S&&m.push({block:S.block,data:k,targetIndex:x})}const y=h.length+g.length;if(y>i.length/2||y>5||i.length===0){await t.clear(),await r.render(l);return}for(const T of h)await t.removeBlock(T);for(const{block:T,data:k}of m){const x=await T.data;if(!(JSON.stringify(x)!==JSON.stringify(k.data)))continue;await T.setData(k.data)||await t.update(T,k.data,k.tunes)}for(const{data:T,index:k}of g)t.insert({id:T.id,tool:T.type,data:T.data,index:k,needToFocus:!1});await this.reorderBlocks(l)}async reorderBlocks(e){const{BlockManager:t}=this.Blok,r=new Map;e.forEach((c,d)=>{c.id&&r.set(c.id,d)}),t.blocks.some((c,d)=>{const h=r.get(c.id);return h!==void 0&&h!==d})&&e.forEach((c,d)=>{const h=c.id;if(!h)return;const g=t.blocks.findIndex(m=>m.id===h);g!==-1&&g!==d&&t.move(d,g)})}cooldown(){return new Promise(e=>setTimeout(e,FC))}getCaretPosition(){const{BlockManager:e}=this.Blok,t=e.currentBlock;if(!t)return;const r=t.currentInput;if(!r)return;const i=t.inputs.indexOf(r),l=this.getCaretOffset(r);return{blockId:t.id,inputIndex:i>=0?i:0,offset:l}}getCaretOffset(e){var i;const t=window.getSelection();if(!t||t.rangeCount===0)return 0;const r=t.getRangeAt(0);if(!e.contains(r.startContainer))return 0;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return(i=e.selectionStart)!=null?i:0;try{const l=document.createRange();return l.selectNodeContents(e),l.setEnd(r.startContainer,r.startOffset),l.toString().length}catch(l){return 0}}restoreCaretPosition(e){if(!e){this.focusFirstAvailableBlock();return}const{BlockManager:t}=this.Blok,r=t.getBlockById(e.blockId);if(!r){this.focusFirstAvailableBlock();return}r.ready.then(()=>{this.setCaretToBlockInput(r,e)})}focusFirstAvailableBlock(){const{BlockManager:e,Caret:t}=this.Blok,r=e.firstBlock;r!=null&&r.focusable&&t.setToBlock(r,t.positions.END)}setCaretToBlockInput(e,t){const{BlockManager:r,Caret:i}=this.Blok,l=e.inputs,c=Math.min(t.inputIndex,l.length-1),d=l[c];if(!d){i.setToBlock(e,i.positions.END);return}r.currentBlock=e;try{i.setToInput(d,i.positions.DEFAULT,t.offset)}catch(h){i.setToInput(d,i.positions.END)}}clearDebounce(){this.debounceTimeout&&(clearTimeout(this.debounceTimeout),this.debounceTimeout=null)}emitStateChanged(){this.eventsDispatcher.emit(eS,{canUndo:this.canUndo(),canRedo:this.canRedo()})}}const zC={BlocksAPI:nS,CaretAPI:oS,EventsAPI:iS,I18nAPI:id,API:sS,InlineToolbarAPI:aS,ListenersAPI:lS,NotifierAPI:uS,ReadOnlyAPI:dS,SanitizerAPI:AS,SaverAPI:IS,SelectionAPI:RS,ToolsAPI:_S,StylesAPI:NS,ToolbarAPI:OS,TooltipAPI:US,UiAPI:WS,HistoryAPI:KS,BlockSettings:AE,Toolbar:LE,InlineToolbar:PE,ReactAdapter:HE,BlockEvents:UE,BlockManager:vC,BlockSelection:yC,Caret:Yd,CrossBlockSelection:wC,ModificationsObserver:TC,Paste:Qd,ReadOnly:xC,RectangleSelection:SC,Renderer:EC,Saver:CC,Tools:OC,UI:DC,History:HC};class jC{constructor(e){this.moduleInstances={},this.eventsDispatcher=new Xo,this.config={},this.isReady=new Promise((t,r)=>{Promise.resolve().then(async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:i,Caret:l,UI:c,ModificationsObserver:d,History:h}=this.moduleInstances;c.checkEmptiness(),d.enable(),await h.captureInitialState(),this.configuration.autofocus===!0&&this.configuration.readOnly!==!0&&l.setToBlock(i.blocks[0],l.positions.START),t()}).catch(i=>{_e(`Blok is not ready because of ${i}`,"error"),r(i)})})}set configuration(e){var h,g,m,y,b,T;je(e)?this.config=de({},e):this.config={holder:e},this.config.holder==null&&(this.config.holder="blok"),this.config.logLevel==null&&(this.config.logLevel=fv.VERBOSE),L1(this.config.logLevel),this.config.defaultBlock=(h=this.config.defaultBlock)!=null?h:"paragraph";const t=this.config.tools,r=this.config.defaultBlock,i=t!=null&&Object.prototype.hasOwnProperty.call(t,r!=null?r:""),l=(g=this.config.data)==null?void 0:g.blocks,c=Array.isArray(l)&&l.length>0;if(r&&r!=="paragraph"&&!i&&!c){_e(`Default block "${r}" is not configured. Falling back to "paragraph" tool.`,"warn"),this.config.defaultBlock="paragraph";const k=this.config.tools,x=de({},k!=null?k:{}),S=x.paragraph;x.paragraph=this.createParagraphToolConfig(S),this.config.tools=x}this.config.minHeight=this.config.minHeight!==void 0?this.config.minHeight:300;const d={type:this.config.defaultBlock,data:{}};this.config.placeholder===void 0&&(this.config.placeholder=!1),this.config.sanitizer=(m=this.config.sanitizer)!=null?m:{},this.config.hideToolbar=(y=this.config.hideToolbar)!=null?y:!1,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=this.config.inlineToolbar!==void 0?this.config.inlineToolbar:!0,(it(this.config.data)||!this.config.data.blocks||this.config.data.blocks.length===0)&&(this.config.data={blocks:[d]}),this.config.readOnly=this.config.readOnly||!1,(b=this.config.i18n)!=null&&b.messages&&Qe.setDictionary(this.config.i18n.messages),this.config.i18n.direction=((T=this.config.i18n)==null?void 0:T.direction)||"ltr"}get configuration(){return this.config}validate(){const{holder:e}=this.config;if(hn(e)&&!L.get(e))throw Error(`element with ID «${e}» is missing. Pass correct holder's ID.`);if(e&&je(e)&&!L.isElement(e))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly","History"].reduce((t,r)=>t.then(async()=>{try{await this.moduleInstances[r].prepare()}catch(i){if(i instanceof Go)throw new Error(i.message);_e(`Module ${r} was skipped because of %o`,"warn",i)}}),Promise.resolve())}render(){const e=this.moduleInstances.Renderer;if(!e)throw new Go("Renderer module is not initialized");if(!this.config.data)throw new Go("Blok data is not initialized");return e.render(this.config.data.blocks)}constructModules(){Object.entries(zC).forEach(([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(r){_e(`[constructModules] Module ${e} skipped because`,"error",r)}})}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}createParagraphToolConfig(e){if(e===void 0)return{config:{preserveBlank:!0}};if(Me(e))return{class:e,config:{preserveBlank:!0}};if(je(e)){const t=e,r=t.config;return ot(de({},t),{config:ot(de({},je(r)?r:{}),{preserveBlank:!0})})}return{config:{preserveBlank:!0}}}getModulesDiff(e){const t={};for(const r in this.moduleInstances)r!==e&&(t[r]=this.moduleInstances[r]);return t}}const Ks=class Ks{constructor({data:e,config:t,api:r,readOnly:i}){this.api=r,this.readOnly=i,this._settings=t||{},this._data=this.normalizeData(e),this._element=this.getTag()}get _CSS(){return{block:this.api.styles.block,wrapper:""}}isHeaderData(e){return typeof e=="object"&&e!==null&&"text"in e}normalizeData(e){if(!this.isHeaderData(e))return{text:"",level:this.defaultLevel.number};const t=parseInt(String(e.level)),r=e.level!==void 0&&!isNaN(t);return{text:e.text||"",level:r?t:this.defaultLevel.number}}render(){return this._element}renderSettings(){return this.levels.map(e=>({icon:e.svg,label:this.api.i18n.t(`Heading ${e.number}`),onActivate:()=>this.setLevel(e.number),closeOnActivate:!0,isActive:this.currentLevel.number===e.number}))}setLevel(e){this.data={level:e,text:this.data.text}}merge(e){this._element.insertAdjacentHTML("beforeend",e.text)}validate(e){return e.text.trim()!==""}save(e){return{text:e.innerHTML,level:this.currentLevel.number}}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{level:!1,text:{}}}static get isReadOnlySupported(){return!0}get data(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data}set data(e){if(this._data=this.normalizeData(e),e.level!==void 0&&this._element.parentNode){const t=this.getTag();t.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(t,this._element),this._element=t}e.text!==void 0&&(this._element.innerHTML=this._data.text||"")}getTag(){const e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.className=De(Ks.BASE_STYLES,this.currentLevel.styles),e.setAttribute(Qu,"header"),e.contentEditable=this.readOnly?"false":"true",e.setAttribute("data-placeholder",this.api.i18n.t(this._settings.placeholder||"")),e}get currentLevel(){const e=this.levels.find(t=>t.number===this._data.level);return e!=null?e:this.defaultLevel}get defaultLevel(){if(!this._settings.defaultLevel)return this.levels[1];const e=this.levels.find(t=>t.number===this._settings.defaultLevel);return e||(console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels"),this.levels[1])}get levels(){const e=[{number:1,tag:"H1",svg:fE,styles:"text-[2.5em] leading-tight font-bold"},{number:2,tag:"H2",svg:hE,styles:"text-[2em] leading-tight font-semibold"},{number:3,tag:"H3",svg:pE,styles:"text-[1.75em] leading-tight font-semibold"},{number:4,tag:"H4",svg:gE,styles:"text-[1.5em] leading-tight font-semibold"},{number:5,tag:"H5",svg:mE,styles:"text-[1.25em] leading-tight font-semibold"},{number:6,tag:"H6",svg:vE,styles:"text-base leading-tight font-semibold"}];return this._settings.levels?e.filter(t=>this._settings.levels.includes(t.number)):e}onPaste(e){var d;const t=e.detail;if(!("data"in t))return;const r=t.data,l=(d={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[r.tagName])!=null?d:this.defaultLevel.number,c=this._settings.levels?this._settings.levels.reduce((h,g)=>Math.abs(g-l)<Math.abs(h-l)?g:h):l;this.data={level:c,text:r.innerHTML}}static get pasteConfig(){return{tags:["H1","H2","H3","H4","H5","H6"]}}static get toolbox(){return{icon:yE,title:"Heading"}}};Ks.BASE_STYLES="py-[0.6em] pb-[3px] px-0 m-0 leading-[1.25em] outline-none [&_p]:!p-0 [&_p]:!m-0 [&_div]:!p-0 [&_div]:!m-0";let rf=Ks;const mo=class mo{static get version(){return ls()}constructor(e){this.initialConfiguration=je(e)?de({},e):e;const t=je(e)&&Me(e.onReady)?e.onReady:()=>{},r=new jC(e);this.destroy=()=>{},this.isReady=r.isReady.then(()=>{this.exportAPI(r),t()})}exportAPI(e){var k,x;const t=["configuration"],r=()=>{Object.values(e.moduleInstances).forEach(S=>{if(S==null)return;Me(S.destroy)&&S.destroy();const R=S.listeners;R&&Me(R.removeAll)&&R.removeAll()}),qS();for(const S in this)Object.prototype.hasOwnProperty.call(this,S)&&delete this[S];Object.setPrototypeOf(this,null)};t.forEach(S=>{if(S!=="configuration"){this[S]=e[S];return}const R=e.configuration,O=je(this.initialConfiguration)?this.initialConfiguration:R!=null?R:this.initialConfiguration;O!==void 0&&(this[S]=O)}),this.destroy=r;const i=e.moduleInstances.API.methods,l=(x=(k=e.moduleInstances.EventsAPI)==null?void 0:k.methods)!=null?x:i.events;if(l!==void 0){const S=R=>{Object.prototype.hasOwnProperty.call(R,"eventsDispatcher")||Object.defineProperty(R,"eventsDispatcher",{value:l,configurable:!0,enumerable:!0,writable:!1})};S(i),S(this)}Object.getPrototypeOf(i)!==mo.prototype&&Object.setPrototypeOf(i,mo.prototype),Object.setPrototypeOf(this,i);const c=Object.create(null),d=e.moduleInstances,h=d,g=S=>/^[A-Z]+$/.test(S)?S.toLowerCase():S.charAt(0).toLowerCase()+S.slice(1);Object.keys(h).forEach(S=>{const R=g(S);Object.defineProperty(c,R,{configurable:!0,enumerable:!0,get:()=>h[S]})});const m=d.Toolbar,y=d.BlockSettings;m!==void 0&&y!==void 0&&m.blockSettings===void 0&&(m.blockSettings=y);const b=d.InlineToolbar;m!==void 0&&b!==void 0&&m.inlineToolbar===void 0&&(m.inlineToolbar=b),Object.defineProperty(this,"module",{value:c,configurable:!0,enumerable:!1,writable:!1}),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([S,R])=>{Object.entries(R).forEach(([O,H])=>{const P=S,$=e.moduleInstances.API.methods[P];this[H]=$[O]})})}};mo.Header=rf,mo.Paragraph=qs;let of=mo;const Ht={wrapper:Tt("fixed z-[2] bottom-5 left-5",'font-[-apple-system,BlinkMacSystemFont,"Segoe_UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira_Sans","Droid_Sans","Helvetica_Neue",sans-serif]'),notification:Tt("relative w-[230px] mt-[15px] py-[13px] px-4","bg-white shadow-[0_11px_17px_0_rgba(23,32,61,0.13)] rounded-[5px]","text-sm leading-[1.4em] break-words",'before:content-[""] before:absolute before:block before:top-0 before:left-0',"before:w-[3px] before:h-[calc(100%-6px)] before:m-[3px] before:rounded-[5px] before:bg-transparent"),crossBtn:Tt("absolute top-[7px] right-[15px] w-2.5 h-2.5 p-[5px] opacity-55 cursor-pointer",'before:content-[""] before:absolute before:left-[9px] before:top-[5px] before:h-3 before:w-0.5 before:bg-[#575d67] before:rotate-[-45deg]','after:content-[""] after:absolute after:left-[9px] after:top-[5px] after:h-3 after:w-0.5 after:bg-[#575d67] after:rotate-45',"hover:opacity-100"),btnsWrapper:"flex flex-row flex-nowrap mt-[5px]",btn:"border-none rounded-[3px] text-[13px] py-[5px] px-2.5 cursor-pointer last:ml-2.5",okBtn:"bg-[#34c992] shadow-[0_1px_1px_0_rgba(18,49,35,0.05)] text-white hover:bg-[#2db583]",cancelBtn:"bg-[#f2f5f7] shadow-[0_2px_1px_0_rgba(16,19,29,0)] text-[#656b7c] hover:bg-[#e9ecee]",input:Tt("max-w-[130px] py-[5px] px-2.5 bg-[#f7f7f7] border-0 rounded-[3px]","text-[13px] text-[#656b7c] outline-none","placeholder:text-[#656b7c] focus:placeholder:text-[rgba(101,107,124,0.3)]"),successNotification:Tt("!bg-[#fafffe]","before:!bg-[#41ffb1]"),errorNotification:Tt("!bg-[#fffbfb]","before:!bg-[#fb5d5d]")},sf=a=>{const e=document.createElement("DIV"),t=document.createElement("DIV"),r=a.message,i=a.style,l=()=>i==="success"?Ht.successNotification:i==="error"?Ht.errorNotification:"";return e.className=De(Ht.notification,l()),i?e.setAttribute("data-blok-testid",`notification-${i}`):e.setAttribute("data-blok-testid","notification"),e.innerHTML=r,t.className=Ht.crossBtn,t.setAttribute("data-blok-testid","notification-cross"),t.addEventListener("click",()=>e.remove()),e.appendChild(t),e},qC=a=>{const e=sf(a),t=document.createElement("div"),r=document.createElement("button"),i=document.createElement("button"),l=e.querySelector('[data-blok-testid="notification-cross"]'),c=a.cancelHandler,d=a.okHandler;return t.className=Ht.btnsWrapper,t.setAttribute("data-blok-testid","notification-buttons-wrapper"),r.innerHTML=a.okText||"Confirm",i.innerHTML=a.cancelText||"Cancel",r.className=Tt(Ht.btn,Ht.okBtn),i.className=Tt(Ht.btn,Ht.cancelBtn),r.setAttribute("data-blok-testid","notification-confirm-button"),i.setAttribute("data-blok-testid","notification-cancel-button"),c&&typeof c=="function"&&i.addEventListener("click",c),c&&typeof c=="function"&&l&&l.addEventListener("click",c),d&&typeof d=="function"&&r.addEventListener("click",d),r.addEventListener("click",()=>e.remove()),i.addEventListener("click",()=>e.remove()),t.appendChild(r),t.appendChild(i),e.appendChild(t),e},UC=a=>{const e=sf(a),t=document.createElement("div"),r=document.createElement("button"),i=document.createElement("input"),l=e.querySelector('[data-blok-testid="notification-cross"]'),c=a.cancelHandler,d=a.okHandler;return t.className=Ht.btnsWrapper,r.innerHTML=a.okText||"Ok",r.className=Tt(Ht.btn,Ht.okBtn),i.className=Ht.input,i.setAttribute("data-blok-testid","notification-input"),a.placeholder&&i.setAttribute("placeholder",a.placeholder),a.default&&(i.value=a.default),a.inputType&&(i.type=a.inputType),c&&typeof c=="function"&&l&&l.addEventListener("click",c),d&&typeof d=="function"&&r.addEventListener("click",()=>{d(i.value)}),r.addEventListener("click",()=>e.remove()),t.appendChild(i),t.appendChild(r),e.appendChild(t),e},WC=()=>{const a=document.createElement("DIV");return a.className=Ht.wrapper,a.setAttribute("data-blok-testid","notifier-container"),a},KC=8e3,VC=()=>{const a=document.querySelector('[data-blok-testid="notifier-container"]');if(a)return a;const e=WC();return document.body.appendChild(e),e},db=a=>{if(!a.message)return;const e=VC(),t=a.time||KC,r=(()=>{switch(a.type){case"confirm":return qC(a);case"prompt":return UC(a);default:{const i=sf(a);return window.setTimeout(()=>{i.remove()},t),i}}})();e&&r&&(e.appendChild(r),r.className=`${r.className} animate-notify-bounce-in`,r.setAttribute("data-blok-bounce-in","true"))},$C=Object.freeze(Object.defineProperty({__proto__:null,default:{show:db},show:db},Symbol.toStringTag,{value:"Module"}));return of}));