File: /var/www/lcc.kaunokolegija.lt/wp-content/plugins/wp-table-builder/v2/dist/assets/index-BF-1tZFt.js
var wb=Object.defineProperty;var bb=(e,t,n)=>t in e?wb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var q=(e,t,n)=>bb(e,typeof t!="symbol"?t+"":t,n);var Cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u2={exports:{}},ge={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var wa=Symbol.for("react.element"),xb=Symbol.for("react.portal"),Sb=Symbol.for("react.fragment"),kb=Symbol.for("react.strict_mode"),Tb=Symbol.for("react.profiler"),Eb=Symbol.for("react.provider"),Cb=Symbol.for("react.context"),Ib=Symbol.for("react.forward_ref"),Nb=Symbol.for("react.suspense"),Ab=Symbol.for("react.memo"),jb=Symbol.for("react.lazy"),B0=Symbol.iterator;function Rb(e){return e===null||typeof e!="object"?null:(e=B0&&e[B0]||e["@@iterator"],typeof e=="function"?e:null)}var d2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f2=Object.assign,h2={};function Hi(e,t,n){this.props=e,this.context=t,this.refs=h2,this.updater=n||d2}Hi.prototype.isReactComponent={};Hi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Hi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function p2(){}p2.prototype=Hi.prototype;function Kp(e,t,n){this.props=e,this.context=t,this.refs=h2,this.updater=n||d2}var Yp=Kp.prototype=new p2;Yp.constructor=Kp;f2(Yp,Hi.prototype);Yp.isPureReactComponent=!0;var P0=Array.isArray,g2=Object.prototype.hasOwnProperty,Zp={current:null},m2={key:!0,ref:!0,__self:!0,__source:!0};function v2(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)g2.call(t,r)&&!m2.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var a=Array(l),c=0;c<l;c++)a[c]=arguments[c+2];o.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:wa,type:e,key:s,ref:i,props:o,_owner:Zp.current}}function Lb(e,t){return{$$typeof:wa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Qp(e){return typeof e=="object"&&e!==null&&e.$$typeof===wa}function _b(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var z0=/\/+/g;function Jd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_b(""+e.key):t.toString(36)}function Tc(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case wa:case xb:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Jd(i,0):r,P0(o)?(n="",e!=null&&(n=e.replace(z0,"$&/")+"/"),Tc(o,t,n,"",function(c){return c})):o!=null&&(Qp(o)&&(o=Lb(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(z0,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",P0(e))for(var l=0;l<e.length;l++){s=e[l];var a=r+Jd(s,l);i+=Tc(s,t,n,a,o)}else if(a=Rb(e),typeof a=="function")for(e=a.call(e),l=0;!(s=e.next()).done;)s=s.value,a=r+Jd(s,l++),i+=Tc(s,t,n,a,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Wa(e,t,n){if(e==null)return e;var r=[],o=0;return Tc(e,r,"","",function(s){return t.call(n,s,o++)}),r}function Ob(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ut={current:null},Ec={transition:null},Mb={ReactCurrentDispatcher:Ut,ReactCurrentBatchConfig:Ec,ReactCurrentOwner:Zp};function y2(){throw Error("act(...) is not supported in production builds of React.")}ge.Children={map:Wa,forEach:function(e,t,n){Wa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wa(e,function(){t++}),t},toArray:function(e){return Wa(e,function(t){return t})||[]},only:function(e){if(!Qp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ge.Component=Hi;ge.Fragment=Sb;ge.Profiler=Tb;ge.PureComponent=Kp;ge.StrictMode=kb;ge.Suspense=Nb;ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mb;ge.act=y2;ge.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=f2({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Zp.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)g2.call(t,a)&&!m2.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:wa,type:e.type,key:o,ref:s,props:r,_owner:i}};ge.createContext=function(e){return e={$$typeof:Cb,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Eb,_context:e},e.Consumer=e};ge.createElement=v2;ge.createFactory=function(e){var t=v2.bind(null,e);return t.type=e,t};ge.createRef=function(){return{current:null}};ge.forwardRef=function(e){return{$$typeof:Ib,render:e}};ge.isValidElement=Qp;ge.lazy=function(e){return{$$typeof:jb,_payload:{_status:-1,_result:e},_init:Ob}};ge.memo=function(e,t){return{$$typeof:Ab,type:e,compare:t===void 0?null:t}};ge.startTransition=function(e){var t=Ec.transition;Ec.transition={};try{e()}finally{Ec.transition=t}};ge.unstable_act=y2;ge.useCallback=function(e,t){return Ut.current.useCallback(e,t)};ge.useContext=function(e){return Ut.current.useContext(e)};ge.useDebugValue=function(){};ge.useDeferredValue=function(e){return Ut.current.useDeferredValue(e)};ge.useEffect=function(e,t){return Ut.current.useEffect(e,t)};ge.useId=function(){return Ut.current.useId()};ge.useImperativeHandle=function(e,t,n){return Ut.current.useImperativeHandle(e,t,n)};ge.useInsertionEffect=function(e,t){return Ut.current.useInsertionEffect(e,t)};ge.useLayoutEffect=function(e,t){return Ut.current.useLayoutEffect(e,t)};ge.useMemo=function(e,t){return Ut.current.useMemo(e,t)};ge.useReducer=function(e,t,n){return Ut.current.useReducer(e,t,n)};ge.useRef=function(e){return Ut.current.useRef(e)};ge.useState=function(e){return Ut.current.useState(e)};ge.useSyncExternalStore=function(e,t,n){return Ut.current.useSyncExternalStore(e,t,n)};ge.useTransition=function(){return Ut.current.useTransition()};ge.version="18.3.1";u2.exports=ge;var A=u2.exports;const Z=Di(A);var w2={exports:{}},b2={};/**
* @license React
* use-sync-external-store-with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ba=A;function Bb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pb=typeof Object.is=="function"?Object.is:Bb,zb=ba.useSyncExternalStore,Db=ba.useRef,Hb=ba.useEffect,$b=ba.useMemo,qb=ba.useDebugValue;b2.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=Db(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=$b(function(){function a(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&i.hasValue){var g=i.value;if(o(g,p))return d=g}return d=p}if(g=d,Pb(u,p))return g;var v=r(p);return o!==void 0&&o(g,v)?(u=p,g):(u=p,d=v)}var c=!1,u,d,h=n===void 0?null:n;return[function(){return a(t())},h===null?void 0:function(){return a(h())}]},[t,n,r,o]);var l=zb(e,s[0],s[1]);return Hb(function(){i.hasValue=!0,i.value=l},[l]),qb(l),l};w2.exports=b2;var Fb=w2.exports,Ub=A.version.startsWith("19"),Vb=Symbol.for(Ub?"react.transitional.element":"react.element"),Wb=Symbol.for("react.portal"),Gb=Symbol.for("react.fragment"),Kb=Symbol.for("react.strict_mode"),Yb=Symbol.for("react.profiler"),Zb=Symbol.for("react.consumer"),Qb=Symbol.for("react.context"),x2=Symbol.for("react.forward_ref"),Xb=Symbol.for("react.suspense"),Jb=Symbol.for("react.suspense_list"),Xp=Symbol.for("react.memo"),e3=Symbol.for("react.lazy"),t3=x2,n3=Xp;function r3(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case Vb:switch(e=e.type,e){case Gb:case Yb:case Kb:case Xb:case Jb:return e;default:switch(e=e&&e.$$typeof,e){case Qb:case x2:case e3:case Xp:return e;case Zb:return e;default:return t}}case Wb:return t}}}function o3(e){return r3(e)===Xp}function s3(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let l=!1,a,c,u,d,h;function p(y,w){return a=y,c=w,u=e(a,c),d=t(r,c),h=n(u,d,c),l=!0,h}function g(){return u=e(a,c),t.dependsOnOwnProps&&(d=t(r,c)),h=n(u,d,c),h}function v(){return e.dependsOnOwnProps&&(u=e(a,c)),t.dependsOnOwnProps&&(d=t(r,c)),h=n(u,d,c),h}function x(){const y=e(a,c),w=!i(y,u);return u=y,w&&(h=n(u,d,c)),h}function m(y,w){const S=!s(w,c),k=!o(y,a,w,c);return a=y,c=w,S&&k?g():S?v():k?x():h}return function(w,S){return l?m(w,S):p(w,S)}}function i3(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const s=t(e,o),i=n(e,o),l=r(e,o);return s3(s,i,l,e,o)}function l3(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...s)=>t(o(...s)))}return n}function oh(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function D0(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function S2(e,t){return function(r,{displayName:o}){const s=function(l,a){return s.dependsOnOwnProps?s.mapToProps(l,a):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,a){s.mapToProps=e,s.dependsOnOwnProps=D0(e);let c=s(l,a);return typeof c=="function"&&(s.mapToProps=c,s.dependsOnOwnProps=D0(c),c=s(l,a)),c},s}}function Jp(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function a3(e){return e&&typeof e=="object"?oh(t=>l3(e,t)):e?typeof e=="function"?S2(e):Jp(e,"mapDispatchToProps"):oh(t=>({dispatch:t}))}function c3(e){return e?typeof e=="function"?S2(e):Jp(e,"mapStateToProps"):oh(()=>({}))}function u3(e,t,n){return{...n,...e,...t}}function d3(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let s=!1,i;return function(a,c,u){const d=e(a,c,u);return s?o(d,i)||(i=d):(s=!0,i=d),i}}}function f3(e){return e?typeof e=="function"?d3(e):Jp(e,"mergeProps"):()=>u3}function k2(e){e()}function h3(){let e=null,t=null;return{clear(){e=null,t=null},notify(){k2(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var H0={notify(){},get:()=>[]};function T2(e,t){let n,r=H0,o=0,s=!1;function i(v){u();const x=r.subscribe(v);let m=!1;return()=>{m||(m=!0,x(),d())}}function l(){r.notify()}function a(){g.onStateChange&&g.onStateChange()}function c(){return s}function u(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=h3())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=H0)}function h(){s||(s=!0,u())}function p(){s&&(s=!1,d())}const g={addNestedSub:i,notifyNestedSubs:l,handleChangeWrapper:a,isSubscribed:c,trySubscribe:h,tryUnsubscribe:p,getListeners:()=>r};return g}var p3=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g3=p3(),m3=()=>typeof navigator<"u"&&navigator.product==="ReactNative",v3=m3(),y3=()=>g3||v3?A.useLayoutEffect:A.useEffect,$c=y3();function $0(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Cc(e,t){if($0(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!$0(e[n[o]],t[n[o]]))return!1;return!0}var w3={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},b3={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},x3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E2={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},S3={[t3]:x3,[n3]:E2};function q0(e){return o3(e)?E2:S3[e.$$typeof]||w3}var k3=Object.defineProperty,T3=Object.getOwnPropertyNames,F0=Object.getOwnPropertySymbols,E3=Object.getOwnPropertyDescriptor,C3=Object.getPrototypeOf,U0=Object.prototype;function sh(e,t){if(typeof t!="string"){if(U0){const s=C3(t);s&&s!==U0&&sh(e,s)}let n=T3(t);F0&&(n=n.concat(F0(t)));const r=q0(e),o=q0(t);for(let s=0;s<n.length;++s){const i=n[s];if(!b3[i]&&!(o&&o[i])&&!(r&&r[i])){const l=E3(t,i);try{k3(e,i,l)}catch{}}}}return e}var ef=Symbol.for("react-redux-context"),tf=typeof globalThis<"u"?globalThis:{};function I3(){if(!A.createContext)return{};const e=tf[ef]??(tf[ef]=new Map);let t=e.get(A.createContext);return t||(t=A.createContext(null),e.set(A.createContext,t)),t}var xr=I3(),N3=[null,null];function A3(e,t,n){$c(()=>e(...t),n)}function j3(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function R3(e,t,n,r,o,s,i,l,a,c,u){if(!e)return()=>{};let d=!1,h=null;const p=()=>{if(d||!l.current)return;const v=t.getState();let x,m;try{x=r(v,o.current)}catch(y){m=y,h=y}m||(h=null),x===s.current?i.current||c():(s.current=x,a.current=x,i.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}function L3(e,t){return e===t}function _3(e,t,n,{pure:r,areStatesEqual:o=L3,areOwnPropsEqual:s=Cc,areStatePropsEqual:i=Cc,areMergedPropsEqual:l=Cc,forwardRef:a=!1,context:c=xr}={}){const u=c,d=c3(e),h=a3(t),p=f3(n),g=!!e;return x=>{const m=x.displayName||x.name||"Component",y=`Connect(${m})`,w={shouldHandleStateChanges:g,displayName:y,wrappedComponentName:m,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:h,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:l};function S(C){const[I,j,R]=A.useMemo(()=>{const{reactReduxForwardedRef:fe,...gt}=C;return[C.context,fe,gt]},[C]),M=A.useMemo(()=>{let fe=u;return I!=null&&I.Consumer,fe},[I,u]),_=A.useContext(M),U=!!C.store&&!!C.store.getState&&!!C.store.dispatch,V=!!_&&!!_.store,ee=U?C.store:_.store,Ee=V?_.getServerState:ee.getState,Re=A.useMemo(()=>i3(ee.dispatch,w),[ee]),[D,K]=A.useMemo(()=>{if(!g)return N3;const fe=T2(ee,U?void 0:_.subscription),gt=fe.notifyNestedSubs.bind(fe);return[fe,gt]},[ee,U,_]),H=A.useMemo(()=>U?_:{..._,subscription:D},[U,_,D]),oe=A.useRef(void 0),me=A.useRef(R),pe=A.useRef(void 0),Oe=A.useRef(!1),le=A.useRef(!1),Me=A.useRef(void 0);$c(()=>(le.current=!0,()=>{le.current=!1}),[]);const rt=A.useMemo(()=>()=>pe.current&&R===me.current?pe.current:Re(ee.getState(),R),[ee,R]),B=A.useMemo(()=>gt=>D?R3(g,ee,D,Re,me,oe,Oe,le,pe,K,gt):()=>{},[D]);A3(j3,[me,oe,Oe,R,pe,K]);let se;try{se=A.useSyncExternalStore(B,rt,Ee?()=>Re(Ee(),R):rt)}catch(fe){throw Me.current&&(fe.message+=`
The error may be correlated with this previous error:
${Me.current.stack}
`),fe}$c(()=>{Me.current=void 0,pe.current=void 0,oe.current=se});const xe=A.useMemo(()=>A.createElement(x,{...se,ref:j}),[j,x,se]);return A.useMemo(()=>g?A.createElement(M.Provider,{value:H},xe):xe,[M,xe,H])}const T=A.memo(S);if(T.WrappedComponent=x,T.displayName=S.displayName=y,a){const I=A.forwardRef(function(R,M){return A.createElement(T,{...R,reactReduxForwardedRef:M})});return I.displayName=y,I.WrappedComponent=x,sh(I,x)}return sh(T,x)}}var O3=_3;function M3(e){const{children:t,context:n,serverState:r,store:o}=e,s=A.useMemo(()=>{const a=T2(o);return{store:o,subscription:a,getServerState:r?()=>r:void 0}},[o,r]),i=A.useMemo(()=>o.getState(),[o]);$c(()=>{const{subscription:a}=s;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),i!==o.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[s,i]);const l=n||xr;return A.createElement(l.Provider,{value:s},t)}var B3=M3;function e1(e=xr){return function(){return A.useContext(e)}}var C2=e1();function t1(e=xr){const t=e===xr?C2:e1(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var I2=t1();function N2(e=xr){const t=e===xr?I2:t1(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Es=N2(),P3=(e,t)=>e===t;function A2(e=xr){const t=e===xr?C2:e1(e),n=(r,o={})=>{const{equalityFn:s=P3}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:l,subscription:a,getServerState:c}=i;A.useRef(!0);const u=A.useCallback({[r.name](h){return r(h)}}[r.name],[r]),d=Fb.useSyncExternalStoreWithSelector(a.addNestedSub,l.getState,c||l.getState,u,s);return A.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var ke=A2(),z3=k2;const NL=Object.freeze(Object.defineProperty({__proto__:null,Provider:B3,ReactReduxContext:xr,batch:z3,connect:O3,createDispatchHook:N2,createSelectorHook:A2,createStoreHook:t1,shallowEqual:Cc,useDispatch:Es,useSelector:ke,useStore:I2},Symbol.toStringTag,{value:"Module"}));var V0={},j2={exports:{}},yn={},R2={exports:{}},L2={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(D,K){var H=D.length;D.push(K);e:for(;0<H;){var oe=H-1>>>1,me=D[oe];if(0<o(me,K))D[oe]=K,D[H]=me,H=oe;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var K=D[0],H=D.pop();if(H!==K){D[0]=H;e:for(var oe=0,me=D.length,pe=me>>>1;oe<pe;){var Oe=2*(oe+1)-1,le=D[Oe],Me=Oe+1,rt=D[Me];if(0>o(le,H))Me<me&&0>o(rt,le)?(D[oe]=rt,D[Me]=H,oe=Me):(D[oe]=le,D[Oe]=H,oe=Oe);else if(Me<me&&0>o(rt,H))D[oe]=rt,D[Me]=H,oe=Me;else break e}}return K}function o(D,K){var H=D.sortIndex-K.sortIndex;return H!==0?H:D.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var a=[],c=[],u=1,d=null,h=3,p=!1,g=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var K=n(c);K!==null;){if(K.callback===null)r(c);else if(K.startTime<=D)r(c),K.sortIndex=K.expirationTime,t(a,K);else break;K=n(c)}}function S(D){if(v=!1,w(D),!g)if(n(a)!==null)g=!0,Ee(k);else{var K=n(c);K!==null&&Re(S,K.startTime-D)}}function k(D,K){g=!1,v&&(v=!1,m(I),I=-1),p=!0;var H=h;try{for(w(K),d=n(a);d!==null&&(!(d.expirationTime>K)||D&&!M());){var oe=d.callback;if(typeof oe=="function"){d.callback=null,h=d.priorityLevel;var me=oe(d.expirationTime<=K);K=e.unstable_now(),typeof me=="function"?d.callback=me:d===n(a)&&r(a),w(K)}else r(a);d=n(a)}if(d!==null)var pe=!0;else{var Oe=n(c);Oe!==null&&Re(S,Oe.startTime-K),pe=!1}return pe}finally{d=null,h=H,p=!1}}var T=!1,C=null,I=-1,j=5,R=-1;function M(){return!(e.unstable_now()-R<j)}function _(){if(C!==null){var D=e.unstable_now();R=D;var K=!0;try{K=C(!0,D)}finally{K?U():(T=!1,C=null)}}else T=!1}var U;if(typeof y=="function")U=function(){y(_)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,ee=V.port2;V.port1.onmessage=_,U=function(){ee.postMessage(null)}}else U=function(){x(_,0)};function Ee(D){C=D,T||(T=!0,U())}function Re(D,K){I=x(function(){D(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,Ee(k))},e.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"):j=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(D){switch(h){case 1:case 2:case 3:var K=3;break;default:K=h}var H=h;h=K;try{return D()}finally{h=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,K){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var H=h;h=D;try{return K()}finally{h=H}},e.unstable_scheduleCallback=function(D,K,H){var oe=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?oe+H:oe):H=oe,D){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=H+me,D={id:u++,callback:K,priorityLevel:D,startTime:H,expirationTime:me,sortIndex:-1},H>oe?(D.sortIndex=H,t(c,D),n(a)===null&&D===n(c)&&(v?(m(I),I=-1):v=!0,Re(S,H-oe))):(D.sortIndex=me,t(a,D),g||p||(g=!0,Ee(k))),D},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(D){var K=h;return function(){var H=h;h=K;try{return D.apply(this,arguments)}finally{h=H}}}})(L2);R2.exports=L2;var D3=R2.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var H3=A,mn=D3;function z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _2=new Set,Dl={};function Cs(e,t){Ii(e,t),Ii(e+"Capture",t)}function Ii(e,t){for(Dl[e]=t,e=0;e<t.length;e++)_2.add(t[e])}var Gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ih=Object.prototype.hasOwnProperty,$3=/^[: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]*$/,W0={},G0={};function q3(e){return ih.call(G0,e)?!0:ih.call(W0,e)?!1:$3.test(e)?G0[e]=!0:(W0[e]=!0,!1)}function F3(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function U3(e,t,n,r){if(t===null||typeof t>"u"||F3(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Vt(e,t,n,r,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var It={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){It[e]=new Vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];It[t]=new Vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){It[e]=new Vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){It[e]=new Vt(e,2,!1,e,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(e){It[e]=new Vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){It[e]=new Vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){It[e]=new Vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){It[e]=new Vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){It[e]=new Vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var n1=/[\-:]([a-z])/g;function r1(e){return e[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(e){var t=e.replace(n1,r1);It[t]=new Vt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(n1,r1);It[t]=new Vt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(n1,r1);It[t]=new Vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){It[e]=new Vt(e,1,!1,e.toLowerCase(),null,!1,!1)});It.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){It[e]=new Vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function o1(e,t,n,r){var o=It.hasOwnProperty(t)?It[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(U3(t,n,o,r)&&(n=null),r||o===null?q3(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var no=H3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ga=Symbol.for("react.element"),ri=Symbol.for("react.portal"),oi=Symbol.for("react.fragment"),s1=Symbol.for("react.strict_mode"),lh=Symbol.for("react.profiler"),O2=Symbol.for("react.provider"),M2=Symbol.for("react.context"),i1=Symbol.for("react.forward_ref"),ah=Symbol.for("react.suspense"),ch=Symbol.for("react.suspense_list"),l1=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),B2=Symbol.for("react.offscreen"),K0=Symbol.iterator;function ll(e){return e===null||typeof e!="object"?null:(e=K0&&e[K0]||e["@@iterator"],typeof e=="function"?e:null)}var tt=Object.assign,nf;function wl(e){if(nf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);nf=t&&t[1]||""}return`
`+nf+e}var rf=!1;function of(e,t){if(!e||rf)return"";rf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
`),s=r.stack.split(`
`),i=o.length-1,l=s.length-1;1<=i&&0<=l&&o[i]!==s[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==s[l]){if(i!==1||l!==1)do if(i--,l--,0>l||o[i]!==s[l]){var a=`
`+o[i].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=i&&0<=l);break}}}finally{rf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wl(e):""}function V3(e){switch(e.tag){case 5:return wl(e.type);case 16:return wl("Lazy");case 13:return wl("Suspense");case 19:return wl("SuspenseList");case 0:case 2:case 15:return e=of(e.type,!1),e;case 11:return e=of(e.type.render,!1),e;case 1:return e=of(e.type,!0),e;default:return""}}function uh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case oi:return"Fragment";case ri:return"Portal";case lh:return"Profiler";case s1:return"StrictMode";case ah:return"Suspense";case ch:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case M2:return(e.displayName||"Context")+".Consumer";case O2:return(e._context.displayName||"Context")+".Provider";case i1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case l1:return t=e.displayName||null,t!==null?t:uh(e.type)||"Memo";case ho:t=e._payload,e=e._init;try{return uh(e(t))}catch{}}return null}function W3(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return uh(t);case 8:return t===s1?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Lo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function P2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function G3(e){var t=P2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ka(e){e._valueTracker||(e._valueTracker=G3(e))}function z2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=P2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function qc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dh(e,t){var n=t.checked;return tt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Y0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Lo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function D2(e,t){t=t.checked,t!=null&&o1(e,"checked",t,!1)}function fh(e,t){D2(e,t);var n=Lo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hh(e,t.type,n):t.hasOwnProperty("defaultValue")&&hh(e,t.type,Lo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Z0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function hh(e,t,n){(t!=="number"||qc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bl=Array.isArray;function vi(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Lo(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ph(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(z(91));return tt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Q0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(z(92));if(bl(n)){if(1<n.length)throw Error(z(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Lo(n)}}function H2(e,t){var n=Lo(t.value),r=Lo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function X0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $2(e){switch(e){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 gh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$2(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ya,q2=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ya=Ya||document.createElement("div"),Ya.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ya.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tl={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},K3=["Webkit","ms","Moz","O"];Object.keys(Tl).forEach(function(e){K3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tl[t]=Tl[e]})});function F2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tl.hasOwnProperty(e)&&Tl[e]?(""+t).trim():t+"px"}function U2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=F2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Y3=tt({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 mh(e,t){if(t){if(Y3[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function vh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 yh=null;function a1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wh=null,yi=null,wi=null;function J0(e){if(e=ka(e)){if(typeof wh!="function")throw Error(z(280));var t=e.stateNode;t&&(t=zu(t),wh(e.stateNode,e.type,t))}}function V2(e){yi?wi?wi.push(e):wi=[e]:yi=e}function W2(){if(yi){var e=yi,t=wi;if(wi=yi=null,J0(e),t)for(e=0;e<t.length;e++)J0(t[e])}}function G2(e,t){return e(t)}function K2(){}var sf=!1;function Y2(e,t,n){if(sf)return e(t,n);sf=!0;try{return G2(e,t,n)}finally{sf=!1,(yi!==null||wi!==null)&&(K2(),W2())}}function $l(e,t){var n=e.stateNode;if(n===null)return null;var r=zu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(z(231,t,typeof n));return n}var bh=!1;if(Gr)try{var al={};Object.defineProperty(al,"passive",{get:function(){bh=!0}}),window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{bh=!1}function Z3(e,t,n,r,o,s,i,l,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var El=!1,Fc=null,Uc=!1,xh=null,Q3={onError:function(e){El=!0,Fc=e}};function X3(e,t,n,r,o,s,i,l,a){El=!1,Fc=null,Z3.apply(Q3,arguments)}function J3(e,t,n,r,o,s,i,l,a){if(X3.apply(this,arguments),El){if(El){var c=Fc;El=!1,Fc=null}else throw Error(z(198));Uc||(Uc=!0,xh=c)}}function Is(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Z2(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function eg(e){if(Is(e)!==e)throw Error(z(188))}function ex(e){var t=e.alternate;if(!t){if(t=Is(e),t===null)throw Error(z(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return eg(o),e;if(s===r)return eg(o),t;s=s.sibling}throw Error(z(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i){for(l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i)throw Error(z(189))}}if(n.alternate!==r)throw Error(z(190))}if(n.tag!==3)throw Error(z(188));return n.stateNode.current===n?e:t}function Q2(e){return e=ex(e),e!==null?X2(e):null}function X2(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=X2(e);if(t!==null)return t;e=e.sibling}return null}var J2=mn.unstable_scheduleCallback,tg=mn.unstable_cancelCallback,tx=mn.unstable_shouldYield,nx=mn.unstable_requestPaint,st=mn.unstable_now,rx=mn.unstable_getCurrentPriorityLevel,c1=mn.unstable_ImmediatePriority,ey=mn.unstable_UserBlockingPriority,Vc=mn.unstable_NormalPriority,ox=mn.unstable_LowPriority,ty=mn.unstable_IdlePriority,Ou=null,mr=null;function sx(e){if(mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(Ou,e,void 0,(e.current.flags&128)===128)}catch{}}var Qn=Math.clz32?Math.clz32:ax,ix=Math.log,lx=Math.LN2;function ax(e){return e>>>=0,e===0?32:31-(ix(e)/lx|0)|0}var Za=64,Qa=4194304;function xl(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~o;l!==0?r=xl(l):(s&=i,s!==0&&(r=xl(s)))}else i=n&~o,i!==0?r=xl(i):s!==0&&(r=xl(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Qn(t),o=1<<n,r|=e[n],t&=~o;return r}function cx(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 ux(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Qn(s),l=1<<i,a=o[i];a===-1?(!(l&n)||l&r)&&(o[i]=cx(l,t)):a<=t&&(e.expiredLanes|=l),s&=~l}}function Sh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ny(){var e=Za;return Za<<=1,!(Za&4194240)&&(Za=64),e}function lf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qn(t),e[t]=n}function dx(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Qn(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function u1(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var _e=0;function ry(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var oy,d1,sy,iy,ly,kh=!1,Xa=[],So=null,ko=null,To=null,ql=new Map,Fl=new Map,go=[],fx="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 ng(e,t){switch(e){case"focusin":case"focusout":So=null;break;case"dragenter":case"dragleave":ko=null;break;case"mouseover":case"mouseout":To=null;break;case"pointerover":case"pointerout":ql.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fl.delete(t.pointerId)}}function cl(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=ka(t),t!==null&&d1(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function hx(e,t,n,r,o){switch(t){case"focusin":return So=cl(So,e,t,n,r,o),!0;case"dragenter":return ko=cl(ko,e,t,n,r,o),!0;case"mouseover":return To=cl(To,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return ql.set(s,cl(ql.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Fl.set(s,cl(Fl.get(s)||null,e,t,n,r,o)),!0}return!1}function ay(e){var t=is(e.target);if(t!==null){var n=Is(t);if(n!==null){if(t=n.tag,t===13){if(t=Z2(n),t!==null){e.blockedOn=t,ly(e.priority,function(){sy(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ic(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Th(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yh=r,n.target.dispatchEvent(r),yh=null}else return t=ka(n),t!==null&&d1(t),e.blockedOn=n,!1;t.shift()}return!0}function rg(e,t,n){Ic(e)&&n.delete(t)}function px(){kh=!1,So!==null&&Ic(So)&&(So=null),ko!==null&&Ic(ko)&&(ko=null),To!==null&&Ic(To)&&(To=null),ql.forEach(rg),Fl.forEach(rg)}function ul(e,t){e.blockedOn===t&&(e.blockedOn=null,kh||(kh=!0,mn.unstable_scheduleCallback(mn.unstable_NormalPriority,px)))}function Ul(e){function t(o){return ul(o,e)}if(0<Xa.length){ul(Xa[0],e);for(var n=1;n<Xa.length;n++){var r=Xa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(So!==null&&ul(So,e),ko!==null&&ul(ko,e),To!==null&&ul(To,e),ql.forEach(t),Fl.forEach(t),n=0;n<go.length;n++)r=go[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<go.length&&(n=go[0],n.blockedOn===null);)ay(n),n.blockedOn===null&&go.shift()}var bi=no.ReactCurrentBatchConfig,Gc=!0;function gx(e,t,n,r){var o=_e,s=bi.transition;bi.transition=null;try{_e=1,f1(e,t,n,r)}finally{_e=o,bi.transition=s}}function mx(e,t,n,r){var o=_e,s=bi.transition;bi.transition=null;try{_e=4,f1(e,t,n,r)}finally{_e=o,bi.transition=s}}function f1(e,t,n,r){if(Gc){var o=Th(e,t,n,r);if(o===null)vf(e,t,r,Kc,n),ng(e,r);else if(hx(o,e,t,n,r))r.stopPropagation();else if(ng(e,r),t&4&&-1<fx.indexOf(e)){for(;o!==null;){var s=ka(o);if(s!==null&&oy(s),s=Th(e,t,n,r),s===null&&vf(e,t,r,Kc,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else vf(e,t,r,null,n)}}var Kc=null;function Th(e,t,n,r){if(Kc=null,e=a1(r),e=is(e),e!==null)if(t=Is(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Z2(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kc=e,null}function cy(e){switch(e){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(rx()){case c1:return 1;case ey:return 4;case Vc:case ox:return 16;case ty:return 536870912;default:return 16}default:return 16}}var vo=null,h1=null,Nc=null;function uy(){if(Nc)return Nc;var e,t=h1,n=t.length,r,o="value"in vo?vo.value:vo.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Nc=o.slice(e,1<r?1-r:void 0)}function Ac(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ja(){return!0}function og(){return!1}function wn(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ja:og,this.isPropagationStopped=og,this}return tt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ja)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ja)},persist:function(){},isPersistent:Ja}),t}var $i={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},p1=wn($i),Sa=tt({},$i,{view:0,detail:0}),vx=wn(Sa),af,cf,dl,Mu=tt({},Sa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:g1,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dl&&(dl&&e.type==="mousemove"?(af=e.screenX-dl.screenX,cf=e.screenY-dl.screenY):cf=af=0,dl=e),af)},movementY:function(e){return"movementY"in e?e.movementY:cf}}),sg=wn(Mu),yx=tt({},Mu,{dataTransfer:0}),wx=wn(yx),bx=tt({},Sa,{relatedTarget:0}),uf=wn(bx),xx=tt({},$i,{animationName:0,elapsedTime:0,pseudoElement:0}),Sx=wn(xx),kx=tt({},$i,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tx=wn(kx),Ex=tt({},$i,{data:0}),ig=wn(Ex),Cx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ix={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"},Nx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ax(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nx[e])?!!t[e]:!1}function g1(){return Ax}var jx=tt({},Sa,{key:function(e){if(e.key){var t=Cx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ac(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ix[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:g1,charCode:function(e){return e.type==="keypress"?Ac(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ac(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Rx=wn(jx),Lx=tt({},Mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lg=wn(Lx),_x=tt({},Sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:g1}),Ox=wn(_x),Mx=tt({},$i,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bx=wn(Mx),Px=tt({},Mu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zx=wn(Px),Dx=[9,13,27,32],m1=Gr&&"CompositionEvent"in window,Cl=null;Gr&&"documentMode"in document&&(Cl=document.documentMode);var Hx=Gr&&"TextEvent"in window&&!Cl,dy=Gr&&(!m1||Cl&&8<Cl&&11>=Cl),ag=" ",cg=!1;function fy(e,t){switch(e){case"keyup":return Dx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var si=!1;function $x(e,t){switch(e){case"compositionend":return hy(t);case"keypress":return t.which!==32?null:(cg=!0,ag);case"textInput":return e=t.data,e===ag&&cg?null:e;default:return null}}function qx(e,t){if(si)return e==="compositionend"||!m1&&fy(e,t)?(e=uy(),Nc=h1=vo=null,si=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return dy&&t.locale!=="ko"?null:t.data;default:return null}}var Fx={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 ug(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fx[e.type]:t==="textarea"}function py(e,t,n,r){V2(r),t=Yc(t,"onChange"),0<t.length&&(n=new p1("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Il=null,Vl=null;function Ux(e){Ey(e,0)}function Bu(e){var t=ai(e);if(z2(t))return e}function Vx(e,t){if(e==="change")return t}var gy=!1;if(Gr){var df;if(Gr){var ff="oninput"in document;if(!ff){var dg=document.createElement("div");dg.setAttribute("oninput","return;"),ff=typeof dg.oninput=="function"}df=ff}else df=!1;gy=df&&(!document.documentMode||9<document.documentMode)}function fg(){Il&&(Il.detachEvent("onpropertychange",my),Vl=Il=null)}function my(e){if(e.propertyName==="value"&&Bu(Vl)){var t=[];py(t,Vl,e,a1(e)),Y2(Ux,t)}}function Wx(e,t,n){e==="focusin"?(fg(),Il=t,Vl=n,Il.attachEvent("onpropertychange",my)):e==="focusout"&&fg()}function Gx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bu(Vl)}function Kx(e,t){if(e==="click")return Bu(t)}function Yx(e,t){if(e==="input"||e==="change")return Bu(t)}function Zx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nr=typeof Object.is=="function"?Object.is:Zx;function Wl(e,t){if(nr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!ih.call(t,o)||!nr(e[o],t[o]))return!1}return!0}function hg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pg(e,t){var n=hg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=hg(n)}}function vy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yy(){for(var e=window,t=qc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qc(e.document)}return t}function v1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Qx(e){var t=yy(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&vy(n.ownerDocument.documentElement,n)){if(r!==null&&v1(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=pg(n,s);var i=pg(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Xx=Gr&&"documentMode"in document&&11>=document.documentMode,ii=null,Eh=null,Nl=null,Ch=!1;function gg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ch||ii==null||ii!==qc(r)||(r=ii,"selectionStart"in r&&v1(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nl&&Wl(Nl,r)||(Nl=r,r=Yc(Eh,"onSelect"),0<r.length&&(t=new p1("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ii)))}function ec(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var li={animationend:ec("Animation","AnimationEnd"),animationiteration:ec("Animation","AnimationIteration"),animationstart:ec("Animation","AnimationStart"),transitionend:ec("Transition","TransitionEnd")},hf={},wy={};Gr&&(wy=document.createElement("div").style,"AnimationEvent"in window||(delete li.animationend.animation,delete li.animationiteration.animation,delete li.animationstart.animation),"TransitionEvent"in window||delete li.transitionend.transition);function Pu(e){if(hf[e])return hf[e];if(!li[e])return e;var t=li[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wy)return hf[e]=t[n];return e}var by=Pu("animationend"),xy=Pu("animationiteration"),Sy=Pu("animationstart"),ky=Pu("transitionend"),Ty=new Map,mg="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 Po(e,t){Ty.set(e,t),Cs(t,[e])}for(var pf=0;pf<mg.length;pf++){var gf=mg[pf],Jx=gf.toLowerCase(),e8=gf[0].toUpperCase()+gf.slice(1);Po(Jx,"on"+e8)}Po(by,"onAnimationEnd");Po(xy,"onAnimationIteration");Po(Sy,"onAnimationStart");Po("dblclick","onDoubleClick");Po("focusin","onFocus");Po("focusout","onBlur");Po(ky,"onTransitionEnd");Ii("onMouseEnter",["mouseout","mouseover"]);Ii("onMouseLeave",["mouseout","mouseover"]);Ii("onPointerEnter",["pointerout","pointerover"]);Ii("onPointerLeave",["pointerout","pointerover"]);Cs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Cs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Cs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Cs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Cs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Cs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="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(" "),t8=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sl));function vg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,J3(r,t,void 0,e),e.currentTarget=null}function Ey(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],a=l.instance,c=l.currentTarget;if(l=l.listener,a!==s&&o.isPropagationStopped())break e;vg(o,l,c),s=a}else for(i=0;i<r.length;i++){if(l=r[i],a=l.instance,c=l.currentTarget,l=l.listener,a!==s&&o.isPropagationStopped())break e;vg(o,l,c),s=a}}}if(Uc)throw e=xh,Uc=!1,xh=null,e}function He(e,t){var n=t[Rh];n===void 0&&(n=t[Rh]=new Set);var r=e+"__bubble";n.has(r)||(Cy(t,e,2,!1),n.add(r))}function mf(e,t,n){var r=0;t&&(r|=4),Cy(n,e,r,t)}var tc="_reactListening"+Math.random().toString(36).slice(2);function Gl(e){if(!e[tc]){e[tc]=!0,_2.forEach(function(n){n!=="selectionchange"&&(t8.has(n)||mf(n,!1,e),mf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[tc]||(t[tc]=!0,mf("selectionchange",!1,t))}}function Cy(e,t,n,r){switch(cy(t)){case 1:var o=gx;break;case 4:o=mx;break;default:o=f1}n=o.bind(null,t,n,e),o=void 0,!bh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function vf(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var a=i.tag;if((a===3||a===4)&&(a=i.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;i=i.return}for(;l!==null;){if(i=is(l),i===null)return;if(a=i.tag,a===5||a===6){r=s=i;continue e}l=l.parentNode}}r=r.return}Y2(function(){var c=s,u=a1(n),d=[];e:{var h=Ty.get(e);if(h!==void 0){var p=p1,g=e;switch(e){case"keypress":if(Ac(n)===0)break e;case"keydown":case"keyup":p=Rx;break;case"focusin":g="focus",p=uf;break;case"focusout":g="blur",p=uf;break;case"beforeblur":case"afterblur":p=uf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=sg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=wx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Ox;break;case by:case xy:case Sy:p=Sx;break;case ky:p=Bx;break;case"scroll":p=vx;break;case"wheel":p=zx;break;case"copy":case"cut":case"paste":p=Tx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=lg}var v=(t&4)!==0,x=!v&&e==="scroll",m=v?h!==null?h+"Capture":null:h;v=[];for(var y=c,w;y!==null;){w=y;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,m!==null&&(S=$l(y,m),S!=null&&v.push(Kl(y,S,w)))),x)break;y=y.return}0<v.length&&(h=new p(h,g,null,n,u),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==yh&&(g=n.relatedTarget||n.fromElement)&&(is(g)||g[Kr]))break e;if((p||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?is(g):null,g!==null&&(x=Is(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(v=sg,S="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=lg,S="onPointerLeave",m="onPointerEnter",y="pointer"),x=p==null?h:ai(p),w=g==null?h:ai(g),h=new v(S,y+"leave",p,n,u),h.target=x,h.relatedTarget=w,S=null,is(u)===c&&(v=new v(m,y+"enter",g,n,u),v.target=w,v.relatedTarget=x,S=v),x=S,p&&g)t:{for(v=p,m=g,y=0,w=v;w;w=Us(w))y++;for(w=0,S=m;S;S=Us(S))w++;for(;0<y-w;)v=Us(v),y--;for(;0<w-y;)m=Us(m),w--;for(;y--;){if(v===m||m!==null&&v===m.alternate)break t;v=Us(v),m=Us(m)}v=null}else v=null;p!==null&&yg(d,h,p,v,!1),g!==null&&x!==null&&yg(d,x,g,v,!0)}}e:{if(h=c?ai(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var k=Vx;else if(ug(h))if(gy)k=Yx;else{k=Gx;var T=Wx}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=Kx);if(k&&(k=k(e,c))){py(d,k,n,u);break e}T&&T(e,h,c),e==="focusout"&&(T=h._wrapperState)&&T.controlled&&h.type==="number"&&hh(h,"number",h.value)}switch(T=c?ai(c):window,e){case"focusin":(ug(T)||T.contentEditable==="true")&&(ii=T,Eh=c,Nl=null);break;case"focusout":Nl=Eh=ii=null;break;case"mousedown":Ch=!0;break;case"contextmenu":case"mouseup":case"dragend":Ch=!1,gg(d,n,u);break;case"selectionchange":if(Xx)break;case"keydown":case"keyup":gg(d,n,u)}var C;if(m1)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else si?fy(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(dy&&n.locale!=="ko"&&(si||I!=="onCompositionStart"?I==="onCompositionEnd"&&si&&(C=uy()):(vo=u,h1="value"in vo?vo.value:vo.textContent,si=!0)),T=Yc(c,I),0<T.length&&(I=new ig(I,e,null,n,u),d.push({event:I,listeners:T}),C?I.data=C:(C=hy(n),C!==null&&(I.data=C)))),(C=Hx?$x(e,n):qx(e,n))&&(c=Yc(c,"onBeforeInput"),0<c.length&&(u=new ig("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=C))}Ey(d,t)})}function Kl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yc(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=$l(e,n),s!=null&&r.unshift(Kl(e,s,o)),s=$l(e,t),s!=null&&r.push(Kl(e,s,o))),e=e.return}return r}function Us(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function yg(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var l=n,a=l.alternate,c=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&c!==null&&(l=c,o?(a=$l(n,s),a!=null&&i.unshift(Kl(n,a,l))):o||(a=$l(n,s),a!=null&&i.push(Kl(n,a,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var n8=/\r\n?/g,r8=/\u0000|\uFFFD/g;function wg(e){return(typeof e=="string"?e:""+e).replace(n8,`
`).replace(r8,"")}function nc(e,t,n){if(t=wg(t),wg(e)!==t&&n)throw Error(z(425))}function Zc(){}var Ih=null,Nh=null;function Ah(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var jh=typeof setTimeout=="function"?setTimeout:void 0,o8=typeof clearTimeout=="function"?clearTimeout:void 0,bg=typeof Promise=="function"?Promise:void 0,s8=typeof queueMicrotask=="function"?queueMicrotask:typeof bg<"u"?function(e){return bg.resolve(null).then(e).catch(i8)}:jh;function i8(e){setTimeout(function(){throw e})}function yf(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Ul(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ul(t)}function Eo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function xg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qi=Math.random().toString(36).slice(2),hr="__reactFiber$"+qi,Yl="__reactProps$"+qi,Kr="__reactContainer$"+qi,Rh="__reactEvents$"+qi,l8="__reactListeners$"+qi,a8="__reactHandles$"+qi;function is(e){var t=e[hr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Kr]||n[hr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xg(e);e!==null;){if(n=e[hr])return n;e=xg(e)}return t}e=n,n=e.parentNode}return null}function ka(e){return e=e[hr]||e[Kr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ai(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(z(33))}function zu(e){return e[Yl]||null}var Lh=[],ci=-1;function zo(e){return{current:e}}function Fe(e){0>ci||(e.current=Lh[ci],Lh[ci]=null,ci--)}function De(e,t){ci++,Lh[ci]=e.current,e.current=t}var _o={},zt=zo(_o),tn=zo(!1),hs=_o;function Ni(e,t){var n=e.type.contextTypes;if(!n)return _o;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function nn(e){return e=e.childContextTypes,e!=null}function Qc(){Fe(tn),Fe(zt)}function Sg(e,t,n){if(zt.current!==_o)throw Error(z(168));De(zt,t),De(tn,n)}function Iy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(z(108,W3(e)||"Unknown",o));return tt({},n,r)}function Xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_o,hs=zt.current,De(zt,e),De(tn,tn.current),!0}function kg(e,t,n){var r=e.stateNode;if(!r)throw Error(z(169));n?(e=Iy(e,t,hs),r.__reactInternalMemoizedMergedChildContext=e,Fe(tn),Fe(zt),De(zt,e)):Fe(tn),De(tn,n)}var zr=null,Du=!1,wf=!1;function Ny(e){zr===null?zr=[e]:zr.push(e)}function c8(e){Du=!0,Ny(e)}function Do(){if(!wf&&zr!==null){wf=!0;var e=0,t=_e;try{var n=zr;for(_e=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zr=null,Du=!1}catch(o){throw zr!==null&&(zr=zr.slice(e+1)),J2(c1,Do),o}finally{_e=t,wf=!1}}return null}var ui=[],di=0,Jc=null,eu=0,kn=[],Tn=0,ps=null,Hr=1,$r="";function ts(e,t){ui[di++]=eu,ui[di++]=Jc,Jc=e,eu=t}function Ay(e,t,n){kn[Tn++]=Hr,kn[Tn++]=$r,kn[Tn++]=ps,ps=e;var r=Hr;e=$r;var o=32-Qn(r)-1;r&=~(1<<o),n+=1;var s=32-Qn(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Hr=1<<32-Qn(t)+o|n<<o|r,$r=s+e}else Hr=1<<s|n<<o|r,$r=e}function y1(e){e.return!==null&&(ts(e,1),Ay(e,1,0))}function w1(e){for(;e===Jc;)Jc=ui[--di],ui[di]=null,eu=ui[--di],ui[di]=null;for(;e===ps;)ps=kn[--Tn],kn[Tn]=null,$r=kn[--Tn],kn[Tn]=null,Hr=kn[--Tn],kn[Tn]=null}var fn=null,un=null,Ye=!1,Wn=null;function jy(e,t){var n=In(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Tg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,fn=e,un=Eo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,fn=e,un=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ps!==null?{id:Hr,overflow:$r}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=In(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,fn=e,un=null,!0):!1;default:return!1}}function _h(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Oh(e){if(Ye){var t=un;if(t){var n=t;if(!Tg(e,t)){if(_h(e))throw Error(z(418));t=Eo(n.nextSibling);var r=fn;t&&Tg(e,t)?jy(r,n):(e.flags=e.flags&-4097|2,Ye=!1,fn=e)}}else{if(_h(e))throw Error(z(418));e.flags=e.flags&-4097|2,Ye=!1,fn=e}}}function Eg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;fn=e}function rc(e){if(e!==fn)return!1;if(!Ye)return Eg(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ah(e.type,e.memoizedProps)),t&&(t=un)){if(_h(e))throw Ry(),Error(z(418));for(;t;)jy(e,t),t=Eo(t.nextSibling)}if(Eg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){un=Eo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}un=null}}else un=fn?Eo(e.stateNode.nextSibling):null;return!0}function Ry(){for(var e=un;e;)e=Eo(e.nextSibling)}function Ai(){un=fn=null,Ye=!1}function b1(e){Wn===null?Wn=[e]:Wn.push(e)}var u8=no.ReactCurrentBatchConfig;function fl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(z(309));var r=n.stateNode}if(!r)throw Error(z(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var l=o.refs;i===null?delete l[s]:l[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(z(284));if(!n._owner)throw Error(z(290,e))}return e}function oc(e,t){throw e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cg(e){var t=e._init;return t(e._payload)}function Ly(e){function t(m,y){if(e){var w=m.deletions;w===null?(m.deletions=[y],m.flags|=16):w.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function r(m,y){for(m=new Map;y!==null;)y.key!==null?m.set(y.key,y):m.set(y.index,y),y=y.sibling;return m}function o(m,y){return m=Ao(m,y),m.index=0,m.sibling=null,m}function s(m,y,w){return m.index=w,e?(w=m.alternate,w!==null?(w=w.index,w<y?(m.flags|=2,y):w):(m.flags|=2,y)):(m.flags|=1048576,y)}function i(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,y,w,S){return y===null||y.tag!==6?(y=Cf(w,m.mode,S),y.return=m,y):(y=o(y,w),y.return=m,y)}function a(m,y,w,S){var k=w.type;return k===oi?u(m,y,w.props.children,S,w.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ho&&Cg(k)===y.type)?(S=o(y,w.props),S.ref=fl(m,y,w),S.return=m,S):(S=Bc(w.type,w.key,w.props,null,m.mode,S),S.ref=fl(m,y,w),S.return=m,S)}function c(m,y,w,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=If(w,m.mode,S),y.return=m,y):(y=o(y,w.children||[]),y.return=m,y)}function u(m,y,w,S,k){return y===null||y.tag!==7?(y=ds(w,m.mode,S,k),y.return=m,y):(y=o(y,w),y.return=m,y)}function d(m,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Cf(""+y,m.mode,w),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ga:return w=Bc(y.type,y.key,y.props,null,m.mode,w),w.ref=fl(m,null,y),w.return=m,w;case ri:return y=If(y,m.mode,w),y.return=m,y;case ho:var S=y._init;return d(m,S(y._payload),w)}if(bl(y)||ll(y))return y=ds(y,m.mode,w,null),y.return=m,y;oc(m,y)}return null}function h(m,y,w,S){var k=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:l(m,y,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ga:return w.key===k?a(m,y,w,S):null;case ri:return w.key===k?c(m,y,w,S):null;case ho:return k=w._init,h(m,y,k(w._payload),S)}if(bl(w)||ll(w))return k!==null?null:u(m,y,w,S,null);oc(m,w)}return null}function p(m,y,w,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(w)||null,l(y,m,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ga:return m=m.get(S.key===null?w:S.key)||null,a(y,m,S,k);case ri:return m=m.get(S.key===null?w:S.key)||null,c(y,m,S,k);case ho:var T=S._init;return p(m,y,w,T(S._payload),k)}if(bl(S)||ll(S))return m=m.get(w)||null,u(y,m,S,k,null);oc(y,S)}return null}function g(m,y,w,S){for(var k=null,T=null,C=y,I=y=0,j=null;C!==null&&I<w.length;I++){C.index>I?(j=C,C=null):j=C.sibling;var R=h(m,C,w[I],S);if(R===null){C===null&&(C=j);break}e&&C&&R.alternate===null&&t(m,C),y=s(R,y,I),T===null?k=R:T.sibling=R,T=R,C=j}if(I===w.length)return n(m,C),Ye&&ts(m,I),k;if(C===null){for(;I<w.length;I++)C=d(m,w[I],S),C!==null&&(y=s(C,y,I),T===null?k=C:T.sibling=C,T=C);return Ye&&ts(m,I),k}for(C=r(m,C);I<w.length;I++)j=p(C,m,I,w[I],S),j!==null&&(e&&j.alternate!==null&&C.delete(j.key===null?I:j.key),y=s(j,y,I),T===null?k=j:T.sibling=j,T=j);return e&&C.forEach(function(M){return t(m,M)}),Ye&&ts(m,I),k}function v(m,y,w,S){var k=ll(w);if(typeof k!="function")throw Error(z(150));if(w=k.call(w),w==null)throw Error(z(151));for(var T=k=null,C=y,I=y=0,j=null,R=w.next();C!==null&&!R.done;I++,R=w.next()){C.index>I?(j=C,C=null):j=C.sibling;var M=h(m,C,R.value,S);if(M===null){C===null&&(C=j);break}e&&C&&M.alternate===null&&t(m,C),y=s(M,y,I),T===null?k=M:T.sibling=M,T=M,C=j}if(R.done)return n(m,C),Ye&&ts(m,I),k;if(C===null){for(;!R.done;I++,R=w.next())R=d(m,R.value,S),R!==null&&(y=s(R,y,I),T===null?k=R:T.sibling=R,T=R);return Ye&&ts(m,I),k}for(C=r(m,C);!R.done;I++,R=w.next())R=p(C,m,I,R.value,S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?I:R.key),y=s(R,y,I),T===null?k=R:T.sibling=R,T=R);return e&&C.forEach(function(_){return t(m,_)}),Ye&&ts(m,I),k}function x(m,y,w,S){if(typeof w=="object"&&w!==null&&w.type===oi&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ga:e:{for(var k=w.key,T=y;T!==null;){if(T.key===k){if(k=w.type,k===oi){if(T.tag===7){n(m,T.sibling),y=o(T,w.props.children),y.return=m,m=y;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ho&&Cg(k)===T.type){n(m,T.sibling),y=o(T,w.props),y.ref=fl(m,T,w),y.return=m,m=y;break e}n(m,T);break}else t(m,T);T=T.sibling}w.type===oi?(y=ds(w.props.children,m.mode,S,w.key),y.return=m,m=y):(S=Bc(w.type,w.key,w.props,null,m.mode,S),S.ref=fl(m,y,w),S.return=m,m=S)}return i(m);case ri:e:{for(T=w.key;y!==null;){if(y.key===T)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(m,y.sibling),y=o(y,w.children||[]),y.return=m,m=y;break e}else{n(m,y);break}else t(m,y);y=y.sibling}y=If(w,m.mode,S),y.return=m,m=y}return i(m);case ho:return T=w._init,x(m,y,T(w._payload),S)}if(bl(w))return g(m,y,w,S);if(ll(w))return v(m,y,w,S);oc(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(m,y.sibling),y=o(y,w),y.return=m,m=y):(n(m,y),y=Cf(w,m.mode,S),y.return=m,m=y),i(m)):n(m,y)}return x}var ji=Ly(!0),_y=Ly(!1),tu=zo(null),nu=null,fi=null,x1=null;function S1(){x1=fi=nu=null}function k1(e){var t=tu.current;Fe(tu),e._currentValue=t}function Mh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xi(e,t){nu=e,x1=fi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(en=!0),e.firstContext=null)}function Ln(e){var t=e._currentValue;if(x1!==e)if(e={context:e,memoizedValue:t,next:null},fi===null){if(nu===null)throw Error(z(308));fi=e,nu.dependencies={lanes:0,firstContext:e}}else fi=fi.next=e;return t}var ls=null;function T1(e){ls===null?ls=[e]:ls.push(e)}function Oy(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,T1(t)):(n.next=o.next,o.next=n),t.interleaved=n,Yr(e,r)}function Yr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var po=!1;function E1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function My(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ur(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Co(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Te&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Yr(e,n)}return o=r.interleaved,o===null?(t.next=t,T1(r)):(t.next=o.next,o.next=t),r.interleaved=t,Yr(e,n)}function jc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,u1(e,n)}}function Ig(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ru(e,t,n,r){var o=e.updateQueue;po=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,c=a.next;a.next=null,i===null?s=c:i.next=c,i=a;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==i&&(l===null?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=a))}if(s!==null){var d=o.baseState;i=0,u=c=a=null,l=s;do{var h=l.lane,p=l.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,v=l;switch(h=t,p=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(p,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,h=typeof g=="function"?g.call(p,d,h):g,h==null)break e;d=tt({},d,h);break e;case 2:po=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(c=u=p,a=d):u=u.next=p,i|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(u===null&&(a=d),o.baseState=a,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);ms|=i,e.lanes=i,e.memoizedState=d}}function Ng(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(z(191,o));o.call(r)}}}var Ta={},vr=zo(Ta),Zl=zo(Ta),Ql=zo(Ta);function as(e){if(e===Ta)throw Error(z(174));return e}function C1(e,t){switch(De(Ql,t),De(Zl,e),De(vr,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gh(t,e)}Fe(vr),De(vr,t)}function Ri(){Fe(vr),Fe(Zl),Fe(Ql)}function By(e){as(Ql.current);var t=as(vr.current),n=gh(t,e.type);t!==n&&(De(Zl,e),De(vr,n))}function I1(e){Zl.current===e&&(Fe(vr),Fe(Zl))}var Qe=zo(0);function ou(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bf=[];function N1(){for(var e=0;e<bf.length;e++)bf[e]._workInProgressVersionPrimary=null;bf.length=0}var Rc=no.ReactCurrentDispatcher,xf=no.ReactCurrentBatchConfig,gs=0,Je=null,dt=null,mt=null,su=!1,Al=!1,Xl=0,d8=0;function Rt(){throw Error(z(321))}function A1(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!nr(e[n],t[n]))return!1;return!0}function j1(e,t,n,r,o,s){if(gs=s,Je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Rc.current=e===null||e.memoizedState===null?g8:m8,e=n(r,o),Al){s=0;do{if(Al=!1,Xl=0,25<=s)throw Error(z(301));s+=1,mt=dt=null,t.updateQueue=null,Rc.current=v8,e=n(r,o)}while(Al)}if(Rc.current=iu,t=dt!==null&&dt.next!==null,gs=0,mt=dt=Je=null,su=!1,t)throw Error(z(300));return e}function R1(){var e=Xl!==0;return Xl=0,e}function ur(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Je.memoizedState=mt=e:mt=mt.next=e,mt}function _n(){if(dt===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var t=mt===null?Je.memoizedState:mt.next;if(t!==null)mt=t,dt=e;else{if(e===null)throw Error(z(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},mt===null?Je.memoizedState=mt=e:mt=mt.next=e}return mt}function Jl(e,t){return typeof t=="function"?t(e):t}function Sf(e){var t=_n(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=dt,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var l=i=null,a=null,c=s;do{var u=c.lane;if((gs&u)===u)a!==null&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(l=a=d,i=r):a=a.next=d,Je.lanes|=u,ms|=u}c=c.next}while(c!==null&&c!==s);a===null?i=r:a.next=l,nr(r,t.memoizedState)||(en=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Je.lanes|=s,ms|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function kf(e){var t=_n(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);nr(s,t.memoizedState)||(en=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Py(){}function zy(e,t){var n=Je,r=_n(),o=t(),s=!nr(r.memoizedState,o);if(s&&(r.memoizedState=o,en=!0),r=r.queue,L1($y.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||mt!==null&&mt.memoizedState.tag&1){if(n.flags|=2048,ea(9,Hy.bind(null,n,r,o,t),void 0,null),vt===null)throw Error(z(349));gs&30||Dy(n,t,o)}return o}function Dy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Je.updateQueue,t===null?(t={lastEffect:null,stores:null},Je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Hy(e,t,n,r){t.value=n,t.getSnapshot=r,qy(t)&&Fy(e)}function $y(e,t,n){return n(function(){qy(t)&&Fy(e)})}function qy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nr(e,n)}catch{return!0}}function Fy(e){var t=Yr(e,1);t!==null&&Xn(t,e,1,-1)}function Ag(e){var t=ur();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:e},t.queue=e,e=e.dispatch=p8.bind(null,Je,e),[t.memoizedState,e]}function ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Je.updateQueue,t===null?(t={lastEffect:null,stores:null},Je.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Uy(){return _n().memoizedState}function Lc(e,t,n,r){var o=ur();Je.flags|=e,o.memoizedState=ea(1|t,n,void 0,r===void 0?null:r)}function Hu(e,t,n,r){var o=_n();r=r===void 0?null:r;var s=void 0;if(dt!==null){var i=dt.memoizedState;if(s=i.destroy,r!==null&&A1(r,i.deps)){o.memoizedState=ea(t,n,s,r);return}}Je.flags|=e,o.memoizedState=ea(1|t,n,s,r)}function jg(e,t){return Lc(8390656,8,e,t)}function L1(e,t){return Hu(2048,8,e,t)}function Vy(e,t){return Hu(4,2,e,t)}function Wy(e,t){return Hu(4,4,e,t)}function Gy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ky(e,t,n){return n=n!=null?n.concat([e]):null,Hu(4,4,Gy.bind(null,t,e),n)}function _1(){}function Yy(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&A1(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zy(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&A1(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qy(e,t,n){return gs&21?(nr(n,t)||(n=ny(),Je.lanes|=n,ms|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,en=!0),e.memoizedState=n)}function f8(e,t){var n=_e;_e=n!==0&&4>n?n:4,e(!0);var r=xf.transition;xf.transition={};try{e(!1),t()}finally{_e=n,xf.transition=r}}function Xy(){return _n().memoizedState}function h8(e,t,n){var r=No(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Jy(e))ew(t,n);else if(n=Oy(e,t,n,r),n!==null){var o=Ft();Xn(n,e,r,o),tw(n,t,r)}}function p8(e,t,n){var r=No(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jy(e))ew(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,l=s(i,n);if(o.hasEagerState=!0,o.eagerState=l,nr(l,i)){var a=t.interleaved;a===null?(o.next=o,T1(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=Oy(e,t,o,r),n!==null&&(o=Ft(),Xn(n,e,r,o),tw(n,t,r))}}function Jy(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function ew(e,t){Al=su=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,u1(e,n)}}var iu={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},g8={readContext:Ln,useCallback:function(e,t){return ur().memoizedState=[e,t===void 0?null:t],e},useContext:Ln,useEffect:jg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Lc(4194308,4,Gy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Lc(4,2,e,t)},useMemo:function(e,t){var n=ur();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ur();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=h8.bind(null,Je,e),[r.memoizedState,e]},useRef:function(e){var t=ur();return e={current:e},t.memoizedState=e},useState:Ag,useDebugValue:_1,useDeferredValue:function(e){return ur().memoizedState=e},useTransition:function(){var e=Ag(!1),t=e[0];return e=f8.bind(null,e[1]),ur().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Je,o=ur();if(Ye){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),vt===null)throw Error(z(349));gs&30||Dy(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,jg($y.bind(null,r,s,e),[e]),r.flags|=2048,ea(9,Hy.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ur(),t=vt.identifierPrefix;if(Ye){var n=$r,r=Hr;n=(r&~(1<<32-Qn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=d8++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},m8={readContext:Ln,useCallback:Yy,useContext:Ln,useEffect:L1,useImperativeHandle:Ky,useInsertionEffect:Vy,useLayoutEffect:Wy,useMemo:Zy,useReducer:Sf,useRef:Uy,useState:function(){return Sf(Jl)},useDebugValue:_1,useDeferredValue:function(e){var t=_n();return Qy(t,dt.memoizedState,e)},useTransition:function(){var e=Sf(Jl)[0],t=_n().memoizedState;return[e,t]},useMutableSource:Py,useSyncExternalStore:zy,useId:Xy,unstable_isNewReconciler:!1},v8={readContext:Ln,useCallback:Yy,useContext:Ln,useEffect:L1,useImperativeHandle:Ky,useInsertionEffect:Vy,useLayoutEffect:Wy,useMemo:Zy,useReducer:kf,useRef:Uy,useState:function(){return kf(Jl)},useDebugValue:_1,useDeferredValue:function(e){var t=_n();return dt===null?t.memoizedState=e:Qy(t,dt.memoizedState,e)},useTransition:function(){var e=kf(Jl)[0],t=_n().memoizedState;return[e,t]},useMutableSource:Py,useSyncExternalStore:zy,useId:Xy,unstable_isNewReconciler:!1};function Un(e,t){if(e&&e.defaultProps){t=tt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:tt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $u={isMounted:function(e){return(e=e._reactInternals)?Is(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ft(),o=No(e),s=Ur(r,o);s.payload=t,n!=null&&(s.callback=n),t=Co(e,s,o),t!==null&&(Xn(t,e,o,r),jc(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ft(),o=No(e),s=Ur(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Co(e,s,o),t!==null&&(Xn(t,e,o,r),jc(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ft(),r=No(e),o=Ur(n,r);o.tag=2,t!=null&&(o.callback=t),t=Co(e,o,r),t!==null&&(Xn(t,e,r,n),jc(t,e,r))}};function Rg(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Wl(n,r)||!Wl(o,s):!0}function nw(e,t,n){var r=!1,o=_o,s=t.contextType;return typeof s=="object"&&s!==null?s=Ln(s):(o=nn(t)?hs:zt.current,r=t.contextTypes,s=(r=r!=null)?Ni(e,o):_o),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$u,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function Lg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$u.enqueueReplaceState(t,t.state,null)}function Ph(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},E1(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Ln(s):(s=nn(t)?hs:zt.current,o.context=Ni(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Bh(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&$u.enqueueReplaceState(o,o.state,null),ru(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Li(e,t){try{var n="",r=t;do n+=V3(r),r=r.return;while(r);var o=n}catch(s){o=`
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function Tf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function zh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var y8=typeof WeakMap=="function"?WeakMap:Map;function rw(e,t,n){n=Ur(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){au||(au=!0,Kh=r),zh(e,t)},n}function ow(e,t,n){n=Ur(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){zh(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){zh(e,t),typeof r!="function"&&(Io===null?Io=new Set([this]):Io.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function _g(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new y8;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=L8.bind(null,e,t,n),t.then(e,e))}function Og(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Mg(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ur(-1,1),t.tag=2,Co(n,t,1))),n.lanes|=1),e)}var w8=no.ReactCurrentOwner,en=!1;function $t(e,t,n,r){t.child=e===null?_y(t,null,n,r):ji(t,e.child,n,r)}function Bg(e,t,n,r,o){n=n.render;var s=t.ref;return xi(t,o),r=j1(e,t,n,r,s,o),n=R1(),e!==null&&!en?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Zr(e,t,o)):(Ye&&n&&y1(t),t.flags|=1,$t(e,t,r,o),t.child)}function Pg(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!$1(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,sw(e,t,s,r,o)):(e=Bc(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Wl,n(i,r)&&e.ref===t.ref)return Zr(e,t,o)}return t.flags|=1,e=Ao(s,r),e.ref=t.ref,e.return=t,t.child=e}function sw(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Wl(s,r)&&e.ref===t.ref)if(en=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(en=!0);else return t.lanes=e.lanes,Zr(e,t,o)}return Dh(e,t,n,r,o)}function iw(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(pi,sn),sn|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(pi,sn),sn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,De(pi,sn),sn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,De(pi,sn),sn|=r;return $t(e,t,o,n),t.child}function lw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Dh(e,t,n,r,o){var s=nn(n)?hs:zt.current;return s=Ni(t,s),xi(t,o),n=j1(e,t,n,r,s,o),r=R1(),e!==null&&!en?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Zr(e,t,o)):(Ye&&r&&y1(t),t.flags|=1,$t(e,t,n,o),t.child)}function zg(e,t,n,r,o){if(nn(n)){var s=!0;Xc(t)}else s=!1;if(xi(t,o),t.stateNode===null)_c(e,t),nw(t,n,r),Ph(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var a=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ln(c):(c=nn(n)?hs:zt.current,c=Ni(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||a!==c)&&Lg(t,i,r,c),po=!1;var h=t.memoizedState;i.state=h,ru(t,r,i,o),a=t.memoizedState,l!==r||h!==a||tn.current||po?(typeof u=="function"&&(Bh(t,n,u,r),a=t.memoizedState),(l=po||Rg(t,n,l,r,h,a,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),i.props=r,i.state=a,i.context=c,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,My(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:Un(t.type,l),i.props=c,d=t.pendingProps,h=i.context,a=n.contextType,typeof a=="object"&&a!==null?a=Ln(a):(a=nn(n)?hs:zt.current,a=Ni(t,a));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==d||h!==a)&&Lg(t,i,r,a),po=!1,h=t.memoizedState,i.state=h,ru(t,r,i,o);var g=t.memoizedState;l!==d||h!==g||tn.current||po?(typeof p=="function"&&(Bh(t,n,p,r),g=t.memoizedState),(c=po||Rg(t,n,c,r,h,g,a)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,g,a),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,g,a)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),i.props=r,i.state=g,i.context=a,r=c):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Hh(e,t,n,r,s,o)}function Hh(e,t,n,r,o,s){lw(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&kg(t,n,!1),Zr(e,t,s);r=t.stateNode,w8.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=ji(t,e.child,null,s),t.child=ji(t,null,l,s)):$t(e,t,l,s),t.memoizedState=r.state,o&&kg(t,n,!0),t.child}function aw(e){var t=e.stateNode;t.pendingContext?Sg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Sg(e,t.context,!1),C1(e,t.containerInfo)}function Dg(e,t,n,r,o){return Ai(),b1(o),t.flags|=256,$t(e,t,n,r),t.child}var $h={dehydrated:null,treeContext:null,retryLane:0};function qh(e){return{baseLanes:e,cachePool:null,transitions:null}}function cw(e,t,n){var r=t.pendingProps,o=Qe.current,s=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),De(Qe,o&1),e===null)return Oh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Uu(i,r,0,null),e=ds(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=qh(n),t.memoizedState=$h,e):O1(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return b8(e,t,i,r,l,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Ao(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?s=Ao(l,s):(s=ds(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?qh(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=$h,r}return s=e.child,e=s.sibling,r=Ao(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function O1(e,t){return t=Uu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function sc(e,t,n,r){return r!==null&&b1(r),ji(t,e.child,null,n),e=O1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function b8(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Tf(Error(z(422))),sc(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Uu({mode:"visible",children:r.children},o,0,null),s=ds(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&ji(t,e.child,null,i),t.child.memoizedState=qh(i),t.memoizedState=$h,s);if(!(t.mode&1))return sc(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(z(419)),r=Tf(s,r,void 0),sc(e,t,i,r)}if(l=(i&e.childLanes)!==0,en||l){if(r=vt,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,Yr(e,o),Xn(r,e,o,-1))}return H1(),r=Tf(Error(z(421))),sc(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=_8.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,un=Eo(o.nextSibling),fn=t,Ye=!0,Wn=null,e!==null&&(kn[Tn++]=Hr,kn[Tn++]=$r,kn[Tn++]=ps,Hr=e.id,$r=e.overflow,ps=t),t=O1(t,r.children),t.flags|=4096,t)}function Hg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Mh(e.return,t,n)}function Ef(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function uw(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if($t(e,t,r.children,n),r=Qe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hg(e,n,t);else if(e.tag===19)Hg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(Qe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ou(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ef(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ou(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ef(t,!0,n,null,s);break;case"together":Ef(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _c(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Zr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ms|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){for(e=t.child,n=Ao(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ao(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function x8(e,t,n){switch(t.tag){case 3:aw(t),Ai();break;case 5:By(t);break;case 1:nn(t.type)&&Xc(t);break;case 4:C1(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;De(tu,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(Qe,Qe.current&1),t.flags|=128,null):n&t.child.childLanes?cw(e,t,n):(De(Qe,Qe.current&1),e=Zr(e,t,n),e!==null?e.sibling:null);De(Qe,Qe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return uw(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),De(Qe,Qe.current),r)break;return null;case 22:case 23:return t.lanes=0,iw(e,t,n)}return Zr(e,t,n)}var dw,Fh,fw,hw;dw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fh=function(){};fw=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,as(vr.current);var s=null;switch(n){case"input":o=dh(e,o),r=dh(e,r),s=[];break;case"select":o=tt({},o,{value:void 0}),r=tt({},r,{value:void 0}),s=[];break;case"textarea":o=ph(e,o),r=ph(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zc)}mh(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var l=o[c];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Dl.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var a=r[c];if(l=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&a!==l&&(a!=null||l!=null))if(c==="style")if(l){for(i in l)!l.hasOwnProperty(i)||a&&a.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in a)a.hasOwnProperty(i)&&l[i]!==a[i]&&(n||(n={}),n[i]=a[i])}else n||(s||(s=[]),s.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Dl.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&He("scroll",e),s||l===a||(s=[])):(s=s||[]).push(c,a))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};hw=function(e,t,n,r){n!==r&&(t.flags|=4)};function hl(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function S8(e,t,n){var r=t.pendingProps;switch(w1(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(t),null;case 1:return nn(t.type)&&Qc(),Lt(t),null;case 3:return r=t.stateNode,Ri(),Fe(tn),Fe(zt),N1(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(rc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wn!==null&&(Qh(Wn),Wn=null))),Fh(e,t),Lt(t),null;case 5:I1(t);var o=as(Ql.current);if(n=t.type,e!==null&&t.stateNode!=null)fw(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(z(166));return Lt(t),null}if(e=as(vr.current),rc(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[hr]=t,r[Yl]=s,e=(t.mode&1)!==0,n){case"dialog":He("cancel",r),He("close",r);break;case"iframe":case"object":case"embed":He("load",r);break;case"video":case"audio":for(o=0;o<Sl.length;o++)He(Sl[o],r);break;case"source":He("error",r);break;case"img":case"image":case"link":He("error",r),He("load",r);break;case"details":He("toggle",r);break;case"input":Y0(r,s),He("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},He("invalid",r);break;case"textarea":Q0(r,s),He("invalid",r)}mh(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&nc(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&nc(r.textContent,l,e),o=["children",""+l]):Dl.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&He("scroll",r)}switch(n){case"input":Ka(r),Z0(r,s,!0);break;case"textarea":Ka(r),X0(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Zc)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$2(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[hr]=t,e[Yl]=r,dw(e,t,!1,!1),t.stateNode=e;e:{switch(i=vh(n,r),n){case"dialog":He("cancel",e),He("close",e),o=r;break;case"iframe":case"object":case"embed":He("load",e),o=r;break;case"video":case"audio":for(o=0;o<Sl.length;o++)He(Sl[o],e);o=r;break;case"source":He("error",e),o=r;break;case"img":case"image":case"link":He("error",e),He("load",e),o=r;break;case"details":He("toggle",e),o=r;break;case"input":Y0(e,r),o=dh(e,r),He("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=tt({},r,{value:void 0}),He("invalid",e);break;case"textarea":Q0(e,r),o=ph(e,r),He("invalid",e);break;default:o=r}mh(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?U2(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&q2(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Hl(e,a):typeof a=="number"&&Hl(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Dl.hasOwnProperty(s)?a!=null&&s==="onScroll"&&He("scroll",e):a!=null&&o1(e,s,a,i))}switch(n){case"input":Ka(e),Z0(e,r,!1);break;case"textarea":Ka(e),X0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Lo(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?vi(e,!!r.multiple,s,!1):r.defaultValue!=null&&vi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Zc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Lt(t),null;case 6:if(e&&t.stateNode!=null)hw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(z(166));if(n=as(Ql.current),as(vr.current),rc(t)){if(r=t.stateNode,n=t.memoizedProps,r[hr]=t,(s=r.nodeValue!==n)&&(e=fn,e!==null))switch(e.tag){case 3:nc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&nc(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[hr]=t,t.stateNode=r}return Lt(t),null;case 13:if(Fe(Qe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&un!==null&&t.mode&1&&!(t.flags&128))Ry(),Ai(),t.flags|=98560,s=!1;else if(s=rc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(z(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(z(317));s[hr]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lt(t),s=!1}else Wn!==null&&(Qh(Wn),Wn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Qe.current&1?pt===0&&(pt=3):H1())),t.updateQueue!==null&&(t.flags|=4),Lt(t),null);case 4:return Ri(),Fh(e,t),e===null&&Gl(t.stateNode.containerInfo),Lt(t),null;case 10:return k1(t.type._context),Lt(t),null;case 17:return nn(t.type)&&Qc(),Lt(t),null;case 19:if(Fe(Qe),s=t.memoizedState,s===null)return Lt(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)hl(s,!1);else{if(pt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ou(e),i!==null){for(t.flags|=128,hl(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(Qe,Qe.current&1|2),t.child}e=e.sibling}s.tail!==null&&st()>_i&&(t.flags|=128,r=!0,hl(s,!1),t.lanes=4194304)}else{if(!r)if(e=ou(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Ye)return Lt(t),null}else 2*st()-s.renderingStartTime>_i&&n!==1073741824&&(t.flags|=128,r=!0,hl(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=st(),t.sibling=null,n=Qe.current,De(Qe,r?n&1|2:n&1),t):(Lt(t),null);case 22:case 23:return D1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?sn&1073741824&&(Lt(t),t.subtreeFlags&6&&(t.flags|=8192)):Lt(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function k8(e,t){switch(w1(t),t.tag){case 1:return nn(t.type)&&Qc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ri(),Fe(tn),Fe(zt),N1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return I1(t),null;case 13:if(Fe(Qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(Qe),null;case 4:return Ri(),null;case 10:return k1(t.type._context),null;case 22:case 23:return D1(),null;case 24:return null;default:return null}}var ic=!1,Ot=!1,T8=typeof WeakSet=="function"?WeakSet:Set,G=null;function hi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){nt(e,t,r)}else n.current=null}function Uh(e,t,n){try{n()}catch(r){nt(e,t,r)}}var $g=!1;function E8(e,t){if(Ih=Gc,e=yy(),v1(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,l=-1,a=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(l=i+o),d!==s||r!==0&&d.nodeType!==3||(a=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===o&&(l=i),h===s&&++u===r&&(a=i),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nh={focusedElem:e,selectionRange:n},Gc=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,x=g.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Un(t.type,v),x);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(z(163))}}catch(S){nt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return g=$g,$g=!1,g}function jl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&Uh(t,n,s)}o=o.next}while(o!==r)}}function qu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function pw(e){var t=e.alternate;t!==null&&(e.alternate=null,pw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hr],delete t[Yl],delete t[Rh],delete t[l8],delete t[a8])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gw(e){return e.tag===5||e.tag===3||e.tag===4}function qg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zc));else if(r!==4&&(e=e.child,e!==null))for(Wh(e,t,n),e=e.sibling;e!==null;)Wh(e,t,n),e=e.sibling}function Gh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gh(e,t,n),e=e.sibling;e!==null;)Gh(e,t,n),e=e.sibling}var kt=null,Vn=!1;function uo(e,t,n){for(n=n.child;n!==null;)mw(e,t,n),n=n.sibling}function mw(e,t,n){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(Ou,n)}catch{}switch(n.tag){case 5:Ot||hi(n,t);case 6:var r=kt,o=Vn;kt=null,uo(e,t,n),kt=r,Vn=o,kt!==null&&(Vn?(e=kt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kt.removeChild(n.stateNode));break;case 18:kt!==null&&(Vn?(e=kt,n=n.stateNode,e.nodeType===8?yf(e.parentNode,n):e.nodeType===1&&yf(e,n),Ul(e)):yf(kt,n.stateNode));break;case 4:r=kt,o=Vn,kt=n.stateNode.containerInfo,Vn=!0,uo(e,t,n),kt=r,Vn=o;break;case 0:case 11:case 14:case 15:if(!Ot&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Uh(n,t,i),o=o.next}while(o!==r)}uo(e,t,n);break;case 1:if(!Ot&&(hi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){nt(n,t,l)}uo(e,t,n);break;case 21:uo(e,t,n);break;case 22:n.mode&1?(Ot=(r=Ot)||n.memoizedState!==null,uo(e,t,n),Ot=r):uo(e,t,n);break;default:uo(e,t,n)}}function Fg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new T8),t.forEach(function(r){var o=O8.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Hn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:kt=l.stateNode,Vn=!1;break e;case 3:kt=l.stateNode.containerInfo,Vn=!0;break e;case 4:kt=l.stateNode.containerInfo,Vn=!0;break e}l=l.return}if(kt===null)throw Error(z(160));mw(s,i,o),kt=null,Vn=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(c){nt(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vw(t,e),t=t.sibling}function vw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Hn(t,e),cr(e),r&4){try{jl(3,e,e.return),qu(3,e)}catch(v){nt(e,e.return,v)}try{jl(5,e,e.return)}catch(v){nt(e,e.return,v)}}break;case 1:Hn(t,e),cr(e),r&512&&n!==null&&hi(n,n.return);break;case 5:if(Hn(t,e),cr(e),r&512&&n!==null&&hi(n,n.return),e.flags&32){var o=e.stateNode;try{Hl(o,"")}catch(v){nt(e,e.return,v)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&D2(o,s),vh(l,i);var c=vh(l,s);for(i=0;i<a.length;i+=2){var u=a[i],d=a[i+1];u==="style"?U2(o,d):u==="dangerouslySetInnerHTML"?q2(o,d):u==="children"?Hl(o,d):o1(o,u,d,c)}switch(l){case"input":fh(o,s);break;case"textarea":H2(o,s);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?vi(o,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?vi(o,!!s.multiple,s.defaultValue,!0):vi(o,!!s.multiple,s.multiple?[]:"",!1))}o[Yl]=s}catch(v){nt(e,e.return,v)}}break;case 6:if(Hn(t,e),cr(e),r&4){if(e.stateNode===null)throw Error(z(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(v){nt(e,e.return,v)}}break;case 3:if(Hn(t,e),cr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ul(t.containerInfo)}catch(v){nt(e,e.return,v)}break;case 4:Hn(t,e),cr(e);break;case 13:Hn(t,e),cr(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(P1=st())),r&4&&Fg(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Ot=(c=Ot)||u,Hn(t,e),Ot=c):Hn(t,e),cr(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(G=e,u=e.child;u!==null;){for(d=G=u;G!==null;){switch(h=G,p=h.child,h.tag){case 0:case 11:case 14:case 15:jl(4,h,h.return);break;case 1:hi(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){nt(r,n,v)}}break;case 5:hi(h,h.return);break;case 22:if(h.memoizedState!==null){Vg(d);continue}}p!==null?(p.return=h,G=p):Vg(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=d.stateNode,a=d.memoizedProps.style,i=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=F2("display",i))}catch(v){nt(e,e.return,v)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){nt(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Hn(t,e),cr(e),r&4&&Fg(e);break;case 21:break;default:Hn(t,e),cr(e)}}function cr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(gw(n)){var r=n;break e}n=n.return}throw Error(z(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Hl(o,""),r.flags&=-33);var s=qg(e);Gh(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=qg(e);Wh(e,l,i);break;default:throw Error(z(161))}}catch(a){nt(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function C8(e,t,n){G=e,yw(e)}function yw(e,t,n){for(var r=(e.mode&1)!==0;G!==null;){var o=G,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||ic;if(!i){var l=o.alternate,a=l!==null&&l.memoizedState!==null||Ot;l=ic;var c=Ot;if(ic=i,(Ot=a)&&!c)for(G=o;G!==null;)i=G,a=i.child,i.tag===22&&i.memoizedState!==null?Wg(o):a!==null?(a.return=i,G=a):Wg(o);for(;s!==null;)G=s,yw(s),s=s.sibling;G=o,ic=l,Ot=c}Ug(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,G=s):Ug(e)}}function Ug(e){for(;G!==null;){var t=G;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ot||qu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ot)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Un(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Ng(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ng(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Ul(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(z(163))}Ot||t.flags&512&&Vh(t)}catch(h){nt(t,t.return,h)}}if(t===e){G=null;break}if(n=t.sibling,n!==null){n.return=t.return,G=n;break}G=t.return}}function Vg(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var n=t.sibling;if(n!==null){n.return=t.return,G=n;break}G=t.return}}function Wg(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qu(4,t)}catch(a){nt(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){nt(t,o,a)}}var s=t.return;try{Vh(t)}catch(a){nt(t,s,a)}break;case 5:var i=t.return;try{Vh(t)}catch(a){nt(t,i,a)}}}catch(a){nt(t,t.return,a)}if(t===e){G=null;break}var l=t.sibling;if(l!==null){l.return=t.return,G=l;break}G=t.return}}var I8=Math.ceil,lu=no.ReactCurrentDispatcher,M1=no.ReactCurrentOwner,jn=no.ReactCurrentBatchConfig,Te=0,vt=null,lt=null,Ct=0,sn=0,pi=zo(0),pt=0,ta=null,ms=0,Fu=0,B1=0,Rl=null,Xt=null,P1=0,_i=1/0,Pr=null,au=!1,Kh=null,Io=null,lc=!1,yo=null,cu=0,Ll=0,Yh=null,Oc=-1,Mc=0;function Ft(){return Te&6?st():Oc!==-1?Oc:Oc=st()}function No(e){return e.mode&1?Te&2&&Ct!==0?Ct&-Ct:u8.transition!==null?(Mc===0&&(Mc=ny()),Mc):(e=_e,e!==0||(e=window.event,e=e===void 0?16:cy(e.type)),e):1}function Xn(e,t,n,r){if(50<Ll)throw Ll=0,Yh=null,Error(z(185));xa(e,n,r),(!(Te&2)||e!==vt)&&(e===vt&&(!(Te&2)&&(Fu|=n),pt===4&&mo(e,Ct)),rn(e,r),n===1&&Te===0&&!(t.mode&1)&&(_i=st()+500,Du&&Do()))}function rn(e,t){var n=e.callbackNode;ux(e,t);var r=Wc(e,e===vt?Ct:0);if(r===0)n!==null&&tg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&tg(n),t===1)e.tag===0?c8(Gg.bind(null,e)):Ny(Gg.bind(null,e)),s8(function(){!(Te&6)&&Do()}),n=null;else{switch(ry(r)){case 1:n=c1;break;case 4:n=ey;break;case 16:n=Vc;break;case 536870912:n=ty;break;default:n=Vc}n=Cw(n,ww.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ww(e,t){if(Oc=-1,Mc=0,Te&6)throw Error(z(327));var n=e.callbackNode;if(Si()&&e.callbackNode!==n)return null;var r=Wc(e,e===vt?Ct:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=uu(e,r);else{t=r;var o=Te;Te|=2;var s=xw();(vt!==e||Ct!==t)&&(Pr=null,_i=st()+500,us(e,t));do try{j8();break}catch(l){bw(e,l)}while(!0);S1(),lu.current=s,Te=o,lt!==null?t=0:(vt=null,Ct=0,t=pt)}if(t!==0){if(t===2&&(o=Sh(e),o!==0&&(r=o,t=Zh(e,o))),t===1)throw n=ta,us(e,0),mo(e,r),rn(e,st()),n;if(t===6)mo(e,r);else{if(o=e.current.alternate,!(r&30)&&!N8(o)&&(t=uu(e,r),t===2&&(s=Sh(e),s!==0&&(r=s,t=Zh(e,s))),t===1))throw n=ta,us(e,0),mo(e,r),rn(e,st()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(z(345));case 2:ns(e,Xt,Pr);break;case 3:if(mo(e,r),(r&130023424)===r&&(t=P1+500-st(),10<t)){if(Wc(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ft(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=jh(ns.bind(null,e,Xt,Pr),t);break}ns(e,Xt,Pr);break;case 4:if(mo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Qn(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=st()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*I8(r/1960))-r,10<r){e.timeoutHandle=jh(ns.bind(null,e,Xt,Pr),r);break}ns(e,Xt,Pr);break;case 5:ns(e,Xt,Pr);break;default:throw Error(z(329))}}}return rn(e,st()),e.callbackNode===n?ww.bind(null,e):null}function Zh(e,t){var n=Rl;return e.current.memoizedState.isDehydrated&&(us(e,t).flags|=256),e=uu(e,t),e!==2&&(t=Xt,Xt=n,t!==null&&Qh(t)),e}function Qh(e){Xt===null?Xt=e:Xt.push.apply(Xt,e)}function N8(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!nr(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function mo(e,t){for(t&=~B1,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qn(t),r=1<<n;e[n]=-1,t&=~r}}function Gg(e){if(Te&6)throw Error(z(327));Si();var t=Wc(e,0);if(!(t&1))return rn(e,st()),null;var n=uu(e,t);if(e.tag!==0&&n===2){var r=Sh(e);r!==0&&(t=r,n=Zh(e,r))}if(n===1)throw n=ta,us(e,0),mo(e,t),rn(e,st()),n;if(n===6)throw Error(z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ns(e,Xt,Pr),rn(e,st()),null}function z1(e,t){var n=Te;Te|=1;try{return e(t)}finally{Te=n,Te===0&&(_i=st()+500,Du&&Do())}}function vs(e){yo!==null&&yo.tag===0&&!(Te&6)&&Si();var t=Te;Te|=1;var n=jn.transition,r=_e;try{if(jn.transition=null,_e=1,e)return e()}finally{_e=r,jn.transition=n,Te=t,!(Te&6)&&Do()}}function D1(){sn=pi.current,Fe(pi)}function us(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,o8(n)),lt!==null)for(n=lt.return;n!==null;){var r=n;switch(w1(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Qc();break;case 3:Ri(),Fe(tn),Fe(zt),N1();break;case 5:I1(r);break;case 4:Ri();break;case 13:Fe(Qe);break;case 19:Fe(Qe);break;case 10:k1(r.type._context);break;case 22:case 23:D1()}n=n.return}if(vt=e,lt=e=Ao(e.current,null),Ct=sn=t,pt=0,ta=null,B1=Fu=ms=0,Xt=Rl=null,ls!==null){for(t=0;t<ls.length;t++)if(n=ls[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}ls=null}return e}function bw(e,t){do{var n=lt;try{if(S1(),Rc.current=iu,su){for(var r=Je.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}su=!1}if(gs=0,mt=dt=Je=null,Al=!1,Xl=0,M1.current=null,n===null||n.return===null){pt=1,ta=t,lt=null;break}e:{var s=e,i=n.return,l=n,a=t;if(t=Ct,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,u=l,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Og(i);if(p!==null){p.flags&=-257,Mg(p,i,l,s,t),p.mode&1&&_g(s,c,t),t=p,a=c;var g=t.updateQueue;if(g===null){var v=new Set;v.add(a),t.updateQueue=v}else g.add(a);break e}else{if(!(t&1)){_g(s,c,t),H1();break e}a=Error(z(426))}}else if(Ye&&l.mode&1){var x=Og(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Mg(x,i,l,s,t),b1(Li(a,l));break e}}s=a=Li(a,l),pt!==4&&(pt=2),Rl===null?Rl=[s]:Rl.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=rw(s,a,t);Ig(s,m);break e;case 1:l=a;var y=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Io===null||!Io.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=ow(s,l,t);Ig(s,S);break e}}s=s.return}while(s!==null)}kw(n)}catch(k){t=k,lt===n&&n!==null&&(lt=n=n.return);continue}break}while(!0)}function xw(){var e=lu.current;return lu.current=iu,e===null?iu:e}function H1(){(pt===0||pt===3||pt===2)&&(pt=4),vt===null||!(ms&268435455)&&!(Fu&268435455)||mo(vt,Ct)}function uu(e,t){var n=Te;Te|=2;var r=xw();(vt!==e||Ct!==t)&&(Pr=null,us(e,t));do try{A8();break}catch(o){bw(e,o)}while(!0);if(S1(),Te=n,lu.current=r,lt!==null)throw Error(z(261));return vt=null,Ct=0,pt}function A8(){for(;lt!==null;)Sw(lt)}function j8(){for(;lt!==null&&!tx();)Sw(lt)}function Sw(e){var t=Ew(e.alternate,e,sn);e.memoizedProps=e.pendingProps,t===null?kw(e):lt=t,M1.current=null}function kw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=k8(n,t),n!==null){n.flags&=32767,lt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{pt=6,lt=null;return}}else if(n=S8(n,t,sn),n!==null){lt=n;return}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);pt===0&&(pt=5)}function ns(e,t,n){var r=_e,o=jn.transition;try{jn.transition=null,_e=1,R8(e,t,n,r)}finally{jn.transition=o,_e=r}return null}function R8(e,t,n,r){do Si();while(yo!==null);if(Te&6)throw Error(z(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(z(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(dx(e,s),e===vt&&(lt=vt=null,Ct=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||lc||(lc=!0,Cw(Vc,function(){return Si(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=jn.transition,jn.transition=null;var i=_e;_e=1;var l=Te;Te|=4,M1.current=null,E8(e,n),vw(n,e),Qx(Nh),Gc=!!Ih,Nh=Ih=null,e.current=n,C8(n),nx(),Te=l,_e=i,jn.transition=s}else e.current=n;if(lc&&(lc=!1,yo=e,cu=o),s=e.pendingLanes,s===0&&(Io=null),sx(n.stateNode),rn(e,st()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(au)throw au=!1,e=Kh,Kh=null,e;return cu&1&&e.tag!==0&&Si(),s=e.pendingLanes,s&1?e===Yh?Ll++:(Ll=0,Yh=e):Ll=0,Do(),null}function Si(){if(yo!==null){var e=ry(cu),t=jn.transition,n=_e;try{if(jn.transition=null,_e=16>e?16:e,yo===null)var r=!1;else{if(e=yo,yo=null,cu=0,Te&6)throw Error(z(331));var o=Te;for(Te|=4,G=e.current;G!==null;){var s=G,i=s.child;if(G.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var c=l[a];for(G=c;G!==null;){var u=G;switch(u.tag){case 0:case 11:case 15:jl(8,u,s)}var d=u.child;if(d!==null)d.return=u,G=d;else for(;G!==null;){u=G;var h=u.sibling,p=u.return;if(pw(u),u===c){G=null;break}if(h!==null){h.return=p,G=h;break}G=p}}}var g=s.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}G=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,G=i;else e:for(;G!==null;){if(s=G,s.flags&2048)switch(s.tag){case 0:case 11:case 15:jl(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,G=m;break e}G=s.return}}var y=e.current;for(G=y;G!==null;){i=G;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,G=w;else e:for(i=y;G!==null;){if(l=G,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:qu(9,l)}}catch(k){nt(l,l.return,k)}if(l===i){G=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,G=S;break e}G=l.return}}if(Te=o,Do(),mr&&typeof mr.onPostCommitFiberRoot=="function")try{mr.onPostCommitFiberRoot(Ou,e)}catch{}r=!0}return r}finally{_e=n,jn.transition=t}}return!1}function Kg(e,t,n){t=Li(n,t),t=rw(e,t,1),e=Co(e,t,1),t=Ft(),e!==null&&(xa(e,1,t),rn(e,t))}function nt(e,t,n){if(e.tag===3)Kg(e,e,n);else for(;t!==null;){if(t.tag===3){Kg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Io===null||!Io.has(r))){e=Li(n,e),e=ow(t,e,1),t=Co(t,e,1),e=Ft(),t!==null&&(xa(t,1,e),rn(t,e));break}}t=t.return}}function L8(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ft(),e.pingedLanes|=e.suspendedLanes&n,vt===e&&(Ct&n)===n&&(pt===4||pt===3&&(Ct&130023424)===Ct&&500>st()-P1?us(e,0):B1|=n),rn(e,t)}function Tw(e,t){t===0&&(e.mode&1?(t=Qa,Qa<<=1,!(Qa&130023424)&&(Qa=4194304)):t=1);var n=Ft();e=Yr(e,t),e!==null&&(xa(e,t,n),rn(e,n))}function _8(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tw(e,n)}function O8(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(z(314))}r!==null&&r.delete(t),Tw(e,n)}var Ew;Ew=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||tn.current)en=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return en=!1,x8(e,t,n);en=!!(e.flags&131072)}else en=!1,Ye&&t.flags&1048576&&Ay(t,eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_c(e,t),e=t.pendingProps;var o=Ni(t,zt.current);xi(t,n),o=j1(null,t,r,e,o,n);var s=R1();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,nn(r)?(s=!0,Xc(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,E1(t),o.updater=$u,t.stateNode=o,o._reactInternals=t,Ph(t,r,e,n),t=Hh(null,t,r,!0,s,n)):(t.tag=0,Ye&&s&&y1(t),$t(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_c(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=B8(r),e=Un(r,e),o){case 0:t=Dh(null,t,r,e,n);break e;case 1:t=zg(null,t,r,e,n);break e;case 11:t=Bg(null,t,r,e,n);break e;case 14:t=Pg(null,t,r,Un(r.type,e),n);break e}throw Error(z(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Un(r,o),Dh(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Un(r,o),zg(e,t,r,o,n);case 3:e:{if(aw(t),e===null)throw Error(z(387));r=t.pendingProps,s=t.memoizedState,o=s.element,My(e,t),ru(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Li(Error(z(423)),t),t=Dg(e,t,r,n,o);break e}else if(r!==o){o=Li(Error(z(424)),t),t=Dg(e,t,r,n,o);break e}else for(un=Eo(t.stateNode.containerInfo.firstChild),fn=t,Ye=!0,Wn=null,n=_y(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ai(),r===o){t=Zr(e,t,n);break e}$t(e,t,r,n)}t=t.child}return t;case 5:return By(t),e===null&&Oh(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Ah(r,o)?i=null:s!==null&&Ah(r,s)&&(t.flags|=32),lw(e,t),$t(e,t,i,n),t.child;case 6:return e===null&&Oh(t),null;case 13:return cw(e,t,n);case 4:return C1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ji(t,null,r,n):$t(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Un(r,o),Bg(e,t,r,o,n);case 7:return $t(e,t,t.pendingProps,n),t.child;case 8:return $t(e,t,t.pendingProps.children,n),t.child;case 12:return $t(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,De(tu,r._currentValue),r._currentValue=i,s!==null)if(nr(s.value,i)){if(s.children===o.children&&!tn.current){t=Zr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){i=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=Ur(-1,n&-n),a.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Mh(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(z(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Mh(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}$t(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,xi(t,n),o=Ln(o),r=r(o),t.flags|=1,$t(e,t,r,n),t.child;case 14:return r=t.type,o=Un(r,t.pendingProps),o=Un(r.type,o),Pg(e,t,r,o,n);case 15:return sw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Un(r,o),_c(e,t),t.tag=1,nn(r)?(e=!0,Xc(t)):e=!1,xi(t,n),nw(t,r,o),Ph(t,r,o,n),Hh(null,t,r,!0,e,n);case 19:return uw(e,t,n);case 22:return iw(e,t,n)}throw Error(z(156,t.tag))};function Cw(e,t){return J2(e,t)}function M8(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(e,t,n,r){return new M8(e,t,n,r)}function $1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function B8(e){if(typeof e=="function")return $1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===i1)return 11;if(e===l1)return 14}return 2}function Ao(e,t){var n=e.alternate;return n===null?(n=In(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bc(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")$1(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case oi:return ds(n.children,o,s,t);case s1:i=8,o|=8;break;case lh:return e=In(12,n,t,o|2),e.elementType=lh,e.lanes=s,e;case ah:return e=In(13,n,t,o),e.elementType=ah,e.lanes=s,e;case ch:return e=In(19,n,t,o),e.elementType=ch,e.lanes=s,e;case B2:return Uu(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O2:i=10;break e;case M2:i=9;break e;case i1:i=11;break e;case l1:i=14;break e;case ho:i=16,r=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=In(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function ds(e,t,n,r){return e=In(7,e,r,t),e.lanes=n,e}function Uu(e,t,n,r){return e=In(22,e,r,t),e.elementType=B2,e.lanes=n,e.stateNode={isHidden:!1},e}function Cf(e,t,n){return e=In(6,e,null,t),e.lanes=n,e}function If(e,t,n){return t=In(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function P8(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lf(0),this.expirationTimes=lf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lf(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function q1(e,t,n,r,o,s,i,l,a){return e=new P8(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=In(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},E1(s),e}function z8(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ri,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Iw(e){if(!e)return _o;e=e._reactInternals;e:{if(Is(e)!==e||e.tag!==1)throw Error(z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(nn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(z(171))}if(e.tag===1){var n=e.type;if(nn(n))return Iy(e,n,t)}return t}function Nw(e,t,n,r,o,s,i,l,a){return e=q1(n,r,!0,e,o,s,i,l,a),e.context=Iw(null),n=e.current,r=Ft(),o=No(n),s=Ur(r,o),s.callback=t??null,Co(n,s,o),e.current.lanes=o,xa(e,o,r),rn(e,r),e}function Vu(e,t,n,r){var o=t.current,s=Ft(),i=No(o);return n=Iw(n),t.context===null?t.context=n:t.pendingContext=n,t=Ur(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Co(o,t,i),e!==null&&(Xn(e,o,i,s),jc(e,o,i)),i}function du(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Yg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function F1(e,t){Yg(e,t),(e=e.alternate)&&Yg(e,t)}function D8(){return null}var Aw=typeof reportError=="function"?reportError:function(e){console.error(e)};function U1(e){this._internalRoot=e}Wu.prototype.render=U1.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));Vu(e,t,null,null)};Wu.prototype.unmount=U1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vs(function(){Vu(null,e,null,null)}),t[Kr]=null}};function Wu(e){this._internalRoot=e}Wu.prototype.unstable_scheduleHydration=function(e){if(e){var t=iy();e={blockedOn:null,target:e,priority:t};for(var n=0;n<go.length&&t!==0&&t<go[n].priority;n++);go.splice(n,0,e),n===0&&ay(e)}};function V1(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Gu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zg(){}function H8(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=du(i);s.call(c)}}var i=Nw(t,r,e,0,null,!1,!1,"",Zg);return e._reactRootContainer=i,e[Kr]=i.current,Gl(e.nodeType===8?e.parentNode:e),vs(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var c=du(a);l.call(c)}}var a=q1(e,0,!1,null,null,!1,!1,"",Zg);return e._reactRootContainer=a,e[Kr]=a.current,Gl(e.nodeType===8?e.parentNode:e),vs(function(){Vu(t,a,n,r)}),a}function Ku(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var l=o;o=function(){var a=du(i);l.call(a)}}Vu(t,i,e,o)}else i=H8(n,t,e,o,r);return du(i)}oy=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xl(t.pendingLanes);n!==0&&(u1(t,n|1),rn(t,st()),!(Te&6)&&(_i=st()+500,Do()))}break;case 13:vs(function(){var r=Yr(e,1);if(r!==null){var o=Ft();Xn(r,e,1,o)}}),F1(e,1)}};d1=function(e){if(e.tag===13){var t=Yr(e,134217728);if(t!==null){var n=Ft();Xn(t,e,134217728,n)}F1(e,134217728)}};sy=function(e){if(e.tag===13){var t=No(e),n=Yr(e,t);if(n!==null){var r=Ft();Xn(n,e,t,r)}F1(e,t)}};iy=function(){return _e};ly=function(e,t){var n=_e;try{return _e=e,t()}finally{_e=n}};wh=function(e,t,n){switch(t){case"input":if(fh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=zu(r);if(!o)throw Error(z(90));z2(r),fh(r,o)}}}break;case"textarea":H2(e,n);break;case"select":t=n.value,t!=null&&vi(e,!!n.multiple,t,!1)}};G2=z1;K2=vs;var $8={usingClientEntryPoint:!1,Events:[ka,ai,zu,V2,W2,z1]},pl={findFiberByHostInstance:is,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},q8={bundleType:pl.bundleType,version:pl.version,rendererPackageName:pl.rendererPackageName,rendererConfig:pl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:no.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Q2(e),e===null?null:e.stateNode},findFiberByHostInstance:pl.findFiberByHostInstance||D8,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ac=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ac.isDisabled&&ac.supportsFiber)try{Ou=ac.inject(q8),mr=ac}catch{}}yn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$8;yn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!V1(t))throw Error(z(200));return z8(e,t,null,n)};yn.createRoot=function(e,t){if(!V1(e))throw Error(z(299));var n=!1,r="",o=Aw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=q1(e,1,!1,null,null,n,!1,r,o),e[Kr]=t.current,Gl(e.nodeType===8?e.parentNode:e),new U1(t)};yn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(z(188)):(e=Object.keys(e).join(","),Error(z(268,e)));return e=Q2(t),e=e===null?null:e.stateNode,e};yn.flushSync=function(e){return vs(e)};yn.hydrate=function(e,t,n){if(!Gu(t))throw Error(z(200));return Ku(null,e,t,!0,n)};yn.hydrateRoot=function(e,t,n){if(!V1(e))throw Error(z(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Aw;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Nw(t,null,e,1,n??null,o,!1,s,i),e[Kr]=t.current,Gl(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Wu(t)};yn.render=function(e,t,n){if(!Gu(t))throw Error(z(200));return Ku(null,e,t,!1,n)};yn.unmountComponentAtNode=function(e){if(!Gu(e))throw Error(z(40));return e._reactRootContainer?(vs(function(){Ku(null,null,e,!1,function(){e._reactRootContainer=null,e[Kr]=null})}),!0):!1};yn.unstable_batchedUpdates=z1;yn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gu(n))throw Error(z(200));if(e==null||e._reactInternals===void 0)throw Error(z(38));return Ku(e,t,n,!1,r)};yn.version="18.3.1-next-f1338f8080-20240426";function jw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jw)}catch(e){console.error(e)}}jw(),j2.exports=yn;var Ho=j2.exports;const F8=Di(Ho);var U8,Qg=Ho;U8=V0.createRoot=Qg.createRoot,V0.hydrateRoot=Qg.hydrateRoot;const Rw=[],_l=[],Qr={},Lw={},fu={},AL=e=>{const t={name:e.name,Control:e.Control,Edit:e.Edit,Preview:e.Preview,isBlock:e.isBlock,parse:e.parse,defaultProps:e.defaultProps,defaultInnerBlocks:e.defaultInnerBlocks,supportedParents:e.supportedParents,supportedChildren:e.supportedChildren},n={name:e.name,title:e.title,icon:e.icon,isPro:e.isPro};if(n.isPro){const r=_l.findIndex(o=>o.name===n.name);r>-1?_l[r]=n:_l.push(n)}else Rw.push(n);Qr[t.name]=t},jL=e=>{Qr[e.name]=e},Ns=e=>{_l.push(e)},RL=(e,t)=>{fu[e]=t};function St(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var V8=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xg=V8,Nf=()=>Math.random().toString(36).substring(7).split("").join("."),W8={INIT:`@@redux/INIT${Nf()}`,REPLACE:`@@redux/REPLACE${Nf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Nf()}`},hu=W8;function W1(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function _w(e,t,n){if(typeof e!="function")throw new Error(St(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(St(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(St(1));return n(_w)(e,t)}let r=e,o=t,s=new Map,i=s,l=0,a=!1;function c(){i===s&&(i=new Map,s.forEach((x,m)=>{i.set(m,x)}))}function u(){if(a)throw new Error(St(3));return o}function d(x){if(typeof x!="function")throw new Error(St(4));if(a)throw new Error(St(5));let m=!0;c();const y=l++;return i.set(y,x),function(){if(m){if(a)throw new Error(St(6));m=!1,c(),i.delete(y),s=null}}}function h(x){if(!W1(x))throw new Error(St(7));if(typeof x.type>"u")throw new Error(St(8));if(typeof x.type!="string")throw new Error(St(17));if(a)throw new Error(St(9));try{a=!0,o=r(o,x)}finally{a=!1}return(s=i).forEach(y=>{y()}),x}function p(x){if(typeof x!="function")throw new Error(St(10));r=x,h({type:hu.REPLACE})}function g(){const x=d;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(St(11));function y(){const S=m;S.next&&S.next(u())}return y(),{unsubscribe:x(y)}},[Xg](){return this}}}return h({type:hu.INIT}),{dispatch:h,subscribe:d,getState:u,replaceReducer:p,[Xg]:g}}function G8(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:hu.INIT})>"u")throw new Error(St(12));if(typeof n(void 0,{type:hu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(St(13))})}function K8(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;try{G8(n)}catch(s){o=s}return function(i={},l){if(o)throw o;let a=!1;const c={};for(let u=0;u<r.length;u++){const d=r[u],h=n[d],p=i[d],g=h(p,l);if(typeof g>"u")throw l&&l.type,new Error(St(14));c[d]=g,a=a||g!==p}return a=a||r.length!==Object.keys(i).length,a?c:i}}function pu(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Y8(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(St(15))};const i={getState:o.getState,dispatch:(a,...c)=>s(a,...c)},l=e.map(a=>a(i));return s=pu(...l)(o.dispatch),{...o,dispatch:s}}}function Z8(e){return W1(e)&&"type"in e&&typeof e.type=="string"}var Ow=Symbol.for("immer-nothing"),Jg=Symbol.for("immer-draftable"),vn=Symbol.for("immer-state");function Kn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Oi=Object.getPrototypeOf;function ys(e){return!!e&&!!e[vn]}function Xr(e){var t;return e?Mw(e)||Array.isArray(e)||!!e[Jg]||!!((t=e.constructor)!=null&&t[Jg])||Ea(e)||Zu(e):!1}var Q8=Object.prototype.constructor.toString();function Mw(e){if(!e||typeof e!="object")return!1;const t=Oi(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Q8}function gu(e,t){Yu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Yu(e){const t=e[vn];return t?t.type_:Array.isArray(e)?1:Ea(e)?2:Zu(e)?3:0}function Xh(e,t){return Yu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Bw(e,t,n){const r=Yu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function X8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ea(e){return e instanceof Map}function Zu(e){return e instanceof Set}function rs(e){return e.copy_||e.base_}function Jh(e,t){if(Ea(e))return new Map(e);if(Zu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Mw(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[vn];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const i=o[s],l=r[i];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[i]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[i]})}return Object.create(Oi(e),r)}else{const r=Oi(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function G1(e,t=!1){return Qu(e)||ys(e)||!Xr(e)||(Yu(e)>1&&Object.defineProperties(e,{set:{value:cc},add:{value:cc},clear:{value:cc},delete:{value:cc}}),Object.freeze(e),t&&Object.values(e).forEach(n=>G1(n,!0))),e}function cc(){Kn(2)}function Qu(e){return Object.isFrozen(e)}var J8={};function ws(e){const t=J8[e];return t||Kn(0,e),t}var na;function Pw(){return na}function e6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function em(e,t){t&&(ws("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ep(e){tp(e),e.drafts_.forEach(t6),e.drafts_=null}function tp(e){e===na&&(na=e.parent_)}function tm(e){return na=e6(na,e)}function t6(e){const t=e[vn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function nm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[vn].modified_&&(ep(t),Kn(4)),Xr(e)&&(e=mu(t,e),t.parent_||vu(t,e)),t.patches_&&ws("Patches").generateReplacementPatches_(n[vn].base_,e,t.patches_,t.inversePatches_)):e=mu(t,n,[]),ep(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ow?e:void 0}function mu(e,t,n){if(Qu(t))return t;const r=t[vn];if(!r)return gu(t,(o,s)=>rm(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return vu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),gu(s,(l,a)=>rm(e,r,o,l,a,n,i)),vu(e,o,!1),n&&e.patches_&&ws("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function rm(e,t,n,r,o,s,i){if(ys(o)){const l=s&&t&&t.type_!==3&&!Xh(t.assigned_,r)?s.concat(r):void 0,a=mu(e,o,l);if(Bw(n,r,a),ys(a))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(Xr(o)&&!Qu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;mu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Ea(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&vu(e,o)}}function vu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&G1(t,n)}function n6(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Pw(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=K1;n&&(o=[r],s=ra);const{revoke:i,proxy:l}=Proxy.revocable(o,s);return r.draft_=l,r.revoke_=i,l}var K1={get(e,t){if(t===vn)return e;const n=rs(e);if(!Xh(n,t))return r6(e,n,t);const r=n[t];return e.finalized_||!Xr(r)?r:r===Af(e.base_,t)?(jf(e),e.copy_[t]=rp(r,e)):r},has(e,t){return t in rs(e)},ownKeys(e){return Reflect.ownKeys(rs(e))},set(e,t,n){const r=zw(rs(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Af(rs(e),t),s=o==null?void 0:o[vn];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(X8(n,o)&&(n!==void 0||Xh(e.base_,t)))return!0;jf(e),np(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Af(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,jf(e),np(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=rs(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Kn(11)},getPrototypeOf(e){return Oi(e.base_)},setPrototypeOf(){Kn(12)}},ra={};gu(K1,(e,t)=>{ra[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ra.deleteProperty=function(e,t){return ra.set.call(this,e,t,void 0)};ra.set=function(e,t,n){return K1.set.call(this,e[0],t,n,e[0])};function Af(e,t){const n=e[vn];return(n?rs(n):e)[t]}function r6(e,t,n){var o;const r=zw(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function zw(e,t){if(!(t in e))return;let n=Oi(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Oi(n)}}function np(e){e.modified_||(e.modified_=!0,e.parent_&&np(e.parent_))}function jf(e){e.copy_||(e.copy_=Jh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var o6=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const i=this;return function(a=s,...c){return i.produce(a,u=>n.call(this,u,...c))}}typeof n!="function"&&Kn(6),r!==void 0&&typeof r!="function"&&Kn(7);let o;if(Xr(t)){const s=tm(this),i=rp(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?ep(s):tp(s)}return em(s,r),nm(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Ow&&(o=void 0),this.autoFreeze_&&G1(o,!0),r){const s=[],i=[];ws("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Kn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,a=>t(a,...l));let r,o;return[this.produce(t,n,(i,l)=>{r=i,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Xr(e)||Kn(8),ys(e)&&(e=s6(e));const t=tm(this),n=rp(e,void 0);return n[vn].isManual_=!0,tp(t),n}finishDraft(e,t){const n=e&&e[vn];(!n||!n.isManual_)&&Kn(9);const{scope_:r}=n;return em(r,t),nm(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=ws("Patches").applyPatches_;return ys(e)?r(e,t):this.produce(e,o=>r(o,t))}};function rp(e,t){const n=Ea(e)?ws("MapSet").proxyMap_(e,t):Zu(e)?ws("MapSet").proxySet_(e,t):n6(e,t);return(t?t.scope_:Pw()).drafts_.push(n),n}function s6(e){return ys(e)||Kn(10,e),Dw(e)}function Dw(e){if(!Xr(e)||Qu(e))return e;const t=e[vn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Jh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Jh(e,!0);return gu(n,(r,o)=>{Bw(n,r,Dw(o))}),t&&(t.finalized_=!1),n}var i6=new o6,Hw=i6.produce;function $w(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var l6=$w(),a6=$w,c6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pu:pu.apply(null,arguments)};function om(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Vr(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Z8(r)&&r.type===e,n}var qw=class kl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,kl.prototype)}static get[Symbol.species](){return kl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new kl(...t[0].concat(this)):new kl(...t.concat(this))}};function sm(e){return Xr(e)?Hw(e,()=>{}):e}function uc(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function u6(e){return typeof e=="boolean"}var d6=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new qw;return n&&(u6(n)?i.push(l6):i.push(a6(n.extraArgument))),i},f6="RTK_autoBatch",im=e=>t=>{setTimeout(t,e)},h6=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,i=!1;const l=new Set,a=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:im(10):e.type==="callback"?e.queueNotification:im(e.timeout),c=()=>{i=!1,s&&(s=!1,l.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const d=()=>o&&u(),h=r.subscribe(d);return l.add(u),()=>{h(),l.delete(u)}},dispatch(u){var d;try{return o=!((d=u==null?void 0:u.meta)!=null&&d[f6]),s=!o,s&&(i||(i=!0,a(c))),r.dispatch(u)}finally{o=!0}}})},p6=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new qw(e);return r&&o.push(h6(typeof r=="object"?r:void 0)),o};function g6(e){const t=d6(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(W1(n))l=K8(n);else throw new Error(Vr(1));let a;typeof r=="function"?a=r(t):a=t();let c=pu;o&&(c=c6({trace:!1,...typeof o=="object"&&o}));const u=Y8(...a),d=p6(u);let h=typeof i=="function"?i(d):d();const p=c(...h);return _w(l,s,p)}function Fw(e){const t={},n=[];let r;const o={addCase(s,i){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(Vr(28));if(l in t)throw new Error(Vr(29));return t[l]=i,o},addAsyncThunk(s,i){return i.pending&&(t[s.pending.type]=i.pending),i.rejected&&(t[s.rejected.type]=i.rejected),i.fulfilled&&(t[s.fulfilled.type]=i.fulfilled),i.settled&&n.push({matcher:s.settled,reducer:i.settled}),o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function m6(e){return typeof e=="function"}function v6(e,t){let[n,r,o]=Fw(t),s;if(m6(e))s=()=>sm(e());else{const l=sm(e);s=()=>l}function i(l=s(),a){let c=[n[a.type],...r.filter(({matcher:u})=>u(a)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,d)=>{if(d)if(ys(u)){const p=d(u,a);return p===void 0?u:p}else{if(Xr(u))return Hw(u,h=>d(h,a));{const h=d(u,a);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},l)}return i.getInitialState=s,i}var y6=Symbol.for("rtk-slice-createasyncthunk");function w6(e,t){return`${e}/${t}`}function b6({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[y6];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(Vr(11));const l=(typeof o.reducers=="function"?o.reducers(S6()):o.reducers)||{},a=Object.keys(l),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(S,k){const T=typeof S=="string"?S:S.type;if(!T)throw new Error(Vr(12));if(T in c.sliceCaseReducersByType)throw new Error(Vr(13));return c.sliceCaseReducersByType[T]=k,u},addMatcher(S,k){return c.sliceMatchers.push({matcher:S,reducer:k}),u},exposeAction(S,k){return c.actionCreators[S]=k,u},exposeCaseReducer(S,k){return c.sliceCaseReducersByName[S]=k,u}};a.forEach(S=>{const k=l[S],T={reducerName:S,type:w6(s,S),createNotation:typeof o.reducers=="function"};T6(k)?C6(T,k,u,t):k6(T,k,u)});function d(){const[S={},k=[],T=void 0]=typeof o.extraReducers=="function"?Fw(o.extraReducers):[o.extraReducers],C={...S,...c.sliceCaseReducersByType};return v6(o.initialState,I=>{for(let j in C)I.addCase(j,C[j]);for(let j of c.sliceMatchers)I.addMatcher(j.matcher,j.reducer);for(let j of k)I.addMatcher(j.matcher,j.reducer);T&&I.addDefaultCase(T)})}const h=S=>S,p=new Map,g=new WeakMap;let v;function x(S,k){return v||(v=d()),v(S,k)}function m(){return v||(v=d()),v.getInitialState()}function y(S,k=!1){function T(I){let j=I[S];return typeof j>"u"&&k&&(j=uc(g,T,m)),j}function C(I=h){const j=uc(p,k,()=>new WeakMap);return uc(j,I,()=>{const R={};for(const[M,_]of Object.entries(o.selectors??{}))R[M]=x6(_,I,()=>uc(g,I,m),k);return R})}return{reducerPath:S,getSelectors:C,get selectors(){return C(T)},selectSlice:T}}const w={name:s,reducer:x,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:m,...y(i),injectInto(S,{reducerPath:k,...T}={}){const C=k??i;return S.inject({reducerPath:C,reducer:x},T),{...w,...y(C,!0)}}};return w}}function x6(e,t,n,r){function o(s,...i){let l=t(s);return typeof l>"u"&&r&&(l=n()),e(l,...i)}return o.unwrapped=e,o}var Y1=b6();function S6(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function k6({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!E6(r))throw new Error(Vr(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?om(e,i):om(e))}function T6(e){return e._reducerDefinitionType==="asyncThunk"}function E6(e){return e._reducerDefinitionType==="reducerWithPrepare"}function C6({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Vr(18));const{payloadCreator:s,fulfilled:i,pending:l,rejected:a,settled:c,options:u}=n,d=o(e,s,u);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),l&&r.addCase(d.pending,l),a&&r.addCase(d.rejected,a),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:i||dc,pending:l||dc,rejected:a||dc,settled:c||dc})}function dc(){}function Vr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const I6={notifications:{top:0,items:[]}};let N6=0;const Uw=Y1({name:"ui",initialState:I6,reducers:{addNotification:(e,t)=>{const{message:n,type:r,duration:o}=t.payload,s=N6++;e.notifications.items.push({id:s,message:n,type:r,spawned_at:Date.now(),duration:o}),t.payload.captureId&&(t.payload.captureId.value=s)},setNotificationItems:(e,t)=>{e.notifications.items=t.payload},updateNotification:(e,t)=>{const n=e.notifications.items.find(r=>r.id===t.payload.id);n&&Object.assign(n,t.payload)},clearNotification:(e,t)=>{e.notifications.items=e.notifications.items.filter(n=>n.id!==t.payload)},setUpsell:(e,t)=>{e.upsell=t.payload}}}),{addNotification:lm,setNotificationItems:A6,updateNotification:op,clearNotification:j6,setUpsell:R6}=Uw.actions;var Vw={exports:{}},Xu={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var L6=A,_6=Symbol.for("react.element"),O6=Symbol.for("react.fragment"),M6=Object.prototype.hasOwnProperty,B6=L6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P6={key:!0,ref:!0,__self:!0,__source:!0};function Ww(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)M6.call(t,r)&&!P6.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:_6,type:e,key:s,ref:i,props:o,_owner:B6.current}}Xu.Fragment=O6;Xu.jsx=Ww;Xu.jsxs=Ww;Vw.exports=Xu;var f=Vw.exports;const Gw=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:f.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[f.jsx("path",{strokeDasharray:"2 4",strokeDashoffset:6,d:"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",children:f.jsx("animate",{attributeName:"stroke-dashoffset",dur:"0.6s",repeatCount:"indefinite",values:"6;0"})}),f.jsx("path",{strokeDasharray:32,strokeDashoffset:32,d:"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",children:f.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.1s",dur:"0.4s",values:"32;0"})}),f.jsx("path",{strokeDasharray:10,strokeDashoffset:10,d:"M12 8v7.5",children:f.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.5s",dur:"0.2s",values:"10;0"})}),f.jsx("path",{strokeDasharray:6,strokeDashoffset:6,d:"M12 15.5l3.5 -3.5M12 15.5l-3.5 -3.5",children:f.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.7s",dur:"0.2s",values:"6;0"})})]})}),z6=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:f.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[f.jsx("path",{strokeDasharray:"2 4",strokeDashoffset:"6",d:"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",children:f.jsx("animate",{attributeName:"stroke-dashoffset",dur:"0.6s",repeatCount:"indefinite",values:"6;0"})}),f.jsx("path",{strokeDasharray:"32",strokeDashoffset:"32",d:"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",children:f.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.1s",dur:"0.4s",values:"32;0"})}),f.jsx("path",{strokeDasharray:"10",strokeDashoffset:"10",d:"M12 16v-7.5",children:f.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.5s",dur:"0.2s",values:"10;0"})}),f.jsx("path",{strokeDasharray:"6",strokeDashoffset:"6",d:"M12 8.5l3.5 3.5M12 8.5l-3.5 3.5",children:f.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.7s",dur:"0.2s",values:"6;0"})})]})}),LL=f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:[f.jsx("circle",{cx:"18",cy:"12",r:"0",fill:"currentColor",children:f.jsx("animate",{attributeName:"r",begin:".67",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),f.jsx("circle",{cx:"12",cy:"12",r:"0",fill:"currentColor",children:f.jsx("animate",{attributeName:"r",begin:".33",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),f.jsx("circle",{cx:"6",cy:"12",r:"0",fill:"currentColor",children:f.jsx("animate",{attributeName:"r",begin:"0",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})})]}),Ju=f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:[f.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:"0.5"}),f.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:f.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]}),Kw=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",children:[f.jsx("circle",{cx:"12",cy:"12",r:"9"}),f.jsx("path",{d:"m8 12l3 3l5-6"})]})}),D6=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M12 17q.425 0 .713-.288T13 16t-.288-.712T12 15t-.712.288T11 16t.288.713T12 17m-1-4h2V7h-2zm1 9q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8"})}),Yw=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024",children:f.jsx("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896a448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4a51.2 51.2 0 0 0 0 102.4"})}),Zw=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m4 8l8 8l8-8"})}),H6=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m4 16l8-8l8 8"})}),$6=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M4 8h16V5H4zm10 11v-9h-4v9zm2 0h4v-9h-4zm-8 0v-9H4v9zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),q6=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsxs("g",{fill:"currentColor",children:[f.jsx("path",{fillRule:"evenodd",d:"M3 3v6h18V3zm16 2H5v2h14zM3 11v10h8V11zm6 2H5v6h4z",clipRule:"evenodd"}),f.jsx("path",{d:"M21 11h-8v2h8zm-8 4h8v2h-8zm8 4h-8v2h8z"})]})}),F6=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 768 1280",children:f.jsx("path",{fill:"currentColor",d:"M464 1152q0-33-23.5-56.5T384 1072t-56.5 23.5T304 1152t23.5 56.5T384 1232t56.5-23.5T464 1152m208-160V288q0-13-9.5-22.5T640 256H128q-13 0-22.5 9.5T96 288v704q0 13 9.5 22.5t22.5 9.5h512q13 0 22.5-9.5T672 992M480 144q0-16-16-16H304q-16 0-16 16t16 16h160q16 0 16-16m288-16v1024q0 52-38 90t-90 38H128q-52 0-90-38t-38-90V128q0-52 38-90t90-38h512q52 0 90 38t38 90"})}),U6=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M3 20q-.825 0-1.412-.587T1 18V6q0-.825.588-1.412T3 4h18q.825 0 1.413.588T23 6v12q0 .825-.587 1.413T21 20zm3-2h12V6H6z"})}),V6=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M16 352a48.05 48.05 0 0 0 48 48h133.88l-4 32H144a16 16 0 0 0 0 32h224a16 16 0 0 0 0-32h-49.88l-4-32H448a48.05 48.05 0 0 0 48-48v-48H16Zm240-16a16 16 0 1 1-16 16a16 16 0 0 1 16-16M496 96a48.05 48.05 0 0 0-48-48H64a48.05 48.05 0 0 0-48 48v192h480Z"})});let sp=!1;const Qw=()=>{const e=ae.getState().ui.notifications.items,t=Date.now(),n=[];let r=100,o=0;e.forEach(s=>{var l;const i=document.getElementById(`wptb-v2-notification-${s.id}`);if(s.type==="progress")i==null||i.style.setProperty("--progress",((l=s.progress)==null?void 0:l.toString())||"0"),o++;else if(s.duration){const a=t-s.spawned_at;if(a>s.duration&&!s.freeze)return;if(o++,!s.freeze){const c=(1-a/s.duration)*100;i==null||i.style.setProperty("--progress",`${c}`)}}n.push(s),i&&(i.style.top=`${r}px`,r+=i.getBoundingClientRect().height+10)}),n.length!==e.length&&ae.dispatch(A6(n)),o?requestAnimationFrame(Qw):sp=!1},_L=()=>{const e=ke(t=>t.ui.notifications.items);return sp||(sp=!0,requestAnimationFrame(Qw)),f.jsx(f.Fragment,{children:e.map(({id:t,type:n,message:r,duration:o,progress:s,spawned_at:i,freeze:l})=>Ho.createPortal(f.jsxs("div",{id:`wptb-v2-notification-${t}`,className:`wptb-v2-notification wptb-v2-notification-${n}`,onClick:()=>ae.dispatch(j6(t)),onMouseEnter:()=>ae.dispatch(op({id:t,freeze:Date.now()})),onMouseLeave:()=>ae.dispatch(op({id:t,freeze:void 0,spawned_at:i+(Date.now()-l)})),children:[f.jsxs("div",{className:"wptb-v2-notification-icon",children:[n==="error"&&D6,n==="success"&&Kw,n==="progress"&&Ju,!o&&!s?null:f.jsxs("svg",{viewBox:"0 0 36 36",xmlns:"http://www.w3.org/2000/svg",className:"wptb-v2-notification-progress",children:[f.jsx("path",{d:`M18 2.0845
a 15.9155 15.9155 0 0 1 0 31.831
a 15.9155 15.9155 0 0 1 0 -31.831`,fill:"none",stroke:"#eee",strokeWidth:"2.5"}),f.jsx("path",{className:"wptb-v2-notification-circle",d:`M18 2.0845
a 15.9155 15.9155 0 0 1 0 31.831
a 15.9155 15.9155 0 0 1 0 -31.831`,fill:"none",stroke:"#00acc1",strokeWidth:"2.5",strokeDasharray:"var(--progress), 100"})]})]}),f.jsx("div",{className:"wptb-v2-notification-message",children:r})]}),document.body))})},ip=[];let Rf=!1;const W6=()=>{if(Rf)return;Rf=!0;const e=()=>{var t;try{for(;ip.length>0;)(t=ip.shift())==null||t();Rf=!1}catch{setTimeout(e,100)}};setTimeout(e,100)},Rn=(e,t="success",n=5e3)=>{const r={value:0};try{ae.dispatch(lm({message:e,type:t,duration:n,captureId:r}))}catch{ip.push(()=>ae.dispatch(lm({message:e,type:t,duration:n,captureId:r}))),W6()}return r.value},OL=(e,t)=>{ae.dispatch(op({id:e,...t}))},Xw=(e,{itemsPerHead:t,enableHead:n})=>{var h;const r=e.blocksProps,o=e.desktop,s={};let i=0;const l=n&&o.length>1;if(l){let p=0;if(t+=1,i=1,o.forEach((g,v)=>{const x=g[0],m=r[x];s[v]={id:x,colspan:m.colspan},p=Math.max(p,m.colspan)}),p>=t)return Rn("Some cells in the first column have more than "+t+" spans","error"),o}const a={};for(let p=0;p<o.length;p++)l?a[p]={filled:s[p].colspan,rows:[[s[p].id]]}:a[p]={filled:0,rows:[[]]};for(let p=0;p<o.length;p++){const g=o[p];g.forEach(m=>r[m].responsive=void 0);const v=a[p];let x=v.rows[0];for(let m=i;m<g.length;m++){const y=g[m];x.push(y);const w=r[y],S=((h=w.responsive)==null?void 0:h.colspan)||w.colspan,k=t-a[p].filled,T=Math.min(S,k);if(v.filled+=1,T<S){w.responsive={isVisible:!0,colspan:T};const C=r[g[m+T]];C.responsive={isVisible:!0,colspan:S-T,rowspan:w.rowspan}}x.length===t&&(x=[],v.filled=0,v.rows.push(x),l&&(v.filled=s[p].colspan,x.push(s[p].id)))}}const c={},u=[],d=a[0].rows.length;for(let p=0;p<d;p++)for(let g=0;g<o.length;g++){const v=a[g].rows[p];(v.length>1||!l)&&u.push(v),u.length%o.length===0&&u.length>0&&(c[u.length-1]=!0)}return r[be].isEdgeRow=c,u},Jw=(e,{itemsPerHead:t,enableHead:n})=>{var p;const r=e.blocksProps,o=e.desktop,s=r[be];o.forEach(g=>g.forEach(v=>r[v].responsive=void 0));const i={};let l=0;const a=n&&o.length>1;if(a){let g=0;if(t+=1,l=1,o[0].forEach((v,x)=>{const m=r[v];i[x]={id:v,colspan:m.rowspan,rowspan:m.colspan},g=Math.max(g,m.rowspan),m.responsive={colspan:m.rowspan,rowspan:m.colspan}}),g>=t)return Rn("Some cells in the first row have more than "+t+" spans","error"),o}const c={};for(let g=0;g<s.colCount;g++)a?c[g]={filled:i[g].colspan,rows:[[i[g].id]]}:c[g]={filled:0,rows:[[]]};for(let g=0;g<s.colCount;g++){const v=c[g];let x=v.rows[0];for(let m=l;m<o.length;m++){const y=o[m][g];x.push(y);const w=r[y],S=((p=w.responsive)==null?void 0:p.colspan)||w.rowspan,k=t-c[g].filled,T=Math.min(S,k);if(v.filled+=1,w.responsive||(w.responsive={colspan:w.rowspan,rowspan:w.colspan}),T<S){w.responsive.colspan=T;const C=o[m+T][g],I=r[C];I.responsive={isVisible:!0,colspan:S-T,rowspan:w.colspan}}x.length===t&&(x=[],v.filled=0,v.rows.push(x),a&&(v.filled=i[g].colspan,x.push(i[g].id)))}}const u={},d=[],h=c[0].rows.length;for(let g=0;g<h;g++)for(let v=0;v<s.colCount;v++){const x=c[v].rows[g];(x.length>1||!a)&&d.push(x),d.length%s.colCount===0&&d.length>0&&(u[d.length-1]=!0)}return s.isEdgeRow=u,d},G6=(e,t)=>{var a;const{device:n,tableId:r}=t.payload,o=e[r];if(n==="desktop")return;let s=o.desktop;const i=(a=o.blocksProps[be])==null?void 0:a.responsive,l=i==null?void 0:i[n];if(!(i!=null&&i.enable)||l.disable){o[n]=s;return}l.stackDirection==="row"?s=Jw(o,l):s=Xw(o,l),o[n]=s},Tr=(e,t)=>{var s;let n=e.desktop;if(t==="desktop")return n;const r=(s=e.blocksProps[be])==null?void 0:s.responsive,o=r==null?void 0:r[t];return!(r!=null&&r.enable)||o!=null&&o.disable||((o==null?void 0:o.stackDirection)==="row"?n=Jw(e,o):n=Xw(e,o)),n};var xt=[];for(var Lf=0;Lf<256;++Lf)xt.push((Lf+256).toString(16).slice(1));function K6(e,t=0){return(xt[e[t+0]]+xt[e[t+1]]+xt[e[t+2]]+xt[e[t+3]]+"-"+xt[e[t+4]]+xt[e[t+5]]+"-"+xt[e[t+6]]+xt[e[t+7]]+"-"+xt[e[t+8]]+xt[e[t+9]]+"-"+xt[e[t+10]]+xt[e[t+11]]+xt[e[t+12]]+xt[e[t+13]]+xt[e[t+14]]+xt[e[t+15]]).toLowerCase()}var fc,Y6=new Uint8Array(16);function Z6(){if(!fc&&(fc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!fc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fc(Y6)}var Q6=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const am={randomUUID:Q6};function Wr(e,t,n){if(am.randomUUID&&!e)return am.randomUUID();e=e||{};var r=e.random||(e.rng||Z6)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,K6(r)}const ed=(e,t,n)=>{const r=e.innerBlocks[t];if(r)for(const s of r.blockOrder)ed(e,s,n);const o=e.innerBlocks[r.parentId];o&&(o.blockOrder=o.blockOrder.filter(s=>s!==t)),delete e.blocksProps[t],delete e.innerBlocks[t],n.removeBlock(t)},e5=(e,t,n,r,o)=>{const s=Wr(),{defaultInnerBlocks:i,defaultProps:l}=Qr[t];e.blocksProps[s]={...l,...o};const a={name:t,parentId:n,blockOrder:[]};if(i)for(const[c,u]of i){const d=e5(e,c,s,r,u);a.blockOrder.push(d)}return e.innerBlocks[s]=a,r.addBlock(s),s},t5=(e,t,n,r)=>{const o=Wr(),s=e.innerBlocks[t],i={name:s.name,parentId:r||s.parentId,blockOrder:[]};return e.innerBlocks[o]=i,e.blocksProps[o]=JSON.parse(JSON.stringify(e.blocksProps[t])),s.blockOrder.forEach(l=>{i.blockOrder.push(t5(e,l,n,o))}),n.addBlock(o),o},Zn={rowCount:4,colCount:4,alignment:"center",cellMinWidth:"120px",enableMaxWidth:!1,cellPadding:"10px",tableBorder:{width:"1px",style:"solid",color:"#000000"},enableInnerBorder:!0,headerInnerBorder:!0,innerBorder:{width:"1px",style:"solid",color:"#000000"},separateRowCol:!1,responsive:{widthTarget:"window",enable:!1,mobile:{disable:!1,maxWidth:"375px",enableHead:!0,staticHead:!1,stackDirection:"row",itemsPerHead:2},tablet:{disable:!1,maxWidth:"700px",enableHead:!0,staticHead:!1,stackDirection:"row",itemsPerHead:2}},columnsProps:{},rowsProps:{}},yu={rowspan:1,colspan:1},X6=(e,t)=>{const{cellId:n,device:r,capturer:o,tableId:s}=t.payload,i=e[s],l=i.desktop,a=i.blocksProps,c=a[be];if(c.colCount===1)return;const{col:u,colspan:d}=a[n];for(let p=0;p<l.length;p++){const g=l[p],v=[];for(let x=0;x<g.length;x++){const m=g[x],y=a[m];if(y.col>=u&&y.col+y.colspan<=u+d){i.innerBlocks[m].blockOrder.forEach(w=>{ed(i,w,o)}),o.removeBlock(m);continue}v.push(m),y.col>u?(a[m]={...y,col:y.col-d},o.props(m)):y.col+y.colspan>u&&(a[m]={...y,colspan:y.colspan-d},o.props(m))}l[p]=v}const h={};if(c.columnsProps)for(const p in c.columnsProps){const g=parseInt(p);g!=u&&(g>u?h[g-d]=c.columnsProps[p]:h[p]=c.columnsProps[p])}c.columnsProps=h,c.colCount=c.colCount-d,o.props(be),o.table(),i.tablet=i.desktop,i.mobile=i.desktop,r&&(i[r]=Tr(i,r))},J6=(e,t)=>{const{cellId:n,device:r,capturer:o,tableId:s}=t.payload,i=e[s],l=i.desktop,a=i.blocksProps,c=a[be],u=c.rowsProps;if(l.length===1)return;const{row:d,rowspan:h}=a[n];for(let p=d;p<d+h;p++){const g=l[p];for(let v=0;v<g.length;v++){const x=g[v];i.innerBlocks[x].blockOrder.forEach(m=>{ed(i,m,o)}),o.removeBlock(x)}}i.desktop.splice(d,h);for(let p=0;p<d;p++){const g=l[p];for(let v=0;v<g.length;v++){const x=g[v],m=a[x];p+m.rowspan>d&&(a[x].rowspan=m.rowspan-h,o.props(x))}}for(let p=d;p<l.length;p++){const g=l[p];for(let v=0;v<g.length;v++){const x=g[v],m=a[x];a[x].row=m.row-h,o.props(x)}u[p]&&(u[p-h]=u[p],delete u[p])}c.rowCount-=h,o.props(be),o.table(),i.mobile=i.desktop,i.tablet=i.desktop,r&&(i[r]=Tr(i,r))},e7=(e,t)=>{const{cellId:n,after:r,device:o,capturer:s,tableId:i}=t.payload,l=e[i],a=l.desktop,c=l.blocksProps,u=l.innerBlocks,d=c[be];let h;n?(h=c[n].col,h+=r?1:0):r?h=d.colCount:h=0;for(let g=0;g<a.length;g++){const v=a[g];let x=!1;for(let w=0;w<v.length;w++){const S=v[w],k=c[S];k.col>=h?(k.col+=1,s.props(S)):k.col+k.colspan>h&&(k.colspan+=1,s.props(S),x=!0)}const m=Wr();v.splice(h,0,m),u[m]={name:"cell",blockOrder:[],parentId:h.toString()};const y={...yu,row:g,col:h,isNotACell:x};c[m]=y,s.addBlock(m)}const p={};for(const g in d.columnsProps){const v=parseInt(g);v<h?p[g]=d.columnsProps[g]:p[v+1]=d.columnsProps[g]}d.columnsProps=p,d.colCount+=1,s.props(be),s.table(),l.mobile=l.desktop,l.tablet=l.desktop,o&&(l[o]=Tr(l,o))},t7=(e,t)=>{var v,x;const{cellId:n,after:r,device:o,capturer:s,tableId:i}=t.payload,l=e[i],a=l.desktop,c=l.blocksProps,u=l.innerBlocks,d=c[be];let h;n?(h=c[n].row,h+=r?1:0):r?h=d.rowCount:h=0;const p={};for(let m=a.length-1;m>=0;m--){const y=a[m];for(let w=0;w<y.length;w++){const S=y[w],k=c[S];k.row>=h?(k.row+=1,s.props(S)):k.row+k.rowspan>h&&(k.rowspan+=1,s.props(S),p[k.row]={start:k.col+1,end:k.col+k.colspan})}d.rowsProps[m]&&(d.rowsProps[m+1]=d.rowsProps[m],delete d.rowsProps[m])}const g=[];for(let m=0;m<d.colCount;m++){const y=Wr();g.push(y),u[y]={name:"cell",blockOrder:[],parentId:h.toString()};const w={...yu,row:h,col:m,isNotACell:((v=p[h])==null?void 0:v.start)<=m&&((x=p[h])==null?void 0:x.end)>=m};c[y]=w,s.addBlock(y)}a.splice(h,0,g),d.rowCount+=1,s.props(be),s.table(),l.mobile=l.desktop,l.tablet=l.desktop,o&&(l[o]=Tr(l,o))},n7=(e,t)=>{const{data:n,capturer:r,device:o,byCol:s,order:i,tableId:l}=t.payload,a=e[l],c=a.desktop,u=a.blocksProps,d=[];for(let p=0;p<n.length;p++){const{from:g,end:v}=n[p];for(let x=g;x<=v;x++){const m=d.length;d.push(c[p]);const y=c[p];for(let w=0;w<y.length;w++){const S=y[w],k=u[S];k.row=m,r.props(S)}}}const h=u[be];h.sortVertical={enable:!0,by:s,order:i},a.desktop=d,r.props(be),r.table(),a.mobile=a.desktop,a.tablet=a.desktop,o&&(a[o]=Tr(a,o))},r7=(e,t)=>{const{data:n,capturer:r,device:o,byRow:s,order:i,tableId:l}=t.payload,a=e[l],c=a.desktop,u=a.blocksProps,d={};n.forEach((p,g)=>{d[p.from]=g}),c.forEach((p,g)=>{const v=[],x={};p.forEach(m=>{const w=u[m].col||0;x[w]=m}),n.forEach((m,y)=>{const w=x[m.from];if(w){v.push(w);const S=u[w];S.col=y,r.props(w)}}),c[g]=v});const h=u[be];h.sortHorizontal={enable:!0,by:s,order:i},r.props(be),r.table(),a.mobile=a.desktop,a.tablet=a.desktop,o&&(a[o]=Tr(a,o))},o7=(e,t)=>{const{cells:n,boundary:{top:r,right:o,bottom:s,left:i},device:l,capturer:a,tableId:c}=t.payload,u=e[c],d=u.desktop,h=u.innerBlocks,p=u.blocksProps,g=n.shift(),v=h[g];if(!v)return;const x=p[be];for(let k=0;k<n.length;k++){const T=n[k],C=h[T],I=p[T];I.isNotACell=!0,I.colspan=1,I.rowspan=1,a.props(T),C.blockOrder.forEach(j=>{h[j].parentId=g,v.blockOrder.push(j),a.moveBlock(j)}),C.blockOrder=[]}let m=0,y=0,w=o-i+1,S=s-r+1;if(s-r===x.rowCount-1&&(y=o-i),o-i===x.colCount-1&&(m=s-r),m){for(let k=r+1;k<=s;k++)d[k].forEach(C=>{delete p[C],delete h[C],a.removeBlock(C)}),x.rowsProps[k]&&delete x.rowsProps[k];for(let k=s+1;k<d.length;k++)d[k].forEach(C=>{const I=p[C];I.row=I.row-m,a.props(C)}),x.rowsProps[k]&&(x.rowsProps[k-m]=x.rowsProps[k],delete x.rowsProps[k]);d.splice(r+1,m),x.rowCount=x.rowCount-m,S=1,a.table()}if(y){for(let T=0;T<d.length;T++)d[T].forEach(I=>{const j=p[I];if(!(j.col<=i)){if(j.col>o){j.col=j.col-y,a.props(I);return}delete p[I],delete h[I],a.removeBlock(I)}});const k=x.columnsProps;for(const T in k){const C=parseInt(T);C<=i?k[C]=k[T]:C>=o&&(k[C-y]=k[T])}x.columnsProps=k,x.colCount=x.colCount-y,w=1,a.table()}p[g]={...p[g],rowspan:S,colspan:w},a.props(g),a.props(be),u.mobile=u.desktop,u.tablet=u.desktop,l&&(u[l]=Tr(u,l))},s7=(e,t)=>{const{cellId:n,device:r,tableId:o,capturer:s}=t.payload,i=e[o],l=i.blocksProps,a=l[n],{colspan:c,rowspan:u,col:d}=a;if(c===1&&u===1)return;const h=i.desktop,p=a.row;for(let g=p;g<u+p;g++){const v=h[g];for(let x=d;x<d+c;x++){const m=v[x];l[m].isNotACell=!1,s.props(m)}}a.rowspan=1,a.colspan=1,s.props(n),i.mobile=i.desktop,i.tablet=i.desktop,r&&(i[r]=Tr(i,r))},i7=(e,t)=>{const{tableId:n,parentId:r,blockName:o,props:s,index:i,siblingId:l,after:a=!0,newId:c,capturer:u}=t.payload,d=e[n],h=d.innerBlocks[r];if(!h)throw new Error(`Parent block ${r} not found`);const p=e5(d,o,r,u,s);if(c&&(c.current=p),i!==void 0){h.blockOrder.splice(i,0,p);return}if(!l){a?h.blockOrder.push(p):h.blockOrder.unshift(p);return}let g=h.blockOrder.indexOf(l);a&&(g+=1),h.blockOrder.splice(g,0,p)},l7=(e,t)=>{const{blockId:n,capturer:r,tableId:o}=t.payload,s=e[o];if(!s.innerBlocks[n])throw new Error(`Block ${n} not found`);ed(s,n,r)},a7=(e,t)=>{const{blockId:n,capturer:r,tableId:o}=t.payload,s=e[o],i=s.innerBlocks[n];if(!i)throw new Error(`Block ${n} not found`);const l=s.innerBlocks[i.parentId],a=l.blockOrder.indexOf(n);l.blockOrder.splice(a+1,0,t5(s,n,r))},c7=(e,t)=>{const{blockId:n,targetId:r,siblingId:o,after:s,capturer:i,tableId:l}=t.payload,a=e[l],c=a.innerBlocks[n];if(!c)throw new Error(`Block ${n} not found`);const u=a.innerBlocks[r];if(!u)throw new Error(`Parent block ${r} not found`);i.moveBlock(n);const d=a.innerBlocks[c.parentId];if(d&&(d.blockOrder=d.blockOrder.filter(h=>h!==n)),c.parentId=r,!o){s?u.blockOrder.push(n):u.blockOrder.unshift(n);return}s?u.blockOrder.splice(u.blockOrder.indexOf(o)+1,0,n):u.blockOrder.splice(u.blockOrder.indexOf(o),0,n)},be="table",u7={},Z1=Y1({name:"table",initialState:u7,reducers:{setTable:(e,t)=>{const{id:n,table:r}=t.payload;e[n]=r},changeId:(e,t)=>{const{oldId:n,newId:r}=t.payload;e[r]=e[n],e[r].id=r,delete e[n]},setTableInfo:(e,t)=>{Object.assign(e[t.payload.id],t.payload)},setResponsive:G6,addBlock:i7,removeBlock:l7,duplicateBlock:a7,moveBlockInto:c7,addColumn:e7,addRow:t7,removeCol:X6,removeRow:J6,mergeCells:o7,splitCell:s7,sortRows:n7,sortColumns:r7,customReducer:(e,t)=>{t.payload(e)}}}),{setTable:d7,changeId:ML,setTableInfo:lp,setResponsive:f7,addBlock:h7,removeBlock:p7,duplicateBlock:g7,moveBlockInto:m7,mergeCells:v7,splitCell:y7,removeCol:w7,removeRow:b7,addColumn:x7,addRow:S7,sortRows:k7,sortColumns:T7,customReducer:hc}=Z1.actions,BL=Z1.actions,E7={devicePreview:"desktop",isSaving:!1,timeTravel:{total:0,cursor:0,lastSaved:0}},Q1=Y1({name:"editorSettings",initialState:E7,reducers:{setSettings:(e,t)=>{Object.assign(e,t.payload)},setActiveBlock:(e,t)=>{e.activeBlock=t.payload},timeTravel:(e,t)=>{const n=t.payload;e.timeTravel.cursor=n},timeTravelAdded:(e,t)=>{e.timeTravel.cursor=t.payload,e.timeTravel.total=t.payload,e.timeTravel.lastSaved&&e.timeTravel.lastSaved>=e.timeTravel.cursor&&(e.timeTravel.lastSaved=void 0)},startSaving:e=>{e.isSaving=!0,e.timeTravel.lastSaved=e.timeTravel.cursor}}}),{setSettings:Mt,setActiveBlock:oa,timeTravel:C7,timeTravelAdded:I7,startSaving:N7}=Q1.actions,PL=Q1.actions,ae=g6({middleware:e=>e({serializableCheck:!1}),reducer:{ui:Uw.reducer,table:Z1.reducer,editorSettings:Q1.reducer}});var n5={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(s=o(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var l in s)t.call(s,l)&&s[l]&&(i=o(i,l));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(n5);var A7=n5.exports;const et=Di(A7),X1=({onClose:e,title:t,children:n,icon:r,body:o,className:s})=>Ho.createPortal(f.jsx("div",{className:`wptb-modal ${s||""}`,onPointerUp:i=>i.stopPropagation(),children:f.jsxs("div",{className:"wptb-modal-body",children:[f.jsx("div",{className:"wptb-modal-icon",children:r}),f.jsxs("div",{className:"wptb-modal-content",children:[f.jsx("h2",{className:"wptb-modal-title",children:t}),n]}),f.jsx("button",{type:"button",className:"wptb-modal-close",onClick:e,children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12z"})})}),o]})}),document.body),j7=f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"40px",height:"50px",children:[f.jsx("path",{d:"M59.7 0h-51.2C3.8 0 0 3.8 0 8.5v51.2c0 4.7 3.8 8.5 8.5 8.5h51.2c4.7 0 8.5-3.8 8.5-8.5v-51.2C68.3 3.8 64.4 0 59.7 0zM51.2 51.2H17.1V17.1H51.2V51.2z"}),f.jsx("path",{d:"M503.5 0h-51.2c-4.7 0-8.5 3.8-8.5 8.5v51.2c0 4.7 3.8 8.5 8.5 8.5h51.2c4.7 0 8.5-3.8 8.5-8.5v-51.2C512 3.8 508.2 0 503.5 0zM494.9 51.2H460.8V17.1h34.1V51.2z"}),f.jsx("path",{d:"M59.7 443.7h-51.2c-4.7 0-8.5 3.8-8.5 8.5v51.2C0 508.2 3.8 512 8.5 512h51.2c4.7 0 8.5-3.8 8.5-8.5v-51.2C68.3 447.5 64.4 443.7 59.7 443.7zM51.2 494.9H17.1V460.8H51.2V494.9z"}),f.jsx("path",{d:"M503.5 443.7h-51.2c-4.7 0-8.5 3.8-8.5 8.5v51.2c0 4.7 3.8 8.5 8.5 8.5h51.2c4.7 0 8.5-3.8 8.5-8.5v-51.2C512 447.5 508.2 443.7 503.5 443.7zM494.9 494.9H460.8V460.8h34.1V494.9z"}),f.jsx("path",{d:"M477.9 51.2H460.8V34.1c0-4.7-3.8-8.5-8.5-8.5H59.7c-4.7 0-8.5 3.8-8.5 8.5V51.2H34.1c-4.7 0-8.5 3.8-8.5 8.5v392.5c0 4.7 3.8 8.5 8.5 8.5H51.2v17.1c0 4.7 3.8 8.5 8.5 8.5h392.5c4.7 0 8.5-3.8 8.5-8.5V460.8h17.1c4.7 0 8.5-3.8 8.5-8.5V59.7C486.4 55 482.6 51.2 477.9 51.2zM469.3 443.7h-17.1c-4.7 0-8.5 3.8-8.5 8.5v17.1H68.3v-17.1c0-4.7-3.8-8.5-8.5-8.5H42.7V68.3h17.1c4.7 0 8.5-3.8 8.5-8.5V42.7h375.5v17.1c0 4.7 3.8 8.5 8.5 8.5h17.1V443.7z"}),f.jsx("path",{d:"M401.1 76.8H110.9c-4.7 0-8.5 3.8-8.5 8.5V153.6c0 4.7 3.8 8.5 8.5 8.5h34.1c4.7 0 8.5-3.8 8.5-8.5V128h76.8v256h-34.1c-4.7 0-8.5 3.8-8.5 8.5v34.1c0 4.7 3.8 8.5 8.5 8.5h119.5c4.7 0 8.5-3.8 8.5-8.5v-34.1c0-4.7-3.8-8.5-8.5-8.5H281.6V128h76.8v25.6c0 4.7 3.8 8.5 8.5 8.5h34.1c4.7 0 8.5-3.8 8.5-8.5V85.3C409.6 80.6 405.8 76.8 401.1 76.8zM392.5 145.1h-17.1v-25.6c0-4.7-3.8-8.5-8.5-8.5h-93.9c-4.7 0-8.5 3.8-8.5 8.5v273.1c0 4.7 3.8 8.5 8.5 8.5H307.2v17.1H204.8v-17.1h34.1c4.7 0 8.5-3.8 8.5-8.5V119.5c0-4.7-3.8-8.5-8.5-8.5h-93.9c-4.7 0-8.5 3.8-8.5 8.5v25.6h-17.1v-51.2h273.1V145.1z"})]}),R7=f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"50",viewBox:"0 0 65 65",children:[f.jsx("path",{d:"M64.5 24.1c0 3.8-3.1 6.9-6.9 6.9H7.4C3.6 31 0.5 27.9 0.5 24.1V6.9C0.5 3.1 3.6 0 7.4 0h50.1C61.4 0 64.5 3.1 64.5 6.9V24.1zM60.5 6.9C60.5 5.3 59.2 4 57.6 4H7.4C5.8 4 4.5 5.3 4.5 6.9v17.1c0 1.6 1.3 2.9 2.9 2.9h50.1c1.6 0 2.9-1.3 2.9-2.9L60.5 6.9 60.5 6.9z"}),f.jsx("path",{d:"M64.5 58.1c0 3.8-3.1 6.9-6.9 6.9H7.4C3.6 65 0.5 61.9 0.5 58.1V40.9C0.5 37.1 3.6 34 7.4 34h50.1c3.8 0 6.9 3.1 6.9 6.9L64.5 58.1 64.5 58.1zM60.5 40.9c0-1.6-1.3-2.9-2.9-2.9H7.4C5.8 38 4.5 39.3 4.5 40.9v17.1c0 1.6 1.3 2.9 2.9 2.9h50.1c1.6 0 2.9-1.3 2.9-2.9L60.5 40.9 60.5 40.9z"}),f.jsx("path",{d:"M8.5 16c-0.6 0-1-0.4-1-1v-1.8C7.5 10.4 9.8 8 12.4 8h6.2c0.6 0 1 0.4 1 1s-0.4 1-1 1h-6.2c-1.6 0-2.9 1.7-2.9 3.2V15C9.5 15.6 9.1 16 8.5 16z"}),f.jsx("path",{d:"M8.6 19.4c-0.3 0-0.5-0.1-0.7-0.3 -0.2-0.2-0.3-0.4-0.3-0.7 0-0.3 0.1-0.5 0.3-0.7 0.4-0.4 1-0.4 1.4 0 0.2 0.2 0.3 0.5 0.3 0.7 0 0.3-0.1 0.5-0.3 0.7C9.1 19.3 8.9 19.4 8.6 19.4z"})]}),L7=f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 489.4 489.4",width:"40px",height:"50px",children:[f.jsx("path",{d:"M0 437.8c0 28.5 23.2 51.6 51.6 51.6h386.2c28.5 0 51.6-23.2 51.6-51.6V51.6c0-28.5-23.2-51.6-51.6-51.6H51.6C23.1 0 0 23.2 0 51.6 0 51.6 0 437.8 0 437.8zM437.8 464.9H51.6c-14.9 0-27.1-12.2-27.1-27.1v-64.5l92.8-92.8 79.3 79.3c4.8 4.8 12.5 4.8 17.3 0l143.2-143.2 107.8 107.8v113.4C464.9 452.7 452.7 464.9 437.8 464.9zM51.6 24.5h386.2c14.9 0 27.1 12.2 27.1 27.1v238.1l-99.2-99.1c-4.8-4.8-12.5-4.8-17.3 0L205.2 333.8l-79.3-79.3c-4.8-4.8-12.5-4.8-17.3 0l-84.1 84.1v-287C24.5 36.7 36.7 24.5 51.6 24.5z"}),f.jsx("path",{d:"M151.7 196.1c34.4 0 62.3-28 62.3-62.3s-28-62.3-62.3-62.3 -62.3 28-62.3 62.3S117.3 196.1 151.7 196.1zM151.7 96c20.9 0 37.8 17 37.8 37.8s-17 37.8-37.8 37.8 -37.8-17-37.8-37.8S130.8 96 151.7 96z"})]}),cm=f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"40px",height:"50px",children:[f.jsx("path",{d:"M469.3 0H42.7C19.1 0 0 19.1 0 42.7v426.7C0 492.9 19.1 512 42.7 512h426.7C492.9 512 512 492.9 512 469.3V42.7C512 19.1 492.9 0 469.3 0zM494.9 469.3c0 14.1-11.5 25.6-25.6 25.6H42.7c-14.1 0-25.6-11.5-25.6-25.6V42.7c0-14.1 11.5-25.6 25.6-25.6h426.7c14.1 0 25.6 11.5 25.6 25.6V469.3z"}),f.jsx("path",{d:"M119.5 230.4c-14.1 0-25.6 11.5-25.6 25.6s11.5 25.6 25.6 25.6 25.6-11.5 25.6-25.6S133.6 230.4 119.5 230.4zM119.5 264.5c-4.7 0-8.5-3.8-8.5-8.5s3.8-8.5 8.5-8.5S128 251.3 128 256 124.2 264.5 119.5 264.5z"}),f.jsx("path",{d:"M409.6 247.5H170.7c-4.7 0-8.5 3.8-8.5 8.5s3.8 8.5 8.5 8.5H409.6c4.7 0 8.5-3.8 8.5-8.5S414.3 247.5 409.6 247.5z"}),f.jsx("path",{d:"M119.5 110.9c-14.1 0-25.6 11.5-25.6 25.6s11.5 25.6 25.6 25.6 25.6-11.5 25.6-25.6S133.6 110.9 119.5 110.9zM119.5 145.1c-4.7 0-8.5-3.8-8.5-8.5s3.8-8.5 8.5-8.5 8.5 3.8 8.5 8.5S124.2 145.1 119.5 145.1z"}),f.jsx("path",{d:"M409.6 128H170.7c-4.7 0-8.5 3.8-8.5 8.5s3.8 8.5 8.5 8.5H409.6c4.7 0 8.5-3.8 8.5-8.5S414.3 128 409.6 128z"}),f.jsx("path",{d:"M119.5 349.9c-14.1 0-25.6 11.5-25.6 25.6s11.5 25.6 25.6 25.6 25.6-11.5 25.6-25.6S133.6 349.9 119.5 349.9zM119.5 384c-4.7 0-8.5-3.8-8.5-8.5s3.8-8.5 8.5-8.5 8.5 3.8 8.5 8.5S124.2 384 119.5 384z"}),f.jsx("path",{d:"M409.6 366.9H170.7c-4.7 0-8.5 3.8-8.5 8.5s3.8 8.5 8.5 8.5H409.6c4.7 0 8.5-3.8 8.5-8.5S414.3 366.9 409.6 366.9z"})]}),_7=f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 24 24",viewBox:"0 0 24 24",width:"40px",height:"50px",children:[f.jsxs("g",{children:[f.jsx("g",{children:f.jsx("g",{children:f.jsx("path",{d:"m16.636 20c-.083 0-.166-.021-.242-.062l-4.394-2.429-4.393 2.429c-.169.094-.374.082-.53-.029s-.236-.3-.205-.489l.844-5.178-3.573-3.663c-.131-.134-.176-.33-.117-.508.06-.178.214-.307.399-.335l4.919-.752 2.204-4.696c.164-.351.74-.351.904 0l2.204 4.696 4.919.752c.186.028.34.158.399.335.059.178.014.374-.117.508l-3.573 3.663.845 5.178c.031.189-.049.379-.205.489-.086.06-.187.091-.288.091zm-11.099-9.423 3.07 3.147c.111.113.161.273.136.43l-.719 4.411 3.733-2.064c.15-.083.334-.083.484 0l3.734 2.064-.72-4.411c-.025-.157.024-.316.136-.43l3.07-3.147-4.221-.645c-.165-.025-.307-.131-.377-.282l-1.863-3.973-1.865 3.973c-.07.151-.212.257-.377.282z","data-original":"#000000","data-old_color":"#000000",fill:"#444444"})})}),f.jsx("g",{children:f.jsx("g",{children:f.jsx("path",{d:"m21.5 24h-19c-1.379 0-2.5-1.122-2.5-2.5v-19c0-1.378 1.121-2.5 2.5-2.5h19c1.379 0 2.5 1.122 2.5 2.5v19c0 1.378-1.121 2.5-2.5 2.5zm-19-23c-.827 0-1.5.673-1.5 1.5v19c0 .827.673 1.5 1.5 1.5h19c.827 0 1.5-.673 1.5-1.5v-19c0-.827-.673-1.5-1.5-1.5z","data-original":"#000000","data-old_color":"#000000",fill:"#444444"})})})]})," "]}),O7=f.jsx("svg",{viewBox:"0 0 32 32",width:"40px",height:"50px",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{id:"Layer_2","data-name":"Layer 2",children:[f.jsx("path",{d:"m27.465 1.5h-22.93a3.038 3.038 0 0 0 -3.035 3.035v22.93a3.038 3.038 0 0 0 3.035 3.035h22.93a3.038 3.038 0 0 0 3.035-3.035v-22.93a3.038 3.038 0 0 0 -3.035-3.035zm-22.93 1h22.93a2.037 2.037 0 0 1 2.035 2.035v2.965h-27v-2.965a2.037 2.037 0 0 1 2.035-2.035zm22.93 27h-22.93a2.037 2.037 0 0 1 -2.035-2.035v-18.965h27v18.965a2.037 2.037 0 0 1 -2.035 2.035z"}),f.jsx("circle",{cx:"26",cy:"5",r:"1"}),f.jsx("circle",{cx:"22",cy:"5",r:"1"}),f.jsx("circle",{cx:"18",cy:"5",r:"1"}),f.jsx("path",{d:"m11.979 14.646a.5.5 0 0 0 -.708 0l-3.5 3.5a.5.5 0 0 0 0 .708l3.5 3.5a.5.5 0 0 0 .708-.708l-3.147-3.146 3.147-3.146a.5.5 0 0 0 0-.708z"}),f.jsx("path",{d:"m20.729 14.646a.5.5 0 0 0 -.708.708l3.147 3.146-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708z"}),f.jsx("path",{d:"m17.974 14.553a.5.5 0 0 0 -.671.223l-3.5 7a.5.5 0 1 0 .894.448l3.5-7a.5.5 0 0 0 -.223-.671z"})]})}),M7=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"40px",height:"50px",viewBox:"0 0 1000 1000",enableBackground:"new 0 0 1000 1000",children:f.jsx("path",{d:`M10,67.6h172.9v57.6H67.6v749.4h115.3v57.6H10V67.6z
M817.1,67.6v57.6h115.3v749.4H817.1v57.6H990V67.6H817.1L817.1,67.6z
M522.1,469.3c-64.3-25-92.6-46.3-92.6-89.9c0-31.8,24.2-69.8,87.8-69.8c42.1,0,
73.3,13.8,88.5,22.1l16.6-49.1c-20.7-11.8-55.3-22.8-103-22.8c-90.6,0-150.7,
54-150.7,126.5c0,65.7,47,105.1,123.1,132.1c62.9,24.2,87.8,49.1,87.8,92.6c0,
47-36,79.6-97.5,79.6c-41.5,0-80.9-13.8-107.9-30.4L359,710.5c24.9,16.5,74,
29.7,118.9,29.7c109.9,0,163.2-62.2,163.2-134.1C641.1,537.6,600.9,499.7,
522.1,469.3L522.1,469.3z`})}),r5=f.jsx("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"40px",height:"50px",viewBox:"0 0 490.667 490.667",children:f.jsx("g",{children:f.jsx("g",{children:f.jsx("path",{d:`M245.333,0C110.059,0,0,110.059,0,245.333s110.059,245.333,245.333,245.333s245.333-110.059,245.333-245.333
S380.608,0,245.333,0z M256,21.867c114.987,5.461,207.339,97.792,212.8,212.8h-64c-5.291-79.723-69.077-143.509-148.8-148.8
V21.867z M384,245.333C384,321.792,321.792,384,245.333,384s-138.667-62.208-138.667-138.667s62.208-138.667,138.667-138.667
S384,168.875,384,245.333z M245.333,469.333c-123.52,0-224-100.48-224-224c0-119.915,94.784-217.835,213.333-223.467v64
c-83.264,5.525-149.333,74.816-149.333,159.467c0,88.235,71.765,160,160,160c40.277,0,77.013-15.061,105.173-39.723l45.227,45.227
C355.947,447.061,303.253,469.333,245.333,469.333z M410.816,395.755l-45.227-45.227c22.464-25.643,36.8-58.432,39.189-94.528h64
C466.24,309.717,444.8,358.421,410.816,395.755z`})})})}),B7=f.jsx("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",width:"40px",height:"50px",children:f.jsxs("g",{children:[f.jsx("path",{d:`M26.375,39.781C26.559,39.928,26.78,40,27,40c0.276,0,0.551-0.114,0.748-0.336l16-18c0.367-0.412,0.33-1.045-0.083-1.411
c-0.414-0.368-1.045-0.33-1.412,0.083l-15.369,17.29l-9.259-7.407c-0.43-0.345-1.061-0.273-1.405,0.156
c-0.345,0.432-0.275,1.061,0.156,1.406L26.375,39.781z`}),f.jsx("path",{d:"M0,0v60h60V0H0z M58,58H2V2h56V58z"})]})}),o5=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 40 50",height:"50",width:"40",children:f.jsx("g",{transform:"translate(0,-283.77082)",children:f.jsxs("g",{transform:"rotate(2.2844095,30.416572,302.78502)",children:[f.jsx("path",{d:"m 20.085673,285.71878 c -0.354105,1.7e-4 -1.263563,1.8917 -1.613282,1.94726 -0.349719,0.0556 -1.799997,-1.46114 -2.136718,-1.35156 -0.336723,0.10959 -0.616207,2.19065 -0.931641,2.35156 -0.315433,0.16092 -2.164795,-0.83522 -2.451172,-0.62695 -0.286378,0.20827 0.09012,2.27488 -0.160156,2.52539 -0.25027,0.25051 -2.315438,-0.12642 -2.523438,0.16016 -0.208001,0.28657 0.789517,2.13558 0.628907,2.45117 -0.16061,0.31559 -2.242299,0.59676 -2.3515626,0.93359 -0.1092636,0.33682 1.410696,1.78695 1.3554688,2.13672 -0.055227,0.34977 -1.9474348,1.26113 -1.9472657,1.61524 1.693e-4,0.3541 1.8917044,1.26356 1.9472657,1.61328 0.055561,0.34972 -1.4611478,1.8 -1.3515625,2.13672 0.1095854,0.33672 2.1906513,0.61621 2.3515623,0.93164 0.160911,0.31544 -0.835228,2.16479 -0.626953,2.45117 0.208274,0.28638 2.274881,-0.0901 2.52539,0.16015 0.250509,0.25027 -0.12642,2.31544 0.160157,2.52344 0.286576,0.208 2.135584,-0.78951 2.451171,-0.6289 0.315588,0.16061 0.596768,2.2423 0.933594,2.35156 0.336827,0.10927 1.786947,-1.4107 2.136719,-1.35547 0.349772,0.0552 1.261129,1.94744 1.615234,1.94727 0.354105,-1.6e-4 1.263563,-1.89171 1.613282,-1.94727 0.349719,-0.0556 1.799997,1.46114 2.136718,1.35156 0.336723,-0.10959 0.616207,-2.19065 0.931641,-2.35156 0.315433,-0.16092 2.164795,0.83522 2.451172,0.62695 0.286377,-0.20827 -0.09012,-2.27488 0.160156,-2.52539 0.25027,-0.25051 2.315437,0.12643 2.523438,-0.16015 0.208001,-0.28657 -0.789517,-2.13559 -0.628907,-2.45118 0.16061,-0.31559 2.242299,-0.59676 2.351563,-0.93359 0.109264,-0.33682 -1.410696,-1.78695 -1.355469,-2.13672 0.05523,-0.34977 1.947435,-1.26112 1.947266,-1.61523 -1.69e-4,-0.3541 -1.891705,-1.26356 -1.947266,-1.61328 -0.05556,-0.34972 1.461148,-1.8 1.351563,-2.13672 -0.109586,-0.33672 -2.190651,-0.61621 -2.351563,-0.93164 -0.160911,-0.31544 0.835228,-2.1648 0.626953,-2.45118 -0.208274,-0.28638 -2.274881,0.0901 -2.52539,-0.16015 -0.250509,-0.25027 0.12642,-2.31544 -0.160157,-2.52344 -0.286577,-0.208 -2.135584,0.78952 -2.451171,0.62891 -0.315588,-0.16061 -0.596768,-2.24231 -0.933594,-2.35157 -0.336827,-0.10927 -1.786948,1.4107 -2.136719,1.35547 -0.349772,-0.0552 -1.261129,-1.94742 -1.615234,-1.94726 z m 0.0059,3.45703 a 8.6797902,8.6797902 0 0 1 8.679688,8.67969 8.6797902,8.6797902 0 0 1 -8.679688,8.67968 8.6797902,8.6797902 0 0 1 -8.679688,-8.67968 8.6797902,8.6797902 0 0 1 8.679688,-8.67969 z m 0,1.48047 a 7.1985831,7.1985831 0 0 0 -7.199219,7.19922 7.1985831,7.1985831 0 0 0 7.199219,7.19922 7.1985831,7.1985831 0 0 0 7.199219,-7.19922 7.1985831,7.1985831 0 0 0 -7.199219,-7.19922 z"}),f.jsx("path",{d:"m 13.757548,304.87307 a 9.4653218,9.4653218 0 0 0 6.333984,2.44727 9.4653218,9.4653218 0 0 0 0.248047,-0.008 l 0.08594,-0.26367 z m -1.556641,2.89063 -7.4550778,22.86133 4.9570312,-3.50781 2.2656246,5.86328 7.404297,-22.70313 c -0.394714,-0.5887 -0.816208,-1.27568 -1.037109,-1.31055 -0.381427,-0.0602 -1.962769,1.59768 -2.330079,1.47852 -0.367309,-0.11915 -0.673429,-2.38931 -1.017578,-2.56445 -0.344149,-0.17515 -2.359364,0.91237 -2.671875,0.68554 -0.106505,-0.0773 -0.121081,-0.41348 -0.115234,-0.80273 z"}),f.jsx("path",{d:"m 28.564188,305.70706 c -0.253055,0.005 -0.445442,0.0313 -0.513672,0.0996 -0.27292,0.27318 0.138466,2.52678 -0.173828,2.7539 -0.312295,0.22712 -2.329847,-0.85907 -2.673828,-0.68359 -0.343981,0.17547 -0.648428,2.44494 -1.015625,2.56445 -0.298346,0.0971 -1.389526,-0.96435 -1.996094,-1.33789 l 7.66211,21.72071 2.126953,-5.39649 5.380859,2.74805 -7.914062,-22.44141 c -0.313437,-0.0148 -0.629191,-0.0321 -0.882813,-0.0273 z"})]})})}),s5=f.jsx("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",width:"40px",height:"50px",children:f.jsxs("g",{children:[f.jsx("path",{d:"M23.429,17H47c0.552,0,1-0.447,1-1s-0.448-1-1-1H23.429c-0.552,0-1,0.447-1,1S22.877,17,23.429,17z"}),f.jsx("path",{d:"M23.429,32H47c0.552,0,1-0.447,1-1s-0.448-1-1-1H23.429c-0.552,0-1,0.447-1,1S22.877,32,23.429,32z"}),f.jsx("path",{d:"M23.429,47H47c0.552,0,1-0.447,1-1s-0.448-1-1-1H23.429c-0.552,0-1,0.447-1,1S22.877,47,23.429,47z"}),f.jsx("path",{d:"M59,0H1C0.448,0,0,0.447,0,1v58c0,0.553,0.448,1,1,1h58c0.552,0,1-0.447,1-1V1C60,0.447,59.552,0,59,0z M58,58H2V2h56V58z"}),f.jsx("polygon",{points:`12.501,18.474 14.929,17.197 17.357,18.474 16.894,15.77 18.858,13.854 16.143,13.46 14.929,11 13.715,13.46
11,13.854 12.965,15.77 `}),f.jsx("polygon",{points:`12.501,33.557 14.929,32.28 17.357,33.557 16.894,30.853 18.858,28.938 16.143,28.543 14.929,26.083
13.715,28.543 11,28.938 12.965,30.853 `}),f.jsx("polygon",{points:`12.501,49 14.929,47.723 17.357,49 16.894,46.296 18.858,44.381 16.143,43.986 14.929,41.526 13.715,43.986
11,44.381 12.965,46.296 `})]})}),i5=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"50",width:"80",viewBox:"0 0 60 30",version:"1.1",children:f.jsxs("g",{transform:"translate(0.17284843,-11.082389)",children:[f.jsx("text",{x:"22.563559",y:"34.44915",children:f.jsx("tspan",{x:"22.563559",y:"34.44915",children:"Abc"})}),f.jsx("path",{d:"m 5.9540524,36.54669 0.9425513,-7.699117 -5.5217155,-5.447518 7.613559,-1.482738 3.4745938,-6.934839 3.762887,6.782733 7.669133,1.161552 -5.287967,5.674698 1.265191,7.652718 -7.031031,-3.275577 z"})]})}),l5=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 455.138 455.139",children:f.jsx("path",{d:"M0,141.653v171.832h455.138V141.653H0z M432.721,291.071H22.414V164.067h410.312v127.004H432.721z M104.294,271.465H44.528 v-89.652h59.767V271.465z M193.947,271.465h-59.765v-89.652h59.765V271.465z M287.334,271.465h-59.768v-89.652h59.768V271.465z",fill:"#4A5567"})}),a5=f.jsx("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"67.125px",height:"67.125px",viewBox:"0 0 67.125 67.125",children:f.jsx("g",{children:f.jsx("g",{children:f.jsx("path",{d:`M67.125,28.75c0-0.829-0.671-1.5-1.5-1.5h-1.25V17.125c0-0.829-0.671-1.5-1.5-1.5H4.25c-0.829,0-1.5,0.671-1.5,1.5V27.25
H1.5c-0.829,0-1.5,0.671-1.5,1.5c0,0.829,0.671,1.5,1.5,1.5c-0.829,0-1.5,0.671-1.5,1.5c0,0.829,0.671,1.5,1.5,1.5
c-0.829,0-1.5,0.672-1.5,1.5c0,0.829,0.671,1.5,1.5,1.5c-0.829,0-1.5,0.672-1.5,1.5c0,0.829,0.671,1.5,1.5,1.5h1.25V50
c0,0.829,0.671,1.5,1.5,1.5h58.625c0.829,0,1.5-0.671,1.5-1.5V39.25h1.25c0.829,0,1.5-0.671,1.5-1.5c0-0.828-0.671-1.5-1.5-1.5
c0.829,0,1.5-0.671,1.5-1.5c0-0.828-0.671-1.5-1.5-1.5c0.829,0,1.5-0.671,1.5-1.5c0-0.829-0.671-1.5-1.5-1.5
C66.453,30.25,67.125,29.579,67.125,28.75z M61.375,48.5H5.75v-9.25H7c0.829,0,1.5-0.671,1.5-1.5c0-0.828-0.671-1.5-1.5-1.5h2.125
c0.829,0,1.5-0.671,1.5-1.5c0-0.828-0.671-1.5-1.5-1.5h1.125c0.829,0,1.5-0.671,1.5-1.5c0-0.829-0.671-1.5-1.5-1.5H9.125
c0.829,0,1.5-0.671,1.5-1.5c0-0.829-0.671-1.5-1.5-1.5H5.75v-8.625h55.625v8.625H58c-0.829,0-1.5,0.671-1.5,1.5
c0,0.829,0.671,1.5,1.5,1.5h-1.125c-0.829,0-1.5,0.671-1.5,1.5c0,0.829,0.671,1.5,1.5,1.5H58c-0.829,0-1.5,0.672-1.5,1.5
c0,0.829,0.671,1.5,1.5,1.5h2.125c-0.829,0-1.5,0.672-1.5,1.5c0,0.829,0.671,1.5,1.5,1.5h1.25V48.5z`})})})}),P7=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",children:f.jsx("path",{fill:"currentColor",d:"M13.95 12a2.5 2.5 0 0 1-2.45 2h-7a2.5 2.5 0 0 1-2.45-2h4.328l.561.561a1.5 1.5 0 0 0 2.122 0L9.622 12zm.05-1h-3.381A1.5 1.5 0 0 0 9.5 8.5v-1A1.5 1.5 0 0 0 10.617 5H14zM2.05 4h4.33l.56-.56a1.5 1.5 0 0 1 2.12 0l.56.56h4.33a2.5 2.5 0 0 0-2.45-2h-7a2.5 2.5 0 0 0-2.45 2m3.39 3.061A1.5 1.5 0 0 1 5.382 5H2v6h3.381A1.5 1.5 0 0 1 6.5 8.5v-1c-.384 0-.768-.146-1.06-.439m4.414-.707a.5.5 0 0 1-.708 0L8.5 5.707v4.586l.646-.647a.5.5 0 1 1 .708.708l-1.5 1.5a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708l.646.647V5.707l-.646.647a.5.5 0 1 1-.708-.708l1.5-1.5a.5.5 0 0 1 .708 0l1.5 1.5a.5.5 0 0 1 0 .708"})}),z7=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 28 28",children:f.jsx("path",{fill:"currentColor",d:"M6.75 25A3.75 3.75 0 0 1 3 21.25V6.75A3.75 3.75 0 0 1 6.75 3h.75v8.647l-1.058 1.19a1.75 1.75 0 0 0 0 2.326l1.058 1.19V25zM9 25v-7.168a1.75 1.75 0 0 0 2.428-2.082h5.145A1.75 1.75 0 0 0 19 17.832V25zm8.087-14.558A1.75 1.75 0 0 1 19 10.168V3H9v7.168a1.75 1.75 0 0 1 2.428 2.082h5.145a1.75 1.75 0 0 1 .514-1.808m4.471 4.72l-1.058 1.19V25h.75A3.75 3.75 0 0 0 25 21.25V6.75A3.75 3.75 0 0 0 21.25 3h-.75v8.647l1.053 1.185l.002.002a1.75 1.75 0 0 1 .027 2.3l-.006.009zM9.42 13.25h9.16l-.89-1.002a.75.75 0 0 1 1.12-.996l1.998 2.247a.75.75 0 0 1 .013.987l-.01.012l-2 2.25a.75.75 0 1 1-1.122-.996l.89-1.002H9.42l.89 1.002a.75.75 0 0 1-1.12.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.12.996zm12.58.683v.14Z"})});Ns({name:"circle-rating",title:"Circle Rating",icon:r5,isUpsell:!0});Ns({name:"icon",title:"Icon",icon:B7,isUpsell:!0});Ns({name:"ribbon",title:"Ribbon",icon:o5,isUpsell:!0});Ns({name:"styled-list",title:"Styled List",icon:s5,isUpsell:!0});Ns({name:"text-icon",title:"Text Icon",icon:i5,isUpsell:!0});Ns({name:"progress-bar",title:"Progress Bar",icon:l5,isUpsell:!0});Ns({name:"badge",title:"Badge",icon:a5,isUpsell:!0});const um={"circle-rating":{title:"Circle Rating",icon:r5},ribbon:{title:"Ribbon",icon:o5},"styled-list":{title:"Styled List",icon:s5},"text-icon":{title:"Text Icon",icon:i5},"progress-bar":{title:"Progress Bar",icon:l5},badge:{title:"Badge",icon:a5},patterns:{title:"This pattern",icon:"P"}},dm={global:{icon:"G",enhancements:{separate_row_col:"Row/Column separation",font_style:"Global Font Style",row_col_border:"Row/Column only Border",cell_radius:"Cell Border Radius",sticky:"Sticky Top Row/First Column",pagination:"Pagination",search:"Search",duplicate_column:"Duplicate Column",duplicate_row:"Duplicate Row",disable_responsive:"Disabling Breakpoint",highlight_row:"Highlight Row",highlight_col:"Highlight Column",lazy_load:"Lazy Loading",save_as_template:"Save as Template"}},cell:{icon:"C",enhancements:{empty:"Empty Cell",bg:"Cell Background",border:"Cell Border"}},button:{icon:R7,enhancements:{label:"Button Label",margin:"Button Margin",padding:"Button Padding"}},"custom-html":{icon:O7,enhancements:{margin:"Custom HTML Margin",padding:"Custom HTML Padding"}},image:{icon:L7,enhancements:{size_relative_to:"Relative Size Option",size_self:"Relative to self Size Option",margin:"Image Margin",padding:"Image Padding"}},list:{icon:cm,enhancements:{margin:"List Margin",padding:"List Padding"}},"list-item":{icon:cm,enhancements:{tooltip:"List Item Tooltip"}},shortcode:{icon:M7,enhancements:{margin:"Shortcode Margin",padding:"Shortcode Padding"}},"star-rating":{icon:_7,enhancements:{margin:"Star Rating Margin",padding:"Star Rating Padding"}},text:{icon:j7,enhancements:{margin:"Text Margin",padding:"Text Padding"}},column:{icon:z7,enhancements:{move:"Column Moving"}},row:{icon:P7,enhancements:{move:"Row Moving",background:"Row Background"}}},qn=[];if(!WPTB_CFG.IS_PRO){for(const e in um){const{title:t,icon:n}=um[e];qn.push({name:e,icon:n,title:t})}for(const e in dm){const{enhancements:t,icon:n}=dm[e];for(const r in t)qn.push({name:`${e}.${r}`,icon:n,title:t[r]})}}const D7=({onClose:e,name:t})=>{const[n,r]=A.useState(qn[0]),[o,s]=A.useState(0);A.useEffect(()=>{const c=qn.findIndex(u=>u.name===t);c>-1?(r(qn[c]),s(c)):(r(qn[0]),s(0))},[t]);const i=()=>{const c=(o+1)%qn.length;s(c),r(qn[c])},l=()=>{const c=(o-1+qn.length)%qn.length;s(c),r(qn[c])},a=f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"wptb-upsell-modal-prev",onClick:l,children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsxs("g",{fill:"none",fillRule:"evenodd",children:[f.jsx("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),f.jsx("path",{fill:"currentColor",d:"M7.94 13.06a1.5 1.5 0 0 1 0-2.12l5.656-5.658a1.5 1.5 0 1 1 2.121 2.122L11.122 12l4.596 4.596a1.5 1.5 0 1 1-2.12 2.122l-5.66-5.658Z"})]})})}),f.jsx("button",{type:"button",className:"wptb-upsell-modal-next",onClick:i,children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsxs("g",{fill:"none",fillRule:"evenodd",children:[f.jsx("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),f.jsx("path",{fill:"currentColor",d:"M16.06 10.94a1.5 1.5 0 0 1 0 2.12l-5.656 5.658a1.5 1.5 0 1 1-2.121-2.122L12.879 12L8.283 7.404a1.5 1.5 0 0 1 2.12-2.122l5.658 5.657Z"})]})})})]});return f.jsxs(X1,{body:a,onClose:e,title:n.title,icon:n.icon,className:"wptb-upsell-modal",children:[f.jsxs("div",{className:"wptb-upsell-modal-description",children:[f.jsxs("p",{children:[f.jsx("strong",{children:n.title})," is not available on your free plan. Please get the ",f.jsx("strong",{style:{color:"#ffb636"},children:"PRO"})," ","add-on to unlock all exclusive features."]}),f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:[f.jsx("path",{fill:"#b1b4b5",d:"M376.749 349.097c-13.531 0-24.5-10.969-24.5-24.5V181.932c0-48.083-39.119-87.203-87.203-87.203c-48.083 0-87.203 39.119-87.203 87.203v82.977c0 13.531-10.969 24.5-24.5 24.5s-24.5-10.969-24.5-24.5v-82.977c0-75.103 61.1-136.203 136.203-136.203s136.203 61.1 136.203 136.203v142.665c0 13.531-10.969 24.5-24.5 24.5"}),f.jsx("path",{fill:"#ffb636",d:"M414.115 497.459H115.977c-27.835 0-50.4-22.565-50.4-50.4V274.691c0-27.835 22.565-50.4 50.4-50.4h298.138c27.835 0 50.4 22.565 50.4 50.4v172.367c0 27.836-22.565 50.401-50.4 50.401"}),f.jsx("path",{fill:"#ffd469",d:"M109.311 456.841h-2.525c-7.953 0-14.4-6.447-14.4-14.4V279.309c0-7.953 6.447-14.4 14.4-14.4h2.525c7.953 0 14.4 6.447 14.4 14.4v163.132c0 7.953-6.447 14.4-14.4 14.4"})]})]}),f.jsxs("p",{className:"wptb-upsell-modal-code",children:["Limited time: Use code ",f.jsx("span",{children:"WPTB10"})," to get a 10% discount."]}),f.jsx("a",{href:"https://wptablebuilder.com/pricing/",target:"_blank",className:"wptb-upsell-modal-unlock",children:"Unlock Now"})]})},sa=e=>{ae.dispatch(R6(e))},zL=()=>{const e=ke(t=>t.ui.upsell);return e?f.jsx(D7,{name:e,onClose:()=>sa()}):null},Tt=({name:e,children:t,noOverlayText:n})=>{const r=Lw[e];return r?f.jsx(f.Fragment,{children:r}):f.jsx(f.Fragment,{children:f.jsx("div",{className:et("wptb-upsell-control",{"wptb-upsell-control-no-overlay-text":n}),onClickCapture:o=>{sa(e),o.preventDefault()},children:t})})},os=e=>e?e.width+" "+e.style+" "+e.color:"",H7=(e,t)=>{var i,l,a,c;const n=t.innerBorderRadius;if(!t.enableInnerBorder||!t.headerInnerBorder&&e.row===0)return{borderRadius:n};const o={borderColor:((i=e.border)==null?void 0:i.color)||((l=t.innerBorder)==null?void 0:l.color)||"#000",borderStyle:"solid"};let s=(a=e.border)==null?void 0:a.width;if(s)t.columnBorderOnly?e.row===0?n&&(o.borderTopLeftRadius=n,o.borderTopRightRadius=n):e.row+e.rowspan===t.rowCount&&n&&(o.borderBottomLeftRadius=n,o.borderBottomRightRadius=n):t.rowBorderOnly?e.col===0?n&&(o.borderTopLeftRadius=n,o.borderBottomLeftRadius=n):e.col+e.colspan===t.colCount&&n&&(o.borderTopRightRadius=n,o.borderBottomRightRadius=n):o.borderRadius=n;else{const u=((c=t.innerBorder)==null?void 0:c.width)||"1px";t.columnBorderOnly?e.row===0?(s=`${u} ${u} 0px ${u}`,n&&(o.borderTopLeftRadius=n,o.borderTopRightRadius=n)):e.row+e.rowspan===t.rowCount?(s=`0px ${u} ${u} ${u}`,n&&(o.borderBottomLeftRadius=n,o.borderBottomRightRadius=n)):s=`0px ${u}`:t.rowBorderOnly?e.col===0?(s=`${u} 0px ${u} ${u}`,n&&(o.borderTopLeftRadius=n,o.borderBottomLeftRadius=n)):e.col+e.colspan===t.colCount?(s=`${u} ${u} ${u} 0px`,n&&(o.borderTopRightRadius=n,o.borderBottomRightRadius=n)):s=`${u} 0px`:(s=u,o.borderRadius=n)}return s?(o.borderWidth=s,o):{borderRadius:n}},c5=e=>{if(!e)return{};const t={};return e.top?(t.borderTop=os(e.top),t.borderRight=os(e.right),t.borderBottom=os(e.bottom),t.borderLeft=os(e.left)):e.width&&(t.border=os(e)),t},$7=(e,t="margin")=>{const n={};return e&&(typeof e=="string"?n[t]=e:e.top&&(n[t+"Top"]=e.top,n[t+"Right"]=e.right,n[t+"Bottom"]=e.bottom,n[t+"Left"]=e.left)),n},DL=e=>e?typeof e=="string"?e:e.topLeft+" "+e.topRight+" "+e.bottomRight+" "+e.bottomLeft:"",u5=(e,t,n)=>{let s;switch(e){case"px":s=n;break;case"rem":s=n*16;break;case"em":s=n*16;break;default:return n}let i;switch(t){case"px":i=s;break;case"rem":i=s/16;break;case"em":i=s/16;break;default:return n}return i},q7=e=>{if(!e)return;const t=e.tablet,n=e.mobile,r={responsiveEnabled:e.enable,responsiveMode:"auto",relativeWidth:e.widthTarget,preserveRowColor:!1,headerFullyMerged:!1,breakpoints:{desktop:{name:"desktop",width:1024},tablet:{name:"tablet",width:parseInt(t.maxWidth)},mobile:{name:"mobile",width:parseInt(n.maxWidth)}},modeOptions:{auto:{disabled:{desktop:!1,tablet:t.disable,mobile:n.disable},topRowAsHeader:{desktop:!1,tablet:t.enableHead,mobile:n.enableHead},repeatMergedHeader:{desktop:!0,tablet:!0,mobile:!0},staticTopRow:{desktop:!1,tablet:t.staticHead,mobile:n.staticHead},cellStackDirection:{desktop:"row",tablet:t.stackDirection,mobile:n.stackDirection},cellsPerRow:{desktop:1,tablet:t.itemsPerHead,mobile:n.itemsPerHead}}}};return btoa(JSON.stringify(r))},F7=e=>{var s;let t="all";e.columnBorderOnly?t="column":e.rowBorderOnly&&(t="row");const n=parseInt(((s=e.innerBorder)==null?void 0:s.width)||"0"),r=parseInt(e.innerBorderRadius||"0");return btoa(JSON.stringify({innerBorders:{active:t,borderWidth:n,borderRadiuses:{all:r,row:r,column:r}}}))},Pe=e=>typeof e=="object"?`${e.top} ${e.right} ${e.bottom} ${e.left}`:e,Vs=e=>{const t=document.createElement("div");t.innerHTML=e||"";const n=t.querySelectorAll("p");if(n.length===0)return t.innerHTML;let r="";return n.forEach((o,s)=>{r+=o.innerHTML,s<n.length-1&&(r+="<br>")}),r},Qt={text(e,t,n){if(t!=="text")return;const r=e.linkColor||n.linkColor,o=document.createElement("div");return o.innerHTML=e.text,r?o.querySelectorAll("a").forEach(i=>{i.style.color=r}):o.querySelectorAll("a").forEach(i=>{i.style.color=""}),{type:"text",props:{text:o.innerHTML,color:e.color||n.fontColor,fontSize:e.fontSize||n.fontSize,padding:Pe(e.padding),margin:Pe(e.margin)}}},image(e,t){var n;if(t==="image")return{type:"image",props:{src:e.src,alignment:e.alignment||"center",alt:e.alt,imgHeight:e.imgHeight,imgWidth:e.imgWidth,sizeRelativeTo:"container",size:e.size,width:e.width,url:e.url,linkRel:(n=e.linkRel)==null?void 0:n.join(" "),linkTarget:e.linkTarget,convertToAbsolute:e.convertToAbsolute?"true":!1,padding:Pe(e.padding),margin:Pe(e.margin)}}},button(e,t){var n;if(t==="button")return{type:"button",props:{text:Vs(e.text),fontSize:e.fontSize,size:e.size||"m",width:e.fullWidth?"100%":null,borderRadius:e.borderRadius,background:e.background,color:e.color,buttonAlignment:e.buttonAlignment,contentAlignment:e.contentAlignment,id:e.id,url:e.url,linkRel:(n=e.linkRel)==null?void 0:n.join(" "),linkTarget:e.linkTarget,convertToAbsolute:!!e.convertToAbsolute,hoverBg:e.hoverBg,hoverColor:e.hoverColor,hoverScale:e.hoverScale,icon:e.icon||"",iconPosition:e.iconPosition,iconSize:e.iconSize,hasLabel:e.hasLabel,labelBg:e.labelBg,labelColor:e.labelColor,labelText:e.labelText,padding:Pe(e.padding),margin:Pe(e.margin)}}},list(e,t,n,r){if(t!=="list")return;const o=[];return r.forEach(s=>{const i=n[s];o.push({text:Vs(i.text),alignment:i.alignment||e.alignment,toolTip:i.toolTip,tooltipPosision:i.tooltipPosision})}),{type:"list",props:{type:e.type,listIcon:"wptb-list-style-type-"+e.listIcon,color:e.color,fontSize:e.fontSize,itemSpacing:e.itemSpacing,padding:Pe(e.padding),margin:Pe(e.margin)},items:o}},starRating(e,t){if(t==="star-rating")return{type:"starRating",props:{starSize:e.starSize,starColor:e.starColor,starCount:e.maxValue,alignment:e.alignment,showRating:e.showRating,fontSize:e.fontSize,color:e.color,value:+e.value.toFixed(2),padding:Pe(e.padding),margin:Pe(e.margin)}}},html(e,t){if(t==="custom-html")return{type:"customHtml",props:{html:e.html,padding:Pe(e.padding),margin:Pe(e.margin)}}},shortCode(e,t){if(t==="shortcode")return{type:"shortcode",props:{shortcode:e.shortcode,padding:Pe(e.padding),margin:Pe(e.margin)}}},circleRating(e,t){if(t==="circle-rating")return{type:"circleRating",props:{size:e.size,color:e.color,ratingType:e.ratingType,value:e.value,total:e.total,margin:Pe(e.margin),padding:Pe(e.padding)}}},icon(e,t,n,r){if(t!=="icon")return;const o=[],s={count:e.count,size:e.size,alignment:e.alignment,color:e.color,padding:Pe(e.padding),margin:Pe(e.margin)};return r.forEach(i=>{var a;const l=n[i];o.push({icon:l.icon,color:l.color||s.color,url:l.url,linkRel:(a=l.linkRel)==null?void 0:a.join(" "),linkTarget:l.linkTarget,convertToAbsolute:l.convertToAbsolute})}),{type:"icon",props:s,icons:o}},ribbon(e,t){if(t!=="ribbon")return;const n=e.individual||{},r={color:e.color||"rgb(0, 0, 0)",top:n.positionY||"0%","z-index":9999};e.type==="corner"?(r.top="-5px",n.side==="right"?r.right="-5px":r.left="-5px"):e.type==="side"?n.side==="right"?r.right="-20px":r.left="-20px":e.type==="icon"?n.side==="right"?r.left="calc(100% - 75px)":r.left="-20px":r.left=n.positionX||"0%";let o="";for(const i in r)o+=`${i}: ${r[i]};`;return{type:"ribbon",props:{type:e.type+"Ribbon",modifications:btoa(JSON.stringify({class:{mainWrap:{element:{relative:"mainWrap",query:""},class:["wptb-ribbon-bookmark-main-wrap","wptb-plugin-filter-box-shadow-md"]}},style:{textWrap:{element:{relative:"textWrap",query:""},style:{backgroundColor:{default:"",value:"#FFFFFF"}}},svgWrapper:{element:{relative:"element",query:"#wptbBookmarkRibbonElementEnd"},style:{color:{default:"",value:"#FFFFFF"},width:{default:"",value:"70px"}}},mainWrap:{element:{relative:"mainWrap",query:""},style:{width:{default:"",value:"70px"}}}}})),side:n.side||"left",xOffset:parseInt(n.positionX||"0"),yOffset:parseInt(n.positionY||"0"),width:parseInt(n.width||"70px"),style:o,background:e.background,borderColor:e.borderColor,color:e.color,fontSize:e.fontSize,text:Vs(e.text),icon:n.icon||"star",enableAnimation:n.animation?1:void 0,animationType:n.animation||"beat"}}},styledList(e,t,n,r){if(t!=="styled-list")return;const o=[],s=n[be];return r.forEach(i=>{const l=n[i];o.push({text:Vs(l.text),alignment:l.alignment||e.alignment,toolTip:l.toolTip,tooltipPosision:l.tooltipPosision})}),{type:"styledList",props:{icon:e.icon,iconSize:e.iconSize,iconColor:e.iconColor,iconSpacing:e.iconSpacing,color:e.color||s.fontColor,fontSize:e.fontSize||s.fontSize,itemSpacing:e.itemSpacing,padding:Pe(e.padding),margin:Pe(e.margin)},items:o}},textIcon(e,t,n){if(t!=="text-icon")return;const r=n[be];return{type:"textIcon",props:{spaceBetween:e.iconSpacing,alignment:e.alignment,fontSize:e.fontSize||r.fontSize,color:e.color||r.fontColor,text:Vs(e.text),icon:e.icon,iconLocation:e.iconSide,iconSize:e.iconSize,iconColor:e.iconColor,padding:Pe(e.padding),margin:Pe(e.margin)}}},progressBar(e,t){if(t==="progress-bar")return{type:"progressBar",props:{value:e.value,thickness:parseInt(e.thickness),primaryColor:e.primaryColor,secondaryColor:e.secondaryColor,labelColor:e.color,padding:Pe(e.padding),margin:Pe(e.margin)}}},badge(e,t){if(t!=="badge")return;const n={left:"flex-start",center:"center",right:"flex-end"};return{type:"badge",props:{fontSize:e.fontSize,color:e.color,background:e.background,alignment:n[e.alignment||"center"],text:Vs(e.text),borderRadius:e.borderRadius,padding:Pe(e.padding),margin:Pe(e.margin)}}}},Pl=class Pl{static init(t){Pl.TABLE_ID=t}};q(Pl,"TABLE_ID"),q(Pl,"TAB_ID",Wr());let Ze=Pl;const d5=e=>{let t="100%",n;const r=parseInt(e.cellMinWidth||"120px");let o=e.colCount*r;if(e.columnsProps)for(const i in e.columnsProps){const l=e.columnsProps[i].width;l&&(o+=parseInt(l)-r)}let s;return e.cellPadding&&typeof e.cellPadding=="string"&&(s=parseInt(e.cellPadding),o+=s*2*e.colCount),e.innerBorder&&(e.innerBorder.width?o+=parseInt(e.innerBorder.width)*(e.colCount+1):(o+=parseInt(e.innerBorder.left.width)*e.colCount,o+=parseInt(e.innerBorder.right.width)*e.colCount)),e.tableBorder&&(e.tableBorder.width?o+=parseInt(e.tableBorder.width)*2:(o+=parseInt(e.tableBorder.left.width),o+=parseInt(e.tableBorder.right.width))),e.maxWidth&&(n=parseInt(e.maxWidth)),(!n||o>n)&&(t=`${o}px`),{minWidth:t,maxWidth:n,total:o,cellMinWidth:r}},U7=(e,t)=>({minWidth:t,...c5(e.tableBorder),borderCollapse:e.separateRowCol?"separate":"collapse","--wptb-border-spacing":`${e.colSpacing||0} ${e.rowSpacing||0}`,"--wptb-link-color":e.linkColor,"--wptb-inner-border":e.enableInnerBorder?os(e.innerBorder):void 0,"--wptb-inner-radius":e.innerBorderRadius}),V7=e=>({className:et("wptb-preview-table wptb-element-main-table_setting-404",{"wptb-row-borders-only":e.rowBorderOnly,"wptb-column-borders-only":e.columnBorderOnly,"wptb-no-header-border":!e.headerInnerBorder,"wptb-has-link-color":e.linkColor})}),f5=(e,t,n,r)=>{var l;let o="wptb-row",s,i;return r?(o+=" wptb-row-responsive",(l=n.isEdgeRow)!=null&&l[t]&&(o+=" wptb-row-edge")):(i=e==null?void 0:e.background,t===0&&(s=n.hoverHeaderBg||s,i||(i=n.headerBg)),t%2===0?(s||(s=n.hoverOddRowBg),i||(i=n.oddRowBg)):(s=n.hoverEvenRowBg,i||(i=n.evenRowBg)),s&&(o+=" wptb-row-has-hover")),{className:o,style:{"--wptb-row-bg":i,"--hover-bg-color":s,height:e==null?void 0:e.height,transform:e!=null&&e.highlight?`scale(${(e.highlightScale||100)/100})`:void 0}}},W7=(e,t,n)=>{var l,a,c,u,d,h;let r,o;if(!e)return{};(l=t.sortVertical)!=null&&l.enable?e.row===0&&(o=t.sortVertical.order==="desc"?"desk":"ask"):(a=t.sortHorizontal)!=null&&a.enable&&e.col===0&&(r=t.sortHorizontal.order==="desc"?"desk":"ask");const s=(c=t.columnsProps)==null?void 0:c[e.col];let i=e.background;if(n&&!i){const p=(u=t.rowsProps)==null?void 0:u[e.row];i=p==null?void 0:p.background,e.row===0&&(i||(i=t.headerBg)),e.row%2===0?i||(i=t.oddRowBg||"#ffffff"):i||(i=t.evenRowBg)}return{colSpan:n&&((d=e.responsive)==null?void 0:d.colspan)||e.colspan,rowSpan:n&&((h=e.responsive)==null?void 0:h.rowspan)||e.rowspan,"data-row":e.row,"data-col":e.col,"data-sorted-vertical":o,"data-sorted-horizontal":r,style:{...$7(t.cellPadding,"padding"),...c5(e.border),background:i,verticalAlign:e.vAlign,color:t.fontColor,fontSize:t.fontSize,transform:s!=null&&s.highlight?`scale(${(s.highlightScale||100)/100})`:void 0}}},h5=(e,t,n)=>{var u,d;const r=e[be],{minWidth:o,maxWidth:s,total:i,cellMinWidth:l}=d5(r),a={alignment:r.alignment||"center",enableMaxWidth:r.enableMaxWidth?1:!1,maxWidth:s,minWidth:o,cellMinWidth:l,sortHorizontal:(u=r.sortHorizontal)!=null&&u.enable?1:!1,sortVertical:(d=r.sortVertical)!=null&&d.enable?1:!1,borderCollapse:(r.separateRowCol?"separate":"collapse")+" !important",tableSpacingX:parseInt(r.colSpacing||"3"),tableSpacingY:parseInt(r.rowSpacing||"3"),cols:r.colCount,cellsWidthAutoCount:r.colCount,tdSumMaxWidth:i,fontColor:r.fontColor,linkColor:r.linkColor,fontSize:parseInt(r.fontSize||"15"),tableBorder:os(r.tableBorder),headerInnerBorder:r.headerInnerBorder,scrollX:r.scrollX,disableThemeStyles:r.disableThemeStyles?1:!1,extraStyles:btoa(r.extraStyles||""),stickyFirstColumn:r.stickyFirstColumn,stickyTopRow:r.stickyTopRow,paginationEnable:r.paginationEnable?"true":!1,paginationTopRowAsHeader:(!!r.paginationTopRowAsHeader).toString(),rowsPerPage:r.rowsPerPage||"10",rowsChangeable:r.dyanamicPageSize?"true":!1,searchEnable:r.searchEnable?"true":!1,searchKeepHeader:(!!r.searchKeepHeader).toString(),searchPosition:r.searchPosition||"left",role:r.role||"table",directives:F7(r),responsiveDirectives:q7(r.responsive),headerBg:r.headerBg,evenRowBg:r.evenRowBg,oddRowBg:r.oddRowBg,hoverHeaderBg:r.hoverHeaderBg,hoverEvenRowBg:r.hoverEvenRowBg,hoverOddRowBg:r.hoverOddRowBg},c=[];return t.forEach((h,p)=>{var m;const g=(m=r.rowsProps)==null?void 0:m[p],v=[];h.forEach((y,w)=>{var R;const S=n[y],k=e[y];if(k.isNotACell)return;const T=[];S.blockOrder.forEach(M=>{const _=n[M],U=e[M],V=Qt.text(U,_.name,r)||Qt.button(U,_.name)||Qt.image(U,_.name)||Qt.list(U,_.name,e,_.blockOrder)||Qt.shortCode(U,_.name)||Qt.html(U,_.name)||Qt.starRating(U,_.name)||Qt.circleRating(U,_.name)||Qt.icon(U,_.name,e,_.blockOrder)||Qt.ribbon(U,_.name)||Qt.styledList(U,_.name,e,_.blockOrder)||Qt.textIcon(U,_.name,e)||Qt.progressBar(U,_.name)||Qt.badge(U,_.name);V&&T.push(V)});const C=((R=r.columnsProps)==null?void 0:R[k.col])||{},I=C.width,j=g==null?void 0:g.height;v.push({props:{autoWidth:(!I).toString(),autoHeight:(!j).toString(),width:I,height:j,padding:r.cellPadding,background:k.background,...H7(k,r),vAlign:k.vAlign||"center",isEmpty:k.isEmpty,xIndex:w,yIndex:p,xSort:k.sortedHorizontal,ySort:k.sortedVertical,colspan:k.colspan,rowspan:k.rowspan,hideOnMobile:C.hideOnMobile||!1,highlighted:C.highlight?C.highlightScale:void 0},blocks:T})});let x=g==null?void 0:g.background;p===0&&(x||(x=r.headerBg)),p%2===0?x||(x=r.oddRowBg):x||(x=r.evenRowBg),c.push({props:{background:x,highlighted:g!=null&&g.highlight?g.highlightScale:void 0},cells:v})}),{props:a,rows:c}},G7=async(e,t)=>{ae.dispatch(N7());const{id:n,title:r,is_template:o,desktop:s,blocksProps:i,innerBlocks:l,tags:a}=ae.getState().table[e],c=JSON.stringify(h5(i,s,l)),u={isSaving:!1};try{const d=n||void 0,p=await(await fetch(WPTB_CFG.ADMIN_URL+"?action=save_table",{method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify({id:d,title:r,content:c,security_code:WPTB_CFG.SECURITY_CODE,tags:a?JSON.stringify(a):void 0,prebuilt:o?1:void 0})})).json();Rn("Table saved successfully!"),d||(u.tableId=p[1],Ze.init(u.tableId)),t(p)}catch(d){Rn("Table save failed: "+d.message,"error",2e4)}ae.dispatch(Mt(u))},K7=async(e,t)=>{const{id:n,title:r,desktop:o,blocksProps:s,innerBlocks:i}=ae.getState().table[e];if(!n){Rn("Non-saved tables cannot be previewed.","error",2e3);return}window.open(`${WPTB_CFG.HOME_URL}/?post_type=wptb-tables&p=${e}&_wpnonce=${WPTB_CFG.NONCE.preview}&preview_id=${t}&ts=1`,"_blank");const l=JSON.stringify(h5(s,o,i));try{await fetch(WPTB_CFG.ADMIN_URL+"?action=save_table",{method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify({id:n,title:r,content:l,security_code:WPTB_CFG.SECURITY_CODE,preview_saving:t})})}catch(a){Rn("Table save failed: "+a.message,"error",2e4)}};class wu{constructor(t){q(this,"state");q(this,"captureTable",!1);q(this,"propsChange",[]);q(this,"movedBlocks",[]);q(this,"addedBlocks",[]);q(this,"removedBlocks",[]);this.state=t}static init(){return new wu(ae.getState().table[Ze.TABLE_ID])}props(t){this.propsChange.push(t)}addBlock(t){this.addedBlocks.push(t)}removeBlock(t){this.removedBlocks.push(t)}moveBlock(t){this.movedBlocks.push(t)}table(){this.captureTable=!0}getChanges(t){var v,x,m;const{blocksProps:n,desktop:r,innerBlocks:o}=this.state,{blocksProps:s,desktop:i,innerBlocks:l}=ae.getState().table[Ze.TABLE_ID],a={},c={},u={},d={},h={},p={};for(let y=0;y<this.propsChange.length;y++){const w=this.propsChange[y];u[w]={from:n[w],to:s[w]}}for(let y=0;y<this.addedBlocks.length;y++){const w=this.addedBlocks[y];a[w]=s[w];const S=l[w];if(!S)continue;d[w]=S,l[S.parentId]&&(h[S.parentId]={from:((v=o[S.parentId])==null?void 0:v.blockOrder)||[],to:l[S.parentId].blockOrder})}for(let y=0;y<this.removedBlocks.length;y++){const w=this.removedBlocks[y];c[w]=n[w];const S=o[w];if(!S)continue;d[w]=S,o[S.parentId]&&(h[S.parentId]={from:o[S.parentId].blockOrder,to:((x=l[S.parentId])==null?void 0:x.blockOrder)||[]})}for(let y=0;y<this.movedBlocks.length;y++){const w=this.movedBlocks[y],S=l[w].parentId,k=o[w].parentId;h[k]={from:o[k].blockOrder,to:((m=l[k])==null?void 0:m.blockOrder)||[]},h[S]={from:o[S].blockOrder,to:l[S].blockOrder},p[w]={from:k,to:S}}let g;return this.captureTable&&(g={from:r,to:i}),{table:g,addedProps:a,removedProps:c,updatedProps:u,blockPass:d,innerBlocksOrder:h,blockParentChange:p,shouldRenderResponsive:t}}}const Y7=(e,t,n)=>{if(t.blockId){const{blockId:g,from:v}=t;e.blocksProps[g]=v;return}const r=e.desktop,o=e.innerBlocks,s=e.blocksProps,{shouldRenderResponsive:i,addedProps:l,removedProps:a,updatedProps:c,blockPass:u,innerBlocksOrder:d,blockParentChange:h,table:p}=t;for(const g in c){const{from:v}=c[g];s[g]=v}for(const g in a){s[g]=a[g];const v=u[g];o[g]=v}for(const g in d){const{from:v}=d[g],x=o[g];o[g]={...x,blockOrder:v}}for(const g in h){const{from:v}=h[g],x=o[g];o[g]={...x,parentId:v}}for(const g in l)delete s[g],delete o[g];p&&(e.desktop=p.from),i&&(e.mobile=r,e.tablet=r,n&&n!=="desktop"&&(e[n]=Tr(e,n)))},Z7=(e,t,n)=>{if(t.blockId){const{blockId:g,to:v}=t;e.blocksProps[g]=v;return}const r=e.desktop,o=e.innerBlocks,s=e.blocksProps,{shouldRenderResponsive:i,addedProps:l,removedProps:a,updatedProps:c,blockPass:u,innerBlocksOrder:d,blockParentChange:h,table:p}=t;for(const g in c){const{to:v}=c[g];s[g]=v}for(const g in a)delete s[g],delete o[g];for(const g in l){s[g]=l[g];const v=u[g];o[g]=v}for(const g in d){const{to:v}=d[g],x=o[g];o[g]={...x,blockOrder:v}}for(const g in h){const{to:v}=h[g],x=o[g];o[g]={...x,parentId:v}}p&&(e.desktop=p.to),i&&(e.mobile=r,e.tablet=r,n&&n!=="desktop"&&(e[n]=Tr(e,n)))},Le={last:Date.now()};function p5(){Le.fn&&Date.now()-Le.last>700&&(Le.fn(),Le.fn=void 0,Le.id=void 0),requestAnimationFrame(p5)}p5();const Ws={};class Ue{constructor(){q(this,"entries",[]);q(this,"cursor",0);q(this,"total",0)}static init(){Ze.TABLE_ID in Ws||(Ws[Ze.TABLE_ID]=new Ue)}static by(t){var n;(n=Ws[Ze.TABLE_ID])==null||n.travel(t)}travel(t){if(Le.fn&&(Le.fn(),Le.fn=void 0,Le.id=void 0),this.cursor+=t,t>0&&(this.cursor-=1),this.cursor>=this.total){this.cursor=this.total;return}if(this.cursor<0){this.cursor=0;return}const n=this.entries[this.cursor];if(!n)return;const r=ae.getState().editorSettings.devicePreview;t<0?ae.dispatch(hc(o=>{Y7(o[Ze.TABLE_ID],n,r)})):(ae.dispatch(hc(o=>{Z7(o[Ze.TABLE_ID],n,r)})),this.cursor+=1),ae.dispatch(C7(this.cursor))}static captured(t,n,r=!0){var s,i;const o=wu.init();n.capturer=o,n.tableId=Ze.TABLE_ID,ae.dispatch(t(n)),(s=Le.fn)==null||s.call(Le),Le.fn=void 0,Le.id=void 0,(i=Ws[Ze.TABLE_ID])==null||i.saveEntry(o.getChanges(r))}static capturedFn(t,n,r=!0){var s,i;const o=wu.init();n.capturer=o,n.tableId=Ze.TABLE_ID,ae.dispatch(hc(l=>t(l[Ze.TABLE_ID],n))),(s=Le.fn)==null||s.call(Le),Le.fn=void 0,Le.id=void 0,(i=Ws[Ze.TABLE_ID])==null||i.saveEntry(o.getChanges(r))}saveEntry(t){this.entries[this.cursor]=t,this.cursor+=1,this.total=this.cursor,ae.dispatch(I7(this.cursor))}static updateProps(t,n){var r;Le.id!==t&&((r=Le.fn)==null||r.call(Le),Le.old=ae.getState().table[Ze.TABLE_ID].blocksProps[t]),Le.id=t,ae.dispatch(hc(o=>{Object.assign(o[Ze.TABLE_ID].blocksProps[t],n)})),Le.last=Date.now(),Le.fn=()=>{var s;Le.last=Date.now();const o=ae.getState().table[Ze.TABLE_ID].blocksProps[t];(s=Ws[Ze.TABLE_ID])==null||s.saveEntry({from:Le.old,to:o,blockId:t})}}}const Q7=(e,t,n)=>{let r={},o=[];e:for(let s=0;s<e.length;s++){const i=e[s];for(let l=0;l<i.length;l++){const a=i[l],{col:c,rowspan:u,colspan:d,isNotACell:h}=t[a];if(h)continue;const p=c+d-1,g=s+u-1,v=c>=n.left&&c<=n.right,x=p>=n.left&&p<=n.right,m=s>=n.top&&s<=n.bottom,y=g>=n.top&&g<=n.bottom;if(!(v||x)||!(m||y))continue;let w=!1;if(!v&&x?(n.left=c,w=!0):v&&!x&&(n.right=p,w=!0),!m&&y?(n.top=s,w=!0):m&&!y&&(n.bottom=g,w=!0),w){r={},o=[],s=-1;continue e}r[a]=!0,o.push(a)}}return[r,o]},xn=class xn{static markCells(t,n){if(!t.shiftKey)return;const{table:r,editorSettings:{activeBlock:o}}=ae.getState(),{desktop:s,blocksProps:i}=r[Ze.TABLE_ID];if(!(o!=null&&o.length)||o[1]===n)return;t.preventDefault(),t.stopPropagation();const l=o[1],a=i[l],c=i[n],u={top:Math.min(a.row,c.row),left:Math.min(a.col,c.col),bottom:Math.max(a.row,c.row),right:Math.max(a.col,c.col)};xn.selection=[];const[d,h]=Q7(s,i,u);xn.mergeBoundary=u,xn.selection=h,ae.dispatch(Mt({selectedCells:d}))}static unMarkCells(){xn.mergeBoundary&&(xn.mergeBoundary=void 0,ae.dispatch(Mt({selectedCells:void 0})))}static doMerging(){if(!xn.mergeBoundary)return;const t=ae.getState().editorSettings.devicePreview;ae.dispatch(Mt({activeBlock:void 0,selectedCells:void 0})),Ue.captured(v7,{cells:xn.selection,boundary:xn.mergeBoundary,device:t})}static splitCell(){const{activeBlock:t,devicePreview:n}=ae.getState().editorSettings,r=t==null?void 0:t[1];r&&Ue.captured(y7,{cellId:r,device:n})}};q(xn,"selection"),q(xn,"mergeBoundary");let bs=xn,Gs=class{static deleteCol(){const{activeBlock:t,devicePreview:n}=ae.getState().editorSettings,r=t==null?void 0:t[1];r&&(ae.dispatch(oa()),Ue.captured(w7,{cellId:r,device:n}))}static deleteRow(){const{activeBlock:t,devicePreview:n}=ae.getState().editorSettings,r=t==null?void 0:t[1];r&&(ae.dispatch(oa()),Ue.captured(b7,{cellId:r,device:n}))}static addCol(t){const{activeBlock:n,devicePreview:r}=ae.getState().editorSettings,o=n==null?void 0:n[1];Ue.captured(x7,{cellId:o,after:t,device:r})}static addRow(t){const{activeBlock:n,devicePreview:r}=ae.getState().editorSettings,o=n==null?void 0:n[1];Ue.captured(S7,{cellId:o,after:t,device:r})}};class Ae{}q(Ae,"isInserting",!1),q(Ae,"isMoving",!1),q(Ae,"isRowColMoving",!1);const fm=(e,t)=>ae.getState().table[t].innerBlocks[e],_f=(e,t)=>{var o,s;const n=(o=Qr[e])==null?void 0:o.supportedParents;if(!n)return t==="cell";if(!n.includes(t))return!1;const r=(s=Qr[t])==null?void 0:s.supportedChildren;return!(!r||!r.includes(e))},Pc=(e,t)=>{const n=e.getBoundingClientRect(),r=n.top+n.height/2;return Xe.style.width=n.width+"px",Xe.style.left=n.left+"px",t>r?(Xe.style.top=n.top+n.height+"px",Xe.style.bottom="",!0):(Xe.style.top="",Xe.style.bottom=window.innerHeight-n.top+"px",!1)},hm=(e,t)=>{const n=e.getBoundingClientRect(),r=n.top+n.height/2;return Xe.style.width=n.width+"px",Xe.style.left=n.left+"px",t>r?(Xe.style.top="",Xe.style.bottom=window.innerHeight-n.bottom+"px",!0):(Xe.style.top=n.top+"px",Xe.style.bottom="",!1)},Xe=document.createElement("div");Xe.classList.add("wptb-new-target-indicator");const Jt=document.createElement("div");Jt.classList.add("wptb-floating-block-actions");Jt.classList.add("wptb-floating-block-actions-hidden");Jt.innerHTML=`
<button type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
<path fill="currentColor" d="M22.017 12.008L18.019 8.01l-.002 2.993h-5.001v-4.99l2.993.002l-4.002-4.002l-3.998 3.998l2.994.001v4.991h-5L6.002 8.01l-3.998 3.998l4.002 4.002l-.002-2.993h4.999v4.993l-2.994.001l3.998 3.999l4.002-4.002l-2.993.001v-4.992h5l-.001 2.993z"/>
</svg>
</button>
<button type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" strokeWidth="2" d="M4.5 17H1V1h16v3.5M7 7h16v16H7zm8 4v8zm-4 4h8z"/>
</svg>
</button>
<button type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 1200 1200">
<path fill="currentColor" d="M451.376 0v91.743H104.587V260.55h990.826V91.743H748.624V0zM157.798 388.991V1200h884.404V388.991z"/>
</svg>
</button>
`;const wo=document.createElement("div");wo.classList.add("wptb-move-row-handle");wo.innerHTML=`
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">
<g fill="currentColor" fillRule="evenodd" clipRule="evenodd">
<path d="M5.232 6.974a1 1 0 0 1 .128-1.409l4-3.333a1 1 0 1 1 1.28 1.536l-4 3.334a1 1 0 0 1-1.408-.128"/>
<path d="M14.768 6.974a1 1 0 0 1-1.408.128l-4-3.334a1 1 0 1 1 1.28-1.536l4 3.333a1 1 0 0 1 .128 1.409"/>
<path d="M10 4a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1m4.768 9.027a1 1 0 0 1-.128 1.408l-4 3.333a1 1 0 0 1-1.28-1.536l4-3.334a1 1 0 0 1 1.408.129"/>
<path d="M5.232 13.027a1 1 0 0 1 1.408-.129l4 3.334a1 1 0 1 1-1.28 1.536l-4-3.333a1 1 0 0 1-.128-1.408"/>
<path d="M10 16a1 1 0 0 1-1-1V7a1 1 0 1 1 2 0v8a1 1 0 0 1-1 1"/>
</g>
</svg>
`;const bo=document.createElement("div");bo.classList.add("wptb-move-col-handle");bo.innerHTML=`
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">
<g fill="currentColor" fillRule="evenodd" clipRule="evenodd">
<path d="M13.027 5.232a1 1 0 0 1 1.408.128l3.333 4a1 1 0 1 1-1.536 1.28l-3.334-4a1 1 0 0 1 .129-1.408"/>
<path d="M13.027 14.768a1 1 0 0 1-.129-1.408l3.334-4a1 1 0 1 1 1.536 1.28l-3.333 4a1 1 0 0 1-1.408.128"/>
<path d="M16 10a1 1 0 0 1-1 1H7a1 1 0 1 1 0-2h8a1 1 0 0 1 1 1m-9.026 4.768a1 1 0 0 1-1.409-.128l-3.333-4a1 1 0 1 1 1.536-1.28l3.334 4a1 1 0 0 1-.128 1.408"/>
<path d="M6.974 5.232a1 1 0 0 1 .128 1.408l-3.334 4a1 1 0 1 1-1.536-1.28l3.333-4a1 1 0 0 1 1.409-.128"/>
<path d="M4 10a1 1 0 0 1 1-1h8a1 1 0 0 1 0 2H5a1 1 0 0 1-1-1"/>
</g>
</svg>
`;const ut=document.createElement("div");ut.classList.add("wptb-floating-row-col-indicator");ut.style.display="none";const ve=class ve{static start(t,n){ve.newName=t,ve.newEl=n.cloneNode(!0),ve.newEl.classList.add("wptb-new-dragging"),document.body.appendChild(ve.newEl),Xe.innerHTML="INSERT HERE";const r=n.getBoundingClientRect();ve.newEl.style.height=r.height+"px",ve.newEl.style.width=r.width+"px",ve.newEl.style.top=r.top+"px",ve.newEl.style.left=r.left+"px",Ae.isInserting=!0,document.addEventListener("mousemove",ve.onMove),document.addEventListener("mouseup",ve.onEnd)}static onMove(t){Ae.isInserting&&(ve.newEl.style.top=t.clientY+"px",ve.newEl.style.left=t.clientX+"px")}static onEnd(){var t;document.removeEventListener("mousemove",ve.onMove),document.removeEventListener("mouseup",ve.onEnd),Ae.isInserting&&(Ae.isInserting=!1,(t=ve.newEl)==null||t.remove(),Xe.remove(),ve.newName&&ve.newTarget&&Ue.captured(h7,{parentId:ve.newTarget,blockName:ve.newName,siblingId:ve.siblingId,after:ve.positionAfter},!1),ve.newEl=void 0,ve.newName=void 0,ve.newTarget=void 0)}static async setTarget(t,n){Ae.isInserting&&(ve.siblingId=n,ve.positionAfter=Pc(t.currentTarget,t.clientY))}static onCellLeave(){Ae.isInserting&&(Xe.remove(),ve.newTarget=void 0,ve.siblingId=void 0)}static onCellEnter(t,n){if(!Ae.isInserting)return;ve.newTarget=n,document.body.appendChild(Xe);const r=t.getBoundingClientRect();Xe.style.top=r.top+"px",Xe.style.left=r.left+"px"}};q(ve,"newEl"),q(ve,"newName"),q(ve,"newTarget"),q(ve,"siblingId"),q(ve,"positionAfter");let gi=ve;const F=class F{static onStartBlockMove(){var t;F.target&&(Ae.isMoving=!0,(t=F.targetEl)==null||t.classList.add("wptb-block-action-pending"),Jt.classList.add("wptb-floating-block-actions-hidden"),Xe.innerHTML="MOVE HERE",F.moveTarget=void 0,F.moveTargetSibling=void 0,document.addEventListener("mouseup",F.onMovingDrop))}static async onCellEnter(t,n){Ae.isMoving&&(document.body.appendChild(Xe),_f(F.targetName,"cell")&&(F.overCellId=n,F.moveTarget=n,F.moveTargetName="cell",F.moveTargetSibling=void 0,F.positionAfter=hm(t.currentTarget,t.clientY)))}static async onCellMove(t){!Ae.isMoving||t.wptbMovePosOk||(F.positionAfter=hm(t.currentTarget,t.clientY))}static async onCellLeave(){Ae.isMoving&&(Xe.remove(),F.overCellId=void 0,F.moveTarget=void 0,F.moveTargetSibling=void 0)}static async onBlockEnter(t,n,r){var l,a;if(Ae.isInserting||Ae.isRowColMoving||t.wptbMoveTargetOk)return;const o=t.currentTarget;if(!Ae.isMoving){F.targetName=n,F.target=r,F.targetEl=o,o.classList.add("wptb-block-actions-visible"),Jt.classList.remove("wptb-floating-block-actions-hidden");const c=o.getBoundingClientRect();Jt.style.bottom=window.innerHeight-c.top+"px",Jt.style.right=document.body.clientWidth-c.right+"px";return}if(F.targetEl===o){F.moveTarget=void 0,F.moveTargetName=void 0,F.moveTargetSibling=void 0;return}if(_f(F.targetName,n)){t.wptbMoveTargetOk=!0,F.moveTarget=r,F.moveTargetName=n,F.moveTargetSibling=void 0,F.positionAfter=Pc(t.currentTarget,t.clientY);return}const s=(l=fm(r,Ze.TABLE_ID))==null?void 0:l.parentId,i=s?(a=fm(s,Ze.TABLE_ID))==null?void 0:a.name:void 0;if(!_f(F.targetName,i)){F.moveTarget=void 0,F.moveTargetName=void 0,F.moveTargetSibling=void 0;return}t.wptbMoveTargetOk=!0,F.moveTarget=s,F.moveTargetName=i,F.moveTargetSibling=r,F.positionAfter=Pc(t.currentTarget,t.clientY)}static onBlockMove(t,n,r){Ae.isMoving&&(r!==F.moveTargetSibling||t.wptbMovePosOk||(t.wptbMovePosOk=!0,F.positionAfter=Pc(t.currentTarget,t.clientY)))}static async onBlockLeave(t){if(!Ae.isInserting&&(t.classList.remove("wptb-block-actions-visible"),Jt.classList.add("wptb-floating-block-actions-hidden"),Ae.isMoving)){F.moveTarget&&F.moveTargetName!=="cell"&&(F.moveTarget=F.overCellId),F.moveTargetSibling=void 0;return}}static onMovingDrop(){var t;document.removeEventListener("mouseup",F.onMovingDrop),Ae.isMoving=!1,(t=F.targetEl)==null||t.classList.remove("wptb-block-action-pending"),Xe.remove(),!(!F.target||!F.moveTarget)&&(Ue.captured(m7,{blockId:F.target,targetId:F.moveTarget,siblingId:F.moveTargetSibling,after:F.positionAfter},!1),F.target=void 0,F.targetEl=void 0,F.moveTarget=void 0,F.moveTargetName=void 0,F.moveTargetSibling=void 0,F.positionAfter=void 0)}static onRemoveBlock(){F.target&&(Ue.captured(p7,{blockId:F.target},!1),F.target=void 0,F.targetEl=void 0)}static onDuplicateBlock(){F.target&&(Ue.captured(g7,{blockId:F.target},!1),F.target=void 0,F.targetEl=void 0)}static onActionHover(){var t;Ae.isInserting||Ae.isMoving||(t=F.targetEl)==null||t.classList.add("wptb-block-actions-visible")}static clearTarget(){var t;(t=F.targetEl)==null||t.classList.remove("wptb-block-actions-visible"),!Ae.isMoving&&(F.target=void 0,F.targetEl=void 0)}};q(F,"overCellId"),q(F,"target"),q(F,"targetEl"),q(F,"targetName"),q(F,"moveTarget"),q(F,"positionAfter"),q(F,"moveTargetName"),q(F,"moveTargetSibling");let ln=F;Jt.addEventListener("mouseenter",ln.onActionHover);Jt.addEventListener("mouseleave",ln.clearTarget);Jt.children[0].addEventListener("mousedown",ln.onStartBlockMove);Jt.children[1].addEventListener("click",ln.onDuplicateBlock);Jt.children[2].addEventListener("click",ln.onRemoveBlock);const we=class we{static onCellEnter(t,n){if(!Ae.isRowColMoving){we.targetEl=t,we.targetCell=n,t.appendChild(bo),t.appendChild(wo);return}we.destCell=n;const r=t.getBoundingClientRect();we.isRowMoving?(ut.style.top=r.top+"px",ut.style.height=r.height+"px"):(ut.style.left=r.left+"px",ut.style.width=r.width+"px")}static onCellLeave(){Ae.isRowColMoving||(we.targetEl=void 0,bo.remove(),wo.remove())}static startMovingRow(t){var o;if(!we.targetEl)return;t.preventDefault(),Ae.isRowColMoving=!0,we.isRowMoving=!0,we.destCell=void 0,wo.classList.add("wptb-row-col-moving"),document.addEventListener("mouseup",we.onRowMoveEnd);const n=(o=we.targetEl)==null?void 0:o.closest("tr");if(!n)return;const r=n.getBoundingClientRect();ut.style.display="block",ut.style.height=r.height+"px",ut.style.width=r.width+"px",ut.style.top=r.top+"px",ut.style.left=r.left+"px"}static onRowMoveEnd(){document.removeEventListener("mouseup",we.onRowMoveEnd),wo.classList.remove("wptb-row-col-moving"),Ae.isRowColMoving=!1;const t=fu["move-row"];t?we.targetCell&&we.destCell&&t(we.targetCell,we.destCell):sa("row.move"),ut.style.display="none",we.destCell=void 0}static startMovingCol(t){if(!we.targetEl)return;t.preventDefault(),we.isRowMoving=!1,Ae.isRowColMoving=!0,we.destCell=void 0,bo.classList.add("wptb-row-col-moving"),document.addEventListener("mouseup",we.onColMoveEnd);const n=we.targetEl.getBoundingClientRect(),r=we.targetEl.closest("table").getBoundingClientRect();ut.style.display="block",ut.style.height=r.height+"px",ut.style.width=n.width+"px",ut.style.top=r.top+"px",ut.style.left=n.left+"px"}static onColMoveEnd(){document.removeEventListener("mouseup",we.onColMoveEnd),bo.classList.remove("wptb-row-col-moving"),Ae.isRowColMoving=!1;const t=fu["move-column"];t?we.targetCell&&we.destCell&&t(we.targetCell,we.destCell):sa("row.move"),ut.style.display="none",we.destCell=void 0}static sortTableV(t,n,r){var p;const o=ae.getState().editorSettings.devicePreview;if(o!=="desktop")return;const s=[],i={},l={},c=t.closest("table").tBodies[0].rows;for(let g=0;g<c.length;g++){const v=c[g].cells;let x=i[g],m=0,y="",w=l[g]||0;for(let S=0;S<v.length;S++){if(S===0&&v[S].rowSpan>1)for(let k=1;k<v[S].rowSpan;k++)l[g+k]=v[S].colSpan;w===n&&(y=((p=v[S].textContent)==null?void 0:p.trim().toLowerCase())||""),w+=v[S].colSpan,m=Math.max(m,g+v[S].rowSpan-1)}typeof x!="number"?(x=s.length,s.push({originalIndex:g,content:y,end:m})):(s[x].end=m,s[x].content+=y);for(let S=g;S<=m;S++)i[S]=x}const u=s.shift(),d=(r==null?void 0:r.by)==n&&(r==null?void 0:r.order)==="asc"?"desc":"asc";d==="asc"?s.sort((g,v)=>g.content.localeCompare(v.content)):s.sort((g,v)=>v.content.localeCompare(g.content));const h=[{from:(u==null?void 0:u.originalIndex)||0,end:(u==null?void 0:u.end)||0}];s.forEach(g=>{h.push({from:g.originalIndex,end:g.end})}),!(h.length<2)&&Ue.captured(k7,{data:h,device:o,byCol:n,order:d})}static sortTableH(t,n,r){var h,p;const o=ae.getState().editorSettings.devicePreview;if(o!=="desktop")return;const i=t.closest("table").tBodies[0].rows,l=Array.from(i[0].cells).reduce((g,v)=>g+(v.colSpan||1),0),a=[];for(let g=0;g<l;g++)a[g]={originalIndex:g,content:"",cells:[]};const c={};for(let g=0;g<i.length;g++){const x=i[g].cells;let m=0;for(let y=0;y<x.length;y++){for(;((h=c[m])==null?void 0:h.span)>0;)c[m].span--,c[m].span===0&&delete c[m],m++;const w=x[y],S=w.rowSpan||1,k=w.colSpan||1;S>1&&(c[m]={cell:w,span:S-1});for(let T=0;T<k;T++){const C=m+T;g===n&&(a[C].content=((p=w.textContent)==null?void 0:p.trim().toLowerCase())||""),a[C].cells.push(w)}m+=k}Object.keys(c).forEach(y=>{const w=parseInt(y,10);c[w].span--,c[w].span===0&&delete c[w]})}const u=(r==null?void 0:r.by)==n&&(r==null?void 0:r.order)==="asc"?"desc":"asc";u==="asc"?a.sort((g,v)=>g.content.localeCompare(v.content)):a.sort((g,v)=>v.content.localeCompare(g.content));const d=a.map(g=>({from:g.originalIndex}));d.length<2||Ue.captured(T7,{data:d,device:o,byRow:n,order:u})}};q(we,"isRowMoving",!1),q(we,"targetCell"),q(we,"destCell"),q(we,"targetEl");let Oo=we;wo.addEventListener("mousedown",Oo.startMovingRow);bo.addEventListener("mousedown",Oo.startMovingCol);bo.addEventListener("click",e=>e.stopPropagation());wo.addEventListener("click",e=>e.stopPropagation());class jo{static init(){document.body.appendChild(Jt),document.body.appendChild(ut)}static startInsertion(t,n){gi.start(t,n)}static onBlockMouseEnter(t,n,r){ln.onBlockEnter(t,n,r)}static onBlockMouseMove(t,n,r){ln.onBlockMove(t,n,r),gi.setTarget(t,r)}static onBlockMouseLeave(t){ln.onBlockLeave(t)}static onCellEnter(t,n){Oo.onCellEnter(t.currentTarget,n),gi.onCellEnter(t.currentTarget,n),ln.onCellEnter(t,n)}static onCellMove(t){ln.onCellMove(t)}static onCellLeave(){gi.onCellLeave(),ln.onCellLeave(),Oo.onCellLeave()}}const g5=(e,t=-1)=>ke(n=>{var r;return(r=n.table[e[0]])==null?void 0:r.blocksProps[e.at(t)]}),$L=e=>{const t=Es(),{blockPath:n,name:r,preventFloatingActions:o}=e,s=n.at(-1),i=ke(g=>g.table[n[0]].blocksProps[s]),l=ke(g=>{const v=g.editorSettings.activeBlock;return(v==null?void 0:v.at(-1))===s&&(v==null?void 0:v[0])===n[0]}),a=ke(g=>{const v=g.editorSettings.activeBlock;if(!v)return!1;let x=!1;for(let m=v.length-2;m>1;m--)if(v[m]===s){x=!0;break}return x}),c=A.useCallback(g=>{Ue.updateProps(s,g)},[s]),u=g=>{var v;g.wptbActivatedEdit||(t(oa(n)),g.wptbActivatedEdit=!0),(v=e==null?void 0:e.onClick)==null||v.call(e,g)},d=o?e==null?void 0:e.onMouseMove:g=>{var v;jo.onBlockMouseMove(g,r,s),(v=e==null?void 0:e.onMouseMove)==null||v.call(e,g)},h=o?e==null?void 0:e.onMouseLeave:g=>{var v;jo.onBlockMouseLeave(g.currentTarget),(v=e==null?void 0:e.onMouseLeave)==null||v.call(e,g)},p=o?e==null?void 0:e.onMouseEnter:g=>{var v;jo.onBlockMouseEnter(g,r,s),(v=e==null?void 0:e.onMouseEnter)==null||v.call(e,g)};return{props:i,isActive:l,hasActive:a,updateProps:c,attributes:{onClick:u,onMouseMove:d,onMouseLeave:h,onMouseEnter:p}}},Ro=({name:e,props:t,setProps:n,blockPath:r,...o})=>{const s=fu[e];return s?f.jsx(s,{blockProps:t,setBlockProps:n,blockPath:r,...o}):null},qL=({name:e,children:t})=>(Lw[e]=t,null),X7=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"18px",height:"18px",viewBox:"0 0 511.63 511.631",children:f.jsx("g",{children:f.jsxs("g",{children:[f.jsx("path",{d:"M18.274,237.548h438.542c4.949,0,9.229-1.812,12.847-5.429c3.614-3.612,5.421-7.898,5.421-12.845v-36.547 c0-4.952-1.807-9.231-5.421-12.847c-3.617-3.617-7.897-5.424-12.847-5.424H18.274c-4.952,0-9.233,1.807-12.851,5.424 C1.809,173.495,0,177.778,0,182.727v36.547c0,4.947,1.809,9.233,5.424,12.845C9.044,235.736,13.326,237.548,18.274,237.548z"}),f.jsx("path",{d:"M18.274,127.909h328.897c4.948,0,9.236-1.809,12.854-5.424c3.613-3.617,5.424-7.898,5.424-12.847V73.091 c0-4.948-1.811-9.229-5.424-12.85c-3.617-3.612-7.905-5.424-12.854-5.424H18.274c-4.952,0-9.233,1.812-12.851,5.424 C1.809,63.858,0,68.143,0,73.091v36.547c0,4.948,1.809,9.229,5.424,12.847C9.044,126.1,13.326,127.909,18.274,127.909z"}),f.jsx("path",{d:"M506.206,389.147c-3.617-3.617-7.905-5.427-12.85-5.427H18.274c-4.952,0-9.233,1.81-12.851,5.427 C1.809,392.762,0,397.046,0,401.994v36.546c0,4.948,1.809,9.232,5.424,12.854c3.621,3.61,7.904,5.421,12.851,5.421h475.082 c4.944,0,9.232-1.811,12.85-5.421c3.614-3.621,5.425-7.905,5.425-12.854v-36.546C511.63,397.046,509.82,392.762,506.206,389.147z"}),f.jsx("path",{d:"M18.274,347.179h365.449c4.948,0,9.233-1.811,12.847-5.428c3.617-3.614,5.428-7.898,5.428-12.847v-36.542 c0-4.945-1.811-9.233-5.428-12.847c-3.613-3.617-7.898-5.428-12.847-5.428H18.274c-4.952,0-9.233,1.811-12.851,5.428 C1.809,283.129,0,287.417,0,292.362v36.545c0,4.948,1.809,9.236,5.424,12.847C9.044,345.371,13.326,347.179,18.274,347.179z"})]})})}),J7=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"18",height:"18",viewBox:"0 0 511.63 511.631",children:f.jsx("g",{children:f.jsx("path",{d:"M511.63,401.994v36.546c0,4.948-1.811,9.232-5.425,12.854c-3.617,3.61-7.905,5.421-12.85,5.421H18.274 c-4.947,0-9.23-1.811-12.851-5.421C1.809,447.772,0,443.488,0,438.54v-36.546c0-4.948,1.809-9.232,5.424-12.847 c3.618-3.617,7.898-5.427,12.851-5.427h475.082c4.944,0,9.232,1.81,12.85,5.427C509.82,392.762,511.63,397.046,511.63,401.994z M127.91,274.088c-4.952,0-9.233,1.811-12.85,5.428c-3.618,3.613-5.424,7.901-5.424,12.847v36.545 c0,4.948,1.807,9.236,5.424,12.847c3.62,3.617,7.901,5.432,12.85,5.432h255.813c4.948,0,9.233-1.814,12.847-5.432 c3.617-3.61,5.428-7.898,5.428-12.847v-36.545c0-4.945-1.811-9.233-5.428-12.847c-3.613-3.617-7.898-5.428-12.847-5.428H127.91z M54.821,237.548H456.81c4.949,0,9.233-1.812,12.848-5.429c3.613-3.612,5.42-7.898,5.42-12.845v-36.547 c0-4.952-1.807-9.231-5.42-12.847c-3.614-3.617-7.898-5.424-12.848-5.424H54.821c-4.952,0-9.235,1.807-12.85,5.424 c-3.617,3.615-5.424,7.898-5.424,12.847v36.547c0,4.947,1.807,9.233,5.424,12.845C45.59,235.736,49.869,237.548,54.821,237.548z M164.457,127.909h182.714c4.948,0,9.236-1.809,12.854-5.424c3.613-3.617,5.424-7.898,5.424-12.847V73.091 c0-4.948-1.811-9.229-5.417-12.85c-3.62-3.612-7.905-5.424-12.854-5.424H164.457c-4.952,0-9.235,1.812-12.85,5.424 c-3.617,3.617-5.426,7.902-5.426,12.85v36.547c0,4.948,1.809,9.229,5.426,12.847C155.226,126.1,159.508,127.909,164.457,127.909z"})})}),eS=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"18px",height:"18px",viewBox:"0 0 511.63 511.631",children:f.jsx("g",{children:f.jsxs("g",{children:[f.jsx("path",{d:"M493.356,383.721H18.274c-4.952,0-9.233,1.81-12.851,5.427C1.809,392.762,0,397.046,0,401.994v36.546 c0,4.948,1.809,9.232,5.424,12.854c3.621,3.61,7.904,5.421,12.851,5.421h475.082c4.944,0,9.232-1.811,12.85-5.421 c3.614-3.621,5.425-7.905,5.425-12.854v-36.546c0-4.948-1.811-9.232-5.425-12.847C502.588,385.53,498.3,383.721,493.356,383.721z"}),f.jsx("path",{d:"M493.356,274.088H127.91c-4.952,0-9.233,1.811-12.85,5.428c-3.618,3.613-5.424,7.901-5.424,12.847v36.545 c0,4.948,1.807,9.236,5.424,12.847c3.62,3.617,7.901,5.432,12.85,5.432h365.446c4.944,0,9.232-1.814,12.85-5.432 c3.614-3.61,5.425-7.898,5.425-12.847v-36.545c0-4.945-1.811-9.233-5.425-12.847C502.588,275.895,498.3,274.088,493.356,274.088z"}),f.jsx("path",{d:"M493.356,164.456H54.821c-4.952,0-9.235,1.807-12.85,5.424c-3.617,3.615-5.424,7.898-5.424,12.847v36.547 c0,4.947,1.807,9.233,5.424,12.845c3.619,3.617,7.898,5.429,12.85,5.429h438.535c4.944,0,9.232-1.812,12.85-5.429 c3.614-3.612,5.425-7.898,5.425-12.845v-36.547c0-4.952-1.811-9.231-5.425-12.847C502.588,166.263,498.3,164.456,493.356,164.456z "}),f.jsx("path",{d:"M506.206,60.241c-3.617-3.612-7.905-5.424-12.85-5.424H164.457c-4.952,0-9.235,1.812-12.85,5.424 c-3.617,3.617-5.426,7.902-5.426,12.85v36.547c0,4.948,1.809,9.229,5.426,12.847c3.619,3.616,7.901,5.424,12.85,5.424h328.899 c4.944,0,9.232-1.809,12.85-5.424c3.614-3.617,5.425-7.898,5.425-12.847V73.091C511.63,68.143,509.82,63.861,506.206,60.241z"})]})})}),tS=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:f.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",d:"M7 8h6v24H7zm14 0h6v32h-6zm14 0h6v18h-6z"})}),nS=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:f.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",d:"M7 16h6v24H7zm14-8h6v32h-6zm14 14h6v18h-6z"})}),rS=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:f.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",d:"M7 12h6v24H7zm14-4h6v32h-6zm14 7h6v18h-6z"})});function m5({label:e,items:t,onChange:n,value:r}){return f.jsxs("div",{className:"wptb-radio-group wptb-control",children:[e&&f.jsx("p",{className:"wptb-radio-group-label",children:e}),f.jsx("div",{className:"wptb-radio-group-items",children:t.map(o=>{const s=o.value===r;return f.jsxs("button",{className:et("wptb-radio-group-item",{"wptb-checked":s}),onClick:()=>n==null?void 0:n(o.value),children:[f.jsx("div",{className:"wptb-radio-group-item-icon",children:o.icon}),o.label&&f.jsx("div",{className:"wptb-control-tooltip wptb-up",children:o.label})]},o.value)})})]})}const oS={px:{step:1},em:{step:.2},rem:{step:.2},"%":{step:1}};function mi({value:e,onValueChange:t,onUnitChange:n,onChange:r,autoUnit:o,unit:s="px",allowedUnits:i=oS}){const l=parseFloat(e)||0;o&&(s=(e==null?void 0:e.toString().replace(/[^a-z]/gi,""))||"px");const a=()=>{var h;const d=l+(((h=i[s])==null?void 0:h.step)||1);t==null||t(d),r==null||r(`${d}${s}`)},c=()=>{var h;const d=l-(((h=i[s])==null?void 0:h.step)||1);t==null||t(d),r==null||r(`${d}${s}`)},u=d=>{d.key==="ArrowUp"?(d.preventDefault(),a()):d.key==="ArrowDown"&&(d.preventDefault(),c())};return f.jsxs("div",{className:"wptb-unit-control wptb-control",children:[f.jsx("input",{type:"number",value:l||"",onKeyDown:u,onInput:d=>{t==null||t(+d.target.value||0),r==null||r(`${+d.target.value||0}${s}`)}}),f.jsx("select",{disabled:!0,onPointerDown:()=>{WPTB.utils.notify("This is an upcoming feature","error")},onChange:d=>{n==null||n(d.target.value),r==null||r(`${l}${d.target.value}`)},value:s,children:Object.keys(i).map(d=>f.jsx("option",{value:d,children:d},d))}),f.jsxs("div",{children:[f.jsx("button",{type:"button",onClick:a}),f.jsx("button",{type:"button",onClick:c})]})]})}const FL=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 26",children:f.jsxs("g",{fill:"none",children:[f.jsx("defs",{children:f.jsxs("mask",{id:"pepiconsPopTrashCircleFilled0",children:[f.jsx("path",{fill:"#fff",d:"M0 0h26v26H0z"}),f.jsxs("g",{fill:"#000",children:[f.jsx("path",{d:"M14.937 7.5h-3.874A2.003 2.003 0 0 1 13 5a2.003 2.003 0 0 1 1.937 2.5"}),f.jsx("path",{d:"M7.5 8.5a1 1 0 0 1 0-2h11a1 1 0 1 1 0 2z"}),f.jsx("path",{fillRule:"evenodd",d:"M17.5 21.5a1 1 0 0 0 1-1V10a1 1 0 0 0-1-1h-9a1 1 0 0 0-1 1v10.5a1 1 0 0 0 1 1zm-2-10a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0zM13 11a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 1 0v-7a.5.5 0 0 0-.5-.5m-3.5.5a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0z",clipRule:"evenodd"})]})]})}),f.jsx("circle",{cx:"13",cy:"13",r:"13",fill:"currentColor",mask:"url(#pepiconsPopTrashCircleFilled0)"})]})}),UL=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M13 3a9 9 0 0 0-9 9H1l4 3.99L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7s-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.95 8.95 0 0 0 13 21a9 9 0 0 0 0-18m-1 5v5l4.25 2.52l.77-1.28l-3.52-2.09V8z"})}),sS=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:f.jsx("path",{fill:"currentColor",d:"M6.03 2.47a.75.75 0 0 1 0 1.06L4.81 4.75H11A6.25 6.25 0 1 1 4.75 11a.75.75 0 0 1 1.5 0A4.75 4.75 0 1 0 11 6.25H4.81l1.22 1.22a.75.75 0 0 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1 0-1.06l2.5-2.5a.75.75 0 0 1 1.06 0"})}),VL=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 20 20",focusable:"false",children:f.jsx("path",{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})}),WL=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 20 20",focusable:"false",children:f.jsx("path",{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),v5=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"1em",width:"1em",children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M17 7L7 17M7 7l10 10"})}),iS=f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"1em",width:"1em",children:[f.jsx("path",{fill:"currentColor",d:"M4 5.4C4 4.622 4.622 4 5.4 4h7.2c.778 0 1.4.622 1.4 1.4V6a1 1 0 1 0 2 0v-.6C16 3.518 14.482 2 12.6 2H5.4A3.394 3.394 0 0 0 2 5.4v7.2C2 14.482 3.518 16 5.4 16H6a1 1 0 1 0 0-2h-.6c-.778 0-1.4-.622-1.4-1.4z"}),f.jsx("path",{fill:"currentColor",d:"M9 11.4A2.4 2.4 0 0 1 11.4 9h7.2a2.4 2.4 0 0 1 2.4 2.4v7.2a2.4 2.4 0 0 1-2.4 2.4h-7.2A2.4 2.4 0 0 1 9 18.6z"})]}),lS=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:f.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"4",children:[f.jsx("path",{d:"M21 38c9.389 0 17-7.611 17-17S30.389 4 21 4S4 11.611 4 21s7.611 17 17 17Z"}),f.jsx("path",{strokeLinecap:"round",d:"M26.657 14.343A7.98 7.98 0 0 0 21 12a7.98 7.98 0 0 0-5.657 2.343m17.879 18.879l8.485 8.485"})]})}),pm=f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[f.jsx("path",{d:"M3 17h2.397a5 5 0 0 0 4.096-2.133l.177-.253m3.66-5.227l.177-.254A5 5 0 0 1 17.603 7H21"}),f.jsx("path",{d:"m18 4l3 3l-3 3M3 7h2.397a5 5 0 0 1 4.096 2.133l4.014 5.734A5 5 0 0 0 17.603 17H21"}),f.jsx("path",{d:"m18 20l3-3l-3-3"})]})}),aS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M9 10h6c1.654 0 3 1.346 3 3s-1.346 3-3 3h-3v2h3c2.757 0 5-2.243 5-5s-2.243-5-5-5H9V5L4 9l5 4z"})}),cS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M9 18h3v-2H9c-1.654 0-3-1.346-3-3s1.346-3 3-3h6v3l5-4l-5-4v3H9c-2.757 0-5 2.243-5 5s2.243 5 5 5"})}),y5=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",children:[f.jsx("path",{d:"M10.584 21.25h-1.25a6 6 0 0 1-6-6v-6.5a6 6 0 0 1 6-6h6.5a6 6 0 0 1 6 6V10"}),f.jsx("path",{strokeLinejoin:"round",d:"m16.55 16.864l-.51 2.959a1.164 1.164 0 0 1-2.212.093l-2.789-7.882a1.164 1.164 0 0 1 1.493-1.493l8.036 2.788a1.164 1.164 0 0 1-.115 2.234l-3.113.51a1.17 1.17 0 0 0-.79.791"})]})}),uS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M20 7.423v10.962q0 .69-.462 1.153T18.384 20H5.616q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h10.961zm-8.004 9.115q.831 0 1.417-.582T14 14.543t-.582-1.418t-1.413-.586t-1.419.581T10 14.535t.582 1.418t1.414.587M6.769 9.77h7.423v-3H6.77z"})}),dS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M14 19h6V5h-6zm-8 2q-.825 0-1.412-.587T4 19v-1q0-.425.288-.712T5 17t.713.288T6 18v1h6V5H6v1q0 .425-.288.713T5 7t-.712-.288T4 6V5q0-.825.588-1.412T6 3h14q.825 0 1.413.588T22 5v14q0 .825-.587 1.413T20 21zm-1-6q-.425 0-.712-.288T4 14v-1H3q-.425 0-.712-.288T2 12t.288-.712T3 11h1v-1q0-.425.288-.712T5 9t.713.288T6 10v1h1q.425 0 .713.288T8 12t-.288.713T7 13H6v1q0 .425-.288.713T5 15m9-3h-2zm0 0"})}),fS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M10 5H4v14h6zM4 21q-.825 0-1.412-.587T2 19V5q0-.825.588-1.412T4 3h14q.825 0 1.413.588T20 5v1q0 .425-.288.713T19 7t-.712-.288T18 6V5h-6v14h6v-1q0-.425.288-.712T19 17t.713.288T20 18v1q0 .825-.587 1.413T18 21zm15-6q-.425 0-.712-.288T18 14v-1h-1q-.425 0-.712-.288T16 12t.288-.712T17 11h1v-1q0-.425.288-.712T19 9t.713.288T20 10v1h1q.425 0 .713.288T22 12t-.288.713T21 13h-1v1q0 .425-.288.713T19 15m-9-3h2zm0 0"})}),hS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:f.jsx("path",{fill:"currentColor",d:"M6.4 9.98L7.68 8.7v-.256L6.4 7.164zm6.4-1.532l1.28-1.28V9.92L12.8 8.64zm7.68 9.472V0H0v17.92zm-1.28-2.56h-5.12v-1.024l-.256.256l-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024l-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704l.576.576V1.216h5.12V3.52l.96-.96l.32.32V1.216h5.12zm-5.76-2.112l-3.136-3.136l-3.264 3.264l-1.536-1.536l3.264-3.264L5.632 5.44l1.536-1.536l3.136 3.136l3.2-3.2l1.536 1.536l-3.2 3.2l3.136 3.136z"})}),pS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",children:f.jsx("path",{fill:"currentColor",d:"M1 4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2zm3 1a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 1 0v-5A.5.5 0 0 0 4 5m5-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zm2 1.5a.5.5 0 0 0 .5.5h.5v1.5h-.5a.5.5 0 0 0-.5.5v2.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 0-1H12V8.5h.5A.5.5 0 0 0 13 8V5.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5"})}),gS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M5 14v6h14v-6zm0 8q-.825 0-1.412-.587T3 20V6q0-.825.588-1.412T5 4h1q.425 0 .713.288T7 5t-.288.713T6 6H5v6h14V6h-1q-.425 0-.712-.288T17 5t.288-.712T18 4h1q.825 0 1.413.588T21 6v14q0 .825-.587 1.413T19 22zm6-16h-1q-.425 0-.712-.288T9 5t.288-.712T10 4h1V3q0-.425.288-.712T12 2t.713.288T13 3v1h1q.425 0 .713.288T15 5t-.288.713T14 6h-1v1q0 .425-.288.713T12 8t-.712-.288T11 7zm1 8v-2zm0 0"})}),mS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M19 10V4H5v6zM5 20q-.825 0-1.412-.587T3 18V4q0-.825.588-1.412T5 2h14q.825 0 1.413.588T21 4v14q0 .825-.587 1.413T19 20h-1q-.425 0-.712-.288T17 19t.288-.712T18 18h1v-6H5v6h1q.425 0 .713.288T7 19t-.288.713T6 20zm7 2q-.425 0-.712-.288T11 21v-1h-1q-.425 0-.712-.288T9 19t.288-.712T10 18h1v-1q0-.425.288-.712T12 16t.713.288T13 17v1h1q.425 0 .713.288T15 19t-.288.713T14 20h-1v1q0 .425-.288.713T12 22m0-12v2zm0 0"})}),vS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:f.jsx("path",{fill:"currentColor",d:"M17.728 11.456L14.592 8.32l3.2-3.2l-1.536-1.536l-3.2 3.2L9.92 3.648L8.384 5.12l3.2 3.2l-3.264 3.264l1.536 1.536l3.264-3.264l3.136 3.136zM0 17.92V0h20.48v17.92zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2z"})}),yS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 2048 2048",children:f.jsx("path",{fill:"currentColor",d:"M2048 1024v640H768v-256H256V896H0V256h1280v640H384v384h384v-256zM128 768h1024V384H128zm1792 384H896v384h1024z"})}),wS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M2 2h20v20H2zm2 2v16h7v-4h2v4h7V4h-7v4h-2V4zm13.182 6.232L15.414 12l1.768 1.768l-1.414 1.414L12.586 12l3.182-3.182zM8.33 8.818L11.512 12L8.33 15.182l-1.414-1.414L8.683 12l-1.767-1.768z"})}),bS=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 15 15",children:f.jsxs("g",{fill:"currentColor",children:[f.jsx("rect",{width:"1",height:"1",x:"7",y:"5.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"7",y:"3.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"7",y:"7.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"7",y:"13.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"7",y:"1.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"13",y:"7.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"5",y:"7.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"3",y:"7.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"9",y:"7.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"11",y:"7.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"7",y:"9.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"7",y:"11.025",rx:".5"}),f.jsx("rect",{width:"1",height:"1",x:"1",y:"7.025",rx:".5"}),f.jsx("path",{fillRule:"evenodd",d:"M1 1.5a.5.5 0 0 1 .5-.5H6v1H2v4H1zM13 2H9V1h4.5a.5.5 0 0 1 .5.5V6h-1zM1 13.5V9h1v4h4v1H1.5a.5.5 0 0 1-.5-.5m12-.5V9h1v4.5a.5.5 0 0 1-.5.5h-4v-1z",clipRule:"evenodd"})]})}),Fi=({className:e="",children:t,label:n,onReset:r})=>f.jsxs("div",{className:`wptb-control-label ${e}`,children:[f.jsx("label",{children:n}),r&&f.jsx("button",{className:"wptb-control-reset",onClick:r,title:"Reset",children:sS}),t]}),xS=e=>{const t=Math.round(e.h),n=Math.round(e.s),r=Math.round(e.l),o=e.a;return o<1?`hsla(${t}, ${n}%, ${r}%, ${o})`:`hsl(${t}, ${n}%, ${r}%)`},SS=e=>{const{r:t,g:n,b:r}=w5(e),o=e.a;let s=`#${((1<<24)+(t<<16)+(n<<8)+r).toString(16).slice(1)}`;if(o<1){const i=Math.round(o*255).toString(16).padStart(2,"0");s+=i}return s},kS=e=>{const{r:t,g:n,b:r}=w5(e);return e.a<1?`rgba(${t}, ${n}, ${r}, ${e.a})`:`rgb(${t}, ${n}, ${r})`},w5=({h:e,s:t,l:n})=>{t/=100,n/=100;const r=i=>(i+e/30)%12,o=t*Math.min(n,1-n),s=i=>Math.round(255*(n-o*Math.max(-1,Math.min(r(i)-3,9-r(i),1))));return{r:s(0),g:s(8),b:s(4)}},gm=e=>e?e.startsWith("#")?[b5(e),"hex"]:e.startsWith("rgb")?[J1(e),"rgb"]:e.startsWith("hsl")?[ES(e),"hsl"]:[TS(e),"hex"]:[{h:0,s:0,l:0,a:1},"hex"],J1=e=>{const t=e.match(/[\d.]+/g),[n,r,o]=t.slice(0,3).map(Number),s=t.length>3?Number(t[3]):void 0,i=n/255,l=r/255,a=o/255,c=Math.max(i,l,a),u=Math.min(i,l,a);let d=0,h=0;const p=(c+u)/2;if(c!==u){const g=c-u;switch(h=p>.5?g/(2-c-u):g/(c+u),c){case i:d=(l-a)/g+(l<a?6:0);break;case l:d=(a-i)/g+2;break;case a:d=(i-l)/g+4;break}d=Math.round(d*60)}return{h:d,s:Math.round(h*100),l:Math.round(p*100),a:s??1}},b5=e=>{let t;e.length===9&&(t=parseInt(e.slice(7,9),16)/255);const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16),s=J1(`rgb(${n}, ${r}, ${o})`);return t!==void 0&&t!==1?{...s,a:t}:s},TS=e=>{const t=document.body.style.color;document.body.style.color=e;const n=J1(getComputedStyle(document.body).color);return document.body.style.color=t,n},ES=e=>{const t=e.match(/[\d.]+/g).map(Number),[n,r,o]=t,s=t.length>3?t[3]:1;return{h:n,s:r,l:o,a:s}},x5=({onChange:e,onClose:t,value:n,style:r})=>{const[o,s]=A.useState({h:0,s:100,l:50,a:1}),[i,l]=A.useState({x:0,y:0}),[a,c]=A.useState("hex"),u=A.useRef(null),[d,h]=A.useState(n||""),p=A.useRef(!1),g=A.useRef(!1);A.useEffect(()=>{if(p.current){p.current=!1;return}const[w,S]=gm(n);c(S),s(w),l({x:w.s/100,y:1-w.l/50})},[n]),A.useEffect(()=>{const w=()=>{if(g.current){g.current=!1;return}t==null||t()};return document.addEventListener("mouseup",w),()=>document.removeEventListener("mouseup",w)},[t]);const v=(w,S)=>{p.current=!0;const k={...o,...w};s(k);const T=S||a;let C;switch(T){case"hex":C=SS(k);break;case"rgb":C=kS(k);break;case"hsl":C=xS(k);break}e==null||e(C),h(C||"")},x=w=>{if(w.preventDefault(),!u.current)return;g.current=!0;const S=u.current.getBoundingClientRect(),k=(I,j)=>{const R=(I-S.left)/S.width,M=(j-S.top)/S.height,_=Math.max(0,Math.min(1,R)),U=Math.max(0,Math.min(1,M));l({x:_,y:U}),v({s:_*100,l:(1-U)*((1-_)*100+_*50)})};k(w.clientX,w.clientY);const T=I=>{k(I.clientX,I.clientY)},C=()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",C)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",C)},m=async()=>{if(window.EyeDropper)try{const k=(await new window.EyeDropper().open()).sRGBHex;v(b5(k))}catch(w){console.error("EyeDropper error",w)}else WPTB.utils.notify("EyeDropper API not supported in this browser.")},y=()=>{if(!d){h(n);return}const[w,S]=gm(d);w&&(v(w),l({x:w.s/100,y:1-w.l/50}),c(S))};return Ho.createPortal(f.jsxs("div",{className:"color-picker",style:r,onPointerUp:w=>w.stopPropagation(),onMouseUp:w=>{g.current||w.stopPropagation()},children:[f.jsx("div",{className:"color-picker-area",ref:u,onMouseDown:x,style:{background:`
linear-gradient(to top, rgb(0, 0, 0), transparent),
linear-gradient(to right, rgb(255, 255, 255), hsl(${o.h}, 100%, 50%))
`},children:f.jsx("div",{className:"color-picker-handle",style:{left:`${i.x*100}%`,top:`${i.y*100}%`,backgroundColor:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}})}),f.jsxs("div",{className:"color-picker-area-2",children:[f.jsx("button",{className:"color-picker-eye-dropper",onClick:m,children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:f.jsx("path",{fill:"currentColor",d:"M22.22 10.853c-.11-.414-.26-.412.222-1.54l1.66-3.518c.02-.05.2-.412.192-.946c.015-.53-.313-1.29-1.12-1.643c-1.17-.555-1.17-.557-2.343-1.107c-.783-.396-1.58-.17-1.978.18c-.42.332-.584.7-.61.75L16.58 6.544c-.564 1.084-.655.97-1.048 1.147c-.47.13-1.244.558-1.785 1.815l-1.108 2.346l-.277.586l1.17.552l-3.6 7.623c-.38.828-.165 1.436-.165 2.032c.01.627-.077 1.51-.876 3.21l-.276.586l3.517 1.66l.276-.584c.807-1.7 1.43-2.327 1.92-2.718c.46-.38 1.067-.6 1.466-1.42l3.6-7.618l1.17.554l.28-.59l1.105-2.344c.628-1.218.47-2.083.27-2.53zM14.624 22.83c-.156.353-.413.44-1.09.955c-.578.448-1.265 1.172-2.01 2.6l-1.19-.562c.627-1.48.75-2.474.73-3.203c-.032-.85-.13-1.104.044-1.45l3.6-7.62l3.516 1.662z"})})}),f.jsxs("div",{className:"color-picker-sliders",children:[f.jsx("div",{className:"color-picker-sliders-hue",children:f.jsx("input",{type:"range",min:"0",max:"360",value:o.h,onChange:w=>v({h:parseInt(w.currentTarget.value)})})}),f.jsx("div",{className:"color-picker-sliders-alpha",children:f.jsx("input",{type:"range",min:"0",max:"100",value:o.a*100,onChange:w=>{v({a:parseInt(w.currentTarget.value)/100})}})})]})]}),f.jsxs("div",{className:"color-picker-preview",children:[f.jsxs("select",{value:a,onChange:w=>{c(w.target.value),v({},w.target.value)},children:[f.jsx("option",{value:"hex",children:"HEX"}),f.jsx("option",{value:"rgb",children:"RGB"}),f.jsx("option",{value:"hsl",children:"HSL"})]}),f.jsx("div",{className:"color-picker-preview-color",children:f.jsx("input",{type:"text",value:d,onChange:w=>{h(w.target.value)},onBlur:y,onKeyUp:w=>{w.key==="Enter"&&y()}})})]})]}),document.body)},mm={px:{max:20,step:1},em:{max:5,step:.2},rem:{max:5,step:.2}};function ap({label:e,value:t,onChange:n,onReset:r}){if(!t)t={width:"0px",color:"transparent",style:"solid"};else if(typeof t=="string"){const[l,a,...c]=t.split(" ");t={width:l,style:a,color:c.join(" ")}}else"top"in t&&"right"in t&&"bottom"in t&&"left"in t?t=t.top:(!("width"in t)||!("color"in t)||!("style"in t))&&(t={width:"0px",color:"transparent",style:"solid"});const[s]=A.useState(!1),i=()=>{WPTB.utils.notify("This is an upcoming feature","error")};return f.jsxs("div",{className:"wptb-border-control wptb-control",children:[f.jsx(Fi,{label:e,onReset:r,children:f.jsx("button",{type:"button",onClick:i,className:"wptb-split-btn",children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",focusable:"false",children:s?f.jsx("path",{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"}):f.jsx("path",{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})})})}),s?f.jsxs(f.Fragment,{children:[f.jsx(gl,{value:t==null?void 0:t.top,onChange:l=>n==null?void 0:n({...t,top:l})}),f.jsxs("div",{className:"wptb-border-control-vertical",children:[f.jsx(gl,{isVertical:!0,value:t==null?void 0:t.left,onChange:l=>n==null?void 0:n({...t,left:l})}),f.jsx(gl,{isVertical:!0,value:t==null?void 0:t.right,onChange:l=>n==null?void 0:n({...t,right:l})})]}),f.jsx(gl,{value:t==null?void 0:t.bottom,onChange:l=>n==null?void 0:n({...t,bottom:l})})]}):f.jsx(gl,{value:t,onChange:l=>n==null?void 0:n(l)})]})}function gl({value:e,onChange:t,isVertical:n}){var d,h;if(!e)e={width:"0px",color:"transparent",style:"solid"};else if(typeof e=="string"){const[p,g,...v]=e.split(" ");e={width:p,style:g,color:v.join(" ")}}const r=parseInt(e==null?void 0:e.width)||0,o=((d=e==null?void 0:e.width)==null?void 0:d.replace(r.toString(),""))||"px",s=A.useRef(),[i,l]=A.useState(!1),[a,c]=A.useState({x:"right",y:"bottom"});A.useLayoutEffect(()=>{if(!i)return;(()=>{if(s.current){const g=s.current.getBoundingClientRect(),v=300,x=400,m={right:window.innerWidth-g.right,left:g.left,top:g.top,bottom:window.innerHeight-g.bottom},y={x:"right",y:"bottom"};m.right>=v?y.x="right":m.left>=v&&(y.x="left"),m.bottom>=x?y.y="bottom":m.top>=x&&(y.y="top"),c(y)}})()},[i]);const u=()=>{if(!s.current)return{};const p=s.current.getBoundingClientRect(),g={};return a.x==="left"?g.left=p.left-300+window.scrollX:g.left=p.right+window.scrollX,a.y==="top"?g.top=p.top-300+window.scrollY:g.top=p.bottom+window.scrollY,g};return f.jsxs("div",{className:et("wptb-border-control-input",{"wptb-vertical":n}),children:[f.jsxs("div",{className:"wptb-border-control-input-group",children:[f.jsxs("div",{className:"wptb-border-control-input-color",onClick:()=>l(!0),ref:s,children:[f.jsx("div",{className:"wptb-border-control-input-color-preview",style:{backgroundColor:e==null?void 0:e.color}}),i&&f.jsx(x5,{value:(e==null?void 0:e.color)||"#000000",onChange:p=>t({...e,color:p}),onClose:()=>l(!1),style:u()})]}),f.jsx("div",{className:"wptb-border-control-input-width",children:f.jsx(mi,{value:r,unit:o,onValueChange:p=>t({...e,width:`${p}${o}`}),onUnitChange:p=>t({...e,width:`${u5(o,p,r)}${p}`}),allowedUnits:mm})})]}),f.jsx("div",{className:"wptb-border-control-input-range",children:f.jsx("input",{type:"range",className:"wptb-range-slider",min:"0",max:Math.max(((h=mm[o])==null?void 0:h.max)||20,r),value:r,onChange:p=>{t({...e,width:`${p.target.value}${o}`})}})})]})}const vm={px:{step:1,min:0,max:100},em:{step:.2,min:0,max:10},rem:{step:.2,min:0,max:10},"%":{step:1,min:0,max:100}};function qr({label:e,value:t=0,onChange:n,onReset:r,allowedUnits:o,allowOutOfRange:s,allowOutOfRangeMin:i,allowOutOfRangeMax:l}){const{numVal:a,unit:c,min:u,max:d,step:h}=A.useMemo(()=>{const g=parseFloat(t)||0,v=(t==null?void 0:t.toString().replace(g.toString(),""))||"px",x=(o==null?void 0:o[v])||vm[v];let m=(x==null?void 0:x.min)??0,y=(x==null?void 0:x.max)??100;return s&&(m=Math.min(m,g),y=Math.max(y,g)),{numVal:g,unit:v,min:m,max:y,step:(x==null?void 0:x.step)??1}},[t,o,s]),p=g=>{s?n==null||n(`${g}${c}`):g<u?i?n==null||n(`${g}${c}`):n==null||n(`${u}${c}`):g>d?l?n==null||n(`${g}${c}`):n==null||n(`${d}${c}`):n==null||n(`${g}${c}`)};return f.jsxs("div",{className:"wptb-size-control wptb-control",children:[f.jsx(Fi,{label:e,onReset:r}),f.jsxs("div",{className:"wptb-size-control-input-area",children:[f.jsx("input",{type:"range",className:"wptb-range-slider",min:u,max:d,step:h,value:a,onChange:g=>p(+g.target.value)}),f.jsx(mi,{value:t,onValueChange:p,onUnitChange:g=>n==null?void 0:n(`${u5(c,g,a)}${g}`),unit:c,step:h,allowedUnits:o||vm})]})]})}const CS=({value:e,label:t,onChange:n,onReset:r})=>{if(typeof e=="string"){if(e.indexOf(" ")!==-1){const l=e.split(" ");l.length===4?e={topLeft:l[0],topRight:l[1],bottomRight:l[2],bottomLeft:l[3]}:l.length===2?e={topLeft:l[0],topRight:l[1],bottomRight:l[0],bottomLeft:l[1]}:e={topLeft:l[0],topRight:l[1],bottomRight:l[2],bottomLeft:l[1]},e=e.topLeft}}else e!=null&&e.topRight&&(e=e.topRight);const[s]=A.useState(!1),i=()=>{WPTB.utils.notify("This is an upcoming feature","error")};return f.jsxs("div",{className:"wptb-border-radius-control wptb-control",children:[f.jsx(Fi,{label:t,onReset:r,children:f.jsx("button",{type:"button",onClick:i,className:"wptb-split-btn",children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",focusable:"false",children:s?f.jsx("path",{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"}):f.jsx("path",{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})})})}),s?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"wptb-border-radius-control-split",children:[f.jsx(mi,{value:e==null?void 0:e.topLeft,onChange:l=>n==null?void 0:n({...e,topLeft:l}),autoUnit:!0}),f.jsx(mi,{value:e==null?void 0:e.topRight,onChange:l=>n==null?void 0:n({...e,topRight:l}),autoUnit:!0})]}),f.jsxs("div",{className:"wptb-border-radius-control-split",children:[f.jsx(mi,{value:e==null?void 0:e.bottomRight,onChange:l=>n==null?void 0:n({...e,bottomRight:l}),autoUnit:!0}),f.jsx(mi,{value:e==null?void 0:e.bottomLeft,onChange:l=>n==null?void 0:n({...e,bottomLeft:l}),autoUnit:!0})]})]}):f.jsx("div",{children:f.jsx(qr,{value:e,onChange:n,allowedUnits:{px:{max:100},"%":{max:100},em:{max:10},rem:{max:10}},allowOutOfRange:!0})})]})};function GL({label:e,checked:t,onChange:n}){return f.jsxs("label",{className:"wptb-checkbox-control wptb-control",children:[f.jsx("input",{type:"checkbox",checked:t,className:"btn",onChange:()=>n==null?void 0:n(!t)}),e&&f.jsx("p",{className:"wptb-checkbox-control-label",children:e})]})}const yr=({label:e,value:t,onChange:n,onReset:r})=>{const o=A.useRef(),[s,i]=A.useState(!1),[l,a]=A.useState({x:"right",y:"bottom"});A.useLayoutEffect(()=>{if(!s)return;(()=>{if(o.current){const d=o.current.getBoundingClientRect(),h=300,p=400,g={right:window.innerWidth-d.right,left:d.left,top:d.top,bottom:window.innerHeight-d.bottom},v={x:"right",y:"bottom"};g.right>=h?v.x="right":g.left>=h&&(v.x="left"),g.bottom>=p?v.y="bottom":g.top>=p&&(v.y="top"),a(v)}})()},[s]);const c=()=>{if(!o.current)return{};const u=o.current.getBoundingClientRect(),d={};return l.x==="left"?d.left=u.left-300+window.scrollX:d.left=u.right+window.scrollX,l.y==="top"?d.top=u.top-300+window.scrollY:d.top=u.bottom+window.scrollY,d};return f.jsxs("div",{className:"wptb-color-control wptb-control",children:[f.jsx(Fi,{label:e,onReset:r,className:"wptb-color-control-label"}),f.jsxs("div",{className:"wptb-color-control-input",children:[s&&f.jsx(x5,{value:t,onChange:n,style:c(),onClose:()=>i(!1)}),f.jsxs("button",{className:"wptb-color-control-preview",onClick:u=>{u.stopPropagation(),i(!s)},ref:o,children:[f.jsx("div",{className:"wptb-color-control-preview-color",style:{background:t}}),f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:f.jsx("path",{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"})})]})]})]})};function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cp.apply(null,arguments)}function ym(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function up(e,t){return up=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},up(e,t)}function IS(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,up(e,t)}var wm=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function NS(e,t){return!!(e===t||wm(e)&&wm(t))}function AS(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!NS(e[n],t[n]))return!1;return!0}function Of(e,t){t===void 0&&(t=AS);var n,r=[],o,s=!1;function i(){for(var l=[],a=0;a<arguments.length;a++)l[a]=arguments[a];return s&&n===this&&t(l,r)||(o=e.apply(this,l),s=!0,n=this,r=l),o}return i}var jS=typeof performance=="object"&&typeof performance.now=="function",bm=jS?function(){return performance.now()}:function(){return Date.now()};function xm(e){cancelAnimationFrame(e.id)}function RS(e,t){var n=bm();function r(){bm()-n>=t?e.call(null):o.id=requestAnimationFrame(r)}var o={id:requestAnimationFrame(r)};return o}var Mf=-1;function Sm(e){if(e===void 0&&(e=!1),Mf===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Mf=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Mf}var Ks=null;function km(e){if(e===void 0&&(e=!1),Ks===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Ks="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Ks="negative":Ks="positive-ascending"),document.body.removeChild(t),Ks}return Ks}var LS=150,_S=function(t,n){return t};function OS(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,s=e.getOffsetForIndexAndAlignment,i=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,a=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(d){IS(h,d);function h(g){var v;return v=d.call(this,g)||this,v._instanceProps=a(v.props,ym(v)),v._outerRef=void 0,v._resetIsScrollingTimeoutId=null,v.state={instance:ym(v),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof v.props.initialScrollOffset=="number"?v.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},v._callOnItemsRendered=void 0,v._callOnItemsRendered=Of(function(x,m,y,w){return v.props.onItemsRendered({overscanStartIndex:x,overscanStopIndex:m,visibleStartIndex:y,visibleStopIndex:w})}),v._callOnScroll=void 0,v._callOnScroll=Of(function(x,m,y){return v.props.onScroll({scrollDirection:x,scrollOffset:m,scrollUpdateWasRequested:y})}),v._getItemStyle=void 0,v._getItemStyle=function(x){var m=v.props,y=m.direction,w=m.itemSize,S=m.layout,k=v._getItemStyleCache(c&&w,c&&S,c&&y),T;if(k.hasOwnProperty(x))T=k[x];else{var C=n(v.props,x,v._instanceProps),I=o(v.props,x,v._instanceProps),j=y==="horizontal"||S==="horizontal",R=y==="rtl",M=j?C:0;k[x]=T={position:"absolute",left:R?void 0:M,right:R?M:void 0,top:j?0:C,height:j?"100%":I,width:j?I:"100%"}}return T},v._getItemStyleCache=void 0,v._getItemStyleCache=Of(function(x,m,y){return{}}),v._onScrollHorizontal=function(x){var m=x.currentTarget,y=m.clientWidth,w=m.scrollLeft,S=m.scrollWidth;v.setState(function(k){if(k.scrollOffset===w)return null;var T=v.props.direction,C=w;if(T==="rtl")switch(km()){case"negative":C=-w;break;case"positive-descending":C=S-y-w;break}return C=Math.max(0,Math.min(C,S-y)),{isScrolling:!0,scrollDirection:k.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},v._resetIsScrollingDebounced)},v._onScrollVertical=function(x){var m=x.currentTarget,y=m.clientHeight,w=m.scrollHeight,S=m.scrollTop;v.setState(function(k){if(k.scrollOffset===S)return null;var T=Math.max(0,Math.min(S,w-y));return{isScrolling:!0,scrollDirection:k.scrollOffset<T?"forward":"backward",scrollOffset:T,scrollUpdateWasRequested:!1}},v._resetIsScrollingDebounced)},v._outerRefSetter=function(x){var m=v.props.outerRef;v._outerRef=x,typeof m=="function"?m(x):m!=null&&typeof m=="object"&&m.hasOwnProperty("current")&&(m.current=x)},v._resetIsScrollingDebounced=function(){v._resetIsScrollingTimeoutId!==null&&xm(v._resetIsScrollingTimeoutId),v._resetIsScrollingTimeoutId=RS(v._resetIsScrolling,LS)},v._resetIsScrolling=function(){v._resetIsScrollingTimeoutId=null,v.setState({isScrolling:!1},function(){v._getItemStyleCache(-1,null)})},v}h.getDerivedStateFromProps=function(v,x){return MS(v,x),u(v),null};var p=h.prototype;return p.scrollTo=function(v){v=Math.max(0,v),this.setState(function(x){return x.scrollOffset===v?null:{scrollDirection:x.scrollOffset<v?"forward":"backward",scrollOffset:v,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(v,x){x===void 0&&(x="auto");var m=this.props,y=m.itemCount,w=m.layout,S=this.state.scrollOffset;v=Math.max(0,Math.min(v,y-1));var k=0;if(this._outerRef){var T=this._outerRef;w==="vertical"?k=T.scrollWidth>T.clientWidth?Sm():0:k=T.scrollHeight>T.clientHeight?Sm():0}this.scrollTo(s(this.props,v,x,S,this._instanceProps,k))},p.componentDidMount=function(){var v=this.props,x=v.direction,m=v.initialScrollOffset,y=v.layout;if(typeof m=="number"&&this._outerRef!=null){var w=this._outerRef;x==="horizontal"||y==="horizontal"?w.scrollLeft=m:w.scrollTop=m}this._callPropsCallbacks()},p.componentDidUpdate=function(){var v=this.props,x=v.direction,m=v.layout,y=this.state,w=y.scrollOffset,S=y.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var k=this._outerRef;if(x==="horizontal"||m==="horizontal")if(x==="rtl")switch(km()){case"negative":k.scrollLeft=-w;break;case"positive-ascending":k.scrollLeft=w;break;default:var T=k.clientWidth,C=k.scrollWidth;k.scrollLeft=C-T-w;break}else k.scrollLeft=w;else k.scrollTop=w}this._callPropsCallbacks()},p.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&xm(this._resetIsScrollingTimeoutId)},p.render=function(){var v=this.props,x=v.children,m=v.className,y=v.direction,w=v.height,S=v.innerRef,k=v.innerElementType,T=v.innerTagName,C=v.itemCount,I=v.itemData,j=v.itemKey,R=j===void 0?_S:j,M=v.layout,_=v.outerElementType,U=v.outerTagName,V=v.style,ee=v.useIsScrolling,Ee=v.width,Re=this.state.isScrolling,D=y==="horizontal"||M==="horizontal",K=D?this._onScrollHorizontal:this._onScrollVertical,H=this._getRangeToRender(),oe=H[0],me=H[1],pe=[];if(C>0)for(var Oe=oe;Oe<=me;Oe++)pe.push(A.createElement(x,{data:I,key:R(Oe,I),index:Oe,isScrolling:ee?Re:void 0,style:this._getItemStyle(Oe)}));var le=r(this.props,this._instanceProps);return A.createElement(_||U||"div",{className:m,onScroll:K,ref:this._outerRefSetter,style:cp({position:"relative",height:w,width:Ee,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:y},V)},A.createElement(k||T||"div",{children:pe,ref:S,style:{height:D?"100%":le,pointerEvents:Re?"none":void 0,width:D?le:"100%"}}))},p._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var v=this.props.itemCount;if(v>0){var x=this._getRangeToRender(),m=x[0],y=x[1],w=x[2],S=x[3];this._callOnItemsRendered(m,y,w,S)}}if(typeof this.props.onScroll=="function"){var k=this.state,T=k.scrollDirection,C=k.scrollOffset,I=k.scrollUpdateWasRequested;this._callOnScroll(T,C,I)}},p._getRangeToRender=function(){var v=this.props,x=v.itemCount,m=v.overscanCount,y=this.state,w=y.isScrolling,S=y.scrollDirection,k=y.scrollOffset;if(x===0)return[0,0,0,0];var T=i(this.props,k,this._instanceProps),C=l(this.props,T,k,this._instanceProps),I=!w||S==="backward"?Math.max(1,m):1,j=!w||S==="forward"?Math.max(1,m):1;return[Math.max(0,T-I),Math.max(0,Math.min(x-1,C+j)),T,C]},h}(A.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var MS=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},BS=OS({getItemOffset:function(t,n){var r=t.itemSize;return n*r},getItemSize:function(t,n){var r=t.itemSize;return r},getEstimatedTotalSize:function(t){var n=t.itemCount,r=t.itemSize;return r*n},getOffsetForIndexAndAlignment:function(t,n,r,o,s,i){var l=t.direction,a=t.height,c=t.itemCount,u=t.itemSize,d=t.layout,h=t.width,p=l==="horizontal"||d==="horizontal",g=p?h:a,v=Math.max(0,c*u-g),x=Math.min(v,n*u),m=Math.max(0,n*u-g+u+i);switch(r==="smart"&&(o>=m-g&&o<=x+g?r="auto":r="center"),r){case"start":return x;case"end":return m;case"center":{var y=Math.round(m+(x-m)/2);return y<Math.ceil(g/2)?0:y>v+Math.floor(g/2)?v:y}case"auto":default:return o>=m&&o<=x?o:o<m?m:x}},getStartIndexForOffset:function(t,n){var r=t.itemCount,o=t.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/o)))},getStopIndexForStartIndex:function(t,n,r){var o=t.direction,s=t.height,i=t.itemCount,l=t.itemSize,a=t.layout,c=t.width,u=o==="horizontal"||a==="horizontal",d=n*l,h=u?c:s,p=Math.ceil((h+r-d)/l);return Math.max(0,Math.min(i-1,n+p-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});function PS(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var S5=PS,zS=typeof Cn=="object"&&Cn&&Cn.Object===Object&&Cn,DS=zS,HS=DS,$S=typeof self=="object"&&self&&self.Object===Object&&self,qS=HS||$S||Function("return this")(),k5=qS,FS=k5,US=function(){return FS.Date.now()},VS=US,WS=/\s/;function GS(e){for(var t=e.length;t--&&WS.test(e.charAt(t)););return t}var KS=GS,YS=KS,ZS=/^\s+/;function QS(e){return e&&e.slice(0,YS(e)+1).replace(ZS,"")}var XS=QS,JS=k5,ek=JS.Symbol,T5=ek,Tm=T5,E5=Object.prototype,tk=E5.hasOwnProperty,nk=E5.toString,ml=Tm?Tm.toStringTag:void 0;function rk(e){var t=tk.call(e,ml),n=e[ml];try{e[ml]=void 0;var r=!0}catch{}var o=nk.call(e);return r&&(t?e[ml]=n:delete e[ml]),o}var ok=rk,sk=Object.prototype,ik=sk.toString;function lk(e){return ik.call(e)}var ak=lk,Em=T5,ck=ok,uk=ak,dk="[object Null]",fk="[object Undefined]",Cm=Em?Em.toStringTag:void 0;function hk(e){return e==null?e===void 0?fk:dk:Cm&&Cm in Object(e)?ck(e):uk(e)}var pk=hk;function gk(e){return e!=null&&typeof e=="object"}var mk=gk,vk=pk,yk=mk,wk="[object Symbol]";function bk(e){return typeof e=="symbol"||yk(e)&&vk(e)==wk}var xk=bk,Sk=XS,Im=S5,kk=xk,Nm=NaN,Tk=/^[-+]0x[0-9a-f]+$/i,Ek=/^0b[01]+$/i,Ck=/^0o[0-7]+$/i,Ik=parseInt;function Nk(e){if(typeof e=="number")return e;if(kk(e))return Nm;if(Im(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Im(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Sk(e);var n=Ek.test(e);return n||Ck.test(e)?Ik(e.slice(2),n?2:8):Tk.test(e)?Nm:+e}var Ak=Nk,jk=S5,Bf=VS,Am=Ak,Rk="Expected a function",Lk=Math.max,_k=Math.min;function Ok(e,t,n){var r,o,s,i,l,a,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Rk);t=Am(t)||0,jk(n)&&(u=!!n.leading,d="maxWait"in n,s=d?Lk(Am(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function p(T){var C=r,I=o;return r=o=void 0,c=T,i=e.apply(I,C),i}function g(T){return c=T,l=setTimeout(m,t),u?p(T):i}function v(T){var C=T-a,I=T-c,j=t-C;return d?_k(j,s-I):j}function x(T){var C=T-a,I=T-c;return a===void 0||C>=t||C<0||d&&I>=s}function m(){var T=Bf();if(x(T))return y(T);l=setTimeout(m,v(T))}function y(T){return l=void 0,h&&r?p(T):(r=o=void 0,i)}function w(){l!==void 0&&clearTimeout(l),c=0,r=a=o=l=void 0}function S(){return l===void 0?i:y(Bf())}function k(){var T=Bf(),C=x(T);if(r=arguments,o=this,a=T,C){if(l===void 0)return g(a);if(d)return clearTimeout(l),l=setTimeout(m,t),p(a)}return l===void 0&&(l=setTimeout(m,t)),i}return k.cancel=w,k.flush=S,k}var Mk=Ok;const Bk=Di(Mk);function Jr(e){return Array.isArray?Array.isArray(e):N5(e)==="[object Array]"}function Pk(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function zk(e){return e==null?"":Pk(e)}function pr(e){return typeof e=="string"}function C5(e){return typeof e=="number"}function Dk(e){return e===!0||e===!1||Hk(e)&&N5(e)=="[object Boolean]"}function I5(e){return typeof e=="object"}function Hk(e){return I5(e)&&e!==null}function an(e){return e!=null}function Pf(e){return!e.trim().length}function N5(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const $k="Incorrect 'index' type",qk=e=>`Invalid value for key ${e}`,Fk=e=>`Pattern length exceeds max of ${e}.`,Uk=e=>`Missing ${e} property in key`,Vk=e=>`Property 'weight' in key '${e}' must be a positive integer`,jm=Object.prototype.hasOwnProperty;class Wk{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let o=A5(r);this._keys.push(o),this._keyMap[o.id]=o,n+=o.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function A5(e){let t=null,n=null,r=null,o=1,s=null;if(pr(e)||Jr(e))r=e,t=Rm(e),n=dp(e);else{if(!jm.call(e,"name"))throw new Error(Uk("name"));const i=e.name;if(r=i,jm.call(e,"weight")&&(o=e.weight,o<=0))throw new Error(Vk(i));t=Rm(i),n=dp(i),s=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:s}}function Rm(e){return Jr(e)?e:e.split(".")}function dp(e){return Jr(e)?e.join("."):e}function Gk(e,t){let n=[],r=!1;const o=(s,i,l)=>{if(an(s))if(!i[l])n.push(s);else{let a=i[l];const c=s[a];if(!an(c))return;if(l===i.length-1&&(pr(c)||C5(c)||Dk(c)))n.push(zk(c));else if(Jr(c)){r=!0;for(let u=0,d=c.length;u<d;u+=1)o(c[u],i,l+1)}else i.length&&o(c,i,l+1)}};return o(e,pr(t)?t.split("."):t,0),r?n:n[0]}const Kk={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Yk={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Zk={location:0,threshold:.6,distance:100},Qk={useExtendedSearch:!1,getFn:Gk,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var re={...Yk,...Kk,...Zk,...Qk};const Xk=/[^ ]+/g;function Jk(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(o){const s=o.match(Xk).length;if(n.has(s))return n.get(s);const i=1/Math.pow(s,.5*e),l=parseFloat(Math.round(i*r)/r);return n.set(s,l),l},clear(){n.clear()}}}class e0{constructor({getFn:t=re.getFn,fieldNormWeight:n=re.fieldNormWeight}={}){this.norm=Jk(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,pr(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();pr(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!an(t)||Pf(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((o,s)=>{let i=o.getFn?o.getFn(t):this.getFn(t,o.path);if(an(i)){if(Jr(i)){let l=[];const a=[{nestedArrIndex:-1,value:i}];for(;a.length;){const{nestedArrIndex:c,value:u}=a.pop();if(an(u))if(pr(u)&&!Pf(u)){let d={v:u,i:c,n:this.norm.get(u)};l.push(d)}else Jr(u)&&u.forEach((d,h)=>{a.push({nestedArrIndex:h,value:d})})}r.$[s]=l}else if(pr(i)&&!Pf(i)){let l={v:i,n:this.norm.get(i)};r.$[s]=l}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function j5(e,t,{getFn:n=re.getFn,fieldNormWeight:r=re.fieldNormWeight}={}){const o=new e0({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(A5)),o.setSources(t),o.create(),o}function e9(e,{getFn:t=re.getFn,fieldNormWeight:n=re.fieldNormWeight}={}){const{keys:r,records:o}=e,s=new e0({getFn:t,fieldNormWeight:n});return s.setKeys(r),s.setIndexRecords(o),s}function pc(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=re.distance,ignoreLocation:s=re.ignoreLocation}={}){const i=t/e.length;if(s)return i;const l=Math.abs(r-n);return o?i+l/o:l?1:i}function t9(e=[],t=re.minMatchCharLength){let n=[],r=-1,o=-1,s=0;for(let i=e.length;s<i;s+=1){let l=e[s];l&&r===-1?r=s:!l&&r!==-1&&(o=s-1,o-r+1>=t&&n.push([r,o]),r=-1)}return e[s-1]&&s-r>=t&&n.push([r,s-1]),n}const ss=32;function n9(e,t,n,{location:r=re.location,distance:o=re.distance,threshold:s=re.threshold,findAllMatches:i=re.findAllMatches,minMatchCharLength:l=re.minMatchCharLength,includeMatches:a=re.includeMatches,ignoreLocation:c=re.ignoreLocation}={}){if(t.length>ss)throw new Error(Fk(ss));const u=t.length,d=e.length,h=Math.max(0,Math.min(r,d));let p=s,g=h;const v=l>1||a,x=v?Array(d):[];let m;for(;(m=e.indexOf(t,g))>-1;){let C=pc(t,{currentLocation:m,expectedLocation:h,distance:o,ignoreLocation:c});if(p=Math.min(C,p),g=m+u,v){let I=0;for(;I<u;)x[m+I]=1,I+=1}}g=-1;let y=[],w=1,S=u+d;const k=1<<u-1;for(let C=0;C<u;C+=1){let I=0,j=S;for(;I<j;)pc(t,{errors:C,currentLocation:h+j,expectedLocation:h,distance:o,ignoreLocation:c})<=p?I=j:S=j,j=Math.floor((S-I)/2+I);S=j;let R=Math.max(1,h-j+1),M=i?d:Math.min(h+j,d)+u,_=Array(M+2);_[M+1]=(1<<C)-1;for(let V=M;V>=R;V-=1){let ee=V-1,Ee=n[e.charAt(ee)];if(v&&(x[ee]=+!!Ee),_[V]=(_[V+1]<<1|1)&Ee,C&&(_[V]|=(y[V+1]|y[V])<<1|1|y[V+1]),_[V]&k&&(w=pc(t,{errors:C,currentLocation:ee,expectedLocation:h,distance:o,ignoreLocation:c}),w<=p)){if(p=w,g=ee,g<=h)break;R=Math.max(1,2*h-g)}}if(pc(t,{errors:C+1,currentLocation:h,expectedLocation:h,distance:o,ignoreLocation:c})>p)break;y=_}const T={isMatch:g>=0,score:Math.max(.001,w)};if(v){const C=t9(x,l);C.length?a&&(T.indices=C):T.isMatch=!1}return T}function r9(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const o=e.charAt(n);t[o]=(t[o]||0)|1<<r-n-1}return t}const bu=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class R5{constructor(t,{location:n=re.location,threshold:r=re.threshold,distance:o=re.distance,includeMatches:s=re.includeMatches,findAllMatches:i=re.findAllMatches,minMatchCharLength:l=re.minMatchCharLength,isCaseSensitive:a=re.isCaseSensitive,ignoreDiacritics:c=re.ignoreDiacritics,ignoreLocation:u=re.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:o,includeMatches:s,findAllMatches:i,minMatchCharLength:l,isCaseSensitive:a,ignoreDiacritics:c,ignoreLocation:u},t=a?t:t.toLowerCase(),t=c?bu(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const d=(p,g)=>{this.chunks.push({pattern:p,alphabet:r9(p),startIndex:g})},h=this.pattern.length;if(h>ss){let p=0;const g=h%ss,v=h-g;for(;p<v;)d(this.pattern.substr(p,ss),p),p+=ss;if(g){const x=h-ss;d(this.pattern.substr(x),x)}}else d(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o}=this.options;if(t=n?t:t.toLowerCase(),t=r?bu(t):t,this.pattern===t){let v={isMatch:!0,score:0};return o&&(v.indices=[[0,t.length-1]]),v}const{location:s,distance:i,threshold:l,findAllMatches:a,minMatchCharLength:c,ignoreLocation:u}=this.options;let d=[],h=0,p=!1;this.chunks.forEach(({pattern:v,alphabet:x,startIndex:m})=>{const{isMatch:y,score:w,indices:S}=n9(t,v,x,{location:s+m,distance:i,threshold:l,findAllMatches:a,minMatchCharLength:c,includeMatches:o,ignoreLocation:u});y&&(p=!0),h+=w,y&&S&&(d=[...d,...S])});let g={isMatch:p,score:p?h/this.chunks.length:1};return p&&o&&(g.indices=d),g}}class $o{constructor(t){this.pattern=t}static isMultiMatch(t){return Lm(t,this.multiRegex)}static isSingleMatch(t){return Lm(t,this.singleRegex)}search(){}}function Lm(e,t){const n=e.match(t);return n?n[1]:null}class o9 extends $o{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class s9 extends $o{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class i9 extends $o{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class l9 extends $o{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class a9 extends $o{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class c9 extends $o{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class L5 extends $o{constructor(t,{location:n=re.location,threshold:r=re.threshold,distance:o=re.distance,includeMatches:s=re.includeMatches,findAllMatches:i=re.findAllMatches,minMatchCharLength:l=re.minMatchCharLength,isCaseSensitive:a=re.isCaseSensitive,ignoreDiacritics:c=re.ignoreDiacritics,ignoreLocation:u=re.ignoreLocation}={}){super(t),this._bitapSearch=new R5(t,{location:n,threshold:r,distance:o,includeMatches:s,findAllMatches:i,minMatchCharLength:l,isCaseSensitive:a,ignoreDiacritics:c,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class _5 extends $o{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const o=[],s=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+s,o.push([r,n-1]);const i=!!o.length;return{isMatch:i,score:i?0:1,indices:o}}}const fp=[o9,_5,i9,l9,c9,a9,s9,L5],_m=fp.length,u9=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,d9="|";function f9(e,t={}){return e.split(d9).map(n=>{let r=n.trim().split(u9).filter(s=>s&&!!s.trim()),o=[];for(let s=0,i=r.length;s<i;s+=1){const l=r[s];let a=!1,c=-1;for(;!a&&++c<_m;){const u=fp[c];let d=u.isMultiMatch(l);d&&(o.push(new u(d,t)),a=!0)}if(!a)for(c=-1;++c<_m;){const u=fp[c];let d=u.isSingleMatch(l);if(d){o.push(new u(d,t));break}}}return o})}const h9=new Set([L5.type,_5.type]);class p9{constructor(t,{isCaseSensitive:n=re.isCaseSensitive,ignoreDiacritics:r=re.ignoreDiacritics,includeMatches:o=re.includeMatches,minMatchCharLength:s=re.minMatchCharLength,ignoreLocation:i=re.ignoreLocation,findAllMatches:l=re.findAllMatches,location:a=re.location,threshold:c=re.threshold,distance:u=re.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o,minMatchCharLength:s,findAllMatches:l,ignoreLocation:i,location:a,threshold:c,distance:u},t=n?t:t.toLowerCase(),t=r?bu(t):t,this.pattern=t,this.query=f9(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:o,ignoreDiacritics:s}=this.options;t=o?t:t.toLowerCase(),t=s?bu(t):t;let i=0,l=[],a=0;for(let c=0,u=n.length;c<u;c+=1){const d=n[c];l.length=0,i=0;for(let h=0,p=d.length;h<p;h+=1){const g=d[h],{isMatch:v,indices:x,score:m}=g.search(t);if(v){if(i+=1,a+=m,r){const y=g.constructor.type;h9.has(y)?l=[...l,...x]:l.push(x)}}else{a=0,i=0,l.length=0;break}}if(i){let h={isMatch:!0,score:a/i};return r&&(h.indices=l),h}}return{isMatch:!1,score:1}}}const hp=[];function g9(...e){hp.push(...e)}function pp(e,t){for(let n=0,r=hp.length;n<r;n+=1){let o=hp[n];if(o.condition(e,t))return new o(e,t)}return new R5(e,t)}const xu={AND:"$and",OR:"$or"},gp={PATH:"$path",PATTERN:"$val"},mp=e=>!!(e[xu.AND]||e[xu.OR]),m9=e=>!!e[gp.PATH],v9=e=>!Jr(e)&&I5(e)&&!mp(e),Om=e=>({[xu.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function O5(e,t,{auto:n=!0}={}){const r=o=>{let s=Object.keys(o);const i=m9(o);if(!i&&s.length>1&&!mp(o))return r(Om(o));if(v9(o)){const a=i?o[gp.PATH]:s[0],c=i?o[gp.PATTERN]:o[a];if(!pr(c))throw new Error(qk(a));const u={keyId:dp(a),pattern:c};return n&&(u.searcher=pp(c,t)),u}let l={children:[],operator:s[0]};return s.forEach(a=>{const c=o[a];Jr(c)&&c.forEach(u=>{l.children.push(r(u))})}),l};return mp(e)||(e=Om(e)),r(e)}function y9(e,{ignoreFieldNorm:t=re.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:s,score:i})=>{const l=o?o.weight:null;r*=Math.pow(i===0&&l?Number.EPSILON:i,(l||1)*(t?1:s))}),n.score=r})}function w9(e,t){const n=e.matches;t.matches=[],an(n)&&n.forEach(r=>{if(!an(r.indices)||!r.indices.length)return;const{indices:o,value:s}=r;let i={indices:o,value:s};r.key&&(i.key=r.key.src),r.idx>-1&&(i.refIndex=r.idx),t.matches.push(i)})}function b9(e,t){t.score=e.score}function x9(e,t,{includeMatches:n=re.includeMatches,includeScore:r=re.includeScore}={}){const o=[];return n&&o.push(w9),r&&o.push(b9),e.map(s=>{const{idx:i}=s,l={item:t[i],refIndex:i};return o.length&&o.forEach(a=>{a(s,l)}),l})}class Ui{constructor(t,n={},r){this.options={...re,...n},this.options.useExtendedSearch,this._keyStore=new Wk(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof e0))throw new Error($k);this._myIndex=n||j5(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){an(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,o=this._docs.length;r<o;r+=1){const s=this._docs[r];t(s,r)&&(this.removeAt(r),r-=1,o-=1,n.push(s))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:r,includeScore:o,shouldSort:s,sortFn:i,ignoreFieldNorm:l}=this.options;let a=pr(t)?pr(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return y9(a,{ignoreFieldNorm:l}),s&&a.sort(i),C5(n)&&n>-1&&(a=a.slice(0,n)),x9(a,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){const n=pp(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:s,i,n:l})=>{if(!an(s))return;const{isMatch:a,score:c,indices:u}=n.searchIn(s);a&&o.push({item:s,idx:i,matches:[{score:c,value:s,norm:l,indices:u}]})}),o}_searchLogical(t){const n=O5(t,this.options),r=(l,a,c)=>{if(!l.children){const{keyId:d,searcher:h}=l,p=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(a,d),searcher:h});return p&&p.length?[{idx:c,item:a,matches:p}]:[]}const u=[];for(let d=0,h=l.children.length;d<h;d+=1){const p=l.children[d],g=r(p,a,c);if(g.length)u.push(...g);else if(l.operator===xu.AND)return[]}return u},o=this._myIndex.records,s={},i=[];return o.forEach(({$:l,i:a})=>{if(an(l)){let c=r(n,l,a);c.length&&(s[a]||(s[a]={idx:a,item:l,matches:[]},i.push(s[a])),c.forEach(({matches:u})=>{s[a].matches.push(...u)}))}}),i}_searchObjectList(t){const n=pp(t,this.options),{keys:r,records:o}=this._myIndex,s=[];return o.forEach(({$:i,i:l})=>{if(!an(i))return;let a=[];r.forEach((c,u)=>{a.push(...this._findMatches({key:c,value:i[u],searcher:n}))}),a.length&&s.push({idx:l,item:i,matches:a})}),s}_findMatches({key:t,value:n,searcher:r}){if(!an(n))return[];let o=[];if(Jr(n))n.forEach(({v:s,i,n:l})=>{if(!an(s))return;const{isMatch:a,score:c,indices:u}=r.searchIn(s);a&&o.push({score:c,key:t,value:s,idx:i,norm:l,indices:u})});else{const{v:s,n:i}=n,{isMatch:l,score:a,indices:c}=r.searchIn(s);l&&o.push({score:a,key:t,value:s,norm:i,indices:c})}return o}}Ui.version="7.1.0";Ui.createIndex=j5;Ui.parseIndex=e9;Ui.config=re;Ui.parseQuery=O5;g9(p9);const S9=["500px","accessible-icon","accusoft","acquisitions-incorporated","ad","address-book","address-card","adjust","adn","adobe","adversal","affiliatetheme","air-freshener","airbnb","algolia","align-center","align-justify","align-left","align-right","alipay","allergies","amazon-pay","amazon","ambulance","american-sign-language-interpreting","amilia","anchor","android","angellist","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-right","angle-up","angry","angrycreative","angular","ankh","app-store-ios","app-store","apper","apple-alt","apple-pay","apple","archive","archway","arrow-alt-circle-down","arrow-alt-circle-left","arrow-alt-circle-right","arrow-alt-circle-up","arrow-circle-down","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-down","arrow-left","arrow-right","arrow-up","arrows-alt-h","arrows-alt-v","arrows-alt","artstation","assistive-listening-systems","asterisk","asymmetrik","at","atlas","atlassian","atom","audible","audio-description","autoprefixer","avianex","aviato","award","aws","baby-carriage","baby","backspace","backward","bacon","bahai","balance-scale-left","balance-scale-right","balance-scale","ban","band-aid","bandcamp","barcode","bars","baseball-ball","basketball-ball","bath","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","battle-net","bed","beer","behance-square","behance","bell-slash","bell","bezier-curve","bible","bicycle","biking","bimobject","binoculars","biohazard","birthday-cake","bitbucket","bitcoin","bity","black-tie","blackberry","blender-phone","blender","blind","blog","blogger-b","blogger","bluetooth-b","bluetooth","bold","bolt","bomb","bone","bong","book-dead","book-medical","book-open","book-reader","book","bookmark","bootstrap","border-all","border-none","border-style","bowling-ball","box-open","box-tissue","box","boxes","braille","brain","bread-slice","briefcase-medical","briefcase","broadcast-tower","broom","brush","bsa","btc","buffer","bug","building","bullhorn","bullseye","burn","buromobelexperte","bus-alt","bus","business-time","buy-n-large","calculator","calendar-alt","calendar-check","calendar-day","calendar-minus","calendar-plus","calendar-times","calendar-week","calendar","camera-retro","camera","campground","canadian-maple-leaf","candy-cane","cannabis","capsules","car-alt","car-battery","car-crash","car-side","car","caravan","caret-down","caret-left","caret-right","caret-square-down","caret-square-left","caret-square-right","caret-square-up","caret-up","carrot","cart-arrow-down","cart-plus","cash-register","cat","cc-amazon-pay","cc-amex","cc-apple-pay","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","centercode","centos","certificate","chair","chalkboard-teacher","chalkboard","charging-station","chart-area","chart-bar","chart-line","chart-pie","check-circle","check-double","check-square","check","cheese","chess-bishop","chess-board","chess-king","chess-knight","chess-pawn","chess-queen","chess-rook","chess","chevron-circle-down","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-down","chevron-left","chevron-right","chevron-up","child","chrome","chromecast","church","circle-notch","circle","city","clinic-medical","clipboard-check","clipboard-list","clipboard","clock","clone","closed-captioning","cloud-download-alt","cloud-meatball","cloud-moon-rain","cloud-moon","cloud-rain","cloud-showers-heavy","cloud-sun-rain","cloud-sun","cloud-upload-alt","cloud","cloudscale","cloudsmith","cloudversify","cocktail","code-branch","code","codepen","codiepie","coffee","cog","cogs","coins","columns","comment-alt","comment-dollar","comment-dots","comment-medical","comment-slash","comment","comments-dollar","comments","compact-disc","compass","compress-alt","compress-arrows-alt","compress","concierge-bell","confluence","connectdevelop","contao","cookie-bite","cookie","copy","copyright","cotton-bureau","couch","cpanel","creative-commons-by","creative-commons-nc-eu","creative-commons-nc-jp","creative-commons-nc","creative-commons-nd","creative-commons-pd-alt","creative-commons-pd","creative-commons-remix","creative-commons-sa","creative-commons-sampling-plus","creative-commons-sampling","creative-commons-share","creative-commons-zero","creative-commons","credit-card","critical-role","crop-alt","crop","cross","crosshairs","crow","crown","crutch","css3-alt","css3","cube","cubes","cut","cuttlefish","d-and-d-beyond","d-and-d","dailymotion","dashcube","database","deaf","delicious","democrat","deploydog","deskpro","desktop","dev","deviantart","dharmachakra","dhl","diagnoses","diaspora","dice-d20","dice-d6","dice-five","dice-four","dice-one","dice-six","dice-three","dice-two","dice","digg","digital-ocean","digital-tachograph","directions","discord","discourse","disease","divide","dizzy","dna","dochub","docker","dog","dollar-sign","dolly-flatbed","dolly","donate","door-closed","door-open","dot-circle","dove","download","draft2digital","drafting-compass","dragon","draw-polygon","dribbble-square","dribbble","dropbox","drum-steelpan","drum","drumstick-bite","drupal","dumbbell","dumpster-fire","dumpster","dungeon","dyalog","earlybirds","ebay","edge","edit","egg","eject","elementor","ellipsis-h","ellipsis-v","ello","ember","empire","envelope-open-text","envelope-open","envelope-square","envelope","envira","equals","eraser","erlang","ethereum","ethernet","etsy","euro-sign","evernote","exchange-alt","exclamation-circle","exclamation-triangle","exclamation","expand-alt","expand-arrows-alt","expand","expeditedssl","external-link-alt","external-link-square-alt","eye-dropper","eye-slash","eye","facebook-f","facebook-messenger","facebook-square","facebook","fan","fantasy-flight-games","fast-backward","fast-forward","faucet","fax","feather-alt","feather","fedex","fedora","female","fighter-jet","figma","file-alt","file-archive","file-audio","file-code","file-contract","file-csv","file-download","file-excel","file-export","file-image","file-import","file-invoice-dollar","file-invoice","file-medical-alt","file-medical","file-pdf","file-powerpoint","file-prescription","file-signature","file-upload","file-video","file-word","file","fill-drip","fill","film","filter","fingerprint","fire-alt","fire-extinguisher","fire","firefox-browser","firefox","first-aid","first-order-alt","first-order","firstdraft","fish","fist-raised","flag-checkered","flag-usa","flag","flask","flickr","flipboard","flushed","fly","folder-minus","folder-open","folder-plus","folder","font-awesome-alt","font-awesome-flag","font-awesome-logo-full","font-awesome","font","fonticons-fi","fonticons","football-ball","fort-awesome-alt","fort-awesome","forumbee","forward","foursquare","free-code-camp","freebsd","frog","frown-open","frown","fulcrum","funnel-dollar","futbol","galactic-republic","galactic-senate","gamepad","gas-pump","gavel","gem","genderless","get-pocket","gg-circle","gg","ghost","gift","gifts","git-alt","git-square","git","github-alt","github-square","github","gitkraken","gitlab","gitter","glass-cheers","glass-martini-alt","glass-martini","glass-whiskey","glasses","glide-g","glide","globe-africa","globe-americas","globe-asia","globe-europe","globe","gofore","golf-ball","goodreads-g","goodreads","google-drive","google-play","google-plus-g","google-plus-square","google-plus","google-wallet","google","gopuram","graduation-cap","gratipay","grav","greater-than-equal","greater-than","grimace","grin-alt","grin-beam-sweat","grin-beam","grin-hearts","grin-squint-tears","grin-squint","grin-stars","grin-tears","grin-tongue-squint","grin-tongue-wink","grin-tongue","grin-wink","grin","grip-horizontal","grip-lines-vertical","grip-lines","grip-vertical","gripfire","grunt","guitar","gulp","h-square","hacker-news-square","hacker-news","hackerrank","hamburger","hammer","hamsa","hand-holding-heart","hand-holding-medical","hand-holding-usd","hand-holding-water","hand-holding","hand-lizard","hand-middle-finger","hand-paper","hand-peace","hand-point-down","hand-point-left","hand-point-right","hand-point-up","hand-pointer","hand-rock","hand-scissors","hand-sparkles","hand-spock","hands-helping","hands-wash","hands","handshake-alt-slash","handshake-slash","handshake","hanukiah","hard-hat","hashtag","hat-cowboy-side","hat-cowboy","hat-wizard","hdd","head-side-cough-slash","head-side-cough","head-side-mask","head-side-virus","heading","headphones-alt","headphones","headset","heart-broken","heart","heartbeat","helicopter","highlighter","hiking","hippo","hips","hire-a-helper","history","hockey-puck","holly-berry","home","hooli","hornbill","horse-head","horse","hospital-alt","hospital-symbol","hospital-user","hospital","hot-tub","hotdog","hotel","hotjar","hourglass-end","hourglass-half","hourglass-start","hourglass","house-damage","house-user","houzz","hryvnia","html5","hubspot","i-cursor","ice-cream","icicles","icons","id-badge","id-card-alt","id-card","ideal","igloo","image","images","imdb","inbox","indent","index.php","industry","infinity","info-circle","info","instagram-square","instagram","intercom","internet-explorer","invision","ioxhost","italic","itch-io","itunes-note","itunes","java","jedi-order","jedi","jenkins","jira","joget","joint","joomla","journal-whills","js-square","js","jsfiddle","kaaba","kaggle","key","keybase","keyboard","keycdn","khanda","kickstarter-k","kickstarter","kiss-beam","kiss-wink-heart","kiss","kiwi-bird","korvue","landmark","language","laptop-code","laptop-house","laptop-medical","laptop","laravel","lastfm-square","lastfm","laugh-beam","laugh-squint","laugh-wink","laugh","layer-group","leaf","leanpub","lemon","less-than-equal","less-than","less","level-down-alt","level-up-alt","life-ring","lightbulb","line","link","linkedin-in","linkedin","linode","linux","lira-sign","list-alt","list-ol","list-ul","list","location-arrow","lock-open","lock","long-arrow-alt-down","long-arrow-alt-left","long-arrow-alt-right","long-arrow-alt-up","low-vision","luggage-cart","lungs-virus","lungs","lyft","magento","magic","magnet","mail-bulk","mailchimp","male","mandalorian","map-marked-alt","map-marked","map-marker-alt","map-marker","map-pin","map-signs","map","markdown","marker","mars-double","mars-stroke-h","mars-stroke-v","mars-stroke","mars","mask","mastodon","maxcdn","mdb","medal","medapps","medium-m","medium","medkit","medrt","meetup","megaport","meh-blank","meh-rolling-eyes","meh","memory","mendeley","menorah","mercury","meteor","microblog","microchip","microphone-alt-slash","microphone-alt","microphone-slash","microphone","microscope","microsoft","minus-circle","minus-square","minus","mitten","mix","mixcloud","mixer","mizuni","mobile-alt","mobile","modx","monero","money-bill-alt","money-bill-wave-alt","money-bill-wave","money-bill","money-check-alt","money-check","monument","moon","mortar-pestle","mosque","motorcycle","mountain","mouse-pointer","mouse","mug-hot","music","napster","neos","network-wired","neuter","newspaper","nimblr","node-js","node","not-equal","notes-medical","npm","ns8","nutritionix","object-group","object-ungroup","odnoklassniki-square","odnoklassniki","oil-can","old-republic","om","opencart","openid","opera","optin-monster","orcid","osi","otter","outdent","page4","pagelines","pager","paint-brush","paint-roller","palette","palfed","pallet","paper-plane","paperclip","parachute-box","paragraph","parking","passport","pastafarianism","paste","patreon","pause-circle","pause","paw","paypal","peace","pen-alt","pen-fancy","pen-nib","pen-square","pen","pencil-alt","pencil-ruler","penny-arcade","people-arrows","people-carry","pepper-hot","percent","percentage","periscope","person-booth","phabricator","phoenix-framework","phoenix-squadron","phone-alt","phone-slash","phone-square-alt","phone-square","phone-volume","phone","photo-video","php","pied-piper-alt","pied-piper-hat","pied-piper-pp","pied-piper-square","pied-piper","piggy-bank","pills","pinterest-p","pinterest-square","pinterest","pizza-slice","place-of-worship","plane-arrival","plane-departure","plane-slash","plane","play-circle","play","playstation","plug","plus-circle","plus-square","plus","podcast","poll-h","poll","poo-storm","poo","poop","portrait","pound-sign","power-off","pray","praying-hands","prescription-bottle-alt","prescription-bottle","prescription","print","procedures","product-hunt","project-diagram","pump-medical","pump-soap","pushed","puzzle-piece","python","qq","qrcode","question-circle","question","quidditch","quinscape","quora","quote-left","quote-right","quran","r-project","radiation-alt","radiation","rainbow","random","raspberry-pi","ravelry","react","reacteurope","readme","rebel","receipt","record-vinyl","recycle","red-river","reddit-alien","reddit-square","reddit","redhat","redo-alt","redo","registered","remove-format","renren","reply-all","reply","replyd","republican","researchgate","resolving","restroom","retweet","rev","ribbon","ring","road","robot","rocket","rocketchat","rockrms","route","rss-square","rss","ruble-sign","ruler-combined","ruler-horizontal","ruler-vertical","ruler","running","rupee-sign","sad-cry","sad-tear","safari","salesforce","sass","satellite-dish","satellite","save","schlix","school","screwdriver","scribd","scroll","sd-card","search-dollar","search-location","search-minus","search-plus","search","searchengin","seedling","sellcast","sellsy","server","servicestack","shapes","share-alt-square","share-alt","share-square","share","shekel-sign","shield-alt","shield-virus","ship","shipping-fast","shirtsinbulk","shoe-prints","shopify","shopping-bag","shopping-basket","shopping-cart","shopware","shower","shuttle-van","sign-in-alt","sign-language","sign-out-alt","sign","signal","signature","sim-card","simplybuilt","sistrix","sitemap","sith","skating","sketch","skiing-nordic","skiing","skull-crossbones","skull","skyatlas","skype","slack-hash","slack","slash","sleigh","sliders-h","slideshare","smile-beam","smile-wink","smile","smog","smoking-ban","smoking","sms","snapchat-ghost","snapchat-square","snapchat","snowboarding","snowflake","snowman","snowplow","soap","socks","solar-panel","sort-alpha-down-alt","sort-alpha-down","sort-alpha-up-alt","sort-alpha-up","sort-amount-down-alt","sort-amount-down","sort-amount-up-alt","sort-amount-up","sort-down","sort-numeric-down-alt","sort-numeric-down","sort-numeric-up-alt","sort-numeric-up","sort-up","sort","soundcloud","sourcetree","spa","space-shuttle","speakap","speaker-deck","spell-check","spider","spinner","splotch","spotify","spray-can","square-full","square-root-alt","square","squarespace","stack-exchange","stack-overflow","stackpath","stamp","star-and-crescent","star-half-alt","star-half","star-of-david","star-of-life","star","staylinked","steam-square","steam-symbol","steam","step-backward","step-forward","stethoscope","sticker-mule","sticky-note","stop-circle","stop","stopwatch-20","stopwatch","store-alt-slash","store-alt","store-slash","store","strava","stream","street-view","strikethrough","stripe-s","stripe","stroopwafel","studiovinari","stumbleupon-circle","stumbleupon","subscript","subway","suitcase-rolling","suitcase","sun","superpowers","superscript","supple","surprise","suse","swatchbook","swift","swimmer","swimming-pool","symfony","synagogue","sync-alt","sync","syringe","table-tennis","table","tablet-alt","tablet","tablets","tachometer-alt","tag","tags","tape","tasks","taxi","teamspeak","teeth-open","teeth","telegram-plane","telegram","temperature-high","temperature-low","tencent-weibo","tenge","terminal","text-height","text-width","th-large","th-list","th","the-red-yeti","theater-masks","themeco","themeisle","thermometer-empty","thermometer-full","thermometer-half","thermometer-quarter","thermometer-three-quarters","thermometer","think-peaks","thumbs-down","thumbs-up","thumbtack","ticket-alt","times-circle","times","tint-slash","tint","tired","toggle-off","toggle-on","toilet-paper-slash","toilet-paper","toilet","toolbox","tools","tooth","torah","torii-gate","tractor","trade-federation","trademark","traffic-light","trailer","train","tram","transgender-alt","transgender","trash-alt","trash-restore-alt","trash-restore","trash","tree","trello","tripadvisor","trophy","truck-loading","truck-monster","truck-moving","truck-pickup","truck","tshirt","tty","tumblr-square","tumblr","tv","twitch","twitter-square","twitter","typo3","uber","ubuntu","uikit","umbraco","umbrella-beach","umbrella","underline","undo-alt","undo","uniregistry","unity","universal-access","university","unlink","unlock-alt","unlock","untappd","upload","ups","usb","user-alt-slash","user-alt","user-astronaut","user-check","user-circle","user-clock","user-cog","user-edit","user-friends","user-graduate","user-injured","user-lock","user-md","user-minus","user-ninja","user-nurse","user-plus","user-secret","user-shield","user-slash","user-tag","user-tie","user-times","user","users-cog","users","usps","ussunnah","utensil-spoon","utensils","vaadin","vector-square","venus-double","venus-mars","venus","viacoin","viadeo-square","viadeo","vial","vials","viber","video-slash","video","vihara","vimeo-square","vimeo-v","vimeo","vine","virus-slash","virus","viruses","vk","vnv","voicemail","volleyball-ball","volume-down","volume-mute","volume-off","volume-up","vote-yea","vr-cardboard","vuejs","walking","wallet","warehouse","water","wave-square","waze","weebly","weibo","weight-hanging","weight","weixin","whatsapp-square","whatsapp","wheelchair","whmcs","wifi","wikipedia-w","wind","window-close","window-maximize","window-minimize","window-restore","windows","wine-bottle","wine-glass-alt","wine-glass","wix","wizards-of-the-coast","wolf-pack-battalion","won-sign","wordpress-simple","wordpress","wpbeginner","wpexplorer","wpforms","wpressr","wrench","x-ray","xbox","xing-square","xing","y-combinator","yahoo","yammer","yandex-international","yandex","yarn","yelp","yen-sign","yin-yang","yoast","youtube-square","youtube","zhihu"],zf={icons:new Map},k9=async(e,t={})=>{if(zf.icons.has(e))return zf.icons.get(e);const n=WPTB_CFG.PLUGIN_URL+"/inc/frontend/views/icons/"+e+".svg";try{const o=await(await fetch(n,t)).text();return zf.icons.set(e,o),o}catch{}},Mm=e=>{const[t,n]=A.useState(null);return A.useEffect(()=>{if(!e.name)return;const r=new AbortController;return k9(e.name,{signal:r.signal}).then(o=>{if(!o)return;const l=new DOMParser().parseFromString(o,"image/svg+xml").documentElement,a=l.attributes,c={dangerouslySetInnerHTML:{__html:l.innerHTML}};for(let u=0;u<a.length;u++){const d=a.item(u);c[d.nodeName]=d.nodeValue}n(A.createElement(l.tagName,c))}),()=>r.abort()},[e.name]),e.name?t||f.jsx(Gw,{}):null},KL=({value:e,label:t,onChange:n,onReset:r,icons:o=S9})=>{const[s,i]=A.useState(!1),[l,a]=A.useState("bottom"),[c,u]=A.useState(""),[d,h]=A.useState(o),p=A.useRef(null),g=A.useMemo(()=>new Ui(o,{includeScore:!0,threshold:.3}),[o]);A.useLayoutEffect(()=>{if(!s)return;const w=()=>i(!1);return document.addEventListener("click",w),(()=>{if(p.current){const k=p.current.getBoundingClientRect(),T=400,C=400,I={right:window.innerWidth-k.right,left:k.left,top:k.top,bottom:window.innerHeight-k.bottom};I.right>=T?a("right"):I.left>=T?a("left"):I.bottom>=C?a("bottom"):I.top>=C?a("top"):a("bottom")}})(),()=>document.removeEventListener("click",w)},[s]);const v=A.useMemo(()=>Bk(w=>{if(w==="")h(o);else{const k=g.search(w).map(T=>T.item);h(k)}},300),[o,g]);A.useEffect(()=>(v(c),()=>{v.cancel()}),[c,v]);const x=()=>{if(p.current){const w=p.current.getBoundingClientRect();switch(l){case"right":return{top:w.top+window.scrollY,left:w.right+window.scrollX};case"left":return{top:w.top+window.scrollY,left:w.left-200+window.scrollX};case"top":return{top:w.top-200+window.scrollY,left:w.left+window.scrollX};case"bottom":default:return{top:w.bottom+window.scrollY,left:w.left+window.scrollX}}}return{}},m=5,y=({index:w,style:S})=>{const k=w*m,T=Math.min(k+m,d.length);return f.jsx("div",{style:{...S,display:"flex",justifyContent:"space-between",padding:"10px 0"},children:d.slice(k,T).map(C=>f.jsx("button",{type:"button",onClick:()=>n==null?void 0:n(C),className:et("wptb-icon-picker-modal-item",{"wptb-selected":C===e}),children:f.jsx(Mm,{name:C})},C))},w)};return f.jsxs("div",{className:"wptb-icon-picker wptb-control",children:[f.jsx(Fi,{className:"wptb-icon-picker-label",label:t,onReset:r}),f.jsx("button",{className:"wptb-icon-picker-btn",onClick:w=>{w.stopPropagation(),i(!s)},ref:p,children:e?f.jsx(Mm,{name:e}):null}),s&&Ho.createPortal(f.jsxs("div",{className:"wptb-icon-picker-modal",style:x(),onClick:w=>w.stopPropagation(),onPointerUp:w=>w.stopPropagation(),children:[f.jsx("input",{type:"text",placeholder:"Search",value:c,onChange:w=>u(w.target.value)}),f.jsx(BS,{className:"wptb-icon-picker-modal-content",height:250,itemCount:Math.ceil(d.length/m),itemSize:40,width:250,children:y})]}),document.body)]})},M5=({label:e,value:t,onChange:n,...r})=>f.jsxs("label",{className:"wptb-long-text-control wptb-control",children:[e&&f.jsx("p",{className:"wptb-long-text-control-label",children:e}),f.jsx("textarea",{value:t||"",onChange:o=>n==null?void 0:n(o.target.value),...r})]}),YL=({apiData:e,setPage:t})=>{const n=r=>{!e||r<1||r>e.total_pages||r===e.current_page||t(r)};return f.jsx("div",{className:"wptb-pagination",children:f.jsxs("div",{className:"wptb-pagination-group",children:[f.jsx("button",{type:"button",className:et({"wptb-pagination-disabled":e.current_page===1}),onClick:()=>n(e.current_page-1),children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:"2",d:"m15 6l-6 6l6 6"})})}),e.pages.map(r=>r!==0?f.jsx("button",{type:"button",className:et({"wptb-pagination-active":r===e.current_page}),onClick:()=>n(r),children:r},r):f.jsx("p",{className:"wptb-page-divider",children:"..."})),f.jsx("button",{type:"button",className:et({"wptb-pagination-disabled":e.current_page===e.total_pages}),onClick:()=>n(e.current_page+1),children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:"2",d:"m9 6l6 6l-6 6"})})})]})})};function _t({children:e,initialOpen:t,title:n,className:r}){const[o,s]=A.useState(t);return f.jsxs("div",{className:et("wptb-panel-body",r,{"wptb-open":o}),children:[f.jsx("div",{className:"wptb-panel-body-header",children:f.jsxs("button",{type:"button",className:"wptb-panel-body-title",onClick:()=>s(!o),children:[n," ",f.jsx("span",{children:o?"â–¼":"â–¶"})]})}),o&&f.jsx("div",{className:"wptb-panel-body-content",children:e})]})}const ZL=({children:e,content:t,className:n,style:r})=>{const o=A.useRef(null),s=A.useRef(null),[i,l]=A.useState(!1),[a,c]=A.useState(!1),u=A.useMemo(()=>()=>{if(!o.current||!s.current){requestAnimationFrame(u);return}const d=o.current.getBoundingClientRect(),h=s.current.getBoundingClientRect();let p=d.top-h.height-10,g=d.left-h.width/2;p<10&&(p=d.bottom+10),g<10&&(g=d.right+10),s.current.style.top=`${p}px`,s.current.style.left=`${g}px`},[]);return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:`wptb-pop-up ${n||""}`,style:r,ref:o,onMouseEnter:()=>{c(!0),u()},onMouseLeave:()=>{c(!1)},onPointerUp:()=>{l(!i),c(!1),u()},children:e}),(i||a)&&Ho.createPortal(f.jsx("div",{className:"wptb-pop-up-content",ref:s,children:t}),document.body)]})};function B5({label:e,min:t=0,max:n=100,step:r=1,value:o=0,onChange:s,allowOutOfRange:i}){i&&(t=Math.min(t,o),n=Math.max(n,o));const l=d=>{i?s==null||s(d):d<t?s==null||s(t):d>n?s==null||s(n):s==null||s(d)},a=d=>{d.key==="ArrowUp"?(d.preventDefault(),c()):d.key==="ArrowDown"&&(d.preventDefault(),u())},c=()=>{s==null||s(o+r)},u=()=>{s==null||s(o-r)};return f.jsxs("div",{className:"wptb-range-control wptb-control",children:[e&&f.jsx("label",{children:e}),f.jsxs("div",{className:"wptb-range-control-input-area",children:[f.jsx("input",{className:"wptb-range-slider",type:"range",min:t,max:n,step:r,value:o||0,onInput:d=>l(+d.target.value||0)}),f.jsxs("div",{className:"wptb-range-control-value",children:[f.jsx("input",{type:"number",value:o,onKeyDown:a,onInput:d=>l(+d.target.value||0)}),f.jsxs("div",{children:[f.jsx("button",{type:"button",onClick:c}),f.jsx("button",{type:"button",onClick:u})]})]})]})]})}var P5=typeof global=="object"&&global&&global.Object===Object&&global,T9=typeof self=="object"&&self&&self.Object===Object&&self,Er=P5||T9||Function("return this")(),Mo=Er.Symbol,z5=Object.prototype,E9=z5.hasOwnProperty,C9=z5.toString,vl=Mo?Mo.toStringTag:void 0;function I9(e){var t=E9.call(e,vl),n=e[vl];try{e[vl]=void 0;var r=!0}catch{}var o=C9.call(e);return r&&(t?e[vl]=n:delete e[vl]),o}var N9=Object.prototype,A9=N9.toString;function j9(e){return A9.call(e)}var R9="[object Null]",L9="[object Undefined]",Bm=Mo?Mo.toStringTag:void 0;function Vi(e){return e==null?e===void 0?L9:R9:Bm&&Bm in Object(e)?I9(e):j9(e)}function eo(e){return e!=null&&typeof e=="object"}var xs=Array.isArray;function qo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function D5(e){return e}var _9="[object AsyncFunction]",O9="[object Function]",M9="[object GeneratorFunction]",B9="[object Proxy]";function t0(e){if(!qo(e))return!1;var t=Vi(e);return t==O9||t==M9||t==_9||t==B9}var Df=Er["__core-js_shared__"],Pm=function(){var e=/[^.]+$/.exec(Df&&Df.keys&&Df.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function P9(e){return!!Pm&&Pm in e}var z9=Function.prototype,D9=z9.toString;function As(e){if(e!=null){try{return D9.call(e)}catch{}try{return e+""}catch{}}return""}var H9=/[\\^$.*+?()[\]{}|]/g,$9=/^\[object .+?Constructor\]$/,q9=Function.prototype,F9=Object.prototype,U9=q9.toString,V9=F9.hasOwnProperty,W9=RegExp("^"+U9.call(V9).replace(H9,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function G9(e){if(!qo(e)||P9(e))return!1;var t=t0(e)?W9:$9;return t.test(As(e))}function K9(e,t){return e==null?void 0:e[t]}function js(e,t){var n=K9(e,t);return G9(n)?n:void 0}var vp=js(Er,"WeakMap"),zm=Object.create,Y9=function(){function e(){}return function(t){if(!qo(t))return{};if(zm)return zm(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Z9(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Q9(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var X9=800,J9=16,eT=Date.now;function tT(e){var t=0,n=0;return function(){var r=eT(),o=J9-(r-n);if(n=r,o>0){if(++t>=X9)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function nT(e){return function(){return e}}var Su=function(){try{var e=js(Object,"defineProperty");return e({},"",{}),e}catch{}}(),rT=Su?function(e,t){return Su(e,"toString",{configurable:!0,enumerable:!1,value:nT(t),writable:!0})}:D5,oT=tT(rT);function sT(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var iT=9007199254740991,lT=/^(?:0|[1-9]\d*)$/;function H5(e,t){var n=typeof e;return t=t??iT,!!t&&(n=="number"||n!="symbol"&&lT.test(e))&&e>-1&&e%1==0&&e<t}function n0(e,t,n){t=="__proto__"&&Su?Su(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ca(e,t){return e===t||e!==e&&t!==t}var aT=Object.prototype,cT=aT.hasOwnProperty;function $5(e,t,n){var r=e[t];(!(cT.call(e,t)&&Ca(r,n))||n===void 0&&!(t in e))&&n0(e,t,n)}function uT(e,t,n,r){var o=!n;n||(n={});for(var s=-1,i=t.length;++s<i;){var l=t[s],a=void 0;a===void 0&&(a=e[l]),o?n0(n,l,a):$5(n,l,a)}return n}var Dm=Math.max;function dT(e,t,n){return t=Dm(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=Dm(r.length-t,0),i=Array(s);++o<s;)i[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(i),Z9(e,this,l)}}function fT(e,t){return oT(dT(e,t,D5),e+"")}var hT=9007199254740991;function q5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hT}function td(e){return e!=null&&q5(e.length)&&!t0(e)}function pT(e,t,n){if(!qo(n))return!1;var r=typeof t;return(r=="number"?td(n)&&H5(t,n.length):r=="string"&&t in n)?Ca(n[t],e):!1}function gT(e){return fT(function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(o--,s):void 0,i&&pT(n[0],n[1],i)&&(s=o<3?void 0:s,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,s)}return t})}var mT=Object.prototype;function r0(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||mT;return e===n}function vT(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var yT="[object Arguments]";function Hm(e){return eo(e)&&Vi(e)==yT}var F5=Object.prototype,wT=F5.hasOwnProperty,bT=F5.propertyIsEnumerable,yp=Hm(function(){return arguments}())?Hm:function(e){return eo(e)&&wT.call(e,"callee")&&!bT.call(e,"callee")};function xT(){return!1}var U5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$m=U5&&typeof module=="object"&&module&&!module.nodeType&&module,ST=$m&&$m.exports===U5,qm=ST?Er.Buffer:void 0,kT=qm?qm.isBuffer:void 0,ia=kT||xT,TT="[object Arguments]",ET="[object Array]",CT="[object Boolean]",IT="[object Date]",NT="[object Error]",AT="[object Function]",jT="[object Map]",RT="[object Number]",LT="[object Object]",_T="[object RegExp]",OT="[object Set]",MT="[object String]",BT="[object WeakMap]",PT="[object ArrayBuffer]",zT="[object DataView]",DT="[object Float32Array]",HT="[object Float64Array]",$T="[object Int8Array]",qT="[object Int16Array]",FT="[object Int32Array]",UT="[object Uint8Array]",VT="[object Uint8ClampedArray]",WT="[object Uint16Array]",GT="[object Uint32Array]",$e={};$e[DT]=$e[HT]=$e[$T]=$e[qT]=$e[FT]=$e[UT]=$e[VT]=$e[WT]=$e[GT]=!0;$e[TT]=$e[ET]=$e[PT]=$e[CT]=$e[zT]=$e[IT]=$e[NT]=$e[AT]=$e[jT]=$e[RT]=$e[LT]=$e[_T]=$e[OT]=$e[MT]=$e[BT]=!1;function KT(e){return eo(e)&&q5(e.length)&&!!$e[Vi(e)]}function o0(e){return function(t){return e(t)}}var V5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ol=V5&&typeof module=="object"&&module&&!module.nodeType&&module,YT=Ol&&Ol.exports===V5,Hf=YT&&P5.process,Mi=function(){try{var e=Ol&&Ol.require&&Ol.require("util").types;return e||Hf&&Hf.binding&&Hf.binding("util")}catch{}}(),Fm=Mi&&Mi.isTypedArray,s0=Fm?o0(Fm):KT,ZT=Object.prototype,QT=ZT.hasOwnProperty;function W5(e,t){var n=xs(e),r=!n&&yp(e),o=!n&&!r&&ia(e),s=!n&&!r&&!o&&s0(e),i=n||r||o||s,l=i?vT(e.length,String):[],a=l.length;for(var c in e)(t||QT.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||H5(c,a)))&&l.push(c);return l}function G5(e,t){return function(n){return e(t(n))}}var XT=G5(Object.keys,Object),JT=Object.prototype,eE=JT.hasOwnProperty;function tE(e){if(!r0(e))return XT(e);var t=[];for(var n in Object(e))eE.call(e,n)&&n!="constructor"&&t.push(n);return t}function nE(e){return td(e)?W5(e):tE(e)}function rE(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var oE=Object.prototype,sE=oE.hasOwnProperty;function iE(e){if(!qo(e))return rE(e);var t=r0(e),n=[];for(var r in e)r=="constructor"&&(t||!sE.call(e,r))||n.push(r);return n}function K5(e){return td(e)?W5(e,!0):iE(e)}var la=js(Object,"create");function lE(){this.__data__=la?la(null):{},this.size=0}function aE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var cE="__lodash_hash_undefined__",uE=Object.prototype,dE=uE.hasOwnProperty;function fE(e){var t=this.__data__;if(la){var n=t[e];return n===cE?void 0:n}return dE.call(t,e)?t[e]:void 0}var hE=Object.prototype,pE=hE.hasOwnProperty;function gE(e){var t=this.__data__;return la?t[e]!==void 0:pE.call(t,e)}var mE="__lodash_hash_undefined__";function vE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=la&&t===void 0?mE:t,this}function Ss(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ss.prototype.clear=lE;Ss.prototype.delete=aE;Ss.prototype.get=fE;Ss.prototype.has=gE;Ss.prototype.set=vE;function yE(){this.__data__=[],this.size=0}function nd(e,t){for(var n=e.length;n--;)if(Ca(e[n][0],t))return n;return-1}var wE=Array.prototype,bE=wE.splice;function xE(e){var t=this.__data__,n=nd(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():bE.call(t,n,1),--this.size,!0}function SE(e){var t=this.__data__,n=nd(t,e);return n<0?void 0:t[n][1]}function kE(e){return nd(this.__data__,e)>-1}function TE(e,t){var n=this.__data__,r=nd(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ro(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ro.prototype.clear=yE;ro.prototype.delete=xE;ro.prototype.get=SE;ro.prototype.has=kE;ro.prototype.set=TE;var aa=js(Er,"Map");function EE(){this.size=0,this.__data__={hash:new Ss,map:new(aa||ro),string:new Ss}}function CE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function rd(e,t){var n=e.__data__;return CE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function IE(e){var t=rd(this,e).delete(e);return this.size-=t?1:0,t}function NE(e){return rd(this,e).get(e)}function AE(e){return rd(this,e).has(e)}function jE(e,t){var n=rd(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Rs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Rs.prototype.clear=EE;Rs.prototype.delete=IE;Rs.prototype.get=NE;Rs.prototype.has=AE;Rs.prototype.set=jE;function RE(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Y5=G5(Object.getPrototypeOf,Object),LE="[object Object]",_E=Function.prototype,OE=Object.prototype,Z5=_E.toString,ME=OE.hasOwnProperty,BE=Z5.call(Object);function PE(e){if(!eo(e)||Vi(e)!=LE)return!1;var t=Y5(e);if(t===null)return!0;var n=ME.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Z5.call(n)==BE}function zE(){this.__data__=new ro,this.size=0}function DE(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function HE(e){return this.__data__.get(e)}function $E(e){return this.__data__.has(e)}var qE=200;function FE(e,t){var n=this.__data__;if(n instanceof ro){var r=n.__data__;if(!aa||r.length<qE-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rs(r)}return n.set(e,t),this.size=n.size,this}function wr(e){var t=this.__data__=new ro(e);this.size=t.size}wr.prototype.clear=zE;wr.prototype.delete=DE;wr.prototype.get=HE;wr.prototype.has=$E;wr.prototype.set=FE;var Q5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Um=Q5&&typeof module=="object"&&module&&!module.nodeType&&module,UE=Um&&Um.exports===Q5,Vm=UE?Er.Buffer:void 0,Wm=Vm?Vm.allocUnsafe:void 0;function X5(e,t){if(t)return e.slice();var n=e.length,r=Wm?Wm(n):new e.constructor(n);return e.copy(r),r}function VE(e,t){for(var n=-1,r=e==null?0:e.length,o=0,s=[];++n<r;){var i=e[n];t(i,n,e)&&(s[o++]=i)}return s}function WE(){return[]}var GE=Object.prototype,KE=GE.propertyIsEnumerable,Gm=Object.getOwnPropertySymbols,YE=Gm?function(e){return e==null?[]:(e=Object(e),VE(Gm(e),function(t){return KE.call(e,t)}))}:WE;function ZE(e,t,n){var r=t(e);return xs(e)?r:RE(r,n(e))}function wp(e){return ZE(e,nE,YE)}var bp=js(Er,"DataView"),xp=js(Er,"Promise"),Sp=js(Er,"Set"),Km="[object Map]",QE="[object Object]",Ym="[object Promise]",Zm="[object Set]",Qm="[object WeakMap]",Xm="[object DataView]",XE=As(bp),JE=As(aa),eC=As(xp),tC=As(Sp),nC=As(vp),Gn=Vi;(bp&&Gn(new bp(new ArrayBuffer(1)))!=Xm||aa&&Gn(new aa)!=Km||xp&&Gn(xp.resolve())!=Ym||Sp&&Gn(new Sp)!=Zm||vp&&Gn(new vp)!=Qm)&&(Gn=function(e){var t=Vi(e),n=t==QE?e.constructor:void 0,r=n?As(n):"";if(r)switch(r){case XE:return Xm;case JE:return Km;case eC:return Ym;case tC:return Zm;case nC:return Qm}return t});var rC=Object.prototype,oC=rC.hasOwnProperty;function sC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&oC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ku=Er.Uint8Array;function i0(e){var t=new e.constructor(e.byteLength);return new ku(t).set(new ku(e)),t}function iC(e,t){var n=i0(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var lC=/\w*$/;function aC(e){var t=new e.constructor(e.source,lC.exec(e));return t.lastIndex=e.lastIndex,t}var Jm=Mo?Mo.prototype:void 0,ev=Jm?Jm.valueOf:void 0;function cC(e){return ev?Object(ev.call(e)):{}}function J5(e,t){var n=t?i0(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var uC="[object Boolean]",dC="[object Date]",fC="[object Map]",hC="[object Number]",pC="[object RegExp]",gC="[object Set]",mC="[object String]",vC="[object Symbol]",yC="[object ArrayBuffer]",wC="[object DataView]",bC="[object Float32Array]",xC="[object Float64Array]",SC="[object Int8Array]",kC="[object Int16Array]",TC="[object Int32Array]",EC="[object Uint8Array]",CC="[object Uint8ClampedArray]",IC="[object Uint16Array]",NC="[object Uint32Array]";function AC(e,t,n){var r=e.constructor;switch(t){case yC:return i0(e);case uC:case dC:return new r(+e);case wC:return iC(e);case bC:case xC:case SC:case kC:case TC:case EC:case CC:case IC:case NC:return J5(e,n);case fC:return new r;case hC:case mC:return new r(e);case pC:return aC(e);case gC:return new r;case vC:return cC(e)}}function e4(e){return typeof e.constructor=="function"&&!r0(e)?Y9(Y5(e)):{}}var jC="[object Map]";function RC(e){return eo(e)&&Gn(e)==jC}var tv=Mi&&Mi.isMap,LC=tv?o0(tv):RC,_C="[object Set]";function OC(e){return eo(e)&&Gn(e)==_C}var nv=Mi&&Mi.isSet,MC=nv?o0(nv):OC,BC=1,t4="[object Arguments]",PC="[object Array]",zC="[object Boolean]",DC="[object Date]",HC="[object Error]",n4="[object Function]",$C="[object GeneratorFunction]",qC="[object Map]",FC="[object Number]",r4="[object Object]",UC="[object RegExp]",VC="[object Set]",WC="[object String]",GC="[object Symbol]",KC="[object WeakMap]",YC="[object ArrayBuffer]",ZC="[object DataView]",QC="[object Float32Array]",XC="[object Float64Array]",JC="[object Int8Array]",eI="[object Int16Array]",tI="[object Int32Array]",nI="[object Uint8Array]",rI="[object Uint8ClampedArray]",oI="[object Uint16Array]",sI="[object Uint32Array]",ze={};ze[t4]=ze[PC]=ze[YC]=ze[ZC]=ze[zC]=ze[DC]=ze[QC]=ze[XC]=ze[JC]=ze[eI]=ze[tI]=ze[qC]=ze[FC]=ze[r4]=ze[UC]=ze[VC]=ze[WC]=ze[GC]=ze[nI]=ze[rI]=ze[oI]=ze[sI]=!0;ze[HC]=ze[n4]=ze[KC]=!1;function zc(e,t,n,r,o,s){var i,l=t&BC;if(i!==void 0)return i;if(!qo(e))return e;var a=xs(e);if(a)i=sC(e);else{var c=Gn(e),u=c==n4||c==$C;if(ia(e))return X5(e,l);if(c==r4||c==t4||u&&!o)i=u?{}:e4(e);else{if(!ze[c])return o?e:{};i=AC(e,c,l)}}s||(s=new wr);var d=s.get(e);if(d)return d;s.set(e,i),MC(e)?e.forEach(function(g){i.add(zc(g,t,n,g,e,s))}):LC(e)&&e.forEach(function(g,v){i.set(v,zc(g,t,n,v,e,s))});var h=wp,p=a?void 0:h(e);return sT(p||e,function(g,v){p&&(v=g,g=e[v]),$5(i,v,zc(g,t,n,v,e,s))}),i}var iI=1,lI=4;function ki(e){return zc(e,iI|lI)}var aI="__lodash_hash_undefined__";function cI(e){return this.__data__.set(e,aI),this}function uI(e){return this.__data__.has(e)}function Tu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Rs;++t<n;)this.add(e[t])}Tu.prototype.add=Tu.prototype.push=cI;Tu.prototype.has=uI;function dI(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function fI(e,t){return e.has(t)}var hI=1,pI=2;function o4(e,t,n,r,o,s){var i=n&hI,l=e.length,a=t.length;if(l!=a&&!(i&&a>l))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=n&pI?new Tu:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var g=e[d],v=t[d];if(r)var x=i?r(v,g,d,t,e,s):r(g,v,d,e,t,s);if(x!==void 0){if(x)continue;h=!1;break}if(p){if(!dI(t,function(m,y){if(!fI(p,y)&&(g===m||o(g,m,n,r,s)))return p.push(y)})){h=!1;break}}else if(!(g===v||o(g,v,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function gI(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function mI(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var vI=1,yI=2,wI="[object Boolean]",bI="[object Date]",xI="[object Error]",SI="[object Map]",kI="[object Number]",TI="[object RegExp]",EI="[object Set]",CI="[object String]",II="[object Symbol]",NI="[object ArrayBuffer]",AI="[object DataView]",rv=Mo?Mo.prototype:void 0,$f=rv?rv.valueOf:void 0;function jI(e,t,n,r,o,s,i){switch(n){case AI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case NI:return!(e.byteLength!=t.byteLength||!s(new ku(e),new ku(t)));case wI:case bI:case kI:return Ca(+e,+t);case xI:return e.name==t.name&&e.message==t.message;case TI:case CI:return e==t+"";case SI:var l=gI;case EI:var a=r&vI;if(l||(l=mI),e.size!=t.size&&!a)return!1;var c=i.get(e);if(c)return c==t;r|=yI,i.set(e,t);var u=o4(l(e),l(t),r,o,s,i);return i.delete(e),u;case II:if($f)return $f.call(e)==$f.call(t)}return!1}var RI=1,LI=Object.prototype,_I=LI.hasOwnProperty;function OI(e,t,n,r,o,s){var i=n&RI,l=wp(e),a=l.length,c=wp(t),u=c.length;if(a!=u&&!i)return!1;for(var d=a;d--;){var h=l[d];if(!(i?h in t:_I.call(t,h)))return!1}var p=s.get(e),g=s.get(t);if(p&&g)return p==t&&g==e;var v=!0;s.set(e,t),s.set(t,e);for(var x=i;++d<a;){h=l[d];var m=e[h],y=t[h];if(r)var w=i?r(y,m,h,t,e,s):r(m,y,h,e,t,s);if(!(w===void 0?m===y||o(m,y,n,r,s):w)){v=!1;break}x||(x=h=="constructor")}if(v&&!x){var S=e.constructor,k=t.constructor;S!=k&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof k=="function"&&k instanceof k)&&(v=!1)}return s.delete(e),s.delete(t),v}var MI=1,ov="[object Arguments]",sv="[object Array]",gc="[object Object]",BI=Object.prototype,iv=BI.hasOwnProperty;function PI(e,t,n,r,o,s){var i=xs(e),l=xs(t),a=i?sv:Gn(e),c=l?sv:Gn(t);a=a==ov?gc:a,c=c==ov?gc:c;var u=a==gc,d=c==gc,h=a==c;if(h&&ia(e)){if(!ia(t))return!1;i=!0,u=!1}if(h&&!u)return s||(s=new wr),i||s0(e)?o4(e,t,n,r,o,s):jI(e,t,a,n,r,o,s);if(!(n&MI)){var p=u&&iv.call(e,"__wrapped__"),g=d&&iv.call(t,"__wrapped__");if(p||g){var v=p?e.value():e,x=g?t.value():t;return s||(s=new wr),o(v,x,n,r,s)}}return h?(s||(s=new wr),OI(e,t,n,r,o,s)):!1}function s4(e,t,n,r,o){return e===t?!0:e==null||t==null||!eo(e)&&!eo(t)?e!==e&&t!==t:PI(e,t,n,r,s4,o)}function zI(e){return function(t,n,r){for(var o=-1,s=Object(t),i=r(t),l=i.length;l--;){var a=i[++o];if(n(s[a],a,s)===!1)break}return t}}var DI=zI();function kp(e,t,n){(n!==void 0&&!Ca(e[t],n)||n===void 0&&!(t in e))&&n0(e,t,n)}function HI(e){return eo(e)&&td(e)}function Tp(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function $I(e){return uT(e,K5(e))}function qI(e,t,n,r,o,s,i){var l=Tp(e,n),a=Tp(t,n),c=i.get(a);if(c){kp(e,n,c);return}var u=s?s(l,a,n+"",e,t,i):void 0,d=u===void 0;if(d){var h=xs(a),p=!h&&ia(a),g=!h&&!p&&s0(a);u=a,h||p||g?xs(l)?u=l:HI(l)?u=Q9(l):p?(d=!1,u=X5(a,!0)):g?(d=!1,u=J5(a,!0)):u=[]:PE(a)||yp(a)?(u=l,yp(l)?u=$I(l):(!qo(l)||t0(l))&&(u=e4(a))):d=!1}d&&(i.set(a,u),o(u,a,r,s,i),i.delete(a)),kp(e,n,u)}function i4(e,t,n,r,o){e!==t&&DI(t,function(s,i){if(o||(o=new wr),qo(s))qI(e,t,i,n,i4,r,o);else{var l=r?r(Tp(e,i),s,i+"",e,t,o):void 0;l===void 0&&(l=s),kp(e,i,l)}},K5)}function l0(e,t){return s4(e,t)}var fs=gT(function(e,t,n){i4(e,t,n)}),Q=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(Q||{});class Sr{constructor(t,n,r={}){this.attrName=t,this.keyName=n;const o=Q.TYPE&Q.ATTRIBUTE;this.scope=r.scope!=null?r.scope&Q.LEVEL|o:Q.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map(n=>n.name)}add(t,n){return this.canAdd(t,n)?(t.setAttribute(this.keyName,n),!0):!1}canAdd(t,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const n=t.getAttribute(this.keyName);return this.canAdd(t,n)&&n?n:""}}class Ti extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const l4=class Ep{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,n=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(n){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,n)}return null}create(t,n,r){const o=this.query(n);if(o==null)throw new Ti(`Unable to create ${n} blot`);const s=o,i=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:s.create(r),l=new s(t,i,r);return Ep.blots.set(l.domNode,l),l}find(t,n=!1){return Ep.find(t,n)}query(t,n=Q.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&Q.LEVEL&Q.BLOCK?r=this.types.block:t&Q.LEVEL&Q.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(o=>(r=this.classes[o],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&n&Q.LEVEL&r.scope&&n&Q.TYPE&r.scope?r:null}register(...t){return t.map(n=>{const r="blotName"in n,o="attrName"in n;if(!r&&!o)throw new Ti("Invalid definition");if(r&&n.blotName==="abstract")throw new Ti("Cannot register abstract class");const s=r?n.blotName:o?n.attrName:void 0;return this.types[s]=n,o?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(i=>i.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(i=>{(this.tags[i]==null||n.className==null)&&(this.tags[i]=n)}))),n})}};l4.blots=new WeakMap;let Bi=l4;function lv(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${t}-`)===0)}class FI extends Sr{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(t,n){return this.canAdd(t,n)?(this.remove(t),t.classList.add(`${this.keyName}-${n}`),!0):!1}remove(t){lv(t,this.keyName).forEach(n=>{t.classList.remove(n)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const n=(lv(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,n)?n:""}}const oo=FI;function qf(e){const t=e.split("-"),n=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+n}class UI extends Sr{static keys(t){return(t.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(t,n){return this.canAdd(t,n)?(t.style[qf(this.keyName)]=n,!0):!1}remove(t){t.style[qf(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const n=t.style[qf(this.keyName)];return this.canAdd(t,n)?n:""}}const Fo=UI;class VI{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,n){n?t.add(this.domNode,n)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=Bi.find(this.domNode);if(t==null)return;const n=Sr.keys(this.domNode),r=oo.keys(this.domNode),o=Fo.keys(this.domNode);n.concat(r).concat(o).forEach(s=>{const i=t.scroll.query(s,Q.ATTRIBUTE);i instanceof Sr&&(this.attributes[i.attrName]=i)})}copy(t){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);t.format(n,r)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,n)=>(t[n]=this.attributes[n].value(this.domNode),t),{})}}const od=VI,a4=class{constructor(t,n){this.scroll=t,this.domNode=n,Bi.blots.set(n,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Ti("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),Bi.blots.delete(this.domNode)}deleteAt(t,n){this.isolate(t,n).remove()}formatAt(t,n,r,o){const s=this.isolate(t,n);if(this.scroll.query(r,Q.BLOT)!=null&&o)s.wrap(r,o);else if(this.scroll.query(r,Q.ATTRIBUTE)!=null){const i=this.scroll.create(this.statics.scope);s.wrap(i),i.format(r,o)}}insertAt(t,n,r){const o=r==null?this.scroll.create("text",n):this.scroll.create(n,r),s=this.split(t);this.parent.insertBefore(o,s||void 0)}isolate(t,n){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,n){return t===0?this:this.next}update(t,n){}wrap(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Ti(`Cannot wrap ${t}`);return r.appendChild(this),r}};a4.blotName="abstract";let c4=a4;const u4=class extends c4{static value(t){return!0}index(t,n){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(t,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};u4.scope=Q.INLINE_BLOT;let WI=u4;const Bt=WI;class GI{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const n=t.slice(1);this.append(...n)}}at(t){const n=this.iterator();let r=n();for(;r&&t>0;)t-=1,r=n();return r}contains(t){const n=this.iterator();let r=n();for(;r;){if(r===t)return!0;r=n()}return!1}indexOf(t){const n=this.iterator();let r=n(),o=0;for(;r;){if(r===t)return o;o+=1,r=n()}return-1}insertBefore(t,n){t!=null&&(this.remove(t),t.next=n,n!=null?(t.prev=n.prev,n.prev!=null&&(n.prev.next=t),n.prev=t,n===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let n=0,r=this.head;for(;r!=null;){if(r===t)return n;n+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const n=t;return t!=null&&(t=t.next),n}}find(t,n=!1){const r=this.iterator();let o=r();for(;o;){const s=o.length();if(t<s||n&&t===s&&(o.next==null||o.next.length()!==0))return[o,t];t-=s,o=r()}return[null,0]}forEach(t){const n=this.iterator();let r=n();for(;r;)t(r),r=n()}forEachAt(t,n,r){if(n<=0)return;const[o,s]=this.find(t);let i=t-s;const l=this.iterator(o);let a=l();for(;a&&i<t+n;){const c=a.length();t>i?r(a,t-i,Math.min(n,i+c-t)):r(a,0,Math.min(c,t+n-i)),i+=c,a=l()}}map(t){return this.reduce((n,r)=>(n.push(t(r)),n),[])}reduce(t,n){const r=this.iterator();let o=r();for(;o;)n=t(n,o),o=r();return n}}function av(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const r=t.create(Q.INLINE);return Array.from(e.childNodes).forEach(o=>{r.domNode.appendChild(o)}),e.parentNode&&e.parentNode.replaceChild(r.domNode,e),r.attach(),r}}const d4=class fo extends c4{constructor(t,n){super(t,n),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,fo.uiClass&&this.uiNode.classList.add(fo.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new GI,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const n=av(t,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Ti)return;throw n}})}deleteAt(t,n){if(t===0&&n===this.length())return this.remove();this.children.forEachAt(t,n,(r,o,s)=>{r.deleteAt(o,s)})}descendant(t,n=0){const[r,o]=this.children.find(n);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,o]:r instanceof fo?r.descendant(t,o):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let o=[],s=r;return this.children.forEachAt(n,r,(i,l,a)=>{(t.blotName==null&&t(i)||t.blotName!=null&&i instanceof t)&&o.push(i),i instanceof fo&&(o=o.concat(i.descendants(t,l,s))),s-=a}),o}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===Q.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof fo?n.unwrap():n.remove())})}formatAt(t,n,r,o){this.children.forEachAt(t,n,(s,i,l)=>{s.formatAt(i,l,r,o)})}insertAt(t,n,r){const[o,s]=this.children.find(t);if(o)o.insertAt(s,n,r);else{const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(i)}}insertBefore(t,n){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,n||null),t.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,n)=>t+n.length(),0)}moveChildren(t,n){this.children.forEach(r=>{t.insertBefore(r,n)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(t,n=!1){const[r,o]=this.children.find(t,n),s=[[this,t]];return r instanceof fo?s.concat(r.path(o,n)):(r!=null&&s.push([r,o]),s)}removeChild(t){this.children.remove(t)}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return r instanceof fo&&this.moveChildren(r),super.replaceWith(r)}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(o,s,i)=>{const l=o.split(s,n);l!=null&&r.appendChild(l)}),r}splitAfter(t){const n=this.clone();for(;t.next!=null;)n.appendChild(t.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,n){const r=[],o=[];t.forEach(s=>{s.target===this.domNode&&s.type==="childList"&&(r.push(...s.addedNodes),o.push(...s.removedNodes))}),o.forEach(s=>{if(s.parentNode!=null&&s.tagName!=="IFRAME"&&document.body.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const i=this.scroll.find(s);i!=null&&(i.domNode.parentNode==null||i.domNode.parentNode===this.domNode)&&i.detach()}),r.filter(s=>s.parentNode===this.domNode&&s!==this.uiNode).sort((s,i)=>s===i?0:s.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(s=>{let i=null;s.nextSibling!=null&&(i=this.scroll.find(s.nextSibling));const l=av(s,this.scroll);(l.next!==i||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,i||void 0))}),this.enforceAllowedChildren()}};d4.uiClass="";let KI=d4;const Jn=KI;function YI(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}const Zs=class Qs extends Jn{static create(t){return super.create(t)}static formats(t,n){const r=n.query(Qs.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new od(this.domNode)}format(t,n){if(t===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof Qs||(r=r.wrap(Qs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,Q.INLINE);if(r==null)return;r instanceof Sr?this.attributes.attribute(r,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,o){this.formats()[r]!=null||this.scroll.query(r,Q.ATTRIBUTE)?this.isolate(t,n).format(r,o):super.formatAt(t,n,r,o)}optimize(t){super.optimize(t);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof Qs&&r.prev===this&&YI(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof Qs&&this.attributes.move(r),r}};Zs.allowedChildren=[Zs,Bt],Zs.blotName="inline",Zs.scope=Q.INLINE_BLOT,Zs.tagName="SPAN";let ZI=Zs;const a0=ZI,Xs=class Cp extends Jn{static create(t){return super.create(t)}static formats(t,n){const r=n.query(Cp.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new od(this.domNode)}format(t,n){const r=this.scroll.query(t,Q.BLOCK);r!=null&&(r instanceof Sr?this.attributes.attribute(r,n):t===this.statics.blotName&&!n?this.replaceWith(Cp.blotName):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n))}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,o){this.scroll.query(r,Q.BLOCK)!=null?this.format(r,o):super.formatAt(t,n,r,o)}insertAt(t,n,r){if(r==null||this.scroll.query(n,Q.INLINE)!=null)super.insertAt(t,n,r);else{const o=this.split(t);if(o!=null){const s=this.scroll.create(n,r);o.parent.insertBefore(s,o)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Xs.blotName="block",Xs.scope=Q.BLOCK_BLOT,Xs.tagName="P",Xs.allowedChildren=[a0,Xs,Bt];let QI=Xs;const ca=QI,Ip=class extends Jn{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,n){super.deleteAt(t,n),this.enforceAllowedChildren()}formatAt(t,n,r,o){super.formatAt(t,n,r,o),this.enforceAllowedChildren()}insertAt(t,n,r){super.insertAt(t,n,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Ip.blotName="container",Ip.scope=Q.BLOCK_BLOT;let XI=Ip;const sd=XI;class JI extends Bt{static formats(t,n){}format(t,n){super.formatAt(0,this.length(),t,n)}formatAt(t,n,r,o){t===0&&n===this.length()?this.format(r,o):super.formatAt(t,n,r,o)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const On=JI,eN={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},tN=100,Js=class extends Jn{constructor(t,n){super(null,n),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,eN),this.attach()}create(t,n){return this.registry.create(this,t,n)}find(t,n=!1){const r=this.registry.find(t,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,n=Q.ANY){return this.registry.query(t,n)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,n){this.update(),t===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(t,n)}formatAt(t,n,r,o){this.update(),super.formatAt(t,n,r,o)}insertAt(t,n,r){this.update(),super.insertAt(t,n,r)}optimize(t=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let o=Array.from(this.observer.takeRecords());for(;o.length>0;)t.push(o.pop());const s=(a,c=!0)=>{a==null||a===this||a.domNode.parentNode!=null&&(r.has(a.domNode)||r.set(a.domNode,[]),c&&s(a.parent))},i=a=>{r.has(a.domNode)&&(a instanceof Jn&&a.children.forEach(i),r.delete(a.domNode),a.optimize(n))};let l=t;for(let a=0;l.length>0;a+=1){if(a>=tN)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(s(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(d=>{const h=this.find(d,!1);s(h,!1),h instanceof Jn&&h.children.forEach(p=>{s(p,!1)})})):c.type==="attributes"&&s(u.prev)),s(u))}),this.children.forEach(i),l=Array.from(this.observer.takeRecords()),o=l.slice();o.length>0;)t.push(o.pop())}}update(t,n={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map(o=>{const s=this.find(o.target,!0);return s==null?null:r.has(s.domNode)?(r.get(s.domNode).push(o),null):(r.set(s.domNode,[o]),s)}).forEach(o=>{o!=null&&o!==this&&r.has(o.domNode)&&o.update(r.get(o.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(t,n)}};Js.blotName="scroll",Js.defaultChild=ca,Js.allowedChildren=[ca,sd],Js.scope=Q.BLOCK_BLOT,Js.tagName="DIV";let nN=Js;const c0=nN,Np=class f4 extends Bt{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,n){super(t,n),this.text=this.statics.value(this.domNode)}deleteAt(t,n){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+n)}index(t,n){return this.domNode===t?n:-1}insertAt(t,n,r){r==null?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,n,r)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof f4&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,n=!1){return[this.domNode,t]}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,n){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Np.blotName="text",Np.scope=Q.INLINE_BLOT;let rN=Np;const Eu=rN,oN=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Sr,AttributorStore:od,BlockBlot:ca,ClassAttributor:oo,ContainerBlot:sd,EmbedBlot:On,InlineBlot:a0,LeafBlot:Bt,ParentBlot:Jn,Registry:Bi,Scope:Q,ScrollBlot:c0,StyleAttributor:Fo,TextBlot:Eu},Symbol.toStringTag,{value:"Module"}));var Ap={exports:{}},dn=-1,qt=1,ht=0;function ua(e,t,n,r,o){if(e===t)return e?[[ht,e]]:[];if(n!=null){var s=hN(e,t,n);if(s)return s}var i=u0(e,t),l=e.substring(0,i);e=e.substring(i),t=t.substring(i),i=id(e,t);var a=e.substring(e.length-i);e=e.substring(0,e.length-i),t=t.substring(0,t.length-i);var c=sN(e,t);return l&&c.unshift([ht,l]),a&&c.push([ht,a]),d0(c,o),r&&aN(c),c}function sN(e,t){var n;if(!e)return[[qt,t]];if(!t)return[[dn,e]];var r=e.length>t.length?e:t,o=e.length>t.length?t:e,s=r.indexOf(o);if(s!==-1)return n=[[qt,r.substring(0,s)],[ht,o],[qt,r.substring(s+o.length)]],e.length>t.length&&(n[0][0]=n[2][0]=dn),n;if(o.length===1)return[[dn,e],[qt,t]];var i=lN(e,t);if(i){var l=i[0],a=i[1],c=i[2],u=i[3],d=i[4],h=ua(l,c),p=ua(a,u);return h.concat([[ht,d]],p)}return iN(e,t)}function iN(e,t){for(var n=e.length,r=t.length,o=Math.ceil((n+r)/2),s=o,i=2*o,l=new Array(i),a=new Array(i),c=0;c<i;c++)l[c]=-1,a[c]=-1;l[s+1]=0,a[s+1]=0;for(var u=n-r,d=u%2!==0,h=0,p=0,g=0,v=0,x=0;x<o;x++){for(var m=-x+h;m<=x-p;m+=2){var y=s+m,w;m===-x||m!==x&&l[y-1]<l[y+1]?w=l[y+1]:w=l[y-1]+1;for(var S=w-m;w<n&&S<r&&e.charAt(w)===t.charAt(S);)w++,S++;if(l[y]=w,w>n)p+=2;else if(S>r)h+=2;else if(d){var k=s+u-m;if(k>=0&&k<i&&a[k]!==-1){var T=n-a[k];if(w>=T)return cv(e,t,w,S)}}}for(var C=-x+g;C<=x-v;C+=2){var k=s+C,T;C===-x||C!==x&&a[k-1]<a[k+1]?T=a[k+1]:T=a[k-1]+1;for(var I=T-C;T<n&&I<r&&e.charAt(n-T-1)===t.charAt(r-I-1);)T++,I++;if(a[k]=T,T>n)v+=2;else if(I>r)g+=2;else if(!d){var y=s+u-C;if(y>=0&&y<i&&l[y]!==-1){var w=l[y],S=s+w-y;if(T=n-T,w>=T)return cv(e,t,w,S)}}}}return[[dn,e],[qt,t]]}function cv(e,t,n,r){var o=e.substring(0,n),s=t.substring(0,r),i=e.substring(n),l=t.substring(r),a=ua(o,s),c=ua(i,l);return a.concat(c)}function u0(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,s=0;n<o;)e.substring(s,o)==t.substring(s,o)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return h4(e.charCodeAt(o-1))&&o--,o}function uv(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var o=Math.min(n,r);if(e==t)return o;for(var s=0,i=1;;){var l=e.substring(o-i),a=t.indexOf(l);if(a==-1)return s;i+=a,(a==0||e.substring(o-i)==t.substring(0,i))&&(s=i,i++)}}function id(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,s=0;n<o;)e.substring(e.length-o,e.length-s)==t.substring(t.length-o,t.length-s)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return p4(e.charCodeAt(e.length-o))&&o--,o}function lN(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;function o(p,g,v){for(var x=p.substring(v,v+Math.floor(p.length/4)),m=-1,y="",w,S,k,T;(m=g.indexOf(x,m+1))!==-1;){var C=u0(p.substring(v),g.substring(m)),I=id(p.substring(0,v),g.substring(0,m));y.length<I+C&&(y=g.substring(m-I,m)+g.substring(m,m+C),w=p.substring(0,v-I),S=p.substring(v+C),k=g.substring(0,m-I),T=g.substring(m+C))}return y.length*2>=p.length?[w,S,k,T,y]:null}var s=o(n,r,Math.ceil(n.length/4)),i=o(n,r,Math.ceil(n.length/2)),l;if(!s&&!i)return null;i?s?l=s[4].length>i[4].length?s:i:l=i:l=s;var a,c,u,d;e.length>t.length?(a=l[0],c=l[1],u=l[2],d=l[3]):(u=l[0],d=l[1],a=l[2],c=l[3]);var h=l[4];return[a,c,u,d,h]}function aN(e){for(var t=!1,n=[],r=0,o=null,s=0,i=0,l=0,a=0,c=0;s<e.length;)e[s][0]==ht?(n[r++]=s,i=a,l=c,a=0,c=0,o=e[s][1]):(e[s][0]==qt?a+=e[s][1].length:c+=e[s][1].length,o&&o.length<=Math.max(i,l)&&o.length<=Math.max(a,c)&&(e.splice(n[r-1],0,[dn,o]),e[n[r-1]+1][0]=qt,r--,r--,s=r>0?n[r-1]:-1,i=0,l=0,a=0,c=0,o=null,t=!0)),s++;for(t&&d0(e),dN(e),s=1;s<e.length;){if(e[s-1][0]==dn&&e[s][0]==qt){var u=e[s-1][1],d=e[s][1],h=uv(u,d),p=uv(d,u);h>=p?(h>=u.length/2||h>=d.length/2)&&(e.splice(s,0,[ht,d.substring(0,h)]),e[s-1][1]=u.substring(0,u.length-h),e[s+1][1]=d.substring(h),s++):(p>=u.length/2||p>=d.length/2)&&(e.splice(s,0,[ht,u.substring(0,p)]),e[s-1][0]=qt,e[s-1][1]=d.substring(0,d.length-p),e[s+1][0]=dn,e[s+1][1]=u.substring(p),s++),s++}s++}}var dv=/[^a-zA-Z0-9]/,fv=/\s/,hv=/[\r\n]/,cN=/\n\r?\n$/,uN=/^\r?\n\r?\n/;function dN(e){function t(p,g){if(!p||!g)return 6;var v=p.charAt(p.length-1),x=g.charAt(0),m=v.match(dv),y=x.match(dv),w=m&&v.match(fv),S=y&&x.match(fv),k=w&&v.match(hv),T=S&&x.match(hv),C=k&&p.match(cN),I=T&&g.match(uN);return C||I?5:k||T?4:m&&!w&&S?3:w||S?2:m||y?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==ht&&e[n+1][0]==ht){var r=e[n-1][1],o=e[n][1],s=e[n+1][1],i=id(r,o);if(i){var l=o.substring(o.length-i);r=r.substring(0,r.length-i),o=l+o.substring(0,o.length-i),s=l+s}for(var a=r,c=o,u=s,d=t(r,o)+t(o,s);o.charAt(0)===s.charAt(0);){r+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var h=t(r,o)+t(o,s);h>=d&&(d=h,a=r,c=o,u=s)}e[n-1][1]!=a&&(a?e[n-1][1]=a:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}}function d0(e,t){e.push([ht,""]);for(var n=0,r=0,o=0,s="",i="",l;n<e.length;){if(n<e.length-1&&!e[n][1]){e.splice(n,1);continue}switch(e[n][0]){case qt:o++,i+=e[n][1],n++;break;case dn:r++,s+=e[n][1],n++;break;case ht:var a=n-o-r-1;if(t){if(a>=0&&m4(e[a][1])){var c=e[a][1].slice(-1);if(e[a][1]=e[a][1].slice(0,-1),s=c+s,i=c+i,!e[a][1]){e.splice(a,1),n--;var u=a-1;e[u]&&e[u][0]===qt&&(o++,i=e[u][1]+i,u--),e[u]&&e[u][0]===dn&&(r++,s=e[u][1]+s,u--),a=u}}if(g4(e[n][1])){var c=e[n][1].charAt(0);e[n][1]=e[n][1].slice(1),s+=c,i+=c}}if(n<e.length-1&&!e[n][1]){e.splice(n,1);break}if(s.length>0||i.length>0){s.length>0&&i.length>0&&(l=u0(i,s),l!==0&&(a>=0?e[a][1]+=i.substring(0,l):(e.splice(0,0,[ht,i.substring(0,l)]),n++),i=i.substring(l),s=s.substring(l)),l=id(i,s),l!==0&&(e[n][1]=i.substring(i.length-l)+e[n][1],i=i.substring(0,i.length-l),s=s.substring(0,s.length-l)));var d=o+r;s.length===0&&i.length===0?(e.splice(n-d,d),n=n-d):s.length===0?(e.splice(n-d,d,[qt,i]),n=n-d+1):i.length===0?(e.splice(n-d,d,[dn,s]),n=n-d+1):(e.splice(n-d,d,[dn,s],[qt,i]),n=n-d+2)}n!==0&&e[n-1][0]===ht?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,o=0,r=0,s="",i="";break}}e[e.length-1][1]===""&&e.pop();var h=!1;for(n=1;n<e.length-1;)e[n-1][0]===ht&&e[n+1][0]===ht&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)===e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),h=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),h=!0)),n++;h&&d0(e,t)}function h4(e){return e>=55296&&e<=56319}function p4(e){return e>=56320&&e<=57343}function g4(e){return p4(e.charCodeAt(0))}function m4(e){return h4(e.charCodeAt(e.length-1))}function fN(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}function Ff(e,t,n,r){return m4(e)||g4(r)?null:fN([[ht,e],[dn,t],[qt,n],[ht,r]])}function hN(e,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,o=typeof n=="number"?null:n.newRange,s=e.length,i=t.length;if(r.length===0&&(o===null||o.length===0)){var l=r.index,a=e.slice(0,l),c=e.slice(l),u=o?o.index:null;e:{var d=l+i-s;if(u!==null&&u!==d||d<0||d>i)break e;var h=t.slice(0,d),p=t.slice(d);if(p!==c)break e;var g=Math.min(l,d),v=a.slice(0,g),x=h.slice(0,g);if(v!==x)break e;var m=a.slice(g),y=h.slice(g);return Ff(v,m,y,c)}e:{if(u!==null&&u!==l)break e;var w=l,h=t.slice(0,w),p=t.slice(w);if(h!==a)break e;var S=Math.min(s-w,i-w),k=c.slice(c.length-S),T=p.slice(p.length-S);if(k!==T)break e;var m=c.slice(0,c.length-S),y=p.slice(0,p.length-S);return Ff(a,m,y,k)}}if(r.length>0&&o&&o.length===0)e:{var v=e.slice(0,r.index),k=e.slice(r.index+r.length),g=v.length,S=k.length;if(i<g+S)break e;var x=t.slice(0,g),T=t.slice(i-S);if(v!==x||k!==T)break e;var m=e.slice(g,s-S),y=t.slice(g,i-S);return Ff(v,m,y,k)}return null}function ld(e,t,n,r){return ua(e,t,n,r,!0)}ld.INSERT=qt;ld.DELETE=dn;ld.EQUAL=ht;var pN=ld,Cu={exports:{}};Cu.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,s="[object Arguments]",i="[object Array]",l="[object Boolean]",a="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",h="[object Map]",p="[object Number]",g="[object Object]",v="[object Promise]",x="[object RegExp]",m="[object Set]",y="[object String]",w="[object Symbol]",S="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",C="[object Float32Array]",I="[object Float64Array]",j="[object Int8Array]",R="[object Int16Array]",M="[object Int32Array]",_="[object Uint8Array]",U="[object Uint8ClampedArray]",V="[object Uint16Array]",ee="[object Uint32Array]",Ee=/[\\^$.*+?()[\]{}|]/g,Re=/\w*$/,D=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,H={};H[s]=H[i]=H[k]=H[T]=H[l]=H[a]=H[C]=H[I]=H[j]=H[R]=H[M]=H[h]=H[p]=H[g]=H[x]=H[m]=H[y]=H[w]=H[_]=H[U]=H[V]=H[ee]=!0,H[c]=H[u]=H[S]=!1;var oe=typeof Cn=="object"&&Cn&&Cn.Object===Object&&Cn,me=typeof self=="object"&&self&&self.Object===Object&&self,pe=oe||me||Function("return this")(),Oe=t&&!t.nodeType&&t,le=Oe&&!0&&e&&!e.nodeType&&e,Me=le&&le.exports===Oe;function rt(b,E){return b.set(E[0],E[1]),b}function B(b,E){return b.add(E),b}function se(b,E){for(var N=-1,L=b?b.length:0;++N<L&&E(b[N],N,b)!==!1;);return b}function xe(b,E){for(var N=-1,L=E.length,ce=b.length;++N<L;)b[ce+N]=E[N];return b}function We(b,E,N,L){for(var ce=-1,te=b?b.length:0;++ce<te;)N=E(N,b[ce],ce,b);return N}function fe(b,E){for(var N=-1,L=Array(b);++N<b;)L[N]=E(N);return L}function gt(b,E){return b==null?void 0:b[E]}function Mn(b){var E=!1;if(b!=null&&typeof b.toString!="function")try{E=!!(b+"")}catch{}return E}function Bn(b){var E=-1,N=Array(b.size);return b.forEach(function(L,ce){N[++E]=[ce,L]}),N}function or(b,E){return function(N){return b(E(N))}}function on(b){var E=-1,N=Array(b.size);return b.forEach(function(L){N[++E]=L}),N}var bn=Array.prototype,Nr=Function.prototype,Pn=Object.prototype,Ar=pe["__core-js_shared__"],Go=function(){var b=/[^.]+$/.exec(Ar&&Ar.keys&&Ar.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),jr=Nr.toString,yt=Pn.hasOwnProperty,Gt=Pn.toString,Os=RegExp("^"+jr.call(yt).replace(Ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),sr=Me?pe.Buffer:void 0,Rr=pe.Symbol,lo=pe.Uint8Array,Kt=or(Object.getPrototypeOf,Object),Ko=Object.create,Ms=Pn.propertyIsEnumerable,gd=bn.splice,Ki=Object.getOwnPropertySymbols,Bs=sr?sr.isBuffer:void 0,La=or(Object.keys,Object),Ps=Dn(pe,"DataView"),Yo=Dn(pe,"Map"),zn=Dn(pe,"Promise"),zs=Dn(pe,"Set"),Yi=Dn(pe,"WeakMap"),Zo=Dn(Object,"create"),Zi=Dt(Ps),Qo=Dt(Yo),Qi=Dt(zn),Xi=Dt(zs),Ji=Dt(Yi),ao=Rr?Rr.prototype:void 0,_a=ao?ao.valueOf:void 0;function Lr(b){var E=-1,N=b?b.length:0;for(this.clear();++E<N;){var L=b[E];this.set(L[0],L[1])}}function md(){this.__data__=Zo?Zo(null):{}}function vd(b){return this.has(b)&&delete this.__data__[b]}function yd(b){var E=this.__data__;if(Zo){var N=E[b];return N===r?void 0:N}return yt.call(E,b)?E[b]:void 0}function Oa(b){var E=this.__data__;return Zo?E[b]!==void 0:yt.call(E,b)}function el(b,E){var N=this.__data__;return N[b]=Zo&&E===void 0?r:E,this}Lr.prototype.clear=md,Lr.prototype.delete=vd,Lr.prototype.get=yd,Lr.prototype.has=Oa,Lr.prototype.set=el;function wt(b){var E=-1,N=b?b.length:0;for(this.clear();++E<N;){var L=b[E];this.set(L[0],L[1])}}function wd(){this.__data__=[]}function bd(b){var E=this.__data__,N=Hs(E,b);if(N<0)return!1;var L=E.length-1;return N==L?E.pop():gd.call(E,N,1),!0}function xd(b){var E=this.__data__,N=Hs(E,b);return N<0?void 0:E[N][1]}function Sd(b){return Hs(this.__data__,b)>-1}function kd(b,E){var N=this.__data__,L=Hs(N,b);return L<0?N.push([b,E]):N[L][1]=E,this}wt.prototype.clear=wd,wt.prototype.delete=bd,wt.prototype.get=xd,wt.prototype.has=Sd,wt.prototype.set=kd;function Nt(b){var E=-1,N=b?b.length:0;for(this.clear();++E<N;){var L=b[E];this.set(L[0],L[1])}}function Td(){this.__data__={hash:new Lr,map:new(Yo||wt),string:new Lr}}function Ed(b){return Jo(this,b).delete(b)}function Cd(b){return Jo(this,b).get(b)}function Id(b){return Jo(this,b).has(b)}function Nd(b,E){return Jo(this,b).set(b,E),this}Nt.prototype.clear=Td,Nt.prototype.delete=Ed,Nt.prototype.get=Cd,Nt.prototype.has=Id,Nt.prototype.set=Nd;function Yt(b){this.__data__=new wt(b)}function Ad(){this.__data__=new wt}function jd(b){return this.__data__.delete(b)}function Rd(b){return this.__data__.get(b)}function Ld(b){return this.__data__.has(b)}function _d(b,E){var N=this.__data__;if(N instanceof wt){var L=N.__data__;if(!Yo||L.length<n-1)return L.push([b,E]),this;N=this.__data__=new Nt(L)}return N.set(b,E),this}Yt.prototype.clear=Ad,Yt.prototype.delete=jd,Yt.prototype.get=Rd,Yt.prototype.has=Ld,Yt.prototype.set=_d;function Ds(b,E){var N=ol(b)||qs(b)?fe(b.length,String):[],L=N.length,ce=!!L;for(var te in b)yt.call(b,te)&&!(ce&&(te=="length"||Gd(te,L)))&&N.push(te);return N}function Ma(b,E,N){var L=b[E];(!(yt.call(b,E)&&Ha(L,N))||N===void 0&&!(E in b))&&(b[E]=N)}function Hs(b,E){for(var N=b.length;N--;)if(Ha(b[N][0],E))return N;return-1}function ir(b,E){return b&&rl(E,il(E),b)}function tl(b,E,N,L,ce,te,Ce){var Se;if(L&&(Se=te?L(b,ce,te,Ce):L(b)),Se!==void 0)return Se;if(!ar(b))return b;var it=ol(b);if(it){if(Se=Vd(b),!E)return qd(b,Se)}else{var Ne=Or(b),At=Ne==u||Ne==d;if($a(b))return $s(b,E);if(Ne==g||Ne==s||At&&!te){if(Mn(b))return te?b:{};if(Se=lr(At?{}:b),!E)return Fd(b,ir(Se,b))}else{if(!H[Ne])return te?b:{};Se=Wd(b,Ne,tl,E)}}Ce||(Ce=new Yt);var Zt=Ce.get(b);if(Zt)return Zt;if(Ce.set(b,Se),!it)var ct=N?Ud(b):il(b);return se(ct||b,function(jt,bt){ct&&(bt=jt,jt=b[bt]),Ma(Se,bt,tl(jt,E,N,L,bt,b,Ce))}),Se}function Od(b){return ar(b)?Ko(b):{}}function Md(b,E,N){var L=E(b);return ol(b)?L:xe(L,N(b))}function Bd(b){return Gt.call(b)}function Pd(b){if(!ar(b)||Yd(b))return!1;var E=sl(b)||Mn(b)?Os:D;return E.test(Dt(b))}function zd(b){if(!za(b))return La(b);var E=[];for(var N in Object(b))yt.call(b,N)&&N!="constructor"&&E.push(N);return E}function $s(b,E){if(E)return b.slice();var N=new b.constructor(b.length);return b.copy(N),N}function nl(b){var E=new b.constructor(b.byteLength);return new lo(E).set(new lo(b)),E}function Xo(b,E){var N=E?nl(b.buffer):b.buffer;return new b.constructor(N,b.byteOffset,b.byteLength)}function Ba(b,E,N){var L=E?N(Bn(b),!0):Bn(b);return We(L,rt,new b.constructor)}function Pa(b){var E=new b.constructor(b.source,Re.exec(b));return E.lastIndex=b.lastIndex,E}function Dd(b,E,N){var L=E?N(on(b),!0):on(b);return We(L,B,new b.constructor)}function Hd(b){return _a?Object(_a.call(b)):{}}function $d(b,E){var N=E?nl(b.buffer):b.buffer;return new b.constructor(N,b.byteOffset,b.length)}function qd(b,E){var N=-1,L=b.length;for(E||(E=Array(L));++N<L;)E[N]=b[N];return E}function rl(b,E,N,L){N||(N={});for(var ce=-1,te=E.length;++ce<te;){var Ce=E[ce],Se=void 0;Ma(N,Ce,Se===void 0?b[Ce]:Se)}return N}function Fd(b,E){return rl(b,_r(b),E)}function Ud(b){return Md(b,il,_r)}function Jo(b,E){var N=b.__data__;return Kd(E)?N[typeof E=="string"?"string":"hash"]:N.map}function Dn(b,E){var N=gt(b,E);return Pd(N)?N:void 0}var _r=Ki?or(Ki,Object):Qd,Or=Bd;(Ps&&Or(new Ps(new ArrayBuffer(1)))!=T||Yo&&Or(new Yo)!=h||zn&&Or(zn.resolve())!=v||zs&&Or(new zs)!=m||Yi&&Or(new Yi)!=S)&&(Or=function(b){var E=Gt.call(b),N=E==g?b.constructor:void 0,L=N?Dt(N):void 0;if(L)switch(L){case Zi:return T;case Qo:return h;case Qi:return v;case Xi:return m;case Ji:return S}return E});function Vd(b){var E=b.length,N=b.constructor(E);return E&&typeof b[0]=="string"&&yt.call(b,"index")&&(N.index=b.index,N.input=b.input),N}function lr(b){return typeof b.constructor=="function"&&!za(b)?Od(Kt(b)):{}}function Wd(b,E,N,L){var ce=b.constructor;switch(E){case k:return nl(b);case l:case a:return new ce(+b);case T:return Xo(b,L);case C:case I:case j:case R:case M:case _:case U:case V:case ee:return $d(b,L);case h:return Ba(b,L,N);case p:case y:return new ce(b);case x:return Pa(b);case m:return Dd(b,L,N);case w:return Hd(b)}}function Gd(b,E){return E=E??o,!!E&&(typeof b=="number"||K.test(b))&&b>-1&&b%1==0&&b<E}function Kd(b){var E=typeof b;return E=="string"||E=="number"||E=="symbol"||E=="boolean"?b!=="__proto__":b===null}function Yd(b){return!!Go&&Go in b}function za(b){var E=b&&b.constructor,N=typeof E=="function"&&E.prototype||Pn;return b===N}function Dt(b){if(b!=null){try{return jr.call(b)}catch{}try{return b+""}catch{}}return""}function Da(b){return tl(b,!0,!0)}function Ha(b,E){return b===E||b!==b&&E!==E}function qs(b){return Zd(b)&&yt.call(b,"callee")&&(!Ms.call(b,"callee")||Gt.call(b)==s)}var ol=Array.isArray;function Fs(b){return b!=null&&qa(b.length)&&!sl(b)}function Zd(b){return Fa(b)&&Fs(b)}var $a=Bs||Xd;function sl(b){var E=ar(b)?Gt.call(b):"";return E==u||E==d}function qa(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=o}function ar(b){var E=typeof b;return!!b&&(E=="object"||E=="function")}function Fa(b){return!!b&&typeof b=="object"}function il(b){return Fs(b)?Ds(b):zd(b)}function Qd(){return[]}function Xd(){return!1}e.exports=Da})(Cu,Cu.exports);var v4=Cu.exports,Iu={exports:{}};Iu.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=1,s=2,i=9007199254740991,l="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",g="[object GeneratorFunction]",v="[object Map]",x="[object Number]",m="[object Null]",y="[object Object]",w="[object Promise]",S="[object Proxy]",k="[object RegExp]",T="[object Set]",C="[object String]",I="[object Symbol]",j="[object Undefined]",R="[object WeakMap]",M="[object ArrayBuffer]",_="[object DataView]",U="[object Float32Array]",V="[object Float64Array]",ee="[object Int8Array]",Ee="[object Int16Array]",Re="[object Int32Array]",D="[object Uint8Array]",K="[object Uint8ClampedArray]",H="[object Uint16Array]",oe="[object Uint32Array]",me=/[\\^$.*+?()[\]{}|]/g,pe=/^\[object .+?Constructor\]$/,Oe=/^(?:0|[1-9]\d*)$/,le={};le[U]=le[V]=le[ee]=le[Ee]=le[Re]=le[D]=le[K]=le[H]=le[oe]=!0,le[l]=le[a]=le[M]=le[u]=le[_]=le[d]=le[h]=le[p]=le[v]=le[x]=le[y]=le[k]=le[T]=le[C]=le[R]=!1;var Me=typeof Cn=="object"&&Cn&&Cn.Object===Object&&Cn,rt=typeof self=="object"&&self&&self.Object===Object&&self,B=Me||rt||Function("return this")(),se=t&&!t.nodeType&&t,xe=se&&!0&&e&&!e.nodeType&&e,We=xe&&xe.exports===se,fe=We&&Me.process,gt=function(){try{return fe&&fe.binding&&fe.binding("util")}catch{}}(),Mn=gt&>.isTypedArray;function Bn(b,E){for(var N=-1,L=b==null?0:b.length,ce=0,te=[];++N<L;){var Ce=b[N];E(Ce,N,b)&&(te[ce++]=Ce)}return te}function or(b,E){for(var N=-1,L=E.length,ce=b.length;++N<L;)b[ce+N]=E[N];return b}function on(b,E){for(var N=-1,L=b==null?0:b.length;++N<L;)if(E(b[N],N,b))return!0;return!1}function bn(b,E){for(var N=-1,L=Array(b);++N<b;)L[N]=E(N);return L}function Nr(b){return function(E){return b(E)}}function Pn(b,E){return b.has(E)}function Ar(b,E){return b==null?void 0:b[E]}function Go(b){var E=-1,N=Array(b.size);return b.forEach(function(L,ce){N[++E]=[ce,L]}),N}function jr(b,E){return function(N){return b(E(N))}}function yt(b){var E=-1,N=Array(b.size);return b.forEach(function(L){N[++E]=L}),N}var Gt=Array.prototype,Os=Function.prototype,sr=Object.prototype,Rr=B["__core-js_shared__"],lo=Os.toString,Kt=sr.hasOwnProperty,Ko=function(){var b=/[^.]+$/.exec(Rr&&Rr.keys&&Rr.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),Ms=sr.toString,gd=RegExp("^"+lo.call(Kt).replace(me,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ki=We?B.Buffer:void 0,Bs=B.Symbol,La=B.Uint8Array,Ps=sr.propertyIsEnumerable,Yo=Gt.splice,zn=Bs?Bs.toStringTag:void 0,zs=Object.getOwnPropertySymbols,Yi=Ki?Ki.isBuffer:void 0,Zo=jr(Object.keys,Object),Zi=_r(B,"DataView"),Qo=_r(B,"Map"),Qi=_r(B,"Promise"),Xi=_r(B,"Set"),Ji=_r(B,"WeakMap"),ao=_r(Object,"create"),_a=Dt(Zi),Lr=Dt(Qo),md=Dt(Qi),vd=Dt(Xi),yd=Dt(Ji),Oa=Bs?Bs.prototype:void 0,el=Oa?Oa.valueOf:void 0;function wt(b){var E=-1,N=b==null?0:b.length;for(this.clear();++E<N;){var L=b[E];this.set(L[0],L[1])}}function wd(){this.__data__=ao?ao(null):{},this.size=0}function bd(b){var E=this.has(b)&&delete this.__data__[b];return this.size-=E?1:0,E}function xd(b){var E=this.__data__;if(ao){var N=E[b];return N===r?void 0:N}return Kt.call(E,b)?E[b]:void 0}function Sd(b){var E=this.__data__;return ao?E[b]!==void 0:Kt.call(E,b)}function kd(b,E){var N=this.__data__;return this.size+=this.has(b)?0:1,N[b]=ao&&E===void 0?r:E,this}wt.prototype.clear=wd,wt.prototype.delete=bd,wt.prototype.get=xd,wt.prototype.has=Sd,wt.prototype.set=kd;function Nt(b){var E=-1,N=b==null?0:b.length;for(this.clear();++E<N;){var L=b[E];this.set(L[0],L[1])}}function Td(){this.__data__=[],this.size=0}function Ed(b){var E=this.__data__,N=$s(E,b);if(N<0)return!1;var L=E.length-1;return N==L?E.pop():Yo.call(E,N,1),--this.size,!0}function Cd(b){var E=this.__data__,N=$s(E,b);return N<0?void 0:E[N][1]}function Id(b){return $s(this.__data__,b)>-1}function Nd(b,E){var N=this.__data__,L=$s(N,b);return L<0?(++this.size,N.push([b,E])):N[L][1]=E,this}Nt.prototype.clear=Td,Nt.prototype.delete=Ed,Nt.prototype.get=Cd,Nt.prototype.has=Id,Nt.prototype.set=Nd;function Yt(b){var E=-1,N=b==null?0:b.length;for(this.clear();++E<N;){var L=b[E];this.set(L[0],L[1])}}function Ad(){this.size=0,this.__data__={hash:new wt,map:new(Qo||Nt),string:new wt}}function jd(b){var E=Dn(this,b).delete(b);return this.size-=E?1:0,E}function Rd(b){return Dn(this,b).get(b)}function Ld(b){return Dn(this,b).has(b)}function _d(b,E){var N=Dn(this,b),L=N.size;return N.set(b,E),this.size+=N.size==L?0:1,this}Yt.prototype.clear=Ad,Yt.prototype.delete=jd,Yt.prototype.get=Rd,Yt.prototype.has=Ld,Yt.prototype.set=_d;function Ds(b){var E=-1,N=b==null?0:b.length;for(this.__data__=new Yt;++E<N;)this.add(b[E])}function Ma(b){return this.__data__.set(b,r),this}function Hs(b){return this.__data__.has(b)}Ds.prototype.add=Ds.prototype.push=Ma,Ds.prototype.has=Hs;function ir(b){var E=this.__data__=new Nt(b);this.size=E.size}function tl(){this.__data__=new Nt,this.size=0}function Od(b){var E=this.__data__,N=E.delete(b);return this.size=E.size,N}function Md(b){return this.__data__.get(b)}function Bd(b){return this.__data__.has(b)}function Pd(b,E){var N=this.__data__;if(N instanceof Nt){var L=N.__data__;if(!Qo||L.length<n-1)return L.push([b,E]),this.size=++N.size,this;N=this.__data__=new Yt(L)}return N.set(b,E),this.size=N.size,this}ir.prototype.clear=tl,ir.prototype.delete=Od,ir.prototype.get=Md,ir.prototype.has=Bd,ir.prototype.set=Pd;function zd(b,E){var N=qs(b),L=!N&&Ha(b),ce=!N&&!L&&Fs(b),te=!N&&!L&&!ce&&Fa(b),Ce=N||L||ce||te,Se=Ce?bn(b.length,String):[],it=Se.length;for(var Ne in b)Kt.call(b,Ne)&&!(Ce&&(Ne=="length"||ce&&(Ne=="offset"||Ne=="parent")||te&&(Ne=="buffer"||Ne=="byteLength"||Ne=="byteOffset")||Wd(Ne,it)))&&Se.push(Ne);return Se}function $s(b,E){for(var N=b.length;N--;)if(Da(b[N][0],E))return N;return-1}function nl(b,E,N){var L=E(b);return qs(b)?L:or(L,N(b))}function Xo(b){return b==null?b===void 0?j:m:zn&&zn in Object(b)?Or(b):za(b)}function Ba(b){return ar(b)&&Xo(b)==l}function Pa(b,E,N,L,ce){return b===E?!0:b==null||E==null||!ar(b)&&!ar(E)?b!==b&&E!==E:Dd(b,E,N,L,Pa,ce)}function Dd(b,E,N,L,ce,te){var Ce=qs(b),Se=qs(E),it=Ce?a:lr(b),Ne=Se?a:lr(E);it=it==l?y:it,Ne=Ne==l?y:Ne;var At=it==y,Zt=Ne==y,ct=it==Ne;if(ct&&Fs(b)){if(!Fs(E))return!1;Ce=!0,At=!1}if(ct&&!At)return te||(te=new ir),Ce||Fa(b)?rl(b,E,N,L,ce,te):Fd(b,E,it,N,L,ce,te);if(!(N&o)){var jt=At&&Kt.call(b,"__wrapped__"),bt=Zt&&Kt.call(E,"__wrapped__");if(jt||bt){var co=jt?b.value():b,Mr=bt?E.value():E;return te||(te=new ir),ce(co,Mr,N,L,te)}}return ct?(te||(te=new ir),Ud(b,E,N,L,ce,te)):!1}function Hd(b){if(!qa(b)||Kd(b))return!1;var E=$a(b)?gd:pe;return E.test(Dt(b))}function $d(b){return ar(b)&&sl(b.length)&&!!le[Xo(b)]}function qd(b){if(!Yd(b))return Zo(b);var E=[];for(var N in Object(b))Kt.call(b,N)&&N!="constructor"&&E.push(N);return E}function rl(b,E,N,L,ce,te){var Ce=N&o,Se=b.length,it=E.length;if(Se!=it&&!(Ce&&it>Se))return!1;var Ne=te.get(b);if(Ne&&te.get(E))return Ne==E;var At=-1,Zt=!0,ct=N&s?new Ds:void 0;for(te.set(b,E),te.set(E,b);++At<Se;){var jt=b[At],bt=E[At];if(L)var co=Ce?L(bt,jt,At,E,b,te):L(jt,bt,At,b,E,te);if(co!==void 0){if(co)continue;Zt=!1;break}if(ct){if(!on(E,function(Mr,es){if(!Pn(ct,es)&&(jt===Mr||ce(jt,Mr,N,L,te)))return ct.push(es)})){Zt=!1;break}}else if(!(jt===bt||ce(jt,bt,N,L,te))){Zt=!1;break}}return te.delete(b),te.delete(E),Zt}function Fd(b,E,N,L,ce,te,Ce){switch(N){case _:if(b.byteLength!=E.byteLength||b.byteOffset!=E.byteOffset)return!1;b=b.buffer,E=E.buffer;case M:return!(b.byteLength!=E.byteLength||!te(new La(b),new La(E)));case u:case d:case x:return Da(+b,+E);case h:return b.name==E.name&&b.message==E.message;case k:case C:return b==E+"";case v:var Se=Go;case T:var it=L&o;if(Se||(Se=yt),b.size!=E.size&&!it)return!1;var Ne=Ce.get(b);if(Ne)return Ne==E;L|=s,Ce.set(b,E);var At=rl(Se(b),Se(E),L,ce,te,Ce);return Ce.delete(b),At;case I:if(el)return el.call(b)==el.call(E)}return!1}function Ud(b,E,N,L,ce,te){var Ce=N&o,Se=Jo(b),it=Se.length,Ne=Jo(E),At=Ne.length;if(it!=At&&!Ce)return!1;for(var Zt=it;Zt--;){var ct=Se[Zt];if(!(Ce?ct in E:Kt.call(E,ct)))return!1}var jt=te.get(b);if(jt&&te.get(E))return jt==E;var bt=!0;te.set(b,E),te.set(E,b);for(var co=Ce;++Zt<it;){ct=Se[Zt];var Mr=b[ct],es=E[ct];if(L)var M0=Ce?L(es,Mr,ct,E,b,te):L(Mr,es,ct,b,E,te);if(!(M0===void 0?Mr===es||ce(Mr,es,N,L,te):M0)){bt=!1;break}co||(co=ct=="constructor")}if(bt&&!co){var Ua=b.constructor,Va=E.constructor;Ua!=Va&&"constructor"in b&&"constructor"in E&&!(typeof Ua=="function"&&Ua instanceof Ua&&typeof Va=="function"&&Va instanceof Va)&&(bt=!1)}return te.delete(b),te.delete(E),bt}function Jo(b){return nl(b,il,Vd)}function Dn(b,E){var N=b.__data__;return Gd(E)?N[typeof E=="string"?"string":"hash"]:N.map}function _r(b,E){var N=Ar(b,E);return Hd(N)?N:void 0}function Or(b){var E=Kt.call(b,zn),N=b[zn];try{b[zn]=void 0;var L=!0}catch{}var ce=Ms.call(b);return L&&(E?b[zn]=N:delete b[zn]),ce}var Vd=zs?function(b){return b==null?[]:(b=Object(b),Bn(zs(b),function(E){return Ps.call(b,E)}))}:Qd,lr=Xo;(Zi&&lr(new Zi(new ArrayBuffer(1)))!=_||Qo&&lr(new Qo)!=v||Qi&&lr(Qi.resolve())!=w||Xi&&lr(new Xi)!=T||Ji&&lr(new Ji)!=R)&&(lr=function(b){var E=Xo(b),N=E==y?b.constructor:void 0,L=N?Dt(N):"";if(L)switch(L){case _a:return _;case Lr:return v;case md:return w;case vd:return T;case yd:return R}return E});function Wd(b,E){return E=E??i,!!E&&(typeof b=="number"||Oe.test(b))&&b>-1&&b%1==0&&b<E}function Gd(b){var E=typeof b;return E=="string"||E=="number"||E=="symbol"||E=="boolean"?b!=="__proto__":b===null}function Kd(b){return!!Ko&&Ko in b}function Yd(b){var E=b&&b.constructor,N=typeof E=="function"&&E.prototype||sr;return b===N}function za(b){return Ms.call(b)}function Dt(b){if(b!=null){try{return lo.call(b)}catch{}try{return b+""}catch{}}return""}function Da(b,E){return b===E||b!==b&&E!==E}var Ha=Ba(function(){return arguments}())?Ba:function(b){return ar(b)&&Kt.call(b,"callee")&&!Ps.call(b,"callee")},qs=Array.isArray;function ol(b){return b!=null&&sl(b.length)&&!$a(b)}var Fs=Yi||Xd;function Zd(b,E){return Pa(b,E)}function $a(b){if(!qa(b))return!1;var E=Xo(b);return E==p||E==g||E==c||E==S}function sl(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=i}function qa(b){var E=typeof b;return b!=null&&(E=="object"||E=="function")}function ar(b){return b!=null&&typeof b=="object"}var Fa=Mn?Nr(Mn):$d;function il(b){return ol(b)?zd(b):qd(b)}function Qd(){return[]}function Xd(){return!1}e.exports=Zd})(Iu,Iu.exports);var y4=Iu.exports,f0={};Object.defineProperty(f0,"__esModule",{value:!0});const gN=v4,mN=y4;var jp;(function(e){function t(s={},i={},l=!1){typeof s!="object"&&(s={}),typeof i!="object"&&(i={});let a=gN(i);l||(a=Object.keys(a).reduce((c,u)=>(a[u]!=null&&(c[u]=a[u]),c),{}));for(const c in s)s[c]!==void 0&&i[c]===void 0&&(a[c]=s[c]);return Object.keys(a).length>0?a:void 0}e.compose=t;function n(s={},i={}){typeof s!="object"&&(s={}),typeof i!="object"&&(i={});const l=Object.keys(s).concat(Object.keys(i)).reduce((a,c)=>(mN(s[c],i[c])||(a[c]=i[c]===void 0?null:i[c]),a),{});return Object.keys(l).length>0?l:void 0}e.diff=n;function r(s={},i={}){s=s||{};const l=Object.keys(i).reduce((a,c)=>(i[c]!==s[c]&&s[c]!==void 0&&(a[c]=i[c]),a),{});return Object.keys(s).reduce((a,c)=>(s[c]!==i[c]&&i[c]===void 0&&(a[c]=null),a),l)}e.invert=r;function o(s,i,l=!1){if(typeof s!="object")return i;if(typeof i!="object")return;if(!l)return i;const a=Object.keys(i).reduce((c,u)=>(s[u]===void 0&&(c[u]=i[u]),c),{});return Object.keys(a).length>0?a:void 0}e.transform=o})(jp||(jp={}));f0.default=jp;var ad={};Object.defineProperty(ad,"__esModule",{value:!0});var Rp;(function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t})(Rp||(Rp={}));ad.default=Rp;var h0={};Object.defineProperty(h0,"__esModule",{value:!0});const pv=ad;class vN{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const n=this.ops[this.index];if(n){const r=this.offset,o=pv.default.length(n);if(t>=o-r?(t=o-r,this.index+=1,this.offset=0):this.offset+=t,typeof n.delete=="number")return{delete:t};{const s={};return n.attributes&&(s.attributes=n.attributes),typeof n.retain=="number"?s.retain=t:typeof n.retain=="object"&&n.retain!==null?s.retain=n.retain:typeof n.insert=="string"?s.insert=n.insert.substr(r,t):s.insert=n.insert,s}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?pv.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const t=this.offset,n=this.index,r=this.next(),o=this.ops.slice(this.index);return this.offset=t,this.index=n,[r].concat(o)}}else return[]}}h0.default=vN;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=pN,r=v4,o=y4,s=f0;t.AttributeMap=s.default;const i=ad;t.Op=i.default;const l=h0;t.OpIterator=l.default;const a="\0",c=(d,h)=>{if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const p=Object.keys(d)[0];if(!p||p!==Object.keys(h)[0])throw new Error(`embed types not matched: ${p} != ${Object.keys(h)[0]}`);return[p,d[p],h[p]]};class u{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,p){this.handlers[h]=p}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const p=this.handlers[h];if(!p)throw new Error(`no handlers for embed type "${h}"`);return p}insert(h,p){const g={};return typeof h=="string"&&h.length===0?this:(g.insert=h,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(g.attributes=p),this.push(g))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,p){if(typeof h=="number"&&h<=0)return this;const g={retain:h};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(g.attributes=p),this.push(g)}push(h){let p=this.ops.length,g=this.ops[p-1];if(h=r(h),typeof g=="object"){if(typeof h.delete=="number"&&typeof g.delete=="number")return this.ops[p-1]={delete:g.delete+h.delete},this;if(typeof g.delete=="number"&&h.insert!=null&&(p-=1,g=this.ops[p-1],typeof g!="object"))return this.ops.unshift(h),this;if(o(h.attributes,g.attributes)){if(typeof h.insert=="string"&&typeof g.insert=="string")return this.ops[p-1]={insert:g.insert+h.insert},typeof h.attributes=="object"&&(this.ops[p-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof g.retain=="number")return this.ops[p-1]={retain:g.retain+h.retain},typeof h.attributes=="object"&&(this.ops[p-1].attributes=h.attributes),this}}return p===this.ops.length?this.ops.push(h):this.ops.splice(p,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const p=[],g=[];return this.forEach(v=>{(h(v)?p:g).push(v)}),[p,g]}reduce(h,p){return this.ops.reduce(h,p)}changeLength(){return this.reduce((h,p)=>p.insert?h+i.default.length(p):p.delete?h-p.delete:h,0)}length(){return this.reduce((h,p)=>h+i.default.length(p),0)}slice(h=0,p=1/0){const g=[],v=new l.default(this.ops);let x=0;for(;x<p&&v.hasNext();){let m;x<h?m=v.next(h-x):(m=v.next(p-x),g.push(m)),x+=i.default.length(m)}return new u(g)}compose(h){const p=new l.default(this.ops),g=new l.default(h.ops),v=[],x=g.peek();if(x!=null&&typeof x.retain=="number"&&x.attributes==null){let y=x.retain;for(;p.peekType()==="insert"&&p.peekLength()<=y;)y-=p.peekLength(),v.push(p.next());x.retain-y>0&&g.next(x.retain-y)}const m=new u(v);for(;p.hasNext()||g.hasNext();)if(g.peekType()==="insert")m.push(g.next());else if(p.peekType()==="delete")m.push(p.next());else{const y=Math.min(p.peekLength(),g.peekLength()),w=p.next(y),S=g.next(y);if(S.retain){const k={};if(typeof w.retain=="number")k.retain=typeof S.retain=="number"?y:S.retain;else if(typeof S.retain=="number")w.retain==null?k.insert=w.insert:k.retain=w.retain;else{const C=w.retain==null?"insert":"retain",[I,j,R]=c(w[C],S.retain),M=u.getHandler(I);k[C]={[I]:M.compose(j,R,C==="retain")}}const T=s.default.compose(w.attributes,S.attributes,typeof w.retain=="number");if(T&&(k.attributes=T),m.push(k),!g.hasNext()&&o(m.ops[m.ops.length-1],k)){const C=new u(p.rest());return m.concat(C).chop()}}else typeof S.delete=="number"&&(typeof w.retain=="number"||typeof w.retain=="object"&&w.retain!==null)&&m.push(S)}return m.chop()}concat(h){const p=new u(this.ops.slice());return h.ops.length>0&&(p.push(h.ops[0]),p.ops=p.ops.concat(h.ops.slice(1))),p}diff(h,p){if(this.ops===h.ops)return new u;const g=[this,h].map(w=>w.map(S=>{if(S.insert!=null)return typeof S.insert=="string"?S.insert:a;const k=w===h?"on":"with";throw new Error("diff() called "+k+" non-document")}).join("")),v=new u,x=n(g[0],g[1],p,!0),m=new l.default(this.ops),y=new l.default(h.ops);return x.forEach(w=>{let S=w[1].length;for(;S>0;){let k=0;switch(w[0]){case n.INSERT:k=Math.min(y.peekLength(),S),v.push(y.next(k));break;case n.DELETE:k=Math.min(S,m.peekLength()),m.next(k),v.delete(k);break;case n.EQUAL:k=Math.min(m.peekLength(),y.peekLength(),S);const T=m.next(k),C=y.next(k);o(T.insert,C.insert)?v.retain(k,s.default.diff(T.attributes,C.attributes)):v.push(C).delete(k);break}S-=k}}),v.chop()}eachLine(h,p=`
`){const g=new l.default(this.ops);let v=new u,x=0;for(;g.hasNext();){if(g.peekType()!=="insert")return;const m=g.peek(),y=i.default.length(m)-g.peekLength(),w=typeof m.insert=="string"?m.insert.indexOf(p,y)-y:-1;if(w<0)v.push(g.next());else if(w>0)v.push(g.next(w));else{if(h(v,g.next(1).attributes||{},x)===!1)return;x+=1,v=new u}}v.length()>0&&h(v,{},x)}invert(h){const p=new u;return this.reduce((g,v)=>{if(v.insert)p.delete(i.default.length(v));else{if(typeof v.retain=="number"&&v.attributes==null)return p.retain(v.retain),g+v.retain;if(v.delete||typeof v.retain=="number"){const x=v.delete||v.retain;return h.slice(g,g+x).forEach(y=>{v.delete?p.push(y):v.retain&&v.attributes&&p.retain(i.default.length(y),s.default.invert(v.attributes,y.attributes))}),g+x}else if(typeof v.retain=="object"&&v.retain!==null){const x=h.slice(g,g+1),m=new l.default(x.ops).next(),[y,w,S]=c(v.retain,m.insert),k=u.getHandler(y);return p.retain({[y]:k.invert(w,S)},s.default.invert(v.attributes,m.attributes)),g+1}}return g},0),p.chop()}transform(h,p=!1){if(p=!!p,typeof h=="number")return this.transformPosition(h,p);const g=h,v=new l.default(this.ops),x=new l.default(g.ops),m=new u;for(;v.hasNext()||x.hasNext();)if(v.peekType()==="insert"&&(p||x.peekType()!=="insert"))m.retain(i.default.length(v.next()));else if(x.peekType()==="insert")m.push(x.next());else{const y=Math.min(v.peekLength(),x.peekLength()),w=v.next(y),S=x.next(y);if(w.delete)continue;if(S.delete)m.push(S);else{const k=w.retain,T=S.retain;let C=typeof T=="object"&&T!==null?T:y;if(typeof k=="object"&&k!==null&&typeof T=="object"&&T!==null){const I=Object.keys(k)[0];if(I===Object.keys(T)[0]){const j=u.getHandler(I);j&&(C={[I]:j.transform(k[I],T[I],p)})}}m.retain(C,s.default.transform(w.attributes,S.attributes,p))}}return m.chop()}transformPosition(h,p=!1){p=!!p;const g=new l.default(this.ops);let v=0;for(;g.hasNext()&&v<=h;){const x=g.peekLength(),m=g.peekType();if(g.next(),m==="delete"){h-=Math.min(x,h-v);continue}else m==="insert"&&(v<h||!p)&&(h+=x);v+=x}return h}}u.Op=i.default,u.OpIterator=l.default,u.AttributeMap=s.default,u.handlers={},t.default=u,e.exports=u,e.exports.default=u})(Ap,Ap.exports);var Nn=Ap.exports;const X=Di(Nn);class Cr extends On{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Cr.blotName="break";Cr.tagName="BR";let kr=class extends Eu{};const yN={"&":"&","<":"<",">":">",'"':""","'":"'"};function w4(e){return e.replace(/[&<>"']/g,t=>yN[t])}const dr=class dr extends a0{static compare(t,n){const r=dr.order.indexOf(t),o=dr.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t<n?-1:1}formatAt(t,n,r,o){if(dr.compare(this.statics.blotName,r)<0&&this.scroll.query(r,Q.BLOT)){const s=this.isolate(t,n);o&&s.wrap(r,o)}else super.formatAt(t,n,r,o)}optimize(t){if(super.optimize(t),this.parent instanceof dr&&dr.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}};q(dr,"allowedChildren",[dr,Cr,On,kr]),q(dr,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let to=dr;const gv=1;let hn=class extends ca{constructor(){super(...arguments);q(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=wN(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,o,s){r<=0||(this.scroll.query(o,Q.BLOCK)?n+r===this.length()&&this.format(o,s):super.formatAt(n,Math.min(r,this.length()-n-1),o,s),this.cache={})}insertAt(n,r,o){if(o!=null){super.insertAt(n,r,o),this.cache={};return}if(r.length===0)return;const s=r.split(`
`),i=s.shift();i.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let l=this;s.reduce((a,c)=>(l=l.split(a,!0),l.insertAt(0,c),c.length),n+i.length)}insertBefore(n,r){const{head:o}=this.children;super.insertBefore(n,r),o instanceof Cr&&o.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+gv),this.cache.length}moveChildren(n,r){super.moveChildren(n,r),this.cache={}}optimize(n){super.optimize(n),this.cache={}}path(n){return super.path(n,!0)}removeChild(n){super.removeChild(n),this.cache={}}split(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(n===0||n>=this.length()-gv)){const s=this.clone();return n===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const o=super.split(n,r);return this.cache={},o}};hn.blotName="block";hn.tagName="P";hn.defaultChild=Cr;hn.allowedChildren=[Cr,to,On,kr];class Yn extends On{attach(){super.attach(),this.attributes=new od(this.domNode)}delta(){return new X().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,n){const r=this.scroll.query(t,Q.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(t,n,r,o){this.format(r,o)}insertAt(t,n,r){if(r!=null){super.insertAt(t,n,r);return}const o=n.split(`
`),s=o.pop(),i=o.map(a=>{const c=this.scroll.create(hn.blotName);return c.insertAt(0,a),c}),l=this.split(t);i.forEach(a=>{this.parent.insertBefore(a,l)}),s&&this.parent.insertBefore(this.scroll.create("text",s),l)}}Yn.scope=Q.BLOCK_BLOT;function wN(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(Bt).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),En(r,{},t)),new X).insert(`
`,En(e))}function En(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e==null||("formats"in e&&typeof e.formats=="function"&&(t={...t,...e.formats()},n&&delete t["code-token"]),e.parent==null||e.parent.statics.blotName==="scroll"||e.parent.statics.scope!==e.statics.scope)?t:En(e.parent,t,n)}const Sn=class Sn extends On{static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(Sn.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,n){if(this.savedLength!==0){super.format(t,n);return}let r=this,o=0;for(;r!=null&&r.statics.scope!==Q.BLOCK_BLOT;)o+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Sn.CONTENTS.length,r.optimize(),r.formatAt(o,Sn.CONTENTS.length,t,n),this.savedLength=0)}index(t,n){return t===this.textNode?0:super.index(t,n)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const n=this.prev instanceof kr?this.prev:null,r=n?n.length():0,o=this.next instanceof kr?this.next:null,s=o?o.text:"",{textNode:i}=this,l=i.data.split(Sn.CONTENTS).join("");i.data=Sn.CONTENTS;let a;if(n)a=n,(l||o)&&(n.insertAt(n.length(),l+s),o&&o.remove());else if(o)a=o,o.insertAt(0,l);else{const c=document.createTextNode(l);a=this.scroll.create(c),this.parent.insertBefore(a,this)}if(this.remove(),t){const c=(h,p)=>n&&h===n.domNode?p:h===i?r+p-1:o&&h===o.domNode?r+l.length+p:null,u=c(t.start.node,t.start.offset),d=c(t.end.node,t.end.offset);if(u!==null&&d!==null)return{startNode:a.domNode,startOffset:u,endNode:a.domNode,endOffset:d}}return null}update(t,n){if(t.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(n.range=r)}}optimize(t){super.optimize(t);let{parent:n}=this;for(;n;){if(n.domNode.tagName==="A"){this.savedLength=Sn.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}};q(Sn,"blotName","cursor"),q(Sn,"className","ql-cursor"),q(Sn,"tagName","span"),q(Sn,"CONTENTS","\uFEFF");let da=Sn;var b4={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(a,c,u){this.fn=a,this.context=c,this.once=u||!1}function s(a,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new o(u,d||a,h),g=n?n+c:c;return a._events[g]?a._events[g].fn?a._events[g]=[a._events[g],p]:a._events[g].push(p):(a._events[g]=p,a._eventsCount++),a}function i(a,c){--a._eventsCount===0?a._events=new r:delete a._events[c]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},l.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,p=d.length,g=new Array(p);h<p;h++)g[h]=d[h].fn;return g},l.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},l.prototype.emit=function(c,u,d,h,p,g){var v=n?n+c:c;if(!this._events[v])return!1;var x=this._events[v],m=arguments.length,y,w;if(x.fn){switch(x.once&&this.removeListener(c,x.fn,void 0,!0),m){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,u),!0;case 3:return x.fn.call(x.context,u,d),!0;case 4:return x.fn.call(x.context,u,d,h),!0;case 5:return x.fn.call(x.context,u,d,h,p),!0;case 6:return x.fn.call(x.context,u,d,h,p,g),!0}for(w=1,y=new Array(m-1);w<m;w++)y[w-1]=arguments[w];x.fn.apply(x.context,y)}else{var S=x.length,k;for(w=0;w<S;w++)switch(x[w].once&&this.removeListener(c,x[w].fn,void 0,!0),m){case 1:x[w].fn.call(x[w].context);break;case 2:x[w].fn.call(x[w].context,u);break;case 3:x[w].fn.call(x[w].context,u,d);break;case 4:x[w].fn.call(x[w].context,u,d,h);break;default:if(!y)for(k=1,y=new Array(m-1);k<m;k++)y[k-1]=arguments[k];x[w].fn.apply(x[w].context,y)}}return!0},l.prototype.on=function(c,u,d){return s(this,c,u,d,!1)},l.prototype.once=function(c,u,d){return s(this,c,u,d,!0)},l.prototype.removeListener=function(c,u,d,h){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return i(this,p),this;var g=this._events[p];if(g.fn)g.fn===u&&(!h||g.once)&&(!d||g.context===d)&&i(this,p);else{for(var v=0,x=[],m=g.length;v<m;v++)(g[v].fn!==u||h&&!g[v].once||d&&g[v].context!==d)&&x.push(g[v]);x.length?this._events[p]=x.length===1?x[0]:x:i(this,p)}return this},l.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&i(this,u)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(b4);var bN=b4.exports;const xN=Di(bN),Lp=new WeakMap,_p=["error","warn","log","info"];let Op="warn";function x4(e){if(Op&&_p.indexOf(e)<=_p.indexOf(Op)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console[e](...n)}}function so(e){return _p.reduce((t,n)=>(t[n]=x4.bind(console,n,e),t),{})}so.level=e=>{Op=e};x4.level=so.level;const Uf=so("quill:events"),SN=["selectionchange","mousedown","mouseup","click"];SN.forEach(e=>{document.addEventListener(e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(o=>{const s=Lp.get(o);s&&s.emitter&&s.emitter.handleDOM(...n)})})});class Y extends xN{constructor(){super(),this.domListeners={},this.on("error",Uf.error)}emit(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Uf.log.call(Uf,...n),super.emit(...n)}handleDOM(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(this.domListeners[t.type]||[]).forEach(s=>{let{node:i,handler:l}=s;(t.target===i||i.contains(t.target))&&l(t,...r)})}listenDOM(t,n,r){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:n,handler:r})}}q(Y,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),q(Y,"sources",{API:"api",SILENT:"silent",USER:"user"});const Vf=so("quill:selection");class Pi{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=n}}class kN{constructor(t,n){this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Pi(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Y.sources.USER),1)}),this.emitter.on(Y.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(Y.events.SCROLL_UPDATE,(o,s)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const i=s.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(i?Y.sources.SILENT:o)}catch{}})}),this.emitter.on(Y.events.SCROLL_OPTIMIZE,(r,o)=>{if(o.range){const{startNode:s,startOffset:i,endNode:l,endOffset:a}=o.range;this.setNativeRange(s,i,l,a),this.update(Y.sources.SILENT)}}),this.update(Y.sources.SILENT)}handleComposition(){this.emitter.on(Y.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Y.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(Y.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,n){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(t,Q.BLOCK))){if(r.start.node!==this.cursor.textNode){const o=this.scroll.find(r.start.node,!1);if(o==null)return;if(o instanceof Bt){const s=o.split(r.start.offset);o.parent.insertBefore(this.cursor,s)}else o.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(t,n),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();t=Math.min(t,r-1),n=Math.min(t+n,r-1)-t;let o,[s,i]=this.scroll.leaf(t);if(s==null)return null;if(n>0&&i===s.length()){const[u]=this.scroll.leaf(t+1);if(u){const[d]=this.scroll.line(t),[h]=this.scroll.line(t+1);d===h&&(s=u,i=0)}}[o,i]=s.position(i,!0);const l=document.createRange();if(n>0)return l.setStart(o,i),[s,i]=this.scroll.leaf(t+n),s==null?null:([o,i]=s.position(i,!0),l.setEnd(o,i),l.getBoundingClientRect());let a="left",c;if(o instanceof Text){if(!o.data.length)return null;i<o.data.length?(l.setStart(o,i),l.setEnd(o,i+1)):(l.setStart(o,i-1),l.setEnd(o,i),a="right"),c=l.getBoundingClientRect()}else{if(!(s.domNode instanceof Element))return null;c=s.domNode.getBoundingClientRect(),i>0&&(a="right")}return{bottom:c.top+c.height,height:c.height,left:c[a],right:c[a],top:c.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const n=t.getRangeAt(0);if(n==null)return null;const r=this.normalizeNative(n);return Vf.info("getNativeRange",r),r}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const n=this.getNativeRange();return n==null?[null,null]:[this.normalizedToRange(n),n]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Wf(this.root,document.activeElement)}normalizedToRange(t){const n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);const r=n.map(i=>{const[l,a]=i,c=this.scroll.find(l,!0),u=c.offset(this.scroll);return a===0?u:c instanceof Bt?u+c.index(l,a):u+c.length()}),o=Math.min(Math.max(...r),this.scroll.length()-1),s=Math.min(o,...r);return new Pi(s,o-s)}normalizeNative(t){if(!Wf(this.root,t.startContainer)||!t.collapsed&&!Wf(this.root,t.endContainer))return null;const n={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[n.start,n.end].forEach(r=>{let{node:o,offset:s}=r;for(;!(o instanceof Text)&&o.childNodes.length>0;)if(o.childNodes.length>s)o=o.childNodes[s],s=0;else if(o.childNodes.length===s)o=o.lastChild,o instanceof Text?s=o.data.length:o.childNodes.length>0?s=o.childNodes.length:s=o.childNodes.length+1;else break;r.node=o,r.offset=s}),n}rangeToNative(t){const n=this.scroll.length(),r=(o,s)=>{o=Math.min(n-1,o);const[i,l]=this.scroll.leaf(o);return i?i.position(l,s):[null,-1]};return[...r(t.index,!1),...r(t.index+t.length,!0)]}setNativeRange(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Vf.info("setNativeRange",t,n,r,o),t!=null&&(this.root.parentNode==null||t.parentNode==null||r.parentNode==null))return;const i=document.getSelection();if(i!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:l}=this.getNativeRange()||{};if(l==null||s||t!==l.startContainer||n!==l.startOffset||r!==l.endContainer||o!==l.endOffset){t instanceof Element&&t.tagName==="BR"&&(n=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),r instanceof Element&&r.tagName==="BR"&&(o=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const a=document.createRange();a.setStart(t,n),a.setEnd(r,o),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur()}setRange(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Y.sources.API;if(typeof n=="string"&&(r=n,n=!1),Vf.info("setRange",t),t!=null){const o=this.rangeToNative(t);this.setNativeRange(...o,n)}else this.setNativeRange(null);this.update(r)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y.sources.USER;const n=this.lastRange,[r,o]=this.getRange();if(this.lastRange=r,this.lastNative=o,this.lastRange!=null&&(this.savedRange=this.lastRange),!l0(n,this.lastRange)){if(!this.composing&&o!=null&&o.native.collapsed&&o.start.node!==this.cursor.textNode){const i=this.cursor.restore();i&&this.setNativeRange(i.startNode,i.startOffset,i.endNode,i.endOffset)}const s=[Y.events.SELECTION_CHANGE,ki(this.lastRange),ki(n),t];this.emitter.emit(Y.events.EDITOR_CHANGE,...s),t!==Y.sources.SILENT&&this.emitter.emit(...s)}}}function Wf(e,t){try{t.parentNode}catch{return!1}return e.contains(t)}const TN=/^[ -~]*$/;class EN{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let n=this.scroll.length();this.scroll.batchStart();const r=mv(t),o=new X;return IN(r.ops.slice()).reduce((i,l)=>{const a=Nn.Op.length(l);let c=l.attributes||{},u=!1,d=!1;if(l.insert!=null){if(o.retain(a),typeof l.insert=="string"){const g=l.insert;d=!g.endsWith(`
`)&&(n<=i||!!this.scroll.descendant(Yn,i)[0]),this.scroll.insertAt(i,g);const[v,x]=this.scroll.line(i);let m=fs({},En(v));if(v instanceof hn){const[y]=v.descendant(Bt,x);y&&(m=fs(m,En(y)))}c=Nn.AttributeMap.diff(m,c)||{}}else if(typeof l.insert=="object"){const g=Object.keys(l.insert)[0];if(g==null)return i;const v=this.scroll.query(g,Q.INLINE)!=null;if(v)(n<=i||this.scroll.descendant(Yn,i)[0])&&(d=!0);else if(i>0){const[x,m]=this.scroll.descendant(Bt,i-1);x instanceof kr?x.value()[m]!==`
`&&(u=!0):x instanceof On&&x.statics.scope===Q.INLINE_BLOT&&(u=!0)}if(this.scroll.insertAt(i,g,l.insert[g]),v){const[x]=this.scroll.descendant(Bt,i);if(x){const m=fs({},En(x));c=Nn.AttributeMap.diff(m,c)||{}}}}n+=a}else if(o.push(l),l.retain!==null&&typeof l.retain=="object"){const g=Object.keys(l.retain)[0];if(g==null)return i;this.scroll.updateEmbedAt(i,g,l.retain[g])}Object.keys(c).forEach(g=>{this.scroll.formatAt(i,a,g,c[g])});const h=u?1:0,p=d?1:0;return n+=h+p,o.retain(h),o.delete(p),i+a+h+p},0),o.reduce((i,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(i,l.delete),i):i+Nn.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,n){return this.scroll.deleteAt(t,n),this.update(new X().retain(t).delete(n))}formatLine(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(s=>{this.scroll.lines(t,Math.max(n,1)).forEach(i=>{i.format(s,r[s])})}),this.scroll.optimize();const o=new X().retain(t).retain(n,ki(r));return this.update(o)}formatText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(s=>{this.scroll.formatAt(t,n,s,r[s])});const o=new X().retain(t).retain(n,ki(r));return this.update(o)}getContents(t,n){return this.delta.slice(t,t+n)}getDelta(){return this.scroll.lines().reduce((t,n)=>t.concat(n.delta()),new X)}getFormat(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],o=[];n===0?this.scroll.path(t).forEach(l=>{const[a]=l;a instanceof hn?r.push(a):a instanceof Bt&&o.push(a)}):(r=this.scroll.lines(t,n),o=this.scroll.descendants(Bt,t,n));const[s,i]=[r,o].map(l=>{const a=l.shift();if(a==null)return{};let c=En(a);for(;Object.keys(c).length>0;){const u=l.shift();if(u==null)return c;c=CN(En(u),c)}return c});return{...s,...i}}getHTML(t,n){const[r,o]=this.scroll.line(t);if(r){const s=r.length();return r.length()>=o+n&&!(o===0&&n===s)?fa(r,o,n,!0):fa(this.scroll,t,n,!0)}return""}getText(t,n){return this.getContents(t,n).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(t,n){const r=mv(n),o=new X().retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(o)}insertEmbed(t,n,r){return this.scroll.insertAt(t,n,r),this.update(new X().retain(t).insert({[n]:r}))}insertText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n=n.replace(/\r\n/g,`
`).replace(/\r/g,`
`),this.scroll.insertAt(t,n),Object.keys(r).forEach(o=>{this.scroll.formatAt(t,n.length,o,r[o])}),this.update(new X().retain(t).insert(n,ki(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if((t==null?void 0:t.statics.blotName)!==hn.blotName)return!1;const n=t;return n.children.length>1?!1:n.children.head instanceof Cr}removeFormat(t,n){const r=this.getText(t,n),[o,s]=this.scroll.line(t+n);let i=0,l=new X;o!=null&&(i=o.length()-s,l=o.delta().slice(s,s+i-1).insert(`
`));const c=this.getContents(t,n+i).diff(new X().insert(r).concat(l)),u=new X().retain(t).concat(c);return this.applyDelta(u)}update(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const o=this.delta;if(n.length===1&&n[0].type==="characterData"&&n[0].target.data.match(TN)&&this.scroll.find(n[0].target)){const s=this.scroll.find(n[0].target),i=En(s),l=s.offset(this.scroll),a=n[0].oldValue.replace(da.CONTENTS,""),c=new X().insert(a),u=new X().insert(s.value()),d=r&&{oldRange:vv(r.oldRange,-l),newRange:vv(r.newRange,-l)};t=new X().retain(l).concat(c.diff(u,d)).reduce((p,g)=>g.insert?p.insert(g.insert,i):p.push(g),new X),this.delta=o.compose(t)}else this.delta=this.getDelta(),(!t||!l0(o.compose(t),this.delta))&&(t=o.diff(this.delta,r));return t}}function ei(e,t,n){if(e.length===0){const[p]=Gf(n.pop());return t<=0?`</li></${p}>`:`</li></${p}>${ei([],t-1,n)}`}const[{child:r,offset:o,length:s,indent:i,type:l},...a]=e,[c,u]=Gf(l);if(i>t)return n.push(l),i===t+1?`<${c}><li${u}>${fa(r,o,s)}${ei(a,i,n)}`:`<${c}><li>${ei(e,t+1,n)}`;const d=n[n.length-1];if(i===t&&l===d)return`</li><li${u}>${fa(r,o,s)}${ei(a,i,n)}`;const[h]=Gf(n.pop());return`</li></${h}>${ei(e,t-1,n)}`}function fa(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in e&&typeof e.html=="function")return e.html(t,n);if(e instanceof kr)return w4(e.value().slice(t,t+n)).replaceAll(" "," ");if(e instanceof Jn){if(e.statics.blotName==="list-container"){const c=[];return e.children.forEachAt(t,n,(u,d,h)=>{const p="formats"in u&&typeof u.formats=="function"?u.formats():{};c.push({child:u,offset:d,length:h,indent:p.indent||0,type:p.list})}),ei(c,-1,[])}const o=[];if(e.children.forEachAt(t,n,(c,u,d)=>{o.push(fa(c,u,d))}),r||e.statics.blotName==="list")return o.join("");const{outerHTML:s,innerHTML:i}=e.domNode,[l,a]=s.split(`>${i}<`);return l==="<table"?`<table style="border: 1px solid #000;">${o.join("")}<${a}`:`${l}>${o.join("")}<${a}`}return e.domNode instanceof Element?e.domNode.outerHTML:""}function CN(e,t){return Object.keys(t).reduce((n,r)=>{if(e[r]==null)return n;const o=t[r];return o===e[r]?n[r]=o:Array.isArray(o)?o.indexOf(e[r])<0?n[r]=o.concat([e[r]]):n[r]=o:n[r]=[o,e[r]],n},{})}function Gf(e){const t=e==="ordered"?"ol":"ul";switch(e){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function mv(e){return e.reduce((t,n)=>{if(typeof n.insert=="string"){const r=n.insert.replace(/\r\n/g,`
`).replace(/\r/g,`
`);return t.insert(r,n.attributes)}return t.push(n)},new X)}function vv(e,t){let{index:n,length:r}=e;return new Pi(n+t,r)}function IN(e){const t=[];return e.forEach(n=>{typeof n.insert=="string"?n.insert.split(`
`).forEach((o,s)=>{s&&t.push({insert:`
`,attributes:n.attributes}),o&&t.push({insert:o,attributes:n.attributes})}):t.push(n)}),t}class io{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=n}}q(io,"DEFAULTS",{});const mc="\uFEFF";class S4 extends On{constructor(t,n){super(t,n),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(mc),this.rightGuard=document.createTextNode(mc),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,n)}restore(t){let n=null,r;const o=t.data.split(mc).join("");if(t===this.leftGuard)if(this.prev instanceof kr){const s=this.prev.length();this.prev.insertAt(s,o),n={startNode:this.prev.domNode,startOffset:s+o.length}}else r=document.createTextNode(o),this.parent.insertBefore(this.scroll.create(r),this),n={startNode:r,startOffset:o.length};else t===this.rightGuard&&(this.next instanceof kr?(this.next.insertAt(0,o),n={startNode:this.next.domNode,startOffset:o.length}):(r=document.createTextNode(o),this.parent.insertBefore(this.scroll.create(r),this.next),n={startNode:r,startOffset:o.length}));return t.data=mc,n}update(t,n){t.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const o=this.restore(r.target);o&&(n.range=o)}})}}class NN{constructor(t,n){q(this,"isComposing",!1);this.scroll=t,this.emitter=n,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const n=t.target instanceof Node?this.scroll.find(t.target,!0):null;n&&!(n instanceof S4)&&(this.emitter.emit(Y.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(Y.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(Y.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(Y.events.COMPOSITION_END,t),this.isComposing=!1}}const zl=class zl{constructor(t,n){q(this,"modules",{});this.quill=t,this.options=n}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const n=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new n(this.quill,this.options.modules[t]||{}),this.modules[t]}};q(zl,"DEFAULTS",{modules:{}}),q(zl,"themes",{default:zl});let zi=zl;const AN=e=>e.parentElement||e.getRootNode().host||null,jN=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},vc=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},yv=(e,t,n,r,o,s)=>e<n&&t>r?0:e<n?-(n-e+o):t>r?t-e>r-n?e+o-n:t-r+s:0,RN=(e,t)=>{var s,i,l;const n=e.ownerDocument;let r=t,o=e;for(;o;){const a=o===n.body,c=a?{top:0,right:((s=window.visualViewport)==null?void 0:s.width)??n.documentElement.clientWidth,bottom:((i=window.visualViewport)==null?void 0:i.height)??n.documentElement.clientHeight,left:0}:jN(o),u=getComputedStyle(o),d=yv(r.left,r.right,c.left,c.right,vc(u.scrollPaddingLeft),vc(u.scrollPaddingRight)),h=yv(r.top,r.bottom,c.top,c.bottom,vc(u.scrollPaddingTop),vc(u.scrollPaddingBottom));if(d||h)if(a)(l=n.defaultView)==null||l.scrollBy(d,h);else{const{scrollLeft:p,scrollTop:g}=o;h&&(o.scrollTop+=h),d&&(o.scrollLeft+=d);const v=o.scrollLeft-p,x=o.scrollTop-g;r={left:r.left-v,top:r.top-x,right:r.right-v,bottom:r.bottom-x}}o=a||u.position==="fixed"?null:AN(o)}},LN=100,_N=["block","break","cursor","inline","scroll","text"],ON=(e,t,n)=>{const r=new Bi;return _N.forEach(o=>{const s=t.query(o);s&&r.register(s)}),e.forEach(o=>{let s=t.query(o);s||n.error(`Cannot register "${o}" specified in "formats" config. Are you sure it was registered?`);let i=0;for(;s;)if(r.register(s),s="blotName"in s?s.requiredContainer??null:null,i+=1,i>LN){n.error(`Cycle detected in registering blot requiredContainer: "${o}"`);break}}),r},Ei=so("quill"),yc=new Bi;Jn.uiClass="ql-ui";const Fn=class Fn{static debug(t){t===!0&&(t="log"),so.level(t)}static find(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Lp.get(t)||yc.find(t,n)}static import(t){return this.imports[t]==null&&Ei.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],n=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in t?t.attrName:t.blotName;typeof r=="string"?this.register(`formats/${r}`,t,n):Object.keys(t).forEach(o=>{this.register(o,t[o],n)})}else{const t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!r&&Ei.warn(`Overwriting ${t} with`,n),this.imports[t]=n,(t.startsWith("blots/")||t.startsWith("formats/"))&&n&&typeof n!="boolean"&&n.blotName!=="abstract"&&yc.register(n),typeof n.register=="function"&&n.register(yc)}}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=MN(t,n),this.container=this.options.container,this.container==null){Ei.error("Invalid Quill container",t);return}this.options.debug&&Fn.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Lp.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Y;const o=c0.blotName,s=this.options.registry.query(o);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${o}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new EN(this.scroll),this.selection=new kN(this.scroll,this.emitter),this.composition=new NN(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Y.events.EDITOR_CHANGE,i=>{i===Y.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Y.events.SCROLL_UPDATE,(i,l)=>{const a=this.selection.lastRange,[c]=this.selection.getRange(),u=a&&c?{oldRange:a,newRange:c}:void 0;$n.call(this,()=>this.editor.update(null,l,u),i)}),this.emitter.on(Y.events.SCROLL_EMBED_UPDATE,(i,l)=>{const a=this.selection.lastRange,[c]=this.selection.getRange(),u=a&&c?{oldRange:a,newRange:c}:void 0;$n.call(this,()=>{const d=new X().retain(i.offset(this)).retain({[i.statics.blotName]:l});return this.editor.update(d,[],u)},Fn.sources.USER)}),r){const i=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
`});this.setContents(i)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const r=t;t=document.createElement("div"),t.classList.add(r)}return this.container.insertBefore(t,n),t}blur(){this.selection.setRange(null)}deleteText(t,n,r){return[t,n,,r]=Br(t,n,r),$n.call(this,()=>this.editor.deleteText(t,n),r,t,-1*n)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const n=t();return this.allowReadOnlyEdits=!1,n}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Y.sources.API;return $n.call(this,()=>{const o=this.getSelection(!0);let s=new X;if(o==null)return s;if(this.scroll.query(t,Q.BLOCK))s=this.editor.formatLine(o.index,o.length,{[t]:n});else{if(o.length===0)return this.selection.format(t,n),s;s=this.editor.formatText(o.index,o.length,{[t]:n})}return this.setSelection(o,Y.sources.SILENT),s},r)}formatLine(t,n,r,o,s){let i;return[t,n,i,s]=Br(t,n,r,o,s),$n.call(this,()=>this.editor.formatLine(t,n,i),s,t,0)}formatText(t,n,r,o,s){let i;return[t,n,i,s]=Br(t,n,r,o,s),$n.call(this,()=>this.editor.formatText(t,n,i),s,t,0)}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof t=="number"?r=this.selection.getBounds(t,n):r=this.selection.getBounds(t.index,t.length),!r)return null;const o=this.container.getBoundingClientRect();return{bottom:r.bottom-o.top,height:r.height,left:r.left-o.left,right:r.right-o.left,top:r.top-o.top,width:r.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,n]=Br(t,n),this.editor.getContents(t,n)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,n):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,n)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=Br(t,n),this.editor.getHTML(t,n)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=Br(t,n),this.editor.getText(t,n)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Fn.sources.API;return $n.call(this,()=>this.editor.insertEmbed(t,n,r),o,t)}insertText(t,n,r,o,s){let i;return[t,,i,s]=Br(t,0,r,o,s),$n.call(this,()=>this.editor.insertText(t,n,i),s,t,n.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,n,r){return[t,n,,r]=Br(t,n,r),$n.call(this,()=>this.editor.removeFormat(t,n),r,t)}scrollRectIntoView(t){RN(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,n=t&&this.selection.getBounds(t.index,t.length);n&&this.scrollRectIntoView(n)}setContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.sources.API;return $n.call(this,()=>{t=new X(t);const r=this.getLength(),o=this.editor.deleteText(0,r),s=this.editor.insertContents(0,t),i=this.editor.deleteText(this.getLength()-1,1);return o.compose(s).compose(i)},n)}setSelection(t,n,r){t==null?this.selection.setRange(null,n||Fn.sources.API):([t,n,,r]=Br(t,n,r),this.selection.setRange(new Pi(Math.max(0,t),n),r),r!==Y.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.sources.API;const r=new X().insert(t);return this.setContents(r,n)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y.sources.USER;const n=this.scroll.update(t);return this.selection.update(t),n}updateContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.sources.API;return $n.call(this,()=>(t=new X(t),this.editor.applyDelta(t)),n,!0)}};q(Fn,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:yc,theme:"default"}),q(Fn,"events",Y.events),q(Fn,"sources",Y.sources),q(Fn,"version","2.0.3"),q(Fn,"imports",{delta:X,parchment:oN,"core/module":io,"core/theme":zi});let P=Fn;function wv(e){return typeof e=="string"?document.querySelector(e):e}function Kf(e){return Object.entries(e??{}).reduce((t,n)=>{let[r,o]=n;return{...t,[r]:o===!0?{}:o}},{})}function bv(e){return Object.fromEntries(Object.entries(e).filter(t=>t[1]!==void 0))}function MN(e,t){const n=wv(e);if(!n)throw new Error("Invalid Quill container");const o=!t.theme||t.theme===P.DEFAULTS.theme?zi:P.import(`themes/${t.theme}`);if(!o)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:s,...i}=P.DEFAULTS,{modules:l,...a}=o.DEFAULTS;let c=Kf(t.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=fs({},Kf(s),Kf(l),c),d={...i,...bv(a),...bv(t)};let h=t.registry;return h?t.formats&&Ei.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?ON(t.formats,d.registry,Ei):d.registry,{...d,registry:h,container:n,theme:o,modules:Object.entries(u).reduce((p,g)=>{let[v,x]=g;if(!x)return p;const m=P.import(`modules/${v}`);return m==null?(Ei.error(`Cannot load ${v} module. Are you sure you registered it?`),p):{...p,[v]:fs({},m.DEFAULTS||{},x)}},{}),bounds:wv(d.bounds)}}function $n(e,t,n,r){if(!this.isEnabled()&&t===Y.sources.USER&&!this.allowReadOnlyEdits)return new X;let o=n==null?null:this.getSelection();const s=this.editor.delta,i=e();if(o!=null&&(n===!0&&(n=o.index),r==null?o=xv(o,i,t):r!==0&&(o=xv(o,n,r,t)),this.setSelection(o,Y.sources.SILENT)),i.length()>0){const l=[Y.events.TEXT_CHANGE,i,s,t];this.emitter.emit(Y.events.EDITOR_CHANGE,...l),t!==Y.sources.SILENT&&this.emitter.emit(...l)}return i}function Br(e,t,n,r,o){let s={};return typeof e.index=="number"&&typeof e.length=="number"?typeof t!="number"?(o=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):typeof t!="number"&&(o=r,r=n,n=t,t=0),typeof n=="object"?(s=n,o=r):typeof n=="string"&&(r!=null?s[n]=r:o=n),o=o||Y.sources.API,[e,t,s,o]}function xv(e,t,n,r){const o=typeof n=="number"?n:0;if(e==null)return null;let s,i;return t&&typeof t.transformPosition=="function"?[s,i]=[e.index,e.index+e.length].map(l=>t.transformPosition(l,r!==Y.sources.USER)):[s,i]=[e.index,e.index+e.length].map(l=>l<t||l===t&&r===Y.sources.USER?l:o>=0?l+o:Math.max(t,l+o)),new Pi(s,i-s)}class p0 extends sd{}function Sv(e){return e instanceof hn||e instanceof Yn}function kv(e){return typeof e.updateContent=="function"}class ti extends c0{constructor(t,n,r){let{emitter:o}=r;super(t,n),this.emitter=o,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",s=>this.handleDragStart(s))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(Y.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(Y.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,n){this.emitter.emit(Y.events.SCROLL_EMBED_UPDATE,t,n)}deleteAt(t,n){const[r,o]=this.line(t),[s]=this.line(t+n);if(super.deleteAt(t,n),s!=null&&r!==s&&o>0){if(r instanceof Yn||s instanceof Yn){this.optimize();return}const i=s.children.head instanceof Cr?null:s.children.head;r.moveChildren(s,i),r.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,n,r,o){super.formatAt(t,n,r,o),this.optimize()}insertAt(t,n,r){if(t>=this.length())if(r==null||this.scroll.query(n,Q.BLOCK)==null){const o=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(o),r==null&&n.endsWith(`
`)?o.insertAt(0,n.slice(0,-1),r):o.insertAt(0,n,r)}else{const o=this.scroll.create(n,r);this.appendChild(o)}else super.insertAt(t,n,r);this.optimize()}insertBefore(t,n){if(t.statics.scope===Q.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,n)}else super.insertBefore(t,n)}insertContents(t,n){const r=this.deltaToRenderBlocks(n.concat(new X().insert(`
`))),o=r.pop();if(o==null)return;this.batchStart();const s=r.shift();if(s){const a=s.type==="block"&&(s.delta.length()===0||!this.descendant(Yn,t)[0]&&t<this.length()),c=s.type==="block"?s.delta:new X().insert({[s.key]:s.value});Yf(this,t,c);const u=s.type==="block"?1:0,d=t+c.length()+u;a&&this.insertAt(d-1,`
`);const h=En(this.line(t)[0]),p=Nn.AttributeMap.diff(h,s.attributes)||{};Object.keys(p).forEach(g=>{this.formatAt(d-1,1,g,p[g])}),t=d}let[i,l]=this.children.find(t);if(r.length&&(i&&(i=i.split(l),l=0),r.forEach(a=>{if(a.type==="block"){const c=this.createBlock(a.attributes,i||void 0);Yf(c,0,a.delta)}else{const c=this.create(a.key,a.value);this.insertBefore(c,i||void 0),Object.keys(a.attributes).forEach(u=>{c.format(u,a.attributes[u])})}})),o.type==="block"&&o.delta.length()){const a=i?i.offset(i.scroll)+l:this.length();Yf(this,a,o.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const n=this.path(t).pop();if(!n)return[null,-1];const[r,o]=n;return r instanceof Bt?[r,o]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(Sv,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(o,s,i)=>{let l=[],a=i;return o.children.forEachAt(s,i,(c,u,d)=>{Sv(c)?l.push(c):c instanceof sd&&(l=l.concat(r(c,u,a))),a-=d}),l};return r(this,t,n)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,n),t.length>0&&this.emitter.emit(Y.events.SCROLL_OPTIMIZE,t,n))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let n=Y.sources.USER;typeof t=="string"&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(r=>{let{target:o}=r;const s=this.find(o,!0);return s&&!kv(s)}),t.length>0&&this.emitter.emit(Y.events.SCROLL_BEFORE_UPDATE,n,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(Y.events.SCROLL_UPDATE,n,t)}updateEmbedAt(t,n,r){const[o]=this.descendant(s=>s instanceof Yn,t);o&&o.statics.blotName===n&&kv(o)&&o.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const n=[];let r=new X;return t.forEach(o=>{const s=o==null?void 0:o.insert;if(s)if(typeof s=="string"){const i=s.split(`
`);i.slice(0,-1).forEach(a=>{r.insert(a,o.attributes),n.push({type:"block",delta:r,attributes:o.attributes??{}}),r=new X});const l=i[i.length-1];l&&r.insert(l,o.attributes)}else{const i=Object.keys(s)[0];if(!i)return;this.query(i,Q.INLINE)?r.push(o):(r.length()&&n.push({type:"block",delta:r,attributes:{}}),r=new X,n.push({type:"blockEmbed",key:i,value:s[i],attributes:o.attributes??{}}))}}),r.length()&&n.push({type:"block",delta:r,attributes:{}}),n}createBlock(t,n){let r;const o={};Object.entries(t).forEach(l=>{let[a,c]=l;this.query(a,Q.BLOCK&Q.BLOT)!=null?r=a:o[a]=c});const s=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(s,n||void 0);const i=s.length();return Object.entries(o).forEach(l=>{let[a,c]=l;s.formatAt(0,i,a,c)}),s}}q(ti,"blotName","scroll"),q(ti,"className","ql-editor"),q(ti,"tagName","DIV"),q(ti,"defaultChild",hn),q(ti,"allowedChildren",[hn,Yn,p0]);function Yf(e,t,n){n.reduce((r,o)=>{const s=Nn.Op.length(o);let i=o.attributes||{};if(o.insert!=null){if(typeof o.insert=="string"){const l=o.insert;e.insertAt(r,l);const[a]=e.descendant(Bt,r),c=En(a);i=Nn.AttributeMap.diff(c,i)||{}}else if(typeof o.insert=="object"){const l=Object.keys(o.insert)[0];if(l==null)return r;if(e.insertAt(r,l,o.insert[l]),e.scroll.query(l,Q.INLINE)!=null){const[c]=e.descendant(Bt,r),u=En(c);i=Nn.AttributeMap.diff(u,i)||{}}}}return Object.keys(i).forEach(l=>{e.formatAt(r,s,l,i[l])}),r+s},t)}const g0={scope:Q.BLOCK,whitelist:["right","center","justify"]},BN=new Sr("align","align",g0);new oo("align","ql-align",g0);const k4=new Fo("align","text-align",g0);class T4 extends Fo{value(t){let n=super.value(t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${n.split(",").map(o=>`00${parseInt(o,10).toString(16)}`.slice(-2)).join("")}`):n}}new oo("color","ql-color",{scope:Q.INLINE});const PN=new T4("color","color",{scope:Q.INLINE});new oo("background","ql-bg",{scope:Q.INLINE});const zN=new T4("background","background-color",{scope:Q.INLINE});class Wi extends p0{static create(t){const n=super.create(t);return n.setAttribute("spellcheck","false"),n}code(t,n){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
`).slice(t,t+n)}html(t,n){return`<pre>
${w4(this.code(t,n))}
</pre>`}}class br extends hn{static register(){P.register(Wi)}}q(br,"TAB"," ");class E4 extends to{}E4.blotName="code";E4.tagName="CODE";br.blotName="code-block";br.className="ql-code-block";br.tagName="DIV";Wi.blotName="code-block-container";Wi.className="ql-code-block-container";Wi.tagName="DIV";Wi.allowedChildren=[br];br.allowedChildren=[kr,Cr,da];br.requiredContainer=Wi;const m0={scope:Q.BLOCK,whitelist:["rtl"]},DN=new Sr("direction","dir",m0);new oo("direction","ql-direction",m0);const HN=new Fo("direction","direction",m0),C4={scope:Q.INLINE,whitelist:["serif","monospace"]};new oo("font","ql-font",C4);class $N extends Fo{value(t){return super.value(t).replace(/["']/g,"")}}const qN=new $N("font","font-family",C4);new oo("size","ql-size",{scope:Q.INLINE,whitelist:["small","large","huge"]});const FN=new Fo("size","font-size",{scope:Q.INLINE,whitelist:["10px","18px","32px"]}),UN=so("quill:keyboard"),VN=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class cd extends io{static match(t,n){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!n[r]!==t[r]&&n[r]!==null)?!1:n.key===t.key||n.key===t.which}constructor(t,n){super(t,n),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=GN(t);if(o==null){UN.warn("Attempted to add invalid keyboard binding",o);return}typeof n=="function"&&(n={handler:n}),typeof r=="function"&&(r={handler:r}),(Array.isArray(o.key)?o.key:[o.key]).forEach(i=>{const l={...o,key:i,...n,...r};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const o=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(m=>cd.match(t,m));if(o.length===0)return;const s=P.find(t.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const i=this.quill.getSelection();if(i==null||!this.quill.hasFocus())return;const[l,a]=this.quill.getLine(i.index),[c,u]=this.quill.getLeaf(i.index),[d,h]=i.length===0?[c,u]:this.quill.getLeaf(i.index+i.length),p=c instanceof Eu?c.value().slice(0,u):"",g=d instanceof Eu?d.value().slice(h):"",v={collapsed:i.length===0,empty:i.length===0&&l.length()<=1,format:this.quill.getFormat(i),line:l,offset:a,prefix:p,suffix:g,event:t};o.some(m=>{if(m.collapsed!=null&&m.collapsed!==v.collapsed||m.empty!=null&&m.empty!==v.empty||m.offset!=null&&m.offset!==v.offset)return!1;if(Array.isArray(m.format)){if(m.format.every(y=>v.format[y]==null))return!1}else if(typeof m.format=="object"&&!Object.keys(m.format).every(y=>m.format[y]===!0?v.format[y]!=null:m.format[y]===!1?v.format[y]==null:l0(m.format[y],v.format[y])))return!1;return m.prefix!=null&&!m.prefix.test(v.prefix)||m.suffix!=null&&!m.suffix.test(v.suffix)?!1:m.handler.call(this,i,v,m)!==!0})&&t.preventDefault()})}handleBackspace(t,n){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let o={};const[s]=this.quill.getLine(t.index);let i=new X().retain(t.index-r).delete(r);if(n.offset===0){const[l]=this.quill.getLine(t.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){const c=s.formats(),u=this.quill.getFormat(t.index-1,1);if(o=Nn.AttributeMap.diff(c,u)||{},Object.keys(o).length>0){const d=new X().retain(t.index+s.length()-2).retain(1,o);i=i.compose(d)}}}this.quill.updateContents(i,P.sources.USER),this.quill.focus()}handleDelete(t,n){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(n.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let o={};const[s]=this.quill.getLine(t.index);let i=new X().retain(t.index).delete(r);if(n.offset>=s.length()-1){const[l]=this.quill.getLine(t.index+1);if(l){const a=s.formats(),c=this.quill.getFormat(t.index,1);o=Nn.AttributeMap.diff(a,c)||{},Object.keys(o).length>0&&(i=i.retain(l.length()-1).retain(1,o))}}this.quill.updateContents(i,P.sources.USER),this.quill.focus()}handleDeleteRange(t){v0({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,n){const r=Object.keys(n.format).reduce((s,i)=>(this.quill.scroll.query(i,Q.BLOCK)&&!Array.isArray(n.format[i])&&(s[i]=n.format[i]),s),{}),o=new X().retain(t.index).delete(t.length).insert(`
`,r);this.quill.updateContents(o,P.sources.USER),this.quill.setSelection(t.index+1,P.sources.SILENT),this.quill.focus()}}const WN={bindings:{bold:Zf("bold"),italic:Zf("italic"),underline:Zf("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",P.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",P.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){t.format.indent!=null?this.quill.format("indent","-1",P.sources.USER):t.format.list!=null&&this.quill.format("list",!1,P.sources.USER)}},"indent code-block":Tv(!0),"outdent code-block":Tv(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,P.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();const n=new X().retain(e.index).delete(e.length).insert(" ");return this.quill.updateContents(n,P.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,P.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,P.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){const n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,P.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(e){const[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:"checked"},o=new X().retain(e.index).insert(`
`,r).retain(t.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,P.sources.USER),this.quill.setSelection(e.index+1,P.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){const[n,r]=this.quill.getLine(e.index),o=new X().retain(e.index).insert(`
`,t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(o,P.sources.USER),this.quill.setSelection(e.index+1,P.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(e){const t=this.quill.getModule("table");if(t){const[n,r,o,s]=t.getTable(e),i=KN(n,r,o,s);if(i==null)return;let l=n.offset();if(i<0){const a=new X().retain(l).insert(`
`);this.quill.updateContents(a,P.sources.USER),this.quill.setSelection(e.index+1,e.length,P.sources.SILENT)}else if(i>0){l+=n.length();const a=new X().retain(l).insert(`
`);this.quill.updateContents(a,P.sources.USER),this.quill.setSelection(l,P.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,o=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(o-1,P.sources.USER):this.quill.setSelection(o+r.length(),P.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(this.quill.scroll.query("list")==null)return!0;const{length:n}=t.prefix,[r,o]=this.quill.getLine(e.index);if(o>n)return!0;let s;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",P.sources.USER),this.quill.history.cutoff();const i=new X().retain(e.index-o).delete(n+1).retain(r.length()-2-o).retain(1,{list:s});return this.quill.updateContents(i,P.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,P.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,o=t;for(;o!=null&&o.length()<=1&&o.formats()["code-block"];)if(o=o.prev,r-=1,r<=0){const s=new X().retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,P.sources.USER),this.quill.setSelection(e.index-1,P.sources.SILENT),!1}return!0}},"embed left":wc("ArrowLeft",!1),"embed left shift":wc("ArrowLeft",!0),"embed right":wc("ArrowRight",!1),"embed right shift":wc("ArrowRight",!0),"table down":Ev(!1),"table up":Ev(!0)}};cd.DEFAULTS=WN;function Tv(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const o=this.quill.scroll.query("code-block"),{TAB:s}=o;if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,s,P.sources.USER),this.quill.setSelection(t.index+s.length,P.sources.SILENT);return}const i=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:l,length:a}=t;i.forEach((c,u)=>{e?(c.insertAt(0,s),u===0?l+=s.length:a+=s.length):c.domNode.textContent.startsWith(s)&&(c.deleteAt(0,s.length),u===0?l-=s.length:a-=s.length)}),this.quill.update(P.sources.USER),this.quill.setSelection(l,a,P.sources.SILENT)}}}function wc(e,t){return{key:e,shiftKey:t,altKey:null,[e==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:o}=r;e==="ArrowRight"&&(o+=r.length+1);const[s]=this.quill.getLeaf(o);return s instanceof On?(e==="ArrowLeft"?t?this.quill.setSelection(r.index-1,r.length+1,P.sources.USER):this.quill.setSelection(r.index-1,P.sources.USER):t?this.quill.setSelection(r.index,r.length+1,P.sources.USER):this.quill.setSelection(r.index+r.length+1,P.sources.USER),!1):!0}}}function Zf(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],P.sources.USER)}}}function Ev(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",o=n.line,s=o.parent[r];if(s!=null){if(s.statics.blotName==="table-row"){let i=s.children.head,l=o;for(;l.prev!=null;)l=l.prev,i=i.next;const a=i.offset(this.quill.scroll)+Math.min(n.offset,i.length()-1);this.quill.setSelection(a,0,P.sources.USER)}}else{const i=o.table()[r];i!=null&&(e?this.quill.setSelection(i.offset(this.quill.scroll)+i.length()-1,0,P.sources.USER):this.quill.setSelection(i.offset(this.quill.scroll),0,P.sources.USER))}return!1}}}function GN(e){if(typeof e=="string"||typeof e=="number")e={key:e};else if(typeof e=="object")e=ki(e);else return null;return e.shortKey&&(e[VN]=e.shortKey,delete e.shortKey),e}function v0(e){let{quill:t,range:n}=e;const r=t.getLines(n);let o={};if(r.length>1){const s=r[0].formats(),i=r[r.length-1].formats();o=Nn.AttributeMap.diff(i,s)||{}}t.deleteText(n,P.sources.USER),Object.keys(o).length>0&&t.formatLine(n.index,1,o,P.sources.USER),t.setSelection(n.index,P.sources.SILENT)}function KN(e,t,n,r){return t.prev==null&&t.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const YN=/font-weight:\s*normal/,ZN=["P","OL","UL"],Cv=e=>e&&ZN.includes(e.tagName),QN=e=>{Array.from(e.querySelectorAll("br")).filter(t=>Cv(t.previousElementSibling)&&Cv(t.nextElementSibling)).forEach(t=>{var n;(n=t.parentNode)==null||n.removeChild(t)})},XN=e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter(t=>{var n;return(n=t.getAttribute("style"))==null?void 0:n.match(YN)}).forEach(t=>{var r;const n=e.createDocumentFragment();n.append(...t.childNodes),(r=t.parentNode)==null||r.replaceChild(n,t)})};function JN(e){e.querySelector('[id^="docs-internal-guid-"]')&&(XN(e),QN(e))}const eA=/\bmso-list:[^;]*ignore/i,tA=/\bmso-list:[^;]*\bl(\d+)/i,nA=/\bmso-list:[^;]*\blevel(\d+)/i,rA=(e,t)=>{const n=e.getAttribute("style"),r=n==null?void 0:n.match(tA);if(!r)return null;const o=Number(r[1]),s=n==null?void 0:n.match(nA),i=s?Number(s[1]):1,l=new RegExp(`@list l${o}:level${i}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),a=t.match(l),c=a&&a[1]==="bullet"?"bullet":"ordered";return{id:o,indent:i,type:c,element:e}},oA=e=>{var i,l;const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach(a=>{(a.getAttribute("style")||"").match(eA)?n.push(a):r.push(a)}),n.forEach(a=>{var c;return(c=a.parentNode)==null?void 0:c.removeChild(a)});const o=e.documentElement.innerHTML,s=r.map(a=>rA(a,o)).filter(a=>a);for(;s.length;){const a=[];let c=s.shift();for(;c;)a.push(c),c=s.length&&((i=s[0])==null?void 0:i.element)===c.element.nextElementSibling&&s[0].id===c.id?s.shift():null;const u=document.createElement("ul");a.forEach(p=>{const g=document.createElement("li");g.setAttribute("data-list",p.type),p.indent>1&&g.setAttribute("class",`ql-indent-${p.indent-1}`),g.innerHTML=p.element.innerHTML,u.appendChild(g)});const d=(l=a[0])==null?void 0:l.element,{parentNode:h}=d??{};d&&(h==null||h.replaceChild(u,d)),a.slice(1).forEach(p=>{let{element:g}=p;h==null||h.removeChild(g)})}};function sA(e){e.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&oA(e)}const iA=[sA,JN],lA=e=>{e.documentElement&&iA.forEach(t=>{t(e)})},aA=so("quill:clipboard"),cA=[[Node.TEXT_NODE,xA],[Node.TEXT_NODE,Nv],["br",pA],[Node.ELEMENT_NODE,Nv],[Node.ELEMENT_NODE,hA],[Node.ELEMENT_NODE,fA],[Node.ELEMENT_NODE,wA],["li",vA],["ol, ul",yA],["pre",gA],["tr",bA],["b",Qf("bold")],["i",Qf("italic")],["strike",Qf("strike")],["style",mA]],uA=[BN,DN].reduce((e,t)=>(e[t.keyName]=t,e),{}),Iv=[k4,zN,PN,HN,qN,FN].reduce((e,t)=>(e[t.keyName]=t,e),{});class I4 extends io{constructor(t,n){super(t,n),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],cA.concat(this.options.matchers??[]).forEach(r=>{let[o,s]=r;this.addMatcher(o,s)})}addMatcher(t,n){this.matchers.push([t,n])}convert(t){let{html:n,text:r}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(o[br.blotName])return new X().insert(r||"",{[br.blotName]:o[br.blotName]});if(!n)return new X().insert(r||"",o);const s=this.convertHTML(n);return Ia(s,`
`)&&(s.ops[s.ops.length-1].attributes==null||o.table)?s.compose(new X().retain(s.length()-1).delete(1)):s}normalizeHTML(t){lA(t)}convertHTML(t){const n=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(n);const r=n.body,o=new WeakMap,[s,i]=this.prepareMatching(r,o);return A4(this.quill.scroll,r,s,i,o)}dangerouslyPasteHTML(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:P.sources.API;if(typeof t=="string"){const o=this.convert({html:t,text:""});this.quill.setContents(o,n),this.quill.setSelection(0,P.sources.SILENT)}else{const o=this.convert({html:n,text:""});this.quill.updateContents(new X().retain(t).concat(o),r),this.quill.setSelection(t+o.length(),P.sources.SILENT)}}onCaptureCopy(t){var i,l;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:o,text:s}=this.onCopy(r,n);(i=t.clipboardData)==null||i.setData("text/plain",s),(l=t.clipboardData)==null||l.setData("text/html",o),n&&v0({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(n=>n[0]!=="#").join(`
`)}onCapturePaste(t){var i,l,a,c,u;if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const n=this.quill.getSelection(!0);if(n==null)return;const r=(i=t.clipboardData)==null?void 0:i.getData("text/html");let o=(l=t.clipboardData)==null?void 0:l.getData("text/plain");if(!r&&!o){const d=(a=t.clipboardData)==null?void 0:a.getData("text/uri-list");d&&(o=this.normalizeURIList(d))}const s=Array.from(((c=t.clipboardData)==null?void 0:c.files)||[]);if(!r&&s.length>0){this.quill.uploader.upload(n,s);return}if(r&&s.length>0){const d=new DOMParser().parseFromString(r,"text/html");if(d.body.childElementCount===1&&((u=d.body.firstElementChild)==null?void 0:u.tagName)==="IMG"){this.quill.uploader.upload(n,s);return}}this.onPaste(n,{html:r,text:o})}onCopy(t){const n=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:n}}onPaste(t,n){let{text:r,html:o}=n;const s=this.quill.getFormat(t.index),i=this.convert({text:r,html:o},s);aA.log("onPaste",i,{text:r,html:o});const l=new X().retain(t.index).delete(t.length).concat(i);this.quill.updateContents(l,P.sources.USER),this.quill.setSelection(l.length()-t.length,P.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,n){const r=[],o=[];return this.matchers.forEach(s=>{const[i,l]=s;switch(i){case Node.TEXT_NODE:o.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(t.querySelectorAll(i)).forEach(a=>{if(n.has(a)){const c=n.get(a);c==null||c.push(l)}else n.set(a,[l])});break}}),[r,o]}}q(I4,"DEFAULTS",{matchers:[]});function Ls(e,t,n,r){return r.query(t)?e.reduce((o,s)=>{if(!s.insert)return o;if(s.attributes&&s.attributes[t])return o.push(s);const i=n?{[t]:n}:{};return o.insert(s.insert,{...i,...s.attributes})},new X):e}function Ia(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){const o=e.ops[r];if(typeof o.insert!="string")break;n=o.insert+n}return n.slice(-1*t.length)===t}function xo(e,t){if(!(e instanceof Element))return!1;const n=t.query(e);return n&&n.prototype instanceof On?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(e.tagName.toLowerCase())}function dA(e,t){return e.previousElementSibling&&e.nextElementSibling&&!xo(e.previousElementSibling,t)&&!xo(e.nextElementSibling,t)}const bc=new WeakMap;function N4(e){return e==null?!1:(bc.has(e)||(e.tagName==="PRE"?bc.set(e,!0):bc.set(e,N4(e.parentNode))),bc.get(e))}function A4(e,t,n,r,o){return t.nodeType===t.TEXT_NODE?r.reduce((s,i)=>i(t,s,e),new X):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((s,i)=>{let l=A4(e,i,n,r,o);return i.nodeType===t.ELEMENT_NODE&&(l=n.reduce((a,c)=>c(i,a,e),l),l=(o.get(i)||[]).reduce((a,c)=>c(i,a,e),l)),s.concat(l)},new X):new X}function Qf(e){return(t,n,r)=>Ls(n,e,!0,r)}function fA(e,t,n){const r=Sr.keys(e),o=oo.keys(e),s=Fo.keys(e),i={};return r.concat(o).concat(s).forEach(l=>{let a=n.query(l,Q.ATTRIBUTE);a!=null&&(i[a.attrName]=a.value(e),i[a.attrName])||(a=uA[l],a!=null&&(a.attrName===l||a.keyName===l)&&(i[a.attrName]=a.value(e)||void 0),a=Iv[l],a!=null&&(a.attrName===l||a.keyName===l)&&(a=Iv[l],i[a.attrName]=a.value(e)||void 0))}),Object.entries(i).reduce((l,a)=>{let[c,u]=a;return Ls(l,c,u,n)},t)}function hA(e,t,n){const r=n.query(e);if(r==null)return t;if(r.prototype instanceof On){const o={},s=r.value(e);if(s!=null)return o[r.blotName]=s,new X().insert(o,r.formats(e,n))}else if(r.prototype instanceof ca&&!Ia(t,`
`)&&t.insert(`
`),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return Ls(t,r.blotName,r.formats(e,n),n);return t}function pA(e,t){return Ia(t,`
`)||t.insert(`
`),t}function gA(e,t,n){const r=n.query("code-block"),o=r&&"formats"in r&&typeof r.formats=="function"?r.formats(e,n):!0;return Ls(t,"code-block",o,n)}function mA(){return new X}function vA(e,t,n){const r=n.query(e);if(r==null||r.blotName!=="list"||!Ia(t,`
`))return t;let o=-1,s=e.parentNode;for(;s!=null;)["OL","UL"].includes(s.tagName)&&(o+=1),s=s.parentNode;return o<=0?t:t.reduce((i,l)=>l.insert?l.attributes&&typeof l.attributes.indent=="number"?i.push(l):i.insert(l.insert,{indent:o,...l.attributes||{}}):i,new X)}function yA(e,t,n){const r=e;let o=r.tagName==="OL"?"ordered":"bullet";const s=r.getAttribute("data-checked");return s&&(o=s==="true"?"checked":"unchecked"),Ls(t,"list",o,n)}function Nv(e,t,n){if(!Ia(t,`
`)){if(xo(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert(`
`);if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;r!=null;){if(xo(r,n))return t.insert(`
`);const o=n.query(r);if(o&&o.prototype instanceof Yn)return t.insert(`
`);r=r.firstChild}}}return t}function wA(e,t,n){var s;const r={},o=e.style||{};return o.fontStyle==="italic"&&(r.italic=!0),o.textDecoration==="underline"&&(r.underline=!0),o.textDecoration==="line-through"&&(r.strike=!0),((s=o.fontWeight)!=null&&s.startsWith("bold")||parseInt(o.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((i,l)=>{let[a,c]=l;return Ls(i,a,c,n)},t),parseFloat(o.textIndent||0)>0?new X().insert(" ").concat(t):t}function bA(e,t,n){var o,s;const r=((o=e.parentElement)==null?void 0:o.tagName)==="TABLE"?e.parentElement:(s=e.parentElement)==null?void 0:s.parentElement;if(r!=null){const l=Array.from(r.querySelectorAll("tr")).indexOf(e)+1;return Ls(t,"table",l,n)}return t}function xA(e,t,n){var o;let r=e.data;if(((o=e.parentElement)==null?void 0:o.tagName)==="O:P")return t.insert(r.trim());if(!N4(e)){if(r.trim().length===0&&r.includes(`
`)&&!dA(e,n))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(e.previousSibling==null&&e.parentElement!=null&&xo(e.parentElement,n)||e.previousSibling instanceof Element&&xo(e.previousSibling,n))&&(r=r.replace(/^ /,"")),(e.nextSibling==null&&e.parentElement!=null&&xo(e.parentElement,n)||e.nextSibling instanceof Element&&xo(e.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll("Â "," ")}return t.insert(r)}class j4 extends io{constructor(n,r){super(n,r);q(this,"lastRecorded",0);q(this,"ignoreChange",!1);q(this,"stack",{undo:[],redo:[]});q(this,"currentRange",null);this.quill.on(P.events.EDITOR_CHANGE,(o,s,i,l)=>{o===P.events.SELECTION_CHANGE?s&&l!==P.sources.SILENT&&(this.currentRange=s):o===P.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||l===P.sources.USER?this.record(s,i):this.transform(s)),this.currentRange=Mp(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",o=>{o.inputType==="historyUndo"?(this.undo(),o.preventDefault()):o.inputType==="historyRedo"&&(this.redo(),o.preventDefault())})}change(n,r){if(this.stack[n].length===0)return;const o=this.stack[n].pop();if(!o)return;const s=this.quill.getContents(),i=o.delta.invert(s);this.stack[r].push({delta:i,range:Mp(o.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(o.delta,P.sources.USER),this.ignoreChange=!1,this.restoreSelection(o)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(n,r){if(n.ops.length===0)return;this.stack.redo=[];let o=n.invert(r),s=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const l=this.stack.undo.pop();l&&(o=o.compose(l.delta),s=l.range)}else this.lastRecorded=i;o.length()!==0&&(this.stack.undo.push({delta:o,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(n){Av(this.stack.undo,n),Av(this.stack.redo,n)}undo(){this.change("undo","redo")}restoreSelection(n){if(n.range)this.quill.setSelection(n.range,P.sources.USER);else{const r=kA(this.quill.scroll,n.delta);this.quill.setSelection(r,P.sources.USER)}}}q(j4,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Av(e,t){let n=t;for(let r=e.length-1;r>=0;r-=1){const o=e[r];e[r]={delta:n.transform(o.delta,!0),range:o.range&&Mp(o.range,n)},n=o.delta.transform(n),e[r].delta.length()===0&&e.splice(r,1)}}function SA(e,t){const n=t.ops[t.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(`
`):n.attributes!=null?Object.keys(n.attributes).some(r=>e.query(r,Q.BLOCK)!=null):!1}function kA(e,t){const n=t.reduce((o,s)=>o+(s.delete||0),0);let r=t.length()-n;return SA(e,t)&&(r-=1),r}function Mp(e,t){if(!e)return e;const n=t.transformPosition(e.index),r=t.transformPosition(e.index+e.length);return{index:n,length:r-n}}class R4 extends io{constructor(t,n){super(t,n),t.root.addEventListener("drop",r=>{var i;r.preventDefault();let o=null;if(document.caretRangeFromPoint)o=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const l=document.caretPositionFromPoint(r.clientX,r.clientY);o=document.createRange(),o.setStart(l.offsetNode,l.offset),o.setEnd(l.offsetNode,l.offset)}const s=o&&t.selection.normalizeNative(o);if(s){const l=t.selection.normalizedToRange(s);(i=r.dataTransfer)!=null&&i.files&&this.upload(l,r.dataTransfer.files)}})}upload(t,n){const r=[];Array.from(n).forEach(o=>{var s;o&&((s=this.options.mimetypes)!=null&&s.includes(o.type))&&r.push(o)}),r.length>0&&this.options.handler.call(this,t,r)}}R4.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map(r=>new Promise(o=>{const s=new FileReader;s.onload=()=>{o(s.result)},s.readAsDataURL(r)}));Promise.all(n).then(r=>{const o=r.reduce((s,i)=>s.insert({image:i}),new X().retain(e.index).delete(e.length));this.quill.updateContents(o,Y.sources.USER),this.quill.setSelection(e.index+r.length,Y.sources.SILENT)})}};const TA=["insertText","insertReplacementText"];class EA extends io{constructor(t,n){super(t,n),t.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||t.on(P.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){v0({range:t,quill:this.quill})}replaceText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(n){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new X().retain(t.index).insert(n,r),P.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+n.length,0,P.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!TA.includes(t.inputType))return;const n=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!n||n.collapsed===!0)return;const r=CA(t);if(r==null)return;const o=this.quill.selection.normalizeNative(n),s=o?this.quill.selection.normalizedToRange(o):null;s&&this.replaceText(s,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}function CA(e){var t;return typeof e.data=="string"?e.data:(t=e.dataTransfer)!=null&&t.types.includes("text/plain")?e.dataTransfer.getData("text/plain"):null}const IA=/Mac/i.test(navigator.platform),NA=100,AA=e=>!!(e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="Home"||IA&&e.key==="a"&&e.ctrlKey===!0);class jA extends io{constructor(n,r){super(n,r);q(this,"isListening",!1);q(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(n,r){let{line:o,event:s}=r;if(!(o instanceof Jn)||!o.uiNode)return!0;const i=getComputedStyle(o.domNode).direction==="rtl";return i&&s.key!=="ArrowRight"||!i&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(n.index-1,n.length+(s.shiftKey?1:0),P.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",n=>{!n.defaultPrevented&&AA(n)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+NA,this.isListening)return;this.isListening=!0;const n=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",n,{once:!0})}handleSelectionChange(){const n=document.getSelection();if(!n)return;const r=n.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const o=this.quill.scroll.find(r.startContainer);if(!(o instanceof Jn)||!o.uiNode)return;const s=document.createRange();s.setStartAfter(o.uiNode),s.setEndAfter(o.uiNode),n.removeAllRanges(),n.addRange(s)}}P.register({"blots/block":hn,"blots/block/embed":Yn,"blots/break":Cr,"blots/container":p0,"blots/cursor":da,"blots/embed":S4,"blots/inline":to,"blots/scroll":ti,"blots/text":kr,"modules/clipboard":I4,"modules/history":j4,"modules/keyboard":cd,"modules/uploader":R4,"modules/input":EA,"modules/uiNode":jA});const RA='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let jv=0;function Rv(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class y0{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Rv(this.label,"aria-expanded"),Rv(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",o=>{switch(o.key){case"Enter":this.selectItem(n,!0),o.preventDefault();break;case"Escape":this.escape(),o.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=RA,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${jv}`,jv+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r!=null&&r.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class LA extends y0{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),o=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=o:r.style.fill=o)}}class _A extends y0{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const OA=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class MA{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,OA(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const o=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let i=0;if(s.right>o.right&&(i=o.right-s.right,this.root.style.left=`${n+i}px`),s.left<o.left&&(i=o.left-s.left,this.root.style.left=`${n+i}px`),s.bottom>o.bottom){const l=s.bottom-s.top,a=t.bottom-t.top+l;this.root.style.top=`${r-a}px`,this.root.classList.add("ql-flip")}return i}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const BA=[!1,"center","right","justify"],PA=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],zA=[!1,"serif","monospace"],DA=["1","2","3",!1],HA=["small",!1,"large","huge"];class w0 extends zi{constructor(t,n){super(t,n);const r=o=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(o.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(o.target)||s.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),n[s]!=null))if(s==="direction")r.innerHTML=n[s][""]+n[s].rtl;else if(typeof n[s]=="string")r.innerHTML=n[s];else{const i=r.value||"";i!=null&&n[s][i]&&(r.innerHTML=n[s][i])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(o=>{if(o.classList.contains("ql-align")&&(o.querySelector("option")==null&&yl(o,BA),typeof n.align=="object"))return new _A(o,n.align);if(o.classList.contains("ql-background")||o.classList.contains("ql-color")){const s=o.classList.contains("ql-background")?"background":"color";return o.querySelector("option")==null&&yl(o,PA,s==="background"?"#ffffff":"#000000"),new LA(o,n[s])}return o.querySelector("option")==null&&(o.classList.contains("ql-font")?yl(o,zA):o.classList.contains("ql-header")?yl(o,DA):o.classList.contains("ql-size")&&yl(o,HA)),new y0(o)});const r=()=>{this.pickers.forEach(o=>{o.update()})};this.quill.on(Y.events.EDITOR_CHANGE,r)}}w0.DEFAULTS=fs({},zi.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class $A extends MA{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,Y.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,Y.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=qA(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,Y.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Y.sources.USER),this.quill.setSelection(r+2,Y.sources.USER)}break}}this.textbox.value="",this.hide()}}function qA(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function yl(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const o=document.createElement("option");r===n?o.setAttribute("selected","selected"):o.setAttribute("value",String(r)),e.appendChild(o)})}var Ys;let Lv=(Ys=class extends to{static create(t){const n=super.create(t);return n.setAttribute("href",this.sanitize(t)),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}static formats(t){return t.getAttribute("href")}static sanitize(t){return FA(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,n){t!==this.statics.blotName||!n?super.format(t,n):this.domNode.setAttribute("href",this.constructor.sanitize(n))}},q(Ys,"blotName","link"),q(Ys,"tagName","A"),q(Ys,"SANITIZED_URL","about:blank"),q(Ys,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]),Ys);function FA(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}const UA='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',VA='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',WA='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',GA='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',KA='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',YA='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',ZA='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',QA='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',_v='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',XA='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',JA='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',ej='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',tj='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',nj='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',rj='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',oj='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',sj='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',ij='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',lj='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',aj='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',cj='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',uj='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',dj='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',fj='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',hj='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',pj='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',gj='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',mj='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',vj='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',yj='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',wj='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',bj='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',xj='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ov={align:{"":UA,center:VA,right:WA,justify:GA},background:KA,blockquote:YA,bold:ZA,clean:QA,code:_v,"code-block":_v,color:XA,direction:{"":JA,rtl:ej},formula:tj,header:{1:nj,2:rj,3:oj,4:sj,5:ij,6:lj},italic:aj,image:cj,indent:{"+1":uj,"-1":dj},link:fj,list:{bullet:hj,check:pj,ordered:gj},script:{sub:mj,super:vj},strike:yj,table:wj,underline:bj,video:xj},Sj=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class L4 extends $A{constructor(){super(...arguments);q(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",n=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),n.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",n=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,Y.sources.USER),delete this.linkRange}n.preventDefault(),this.hide()}),this.quill.on(Y.events.SELECTION_CHANGE,(n,r,o)=>{if(n!=null){if(n.length===0&&o===Y.sources.USER){const[s,i]=this.quill.scroll.descendant(Lv,n.index);if(s!=null){this.linkRange=new Pi(n.index-i,s.length());const l=Lv.formats(s.domNode);this.preview.textContent=l,this.preview.setAttribute("href",l),this.show();const a=this.quill.getBounds(this.linkRange);a!=null&&this.position(a);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}q(L4,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class _4 extends w0{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=Sj),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Ov),this.buildPickers(t.container.querySelectorAll("select"),Ov),this.tooltip=new L4(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}_4.DEFAULTS=fs({},w0.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,P.sources.USER)}}}}});const Mv=so("quill:toolbar");let b0=class extends io{constructor(t,n){var r,o;if(super(t,n),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),kj(s,this.options.container),(o=(r=t.container)==null?void 0:r.parentNode)==null||o.insertBefore(s,t.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Mv.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var l;const i=(l=this.options.handlers)==null?void 0:l[s];i&&this.addHandler(s,i)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(P.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(t,n){this.handlers[t]=n}attach(t){let n=Array.from(t.classList).find(o=>o.indexOf("ql-")===0);if(!n)return;if(n=n.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[n]==null&&this.quill.scroll.query(n)==null){Mv.warn("ignoring attaching to nonexistent format",n,t);return}const r=t.tagName==="SELECT"?"change":"click";t.addEventListener(r,o=>{let s;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const l=t.options[t.selectedIndex];l.hasAttribute("selected")?s=!1:s=l.value||!1}else t.classList.contains("ql-active")?s=!1:s=t.value||!t.hasAttribute("value"),o.preventDefault();this.quill.focus();const[i]=this.quill.selection.getRange();if(this.handlers[n]!=null)this.handlers[n].call(this,s);else if(this.quill.scroll.query(n).prototype instanceof On){if(s=prompt(`Enter ${n}`),!s)return;this.quill.updateContents(new X().retain(i.index).delete(i.length).insert({[n]:s}),P.sources.USER)}else this.quill.format(n,s,P.sources.USER);this.update(i)}),this.controls.push([n,t])}update(t){const n=t==null?{}:this.quill.getFormat(t);this.controls.forEach(r=>{const[o,s]=r;if(s.tagName==="SELECT"){let i=null;if(t==null)i=null;else if(n[o]==null)i=s.querySelector("option[selected]");else if(!Array.isArray(n[o])){let l=n[o];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),i=s.querySelector(`option[value="${l}"]`)}i==null?(s.value="",s.selectedIndex=-1):i.selected=!0}else if(t==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const i=n[o],l=i===s.getAttribute("value")||i!=null&&i.toString()===s.getAttribute("value")||i==null&&!s.getAttribute("value");s.classList.toggle("ql-active",l),s.setAttribute("aria-pressed",l.toString())}else{const i=n[o]!=null;s.classList.toggle("ql-active",i),s.setAttribute("aria-pressed",i.toString())}})}};b0.DEFAULTS={};function Bv(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function kj(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(o=>{if(typeof o=="string")Bv(r,o);else{const s=Object.keys(o)[0],i=o[s];Array.isArray(i)?Tj(r,s,i):Bv(r,s,i)}}),e.appendChild(r)})}function Tj(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(o=>{const s=document.createElement("option");o!==!1?s.setAttribute("value",String(o)):s.setAttribute("selected","selected"),r.appendChild(s)}),e.appendChild(r)}b0.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,Q.INLINE)!=null&&this.quill.format(n,!1,P.sources.USER)})}else this.quill.removeFormat(e.index,e.length,P.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",P.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,P.sources.USER),this.quill.format("direction",e,P.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let o=e==="+1"?1:-1;n.direction==="rtl"&&(o*=-1),this.quill.format("indent",r+o,P.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,P.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,P.sources.USER):this.quill.format("list","unchecked",P.sources.USER):this.quill.format("list",e,P.sources.USER)}}};class ha extends to{static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}q(ha,"blotName","bold"),q(ha,"tagName",["STRONG","B"]);class Bp extends ha{}q(Bp,"blotName","italic"),q(Bp,"tagName",["EM","I"]);class Pp extends to{}q(Pp,"blotName","underline"),q(Pp,"tagName","U");class zp extends ha{}q(zp,"blotName","strike"),q(zp,"tagName",["S","STRIKE"]);const _u=class _u extends to{static create(t){const n=super.create();return typeof t!="object"&&(t={url:t,target:"_blank"}),n.setAttribute("href",t.url),n.setAttribute("target",t.target),t.title&&n.setAttribute("title",t.title),n}static formats(t){const n=t.getAttribute("href"),r=t.getAttribute("target"),o=t.getAttribute("title");return{url:n,target:r,title:o}}};_u.blotName="link",_u.tagName="a";let Dp=_u;const Ej=`
<div class="wptb-link-popup-title">
<h2>Update Link</h2>
<button type="button" class="wptb-link-popup-close">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M17 7L7 17M7 7l10 10"
/>
</svg>
</button>
</div>
<div class="wptb-link-popup-content">
<label>URL</label>
<input type="text" placeholder="i.e. https://wptablebuilder.com" />
<label>Title</label>
<input type="text" placeholder="i.e. WPTB" />
<label>Target</label>
<select>
<option value="_self">Same Window</option>
<option value="_blank">New Window</option>
</select>
</div>
<div class="wptb-link-popup-actions">
<button type="button" class="wptb-link-popup-update">OK</button>
<button type="button" class="wptb-link-popup-remove">Remove</button>
</div>
`,Pv=(e,t,n)=>{if(!e||!t)return;e.setSelection(t,"silent"),document.body.appendChild(n);const{index:r}=t;if(!e.getFormat(t).link)return;const[s]=e.getLeaf(r);if(!s||!s.domNode)return;const i=s.domNode.parentElement;if(!(i.tagName==="A"?i:i.closest("a")))return;let a=r,c=r;for(;a>0;){const[h]=e.getLeaf(a-1),p=h==null?void 0:h.domNode.parentElement;if((p==null?void 0:p.tagName)==="A"?p:p==null?void 0:p.closest("a"))a--;else break}const u=e.getLength();for(;c<u;){const[h]=e.getLeaf(c),p=h==null?void 0:h.domNode.parentElement;if((p==null?void 0:p.tagName)==="A"?p:p==null?void 0:p.closest("a"))c++;else break}const d=c-a;e.setSelection(a-1,d,"silent")},Cj=()=>{let e=null,t=null,n=null;const r=document.createElement("div");r.className="wptb-link-popup",r.innerHTML=Ej;const o=r.querySelectorAll("input"),s=r.querySelector("select"),i=r.querySelector(".wptb-link-popup-update"),l=r.querySelector(".wptb-link-popup-remove"),a=r.querySelector(".wptb-link-popup-close"),c=()=>{r.remove(),document.removeEventListener("mousedown",c)};return i.addEventListener("click",()=>{if(!e||!t)return;const u={url:o[0].value,title:o[1].value,target:s.value};Pv(e,t,n),e.format("link",u,"user"),e.setSelection(t,"silent"),document.body.appendChild(n),c()}),l.addEventListener("click",()=>{c(),Pv(e,t,n),e.format("link",null,"user"),e.setSelection(t,"silent")}),a.addEventListener("click",()=>{c(),!(!e||!t)&&(e.setSelection(t,"silent"),document.body.appendChild(n))}),r.addEventListener("pointerup",u=>{u.stopPropagation()}),r.addEventListener("mousedown",u=>{u.stopPropagation()}),{setQuill(u){e=u},show(u,d){var v;t=e==null?void 0:e.getSelection(),n=d;const h=(v=e==null?void 0:e.getFormat(t))==null?void 0:v.link;if(h)o[0].value=h.url,o[1].value=h.title||"",s.value=h.target;else if(t!=null&&t.length)o[0].value="",o[1].value="",s.value="_blank";else return;document.body.appendChild(r);const p=u.getBoundingClientRect(),g=r.getBoundingClientRect();r.style.top=`${p.top+p.height}px`,r.style.left=`${p.left-(g.width-p.width)/2}px`,document.addEventListener("mousedown",c)},remove:c}},zv={bold:`
<button
type="button"
class="ql-bold"
aria-pressed="false"
aria-label="bold"
>
<svg viewBox="0 0 18 18">
<path
class="ql-stroke"
d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"
></path>
<path
class="ql-stroke"
d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"
></path>
</svg>
</button>
`,italic:`
<button
type="button"
class="ql-italic"
aria-pressed="false"
aria-label="italic"
>
<svg viewBox="0 0 18 18">
<line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"></line>
<line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"></line>
<line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"></line>
</svg>
</button>
`,underline:`
<button
type="button"
class="ql-underline"
aria-pressed="false"
aria-label="underline"
>
<svg viewBox="0 0 18 18">
<path
class="ql-stroke"
d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"
></path>
<rect
class="ql-fill"
height="1"
rx="0.5"
ry="0.5"
width="12"
x="3"
y="15"
></rect>
</svg>
</button>
`,strike:`
<button
type="button"
class="ql-strike"
aria-pressed="false"
aria-label="strike"
>
<svg viewBox="0 0 18 18">
<line
class="ql-stroke ql-thin"
x1="15.5"
x2="2.5"
y1="8.5"
y2="9.5"
></line>
<path
class="ql-fill"
d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"
></path>
<path
class="ql-fill"
d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"
></path>
</svg>
</button>
`,link:`
<button
type="button"
class="ql-link"
aria-pressed="false"
aria-label="link"
>
<svg viewBox="0 0 18 18">
<line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"></line>
<path
class="ql-even ql-stroke"
d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"
></path>
<path
class="ql-even ql-stroke"
d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"
></path>
</svg>
</button>
`,align:`
<span class="ql-aligns">
<span
class="ql-picker-label"
role="button"
>
<svg viewBox="0 0 18 18">
<line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line>
<line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line>
<line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line>
</svg>
</span>
<span class="ql-picker-options">
<button class="ql-align" value="">
<svg viewBox="0 0 18 18">
<line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line>
<line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line>
<line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line>
</svg>
</button>
<button class="ql-align" value="center">
<svg viewBox="0 0 18 18">
<line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>
<line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"></line>
<line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"></line>
</svg>
</button>
<button class="ql-align" value="right">
<svg viewBox="0 0 18 18">
<line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>
<line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"></line>
<line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"></line>
</svg>
</button>
<button class="ql-align" value="justify">
<svg viewBox="0 0 18 18">
<line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>
<line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"></line>
<line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"></line>
</svg>
</button>
</span>
</span>
`},Ij=e=>{const t=document.createElement("div");t.className="ql-toolbar ql-snow",t.role="toolbar";for(const r of e)if(Array.isArray(r)){const o=document.createElement("span");o.className="ql-formats";for(const s of r)o.innerHTML+=zv[s];t.appendChild(o)}else t.innerHTML+=zv[r];const n=t.querySelectorAll(".ql-align");if(n.length)for(let r=0;r<n.length;r++)n[r].addEventListener("pointerdown",o=>{var i;const s=o.currentTarget;s.parentElement.previousElementSibling.innerHTML=s.innerHTML,(i=s.parentElement.querySelector(".ql-wptb-active"))==null||i.classList.remove("ql-wptb-active"),s.classList.add("ql-wptb-active")});return t.addEventListener("pointerup",r=>{r.stopPropagation()}),t};P.register("modules/toolbar",b0);P.register("themes/snow",_4);P.register("formats/bold",ha);P.register("formats/italic",Bp);P.register("formats/underline",Pp);P.register("formats/strike",zp);P.register("formats/align",k4);P.register(Dp);const Nj=[["bold","italic","underline","strike"],["link"],["align"]],Aj=(e,t)=>{const n=Ij(t.toolbar||Nj),r=Cj(),o=new P(e,{theme:"snow",modules:{toolbar:{container:n,handlers:{link:()=>{r.show(e,n)},align:u=>{t.onAlignmentChange?t.onAlignmentChange(u||"left"):o.format("align",u)}}}},placeholder:t.placeholder??"Content here..."});r.setQuill(o),o.root.setAttribute("spellcheck","false");let s=!1,i=!1;o.on("text-change",()=>{var u;s||(i=!0,(u=t.onChange)==null||u.call(t,o.root.innerHTML))});const a={toolbar:n,isFocused:!1,quill:o,setValue:u=>{var d;if(i){i=!1;return}s=!0,typeof u=="string"?o.clipboard.dangerouslyPasteHTML(u,"api"):(o.setContents(u,"api"),i=!0,(d=t.onChange)==null||d.call(t,o.root.innerHTML)),s=!1,o.blur()},cleanup:()=>{r.remove(),n.remove()}};o.on("selection-change",(u,d)=>{var h;if(d)u||(a.isFocused=!1,n.remove());else{a.isFocused=!0,document.body.appendChild(n);const p=e.getBoundingClientRect(),g=n.getBoundingClientRect();n.style.top=`${p.top}px`,n.style.left=`${p.left-(g.width-p.width)/2}px`;const v=o.getFormat().align||"",x=n.querySelector(`.ql-align[value="${v}"]`);x&&((h=n.querySelector(".ql-aligns .ql-wptb-active"))==null||h.classList.remove("ql-wptb-active"),x.classList.add("ql-wptb-active"),n.querySelector(".ql-aligns .ql-picker-label").innerHTML=x.innerHTML)}});const c=o.getModule("keyboard");return c.bindings.Enter=[{key:13,handler:()=>{if(t.onSplit){const u=o.getSelection();if(u){const d=u.index,h=o.getContents(),p=h.slice(0,d),g=h.slice(d);t.onSplit(Dv(p),Dv(g))}return!1}return!t.preventNewLine}}],a},Dv=e=>{const t=document.createElement("div"),n=new P(t);return n.setContents(e),n.root.innerHTML},s_=A.forwardRef(({tagName:e="div",onChange:t,preventNewLine:n,value:r="",toolbar:o,props:s,placeholder:i,onAlignmentChange:l,onSplit:a},c)=>{const u=A.useRef(),d=A.useRef(),h=A.useRef({onChange:t,onAlignmentChange:l,onSplit:a,preventNewLine:n,toolbar:o,placeholder:i});return A.useImperativeHandle(c,()=>({focus:p=>{var g,v;(g=d.current)==null||g.quill.focus(),(v=d.current)==null||v.quill.setSelection(p||0)},length:()=>{var p;return((p=d.current)==null?void 0:p.quill.getLength())||0}})),A.useEffect(()=>{var g;const p=u.current;return!p||p.dataset.wptbHasQuill?((g=d.current)!=null&&g.isFocused&&document.body.appendChild(d.current.toolbar),()=>{var v;return(v=d.current)==null?void 0:v.cleanup()}):(p.dataset.wptbHasQuill="true",d.current=Aj(p,h.current),()=>{var v;return(v=d.current)==null?void 0:v.cleanup()})},[u.current]),A.useEffect(()=>{h.current.onChange=t,h.current.onAlignmentChange=l,h.current.onSplit=a,h.current.preventNewLine=n},[t,l,a,n]),A.useEffect(()=>{var p;(p=d.current)==null||p.setValue(r)},[r]),A.createElement(e,{...s,ref:u})}),i_=({value:e,onChange:t,placeholder:n,className:r})=>f.jsxs("div",{className:et("wptb-search-control wptb-control",r),children:[lS,f.jsx("input",{type:"text",value:e,onChange:o=>t==null?void 0:t(o.target.value),placeholder:n})]});function x0({label:e,value:t,onChange:n,onReset:r,options:o}){return f.jsxs("div",{className:"wptb-select-control wptb-control",children:[f.jsx(Fi,{label:e,onReset:r,className:"wptb-select-control-label"}),f.jsx("select",{value:t||"",onChange:s=>n==null?void 0:n(s.target.value),children:o.map(s=>f.jsx("option",{value:s.value,children:s.label},s.value))})]})}const Ge=({label:e,checked:t,onChange:n,rtl:r})=>f.jsxs("label",{className:et("wptb-switch-control wptb-control",{"wptb-switch-control-rtl":r}),children:[e&&f.jsx("p",{className:"wptb-switch-control-label",children:e}),f.jsx("input",{type:"checkbox",checked:t,className:"btn",onChange:()=>n==null?void 0:n(!t)}),f.jsx("i",{})]}),O4=({active:e,tabs:t,setActive:n,props:r})=>{const o=t[e].component;return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"wptb-tabs",children:Object.keys(t).map(s=>f.jsx("button",{type:"button",className:et("wptb-tab-btn",{"wptb-active":e===s}),onClick:()=>n(s),children:t[s].title},s))}),f.jsx(o,{...r})]})},Xf={id:{label:"ID",width:"80px"},title:{label:"Title"},date:{label:"Created"},modified:{label:"Last Modified"}},l_=({onSelect:e,sorting:[t,n],isLoading:r,items:o,columns:s=Object.keys(Xf),checkbox:i,checked:l,onAllCheck:a,noItemsMessage:c="No tables found",htmlColumns:u})=>f.jsxs("table",{className:et("wptb-v2-table-list",{"wptb-table-loading":r}),children:[f.jsxs("colgroup",{children:[i&&f.jsx("col",{style:{width:"40px"}}),s.map(d=>f.jsx("col",{style:{width:Xf[d].width}},d))]}),f.jsx("thead",{children:f.jsxs("tr",{children:[i&&f.jsx("th",{children:f.jsx("input",{type:"checkbox",checked:!!l,onChange:d=>a==null?void 0:a(d.currentTarget.checked)})}),s.map(d=>f.jsxs("th",{onClick:()=>n(d),children:[Xf[d].label,f.jsx("button",{type:"button",className:et("wptb-table-sort-btn",{"wptb-sort-btn-asc":t.by===d&&t.order==="asc","wptb-sort-btn-desc":t.by===d&&t.order!=="asc"})})]},d))]})}),f.jsx("tbody",{children:r?Array(5).fill(0).map((d,h)=>f.jsxs("tr",{children:[i&&f.jsx("td",{}),s.map(p=>f.jsx("td",{children:f.jsx("div",{"data-column":p})},p))]},h)):o.length?o.map(d=>f.jsxs("tr",{onClick:()=>e(d),children:[i&&f.jsx("td",{children:f.jsx("input",{type:"checkbox",defaultChecked:l})}),s.map(h=>f.jsx("td",{children:u!=null&&u[h]?f.jsx("div",{dangerouslySetInnerHTML:{__html:d[h]}}):d[h]||"-"},h))]},d.id)):f.jsx("tr",{children:f.jsx("td",{colSpan:s.length+(i?1:0),children:f.jsx("p",{children:c})})})})]}),Hv=({label:e,value:t,onChange:n,placeholder:r})=>f.jsxs("label",{className:"wptb-text-control wptb-control",children:[e&&f.jsx("p",{className:"wptb-text-control-label",children:e}),f.jsx("input",{type:"text",value:t||"",onChange:o=>n==null?void 0:n(o.target.value),placeholder:r})]}),jj=({tags:e,value:t,onChange:n,onNewTag:r,searchAble:o})=>{const[s,i]=A.useState(!1),[l,a]=A.useState(""),[c,u]=A.useState(!1),[d,h]=A.useState([]),[p,g]=A.useState({name:"",slug:"",description:""});A.useEffect(()=>{const w=[];for(const S in e)t.includes(Number(S))||w.push(Number(S));h(w)},[e,t]);const v=w=>{const S=w.target.value;if(a(S),S.trim()==="")return;const k=[];for(const T in e)!t.includes(Number(T))&&e[T].toLowerCase().includes(S.toLowerCase())&&k.push(Number(T));h(k)},x=w=>{t.includes(w)||n([...t,w])},m=async()=>{if(!p.name.trim())return;let w=0;for(const S in e)if(e[S].toLowerCase()===p.name.toLowerCase()){w=Number(S);break}if(w)x(w);else if(r){i(!0);const S=await r(p);i(!1),S&&e[S]&&x(S),g({name:"",slug:"",description:""})}a("")},y=w=>{n(t.filter(S=>S!==w))};return f.jsxs("div",{className:"wptb-tags-control",children:[f.jsx("p",{className:"wptb-tags-control-label",children:"Selected Tags:"}),f.jsxs("div",{className:"wptb-tags-control-tags",children:[t.map(w=>{const S=e[w];return S?f.jsxs("div",{className:"wptb-tags-control-tags-item",children:[S,f.jsx("button",{className:"remove",onClick:()=>y(w),children:v5})]},w):null}),o&&f.jsx("input",{type:"text",placeholder:"Add a tag...",value:l,onChange:v})]}),d.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"wptb-tags-control-label",children:"Available Tags:"}),f.jsx("div",{className:"wptb-tags-control-suggestions",children:d.map(w=>f.jsxs("button",{className:"wptb-tags-control-tags-item",onClick:()=>{x(w),h(d.filter(S=>S!==w))},children:[e[w],Kw]},w))})]}),f.jsxs("div",{className:"wptb-tags-control-form",children:[f.jsxs("div",{className:"wptb-tags-control-name",children:[f.jsx(Hv,{placeholder:"New tag",value:p.name,onChange:w=>g({...p,name:w})}),f.jsx("button",{onClick:()=>u(!c),children:c?H6:Zw})]}),c&&f.jsxs(f.Fragment,{children:[f.jsx(Hv,{value:p.slug,onChange:w=>g({...p,slug:w}),placeholder:"Slug"}),f.jsx(M5,{placeholder:"Description",value:p.description,onChange:w=>g({...p,description:w})})]}),f.jsxs("button",{className:"wptb-tags-control-add-btn",onClick:m,children:[s?Ju:null," Add"]})]})]})},S0=A.createContext({open:!1,setOpen:()=>{},target:void 0,setTarget:()=>{}}),M4=({children:e})=>{const[t,n]=A.useState(!1),[r,o]=A.useState();return f.jsx(S0.Provider,{value:{open:t,setOpen:n,target:r,setTarget:o},children:e})},B4=({tag:e="button",children:t,...n})=>{const{open:r,setOpen:o,setTarget:s}=A.useContext(S0),i=A.useRef(null);return A.useLayoutEffect(()=>{if(!i.current)return;const l=a=>{var c;(c=i.current)!=null&&c.contains(a.target)||i.current===a.target||o(!1)};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}},[o]),A.useEffect(()=>{s(i.current)},[s]),A.createElement(e,{...n,onClick:l=>{var a;(a=n.onClick)==null||a.call(n,l),o(!r)},ref:i,children:t})},P4=({children:e,className:t,keepOpenOnClick:n=!1})=>{const{open:r,target:o}=A.useContext(S0),s=A.useRef(null),[i,l]=A.useState({});return A.useLayoutEffect(()=>{if(!r||!o){l({});return}const a=()=>{if(!s.current||!o)return;const u=s.current,d=o.getBoundingClientRect(),h=u.getBoundingClientRect();if(h.width===0||h.height===0){requestAnimationFrame(a);return}const p={};window.innerHeight>d.top+d.height+h.height?p.top=`${d.bottom+10}px`:p.top=`${d.top-h.height-10}px`,window.innerWidth<d.left*2?p.left=`${d.right-h.width}px`:p.left=`${d.left}px`,l(p)};(()=>{requestAnimationFrame(a)})()},[r,o]),r?Ho.createPortal(f.jsx("div",{ref:s,className:`wptb-dropdown-content ${t||""}`,style:i,onClick:n?a=>a.stopPropagation():void 0,children:e}),document.body):null},a_=(e,t,n)=>{const r={...Zn,colCount:t,rowCount:e},o={},s={},i=[];o[be]=r;for(let c=0;c<e;c++){const u=[];for(let d=0;d<t;d++){const h=Wr();u.push(h),s[h]={name:"cell",blockOrder:[],parentId:c.toString()},o[h]={row:c,col:d,colspan:1,rowspan:1};const p=Wr();s[p]={name:"text",blockOrder:[],parentId:h},s[h].blockOrder.push(p),o[p]={text:(n==null?void 0:n[c][d])||""}}i.push(u)}const l={tags:[],innerBlocks:s,blocksProps:o,desktop:i,mobile:i,tablet:i},a=Wr();return ae.dispatch(d7({id:a,table:l})),a},z4=()=>{const{editorSettings:e}=ae.getState(),t=e.timeTravel;return e.isSaving||t.lastSaved!==t.cursor},c_=(e,t=2)=>{const n=[];if(e<=t*3+2){for(let o=1;o<=e;o++)n.push(o);return n}for(let o=1;o<=t;o++)n.push(o);const r=Math.ceil(e/2-t/2);n.at(-1)<r-1&&n.push(0);for(let o=0;o<t;o++)n.push(r+o);n.push(0);for(let o=1;o<=t;o++)n.push(e-t+o);return n},Rj=e=>{if(navigator.clipboard){navigator.clipboard.writeText(e);return}const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},Hp="wptb:set-responsive-preview-mode",Ht=({children:e,active:t,onClick:n,tooltip:r,tooltipLeft:o,className:s})=>f.jsxs("button",{type:"button",className:et("wptb-toolbar-btn",s,{"wptb-active":t}),onClick:n,children:[e,r&&f.jsx("div",{className:et("wptb-control-tooltip",{"wptb-left":o,"wptb-up":!o}),children:r})]}),Lj=({tableId:e})=>{const[t,n]=A.useState(!1),r=async()=>{if(t)return;n(!0);const s=Math.floor(Math.random()*1e3);await K7(e,s),n(!1)},o=()=>{if(!e||!/^[0-9]+$/.test(e.toString())){Rn("Table not saved yet.","error");return}Rj(`[wptb id=${e}]`),Rn("Shortcode is copied to clipboard!","success")};return f.jsxs("div",{className:"wptb-toolbar-btns wptb-builder-preview",children:[f.jsxs("button",{type:"button",className:"wptb-toolbar-btn",onClick:r,children:[t?Ju:f.jsx(y5,{}),"Preview"]}),f.jsxs("button",{type:"button",className:"wptb-toolbar-btn",onClick:o,children:[iS,"Embed"]})]})},_j=({tableId:e})=>{const[t,n]=A.useState(!1),[r,o]=A.useState(!1),s=A.useMemo(()=>{const l=new URL(window.location.href);return l.searchParams.append("wptb-force-builder","legacy"),l.toString()},[e]),i=async()=>{if(o(!1),!t){n(!0);try{const l=new FormData;l.append("nonce",WPTB_CFG.SETTINGS.nonce.general),l.append("action","wptb_toggle_legacy_builder");const a=await fetch(WPTB_CFG.ADMIN_URL,{method:"POST",body:l}),c=await a.json();if(!a.ok){Rn(c.message||"Something went wrong","error");return}if(c.error){Rn(c.error,"error");return}Rn(c.message||"Settings saved successfully","success"),window.location.reload()}catch(l){console.log(l)}finally{n(!1)}}};return f.jsxs("div",{className:"wptb-toolbar-btns",children:[f.jsxs(M4,{children:[f.jsx(B4,{type:"button",className:"wptb-toolbar-btn",title:"Switch Builder",children:t?Ju:pm}),f.jsxs(P4,{className:"wptb-switch-builder-dropdown",children:[WPTB_CFG.SETTINGS.is_authorized&&f.jsxs("button",{type:"button",onClick:()=>o(!0),children:[pm,"Switch Permanently"]}),f.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:[f.jsx(y5,{}),"Open this table only"]})]})]}),r&&f.jsxs(X1,{onClose:()=>o(!1),title:"Are you sure to switch?",icon:Yw,children:[f.jsx("p",{children:"Are you sure you want to miss out on the new features and next generation experience? You can always switch back to the legacy builder."}),f.jsxs("div",{className:"wptb-v2-modal-actions",children:[f.jsx("button",{type:"button",onClick:i,children:"Yes"}),f.jsx("button",{type:"button",onClick:()=>o(!1),children:"No"})]})]})]})},Oj=()=>{const e=ke(n=>n.editorSettings.timeTravel.cursor>0),t=ke(n=>{const r=n.editorSettings.timeTravel;return r.cursor<r.total});return f.jsxs("div",{className:"wptb-toolbar-btns",children:[f.jsx(Ht,{tooltipLeft:!0,tooltip:"Undo",onClick:()=>Ue.by(-1),className:{"wptb-time-travel-disabled":!e},children:f.jsx(aS,{})}),f.jsx(Ht,{tooltipLeft:!0,tooltip:"Redo",onClick:()=>Ue.by(1),className:{"wptb-time-travel-disabled":!t},children:f.jsx(cS,{})})]})};function Mj({id:e,onSave:t,onClose:n}){const r=Es(),[o,s]=A.useState(!1),{devicePreview:i,isSaving:l,selectedCells:a}=ke(x=>x.editorSettings),c=ke(x=>{var w;const m=(w=x.editorSettings.activeBlock)==null?void 0:w[1];if(!m)return!1;const y=x.table[e].blocksProps[m];return y&&(y.rowspan>1||y.colspan>1)}),u=x=>{var y,w;document.dispatchEvent(new CustomEvent(Hp,{detail:x}));const m=d==null?void 0:d.responsive;if(x==="tablet"){const S=((y=m==null?void 0:m.tablet)==null?void 0:y.maxWidth)||Zn.responsive.tablet.maxWidth;r(Mt({devicePreview:x,previewWidth:S}));return}if(x==="mobile"){const S=((w=m==null?void 0:m.mobile)==null?void 0:w.maxWidth)||Zn.responsive.mobile.maxWidth;r(Mt({devicePreview:x,previewWidth:S}));return}r(Mt({devicePreview:x,previewWidth:void 0}))},d=g5([e,be]),h=ke(x=>{var m;return(m=x.table[e])==null?void 0:m.title}),p=ke(x=>{var m;return(m=x.table[e])==null?void 0:m.is_template}),g=A.useRef();A.useEffect(()=>{if(!(!d||i==="desktop"))return g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{g.current=null,r(f7({tableId:e,device:i}))},500),()=>{clearTimeout(g.current),g.current=null}},[i,d==null?void 0:d.responsive]);const v=ke(x=>x.editorSettings.activeBlock);return f.jsxs("div",{className:"wptb-toolbar",children:[f.jsx(Ro,{name:"toolbar",id:e}),f.jsxs("div",{className:"wptb-toolbar-main",children:[f.jsx("div",{className:"wptb-toolbar-section wptb-table-title",children:f.jsxs("div",{className:"wptb-toolbar-title-group",children:[f.jsx("div",{children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:f.jsx("path",{fill:"currentColor",d:"M10.5 20V7H5V4h14v3h-5.5v13z"})})}),f.jsx("input",{type:"text",placeholder:"Table title",value:h||"",onInput:x=>r(lp({id:e,title:x.currentTarget.value}))})]})}),f.jsxs("div",{className:"wptb-toolbar-section",children:[f.jsx(Oj,{}),f.jsxs("div",{className:"wptb-toolbar-btns",children:[f.jsx(Ht,{tooltipLeft:!0,tooltip:"Mobile preview",active:i==="mobile",onClick:()=>u("mobile"),children:f.jsx(F6,{})}),f.jsx(Ht,{tooltipLeft:!0,tooltip:"Preview on Tablet",active:i==="tablet",onClick:()=>u("tablet"),children:f.jsx(U6,{})}),f.jsx(Ht,{tooltipLeft:!0,tooltip:"Preview on Desktop",active:i==="desktop",onClick:()=>u("desktop"),children:f.jsx(V6,{})})]}),f.jsx(Lj,{tableId:e}),f.jsx(_j,{tableId:e}),f.jsxs("div",{className:"wptb-toolbar-btns wptb-builder-save",children:[f.jsx("button",{type:"button",className:"wptb-toolbar-btn",onClick:()=>G7(e,t),children:l?f.jsxs(f.Fragment,{children:[f.jsx(z6,{}),"Saving..."]}):f.jsxs(f.Fragment,{children:[f.jsx(uS,{}),p?"Template":"Save"]})}),f.jsxs(M4,{children:[f.jsx(B4,{type:"button",className:"wptb-toolbar-btn",children:Zw}),f.jsxs(P4,{className:"wptb-save-as",children:[f.jsxs("button",{onClick:()=>{r(lp({id:e,is_template:!1}))},children:[f.jsx($6,{}),"Save as Table"]}),f.jsx(Tt,{name:"global.save_as_template",noOverlayText:!0,children:f.jsxs("button",{children:[f.jsx(q6,{}),"Save as Template"]})})]})]})]}),f.jsx("div",{className:"wptb-toolbar-btns wptb-builder-close",children:f.jsx("button",{type:"button",className:"wptb-toolbar-btn",onClick:()=>z4()?s(!0):n(),children:v5})})]})]}),f.jsx("div",{className:"wptb-toolbar-secondary",children:f.jsxs("div",{className:"wptb-toolbar-btns",onPointerUp:x=>x.stopPropagation(),children:[f.jsx(Ht,{tooltip:"Add Column to Left",onClick:()=>Gs.addCol(!1),children:f.jsx(dS,{})}),f.jsx(Ht,{tooltip:"Add Column to Right",onClick:()=>Gs.addCol(!0),children:f.jsx(fS,{})}),f.jsx(Ht,{tooltip:"Add Row Above",onClick:()=>Gs.addRow(!1),children:f.jsx(gS,{})}),f.jsx(Ht,{tooltip:"Add Row Below",onClick:()=>Gs.addRow(!0),children:f.jsx(mS,{})}),v&&f.jsxs(f.Fragment,{children:[f.jsx(Ht,{tooltip:"Delete Column",onClick:Gs.deleteCol,children:f.jsx(hS,{})}),f.jsx(Ht,{tooltip:"Delete Row",onClick:Gs.deleteRow,children:f.jsx(vS,{})}),f.jsx(Tt,{name:"global.duplicate_column",noOverlayText:!0,children:f.jsx(Ht,{tooltip:"Duplicate Column",children:f.jsx(pS,{})})}),f.jsx(Tt,{name:"global.duplicate_row",noOverlayText:!0,children:f.jsx(Ht,{tooltip:"Duplicate Row",children:f.jsx(yS,{})})})]}),a&&f.jsx(Ht,{tooltip:"Merge Cells",onClick:bs.doMerging,children:f.jsx(wS,{})}),c&&f.jsx(Ht,{tooltip:"Split Cell",onClick:bs.splitCell,children:f.jsx(bS,{})})]})}),o&&f.jsxs(X1,{onClose:()=>s(!1),title:"Discard changes?",icon:Yw,children:[f.jsxs("p",{children:["You have unsaved changes.",f.jsx("br",{}),"Are you sure you want to exit without saving?"]}),f.jsxs("div",{className:"wptb-v2-modal-actions",children:[f.jsx("button",{type:"button",onClick:n,children:"Yes"}),f.jsx("button",{type:"button",onClick:()=>s(!1),children:"No"})]})]})]})}function $v({name:e,icon:t,title:n,isUpsell:r,showUpsell:o}){const s=A.useRef();return A.useEffect(()=>{if(!s.current)return;function i(l){l.preventDefault(),r?o==null||o(e):jo.startInsertion(e,this)}return s.current.addEventListener("mousedown",i),()=>{var l;(l=s.current)==null||l.removeEventListener("mousedown",i)}},[s.current]),f.jsxs("button",{type:"button",className:et("wptb-element",{"wptb-upsell-element":r}),ref:s,children:[t,f.jsx("span",{children:n})]})}function Bj(){return f.jsxs("div",{className:"wptb-controls",children:[f.jsx(_t,{title:"BASIC",initialOpen:!0,className:"wptb-elements-grid",children:Rw.map(({name:e,title:t,icon:n})=>f.jsx($v,{name:e,title:t,icon:n},e))}),f.jsx(_t,{title:"PRO",initialOpen:!0,className:"wptb-elements-grid",children:_l.map(({name:e,title:t,icon:n,isUpsell:r})=>f.jsx($v,{name:e,title:t,icon:n,isUpsell:r,showUpsell:sa},e))})]})}const D4=e=>{const t=new URL(e,"https://protibimbok.github.io"),n=WPTB_CFG.API_BASE.replace("wp-table-builder","wp-table-builder/"+t.pathname.replace(/^\//,"")),r=new URL(n),o=new URLSearchParams(r.search);return new URLSearchParams(t.search).forEach((i,l)=>{o.set(l,i)}),r.search=o.toString(),r.toString()},u_=async(e,t,n)=>{let r=t,o="application/json";typeof t=="object"&&!(t instanceof FormData)?r=JSON.stringify(t):t instanceof FormData&&(o="multipart/form-data");const s=await fetch(D4(e),{...n,method:"POST",body:r,headers:{"Content-Type":o,...n==null?void 0:n.headers,"X-WP-Nonce":WPTB_CFG.NONCE.wp_rest}});return[await s.json(),s]},Pj=async(e,t)=>await(await fetch(D4(e),{...t,headers:{...t==null?void 0:t.headers,"X-WP-Nonce":WPTB_CFG.NONCE.wp_rest}})).json();let xc={};const zj=({id:e})=>{const[t,n]=A.useState(xc),r=ke(l=>l.table[e].tags),o=Es(),s=l=>{o(lp({id:e,tags:l}))};A.useEffect(()=>{if(Object.keys(xc).length)return;const l=new AbortController;return Pj("/v1/tags",{signal:l.signal}).then(a=>{xc=a.tags,n(a.tags)}).catch(a=>{}),()=>l.abort()},[]);const i=async l=>{try{const a=new FormData;a.append("nonce",WPTB_CFG.NONCE.create_term),a.append("action","wptb_create_term"),a.append("termData",JSON.stringify(l));const u=await(await fetch(WPTB_CFG.ADMIN_URL,{method:"POST",body:a})).json();if(u.error)throw new Error(u.error);const d={};let h=0;const p=u.data.tags;for(const g in p){const{term_id:v,name:x}=p[g];d[v]=x,x===l.name&&(h=v)}return xc=d,n(d),h}catch(a){Rn(a.message||"Tag adding failed","error")}return 0};return f.jsx(_t,{title:"TAGS",children:f.jsx(jj,{tags:t,value:r||[],onChange:s,onNewTag:i})})},Dj=({blockProps:e,setBlockProps:t})=>f.jsxs("div",{className:"wptb-control-group",children:[f.jsx(yr,{label:"Header Background",value:e==null?void 0:e.headerBg,onReset:()=>t({headerBg:void 0}),onChange:n=>t({headerBg:n})}),f.jsx(yr,{label:"Odd Row Background",value:e==null?void 0:e.oddRowBg,onReset:()=>t({oddRowBg:void 0}),onChange:n=>t({oddRowBg:n})}),f.jsx(yr,{label:"Even Row Background",value:e==null?void 0:e.evenRowBg,onReset:()=>t({evenRowBg:void 0}),onChange:n=>t({evenRowBg:n})})]}),Hj=({blockProps:e,setBlockProps:t})=>f.jsxs("div",{className:"wptb-control-group",children:[f.jsx(yr,{label:"Header Background",value:e==null?void 0:e.hoverHeaderBg,onReset:()=>t({hoverHeaderBg:void 0}),onChange:n=>t({hoverHeaderBg:n})}),f.jsx(yr,{label:"Odd Row Background",value:e==null?void 0:e.hoverOddRowBg,onReset:()=>t({hoverOddRowBg:void 0}),onChange:n=>t({hoverOddRowBg:n})}),f.jsx(yr,{label:"Even Row Background",value:e==null?void 0:e.hoverEvenRowBg,onReset:()=>t({hoverEvenRowBg:void 0}),onChange:n=>t({hoverEvenRowBg:n})})]});function $j({id:e}){var s,i;const t=ke(l=>{var a;return(a=l.table[e])==null?void 0:a.blocksProps[be]}),n=A.useCallback(l=>{Ue.updateProps(be,l)},[]),[r,o]=A.useState("general");return t?f.jsxs("div",{className:"wptb-controls",children:[f.jsx(Ro,{name:"table",props:t,setProps:n}),f.jsxs(_t,{title:"GENERAL",className:"wptb-settings",children:[f.jsx(qr,{label:"Cell Padding",value:t.cellPadding,onChange:l=>n({cellPadding:l})}),f.jsx(m5,{label:"Alignment",value:t.alignment,onChange:l=>n({alignment:l}),items:[{label:"Align Left",value:"left",icon:X7},{label:"Align Center",value:"center",icon:J7},{label:"Align Right",value:"right",icon:eS}]}),f.jsx(Ge,{label:"Table Container Max Width",checked:t.enableMaxWidth,onChange:l=>n({enableMaxWidth:l})}),t.enableMaxWidth&&f.jsx(qr,{label:"Table Container Max Width",value:t.maxWidth,onChange:l=>n({maxWidth:l}),allowedUnits:{px:{max:2e3},rem:{max:100},em:{max:100}},allowOutOfRange:!0}),f.jsx(qr,{label:"Cell Min Auto Width",value:t.cellMinWidth,onChange:l=>n({cellMinWidth:l}),allowedUnits:{px:{max:500}},allowOutOfRange:!0}),f.jsx(Ge,{label:"Sort Table Horizontally",checked:!!((s=t.sortHorizontal)!=null&&s.enable),onChange:l=>n({sortHorizontal:{...t.sortHorizontal,enable:l},sortVertical:{...t.sortVertical,enable:!1}})}),f.jsx(Ge,{label:"Sort Table Vertically",checked:!!((i=t.sortVertical)!=null&&i.enable),onChange:l=>n({sortVertical:{...t.sortVertical,enable:l},sortHorizontal:{...t.sortHorizontal,enable:!1}})}),f.jsx(Tt,{name:"global.separate_row_col",children:f.jsx(Ge,{label:"Separate Rows/Columns",checked:t.separateRowCol})})]}),f.jsx(_t,{title:"FONT STYLE",className:"wptb-settings",children:f.jsxs(Tt,{name:"global.font_style",children:[f.jsx(yr,{label:"Font Color",value:t.fontColor}),f.jsx(yr,{label:"Link Color",value:t.linkColor}),f.jsx(qr,{label:"Font Size",value:t.fontSize})]})}),f.jsxs(_t,{title:"BORDER",className:"wptb-settings",children:[f.jsx(ap,{label:"Table Border",value:t.tableBorder,onChange:l=>n({tableBorder:l}),onReset:()=>n({tableBorder:void 0})}),f.jsx(Ge,{label:"Enable Inner Border",checked:t.enableInnerBorder,onChange:l=>n({enableInnerBorder:l})}),t.enableInnerBorder&&f.jsxs(f.Fragment,{children:[f.jsx(ap,{label:"Inner Border",value:t.innerBorder,onChange:l=>n({innerBorder:l}),onReset:()=>n({innerBorder:void 0})}),f.jsx(Ge,{label:"Header Inner Border",checked:t.headerInnerBorder,onChange:l=>n({headerInnerBorder:l})}),f.jsxs(Tt,{name:"global.row_col_border",children:[f.jsx(Ge,{label:"Column Only Border",checked:t.columnBorderOnly}),f.jsx(Ge,{label:"Row Only Border",checked:t.rowBorderOnly})]}),f.jsx(Tt,{name:"global.cell_radius",children:f.jsx(CS,{label:"Cell Border Radius",value:t.innerBorderRadius})})]})]}),f.jsx(_t,{title:"BACKGROUND",className:"wptb-settings",children:f.jsx(O4,{active:r,setActive:o,tabs:{general:{title:"General",component:Dj},hover:{title:"Hover",component:Hj}},props:{blockProps:t,setBlockProps:n}})}),f.jsx(_t,{title:"SCROLL",className:"wptb-settings",children:f.jsx(Ge,{label:"Enable horizontal scrolling",checked:t.scrollX,onChange:l=>n({scrollX:l})})}),f.jsxs(_t,{title:"STYLES",className:"wptb-settings",children:[f.jsx(Ge,{label:"Disable theme styles",checked:t.disableThemeStyles,onChange:l=>n({disableThemeStyles:l})}),t.disableThemeStyles&&f.jsx(M5,{label:"Extra Styles",value:t.extraStyles,onChange:l=>n({extraStyles:l})})]}),f.jsx(_t,{title:"STICKY",className:"wptb-settings",children:f.jsxs(Tt,{name:"global.sticky",children:[f.jsx(Ge,{label:"Make Top Row Sticky",checked:t.stickyTopRow}),f.jsx(Ge,{label:"Make First Column Sticky",checked:t.stickyFirstColumn})]})}),f.jsx(_t,{title:"PAGINATION",className:"wptb-settings",children:f.jsxs(Tt,{name:"global.pagination",children:[f.jsx(Ge,{label:"Enable pagination",checked:t.paginationEnable}),f.jsx(B5,{label:"Rows Per Page",value:t.rowsPerPage}),f.jsx(Ge,{label:"Dynamic Rows Per Page",checked:t.dyanamicPageSize})]})}),f.jsx(_t,{title:"SEARCH",className:"wptb-settings",children:f.jsxs(Tt,{name:"global.search",children:[f.jsx(Ge,{label:"Enable search",checked:t.searchEnable}),f.jsx(Ge,{label:"Keep top row as header",checked:t.searchKeepHeader}),f.jsx(x0,{label:"Search Bar Position",value:t.searchPosition,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]})]})}),f.jsx(zj,{id:e})]}):null}const qj=({blockProps:e,setBlockProps:t})=>f.jsx(f.Fragment,{children:f.jsxs(_t,{title:"Cell Control",className:"wptb-settings",children:[f.jsx(m5,{label:"Vertical Alignment",value:e.vAlign,items:[{label:"Top",value:"top",icon:tS},{label:"Middle",value:"middle",icon:rS},{label:"Bottom",value:"bottom",icon:nS}],onChange:n=>t({vAlign:n})}),f.jsx(Tt,{name:"cell.bg",noOverlayText:!0,children:f.jsx(yr,{label:"Cell Background",value:e.background})}),f.jsx(Tt,{name:"cell.border",noOverlayText:!0,children:f.jsx(ap,{label:"Cell Border",value:e.border})}),f.jsx(Tt,{name:"cell.empty",noOverlayText:!0,children:f.jsx(Ge,{label:"Empty Cell",checked:e.isEmpty})})]})}),Fj=({id:e,col:t,row:n})=>{var a,c;const r=ke(u=>u.table[e].blocksProps[be]),o=((a=r.columnsProps)==null?void 0:a[t])||{},s=u=>{Ue.updateProps(be,{columnsProps:{...r.columnsProps,[t]:{...o,...u}}})},i=((c=r.rowsProps)==null?void 0:c[n])||{},l=u=>{Ue.updateProps(be,{rowsProps:{...r.rowsProps,[n]:{...i,...u}}})};return f.jsxs(_t,{title:"Row & Column Control",className:"wptb-settings",children:[f.jsx(Ro,{name:"column",props:o,setProps:s}),f.jsx(qr,{label:"Column Width",value:o.width,onChange:u=>s({width:u}),onReset:()=>s({width:void 0}),allowedUnits:{px:{max:500}},allowOutOfRange:!0}),f.jsx(Tt,{name:"global.highlight_col",noOverlayText:!0,children:f.jsx(Ge,{label:"Highlight this column",checked:o.highlight,onChange:u=>s({highlight:u})})}),f.jsx(Ge,{label:"Hide this column on mobile",checked:o.hideOnMobile,onChange:u=>s({hideOnMobile:u})}),i&&f.jsxs(f.Fragment,{children:[f.jsx(Ro,{name:"row",props:i,setProps:l}),f.jsx(qr,{label:"Row Height",value:i.height,onChange:u=>l({height:u}),onReset:()=>l({height:void 0}),allowOutOfRange:!0,allowedUnits:{px:{max:500}}}),f.jsx(Tt,{name:"global.highlight_row",noOverlayText:!0,children:f.jsx(Ge,{label:"Highlight this row",checked:i.highlight})}),f.jsx(Tt,{name:"row.background",noOverlayText:!0,children:f.jsx(yr,{label:"Row Background",value:i.background})})]})]})},Uj=({id:e,blockPath:t})=>{var u;const n=A.useRef(null),r=ke(d=>d.table[e]),{cell:o,block:s,others:i}=A.useMemo(()=>{const d=[],{blocksProps:h,innerBlocks:p}=r,g=t[1],v=t[2],x=p[g];if(!x)return{others:d};const m={name:x.name,props:h[g],blockId:g,blockPath:t.slice(0,2)};let y;v&&(y={name:p[v].name,props:h[v],blockId:v,blockPath:t.slice(0,3)});for(let w=3;w<t.length;w++){const S=t[w];d.push({name:p[S].name,props:h[S],blockId:S,blockPath:t.slice(0,w+1)})}return{cell:m,block:y,others:d}},[r,t]);A.useEffect(()=>{const d=n.current;if(!d)return;const h=p=>{p.stopPropagation()};return d.addEventListener("pointerup",h),()=>{d==null||d.removeEventListener("pointerup",h)}},[n.current]);const l=s&&((u=Qr[s.name])==null?void 0:u.Control),a=d=>Ue.updateProps(s.blockId,d),c=d=>Ue.updateProps(o.blockId,d);return f.jsxs("div",{className:"wptb-block-control wptb-controls",ref:n,children:[i.map(({name:d,props:h,blockId:p,blockPath:g})=>{var m;const v=(m=Qr[d])==null?void 0:m.Control,x=y=>Ue.updateProps(p,y);return v&&f.jsxs(A.Fragment,{children:[f.jsx(Ro,{name:d,props:h,setProps:x,blockPath:g}),f.jsx(v,{blockPath:g,setBlockProps:x,blockProps:h})]},p)}),l&&f.jsxs(A.Fragment,{children:[f.jsx(Ro,{name:s.name,props:s.props,setProps:a,blockPath:s.blockPath}),f.jsx(l,{blockPath:s.blockPath,setBlockProps:a,blockProps:s.props})]},s.blockId),o&&f.jsxs(A.Fragment,{children:[f.jsx(Ro,{name:"cell",props:o.props,setProps:c,blockPath:o.blockPath}),f.jsx(qj,{id:e,blockProps:o.props,setBlockProps:c,blockPath:o.blockPath}),f.jsx(Fj,{id:e,col:o.props.col,row:o.props.row})]},o.blockId)]})},qv=({props:e,setProps:t})=>{const n=Es(),r=o=>{n(Mt({previewWidth:o})),t({maxWidth:o})};return f.jsxs("div",{className:"wptb-control-group",children:[f.jsx(Ro,{name:"responsive",props:e,setProps:t}),f.jsx(Tt,{name:"global.disable_responsive",noOverlayText:!0,children:f.jsx(Ge,{label:"Disable Breakpoint",checked:e==null?void 0:e.disable,onChange:o=>t({disable:o})})}),f.jsx(qr,{label:"Max Width",value:e==null?void 0:e.maxWidth,onChange:r,allowedUnits:{px:{max:1500,min:375}},allowOutOfRange:!0}),f.jsx(Ge,{label:(e==null?void 0:e.stackDirection)==="row"?"First Row As Header":"First Column As Header",checked:e==null?void 0:e.enableHead,onChange:o=>t({enableHead:o})}),f.jsx(Ge,{label:(e==null?void 0:e.stackDirection)==="row"?"Static First Row":"Static First Column",checked:e==null?void 0:e.staticHead,onChange:o=>t({staticHead:o})}),f.jsx(x0,{label:"Stack Direction",value:e==null?void 0:e.stackDirection,onChange:o=>t({stackDirection:o}),options:[{label:"Row",value:"row"},{label:"Column",value:"column"}]}),f.jsx(B5,{label:"Items Per Head",value:e==null?void 0:e.itemsPerHead,onChange:o=>t({itemsPerHead:Math.max(o,1)}),min:1,max:10,allowOutOfRange:!0})]})},Vj=()=>f.jsx("div",{className:"wptb-control-group",children:f.jsxs("div",{className:"wptb-responsive-warning",children:[f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M16 352a48.05 48.05 0 0 0 48 48h133.88l-4 32H144a16 16 0 0 0 0 32h224a16 16 0 0 0 0-32h-49.88l-4-32H448a48.05 48.05 0 0 0 48-48v-48H16Zm240-16a16 16 0 1 1-16 16a16 16 0 0 1 16-16M496 96a48.05 48.05 0 0 0-48-48H64a48.05 48.05 0 0 0-48 48v192h480Z"})}),f.jsx("p",{children:"You can set responsive properties only for mobile or tablet."})]})});function Wj({id:e}){const t=Es(),n=ke(c=>{var u;return(u=c.table[e].blocksProps[be])==null?void 0:u.responsive}),r=ke(c=>c.editorSettings.previewWidth),o=ke(c=>c.editorSettings.devicePreview),s=c=>{Ue.updateProps(be,{responsive:{...n,...c}})},i=(c,u)=>{n&&s({...n,[c]:{...n[c],...u}})},l=c=>{var u,d;if(c==="tablet"){const h=((u=n==null?void 0:n.tablet)==null?void 0:u.maxWidth)||Zn.responsive.tablet.maxWidth;t(Mt({devicePreview:c,previewWidth:h}));return}if(c==="mobile"){const h=((d=n==null?void 0:n.mobile)==null?void 0:d.maxWidth)||Zn.responsive.mobile.maxWidth;t(Mt({devicePreview:c,previewWidth:h}));return}t(Mt({devicePreview:c,previewWidth:void 0}))},a=c=>{var h,p;const u=((h=n==null?void 0:n.mobile)==null?void 0:h.maxWidth)||Zn.responsive.mobile.maxWidth,d=((p=n==null?void 0:n.tablet)==null?void 0:p.maxWidth)||Zn.responsive.tablet.maxWidth;c<u?t(Mt({devicePreview:"mobile",previewWidth:c})):c<d?t(Mt({devicePreview:"tablet",previewWidth:c})):t(Mt({devicePreview:"desktop",previewWidth:c}))};return f.jsxs("div",{className:"wptb-controls wptb-settings",children:[f.jsxs(_t,{title:"General",initialOpen:!0,children:[f.jsx(Ge,{label:"Enable Responsive Table",checked:n==null?void 0:n.enable,onChange:c=>s({...n,enable:c})}),f.jsx(x0,{label:"Width Target",value:n==null?void 0:n.widthTarget,onChange:c=>s({...n,widthTarget:c}),options:[{label:"Window",value:"window"},{label:"Container",value:"container"}]}),f.jsx(qr,{label:"Preview Width",value:r,onChange:a,allowOutOfRange:!0,allowedUnits:{px:{max:2e3}}})]}),f.jsx(_t,{initialOpen:!0,title:"Breakpoints",children:f.jsx(O4,{active:o,setActive:l,tabs:{mobile:{title:"Mobile",component:qv},tablet:{title:"Tablet",component:qv},desktop:{title:"Desktop",component:Vj}},props:o==="desktop"?{}:{props:n==null?void 0:n[o],setProps:c=>i(o,c)}})})]})}function Gj({id:e}){const[t,n]=A.useState("elements"),r=A.useRef(t),o=ke(s=>s.editorSettings.activeBlock);return A.useEffect(()=>{const s=()=>{n("responsive")};return document.addEventListener(Hp,s),()=>{document.removeEventListener(Hp,s)}},[]),A.useEffect(()=>{const s=r.current;r.current=t,s==="responsive"&&ae.dispatch(Mt({devicePreview:"desktop",previewWidth:void 0}))},[t]),f.jsxs("div",{className:"wptb-control-panel",children:[f.jsxs("div",{className:"wptb-control-top",children:[f.jsx("button",{type:"button",className:et("wptb-tab-btn",{"wptb-active":!o&&t==="elements"}),onClick:()=>n("elements"),children:"Elements"}),f.jsx("button",{type:"button",className:et("wptb-tab-btn",{"wptb-active":!o&&t==="settings"}),onClick:()=>n("settings"),children:"Settings"}),f.jsx("button",{type:"button",className:et("wptb-tab-btn",{"wptb-active":!o&&t==="responsive"}),onClick:()=>n("responsive"),children:"Responsive"})]}),o?f.jsx(Uj,{blockPath:o,id:e}):t==="elements"&&f.jsx(Bj,{})||t==="settings"&&f.jsx($j,{id:e})||t==="responsive"&&f.jsx(Wj,{id:e})]})}const Kj=({name:e})=>f.jsxs("div",{children:["This block is invalid: ",e]}),H4=({id:e,index:t,ancestor:n})=>{var c;const r=n[0],o=ke(u=>u.table[r].innerBlocks[e]),s=A.useMemo(()=>[...n,e],[n,e]),{name:i,blockOrder:l}=o,a=((c=Qr[o.name])==null?void 0:c.Edit)??Kj;return f.jsx(a,{blockPath:s,index:t,name:i,children:l.map((u,d)=>f.jsx(H4,{id:u,index:d,ancestor:s},u))})},$4=({tableId:e,cellId:t,tableProps:n,isResponsive:r,isRowEnding:o})=>{var x,m,y;const s=g5([e,t]),{row:i,col:l,isEmpty:a,isNotACell:c}=s,u=W7(s,n,r),d=ke(w=>{var S;return(S=w.table[e].innerBlocks[t])==null?void 0:S.blockOrder}),h=A.useMemo(()=>{const w=[e,t];return a?null:d.map((S,k)=>f.jsx(H4,{id:S,index:k,ancestor:w},S))},[t,a,d,e]),p=ke(w=>{var S;return(S=w.editorSettings.selectedCells)==null?void 0:S[t]}),g=ke(w=>{var S;return((S=w.editorSettings.activeBlock)==null?void 0:S.at(-1))===t}),v=ke(w=>{var S;return((S=w.editorSettings.activeBlock)==null?void 0:S[1])===t});if(!(c&&(!r||!((x=s.responsive)!=null&&x.isVisible))))return A.createElement("td",{...u,key:t,className:et({"wptb-selected-cell":p,"wptb-empty":a,"wptb-cell-placeholder":!a&&!(d!=null&&d.length),"wptb-cell-active":g,"wptb-cell-has-active":v,"wptb-row-ending-cell":o,"wptb-tmp-cell":c}),onMouseLeave:jo.onCellLeave,onMouseEnter:w=>jo.onCellEnter(w,t),onMouseMove:jo.onCellMove,onPointerDownCapture:w=>bs.markCells(w,t),onClick:w=>{!w.wptbActivatedEdit&&!c&&ae.dispatch(oa([e,t]))}},h,(m=n.sortVertical)!=null&&m.enable||(y=n.sortHorizontal)!=null&&y.enable?f.jsx("button",{className:"wptb-sort-button",onClick:w=>{var S,k;(S=n.sortVertical)!=null&&S.enable?Oo.sortTableV(w.currentTarget.parentElement,i,n.sortVertical):(k=n.sortHorizontal)!=null&&k.enable&&Oo.sortTableH(w.currentTarget.parentElement,l,n.sortHorizontal)}}):null)},ud=0,Uo=1,Gi=2,q4=4;function Fv(e){return()=>e}function Yj(e){e()}function Nu(e,t){return n=>e(t(n))}function Uv(e,t){return()=>e(t)}function Zj(e,t){return n=>e(t,n)}function k0(e){return e!==void 0}function Qj(...e){return()=>{e.map(Yj)}}function Na(){}function dd(e,t){return t(e),e}function Xj(e,t){return t(e)}function Ve(...e){return e}function je(e,t){return e(Uo,t)}function de(e,t){e(ud,t)}function T0(e){e(Gi)}function ot(e){return e(q4)}function J(e,t){return je(e,Zj(t,ud))}function er(e,t){const n=e(Uo,r=>{n(),t(r)});return n}function Vv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function F4(e,t){return e===t}function qe(e=F4){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ie(e){return t=>n=>{e(n)&&t(n)}}function W(e){return t=>Nu(t,e)}function fr(e){return t=>()=>{t(e)}}function O(e,...t){const n=Jj(...t);return(r,o)=>{switch(r){case Gi:T0(e);return;case Uo:return je(e,n(o))}}}function gr(e,t){return n=>r=>{n(t=e(t,r))}}function ks(e){return t=>n=>{e>0?e--:t(n)}}function Fr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function he(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const l=Math.pow(2,i);je(s,a=>{const c=n;n=n|l,t[i]=a,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const l=()=>{s([i].concat(t))};n===o?l():r=l}}function Jj(...e){return t=>e.reduceRight(Xj,t)}function eR(e){let t,n;const r=()=>t==null?void 0:t();return function(o,s){switch(o){case Uo:return s?n===s?void 0:(r(),n=s,t=je(e,s),t):(r(),Na);case Gi:r(),n=null;return}}}function $(e){let t=e;const n=ye();return(r,o)=>{switch(r){case ud:t=o;break;case Uo:{o(t);break}case q4:return t}return n(r,o)}}function Pt(e,t){return dd($(t),n=>J(e,n))}function ye(){const e=[];return(t,n)=>{switch(t){case ud:e.slice().forEach(r=>{r(n)});return;case Gi:e.splice(0,e.length);return;case Uo:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function pn(e){return dd(ye(),t=>J(e,t))}function Ie(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:tR(),singleton:n}}const tR=()=>Symbol();function nR(e){const t=new Map,n=({constructor:r,dependencies:o,id:s,singleton:i})=>{if(i&&t.has(s))return t.get(s);const l=r(o.map(a=>n(a)));return i&&t.set(s,l),l};return n(e)}function at(...e){const t=ye(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const l=Math.pow(2,i);je(s,a=>{n[i]=a,r=r|l,r===o&&de(t,n)})}),function(s,i){switch(s){case Gi:{T0(t);return}case Uo:return r===o&&i(n),je(t,i)}}}function ne(e,t=F4){return O(e,qe(t))}function $p(...e){return function(t,n){switch(t){case Gi:return;case Uo:return Qj(...e.map(r=>je(r,n)))}}}var gn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(gn||{});const rR={0:"debug",3:"error",1:"log",2:"warn"},oR=()=>typeof globalThis>"u"?window:globalThis,Vo=Ie(()=>{const e=$(3);return{log:$((t,n,r=1)=>{var o;const s=(o=oR().VIRTUOSO_LOG_LEVEL)!=null?o:ot(e);r>=s&&console[rR[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Ts(e,t,n){return E0(e,t,n).callbackRef}function E0(e,t,n){const r=Z.useRef(null);let o=i=>{};const s=Z.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(i=>{const l=()=>{const a=i[0].target;a.offsetParent!==null&&e(a)};n?l():requestAnimationFrame(l)}):null,[e,n]);return o=i=>{i&&t?(s==null||s.observe(i),r.current=i):(r.current&&(s==null||s.unobserve(r.current)),r.current=null)},{callbackRef:o,ref:r}}function sR(e,t,n,r,o,s,i,l,a){const c=Z.useCallback(u=>{const d=iR(u.children,t,"offsetHeight",o);let h=u.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const p=h.lastElementChild.dataset.viewportType==="window";let g;p&&(g=h.ownerDocument.defaultView);const v=i?i.scrollTop:p?g.scrollY||g.document.documentElement.scrollTop:h.scrollTop,x=i?i.scrollHeight:p?g.document.documentElement.scrollHeight:h.scrollHeight,m=i?i.offsetHeight:p?g.innerHeight:h.offsetHeight;r({scrollHeight:x,scrollTop:Math.max(v,0),viewportHeight:m}),d!==null&&e(d)},[e,t,o,s,i,r,l]);return E0(c,n,a)}function iR(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const l=e.item(i);if(l.dataset.index===void 0)continue;const a=parseInt(l.dataset.index),c=parseFloat(l.dataset.knownSize),u=t(l,n);if(u===0&&r("Zero-sized element, this should not happen",{child:l},gn.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==a-1?s.push({endIndex:a,size:u,startIndex:a}):s[s.length-1].endIndex++}return s}function U4(e,t,n){const r=Z.useRef(null),o=Z.useCallback(a=>{if(!(a!=null&&a.offsetParent))return;const c=a.getBoundingClientRect(),u=c.width;let d,h;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;h=p.height-Math.max(0,g),d=g+t.scrollTop}else{const p=i.current.ownerDocument.defaultView;h=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:h,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:s,ref:i}=E0(o,!0,n),l=Z.useCallback(()=>{o(i.current)},[o,i]);return Z.useEffect(()=>{var a;if(t){t.addEventListener("scroll",l);const c=new ResizeObserver(()=>{requestAnimationFrame(l)});return c.observe(t),()=>{t.removeEventListener("scroll",l),c.unobserve(t)}}else{const c=(a=i.current)==null?void 0:a.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",l),c==null||c.addEventListener("resize",l),()=>{c==null||c.removeEventListener("scroll",l),c==null||c.removeEventListener("resize",l)}}},[l,t,i]),s}const Wt=Ie(()=>{const e=ye(),t=ye(),n=$(0),r=ye(),o=$(0),s=ye(),i=ye(),l=$(0),a=$(0),c=$(0),u=$(0),d=ye(),h=ye(),p=$(!1),g=$(!1),v=$(!1);return J(O(e,W(({scrollTop:x})=>x)),t),J(O(e,W(({scrollHeight:x})=>x)),i),J(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:a,footerHeight:u,headerHeight:l,horizontalDirection:g,scrollBy:h,scrollContainerState:e,scrollHeight:i,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:v,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:s}},[],{singleton:!0}),pa={lvl:0};function V4(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:l,value:a}=t(e[i]);s.push({end:l-1,start:r,value:o}),r=l,o=a}return s.push({end:1/0,start:r,value:o}),s}function Be(e){return e===pa}function ga(e,t){if(!Be(e))return t===e.k?e.v:t<e.k?ga(e.l,t):ga(e.r,t)}function rr(e,t,n="k"){if(Be(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=rr(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return rr(e.l,t,n)}function cn(e,t,n){return Be(e)?K4(t,n,1):t===e.k?ft(e,{k:t,v:n}):t<e.k?Wv(ft(e,{l:cn(e.l,t,n)})):Wv(ft(e,{r:cn(e.r,t,n)}))}function Ci(){return pa}function fd(e,t,n){if(Be(e))return[];const r=rr(e,t)[0];return lR(Fp(e,r,n))}function qp(e,t){if(Be(e))return pa;const{k:n,l:r,r:o}=e;if(t===n){if(Be(r))return o;if(Be(o))return r;{const[s,i]=G4(r);return Dc(ft(e,{k:s,l:W4(r),v:i}))}}else return t<n?Dc(ft(e,{l:qp(r,t)})):Dc(ft(e,{r:qp(o,t)}))}function cs(e){return Be(e)?[]:[...cs(e.l),{k:e.k,v:e.v},...cs(e.r)]}function Fp(e,t,n){if(Be(e))return[];const{k:r,l:o,r:s,v:i}=e;let l=[];return r>t&&(l=l.concat(Fp(o,t,n))),r>=t&&r<=n&&l.push({k:r,v:i}),r<=n&&(l=l.concat(Fp(s,t,n))),l}function Dc(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Jf(t))return Y4(ft(e,{lvl:n-1}));if(!Be(t)&&!Be(t.r))return ft(t.r,{l:ft(t,{r:t.r.l}),lvl:n,r:ft(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Jf(e))return Up(ft(e,{lvl:n-1}));if(!Be(r)&&!Be(r.l)){const o=r.l,s=Jf(o)?r.lvl-1:r.lvl;return ft(o,{l:ft(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Up(ft(r,{l:o.r,lvl:s}))})}else throw new Error("Unexpected empty nodes")}}function ft(e,t){return K4(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function W4(e){return Be(e.r)?e.l:Dc(ft(e,{r:W4(e.r)}))}function Jf(e){return Be(e)||e.lvl>e.r.lvl}function G4(e){return Be(e.r)?[e.k,e.v]:G4(e.r)}function K4(e,t,n,r=pa,o=pa){return{k:e,l:r,lvl:n,r:o,v:t}}function Wv(e){return Up(Y4(e))}function Y4(e){const{l:t}=e;return!Be(t)&&t.lvl===e.lvl?ft(t,{r:ft(e,{l:t.r})}):e}function Up(e){const{lvl:t,r:n}=e;return!Be(n)&&!Be(n.r)&&n.lvl===t&&n.r.lvl===t?ft(n,{l:ft(e,{r:n.l}),lvl:t+1}):e}function lR(e){return V4(e,({k:t,v:n})=>({index:t,value:n}))}function Z4(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ma(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const C0=Ie(()=>({recalcInProgress:$(!1)}),[],{singleton:!0});function Q4(e,t,n){return e[Au(e,t,n)]}function Au(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],l=n(i,t);if(l===0)return s;if(l===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function aR(e,t,n,r){const o=Au(e,t,r),s=Au(e,n,r,o);return e.slice(o,s+1)}function Bo(e,t){return Math.round(e.getBoundingClientRect()[t])}function hd(e){return!Be(e.groupOffsetTree)}function I0({index:e},t){return t===e?0:t<e?-1:1}function cR(){return{groupIndices:[],groupOffsetTree:Ci(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Ci()}}function uR(e,t){let n=Be(e)?0:1/0;for(const r of t){const{endIndex:o,size:s,startIndex:i}=r;if(n=Math.min(n,i),Be(e)){e=cn(e,0,s);continue}const l=fd(e,i-1,o+1);if(l.some(vR(r)))continue;let a=!1,c=!1;for(const{end:u,start:d,value:h}of l)a?(o>=d||s===h)&&(e=qp(e,d)):(c=h!==s,a=!0),u>o&&o>=d&&h!==s&&(e=cn(e,o+1,h));c&&(e=cn(e,i,s))}return[e,n]}function dR(e){return typeof e.groupIndex<"u"}function fR({offset:e},t){return t===e?0:t<e?-1:1}function va(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:s}=Q4(t,e,I0),i=e-r,l=s*i+(i-1)*n+o;return l>0?l+n:l}function X4(e,t){if(!hd(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function J4(e,t,n){if(dR(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=X4(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function hR(e,t,n,r=0){return r>0&&(t=Math.max(t,Q4(e,r,I0).offset)),V4(aR(e,t,n,fR),mR)}function pR(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,gn.DEBUG);const s=e.sizeTree;let i=s,l=0;if(n.length>0&&Be(s)&&t.length===2){const h=t[0].size,p=t[1].size;i=n.reduce((g,v)=>cn(cn(g,v,h),v+1,p),i)}else[i,l]=uR(i,t);if(i===s)return e;const{lastIndex:a,lastOffset:c,lastSize:u,offsetTree:d}=Vp(e.offsetTree,l,i,o);return{groupIndices:n,groupOffsetTree:n.reduce((h,p)=>cn(h,p,va(p,d,o)),Ci()),lastIndex:a,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:i}}function gR(e){return cs(e).map(({k:t,v:n},r,o)=>{const s=o[r+1];return{endIndex:s?s.k-1:1/0,size:n,startIndex:t}})}function Gv(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Vp(e,t,n,r){let o=e,s=0,i=0,l=0,a=0;if(t!==0){a=Au(o,t-1,I0),l=o[a].offset;const c=rr(n,t-1);s=c[0],i=c[1],o.length&&o[a].size===rr(n,t)[1]&&(a-=1),o=o.slice(0,a+1)}else o=[];for(const{start:c,value:u}of fd(n,t,1/0)){const d=c-s,h=d*i+l+d*r;o.push({index:c,offset:h,size:u}),s=c,l=h,i=u}return{lastIndex:s,lastOffset:l,lastSize:i,offsetTree:o}}function mR(e){return{index:e.index,value:e}}function vR(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const yR={offsetHeight:"height",offsetWidth:"width"},Ir=Ie(([{log:e},{recalcInProgress:t}])=>{const n=ye(),r=ye(),o=Pt(r,0),s=ye(),i=ye(),l=$(0),a=$([]),c=$(void 0),u=$(void 0),d=$((k,T)=>Bo(k,yR[T])),h=$(void 0),p=$(0),g=cR(),v=Pt(O(n,he(a,e,p),gr(pR,g),qe()),g),x=Pt(O(a,qe(),gr((k,T)=>({current:T,prev:k.current}),{current:[],prev:[]}),W(({prev:k})=>k)),[]);J(O(a,ie(k=>k.length>0),he(v,p),W(([k,T,C])=>{const I=k.reduce((j,R,M)=>cn(j,R,va(R,T.offsetTree,C)||M),Ci());return{...T,groupIndices:k,groupOffsetTree:I}})),v),J(O(r,he(v),ie(([k,{lastIndex:T}])=>k<T),W(([k,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:k}])),n),J(c,u);const m=Pt(O(c,W(k=>k===void 0)),!0);J(O(u,ie(k=>k!==void 0&&Be(ot(v).sizeTree)),W(k=>[{endIndex:0,size:k,startIndex:0}])),n);const y=pn(O(n,he(v),gr(({sizes:k},[T,C])=>({changed:C!==k,sizes:C}),{changed:!1,sizes:g}),W(k=>k.changed)));je(O(l,gr((k,T)=>({diff:k.prev-T,prev:T}),{diff:0,prev:0}),W(k=>k.diff)),k=>{const{groupIndices:T}=ot(v);if(k>0)de(t,!0),de(s,k+Gv(k,T));else if(k<0){const C=ot(x);C.length>0&&(k-=Gv(-k,C)),de(i,k)}}),je(O(l,he(e)),([k,T])=>{k<0&&T("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},gn.ERROR)});const w=pn(s);J(O(s,he(v),W(([k,T])=>{const C=T.groupIndices.length>0,I=[],j=T.lastSize;if(C){const R=ga(T.sizeTree,0);let M=0,_=0;for(;M<k;){const V=T.groupIndices[_],ee=T.groupIndices.length===_+1?1/0:T.groupIndices[_+1]-V-1;I.push({endIndex:V,size:R,startIndex:V}),I.push({endIndex:V+1+ee-1,size:j,startIndex:V+1}),_++,M+=ee+1}const U=cs(T.sizeTree);return M!==k&&U.shift(),U.reduce((V,{k:ee,v:Ee})=>{let Re=V.ranges;return V.prevSize!==0&&(Re=[...V.ranges,{endIndex:ee+k-1,size:V.prevSize,startIndex:V.prevIndex}]),{prevIndex:ee+k,prevSize:Ee,ranges:Re}},{prevIndex:k,prevSize:0,ranges:I}).ranges}return cs(T.sizeTree).reduce((R,{k:M,v:_})=>({prevIndex:M+k,prevSize:_,ranges:[...R.ranges,{endIndex:M+k-1,size:R.prevSize,startIndex:R.prevIndex}]}),{prevIndex:0,prevSize:j,ranges:[]}).ranges})),n);const S=pn(O(i,he(v,p),W(([k,{offsetTree:T},C])=>{const I=-k;return va(I,T,C)})));return J(O(i,he(v,p),W(([k,T,C])=>{if(T.groupIndices.length>0){if(Be(T.sizeTree))return T;let I=Ci();const j=ot(x);let R=0,M=0,_=0;for(;R<-k;){_=j[M];const U=j[M+1]-_-1;M++,R+=U+1}if(I=cs(T.sizeTree).reduce((U,{k:V,v:ee})=>cn(U,Math.max(0,V+k),ee),I),R!==-k){const U=ga(T.sizeTree,_);I=cn(I,0,U);const V=rr(T.sizeTree,-k+1)[1];I=cn(I,1,V)}return{...T,sizeTree:I,...Vp(T.offsetTree,0,I,C)}}else{const I=cs(T.sizeTree).reduce((j,{k:R,v:M})=>cn(j,Math.max(0,R+k),M),Ci());return{...T,sizeTree:I,...Vp(T.offsetTree,0,I,C)}}})),v),{beforeUnshiftWith:w,data:h,defaultItemSize:u,firstItemIndex:l,fixedItemSize:c,gap:p,groupIndices:a,itemSize:d,listRefresh:y,shiftWith:i,shiftWithOffset:S,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:m,unshiftWith:s}},Ve(Vo,C0),{singleton:!0});function wR(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const eb=Ie(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const s=ye(),i=ye(),l=pn(O(s,W(wR)));return J(O(l,W(a=>a.totalCount)),n),J(O(l,W(a=>a.groupIndices)),e),J(O(at(o,t,r),ie(([a,c])=>hd(c)),W(([a,c,u])=>rr(c.groupOffsetTree,Math.max(a-u,0),"v")[0]),qe(),W(a=>[a])),i),{groupCounts:s,topItemsIndexes:i}},Ve(Ir,Wt)),Wo=Ie(([{log:e}])=>{const t=$(!1),n=pn(O(t,ie(r=>r),qe()));return je(t,r=>{r&&ot(e)("props updated",{},gn.DEBUG)}),{didMount:n,propsReady:t}},Ve(Vo),{singleton:!0}),bR=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function tb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bR)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Aa=Ie(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:s,footerHeight:i,headerHeight:l,scrollingInProgress:a,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:h}])=>{const p=ye(),g=ye(),v=$(0);let x=null,m=null,y=null;function w(){x&&(x(),x=null),y&&(y(),y=null),m&&(clearTimeout(m),m=null),de(a,!1)}return J(O(p,he(n,d,r,v,l,i,h),he(e,s,o),W(([[S,k,T,C,I,j,R,M],_,U,V])=>{const ee=tb(S),{align:Ee,behavior:Re,offset:D}=ee,K=C-1,H=J4(ee,k,K);let oe=va(H,k.offsetTree,_)+j;Ee==="end"?(oe+=U+rr(k.sizeTree,H)[1]-T+V,H===K&&(oe+=R)):Ee==="center"?oe+=(U+rr(k.sizeTree,H)[1]-T+V)/2:oe-=I,D&&(oe+=D);const me=pe=>{w(),pe?(M("retrying to scroll to",{location:S},gn.DEBUG),de(p,S)):(de(g,!0),M("list did not change, scroll successful",{},gn.DEBUG))};if(w(),Re==="smooth"){let pe=!1;y=je(t,Oe=>{pe=pe||Oe}),x=er(u,()=>{me(pe)})}else x=er(O(t,xR(150)),me);return m=setTimeout(()=>{w()},1200),de(a,!0),M("scrolling from index to",{behavior:Re,index:H,top:oe},gn.DEBUG),{behavior:Re,top:oe}})),c),{scrollTargetReached:g,scrollToIndex:p,topListHeight:v}},Ve(Ir,Wt,Vo),{singleton:!0});function xR(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function N0(e,t){e==0?t():requestAnimationFrame(()=>{N0(e-1,t)})}function A0(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ja=Ie(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:s},{didMount:i}])=>{const l=$(!0),a=$(0),c=$(!0);return J(O(i,he(a),ie(([u,d])=>!!d),fr(!1)),l),J(O(i,he(a),ie(([u,d])=>!!d),fr(!1)),c),je(O(at(t,i),he(l,n,e,c),ie(([[,u],d,{sizeTree:h},p,g])=>u&&(!Be(h)||k0(p))&&!d&&!g),he(a)),([,u])=>{er(o,()=>{de(c,!0)}),N0(4,()=>{er(r,()=>{de(l,!0)}),de(s,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:a,scrolledToInitialItem:l}},Ve(Ir,Wt,Aa,Wo),{singleton:!0});function nb(e,t){return Math.abs(e-t)<1.01}const ya="up",Ml="down",SR="none",kR={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},TR=0,Ra=Ie(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:s}])=>{const i=$(!1),l=$(!0),a=ye(),c=ye(),u=$(4),d=$(TR),h=Pt(O($p(O(ne(o),ks(1),fr(!0)),O(ne(o),ks(1),fr(!1),Vv(100))),qe()),!1),p=Pt(O($p(O(n,fr(!0)),O(n,fr(!1),Vv(200))),qe()),!1);J(O(at(ne(o),ne(d)),W(([y,w])=>y<=w),qe()),l),J(O(l,Fr(50)),c);const g=pn(O(at(r,ne(s),ne(t),ne(e),ne(u)),gr((y,[{scrollHeight:w,scrollTop:S},k,T,C,I])=>{const j=S+k-w>-I,R={scrollHeight:w,scrollTop:S,viewportHeight:k};if(j){let _,U;return S>y.state.scrollTop?(_="SCROLLED_DOWN",U=y.state.scrollTop-S):(_="SIZE_DECREASED",U=y.state.scrollTop-S||y.scrollTopDelta),{atBottom:!0,atBottomBecause:_,scrollTopDelta:U,state:R}}let M;return R.scrollHeight>y.state.scrollHeight?M="SIZE_INCREASED":k<y.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":S<y.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:R}},kR),qe((y,w)=>y&&y.atBottom===w.atBottom))),v=Pt(O(r,gr((y,{scrollHeight:w,scrollTop:S,viewportHeight:k})=>{if(nb(y.scrollHeight,w))return{changed:!1,jump:0,scrollHeight:w,scrollTop:S};{const T=w-(S+k)<1;return y.scrollTop!==S&&T?{changed:!0,jump:y.scrollTop-S,scrollHeight:w,scrollTop:S}:{changed:!0,jump:0,scrollHeight:w,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ie(y=>y.changed),W(y=>y.jump)),0);J(O(g,W(y=>y.atBottom)),i),J(O(i,Fr(50)),a);const x=$(Ml);J(O(r,W(({scrollTop:y})=>y),qe(),gr((y,w)=>ot(p)?{direction:y.direction,prevScrollTop:w}:{direction:w<y.prevScrollTop?ya:Ml,prevScrollTop:w},{direction:Ml,prevScrollTop:0}),W(y=>y.direction)),x),J(O(r,Fr(50),fr(SR)),x);const m=$(0);return J(O(h,ie(y=>!y),fr(0)),m),J(O(o,Fr(100),he(h),ie(([y,w])=>!!w),gr(([y,w],[S])=>[w,S],[0,0]),W(([y,w])=>w-y)),m),{atBottomState:g,atBottomStateChange:a,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:i,isAtTop:l,isScrolling:h,lastJumpDueToItemResize:v,scrollDirection:x,scrollVelocity:m}},Ve(Wt)),ju="top",Ru="bottom",Kv="none";function Yv(e,t,n){return typeof e=="number"?n===ya&&t===ju||n===Ml&&t===Ru?e:0:n===ya?t===ju?e.main:e.reverse:t===Ru?e.main:e.reverse}function Zv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const j0=Ie(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const s=ye(),i=$(0),l=$(0),a=$(0),c=Pt(O(at(ne(r),ne(o),ne(n),ne(s,ma),ne(a),ne(i),ne(t),ne(e),ne(l)),W(([u,d,h,[p,g],v,x,m,y,w])=>{const S=u-y,k=x+m,T=Math.max(h-S,0);let C=Kv;const I=Zv(w,ju),j=Zv(w,Ru);return p-=y,p+=h+m,g+=h+m,g-=y,p>u+k-I&&(C=ya),g<u-T+d+j&&(C=Ml),C!==Kv?[Math.max(S-h-Yv(v,ju,C)-I,0),S-T-m+d+Yv(v,Ru,C)+j]:null}),ie(u=>u!=null),qe(ma)),[0,0]);return{increaseViewportBy:l,listBoundary:s,overscan:a,topListHeight:i,visibleRange:c}},Ve(Wt),{singleton:!0});function ER(e,t,n){if(hd(t)){const r=X4(e,t);return[{index:rr(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const eh={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Hc(e,t,n,r,o,s){const{lastIndex:i,lastOffset:l,lastSize:a}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const v=e[e.length-1];u=v.offset+v.size}const d=n-i,h=l+d*a+(d-1)*r,p=c,g=h-u;return{bottom:u,firstItemIndex:s,items:Qv(e,o,s),offsetBottom:g,offsetTop:c,top:p,topItems:Qv(t,o,s),topListHeight:t.reduce((v,x)=>x.size+v,0),totalCount:n}}function rb(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const l=e+i,a=A0(t,l),c=Array.from({length:l}).map((u,d)=>({data:s[d+a],index:d+a,offset:0,size:0}));return Hc(c,[],l,o,n,r)}function Qv(e,t,n){if(e.length===0)return[];if(!hd(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=fd(t.groupOffsetTree,r,o);let l,a=0;for(const c of e){(!l||l.end<c.index)&&(l=i.shift(),a=t.groupIndices.indexOf(l.start));let u;c.index===l.start?u={index:a,type:"group"}:u={groupIndex:a,index:c.index-(a+1)+n},s.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return s}const _s=Ie(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},s,{listBoundary:i,topListHeight:l,visibleRange:a},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},h,{didMount:p},{recalcInProgress:g}])=>{const v=$([]),x=$(0),m=ye();J(s.topItemsIndexes,v);const y=Pt(O(at(p,g,ne(a,ma),ne(o),ne(r),ne(c),u,ne(v),ne(t),ne(n),e),ie(([T,C,,I,,,,,,,j])=>{const R=j&&j.length!==I;return T&&!C&&!R}),W(([,,[T,C],I,j,R,M,_,U,V,ee])=>{const Ee=j,{offsetTree:Re,sizeTree:D}=Ee,K=ot(x);if(I===0)return{...eh,totalCount:I};if(T===0&&C===0)return K===0?{...eh,totalCount:I}:rb(K,R,j,U,V,ee||[]);if(Be(D))return K>0?null:Hc(ER(A0(R,I),Ee,ee),[],I,V,Ee,U);const H=[];if(_.length>0){const le=_[0],Me=_[_.length-1];let rt=0;for(const B of fd(D,le,Me)){const se=B.value,xe=Math.max(B.start,le),We=Math.min(B.end,Me);for(let fe=xe;fe<=We;fe++)H.push({data:ee==null?void 0:ee[fe],index:fe,offset:rt,size:se}),rt+=se}}if(!M)return Hc([],H,I,V,Ee,U);const oe=_.length>0?_[_.length-1]+1:0,me=hR(Re,T,C,oe);if(me.length===0)return null;const pe=I-1,Oe=dd([],le=>{for(const Me of me){const rt=Me.value;let B=rt.offset,se=Me.start;const xe=rt.size;if(rt.offset<T){se+=Math.floor((T-rt.offset+V)/(xe+V));const fe=se-Me.start;B+=fe*xe+fe*V}se<oe&&(B+=(oe-se)*xe,se=oe);const We=Math.min(Me.end,pe);for(let fe=se;fe<=We&&!(B>=C);fe++)le.push({data:ee==null?void 0:ee[fe],index:fe,offset:B,size:xe}),B+=xe+V}});return Hc(Oe,H,I,V,Ee,U)}),ie(T=>T!==null),qe()),eh);J(O(e,ie(k0),W(T=>T==null?void 0:T.length)),o),J(O(y,W(T=>T.topListHeight)),d),J(d,l),J(O(y,W(T=>[T.top,T.bottom])),i),J(O(y,W(T=>T.items)),m);const w=pn(O(y,ie(({items:T})=>T.length>0),he(o,e),ie(([{items:T},C])=>T[T.length-1].originalIndex===C-1),W(([,T,C])=>[T-1,C]),qe(ma),W(([T])=>T))),S=pn(O(y,Fr(200),ie(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),W(({items:T})=>T[0].index),qe())),k=pn(O(y,ie(({items:T})=>T.length>0),W(({items:T})=>{let C=0,I=T.length-1;for(;T[C].type==="group"&&C<I;)C++;for(;T[I].type==="group"&&I>C;)I--;return{endIndex:T[I].index,startIndex:T[C].index}}),qe(Z4)));return{endReached:w,initialItemCount:x,itemsRendered:m,listState:y,rangeChanged:k,startReached:S,topItemsIndexes:v,...h}},Ve(Ir,eb,j0,ja,Aa,Ra,Wo,C0),{singleton:!0}),ob=Ie(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const s=ye(),i=Pt(O(at(n,e,r,t,o),W(([l,a,c,u,d])=>l+a+c+u+d.offsetBottom+d.bottom)),0);return J(ne(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ve(Wt,_s),{singleton:!0}),CR=Ie(([{viewportHeight:e},{totalListHeight:t}])=>{const n=$(!1),r=Pt(O(at(n,e,t),ie(([o])=>o),W(([,o,s])=>Math.max(0,o-s)),Fr(0),qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Ve(Wt,ob),{singleton:!0}),sb=Ie(()=>({context:$(null)})),IR=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:s,viewportTop:i})=>t<i?{...o,align:n??"start",behavior:r}:e>s?{...o,align:n??"end",behavior:r}:null,ib=Ie(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:s,scrollingInProgress:i,scrollTop:l,viewportHeight:a},{scrollToIndex:c}])=>{const u=ye();return J(O(u,he(t,a,n,s,o,r,l),he(e),W(([[d,h,p,g,v,x,m,y],w])=>{const{align:S,behavior:k,calculateViewLocation:T=IR,done:C,...I}=d,j=J4(d,h,g-1),R=va(j,h.offsetTree,w)+v+x,M=R+rr(h.sizeTree,j)[1],_=y+x,U=y+p-m,V=T({itemBottom:M,itemTop:R,locationParams:{align:S,behavior:k,...I},viewportBottom:U,viewportTop:_});return V?C&&er(O(i,ie(ee=>!ee),ks(ot(i)?1:2)),C):C&&C(),V}),ie(d=>d!==null)),c),{scrollIntoView:u}},Ve(Ir,Wt,Aa,_s,Vo),{singleton:!0});function Xv(e){return e?e==="smooth"?"smooth":"auto":!1}const NR=(e,t)=>typeof e=="function"?Xv(e(t)):t&&Xv(e),AR=Ie(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:s},{scrollToIndex:i},{scrolledToInitialItem:l},{didMount:a,propsReady:c},{log:u},{scrollingInProgress:d},{context:h},{scrollIntoView:p}])=>{const g=$(!1),v=ye();let x=null;function m(k){de(i,{align:"end",behavior:k,index:"LAST"})}je(O(at(O(ne(t),ks(1)),a),he(ne(g),s,l,d),W(([[k,T],C,I,j,R])=>{let M=T&&j,_="auto";return M&&(_=NR(C,I||R),M=M&&!!_),{followOutputBehavior:_,shouldFollow:M,totalCount:k}}),ie(({shouldFollow:k})=>k)),({followOutputBehavior:k,totalCount:T})=>{x&&(x(),x=null),ot(n)?requestAnimationFrame(()=>{ot(u)("following output to ",{totalCount:T},gn.DEBUG),m(k)}):x=er(e,()=>{ot(u)("following output to ",{totalCount:T},gn.DEBUG),m(k),x=null})});function y(k){const T=er(o,C=>{k&&!C.atBottom&&C.notAtBottomBecause==="SIZE_INCREASED"&&!x&&(ot(u)("scrolling to bottom due to increased size",{},gn.DEBUG),m("auto"))});setTimeout(T,100)}je(O(at(ne(g),t,c),ie(([k,,T])=>k&&T),gr(({value:k},[,T])=>({refreshed:k===T,value:T}),{refreshed:!1,value:0}),ie(({refreshed:k})=>k),he(g,t)),([,k])=>{ot(l)&&y(k!==!1)}),je(v,()=>{y(ot(g)!==!1)}),je(at(ne(g),o),([k,T])=>{k&&!T.atBottom&&T.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&m("auto")});const w=$(null),S=ye();return J($p(O(ne(r),W(k=>{var T;return(T=k==null?void 0:k.length)!=null?T:0})),O(ne(t))),S),je(O(at(O(S,ks(1)),a),he(ne(w),l,d,h),W(([[k,T],C,I,j,R])=>T&&I&&(C==null?void 0:C({context:R,totalCount:k,scrollingInProgress:j}))),ie(k=>!!k),Fr(0)),k=>{x&&(x(),x=null),ot(n)?requestAnimationFrame(()=>{ot(u)("scrolling into view",{}),de(p,k)}):x=er(e,()=>{ot(u)("scrolling into view",{}),de(p,k),x=null})}),{autoscrollToBottom:v,followOutput:g,scrollIntoViewOnChange:w}},Ve(Ir,Ra,Aa,ja,Wo,Vo,Wt,sb,ib)),jR=Ie(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:l}])=>(J(O(l,he(s),ie(([,a])=>a!==0),he(o,r,t,n,e),W(([[,a],c,u,d,h,p=[]])=>rb(a,c,u,d,h,p))),i),{}),Ve(Ir,ja,_s,Wo),{singleton:!0}),RR=Ie(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=$(0);return je(O(e,he(r),ie(([,o])=>o!==0),W(([,o])=>({top:o}))),o=>{er(O(n,ks(1),ie(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{de(t,o)})})}),{initialScrollTop:r}},Ve(Wo,Wt,_s),{singleton:!0}),lb=Ie(([{scrollVelocity:e}])=>{const t=$(!1),n=ye(),r=$(!1);return J(O(e,he(r,t,n),ie(([o,s])=>!!s),W(([o,s,i,l])=>{const{enter:a,exit:c}=s;if(i){if(c(o,l))return!1}else if(a(o,l))return!0;return i}),qe()),t),je(O(at(t,e,n),he(r)),([[o,s,i],l])=>{o&&l&&l.change&&l.change(s,i)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Ve(Ra),{singleton:!0}),R0=Ie(([{scrollContainerState:e,scrollTo:t}])=>{const n=ye(),r=ye(),o=ye(),s=$(!1),i=$(void 0);return J(O(at(n,r),W(([{scrollHeight:l,scrollTop:a,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:l,scrollTop:Math.max(0,a-u),viewportHeight:c}))),e),J(O(t,he(r),W(([l,{offsetTop:a}])=>({...l,top:l.top+a}))),o),{customScrollParent:i,useWindowScroll:s,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},Ve(Wt)),LR=Ie(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:l,windowViewportRect:a}])=>{const c=ye(),u=$(void 0),d=$(null),h=$(null);return J(l,d),J(a,h),je(O(c,he(t,r,i,d,h,n)),([p,g,v,x,m,y,w])=>{const S=gR(g.sizeTree);x&&m!==null&&y!==null&&(v=m.scrollTop-y.offsetTop),v-=w,p({ranges:S,scrollTop:v})}),J(O(u,ie(k0),W(_R)),o),J(O(s,he(u),ie(([,p])=>p!==void 0),qe(),W(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},Ve(Ir,Wt,ja,Wo,R0));function _R(e){return{align:"start",index:0,offset:e.scrollTop}}const OR=Ie(([{topItemsIndexes:e}])=>{const t=$(0);return J(O(t,ie(n=>n>=0),W(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ve(_s));function ab(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const MR=ab(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),BR=Ie(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:s,lastJumpDueToItemResize:i,scrollDirection:l},{listState:a},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:h},{log:p},{recalcInProgress:g}])=>{const v=pn(O(a,he(i),gr(([,m,y,w],[{bottom:S,items:k,offsetBottom:T,totalCount:C},I])=>{const j=S+T;let R=0;return y===C&&m.length>0&&k.length>0&&(k[0].originalIndex===0&&m[0].originalIndex===0||(R=j-w,R!==0&&(R+=I))),[R,k,C,j]},[0,[],0,0]),ie(([m])=>m!==0),he(r,l,n,o,p,g),ie(([,m,y,w,,,S])=>!S&&!w&&m!==0&&y===ya),W(([[m],,,,,y])=>(y("Upward scrolling compensation",{amount:m},gn.DEBUG),m))));function x(m){m>0?(de(t,{behavior:"auto",top:-m}),de(e,0)):(de(e,0),de(t,{behavior:"auto",top:-m}))}return je(O(v,he(e,s)),([m,y,w])=>{w&&MR()?de(e,y-m):x(-m)}),je(O(at(Pt(s,!1),e,g),ie(([m,y,w])=>!m&&!w&&y!==0),W(([m,y])=>y),Fr(1)),x),J(O(d,W(m=>({top:-m}))),t),je(O(c,he(h,u),W(([m,{groupIndices:y,lastSize:w,sizeTree:S},k])=>{function T(C){return C*(w+k)}if(y.length===0)return T(m);{let C=0;const I=ga(S,0);let j=0,R=0;for(;j<m;){j++,C+=I;let M=y.length===R+1?1/0:y[R+1]-y[R]-1;j+M>m&&(C-=I,M=m-j+1),j+=M,C+=T(M),R++}return C}})),m=>{de(e,m),requestAnimationFrame(()=>{de(t,{top:m}),requestAnimationFrame(()=>{de(e,0),de(g,!1)})})}),{deviation:e}},Ve(Wt,Ra,_s,Ir,Vo,C0)),PR=Ie(([e,t,n,r,o,s,i,l,a,c,u])=>({...e,...t,...n,...r,...o,...s,...i,...l,...a,...c,...u}),Ve(j0,jR,Wo,lb,ob,RR,CR,R0,ib,Vo,sb)),cb=Ie(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:s,itemSize:i,sizeRanges:l,sizes:a,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:h,initialTopMostItemIndex:p,scrolledToInitialItem:g},v,x,m,{listState:y,topItemsIndexes:w,...S},{scrollToIndex:k},T,{topItemCount:C},{groupCounts:I},j])=>(J(S.rangeChanged,j.scrollSeekRangeChanged),J(O(j.windowViewportRect,W(R=>R.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:I,initialItemFinalLocationReached:h,initialTopMostItemIndex:p,scrolledToInitialItem:g,sizeRanges:l,topItemCount:C,topItemsIndexes:w,totalCount:u,...m,groupIndices:s,itemSize:i,listState:y,scrollToIndex:k,statefulTotalCount:c,trackItemSizes:d,...S,...j,...v,sizes:a,...x}),Ve(Ir,ja,Wt,LR,AR,_s,Aa,BR,OR,eb,PR));function zR(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)Object.hasOwn(r,i)||(n[i]=t[i]);return n}const Sc=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;function ub(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),l=Z.createContext({});function a(x,m){x.propsReady&&de(x.propsReady,!1);for(const y of r){const w=x[t.required[y]];de(w,m[y])}for(const y of o)if(y in m){const w=x[t.optional[y]];de(w,m[y])}x.propsReady&&de(x.propsReady,!0)}function c(x){return s.reduce((m,y)=>(m[y]=w=>{const S=x[t.methods[y]];de(S,w)},m),{})}function u(x){return i.reduce((m,y)=>(m[y]=eR(x[t.events[y]]),m),{})}const d=Z.forwardRef((x,m)=>{const{children:y,...w}=x,[S]=Z.useState(()=>dd(nR(e),C=>{a(C,w)})),[k]=Z.useState(Uv(u,S));Sc(()=>{for(const C of i)C in w&&je(k[C],w[C]);return()=>{Object.values(k).map(T0)}},[w,k,S]),Sc(()=>{a(S,w)}),Z.useImperativeHandle(m,Fv(c(S)));const T=n;return f.jsx(l.Provider,{value:S,children:n?f.jsx(T,{...zR([...r,...o,...i],w),children:y}):y})}),h=x=>{const m=Z.useContext(l);return Z.useCallback(y=>{de(m[x],y)},[m,x])},p=x=>{const m=Z.useContext(l)[x],y=Z.useCallback(w=>je(m,w),[m]);return Z.useSyncExternalStore(y,()=>ot(m),()=>ot(m))},g=x=>{const m=Z.useContext(l)[x],[y,w]=Z.useState(Uv(ot,m));return Sc(()=>je(m,S=>{S!==y&&w(Fv(S))}),[m,y]),y},v=Z.version.startsWith("18")?p:g;return{Component:d,useEmitter:(x,m)=>{const y=Z.useContext(l)[x];Sc(()=>je(y,m),[m,y])},useEmitterValue:v,usePublisher:h}}const db=Z.createContext(void 0),fb=Z.createContext(void 0),hb=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;function th(e){return"self"in e}function DR(e){return"body"in e}function pb(e,t,n,r=Na,o,s){const i=Z.useRef(null),l=Z.useRef(null),a=Z.useRef(null),c=Z.useCallback(h=>{let p,g,v;const x=h.target;if(DR(x)||th(x)){const y=th(x)?x:x.defaultView;v=s?y.scrollX:y.scrollY,p=s?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,g=s?y.innerWidth:y.innerHeight}else v=s?x.scrollLeft:x.scrollTop,p=s?x.scrollWidth:x.scrollHeight,g=s?x.offsetWidth:x.offsetHeight;const m=()=>{e({scrollHeight:p,scrollTop:Math.max(v,0),viewportHeight:g})};h.suppressFlushSync?m():F8.flushSync(m),l.current!==null&&(v===l.current||v<=0||v===p-g)&&(l.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t,s]);Z.useEffect(()=>{const h=o||i.current;return r(o||i.current),c({suppressFlushSync:!0,target:h}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[i,c,n,r,o]);function u(h){const p=i.current;if(!p||(s?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const g=h.behavior==="smooth";let v,x,m;th(p)?(x=Math.max(Bo(p.document.documentElement,s?"width":"height"),s?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),v=s?p.innerWidth:p.innerHeight,m=s?window.scrollX:window.scrollY):(x=p[s?"scrollWidth":"scrollHeight"],v=Bo(p,s?"width":"height"),m=p[s?"scrollLeft":"scrollTop"]);const y=x-v;if(h.top=Math.ceil(Math.max(Math.min(y,h.top),0)),nb(v,x)||h.top===m){e({scrollHeight:x,scrollTop:m,viewportHeight:v}),g&&t(!0);return}g?(l.current=h.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,l.current=null,t(!0)},1e3)):l.current=null,s&&(h={behavior:h.behavior,left:h.top}),p.scrollTo(h)}function d(h){s&&(h={behavior:h.behavior,left:h.top}),i.current.scrollBy(h)}return{scrollByCallback:d,scrollerRef:i,scrollToCallback:u}}const nh="-webkit-sticky",Jv="sticky",L0=ab(()=>{if(typeof document>"u")return Jv;const e=document.createElement("div");return e.style.position=nh,e.style.position===nh?nh:Jv});function _0(e){return e}const HR=Ie(()=>{const e=$(l=>`Item ${l}`),t=$(l=>`Group ${l}`),n=$({}),r=$(_0),o=$("div"),s=$(Na),i=(l,a=null)=>Pt(O(n,W(c=>c[l]),qe()),a);return{components:n,computeItemKey:r,EmptyPlaceholder:i("EmptyPlaceholder"),FooterComponent:i("Footer"),GroupComponent:i("Group","div"),groupContent:t,HeaderComponent:i("Header"),HeaderFooterTag:o,ItemComponent:i("Item","div"),itemContent:e,ListComponent:i("List","div"),ScrollerComponent:i("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:i("ScrollSeekPlaceholder"),TopItemListComponent:i("TopItemList")}});Ve(cb,HR);L0();const $R={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},qR={outline:"none",overflowX:"auto",position:"relative"},pd=e=>({height:"100%",position:"absolute",top:0,width:"100%"});L0();function Et(e,t){if(typeof e!="string")return{context:t}}function FR(e,t){return{item:typeof e=="string"?void 0:t}}function gb({useEmitter:e,useEmitterValue:t,usePublisher:n}){return Z.memo(function({children:r,style:o,...s}){const i=n("scrollContainerState"),l=t("ScrollerComponent"),a=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:g}=pb(i,a,l,c,void 0,d);return e("scrollTo",g),e("scrollBy",h),f.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?qR:$R,...o},tabIndex:0,...s,...Et(l,u),children:r})})}function mb({useEmitter:e,useEmitterValue:t,usePublisher:n}){return Z.memo(function({children:r,style:o,...s}){const i=n("windowScrollContainerState"),l=t("ScrollerComponent"),a=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),h=t("context"),p=Z.useRef(null),g=t("scrollerRef"),{scrollByCallback:v,scrollerRef:x,scrollToCallback:m}=pb(i,a,l,g,d);return hb(()=>{var y;return x.current=d||((y=p.current)==null?void 0:y.ownerDocument.defaultView),()=>{x.current=null}},[x,d]),e("windowScrollTo",m),e("scrollBy",v),f.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...s,...Et(l,h),children:r})})}const UR=Ie(()=>{const e=$(c=>f.jsxs("td",{children:["Item $",c]})),t=$(null),n=$(c=>f.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=$(null),o=$(null),s=$({}),i=$(_0),l=$(Na),a=(c,u=null)=>Pt(O(s,W(d=>d[c]),qe()),u);return{components:s,computeItemKey:i,context:t,EmptyPlaceholder:a("EmptyPlaceholder"),FillerRow:a("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:a("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TableBodyComponent:a("TableBody","tbody"),TableComponent:a("Table","table"),TableFooterComponent:a("TableFoot","tfoot"),TableHeadComponent:a("TableHead","thead"),TableRowComponent:a("TableRow","tr"),GroupComponent:a("Group","tr")}}),VR=Ie(([e,t])=>({...e,...t}),Ve(cb,UR)),WR=({height:e})=>f.jsx("tr",{children:f.jsx("td",{style:{height:e}})}),GR=({height:e})=>f.jsx("tr",{children:f.jsx("td",{style:{border:0,height:e,padding:0}})}),KR={overflowAnchor:"none"},e2={position:L0(),zIndex:2,overflowAnchor:"none"},t2=Z.memo(function({showTopList:e=!1}){const t=ue("listState"),n=ue("computeItemKey"),r=ue("firstItemIndex"),o=ue("context"),s=ue("isSeeking"),i=ue("fixedHeaderHeight"),l=ue("groupIndices").length>0,a=ue("itemContent"),c=ue("groupContent"),u=ue("ScrollSeekPlaceholder")||WR,d=ue("GroupComponent"),h=ue("TableRowComponent"),p=(e?t.topItems:[]).reduce((v,x,m)=>(m===0?v.push(x.size):v.push(v[m-1]+x.size),v),[]),g=(e?t.topItems:t.items).map(v=>{const x=v.originalIndex,m=n(x+r,v.data,o),y=e?x===0?0:p[x-1]:0;return s?A.createElement(u,{...Et(u,o),height:v.size,index:v.index,key:m,type:v.type||"item"}):v.type==="group"?A.createElement(d,{...Et(d,o),"data-index":x,"data-item-index":v.index,"data-known-size":v.size,key:m,style:{...e2,top:i}},c(v.index,o)):A.createElement(h,{...Et(h,o),...FR(h,v.data),"data-index":x,"data-item-index":v.index,"data-known-size":v.size,"data-item-group-index":v.groupIndex,key:m,style:e?{...e2,top:i+y}:KR},l?a(v.index,v.groupIndex,v.data,o):a(v.index,v.data,o))});return f.jsx(f.Fragment,{children:g})}),YR=Z.memo(function(){const e=ue("listState"),t=ue("topItemsIndexes").length>0,n=tr("sizeRanges"),r=ue("useWindowScroll"),o=ue("customScrollParent"),s=tr("windowScrollContainerState"),i=tr("scrollContainerState"),l=o||r?s:i,a=ue("trackItemSizes"),c=ue("itemSize"),u=ue("log"),{callbackRef:d,ref:h}=sR(n,c,a,l,u,void 0,o,!1,ue("skipAnimationFrameInResizeObserver")),[p,g]=Z.useState(0);O0("deviation",R=>{p!==R&&(h.current.style.marginTop=`${R}px`,g(R))});const v=ue("EmptyPlaceholder"),x=ue("FillerRow")||GR,m=ue("TableBodyComponent"),y=ue("paddingTopAddition"),w=ue("statefulTotalCount"),S=ue("context");if(w===0&&v)return f.jsx(v,{...Et(v,S)});const k=(t?e.topItems:[]).reduce((R,M)=>R+M.size,0),T=e.offsetTop+y+p-k,C=e.offsetBottom,I=T>0?f.jsx(x,{context:S,height:T},"padding-top"):null,j=C>0?f.jsx(x,{context:S,height:C},"padding-bottom"):null;return f.jsxs(m,{"data-testid":"virtuoso-item-list",ref:d,...Et(m,S),children:[I,t&&f.jsx(t2,{showTopList:!0}),f.jsx(t2,{}),j]})}),ZR=({children:e})=>{const t=Z.useContext(db),n=tr("viewportHeight"),r=tr("fixedItemHeight"),o=Ts(Z.useMemo(()=>Nu(n,s=>Bo(s,"height")),[n]),!0,ue("skipAnimationFrameInResizeObserver"));return Z.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),f.jsx("div",{"data-viewport-type":"element",ref:o,style:pd(),children:e})},QR=({children:e})=>{const t=Z.useContext(db),n=tr("windowViewportRect"),r=tr("fixedItemHeight"),o=ue("customScrollParent"),s=U4(n,o,ue("skipAnimationFrameInResizeObserver"));return Z.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),f.jsx("div",{"data-viewport-type":"window",ref:s,style:pd(),children:e})},XR=Z.memo(function(e){const t=ue("useWindowScroll"),n=ue("customScrollParent"),r=tr("fixedHeaderHeight"),o=tr("fixedFooterHeight"),s=ue("fixedHeaderContent"),i=ue("fixedFooterContent"),l=ue("context"),a=Ts(Z.useMemo(()=>Nu(r,m=>Bo(m,"height")),[r]),!0,ue("skipAnimationFrameInResizeObserver")),c=Ts(Z.useMemo(()=>Nu(o,m=>Bo(m,"height")),[o]),!0,ue("skipAnimationFrameInResizeObserver")),u=n||t?tL:eL,d=n||t?QR:ZR,h=ue("TableComponent"),p=ue("TableHeadComponent"),g=ue("TableFooterComponent"),v=s?f.jsx(p,{ref:a,style:{position:"sticky",top:0,zIndex:2},...Et(p,l),children:s()},"TableHead"):null,x=i?f.jsx(g,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...Et(g,l),children:i()},"TableFoot"):null;return f.jsx(u,{...e,...Et(u,l),children:f.jsx(d,{children:f.jsxs(h,{style:{borderSpacing:0,overflowAnchor:"none"},...Et(h,l),children:[v,f.jsx(YR,{},"TableBody"),x]})})})}),{Component:JR,useEmitter:O0,useEmitterValue:ue,usePublisher:tr}=ub(VR,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},XR),eL=gb({useEmitter:O0,useEmitterValue:ue,usePublisher:tr}),tL=mb({useEmitter:O0,useEmitterValue:ue,usePublisher:tr}),nL=JR,n2={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},rL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:r2,floor:Lu,max:Bl,min:rh,round:o2}=Math;function s2(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function oL(e){return{...rL,items:e}}function kc(e,t){return e&&e.width===t.width&&e.height===t.height}function sL(e,t){return e&&e.column===t.column&&e.row===t.row}const iL=Ie(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:s,scrollBy:i,scrollContainerState:l,scrollTo:a,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},h,p,{didMount:g,propsReady:v},{customScrollParent:x,useWindowScroll:m,windowScrollContainerState:y,windowScrollTo:w,windowViewportRect:S},k])=>{const T=$(0),C=$(0),I=$(n2),j=$({height:0,width:0}),R=$({height:0,width:0}),M=ye(),_=ye(),U=$(0),V=$(null),ee=$({column:0,row:0}),Ee=ye(),Re=ye(),D=$(!1),K=$(0),H=$(!0),oe=$(!1),me=$(!1);je(O(g,he(K),ie(([B,se])=>!!se)),()=>{de(H,!1)}),je(O(at(g,H,R,j,K,oe),ie(([B,se,xe,We,,fe])=>B&&!se&&xe.height!==0&&We.height!==0&&!fe)),([,,,,B])=>{de(oe,!0),N0(1,()=>{de(M,B)}),er(O(c),()=>{de(t,[0,0]),de(H,!0)})}),J(O(Re,ie(B=>B!=null&&B.scrollTop>0),fr(0)),C),je(O(g,he(Re),ie(([,B])=>B!=null)),([,B])=>{B&&(de(j,B.viewport),de(R,B.item),de(ee,B.gap),B.scrollTop>0&&(de(D,!0),er(O(c,ks(1)),se=>{de(D,!1)}),de(a,{top:B.scrollTop})))}),J(O(j,W(({height:B})=>B)),d),J(O(at(ne(j,kc),ne(R,kc),ne(ee,(B,se)=>B&&B.column===se.column&&B.row===se.row),ne(c)),W(([B,se,xe,We])=>({gap:xe,item:se,scrollTop:We,viewport:B}))),Ee),J(O(at(ne(T),r,ne(ee,sL),ne(R,kc),ne(j,kc),ne(V),ne(C),ne(D),ne(H),ne(K)),ie(([,,,,,,,B])=>!B),W(([B,[se,xe],We,fe,gt,Mn,Bn,,or,on])=>{const{column:bn,row:Nr}=We,{height:Pn,width:Ar}=fe,{width:Go}=gt;if(Bn===0&&(B===0||Go===0))return n2;if(Ar===0){const Ko=A0(on,B),Ms=Ko+Math.max(Bn-1,0);return oL(s2(Ko,Ms,Mn))}const jr=vb(Go,Ar,bn);let yt,Gt;or?se===0&&xe===0&&Bn>0?(yt=0,Gt=Bn-1):(yt=jr*Lu((se+Nr)/(Pn+Nr)),Gt=jr*r2((xe+Nr)/(Pn+Nr))-1,Gt=rh(B-1,Bl(Gt,jr-1)),yt=rh(Gt,Bl(0,yt))):(yt=0,Gt=-1);const Os=s2(yt,Gt,Mn),{bottom:sr,top:Rr}=i2(gt,We,fe,Os),lo=r2(B/jr),Kt=lo*Pn+(lo-1)*Nr-sr;return{bottom:sr,itemHeight:Pn,items:Os,itemWidth:Ar,offsetBottom:Kt,offsetTop:Rr,top:Rr}})),I),J(O(V,ie(B=>B!==null),W(B=>B.length)),T),J(O(at(j,R,I,ee),ie(([B,se,{items:xe}])=>xe.length>0&&se.height!==0&&B.height!==0),W(([B,se,{items:xe},We])=>{const{bottom:fe,top:gt}=i2(B,We,se,xe);return[gt,fe]}),qe(ma)),t);const pe=$(!1);J(O(c,he(pe),W(([B,se])=>se||B!==0)),pe);const Oe=pn(O(at(I,T),ie(([{items:B}])=>B.length>0),he(pe),ie(([[B,se],xe])=>{const We=B.items[B.items.length-1].index===se-1;return(xe||B.bottom>0&&B.itemHeight>0&&B.offsetBottom===0&&B.items.length===se)&&We}),W(([[,B]])=>B-1),qe())),le=pn(O(ne(I),ie(({items:B})=>B.length>0&&B[0].index===0),fr(0),qe())),Me=pn(O(ne(I),he(D),ie(([{items:B},se])=>B.length>0&&!se),W(([{items:B}])=>({endIndex:B[B.length-1].index,startIndex:B[0].index})),qe(Z4),Fr(0)));J(Me,p.scrollSeekRangeChanged),J(O(M,he(j,R,T,ee),W(([B,se,xe,We,fe])=>{const gt=tb(B),{align:Mn,behavior:Bn,offset:or}=gt;let on=gt.index;on==="LAST"&&(on=We-1),on=Bl(0,on,rh(We-1,on));let bn=Wp(se,fe,xe,on);return Mn==="end"?bn=o2(bn-se.height+xe.height):Mn==="center"&&(bn=o2(bn-se.height/2+xe.height/2)),or&&(bn+=or),{behavior:Bn,top:bn}})),a);const rt=Pt(O(I,W(B=>B.offsetBottom+B.bottom)),0);return J(O(S,W(B=>({height:B.visibleHeight,width:B.visibleWidth}))),j),{customScrollParent:x,data:V,deviation:U,footerHeight:o,gap:ee,headerHeight:s,increaseViewportBy:e,initialItemCount:C,itemDimensions:R,overscan:n,restoreStateFrom:Re,scrollBy:i,scrollContainerState:l,scrollHeight:_,scrollTo:a,scrollToIndex:M,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:m,viewportDimensions:j,windowScrollContainerState:y,windowScrollTo:w,windowViewportRect:S,...p,gridState:I,horizontalDirection:me,initialTopMostItemIndex:K,totalListHeight:rt,...h,endReached:Oe,propsReady:v,rangeChanged:Me,startReached:le,stateChanged:Ee,stateRestoreInProgress:D,...k}},Ve(j0,Wt,Ra,lb,Wo,R0,Vo));function vb(e,t,n){return Bl(1,Lu((e+n)/(Lu(t)+n)))}function i2(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const s=Wp(e,t,n,r[0].index);return{bottom:Wp(e,t,n,r[r.length-1].index)+o,top:s}}function Wp(e,t,n,r){const o=vb(e.width,n.width,t.column),s=Lu(r/o),i=s*n.height+Bl(0,s-1)*t.row;return i>0?i+t.row:i}const lL=Ie(()=>{const e=$(d=>`Item ${d}`),t=$({}),n=$(null),r=$("virtuoso-grid-item"),o=$("virtuoso-grid-list"),s=$(_0),i=$("div"),l=$(Na),a=(d,h=null)=>Pt(O(t,W(p=>p[d]),qe()),h),c=$(!1),u=$(!1);return J(ne(u),c),{components:t,computeItemKey:s,context:n,FooterComponent:a("Footer"),HeaderComponent:a("Header"),headerFooterTag:i,itemClassName:r,ItemComponent:a("Item","div"),itemContent:e,listClassName:o,ListComponent:a("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:a("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder","div")}}),aL=Ie(([e,t])=>({...e,...t}),Ve(iL,lL)),cL=Z.memo(function(){const e=Ke("gridState"),t=Ke("listClassName"),n=Ke("itemClassName"),r=Ke("itemContent"),o=Ke("computeItemKey"),s=Ke("isSeeking"),i=An("scrollHeight"),l=Ke("ItemComponent"),a=Ke("ListComponent"),c=Ke("ScrollSeekPlaceholder"),u=Ke("context"),d=An("itemDimensions"),h=An("gap"),p=Ke("log"),g=Ke("stateRestoreInProgress"),v=An("reportReadyState"),x=Ts(Z.useMemo(()=>m=>{const y=m.parentElement.parentElement.scrollHeight;i(y);const w=m.firstChild;if(w){const{height:S,width:k}=w.getBoundingClientRect();d({height:S,width:k})}h({column:l2("column-gap",getComputedStyle(m).columnGap,p),row:l2("row-gap",getComputedStyle(m).rowGap,p)})},[i,d,h,p]),!0,!1);return hb(()=>{e.itemHeight>0&&e.itemWidth>0&&v(!0)},[e]),g?null:f.jsx(a,{className:t,ref:x,...Et(a,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(m=>{const y=o(m.index,m.data,u);return s?f.jsx(c,{...Et(c,u),height:e.itemHeight,index:m.index,width:e.itemWidth},y):A.createElement(l,{...Et(l,u),className:n,"data-index":m.index,key:y},r(m.index,m.data,u))})})}),uL=Z.memo(function(){const e=Ke("HeaderComponent"),t=An("headerHeight"),n=Ke("headerFooterTag"),r=Ts(Z.useMemo(()=>s=>{t(Bo(s,"height"))},[t]),!0,!1),o=Ke("context");return e?f.jsx(n,{ref:r,children:f.jsx(e,{...Et(e,o)})}):null}),dL=Z.memo(function(){const e=Ke("FooterComponent"),t=An("footerHeight"),n=Ke("headerFooterTag"),r=Ts(Z.useMemo(()=>s=>{t(Bo(s,"height"))},[t]),!0,!1),o=Ke("context");return e?f.jsx(n,{ref:r,children:f.jsx(e,{...Et(e,o)})}):null}),fL=({children:e})=>{const t=Z.useContext(fb),n=An("itemDimensions"),r=An("viewportDimensions"),o=Ts(Z.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]),!0,!1);return Z.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),f.jsx("div",{ref:o,style:pd(),children:e})},hL=({children:e})=>{const t=Z.useContext(fb),n=An("windowViewportRect"),r=An("itemDimensions"),o=Ke("customScrollParent"),s=U4(n,o,!1);return Z.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),f.jsx("div",{ref:s,style:pd(),children:e})},pL=Z.memo(function({...e}){const t=Ke("useWindowScroll"),n=Ke("customScrollParent"),r=n||t?mL:gL,o=n||t?hL:fL,s=Ke("context");return f.jsx(r,{...e,...Et(r,s),children:f.jsxs(o,{children:[f.jsx(uL,{}),f.jsx(cL,{}),f.jsx(dL,{})]})})}),{useEmitter:yb,useEmitterValue:Ke,usePublisher:An}=ub(aL,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},pL),gL=gb({useEmitter:yb,useEmitterValue:Ke,usePublisher:An}),mL=mb({useEmitter:yb,useEmitterValue:Ke,usePublisher:An});function l2(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,gn.WARN),t==="normal"?0:parseInt(t??"0",10)}const vL=A.forwardRef(({id:e,table:t,props:n,isResponsive:r,tblStyle:o,tableAttrs:s,containerStyle:i,columns:l},a)=>f.jsx(nL,{data:t,itemContent:(c,u)=>f.jsx(f.Fragment,{children:u.map((d,h)=>f.jsx($4,{tableId:e,cellId:d,tableProps:n,isResponsive:r,isRowEnding:h+1===u.length},d))}),components:{Table:({children:c,style:u,...d})=>f.jsx("div",{className:"wptb-builder-table-container",style:i,onPointerDownCapture:bs.unMarkCells,children:f.jsxs("table",{...s,...d,style:{...o,...u},ref:a,children:[!r&&f.jsx("colgroup",{children:l.map(h=>h)}),c]})}),TableRow:({children:c,style:u,...d})=>{var v;const h=d["data-item-index"],p=(v=n.rowsProps)==null?void 0:v[h],g=f5(p,h,n,r);return f.jsx("tr",{...d,...g,style:{...u,...g.style},children:c})}},style:{height:"calc(100% - 40px)"}},t.length)),yL=({id:e})=>{const t=A.useRef(null),n=ke(d=>{const h=d.editorSettings.devicePreview;return d.table[e][h]}),r=ke(d=>d.editorSettings.devicePreview),o=ke(d=>{var v,x;const h=d.editorSettings.devicePreview;if(h==="desktop")return!1;const p=(x=(v=d.table[e])==null?void 0:v.blocksProps[be])==null?void 0:x.responsive,g=p==null?void 0:p[h];return(p==null?void 0:p.enable)&&(g==null?void 0:g.disable)!==!0&&(g==null?void 0:g.stackDirection)}),s=ke(d=>d.table[e].blocksProps[be]),{tblStyle:i,tableAttrs:l,containerStyle:a}=A.useMemo(()=>{if(!s)return{tableAttrs:{},tblStyle:{}};const d=d5(s),h={};return!(s!=null&&s.alignment)||s.alignment==="center"?(h.marginLeft="auto",h.marginRight="auto"):s.alignment==="right"&&(h.marginLeft="auto"),h.maxWidth=`${Math.max(700,d.total+50)}px`,s!=null&&s.enableMaxWidth&&(h.maxWidth=s==null?void 0:s.maxWidth,r==="desktop"&&(h.width=s==null?void 0:s.maxWidth)),{tableAttrs:V7(s),tblStyle:U7(s,o?void 0:d.minWidth),containerStyle:h}},[s,n,o,r]);A.useEffect(()=>{t.current&&t.current.addEventListener("pointerup",d=>{["TD","TR","TABLE"].includes(d.target.tagName)||d.stopPropagation()})},[]);const c=A.useMemo(()=>{var h;const d=[];for(let p=0;p<s.colCount;p++){const g=(h=s.columnsProps)==null?void 0:h[p];if(g){let v=g.width;v&&parseInt(v)<=0&&(v="5px"),d.push(f.jsx("col",{style:{width:v,minWidth:v}},p))}else d.push(f.jsx("col",{},p))}return d},[s.columnsProps,s.colCount]),u=!!o;return s.rowCount>30?f.jsx(vL,{id:e,table:n,props:s,isResponsive:u,tblStyle:i,tableAttrs:l,containerStyle:a,columns:c}):f.jsx("div",{className:et("wptb-builder-table-scroller",{"wptb-builder-responsive-preview":u}),children:f.jsx("div",{className:"wptb-builder-table-container",style:a,onPointerDownCapture:bs.unMarkCells,children:f.jsxs("table",{...l,style:i,ref:t,children:[!u&&f.jsx("colgroup",{children:c.map(d=>d)}),f.jsx("tbody",{children:n.map((d,h)=>{var v;const p=(v=s.rowsProps)==null?void 0:v[h],g=f5(p,h,s,u);return f.jsx("tr",{...g,children:d.map((x,m)=>f.jsx($4,{tableId:e,cellId:x,tableProps:s,isResponsive:u,isRowEnding:m+1===d.length},x))},h)})},n.length)]})})})},d_=({id:e,onSave:t,onClose:n,isLoaded:r})=>{var a,c;const o=Es(),s=ke(u=>{var d;return(d=u.table[e])==null?void 0:d.blocksProps[be]}),i=ke(u=>u.editorSettings.previewWidth);A.useEffect(()=>{const u=d=>{z4()&&(d.preventDefault(),d.returnValue=!0)};return addEventListener("beforeunload",u),()=>{removeEventListener("beforeunload",u)}},[]),A.useEffect(()=>{jo.init(),Ze.init(e),Ue.init(),o(Mt({devicePreview:"desktop",previewWidth:void 0}));const u=()=>{o(oa())};return document.addEventListener("pointerup",u),()=>{document.removeEventListener("pointerup",u)}},[e,o]);const l=i?{width:i,maxWidth:i,minWidth:i,overflow:"auto",paddingLeft:"0px",paddingRight:"0px"}:void 0;return f.jsxs("div",{className:et("wptb-builder-page",{"wptb-builder-panel-right":((a=WPTB_CFG.SETTINGS.general)==null?void 0:a.panel_location)==="right","wptb-builder-full-screen":!!((c=WPTB_CFG.SETTINGS.general)!=null&&c.take_over_entire_screen)}),children:[f.jsx("div",{className:"wptb-builder-sidebar",children:f.jsx(Gj,{id:e})}),f.jsxs("div",{className:"wptb-builder-content",children:[f.jsx(Mj,{id:e,onSave:t,onClose:n}),f.jsx("div",{className:"wptb-builder-preview-area",style:l,children:r&&s?f.jsx(yL,{id:e}):f.jsx("div",{className:"wptb-table-loader",children:f.jsx(Gw,{})})})]})]})},Gp=e=>{const t=e.style;if(t.border){const[r,o,...s]=t.border.split(" ");return{width:r,style:o,color:Dr(s.join(" "))}}if(t.borderWidth){const r=t.borderWidth;return r.indexOf(" ")>-1?void 0:{width:r,style:t.borderStyle,color:Dr(t.borderColor)}}if(!t.borderTop)return;const n={};if(t.borderTop){const[r,o,...s]=t.borderTop.split(" ");n.top={width:r,style:o,color:Dr(s.join(" "))}}if(t.borderRight){const[r,o,...s]=t.borderRight.split(" ");n.right={width:r,style:o,color:Dr(s.join(" "))}}if(t.borderBottom){const[r,o,...s]=t.borderBottom.split(" ");n.bottom={width:r,style:o,color:Dr(s.join(" "))}}if(t.borderLeft){const[r,o,...s]=t.borderLeft.split(" ");n.left={width:r,style:o,color:Dr(s.join(" "))}}return n},wL=(e,t,n)=>{var u,d,h,p;const r=n.innerBorders||{};if(!t&&!((u=n.innerBorders)!=null&&u.borderWidth))return;let o=r.borderWidth?parseInt(((d=r.borderWidth)==null?void 0:d.toString())||"0")+"px":void 0,s="solid";const i={},l=e.querySelectorAll("td, th");for(let g=0;g<l.length;g++){const x=l[g].style.borderColor;x&&(i[x]=(i[x]||0)+1)}let a,c=0;for(const g in i)i[g]>c&&(c=i[g],a=g);return t!=null&&t.style?s=t.style:(h=t==null?void 0:t.left)!=null&&h.style&&(s=t.left.style),!o&&(t!=null&&t.width)?o=parseInt(t.width)+"px":(p=t==null?void 0:t.left)!=null&&p.width&&(o=parseInt(t.left.width)+"px"),{width:o,style:s,color:Dr(a)}},bL=e=>{var r;const t=e.innerBorders||{};return(((r=t.borderRadiuses)==null?void 0:r[t.active||"all"])||0).toString()+"px"},f_=(e,t)=>{const n=t==null?void 0:t[e];if(n){if(n.toString().includes(" ")){const o=n.split(" ");return{top:o[0],right:o[1]||o[0],bottom:o[2]||o[0],left:o[3]||o[0]}}return n}const r={};if(["Top","Right","Bottom","Left"].map(o=>{const s=t==null?void 0:t[e+o];s&&(r[o.toLowerCase()]=s)}),Object.keys(r).length)return r};function Dr(e){if(!(e!=null&&e.startsWith("rgb")))return e;const[t,n,r]=e.replace(/[^\d,]/g,"").split(",").map(Number);return`#${t.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}function xL(e){if(!(e!=null&&e.startsWith("hsl")))return e;let[t,n,r]=e.replace(/[^\d,]/g,"").split(",").map(Number);n/=100,r/=100;const o=l=>(l+t/30)%12,s=n*Math.min(r,1-r),i=l=>Math.round(255*(r-s*Math.max(-1,Math.min(o(l)-3,9-o(l),1))));return`#${i(0).toString(16).padStart(2,"0")}${i(8).toString(16).padStart(2,"0")}${i(4).toString(16).padStart(2,"0")}`}function SL(e){if(!(e!=null&&e.startsWith("rgb")))return e;const t=document.body.style.color;document.body.style.color=e;const n=Dr(getComputedStyle(document.body).color);return document.body.style.color=t,n}function ni(e){return e&&(e.startsWith("#")?e.length===4?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:e:e.startsWith("rgb")?Dr(e):e.startsWith("hsl")?xL(e):SL(e))}const a2=document.createElement("div"),c2=e=>e?!e.top:!1,kL=(e,t)=>{const n=e.dataset,r=Gp(e);let o;return(!c2(r)||!c2(t)||r.color!==t.color||r.width!==t.width)&&(o=r),{background:e.style.backgroundColor,border:o,vAlign:n.wptbCellVerticalAlignment||"center",isEmpty:e.classList.contains("wptb-empty"),sortedVertical:n.sortedVertical=="true",sortedHorizontal:n.sortedHorizontal==="true",colspan:e.colSpan||1,rowspan:e.rowSpan||1}},TL=(e,t,n)=>{var s;const r=(s=e.className.match(/wptb-row-highlighted-([0-9]+)/))==null?void 0:s[1];let o=ni(e.style.backgroundColor||e.style.background);return o&&(t===0&&n.headerBg===o||t%2===0&&n.oddRowBg===o||t%2===1&&n.evenRowBg===o)&&(o=void 0),{highlight:!!r,highlightScale:parseInt(r||"100"),background:o}},EL=e=>{var i,l,a,c,u,d,h,p,g,v,x,m,y,w,S;let t=null;try{t=JSON.parse(atob(e.dataset.wptbResponsiveDirectives||"null"))}catch{}const n=(i=t==null?void 0:t.modeOptions)==null?void 0:i.auto,r=parseInt(Zn.responsive.mobile.maxWidth),o=parseInt(Zn.responsive.tablet.maxWidth);return{widthTarget:(t==null?void 0:t.relativeWidth)||"window",enable:(t==null?void 0:t.responsiveEnabled)??!1,mobile:{disable:!!((l=n==null?void 0:n.disabled)!=null&&l.mobile),maxWidth:`${Math.max(((c=(a=t==null?void 0:t.breakpoints)==null?void 0:a.mobile)==null?void 0:c.width)||0,r)}px`,enableHead:((u=n==null?void 0:n.topRowAsHeader)==null?void 0:u.mobile)??!0,staticHead:((d=n==null?void 0:n.staticTopRow)==null?void 0:d.mobile)??!1,stackDirection:((h=n==null?void 0:n.cellStackDirection)==null?void 0:h.mobile)||"row",itemsPerHead:((p=n==null?void 0:n.cellsPerRow)==null?void 0:p.mobile)??2},tablet:{disable:!!((g=n==null?void 0:n.disabled)!=null&&g.tablet),maxWidth:`${((x=(v=t==null?void 0:t.breakpoints)==null?void 0:v.tablet)==null?void 0:x.width)||o}px`,enableHead:((m=n==null?void 0:n.topRowAsHeader)==null?void 0:m.tablet)??!0,staticHead:((y=n==null?void 0:n.staticTopRow)==null?void 0:y.tablet)??!1,stackDirection:((w=n==null?void 0:n.cellStackDirection)==null?void 0:w.tablet)||"row",itemsPerHead:((S=n==null?void 0:n.cellsPerRow)==null?void 0:S.tablet)??2}}},CL=e=>{var p,g,v,x,m;const t=e.dataset,n=((p=e.querySelector("tbody"))==null?void 0:p.dataset)||{},r=e.style,o=e.rows[0].cells[0],s=e.rows.length>1?e.rows[1].cells.length>1?e.rows[1].cells[1]:e.rows[1].cells[0]||o:o,i=Gp(e);let l={};try{l=JSON.parse(atob(t.wptbTableDirectives||"{}"))}catch{}const a=e.rows.length;let c=0;for(let y=0;y<a;y++)c=Math.max(c,e.rows[y].cells.length);const u=wL(e,i,l),d=Gp(o);return{colCount:c,rowCount:a,alignment:t.wptbTableAlignment||Zn.alignment,enableMaxWidth:!!t.wptbApplyTableContainerMaxWidth,maxWidth:t.wptbTableContainerMaxWidth?t.wptbTableContainerMaxWidth+"px":"700px",sortHorizontal:{enable:t.wptbSortableTableHorizontal=="1"},sortVertical:{enable:t.wptbSortableTableVertical=="1"},colSpacing:(t.borderSpacingColumns||"3")+"px",rowSpacing:(t.borderSpacingRows||"3")+"px",cellMinWidth:(t.wptbTdWidthAuto||"120")+"px",cellPadding:(s==null?void 0:s.style.padding)||Zn.cellPadding,fontColor:ni(n.globalFontColor),linkColor:ni(n.globalLinkColor),fontSize:parseInt(n.globalFontSize||"15")+"px",tableBorder:i,enableInnerBorder:!!u,innerBorder:u,headerInnerBorder:d?d.style!="none":!1,innerBorderRadius:bL(l),separateRowCol:r.borderCollapse=="separate",rowBorderOnly:((g=l.innerBorders)==null?void 0:g.active)=="row",columnBorderOnly:((v=l.innerBorders)==null?void 0:v.active)=="column",scrollX:!!t.wptbHorizontalScrollStatus,disableThemeStyles:t.disableThemeStyles==="1",extraStyles:atob(t.wptbExtraStyles||""),stickyFirstColumn:t.wptbFirstColumnSticky==="true",stickyTopRow:((m=(x=e.querySelector("tr"))==null?void 0:x.dataset)==null?void 0:m.wptbStickyRow)==="true",paginationEnable:t.wptbPaginationEnable==="true",paginationTopRowAsHeader:t.wptbProPaginationTopRowHeader==="true",rowsPerPage:parseInt(t.wptbRowsPerPage||"10"),dyanamicPageSize:t.wptbRowsChangeable==="true",searchEnable:t.wptbSearchEnable==="true",searchKeepHeader:t.wptbProSearchTopRowHeader==="true",searchPosition:t.wptbSearchbarPosition||"left",role:e.getAttribute("role")||"table",headerBg:ni(t.wptbHeaderBackgroundColor),evenRowBg:ni(t.wptbEvenRowBackgroundColor),oddRowBg:ni(t.wptbOddRowBackgroundColor),hoverHeaderBg:t.wptbHeaderHoverBackgroundColor,hoverEvenRowBg:t.wptbEvenRowHoverBackgroundColor,hoverOddRowBg:t.wptbOddRowHoverBackgroundColor,responsive:EL(e),columnsProps:{},rowsProps:{}}};function h_(e){var d,h;a2.innerHTML=e;const t=a2.querySelector("table");if(!t)return null;const n={},r={},o=Object.values(Qr),s=CL(t);r[be]=s;const i={},l={},a=Array.from({length:s.rowCount},()=>Array.from({length:s.colCount},()=>Wr())),c={};for(let p=0;p<s.rowCount;p++){const g=t.rows[p],v=TL(g,p,s),x=g.cells.length,m=a[p];let y=0;for(let w=0;w<x;w++){for(;(d=c[p])!=null&&d[y];)y++;const S=g.cells[w],k=[],T=m[y];S.style.height&&(v.height=S.style.height),S.style.width&&(i[y]={...i[y],width:S.style.width}),S.classList.contains("wptb-hide-on-mobile")&&(i[y]={...i[y],hideOnMobile:!0});const C=(h=S.className.match(/wptb-col-highlighted-([0-9]+)/))==null?void 0:h[1];C&&(i[y]={...i[y],highlight:!0,highlightScale:parseInt(C)}),Array.from(S.children).forEach(M=>{var _;for(const U of o)if((_=U.isBlock)!=null&&_.call(U,M)&&U.parse){const[V,ee]=U.parse(M,r,n,s);k.push(V),ee.parentId=T,n[V]=ee;break}}),n[T]={name:"cell",blockOrder:k,parentId:p.toString()};const I=S.colSpan||1,j=S.rowSpan||1,R=kL(S,s.innerBorder);if(Object.assign(R,{col:y,row:p}),r[T]=R,I>1){c[p]||(c[p]={});for(let M=1;M<I;M++){const _=y+M,U=m[_],V={...yu,row:p,col:_,isNotACell:!0};r[U]=V,n[U]={name:"cell",blockOrder:[],parentId:p.toString()},c[p][_]=!0}}for(let M=1;M<j;M++){const _=p+M,U=a[_];c[_]||(c[_]={});for(let V=0;V<I;V++){const ee=y+V,Ee=U[ee],Re={...yu,row:_,col:ee,isNotACell:!0};r[Ee]=Re,n[Ee]={name:"cell",blockOrder:[],parentId:_.toString()},c[_][ee]=!0}}y+=I}(v.background||v.height||v.highlightScale!==100)&&(l[p]=v)}return s.columnsProps=i,s.rowsProps=l,{desktop:a,tablet:a,mobile:a,blocksProps:r,innerBlocks:n}}export{U8 as $,l_ as A,Es as B,iS as C,Gw as D,LL as E,Ui as F,Mt as G,d_ as H,ML as I,GL as J,Ge as K,x0 as L,X1 as M,Ju as N,M5 as O,ZL as P,_t as Q,UL as R,i_ as S,FL as T,z6 as U,Ro as V,Yw as W,Tt as X,qr as Y,yr as Z,KL as _,Pj as a,Z as a0,B3 as a1,_L as a2,zL as a3,m5 as a4,X7 as a5,J7 as a6,eS as a7,Fi as a8,WL as a9,ni as aA,f_ as aB,AL as aC,j7 as aD,$L as aE,$7 as aF,R7 as aG,DL as aH,L7 as aI,jL as aJ,cm as aK,_7 as aL,O7 as aM,M7 as aN,t5 as aO,RL as aP,Ht as aQ,qL as aR,PL as aS,BL as aT,V0 as aU,NL as aV,VL as aa,ap as ab,CS as ac,M4 as ad,P4 as ae,B4 as af,Mm as ag,s_ as ah,O4 as ai,jj as aj,Hv as ak,mi as al,ke as am,Qr as an,Kj as ao,g5 as ap,W7 as aq,nL as ar,f5 as as,d5 as at,U7 as au,V7 as av,Ue as aw,p7 as ax,h7 as ay,oa as az,u_ as b,et as c,q6 as d,Rj as e,B5 as f,c_ as g,a_ as h,ae as i,f as j,d7 as k,Cn as l,Di as m,Rn as n,Zn as o,h_ as p,be as q,A as r,sa as s,h5 as t,OL as u,Wr as v,v5 as w,Kw as x,D6 as y,YL as z};