@yext/visual-editor 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{debugger-C-GK2f4q-7P5nIXek.cjs → debugger-C-GK2f4q-8oHFLsRA.cjs} +1 -1
- package/dist/{debugger-C-GK2f4q-CM9lUegF.js → debugger-C-GK2f4q-CXC-jEGs.js} +1 -1
- package/dist/index-DYLhnejE.cjs +297 -0
- package/dist/{index-CR1QI1Dd.js → index-gaSBBVcH.js} +46120 -45528
- package/dist/index.d.cts +261 -200
- package/dist/index.d.ts +261 -200
- package/dist/style.css +1 -1
- package/dist/visual-editor.cjs +1 -1
- package/dist/visual-editor.js +45 -37
- package/package.json +6 -4
- package/dist/index-B5wBZ4uV.cjs +0 -280
package/dist/index-B5wBZ4uV.cjs
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
"use strict";var T1=Object.defineProperty;var N1=(e,t,n)=>t in e?T1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ul=(e,t,n)=>N1(e,typeof t!="symbol"?t+"":t,n);const H=require("react"),ku=require("react-dom"),Vt=require("@measured/puck"),S1=require("uuid");function Hx(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=Hx(H),Gx=Hx(ku);var Nd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function O1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pp={exports:{}},eu={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Iv;function A1(){if(Iv)return eu;Iv=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var m,_={},C=null,b=null;p!==void 0&&(C=""+p),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(b=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(_[m]=u[m]);if(l&&l.defaultProps)for(m in u=l.defaultProps,u)_[m]===void 0&&(_[m]=u[m]);return{$$typeof:t,type:l,key:C,ref:b,props:_,_owner:o.current}}return eu.Fragment=n,eu.jsx=a,eu.jsxs=a,eu}var tu={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Lv;function R1(){return Lv||(Lv=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),v=Symbol.iterator,y="@@iterator";function T(ae){if(ae===null||typeof ae!="object")return null;var $e=v&&ae[v]||ae[y];return typeof $e=="function"?$e:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A(ae){{for(var $e=arguments.length,je=new Array($e>1?$e-1:0),at=1;at<$e;at++)je[at-1]=arguments[at];D("error",ae,je)}}function D(ae,$e,je){{var at=O.ReactDebugCurrentFrame,xt=at.getStackAddendum();xt!==""&&($e+="%s",je=je.concat([xt]));var bt=je.map(function(ht){return String(ht)});bt.unshift("Warning: "+$e),Function.prototype.apply.call(console[ae],console,bt)}}var P=!1,M=!1,V=!1,J=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function U(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||oe||ae===o||ae===p||ae===m||J||ae===b||P||M||V||typeof ae=="object"&&ae!==null&&(ae.$$typeof===C||ae.$$typeof===_||ae.$$typeof===a||ae.$$typeof===l||ae.$$typeof===u||ae.$$typeof===Z||ae.getModuleId!==void 0))}function Q(ae,$e,je){var at=ae.displayName;if(at)return at;var xt=$e.displayName||$e.name||"";return xt!==""?je+"("+xt+")":je}function de(ae){return ae.displayName||"Context"}function pe(ae){if(ae==null)return null;if(typeof ae.tag=="number"&&A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ae=="function")return ae.displayName||ae.name||null;if(typeof ae=="string")return ae;switch(ae){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof ae=="object")switch(ae.$$typeof){case l:var $e=ae;return de($e)+".Consumer";case a:var je=ae;return de(je._context)+".Provider";case u:return Q(ae,ae.render,"ForwardRef");case _:var at=ae.displayName||null;return at!==null?at:pe(ae.type)||"Memo";case C:{var xt=ae,bt=xt._payload,ht=xt._init;try{return pe(ht(bt))}catch{return null}}}return null}var te=Object.assign,he=0,Y,j,ee,ne,B,W,X;function F(){}F.__reactDisabledLog=!0;function w(){{if(he===0){Y=console.log,j=console.info,ee=console.warn,ne=console.error,B=console.group,W=console.groupCollapsed,X=console.groupEnd;var ae={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:ae,log:ae,warn:ae,error:ae,group:ae,groupCollapsed:ae,groupEnd:ae})}he++}}function N(){{if(he--,he===0){var ae={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},ae,{value:Y}),info:te({},ae,{value:j}),warn:te({},ae,{value:ee}),error:te({},ae,{value:ne}),group:te({},ae,{value:B}),groupCollapsed:te({},ae,{value:W}),groupEnd:te({},ae,{value:X})})}he<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=O.ReactCurrentDispatcher,q;function ue(ae,$e,je){{if(q===void 0)try{throw Error()}catch(xt){var at=xt.stack.trim().match(/\n( *(at )?)/);q=at&&at[1]||""}return`
|
|
18
|
-
`+q+ae}}var fe=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Oe(ae,$e){if(!ae||fe)return"";{var je=se.get(ae);if(je!==void 0)return je}var at;fe=!0;var xt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var bt;bt=I.current,I.current=null,w();try{if($e){var ht=function(){throw Error()};if(Object.defineProperty(ht.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ht,[])}catch(Jn){at=Jn}Reflect.construct(ae,[],ht)}else{try{ht.call()}catch(Jn){at=Jn}ae.call(ht.prototype)}}else{try{throw Error()}catch(Jn){at=Jn}ae()}}catch(Jn){if(Jn&&at&&typeof Jn.stack=="string"){for(var At=Jn.stack.split(`
|
|
19
|
-
`),Kt=at.stack.split(`
|
|
20
|
-
`),Mt=At.length-1,Yt=Kt.length-1;Mt>=1&&Yt>=0&&At[Mt]!==Kt[Yt];)Yt--;for(;Mt>=1&&Yt>=0;Mt--,Yt--)if(At[Mt]!==Kt[Yt]){if(Mt!==1||Yt!==1)do if(Mt--,Yt--,Yt<0||At[Mt]!==Kt[Yt]){var mn=`
|
|
21
|
-
`+At[Mt].replace(" at new "," at ");return ae.displayName&&mn.includes("<anonymous>")&&(mn=mn.replace("<anonymous>",ae.displayName)),typeof ae=="function"&&se.set(ae,mn),mn}while(Mt>=1&&Yt>=0);break}}}finally{fe=!1,I.current=bt,N(),Error.prepareStackTrace=xt}var xr=ae?ae.displayName||ae.name:"",wn=xr?ue(xr):"";return typeof ae=="function"&&se.set(ae,wn),wn}function Be(ae,$e,je){return Oe(ae,!1)}function ce(ae){var $e=ae.prototype;return!!($e&&$e.isReactComponent)}function le(ae,$e,je){if(ae==null)return"";if(typeof ae=="function")return Oe(ae,ce(ae));if(typeof ae=="string")return ue(ae);switch(ae){case p:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof ae=="object")switch(ae.$$typeof){case u:return Be(ae.render);case _:return le(ae.type,$e,je);case C:{var at=ae,xt=at._payload,bt=at._init;try{return le(bt(xt),$e,je)}catch{}}}return""}var ye=Object.prototype.hasOwnProperty,Me={},Pe=O.ReactDebugCurrentFrame;function We(ae){if(ae){var $e=ae._owner,je=le(ae.type,ae._source,$e?$e.type:null);Pe.setExtraStackFrame(je)}else Pe.setExtraStackFrame(null)}function Xe(ae,$e,je,at,xt){{var bt=Function.call.bind(ye);for(var ht in ae)if(bt(ae,ht)){var At=void 0;try{if(typeof ae[ht]!="function"){var Kt=Error((at||"React class")+": "+je+" type `"+ht+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ae[ht]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Kt.name="Invariant Violation",Kt}At=ae[ht]($e,ht,at,je,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Mt){At=Mt}At&&!(At instanceof Error)&&(We(xt),A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",at||"React class",je,ht,typeof At),We(null)),At instanceof Error&&!(At.message in Me)&&(Me[At.message]=!0,We(xt),A("Failed %s type: %s",je,At.message),We(null))}}}var st=Array.isArray;function dt(ae){return st(ae)}function Ct(ae){{var $e=typeof Symbol=="function"&&Symbol.toStringTag,je=$e&&ae[Symbol.toStringTag]||ae.constructor.name||"Object";return je}}function Se(ae){try{return me(ae),!1}catch{return!0}}function me(ae){return""+ae}function _e(ae){if(Se(ae))return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(ae)),me(ae)}var De=O.ReactCurrentOwner,Fe={key:!0,ref:!0,__self:!0,__source:!0},ke,ze,tt;tt={};function ut(ae){if(ye.call(ae,"ref")){var $e=Object.getOwnPropertyDescriptor(ae,"ref").get;if($e&&$e.isReactWarning)return!1}return ae.ref!==void 0}function Et(ae){if(ye.call(ae,"key")){var $e=Object.getOwnPropertyDescriptor(ae,"key").get;if($e&&$e.isReactWarning)return!1}return ae.key!==void 0}function jt(ae,$e){if(typeof ae.ref=="string"&&De.current&&$e&&De.current.stateNode!==$e){var je=pe(De.current.type);tt[je]||(A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pe(De.current.type),ae.ref),tt[je]=!0)}}function Qe(ae,$e){{var je=function(){ke||(ke=!0,A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};je.isReactWarning=!0,Object.defineProperty(ae,"key",{get:je,configurable:!0})}}function et(ae,$e){{var je=function(){ze||(ze=!0,A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};je.isReactWarning=!0,Object.defineProperty(ae,"ref",{get:je,configurable:!0})}}var lt=function(ae,$e,je,at,xt,bt,ht){var At={$$typeof:t,type:ae,key:$e,ref:je,props:ht,_owner:bt};return At._store={},Object.defineProperty(At._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(At,"_self",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.defineProperty(At,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xt}),Object.freeze&&(Object.freeze(At.props),Object.freeze(At)),At};function wt(ae,$e,je,at,xt){{var bt,ht={},At=null,Kt=null;je!==void 0&&(_e(je),At=""+je),Et($e)&&(_e($e.key),At=""+$e.key),ut($e)&&(Kt=$e.ref,jt($e,xt));for(bt in $e)ye.call($e,bt)&&!Fe.hasOwnProperty(bt)&&(ht[bt]=$e[bt]);if(ae&&ae.defaultProps){var Mt=ae.defaultProps;for(bt in Mt)ht[bt]===void 0&&(ht[bt]=Mt[bt])}if(At||Kt){var Yt=typeof ae=="function"?ae.displayName||ae.name||"Unknown":ae;At&&Qe(ht,Yt),Kt&&et(ht,Yt)}return lt(ae,At,Kt,xt,at,De.current,ht)}}var _t=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function qe(ae){if(ae){var $e=ae._owner,je=le(ae.type,ae._source,$e?$e.type:null);Rt.setExtraStackFrame(je)}else Rt.setExtraStackFrame(null)}var ot;ot=!1;function vt(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===t}function kt(){{if(_t.current){var ae=pe(_t.current.type);if(ae)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+ae+"`."}return""}}function Dt(ae){return""}var Gt={};function sn(ae){{var $e=kt();if(!$e){var je=typeof ae=="string"?ae:ae.displayName||ae.name;je&&($e=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+je+">.")}return $e}}function dr(ae,$e){{if(!ae._store||ae._store.validated||ae.key!=null)return;ae._store.validated=!0;var je=sn($e);if(Gt[je])return;Gt[je]=!0;var at="";ae&&ae._owner&&ae._owner!==_t.current&&(at=" It was passed a child from "+pe(ae._owner.type)+"."),qe(ae),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',je,at),qe(null)}}function Cr(ae,$e){{if(typeof ae!="object")return;if(dt(ae))for(var je=0;je<ae.length;je++){var at=ae[je];vt(at)&&dr(at,$e)}else if(vt(ae))ae._store&&(ae._store.validated=!0);else if(ae){var xt=T(ae);if(typeof xt=="function"&&xt!==ae.entries)for(var bt=xt.call(ae),ht;!(ht=bt.next()).done;)vt(ht.value)&&dr(ht.value,$e)}}}function Xo(ae){{var $e=ae.type;if($e==null||typeof $e=="string")return;var je;if(typeof $e=="function")je=$e.propTypes;else if(typeof $e=="object"&&($e.$$typeof===u||$e.$$typeof===_))je=$e.propTypes;else return;if(je){var at=pe($e);Xe(je,ae.props,"prop",at,ae)}else if($e.PropTypes!==void 0&&!ot){ot=!0;var xt=pe($e);A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof $e.getDefaultProps=="function"&&!$e.getDefaultProps.isReactClassApproved&&A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ra(ae){{for(var $e=Object.keys(ae.props),je=0;je<$e.length;je++){var at=$e[je];if(at!=="children"&&at!=="key"){qe(ae),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",at),qe(null);break}}ae.ref!==null&&(qe(ae),A("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}var wr={};function Zn(ae,$e,je,at,xt,bt){{var ht=U(ae);if(!ht){var At="";(ae===void 0||typeof ae=="object"&&ae!==null&&Object.keys(ae).length===0)&&(At+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Kt=Dt();Kt?At+=Kt:At+=kt();var Mt;ae===null?Mt="null":dt(ae)?Mt="array":ae!==void 0&&ae.$$typeof===t?(Mt="<"+(pe(ae.type)||"Unknown")+" />",At=" Did you accidentally export a JSX literal instead of a component?"):Mt=typeof ae,A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Mt,At)}var Yt=wt(ae,$e,je,xt,bt);if(Yt==null)return Yt;if(ht){var mn=$e.children;if(mn!==void 0)if(at)if(dt(mn)){for(var xr=0;xr<mn.length;xr++)Cr(mn[xr],ae);Object.freeze&&Object.freeze(mn)}else A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Cr(mn,ae)}if(ye.call($e,"key")){var wn=pe(ae),Jn=Object.keys($e).filter(function(Qo){return Qo!=="key"}),kr=Jn.length>0?"{key: someKey, "+Jn.join(": ..., ")+": ...}":"{key: someKey}";if(!wr[wn+kr]){var ia=Jn.length>0?"{"+Jn.join(": ..., ")+": ...}":"{}";A(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,kr,wn,ia,wn),wr[wn+kr]=!0}}return ae===r?ra(Yt):Xo(Yt),Yt}}function _r(ae,$e,je){return Zn(ae,$e,je,!0)}function lo(ae,$e,je){return Zn(ae,$e,je,!1)}var oa=lo,Ee=_r;tu.Fragment=r,tu.jsx=oa,tu.jsxs=Ee}()),tu}process.env.NODE_ENV==="production"?Pp.exports=A1():Pp.exports=R1();var re=Pp.exports;function Kx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Kx(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $1(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Kx(e))&&(r&&(r+=" "),r+=t);return r}const Fv=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,jv=$1,Dr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return jv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(p=>{const m=n==null?void 0:n[p],_=i==null?void 0:i[p];if(m===null)return null;const C=Fv(m)||Fv(_);return o[p][C]}),l=n&&Object.entries(n).reduce((p,m)=>{let[_,C]=m;return C===void 0||(p[_]=C),p},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,m)=>{let{class:_,className:C,...b}=m;return Object.entries(b).every(v=>{let[y,T]=v;return Array.isArray(T)?T.includes({...i,...l}[y]):{...i,...l}[y]===T})?[...p,_,C]:p},[]);return jv(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)};function Ux(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ux(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mu(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ux(e))&&(r&&(r+=" "),r+=t);return r}const Vx=Dr("components text-body-fontSize",{variants:{fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontWeight:"default",color:"default",textTransform:"none"}}),Sg=ge.forwardRef(({className:e,fontWeight:t,color:n,textTransform:r,fontSize:o,...i},a)=>re.jsx("p",{style:{fontSize:o==="default"?void 0:o+"px"},className:Mu(e,Vx({fontWeight:t,color:n,textTransform:r,className:e})),ref:a,...i,children:i.children}));Sg.displayName="Body";function D1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Yx(...e){return t=>e.forEach(n=>D1(n,t))}function cr(...e){return ge.useCallback(Yx(...e),e)}var Ma=ge.forwardRef((e,t)=>{const{children:n,...r}=e,o=ge.Children.toArray(n),i=o.find(k1);if(i){const a=i.props.children,l=o.map(u=>u===i?ge.Children.count(a)>1?ge.Children.only(null):ge.isValidElement(a)?a.props.children:null:u);return re.jsx(Ip,{...r,ref:t,children:ge.isValidElement(a)?ge.cloneElement(a,void 0,l):null})}return re.jsx(Ip,{...r,ref:t,children:n})});Ma.displayName="Slot";var Ip=ge.forwardRef((e,t)=>{const{children:n,...r}=e;if(ge.isValidElement(n)){const o=P1(n);return ge.cloneElement(n,{...M1(r,n.props),ref:t?Yx(t,o):o})}return ge.Children.count(n)>1?ge.Children.only(null):null});Ip.displayName="SlotClone";var Og=({children:e})=>re.jsx(re.Fragment,{children:e});function k1(e){return ge.isValidElement(e)&&e.type===Og}function M1(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function P1(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const qx=Dr("py-4 components inline-flex items-center justify-center whitespace-nowrap rounded-button-borderRadius text-button-fontSize font-button-fontWeight ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ",{variants:{variant:{primary:"bg-palette-primary text-palette-secondary border-2 border-palette-primary hover:border-palette-secondary focus:border-palette-secondary active:bg-palette-secondary active:text-palette-primary active:border-palette-primary",secondary:"bg-palette-secondary text-palette-primary border-2 border-palette-secondary hover:border-palette-primary focus:border-palette-primary active:bg-palette-primary active:text-palette-secondary active:border-palette-secondary",outline:"border-palette-primary bg-palette-background border-2 hover:border-palette-background focus:border-palette-background active:bg-palette-primary active:text-palette-background",link:"text-palette-primary underline-offset-4 underline hover:no-underline"},size:{default:"w-full md:w-fit h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"primary",size:"default"}}),Sf=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,fontSize:o,...i},a)=>{const l=r?Ma:"button";return re.jsx(l,{style:{fontSize:!o||o==="default"?void 0:o+"px"},className:Mu(e,qx({variant:t,size:n})),ref:a,...i})});Sf.displayName="Button";var I1=Object.defineProperty,L1=(e,t,n)=>t in e?I1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oo=(e,t,n)=>L1(e,typeof t!="symbol"?t+"":t,n),Bv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function F1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lp={exports:{}},nu={};/**
|
|
31
|
-
* @license React
|
|
32
|
-
* react-jsx-runtime.production.min.js
|
|
33
|
-
*
|
|
34
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the MIT license found in the
|
|
37
|
-
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var Wv;function j1(){if(Wv)return nu;Wv=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var m,_={},C=null,b=null;p!==void 0&&(C=""+p),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(b=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(_[m]=u[m]);if(l&&l.defaultProps)for(m in u=l.defaultProps,u)_[m]===void 0&&(_[m]=u[m]);return{$$typeof:t,type:l,key:C,ref:b,props:_,_owner:o.current}}return nu.Fragment=n,nu.jsx=a,nu.jsxs=a,nu}var Sd={};/**
|
|
39
|
-
* @license React
|
|
40
|
-
* react-jsx-runtime.development.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var zv;function B1(){return zv||(zv=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),v=Symbol.iterator,y="@@iterator";function T(Ee){if(Ee===null||typeof Ee!="object")return null;var ae=v&&Ee[v]||Ee[y];return typeof ae=="function"?ae:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A(Ee){{for(var ae=arguments.length,$e=new Array(ae>1?ae-1:0),je=1;je<ae;je++)$e[je-1]=arguments[je];D("error",Ee,$e)}}function D(Ee,ae,$e){{var je=O.ReactDebugCurrentFrame,at=je.getStackAddendum();at!==""&&(ae+="%s",$e=$e.concat([at]));var xt=$e.map(function(bt){return String(bt)});xt.unshift("Warning: "+ae),Function.prototype.apply.call(console[Ee],console,xt)}}var P=!1,M=!1,V=!1,J=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function U(Ee){return!!(typeof Ee=="string"||typeof Ee=="function"||Ee===r||Ee===i||oe||Ee===o||Ee===p||Ee===m||J||Ee===b||P||M||V||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===C||Ee.$$typeof===_||Ee.$$typeof===a||Ee.$$typeof===l||Ee.$$typeof===u||Ee.$$typeof===Z||Ee.getModuleId!==void 0))}function Q(Ee,ae,$e){var je=Ee.displayName;if(je)return je;var at=ae.displayName||ae.name||"";return at!==""?$e+"("+at+")":$e}function de(Ee){return Ee.displayName||"Context"}function pe(Ee){if(Ee==null)return null;if(typeof Ee.tag=="number"&&A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Ee=="function")return Ee.displayName||Ee.name||null;if(typeof Ee=="string")return Ee;switch(Ee){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof Ee=="object")switch(Ee.$$typeof){case l:var ae=Ee;return de(ae)+".Consumer";case a:var $e=Ee;return de($e._context)+".Provider";case u:return Q(Ee,Ee.render,"ForwardRef");case _:var je=Ee.displayName||null;return je!==null?je:pe(Ee.type)||"Memo";case C:{var at=Ee,xt=at._payload,bt=at._init;try{return pe(bt(xt))}catch{return null}}}return null}var te=Object.assign,he=0,Y,j,ee,ne,B,W,X;function F(){}F.__reactDisabledLog=!0;function w(){{if(he===0){Y=console.log,j=console.info,ee=console.warn,ne=console.error,B=console.group,W=console.groupCollapsed,X=console.groupEnd;var Ee={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:Ee,log:Ee,warn:Ee,error:Ee,group:Ee,groupCollapsed:Ee,groupEnd:Ee})}he++}}function N(){{if(he--,he===0){var Ee={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},Ee,{value:Y}),info:te({},Ee,{value:j}),warn:te({},Ee,{value:ee}),error:te({},Ee,{value:ne}),group:te({},Ee,{value:B}),groupCollapsed:te({},Ee,{value:W}),groupEnd:te({},Ee,{value:X})})}he<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=O.ReactCurrentDispatcher,q;function ue(Ee,ae,$e){{if(q===void 0)try{throw Error()}catch(at){var je=at.stack.trim().match(/\n( *(at )?)/);q=je&&je[1]||""}return`
|
|
47
|
-
`+q+Ee}}var fe=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Oe(Ee,ae){if(!Ee||fe)return"";{var $e=se.get(Ee);if($e!==void 0)return $e}var je;fe=!0;var at=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var xt;xt=I.current,I.current=null,w();try{if(ae){var bt=function(){throw Error()};if(Object.defineProperty(bt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(bt,[])}catch(wn){je=wn}Reflect.construct(Ee,[],bt)}else{try{bt.call()}catch(wn){je=wn}Ee.call(bt.prototype)}}else{try{throw Error()}catch(wn){je=wn}Ee()}}catch(wn){if(wn&&je&&typeof wn.stack=="string"){for(var ht=wn.stack.split(`
|
|
48
|
-
`),At=je.stack.split(`
|
|
49
|
-
`),Kt=ht.length-1,Mt=At.length-1;Kt>=1&&Mt>=0&&ht[Kt]!==At[Mt];)Mt--;for(;Kt>=1&&Mt>=0;Kt--,Mt--)if(ht[Kt]!==At[Mt]){if(Kt!==1||Mt!==1)do if(Kt--,Mt--,Mt<0||ht[Kt]!==At[Mt]){var Yt=`
|
|
50
|
-
`+ht[Kt].replace(" at new "," at ");return Ee.displayName&&Yt.includes("<anonymous>")&&(Yt=Yt.replace("<anonymous>",Ee.displayName)),typeof Ee=="function"&&se.set(Ee,Yt),Yt}while(Kt>=1&&Mt>=0);break}}}finally{fe=!1,I.current=xt,N(),Error.prepareStackTrace=at}var mn=Ee?Ee.displayName||Ee.name:"",xr=mn?ue(mn):"";return typeof Ee=="function"&&se.set(Ee,xr),xr}function Be(Ee,ae,$e){return Oe(Ee,!1)}function ce(Ee){var ae=Ee.prototype;return!!(ae&&ae.isReactComponent)}function le(Ee,ae,$e){if(Ee==null)return"";if(typeof Ee=="function")return Oe(Ee,ce(Ee));if(typeof Ee=="string")return ue(Ee);switch(Ee){case p:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof Ee=="object")switch(Ee.$$typeof){case u:return Be(Ee.render);case _:return le(Ee.type,ae,$e);case C:{var je=Ee,at=je._payload,xt=je._init;try{return le(xt(at),ae,$e)}catch{}}}return""}var ye=Object.prototype.hasOwnProperty,Me={},Pe=O.ReactDebugCurrentFrame;function We(Ee){if(Ee){var ae=Ee._owner,$e=le(Ee.type,Ee._source,ae?ae.type:null);Pe.setExtraStackFrame($e)}else Pe.setExtraStackFrame(null)}function Xe(Ee,ae,$e,je,at){{var xt=Function.call.bind(ye);for(var bt in Ee)if(xt(Ee,bt)){var ht=void 0;try{if(typeof Ee[bt]!="function"){var At=Error((je||"React class")+": "+$e+" type `"+bt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Ee[bt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw At.name="Invariant Violation",At}ht=Ee[bt](ae,bt,je,$e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Kt){ht=Kt}ht&&!(ht instanceof Error)&&(We(at),A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",je||"React class",$e,bt,typeof ht),We(null)),ht instanceof Error&&!(ht.message in Me)&&(Me[ht.message]=!0,We(at),A("Failed %s type: %s",$e,ht.message),We(null))}}}var st=Array.isArray;function dt(Ee){return st(Ee)}function Ct(Ee){{var ae=typeof Symbol=="function"&&Symbol.toStringTag,$e=ae&&Ee[Symbol.toStringTag]||Ee.constructor.name||"Object";return $e}}function Se(Ee){try{return me(Ee),!1}catch{return!0}}function me(Ee){return""+Ee}function _e(Ee){if(Se(Ee))return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(Ee)),me(Ee)}var De=O.ReactCurrentOwner,Fe={key:!0,ref:!0,__self:!0,__source:!0},ke,ze,tt;tt={};function ut(Ee){if(ye.call(Ee,"ref")){var ae=Object.getOwnPropertyDescriptor(Ee,"ref").get;if(ae&&ae.isReactWarning)return!1}return Ee.ref!==void 0}function Et(Ee){if(ye.call(Ee,"key")){var ae=Object.getOwnPropertyDescriptor(Ee,"key").get;if(ae&&ae.isReactWarning)return!1}return Ee.key!==void 0}function jt(Ee,ae){if(typeof Ee.ref=="string"&&De.current&&ae&&De.current.stateNode!==ae){var $e=pe(De.current.type);tt[$e]||(A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pe(De.current.type),Ee.ref),tt[$e]=!0)}}function Qe(Ee,ae){{var $e=function(){ke||(ke=!0,A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"key",{get:$e,configurable:!0})}}function et(Ee,ae){{var $e=function(){ze||(ze=!0,A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"ref",{get:$e,configurable:!0})}}var lt=function(Ee,ae,$e,je,at,xt,bt){var ht={$$typeof:t,type:Ee,key:ae,ref:$e,props:bt,_owner:xt};return ht._store={},Object.defineProperty(ht._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ht,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(ht,"_source",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.freeze&&(Object.freeze(ht.props),Object.freeze(ht)),ht};function wt(Ee,ae,$e,je,at){{var xt,bt={},ht=null,At=null;$e!==void 0&&(_e($e),ht=""+$e),Et(ae)&&(_e(ae.key),ht=""+ae.key),ut(ae)&&(At=ae.ref,jt(ae,at));for(xt in ae)ye.call(ae,xt)&&!Fe.hasOwnProperty(xt)&&(bt[xt]=ae[xt]);if(Ee&&Ee.defaultProps){var Kt=Ee.defaultProps;for(xt in Kt)bt[xt]===void 0&&(bt[xt]=Kt[xt])}if(ht||At){var Mt=typeof Ee=="function"?Ee.displayName||Ee.name||"Unknown":Ee;ht&&Qe(bt,Mt),At&&et(bt,Mt)}return lt(Ee,ht,At,at,je,De.current,bt)}}var _t=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function qe(Ee){if(Ee){var ae=Ee._owner,$e=le(Ee.type,Ee._source,ae?ae.type:null);Rt.setExtraStackFrame($e)}else Rt.setExtraStackFrame(null)}var ot;ot=!1;function vt(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===t}function kt(){{if(_t.current){var Ee=pe(_t.current.type);if(Ee)return`
|
|
51
|
-
|
|
52
|
-
Check the render method of \``+Ee+"`."}return""}}function Dt(Ee){return""}var Gt={};function sn(Ee){{var ae=kt();if(!ae){var $e=typeof Ee=="string"?Ee:Ee.displayName||Ee.name;$e&&(ae=`
|
|
53
|
-
|
|
54
|
-
Check the top-level render call using <`+$e+">.")}return ae}}function dr(Ee,ae){{if(!Ee._store||Ee._store.validated||Ee.key!=null)return;Ee._store.validated=!0;var $e=sn(ae);if(Gt[$e])return;Gt[$e]=!0;var je="";Ee&&Ee._owner&&Ee._owner!==_t.current&&(je=" It was passed a child from "+pe(Ee._owner.type)+"."),qe(Ee),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$e,je),qe(null)}}function Cr(Ee,ae){{if(typeof Ee!="object")return;if(dt(Ee))for(var $e=0;$e<Ee.length;$e++){var je=Ee[$e];vt(je)&&dr(je,ae)}else if(vt(Ee))Ee._store&&(Ee._store.validated=!0);else if(Ee){var at=T(Ee);if(typeof at=="function"&&at!==Ee.entries)for(var xt=at.call(Ee),bt;!(bt=xt.next()).done;)vt(bt.value)&&dr(bt.value,ae)}}}function Xo(Ee){{var ae=Ee.type;if(ae==null||typeof ae=="string")return;var $e;if(typeof ae=="function")$e=ae.propTypes;else if(typeof ae=="object"&&(ae.$$typeof===u||ae.$$typeof===_))$e=ae.propTypes;else return;if($e){var je=pe(ae);Xe($e,Ee.props,"prop",je,Ee)}else if(ae.PropTypes!==void 0&&!ot){ot=!0;var at=pe(ae);A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",at||"Unknown")}typeof ae.getDefaultProps=="function"&&!ae.getDefaultProps.isReactClassApproved&&A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ra(Ee){{for(var ae=Object.keys(Ee.props),$e=0;$e<ae.length;$e++){var je=ae[$e];if(je!=="children"&&je!=="key"){qe(Ee),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),qe(null);break}}Ee.ref!==null&&(qe(Ee),A("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}function wr(Ee,ae,$e,je,at,xt){{var bt=U(Ee);if(!bt){var ht="";(Ee===void 0||typeof Ee=="object"&&Ee!==null&&Object.keys(Ee).length===0)&&(ht+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var At=Dt();At?ht+=At:ht+=kt();var Kt;Ee===null?Kt="null":dt(Ee)?Kt="array":Ee!==void 0&&Ee.$$typeof===t?(Kt="<"+(pe(Ee.type)||"Unknown")+" />",ht=" Did you accidentally export a JSX literal instead of a component?"):Kt=typeof Ee,A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Kt,ht)}var Mt=wt(Ee,ae,$e,at,xt);if(Mt==null)return Mt;if(bt){var Yt=ae.children;if(Yt!==void 0)if(je)if(dt(Yt)){for(var mn=0;mn<Yt.length;mn++)Cr(Yt[mn],Ee);Object.freeze&&Object.freeze(Yt)}else A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Cr(Yt,Ee)}return Ee===r?ra(Mt):Xo(Mt),Mt}}function Zn(Ee,ae,$e){return wr(Ee,ae,$e,!0)}function _r(Ee,ae,$e){return wr(Ee,ae,$e,!1)}var lo=_r,oa=Zn;Sd.Fragment=r,Sd.jsx=lo,Sd.jsxs=oa}()),Sd}process.env.NODE_ENV==="production"?Lp.exports=j1():Lp.exports=B1();var an=Lp.exports;function W1(e){switch(e){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const z1={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},Hv={GOOGLE:"google",APPLE:"apple",BING:"bing"},H1=(e,t)=>{const n={region:"localizedRegionName",countryCode:"localizedCountryName"}[e];return n&&t[n]},Zx=(e,t=[],n,r={route:!1},o)=>{const i="Failed to construct query for maps service.";let a=e&&Vv([e.line1,e.line2,e.city,e.region,e.postalCode,e.countryCode]);switch(r.provider){case Hv.APPLE:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return Gv(`${o.latitude},${o.longitude}`,r.route);if(!a){console.warn(`${i} Check that you've provided a valid Yext Address.`);break}return Gv(a,r.route)}case Hv.BING:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return Kv(`${o.latitude},${o.longitude}`,r.route);if(a=e&&Vv([e.line1,e.city,e.region,e.postalCode]),!a){console.warn(`${i} Check that you've provided a valid Yext Address.`);break}return Kv(a,r.route)}default:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return Uv(`${o.latitude},${o.longitude}`,r.route);const l=t.find(u=>{var p;return((p=u==null?void 0:u.publisher)==null?void 0:p.toUpperCase())===z1.GOOGLEMYBUSINESS});if(l!=null&&l.listingUrl)return l.listingUrl;if(!a){console.warn(`${i} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return Uv(a,r.route)}}},Gv=(e,t)=>t?`https://maps.apple.com/?daddr=${e}`:`https://maps.apple.com/?address=${e}`,Kv=(e,t)=>t?`https://bing.com/maps/default.aspx?rtp=adr.${e}`:`https://bing.com/maps/default.aspx?where1=${e}`,Uv=(e,t)=>t?`https://maps.google.com/maps/dir/?api=1&destination=${e}`:`https://maps.google.com/maps/search/?api=1&query=${e}`,Vv=(e=[])=>{if(!e.length)return"";const t=e.filter(Boolean).join(", ");return encodeURI(t)},G1=({address:e,lines:t,separator:n=",",...r})=>{const o=(t||W1(e.countryCode)).map(i=>an.jsx(K1,{address:e,line:i,separator:n},i.toString()));return H.createElement("div",{...r,key:e.toString()},o)},K1=({address:e,line:t,separator:n})=>{const r=[];for(const o of t){if(o===","){r.push(an.jsx("span",{children:n},o));continue}const i=e[o];if(!i)continue;const a=H1(o,e);if(a){r.push(an.jsxs(ge.Fragment,{children:[" ",an.jsx("abbr",{title:a,children:i})]},o));continue}r.push(an.jsx("span",{children:" "+i},o))}return an.jsx("div",{className:"address-line",children:r})};var ql={};Object.defineProperty(ql,"__esModule",{value:!0});var U1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V1=typeof window<"u"&&typeof window.document<"u",Y1=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,q1=(typeof self>"u"?"undefined":U1(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",Z1=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),J1=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",Yv=ql.isBrowser=V1;ql.isWebWorker=q1;var X1=ql.isNode=Y1;ql.isJsDom=Z1;var Q1=ql.isDeno=J1;class eO{constructor(){oo(this,"name"),oo(this,"isServerSide"),oo(this,"version");var t;Q1?(this.name="deno",this.version="",Yv&&(this.version=((t=window.Deno)==null?void 0:t.version.deno)||""),this.isServerSide=!0):X1?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):Yv?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const Jx=()=>new eO,tO=H.createContext(null);H.lazy(()=>Promise.resolve().then(()=>require("./debugger-C-GK2f4q-7P5nIXek.cjs")));const nO=H.createContext({name:""}),rO=()=>H.useContext(nO).name;function oO(){const e=H.useContext(tO);if(!e)return e;Jx().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=rO();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const ms={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},iO=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const o=e.pathname.replace(/^\//,"").split("/");if(o.length<2||o.length>3){console.error(`Invalid path: ${e}`);return}let i;if(o[0]==="f")i="prod";else switch(o[0].replace("f-","")){case"sandbox":{i="sbx";break}case"qa":{i="qa";break}case"dev":{i="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(i==="dev"||i==="sbx")){console.error(`Invalid path: ${e}`);return}let a;if(o.length===3&&(a=parseInt(o[1]),Number.isNaN(a))){console.error(`Invalid account id: ${e}`);return}const l=o[o.length-1].split("."),u=l.length===2?`.${l[1]}`:"",p=l[0];return{scheme:t,partition:r,env:i,accountId:a,contentHash:p,extension:u}},aO=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let o="f";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}const i=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${o}/${i}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},sO=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const o=n[1];let i;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(i=parseFloat(n[2]),Number.isNaN(i)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const a=n[n.length-1].split("."),l=a.length===2?`.${a[1]}`:"",u=a[0];return{scheme:t,env:r,contentHash:o,aspectRatio:i,name:u,extension:l}},lO=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let o="p";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}return`${r}/${o}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},Fp=(e,t,n)=>{if(!Xx(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const o=sO(r);if(o)return lO(o,t,n)}else if(r.pathname.startsWith("/f")){const o=iO(r);if(o)return aO(o,t,n)}return e},Xx=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},cO=({image:e,className:t,width:n,height:r,aspectRatio:o,layout:i=ms.INTRINSIC,placeholder:a,imgOverrides:l,style:u={},loading:p="lazy"})=>{const m=H.useRef(null),[_,C]=H.useState(!1),b="image"in e?e.image:e;H.useEffect(()=>{var oe;(oe=m.current)!=null&&oe.complete&&C(!0)},[]),uO(i,b.width,b.height,n,r,o);const v=Math.abs(b.width);v||console.warn("Invalid image width.");const y=Math.abs(b.height);if(y||console.warn("Invalid image height."),!Xx(b.url))return console.error(`Invalid image url: ${b.url}`),an.jsx(an.Fragment,{children:a!=null&&a});const T=n&&n>0?n:void 0,O=r&&r>0?r:void 0,{src:A,imgStyle:D,widths:P}=dO(i,v,y,u,b.url,T,O,o),M=P.map(oe=>`${Fp(b.url,oe,y/v*oe)} ${oe}w`).join(", "),V=[640,768,1024,1280,1536],J=P.map((oe,Z)=>Z===P.length-1?`${oe}px`:`(max-width: ${V[Z]}px) ${oe}px`).join(", ");return an.jsxs(an.Fragment,{children:[!_&&a!=null&&a,an.jsx("img",{ref:m,style:D,src:A,className:t,width:T,height:O,srcSet:M,sizes:J,loading:p,alt:b.alternateText||"",...l})]})},uO=(e,t,n,r,o,i)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===ms.FIXED){if(!r&&!o){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),o&&o<0&&console.warn(`Using fixed layout but height is invalid: ${o}.`);return}(r||o)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===ms.ASPECT&&!i&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},dO=(e,t,n,r,o,i,a,l)=>{let u=[100,320,640,960,1280,1920],p=Fp(o,500,500);const m={...r};switch(m.objectFit=m.objectFit||"cover",m.objectPosition=m.objectPosition||"center",e){case ms.INTRINSIC:m.maxWidth=t,m.width="100%",m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ms.FIXED:{const{fixedWidth:_,fixedHeight:C,fixedWidths:b}=fO(t,n,u,i,a);m.width=_,m.height=C,u=b,p=Fp(o,_,C);break}case ms.ASPECT:m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ms.FILL:m.width="100%",m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:p,imgStyle:m,widths:u}},fO=(e,t,n,r,o)=>r&&o?{fixedWidth:r,fixedHeight:o,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:o?{fixedWidth:o/t*e,fixedHeight:o,fixedWidths:[o/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var Qx={exports:{}};/*!
|
|
55
|
-
Copyright (c) 2018 Jed Watson.
|
|
56
|
-
Licensed under the MIT License (MIT), see
|
|
57
|
-
http://jedwatson.github.io/classnames
|
|
58
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var l=n.apply(null,i);l&&r.push(l)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Qx);var hO=Qx.exports;const Tu=F1(hO),qv=e=>e.linkType==="Email"||!e.linkType&&eE(e.link)?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="Phone"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,eE=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),pO=e=>"href"in e,Ag=H.forwardRef(function(e,t){const n=pO(e)?{link:e.href}:e.cta,{children:r,onClick:o,className:i,eventName:a,scope:l,currency:u,amount:p,cta:m,obfuscate:_,customTags:C,customValues:b,...v}=e,y=m?"CTA_CLICK":"LINK",T=a||(m?"cta":"link"),O=oO();if(!(n!=null&&n.link))throw new Error("CTA's link is undefined");const A=_||_!==!1&&eE(n.link),D=async V=>{const J=V.currentTarget;let oe="";if(A){V.preventDefault();const Z=J.href.split("/").at(-1);Z&&(oe=atob(Z))}if(O!==null)try{await O.track({action:y,scope:e.scope,eventName:T,currency:u,amount:p,destinationUrl:oe||J.href,customTags:C,customValues:b})}catch{console.error("Failed to report click Analytics Event")}o&&o(V),oe&&(window.location.href=oe)},P=A?"Obfuscated, set a label or child":n.link,M={className:Tu("Link",i),href:A?btoa(qv(n)):qv(n),onClick:D,rel:e.target&&!e.rel?"noopener":void 0,ref:t};return O!=null&&O.getDebugEnabled()&&(M["data-ya-action"]=y,M["data-ya-scopeoverride"]=l,M["data-ya-eventname"]=T),an.jsx("a",{...M,...v,suppressHydrationWarning:!0,children:r||n.label||P})}),br=Object.freeze({DEGREE:Symbol("deg"),KILOMETER:Symbol("km"),MILE:Symbol("mi"),RADIAN:Symbol("r")}),Od=Object.freeze({MERCATOR:Symbol("mercator"),SPHERICAL:Symbol("spherical")}),Ah=3959,Rh=6371,gO=["latitude","lat"],mO=["longitude","lon","lng","long"];function Zv(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Jv(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function vs(e){return e*Math.PI/180}function zi(e){return e/Math.PI*180}function vO(e,t){const n=vs(e.latitude),r=vs(t.latitude),o=r-n,i=vs(t.longitude-e.longitude),a=Math.pow(Math.sin(o/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(i/2),2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function yO(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function bO(e,t){const n=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(n)*360/Math.PI-90}class Zl{constructor(t,n){let r=t;typeof t=="object"&&(r=Zv(t,gO),n=Zv(t,mO),r=typeof r=="function"?r():r,n=typeof n=="function"?n():n),this.latitude=r,this.longitude=n}get latitude(){return this._lat}get longitude(){return this._lon}get normalLon(){return((this._lon+180)%360+360)%360-180}set latitude(t){this._lat=Math.max(-90,Math.min(Jv(t),90))}set longitude(t){this._lon=Jv(t)}add(t,n,r=br.DEGREE,o=Od.SPHERICAL){if(o===Od.MERCATOR&&(r===br.DEGREE||r===br.RADIAN)){const i=r===br.DEGREE?vs(t):t,a=r===br.DEGREE?n:zi(n);this.latitude=bO(this.latitude,i),this.longitude+=a}else switch(r){case br.DEGREE:this.latitude+=t,this.longitude+=n;break;case br.KILOMETER:this.latitude+=zi(t)*Rh,this.longitude+=zi(n)*Rh*Math.cos(vs(this.latitude));break;case br.MILE:this.latitude+=zi(t)*Ah,this.longitude+=zi(n)*Ah*Math.cos(vs(this.latitude));break;case br.RADIAN:this.latitude+=zi(t),this.longitude+=zi(n);break;default:throw new Error(`unit unhandled: ${r}`)}}distanceTo(t,n=br.MILE,r=Od.SPHERICAL){if(r===Od.MERCATOR&&(n===br.DEGREE||n===br.RADIAN)){const o=yO(this.latitude,t.latitude),i=Math.abs(t.normalLon-this.normalLon),a=vs(Math.min(i,360-i)),l=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));switch(n){case br.DEGREE:return zi(l);case br.RADIAN:return l;default:throw new Error(`unit unhandled: ${n}`)}}else{const o=vO(this,t);switch(n){case br.DEGREE:return zi(o);case br.KILOMETER:return o*Rh;case br.MILE:return o*Ah;case br.RADIAN:return o;default:throw new Error(`unit unhandled: ${n}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function tE(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}const Ll={UNDEFINED:"undefined",NULL:"object",BOOLEAN:"boolean",NUMBER:"number",BIGINT:"bigint",STRING:"string",SYMBOL:"symbol",FUNCTION:"function",OBJECT:"object"};function Fl(e,t){if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function Kl(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class _O{constructor(t,n){Kl(t,$g),Kl(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return Fl(t,Ll.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Fl(t,Ll.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class Jl{constructor(t){Kl(t,_O),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class xO{constructor(t){Kl(t,$g),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={}}withClickHandler(t){return Fl(t,Ll.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return Fl(t,Ll.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return Fl(t,Ll.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}build(){const t=this.providerPinClass;return new t(this)}}class Rg{constructor(t){Kl(t,xO),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const EO=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class Of extends Rg{static get baseStyle(){return EO}constructor(t){super(t),this._pinEl=document.createElement("button"),Object.assign(this._pinEl.style,this.constructor.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}addListeners(){this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(t){this.setElementProperties(t);const n=t.getClass(),r=t.getElement()||this._pinEl,o=t.getZIndex();r.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=o,this._wrapper.setAttribute("class",n),r!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(r)))}setElementProperties(t){const n=t.getAnchorX(),r=t.getAnchorY(),o=t.getHeight(),i=this._icons[t.getIcon()],a=t.getSRText(),l=t.getWidth();Object.assign(this._pinEl.style,{backgroundImage:i?`url("${i}")`:"",height:o+"px",transform:`translate(${-100*n}%, ${-100*r}%)`,width:l+"px"}),this._pinAlt.innerText=a}}class ws{constructor(){this.loadFunction=(t,n,r,o)=>t(),this.mapClass=Jl,this.pinClass=Rg,this.providerName=""}withLoadFunction(t){return Fl(t,Ll.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new $g(this)}}class $g{constructor(t){Kl(t,ws),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){this._loadInvoked||(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}const Xv={GEOCODER:"geocoder",PLACES:"places"};class CO extends Jl{constructor(t){super(t),this.map=new google.maps.Map(t.wrapper,{disableDefaultUI:!t.controlEnabled,fullscreenControl:!1,gestureHandling:t.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:t.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...t.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()})}getCenter(){return new Zl(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new google.maps.LatLng(t.latitude,t.longitude);n?this.map.panTo(r):this.map.setCenter(r)}setZoom(t,n){this.map.setZoom(Math.floor(t))}setZoomCenter(t,n,r){this.setCenter(n,r),this.setZoom(t,r)}}class wO extends Of{constructor(t){super(t),this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper);const n=this;class r extends google.maps.OverlayView{draw(){var i;const a=(i=this.getProjection())==null?void 0:i.fromLatLngToDivPixel(n._latLng);a&&(n._wrapper.style.left=a.x+"px",n._wrapper.style.top=a.y+"px")}onAdd(){this.getPanes().floatPane.appendChild(n._wrapper)}onRemove(){var i;(i=n._wrapper.parentNode)==null||i.removeChild(n._wrapper)}}this.pin=new r}setCoordinate(t){this._latLng=new google.maps.LatLng(t.latitude,t.longitude),this.pin.draw()}setMap(t,n){this.pin.setMap(t?t.getProviderMap().map:null)}}const Qv="GoogleMapsCallback_b7d77ff2",TO="https://maps.googleapis.com/maps/api/js";function NO(e,t,n,{autocomplete:r=!1,channel:o=window.location.hostname,client:i,language:a,region:l,libraries:u=[],loading:p="async",params:m={}}={}){window[Qv]=e,r&&u.push(Xv.GEOCODER,Xv.PLACES);const _={callback:Qv,channel:o,libraries:u.join(","),...m};n&&(_.key=n),i&&(_.client=i),a&&(_.language=a),l&&(_.region=l),p&&(_.loading=p),tE(TO+"?"+Object.entries(_).map(([C,b])=>C+"="+b).join("&"))}new ws().withLoadFunction(NO).withMapClass(CO).withPinClass(wO).withProviderName("Google").build();H.createContext(null);H.createContext(null);var $h={},ru={},ey;function SO(){if(ey)return ru;ey=1;var e=H;const t=e.createContext(null);function n(o,i){let a=null;o!=null&&(a=o[1]);function l(){return i??(a!=null?a.getTheme():null)}return{getTheme:l}}function r(){const o=e.useContext(t);if(o==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return o}return ru.LexicalComposerContext=t,ru.createLexicalComposerContext=n,ru.useLexicalComposerContext=r,ru}var ou={},ty;function OO(){if(ty)return ou;ty=1;var e=H;function t(r){let o=new URLSearchParams;o.append("code",r);for(let i=1;i<arguments.length;i++)o.append("v",arguments[i]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${o} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return ou.LexicalComposerContext=n,ou.createLexicalComposerContext=function(r,o){let i=null;return r!=null&&(i=r[1]),{getTheme:function(){return o??(i!=null?i.getTheme():null)}}},ou.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},ou}var ny,ry;function ur(){return ry||(ry=1,ny=process.env.NODE_ENV==="development"?SO():OO()),ny}var Ke={},oy;function AO(){if(oy)return Ke;oy=1;function e(g){return{type:g}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("CLICK_COMMAND"),r=e("DELETE_CHARACTER_COMMAND"),o=e("INSERT_LINE_BREAK_COMMAND"),i=e("INSERT_PARAGRAPH_COMMAND"),a=e("CONTROLLED_TEXT_INSERTION_COMMAND"),l=e("PASTE_COMMAND"),u=e("REMOVE_TEXT_COMMAND"),p=e("DELETE_WORD_COMMAND"),m=e("DELETE_LINE_COMMAND"),_=e("FORMAT_TEXT_COMMAND"),C=e("UNDO_COMMAND"),b=e("REDO_COMMAND"),v=e("KEYDOWN_COMMAND"),y=e("KEY_ARROW_RIGHT_COMMAND"),T=e("MOVE_TO_END"),O=e("KEY_ARROW_LEFT_COMMAND"),A=e("MOVE_TO_START"),D=e("KEY_ARROW_UP_COMMAND"),P=e("KEY_ARROW_DOWN_COMMAND"),M=e("KEY_ENTER_COMMAND"),V=e("KEY_SPACE_COMMAND"),J=e("KEY_BACKSPACE_COMMAND"),oe=e("KEY_ESCAPE_COMMAND"),Z=e("KEY_DELETE_COMMAND"),U=e("KEY_TAB_COMMAND"),Q=e("INSERT_TAB_COMMAND"),de=e("INDENT_CONTENT_COMMAND"),pe=e("OUTDENT_CONTENT_COMMAND"),te=e("DROP_COMMAND"),he=e("FORMAT_ELEMENT_COMMAND"),Y=e("DRAGSTART_COMMAND"),j=e("DRAGOVER_COMMAND"),ee=e("DRAGEND_COMMAND"),ne=e("COPY_COMMAND"),B=e("CUT_COMMAND"),W=e("SELECT_ALL_COMMAND"),X=e("CLEAR_EDITOR_COMMAND"),F=e("CLEAR_HISTORY_COMMAND"),w=e("CAN_REDO_COMMAND"),N=e("CAN_UNDO_COMMAND"),I=e("FOCUS_COMMAND"),q=e("BLUR_COMMAND"),ue=e("KEY_MODIFIER_COMMAND"),fe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",se=fe&&"documentMode"in document?document.documentMode:null,Ce=fe&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Oe=fe&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Be=fe&&"InputEvent"in window&&!se?"getTargetRanges"in new window.InputEvent("input"):!1,ce=fe&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),le=fe&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ye=fe&&/Android/.test(navigator.userAgent),Me=fe&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Pe=fe&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Me,We=1,Xe=3,st=0,dt=1,Ct=2,Se=0,me=1,_e=2,De=1,Fe=2,ke=4,ze=8,tt=16,ut=32,Et=64,jt=128,Qe=De|Fe|ke|ze|tt|ut|Et|jt,et=1,lt=2,wt=1,_t=2,Rt=3,qe=4,ot=5,vt=6,kt=" ",Dt=ce||le||Pe?kt:"",Gt=`
|
|
59
|
-
|
|
60
|
-
`,sn=Oe?kt:Dt,dr="֑-߿יִ-﷽ﹰ-ﻼ",Cr="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Xo=new RegExp("^[^"+Cr+"]*["+dr+"]"),ra=new RegExp("^[^"+dr+"]*["+Cr+"]"),wr={bold:De,code:tt,highlight:jt,italic:Fe,strikethrough:ke,subscript:ut,superscript:Et,underline:ze},Zn={directionless:et,unmergeable:lt},_r={center:_t,end:vt,justify:qe,left:wt,right:Rt,start:ot},lo={[_t]:"center",[vt]:"end",[qe]:"justify",[wt]:"left",[Rt]:"right",[ot]:"start"},oa={normal:Se,segmented:_e,token:me},Ee={[Se]:"normal",[_e]:"segmented",[me]:"token"},ae=100;let $e=!1,je=0;function at(){return $e}function xt(g){je=g.timeStamp}function bt(g){je===0&&So(g).addEventListener("textInput",xt,!0)}function ht(g,c,h){return c.__lexicalLineBreak===g||g[`__lexicalKey_${h._key}`]!==void 0}function At(g){return g.getEditorState().read(()=>{const c=_n();return c!==null?c.clone():null})}function Kt(g,c,h){const E=Fr(h._window);let S=null,$=null;E!==null&&E.anchorNode===g&&(S=E.anchorOffset,$=E.focusOffset);const G=g.nodeValue;G!==null&&Bs(c,G,S,$,!1)}function Mt(g,c,h){if(Tt(g)){const E=g.anchor.getNode();if(E.is(h)&&g.format!==E.getFormat())return!1}return c.nodeType===Xe&&h.isAttached()}function Yt(g,c,h){$e=!0;const E=performance.now()-je>ae;try{Qr(g,()=>{const S=_n()||At(g),$=new Map,G=g.getRootElement(),K=g._editorState,be=g._blockCursorElement;let ve=!1,Ne="";for(let Ae=0;Ae<c.length;Ae++){const Te=c[Ae],He=Te.type,Le=Te.target;let Je=qr(Le,K);if(!(Je===null&&Le!==G||zn(Je))){if(He==="characterData")E&&St(Je)&&Mt(S,Le,Je)&&Kt(Le,Je,g);else if(He==="childList"){ve=!0;const ft=Te.addedNodes;for(let zt=0;zt<ft.length;zt++){const Pt=ft[zt],Zt=Is(Pt),Ft=Pt.parentNode;if(Ft!=null&&Pt!==be&&Zt===null&&(Pt.nodeName!=="BR"||!ht(Pt,Ft,g))){if(Oe){const Jt=Pt.innerText||Pt.nodeValue;Jt&&(Ne+=Jt)}Ft.removeChild(Pt)}}const Ye=Te.removedNodes,Lt=Ye.length;if(Lt>0){let zt=0;for(let Pt=0;Pt<Lt;Pt++){const Zt=Ye[Pt];(Zt.nodeName==="BR"&&ht(Zt,Le,g)||be===Zt)&&(Le.appendChild(Zt),zt++)}Lt!==zt&&(Le===G&&(Je=Fs(K)),$.set(Le,Je))}}}}if($.size>0)for(const[Ae,Te]of $)if(rt(Te)){const He=Te.getChildrenKeys();let Le=Ae.firstChild;for(let Je=0;Je<He.length;Je++){const ft=He[Je],Ye=g.getElementByKey(ft);Ye!==null&&(Le==null?(Ae.appendChild(Ye),Le=Ye):Le!==Ye&&Ae.replaceChild(Ye,Le),Le=Le.nextSibling)}}else St(Te)&&Te.markDirty();const we=h.takeRecords();if(we.length>0){for(let Ae=0;Ae<we.length;Ae++){const Te=we[Ae],He=Te.addedNodes,Le=Te.target;for(let Je=0;Je<He.length;Je++){const ft=He[Je],Ye=ft.parentNode;Ye!=null&&ft.nodeName==="BR"&&!ht(ft,Le,g)&&Ye.removeChild(ft)}}h.takeRecords()}S!==null&&(ve&&(S.dirty=!0,pr(S)),Oe&&ti(g)&&S.insertRawText(Ne))})}finally{$e=!1}}function mn(g){const c=g._observer;if(c!==null){const h=c.takeRecords();Yt(g,h,c)}}function xr(g){bt(g),g._observer=new MutationObserver((c,h)=>{Yt(g,c,h)})}function wn(g,c){const h=g.__mode,E=g.__format,S=g.__style,$=c.__mode,G=c.__format,K=c.__style;return(h===null||h===$)&&(E===null||E===G)&&(S===null||S===K)}function Jn(g,c){const h=g.mergeWithSibling(c),E=$n()._normalizedNodes;return E.add(g.__key),E.add(c.__key),h}function kr(g){let c=g;if(c.__text===""&&c.isSimpleText()&&!c.isUnmergeable()){c.remove();return}let h;for(;(h=c.getPreviousSibling())!==null&&St(h)&&h.isSimpleText()&&!h.isUnmergeable();)if(h.__text==="")h.remove();else if(wn(h,c)){c=Jn(h,c);break}else break;let E;for(;(E=c.getNextSibling())!==null&&St(E)&&E.isSimpleText()&&!E.isUnmergeable();)if(E.__text==="")E.remove();else if(wn(c,E)){c=Jn(c,E);break}else break}function ia(g){return Qo(g.anchor),Qo(g.focus),g}function Qo(g){for(;g.type==="element";){const c=g.getNode(),h=g.offset;let E,S;if(h===c.getChildrenSize()?(E=c.getChildAtIndex(h-1),S=!0):(E=c.getChildAtIndex(h),S=!1),St(E)){g.set(E.__key,S?E.getTextContentSize():0,"text");break}else if(!rt(E))break;g.set(E.__key,S?E.getChildrenSize():0,"element")}}let yc=1;function bc(){return""+yc++}function _c(g,c){const h=g._nodes.get(c);if(h===void 0)throw Error(`registeredNode: Type ${c} not found`);return h}const co=typeof queueMicrotask=="function"?queueMicrotask:g=>{Promise.resolve().then(g)};function Ms(g){return zn(qr(g))}function xc(g){const c=document.activeElement;if(c===null)return!1;const h=c.nodeName;return zn(qr(g))&&(h==="INPUT"||h==="TEXTAREA"||c.contentEditable==="true"&&c.__lexicalEditor==null)}function ei(g,c,h){const E=g.getRootElement();try{return E!==null&&E.contains(c)&&E.contains(h)&&c!==null&&!xc(c)&&Ti(c)===g}catch{return!1}}function Ti(g){let c=g;for(;c!=null;){const h=c.__lexicalEditor;if(h!=null)return h;c=Hs(c)}return null}function Ec(g){return Xo.test(g)?"rtl":ra.test(g)?"ltr":null}function Ps(g){return g.isToken()||g.isSegmented()}function sh(g){return g.nodeType===Xe}function An(g){let c=g;for(;c!=null;){if(sh(c))return c;c=c.firstChild}return null}function er(g,c,h){const E=wr[c];if(h!==null&&(g&E)===(h&E))return g;let S=g^E;return c==="subscript"?S&=~wr.superscript:c==="superscript"&&(S&=~wr.subscript),S}function Co(g){return St(g)||Ro(g)||zn(g)}function wo(g,c){if(c!=null){g.__key=c;return}Or(),Cv();const h=$n(),E=di(),S=bc();E._nodeMap.set(S,g),rt(g)?h._dirtyElements.set(S,!0):h._dirtyLeaves.add(S),h._cloneNotNeeded.add(S),h._dirtyType=dt,g.__key=S}function fr(g,c,h){let E=g;for(;E!==null;){if(h.has(E))return;const S=c.get(E);if(S===void 0)break;h.set(E,!1),E=S.__parent}}function Vr(g){const c=g.getParent();if(c!==null){const h=g.getWritable(),E=c.getWritable(),S=g.getPreviousSibling(),$=g.getNextSibling();if(S===null)if($!==null){const G=$.getWritable();E.__first=$.__key,G.__prev=null}else E.__first=null;else{const G=S.getWritable();if($!==null){const K=$.getWritable();K.__prev=G.__key,G.__next=K.__key}else G.__next=null;h.__prev=null}if($===null)if(S!==null){const G=S.getWritable();E.__last=S.__key,G.__next=null}else E.__last=null;else{const G=$.getWritable();if(S!==null){const K=S.getWritable();K.__next=G.__key,G.__prev=K.__key}else G.__prev=null;h.__next=null}E.__size--,h.__parent=null}}function Ha(g){Cv();const c=g.getLatest(),h=c.__parent,E=di(),S=$n(),$=E._nodeMap,G=S._dirtyElements;h!==null&&fr(h,$,G);const K=c.__key;S._dirtyType=dt,rt(g)?G.set(K,!0):S._dirtyLeaves.add(K)}function Cc(g){const c=g.getPreviousSibling(),h=g.getNextSibling();c!==null&&Ha(c),h!==null&&Ha(h)}function Mn(g){Or();const c=$n(),h=c._compositionKey;if(g!==h){if(c._compositionKey=g,h!==null){const E=Fn(h);E!==null&&E.getWritable()}if(g!==null){const E=Fn(g);E!==null&&E.getWritable()}}}function Yr(){return al()?null:$n()._compositionKey}function Fn(g,c){const h=(c||di())._nodeMap.get(g);return h===void 0?null:h}function Is(g,c){const h=$n(),E=g[`__lexicalKey_${h._key}`];return E!==void 0?Fn(E,c):null}function qr(g,c){let h=g;for(;h!=null;){const E=Is(h,c);if(E!==null)return E;h=Hs(h)}return null}function To(g){const c=g._decorators,h=Object.assign({},c);return g._pendingDecorators=h,h}function Ls(g){return g.read(()=>hr().getTextContent())}function Ga(g,c){Qr(g,()=>{const h=di();if(h.isEmpty())return;if(c==="root"){hr().markDirty();return}const E=h._nodeMap;for(const[,S]of E)S.markDirty()},g._pendingEditorState===null?{tag:"history-merge"}:void 0)}function hr(){return Fs(di())}function Fs(g){return g._nodeMap.get("root")}function pr(g){Or();const c=di();if(g!==null){if(Object.isFrozen(g))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");g.dirty=!0,g.setCachedNodes(null)}c._selection=g}function Qu(){Or();const g=$n();mn(g)}function Ni(g){const c=$n(),h=wc(g,c);if(h===null){const E=c.getRootElement();return g===E?Fn("root"):null}return Fn(h)}function Ka(g,c){return c?g.getTextContentSize():0}function wc(g,c){let h=g;for(;h!=null;){const E=h[`__lexicalKey_${c._key}`];if(E!==void 0)return E;h=Hs(h)}return null}function Tc(g){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(g)}function js(g){const c=[];let h=g;for(;h!==null;)c.push(h),h=h._parentEditor;return c}function Nc(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Ua(g){return g.nodeType===Xe?g.nodeValue:null}function Si(g,c,h){const E=Fr(c._window);if(E===null)return;const S=E.anchorNode;let{anchorOffset:$,focusOffset:G}=E;if(S!==null){let K=Ua(S);const be=qr(S);if(K!==null&&St(be)){if(K===Dt&&h){const ve=h.length;K=h,$=ve,G=ve}K!==null&&Bs(be,K,$,G,g)}}}function Bs(g,c,h,E,S){let $=g;if($.isAttached()&&(S||!$.isDirty())){const G=$.isComposing();let K=c;(G||S)&&c[c.length-1]===Dt&&(K=c.slice(0,-1));const be=$.getTextContent();if(S||K!==be){if(K===""){if(Mn(null),!ce&&!le&&!Pe){const Le=$n();setTimeout(()=>{Le.update(()=>{$.isAttached()&&$.remove()})},20)}else $.remove();return}const ve=$.getParent(),Ne=il(),we=$.getTextContentSize(),Ae=Yr(),Te=$.getKey();if($.isToken()||Ae!==null&&Te===Ae&&!G||Tt(Ne)&&(ve!==null&&!ve.canInsertTextBefore()&&Ne.anchor.offset===0||Ne.anchor.key===g.__key&&Ne.anchor.offset===0&&!$.canInsertTextBefore()||Ne.focus.key===g.__key&&Ne.focus.offset===we&&!$.canInsertTextAfter())){$.markDirty();return}const He=_n();if(!Tt(He)||h===null||E===null){$.setTextContent(K);return}if(He.setTextNodeRange($,h,$,E),$.isSegmented()){const Le=$.getTextContent(),Je=Un(Le);$.replace(Je),$=Je}$.setTextContent(K)}}}function Sc(g){const c=g.getPreviousSibling();return(St(c)||rt(c)&&c.isInline())&&!c.canInsertTextAfter()}function Oc(g,c){if(c.isSegmented())return!0;if(!g.isCollapsed())return!1;const h=g.anchor.offset,E=c.getParentOrThrow(),S=c.isToken();return h===0?!c.canInsertTextBefore()||!E.canInsertTextBefore()||S||Sc(c):h===c.getTextContentSize()?!c.canInsertTextAfter()||!E.canInsertTextAfter()||S:!1}function No(g,c,h,E){return g===9&&!c&&!h&&!E}function Ac(g,c,h,E){return g===66&&!c&&Oi(h,E)}function Va(g,c,h,E){return g===73&&!c&&Oi(h,E)}function ed(g,c,h,E){return g===85&&!c&&Oi(h,E)}function td(g,c){return la(g)&&!c}function aa(g,c){return la(g)&&c}function Ya(g,c){return Ce&&c&&g===79}function Rc(g,c,h){return Ja(g)&&(Ce?c:h)}function $c(g,c,h){return Xa(g)&&(Ce?c:h)}function qa(g,c){return Ce&&c&&Ja(g)}function Za(g,c){return Ce&&c&&Xa(g)}function nd(g,c,h,E){return Ce?c||h?!1:Ja(g)||g===72&&E:E||c||h?!1:Ja(g)}function rd(g,c,h,E,S){return Ce?h||E||S?!1:Xa(g)||g===68&&c:c||E||S?!1:Xa(g)}function od(g,c,h,E){return g===90&&!c&&Oi(h,E)}function id(g,c,h,E){return Ce?g===90&&h&&c:g===89&&E||g===90&&E&&c}function lh(g,c,h,E){return c?!1:g===67?Ce?h:E:!1}function ch(g,c,h,E){return c?!1:g===88?Ce?h:E:!1}function Dc(g){return g===37}function ad(g){return g===39}function uh(g){return g===38}function dh(g){return g===40}function fh(g,c,h,E){return Dc(g)&&!c&&!E&&!h}function kc(g,c,h,E,S){return Dc(g)&&!E&&!h&&(c||S)}function hh(g,c,h,E){return ad(g)&&!c&&!E&&!h}function ph(g,c,h,E,S){return ad(g)&&!E&&!h&&(c||S)}function sd(g,c,h){return uh(g)&&!c&&!h}function sa(g,c,h){return dh(g)&&!c&&!h}function ld(g,c,h,E){return g||c||h||E}function gh(g){return g===32}function Oi(g,c){return Ce?g:c}function la(g){return g===13}function Ja(g){return g===8}function ca(g){return g===27}function Xa(g){return g===46}function Ai(g,c,h){return g===65&&Oi(c,h)}function Ri(){const g=hr(),c=g.select(0,g.getChildrenSize());pr(ia(c))}function $i(g,c){g.__lexicalClassNameCache===void 0&&(g.__lexicalClassNameCache={});const h=g.__lexicalClassNameCache,E=h[c];if(E!==void 0)return E;const S=g[c];if(typeof S=="string"){const $=S.split(" ");return h[c]=$,$}return S}function Qa(g,c,h,E,S){if(h.size===0)return;const $=E.__type,G=E.__key,K=c.get($);if(K===void 0)throw Error(`Type ${$} not in registeredNodes`);const be=K.klass;let ve=g.get(be);ve===void 0&&(ve=new Map,g.set(be,ve));const Ne=ve.get(G),we=Ne==="destroyed"&&S==="created";(Ne===void 0||we)&&ve.set(G,we?"updated":S)}function Mc(g){const c=di(),h=c._readOnly,E=g.getType(),S=c._nodeMap,$=[];for(const[,G]of S)G instanceof g&&G.__type===E&&(h||G.isAttached())&&$.push(G);return $}function Ws(g,c,h){const E=g.getParent();let S=h,$=g;return E!==null&&(c&&h===0?(S=$.getIndexWithinParent(),$=E):!c&&h===$.getChildrenSize()&&(S=$.getIndexWithinParent()+1,$=E)),$.getChildAtIndex(c?S-1:S)}function ua(g,c){const h=g.offset;if(g.type==="element"){const E=g.getNode();return Ws(E,c,h)}else{const E=g.getNode();if(c&&h===0||!c&&h===E.getTextContentSize()){const S=c?E.getPreviousSibling():E.getNextSibling();return S===null?Ws(E.getParentOrThrow(),c,E.getIndexWithinParent()+(c?0:1)):S}}return null}function ti(g){const c=So(g).event,h=c&&c.inputType;return h==="insertFromPaste"||h==="insertFromPasteAsQuotation"}function mt(g,c,h){return Ov(g,c,h)}function zs(g){return!eo(g)&&!g.isLastChild()&&!g.isInline()}function es(g,c){const h=g._keyToDOMMap.get(c);if(h===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${c}`);return h}function Hs(g){const c=g.assignedSlot||g.parentElement;return c!==null&&c.nodeType===11?c.host:c}function mh(g,c,h){const E=h.ownerDocument,S=E.defaultView;if(S===null)return;let{top:$,bottom:G}=c,K=0,be=0,ve=h;for(;ve!==null;){const Ne=ve===E.body;if(Ne)K=0,be=So(g).innerHeight;else{const Ae=ve.getBoundingClientRect();K=Ae.top,be=Ae.bottom}let we=0;if($<K?we=-(K-$):G>be&&(we=G-be),we!==0)if(Ne)S.scrollBy(0,we);else{const Ae=ve.scrollTop;ve.scrollTop+=we;const Te=ve.scrollTop-Ae;$-=Te,G-=Te}if(Ne)break;ve=Hs(ve)}}function cd(g){return $n()._updateTags.has(g)}function vh(g){Or(),$n()._updateTags.add(g)}function ni(g){const c=_n();if(!Tt(c)||!rt(g))return c;const{anchor:h,focus:E}=c,S=h.getNode(),$=E.getNode();return jn(S,g)&&h.set(g.__key,0,"element"),jn($,g)&&E.set(g.__key,0,"element"),c}function jn(g,c){let h=g.getParent();for(;h!==null;){if(h.is(c))return!0;h=h.getParent()}return!1}function Nt(g){const c=g.ownerDocument;return c&&c.defaultView||null}function So(g){const c=g._window;if(c===null)throw Error("window object not found");return c}function Gs(g){return rt(g)&&g.isInline()||zn(g)&&g.isInline()}function Pc(g){let c=g.getParentOrThrow();for(;c!==null;){if(tr(c))return c;c=c.getParentOrThrow()}return c}function tr(g){return eo(g)||rt(g)&&g.isShadowRoot()}function Ks(g){const c=g.constructor.clone(g);return wo(c,null),c}function da(g){const c=$n(),h=g.constructor.getType(),E=c._nodes.get(h);if(E===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const S=E.replace;if(S!==null){const $=S(g);if(!($ instanceof g.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return $}return g}function Us(g,c){const h=g.getParent();if(eo(h)&&!rt(c)&&!zn(c))throw Error("Only element or decorator nodes can be inserted in to the root node")}function ri(g){const c=g.theme,h=document.createElement("div");h.contentEditable="false",h.setAttribute("data-lexical-cursor","true");let E=c.blockCursor;if(E!==void 0){if(typeof E=="string"){const S=E.split(" ");E=c.blockCursor=S}E!==void 0&&h.classList.add(...E)}return h}function ts(g){return(zn(g)||rt(g)&&!g.canBeEmpty())&&!g.isInline()}function fa(g,c,h){h.style.removeProperty("caret-color"),c._blockCursorElement=null;const E=g.parentElement;E!==null&&E.removeChild(g)}function It(g,c,h){let E=g._blockCursorElement;if(Tt(h)&&h.isCollapsed()&&h.anchor.type==="element"&&c.contains(document.activeElement)){const S=h.anchor,$=S.getNode(),G=S.offset,K=$.getChildrenSize();let be=!1,ve=null;if(G===K){const Ne=$.getChildAtIndex(G-1);ts(Ne)&&(be=!0)}else{const Ne=$.getChildAtIndex(G);if(ts(Ne)){const we=Ne.getPreviousSibling();(we===null||ts(we))&&(be=!0,ve=g.getElementByKey(Ne.__key))}}if(be){const Ne=g.getElementByKey($.__key);E===null&&(g._blockCursorElement=E=ri(g._config)),c.style.caretColor="transparent",ve===null?Ne.appendChild(E):Ne.insertBefore(E,ve);return}}E!==null&&fa(E,g,c)}function Fr(g){return fe?(g||window).getSelection():null}function Ic(g,c){let h=g.getChildAtIndex(c);if(h==null&&(h=g),tr(g))throw Error("Can not call $splitNode() on root element");const E=G=>{const K=G.getParentOrThrow(),be=tr(K),ve=G===h&&!be?G:Ks(G);if(be)return G.insertAfter(ve),[G,ve,ve];{const[Ne,we,Ae]=E(K),Te=G.getNextSiblings();return Ae.append(ve,...Te),[Ne,we,ve]}},[S,$]=E(h);return[S,$]}function Di(g,c){let h=g;for(;h!==hr()&&h!=null;){if(c(h))return h;h=h.getParent()}return null}function ud(g){const c=[],h=[g];for(;h.length>0;){const E=h.pop();if(E===void 0)throw Error("Stack.length > 0; can't be undefined");rt(E)&&h.unshift(...E.getChildren()),E!==g&&c.push(E)}return c}function ki(g){return oi(g)&&g.tagName==="A"}function oi(g){return g.nodeType===1}function ha(g){if(zn(g)&&!g.isInline())return!0;if(!rt(g)||tr(g))return!1;const c=g.getFirstChild(),h=c===null||Ro(c)||St(c)||c.isInline();return!g.isInline()&&g.canBeEmpty()!==!1&&h}function ns(g,c){let h=g;for(;h!==null&&h.getParent()!==null&&!c(h);)h=h.getParentOrThrow();return c(h)?h:null}function dd(g,c){const h=g._decorators;let E=g._pendingDecorators||h;const S=c._nodeMap;let $;for($ in E)S.has($)||(E===h&&(E=To(g)),delete E[$])}function Lc(g,c,h,E,S,$){let G=g.getFirstChild();for(;G!==null;){const K=G.__key;G.__parent===c&&(rt(G)&&Lc(G,K,h,E,S,$),h.has(K)||$.delete(K),S.push(K)),G=G.getNextSibling()}}function fd(g,c,h,E){const S=g._nodeMap,$=c._nodeMap,G=[];for(const[K]of E){const be=$.get(K);be!==void 0&&(be.isAttached()||(rt(be)&&Lc(be,K,S,$,G,E),S.has(K)||E.delete(K),G.push(K)))}for(const K of G)$.delete(K);for(const K of h){const be=$.get(K);be!==void 0&&!be.isAttached()&&(S.has(K)||h.delete(K),$.delete(K))}}let Bn="",gr="",uo="",fo,Er,Mi,hn=!1,ii=!1,Pi,rs=null,Fc,pa,ai,Oo,Vs,Ii;function Ys(g,c){const h=ai.get(g);if(c!==null){const E=Js(g);E.parentNode===c&&c.removeChild(E)}if(Oo.has(g)||Er._keyToDOMMap.delete(g),rt(h)){const E=Zs(h,ai);Wn(E,0,E.length-1,null)}h!==void 0&&Qa(Ii,Mi,Pi,h,"destroyed")}function Wn(g,c,h,E){let S=c;for(;S<=h;++S){const $=g[S];$!==void 0&&Ys($,E)}}function yn(g,c){g.setProperty("text-align",c)}const Tr="40px";function qs(g,c){const h=fo.theme.indent;if(typeof h=="string"){const S=g.classList.contains(h);c>0&&!S?g.classList.add(h):c<1&&S&&g.classList.remove(h)}const E=getComputedStyle(g).getPropertyValue("--lexical-indent-base-value")||Tr;g.style.setProperty("padding-inline-start",c===0?"":`calc(${c} * ${E})`)}function ga(g,c){const h=g.style;c===0?yn(h,""):c===wt?yn(h,"left"):c===_t?yn(h,"center"):c===Rt?yn(h,"right"):c===qe?yn(h,"justify"):c===ot?yn(h,"start"):c===vt&&yn(h,"end")}function os(g,c,h){const E=Oo.get(g);if(E===void 0)throw Error("createNode: node does not exist in nodeMap");const S=E.createDOM(fo,Er);if(Mr(g,S,Er),St(E)?S.setAttribute("data-lexical-text","true"):zn(E)&&S.setAttribute("data-lexical-decorator","true"),rt(E)){const $=E.__indent,G=E.__size;if($!==0&&qs(S,$),G!==0){const be=G-1,ve=Zs(E,Oo);ma(ve,be,E,S)}const K=E.__format;K!==0&&ga(S,K),E.isInline()||bn(null,E,S),zs(E)&&(Bn+=Gt,uo+=Gt)}else{const $=E.getTextContent();if(zn(E)){const G=E.decorate(Er,fo);G!==null&&si(g,G),S.contentEditable="false"}else St(E)&&(E.isDirectionless()||(gr+=$));Bn+=$,uo+=$}if(c!==null)if(h!=null)c.insertBefore(S,h);else{const $=c.__lexicalLineBreak;$!=null?c.insertBefore(S,$):c.appendChild(S)}return Object.freeze(E),Qa(Ii,Mi,Pi,E,"created"),S}function ma(g,c,h,E){const S=gr;gr="",nr(g,h,0,c,E,null),jc(h,E),gr=S}function nr(g,c,h,E,S,$){const G=Bn;Bn="";let K=h;for(;K<=E;++K)os(g[K],S,$);zs(c)&&(Bn+=Gt),S.__lexicalTextContent=Bn,Bn=G+Bn}function Zr(g,c){const h=c.get(g);return Ro(h)||zn(h)&&h.isInline()}function bn(g,c,h){const E=g!==null&&(g.__size===0||Zr(g.__last,ai)),S=c.__size===0||Zr(c.__last,Oo);if(E){if(!S){const $=h.__lexicalLineBreak;$!=null&&h.removeChild($),h.__lexicalLineBreak=null}}else if(S){const $=document.createElement("br");h.__lexicalLineBreak=$,h.appendChild($)}}function jc(g,c){const h=c.__lexicalDirTextContent,E=c.__lexicalDir;if(h!==gr||E!==rs){const S=gr==="",$=S?rs:Ec(gr);if($!==E){const G=c.classList,K=fo.theme;let be=E!==null?K[E]:void 0,ve=$!==null?K[$]:void 0;if(be!==void 0){if(typeof be=="string"){const Ne=be.split(" ");be=K[E]=Ne}G.remove(...be)}if($===null||S&&$==="ltr")c.removeAttribute("dir");else{if(ve!==void 0){if(typeof ve=="string"){const Ne=ve.split(" ");ve=K[$]=Ne}ve!==void 0&&G.add(...ve)}c.dir=$}if(!ii){const Ne=g.getWritable();Ne.__dir=$}}rs=$,c.__lexicalDirTextContent=gr,c.__lexicalDir=$}}function yh(g,c,h){const E=gr;gr="",Bc(g,c,h),jc(c,h),gr=E}function Zs(g,c){const h=[];let E=g.__first;for(;E!==null;){const S=c.get(E);if(S===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");h.push(E),E=S.__next}return h}function Bc(g,c,h){const E=Bn,S=g.__size,$=c.__size;if(Bn="",S===1&&$===1){const G=g.__first,K=c.__first;if(G===K)va(G,h);else{const be=Js(G),ve=os(K,null,null);h.replaceChild(ve,be),Ys(G,null)}}else{const G=Zs(g,ai),K=Zs(c,Oo);if(S===0)$!==0&&nr(K,c,0,$-1,h,null);else if($===0){if(S!==0){const be=h.__lexicalLineBreak==null;Wn(G,0,S-1,be?null:h),be&&(h.textContent="")}}else hd(c,G,K,S,$,h)}zs(c)&&(Bn+=Gt),h.__lexicalTextContent=Bn,Bn=E+Bn}function va(g,c){const h=ai.get(g);let E=Oo.get(g);if(h===void 0||E===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const S=hn||pa.has(g)||Fc.has(g),$=es(Er,g);if(h===E&&!S){if(rt(h)){const G=$.__lexicalTextContent;G!==void 0&&(Bn+=G,uo+=G);const K=$.__lexicalDirTextContent;K!==void 0&&(gr+=K)}else{const G=h.getTextContent();St(h)&&!h.isDirectionless()&&(gr+=G),uo+=G,Bn+=G}return $}if(h!==E&&S&&Qa(Ii,Mi,Pi,E,"updated"),E.updateDOM(h,$,fo)){const G=os(g,null,null);if(c===null)throw Error("reconcileNode: parentDOM is null");return c.replaceChild(G,$),Ys(g,null),G}if(rt(h)&&rt(E)){const G=E.__indent;G!==h.__indent&&qs($,G);const K=E.__format;K!==h.__format&&ga($,K),S&&(yh(h,E,$),!eo(E)&&!E.isInline()&&bn(h,E,$)),zs(E)&&(Bn+=Gt,uo+=Gt)}else{const G=E.getTextContent();if(zn(E)){const K=E.decorate(Er,fo);K!==null&&si(g,K)}else St(E)&&!E.isDirectionless()&&(gr+=G);Bn+=G,uo+=G}return!ii&&eo(E)&&E.__cachedText!==uo&&(E=E.getWritable(),E.__cachedText=uo),Object.freeze(E),$}function si(g,c){let h=Er._pendingDecorators;const E=Er._decorators;if(h===null){if(E[g]===c)return;h=To(Er)}h[g]=c}function is(g){return g.firstChild}function pt(g){let c=g.nextSibling;return c!==null&&c===Er._blockCursorElement&&(c=c.nextSibling),c}function hd(g,c,h,E,S,$){const G=E-1,K=S-1;let be,ve,Ne=is($),we=0,Ae=0;for(;we<=G&&Ae<=K;){const Le=c[we],Je=h[Ae];if(Le===Je)Ne=pt(va(Je,$)),we++,Ae++;else{be===void 0&&(be=new Set(c)),ve===void 0&&(ve=new Set(h));const ft=ve.has(Le),Ye=be.has(Je);if(!ft)Ne=pt(Js(Le)),Ys(Le,$),we++;else if(!Ye)os(Je,$,Ne),Ae++;else{const Lt=es(Er,Je);Lt===Ne?Ne=pt(va(Je,$)):(Ne!=null?$.insertBefore(Lt,Ne):$.appendChild(Lt),va(Je,$)),we++,Ae++}}}const Te=we>G,He=Ae>K;if(Te&&!He){const Le=h[K+1],Je=Le===void 0?null:Er.getElementByKey(Le);nr(h,g,Ae,K,$,Je)}else He&&!Te&&Wn(c,we,G,$)}function pd(g,c,h,E,S,$){Bn="",uo="",gr="",hn=E===Ct,rs=null,Er=h,fo=h._config,Mi=h._nodes,Pi=Er._listeners.mutation,Fc=S,pa=$,ai=g._nodeMap,Oo=c._nodeMap,ii=c._readOnly,Vs=new Map(h._keyToDOMMap);const G=new Map;return Ii=G,va("root",null),Er=void 0,Mi=void 0,Fc=void 0,pa=void 0,ai=void 0,Oo=void 0,fo=void 0,Vs=void 0,Ii=void 0,G}function Mr(g,c,h){const E=h._keyToDOMMap;c["__lexicalKey_"+h._key]=g,E.set(g,c)}function Js(g){const c=Vs.get(g);if(c===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${g}`);return c}const on=Object.freeze({}),Ao=30,nt=[["keydown",R],["pointerdown",jr],["compositionstart",s],["compositionend",x],["input",f],["click",zc],["cut",on],["copy",on],["dragstart",on],["dragover",on],["dragend",on],["paste",on],["focus",on],["blur",on],["drop",on]];Be&&nt.push(["beforeinput",(g,c)=>ss(g,c)]);let ya=0,Li=0,Nr=0,ba=null,Fi=0,Xs=!1,_a=!1,ho=!1,as=!1,po=[0,"",0,"root",0];function Wc(g,c,h,E,S){const $=g.anchor,G=g.focus,K=$.getNode(),be=$n(),ve=Fr(be._window),Ne=ve!==null?ve.anchorNode:null,we=$.key,Ae=be.getElementByKey(we),Te=h.length;return we!==G.key||!St(K)||(!S&&(!Be||Nr<E+50)||K.isDirty()&&Te<2||Tc(h))&&$.offset!==G.offset&&!K.isComposing()||Ps(K)||K.isDirty()&&Te>1||(S||!Be)&&Ae!==null&&!K.isComposing()&&Ne!==An(Ae)||ve!==null&&c!==null&&(!c.collapsed||c.startContainer!==ve.anchorNode||c.startOffset!==ve.anchorOffset)||K.getFormat()!==g.format||K.getStyle()!==g.style||Oc(g,K)}function gd(g,c){return g!==null&&g.nodeValue!==null&&g.nodeType===Xe&&c!==0&&c!==g.nodeValue.length}function md(g,c,h){const{anchorNode:E,anchorOffset:S,focusNode:$,focusOffset:G}=g;Xs&&(Xs=!1,gd(E,S)&&gd($,G))||Qr(c,()=>{if(!h){pr(null);return}if(!ei(c,E,$))return;const K=_n();if(Tt(K)){const be=K.anchor,ve=be.getNode();if(K.isCollapsed()){g.type==="Range"&&g.anchorNode===g.focusNode&&(K.dirty=!0);const Ne=So(c).event,we=Ne?Ne.timeStamp:performance.now(),[Ae,Te,He,Le,Je]=po,ft=hr(),Ye=c.isComposing()===!1&&ft.getTextContent()==="";we<Je+200&&be.offset===He&&be.key===Le?(K.format=Ae,K.style=Te):be.type==="text"?(K.format=ve.getFormat(),K.style=ve.getStyle()):be.type==="element"&&!Ye&&(K.format=0,K.style="")}else{let Ne=Qe,we=!1;const Ae=K.getNodes(),Te=Ae.length;for(let He=0;He<Te;He++){const Le=Ae[He];if(St(Le)&&(we=!0,Ne&=Le.getFormat(),Ne===0))break}K.format=we?Ne:0}}mt(c,t,void 0)})}function zc(g,c){Qr(c,()=>{const h=_n(),E=Fr(c._window),S=il();if(E){if(Tt(h)){const $=h.anchor,G=$.getNode();if($.type==="element"&&$.offset===0&&h.isCollapsed()&&!eo(G)&&hr().getChildrenSize()===1&&G.getTopLevelElementOrThrow().isEmpty()&&S!==null&&h.is(S))E.removeAllRanges(),h.dirty=!0;else if(g.detail===3&&!h.isCollapsed()){const K=h.focus.getNode();G!==K&&(rt(G)?G.select(0):G.getParentOrThrow().select(0))}}else if(g.pointerType==="touch"){const $=E.anchorNode;if($!==null){const G=$.nodeType;if(G===We||G===Xe){const K=xh(S,E,c);pr(K)}}}}mt(c,n,g)})}function jr(g,c){const h=g.target,E=g.pointerType;h instanceof Node&&E!=="touch"&&Qr(c,()=>{Ms(h)||(_a=!0)})}function Hc(g){if(!g.getTargetRanges)return null;const c=g.getTargetRanges();return c.length===0?null:c[0]}function Gc(g,c){return g!==c||rt(g)||rt(c)||!g.isToken()||!c.isToken()}function vd(g){return Li===229&&g<ya+Ao}function ss(g,c){const h=g.inputType,E=Hc(g);h==="deleteCompositionText"||Oe&&ti(c)||h!=="insertCompositionText"&&Qr(c,()=>{const S=_n();if(h==="deleteContentBackward"){if(S===null){const Ne=il();if(!Tt(Ne))return;pr(Ne.clone())}if(Tt(S)){if(ye&&Mn(S.anchor.key),vd(g.timeStamp)&&c.isComposing()&&S.anchor.key===S.focus.key){if(Mn(null),ya=0,setTimeout(()=>{Qr(c,()=>{Mn(null)})},Ao),Tt(S)){const Ne=S.anchor.getNode();Ne.markDirty(),S.format=Ne.getFormat(),S.style=Ne.getStyle()}S.anchor.getNode().getTextContent().length<=1&&(g.preventDefault(),mt(c,r,!0))}else g.preventDefault(),mt(c,r,!0);return}}if(!Tt(S))return;const $=g.data;ba!==null&&Si(!1,c,ba),(!S.dirty||ba!==null)&&S.isCollapsed()&&!eo(S.anchor.getNode())&&E!==null&&S.applyDOMRange(E),ba=null;const G=S.anchor,K=S.focus,be=G.getNode(),ve=K.getNode();if(h==="insertText"||h==="insertTranspose"){if($===`
|
|
61
|
-
`)g.preventDefault(),mt(c,o,!1);else if($===Gt)g.preventDefault(),mt(c,i,void 0);else if($==null&&g.dataTransfer){const Ne=g.dataTransfer.getData("text/plain");g.preventDefault(),S.insertRawText(Ne)}else $!=null&&Wc(S,E,$,g.timeStamp,!0)?(g.preventDefault(),mt(c,a,$)):ba=$;Nr=g.timeStamp;return}switch(g.preventDefault(),h){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{mt(c,a,g);break}case"insertFromComposition":{Mn(null),mt(c,a,g);break}case"insertLineBreak":{Mn(null),mt(c,o,!1);break}case"insertParagraph":{Mn(null),ho&&!le?(ho=!1,mt(c,o,!1)):mt(c,i,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{mt(c,l,g);break}case"deleteByComposition":{Gc(be,ve)&&mt(c,u,g);break}case"deleteByDrag":case"deleteByCut":{mt(c,u,g);break}case"deleteContent":{mt(c,r,!1);break}case"deleteWordBackward":{mt(c,p,!0);break}case"deleteWordForward":{mt(c,p,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{mt(c,m,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{mt(c,m,!1);break}case"formatStrikeThrough":{mt(c,_,"strikethrough");break}case"formatBold":{mt(c,_,"bold");break}case"formatItalic":{mt(c,_,"italic");break}case"formatUnderline":{mt(c,_,"underline");break}case"historyUndo":{mt(c,C,void 0);break}case"historyRedo":{mt(c,b,void 0);break}}})}function f(g,c){g.stopPropagation(),Qr(c,()=>{const h=_n(),E=g.data,S=Hc(g);if(E!=null&&Tt(h)&&Wc(h,S,E,g.timeStamp,!1)){as&&(d(c,E),as=!1);const $=h.anchor,G=$.getNode(),K=Fr(c._window);if(K===null)return;const be=$.offset;(!Be||h.isCollapsed()||!St(G)||K.anchorNode===null||G.getTextContent().slice(0,be)+E+G.getTextContent().slice(be+h.focus.offset)!==Ua(K.anchorNode))&&mt(c,a,E);const ve=E.length;Oe&&ve>1&&g.inputType==="insertCompositionText"&&!c.isComposing()&&(h.anchor.offset-=ve),!ce&&!le&&!Pe&&c.isComposing()&&(ya=0,Mn(null))}else Si(!1,c,E!==null?E:void 0),as&&(d(c,E||void 0),as=!1);Qu()}),ba=null}function s(g,c){Qr(c,()=>{const h=_n();if(Tt(h)&&!c.isComposing()){const E=h.anchor,S=h.anchor.getNode();Mn(E.key),(g.timeStamp<ya+Ao||E.type==="element"||!h.isCollapsed()||S.getFormat()!==h.format||S.getStyle()!==h.style)&&mt(c,a,sn)}})}function d(g,c){const h=g._compositionKey;if(Mn(null),h!==null&&c!=null){if(c===""){const E=Fn(h),S=An(g.getElementByKey(h));S!==null&&S.nodeValue!==null&&St(E)&&Bs(E,S.nodeValue,null,null,!0);return}if(c[c.length-1]===`
|
|
62
|
-
`){const E=_n();if(Tt(E)){const S=E.focus;E.anchor.set(S.key,S.offset,S.type),mt(g,M,null);return}}}Si(!0,g,c)}function x(g,c){Oe?as=!0:Qr(c,()=>{d(c,g.data)})}function R(g,c){if(ya=g.timeStamp,Li=g.keyCode,c.isComposing())return;const{keyCode:h,shiftKey:E,ctrlKey:S,metaKey:$,altKey:G}=g;if(!mt(c,v,g)){if(hh(h,S,G,$))mt(c,y,g);else if(ph(h,S,E,G,$))mt(c,T,g);else if(fh(h,S,G,$))mt(c,O,g);else if(kc(h,S,E,G,$))mt(c,A,g);else if(sd(h,S,$))mt(c,D,g);else if(sa(h,S,$))mt(c,P,g);else if(aa(h,E))ho=!0,mt(c,M,g);else if(gh(h))mt(c,V,g);else if(Ya(h,S))g.preventDefault(),ho=!0,mt(c,o,!0);else if(td(h,E))ho=!1,mt(c,M,g);else if(nd(h,G,$,S))Ja(h)?mt(c,J,g):(g.preventDefault(),mt(c,r,!0));else if(ca(h))mt(c,oe,g);else if(rd(h,S,E,G,$))Xa(h)?mt(c,Z,g):(g.preventDefault(),mt(c,r,!1));else if(Rc(h,G,S))g.preventDefault(),mt(c,p,!0);else if($c(h,G,S))g.preventDefault(),mt(c,p,!1);else if(qa(h,$))g.preventDefault(),mt(c,m,!0);else if(Za(h,$))g.preventDefault(),mt(c,m,!1);else if(Ac(h,G,$,S))g.preventDefault(),mt(c,_,"bold");else if(ed(h,G,$,S))g.preventDefault(),mt(c,_,"underline");else if(Va(h,G,$,S))g.preventDefault(),mt(c,_,"italic");else if(No(h,G,S,$))mt(c,U,g);else if(od(h,E,$,S))g.preventDefault(),mt(c,C,void 0);else if(id(h,E,$,S))g.preventDefault(),mt(c,b,void 0);else{const K=c._editorState._selection;mr(K)?lh(h,E,$,S)?(g.preventDefault(),mt(c,ne,g)):ch(h,E,$,S)?(g.preventDefault(),mt(c,B,g)):Ai(h,$,S)&&(g.preventDefault(),mt(c,W,g)):!Oe&&Ai(h,$,S)&&(g.preventDefault(),mt(c,W,g))}ld(S,E,G,$)&&mt(c,ue,g)}}function k(g){let c=g.__lexicalEventHandles;return c===void 0&&(c=[],g.__lexicalEventHandles=c),c}const z=new Map;function ie(g){const c=g.target,h=c==null?null:c.nodeType===9?c.defaultView:c.ownerDocument.defaultView,E=Fr(h);if(E===null)return;const S=Ti(E.anchorNode);if(S===null)return;_a&&(_a=!1,Qr(S,()=>{const Ne=il(),we=E.anchorNode;if(we===null)return;const Ae=we.nodeType;if(Ae!==We&&Ae!==Xe)return;const Te=xh(Ne,E,S);pr(Te)}));const $=js(S),G=$[$.length-1],K=G._key,be=z.get(K),ve=be||G;ve!==S&&md(E,ve,!1),md(E,S,!0),S!==G?z.set(K,S):be&&z.delete(K)}function xe(g){g._lexicalHandled=!0}function Re(g){return g._lexicalHandled===!0}function Ve(g,c){Fi===0&&g.ownerDocument.addEventListener("selectionchange",ie),Fi++,g.__lexicalEditor=c;const h=k(g);for(let E=0;E<nt.length;E++){const[S,$]=nt[E],G=typeof $=="function"?K=>{Re(K)||(xe(K),c.isEditable()&&$(K,c))}:K=>{if(!Re(K)&&(xe(K),c.isEditable()))switch(S){case"cut":return mt(c,B,K);case"copy":return mt(c,ne,K);case"paste":return mt(c,l,K);case"dragstart":return mt(c,Y,K);case"dragover":return mt(c,j,K);case"dragend":return mt(c,ee,K);case"focus":return mt(c,I,K);case"blur":return mt(c,q,K);case"drop":return mt(c,te,K)}};g.addEventListener(S,G),h.push(()=>{g.removeEventListener(S,G)})}}function Ze(g){Fi!==0&&(Fi--,Fi===0&&g.ownerDocument.removeEventListener("selectionchange",ie));const c=g.__lexicalEditor;c!=null&&(Ge(c),g.__lexicalEditor=null);const h=k(g);for(let E=0;E<h.length;E++)h[E]();g.__lexicalEventHandles=[]}function Ge(g){if(g._parentEditor!==null){const c=js(g),h=c[c.length-1]._key;z.get(h)===g&&z.delete(h)}else z.delete(g._key)}function Ie(){Xs=!0}function it(g,c,h,E,S){po=[g,c,h,E,S]}function yt(g,c,h){Or();const E=g.__key,S=g.getParent();if(S===null)return;const $=ni(g);let G=!1;if(Tt($)&&c){const K=$.anchor,be=$.focus;K.key===E&&(Cd(K,g,S,g.getPreviousSibling(),g.getNextSibling()),G=!0),be.key===E&&(Cd(be,g,S,g.getPreviousSibling(),g.getNextSibling()),G=!0)}else mr($)&&c&&g.isSelected()&&g.selectPrevious();if(Tt($)&&c&&!G){const K=g.getIndexWithinParent();Vr(g),Ed($,S,K,-1)}else Vr(g);!h&&!tr(S)&&!S.canBeEmpty()&&S.isEmpty()&&yt(S,c),c&&eo(S)&&S.isEmpty()&&S.selectEnd()}class $t{static getType(){throw Error(`LexicalNode: Node ${this.name} does not implement .getType().`)}static clone(c){throw Error(`LexicalNode: Node ${this.name} does not implement .clone().`)}constructor(c){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,wo(this,c),this.__type!=="root"&&(Or(),Ut(this.__type,this.constructor))}getType(){return this.__type}isAttached(){let c=this.__key;for(;c!==null;){if(c==="root")return!0;const h=Fn(c);if(h===null)break;c=h.__parent}return!1}isSelected(c){const h=c||_n();if(h==null)return!1;const E=h.getNodes().some(S=>S.__key===this.__key);return St(this)?E:Tt(h)&&h.anchor.type==="element"&&h.focus.type==="element"&&h.anchor.key===h.focus.key&&h.anchor.offset===h.focus.offset?!1:E}getKey(){return this.__key}getIndexWithinParent(){const c=this.getParent();if(c===null)return-1;let h=c.getFirstChild(),E=0;for(;h!==null;){if(this.is(h))return E;E++,h=h.getNextSibling()}return-1}getParent(){const c=this.getLatest().__parent;return c===null?null:Fn(c)}getParentOrThrow(){const c=this.getParent();if(c===null)throw Error(`Expected node ${this.__key} to have a parent.`);return c}getTopLevelElement(){let c=this;for(;c!==null;){const h=c.getParent();if(tr(h))return c;c=h}return null}getTopLevelElementOrThrow(){const c=this.getTopLevelElement();if(c===null)throw Error(`Expected node ${this.__key} to have a top parent element.`);return c}getParents(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h),h=h.getParent();return c}getParentKeys(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h.__key),h=h.getParent();return c}getPreviousSibling(){const c=this.getLatest().__prev;return c===null?null:Fn(c)}getPreviousSiblings(){const c=[],h=this.getParent();if(h===null)return c;let E=h.getFirstChild();for(;E!==null&&!E.is(this);)c.push(E),E=E.getNextSibling();return c}getNextSibling(){const c=this.getLatest().__next;return c===null?null:Fn(c)}getNextSiblings(){const c=[];let h=this.getNextSibling();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getCommonAncestor(c){const h=this.getParents(),E=c.getParents();rt(this)&&h.unshift(this),rt(c)&&E.unshift(c);const S=h.length,$=E.length;if(S===0||$===0||h[S-1]!==E[$-1])return null;const G=new Set(E);for(let K=0;K<S;K++){const be=h[K];if(G.has(be))return be}return null}is(c){return c==null?!1:this.__key===c.__key}isBefore(c){if(this===c)return!1;if(c.isParentOf(this))return!0;if(this.isParentOf(c))return!1;const h=this.getCommonAncestor(c);let E=0,S=0,$=this;for(;;){const G=$.getParentOrThrow();if(G===h){E=$.getIndexWithinParent();break}$=G}for($=c;;){const G=$.getParentOrThrow();if(G===h){S=$.getIndexWithinParent();break}$=G}return E<S}isParentOf(c){const h=this.__key;if(h===c.__key)return!1;let E=c;for(;E!==null;){if(E.__key===h)return!0;E=E.getParent()}return!1}getNodesBetween(c){const h=this.isBefore(c),E=[],S=new Set;let $=this;for(;;){const G=$.__key;if(S.has(G)||(S.add(G),E.push($)),$===c)break;const K=rt($)?h?$.getFirstChild():$.getLastChild():null;if(K!==null){$=K;continue}const be=h?$.getNextSibling():$.getPreviousSibling();if(be!==null){$=be;continue}const ve=$.getParentOrThrow();if(S.has(ve.__key)||E.push(ve),ve===c)break;let Ne=null,we=ve;do{if(we===null)throw Error("getNodesBetween: ancestor is null");Ne=h?we.getNextSibling():we.getPreviousSibling(),we=we.getParent(),we!==null&&Ne===null&&!S.has(we.__key)&&E.push(we)}while(Ne===null);$=Ne}return h||E.reverse(),E}isDirty(){const c=$n()._dirtyLeaves;return c!==null&&c.has(this.__key)}getLatest(){const c=Fn(this.__key);if(c===null)throw Error("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update.");return c}getWritable(){Or();const c=di(),h=$n(),E=c._nodeMap,S=this.__key,$=this.getLatest(),G=$.__parent,K=h._cloneNotNeeded,be=_n();if(or(be)&&be.setCachedNodes(null),K.has(S))return Ha($),$;const ve=$.constructor.clone($);return ve.__parent=G,ve.__next=$.__next,ve.__prev=$.__prev,rt($)&&rt(ve)?(ve.__first=$.__first,ve.__last=$.__last,ve.__size=$.__size,ve.__indent=$.__indent,ve.__format=$.__format,ve.__dir=$.__dir):St($)&&St(ve)&&(ve.__format=$.__format,ve.__style=$.__style,ve.__mode=$.__mode,ve.__detail=$.__detail),K.add(S),ve.__key=S,Ha(ve),E.set(S,ve),ve}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(c,h){throw Error("createDOM: base method not extended")}updateDOM(c,h,E){throw Error("updateDOM: base method not extended")}exportDOM(c){return{element:this.createDOM(c._config,c)}}exportJSON(){throw Error("exportJSON: base method not extended")}static importJSON(c){throw Error(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}static transform(){return null}remove(c){yt(this,!0,c)}replace(c,h){Or();let E=_n();E!==null&&(E=E.clone()),Us(this,c);const S=this.getLatest(),$=this.__key,G=c.__key,K=c.getWritable(),be=this.getParentOrThrow().getWritable(),ve=be.__size;Vr(K);const Ne=S.getPreviousSibling(),we=S.getNextSibling(),Ae=S.__prev,Te=S.__next,He=S.__parent;if(yt(S,!1,!0),Ne===null)be.__first=G;else{const Le=Ne.getWritable();Le.__next=G}if(K.__prev=Ae,we===null)be.__last=G;else{const Le=we.getWritable();Le.__prev=G}if(K.__next=Te,K.__parent=He,be.__size=ve,h&&this.getChildren().forEach(Le=>{K.append(Le)}),Tt(E)){pr(E);const Le=E.anchor,Je=E.focus;Le.key===$&&nl(Le,K),Je.key===$&&nl(Je,K)}return Yr()===$&&Mn(G),K}insertAfter(c,h=!0){Or(),Us(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.getParent(),G=_n();let K=!1,be=!1;if($!==null){const Te=c.getIndexWithinParent();if(Vr(S),Tt(G)){const He=$.__key,Le=G.anchor,Je=G.focus;K=Le.type==="element"&&Le.key===He&&Le.offset===Te+1,be=Je.type==="element"&&Je.key===He&&Je.offset===Te+1}}const ve=this.getNextSibling(),Ne=this.getParentOrThrow().getWritable(),we=S.__key,Ae=E.__next;if(ve===null)Ne.__last=we;else{const Te=ve.getWritable();Te.__prev=we}if(Ne.__size++,E.__next=we,S.__next=Ae,S.__prev=E.__key,S.__parent=E.__parent,h&&Tt(G)){const Te=this.getIndexWithinParent();Ed(G,Ne,Te+1);const He=Ne.__key;K&&G.anchor.set(He,Te+2,"element"),be&&G.focus.set(He,Te+2,"element")}return c}insertBefore(c,h=!0){Or(),Us(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.__key;Vr(S);const G=this.getPreviousSibling(),K=this.getParentOrThrow().getWritable(),be=E.__prev,ve=this.getIndexWithinParent();if(G===null)K.__first=$;else{const we=G.getWritable();we.__next=$}K.__size++,E.__prev=$,S.__prev=be,S.__next=E.__key,S.__parent=E.__parent;const Ne=_n();if(h&&Tt(Ne)){const we=this.getParentOrThrow();Ed(Ne,we,ve)}return c}isParentRequired(){return!1}createParentElementNode(){return Bi()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(c,h){Or();const E=this.getPreviousSibling(),S=this.getParentOrThrow();if(E===null)return S.select(0,0);if(rt(E))return E.select();if(!St(E)){const $=E.getIndexWithinParent()+1;return S.select($,$)}return E.select(c,h)}selectNext(c,h){Or();const E=this.getNextSibling(),S=this.getParentOrThrow();if(E===null)return S.select();if(rt(E))return E.select(0,0);if(!St(E)){const $=E.getIndexWithinParent();return S.select($,$)}return E.select(c,h)}markDirty(){this.getWritable()}}function Ut(g,c){const h=$n()._nodes.get(g);if(h===void 0)throw Error(`Create node: Attempted to create node ${c.name} that was not configured to be used on the editor.`);const E=h.klass;if(E!==c)throw Error(`Create node: Type ${g} in node ${c.name} does not match registered node ${E.name} with the same type`)}function Rn(g,c,h){const E=c.getParentOrThrow().getLastChild();let S=c;const $=[c];for(;S!==E;){if(!S.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");S=S.getNextSibling(),$.push(S)}let G=g;for(const K of $)G=G.insertAfter(K)}class Xn extends $t{static getType(){return"linebreak"}static clone(c){return new Xn(c.__key)}constructor(c){super(c)}getTextContent(){return`
|
|
63
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:c=>{const h=c.parentElement;let E,S;return h!==null&&((E=h.firstChild)===c||E.nextSibling===c&&E.nodeType===Xe&&(E.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((S=h.lastChild)===c||S.previousSibling===c&&S.nodeType===Xe&&(S.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:ls,priority:0}}}}static importJSON(c){return Sr()}exportJSON(){return{type:"linebreak",version:1}}}function ls(g){return{node:Sr()}}function Sr(){return da(new Xn)}function Ro(g){return g instanceof Xn}function Qs(g,c){return c&tt?"code":c&jt?"mark":c&ut?"sub":c&Et?"sup":null}function xa(g,c){return c&De?"strong":c&Fe?"em":"span"}function yd(g,c,h,E,S){const $=E.classList;let G=$i(S,"base");G!==void 0&&$.add(...G),G=$i(S,"underlineStrikethrough");let K=!1;const be=c&ze&&c&ke,ve=h&ze&&h&ke;G!==void 0&&(ve?(K=!0,be||$.add(...G)):be&&$.remove(...G));for(const Ne in wr){const we=wr[Ne];if(G=$i(S,Ne),G!==void 0)if(h&we){if(K&&(Ne==="underline"||Ne==="strikethrough")){c&we&&$.remove(...G);continue}(!(c&we)||be&&Ne==="underline"||Ne==="strikethrough")&&$.add(...G)}else c&we&&$.remove(...G)}}function Kc(g,c){const h=g.length,E=c.length;let S=0,$=0;for(;S<h&&S<E&&g[S]===c[S];)S++;for(;$+S<h&&$+S<E&&g[h-$-1]===c[E-$-1];)$++;return[S,h-S-$,c.slice(S,E-$)]}function Jr(g,c,h){const E=c.firstChild,S=h.isComposing(),$=g+(S?Dt:"");if(E==null)c.textContent=$;else{const G=E.nodeValue;if(G!==$)if(S||Oe){const[K,be,ve]=Kc(G,$);be!==0&&E.deleteData(K,be),E.insertData(K,ve)}else E.nodeValue=$}}function Ea(g,c,h,E,S,$){Jr(S,g,c);const G=$.theme.text;G!==void 0&&yd(h,0,E,g,G)}function Ca(g,c){const h=document.createElement(c);return h.appendChild(g),h}class li extends $t{static getType(){return"text"}static clone(c){return new li(c.__text,c.__key)}constructor(c,h){super(h),this.__text=c,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const c=this.getLatest();return Ee[c.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===me}isComposing(){return this.__key===Yr()}isSegmented(){return this.getLatest().__mode===_e}isDirectionless(){return(this.getLatest().__detail&et)!==0}isUnmergeable(){return(this.getLatest().__detail<)!==0}hasFormat(c){const h=wr[c];return(this.getFormat()&h)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(c,h){const E=this.getLatest().__format;return er(E,c,h)}createDOM(c){const h=this.__format,E=Qs(this,h),S=xa(this,h),$=E===null?S:E,G=document.createElement($);let K=G;this.hasFormat("code")&&G.setAttribute("spellcheck","false"),E!==null&&(K=document.createElement(S),G.appendChild(K));const be=this.__text;Ea(K,this,S,h,be,c);const ve=this.__style;return ve!==""&&(G.style.cssText=ve),G}updateDOM(c,h,E){const S=this.__text,$=c.__format,G=this.__format,K=Qs(this,$),be=Qs(this,G),ve=xa(this,$),Ne=xa(this,G);if((K===null?ve:K)!==(be===null?Ne:be))return!0;if(K===be&&ve!==Ne){const Le=h.firstChild;if(Le==null)throw Error("updateDOM: prevInnerDOM is null or undefined");const Je=document.createElement(Ne);return Ea(Je,this,Ne,G,S,E),h.replaceChild(Je,Le),!1}let we=h;if(be!==null&&K!==null&&(we=h.firstChild,we==null))throw Error("updateDOM: innerDOM is null or undefined");Jr(S,we,this);const Ae=E.theme.text;Ae!==void 0&&$!==G&&yd(Ne,$,G,we,Ae);const Te=c.__style,He=this.__style;return Te!==He&&(h.style.cssText=He),!1}static importDOM(){return{"#text":()=>({conversion:Vc,priority:0}),b:()=>({conversion:bd,priority:0}),code:()=>({conversion:Xr,priority:0}),em:()=>({conversion:Xr,priority:0}),i:()=>({conversion:Xr,priority:0}),s:()=>({conversion:Xr,priority:0}),span:()=>({conversion:bh,priority:0}),strong:()=>({conversion:Xr,priority:0}),sub:()=>({conversion:Xr,priority:0}),sup:()=>({conversion:Xr,priority:0}),u:()=>({conversion:Xr,priority:0})}}static importJSON(c){const h=Un(c.text);return h.setFormat(c.format),h.setDetail(c.detail),h.setMode(c.mode),h.setStyle(c.style),h}exportDOM(c){let{element:h}=super.exportDOM(c);if(!(h!==null&&oi(h)))throw Error("Expected TextNode createDOM to always return a HTMLElement");return h.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(h=Ca(h,"b")),this.hasFormat("italic")&&(h=Ca(h,"i")),this.hasFormat("strikethrough")&&(h=Ca(h,"s")),this.hasFormat("underline")&&(h=Ca(h,"u")),{element:h}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(c,h){}setFormat(c){const h=this.getWritable();return h.__format=typeof c=="string"?wr[c]:c,h}setDetail(c){const h=this.getWritable();return h.__detail=typeof c=="string"?Zn[c]:c,h}setStyle(c){const h=this.getWritable();return h.__style=c,h}toggleFormat(c){const h=this.getFormat(),E=er(h,c,null);return this.setFormat(E)}toggleDirectionless(){const c=this.getWritable();return c.__detail^=et,c}toggleUnmergeable(){const c=this.getWritable();return c.__detail^=lt,c}setMode(c){const h=oa[c];if(this.__mode===h)return this;const E=this.getWritable();return E.__mode=h,E}setTextContent(c){if(this.__text===c)return this;const h=this.getWritable();return h.__text=c,h}select(c,h){Or();let E=c,S=h;const $=_n(),G=this.getTextContent(),K=this.__key;if(typeof G=="string"){const be=G.length;E===void 0&&(E=be),S===void 0&&(S=be)}else E=0,S=0;if(Tt($)){const be=Yr();(be===$.anchor.key||be===$.focus.key)&&Mn(K),$.setTextNodeRange(this,E,this,S)}else return vv(K,E,K,S,"text","text");return $}selectStart(){return this.select(0,0)}selectEnd(){const c=this.getTextContentSize();return this.select(c,c)}spliceText(c,h,E,S){const $=this.getWritable(),G=$.__text,K=E.length;let be=c;be<0&&(be=K+be,be<0&&(be=0));const ve=_n();if(S&&Tt(ve)){const we=c+K;ve.setTextNodeRange($,we,$,we)}const Ne=G.slice(0,be)+E+G.slice(be+h);return $.__text=Ne,$}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...c){Or();const h=this.getLatest(),E=h.getTextContent(),S=h.__key,$=Yr(),G=new Set(c),K=[],be=E.length;let ve="";for(let Ft=0;Ft<be;Ft++)ve!==""&&G.has(Ft)&&(K.push(ve),ve=""),ve+=E[Ft];ve!==""&&K.push(ve);const Ne=K.length;if(Ne===0)return[];if(K[0]===E)return[h];const we=K[0],Ae=h.getParentOrThrow();let Te;const He=h.getFormat(),Le=h.getStyle(),Je=h.__detail;let ft=!1;h.isSegmented()?(Te=Un(we),Te.__format=He,Te.__style=Le,Te.__detail=Je,ft=!0):(Te=h.getWritable(),Te.__text=we);const Ye=_n(),Lt=[Te];let zt=we.length;for(let Ft=1;Ft<Ne;Ft++){const Jt=K[Ft],cn=Jt.length,Bt=Un(Jt).getWritable();Bt.__format=He,Bt.__style=Le,Bt.__detail=Je;const Hn=Bt.__key,Mo=zt+cn;if(Tt(Ye)){const Wi=Ye.anchor,cl=Ye.focus;Wi.key===S&&Wi.type==="text"&&Wi.offset>zt&&Wi.offset<=Mo&&(Wi.key=Hn,Wi.offset-=zt,Ye.dirty=!0),cl.key===S&&cl.type==="text"&&cl.offset>zt&&cl.offset<=Mo&&(cl.key=Hn,cl.offset-=zt,Ye.dirty=!0)}$===S&&Mn(Hn),zt=Mo,Lt.push(Bt)}Cc(this);const Pt=Ae.getWritable(),Zt=this.getIndexWithinParent();return ft?(Pt.splice(Zt,0,Lt),this.remove()):Pt.splice(Zt,1,Lt),Tt(Ye)&&Ed(Ye,Ae,Zt,Ne-1),Lt}mergeWithSibling(c){const h=c===this.getPreviousSibling();if(!h&&c!==this.getNextSibling())throw Error("mergeWithSibling: sibling must be a previous or next sibling");const E=this.__key,S=c.__key,$=this.__text,G=$.length;Yr()===S&&Mn(E);const K=_n();if(Tt(K)){const we=K.anchor,Ae=K.focus;we!==null&&we.key===S&&(bv(we,h,E,c,G),K.dirty=!0),Ae!==null&&Ae.key===S&&(bv(Ae,h,E,c,G),K.dirty=!0)}const be=c.__text,ve=h?be+$:$+be;this.setTextContent(ve);const Ne=this.getWritable();return c.remove(),Ne}isTextEntity(){return!1}}function bh(g){const c=g,h=c.style.fontWeight==="700",E=c.style.textDecoration==="line-through",S=c.style.fontStyle==="italic",$=c.style.textDecoration==="underline",G=c.style.verticalAlign;return{forChild:K=>(St(K)&&(h&&K.toggleFormat("bold"),E&&K.toggleFormat("strikethrough"),S&&K.toggleFormat("italic"),$&&K.toggleFormat("underline"),G==="sub"&&K.toggleFormat("subscript"),G==="super"&&K.toggleFormat("superscript")),K),node:null}}function bd(g){const c=g.style.fontWeight==="normal";return{forChild:h=>(St(h)&&!c&&h.toggleFormat("bold"),h),node:null}}const Uc=new WeakMap;function el(g){return g.nodeName==="PRE"||g.nodeType===We&&g.style!==void 0&&g.style.whiteSpace!==void 0&&g.style.whiteSpace.startsWith("pre")}function _d(g){let c,h=g.parentNode;const E=[g];for(;h!==null&&(c=Uc.get(h))===void 0&&!el(h);)E.push(h),h=h.parentNode;const S=c===void 0?h:c;for(let $=0;$<E.length;$++)Uc.set(E[$],S);return S}function Vc(g){const c=g;if(g.parentElement===null)throw Error("Expected parentElement of Text not to be null");let h=c.textContent||"";if(_d(c)!==null){const E=h.split(/(\r?\n|\t)/),S=[],$=E.length;for(let G=0;G<$;G++){const K=E[G];K===`
|
|
64
|
-
`||K===`\r
|
|
65
|
-
`?S.push(Sr()):K===" "?S.push(wa()):K!==""&&S.push(Un(K))}return{node:S}}if(h=h.replace(/\r/g,"").replace(/[ \t\n]+/g," "),h==="")return{node:null};if(h[0]===" "){let E=c,S=!0;for(;E!==null&&(E=qc(E,!1))!==null;){const $=E.textContent||"";if($.length>0){/[ \t\n]$/.test($)&&(h=h.slice(1)),S=!1;break}}S&&(h=h.slice(1))}if(h[h.length-1]===" "){let E=c,S=!0;for(;E!==null&&(E=qc(E,!0))!==null;)if((E.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){S=!1;break}S&&(h=h.slice(0,h.length-1))}return h===""?{node:null}:{node:Un(h)}}const Yc=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function qc(g,c){let h=g;for(;;){let E;for(;(E=c?h.nextSibling:h.previousSibling)===null;){const $=h.parentElement;if($===null)return null;h=$}if(h=E,h.nodeType===We){const $=h.style.display;if($===""&&h.nodeName.match(Yc)===null||$!==""&&!$.startsWith("inline"))return null}let S=h;for(;(S=c?h.firstChild:h.lastChild)!==null;)h=S;if(h.nodeType===Xe)return h;if(h.nodeName==="BR")return null}}const cs={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Xr(g){const c=cs[g.nodeName.toLowerCase()];return c===void 0?{node:null}:{forChild:h=>(St(h)&&!h.hasFormat(c)&&h.toggleFormat(c),h),node:null}}function Un(g=""){return da(new li(g))}function St(g){return g instanceof li}class ci extends li{static getType(){return"tab"}static clone(c){const h=new ci(c.__key);return h.__text=c.__text,h.__format=c.__format,h.__style=c.__style,h}constructor(c){super(" ",c),this.__detail=lt}static importDOM(){return null}static importJSON(c){const h=wa();return h.setFormat(c.format),h.setStyle(c.style),h}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(c){throw Error("TabNode does not support setTextContent")}setDetail(c){throw Error("TabNode does not support setDetail")}setMode(c){throw Error("TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function wa(){return da(new ci)}function us(g){return g instanceof ci}class tl{constructor(c,h,E){this._selection=null,this.key=c,this.offset=h,this.type=E}is(c){return this.key===c.key&&this.offset===c.offset&&this.type===c.type}isBefore(c){let h=this.getNode(),E=c.getNode();const S=this.offset,$=c.offset;return rt(h)&&(h=h.getDescendantByIndex(S)??h),rt(E)&&(E=E.getDescendantByIndex($)??E),h===E?S<$:h.isBefore(E)}getNode(){const c=this.key,h=Fn(c);if(h===null)throw Error("Point.getNode: node not found");return h}set(c,h,E){const S=this._selection,$=this.key;this.key=c,this.offset=h,this.type=E,al()||(Yr()===$&&Mn(c),S!==null&&(S.setCachedNodes(null),S.dirty=!0))}}function rr(g,c,h){return new tl(g,c,h)}function Zc(g,c){let h=c.__key,E=g.offset,S="element";if(St(c)){S="text";const $=c.getTextContentSize();E>$&&(E=$)}else if(!rt(c)){const $=c.getNextSibling();if(St($))h=$.__key,E=0,S="text";else{const G=c.getParent();G&&(h=G.__key,E=c.getIndexWithinParent()+1)}}g.set(h,E,S)}function nl(g,c){if(rt(c)){const h=c.getLastDescendant();rt(h)||St(h)?Zc(g,h):Zc(g,c)}else Zc(g,c)}function xd(g,c,h,E){const S=g.getNode(),$=S.getChildAtIndex(g.offset),G=Un(),K=eo(S)?Bi().append(G):G;G.setFormat(h),G.setStyle(E),$===null?S.append(K):$.insertBefore(K),g.is(c)&&c.set(G.__key,0,"text"),g.set(G.__key,0,"text")}function $o(g,c,h,E){g.key=c,g.offset=h,g.type=E}class rl{constructor(c,h){this.anchor=c,this.focus=h,c._selection=this,h._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return or(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return ko(this)}}class pn{constructor(c){this.dirty=!1,this._nodes=c,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){if(!mr(c))return!1;const h=this._nodes,E=c._nodes;return h.size===E.size&&Array.from(h).every(S=>E.has(S))}add(c){this.dirty=!0,this._nodes.add(c),this._cachedNodes=null}delete(c){this.dirty=!0,this._nodes.delete(c),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(c){return this._nodes.has(c)}clone(){return new pn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.getNodes(),E=h.length,S=h[E-1];let $;if(St(S))$=S.select();else{const G=S.getIndexWithinParent()+1;$=S.getParentOrThrow().select(G,G)}$.insertNodes(c);for(let G=0;G<E;G++)h[G].remove()}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this._nodes,E=[];for(const S of h){const $=Fn(S);$!==null&&E.push($)}return al()||(this._cachedNodes=E),E}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Tt(g){return g instanceof ir}function or(g){return g instanceof rl}function Br(g){const[c,,h]=xv(g),E=h.getChildren(),S=E.length,$=E[0].getChildren().length,G=new Array(S);for(let K=0;K<S;K++)G[K]=new Array($);for(let K=0;K<S;K++){const be=E[K].getChildren();let ve=0;for(let Ne=0;Ne<be.length;Ne++){for(;G[K][ve];)ve++;const we=be[Ne],Ae=we.__rowSpan||1,Te=we.__colSpan||1;for(let He=0;He<Ae;He++)for(let Le=0;Le<Te;Le++)G[K+He][ve+Le]=we;if(c===we)return{colSpan:Te,columnIndex:ve,rowIndex:K,rowSpan:Ae};ve+=Te}}return null}class ui extends rl{constructor(c,h,E){super(h,E),this.gridKey=c}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Pr(c)?this.gridKey===c.gridKey&&this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}set(c,h,E){this.dirty=!0,this.gridKey=c,this.anchor.key=h,this.focus.key=E,this._cachedNodes=null}clone(){return new ui(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.focus.getNode();ia(h.select(0,h.getChildrenSize())).insertNodes(c)}getShape(){const c=Fn(this.anchor.key);if(!go(c))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");const h=Br(c);if(h===null)throw Error("getCellRect: expected to find AnchorNode");const E=Fn(this.focus.key);if(!go(E))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const S=Br(E);if(S===null)throw Error("getCellRect: expected to find focusCellNode");const $=Math.min(h.columnIndex,S.columnIndex),G=Math.max(h.columnIndex,S.columnIndex),K=Math.min(h.rowIndex,S.rowIndex),be=Math.max(h.rowIndex,S.rowIndex);return{fromX:Math.min($,G),fromY:Math.min(K,be),toX:Math.max($,G),toY:Math.max(K,be)}}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor.getNode(),E=this.focus.getNode(),S=Di(h,go),$=Di(E,go);if(!go(S))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");if(!go($))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const G=S.getParent();if(!Qc(G))throw Error("Expected anchorCell to have a parent GridRowNode");const K=G.getParent();if(!Oh(K))throw Error("Expected tableNode to have a parent GridNode");const be=$.getParents()[1];if(be!==K){if(K.isParentOf($)){const Ft=be.getParent();if(Ft==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,$.getKey(),Ft.getKey())}else{const Ft=K.getParent();if(Ft==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,Ft.getKey(),$.getKey())}return this.getNodes()}const[ve,Ne,we]=_v(K,S,$);let Ae=Math.min(Ne.startColumn,we.startColumn),Te=Math.min(Ne.startRow,we.startRow),He=Math.max(Ne.startColumn+Ne.cell.__colSpan-1,we.startColumn+we.cell.__colSpan-1),Le=Math.max(Ne.startRow+Ne.cell.__rowSpan-1,we.startRow+we.cell.__rowSpan-1),Je=Ae,ft=Te,Ye=Ae,Lt=Te;function zt(Ft){const{cell:Jt,startColumn:cn,startRow:Bt}=Ft;Ae=Math.min(Ae,cn),Te=Math.min(Te,Bt),He=Math.max(He,cn+Jt.__colSpan-1),Le=Math.max(Le,Bt+Jt.__rowSpan-1)}for(;Ae<Je||Te<ft||He>Ye||Le>Lt;){if(Ae<Je){const Ft=Lt-ft,Jt=Je-1;for(let cn=0;cn<=Ft;cn++)zt(ve[ft+cn][Jt]);Je=Jt}if(Te<ft){const Ft=Ye-Je,Jt=ft-1;for(let cn=0;cn<=Ft;cn++)zt(ve[Jt][Je+cn]);ft=Jt}if(He>Ye){const Ft=Lt-ft,Jt=Ye+1;for(let cn=0;cn<=Ft;cn++)zt(ve[ft+cn][Jt]);Ye=Jt}if(Le>Lt){const Ft=Ye-Je,Jt=Lt+1;for(let cn=0;cn<=Ft;cn++)zt(ve[Jt][Je+cn]);Lt=Jt}}const Pt=[K];let Zt=null;for(let Ft=Te;Ft<=Le;Ft++)for(let Jt=Ae;Jt<=He;Jt++){const{cell:cn}=ve[Ft][Jt],Bt=cn.getParent();if(!Qc(Bt))throw Error("Expected GridCellNode parent to be a GridRowNode");Bt!==Zt&&Pt.push(Bt),Pt.push(cn,...ud(cn)),Zt=Bt}return al()||(this._cachedNodes=Pt),Pt}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Pr(g){return g instanceof ui}class ir extends rl{constructor(c,h,E,S){super(c,h),this.format=E,this.style=S}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Tt(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus)&&this.format===c.format&&this.style===c.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor,E=this.focus,S=h.isBefore(E),$=S?h:E,G=S?E:h;let K=$.getNode(),be=G.getNode();const ve=$.offset,Ne=G.offset;if(rt(K)&&(K=K.getDescendantByIndex(ve)??K),rt(be)){let Ae=be.getDescendantByIndex(Ne);Ae!==null&&Ae!==K&&be.getChildAtIndex(Ne)===Ae&&(Ae=Ae.getPreviousSibling()),be=Ae??be}let we;return K.is(be)?rt(K)&&K.getChildrenSize()>0?we=[]:we=[K]:we=K.getNodesBetween(be),al()||(this._cachedNodes=we),we}setTextNodeRange(c,h,E,S){$o(this.anchor,c.__key,h,"text"),$o(this.focus,E.__key,S,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const c=this.getNodes();if(c.length===0)return"";const h=c[0],E=c[c.length-1],S=this.anchor,$=this.focus,G=S.isBefore($),[K,be]=ko(this);let ve="",Ne=!0;for(let we=0;we<c.length;we++){const Ae=c[we];if(rt(Ae)&&!Ae.isInline())Ne||(ve+=`
|
|
66
|
-
`),Ae.isEmpty()?Ne=!1:Ne=!0;else if(Ne=!1,St(Ae)){let Te=Ae.getTextContent();Ae===h?Ae===E?(S.type!=="element"||$.type!=="element"||$.offset===S.offset)&&(Te=K<be?Te.slice(K,be):Te.slice(be,K)):Te=G?Te.slice(K):Te.slice(be):Ae===E&&(Te=G?Te.slice(0,be):Te.slice(0,K)),ve+=Te}else(zn(Ae)||Ro(Ae))&&(Ae!==E||!this.isCollapsed())&&(ve+=Ae.getTextContent())}return ve}applyDOMRange(c){const h=$n(),E=h.getEditorState()._selection,S=mv(c.startContainer,c.startOffset,c.endContainer,c.endOffset,h,E);if(S===null)return;const[$,G]=S;$o(this.anchor,$.key,$.offset,$.type),$o(this.focus,G.key,G.offset,G.type),this._cachedNodes=null}clone(){const c=this.anchor,h=this.focus;return new ir(rr(c.key,c.offset,c.type),rr(h.key,h.offset,h.type),this.format,this.style)}toggleFormat(c){this.format=er(this.format,c,null),this.dirty=!0}setStyle(c){this.style=c,this.dirty=!0}hasFormat(c){const h=wr[c];return(this.format&h)!==0}insertRawText(c){const h=c.split(/(\r?\n|\t)/),E=[],S=h.length;for(let $=0;$<S;$++){const G=h[$];G===`
|
|
67
|
-
`||G===`\r
|
|
68
|
-
`?E.push(Sr()):G===" "?E.push(wa()):E.push(Un(G))}this.insertNodes(E)}insertText(c){const h=this.anchor,E=this.focus,S=this.isCollapsed()||h.isBefore(E),$=this.format,G=this.style;S&&h.type==="element"?xd(h,E,$,G):!S&&E.type==="element"&&xd(E,h,$,G);const K=this.getNodes(),be=K.length,ve=S?h:E,Ne=S?E:h,we=ve.offset,Ae=Ne.offset;let Te=K[0];if(!St(Te))throw Error("insertText: first node is not a text node");const He=Te.getTextContent().length,Le=Te.getParentOrThrow(),Je=be-1;let ft=K[Je];if(this.isCollapsed()&&we===He&&(Te.isSegmented()||Te.isToken()||!Te.canInsertTextAfter()||!Le.canInsertTextAfter()&&Te.getNextSibling()===null)){let Ye=Te.getNextSibling();if((!St(Ye)||!Ye.canInsertTextBefore()||Ps(Ye))&&(Ye=Un(),Ye.setFormat($),Le.canInsertTextAfter()?Te.insertAfter(Ye):Le.insertAfter(Ye)),Ye.select(0,0),Te=Ye,c!==""){this.insertText(c);return}}else if(this.isCollapsed()&&we===0&&(Te.isSegmented()||Te.isToken()||!Te.canInsertTextBefore()||!Le.canInsertTextBefore()&&Te.getPreviousSibling()===null)){let Ye=Te.getPreviousSibling();if((!St(Ye)||Ps(Ye))&&(Ye=Un(),Ye.setFormat($),Le.canInsertTextBefore()?Te.insertBefore(Ye):Le.insertBefore(Ye)),Ye.select(),Te=Ye,c!==""){this.insertText(c);return}}else if(Te.isSegmented()&&we!==He){const Ye=Un(Te.getTextContent());Ye.setFormat($),Te.replace(Ye),Te=Ye}else if(!this.isCollapsed()&&c!==""){const Ye=ft.getParent();if(!Le.canInsertTextBefore()||!Le.canInsertTextAfter()||rt(Ye)&&(!Ye.canInsertTextBefore()||!Ye.canInsertTextAfter())){this.insertText(""),gv(this.anchor,this.focus,null),this.insertText(c);return}}if(be===1){if(Te.isToken()){const Pt=Un(c);Pt.select(),Te.replace(Pt);return}const Ye=Te.getFormat(),Lt=Te.getStyle();if(we===Ae&&(Ye!==$||Lt!==G))if(Te.getTextContent()==="")Te.setFormat($),Te.setStyle(G);else{const Pt=Un(c);if(Pt.setFormat($),Pt.setStyle(G),Pt.select(),we===0)Te.insertBefore(Pt,!1);else{const[Zt]=Te.splitText(we);Zt.insertAfter(Pt,!1)}Pt.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);return}else if(us(Te)){const Pt=Un(c);Pt.setFormat($),Pt.setStyle(G),Pt.select(),Te.replace(Pt);return}const zt=Ae-we;Te=Te.spliceText(we,zt,c,!0),Te.getTextContent()===""?Te.remove():this.anchor.type==="text"&&(Te.isComposing()?this.anchor.offset-=c.length:(this.format=Ye,this.style=Lt))}else{const Ye=new Set([...Te.getParentKeys(),...ft.getParentKeys()]),Lt=rt(Te)?Te:Te.getParentOrThrow();let zt=rt(ft)?ft:ft.getParentOrThrow(),Pt=ft;if(!Lt.is(zt)&&zt.isInline())do Pt=zt,zt=zt.getParentOrThrow();while(zt.isInline());if(Ne.type==="text"&&(Ae!==0||ft.getTextContent()==="")||Ne.type==="element"&&ft.getIndexWithinParent()<Ae)if(St(ft)&&!ft.isToken()&&Ae!==ft.getTextContentSize()){if(ft.isSegmented()){const Bt=Un(ft.getTextContent());ft.replace(Bt),ft=Bt}!eo(Ne.getNode())&&Ne.type==="text"&&(ft=ft.spliceText(0,Ae,"")),Ye.add(ft.__key)}else{const Bt=ft.getParentOrThrow();!Bt.canBeEmpty()&&Bt.getChildrenSize()===1?Bt.remove():ft.remove()}else Ye.add(ft.__key);const Zt=zt.getChildren(),Ft=new Set(K),Jt=Lt.is(zt),cn=Lt.isInline()&&Te.getNextSibling()===null?Lt:Te;for(let Bt=Zt.length-1;Bt>=0;Bt--){const Hn=Zt[Bt];if(Hn.is(Te)||rt(Hn)&&Hn.isParentOf(Te))break;Hn.isAttached()&&(!Ft.has(Hn)||Hn.is(Pt)?Jt||cn.insertAfter(Hn,!1):Hn.remove())}if(!Jt){let Bt=zt,Hn=null;for(;Bt!==null;){const Mo=Bt.getChildren(),Wi=Mo.length;(Wi===0||Mo[Wi-1].is(Hn))&&(Ye.delete(Bt.__key),Hn=Bt),Bt=Bt.getParent()}}if(!Te.isToken())Te=Te.spliceText(we,He-we,c,!0),Te.getTextContent()===""?Te.remove():Te.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);else if(we===He)Te.select();else{const Bt=Un(c);Bt.select(),Te.replace(Bt)}for(let Bt=1;Bt<be;Bt++){const Hn=K[Bt],Mo=Hn.__key;Ye.has(Mo)||Hn.remove()}}}removeText(){this.insertText("")}formatText(c){if(this.isCollapsed()){this.toggleFormat(c),Mn(null);return}const h=this.getNodes(),E=[];for(const Ye of h)St(Ye)&&E.push(Ye);const S=E.length;if(S===0){this.toggleFormat(c),Mn(null);return}const $=this.anchor,G=this.focus,K=this.isBackward(),be=K?G:$,ve=K?$:G;let Ne=0,we=E[0],Ae=be.type==="element"?0:be.offset;if(be.type==="text"&&Ae===we.getTextContentSize()&&(Ne=1,we=E[1],Ae=0),we==null)return;const Te=we.getFormatFlags(c,null),He=S-1;let Le=E[He];const Je=ve.type==="text"?ve.offset:Le.getTextContentSize();if(we.is(Le)){if(Ae===Je)return;if(Ae===0&&Je===we.getTextContentSize())we.setFormat(Te);else{const Ye=we.splitText(Ae,Je),Lt=Ae===0?Ye[0]:Ye[1];Lt.setFormat(Te),be.type==="text"&&be.set(Lt.__key,0,"text"),ve.type==="text"&&ve.set(Lt.__key,Je-Ae,"text")}this.format=Te;return}Ae!==0&&([,we]=we.splitText(Ae),Ae=0),we.setFormat(Te);const ft=Le.getFormatFlags(c,Te);Je>0&&(Je!==Le.getTextContentSize()&&([Le]=Le.splitText(Je)),Le.setFormat(ft));for(let Ye=Ne+1;Ye<He;Ye++){const Lt=E[Ye];if(!Lt.isToken()){const zt=Lt.getFormatFlags(c,ft);Lt.setFormat(zt)}}be.type==="text"&&be.set(we.__key,Ae,"text"),ve.type==="text"&&ve.set(Le.__key,Je,"text"),this.format=Te|ft}insertNodes(c){if(c.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const Le=_n();if(!Tt(Le))throw Error("Expected RangeSelection after insertParagraph");return Le.insertNodes(c)}const h=ns(this.anchor.getNode(),ha),E=c[c.length-1];if("__language"in h){if("__language"in c[0])this.insertText(c[0].getTextContent());else{const Le=Eh(this);h.splice(Le,0,c),E.selectEnd()}return}const S=Le=>(rt(Le)||zn(Le))&&!Le.isInline();if(!c.some(S)){const Le=Eh(this);h.splice(Le,0,c),E.selectEnd();return}const $=n1(c),G=$.getLastDescendant(),K=$.getChildren(),be=Le=>"__value"in Le&&"__checked"in Le,ve=Le=>rt(Le)&&ha(Le)&&!Le.isEmpty()&&rt(h)&&(!h.isEmpty()||be(h)),Ne=!rt(h)||!h.isEmpty()?this.insertParagraph():null,we=K[K.length-1];let Ae=K[0];ve(Ae)&&(h.append(...Ae.getChildren()),Ae=K[1]),Ae&&Rn(h,Ae);const Te=ns(G,ha);Ne&&rt(Te)&&(be(Ne)||ha(we))&&(Te.append(...Ne.getChildren()),Ne.remove()),rt(h)&&h.isEmpty()&&h.remove(),G.selectEnd();const He=rt(h)?h.getLastChild():null;Ro(He)&&Te!==h&&He.remove()}insertParagraph(){if(this.anchor.key==="root"){const G=Bi();return hr().splice(this.anchor.offset,0,[G]),G.select(),G}const c=Eh(this),h=ns(this.anchor.getNode(),ha),E=h.getChildAtIndex(c),S=E?[E,...E.getNextSiblings()]:[],$=h.insertNewAfter(this,!1);return $?($.append(...S),$.selectStart(),$):null}insertLineBreak(c){const h=Sr();if(this.insertNodes([h]),c){const E=h.getParentOrThrow(),S=h.getIndexWithinParent();E.select(S,S)}}extract(){const c=this.getNodes(),h=c.length,E=h-1,S=this.anchor,$=this.focus;let G=c[0],K=c[E];const[be,ve]=ko(this);if(h===0)return[];if(h===1){if(St(G)&&!this.isCollapsed()){const we=be>ve?ve:be,Ae=be>ve?be:ve,Te=G.splitText(we,Ae),He=we===0?Te[0]:Te[1];return He!=null?[He]:[]}return[G]}const Ne=S.isBefore($);if(St(G)){const we=Ne?be:ve;we===G.getTextContentSize()?c.shift():we!==0&&([,G]=G.splitText(we),c[0]=G)}if(St(K)){const we=K.getTextContent().length,Ae=Ne?ve:be;Ae===0?c.pop():Ae!==we&&([K]=K.splitText(Ae),c[E]=K)}return c}modify(c,h,E){const S=this.focus,$=this.anchor,G=c==="move",K=ua(S,h);if(zn(K)&&!K.isIsolated()){if(G&&K.isKeyboardSelectable()){const Te=_h();Te.add(K.__key),pr(Te);return}const Ae=h?K.getPreviousSibling():K.getNextSibling();if(St(Ae)){const Te=Ae.__key,He=h?Ae.getTextContent().length:0;S.set(Te,He,"text"),G&&$.set(Te,He,"text");return}else{const Te=K.getParentOrThrow();let He,Le;rt(Ae)?(Le=Ae.__key,He=h?Ae.getChildrenSize():0):(He=K.getIndexWithinParent(),Le=Te.__key,h||He++),S.set(Le,He,"element"),G&&$.set(Le,He,"element");return}}const be=$n(),ve=Fr(be._window);if(!ve)return;const Ne=be._blockCursorElement,we=be._rootElement;if(we!==null&&Ne!==null&&rt(K)&&!K.isInline()&&!K.canBeEmpty()&&fa(Ne,be,we),ji(ve,c,h?"backward":"forward",E),ve.rangeCount>0){const Ae=ve.getRangeAt(0),Te=this.anchor.getNode(),He=eo(Te)?Te:Pc(Te);if(this.applyDOMRange(Ae),this.dirty=!0,!G){const Le=this.getNodes(),Je=[];let ft=!1;for(let Ye=0;Ye<Le.length;Ye++){const Lt=Le[Ye];jn(Lt,He)?Je.push(Lt):ft=!0}if(ft&&Je.length>0)if(h){const Ye=Je[0];rt(Ye)?Ye.selectStart():Ye.getParentOrThrow().selectStart()}else{const Ye=Je[Je.length-1];rt(Ye)?Ye.selectEnd():Ye.getParentOrThrow().selectEnd()}(ve.anchorNode!==Ae.startContainer||ve.anchorOffset!==Ae.startOffset)&&Ir(this)}}}deleteCharacter(c){const h=this.isCollapsed();if(this.isCollapsed()){const E=this.anchor,S=this.focus;let $=E.getNode();if(!c&&(E.type==="element"&&rt($)&&E.offset===$.getChildrenSize()||E.type==="text"&&E.offset===$.getTextContentSize())){const K=$.getParent(),be=$.getNextSibling()||(K===null?null:K.getNextSibling());if(rt(be)&&be.isShadowRoot())return}const G=ua(S,c);if(zn(G)&&!G.isIsolated()){if(G.isKeyboardSelectable()&&rt($)&&$.getChildrenSize()===0){$.remove();const K=_h();K.add(G.__key),pr(K)}else G.remove(),$n().dispatchCommand(t,void 0);return}else if(!c&&rt(G)&&rt($)&&$.isEmpty()){$.remove(),G.selectStart();return}if(this.modify("extend",c,"character"),this.isCollapsed()){if(c&&E.offset===0&&(E.type==="element"?E.getNode():E.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const K=S.type==="text"?S.getNode():null;if($=E.type==="text"?E.getNode():null,K!==null&&K.isSegmented()){const be=S.offset,ve=K.getTextContentSize();if(K.is($)||c&&be!==ve||!c&&be!==0){Jc(K,c,be);return}}else if($!==null&&$.isSegmented()){const be=E.offset,ve=$.getTextContentSize();if($.is(K)||c&&be!==0||!c&&be!==ve){Jc($,c,be);return}}ol(this,c)}}if(this.removeText(),c&&!h&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const E=this.anchor.getNode();E.isEmpty()&&eo(E.getParent())&&E.getIndexWithinParent()===0&&E.collapseAtStart(this)}}deleteLine(c){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",c,"lineboundary"),(c?this.focus:this.anchor).offset===0&&this.modify("extend",c,"character")),this.removeText()}deleteWord(c){this.isCollapsed()&&this.modify("extend",c,"word"),this.removeText()}}function mr(g){return g instanceof pn}function Do(g){const c=g.offset;if(g.type==="text")return c;const h=g.getNode();return c===h.getChildrenSize()?h.getTextContent().length:0}function ko(g){const c=g.anchor,h=g.focus;return c.type==="element"&&h.type==="element"&&c.key===h.key&&c.offset===h.offset?[0,0]:[Do(c),Do(h)]}function Ir(g){const c=g.focus,h=g.anchor,E=h.key,S=h.offset,$=h.type;$o(h,c.key,c.offset,c.type),$o(c,E,S,$),g._cachedNodes=null}function ji(g,c,h,E){g.modify(c,h,E)}function ol(g,c){const h=g.anchor,E=g.focus,S=h.getNode(),$=E.getNode();if(S===$&&h.type==="text"&&E.type==="text"){const G=h.offset,K=E.offset,be=G<K,ve=be?G:K,Ne=be?K:G,we=Ne-1;if(ve!==we){const Ae=S.getTextContent().slice(ve,Ne);Tc(Ae)||(c?E.offset=we:h.offset=we)}}}function Jc(g,c,h){const E=g,S=E.getTextContent().split(/(?=\s)/g),$=S.length;let G=0,K=0;for(let ve=0;ve<$;ve++){const Ne=S[ve],we=ve===$-1;if(K=G,G+=Ne.length,c&&G===h||G>h||we){S.splice(ve,1),we&&(K=void 0);break}}const be=S.join("").trim();be===""?E.remove():(E.setTextContent(be),E.select(K,K))}function VS(g,c,h){const E=g.getParent();return h===null||E===null||!E.canBeEmpty()||E!==h.getNode()}function hv(g,c,h,E){let S=c,$;if(g.nodeType===We){let G=!1;const K=g.childNodes,be=K.length;S===be&&(G=!0,S=be-1);let ve=K[S],Ne=!1;if(ve===E._blockCursorElement?(ve=K[S+1],Ne=!0):E._blockCursorElement!==null&&S--,$=Ni(ve),St($))S=Ka($,G);else{let we=Ni(g);if(we===null)return null;if(rt(we)){let Ae=we.getChildAtIndex(S);if(rt(Ae)&&VS(Ae,S,h)){const Te=G?Ae.getLastDescendant():Ae.getFirstDescendant();Te===null?(we=Ae,S=0):(Ae=Te,we=rt(Ae)?Ae:Ae.getParentOrThrow())}St(Ae)?($=Ae,we=null,S=Ka(Ae,G)):Ae!==we&&G&&!Ne&&S++}else{const Ae=we.getIndexWithinParent();c===0&&zn(we)&&Ni(g)===we?S=Ae:S=Ae+1,we=we.getParentOrThrow()}if(rt(we))return rr(we.__key,S,"element")}}else $=Ni(g);return St($)?rr($.__key,S,"text"):null}function pv(g,c,h){const E=g.offset,S=g.getNode();if(E===0){const $=S.getPreviousSibling(),G=S.getParent();if(!c)rt($)&&!h&&$.isInline()?(g.key=$.__key,g.offset=$.getChildrenSize(),g.type="element"):St($)&&(g.key=$.__key,g.offset=$.getTextContent().length);else if((h||!c)&&$===null&&rt(G)&&G.isInline()){const K=G.getPreviousSibling();St(K)&&(g.key=K.__key,g.offset=K.getTextContent().length)}}else if(E===S.getTextContent().length){const $=S.getNextSibling(),G=S.getParent();if(c&&rt($)&&$.isInline())g.key=$.__key,g.offset=0,g.type="element";else if((h||c)&&$===null&&rt(G)&&G.isInline()&&!G.canInsertTextAfter()){const K=G.getNextSibling();St(K)&&(g.key=K.__key,g.offset=0)}}}function gv(g,c,h){if(g.type==="text"&&c.type==="text"){const E=g.isBefore(c),S=g.is(c);pv(g,E,S),pv(c,!E,S),S&&(c.key=g.key,c.offset=g.offset,c.type=g.type);const $=$n();if($.isComposing()&&$._compositionKey!==g.key&&Tt(h)){const G=h.anchor,K=h.focus;$o(g,G.key,G.offset,G.type),$o(c,K.key,K.offset,K.type)}}}function mv(g,c,h,E,S,$){if(g===null||h===null||!ei(S,g,h))return null;const G=hv(g,c,Tt($)?$.anchor:null,S);if(G===null)return null;const K=hv(h,E,Tt($)?$.focus:null,S);if(K===null)return null;if(G.type==="element"&&K.type==="element"){const be=Ni(g),ve=Ni(h);if(zn(be)&&zn(ve))return null}return gv(G,K,$),[G,K]}function YS(g){return rt(g)&&!g.isInline()}function vv(g,c,h,E,S,$){const G=di(),K=new ir(rr(g,c,S),rr(h,E,$),0,"");return K.dirty=!0,G._selection=K,K}function qS(){const g=rr("root",0,"element"),c=rr("root",0,"element");return new ir(g,c,0,"")}function _h(){return new pn(new Set)}function ZS(){const g=rr("root",0,"element"),c=rr("root",0,"element");return new ui("root",g,c)}function JS(g){const c=g.getEditorState()._selection,h=Fr(g._window);return Tt(c)||c==null?xh(c,h,g):c.clone()}function xh(g,c,h){const E=h._window;if(E===null)return null;const S=E.event,$=S?S.type:void 0,G=$==="selectionchange",K=!at()&&(G||$==="beforeinput"||$==="compositionstart"||$==="compositionend"||$==="click"&&S&&S.detail===3||$==="drop"||$===void 0);let be,ve,Ne,we;if(!Tt(g)||K){if(c===null)return null;if(be=c.anchorNode,ve=c.focusNode,Ne=c.anchorOffset,we=c.focusOffset,G&&Tt(g)&&!ei(h,be,ve))return g.clone()}else return g.clone();const Ae=mv(be,Ne,ve,we,h,g);if(Ae===null)return null;const[Te,He]=Ae;return new ir(Te,He,Tt(g)?g.format:0,Tt(g)?g.style:"")}function _n(){return di()._selection}function il(){return $n()._editorState._selection}function Ed(g,c,h,E=1){const S=g.anchor,$=g.focus,G=S.getNode(),K=$.getNode();if(!c.is(G)&&!c.is(K))return;const be=c.__key;if(g.isCollapsed()){const ve=S.offset;if(h<=ve&&E>0||h<ve&&E<0){const Ne=Math.max(0,ve+E);S.set(be,Ne,"element"),$.set(be,Ne,"element"),yv(g)}}else{const ve=g.isBackward(),Ne=ve?$:S,we=Ne.getNode(),Ae=ve?S:$,Te=Ae.getNode();if(c.is(we)){const He=Ne.offset;(h<=He&&E>0||h<He&&E<0)&&Ne.set(be,Math.max(0,He+E),"element")}if(c.is(Te)){const He=Ae.offset;(h<=He&&E>0||h<He&&E<0)&&Ae.set(be,Math.max(0,He+E),"element")}}yv(g)}function yv(g){const c=g.anchor,h=c.offset,E=g.focus,S=E.offset,$=c.getNode(),G=E.getNode();if(g.isCollapsed()){if(!rt($))return;const K=$.getChildrenSize(),be=h>=K,ve=be?$.getChildAtIndex(K-1):$.getChildAtIndex(h);if(St(ve)){let Ne=0;be&&(Ne=ve.getTextContentSize()),c.set(ve.__key,Ne,"text"),E.set(ve.__key,Ne,"text")}return}if(rt($)){const K=$.getChildrenSize(),be=h>=K,ve=be?$.getChildAtIndex(K-1):$.getChildAtIndex(h);if(St(ve)){let Ne=0;be&&(Ne=ve.getTextContentSize()),c.set(ve.__key,Ne,"text")}}if(rt(G)){const K=G.getChildrenSize(),be=S>=K,ve=be?G.getChildAtIndex(K-1):G.getChildAtIndex(S);if(St(ve)){let Ne=0;be&&(Ne=ve.getTextContentSize()),E.set(ve.__key,Ne,"text")}}}function XS(g,c){const h=c.getEditorState()._selection,E=g._selection;if(Tt(E)){const S=E.anchor,$=E.focus;let G;if(S.type==="text"&&(G=S.getNode(),G.selectionTransform(h,E)),$.type==="text"){const K=$.getNode();G!==K&&K.selectionTransform(h,E)}}}function Cd(g,c,h,E,S){let $=null,G=0,K=null;E!==null?($=E.__key,St(E)?(G=E.getTextContentSize(),K="text"):rt(E)&&(G=E.getChildrenSize(),K="element")):S!==null&&($=S.__key,St(S)?K="text":rt(S)&&(K="element")),$!==null&&K!==null?g.set($,G,K):(G=c.getIndexWithinParent(),G===-1&&(G=h.getChildrenSize()),g.set(h.__key,G,"element"))}function bv(g,c,h,E,S){g.type==="text"?(g.key=h,c||(g.offset+=S)):g.offset>E.getIndexWithinParent()&&(g.offset-=1)}function QS(g,c,h,E,S,$,G){const K=E.anchorNode,be=E.focusNode,ve=E.anchorOffset,Ne=E.focusOffset,we=document.activeElement;if(S.has("collaboration")&&we!==$||we!==null&&xc(we))return;if(!Tt(c)){g!==null&&ei(h,K,be)&&E.removeAllRanges();return}const Ae=c.anchor,Te=c.focus,He=Ae.key,Le=Te.key,Je=es(h,He),ft=es(h,Le),Ye=Ae.offset,Lt=Te.offset,zt=c.format,Pt=c.style,Zt=c.isCollapsed();let Ft=Je,Jt=ft,cn=!1;if(Ae.type==="text"){Ft=An(Je);const Bt=Ae.getNode();cn=Bt.getFormat()!==zt||Bt.getStyle()!==Pt}else Tt(g)&&g.anchor.type==="text"&&(cn=!0);if(Te.type==="text"&&(Jt=An(ft)),!(Ft===null||Jt===null)&&(Zt&&(g===null||cn||Tt(g)&&(g.format!==zt||g.style!==Pt))&&it(zt,Pt,Ye,He,performance.now()),!(ve===Ye&&Ne===Lt&&K===Ft&&be===Jt&&!(E.type==="Range"&&Zt)&&((we===null||!$.contains(we))&&$.focus({preventScroll:!0}),Ae.type!=="element")))){try{E.setBaseAndExtent(Ft,Ye,Jt,Lt)}catch{}if(!S.has("skip-scroll-into-view")&&c.isCollapsed()&&$!==null&&$===document.activeElement){const Bt=c instanceof ir&&c.anchor.type==="element"?Ft.childNodes[Ye]||null:E.rangeCount>0?E.getRangeAt(0):null;if(Bt!==null){let Hn;if(Bt instanceof Text){const Mo=document.createRange();Mo.selectNode(Bt),Hn=Mo.getBoundingClientRect()}else Hn=Bt.getBoundingClientRect();mh(h,Hn,$)}}Ie()}}function e1(g){let c=_n()||il();c===null&&(c=hr().selectEnd()),c.insertNodes(g)}function t1(){const g=_n();return g===null?"":g.getTextContent()}function _v(g,c,h){const E=[];let S=null,$=null;function G(ve,Ne,we){const Ae={cell:we,startColumn:Ne,startRow:ve},Te=we.__rowSpan,He=we.__colSpan;for(let Le=0;Le<Te;Le++){E[ve+Le]===void 0&&(E[ve+Le]=[]);for(let Je=0;Je<He;Je++)E[ve+Le][Ne+Je]=Ae}c.is(we)&&(S=Ae),h.is(we)&&($=Ae)}function K(ve,Ne){return E[ve]===void 0||E[ve][Ne]===void 0}const be=g.getChildren();for(let ve=0;ve<be.length;ve++){const Ne=be[ve];if(!Qc(Ne))throw Error("Expected GridNode children to be GridRowNode");const we=Ne.getChildren();let Ae=0;for(const Te of we){if(!go(Te))throw Error("Expected GridRowNode children to be GridCellNode");for(;!K(ve,Ae);)Ae++;G(ve,Ae,Te),Ae+=Te.__colSpan}}if(S===null)throw Error("Anchor not found in Grid");if($===null)throw Error("Focus not found in Grid");return[E,S,$]}function xv(g){let c;if(g instanceof Sh)c=g;else if(g instanceof $t){const S=Di(g,go);if(!go(S))throw Error("Expected to find a parent GridCellNode");c=S}else{const S=Di(g.getNode(),go);if(!go(S))throw Error("Expected to find a parent GridCellNode");c=S}const h=c.getParent();if(!Qc(h))throw Error("Expected GridCellNode to have a parent GridRowNode");const E=h.getParent();if(!Oh(E))throw Error("Expected GridRowNode to have a parent GridNode");return[c,h,E]}function Eh(g){g.isCollapsed()||g.removeText();const c=g.anchor,h=c.getNode();if(!St(h))return c.offset;const E=h.getParent();if(!E){const be=Bi();return hr().append(be),be.select(),0}const S=h.splitText(c.offset);if(S.length===0)return 0;const $=c.offset===0?0:1,G=S[0].getIndexWithinParent()+$;if(!E.isInline()||G===0)return G;const K=E.getChildAtIndex(G);return K&&E.insertNewAfter(g).append(K,...K.getNextSiblings()),E.getIndexWithinParent()+$}function n1(g){const c=Bi();let h=null;for(let E=0;E<g.length;E++){const S=g[E],$=Ro(S);if($||zn(S)&&S.isInline()||rt(S)&&S.isInline()||St(S)||S.isParentRequired()){if(h===null&&(h=S.createParentElementNode(),c.append(h),$))continue;h!==null&&h.append(S)}else c.append(S),h=null}return c}let vr=null,yr=null,Wr=!1,Ch=!1,wd=0;const Ev={characterData:!0,childList:!0,subtree:!0};function al(){return Wr||vr!==null&&vr._readOnly}function Or(){if(Wr)throw Error("Cannot use method in read-only mode.")}function Cv(){if(wd>99)throw Error("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function di(){if(vr===null)throw Error("Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read().");return vr}function $n(){if(yr===null)throw Error("Unable to find an active editor. This method can only be used synchronously during the callback of editor.update().");return yr}function r1(){return yr}function wv(g,c,h){const E=c.__type,S=_c(g,E);let $=h.get(E);$===void 0&&($=Array.from(S.transforms),h.set(E,$));const G=$.length;for(let K=0;K<G&&($[K](c),!!c.isAttached());K++);}function Tv(g,c){return g!==void 0&&g.__key!==c&&g.isAttached()}function o1(g,c){const h=c._dirtyLeaves,E=g._nodeMap;for(const S of h){const $=E.get(S);St($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&kr($)}}function i1(g,c){const h=c._dirtyLeaves,E=c._dirtyElements,S=g._nodeMap,$=Yr(),G=new Map;let K=h,be=K.size,ve=E,Ne=ve.size;for(;be>0||Ne>0;){if(be>0){c._dirtyLeaves=new Set;for(const we of K){const Ae=S.get(we);St(Ae)&&Ae.isAttached()&&Ae.isSimpleText()&&!Ae.isUnmergeable()&&kr(Ae),Ae!==void 0&&Tv(Ae,$)&&wv(c,Ae,G),h.add(we)}if(K=c._dirtyLeaves,be=K.size,be>0){wd++;continue}}c._dirtyLeaves=new Set,c._dirtyElements=new Map;for(const we of ve){const Ae=we[0],Te=we[1];if(Ae!=="root"&&!Te)continue;const He=S.get(Ae);He!==void 0&&Tv(He,$)&&wv(c,He,G),E.set(Ae,Te)}K=c._dirtyLeaves,be=K.size,ve=c._dirtyElements,Ne=ve.size,wd++}c._dirtyLeaves=h,c._dirtyElements=E}function a1(g){return wh(g,$n()._nodes)}function wh(g,c){const h=g.type,E=c.get(h);if(E===void 0)throw Error(`parseEditorState: type "${h}" + not found`);const S=E.klass;if(g.type!==S.getType())throw Error(`LexicalNode: Node ${S.name} does not implement .importJSON().`);const $=S.importJSON(g),G=g.children;if(rt($)&&Array.isArray(G))for(let K=0;K<G.length;K++){const be=G[K],ve=wh(be,c);$.append(ve)}return $}function s1(g,c,h){const E=Nh(),S=vr,$=Wr,G=yr,K=c._dirtyElements,be=c._dirtyLeaves,ve=c._cloneNotNeeded,Ne=c._dirtyType;c._dirtyElements=new Map,c._dirtyLeaves=new Set,c._cloneNotNeeded=new Set,c._dirtyType=0,vr=E,Wr=!1,yr=c;try{const we=c._nodes,Ae=g.root;wh(Ae,we),h&&h(),E._readOnly=!0,Sv(E)}catch(we){we instanceof Error&&c._onError(we)}finally{c._dirtyElements=K,c._dirtyLeaves=be,c._cloneNotNeeded=ve,c._dirtyType=Ne,vr=S,Wr=$,yr=G}return E}function Nv(g,c){const h=vr,E=Wr,S=yr;vr=g,Wr=!0,yr=null;try{return c()}finally{vr=h,Wr=E,yr=S}}function Sv(g){const c=g._nodeMap;c.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},c.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},c.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function ds(g,c){const h=g._pendingEditorState,E=g._rootElement,S=g._headless||E===null;if(h===null)return;const $=g._editorState,G=$._selection,K=h._selection,be=g._dirtyType!==st,ve=vr,Ne=Wr,we=yr,Ae=g._updating,Te=g._observer;let He=null;if(g._pendingEditorState=null,g._editorState=h,!S&&be&&Te!==null){yr=g,vr=h,Wr=!1,g._updating=!0;try{const Zt=g._dirtyType,Ft=g._dirtyElements,Jt=g._dirtyLeaves;Te.disconnect(),He=pd($,h,g,Zt,Ft,Jt)}catch(Zt){if(Zt instanceof Error&&g._onError(Zt),!Ch)kv(g,null,E,h),xr(g),g._dirtyType=Ct,Ch=!0,ds(g,$),Ch=!1;else throw Zt;return}finally{Te.observe(E,Ev),g._updating=Ae,vr=ve,Wr=Ne,yr=we}}h._readOnly||(h._readOnly=!0,Sv(h),Tt(K)&&(Object.freeze(K.anchor),Object.freeze(K.focus)),Object.freeze(K));const Le=g._dirtyLeaves,Je=g._dirtyElements,ft=g._normalizedNodes,Ye=g._updateTags,Lt=g._deferred;be&&(g._dirtyType=st,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements=new Map,g._normalizedNodes=new Set,g._updateTags=new Set),dd(g,h);const zt=S?null:Fr(g._window);if(g._editable&&zt!==null&&(be||K===null||K.dirty)){yr=g,vr=h;try{if(Te!==null&&Te.disconnect(),be||K===null||K.dirty){const Zt=g._blockCursorElement;Zt!==null&&fa(Zt,g,E),QS(G,K,g,zt,Ye,E)}It(g,E,K),Te!==null&&Te.observe(E,Ev)}finally{yr=we,vr=ve}}He!==null&&c1(g,He,Ye,Le,$),!Tt(K)&&K!==null&&(G===null||!G.is(K))&&g.dispatchCommand(t,void 0);const Pt=g._pendingDecorators;Pt!==null&&(g._decorators=Pt,g._pendingDecorators=null,Xc("decorator",g,!0,Pt)),l1(g,c||$,h),Xc("update",g,!0,{dirtyElements:Je,dirtyLeaves:Le,editorState:h,normalizedNodes:ft,prevEditorState:c||$,tags:Ye}),d1(g,Lt),u1(g)}function l1(g,c,h){const E=Ls(c),S=Ls(h);E!==S&&Xc("textcontent",g,!0,S)}function c1(g,c,h,E,S){const $=Array.from(g._listeners.mutation),G=$.length;for(let K=0;K<G;K++){const[be,ve]=$[K],Ne=c.get(ve);Ne!==void 0&&be(Ne,{dirtyLeaves:E,prevEditorState:S,updateTags:h})}}function Xc(g,c,h,...E){const S=c._updating;c._updating=h;try{const $=Array.from(c._listeners[g]);for(let G=0;G<$.length;G++)$[G].apply(null,E)}finally{c._updating=S}}function Ov(g,c,h){if(g._updating===!1||yr!==g){let S=!1;return g.update(()=>{S=Ov(g,c,h)}),S}const E=js(g);for(let S=4;S>=0;S--)for(let $=0;$<E.length;$++){const G=E[$]._commands.get(c);if(G!==void 0){const K=G[S];if(K!==void 0){const be=Array.from(K),ve=be.length;for(let Ne=0;Ne<ve;Ne++)if(be[Ne](h,g)===!0)return!0}}}return!1}function u1(g){const c=g._updates;if(c.length!==0){const h=c.shift();if(h){const[E,S]=h;Rv(g,E,S)}}}function d1(g,c){if(g._deferred=[],c.length!==0){const h=g._updating;g._updating=!0;try{for(let E=0;E<c.length;E++)c[E]()}finally{g._updating=h}}}function Av(g,c){const h=g._updates;let E=c||!1;for(;h.length!==0;){const S=h.shift();if(S){const[$,G]=S;let K,be;G!==void 0&&(K=G.onUpdate,be=G.tag,G.skipTransforms&&(E=!0),K&&g._deferred.push(K),be&&g._updateTags.add(be)),$()}}return E}function Rv(g,c,h){const E=g._updateTags;let S,$,G=!1,K=!1;h!==void 0&&(S=h.onUpdate,$=h.tag,$!=null&&E.add($),G=h.skipTransforms||!1,K=h.discrete||!1),S&&g._deferred.push(S);const be=g._editorState;let ve=g._pendingEditorState,Ne=!1;(ve===null||ve._readOnly)&&(ve=g._pendingEditorState=p1(ve||be),Ne=!0),ve._flushSync=K;const we=vr,Ae=Wr,Te=yr,He=g._updating;vr=ve,Wr=!1,g._updating=!0,yr=g;try{Ne&&(g._headless?be._selection!=null&&(ve._selection=be._selection.clone()):ve._selection=JS(g));const Le=g._compositionKey;c(),G=Av(g,G),XS(ve,g),g._dirtyType!==st&&(G?o1(ve,g):i1(ve,g),Av(g),fd(be,ve,g._dirtyLeaves,g._dirtyElements));const Je=g._compositionKey;Le!==Je&&(ve._flushSync=!0);const ft=ve._selection;if(Tt(ft)){const Ye=ve._nodeMap,Lt=ft.anchor.key,zt=ft.focus.key;if(Ye.get(Lt)===void 0||Ye.get(zt)===void 0)throw Error("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else mr(ft)&&ft._nodes.size===0&&(ve._selection=null)}catch(Le){Le instanceof Error&&g._onError(Le),g._pendingEditorState=be,g._dirtyType=Ct,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements.clear(),ds(g);return}finally{vr=we,Wr=Ae,yr=Te,g._updating=He,wd=0}g._dirtyType!==st||h1(ve,g)?ve._flushSync?(ve._flushSync=!1,ds(g)):Ne&&co(()=>{ds(g)}):(ve._flushSync=!1,Ne&&(E.clear(),g._deferred=[],g._pendingEditorState=null))}function Qr(g,c,h){g._updating?g._updates.push([c,h]):Rv(g,c,h)}class Th extends $t{constructor(c){super(c)}decorate(c,h){throw Error("decorate: base method not extended")}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function zn(g){return g instanceof Th}class fs extends $t{constructor(c){super(c),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const c=this.getFormat();return lo[c]||""}getIndent(){return this.getLatest().__indent}getChildren(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getChildrenKeys(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h.__key),h=h.getNextSibling();return c}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const c=$n()._dirtyElements;return c!==null&&c.has(this.__key)}isLastChild(){const c=this.getLatest(),h=this.getParentOrThrow().getLastChild();return h!==null&&h.is(c)}getAllTextNodes(){const c=[];let h=this.getFirstChild();for(;h!==null;){if(St(h)&&c.push(h),rt(h)){const E=h.getAllTextNodes();c.push(...E)}h=h.getNextSibling()}return c}getFirstDescendant(){let c=this.getFirstChild();for(;c!==null;){if(rt(c)){const h=c.getFirstChild();if(h!==null){c=h;continue}}break}return c}getLastDescendant(){let c=this.getLastChild();for(;c!==null;){if(rt(c)){const h=c.getLastChild();if(h!==null){c=h;continue}}break}return c}getDescendantByIndex(c){const h=this.getChildren(),E=h.length;if(c>=E){const $=h[E-1];return rt($)&&$.getLastDescendant()||$||null}const S=h[c];return rt(S)&&S.getFirstDescendant()||S||null}getFirstChild(){const c=this.getLatest().__first;return c===null?null:Fn(c)}getFirstChildOrThrow(){const c=this.getFirstChild();if(c===null)throw Error(`Expected node ${this.__key} to have a first child.`);return c}getLastChild(){const c=this.getLatest().__last;return c===null?null:Fn(c)}getLastChildOrThrow(){const c=this.getLastChild();if(c===null)throw Error(`Expected node ${this.__key} to have a last child.`);return c}getChildAtIndex(c){const h=this.getChildrenSize();let E,S;if(c<h/2){for(E=this.getFirstChild(),S=0;E!==null&&S<=c;){if(S===c)return E;E=E.getNextSibling(),S++}return null}for(E=this.getLastChild(),S=h-1;E!==null&&S>=c;){if(S===c)return E;E=E.getPreviousSibling(),S--}return null}getTextContent(){let c="";const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContent(),rt($)&&S!==E-1&&!$.isInline()&&(c+=Gt)}return c}getTextContentSize(){let c=0;const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContentSize(),rt($)&&S!==E-1&&!$.isInline()&&(c+=Gt.length)}return c}getDirection(){return this.getLatest().__dir}hasFormat(c){if(c!==""){const h=_r[c];return(this.getFormat()&h)!==0}return!1}select(c,h){Or();const E=_n();let S=c,$=h;const G=this.getChildrenSize();if(!this.canBeEmpty()){if(c===0&&h===0){const be=this.getFirstChild();if(St(be)||rt(be))return be.select(0,0)}else if((c===void 0||c===G)&&(h===void 0||h===G)){const be=this.getLastChild();if(St(be)||rt(be))return be.select()}}S===void 0&&(S=G),$===void 0&&($=G);const K=this.__key;if(Tt(E))E.anchor.set(K,S,"element"),E.focus.set(K,$,"element"),E.dirty=!0;else return vv(K,S,K,$,"element","element");return E}selectStart(){const c=this.getFirstDescendant();return c?c.selectStart():this.select()}selectEnd(){const c=this.getLastDescendant();return c?c.selectEnd():this.select()}clear(){const c=this.getWritable();return this.getChildren().forEach(h=>h.remove()),c}append(...c){return this.splice(this.getChildrenSize(),0,c)}setDirection(c){const h=this.getWritable();return h.__dir=c,h}setFormat(c){const h=this.getWritable();return h.__format=c!==""?_r[c]:0,this}setIndent(c){const h=this.getWritable();return h.__indent=c,this}splice(c,h,E){const S=E.length,$=this.getChildrenSize(),G=this.getWritable(),K=G.__key,be=[],ve=[],Ne=this.getChildAtIndex(c+h);let we=null,Ae=$-h+S;if(c!==0)if(c===$)we=this.getLastChild();else{const He=this.getChildAtIndex(c);He!==null&&(we=He.getPreviousSibling())}if(h>0){let He=we===null?this.getFirstChild():we.getNextSibling();for(let Le=0;Le<h;Le++){if(He===null)throw Error("splice: sibling not found");const Je=He.getNextSibling(),ft=He.__key,Ye=He.getWritable();Vr(Ye),ve.push(ft),He=Je}}let Te=we;for(let He=0;He<S;He++){const Le=E[He];Te!==null&&Le.is(Te)&&(we=Te=Te.getPreviousSibling());const Je=Le.getWritable();Je.__parent===K&&Ae--,Vr(Je);const ft=Le.__key;if(Te===null)G.__first=ft,Je.__prev=null;else{const Ye=Te.getWritable();Ye.__next=ft,Je.__prev=Ye.__key}if(Le.__key===K)throw Error("append: attempting to append self");Je.__parent=K,be.push(ft),Te=Le}if(c+h===$){if(Te!==null){const He=Te.getWritable();He.__next=null,G.__last=Te.__key}}else if(Ne!==null){const He=Ne.getWritable();if(Te!==null){const Le=Te.getWritable();He.__prev=Te.__key,Le.__next=Ne.__key}else He.__prev=null}if(G.__size=Ae,ve.length){const He=_n();if(Tt(He)){const Le=new Set(ve),Je=new Set(be),{anchor:ft,focus:Ye}=He;$v(ft,Le,Je)&&Cd(ft,ft.getNode(),this,we,Ne),$v(Ye,Le,Je)&&Cd(Ye,Ye.getNode(),this,we,Ne),Ae===0&&!this.canBeEmpty()&&!tr(this)&&this.remove()}}return G}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(c,h){return null}canIndent(){return!0}collapseAtStart(c){return!1}excludeFromCopy(c){return!1}canExtractContents(){return!0}canReplaceWith(c){return!0}canInsertAfter(c){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(c){return!1}extractWithChild(c,h,E){return!1}}function rt(g){return g instanceof fs}function $v(g,c,h){let E=g.getNode();for(;E;){const S=E.__key;if(c.has(S)&&!h.has(S))return!0;E=E.getParent()}return!1}class sl extends fs{static getType(){return"root"}static clone(){return new sl}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){throw Error("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const c=this.__cachedText;return(al()||$n()._dirtyType===st)&&c!==null?c:super.getTextContent()}remove(){throw Error("remove: cannot be called on root nodes")}replace(c){throw Error("replace: cannot be called on root nodes")}insertBefore(c){throw Error("insertBefore: cannot be called on root nodes")}insertAfter(c){throw Error("insertAfter: cannot be called on root nodes")}updateDOM(c,h){return!1}append(...c){for(let h=0;h<c.length;h++){const E=c[h];if(!rt(E)&&!zn(E))throw Error("rootNode.append: Only element or decorator nodes can be appended to the root node")}return super.append(...c)}static importJSON(c){const h=hr();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function f1(){return new sl}function eo(g){return g instanceof sl}function h1(g,c){const h=c.getEditorState()._selection,E=g._selection;if(E!==null){if(E.dirty||!E.is(h))return!0}else if(h!==null)return!0;return!1}function p1(g){return new Td(new Map(g._nodeMap))}function Nh(){return new Td(new Map([["root",f1()]]))}function Dv(g){const c=g.exportJSON(),h=g.constructor;if(c.type!==h.getType())throw Error(`LexicalNode: Node ${h.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`);const E=c.children;if(rt(g)){if(!Array.isArray(E))throw Error(`LexicalNode: Node ${h.name} is an element but .exportJSON() does not have a children array.`);const S=g.getChildren();for(let $=0;$<S.length;$++){const G=S[$],K=Dv(G);E.push(K)}}return c}class Td{constructor(c,h){this._nodeMap=c,this._selection=h||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(c){return Nv(this,c)}clone(c){const h=new Td(this._nodeMap,c===void 0?this._selection:c);return h._readOnly=!0,h}toJSON(){return Nv(this,()=>({root:Dv(hr())}))}}class ll extends fs{static getType(){return"paragraph"}static clone(c){return new ll(c.__key)}createDOM(c){const h=document.createElement("p"),E=$i(c.theme,"paragraph");return E!==void 0&&h.classList.add(...E),h}updateDOM(c,h,E){return!1}static importDOM(){return{p:c=>({conversion:g1,priority:0})}}exportDOM(c){const{element:h}=super.exportDOM(c);if(h&&oi(h)){this.isEmpty()&&h.append(document.createElement("br"));const E=this.getFormatType();h.style.textAlign=E;const S=this.getDirection();S&&(h.dir=S);const $=this.getIndent();$>0&&(h.style.textIndent=`${$*20}px`)}return{element:h}}static importJSON(c){const h=Bi();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(c,h){const E=Bi(),S=this.getDirection();return E.setDirection(S),this.insertAfter(E,h),E}collapseAtStart(){const c=this.getChildren();if(c.length===0||St(c[0])&&c[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function g1(g){const c=Bi();if(g.style){c.setFormat(g.style.textAlign);const h=parseInt(g.style.textIndent,10)/20;h>0&&c.setIndent(h)}return{node:c}}function Bi(){return da(new ll)}function m1(g){return g instanceof ll}const v1=0,y1=1,b1=2,_1=3,x1=4;function kv(g,c,h,E){const S=g._keyToDOMMap;S.clear(),g._editorState=Nh(),g._pendingEditorState=E,g._compositionKey=null,g._dirtyType=st,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements.clear(),g._normalizedNodes=new Set,g._updateTags=new Set,g._updates=[],g._blockCursorElement=null;const $=g._observer;$!==null&&($.disconnect(),g._observer=null),c!==null&&(c.textContent=""),h!==null&&(h.textContent="",S.set("root",h))}function E1(g,c){const h=new Map,E=new Set,S=$=>{Object.keys($).forEach(G=>{let K=h.get(G);K===void 0&&(K=[],h.set(G,K)),K.push($[G])})};return g.forEach($=>{const G=$.klass.importDOM!=null?$.klass.importDOM.bind($.klass):null;if(G==null||E.has(G))return;E.add(G);const K=G();K!==null&&S(K)}),c&&S(c),h}function C1(g){const c=g||{},h=r1(),E=c.theme||{},S=g===void 0?h:c.parentEditor||null,$=c.disableEvents||!1,G=Nh(),K=c.namespace||(S!==null?S._config.namespace:Nc()),be=c.editorState,ve=[sl,li,Xn,ci,ll,...c.nodes||[]],{onError:Ne,html:we}=c,Ae=c.editable!==void 0?c.editable:!0;let Te;if(g===void 0&&h!==null)Te=h._nodes;else{Te=new Map;for(let Le=0;Le<ve.length;Le++){let Je=ve[Le],ft=null,Ye=null;if(typeof Je!="function"){const Zt=Je;Je=Zt.replace,ft=Zt.with,Ye=Zt.withKlass||null}{const Zt=Je.name;if(Zt!=="RootNode"){const Ft=Je.prototype;["getType","clone"].forEach(Jt=>{Je.hasOwnProperty(Jt)||console.warn(`${Zt} must implement static "${Jt}" method`)}),!Je.hasOwnProperty("importDOM")&&Je.hasOwnProperty("exportDOM")&&console.warn(`${Zt} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),Ft instanceof Th&&(Ft.hasOwnProperty("decorate")||console.warn(`${Ft.constructor.name} must implement "decorate" method`)),Je.hasOwnProperty("importJSON")||console.warn(`${Zt} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),Ft.hasOwnProperty("exportJSON")||console.warn(`${Zt} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}const Lt=Je.getType(),zt=Je.transform(),Pt=new Set;zt!==null&&Pt.add(zt),Te.set(Lt,{exportDOM:we&&we.export?we.export.get(Je):void 0,klass:Je,replace:ft,replaceWithKlass:Ye,transforms:Pt})}}const He=new w1(G,S,Te,{disableEvents:$,namespace:K,theme:E},Ne||console.error,E1(Te,we?we.import:void 0),Ae);return be!==void 0&&(He._pendingEditorState=be,He._dirtyType=Ct),He}class w1{constructor(c,h,E,S,$,G,K){this._parentEditor=h,this._rootElement=null,this._editorState=c,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=S,this._nodes=E,this._decorators={},this._pendingDecorators=null,this._dirtyType=st,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Nc(),this._onError=$,this._htmlConversions=G,this._editable=K,this._headless=h!==null&&h._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(c){const h=this._listeners.update;return h.add(c),()=>{h.delete(c)}}registerEditableListener(c){const h=this._listeners.editable;return h.add(c),()=>{h.delete(c)}}registerDecoratorListener(c){const h=this._listeners.decorator;return h.add(c),()=>{h.delete(c)}}registerTextContentListener(c){const h=this._listeners.textcontent;return h.add(c),()=>{h.delete(c)}}registerRootListener(c){const h=this._listeners.root;return c(this._rootElement,null),h.add(c),()=>{c(null,this._rootElement),h.delete(c)}}registerCommand(c,h,E){if(E===void 0)throw Error('Listener for type "command" requires a "priority".');const S=this._commands;S.has(c)||S.set(c,[new Set,new Set,new Set,new Set,new Set]);const $=S.get(c);if($===void 0)throw Error(`registerCommand: Command ${String(c)} not found in command map`);const G=$[E];return G.add(h),()=>{G.delete(h),$.every(K=>K.size===0)&&S.delete(c)}}registerMutationListener(c,h){if(this._nodes.get(c.getType())===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);const E=this._listeners.mutation;return E.set(h,c),()=>{E.delete(h)}}registerNodeTransformToKlass(c,h){const E=c.getType(),S=this._nodes.get(E);if(S===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);return S.transforms.add(h),S}registerNodeTransform(c,h){const E=this.registerNodeTransformToKlass(c,h),S=[E],$=E.replaceWithKlass;if($!=null){const G=this.registerNodeTransformToKlass($,h);S.push(G)}return Ga(this,c.getType()),()=>{S.forEach(G=>G.transforms.delete(h))}}hasNode(c){return this._nodes.has(c.getType())}hasNodes(c){return c.every(this.hasNode.bind(this))}dispatchCommand(c,h){return mt(this,c,h)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(c){const h=this._rootElement;if(c!==h){const E=$i(this._config.theme,"root"),S=this._pendingEditorState||this._editorState;if(this._rootElement=c,kv(this,h,c,S),h!==null&&(this._config.disableEvents||Ze(h),E!=null&&h.classList.remove(...E)),c!==null){const $=Nt(c),G=c.style;G.userSelect="text",G.whiteSpace="pre-wrap",G.wordBreak="break-word",c.setAttribute("data-lexical-editor","true"),this._window=$,this._dirtyType=Ct,xr(this),this._updateTags.add("history-merge"),ds(this),this._config.disableEvents||Ve(c,this),E!=null&&c.classList.add(...E)}else this._editorState=S,this._pendingEditorState=null,this._window=null;Xc("root",this,!1,c,h)}}getElementByKey(c){return this._keyToDOMMap.get(c)||null}getEditorState(){return this._editorState}setEditorState(c,h){if(c.isEmpty())throw Error("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");mn(this);const E=this._pendingEditorState,S=this._updateTags,$=h!==void 0?h.tag:null;E!==null&&!E.isEmpty()&&($!=null&&S.add($),ds(this)),this._pendingEditorState=c,this._dirtyType=Ct,this._dirtyElements.set("root",!1),this._compositionKey=null,$!=null&&S.add($),ds(this)}parseEditorState(c,h){const E=typeof c=="string"?JSON.parse(c):c;return s1(E,this,h)}update(c,h){Qr(this,c,h)}focus(c,h={}){const E=this._rootElement;E!==null&&(E.setAttribute("autocapitalize","off"),Qr(this,()=>{const S=_n(),$=hr();S!==null?S.dirty=!0:$.getChildrenSize()!==0&&(h.defaultSelection==="rootStart"?$.selectStart():$.selectEnd())},{onUpdate:()=>{E.removeAttribute("autocapitalize"),c&&c()},tag:"focus"}),this._pendingEditorState===null&&E.removeAttribute("autocapitalize"))}blur(){const c=this._rootElement;c!==null&&c.blur();const h=Fr(this._window);h!==null&&h.removeAllRanges()}isEditable(){return this._editable}setEditable(c){this._editable!==c&&(this._editable=c,Xc("editable",this,!0,c))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Sh extends fs{constructor(c,h){super(h),this.__colSpan=c,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(c){return this.getWritable().__colSpan=c,this}getRowSpan(){return this.__rowSpan}setRowSpan(c){return this.getWritable().__rowSpan=c,this}}function go(g){return g instanceof Sh}class Mv extends fs{}function Oh(g){return g instanceof Mv}class Pv extends fs{}function Qc(g){return g instanceof Pv}return Ke.$INTERNAL_isPointSelection=or,Ke.$addUpdateTag=vh,Ke.$applyNodeReplacement=da,Ke.$copyNode=Ks,Ke.$createLineBreakNode=Sr,Ke.$createNodeSelection=_h,Ke.$createParagraphNode=Bi,Ke.$createRangeSelection=qS,Ke.$createTabNode=wa,Ke.$createTextNode=Un,Ke.$getAdjacentNode=ua,Ke.$getNearestNodeFromDOMNode=qr,Ke.$getNearestRootOrShadowRoot=Pc,Ke.$getNodeByKey=Fn,Ke.$getPreviousSelection=il,Ke.$getRoot=hr,Ke.$getSelection=_n,Ke.$getTextContent=t1,Ke.$hasAncestor=jn,Ke.$hasUpdateTag=cd,Ke.$insertNodes=e1,Ke.$isBlockElementNode=YS,Ke.$isDecoratorNode=zn,Ke.$isElementNode=rt,Ke.$isInlineElementOrDecoratorNode=Gs,Ke.$isLeafNode=Co,Ke.$isLineBreakNode=Ro,Ke.$isNodeSelection=mr,Ke.$isParagraphNode=m1,Ke.$isRangeSelection=Tt,Ke.$isRootNode=eo,Ke.$isRootOrShadowRoot=tr,Ke.$isTabNode=us,Ke.$isTextNode=St,Ke.$nodesOfType=Mc,Ke.$normalizeSelection__EXPERIMENTAL=ia,Ke.$parseSerializedNode=a1,Ke.$selectAll=Ri,Ke.$setCompositionKey=Mn,Ke.$setSelection=pr,Ke.$splitNode=Ic,Ke.BLUR_COMMAND=q,Ke.CAN_REDO_COMMAND=w,Ke.CAN_UNDO_COMMAND=N,Ke.CLEAR_EDITOR_COMMAND=X,Ke.CLEAR_HISTORY_COMMAND=F,Ke.CLICK_COMMAND=n,Ke.COMMAND_PRIORITY_CRITICAL=x1,Ke.COMMAND_PRIORITY_EDITOR=v1,Ke.COMMAND_PRIORITY_HIGH=_1,Ke.COMMAND_PRIORITY_LOW=y1,Ke.COMMAND_PRIORITY_NORMAL=b1,Ke.CONTROLLED_TEXT_INSERTION_COMMAND=a,Ke.COPY_COMMAND=ne,Ke.CUT_COMMAND=B,Ke.DELETE_CHARACTER_COMMAND=r,Ke.DELETE_LINE_COMMAND=m,Ke.DELETE_WORD_COMMAND=p,Ke.DEPRECATED_$computeGridMap=_v,Ke.DEPRECATED_$createGridSelection=ZS,Ke.DEPRECATED_$getGridCellNodeRect=Br,Ke.DEPRECATED_$getNodeTriplet=xv,Ke.DEPRECATED_$isGridCellNode=go,Ke.DEPRECATED_$isGridNode=Oh,Ke.DEPRECATED_$isGridRowNode=Qc,Ke.DEPRECATED_$isGridSelection=Pr,Ke.DEPRECATED_GridCellNode=Sh,Ke.DEPRECATED_GridNode=Mv,Ke.DEPRECATED_GridRowNode=Pv,Ke.DRAGEND_COMMAND=ee,Ke.DRAGOVER_COMMAND=j,Ke.DRAGSTART_COMMAND=Y,Ke.DROP_COMMAND=te,Ke.DecoratorNode=Th,Ke.ElementNode=fs,Ke.FOCUS_COMMAND=I,Ke.FORMAT_ELEMENT_COMMAND=he,Ke.FORMAT_TEXT_COMMAND=_,Ke.INDENT_CONTENT_COMMAND=de,Ke.INSERT_LINE_BREAK_COMMAND=o,Ke.INSERT_PARAGRAPH_COMMAND=i,Ke.INSERT_TAB_COMMAND=Q,Ke.KEY_ARROW_DOWN_COMMAND=P,Ke.KEY_ARROW_LEFT_COMMAND=O,Ke.KEY_ARROW_RIGHT_COMMAND=y,Ke.KEY_ARROW_UP_COMMAND=D,Ke.KEY_BACKSPACE_COMMAND=J,Ke.KEY_DELETE_COMMAND=Z,Ke.KEY_DOWN_COMMAND=v,Ke.KEY_ENTER_COMMAND=M,Ke.KEY_ESCAPE_COMMAND=oe,Ke.KEY_MODIFIER_COMMAND=ue,Ke.KEY_SPACE_COMMAND=V,Ke.KEY_TAB_COMMAND=U,Ke.LineBreakNode=Xn,Ke.MOVE_TO_END=T,Ke.MOVE_TO_START=A,Ke.OUTDENT_CONTENT_COMMAND=pe,Ke.PASTE_COMMAND=l,Ke.ParagraphNode=ll,Ke.REDO_COMMAND=b,Ke.REMOVE_TEXT_COMMAND=u,Ke.RootNode=sl,Ke.SELECTION_CHANGE_COMMAND=t,Ke.SELECT_ALL_COMMAND=W,Ke.TabNode=ci,Ke.TextNode=li,Ke.UNDO_COMMAND=C,Ke.createCommand=e,Ke.createEditor=C1,Ke.getNearestEditorFromDOMNode=Ti,Ke.isHTMLAnchorElement=ki,Ke.isHTMLElement=oi,Ke.isSelectionCapturedInDecoratorInput=xc,Ke.isSelectionWithinEditor=ei,Ke}var Ue={},iy;function RO(){if(iy)return Ue;iy=1;let e={},t={},n={},r={},o={},i={},a={},l={},u={},p={},m={},_={},C={},b={},v={},y={},T={},O={},A={},D={},P={},M={},V={},J={},oe={},Z={},U={},Q={},de={},pe={},te={},he={},Y={},j={},ee={},ne={};function B(f){let s=new URLSearchParams;s.append("code",f);for(let d=1;d<arguments.length;d++)s.append("v",arguments[d]);throw Error(`Minified Lexical error #${f}; visit https://lexical.dev/docs/error?${s} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let W=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",X=W&&"documentMode"in document?document.documentMode:null,F=W&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),w=W&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),N=W&&"InputEvent"in window&&!X?"getTargetRanges"in new window.InputEvent("input"):!1,I=W&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),q=W&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ue=W&&/Android/.test(navigator.userAgent),fe=W&&/^(?=.*Chrome).*/i.test(navigator.userAgent),se=W&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!fe,Ce=I||q||se?" ":"",Oe=w?" ":Ce,Be=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,ce=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,le={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},ye={directionless:1,unmergeable:2},Me={center:2,end:6,justify:4,left:1,right:3,start:5},Pe={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},We={normal:0,segmented:2,token:1},Xe={0:"normal",2:"segmented",1:"token"},st=!1,dt=0;function Ct(f){dt=f.timeStamp}function Se(f,s,d){return s.__lexicalLineBreak===f||f[`__lexicalKey_${d._key}`]!==void 0}function me(f){return f.getEditorState().read(()=>{let s=hn();return s!==null?s.clone():null})}function _e(f,s,d){st=!0;let x=100<performance.now()-dt;try{Mr(f,()=>{let R=hn()||me(f);var k=new Map,z=f.getRootElement(),ie=f._editorState,xe=f._blockCursorElement;let Re=!1,Ve="";for(var Ze=0;Ze<s.length;Ze++){var Ge=s[Ze],Ie=Ge.type,it=Ge.target,yt=Cr(it,ie);if(!(yt===null&&it!==z||on(yt))){if(Ie==="characterData"){if(Ge=x&&Nt(yt))e:{Ge=R,Ie=it;var $t=yt;if(It(Ge)){var Ut=Ge.anchor.getNode();if(Ut.is($t)&&Ge.format!==Ut.getFormat()){Ge=!1;break e}}Ge=Ie.nodeType===3&&$t.isAttached()}Ge&&($t=co(f._window),Ie=Ge=null,$t!==null&&$t.anchorNode===it&&(Ge=$t.anchorOffset,Ie=$t.focusOffset),it=it.nodeValue,it!==null&&je(yt,it,Ge,Ie,!1))}else if(Ie==="childList"){for(Re=!0,Ie=Ge.addedNodes,$t=0;$t<Ie.length;$t++){Ut=Ie[$t];var Rn=dr(Ut),Xn=Ut.parentNode;Xn==null||Ut===xe||Rn!==null||Ut.nodeName==="BR"&&Se(Ut,Xn,f)||(w&&(Rn=Ut.innerText||Ut.nodeValue)&&(Ve+=Rn),Xn.removeChild(Ut))}if(Ge=Ge.removedNodes,Ie=Ge.length,0<Ie){for($t=0,Ut=0;Ut<Ie;Ut++)Xn=Ge[Ut],(Xn.nodeName==="BR"&&Se(Xn,it,f)||xe===Xn)&&(it.appendChild(Xn),$t++);Ie!==$t&&(it===z&&(yt=ie._nodeMap.get("root")),k.set(it,yt))}}}}if(0<k.size)for(let[ls,Sr]of k)if(nt(Sr))for(k=Sr.getChildrenKeys(),z=ls.firstChild,ie=0;ie<k.length;ie++)xe=f.getElementByKey(k[ie]),xe!==null&&(z==null?(ls.appendChild(xe),z=xe):z!==xe&&ls.replaceChild(xe,z),z=z.nextSibling);else Nt(Sr)&&Sr.markDirty();if(k=d.takeRecords(),0<k.length){for(z=0;z<k.length;z++)for(xe=k[z],ie=xe.addedNodes,xe=xe.target,Ze=0;Ze<ie.length;Ze++)yt=ie[Ze],it=yt.parentNode,it==null||yt.nodeName!=="BR"||Se(yt,xe,f)||it.removeChild(yt);d.takeRecords()}R!==null&&(Re&&(R.dirty=!0,_r(R)),w&&Kt(f)&&R.insertRawText(Ve))})}finally{st=!1}}function De(f){let s=f._observer;if(s!==null){let d=s.takeRecords();_e(f,d,s)}}function Fe(f){dt===0&&wn(f).addEventListener("textInput",Ct,!0),f._observer=new MutationObserver((s,d)=>{_e(f,s,d)})}function ke(f,s){let d=f.__mode,x=f.__format;f=f.__style;let R=s.__mode,k=s.__format;return s=s.__style,(d===null||d===R)&&(x===null||x===k)&&(f===null||f===s)}function ze(f,s){let d=f.mergeWithSibling(s),x=bn()._normalizedNodes;return x.add(f.__key),x.add(s.__key),d}function tt(f){if(f.__text===""&&f.isSimpleText()&&!f.isUnmergeable())f.remove();else{for(var s;(s=f.getPreviousSibling())!==null&&Nt(s)&&s.isSimpleText()&&!s.isUnmergeable();)if(s.__text==="")s.remove();else{ke(s,f)&&(f=ze(s,f));break}for(var d;(d=f.getNextSibling())!==null&&Nt(d)&&d.isSimpleText()&&!d.isUnmergeable();)if(d.__text==="")d.remove();else{ke(f,d)&&ze(f,d);break}}}function ut(f){return Et(f.anchor),Et(f.focus),f}function Et(f){for(;f.type==="element";){var s=f.getNode(),d=f.offset;if(d===s.getChildrenSize()?(s=s.getChildAtIndex(d-1),d=!0):(s=s.getChildAtIndex(d),d=!1),Nt(s)){f.set(s.__key,d?s.getTextContentSize():0,"text");break}else if(!nt(s))break;f.set(s.__key,d?s.getChildrenSize():0,"element")}}let jt=1,Qe=typeof queueMicrotask=="function"?queueMicrotask:f=>{Promise.resolve().then(f)};function et(f){let s=document.activeElement;if(s===null)return!1;let d=s.nodeName;return on(Cr(f))&&(d==="INPUT"||d==="TEXTAREA"||s.contentEditable==="true"&&s.__lexicalEditor==null)}function lt(f,s,d){let x=f.getRootElement();try{return x!==null&&x.contains(s)&&x.contains(d)&&s!==null&&!et(s)&&wt(s)===f}catch{return!1}}function wt(f){for(;f!=null;){let s=f.__lexicalEditor;if(s!=null)return s;f=mn(f)}return null}function _t(f){return f.isToken()||f.isSegmented()}function Rt(f){for(;f!=null;){if(f.nodeType===3)return f;f=f.firstChild}return null}function qe(f,s,d){let x=le[s];return d!==null&&(f&x)===(d&x)||(f^=x,s==="subscript"?f&=~le.superscript:s==="superscript"&&(f&=~le.subscript)),f}function ot(f,s){if(s!=null)f.__key=s;else{nr(),99<ga&&B(14),s=bn();var d=Zr(),x=""+jt++;d._nodeMap.set(x,f),nt(f)?s._dirtyElements.set(x,!0):s._dirtyLeaves.add(x),s._cloneNotNeeded.add(x),s._dirtyType=1,f.__key=x}}function vt(f){var s=f.getParent();if(s!==null){let R=f.getWritable();s=s.getWritable();var d=f.getPreviousSibling();if(f=f.getNextSibling(),d===null)if(f!==null){var x=f.getWritable();s.__first=f.__key,x.__prev=null}else s.__first=null;else{if(x=d.getWritable(),f!==null){let k=f.getWritable();k.__prev=x.__key,x.__next=k.__key}else x.__next=null;R.__prev=null}f===null?d!==null?(f=d.getWritable(),s.__last=d.__key,f.__next=null):s.__last=null:(f=f.getWritable(),d!==null?(d=d.getWritable(),d.__next=f.__key,f.__prev=d.__key):f.__prev=null,R.__next=null),s.__size--,R.__parent=null}}function kt(f){99<ga&&B(14);var s=f.getLatest(),d=s.__parent,x=Zr();let R=bn(),k=x._nodeMap;if(x=R._dirtyElements,d!==null)e:for(;d!==null;){if(x.has(d))break e;let z=k.get(d);if(z===void 0)break;x.set(d,!1),d=z.__parent}s=s.__key,R._dirtyType=1,nt(f)?x.set(s,!0):R._dirtyLeaves.add(s)}function Dt(f){nr();var s=bn();let d=s._compositionKey;f!==d&&(s._compositionKey=f,d!==null&&(s=sn(d),s!==null&&s.getWritable()),f!==null&&(f=sn(f),f!==null&&f.getWritable()))}function Gt(){return ma()?null:bn()._compositionKey}function sn(f,s){return f=(s||Zr())._nodeMap.get(f),f===void 0?null:f}function dr(f,s){let d=bn();return f=f[`__lexicalKey_${d._key}`],f!==void 0?sn(f,s):null}function Cr(f,s){for(;f!=null;){let d=dr(f,s);if(d!==null)return d;f=mn(f)}return null}function Xo(f){let s=Object.assign({},f._decorators);return f._pendingDecorators=s}function ra(f){return f.read(()=>Zn().getTextContent())}function wr(f,s){Mr(f,()=>{var d=Zr();if(!d.isEmpty())if(s==="root")Zn().markDirty();else{d=d._nodeMap;for(let[,x]of d)x.markDirty()}},f._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Zn(){return Zr()._nodeMap.get("root")}function _r(f){nr();let s=Zr();f!==null&&(f.dirty=!0,f.setCachedNodes(null)),s._selection=f}function lo(f){var s=bn(),d;e:{for(d=f;d!=null;){let x=d[`__lexicalKey_${s._key}`];if(x!==void 0){d=x;break e}d=mn(d)}d=null}return d===null?(s=s.getRootElement(),f===s?sn("root"):null):sn(d)}function oa(f){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(f)}function Ee(f){let s=[];for(;f!==null;)s.push(f),f=f._parentEditor;return s}function ae(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function $e(f,s,d){if(s=co(s._window),s!==null){var x=s.anchorNode,{anchorOffset:R,focusOffset:k}=s;if(x!==null&&(s=x.nodeType===3?x.nodeValue:null,x=Cr(x),s!==null&&Nt(x))){if(s===Ce&&d){let z=d.length;s=d,k=R=z}s!==null&&je(x,s,R,k,f)}}}function je(f,s,d,x,R){let k=f;if(k.isAttached()&&(R||!k.isDirty())){let Re=k.isComposing(),Ve=s;if((Re||R)&&s[s.length-1]===Ce&&(Ve=s.slice(0,-1)),s=k.getTextContent(),R||Ve!==s)if(Ve==="")if(Dt(null),I||q||se)k.remove();else{let Ze=bn();setTimeout(()=>{Ze.update(()=>{k.isAttached()&&k.remove()})},20)}else{R=k.getParent(),s=ii();var z=k.getTextContentSize(),ie=Gt(),xe=k.getKey();k.isToken()||ie!==null&&xe===ie&&!Re||It(s)&&(R!==null&&!R.canInsertTextBefore()&&s.anchor.offset===0||s.anchor.key===f.__key&&s.anchor.offset===0&&!k.canInsertTextBefore()||s.focus.key===f.__key&&s.focus.offset===z&&!k.canInsertTextAfter())?k.markDirty():(f=hn(),It(f)&&d!==null&&x!==null&&(f.setTextNodeRange(k,d,k,x),k.isSegmented()&&(d=k.getTextContent(),d=jn(d),k.replace(d),k=d)),k.setTextContent(Ve))}}}function at(f,s){if(s.isSegmented())return!0;if(!f.isCollapsed())return!1;f=f.anchor.offset;let d=s.getParentOrThrow(),x=s.isToken();return f===0?((f=!s.canInsertTextBefore()||!d.canInsertTextBefore()||x)||(s=s.getPreviousSibling(),f=(Nt(s)||nt(s)&&s.isInline())&&!s.canInsertTextAfter()),f):f===s.getTextContentSize()?!s.canInsertTextAfter()||!d.canInsertTextAfter()||x:!1}function xt(f,s){f.__lexicalClassNameCache===void 0&&(f.__lexicalClassNameCache={});let d=f.__lexicalClassNameCache,x=d[s];return x!==void 0?x:(f=f[s],typeof f=="string"?(f=f.split(" "),d[s]=f):f)}function bt(f,s,d,x,R){d.size!==0&&(d=x.__type,x=x.__key,s=s.get(d),s===void 0&&B(33,d),d=s.klass,s=f.get(d),s===void 0&&(s=new Map,f.set(d,s)),f=s.get(x),d=f==="destroyed"&&R==="created",(f===void 0||d)&&s.set(x,d?"updated":R))}function ht(f,s,d){let x=f.getParent(),R=d;return x!==null&&(s&&d===0?(R=f.getIndexWithinParent(),f=x):s||d!==f.getChildrenSize()||(R=f.getIndexWithinParent()+1,f=x)),f.getChildAtIndex(s?R-1:R)}function At(f,s){var d=f.offset;return f.type==="element"?(f=f.getNode(),ht(f,s,d)):(f=f.getNode(),s&&d===0||!s&&d===f.getTextContentSize()?(d=s?f.getPreviousSibling():f.getNextSibling(),d===null?ht(f.getParentOrThrow(),s,f.getIndexWithinParent()+(s?0:1)):d):null)}function Kt(f){return f=(f=wn(f).event)&&f.inputType,f==="insertFromPaste"||f==="insertFromPasteAsQuotation"}function Mt(f){return!Nr(f)&&!f.isLastChild()&&!f.isInline()}function Yt(f,s){return f=f._keyToDOMMap.get(s),f===void 0&&B(75,s),f}function mn(f){return f=f.assignedSlot||f.parentElement,f!==null&&f.nodeType===11?f.host:f}function xr(f,s){for(f=f.getParent();f!==null;){if(f.is(s))return!0;f=f.getParent()}return!1}function wn(f){return f=f._window,f===null&&B(78),f}function Jn(f){for(f=f.getParentOrThrow();f!==null&&!kr(f);)f=f.getParentOrThrow();return f}function kr(f){return Nr(f)||nt(f)&&f.isShadowRoot()}function ia(f){return f=f.constructor.clone(f),ot(f,null),f}function Qo(f){var s=bn();let d=f.constructor.getType();return s=s._nodes.get(d),s===void 0&&B(97),s=s.replace,s!==null?(s=s(f),s instanceof f.constructor||B(98),s):f}function yc(f,s){f=f.getParent(),!Nr(f)||nt(s)||on(s)||B(99)}function bc(f){return(on(f)||nt(f)&&!f.canBeEmpty())&&!f.isInline()}function _c(f,s,d){d.style.removeProperty("caret-color"),s._blockCursorElement=null,s=f.parentElement,s!==null&&s.removeChild(f)}function co(f){return W?(f||window).getSelection():null}function Ms(f,s){for(;f!==Zn()&&f!=null;){if(s(f))return f;f=f.getParent()}return null}function xc(f){let s=[],d=[f];for(;0<d.length;){let x=d.pop();x===void 0&&B(112),nt(x)&&d.unshift(...x.getChildren()),x!==f&&s.push(x)}return s}function ei(f){return f.nodeType===1}function Ti(f){if(on(f)&&!f.isInline())return!0;if(!nt(f)||kr(f))return!1;var s=f.getFirstChild();return s=s===null||Ri(s)||Nt(s)||s.isInline(),!f.isInline()&&f.canBeEmpty()!==!1&&s}function Ec(f,s){for(;f!==null&&f.getParent()!==null&&!s(f);)f=f.getParentOrThrow();return s(f)?f:null}function Ps(f,s,d,x,R,k){for(f=f.getFirstChild();f!==null;){let z=f.__key;f.__parent===s&&(nt(f)&&Ps(f,z,d,x,R,k),d.has(z)||k.delete(z),R.push(z)),f=f.getNextSibling()}}function sh(f,s,d,x){f=f._nodeMap,s=s._nodeMap;let R=[];for(let[k]of x){let z=s.get(k);z===void 0||z.isAttached()||(nt(z)&&Ps(z,k,f,s,R,x),f.has(k)||x.delete(k),R.push(k))}for(let k of R)s.delete(k);for(let k of d)x=s.get(k),x===void 0||x.isAttached()||(f.has(k)||d.delete(k),s.delete(k))}let An="",er="",Co="",wo,fr,Vr,Ha=!1,Cc=!1,Mn,Yr=null,Fn,Is,qr,To,Ls,Ga;function hr(f,s){let d=qr.get(f);if(s!==null){let x=Oc(f);x.parentNode===s&&s.removeChild(x)}To.has(f)||fr._keyToDOMMap.delete(f),nt(d)&&(f=Ua(d,qr),Fs(f,0,f.length-1,null)),d!==void 0&&bt(Ga,Vr,Mn,d,"destroyed")}function Fs(f,s,d,x){for(;s<=d;++s){let R=f[s];R!==void 0&&hr(R,x)}}function pr(f,s){f.setProperty("text-align",s)}function Qu(f,s){var d=wo.theme.indent;if(typeof d=="string"){let x=f.classList.contains(d);0<s&&!x?f.classList.add(d):1>s&&x&&f.classList.remove(d)}d=getComputedStyle(f).getPropertyValue("--lexical-indent-base-value")||"40px",f.style.setProperty("padding-inline-start",s===0?"":`calc(${s} * ${d})`)}function Ni(f,s){f=f.style,s===0?pr(f,""):s===1?pr(f,"left"):s===2?pr(f,"center"):s===3?pr(f,"right"):s===4?pr(f,"justify"):s===5?pr(f,"start"):s===6&&pr(f,"end")}function Ka(f,s,d){let x=To.get(f);x===void 0&&B(60);let R=x.createDOM(wo,fr);var k=fr._keyToDOMMap;if(R["__lexicalKey_"+fr._key]=f,k.set(f,R),Nt(x)?R.setAttribute("data-lexical-text","true"):on(x)&&R.setAttribute("data-lexical-decorator","true"),nt(x)){if(f=x.__indent,k=x.__size,f!==0&&Qu(R,f),k!==0){--k,f=Ua(x,To);var z=er;er="",wc(f,x,0,k,R,null),Nc(x,R),er=z}f=x.__format,f!==0&&Ni(R,f),x.isInline()||js(null,x,R),Mt(x)&&(An+=`
|
|
69
|
-
|
|
70
|
-
`,Co+=`
|
|
71
|
-
|
|
72
|
-
`)}else k=x.getTextContent(),on(x)?(z=x.decorate(fr,wo),z!==null&&Bs(f,z),R.contentEditable="false"):Nt(x)&&(x.isDirectionless()||(er+=k)),An+=k,Co+=k;return s!==null&&(d!=null?s.insertBefore(R,d):(d=s.__lexicalLineBreak,d!=null?s.insertBefore(R,d):s.appendChild(R))),bt(Ga,Vr,Mn,x,"created"),R}function wc(f,s,d,x,R,k){let z=An;for(An="";d<=x;++d)Ka(f[d],R,k);Mt(s)&&(An+=`
|
|
73
|
-
|
|
74
|
-
`),R.__lexicalTextContent=An,An=z+An}function Tc(f,s){return f=s.get(f),Ri(f)||on(f)&&f.isInline()}function js(f,s,d){f=f!==null&&(f.__size===0||Tc(f.__last,qr)),s=s.__size===0||Tc(s.__last,To),f?s||(s=d.__lexicalLineBreak,s!=null&&d.removeChild(s),d.__lexicalLineBreak=null):s&&(s=document.createElement("br"),d.__lexicalLineBreak=s,d.appendChild(s))}function Nc(f,s){var d=s.__lexicalDir;if(s.__lexicalDirTextContent!==er||d!==Yr){let k=er==="";if(k)var x=Yr;else x=er,x=Be.test(x)?"rtl":ce.test(x)?"ltr":null;if(x!==d){let z=s.classList,ie=wo.theme;var R=d!==null?ie[d]:void 0;let xe=x!==null?ie[x]:void 0;R!==void 0&&(typeof R=="string"&&(R=R.split(" "),R=ie[d]=R),z.remove(...R)),x===null||k&&x==="ltr"?s.removeAttribute("dir"):(xe!==void 0&&(typeof xe=="string"&&(d=xe.split(" "),xe=ie[x]=d),xe!==void 0&&z.add(...xe)),s.dir=x),Cc||(f.getWritable().__dir=x)}Yr=x,s.__lexicalDirTextContent=er,s.__lexicalDir=x}}function Ua(f,s){let d=[];for(f=f.__first;f!==null;){let x=s.get(f);x===void 0&&B(101),d.push(f),f=x.__next}return d}function Si(f,s){var d=qr.get(f),x=To.get(f);d!==void 0&&x!==void 0||B(61);var R=Ha||Is.has(f)||Fn.has(f);let k=Yt(fr,f);if(d===x&&!R)return nt(d)?(x=k.__lexicalTextContent,x!==void 0&&(An+=x,Co+=x),x=k.__lexicalDirTextContent,x!==void 0&&(er+=x)):(x=d.getTextContent(),Nt(d)&&!d.isDirectionless()&&(er+=x),Co+=x,An+=x),k;if(d!==x&&R&&bt(Ga,Vr,Mn,x,"updated"),x.updateDOM(d,k,wo))return x=Ka(f,null,null),s===null&&B(62),s.replaceChild(x,k),hr(f,null),x;if(nt(d)&&nt(x)){if(f=x.__indent,f!==d.__indent&&Qu(k,f),f=x.__format,f!==d.__format&&Ni(k,f),R){f=x,R=er,er="",s=An;var z=d.__size,ie=f.__size;if(An="",z===1&&ie===1){var xe=d.__first,Re=f.__first;if(xe===Re)Si(xe,k);else{var Ve=Oc(xe);Re=Ka(Re,null,null),k.replaceChild(Re,Ve),hr(xe,null)}}else{Re=Ua(d,qr);var Ze=Ua(f,To);if(z===0)ie!==0&&wc(Ze,f,0,ie-1,k,null);else if(ie===0)z!==0&&(xe=k.__lexicalLineBreak==null,Fs(Re,0,z-1,xe?null:k),xe&&(k.textContent=""));else{var Ge=Re;Re=Ze,Ze=z-1,z=ie-1;let it=k.firstChild,yt=0;for(ie=0;yt<=Ze&&ie<=z;){var Ie=Ge[yt];let $t=Re[ie];if(Ie===$t)it=Sc(Si($t,k)),yt++,ie++;else{xe===void 0&&(xe=new Set(Ge)),Ve===void 0&&(Ve=new Set(Re));let Ut=Ve.has(Ie),Rn=xe.has($t);Ut?(Rn?(Ie=Yt(fr,$t),Ie===it?it=Sc(Si($t,k)):(it!=null?k.insertBefore(Ie,it):k.appendChild(Ie),Si($t,k)),yt++):Ka($t,k,it),ie++):(it=Sc(Oc(Ie)),hr(Ie,k),yt++)}}xe=yt>Ze,Ve=ie>z,xe&&!Ve?(xe=Re[z+1],xe=xe===void 0?null:fr.getElementByKey(xe),wc(Re,f,ie,z,k,xe)):Ve&&!xe&&Fs(Ge,yt,Ze,k)}}Mt(f)&&(An+=`
|
|
75
|
-
|
|
76
|
-
`),k.__lexicalTextContent=An,An=s+An,Nc(f,k),er=R,Nr(x)||x.isInline()||js(d,x,k)}Mt(x)&&(An+=`
|
|
77
|
-
|
|
78
|
-
`,Co+=`
|
|
79
|
-
|
|
80
|
-
`)}else d=x.getTextContent(),on(x)?(R=x.decorate(fr,wo),R!==null&&Bs(f,R)):Nt(x)&&!x.isDirectionless()&&(er+=d),An+=d,Co+=d;return!Cc&&Nr(x)&&x.__cachedText!==Co&&(x=x.getWritable(),x.__cachedText=Co),k}function Bs(f,s){let d=fr._pendingDecorators,x=fr._decorators;if(d===null){if(x[f]===s)return;d=Xo(fr)}d[f]=s}function Sc(f){return f=f.nextSibling,f!==null&&f===fr._blockCursorElement&&(f=f.nextSibling),f}function Oc(f){let s=Ls.get(f);return s===void 0&&B(75,f),s}let No=Object.freeze({}),Ac=[["keydown",ph],["pointerdown",ch],["compositionstart",fh],["compositionend",hh],["input",dh],["click",lh],["cut",No],["copy",No],["dragstart",No],["dragover",No],["dragend",No],["paste",No],["focus",No],["blur",No],["drop",No]];N&&Ac.push(["beforeinput",(f,s)=>uh(f,s)]);let Va=0,ed=0,td=0,aa=null,Ya=0,Rc=!1,$c=!1,qa=!1,Za=!1,nd=[0,"",0,"root",0];function rd(f,s,d,x,R){let k=f.anchor,z=f.focus,ie=k.getNode();var xe=bn();let Re=co(xe._window),Ve=Re!==null?Re.anchorNode:null,Ze=k.key;xe=xe.getElementByKey(Ze);let Ge=d.length;return Ze!==z.key||!Nt(ie)||(!R&&(!N||td<x+50)||ie.isDirty()&&2>Ge||oa(d))&&k.offset!==z.offset&&!ie.isComposing()||_t(ie)||ie.isDirty()&&1<Ge||(R||!N)&&xe!==null&&!ie.isComposing()&&Ve!==Rt(xe)||Re!==null&&s!==null&&(!s.collapsed||s.startContainer!==Re.anchorNode||s.startOffset!==Re.anchorOffset)||ie.getFormat()!==f.format||ie.getStyle()!==f.style||at(f,ie)}function od(f,s){return f!==null&&f.nodeValue!==null&&f.nodeType===3&&s!==0&&s!==f.nodeValue.length}function id(f,s,d){let{anchorNode:x,anchorOffset:R,focusNode:k,focusOffset:z}=f;Rc&&(Rc=!1,od(x,R)&&od(k,z))||Mr(s,()=>{if(!d)_r(null);else if(lt(s,x,k)){var ie=hn();if(It(ie)){var xe=ie.anchor,Re=xe.getNode();if(ie.isCollapsed()){f.type==="Range"&&f.anchorNode===f.focusNode&&(ie.dirty=!0);var Ve=wn(s).event;Ve=Ve?Ve.timeStamp:performance.now();let[Ge,Ie,it,yt,$t]=nd;var Ze=Zn();Ze=s.isComposing()===!1&&Ze.getTextContent()==="",Ve<$t+200&&xe.offset===it&&xe.key===yt?(ie.format=Ge,ie.style=Ie):xe.type==="text"?(ie.format=Re.getFormat(),ie.style=Re.getStyle()):xe.type!=="element"||Ze||(ie.format=0,ie.style="")}else{xe=255,Re=!1,Ve=ie.getNodes(),Ze=Ve.length;for(let Ge=0;Ge<Ze;Ge++){let Ie=Ve[Ge];if(Nt(Ie)&&(Re=!0,xe&=Ie.getFormat(),xe===0))break}ie.format=Re?xe:0}}pt(s,e,void 0)}})}function lh(f,s){Mr(s,()=>{let d=hn();var x=co(s._window);let R=ii();if(x)if(It(d)){let z=d.anchor;var k=z.getNode();z.type==="element"&&z.offset===0&&d.isCollapsed()&&!Nr(k)&&Zn().getChildrenSize()===1&&k.getTopLevelElementOrThrow().isEmpty()&&R!==null&&d.is(R)?(x.removeAllRanges(),d.dirty=!0):f.detail!==3||d.isCollapsed()||(x=d.focus.getNode(),k!==x&&(nt(k)?k.select(0):k.getParentOrThrow().select(0)))}else f.pointerType==="touch"&&(k=x.anchorNode,k!==null&&(k=k.nodeType,k===1||k===3))&&(x=Mi(R,x,s),_r(x));pt(s,t,f)})}function ch(f,s){let d=f.target;f=f.pointerType,d instanceof Node&&f!=="touch"&&Mr(s,()=>{on(Cr(d))||($c=!0)})}function Dc(f){return f.getTargetRanges?(f=f.getTargetRanges(),f.length===0?null:f[0]):null}function ad(f,s){return f!==s||nt(f)||nt(s)||!f.isToken()||!s.isToken()}function uh(f,s){let d=f.inputType,x=Dc(f);d==="deleteCompositionText"||w&&Kt(s)||d!=="insertCompositionText"&&Mr(s,()=>{let R=hn();if(d==="deleteContentBackward"){if(R===null){var k=ii();if(!It(k))return;_r(k.clone())}if(It(R)){ue&&Dt(R.anchor.key),ed===229&&f.timeStamp<Va+30&&s.isComposing()&&R.anchor.key===R.focus.key?(Dt(null),Va=0,setTimeout(()=>{Mr(s,()=>{Dt(null)})},30),It(R)&&(k=R.anchor.getNode(),k.markDirty(),R.format=k.getFormat(),R.style=k.getStyle()),1>=R.anchor.getNode().getTextContent().length&&(f.preventDefault(),pt(s,n,!0))):(f.preventDefault(),pt(s,n,!0));return}}if(It(R)){k=f.data,aa!==null&&$e(!1,s,aa),R.dirty&&aa===null||!R.isCollapsed()||Nr(R.anchor.getNode())||x===null||R.applyDOMRange(x),aa=null;var z=R.focus,ie=R.anchor.getNode();if(z=z.getNode(),d==="insertText"||d==="insertTranspose")k===`
|
|
81
|
-
`?(f.preventDefault(),pt(s,r,!1)):k===`
|
|
82
|
-
|
|
83
|
-
`?(f.preventDefault(),pt(s,o,void 0)):k==null&&f.dataTransfer?(k=f.dataTransfer.getData("text/plain"),f.preventDefault(),R.insertRawText(k)):k!=null&&rd(R,x,k,f.timeStamp,!0)?(f.preventDefault(),pt(s,i,k)):aa=k,td=f.timeStamp;else switch(f.preventDefault(),d){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":pt(s,i,f);break;case"insertFromComposition":Dt(null),pt(s,i,f);break;case"insertLineBreak":Dt(null),pt(s,r,!1);break;case"insertParagraph":Dt(null),qa&&!q?(qa=!1,pt(s,r,!1)):pt(s,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":pt(s,a,f);break;case"deleteByComposition":ad(ie,z)&&pt(s,l,f);break;case"deleteByDrag":case"deleteByCut":pt(s,l,f);break;case"deleteContent":pt(s,n,!1);break;case"deleteWordBackward":pt(s,u,!0);break;case"deleteWordForward":pt(s,u,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":pt(s,p,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":pt(s,p,!1);break;case"formatStrikeThrough":pt(s,m,"strikethrough");break;case"formatBold":pt(s,m,"bold");break;case"formatItalic":pt(s,m,"italic");break;case"formatUnderline":pt(s,m,"underline");break;case"historyUndo":pt(s,_,void 0);break;case"historyRedo":pt(s,C,void 0)}}})}function dh(f,s){f.stopPropagation(),Mr(s,()=>{var d=hn(),x=f.data,R=Dc(f);if(x!=null&&It(d)&&rd(d,R,x,f.timeStamp,!1)){Za&&(kc(s,x),Za=!1);var k=d.anchor,z=k.getNode();if(R=co(s._window),R===null)return;let ie=k.offset;(k=N&&!d.isCollapsed()&&Nt(z)&&R.anchorNode!==null)&&(z=z.getTextContent().slice(0,ie)+x+z.getTextContent().slice(ie+d.focus.offset),R=R.anchorNode,k=z===(R.nodeType===3?R.nodeValue:null)),k||pt(s,i,x),x=x.length,w&&1<x&&f.inputType==="insertCompositionText"&&!s.isComposing()&&(d.anchor.offset-=x),I||q||se||!s.isComposing()||(Va=0,Dt(null))}else $e(!1,s,x!==null?x:void 0),Za&&(kc(s,x||void 0),Za=!1);nr(),d=bn(),De(d)}),aa=null}function fh(f,s){Mr(s,()=>{let d=hn();if(It(d)&&!s.isComposing()){let x=d.anchor,R=d.anchor.getNode();Dt(x.key),(f.timeStamp<Va+30||x.type==="element"||!d.isCollapsed()||R.getFormat()!==d.format||R.getStyle()!==d.style)&&pt(s,i,Oe)}})}function kc(f,s){var d=f._compositionKey;if(Dt(null),d!==null&&s!=null){if(s===""){s=sn(d),f=Rt(f.getElementByKey(d)),f!==null&&f.nodeValue!==null&&Nt(s)&&je(s,f.nodeValue,null,null,!0);return}if(s[s.length-1]===`
|
|
84
|
-
`&&(d=hn(),It(d))){s=d.focus,d.anchor.set(s.key,s.offset,s.type),pt(f,P,null);return}}$e(!0,f,s)}function hh(f,s){w?Za=!0:Mr(s,()=>{kc(s,f.data)})}function ph(f,s){if(Va=f.timeStamp,ed=f.keyCode,!s.isComposing()){var{keyCode:d,shiftKey:x,ctrlKey:R,metaKey:k,altKey:z}=f;if(!pt(s,b,f)){if(d!==39||R||k||z)if(d!==39||z||x||!R&&!k)if(d!==37||R||k||z)if(d!==37||z||x||!R&&!k)if(d!==38||R||k)if(d!==40||R||k)if(d===13&&x)qa=!0,pt(s,P,f);else if(d===32)pt(s,M,f);else if(F&&R&&d===79)f.preventDefault(),qa=!0,pt(s,r,!0);else if(d!==13||x){var ie=F?z||k?!1:d===8||d===72&&R:R||z||k?!1:d===8;ie?d===8?pt(s,V,f):(f.preventDefault(),pt(s,n,!0)):d===27?pt(s,J,f):(ie=F?x||z||k?!1:d===46||d===68&&R:R||z||k?!1:d===46,ie?d===46?pt(s,oe,f):(f.preventDefault(),pt(s,n,!1)):d===8&&(F?z:R)?(f.preventDefault(),pt(s,u,!0)):d===46&&(F?z:R)?(f.preventDefault(),pt(s,u,!1)):F&&k&&d===8?(f.preventDefault(),pt(s,p,!0)):F&&k&&d===46?(f.preventDefault(),pt(s,p,!1)):d===66&&!z&&(F?k:R)?(f.preventDefault(),pt(s,m,"bold")):d===85&&!z&&(F?k:R)?(f.preventDefault(),pt(s,m,"underline")):d===73&&!z&&(F?k:R)?(f.preventDefault(),pt(s,m,"italic")):d!==9||z||R||k?d===90&&!x&&(F?k:R)?(f.preventDefault(),pt(s,_,void 0)):(ie=F?d===90&&k&&x:d===89&&R||d===90&&R&&x,ie?(f.preventDefault(),pt(s,C,void 0)):oi(s._editorState._selection)?(ie=x?!1:d===67?F?k:R:!1,ie?(f.preventDefault(),pt(s,te,f)):(ie=x?!1:d===88?F?k:R:!1,ie?(f.preventDefault(),pt(s,he,f)):d===65&&(F?k:R)&&(f.preventDefault(),pt(s,Y,f)))):!w&&d===65&&(F?k:R)&&(f.preventDefault(),pt(s,Y,f))):pt(s,Z,f))}else qa=!1,pt(s,P,f);else pt(s,D,f);else pt(s,A,f);else pt(s,O,f);else pt(s,T,f);else pt(s,y,f);else pt(s,v,f);(R||x||z||k)&&pt(s,ne,f)}}}function sd(f){let s=f.__lexicalEventHandles;return s===void 0&&(s=[],f.__lexicalEventHandles=s),s}let sa=new Map;function ld(f){f=f.target;let s=co(f==null?null:f.nodeType===9?f.defaultView:f.ownerDocument.defaultView);if(s!==null){var d=wt(s.anchorNode);if(d!==null){$c&&($c=!1,Mr(d,()=>{var z=ii(),ie=s.anchorNode;ie!==null&&(ie=ie.nodeType,ie===1||ie===3)&&(z=Mi(z,s,d),_r(z))})),f=Ee(d),f=f[f.length-1];var x=f._key,R=sa.get(x),k=R||f;k!==d&&id(s,k,!1),id(s,d,!0),d!==f?sa.set(x,d):R&&sa.delete(x)}}}function gh(f,s){Ya===0&&f.ownerDocument.addEventListener("selectionchange",ld),Ya++,f.__lexicalEditor=s;let d=sd(f);for(let x=0;x<Ac.length;x++){let[R,k]=Ac[x],z=typeof k=="function"?ie=>{ie._lexicalHandled!==!0&&(ie._lexicalHandled=!0,s.isEditable()&&k(ie,s))}:ie=>{if(ie._lexicalHandled!==!0&&(ie._lexicalHandled=!0,s.isEditable()))switch(R){case"cut":return pt(s,he,ie);case"copy":return pt(s,te,ie);case"paste":return pt(s,a,ie);case"dragstart":return pt(s,Q,ie);case"dragover":return pt(s,de,ie);case"dragend":return pt(s,pe,ie);case"focus":return pt(s,j,ie);case"blur":return pt(s,ee,ie);case"drop":return pt(s,U,ie)}};f.addEventListener(R,z),d.push(()=>{f.removeEventListener(R,z)})}}function Oi(f,s,d){nr();var x=f.__key;let R=f.getParent();if(R!==null){var k=hn();if(It(k)&&nt(f)){var{anchor:z,focus:ie}=k,xe=z.getNode(),Re=ie.getNode();xr(xe,f)&&z.set(f.__key,0,"element"),xr(Re,f)&&ie.set(f.__key,0,"element")}if(xe=k,Re=!1,It(xe)&&s){k=xe.anchor;let Ve=xe.focus;k.key===x&&(pa(k,f,R,f.getPreviousSibling(),f.getNextSibling()),Re=!0),Ve.key===x&&(pa(Ve,f,R,f.getPreviousSibling(),f.getNextSibling()),Re=!0)}else oi(xe)&&s&&f.isSelected()&&f.selectPrevious();It(xe)&&s&&!Re?(x=f.getIndexWithinParent(),vt(f),Pi(xe,R,x,-1)):vt(f),d||kr(R)||R.canBeEmpty()||!R.isEmpty()||Oi(R,s),s&&Nr(R)&&R.isEmpty()&&R.selectEnd()}}class la{static getType(){B(64,this.name)}static clone(){B(65,this.name)}constructor(s){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,ot(this,s)}getType(){return this.__type}isAttached(){for(var s=this.__key;s!==null;){if(s==="root")return!0;if(s=sn(s),s===null)break;s=s.__parent}return!1}isSelected(s){if(s=s||hn(),s==null)return!1;let d=s.getNodes().some(x=>x.__key===this.__key);return Nt(this)?d:It(s)&&s.anchor.type==="element"&&s.focus.type==="element"&&s.anchor.key===s.focus.key&&s.anchor.offset===s.focus.offset?!1:d}getKey(){return this.__key}getIndexWithinParent(){var s=this.getParent();if(s===null)return-1;s=s.getFirstChild();let d=0;for(;s!==null;){if(this.is(s))return d;d++,s=s.getNextSibling()}return-1}getParent(){let s=this.getLatest().__parent;return s===null?null:sn(s)}getParentOrThrow(){let s=this.getParent();return s===null&&B(66,this.__key),s}getTopLevelElement(){let s=this;for(;s!==null;){let d=s.getParent();if(kr(d))return s;s=d}return null}getTopLevelElementOrThrow(){let s=this.getTopLevelElement();return s===null&&B(67,this.__key),s}getParents(){let s=[],d=this.getParent();for(;d!==null;)s.push(d),d=d.getParent();return s}getParentKeys(){let s=[],d=this.getParent();for(;d!==null;)s.push(d.__key),d=d.getParent();return s}getPreviousSibling(){let s=this.getLatest().__prev;return s===null?null:sn(s)}getPreviousSiblings(){let s=[];var d=this.getParent();if(d===null)return s;for(d=d.getFirstChild();d!==null&&!d.is(this);)s.push(d),d=d.getNextSibling();return s}getNextSibling(){let s=this.getLatest().__next;return s===null?null:sn(s)}getNextSiblings(){let s=[],d=this.getNextSibling();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getCommonAncestor(s){let d=this.getParents();var x=s.getParents();nt(this)&&d.unshift(this),nt(s)&&x.unshift(s),s=d.length;var R=x.length;if(s===0||R===0||d[s-1]!==x[R-1])return null;for(x=new Set(x),R=0;R<s;R++){let k=d[R];if(x.has(k))return k}return null}is(s){return s==null?!1:this.__key===s.__key}isBefore(s){if(this===s)return!1;if(s.isParentOf(this))return!0;if(this.isParentOf(s))return!1;var d=this.getCommonAncestor(s);let x=this;for(;;){var R=x.getParentOrThrow();if(R===d){R=x.getIndexWithinParent();break}x=R}for(x=s;;){if(s=x.getParentOrThrow(),s===d){d=x.getIndexWithinParent();break}x=s}return R<d}isParentOf(s){let d=this.__key;if(d===s.__key)return!1;for(;s!==null;){if(s.__key===d)return!0;s=s.getParent()}return!1}getNodesBetween(s){let d=this.isBefore(s),x=[],R=new Set;for(var k=this;;){var z=k.__key;if(R.has(z)||(R.add(z),x.push(k)),k===s)break;if(z=nt(k)?d?k.getFirstChild():k.getLastChild():null,z!==null)k=z;else if(z=d?k.getNextSibling():k.getPreviousSibling(),z!==null)k=z;else{if(k=k.getParentOrThrow(),R.has(k.__key)||x.push(k),k===s)break;z=k;do z===null&&B(68),k=d?z.getNextSibling():z.getPreviousSibling(),z=z.getParent(),z!==null&&(k!==null||R.has(z.__key)||x.push(z));while(k===null)}}return d||x.reverse(),x}isDirty(){let s=bn()._dirtyLeaves;return s!==null&&s.has(this.__key)}getLatest(){let s=sn(this.__key);return s===null&&B(113),s}getWritable(){nr();var s=Zr(),d=bn();s=s._nodeMap;let x=this.__key,R=this.getLatest(),k=R.__parent;d=d._cloneNotNeeded;var z=hn();return Fr(z)&&z.setCachedNodes(null),d.has(x)?(kt(R),R):(z=R.constructor.clone(R),z.__parent=k,z.__next=R.__next,z.__prev=R.__prev,nt(R)&&nt(z)?(z.__first=R.__first,z.__last=R.__last,z.__size=R.__size,z.__indent=R.__indent,z.__format=R.__format,z.__dir=R.__dir):Nt(R)&&Nt(z)&&(z.__format=R.__format,z.__style=R.__style,z.__mode=R.__mode,z.__detail=R.__detail),d.add(x),z.__key=x,kt(z),s.set(x,z),z)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){B(70)}updateDOM(){B(71)}exportDOM(s){return{element:this.createDOM(s._config,s)}}exportJSON(){B(72)}static importJSON(){B(18,this.name)}static transform(){return null}remove(s){Oi(this,!0,s)}replace(s,d){nr();var x=hn();x!==null&&(x=x.clone()),yc(this,s);let R=this.getLatest(),k=this.__key,z=s.__key,ie=s.getWritable();s=this.getParentOrThrow().getWritable();let xe=s.__size;vt(ie);let Re=R.getPreviousSibling(),Ve=R.getNextSibling(),Ze=R.__prev,Ge=R.__next,Ie=R.__parent;return Oi(R,!1,!0),Re===null?s.__first=z:Re.getWritable().__next=z,ie.__prev=Ze,Ve===null?s.__last=z:Ve.getWritable().__prev=z,ie.__next=Ge,ie.__parent=Ie,s.__size=xe,d&&this.getChildren().forEach(it=>{ie.append(it)}),It(x)&&(_r(x),d=x.anchor,x=x.focus,d.key===k&&da(d,ie),x.key===k&&da(x,ie)),Gt()===k&&Dt(z),ie}insertAfter(s,d=!0){nr(),yc(this,s);var x=this.getWritable();let R=s.getWritable();var k=R.getParent();let z=hn();var ie=!1,xe=!1;if(k!==null){var Re=s.getIndexWithinParent();vt(R),It(z)&&(xe=k.__key,ie=z.anchor,k=z.focus,ie=ie.type==="element"&&ie.key===xe&&ie.offset===Re+1,xe=k.type==="element"&&k.key===xe&&k.offset===Re+1)}k=this.getNextSibling(),Re=this.getParentOrThrow().getWritable();let Ve=R.__key,Ze=x.__next;return k===null?Re.__last=Ve:k.getWritable().__prev=Ve,Re.__size++,x.__next=Ve,R.__next=Ze,R.__prev=x.__key,R.__parent=x.__parent,d&&It(z)&&(d=this.getIndexWithinParent(),Pi(z,Re,d+1),x=Re.__key,ie&&z.anchor.set(x,d+2,"element"),xe&&z.focus.set(x,d+2,"element")),s}insertBefore(s,d=!0){nr(),yc(this,s);var x=this.getWritable();let R=s.getWritable(),k=R.__key;vt(R);let z=this.getPreviousSibling(),ie=this.getParentOrThrow().getWritable(),xe=x.__prev,Re=this.getIndexWithinParent();return z===null?ie.__first=k:z.getWritable().__next=k,ie.__size++,x.__prev=k,R.__prev=xe,R.__next=x.__key,R.__parent=x.__parent,x=hn(),d&&It(x)&&(d=this.getParentOrThrow(),Pi(x,d,Re)),s}isParentRequired(){return!1}createParentElementNode(){return po()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(s,d){nr();let x=this.getPreviousSibling(),R=this.getParentOrThrow();return x===null?R.select(0,0):nt(x)?x.select():Nt(x)?x.select(s,d):(s=x.getIndexWithinParent()+1,R.select(s,s))}selectNext(s,d){nr();let x=this.getNextSibling(),R=this.getParentOrThrow();return x===null?R.select():nt(x)?x.select(0,0):Nt(x)?x.select(s,d):(s=x.getIndexWithinParent(),R.select(s,s))}markDirty(){this.getWritable()}}function Ja(f,s,d){d=d||s.getParentOrThrow().getLastChild();let x=s;for(s=[s];x!==d;){if(!x.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");x=x.getNextSibling(),s.push(x)}for(let R of s)f=f.insertAfter(R)}class ca extends la{static getType(){return"linebreak"}static clone(s){return new ca(s.__key)}constructor(s){super(s)}getTextContent(){return`
|
|
85
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:s=>{let d=s.parentElement,x,R;return d!==null&&((x=d.firstChild)===s||x.nextSibling===s&&x.nodeType===3&&(x.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((R=d.lastChild)===s||R.previousSibling===s&&R.nodeType===3&&(R.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:Xa,priority:0}}}}static importJSON(){return Ai()}exportJSON(){return{type:"linebreak",version:1}}}function Xa(){return{node:Ai()}}function Ai(){return Qo(new ca)}function Ri(f){return f instanceof ca}function $i(f,s){return s&16?"code":s&128?"mark":s&32?"sub":s&64?"sup":null}function Qa(f,s){return s&1?"strong":s&2?"em":"span"}function Mc(f,s,d,x,R){f=x.classList,x=xt(R,"base"),x!==void 0&&f.add(...x),x=xt(R,"underlineStrikethrough");let k=!1,z=s&8&&s&4;var ie=d&8&&d&4;x!==void 0&&(ie?(k=!0,z||f.add(...x)):z&&f.remove(...x));for(let xe in le)ie=le[xe],x=xt(R,xe),x!==void 0&&(d&ie?!k||xe!=="underline"&&xe!=="strikethrough"?(!(s&ie)||z&&xe==="underline"||xe==="strikethrough")&&f.add(...x):s&ie&&f.remove(...x):s&ie&&f.remove(...x))}function Ws(f,s,d){let x=s.firstChild;if(d=d.isComposing(),f+=d?Ce:"",x==null)s.textContent=f;else if(s=x.nodeValue,s!==f)if(d||w){d=s.length;let R=f.length,k=0,z=0;for(;k<d&&k<R&&s[k]===f[k];)k++;for(;z+k<d&&z+k<R&&s[d-z-1]===f[R-z-1];)z++;f=[k,d-k-z,f.slice(k,R-z)];let[ie,xe,Re]=f;xe!==0&&x.deleteData(ie,xe),x.insertData(ie,Re)}else x.nodeValue=f}function ua(f,s){return s=document.createElement(s),s.appendChild(f),s}class ti extends la{static getType(){return"text"}static clone(s){return new ti(s.__text,s.__key)}constructor(s,d){super(d),this.__text=s,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let s=this.getLatest();return Xe[s.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Gt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(s){return s=le[s],(this.getFormat()&s)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(s,d){let x=this.getLatest().__format;return qe(x,s,d)}createDOM(s){var d=this.__format,x=$i(this,d);let R=Qa(this,d),k=document.createElement(x===null?R:x),z=k;return this.hasFormat("code")&&k.setAttribute("spellcheck","false"),x!==null&&(z=document.createElement(R),k.appendChild(z)),x=z,Ws(this.__text,x,this),s=s.theme.text,s!==void 0&&Mc(R,0,d,x,s),d=this.__style,d!==""&&(k.style.cssText=d),k}updateDOM(s,d,x){let R=this.__text;var k=s.__format,z=this.__format,ie=$i(this,k);let xe=$i(this,z);var Re=Qa(this,k);let Ve=Qa(this,z);return(ie===null?Re:ie)!==(xe===null?Ve:xe)?!0:ie===xe&&Re!==Ve?(k=d.firstChild,k==null&&B(48),s=ie=document.createElement(Ve),Ws(R,s,this),x=x.theme.text,x!==void 0&&Mc(Ve,0,z,s,x),d.replaceChild(ie,k),!1):(Re=d,xe!==null&&ie!==null&&(Re=d.firstChild,Re==null&&B(49)),Ws(R,Re,this),x=x.theme.text,x!==void 0&&k!==z&&Mc(Ve,k,z,Re,x),z=this.__style,s.__style!==z&&(d.style.cssText=z),!1)}static importDOM(){return{"#text":()=>({conversion:Hs,priority:0}),b:()=>({conversion:zs,priority:0}),code:()=>({conversion:ni,priority:0}),em:()=>({conversion:ni,priority:0}),i:()=>({conversion:ni,priority:0}),s:()=>({conversion:ni,priority:0}),span:()=>({conversion:mt,priority:0}),strong:()=>({conversion:ni,priority:0}),sub:()=>({conversion:ni,priority:0}),sup:()=>({conversion:ni,priority:0}),u:()=>({conversion:ni,priority:0})}}static importJSON(s){let d=jn(s.text);return d.setFormat(s.format),d.setDetail(s.detail),d.setMode(s.mode),d.setStyle(s.style),d}exportDOM(s){return{element:s}=super.exportDOM(s),s!==null&&ei(s)||B(132),s.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(s=ua(s,"b")),this.hasFormat("italic")&&(s=ua(s,"i")),this.hasFormat("strikethrough")&&(s=ua(s,"s")),this.hasFormat("underline")&&(s=ua(s,"u")),{element:s}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(s){let d=this.getWritable();return d.__format=typeof s=="string"?le[s]:s,d}setDetail(s){let d=this.getWritable();return d.__detail=typeof s=="string"?ye[s]:s,d}setStyle(s){let d=this.getWritable();return d.__style=s,d}toggleFormat(s){let d=this.getFormat();return s=qe(d,s,null),this.setFormat(s)}toggleDirectionless(){let s=this.getWritable();return s.__detail^=1,s}toggleUnmergeable(){let s=this.getWritable();return s.__detail^=2,s}setMode(s){if(s=We[s],this.__mode===s)return this;let d=this.getWritable();return d.__mode=s,d}setTextContent(s){if(this.__text===s)return this;let d=this.getWritable();return d.__text=s,d}select(s,d){nr();let x=hn();var R=this.getTextContent();let k=this.__key;if(typeof R=="string"?(R=R.length,s===void 0&&(s=R),d===void 0&&(d=R)):d=s=0,It(x))R=Gt(),R!==x.anchor.key&&R!==x.focus.key||Dt(k),x.setTextNodeRange(this,s,this,d);else return uo(k,s,k,d,"text","text");return x}selectStart(){return this.select(0,0)}selectEnd(){let s=this.getTextContentSize();return this.select(s,s)}spliceText(s,d,x,R){let k=this.getWritable(),z=k.__text,ie=x.length,xe=s;0>xe&&(xe=ie+xe,0>xe&&(xe=0));let Re=hn();return R&&It(Re)&&(s+=ie,Re.setTextNodeRange(k,s,k,s)),d=z.slice(0,xe)+x+z.slice(xe+d),k.__text=d,k}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...s){nr();var d=this.getLatest(),x=d.getTextContent(),R=d.__key,k=Gt(),z=new Set(s);s=[];for(var ie=x.length,xe="",Re=0;Re<ie;Re++)xe!==""&&z.has(Re)&&(s.push(xe),xe=""),xe+=x[Re];if(xe!==""&&s.push(xe),z=s.length,z===0)return[];if(s[0]===x)return[d];var Ve=s[0];x=d.getParentOrThrow(),Re=d.getFormat();let Ze=d.getStyle(),Ge=d.__detail;ie=!1,d.isSegmented()?(xe=jn(Ve),xe.__format=Re,xe.__style=Ze,xe.__detail=Ge,ie=!0):(xe=d.getWritable(),xe.__text=Ve),d=hn(),xe=[xe],Ve=Ve.length;for(let yt=1;yt<z;yt++){var Ie=s[yt],it=Ie.length;Ie=jn(Ie).getWritable(),Ie.__format=Re,Ie.__style=Ze,Ie.__detail=Ge;let $t=Ie.__key;if(it=Ve+it,It(d)){let Ut=d.anchor,Rn=d.focus;Ut.key===R&&Ut.type==="text"&&Ut.offset>Ve&&Ut.offset<=it&&(Ut.key=$t,Ut.offset-=Ve,d.dirty=!0),Rn.key===R&&Rn.type==="text"&&Rn.offset>Ve&&Rn.offset<=it&&(Rn.key=$t,Rn.offset-=Ve,d.dirty=!0)}k===R&&Dt($t),Ve=it,xe.push(Ie)}return R=this.getPreviousSibling(),k=this.getNextSibling(),R!==null&&kt(R),k!==null&&kt(k),R=x.getWritable(),k=this.getIndexWithinParent(),ie?(R.splice(k,0,xe),this.remove()):R.splice(k,1,xe),It(d)&&Pi(d,x,k,z-1),xe}mergeWithSibling(s){var d=s===this.getPreviousSibling();d||s===this.getNextSibling()||B(50);var x=this.__key;let R=s.__key,k=this.__text,z=k.length;Gt()===R&&Dt(x);let ie=hn();if(It(ie)){let xe=ie.anchor,Re=ie.focus;xe!==null&&xe.key===R&&(ai(xe,d,x,s,z),ie.dirty=!0),Re!==null&&Re.key===R&&(ai(Re,d,x,s,z),ie.dirty=!0)}return x=s.__text,this.setTextContent(d?x+k:k+x),d=this.getWritable(),s.remove(),d}isTextEntity(){return!1}}function mt(f){let s=f.style.fontWeight==="700",d=f.style.textDecoration==="line-through",x=f.style.fontStyle==="italic",R=f.style.textDecoration==="underline",k=f.style.verticalAlign;return{forChild:z=>(Nt(z)&&(s&&z.toggleFormat("bold"),d&&z.toggleFormat("strikethrough"),x&&z.toggleFormat("italic"),R&&z.toggleFormat("underline"),k==="sub"&&z.toggleFormat("subscript"),k==="super"&&z.toggleFormat("superscript")),z),node:null}}function zs(f){let s=f.style.fontWeight==="normal";return{forChild:d=>(Nt(d)&&!s&&d.toggleFormat("bold"),d),node:null}}let es=new WeakMap;function Hs(f){f.parentElement===null&&B(129);for(var s=f.textContent||"",d,x=f.parentNode,R=[f];x!==null&&(d=es.get(x))===void 0&&!(x.nodeName==="PRE"||x.nodeType===1&&x.style!==void 0&&x.style.whiteSpace!==void 0&&x.style.whiteSpace.startsWith("pre"));)R.push(x),x=x.parentNode;for(d=d===void 0?x:d,x=0;x<R.length;x++)es.set(R[x],d);if(d!==null){for(s=s.split(/(\r?\n|\t)/),f=[],R=s.length,d=0;d<R;d++)x=s[d],x===`
|
|
86
|
-
`||x===`\r
|
|
87
|
-
`?f.push(Ai()):x===" "?f.push(Gs()):x!==""&&f.push(jn(x));return{node:f}}if(s=s.replace(/\r/g,"").replace(/[ \t\n]+/g," "),s==="")return{node:null};if(s[0]===" "){for(R=f,d=!0;R!==null&&(R=cd(R,!1))!==null;)if(x=R.textContent||"",0<x.length){/[ \t\n]$/.test(x)&&(s=s.slice(1)),d=!1;break}d&&(s=s.slice(1))}if(s[s.length-1]===" "){for(R=!0;f!==null&&(f=cd(f,!0))!==null;)if(0<(f.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){R=!1;break}R&&(s=s.slice(0,s.length-1))}return s===""?{node:null}:{node:jn(s)}}let mh=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function cd(f,s){for(;;){for(var d=void 0;(d=s?f.nextSibling:f.previousSibling)===null;)if(f=f.parentElement,f===null)return null;if(f=d,f.nodeType===1&&(d=f.style.display,d===""&&f.nodeName.match(mh)===null||d!==""&&!d.startsWith("inline")))return null;for(;(d=s?f.firstChild:f.lastChild)!==null;)f=d;if(f.nodeType===3)return f;if(f.nodeName==="BR")return null}}let vh={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function ni(f){let s=vh[f.nodeName.toLowerCase()];return s===void 0?{node:null}:{forChild:d=>(Nt(d)&&!d.hasFormat(s)&&d.toggleFormat(s),d),node:null}}function jn(f=""){return Qo(new ti(f))}function Nt(f){return f instanceof ti}class So extends ti{static getType(){return"tab"}static clone(s){let d=new So(s.__key);return d.__text=s.__text,d.__format=s.__format,d.__style=s.__style,d}constructor(s){super(" ",s),this.__detail=2}static importDOM(){return null}static importJSON(s){let d=Gs();return d.setFormat(s.format),d.setStyle(s.style),d}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){B(126)}setDetail(){B(127)}setMode(){B(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Gs(){return Qo(new So)}function Pc(f){return f instanceof So}class tr{constructor(s,d,x){this._selection=null,this.key=s,this.offset=d,this.type=x}is(s){return this.key===s.key&&this.offset===s.offset&&this.type===s.type}isBefore(s){let d=this.getNode(),x=s.getNode(),R=this.offset;if(s=s.offset,nt(d)){var k=d.getDescendantByIndex(R);d=k??d}return nt(x)&&(k=x.getDescendantByIndex(s),x=k??x),d===x?R<s:d.isBefore(x)}getNode(){let s=sn(this.key);return s===null&&B(20),s}set(s,d,x){let R=this._selection,k=this.key;this.key=s,this.offset=d,this.type=x,ma()||(Gt()===k&&Dt(s),R!==null&&(R.setCachedNodes(null),R.dirty=!0))}}function Ks(f,s){let d=s.__key,x=f.offset,R="element";if(Nt(s))R="text",s=s.getTextContentSize(),x>s&&(x=s);else if(!nt(s)){var k=s.getNextSibling();Nt(k)?(d=k.__key,x=0,R="text"):(k=s.getParent())&&(d=k.__key,x=s.getIndexWithinParent()+1)}f.set(d,x,R)}function da(f,s){if(nt(s)){let d=s.getLastDescendant();nt(d)||Nt(d)?Ks(f,d):Ks(f,s)}else Ks(f,s)}function Us(f,s,d,x){let R=f.getNode(),k=R.getChildAtIndex(f.offset),z=jn(),ie=Nr(R)?po().append(z):z;z.setFormat(d),z.setStyle(x),k===null?R.append(ie):k.insertBefore(ie),f.is(s)&&s.set(z.__key,0,"text"),f.set(z.__key,0,"text")}function ri(f,s,d,x){f.key=s,f.offset=d,f.type=x}class ts{constructor(s,d){this.anchor=s,this.focus=d,s._selection=this,d._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return Fr(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return ns(this)}}class fa{constructor(s){this.dirty=!1,this._nodes=s,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){if(!oi(s))return!1;let d=this._nodes,x=s._nodes;return d.size===x.size&&Array.from(d).every(R=>x.has(R))}add(s){this.dirty=!0,this._nodes.add(s),this._cachedNodes=null}delete(s){this.dirty=!0,this._nodes.delete(s),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(s){return this._nodes.has(s)}clone(){return new fa(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.getNodes(),x=d.length;var R=d[x-1];if(Nt(R))R=R.select();else{let k=R.getIndexWithinParent()+1;R=R.getParentOrThrow().select(k,k)}for(R.insertNodes(s),s=0;s<x;s++)d[s].remove()}getNodes(){var s=this._cachedNodes;if(s!==null)return s;var d=this._nodes;s=[];for(let x of d)d=sn(x),d!==null&&s.push(d);return ma()||(this._cachedNodes=s),s}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function It(f){return f instanceof ki}function Fr(f){return f instanceof ts}function Ic(f){let[s,,d]=Vs(f);f=d.getChildren();let x=f.length;var R=f[0].getChildren().length;let k=Array(x);for(var z=0;z<x;z++)k[z]=Array(R);for(R=0;R<x;R++){z=f[R].getChildren();let ie=0;for(let xe=0;xe<z.length;xe++){for(;k[R][ie];)ie++;let Re=z[xe],Ve=Re.__rowSpan||1,Ze=Re.__colSpan||1;for(let Ge=0;Ge<Ve;Ge++)for(let Ie=0;Ie<Ze;Ie++)k[R+Ge][ie+Ie]=Re;if(s===Re)return{colSpan:Ze,columnIndex:ie,rowIndex:R,rowSpan:Ve};ie+=Ze}}return null}class Di extends ts{constructor(s,d,x){super(d,x),this.gridKey=s}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return ud(s)?this.gridKey===s.gridKey&&this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}set(s,d,x){this.dirty=!0,this.gridKey=s,this.anchor.key=d,this.focus.key=x,this._cachedNodes=null}clone(){return new Di(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.focus.getNode();ut(d.select(0,d.getChildrenSize())).insertNodes(s)}getShape(){var s=sn(this.anchor.key);if(jr(s)||B(103),s=Ic(s),s===null)throw Error("getCellRect: expected to find AnchorNode");var d=sn(this.focus.key);jr(d)||B(104);let x=Ic(d);if(x===null)throw Error("getCellRect: expected to find focusCellNode");d=Math.min(s.columnIndex,x.columnIndex);let R=Math.max(s.columnIndex,x.columnIndex),k=Math.min(s.rowIndex,x.rowIndex);return s=Math.max(s.rowIndex,x.rowIndex),{fromX:Math.min(d,R),fromY:Math.min(k,s),toX:Math.max(d,R),toY:Math.max(k,s)}}getNodes(){function s($t){let{cell:Ut,startColumn:Rn,startRow:Xn}=$t;Re=Math.min(Re,Rn),Ve=Math.min(Ve,Xn),Ze=Math.max(Ze,Rn+Ut.__colSpan-1),Ge=Math.max(Ge,Xn+Ut.__rowSpan-1)}var d=this._cachedNodes;if(d!==null)return d;var x=this.anchor.getNode();d=this.focus.getNode();var R=Ms(x,jr);x=Ms(d,jr),jr(R)||B(103),jr(x)||B(104),d=R.getParent(),ss(d)||B(105),d=d.getParent(),Gc(d)||B(106);var k=x.getParents()[1];if(k!==d){if(d.isParentOf(x)){if(d=k.getParent(),d==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,x.getKey(),d.getKey())}else{if(d=d.getParent(),d==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,d.getKey(),x.getKey())}return this.getNodes()}let[z,ie,xe]=Oo(d,R,x),Re=Math.min(ie.startColumn,xe.startColumn),Ve=Math.min(ie.startRow,xe.startRow),Ze=Math.max(ie.startColumn+ie.cell.__colSpan-1,xe.startColumn+xe.cell.__colSpan-1),Ge=Math.max(ie.startRow+ie.cell.__rowSpan-1,xe.startRow+xe.cell.__rowSpan-1);x=Re,R=Ve,k=Re;for(var Ie=Ve;Re<x||Ve<R||Ze>k||Ge>Ie;){if(Re<x){var it=Ie-R;--x;for(var yt=0;yt<=it;yt++)s(z[R+yt][x])}if(Ve<R)for(it=k-x,--R,yt=0;yt<=it;yt++)s(z[R][x+yt]);if(Ze>k)for(it=Ie-R,k+=1,yt=0;yt<=it;yt++)s(z[R+yt][k]);if(Ge>Ie)for(it=k-x,Ie+=1,yt=0;yt<=it;yt++)s(z[Ie][x+yt])}for(d=[d],x=null,R=Ve;R<=Ge;R++)for(k=Re;k<=Ze;k++)({cell:Ie}=z[R][k]),it=Ie.getParent(),ss(it)||B(107),it!==x&&d.push(it),d.push(Ie,...xc(Ie)),x=it;return ma()||(this._cachedNodes=d),d}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function ud(f){return f instanceof Di}class ki extends ts{constructor(s,d,x,R){super(s,d),this.format=x,this.style=R}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return It(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus)&&this.format===s.format&&this.style===s.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var s=this._cachedNodes;if(s!==null)return s;s=this.anchor;var d=this.focus,x=s.isBefore(d),R=x?s:d;x=x?d:s,s=R.getNode(),d=x.getNode();let k=R.offset;return R=x.offset,nt(s)&&(x=s.getDescendantByIndex(k),s=x??s),nt(d)&&(x=d.getDescendantByIndex(R),x!==null&&x!==s&&d.getChildAtIndex(R)===x&&(x=x.getPreviousSibling()),d=x??d),s=s.is(d)?nt(s)&&0<s.getChildrenSize()?[]:[s]:s.getNodesBetween(d),ma()||(this._cachedNodes=s),s}setTextNodeRange(s,d,x,R){ri(this.anchor,s.__key,d,"text"),ri(this.focus,x.__key,R,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let s=this.getNodes();if(s.length===0)return"";let d=s[0],x=s[s.length-1],R=this.anchor,k=this.focus,z=R.isBefore(k),[ie,xe]=ns(this),Re="",Ve=!0;for(let Ze=0;Ze<s.length;Ze++){let Ge=s[Ze];if(nt(Ge)&&!Ge.isInline())Ve||(Re+=`
|
|
88
|
-
`),Ve=!Ge.isEmpty();else if(Ve=!1,Nt(Ge)){let Ie=Ge.getTextContent();Ge===d?Ge===x?(R.type!=="element"||k.type!=="element"||k.offset===R.offset)&&(Ie=ie<xe?Ie.slice(ie,xe):Ie.slice(xe,ie)):Ie=z?Ie.slice(ie):Ie.slice(xe):Ge===x&&(Ie=z?Ie.slice(0,xe):Ie.slice(0,ie)),Re+=Ie}else!on(Ge)&&!Ri(Ge)||Ge===x&&this.isCollapsed()||(Re+=Ge.getTextContent())}return Re}applyDOMRange(s){let d=bn(),x=d.getEditorState()._selection;if(s=gr(s.startContainer,s.startOffset,s.endContainer,s.endOffset,d,x),s!==null){var[R,k]=s;ri(this.anchor,R.key,R.offset,R.type),ri(this.focus,k.key,k.offset,k.type),this._cachedNodes=null}}clone(){let s=this.anchor,d=this.focus;return new ki(new tr(s.key,s.offset,s.type),new tr(d.key,d.offset,d.type),this.format,this.style)}toggleFormat(s){this.format=qe(this.format,s,null),this.dirty=!0}setStyle(s){this.style=s,this.dirty=!0}hasFormat(s){return(this.format&le[s])!==0}insertRawText(s){s=s.split(/(\r?\n|\t)/);let d=[],x=s.length;for(let R=0;R<x;R++){let k=s[R];k===`
|
|
89
|
-
`||k===`\r
|
|
90
|
-
`?d.push(Ai()):k===" "?d.push(Gs()):d.push(jn(k))}this.insertNodes(d)}insertText(s){var d=this.anchor,x=this.focus,R=this.isCollapsed()||d.isBefore(x),k=this.format,z=this.style;R&&d.type==="element"?Us(d,x,k,z):R||x.type!=="element"||Us(x,d,k,z);var ie=this.getNodes(),xe=ie.length,Re=R?x:d;x=(R?d:x).offset;var Ve=Re.offset;d=ie[0],Nt(d)||B(26),R=d.getTextContent().length;var Ze=d.getParentOrThrow(),Ge=ie[xe-1];if(this.isCollapsed()&&x===R&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!Ze.canInsertTextAfter()&&d.getNextSibling()===null)){var Ie=d.getNextSibling();if(Nt(Ie)&&Ie.canInsertTextBefore()&&!_t(Ie)||(Ie=jn(),Ie.setFormat(k),Ze.canInsertTextAfter()?d.insertAfter(Ie):Ze.insertAfter(Ie)),Ie.select(0,0),d=Ie,s!==""){this.insertText(s);return}}else if(this.isCollapsed()&&x===0&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!Ze.canInsertTextBefore()&&d.getPreviousSibling()===null)){if(Ie=d.getPreviousSibling(),(!Nt(Ie)||_t(Ie))&&(Ie=jn(),Ie.setFormat(k),Ze.canInsertTextBefore()?d.insertBefore(Ie):Ze.insertBefore(Ie)),Ie.select(),d=Ie,s!==""){this.insertText(s);return}}else if(d.isSegmented()&&x!==R)Ze=jn(d.getTextContent()),Ze.setFormat(k),d.replace(Ze),d=Ze;else if(!(this.isCollapsed()||s===""||(Ie=Ge.getParent(),Ze.canInsertTextBefore()&&Ze.canInsertTextAfter()&&(!nt(Ie)||Ie.canInsertTextBefore()&&Ie.canInsertTextAfter())))){this.insertText(""),Bn(this.anchor,this.focus,null),this.insertText(s);return}if(xe===1)if(d.isToken())s=jn(s),s.select(),d.replace(s);else{if(ie=d.getFormat(),xe=d.getStyle(),x===Ve&&(ie!==k||xe!==z))if(d.getTextContent()==="")d.setFormat(k),d.setStyle(z);else{ie=jn(s),ie.setFormat(k),ie.setStyle(z),ie.select(),x===0?d.insertBefore(ie,!1):([xe]=d.splitText(x),xe.insertAfter(ie,!1)),ie.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length);return}else if(Pc(d)){s=jn(s),s.setFormat(k),s.setStyle(z),s.select(),d.replace(s);return}d=d.spliceText(x,Ve-x,s,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=s.length:(this.format=ie,this.style=xe))}else{if(k=new Set([...d.getParentKeys(),...Ge.getParentKeys()]),Ie=nt(d)?d:d.getParentOrThrow(),z=nt(Ge)?Ge:Ge.getParentOrThrow(),Ze=Ge,!Ie.is(z)&&z.isInline())do Ze=z,z=z.getParentOrThrow();while(z.isInline());if(Re.type==="text"&&(Ve!==0||Ge.getTextContent()==="")||Re.type==="element"&&Ge.getIndexWithinParent()<Ve)if(Nt(Ge)&&!Ge.isToken()&&Ve!==Ge.getTextContentSize()){if(Ge.isSegmented()){var it=jn(Ge.getTextContent());Ge.replace(it),Ge=it}Nr(Re.getNode())||Re.type!=="text"||(Ge=Ge.spliceText(0,Ve,"")),k.add(Ge.__key)}else Re=Ge.getParentOrThrow(),Re.canBeEmpty()||Re.getChildrenSize()!==1?Ge.remove():Re.remove();else k.add(Ge.__key);for(Re=z.getChildren(),Ve=new Set(ie),Ge=Ie.is(z),Ie=Ie.isInline()&&d.getNextSibling()===null?Ie:d,it=Re.length-1;0<=it;it--){let yt=Re[it];if(yt.is(d)||nt(yt)&&yt.isParentOf(d))break;yt.isAttached()&&(!Ve.has(yt)||yt.is(Ze)?Ge||Ie.insertAfter(yt,!1):yt.remove())}if(!Ge)for(Re=z,z=null;Re!==null;)Ve=Re.getChildren(),Ge=Ve.length,(Ge===0||Ve[Ge-1].is(z))&&(k.delete(Re.__key),z=Re),Re=Re.getParent();for(d.isToken()?x===R?d.select():(s=jn(s),s.select(),d.replace(s)):(d=d.spliceText(x,R-x,s,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length)),s=1;s<xe;s++)d=ie[s],k.has(d.__key)||d.remove()}}removeText(){this.insertText("")}formatText(s){if(this.isCollapsed())this.toggleFormat(s),Dt(null);else{var d=this.getNodes(),x=[];for(var R of d)Nt(R)&&x.push(R);var k=x.length;if(k===0)this.toggleFormat(s),Dt(null);else{R=this.anchor;var z=this.focus,ie=this.isBackward();d=ie?z:R,R=ie?R:z;var xe=0,Re=x[0];if(z=d.type==="element"?0:d.offset,d.type==="text"&&z===Re.getTextContentSize()&&(xe=1,Re=x[1],z=0),Re!=null){ie=Re.getFormatFlags(s,null);var Ve=k-1,Ze=x[Ve];if(k=R.type==="text"?R.offset:Ze.getTextContentSize(),Re.is(Ze))z!==k&&(z===0&&k===Re.getTextContentSize()?Re.setFormat(ie):(s=Re.splitText(z,k),s=z===0?s[0]:s[1],s.setFormat(ie),d.type==="text"&&d.set(s.__key,0,"text"),R.type==="text"&&R.set(s.__key,k-z,"text")),this.format=ie);else{z!==0&&([,Re]=Re.splitText(z),z=0),Re.setFormat(ie);var Ge=Ze.getFormatFlags(s,ie);for(0<k&&(k!==Ze.getTextContentSize()&&([Ze]=Ze.splitText(k)),Ze.setFormat(Ge)),xe+=1;xe<Ve;xe++){let Ie=x[xe];if(!Ie.isToken()){let it=Ie.getFormatFlags(s,Ge);Ie.setFormat(it)}}d.type==="text"&&d.set(Re.__key,z,"text"),R.type==="text"&&R.set(Ze.__key,k,"text"),this.format=ie|Ge}}}}}insertNodes(s){if(s.length!==0){if(this.anchor.key==="root"){this.insertParagraph();var d=hn();if(!It(d))throw Error("Expected RangeSelection after insertParagraph");return d.insertNodes(s)}var x=Ec(this.anchor.getNode(),Ti);if(d=s[s.length-1],"__language"in x)if("__language"in s[0])this.insertText(s[0].getTextContent());else{var R=Ii(this);x.splice(R,0,s),d.selectEnd()}else if(s.some(ie=>(nt(ie)||on(ie))&&!ie.isInline())){d=Ys(s),s=d.getLastDescendant();var k=d.getChildren();d=nt(x)&&x.isEmpty()?null:this.insertParagraph(),R=k[k.length-1];var z=k[0];(ie=>nt(ie)&&Ti(ie)&&!ie.isEmpty()&&nt(x)&&(!x.isEmpty()||"__value"in x&&"__checked"in x))(z)&&(x.append(...z.getChildren()),z=k[1]),z&&Ja(x,z),k=Ec(s,Ti),d&&nt(k)&&("__value"in d&&"__checked"in d||Ti(R))&&(k.append(...d.getChildren()),d.remove()),nt(x)&&x.isEmpty()&&x.remove(),s.selectEnd(),s=nt(x)?x.getLastChild():null,Ri(s)&&k!==x&&s.remove()}else R=Ii(this),x.splice(R,0,s),d.selectEnd()}}insertParagraph(){if(this.anchor.key==="root"){var s=po();return Zn().splice(this.anchor.offset,0,[s]),s.select(),s}var d=Ii(this);return s=Ec(this.anchor.getNode(),Ti),d=(d=s.getChildAtIndex(d))?[d,...d.getNextSiblings()]:[],(s=s.insertNewAfter(this,!1))?(s.append(...d),s.selectStart(),s):null}insertLineBreak(s){var d=Ai();this.insertNodes([d]),s&&(s=d.getParentOrThrow(),d=d.getIndexWithinParent(),s.select(d,d))}extract(){var s=this.getNodes(),d=s.length,x=d-1,R=this.anchor;let k=this.focus;var z=s[0];let ie=s[x],[xe,Re]=ns(this);return d===0?[]:d===1?Nt(z)&&!this.isCollapsed()?(s=xe>Re?Re:xe,x=z.splitText(s,xe>Re?xe:Re),s=s===0?x[0]:x[1],s!=null?[s]:[]):[z]:(d=R.isBefore(k),Nt(z)&&(R=d?xe:Re,R===z.getTextContentSize()?s.shift():R!==0&&([,z]=z.splitText(R),s[0]=z)),Nt(ie)&&(z=ie.getTextContent().length,d=d?Re:xe,d===0?s.pop():d!==z&&([ie]=ie.splitText(d),s[x]=ie)),s)}modify(s,d,x){var R=this.focus,k=this.anchor,z=s==="move",ie=At(R,d);if(on(ie)&&!ie.isIsolated())z&&ie.isKeyboardSelectable()?(d=fo(),d.add(ie.__key),_r(d)):(s=d?ie.getPreviousSibling():ie.getNextSibling(),Nt(s)?(ie=s.__key,d=d?s.getTextContent().length:0,R.set(ie,d,"text"),z&&k.set(ie,d,"text")):(x=ie.getParentOrThrow(),nt(s)?(x=s.__key,ie=d?s.getChildrenSize():0):(ie=ie.getIndexWithinParent(),x=x.__key,d||ie++),R.set(x,ie,"element"),z&&k.set(x,ie,"element")));else if(k=bn(),R=co(k._window)){var xe=k._blockCursorElement,Re=k._rootElement;if(Re===null||xe===null||!nt(ie)||ie.isInline()||ie.canBeEmpty()||_c(xe,k,Re),R.modify(s,d?"backward":"forward",x),0<R.rangeCount&&(ie=R.getRangeAt(0),k=this.anchor.getNode(),k=Nr(k)?k:Jn(k),this.applyDOMRange(ie),this.dirty=!0,!z)){for(z=this.getNodes(),s=[],x=!1,xe=0;xe<z.length;xe++)Re=z[xe],xr(Re,k)?s.push(Re):x=!0;x&&0<s.length&&(d?(d=s[0],nt(d)?d.selectStart():d.getParentOrThrow().selectStart()):(d=s[s.length-1],nt(d)?d.selectEnd():d.getParentOrThrow().selectEnd())),(R.anchorNode!==ie.startContainer||R.anchorOffset!==ie.startOffset)&&(d=this.focus,z=this.anchor,R=z.key,ie=z.offset,k=z.type,ri(z,d.key,d.offset,d.type),ri(d,R,ie,k),this._cachedNodes=null)}}}deleteCharacter(s){let d=this.isCollapsed();if(this.isCollapsed()){var x=this.anchor,R=this.focus,k=x.getNode();if(!s&&(x.type==="element"&&nt(k)&&x.offset===k.getChildrenSize()||x.type==="text"&&x.offset===k.getTextContentSize())){var z=k.getParent();if(z=k.getNextSibling()||(z===null?null:z.getNextSibling()),nt(z)&&z.isShadowRoot())return}if(z=At(R,s),on(z)&&!z.isIsolated()){z.isKeyboardSelectable()&&nt(k)&&k.getChildrenSize()===0?(k.remove(),s=fo(),s.add(z.__key),_r(s)):(z.remove(),bn().dispatchCommand(e,void 0));return}if(!s&&nt(z)&&nt(k)&&k.isEmpty()){k.remove(),z.selectStart();return}if(this.modify("extend",s,"character"),this.isCollapsed()){if(s&&x.offset===0&&(x.type==="element"?x.getNode():x.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(z=R.type==="text"?R.getNode():null,k=x.type==="text"?x.getNode():null,z!==null&&z.isSegmented()){if(x=R.offset,R=z.getTextContentSize(),z.is(k)||s&&x!==R||!s&&x!==0){dd(z,s,x);return}}else if(k!==null&&k.isSegmented()&&(x=x.offset,R=k.getTextContentSize(),k.is(z)||s&&x!==0||!s&&x!==R)){dd(k,s,x);return}if(k=this.anchor,z=this.focus,x=k.getNode(),R=z.getNode(),x===R&&k.type==="text"&&z.type==="text"){var ie=k.offset,xe=z.offset;let Re=ie<xe;R=Re?ie:xe,xe=Re?xe:ie,ie=xe-1,R!==ie&&(x=x.getTextContent().slice(R,xe),oa(x)||(s?z.offset=ie:k.offset=ie))}}}this.removeText(),s&&!d&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(s=this.anchor.getNode(),s.isEmpty()&&Nr(s.getParent())&&s.getIndexWithinParent()===0&&s.collapseAtStart(this))}deleteLine(s){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",s,"lineboundary"),(s?this.focus:this.anchor).offset===0&&this.modify("extend",s,"character")),this.removeText()}deleteWord(s){this.isCollapsed()&&this.modify("extend",s,"word"),this.removeText()}}function oi(f){return f instanceof fa}function ha(f){let s=f.offset;return f.type==="text"?s:(f=f.getNode(),s===f.getChildrenSize()?f.getTextContent().length:0)}function ns(f){let s=f.anchor;return f=f.focus,s.type==="element"&&f.type==="element"&&s.key===f.key&&s.offset===f.offset?[0,0]:[ha(s),ha(f)]}function dd(f,s,d){let x=f.getTextContent().split(/(?=\s)/g),R=x.length,k=0,z=0;for(let ie=0;ie<R;ie++){let xe=x[ie],Re=ie===R-1;if(z=k,k+=xe.length,s&&k===d||k>d||Re){x.splice(ie,1),Re&&(z=void 0);break}}s=x.join("").trim(),s===""?f.remove():(f.setTextContent(s),f.select(z,z))}function Lc(f,s,d,x){var R=s;if(f.nodeType===1){let ie=!1;var k=f.childNodes,z=k.length;R===z&&(ie=!0,R=z-1);let xe=k[R];if(z=!1,xe===x._blockCursorElement?(xe=k[R+1],z=!0):x._blockCursorElement!==null&&R--,x=lo(xe),Nt(x))R=ie?x.getTextContentSize():0;else{if(k=lo(f),k===null)return null;if(nt(k)?(f=k.getChildAtIndex(R),(s=nt(f))&&(s=f.getParent(),s=d===null||s===null||!s.canBeEmpty()||s!==d.getNode()),s&&(d=ie?f.getLastDescendant():f.getFirstDescendant(),d===null?(k=f,R=0):(f=d,k=nt(f)?f:f.getParentOrThrow())),Nt(f)?(x=f,k=null,R=ie?f.getTextContentSize():0):f!==k&&ie&&!z&&R++):(R=k.getIndexWithinParent(),R=s===0&&on(k)&&lo(f)===k?R:R+1,k=k.getParentOrThrow()),nt(k))return new tr(k.__key,R,"element")}}else x=lo(f);return Nt(x)?new tr(x.__key,R,"text"):null}function fd(f,s,d){var x=f.offset,R=f.getNode();x===0?(x=R.getPreviousSibling(),R=R.getParent(),s?(d||!s)&&x===null&&nt(R)&&R.isInline()&&(s=R.getPreviousSibling(),Nt(s)&&(f.key=s.__key,f.offset=s.getTextContent().length)):nt(x)&&!d&&x.isInline()?(f.key=x.__key,f.offset=x.getChildrenSize(),f.type="element"):Nt(x)&&(f.key=x.__key,f.offset=x.getTextContent().length)):x===R.getTextContent().length&&(x=R.getNextSibling(),R=R.getParent(),s&&nt(x)&&x.isInline()?(f.key=x.__key,f.offset=0,f.type="element"):(d||s)&&x===null&&nt(R)&&R.isInline()&&!R.canInsertTextAfter()&&(s=R.getNextSibling(),Nt(s)&&(f.key=s.__key,f.offset=0)))}function Bn(f,s,d){if(f.type==="text"&&s.type==="text"){var x=f.isBefore(s);let R=f.is(s);fd(f,x,R),fd(s,!x,R),R&&(s.key=f.key,s.offset=f.offset,s.type=f.type),x=bn(),x.isComposing()&&x._compositionKey!==f.key&&It(d)&&(x=d.anchor,d=d.focus,ri(f,x.key,x.offset,x.type),ri(s,d.key,d.offset,d.type))}}function gr(f,s,d,x,R,k){return f===null||d===null||!lt(R,f,d)||(s=Lc(f,s,It(k)?k.anchor:null,R),s===null)||(x=Lc(d,x,It(k)?k.focus:null,R),x===null||s.type==="element"&&x.type==="element"&&(f=lo(f),d=lo(d),on(f)&&on(d)))?null:(Bn(s,x,k),[s,x])}function uo(f,s,d,x,R,k){let z=Zr();return f=new ki(new tr(f,s,R),new tr(d,x,k),0,""),f.dirty=!0,z._selection=f}function fo(){return new fa(new Set)}function Er(f){let s=f.getEditorState()._selection,d=co(f._window);return It(s)||s==null?Mi(s,d,f):s.clone()}function Mi(f,s,d){var x=d._window;if(x===null)return null;var R=x.event,k=R?R.type:void 0;x=k==="selectionchange",R=!st&&(x||k==="beforeinput"||k==="compositionstart"||k==="compositionend"||k==="click"&&R&&R.detail===3||k==="drop"||k===void 0);let z;if(!It(f)||R){if(s===null)return null;if(R=s.anchorNode,k=s.focusNode,z=s.anchorOffset,s=s.focusOffset,x&&It(f)&&!lt(d,R,k))return f.clone()}else return f.clone();if(d=gr(R,z,k,s,d,f),d===null)return null;let[ie,xe]=d;return new ki(ie,xe,It(f)?f.format:0,It(f)?f.style:"")}function hn(){return Zr()._selection}function ii(){return bn()._editorState._selection}function Pi(f,s,d,x=1){var R=f.anchor,k=f.focus,z=R.getNode(),ie=k.getNode();if(s.is(z)||s.is(ie)){if(z=s.__key,f.isCollapsed())s=R.offset,(d<=s&&0<x||d<s&&0>x)&&(d=Math.max(0,s+x),R.set(z,d,"element"),k.set(z,d,"element"),rs(f));else{let Re=f.isBackward();ie=Re?k:R;var xe=ie.getNode();R=Re?R:k,k=R.getNode(),s.is(xe)&&(xe=ie.offset,(d<=xe&&0<x||d<xe&&0>x)&&ie.set(z,Math.max(0,xe+x),"element")),s.is(k)&&(s=R.offset,(d<=s&&0<x||d<s&&0>x)&&R.set(z,Math.max(0,s+x),"element"))}rs(f)}}function rs(f){var s=f.anchor,d=s.offset;let x=f.focus;var R=x.offset,k=s.getNode(),z=x.getNode();if(f.isCollapsed())nt(k)&&(z=k.getChildrenSize(),z=(R=d>=z)?k.getChildAtIndex(z-1):k.getChildAtIndex(d),Nt(z)&&(d=0,R&&(d=z.getTextContentSize()),s.set(z.__key,d,"text"),x.set(z.__key,d,"text")));else{if(nt(k)){let ie=k.getChildrenSize();d=(f=d>=ie)?k.getChildAtIndex(ie-1):k.getChildAtIndex(d),Nt(d)&&(k=0,f&&(k=d.getTextContentSize()),s.set(d.__key,k,"text"))}nt(z)&&(d=z.getChildrenSize(),R=(s=R>=d)?z.getChildAtIndex(d-1):z.getChildAtIndex(R),Nt(R)&&(z=0,s&&(z=R.getTextContentSize()),x.set(R.__key,z,"text")))}}function Fc(f,s){if(s=s.getEditorState()._selection,f=f._selection,It(f)){var d=f.anchor;let x=f.focus,R;d.type==="text"&&(R=d.getNode(),R.selectionTransform(s,f)),x.type==="text"&&(d=x.getNode(),R!==d&&d.selectionTransform(s,f))}}function pa(f,s,d,x,R){let k=null,z=0,ie=null;x!==null?(k=x.__key,Nt(x)?(z=x.getTextContentSize(),ie="text"):nt(x)&&(z=x.getChildrenSize(),ie="element")):R!==null&&(k=R.__key,Nt(R)?ie="text":nt(R)&&(ie="element")),k!==null&&ie!==null?f.set(k,z,ie):(z=s.getIndexWithinParent(),z===-1&&(z=d.getChildrenSize()),f.set(d.__key,z,"element"))}function ai(f,s,d,x,R){f.type==="text"?(f.key=d,s||(f.offset+=R)):f.offset>x.getIndexWithinParent()&&--f.offset}function Oo(f,s,d){let x=[],R=null,k=null;f=f.getChildren();for(let Ve=0;Ve<f.length;Ve++){var z=f[Ve];ss(z)||B(108);var ie=z.getChildren();z=0;for(let Ze of ie){for(jr(Ze)||B(109);x[Ve]!==void 0&&x[Ve][z]!==void 0;)z++;ie=Ve;var xe=z,Re=Ze;let Ge={cell:Re,startColumn:xe,startRow:ie},Ie=Re.__rowSpan,it=Re.__colSpan;for(let yt=0;yt<Ie;yt++){x[ie+yt]===void 0&&(x[ie+yt]=[]);for(let $t=0;$t<it;$t++)x[ie+yt][xe+$t]=Ge}s.is(Re)&&(R=Ge),d.is(Re)&&(k=Ge),z+=Ze.__colSpan}}return R===null&&B(110),k===null&&B(111),[x,R,k]}function Vs(f){f instanceof zc||(f instanceof la?(f=Ms(f,jr),jr(f)||B(114)):(f=Ms(f.getNode(),jr),jr(f)||B(114)));let s=f.getParent();ss(s)||B(115);let d=s.getParent();return Gc(d)||B(116),[f,s,d]}function Ii(f){f.isCollapsed()||f.removeText();var s=f.anchor,d=s.getNode();if(!Nt(d))return s.offset;let x=d.getParent();return x?(d=d.splitText(s.offset),d.length===0?0:(s=s.offset===0?0:1,d=d[0].getIndexWithinParent()+s,!x.isInline()||d===0?d:((d=x.getChildAtIndex(d))&&x.insertNewAfter(f).append(d,...d.getNextSiblings()),x.getIndexWithinParent()+s))):(f=po(),Zn().append(f),f.select(),0)}function Ys(f){let s=po(),d=null;for(let x=0;x<f.length;x++){let R=f[x],k=Ri(R);if(k||on(R)&&R.isInline()||nt(R)&&R.isInline()||Nt(R)||R.isParentRequired()){if(d===null&&(d=R.createParentElementNode(),s.append(d),k))continue;d!==null&&d.append(R)}else s.append(R),d=null}return s}let Wn=null,yn=null,Tr=!1,qs=!1,ga=0,os={characterData:!0,childList:!0,subtree:!0};function ma(){return Tr||Wn!==null&&Wn._readOnly}function nr(){Tr&&B(13)}function Zr(){return Wn===null&&B(15),Wn}function bn(){return yn===null&&B(16),yn}function jc(f,s,d){var x=s.__type;let R=f._nodes.get(x);for(R===void 0&&B(30,x),f=d.get(x),f===void 0&&(f=Array.from(R.transforms),d.set(x,f)),d=f.length,x=0;x<d&&(f[x](s),s.isAttached());x++);}function yh(f,s){s=s._dirtyLeaves,f=f._nodeMap;for(let d of s)s=f.get(d),Nt(s)&&s.isAttached()&&s.isSimpleText()&&!s.isUnmergeable()&&tt(s)}function Zs(f,s){let d=s._dirtyLeaves,x=s._dirtyElements;f=f._nodeMap;let R=Gt(),k=new Map;var z=d;let ie=z.size;for(var xe=x,Re=xe.size;0<ie||0<Re;){if(0<ie){s._dirtyLeaves=new Set;for(let Ve of z)z=f.get(Ve),Nt(z)&&z.isAttached()&&z.isSimpleText()&&!z.isUnmergeable()&&tt(z),z!==void 0&&z!==void 0&&z.__key!==R&&z.isAttached()&&jc(s,z,k),d.add(Ve);if(z=s._dirtyLeaves,ie=z.size,0<ie){ga++;continue}}s._dirtyLeaves=new Set,s._dirtyElements=new Map;for(let Ve of xe)xe=Ve[0],Re=Ve[1],(xe==="root"||Re)&&(z=f.get(xe),z!==void 0&&z!==void 0&&z.__key!==R&&z.isAttached()&&jc(s,z,k),x.set(xe,Re));z=s._dirtyLeaves,ie=z.size,xe=s._dirtyElements,Re=xe.size,ga++}s._dirtyLeaves=d,s._dirtyElements=x}function Bc(f,s){var d=f.type,x=s.get(d);if(x===void 0&&B(17,d),d=x.klass,f.type!==d.getType()&&B(18,d.name),d=d.importJSON(f),f=f.children,nt(d)&&Array.isArray(f))for(x=0;x<f.length;x++){let R=Bc(f[x],s);d.append(R)}return d}function va(f,s){let d=Wn,x=Tr,R=yn;Wn=f,Tr=!0,yn=null;try{return s()}finally{Wn=d,Tr=x,yn=R}}function si(f,s){let d=f._pendingEditorState,x=f._rootElement,R=f._headless||x===null;if(d!==null){var k=f._editorState,z=k._selection,ie=d._selection,xe=f._dirtyType!==0,Re=Wn,Ve=Tr,Ze=yn,Ge=f._updating,Ie=f._observer,it=null;if(f._pendingEditorState=null,f._editorState=d,!R&&xe&&Ie!==null){yn=f,Wn=d,Tr=!1,f._updating=!0;try{let pn=f._dirtyType,Tt=f._dirtyElements,or=f._dirtyLeaves;Ie.disconnect();var yt=pn,$t=Tt,Ut=or;er=Co=An="",Ha=yt===2,Yr=null,fr=f,wo=f._config,Vr=f._nodes,Mn=fr._listeners.mutation,Fn=$t,Is=Ut,qr=k._nodeMap,To=d._nodeMap,Cc=d._readOnly,Ls=new Map(f._keyToDOMMap);let Br=new Map;Ga=Br,Si("root",null),Ga=Ls=wo=To=qr=Is=Fn=Vr=fr=void 0,it=Br}catch(pn){if(pn instanceof Error&&f._onError(pn),qs)throw pn;Wc(f,null,x,d),Fe(f),f._dirtyType=2,qs=!0,si(f,k),qs=!1;return}finally{Ie.observe(x,os),f._updating=Ge,Wn=Re,Tr=Ve,yn=Ze}}d._readOnly||(d._readOnly=!0);var Rn=f._dirtyLeaves,Xn=f._dirtyElements,ls=f._normalizedNodes,Sr=f._updateTags,Ro=f._deferred;xe&&(f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements=new Map,f._normalizedNodes=new Set,f._updateTags=new Set);var Qs=f._decorators,xa=f._pendingDecorators||Qs,yd=d._nodeMap,Kc;for(Kc in xa)yd.has(Kc)||(xa===Qs&&(xa=Xo(f)),delete xa[Kc]);var Jr=R?null:co(f._window);if(f._editable&&Jr!==null&&(xe||ie===null||ie.dirty)){yn=f,Wn=d;try{if(Ie!==null&&Ie.disconnect(),xe||ie===null||ie.dirty){let pn=f._blockCursorElement;pn!==null&&_c(pn,f,x);e:{let Tt=Jr.anchorNode,or=Jr.focusNode,Br=Jr.anchorOffset,ui=Jr.focusOffset,Pr=document.activeElement;if(!(Sr.has("collaboration")&&Pr!==x||Pr!==null&&et(Pr)))if(It(ie)){var Ea=ie.anchor,Ca=ie.focus,li=Ea.key,bh=Ca.key,bd=Yt(f,li),Uc=Yt(f,bh),el=Ea.offset,_d=Ca.offset,Vc=ie.format,Yc=ie.style,qc=ie.isCollapsed(),cs=bd,Xr=Uc,Un=!1;if(Ea.type==="text"){cs=Rt(bd);let ir=Ea.getNode();Un=ir.getFormat()!==Vc||ir.getStyle()!==Yc}else It(z)&&z.anchor.type==="text"&&(Un=!0);if(Ca.type==="text"&&(Xr=Rt(Uc)),cs!==null&&Xr!==null){if(qc&&(z===null||Un||It(z)&&(z.format!==Vc||z.style!==Yc))){var St=performance.now();nd=[Vc,Yc,el,li,St]}if(Br===el&&ui===_d&&Tt===cs&&or===Xr&&(Jr.type!=="Range"||!qc)&&(Pr!==null&&x.contains(Pr)||x.focus({preventScroll:!0}),Ea.type!=="element"))break e;try{Jr.setBaseAndExtent(cs,el,Xr,_d)}catch{}if(!Sr.has("skip-scroll-into-view")&&ie.isCollapsed()&&x!==null&&x===document.activeElement){let ir=ie instanceof ki&&ie.anchor.type==="element"?cs.childNodes[el]||null:0<Jr.rangeCount?Jr.getRangeAt(0):null;if(ir!==null){let mr;if(ir instanceof Text){let Ir=document.createRange();Ir.selectNode(ir),mr=Ir.getBoundingClientRect()}else mr=ir.getBoundingClientRect();let Do=x.ownerDocument,ko=Do.defaultView;if(ko!==null)for(var{top:ci,bottom:wa}=mr,us,tl,rr=x;rr!==null;){let Ir=rr===Do.body;if(Ir)us=0,tl=wn(f).innerHeight;else{let ol=rr.getBoundingClientRect();us=ol.top,tl=ol.bottom}let ji=0;if(ci<us?ji=-(us-ci):wa>tl&&(ji=wa-tl),ji!==0)if(Ir)ko.scrollBy(0,ji);else{let ol=rr.scrollTop;rr.scrollTop+=ji;let Jc=rr.scrollTop-ol;ci-=Jc,wa-=Jc}if(Ir)break;rr=mn(rr)}}}Rc=!0}}else z!==null&<(f,Tt,or)&&Jr.removeAllRanges()}}e:{let pn=f._blockCursorElement;if(It(ie)&&ie.isCollapsed()&&ie.anchor.type==="element"&&x.contains(document.activeElement)){let Tt=ie.anchor,or=Tt.getNode(),Br=Tt.offset,ui=or.getChildrenSize(),Pr=!1,ir=null;if(Br===ui){let mr=or.getChildAtIndex(Br-1);bc(mr)&&(Pr=!0)}else{let mr=or.getChildAtIndex(Br);if(bc(mr)){let Do=mr.getPreviousSibling();(Do===null||bc(Do))&&(Pr=!0,ir=f.getElementByKey(mr.__key))}}if(Pr){let mr=f.getElementByKey(or.__key);if(pn===null){let Do=f._config.theme,ko=document.createElement("div");ko.contentEditable="false",ko.setAttribute("data-lexical-cursor","true");let Ir=Do.blockCursor;if(Ir!==void 0){if(typeof Ir=="string"){let ji=Ir.split(" ");Ir=Do.blockCursor=ji}Ir!==void 0&&ko.classList.add(...Ir)}f._blockCursorElement=pn=ko}x.style.caretColor="transparent",ir===null?mr.appendChild(pn):mr.insertBefore(pn,ir);break e}}pn!==null&&_c(pn,f,x)}Ie!==null&&Ie.observe(x,os)}finally{yn=Ze,Wn=Re}}if(it!==null){var Zc=it;let pn=Array.from(f._listeners.mutation),Tt=pn.length;for(let or=0;or<Tt;or++){let[Br,ui]=pn[or],Pr=Zc.get(ui);Pr!==void 0&&Br(Pr,{dirtyLeaves:Rn,prevEditorState:k,updateTags:Sr})}}It(ie)||ie===null||z!==null&&z.is(ie)||f.dispatchCommand(e,void 0);var nl=f._pendingDecorators;nl!==null&&(f._decorators=nl,f._pendingDecorators=null,is("decorator",f,!0,nl));var xd=ra(s||k),$o=ra(d);if(xd!==$o&&is("textcontent",f,!0,$o),is("update",f,!0,{dirtyElements:Xn,dirtyLeaves:Rn,editorState:d,normalizedNodes:ls,prevEditorState:s||k,tags:Sr}),f._deferred=[],Ro.length!==0){let pn=f._updating;f._updating=!0;try{for(let Tt=0;Tt<Ro.length;Tt++)Ro[Tt]()}finally{f._updating=pn}}var rl=f._updates;if(rl.length!==0){let pn=rl.shift();if(pn){let[Tt,or]=pn;pd(f,Tt,or)}}}}function is(f,s,d,...x){let R=s._updating;s._updating=d;try{let k=Array.from(s._listeners[f]);for(f=0;f<k.length;f++)k[f].apply(null,x)}finally{s._updating=R}}function pt(f,s,d){if(f._updating===!1||yn!==f){let k=!1;return f.update(()=>{k=pt(f,s,d)}),k}let x=Ee(f);for(let k=4;0<=k;k--)for(let z=0;z<x.length;z++){var R=x[z]._commands.get(s);if(R!==void 0&&(R=R[k],R!==void 0)){R=Array.from(R);let ie=R.length;for(let xe=0;xe<ie;xe++)if(R[xe](d,f)===!0)return!0}}return!1}function hd(f,s){let d=f._updates;for(s=s||!1;d.length!==0;){var x=d.shift();if(x){let[R,k]=x,z;k!==void 0&&(x=k.onUpdate,z=k.tag,k.skipTransforms&&(s=!0),x&&f._deferred.push(x),z&&f._updateTags.add(z)),R()}}return s}function pd(f,s,d){let x=f._updateTags;var R,k=R=!1;if(d!==void 0){var z=d.onUpdate;R=d.tag,R!=null&&x.add(R),R=d.skipTransforms||!1,k=d.discrete||!1}z&&f._deferred.push(z),d=f._editorState,z=f._pendingEditorState;let ie=!1;(z===null||z._readOnly)&&(z=f._pendingEditorState=new _a(new Map((z||d)._nodeMap)),ie=!0),z._flushSync=k,k=Wn;let xe=Tr,Re=yn,Ve=f._updating;Wn=z,Tr=!1,f._updating=!0,yn=f;try{ie&&(f._headless?d._selection!=null&&(z._selection=d._selection.clone()):z._selection=Er(f));let Ze=f._compositionKey;s(),R=hd(f,R),Fc(z,f),f._dirtyType!==0&&(R?yh(z,f):Zs(z,f),hd(f),sh(d,z,f._dirtyLeaves,f._dirtyElements)),Ze!==f._compositionKey&&(z._flushSync=!0);let Ge=z._selection;if(It(Ge)){let Ie=z._nodeMap,it=Ge.focus.key;Ie.get(Ge.anchor.key)!==void 0&&Ie.get(it)!==void 0||B(19)}else oi(Ge)&&Ge._nodes.size===0&&(z._selection=null)}catch(Ze){Ze instanceof Error&&f._onError(Ze),f._pendingEditorState=d,f._dirtyType=2,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),si(f);return}finally{Wn=k,Tr=xe,yn=Re,f._updating=Ve,ga=0}f._dirtyType!==0||ba(z,f)?z._flushSync?(z._flushSync=!1,si(f)):ie&&Qe(()=>{si(f)}):(z._flushSync=!1,ie&&(x.clear(),f._deferred=[],f._pendingEditorState=null))}function Mr(f,s,d){f._updating?f._updates.push([s,d]):pd(f,s,d)}class Js extends la{constructor(s){super(s)}decorate(){B(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function on(f){return f instanceof Js}class Ao extends la{constructor(s){super(s),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let s=this.getFormat();return Pe[s]||""}getIndent(){return this.getLatest().__indent}getChildren(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getChildrenKeys(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d.__key),d=d.getNextSibling();return s}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let s=bn()._dirtyElements;return s!==null&&s.has(this.__key)}isLastChild(){let s=this.getLatest(),d=this.getParentOrThrow().getLastChild();return d!==null&&d.is(s)}getAllTextNodes(){let s=[],d=this.getFirstChild();for(;d!==null;){if(Nt(d)&&s.push(d),nt(d)){let x=d.getAllTextNodes();s.push(...x)}d=d.getNextSibling()}return s}getFirstDescendant(){let s=this.getFirstChild();for(;s!==null;){if(nt(s)){let d=s.getFirstChild();if(d!==null){s=d;continue}}break}return s}getLastDescendant(){let s=this.getLastChild();for(;s!==null;){if(nt(s)){let d=s.getLastChild();if(d!==null){s=d;continue}}break}return s}getDescendantByIndex(s){let d=this.getChildren(),x=d.length;return s>=x?(s=d[x-1],nt(s)&&s.getLastDescendant()||s||null):(s=d[s],nt(s)&&s.getFirstDescendant()||s||null)}getFirstChild(){let s=this.getLatest().__first;return s===null?null:sn(s)}getFirstChildOrThrow(){let s=this.getFirstChild();return s===null&&B(45,this.__key),s}getLastChild(){let s=this.getLatest().__last;return s===null?null:sn(s)}getLastChildOrThrow(){let s=this.getLastChild();return s===null&&B(96,this.__key),s}getChildAtIndex(s){var d=this.getChildrenSize();let x;if(s<d/2){for(x=this.getFirstChild(),d=0;x!==null&&d<=s;){if(d===s)return x;x=x.getNextSibling(),d++}return null}for(x=this.getLastChild(),--d;x!==null&&d>=s;){if(d===s)return x;x=x.getPreviousSibling(),d--}return null}getTextContent(){let s="",d=this.getChildren(),x=d.length;for(let R=0;R<x;R++){let k=d[R];s+=k.getTextContent(),nt(k)&&R!==x-1&&!k.isInline()&&(s+=`
|
|
91
|
-
|
|
92
|
-
`)}return s}getTextContentSize(){let s=0,d=this.getChildren(),x=d.length;for(let R=0;R<x;R++){let k=d[R];s+=k.getTextContentSize(),nt(k)&&R!==x-1&&!k.isInline()&&(s+=2)}return s}getDirection(){return this.getLatest().__dir}hasFormat(s){return s!==""?(s=Me[s],(this.getFormat()&s)!==0):!1}select(s,d){nr();let x=hn(),R=s,k=d;var z=this.getChildrenSize();if(!this.canBeEmpty()){if(s===0&&d===0){if(s=this.getFirstChild(),Nt(s)||nt(s))return s.select(0,0)}else if(!(s!==void 0&&s!==z||d!==void 0&&d!==z)&&(s=this.getLastChild(),Nt(s)||nt(s)))return s.select()}if(R===void 0&&(R=z),k===void 0&&(k=z),z=this.__key,It(x))x.anchor.set(z,R,"element"),x.focus.set(z,k,"element"),x.dirty=!0;else return uo(z,R,z,k,"element","element");return x}selectStart(){let s=this.getFirstDescendant();return s?s.selectStart():this.select()}selectEnd(){let s=this.getLastDescendant();return s?s.selectEnd():this.select()}clear(){let s=this.getWritable();return this.getChildren().forEach(d=>d.remove()),s}append(...s){return this.splice(this.getChildrenSize(),0,s)}setDirection(s){let d=this.getWritable();return d.__dir=s,d}setFormat(s){return this.getWritable().__format=s!==""?Me[s]:0,this}setIndent(s){return this.getWritable().__indent=s,this}splice(s,d,x){let R=x.length,k=this.getChildrenSize(),z=this.getWritable(),ie=z.__key;var xe=[],Re=[];let Ve=this.getChildAtIndex(s+d),Ze=null,Ge=k-d+R;if(s!==0)if(s===k)Ze=this.getLastChild();else{var Ie=this.getChildAtIndex(s);Ie!==null&&(Ze=Ie.getPreviousSibling())}if(0<d){var it=Ze===null?this.getFirstChild():Ze.getNextSibling();for(Ie=0;Ie<d;Ie++){it===null&&B(100);var yt=it.getNextSibling(),$t=it.__key;it=it.getWritable(),vt(it),Re.push($t),it=yt}}for(Ie=Ze,yt=0;yt<R;yt++){$t=x[yt],Ie!==null&&$t.is(Ie)&&(Ze=Ie=Ie.getPreviousSibling()),it=$t.getWritable(),it.__parent===ie&&Ge--,vt(it);let Ut=$t.__key;Ie===null?(z.__first=Ut,it.__prev=null):(Ie=Ie.getWritable(),Ie.__next=Ut,it.__prev=Ie.__key),$t.__key===ie&&B(76),it.__parent=ie,xe.push(Ut),Ie=$t}if(s+d===k?Ie!==null&&(Ie.getWritable().__next=null,z.__last=Ie.__key):Ve!==null&&(s=Ve.getWritable(),Ie!==null?(d=Ie.getWritable(),s.__prev=Ie.__key,d.__next=Ve.__key):s.__prev=null),z.__size=Ge,Re.length&&(s=hn(),It(s))){Re=new Set(Re),xe=new Set(xe);let{anchor:Ut,focus:Rn}=s;ya(Ut,Re,xe)&&pa(Ut,Ut.getNode(),this,Ze,Ve),ya(Rn,Re,xe)&&pa(Rn,Rn.getNode(),this,Ze,Ve),Ge!==0||this.canBeEmpty()||kr(this)||this.remove()}return z}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function nt(f){return f instanceof Ao}function ya(f,s,d){for(f=f.getNode();f;){let x=f.__key;if(s.has(x)&&!d.has(x))return!0;f=f.getParent()}return!1}class Li extends Ao{static getType(){return"root"}static clone(){return new Li}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){B(51)}getTextContent(){let s=this.__cachedText;return!ma()&&bn()._dirtyType!==0||s===null?super.getTextContent():s}remove(){B(52)}replace(){B(53)}insertBefore(){B(54)}insertAfter(){B(55)}updateDOM(){return!1}append(...s){for(let d=0;d<s.length;d++){let x=s[d];nt(x)||on(x)||B(56)}return super.append(...s)}static importJSON(s){let d=Zn();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Nr(f){return f instanceof Li}function ba(f,s){if(s=s.getEditorState()._selection,f=f._selection,f!==null){if(f.dirty||!f.is(s))return!0}else if(s!==null)return!0;return!1}function Fi(){return new _a(new Map([["root",new Li]]))}function Xs(f){let s=f.exportJSON();var d=f.constructor;s.type!==d.getType()&&B(130,d.name);let x=s.children;if(nt(f))for(Array.isArray(x)||B(59,d.name),f=f.getChildren(),d=0;d<f.length;d++){let R=Xs(f[d]);x.push(R)}return s}class _a{constructor(s,d){this._nodeMap=s,this._selection=d||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(s){return va(this,s)}clone(s){return s=new _a(this._nodeMap,s===void 0?this._selection:s),s._readOnly=!0,s}toJSON(){return va(this,()=>({root:Xs(Zn())}))}}class ho extends Ao{static getType(){return"paragraph"}static clone(s){return new ho(s.__key)}createDOM(s){let d=document.createElement("p");return s=xt(s.theme,"paragraph"),s!==void 0&&d.classList.add(...s),d}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:as,priority:0})}}exportDOM(s){if({element:s}=super.exportDOM(s),s&&ei(s)){this.isEmpty()&&s.append(document.createElement("br"));var d=this.getFormatType();s.style.textAlign=d,(d=this.getDirection())&&(s.dir=d),d=this.getIndent(),0<d&&(s.style.textIndent=`${20*d}px`)}return{element:s}}static importJSON(s){let d=po();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(s,d){s=po();let x=this.getDirection();return s.setDirection(x),this.insertAfter(s,d),s}collapseAtStart(){let s=this.getChildren();if(s.length===0||Nt(s[0])&&s[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function as(f){let s=po();return f.style&&(s.setFormat(f.style.textAlign),f=parseInt(f.style.textIndent,10)/20,0<f&&s.setIndent(f)),{node:s}}function po(){return Qo(new ho)}function Wc(f,s,d,x){let R=f._keyToDOMMap;R.clear(),f._editorState=Fi(),f._pendingEditorState=x,f._compositionKey=null,f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),f._normalizedNodes=new Set,f._updateTags=new Set,f._updates=[],f._blockCursorElement=null,x=f._observer,x!==null&&(x.disconnect(),f._observer=null),s!==null&&(s.textContent=""),d!==null&&(d.textContent="",R.set("root",d))}function gd(f,s){let d=new Map,x=new Set,R=k=>{Object.keys(k).forEach(z=>{let ie=d.get(z);ie===void 0&&(ie=[],d.set(z,ie)),ie.push(k[z])})};return f.forEach(k=>{k=k.klass.importDOM!=null?k.klass.importDOM.bind(k.klass):null,k==null||x.has(k)||(x.add(k),k=k(),k!==null&&R(k))}),s&&R(s),d}class md{constructor(s,d,x,R,k,z,ie){this._parentEditor=d,this._rootElement=null,this._editorState=s,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=R,this._nodes=x,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=ae(),this._onError=k,this._htmlConversions=z,this._editable=ie,this._headless=d!==null&&d._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(s){let d=this._listeners.update;return d.add(s),()=>{d.delete(s)}}registerEditableListener(s){let d=this._listeners.editable;return d.add(s),()=>{d.delete(s)}}registerDecoratorListener(s){let d=this._listeners.decorator;return d.add(s),()=>{d.delete(s)}}registerTextContentListener(s){let d=this._listeners.textcontent;return d.add(s),()=>{d.delete(s)}}registerRootListener(s){let d=this._listeners.root;return s(this._rootElement,null),d.add(s),()=>{s(null,this._rootElement),d.delete(s)}}registerCommand(s,d,x){x===void 0&&B(35);let R=this._commands;R.has(s)||R.set(s,[new Set,new Set,new Set,new Set,new Set]);let k=R.get(s);k===void 0&&B(36,String(s));let z=k[x];return z.add(d),()=>{z.delete(d),k.every(ie=>ie.size===0)&&R.delete(s)}}registerMutationListener(s,d){this._nodes.get(s.getType())===void 0&&B(37,s.name);let x=this._listeners.mutation;return x.set(d,s),()=>{x.delete(d)}}registerNodeTransformToKlass(s,d){var x=s.getType();return x=this._nodes.get(x),x===void 0&&B(37,s.name),x.transforms.add(d),x}registerNodeTransform(s,d){var x=this.registerNodeTransformToKlass(s,d);let R=[x];return x=x.replaceWithKlass,x!=null&&(x=this.registerNodeTransformToKlass(x,d),R.push(x)),wr(this,s.getType()),()=>{R.forEach(k=>k.transforms.delete(d))}}hasNode(s){return this._nodes.has(s.getType())}hasNodes(s){return s.every(this.hasNode.bind(this))}dispatchCommand(s,d){return pt(this,s,d)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(s){let d=this._rootElement;if(s!==d){let z=xt(this._config.theme,"root");var x=this._pendingEditorState||this._editorState;if(this._rootElement=s,Wc(this,d,s,x),d!==null){if(!this._config.disableEvents){Ya!==0&&(Ya--,Ya===0&&d.ownerDocument.removeEventListener("selectionchange",ld));var R=d.__lexicalEditor;if(R!=null){if(R._parentEditor!==null){var k=Ee(R);k=k[k.length-1]._key,sa.get(k)===R&&sa.delete(k)}else sa.delete(R._key);d.__lexicalEditor=null}for(R=sd(d),k=0;k<R.length;k++)R[k]();d.__lexicalEventHandles=[]}z!=null&&d.classList.remove(...z)}s!==null?(x=(x=s.ownerDocument)&&x.defaultView||null,R=s.style,R.userSelect="text",R.whiteSpace="pre-wrap",R.wordBreak="break-word",s.setAttribute("data-lexical-editor","true"),this._window=x,this._dirtyType=2,Fe(this),this._updateTags.add("history-merge"),si(this),this._config.disableEvents||gh(s,this),z!=null&&s.classList.add(...z)):(this._editorState=x,this._window=this._pendingEditorState=null),is("root",this,!1,s,d)}}getElementByKey(s){return this._keyToDOMMap.get(s)||null}getEditorState(){return this._editorState}setEditorState(s,d){s.isEmpty()&&B(38),De(this);let x=this._pendingEditorState,R=this._updateTags;d=d!==void 0?d.tag:null,x===null||x.isEmpty()||(d!=null&&R.add(d),si(this)),this._pendingEditorState=s,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,d!=null&&R.add(d),si(this)}parseEditorState(s,d){s=typeof s=="string"?JSON.parse(s):s;let x=Fi(),R=Wn,k=Tr,z=yn,ie=this._dirtyElements,xe=this._dirtyLeaves,Re=this._cloneNotNeeded,Ve=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,Wn=x,Tr=!1,yn=this;try{Bc(s.root,this._nodes),d&&d(),x._readOnly=!0}catch(Ze){Ze instanceof Error&&this._onError(Ze)}finally{this._dirtyElements=ie,this._dirtyLeaves=xe,this._cloneNotNeeded=Re,this._dirtyType=Ve,Wn=R,Tr=k,yn=z}return x}update(s,d){Mr(this,s,d)}focus(s,d={}){let x=this._rootElement;x!==null&&(x.setAttribute("autocapitalize","off"),Mr(this,()=>{let R=hn(),k=Zn();R!==null?R.dirty=!0:k.getChildrenSize()!==0&&(d.defaultSelection==="rootStart"?k.selectStart():k.selectEnd())},{onUpdate:()=>{x.removeAttribute("autocapitalize"),s&&s()},tag:"focus"}),this._pendingEditorState===null&&x.removeAttribute("autocapitalize"))}blur(){var s=this._rootElement;s!==null&&s.blur(),s=co(this._window),s!==null&&s.removeAllRanges()}isEditable(){return this._editable}setEditable(s){this._editable!==s&&(this._editable=s,is("editable",this,!0,s))}toJSON(){return{editorState:this._editorState.toJSON()}}}class zc extends Ao{constructor(s,d){super(d),this.__colSpan=s,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(s){return this.getWritable().__colSpan=s,this}getRowSpan(){return this.__rowSpan}setRowSpan(s){return this.getWritable().__rowSpan=s,this}}function jr(f){return f instanceof zc}class Hc extends Ao{}function Gc(f){return f instanceof Hc}class vd extends Ao{}function ss(f){return f instanceof vd}return Ue.$INTERNAL_isPointSelection=Fr,Ue.$addUpdateTag=function(f){nr(),bn()._updateTags.add(f)},Ue.$applyNodeReplacement=Qo,Ue.$copyNode=ia,Ue.$createLineBreakNode=Ai,Ue.$createNodeSelection=fo,Ue.$createParagraphNode=po,Ue.$createRangeSelection=function(){let f=new tr("root",0,"element"),s=new tr("root",0,"element");return new ki(f,s,0,"")},Ue.$createTabNode=Gs,Ue.$createTextNode=jn,Ue.$getAdjacentNode=At,Ue.$getNearestNodeFromDOMNode=Cr,Ue.$getNearestRootOrShadowRoot=Jn,Ue.$getNodeByKey=sn,Ue.$getPreviousSelection=ii,Ue.$getRoot=Zn,Ue.$getSelection=hn,Ue.$getTextContent=function(){let f=hn();return f===null?"":f.getTextContent()},Ue.$hasAncestor=xr,Ue.$hasUpdateTag=function(f){return bn()._updateTags.has(f)},Ue.$insertNodes=function(f){let s=hn()||ii();s===null&&(s=Zn().selectEnd()),s.insertNodes(f)},Ue.$isBlockElementNode=function(f){return nt(f)&&!f.isInline()},Ue.$isDecoratorNode=on,Ue.$isElementNode=nt,Ue.$isInlineElementOrDecoratorNode=function(f){return nt(f)&&f.isInline()||on(f)&&f.isInline()},Ue.$isLeafNode=function(f){return Nt(f)||Ri(f)||on(f)},Ue.$isLineBreakNode=Ri,Ue.$isNodeSelection=oi,Ue.$isParagraphNode=function(f){return f instanceof ho},Ue.$isRangeSelection=It,Ue.$isRootNode=Nr,Ue.$isRootOrShadowRoot=kr,Ue.$isTabNode=Pc,Ue.$isTextNode=Nt,Ue.$nodesOfType=function(f){var s=Zr();let d=s._readOnly,x=f.getType();s=s._nodeMap;let R=[];for(let[,k]of s)k instanceof f&&k.__type===x&&(d||k.isAttached())&&R.push(k);return R},Ue.$normalizeSelection__EXPERIMENTAL=ut,Ue.$parseSerializedNode=function(f){return Bc(f,bn()._nodes)},Ue.$selectAll=function(){var f=Zn();f=f.select(0,f.getChildrenSize()),_r(ut(f))},Ue.$setCompositionKey=Dt,Ue.$setSelection=_r,Ue.$splitNode=function(f,s){let d=f.getChildAtIndex(s);d==null&&(d=f),kr(f)&&B(102);let x=z=>{const ie=z.getParentOrThrow(),xe=kr(ie),Re=z!==d||xe?ia(z):z;if(xe)return z.insertAfter(Re),[z,Re,Re];const[Ve,Ze,Ge]=x(ie);return z=z.getNextSiblings(),Ge.append(Re,...z),[Ve,Ze,Re]},[R,k]=x(d);return[R,k]},Ue.BLUR_COMMAND=ee,Ue.CAN_REDO_COMMAND={},Ue.CAN_UNDO_COMMAND={},Ue.CLEAR_EDITOR_COMMAND={},Ue.CLEAR_HISTORY_COMMAND={},Ue.CLICK_COMMAND=t,Ue.COMMAND_PRIORITY_CRITICAL=4,Ue.COMMAND_PRIORITY_EDITOR=0,Ue.COMMAND_PRIORITY_HIGH=3,Ue.COMMAND_PRIORITY_LOW=1,Ue.COMMAND_PRIORITY_NORMAL=2,Ue.CONTROLLED_TEXT_INSERTION_COMMAND=i,Ue.COPY_COMMAND=te,Ue.CUT_COMMAND=he,Ue.DELETE_CHARACTER_COMMAND=n,Ue.DELETE_LINE_COMMAND=p,Ue.DELETE_WORD_COMMAND=u,Ue.DEPRECATED_$computeGridMap=Oo,Ue.DEPRECATED_$createGridSelection=function(){let f=new tr("root",0,"element"),s=new tr("root",0,"element");return new Di("root",f,s)},Ue.DEPRECATED_$getGridCellNodeRect=Ic,Ue.DEPRECATED_$getNodeTriplet=Vs,Ue.DEPRECATED_$isGridCellNode=jr,Ue.DEPRECATED_$isGridNode=Gc,Ue.DEPRECATED_$isGridRowNode=ss,Ue.DEPRECATED_$isGridSelection=ud,Ue.DEPRECATED_GridCellNode=zc,Ue.DEPRECATED_GridNode=Hc,Ue.DEPRECATED_GridRowNode=vd,Ue.DRAGEND_COMMAND=pe,Ue.DRAGOVER_COMMAND=de,Ue.DRAGSTART_COMMAND=Q,Ue.DROP_COMMAND=U,Ue.DecoratorNode=Js,Ue.ElementNode=Ao,Ue.FOCUS_COMMAND=j,Ue.FORMAT_ELEMENT_COMMAND={},Ue.FORMAT_TEXT_COMMAND=m,Ue.INDENT_CONTENT_COMMAND={},Ue.INSERT_LINE_BREAK_COMMAND=r,Ue.INSERT_PARAGRAPH_COMMAND=o,Ue.INSERT_TAB_COMMAND={},Ue.KEY_ARROW_DOWN_COMMAND=D,Ue.KEY_ARROW_LEFT_COMMAND=T,Ue.KEY_ARROW_RIGHT_COMMAND=v,Ue.KEY_ARROW_UP_COMMAND=A,Ue.KEY_BACKSPACE_COMMAND=V,Ue.KEY_DELETE_COMMAND=oe,Ue.KEY_DOWN_COMMAND=b,Ue.KEY_ENTER_COMMAND=P,Ue.KEY_ESCAPE_COMMAND=J,Ue.KEY_MODIFIER_COMMAND=ne,Ue.KEY_SPACE_COMMAND=M,Ue.KEY_TAB_COMMAND=Z,Ue.LineBreakNode=ca,Ue.MOVE_TO_END=y,Ue.MOVE_TO_START=O,Ue.OUTDENT_CONTENT_COMMAND={},Ue.PASTE_COMMAND=a,Ue.ParagraphNode=ho,Ue.REDO_COMMAND=C,Ue.REMOVE_TEXT_COMMAND=l,Ue.RootNode=Li,Ue.SELECTION_CHANGE_COMMAND=e,Ue.SELECT_ALL_COMMAND=Y,Ue.TabNode=So,Ue.TextNode=ti,Ue.UNDO_COMMAND=_,Ue.createCommand=function(){return{}},Ue.createEditor=function(f){var s=f||{},d=yn,x=s.theme||{};let R=f===void 0?d:s.parentEditor||null,k=s.disableEvents||!1,z=Fi(),ie=s.namespace||(R!==null?R._config.namespace:ae()),xe=s.editorState,Re=[Li,ti,ca,So,ho,...s.nodes||[]],{onError:Ve,html:Ze}=s;if(s=s.editable!==void 0?s.editable:!0,f===void 0&&d!==null)f=d._nodes;else for(f=new Map,d=0;d<Re.length;d++){let Ie=Re[d],it=null;var Ge=null;typeof Ie!="function"&&(Ge=Ie,Ie=Ge.replace,it=Ge.with,Ge=Ge.withKlass||null);let yt=Ie.getType(),$t=Ie.transform(),Ut=new Set;$t!==null&&Ut.add($t),f.set(yt,{exportDOM:Ze&&Ze.export?Ze.export.get(Ie):void 0,klass:Ie,replace:it,replaceWithKlass:Ge,transforms:Ut})}return x=new md(z,R,f,{disableEvents:k,namespace:ie,theme:x},Ve||console.error,gd(f,Ze?Ze.import:void 0),s),xe!==void 0&&(x._pendingEditorState=xe,x._dirtyType=2),x},Ue.getNearestEditorFromDOMNode=wt,Ue.isHTMLAnchorElement=function(f){return ei(f)&&f.tagName==="A"},Ue.isHTMLElement=ei,Ue.isSelectionCapturedInDecoratorInput=et,Ue.isSelectionWithinEditor=lt,Ue}var ay,sy;function Xt(){return sy||(sy=1,ay=process.env.NODE_ENV==="development"?AO():RO()),ay}var ly;function $O(){if(ly)return $h;ly=1;var e=ur(),t=Xt(),n=H;const r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;const i={tag:"history-merge"};function a({initialConfig:u,children:p}){const m=n.useMemo(()=>{const{theme:_,namespace:C,editor__DEPRECATED:b,nodes:v,onError:y,editorState:T,html:O}=u,A=e.createLexicalComposerContext(null,_);let D=b||null;if(D===null){const P=t.createEditor({editable:u.editable,html:O,namespace:C,nodes:v,onError:M=>y(M,P),theme:_});l(P,T),D=P}return[D,A]},[]);return o(()=>{const _=u.editable,[C]=m;C.setEditable(_!==void 0?_:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:m},p)}function l(u,p){if(p!==null){if(p===void 0)u.update(()=>{const m=t.$getRoot();if(m.isEmpty()){const _=t.$createParagraphNode();m.append(_);const C=r?document.activeElement:null;(t.$getSelection()!==null||C!==null&&C===u.getRootElement())&&_.select()}},i);else if(p!==null)switch(typeof p){case"string":{const m=u.parseEditorState(p);u.setEditorState(m,i);break}case"object":{u.setEditorState(p,i);break}case"function":{u.update(()=>{t.$getRoot().isEmpty()&&p(u)},i);break}}}}return $h.LexicalComposer=a,$h}var Dh={},cy;function DO(){if(cy)return Dh;cy=1;var e=ur(),t=Xt(),n=H;let r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};function a(l,u){if(u!==null){if(u===void 0)l.update(()=>{var p=t.$getRoot();if(p.isEmpty()){let m=t.$createParagraphNode();p.append(m),p=r?document.activeElement:null,(t.$getSelection()!==null||p!==null&&p===l.getRootElement())&&m.select()}},i);else if(u!==null)switch(typeof u){case"string":let p=l.parseEditorState(u);l.setEditorState(p,i);break;case"object":l.setEditorState(u,i);break;case"function":l.update(()=>{t.$getRoot().isEmpty()&&u(l)},i)}}}return Dh.LexicalComposer=function({initialConfig:l,children:u}){let p=n.useMemo(()=>{const{theme:m,namespace:_,editor__DEPRECATED:C,nodes:b,onError:v,editorState:y,html:T}=l,O=e.createLexicalComposerContext(null,m);let A=C||null;if(A===null){const D=t.createEditor({editable:l.editable,html:T,namespace:_,nodes:b,onError:P=>v(P,D),theme:m});a(D,y),A=D}return[A,O]},[]);return o(()=>{let m=l.editable,[_]=p;_.setEditable(m!==void 0?m:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:p},u)},Dh}process.env.NODE_ENV==="development"?$O():DO();var kh={},Mh,uy;function kO(){if(uy)return Mh;uy=1;var e=ur(),t=H,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(a){const[l]=e.useLexicalComposerContext(),u=t.useMemo(()=>a(l),[l,a]),p=t.useRef(u.initialValueFn()),[m,_]=t.useState(p.current);return n(()=>{const{initialValueFn:C,subscribe:b}=u,v=C();return p.current!==v&&(p.current=v,_(v)),b(y=>{p.current=y,_(y)})},[u,a]),m}function o(a){return{initialValueFn:()=>a.isEditable(),subscribe:l=>a.registerEditableListener(l)}}function i(){return r(o)}return Mh=i,Mh}var Ph,dy;function MO(){if(dy)return Ph;dy=1;var e=ur(),t=H,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(i){let[a]=e.useLexicalComposerContext(),l=t.useMemo(()=>i(a),[a,i]),u=t.useRef(l.initialValueFn()),[p,m]=t.useState(u.current);return n(()=>{let{initialValueFn:_,subscribe:C}=l,b=_();return u.current!==b&&(u.current=b,m(b)),C(v=>{u.current=v,m(v)})},[l,i]),p}function o(i){return{initialValueFn:()=>i.isEditable(),subscribe:a=>i.registerEditableListener(a)}}return Ph=function(){return r(o)},Ph}var fy,hy;function nE(){return hy||(hy=1,fy=process.env.NODE_ENV==="development"?kO():MO()),fy}var Hi={},py;function PO(){if(py)return Hi;py=1;var e=Xt();function t(u,p){let m=u.getFirstChild(),_=0;e:for(;m!==null;){if(e.$isElementNode(m)){const v=m.getFirstChild();if(v!==null){m=v;continue}}else if(e.$isTextNode(m)){const v=m.getTextContentSize();if(_+v>p)return{node:m,offset:p-_};_+=v}const C=m.getNextSibling();if(C!==null){m=C;continue}let b=m.getParent();for(;b!==null;){const v=b.getNextSibling();if(v!==null){m=v;continue e}b=b.getParent()}break}return null}function n(u,p=!0){if(u)return!1;let m=o();return p&&(m=m.trim()),m===""}function r(u,p){return()=>n(u,p)}function o(){return e.$getRoot().getTextContent()}function i(u){if(!n(u,!1))return!1;const p=e.$getRoot().getChildren(),m=p.length;if(m>1)return!1;for(let _=0;_<m;_++){const C=p[_];if(e.$isDecoratorNode(C))return!1;if(e.$isElementNode(C)){if(!e.$isParagraphNode(C)||C.__indent!==0)return!1;const b=C.getChildren(),v=b.length;for(let y=0;y<v;y++){const T=b[_];if(!e.$isTextNode(T))return!1}}}return!0}function a(u){return()=>i(u)}function l(u,p,m,_){const C=D=>D instanceof m,b=D=>{const P=e.$createTextNode(D.getTextContent());P.setFormat(D.getFormat()),D.replace(P)},v=D=>D.getLatest().__mode,y=D=>{if(!D.isSimpleText())return;const P=D.getPreviousSibling();let M=D.getTextContent(),V=D,J;if(e.$isTextNode(P)){const oe=P.getTextContent(),Z=oe+M,U=p(Z);if(C(P))if(U===null||v(P)!==0){b(P);return}else{const Q=U.end-oe.length;if(Q>0){const de=M.slice(0,Q),pe=oe+de;if(P.select(),P.setTextContent(pe),Q===M.length)D.remove();else{const te=M.slice(Q);D.setTextContent(te)}return}}else if(U===null||U.start<oe.length)return}for(;;){J=p(M);let oe=J===null?"":M.slice(J.end);if(M=oe,oe===""){const Q=V.getNextSibling();if(e.$isTextNode(Q)){oe=V.getTextContent()+Q.getTextContent();const de=p(oe);if(de===null){C(Q)?b(Q):Q.markDirty();return}else if(de.start!==0)return}}else{const Q=p(oe);if(Q!==null&&Q.start===0)return}if(J===null)return;if(J.start===0&&e.$isTextNode(P)&&P.isTextEntity())continue;let Z;J.start===0?[Z,V]=V.splitText(J.end):[,Z,V]=V.splitText(J.start,J.end);const U=_(Z);if(U.setFormat(Z.getFormat()),Z.replace(U),V==null)return}},T=D=>{const P=D.getTextContent(),M=p(P);if(M===null||M.start!==0){b(D);return}if(P.length>M.end){D.splitText(M.end);return}const V=D.getPreviousSibling();e.$isTextNode(V)&&V.isTextEntity()&&(b(V),b(D));const J=D.getNextSibling();e.$isTextNode(J)&&J.isTextEntity()&&(b(J),C(D)&&b(D))},O=u.registerNodeTransform(e.TextNode,y),A=u.registerNodeTransform(m,T);return[O,A]}return Hi.$canShowPlaceholder=i,Hi.$canShowPlaceholderCurry=a,Hi.$findTextIntersectionFromCharacters=t,Hi.$isRootTextContentEmpty=n,Hi.$isRootTextContentEmptyCurry=r,Hi.$rootTextContent=o,Hi.registerLexicalTextEntity=l,Hi}var Gi={},gy;function IO(){if(gy)return Gi;gy=1;var e=Xt();function t(o,i=!0){return o?!1:(o=n(),i&&(o=o.trim()),o==="")}function n(){return e.$getRoot().getTextContent()}function r(o){if(!t(o,!1))return!1;o=e.$getRoot().getChildren();let i=o.length;if(1<i)return!1;for(let l=0;l<i;l++){var a=o[l];if(e.$isDecoratorNode(a))return!1;if(e.$isElementNode(a)){if(!e.$isParagraphNode(a)||a.__indent!==0)return!1;a=a.getChildren();let u=a.length;for(let p=0;p<u;p++)if(!e.$isTextNode(a[l]))return!1}}return!0}return Gi.$canShowPlaceholder=r,Gi.$canShowPlaceholderCurry=function(o){return()=>r(o)},Gi.$findTextIntersectionFromCharacters=function(o,i){var a=o.getFirstChild();o=0;e:for(;a!==null;){if(e.$isElementNode(a)){var l=a.getFirstChild();if(l!==null){a=l;continue}}else if(e.$isTextNode(a)){if(l=a.getTextContentSize(),o+l>i)return{node:a,offset:i-o};o+=l}if(l=a.getNextSibling(),l!==null)a=l;else{for(a=a.getParent();a!==null;){if(l=a.getNextSibling(),l!==null){a=l;continue e}a=a.getParent()}break}}return null},Gi.$isRootTextContentEmpty=t,Gi.$isRootTextContentEmptyCurry=function(o,i){return()=>t(o,i)},Gi.$rootTextContent=n,Gi.registerLexicalTextEntity=function(o,i,a,l){let u=m=>{const _=e.$createTextNode(m.getTextContent());_.setFormat(m.getFormat()),m.replace(_)},p=o.registerNodeTransform(e.TextNode,m=>{if(m.isSimpleText()){var _=m.getPreviousSibling(),C=m.getTextContent(),b=m;if(e.$isTextNode(_)){var v=_.getTextContent(),y=i(v+C);if(_ instanceof a){if(y===null||_.getLatest().__mode!==0){u(_);return}if(y=y.end-v.length,0<y){b=C.slice(0,y),b=v+b,_.select(),_.setTextContent(b),y===C.length?m.remove():(_=C.slice(y),m.setTextContent(_));return}}else if(y===null||y.start<v.length)return}for(;;){if(m=i(C),C=y=m===null?"":C.slice(m.end),y===""){if(v=b.getNextSibling(),e.$isTextNode(v)){if(y=b.getTextContent()+v.getTextContent(),y=i(y),y===null){v instanceof a?u(v):v.markDirty();break}else if(y.start!==0)break}}else if(v=i(y),v!==null&&v.start===0)break;if(m===null)break;if(m.start===0&&e.$isTextNode(_)&&_.isTextEntity())continue;let T;if(m.start===0?[T,b]=b.splitText(m.end):[,T,b]=b.splitText(m.start,m.end),m=l(T),m.setFormat(T.getFormat()),T.replace(m),b==null)break}}});return o=o.registerNodeTransform(a,m=>{var _=m.getTextContent();const C=i(_);C===null||C.start!==0?u(m):_.length>C.end?m.splitText(C.end):(_=m.getPreviousSibling(),e.$isTextNode(_)&&_.isTextEntity()&&(u(_),u(m)),_=m.getNextSibling(),e.$isTextNode(_)&&_.isTextEntity()&&(u(_),m instanceof a&&u(m)))}),[p,o]},Gi}var my,vy;function rE(){return vy||(vy=1,my=process.env.NODE_ENV==="development"?PO():IO()),my}var Pn={},ar={},yy;function LO(){if(yy)return ar;yy=1;var e=Xt();const t=new Map;function n(Y){let j=Y;for(;j!=null;){if(j.nodeType===Node.TEXT_NODE)return j;j=j.firstChild}return null}function r(Y){const j=Y.parentNode;if(j==null)throw new Error("Should never happen");return[j,Array.from(j.childNodes).indexOf(Y)]}function o(Y,j,ee,ne,B){const W=j.getKey(),X=ne.getKey(),F=document.createRange();let w=Y.getElementByKey(W),N=Y.getElementByKey(X),I=ee,q=B;if(e.$isTextNode(j)&&(w=n(w)),e.$isTextNode(ne)&&(N=n(N)),j===void 0||ne===void 0||w===null||N===null)return null;w.nodeName==="BR"&&([w,I]=r(w)),N.nodeName==="BR"&&([N,q]=r(N));const ue=w.firstChild;w===N&&ue!=null&&ue.nodeName==="BR"&&I===0&&q===0&&(q=1);try{F.setStart(w,I),F.setEnd(N,q)}catch{return null}return F.collapsed&&(I!==q||W!==X)&&(F.setStart(N,q),F.setEnd(w,I)),F}function i(Y,j){const ee=Y.getRootElement();if(ee===null)return[];const ne=ee.getBoundingClientRect(),B=getComputedStyle(ee),W=parseFloat(B.paddingLeft)+parseFloat(B.paddingRight),X=Array.from(j.getClientRects());let F=X.length;X.sort((N,I)=>{const q=N.top-I.top;return Math.abs(q)<=3?N.left-I.left:q});let w;for(let N=0;N<F;N++){const I=X[N],q=w&&w.top<=I.top&&w.top+w.height>I.top&&w.left+w.width>I.left,ue=I.width+W===ne.width;if(q||ue){X.splice(N--,1),F--;continue}w=I}return X}function a(Y){const j={},ee=Y.split(";");for(const ne of ee)if(ne!==""){const[B,W]=ne.split(/:([^]+)/);B&&W&&(j[B.trim()]=W.trim())}return j}function l(Y){let j=t.get(Y);return j===void 0&&(j=a(Y),t.set(Y,j)),Object.freeze(j),j}function u(Y){let j="";for(const ee in Y)ee&&(j+=`${ee}: ${Y[ee]};`);return j}function p(Y,j){return Y.__first=j.__first,Y.__last=j.__last,Y.__size=j.__size,Y.__format=j.__format,Y.__indent=j.__indent,Y.__dir=j.__dir,Y}function m(Y,j){return Y.__format=j.__format,Y.__style=j.__style,Y.__mode=j.__mode,Y.__detail=j.__detail,Y}function _(Y){const j=Y.constructor.clone(Y);return j.__parent=Y.__parent,j.__next=Y.__next,j.__prev=Y.__prev,e.$isElementNode(Y)&&e.$isElementNode(j)?p(j,Y):e.$isTextNode(Y)&&e.$isTextNode(j)?m(j,Y):j}function C(Y,j){if(j.isSelected()&&!j.isSegmented()&&!j.isToken()&&e.$INTERNAL_isPointSelection(Y)){const ee=Y.anchor.getNode(),ne=Y.focus.getNode(),B=j.is(ee),W=j.is(ne);if(B||W){const X=Y.isBackward(),[F,w]=Y.getCharacterOffsets(),N=ee.is(ne),I=j.is(X?ne:ee),q=j.is(X?ee:ne);let ue=0,fe;if(N)ue=F>w?w:F,fe=F>w?F:w;else if(I)ue=X?w:F,fe=void 0;else if(q){const se=X?F:w;ue=0,fe=se}return j.__text=j.__text.slice(ue,fe),j}}return j}function b(Y){return Y.type==="text"?Y.offset===Y.getNode().getTextContentSize():Y.offset===Y.getNode().getChildrenSize()}function v(Y,j,ee){let ne=j.getNode(),B=ee;if(e.$isElementNode(ne)){const W=ne.getDescendantByIndex(j.offset);W!==null&&(ne=W)}for(;B>0&&ne!==null;){if(e.$isElementNode(ne)){const N=ne.getLastDescendant();N!==null&&(ne=N)}let W=ne.getPreviousSibling(),X=0;if(W===null){let N=ne.getParentOrThrow(),I=N.getPreviousSibling();for(;I===null;){if(N=N.getParent(),N===null){W=null;break}I=N.getPreviousSibling()}N!==null&&(X=N.isInline()?0:2,W=I)}let F=ne.getTextContent();F===""&&e.$isElementNode(ne)&&!ne.isInline()&&(F=`
|
|
93
|
-
|
|
94
|
-
`);const w=F.length;if(!e.$isTextNode(ne)||B>=w){const N=ne.getParent();ne.remove(),N!=null&&N.getChildrenSize()===0&&!e.$isRootNode(N)&&N.remove(),B-=w+X,ne=W}else{const N=ne.getKey(),I=Y.getEditorState().read(()=>{const fe=e.$getNodeByKey(N);return e.$isTextNode(fe)&&fe.isSimpleText()?fe.getTextContent():null}),q=w-B,ue=F.slice(0,q);if(I!==null&&I!==F){const fe=e.$getPreviousSelection();let se=ne;if(ne.isSimpleText())ne.setTextContent(I);else{const Ce=e.$createTextNode(I);ne.replace(Ce),se=Ce}if(e.$isRangeSelection(fe)&&fe.isCollapsed()){const Ce=fe.anchor.offset;se.select(Ce,Ce)}}else if(ne.isSimpleText()){const fe=j.key===N;let se=j.offset;se<B&&(se=w);const Ce=fe?se-B:0,Oe=fe?se:q;if(fe&&Ce===0){const[Be]=ne.splitText(Ce,Oe);Be.remove()}else{const[,Be]=ne.splitText(Ce,Oe);Be.remove()}}else{const fe=e.$createTextNode(ue);ne.replace(fe)}B=0}}}function y(Y){const j=Y.getStyle(),ee=a(j);t.set(j,ee)}function T(Y,j){const ee=l("getStyle"in Y?Y.getStyle():Y.style),ne=Object.entries(j).reduce((W,[X,F])=>(F===null?delete W[X]:W[X]=F,W),{...ee}),B=u(ne);Y.setStyle(B),t.set(B,ne)}function O(Y,j){const ee=Y.getNodes(),ne=ee.length;if(e.DEPRECATED_$isGridSelection(Y)){const ce=e.$createRangeSelection(),le=ce.anchor,ye=ce.focus;for(let Me=0;Me<ne;Me++){const Pe=ee[Me];e.DEPRECATED_$isGridCellNode(Pe)&&(le.set(Pe.getKey(),0,"element"),ye.set(Pe.getKey(),Pe.getChildrenSize(),"element"),O(e.$normalizeSelection__EXPERIMENTAL(ce),j))}e.$setSelection(Y);return}const B=ne-1;let W=ee[0],X=ee[B];if(Y.isCollapsed()&&e.$isRangeSelection(Y)){T(Y,j);return}const F=Y.anchor,w=Y.focus,N=W.getTextContent().length,I=w.offset;let q=F.offset;const ue=F.isBefore(w);let fe=ue?q:I,se=ue?I:q;const Ce=ue?F.type:w.type,Oe=ue?w.type:F.type,Be=ue?w.key:F.key;if(e.$isTextNode(W)&&fe===N){const ce=W.getNextSibling();e.$isTextNode(ce)&&(q=0,fe=0,W=ce)}if(ee.length===1){if(e.$isTextNode(W)){if(fe=Ce==="element"?0:q>I?I:q,se=Oe==="element"?N:q>I?q:I,fe===se)return;if(fe===0&&se===N)T(W,j),W.select(fe,se);else{const ce=W.splitText(fe,se),le=fe===0?ce[0]:ce[1];T(le,j),le.select(0,se-fe)}}}else{if(e.$isTextNode(W)&&fe<W.getTextContentSize()&&(fe!==0&&(W=W.splitText(fe)[1],fe=0,F.set(W.getKey(),fe,"text")),T(W,j)),e.$isTextNode(X)){const ce=X.getTextContent().length;X.__key!==Be&&se!==0&&(se=ce),se!==ce&&([X]=X.splitText(se)),se!==0&&T(X,j)}for(let ce=1;ce<B;ce++){const le=ee[ce],ye=le.getKey();e.$isTextNode(le)&&ye!==W.getKey()&&ye!==X.getKey()&&!le.isToken()&&T(le,j)}}}function A(Y,j){if(Y.anchor.key==="root"){const B=j(),W=e.$getRoot(),X=W.getFirstChild();X?X.replace(B,!0):W.append(B);return}const ee=Y.getNodes(),ne=he(Y.anchor.getNode(),te);ne&&ee.indexOf(ne)===-1&&ee.push(ne);for(let B=0;B<ee.length;B++){const W=ee[B];if(!te(W))continue;const X=j();X.setFormat(W.getFormatType()),X.setIndent(W.getIndent()),W.replace(X,!0)}}function D(Y){return Y.getNode().isAttached()}function P(Y){let j=Y;for(;j!==null&&!e.$isRootOrShadowRoot(j);){const ee=j.getLatest(),ne=j.getParent();ee.getChildrenSize()===0&&j.remove(!0),j=ne}}function M(Y,j,ee=null){const ne=Y.getNodes(),B=ne.length,W=Y.anchor;if(B===0||B===1&&W.type==="element"&&W.getNode().getChildrenSize()===0){const w=W.type==="text"?W.getNode().getParentOrThrow():W.getNode(),N=w.getChildren();let I=j();I.setFormat(w.getFormatType()),I.setIndent(w.getIndent()),N.forEach(q=>I.append(q)),ee&&(I=ee.append(I)),w.replace(I);return}let X=null,F=[];for(let w=0;w<B;w++){const N=ne[w];e.$isRootOrShadowRoot(N)?(V(Y,F,F.length,j,ee),F=[],X=N):X===null||X!==null&&e.$hasAncestor(N,X)?F.push(N):(V(Y,F,F.length,j,ee),F=[N])}V(Y,F,F.length,j,ee)}function V(Y,j,ee,ne,B=null){if(j.length===0)return;const W=j[0],X=new Map,F=[];let w=e.$isElementNode(W)?W:W.getParentOrThrow();w.isInline()&&(w=w.getParentOrThrow());let N=!1;for(;w!==null;){const se=w.getPreviousSibling();if(se!==null){w=se,N=!0;break}if(w=w.getParentOrThrow(),e.$isRootOrShadowRoot(w))break}const I=new Set;for(let se=0;se<ee;se++){const Ce=j[se];e.$isElementNode(Ce)&&Ce.getChildrenSize()===0&&I.add(Ce.getKey())}const q=new Set;for(let se=0;se<ee;se++){const Ce=j[se];let Oe=Ce.getParent();if(Oe!==null&&Oe.isInline()&&(Oe=Oe.getParent()),Oe!==null&&e.$isLeafNode(Ce)&&!q.has(Ce.getKey())){const Be=Oe.getKey();if(X.get(Be)===void 0){const ce=ne();ce.setFormat(Oe.getFormatType()),ce.setIndent(Oe.getIndent()),F.push(ce),X.set(Be,ce),Oe.getChildren().forEach(le=>{ce.append(le),q.add(le.getKey()),e.$isElementNode(le)&&le.getChildrenKeys().forEach(ye=>q.add(ye))}),P(Oe)}}else if(I.has(Ce.getKey())){const Be=ne();Be.setFormat(Ce.getFormatType()),Be.setIndent(Ce.getIndent()),F.push(Be),Ce.remove(!0)}}if(B!==null)for(let se=0;se<F.length;se++){const Ce=F[se];B.append(Ce)}let ue=null;if(e.$isRootOrShadowRoot(w))if(N)if(B!==null)w.insertAfter(B);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce)}else{const se=w.getFirstChild();if(e.$isElementNode(se)&&(w=se),se===null)if(B)w.append(B);else for(let Ce=0;Ce<F.length;Ce++){const Oe=F[Ce];w.append(Oe),ue=Oe}else if(B!==null)se.insertBefore(B);else for(let Ce=0;Ce<F.length;Ce++){const Oe=F[Ce];se.insertBefore(Oe),ue=Oe}}else if(B)w.insertAfter(B);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce),ue=Ce}const fe=e.$getPreviousSelection();e.$isRangeSelection(fe)&&D(fe.anchor)&&D(fe.focus)?e.$setSelection(fe.clone()):ue!==null?ue.selectEnd():Y.dirty=!0}function J(Y,j){const ee=e.$getAdjacentNode(Y.focus,j);return e.$isDecoratorNode(ee)&&!ee.isIsolated()||e.$isElementNode(ee)&&!ee.isInline()&&!ee.canBeEmpty()}function oe(Y,j,ee,ne){Y.modify(j?"extend":"move",ee,ne)}function Z(Y){const j=Y.anchor.getNode();return(e.$isRootNode(j)?j:j.getParentOrThrow()).getDirection()==="rtl"}function U(Y,j,ee){const ne=Z(Y);oe(Y,j,ee?!ne:ne,"character")}function Q(Y){const j=Y.anchor,ee=Y.focus,ne=j.getNode().getTopLevelElementOrThrow().getParentOrThrow();let B=ne.getFirstDescendant(),W=ne.getLastDescendant(),X="element",F="element",w=0;e.$isTextNode(B)?X="text":!e.$isElementNode(B)&&B!==null&&(B=B.getParentOrThrow()),e.$isTextNode(W)?(F="text",w=W.getTextContentSize()):!e.$isElementNode(W)&&W!==null&&(W=W.getParentOrThrow()),B&&W&&(j.set(B.getKey(),0,X),ee.set(W.getKey(),w,F))}function de(Y,j,ee){const ne=Y.getStyle(),B=l(ne);return B!==null&&B[j]||ee}function pe(Y,j,ee=""){let ne=null;const B=Y.getNodes(),W=Y.anchor,X=Y.focus,F=Y.isBackward(),w=F?X.offset:W.offset,N=F?X.getNode():W.getNode();if(Y.isCollapsed()&&Y.style!==""){const I=Y.style,q=l(I);if(q!==null&&j in q)return q[j]}for(let I=0;I<B.length;I++){const q=B[I];if(!(I!==0&&w===0&&q.is(N))&&e.$isTextNode(q)){const ue=de(q,j,ee);if(ne===null)ne=ue;else if(ne!==ue){ne="";break}}}return ne===null?ee:ne}function te(Y){if(e.$isDecoratorNode(Y)&&!Y.isInline())return!0;if(!e.$isElementNode(Y)||e.$isRootOrShadowRoot(Y))return!1;const j=Y.getFirstChild(),ee=j===null||e.$isLineBreakNode(j)||e.$isTextNode(j)||j.isInline();return!Y.isInline()&&Y.canBeEmpty()!==!1&&ee}function he(Y,j){let ee=Y;for(;ee!==null&&ee.getParent()!==null&&!j(ee);)ee=ee.getParentOrThrow();return j(ee)?ee:null}return ar.$addNodeStyle=y,ar.$cloneWithProperties=_,ar.$getSelectionStyleValueForProperty=pe,ar.$isAtNodeEnd=b,ar.$isParentElementRTL=Z,ar.$moveCaretSelection=oe,ar.$moveCharacter=U,ar.$patchStyleText=O,ar.$selectAll=Q,ar.$setBlocksType=A,ar.$shouldOverrideDefaultCharacterSelection=J,ar.$sliceSelectedTextNodeContent=C,ar.$wrapNodes=M,ar.createDOMRange=o,ar.createRectsFromDOMRange=i,ar.getStyleObjectFromCSS=l,ar.trimTextContentFromAnchor=v,ar}var sr={},by;function FO(){if(by)return sr;by=1;var e=Xt();let t=new Map;function n(v){for(;v!=null;){if(v.nodeType===Node.TEXT_NODE)return v;v=v.firstChild}return null}function r(v){let y=v.parentNode;if(y==null)throw Error("Should never happen");return[y,Array.from(y.childNodes).indexOf(v)]}function o(v){let y={};v=v.split(";");for(let T of v)if(T!==""){let[O,A]=T.split(/:([^]+)/);O&&A&&(y[O.trim()]=A.trim())}return y}function i(v){let y=t.get(v);return y===void 0&&(y=o(v),t.set(v,y)),y}function a(v){let y="";for(let T in v)T&&(y+=`${T}: ${v[T]};`);return y}function l(v,y){var T=i("getStyle"in v?v.getStyle():v.style);y=Object.entries(y).reduce((O,[A,D])=>(D===null?delete O[A]:O[A]=D,O),{...T}),T=a(y),v.setStyle(T),t.set(T,y)}function u(v,y){var T=v.getNodes(),O=T.length;if(e.DEPRECATED_$isGridSelection(v)){for(var A=e.$createRangeSelection(),D=A.anchor,P=A.focus,M=0;M<O;M++){var V=T[M];e.DEPRECATED_$isGridCellNode(V)&&(D.set(V.getKey(),0,"element"),P.set(V.getKey(),V.getChildrenSize(),"element"),u(e.$normalizeSelection__EXPERIMENTAL(A),y))}e.$setSelection(v)}else if(--O,A=T[0],D=T[O],v.isCollapsed()&&e.$isRangeSelection(v))l(v,y);else{M=v.anchor;var J=v.focus;V=A.getTextContent().length;var oe=J.offset,Z=M.offset,U=M.isBefore(J);P=U?Z:oe,v=U?oe:Z;var Q=U?M.type:J.type,de=U?J.type:M.type;if(J=U?J.key:M.key,e.$isTextNode(A)&&P===V&&(U=A.getNextSibling(),e.$isTextNode(U)&&(P=Z=0,A=U)),T.length===1)e.$isTextNode(A)&&(P=Q==="element"?0:Z>oe?oe:Z,v=de==="element"?V:Z>oe?Z:oe,P!==v&&(P===0&&v===V?(l(A,y),A.select(P,v)):(T=A.splitText(P,v),T=P===0?T[0]:T[1],l(T,y),T.select(0,v-P))));else for(e.$isTextNode(A)&&P<A.getTextContentSize()&&(P!==0&&(A=A.splitText(P)[1],P=0,M.set(A.getKey(),P,"text")),l(A,y)),e.$isTextNode(D)&&(P=D.getTextContent().length,D.__key!==J&&v!==0&&(v=P),v!==P&&([D]=D.splitText(v)),v!==0&&l(D,y)),v=1;v<O;v++)P=T[v],M=P.getKey(),e.$isTextNode(P)&&M!==A.getKey()&&M!==D.getKey()&&!P.isToken()&&l(P,y)}}function p(v){for(;v!==null&&!e.$isRootOrShadowRoot(v);){let y=v.getLatest(),T=v.getParent();y.getChildrenSize()===0&&v.remove(!0),v=T}}function m(v,y,T,O,A=null){if(y.length!==0){var D=y[0],P=new Map,M=[];D=e.$isElementNode(D)?D:D.getParentOrThrow(),D.isInline()&&(D=D.getParentOrThrow());for(var V=!1;D!==null;){var J=D.getPreviousSibling();if(J!==null){D=J,V=!0;break}if(D=D.getParentOrThrow(),e.$isRootOrShadowRoot(D))break}J=new Set;for(var oe=0;oe<T;oe++){var Z=y[oe];e.$isElementNode(Z)&&Z.getChildrenSize()===0&&J.add(Z.getKey())}var U=new Set;for(oe=0;oe<T;oe++){Z=y[oe];var Q=Z.getParent();if(Q!==null&&Q.isInline()&&(Q=Q.getParent()),Q!==null&&e.$isLeafNode(Z)&&!U.has(Z.getKey())){if(Z=Q.getKey(),P.get(Z)===void 0){let de=O();de.setFormat(Q.getFormatType()),de.setIndent(Q.getIndent()),M.push(de),P.set(Z,de),Q.getChildren().forEach(pe=>{de.append(pe),U.add(pe.getKey()),e.$isElementNode(pe)&&pe.getChildrenKeys().forEach(te=>U.add(te))}),p(Q)}}else J.has(Z.getKey())&&(Q=O(),Q.setFormat(Z.getFormatType()),Q.setIndent(Z.getIndent()),M.push(Q),Z.remove(!0))}if(A!==null)for(y=0;y<M.length;y++)A.append(M[y]);if(y=null,e.$isRootOrShadowRoot(D))if(V)if(A!==null)D.insertAfter(A);else for(A=M.length-1;0<=A;A--)D.insertAfter(M[A]);else if(V=D.getFirstChild(),e.$isElementNode(V)&&(D=V),V===null)if(A)D.append(A);else for(A=0;A<M.length;A++)V=M[A],D.append(V),y=V;else if(A!==null)V.insertBefore(A);else for(D=0;D<M.length;D++)A=M[D],V.insertBefore(A),y=A;else if(A)D.insertAfter(A);else for(A=M.length-1;0<=A;A--)V=M[A],D.insertAfter(V),y=V;M=e.$getPreviousSelection(),e.$isRangeSelection(M)&&M.anchor.getNode().isAttached()&&M.focus.getNode().isAttached()?e.$setSelection(M.clone()):y!==null?y.selectEnd():v.dirty=!0}}function _(v,y,T,O){v.modify(y?"extend":"move",T,O)}function C(v){return v=v.anchor.getNode(),(e.$isRootNode(v)?v:v.getParentOrThrow()).getDirection()==="rtl"}function b(v){if(e.$isDecoratorNode(v)&&!v.isInline())return!0;if(!e.$isElementNode(v)||e.$isRootOrShadowRoot(v))return!1;var y=v.getFirstChild();return y=y===null||e.$isLineBreakNode(y)||e.$isTextNode(y)||y.isInline(),!v.isInline()&&v.canBeEmpty()!==!1&&y}return sr.$addNodeStyle=function(v){v=v.getStyle();let y=o(v);t.set(v,y)},sr.$cloneWithProperties=function(v){let y=v.constructor.clone(v);return y.__parent=v.__parent,y.__next=v.__next,y.__prev=v.__prev,e.$isElementNode(v)&&e.$isElementNode(y)?(y.__first=v.__first,y.__last=v.__last,y.__size=v.__size,y.__format=v.__format,y.__indent=v.__indent,y.__dir=v.__dir,y):(e.$isTextNode(v)&&e.$isTextNode(y)&&(y.__format=v.__format,y.__style=v.__style,y.__mode=v.__mode,y.__detail=v.__detail),y)},sr.$getSelectionStyleValueForProperty=function(v,y,T=""){let O=null,A=v.getNodes();var D=v.anchor,P=v.focus,M=v.isBackward();let V=M?P.offset:D.offset;if(D=M?P.getNode():D.getNode(),v.isCollapsed()&&v.style!==""&&(v=i(v.style),v!==null&&y in v))return v[y];for(v=0;v<A.length;v++){var J=A[v];if((v===0||V!==0||!J.is(D))&&e.$isTextNode(J)){if(P=y,M=T,J=J.getStyle(),J=i(J),P=J!==null&&J[P]||M,O===null)O=P;else if(O!==P){O="";break}}}return O===null?T:O},sr.$isAtNodeEnd=function(v){return v.type==="text"?v.offset===v.getNode().getTextContentSize():v.offset===v.getNode().getChildrenSize()},sr.$isParentElementRTL=C,sr.$moveCaretSelection=_,sr.$moveCharacter=function(v,y,T){let O=C(v);_(v,y,T?!O:O,"character")},sr.$patchStyleText=u,sr.$selectAll=function(v){let y=v.anchor;v=v.focus;var T=y.getNode().getTopLevelElementOrThrow().getParentOrThrow();let O=T.getFirstDescendant();T=T.getLastDescendant();let A="element",D="element",P=0;e.$isTextNode(O)?A="text":e.$isElementNode(O)||O===null||(O=O.getParentOrThrow()),e.$isTextNode(T)?(D="text",P=T.getTextContentSize()):e.$isElementNode(T)||T===null||(T=T.getParentOrThrow()),O&&T&&(y.set(O.getKey(),0,A),v.set(T.getKey(),P,D))},sr.$setBlocksType=function(v,y){if(v.anchor.key==="root"){y=y();var T=e.$getRoot();(v=T.getFirstChild())?v.replace(y,!0):T.append(y)}else{for(T=v.getNodes(),v=v.anchor.getNode();v!==null&&v.getParent()!==null&&!b(v);)v=v.getParentOrThrow();for((v=b(v)?v:null)&&T.indexOf(v)===-1&&T.push(v),v=0;v<T.length;v++){let O=T[v];if(!b(O))continue;let A=y();A.setFormat(O.getFormatType()),A.setIndent(O.getIndent()),O.replace(A,!0)}}},sr.$shouldOverrideDefaultCharacterSelection=function(v,y){return v=e.$getAdjacentNode(v.focus,y),e.$isDecoratorNode(v)&&!v.isIsolated()||e.$isElementNode(v)&&!v.isInline()&&!v.canBeEmpty()},sr.$sliceSelectedTextNodeContent=function(v,y){if(y.isSelected()&&!y.isSegmented()&&!y.isToken()&&e.$INTERNAL_isPointSelection(v)){var T=v.anchor.getNode(),O=v.focus.getNode(),A=y.is(T),D=y.is(O);if(A||D){A=v.isBackward();let[P,M]=v.getCharacterOffsets();v=T.is(O),D=y.is(A?O:T),O=y.is(A?T:O),T=0;let V;v?(T=P>M?M:P,V=P>M?P:M):D?(T=A?M:P,V=void 0):O&&(A=A?P:M,T=0,V=A),y.__text=y.__text.slice(T,V)}}return y},sr.$wrapNodes=function(v,y,T=null){var O=v.getNodes();let A=O.length;var D=v.anchor;if(A===0||A===1&&D.type==="element"&&D.getNode().getChildrenSize()===0){v=D.type==="text"?D.getNode().getParentOrThrow():D.getNode(),O=v.getChildren();let M=y();M.setFormat(v.getFormatType()),M.setIndent(v.getIndent()),O.forEach(V=>M.append(V)),T&&(M=T.append(M)),v.replace(M)}else{D=null;var P=[];for(let M=0;M<A;M++){let V=O[M];e.$isRootOrShadowRoot(V)?(m(v,P,P.length,y,T),P=[],D=V):D===null||D!==null&&e.$hasAncestor(V,D)?P.push(V):(m(v,P,P.length,y,T),P=[V])}m(v,P,P.length,y,T)}},sr.createDOMRange=function(v,y,T,O,A){let D=y.getKey(),P=O.getKey(),M=document.createRange(),V=v.getElementByKey(D);if(v=v.getElementByKey(P),e.$isTextNode(y)&&(V=n(V)),e.$isTextNode(O)&&(v=n(v)),y===void 0||O===void 0||V===null||v===null)return null;V.nodeName==="BR"&&([V,T]=r(V)),v.nodeName==="BR"&&([v,A]=r(v)),y=V.firstChild,V===v&&y!=null&&y.nodeName==="BR"&&T===0&&A===0&&(A=1);try{M.setStart(V,T),M.setEnd(v,A)}catch{return null}return!M.collapsed||T===A&&D===P||(M.setStart(v,A),M.setEnd(V,T)),M},sr.createRectsFromDOMRange=function(v,y){var T=v.getRootElement();if(T===null)return[];v=T.getBoundingClientRect(),T=getComputedStyle(T),T=parseFloat(T.paddingLeft)+parseFloat(T.paddingRight),y=Array.from(y.getClientRects());let O=y.length;y.sort((D,P)=>{let M=D.top-P.top;return 3>=Math.abs(M)?D.left-P.left:M});let A;for(let D=0;D<O;D++){let P=y[D],M=P.width+T===v.width;A&&A.top<=P.top&&A.top+A.height>P.top&&A.left+A.width>P.left||M?(y.splice(D--,1),O--):A=P}return y},sr.getStyleObjectFromCSS=i,sr.trimTextContentFromAnchor=function(v,y,T){let O=y.getNode();if(e.$isElementNode(O)){var A=O.getDescendantByIndex(y.offset);A!==null&&(O=A)}for(;0<T&&O!==null;){e.$isElementNode(O)&&(A=O.getLastDescendant(),A!==null&&(O=A));var D=O.getPreviousSibling(),P=0;if(D===null){A=O.getParentOrThrow();for(var M=A.getPreviousSibling();M===null;){if(A=A.getParent(),A===null){D=null;break}M=A.getPreviousSibling()}A!==null&&(P=A.isInline()?0:2,D=M)}if(M=O.getTextContent(),M===""&&e.$isElementNode(O)&&!O.isInline()&&(M=`
|
|
95
|
-
|
|
96
|
-
`),A=M.length,!e.$isTextNode(O)||T>=A)M=O.getParent(),O.remove(),M==null||M.getChildrenSize()!==0||e.$isRootNode(M)||M.remove(),T-=A+P,O=D;else{let V=O.getKey();P=v.getEditorState().read(()=>{const oe=e.$getNodeByKey(V);return e.$isTextNode(oe)&&oe.isSimpleText()?oe.getTextContent():null}),D=A-T;let J=M.slice(0,D);P!==null&&P!==M?(T=e.$getPreviousSelection(),A=O,O.isSimpleText()?O.setTextContent(P):(A=e.$createTextNode(P),O.replace(A)),e.$isRangeSelection(T)&&T.isCollapsed()&&(T=T.anchor.offset,A.select(T,T))):O.isSimpleText()?(P=y.key===V,M=y.offset,M<T&&(M=A),T=P?M-T:0,A=P?M:D,P&&T===0?([T]=O.splitText(T,A),T.remove()):([,T]=O.splitText(T,A),T.remove())):(T=e.$createTextNode(J),O.replace(T)),T=0}}},sr}var _y,xy;function Ba(){return xy||(xy=1,_y=process.env.NODE_ENV==="development"?LO():FO()),_y}var Ey;function jO(){if(Ey)return Pn;Ey=1;var e=Ba(),t=Xt();function n(...J){return()=>{J.forEach(oe=>oe())}}function r(J){return`${J}px`}const o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(J,oe,Z){let U=null,Q=null,de=null,pe=[];const te=document.createElement("div");function he(){if(U===null)throw Error("Unexpected null rootDOMNode");if(Q===null)throw Error("Unexpected null parentDOMNode");const{left:ne,top:B}=U.getBoundingClientRect(),W=Q,X=e.createRectsFromDOMRange(J,oe);te.isConnected||W.append(te);let F=!1;for(let w=0;w<X.length;w++){const N=X[w],I=pe[w]||document.createElement("div"),q=I.style;q.position!=="absolute"&&(q.position="absolute",F=!0);const ue=r(N.left-ne);q.left!==ue&&(q.left=ue,F=!0);const fe=r(N.top-B);q.top!==fe&&(I.style.top=fe,F=!0);const se=r(N.width);q.width!==se&&(I.style.width=se,F=!0);const Ce=r(N.height);q.height!==Ce&&(I.style.height=Ce,F=!0),I.parentNode!==te&&(te.append(I),F=!0),pe[w]=I}for(;pe.length>X.length;)pe.pop();F&&Z(pe)}function Y(){Q=null,U=null,de!==null&&de.disconnect(),de=null,te.remove();for(const ne of pe)ne.remove();pe=[]}function j(){const ne=J.getRootElement();if(ne===null)return Y();const B=ne.parentElement;if(!(B instanceof HTMLElement))return Y();Y(),U=ne,Q=B,de=new MutationObserver(W=>{const X=J.getRootElement(),F=X&&X.parentElement;if(X!==U||F!==Q)return j();for(const w of W)if(!te.contains(w.target))return he()}),de.observe(B,o),he()}const ee=J.registerRootListener(j);return()=>{ee(),Y()}}function a(J,oe){let Z=null,U=null,Q=null,de=null,pe=()=>{};function te(he){he.read(()=>{const Y=t.$getSelection();if(!t.$isRangeSelection(Y)){Z=null,U=null,Q=null,de=null,pe(),pe=()=>{};return}const{anchor:j,focus:ee}=Y,ne=j.getNode(),B=ne.getKey(),W=j.offset,X=ee.getNode(),F=X.getKey(),w=ee.offset,N=J.getElementByKey(B),I=J.getElementByKey(F),q=Z===null||N===null||W!==U||B!==Z.getKey()||ne!==Z&&(!(Z instanceof t.TextNode)||ne.updateDOM(Z,N,J._config)),ue=Q===null||I===null||w!==de||F!==Q.getKey()||X!==Q&&(!(Q instanceof t.TextNode)||X.updateDOM(Q,I,J._config));if(q||ue){const fe=J.getElementByKey(j.getNode().getKey()),se=J.getElementByKey(ee.getNode().getKey());if(fe!==null&&se!==null&&fe.tagName==="SPAN"&&se.tagName==="SPAN"){const Ce=document.createRange();let Oe,Be,ce,le;ee.isBefore(j)?(Oe=se,Be=ee.offset,ce=fe,le=j.offset):(Oe=fe,Be=j.offset,ce=se,le=ee.offset);const ye=Oe.firstChild;if(ye===null)throw Error("Expected text node to be first child of span");const Me=ce.firstChild;if(Me===null)throw Error("Expected text node to be first child of span");Ce.setStart(ye,Be),Ce.setEnd(Me,le),pe(),pe=i(J,Ce,Pe=>{for(const We of Pe){const Xe=We.style;Xe.background!=="Highlight"&&(Xe.background="Highlight"),Xe.color!=="HighlightText"&&(Xe.color="HighlightText"),Xe.zIndex!=="-1"&&(Xe.zIndex="-1"),Xe.pointerEvents!=="none"&&(Xe.pointerEvents="none"),Xe.marginTop!==r(-1.5)&&(Xe.marginTop=r(-1.5)),Xe.paddingTop!==r(4)&&(Xe.paddingTop=r(4)),Xe.paddingBottom!==r(0)&&(Xe.paddingBottom=r(0))}oe!==void 0&&oe(Pe)})}}Z=ne,U=W,Q=X,de=w})}return te(J.getEditorState()),n(J.registerUpdateListener(({editorState:he})=>te(he)),pe,()=>{pe()})}function l(J,...oe){oe.forEach(Z=>{if(typeof Z=="string"){const U=Z.split(" ").filter(Q=>Q!=="");J.classList.add(...U)}})}function u(J,...oe){oe.forEach(Z=>{typeof Z=="string"&&J.classList.remove(...Z.split(" "))})}function p(J,oe){for(const Z of oe)if(J.type.startsWith(Z))return!0;return!1}function m(J,oe){const Z=J[Symbol.iterator]();return new Promise((U,Q)=>{const de=[],pe=()=>{const{done:te,value:he}=Z.next();if(te)return U(de);const Y=new FileReader;Y.addEventListener("error",Q),Y.addEventListener("load",()=>{const j=Y.result;typeof j=="string"&&de.push({file:he,result:j}),pe()}),p(he,oe)?Y.readAsDataURL(he):pe()};pe()})}function _(J,oe){const Z=[],U=(J||t.$getRoot()).getLatest(),Q=oe||(t.$isElementNode(U)?U.getLastDescendant():U);let de=U,pe=C(de);for(;de!==null&&!de.is(Q);)if(Z.push({depth:pe,node:de}),t.$isElementNode(de)&&de.getChildrenSize()>0)de=de.getFirstChild(),pe++;else{let te=null;for(;te===null&&de!==null;)te=de.getNextSibling(),te===null?(de=de.getParent(),pe--):de=te}return de!==null&&de.is(Q)&&Z.push({depth:pe,node:de}),Z}function C(J){let oe=J,Z=0;for(;(oe=oe.getParent())!==null;)Z++;return Z}function b(J,oe){let Z=J;for(;Z!=null;){if(Z instanceof oe)return Z;Z=Z.getParent()}return null}function v(J){const oe=y(J,Z=>t.$isElementNode(Z)&&!Z.isInline());if(!t.$isElementNode(oe))throw Error(`Expected node ${J.__key} to have closest block element node.`);return oe}function y(J,oe){let Z=J;for(;Z!==t.$getRoot()&&Z!=null;){if(oe(Z))return Z;Z=Z.getParent()}return null}function T(J,oe,Z,U){const Q=te=>te instanceof oe,de=te=>{const he=te.getChildren();for(let ee=0;ee<he.length;ee++){const ne=he[ee];if(Q(ne))return null}let Y=te,j=te;for(;Y!==null;)if(j=Y,Y=Y.getParent(),Q(Y))return{child:j,parent:Y};return null},pe=te=>{const he=de(te);if(he!==null){const{child:Y,parent:j}=he;if(Y.is(te)){U(j,te);const ee=Y.getNextSiblings(),ne=ee.length;if(j.insertAfter(Y),ne!==0){const B=Z(j);Y.insertAfter(B);for(let W=0;W<ne;W++)B.append(ee[W])}!j.canBeEmpty()&&j.getChildrenSize()===0&&j.remove()}}};return J.registerNodeTransform(oe,pe)}function O(J,oe){const Z=new Map,U=J._pendingEditorState;for(const[de,pe]of oe._nodeMap){const te=e.$cloneWithProperties(pe);t.$isTextNode(te)&&(te.__text=pe.__text),Z.set(de,te)}U&&(U._nodeMap=Z),J._dirtyType=2;const Q=oe._selection;t.$setSelection(Q===null?null:Q.clone())}function A(J){const oe=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(oe)){const{focus:Z}=oe,U=Z.getNode(),Q=Z.offset;if(t.$isRootOrShadowRoot(U)){const de=U.getChildAtIndex(Q);de==null?U.append(J):de.insertBefore(J),J.selectNext()}else{let de,pe;t.$isTextNode(U)?(de=U.getParentOrThrow(),pe=U.getIndexWithinParent(),Q>0&&(pe+=1,U.splitText(Q))):(de=U,pe=Q);const[,te]=t.$splitNode(de,pe);te.insertBefore(J),te.selectStart()}}else{if(oe!=null){const U=oe.getNodes();U[U.length-1].getTopLevelElementOrThrow().insertAfter(J)}else t.$getRoot().append(J);const Z=t.$createParagraphNode();J.insertAfter(Z),Z.select()}return J.getLatest()}function D(J,oe){const Z=oe();return J.replace(Z),Z.append(J),Z}function P(J,oe){return J!==null?Object.getPrototypeOf(J).constructor.name===oe.name:!1}function M(J,oe){const Z=[];for(let U=0;U<J.length;U++){const Q=oe(J[U]);Q!==null&&Z.push(Q)}return Z}function V(J,oe){const Z=J.getFirstChild();Z!==null?Z.insertBefore(oe):J.append(oe)}return Pn.$splitNode=t.$splitNode,Pn.isHTMLAnchorElement=t.isHTMLAnchorElement,Pn.isHTMLElement=t.isHTMLElement,Pn.$dfs=_,Pn.$filter=M,Pn.$findMatchingParent=y,Pn.$getNearestBlockElementAncestorOrThrow=v,Pn.$getNearestNodeOfType=b,Pn.$insertFirst=V,Pn.$insertNodeToNearestRoot=A,Pn.$restoreEditorState=O,Pn.$wrapNodeInElement=D,Pn.addClassNamesToElement=l,Pn.isMimeType=p,Pn.markSelection=a,Pn.mediaFileReader=m,Pn.mergeRegister=n,Pn.objectKlassEquals=P,Pn.positionNodeOnRange=i,Pn.registerNestedElementResolver=T,Pn.removeClassNamesFromElement=u,Pn}var In={},Cy;function BO(){if(Cy)return In;Cy=1;var e=Ba(),t=Xt();function n(u){let p=new URLSearchParams;p.append("code",u);for(let m=1;m<arguments.length;m++)p.append("v",arguments[m]);throw Error(`Minified Lexical error #${u}; visit https://lexical.dev/docs/error?${p} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(...u){return()=>{u.forEach(p=>p())}}let o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(u,p,m){function _(){if(v===null)throw Error("Unexpected null rootDOMNode");if(y===null)throw Error("Unexpected null parentDOMNode");let{left:P,top:M}=v.getBoundingClientRect();var V=y;let J=e.createRectsFromDOMRange(u,p);A.isConnected||V.append(A),V=!1;for(let U=0;U<J.length;U++){var oe=J[U];let Q=O[U]||document.createElement("div"),de=Q.style;de.position!=="absolute"&&(de.position="absolute",V=!0);var Z=`${oe.left-P}px`;de.left!==Z&&(de.left=Z,V=!0),Z=`${oe.top-M}px`,de.top!==Z&&(Q.style.top=Z,V=!0),Z=`${oe.width}px`,de.width!==Z&&(Q.style.width=Z,V=!0),oe=`${oe.height}px`,de.height!==oe&&(Q.style.height=oe,V=!0),Q.parentNode!==A&&(A.append(Q),V=!0),O[U]=Q}for(;O.length>J.length;)O.pop();V&&m(O)}function C(){v=y=null,T!==null&&T.disconnect(),T=null,A.remove();for(let P of O)P.remove();O=[]}function b(){let P=u.getRootElement();if(P===null)return C();let M=P.parentElement;if(!(M instanceof HTMLElement))return C();C(),v=P,y=M,T=new MutationObserver(V=>{let J=u.getRootElement(),oe=J&&J.parentElement;if(J!==v||oe!==y)return b();for(let Z of V)if(!A.contains(Z.target))return _()}),T.observe(M,o),_()}let v=null,y=null,T=null,O=[],A=document.createElement("div"),D=u.registerRootListener(b);return()=>{D(),C()}}function a(u,p){for(let m of p)if(u.type.startsWith(m))return!0;return!1}function l(u,p){for(;u!==t.$getRoot()&&u!=null;){if(p(u))return u;u=u.getParent()}return null}return In.$splitNode=t.$splitNode,In.isHTMLAnchorElement=t.isHTMLAnchorElement,In.isHTMLElement=t.isHTMLElement,In.$dfs=function(u,p){let m=[];u=(u||t.$getRoot()).getLatest(),p=p||(t.$isElementNode(u)?u.getLastDescendant():u);for(var _=u,C=0;(_=_.getParent())!==null;)C++;for(_=C;u!==null&&!u.is(p);)if(m.push({depth:_,node:u}),t.$isElementNode(u)&&0<u.getChildrenSize())u=u.getFirstChild(),_++;else for(C=null;C===null&&u!==null;)C=u.getNextSibling(),C===null?(u=u.getParent(),_--):u=C;return u!==null&&u.is(p)&&m.push({depth:_,node:u}),m},In.$filter=function(u,p){let m=[];for(let _=0;_<u.length;_++){let C=p(u[_]);C!==null&&m.push(C)}return m},In.$findMatchingParent=l,In.$getNearestBlockElementAncestorOrThrow=function(u){let p=l(u,m=>t.$isElementNode(m)&&!m.isInline());return t.$isElementNode(p)||n(4,u.__key),p},In.$getNearestNodeOfType=function(u,p){for(;u!=null;){if(u instanceof p)return u;u=u.getParent()}return null},In.$insertFirst=function(u,p){let m=u.getFirstChild();m!==null?m.insertBefore(p):u.append(p)},In.$insertNodeToNearestRoot=function(u){var p=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(p)){var{focus:m}=p;if(p=m.getNode(),m=m.offset,t.$isRootOrShadowRoot(p))m=p.getChildAtIndex(m),m==null?p.append(u):m.insertBefore(u),u.selectNext();else{let _,C;t.$isTextNode(p)?(_=p.getParentOrThrow(),C=p.getIndexWithinParent(),0<m&&(C+=1,p.splitText(m))):(_=p,C=m),[,p]=t.$splitNode(_,C),p.insertBefore(u),p.selectStart()}}else p!=null?(p=p.getNodes(),p[p.length-1].getTopLevelElementOrThrow().insertAfter(u)):t.$getRoot().append(u),p=t.$createParagraphNode(),u.insertAfter(p),p.select();return u.getLatest()},In.$restoreEditorState=function(u,p){let m=new Map,_=u._pendingEditorState;for(let[C,b]of p._nodeMap){let v=e.$cloneWithProperties(b);t.$isTextNode(v)&&(v.__text=b.__text),m.set(C,v)}_&&(_._nodeMap=m),u._dirtyType=2,u=p._selection,t.$setSelection(u===null?null:u.clone())},In.$wrapNodeInElement=function(u,p){return p=p(),u.replace(p),p.append(u),p},In.addClassNamesToElement=function(u,...p){p.forEach(m=>{typeof m=="string"&&(m=m.split(" ").filter(_=>_!==""),u.classList.add(...m))})},In.isMimeType=a,In.markSelection=function(u,p){function m(T){T.read(()=>{var O=t.$getSelection();if(t.$isRangeSelection(O)){var{anchor:A,focus:D}=O;O=A.getNode();var P=O.getKey(),M=A.offset,V=D.getNode(),J=V.getKey(),oe=D.offset,Z=u.getElementByKey(P),U=u.getElementByKey(J);if(P=_===null||Z===null||M!==C||P!==_.getKey()||O!==_&&(!(_ instanceof t.TextNode)||O.updateDOM(_,Z,u._config)),J=b===null||U===null||oe!==v||J!==b.getKey()||V!==b&&(!(b instanceof t.TextNode)||V.updateDOM(b,U,u._config)),P||J){Z=u.getElementByKey(A.getNode().getKey());var Q=u.getElementByKey(D.getNode().getKey());if(Z!==null&&Q!==null&&Z.tagName==="SPAN"&&Q.tagName==="SPAN"){if(J=document.createRange(),D.isBefore(A)?(P=Q,U=D.offset,Q=Z,Z=A.offset):(P=Z,U=A.offset,Z=D.offset),P=P.firstChild,P===null||(Q=Q.firstChild,Q===null))throw Error("Expected text node to be first child of span");J.setStart(P,U),J.setEnd(Q,Z),y(),y=i(u,J,de=>{for(let pe of de){let te=pe.style;te.background!=="Highlight"&&(te.background="Highlight"),te.color!=="HighlightText"&&(te.color="HighlightText"),te.zIndex!=="-1"&&(te.zIndex="-1"),te.pointerEvents!=="none"&&(te.pointerEvents="none"),te.marginTop!=="-1.5px"&&(te.marginTop="-1.5px"),te.paddingTop!=="4px"&&(te.paddingTop="4px"),te.paddingBottom!=="0px"&&(te.paddingBottom="0px")}p!==void 0&&p(de)})}}_=O,C=M,b=V,v=oe}else v=b=C=_=null,y(),y=()=>{}})}let _=null,C=null,b=null,v=null,y=()=>{};return m(u.getEditorState()),r(u.registerUpdateListener(({editorState:T})=>m(T)),y,()=>{y()})},In.mediaFileReader=function(u,p){let m=u[Symbol.iterator]();return new Promise((_,C)=>{let b=[],v=()=>{const{done:y,value:T}=m.next();if(y)return _(b);const O=new FileReader;O.addEventListener("error",C),O.addEventListener("load",()=>{const A=O.result;typeof A=="string"&&b.push({file:T,result:A}),v()}),a(T,p)?O.readAsDataURL(T):v()};v()})},In.mergeRegister=r,In.objectKlassEquals=function(u,p){return u!==null?Object.getPrototypeOf(u).constructor.name===p.name:!1},In.positionNodeOnRange=i,In.registerNestedElementResolver=function(u,p,m,_){return u.registerNodeTransform(p,C=>{e:{for(var b=C.getChildren(),v=0;v<b.length;v++)if(b[v]instanceof p){b=null;break e}for(b=C;b!==null;)if(v=b,b=b.getParent(),b instanceof p){b={child:v,parent:b};break e}b=null}if(b!==null){const{child:y,parent:T}=b;if(y.is(C)){if(_(T,C),C=y.getNextSiblings(),b=C.length,T.insertAfter(y),b!==0){v=m(T),y.insertAfter(v);for(let O=0;O<b;O++)v.append(C[O])}T.canBeEmpty()||T.getChildrenSize()!==0||T.remove()}}})},In.removeClassNamesFromElement=function(u,...p){p.forEach(m=>{typeof m=="string"&&u.classList.remove(...m.split(" "))})},In}var wy,Ty;function vn(){return Ty||(Ty=1,wy=process.env.NODE_ENV==="development"?jO():BO()),wy}var Ih={},Ny;function WO(){if(Ny)return Ih;Ny=1;var e=Xt();function t(n){const r=window.location.origin,o=i=>{if(i.origin!==r)return;const a=n.getRootElement();if(document.activeElement!==a)return;const l=i.data;if(typeof l=="string"){let u;try{u=JSON.parse(l)}catch{return}if(u&&u.protocol==="nuanria_messaging"&&u.type==="request"){const p=u.payload;if(p&&p.functionId==="makeChanges"){const m=p.args;if(m){const[_,C,b,v,y,T]=m;n.update(()=>{const O=e.$getSelection();if(e.$isRangeSelection(O)){const A=O.anchor;let D=A.getNode(),P=0,M=0;if(e.$isTextNode(D)&&_>=0&&C>=0&&(P=_,M=_+C,O.setTextNodeRange(D,P,D,M)),(P!==M||b!=="")&&(O.insertRawText(b),D=A.getNode()),e.$isTextNode(D)){P=v,M=v+y;const V=D.getTextContentSize();P=P>V?V:P,M=M>V?V:M,O.setTextNodeRange(D,P,D,M)}i.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",o,!0),()=>{window.removeEventListener("message",o,!0)}}return Ih.registerDragonSupport=t,Ih}var Lh={},Sy;function zO(){if(Sy)return Lh;Sy=1;var e=Xt();return Lh.registerDragonSupport=function(t){let n=window.location.origin,r=o=>{if(o.origin===n){var i=t.getRootElement();if(document.activeElement===i&&(i=o.data,typeof i=="string")){try{var a=JSON.parse(i)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"&&(a=a.payload)&&a.functionId==="makeChanges"&&(a=a.args)){const[l,u,p,m,_]=a;t.update(()=>{const C=e.$getSelection();if(e.$isRangeSelection(C)){var b=C.anchor;let v=b.getNode(),y=0,T=0;e.$isTextNode(v)&&0<=l&&0<=u&&(y=l,T=l+u,C.setTextNodeRange(v,y,v,T)),(y!==T||p!=="")&&(C.insertRawText(p),v=b.getNode()),e.$isTextNode(v)&&(y=m,T=m+_,b=v.getTextContentSize(),y=y>b?b:y,T=T>b?b:T,C.setTextNodeRange(v,y,v,T)),o.stopImmediatePropagation()}})}}}};return window.addEventListener("message",r,!0),()=>{window.removeEventListener("message",r,!0)}},Lh}var Oy,Ay;function oE(){return Ay||(Ay=1,Oy=process.env.NODE_ENV==="development"?WO():zO()),Oy}var Po={},fi={},Ad={},Ry;function HO(){if(Ry)return Ad;Ry=1;var e=Ba(),t=vn(),n=Xt();function r(p,m){const _=m.body?m.body.childNodes:[];let C=[];for(let b=0;b<_.length;b++){const v=_[b];if(!l.has(v.nodeName)){const y=u(v,p);y!==null&&(C=C.concat(y))}}return C}function o(p,m){if(typeof document>"u"||typeof window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const _=document.createElement("div"),C=n.$getRoot().getChildren();for(let b=0;b<C.length;b++){const v=C[b];i(p,v,_,m)}return _.innerHTML}function i(p,m,_,C=null){let b=C!=null?m.isSelected(C):!0;const v=n.$isElementNode(m)&&m.excludeFromCopy("html");let y=m;if(C!==null){let V=e.$cloneWithProperties(m);V=n.$isTextNode(V)&&C!=null?e.$sliceSelectedTextNodeContent(C,V):V,y=V}const T=n.$isElementNode(y)?y.getChildren():[],O=p._nodes.get(y.getType());let A;O&&O.exportDOM!==void 0?A=O.exportDOM(p,y):A=y.exportDOM(p);const{element:D,after:P}=A;if(!D)return!1;const M=document.createDocumentFragment();for(let V=0;V<T.length;V++){const J=T[V],oe=i(p,J,M,C);!b&&n.$isElementNode(m)&&oe&&m.extractWithChild(J,C,"html")&&(b=!0)}if(b&&!v){if(t.isHTMLElement(D)&&D.append(M),_.append(D),P){const V=P.call(y,D);V&&D.replaceWith(V)}}else _.append(M);return b}function a(p,m){const{nodeName:_}=p,C=m._htmlConversions.get(_.toLowerCase());let b=null;if(C!==void 0)for(const v of C){const y=v(p);y!==null&&(b===null||b.priority<y.priority)&&(b=y)}return b!==null?b.conversion:null}const l=new Set(["STYLE","SCRIPT"]);function u(p,m,_=new Map,C){let b=[];if(l.has(p.nodeName))return b;let v=null;const y=a(p,m),T=y?y(p):null;let O=null;if(T!==null){O=T.after;const P=T.node;if(v=Array.isArray(P)?P[P.length-1]:P,v!==null){for(const[,M]of _)if(v=M(v,C),!v)break;v&&b.push(...Array.isArray(P)?P:[v])}T.forChild!=null&&_.set(p.nodeName,T.forChild)}const A=p.childNodes;let D=[];for(let P=0;P<A.length;P++)D.push(...u(A[P],m,new Map(_),v));return O!=null&&(D=O(D)),v==null?b=b.concat(D):n.$isElementNode(v)&&v.append(...D),b}return Ad.$generateHtmlFromNodes=o,Ad.$generateNodesFromDOM=r,Ad}var Rd={},$y;function GO(){if($y)return Rd;$y=1;var e=Ba(),t=vn(),n=Xt();function r(a,l,u,p=null){let m=p!=null?l.isSelected(p):!0,_=n.$isElementNode(l)&&l.excludeFromCopy("html");var C=l;p!==null&&(C=e.$cloneWithProperties(l),C=n.$isTextNode(C)&&p!=null?e.$sliceSelectedTextNodeContent(p,C):C);let b=n.$isElementNode(C)?C.getChildren():[];var v=a._nodes.get(C.getType());v=v&&v.exportDOM!==void 0?v.exportDOM(a,C):C.exportDOM(a);let{element:y,after:T}=v;if(!y)return!1;v=document.createDocumentFragment();for(let O=0;O<b.length;O++){let A=b[O],D=r(a,A,v,p);!m&&n.$isElementNode(l)&&D&&l.extractWithChild(A,p,"html")&&(m=!0)}return m&&!_?(t.isHTMLElement(y)&&y.append(v),u.append(y),T&&(a=T.call(C,y))&&y.replaceWith(a)):u.append(v),m}let o=new Set(["STYLE","SCRIPT"]);function i(a,l,u=new Map,p){let m=[];if(o.has(a.nodeName))return m;let _=null;var C,{nodeName:b}=a,v=l._htmlConversions.get(b.toLowerCase());if(b=null,v!==void 0)for(C of v)v=C(a),v!==null&&(b===null||b.priority<v.priority)&&(b=v);if(b=(C=b!==null?b.conversion:null)?C(a):null,C=null,b!==null){if(C=b.after,v=b.node,_=Array.isArray(v)?v[v.length-1]:v,_!==null){for(var[,y]of u)if(_=y(_,p),!_)break;_&&m.push(...Array.isArray(v)?v:[_])}b.forChild!=null&&u.set(a.nodeName,b.forChild)}for(a=a.childNodes,p=[],y=0;y<a.length;y++)p.push(...i(a[y],l,new Map(u),_));return C!=null&&(p=C(p)),_==null?m=m.concat(p):n.$isElementNode(_)&&_.append(...p),m}return Rd.$generateHtmlFromNodes=function(a,l){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let u=document.createElement("div"),p=n.$getRoot().getChildren();for(let m=0;m<p.length;m++)r(a,p[m],u,l);return u.innerHTML},Rd.$generateNodesFromDOM=function(a,l){l=l.body?l.body.childNodes:[];let u=[];for(let m=0;m<l.length;m++){var p=l[m];o.has(p.nodeName)||(p=i(p,a),p!==null&&(u=u.concat(p)))}return u},Rd}var Dy,ky;function iE(){return ky||(ky=1,Dy=process.env.NODE_ENV==="development"?HO():GO()),Dy}var My;function KO(){if(My)return fi;My=1;var e=iE(),t=Ba(),n=vn(),r=Xt();const o=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",i=P=>o?(P||window).getSelection():null;function a(P){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?"":e.$generateHtmlFromNodes(P,M)}function l(P){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?null:JSON.stringify(v(P,M))}function u(P,M){const V=P.getData("text/plain")||P.getData("text/uri-list");V!=null&&M.insertRawText(V)}function p(P,M,V){const J=P.getData("application/x-lexical-editor");if(J)try{const U=JSON.parse(J);if(U.namespace===V._config.namespace&&Array.isArray(U.nodes)){const Q=y(U.nodes);return m(V,Q,M)}}catch{}const oe=P.getData("text/html");if(oe)try{const U=new DOMParser().parseFromString(oe,"text/html"),Q=e.$generateNodesFromDOM(V,U);return m(V,Q,M)}catch{}const Z=P.getData("text/plain")||P.getData("text/uri-list");if(Z!=null)if(r.$isRangeSelection(M)){const U=Z.split(/(\r?\n|\t)/);U[U.length-1]===""&&U.pop();for(let Q=0;Q<U.length;Q++){const de=U[Q];de===`
|
|
97
|
-
`||de===`\r
|
|
98
|
-
`?M.insertParagraph():de===" "?M.insertNodes([r.$createTabNode()]):M.insertText(de)}}else M.insertRawText(Z)}function m(P,M,V){const J=r.DEPRECATED_$isGridSelection(V),oe=r.$isRangeSelection(V);if((J||oe&&n.$findMatchingParent(V.anchor.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null&&n.$findMatchingParent(V.focus.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null)&&M.length===1&&r.DEPRECATED_$isGridNode(M[0])){_(M,V,!1,P);return}V.insertNodes(M)}function _(P,M,V,J){if(P.length!==1||!r.DEPRECATED_$isGridNode(P[0]))throw Error("$mergeGridNodesStrategy: Expected Grid insertion.");const oe=P[0],Z=oe.getChildren(),U=oe.getFirstChildOrThrow().getChildrenSize(),Q=oe.getChildrenSize(),de=n.$findMatchingParent(M.anchor.getNode(),q=>r.DEPRECATED_$isGridCellNode(q)),pe=de&&n.$findMatchingParent(de,q=>r.DEPRECATED_$isGridRowNode(q)),te=pe&&n.$findMatchingParent(pe,q=>r.DEPRECATED_$isGridNode(q));if(!r.DEPRECATED_$isGridCellNode(de)||!r.DEPRECATED_$isGridRowNode(pe)||!r.DEPRECATED_$isGridNode(te))throw Error("$mergeGridNodesStrategy: Expected selection to be inside of a Grid.");const he=pe.getIndexWithinParent(),Y=Math.min(te.getChildrenSize()-1,he+Q-1),j=de.getIndexWithinParent(),ee=Math.min(pe.getChildrenSize()-1,j+U-1),ne=Math.min(j,ee),B=Math.min(he,Y),W=Math.max(j,ee),X=Math.max(he,Y),F=te.getChildren();let w=0,N,I;for(let q=B;q<=X;q++){const ue=F[q];if(!r.DEPRECATED_$isGridRowNode(ue))throw Error("getNodes: expected to find GridRowNode");const fe=Z[w];if(!r.DEPRECATED_$isGridRowNode(fe))throw Error("getNodes: expected to find GridRowNode");const se=ue.getChildren(),Ce=fe.getChildren();let Oe=0;for(let Be=ne;Be<=W;Be++){const ce=se[Be];if(!r.DEPRECATED_$isGridCellNode(ce))throw Error("getNodes: expected to find GridCellNode");const le=Ce[Oe];if(!r.DEPRECATED_$isGridCellNode(le))throw Error("getNodes: expected to find GridCellNode");q===B&&Be===ne?N=ce.getKey():q===X&&Be===W&&(I=ce.getKey());const ye=ce.getChildren();le.getChildren().forEach(Me=>{r.$isTextNode(Me)&&r.$createParagraphNode().append(Me),ce.append(Me)}),ye.forEach(Me=>Me.remove()),Oe++}w++}if(N&&I){const q=r.DEPRECATED_$createGridSelection();q.set(te.getKey(),N,I),r.$setSelection(q),J.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0)}}function C(P){const M=P.exportJSON(),V=P.constructor;if(M.type!==V.getType())throw Error(`LexicalNode: Node ${V.name} does not implement .exportJSON().`);const J=M.children;if(r.$isElementNode(P)&&!Array.isArray(J))throw Error(`LexicalNode: Node ${V.name} is an element but .exportJSON() does not have a children array.`);return M}function b(P,M,V,J=[]){let oe=M!=null?V.isSelected(M):!0;const Z=r.$isElementNode(V)&&V.excludeFromCopy("html");let U=V;if(M!==null){let pe=t.$cloneWithProperties(V);pe=r.$isTextNode(pe)&&M!=null?t.$sliceSelectedTextNodeContent(M,pe):pe,U=pe}const Q=r.$isElementNode(U)?U.getChildren():[],de=C(U);if(r.$isTextNode(U)){const pe=U.__text;pe.length>0?de.text=pe:oe=!1}for(let pe=0;pe<Q.length;pe++){const te=Q[pe],he=b(P,M,te,de.children);!oe&&r.$isElementNode(V)&&he&&V.extractWithChild(te,M,"clone")&&(oe=!0)}if(oe&&!Z)J.push(de);else if(Array.isArray(de.children))for(let pe=0;pe<de.children.length;pe++){const te=de.children[pe];J.push(te)}return oe}function v(P,M){const V=[],J=r.$getRoot().getChildren();for(let oe=0;oe<J.length;oe++){const Z=J[oe];b(P,M,Z,V)}return{namespace:P._config.namespace,nodes:V}}function y(P){const M=[];for(let V=0;V<P.length;V++){const J=P[V],oe=r.$parseSerializedNode(J);r.$isTextNode(oe)&&t.$addNodeStyle(oe),M.push(oe)}return M}const T=50;let O=null;async function A(P,M){if(O!==null)return!1;if(M!==null)return new Promise((Q,de)=>{P.update(()=>{Q(D(P,M))})});const V=P.getRootElement(),J=P._window==null?window.document:P._window.document,oe=i(P._window);if(V===null||oe===null)return!1;const Z=J.createElement("span");Z.style.cssText="position: fixed; top: -1000px;",Z.append(J.createTextNode("#")),V.append(Z);const U=new Range;return U.setStart(Z,0),U.setEnd(Z,1),oe.removeAllRanges(),oe.addRange(U),new Promise((Q,de)=>{const pe=P.registerCommand(r.COPY_COMMAND,te=>(n.objectKlassEquals(te,ClipboardEvent)&&(pe(),O!==null&&(window.clearTimeout(O),O=null),Q(D(P,te))),!0),r.COMMAND_PRIORITY_CRITICAL);O=window.setTimeout(()=>{pe(),O=null,Q(!1)},T),J.execCommand("copy"),Z.remove()})}function D(P,M){const V=i(P._window);if(!V)return!1;const J=V.anchorNode,oe=V.focusNode;if(J!==null&&oe!==null&&!r.isSelectionWithinEditor(P,J,oe))return!1;M.preventDefault();const Z=M.clipboardData,U=r.$getSelection();if(Z===null||U===null)return!1;const Q=a(P),de=l(P);let pe="";return U!==null&&(pe=U.getTextContent()),Q!==null&&Z.setData("text/html",Q),de!==null&&Z.setData("application/x-lexical-editor",de),Z.setData("text/plain",pe),!0}return fi.$generateJSONFromSelectedNodes=v,fi.$generateNodesFromSerializedNodes=y,fi.$getHtmlContent=a,fi.$getLexicalContent=l,fi.$insertDataTransferForPlainText=u,fi.$insertDataTransferForRichText=p,fi.$insertGeneratedNodes=m,fi.copyToClipboard=A,fi}var hi={},Py;function UO(){if(Py)return hi;Py=1;var e=iE(),t=Ba(),n=vn(),r=Xt();function o(y){let T=new URLSearchParams;T.append("code",y);for(let O=1;O<arguments.length;O++)T.append("v",arguments[O]);throw Error(`Minified Lexical error #${y}; visit https://lexical.dev/docs/error?${T} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function a(y){let T=r.$getSelection();if(T==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(T)&&T.isCollapsed()||T.getNodes().length===0?"":e.$generateHtmlFromNodes(y,T)}function l(y){let T=r.$getSelection();if(T==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(T)&&T.isCollapsed()||T.getNodes().length===0?null:JSON.stringify(_(y,T))}function u(y,T,O){let A=r.DEPRECATED_$isGridSelection(O),D=r.$isRangeSelection(O);(A||D&&n.$findMatchingParent(O.anchor.getNode(),P=>r.DEPRECATED_$isGridCellNode(P))!==null&&n.$findMatchingParent(O.focus.getNode(),P=>r.DEPRECATED_$isGridCellNode(P))!==null)&&T.length===1&&r.DEPRECATED_$isGridNode(T[0])?p(T,O,!1,y):O.insertNodes(T)}function p(y,T,O,A){y.length===1&&r.DEPRECATED_$isGridNode(y[0])||o(42);var D=y[0];y=D.getChildren(),O=D.getFirstChildOrThrow().getChildrenSize();var P=D.getChildrenSize(),M=n.$findMatchingParent(T.anchor.getNode(),de=>r.DEPRECATED_$isGridCellNode(de));T=(D=M&&n.$findMatchingParent(M,de=>r.DEPRECATED_$isGridRowNode(de)))&&n.$findMatchingParent(D,de=>r.DEPRECATED_$isGridNode(de)),r.DEPRECATED_$isGridCellNode(M)&&r.DEPRECATED_$isGridRowNode(D)&&r.DEPRECATED_$isGridNode(T)||o(43);var V=D.getIndexWithinParent(),J=Math.min(T.getChildrenSize()-1,V+P-1);P=M.getIndexWithinParent(),M=Math.min(D.getChildrenSize()-1,P+O-1),O=Math.min(P,M),D=Math.min(V,J),P=Math.max(P,M),V=Math.max(V,J),J=T.getChildren(),M=0;let oe,Z;for(let de=D;de<=V;de++){var U=J[de];r.DEPRECATED_$isGridRowNode(U)||o(24);var Q=y[M];r.DEPRECATED_$isGridRowNode(Q)||o(24),U=U.getChildren(),Q=Q.getChildren();let pe=0;for(let te=O;te<=P;te++){let he=U[te];r.DEPRECATED_$isGridCellNode(he)||o(25);let Y=Q[pe];r.DEPRECATED_$isGridCellNode(Y)||o(25),de===D&&te===O?oe=he.getKey():de===V&&te===P&&(Z=he.getKey());let j=he.getChildren();Y.getChildren().forEach(ee=>{r.$isTextNode(ee)&&r.$createParagraphNode().append(ee),he.append(ee)}),j.forEach(ee=>ee.remove()),pe++}M++}oe&&Z&&(y=r.DEPRECATED_$createGridSelection(),y.set(T.getKey(),oe,Z),r.$setSelection(y),A.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}function m(y,T,O,A=[]){let D=T!=null?O.isSelected(T):!0,P=r.$isElementNode(O)&&O.excludeFromCopy("html");var M=O;if(T!==null){var V=t.$cloneWithProperties(O);M=V=r.$isTextNode(V)&&T!=null?t.$sliceSelectedTextNodeContent(T,V):V}let J=r.$isElementNode(M)?M.getChildren():[];var oe=M;V=oe.exportJSON();var Z=oe.constructor;V.type!==Z.getType()&&o(58,Z.name);let U=V.children;for(r.$isElementNode(oe)&&(Array.isArray(U)||o(59,Z.name)),r.$isTextNode(M)&&(M=M.__text,0<M.length?V.text=M:D=!1),M=0;M<J.length;M++)oe=J[M],Z=m(y,T,oe,V.children),!D&&r.$isElementNode(O)&&Z&&O.extractWithChild(oe,T,"clone")&&(D=!0);if(D&&!P)A.push(V);else if(Array.isArray(V.children))for(y=0;y<V.children.length;y++)A.push(V.children[y]);return D}function _(y,T){let O=[],A=r.$getRoot().getChildren();for(let D=0;D<A.length;D++)m(y,T,A[D],O);return{namespace:y._config.namespace,nodes:O}}function C(y){let T=[];for(let O=0;O<y.length;O++){let A=r.$parseSerializedNode(y[O]);r.$isTextNode(A)&&t.$addNodeStyle(A),T.push(A)}return T}let b=null;function v(y,T){var O=i?(y._window||window).getSelection():null;if(!O)return!1;var A=O.anchorNode;if(O=O.focusNode,A!==null&&O!==null&&!r.isSelectionWithinEditor(y,A,O)||(T.preventDefault(),T=T.clipboardData,A=r.$getSelection(),T===null||A===null))return!1;O=a(y),y=l(y);let D="";return A!==null&&(D=A.getTextContent()),O!==null&&T.setData("text/html",O),y!==null&&T.setData("application/x-lexical-editor",y),T.setData("text/plain",D),!0}return hi.$generateJSONFromSelectedNodes=_,hi.$generateNodesFromSerializedNodes=C,hi.$getHtmlContent=a,hi.$getLexicalContent=l,hi.$insertDataTransferForPlainText=function(y,T){y=y.getData("text/plain")||y.getData("text/uri-list"),y!=null&&T.insertRawText(y)},hi.$insertDataTransferForRichText=function(y,T,O){var A=y.getData("application/x-lexical-editor");if(A)try{let P=JSON.parse(A);if(P.namespace===O._config.namespace&&Array.isArray(P.nodes)){let M=C(P.nodes);return u(O,M,T)}}catch{}if(A=y.getData("text/html"))try{var D=new DOMParser().parseFromString(A,"text/html");let P=e.$generateNodesFromDOM(O,D);return u(O,P,T)}catch{}if(y=y.getData("text/plain")||y.getData("text/uri-list"),y!=null)if(r.$isRangeSelection(T))for(y=y.split(/(\r?\n|\t)/),y[y.length-1]===""&&y.pop(),O=0;O<y.length;O++)D=y[O],D===`
|
|
99
|
-
`||D===`\r
|
|
100
|
-
`?T.insertParagraph():D===" "?T.insertNodes([r.$createTabNode()]):T.insertText(D);else T.insertRawText(y)},hi.$insertGeneratedNodes=u,hi.copyToClipboard=async function(y,T){if(b!==null)return!1;if(T!==null)return new Promise(M=>{y.update(()=>{M(v(y,T))})});var O=y.getRootElement();let A=y._window==null?window.document:y._window.document,D=i?(y._window||window).getSelection():null;if(O===null||D===null)return!1;let P=A.createElement("span");return P.style.cssText="position: fixed; top: -1000px;",P.append(A.createTextNode("#")),O.append(P),O=new Range,O.setStart(P,0),O.setEnd(P,1),D.removeAllRanges(),D.addRange(O),new Promise(M=>{let V=y.registerCommand(r.COPY_COMMAND,J=>(n.objectKlassEquals(J,ClipboardEvent)&&(V(),b!==null&&(window.clearTimeout(b),b=null),M(v(y,J))),!0),r.COMMAND_PRIORITY_CRITICAL);b=window.setTimeout(()=>{V(),b=null,M(!1)},50),A.execCommand("copy"),P.remove()})},hi}var Iy,Ly;function aE(){return Ly||(Ly=1,Iy=process.env.NODE_ENV==="development"?KO():UO()),Iy}var Fy;function VO(){if(Fy)return Po;Fy=1;var e=aE(),t=Ba(),n=vn(),r=Xt();function o(pe,te){if(typeof document.caretRangeFromPoint<"u"){const he=document.caretRangeFromPoint(pe,te);return he===null?null:{node:he.startContainer,offset:he.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){const he=document.caretPositionFromPoint(pe,te);return he===null?null:{node:he.offsetNode,offset:he.offset}}else return null}const i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),_=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,C=r.createCommand("DRAG_DROP_PASTE_FILE");class b extends r.ElementNode{static getType(){return"quote"}static clone(te){return new b(te.__key)}constructor(te){super(te)}createDOM(te){const he=document.createElement("blockquote");return n.addClassNamesToElement(he,te.theme.quote),he}updateDOM(te,he){return!1}static importDOM(){return{blockquote:te=>({conversion:D,priority:0})}}exportDOM(te){const{element:he}=super.exportDOM(te);if(he&&n.isHTMLElement(he)){this.isEmpty()&&he.append(document.createElement("br"));const Y=this.getFormatType();he.style.textAlign=Y;const j=this.getDirection();j&&(he.dir=j)}return{element:he}}static importJSON(te){const he=v();return he.setFormat(te.format),he.setIndent(te.indent),he.setDirection(te.direction),he}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(te,he){const Y=r.$createParagraphNode(),j=this.getDirection();return Y.setDirection(j),this.insertAfter(Y,he),Y}collapseAtStart(){const te=r.$createParagraphNode();return this.getChildren().forEach(he=>te.append(he)),this.replace(te),!0}}function v(){return r.$applyNodeReplacement(new b)}function y(pe){return pe instanceof b}class T extends r.ElementNode{static getType(){return"heading"}static clone(te){return new T(te.__tag,te.__key)}constructor(te,he){super(he),this.__tag=te}getTag(){return this.__tag}createDOM(te){const he=this.__tag,Y=document.createElement(he),j=te.theme.heading;if(j!==void 0){const ee=j[he];n.addClassNamesToElement(Y,ee)}return Y}updateDOM(te,he){return!1}static importDOM(){return{h1:te=>({conversion:A,priority:0}),h2:te=>({conversion:A,priority:0}),h3:te=>({conversion:A,priority:0}),h4:te=>({conversion:A,priority:0}),h5:te=>({conversion:A,priority:0}),h6:te=>({conversion:A,priority:0}),p:te=>{const he=te.firstChild;return he!==null&&O(he)?{conversion:()=>({node:null}),priority:3}:null},span:te=>O(te)?{conversion:he=>({node:P("h1")}),priority:3}:null}}exportDOM(te){const{element:he}=super.exportDOM(te);if(he&&n.isHTMLElement(he)){this.isEmpty()&&he.append(document.createElement("br"));const Y=this.getFormatType();he.style.textAlign=Y;const j=this.getDirection();j&&(he.dir=j)}return{element:he}}static importJSON(te){const he=P(te.tag);return he.setFormat(te.format),he.setIndent(te.indent),he.setDirection(te.direction),he}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(te,he=!0){const Y=te?te.anchor.offset:0,j=Y===this.getTextContentSize()||!te?r.$createParagraphNode():P(this.getTag()),ee=this.getDirection();if(j.setDirection(ee),this.insertAfter(j,he),Y===0&&!this.isEmpty()&&te){const ne=r.$createParagraphNode();ne.select(),this.replace(ne,!0)}return j}collapseAtStart(){const te=this.isEmpty()?r.$createParagraphNode():P(this.getTag());return this.getChildren().forEach(he=>te.append(he)),this.replace(te),!0}extractWithChild(){return!0}}function O(pe){return pe.nodeName.toLowerCase()==="span"?pe.style.fontSize==="26pt":!1}function A(pe){const te=pe.nodeName.toLowerCase();let he=null;return(te==="h1"||te==="h2"||te==="h3"||te==="h4"||te==="h5"||te==="h6")&&(he=P(te),pe.style!==null&&he.setFormat(pe.style.textAlign)),{node:he}}function D(pe){const te=v();return pe.style!==null&&te.setFormat(pe.style.textAlign),{node:te}}function P(pe){return r.$applyNodeReplacement(new T(pe))}function M(pe){return pe instanceof T}function V(pe,te){pe.preventDefault(),te.update(()=>{const he=r.$getSelection(),Y=pe instanceof InputEvent||pe instanceof KeyboardEvent?null:pe.clipboardData;Y!=null&&r.$INTERNAL_isPointSelection(he)&&e.$insertDataTransferForRichText(Y,he,te)},{tag:"paste"})}async function J(pe,te){await e.copyToClipboard(te,n.objectKlassEquals(pe,ClipboardEvent)?pe:null),te.update(()=>{const he=r.$getSelection();r.$isRangeSelection(he)?he.removeText():r.$isNodeSelection(he)&&he.getNodes().forEach(Y=>Y.remove())})}function oe(pe){let te=null;if(pe instanceof DragEvent?te=pe.dataTransfer:pe instanceof ClipboardEvent&&(te=pe.clipboardData),te===null)return[!1,[],!1];const he=te.types,Y=he.includes("Files"),j=he.includes("text/html")||he.includes("text/plain");return[Y,Array.from(te.files),j]}function Z(pe){const te=r.$getSelection();if(!r.$isRangeSelection(te))return!1;const he=new Set,Y=te.getNodes();for(let j=0;j<Y.length;j++){const ee=Y[j],ne=ee.getKey();if(he.has(ne))continue;const B=n.$getNearestBlockElementAncestorOrThrow(ee),W=B.getKey();B.canIndent()&&!he.has(W)&&(he.add(W),pe(B))}return he.size>0}function U(pe){const te=r.$getNearestNodeFromDOMNode(pe);return r.$isDecoratorNode(te)}function Q(pe){const te=pe.focus;return te.key==="root"&&te.offset===r.$getRoot().getChildrenSize()}function de(pe){return n.mergeRegister(pe.registerCommand(r.CLICK_COMMAND,te=>{const he=r.$getSelection();return r.$isNodeSelection(he)?(he.clear(),!0):!1},0),pe.registerCommand(r.DELETE_CHARACTER_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.deleteCharacter(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_WORD_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.deleteWord(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_LINE_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.deleteLine(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,te=>{const he=r.$getSelection();if(typeof te=="string")r.$INTERNAL_isPointSelection(he)&&he.insertText(te);else{if(!r.$INTERNAL_isPointSelection(he))return!1;const Y=te.dataTransfer;if(Y!=null)e.$insertDataTransferForRichText(Y,he,pe);else if(r.$isRangeSelection(he)){const j=te.data;return j&&he.insertText(j),!0}}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(te.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_TEXT_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.formatText(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_ELEMENT_COMMAND,te=>{const he=r.$getSelection();if(!r.$isRangeSelection(he)&&!r.$isNodeSelection(he))return!1;const Y=he.getNodes();for(const j of Y){const ee=n.$findMatchingParent(j,ne=>r.$isElementNode(ne)&&!ne.isInline());ee!==null&&ee.setFormat(te)}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_LINE_BREAK_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.insertLineBreak(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(te.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INDENT_CONTENT_COMMAND,()=>Z(te=>{const he=te.getIndent();te.setIndent(he+1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>Z(te=>{const he=te.getIndent();he>0&&te.setIndent(he-1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_UP_COMMAND,te=>{const he=r.$getSelection();if(r.$isNodeSelection(he)&&!U(te.target)){const Y=he.getNodes();if(Y.length>0)return Y[0].selectPrevious(),!0}else if(r.$isRangeSelection(he)){const Y=r.$getAdjacentNode(he.focus,!0);if(!te.shiftKey&&r.$isDecoratorNode(Y)&&!Y.isIsolated()&&!Y.isInline())return Y.selectPrevious(),te.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_DOWN_COMMAND,te=>{const he=r.$getSelection();if(r.$isNodeSelection(he)){const Y=he.getNodes();if(Y.length>0)return Y[0].selectNext(0,0),!0}else if(r.$isRangeSelection(he)){if(Q(he))return te.preventDefault(),!0;const Y=r.$getAdjacentNode(he.focus,!1);if(!te.shiftKey&&r.$isDecoratorNode(Y)&&!Y.isIsolated()&&!Y.isInline())return Y.selectNext(),te.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_LEFT_COMMAND,te=>{const he=r.$getSelection();if(r.$isNodeSelection(he)){const Y=he.getNodes();if(Y.length>0)return te.preventDefault(),Y[0].selectPrevious(),!0}if(!r.$isRangeSelection(he))return!1;if(t.$shouldOverrideDefaultCharacterSelection(he,!0)){const Y=te.shiftKey;return te.preventDefault(),t.$moveCharacter(he,Y,!0),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,te=>{const he=r.$getSelection();if(r.$isNodeSelection(he)&&!U(te.target)){const j=he.getNodes();if(j.length>0)return te.preventDefault(),j[0].selectNext(0,0),!0}if(!r.$isRangeSelection(he))return!1;const Y=te.shiftKey;return t.$shouldOverrideDefaultCharacterSelection(he,!1)?(te.preventDefault(),t.$moveCharacter(he,Y,!1),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_BACKSPACE_COMMAND,te=>{if(U(te.target))return!1;const he=r.$getSelection();if(!r.$isRangeSelection(he))return!1;te.preventDefault();const{anchor:Y}=he,j=Y.getNode();return he.isCollapsed()&&Y.offset===0&&!r.$isRootNode(j)&&n.$getNearestBlockElementAncestorOrThrow(j).getIndent()>0?pe.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_DELETE_COMMAND,te=>{if(U(te.target))return!1;const he=r.$getSelection();return r.$isRangeSelection(he)?(te.preventDefault(),pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ENTER_COMMAND,te=>{const he=r.$getSelection();if(!r.$isRangeSelection(he))return!1;if(te!==null){if((p||u||_)&&l)return!1;if(te.preventDefault(),te.shiftKey)return pe.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return pe.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(pe.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DROP_COMMAND,te=>{const[,he]=oe(te);if(he.length>0){const j=te.clientX,ee=te.clientY,ne=o(j,ee);if(ne!==null){const{offset:B,node:W}=ne,X=r.$getNearestNodeFromDOMNode(W);if(X!==null){const F=r.$createRangeSelection();if(r.$isTextNode(X))F.anchor.set(X.getKey(),B,"text"),F.focus.set(X.getKey(),B,"text");else{const N=X.getParentOrThrow().getKey(),I=X.getIndexWithinParent()+1;F.anchor.set(N,I,"element"),F.focus.set(N,I,"element")}const w=r.$normalizeSelection__EXPERIMENTAL(F);r.$setSelection(w)}pe.dispatchCommand(C,he)}return te.preventDefault(),!0}const Y=r.$getSelection();return!!r.$isRangeSelection(Y)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGSTART_COMMAND,te=>{const[he]=oe(te),Y=r.$getSelection();return!(he&&!r.$isRangeSelection(Y))},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGOVER_COMMAND,te=>{const[he]=oe(te),Y=r.$getSelection();if(he&&!r.$isRangeSelection(Y))return!1;const j=te.clientX,ee=te.clientY,ne=o(j,ee);if(ne!==null){const B=r.$getNearestNodeFromDOMNode(ne.node);r.$isDecoratorNode(B)&&te.preventDefault()}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.COPY_COMMAND,te=>(e.copyToClipboard(pe,n.objectKlassEquals(te,ClipboardEvent)?te:null),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CUT_COMMAND,te=>(J(te,pe),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.PASTE_COMMAND,te=>{const[,he,Y]=oe(te);if(he.length>0&&!Y)return pe.dispatchCommand(C,he),!0;if(r.isSelectionCapturedInDecoratorInput(te.target))return!1;const j=r.$getSelection();return r.$INTERNAL_isPointSelection(j)?(V(te,pe),!0):!1},r.COMMAND_PRIORITY_EDITOR))}return Po.$createHeadingNode=P,Po.$createQuoteNode=v,Po.$isHeadingNode=M,Po.$isQuoteNode=y,Po.DRAG_DROP_PASTE=C,Po.HeadingNode=T,Po.QuoteNode=b,Po.eventFiles=oe,Po.registerRichText=de,Po}var Io={},jy;function YO(){if(jy)return Io;jy=1;var e=aE(),t=Ba(),n=vn(),r=Xt();function o(Z,U){return typeof document.caretRangeFromPoint<"u"?(Z=document.caretRangeFromPoint(Z,U),Z===null?null:{node:Z.startContainer,offset:Z.startOffset}):document.caretPositionFromPoint!=="undefined"?(Z=document.caretPositionFromPoint(Z,U),Z===null?null:{node:Z.offsetNode,offset:Z.offset}):null}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),_=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,C=r.createCommand("DRAG_DROP_PASTE_FILE");class b extends r.ElementNode{static getType(){return"quote"}static clone(U){return new b(U.__key)}constructor(U){super(U)}createDOM(U){let Q=document.createElement("blockquote");return n.addClassNamesToElement(Q,U.theme.quote),Q}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:A,priority:0})}}exportDOM(U){if({element:U}=super.exportDOM(U),U&&n.isHTMLElement(U)){this.isEmpty()&&U.append(document.createElement("br"));var Q=this.getFormatType();U.style.textAlign=Q,(Q=this.getDirection())&&(U.dir=Q)}return{element:U}}static importJSON(U){let Q=v();return Q.setFormat(U.format),Q.setIndent(U.indent),Q.setDirection(U.direction),Q}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(U,Q){U=r.$createParagraphNode();let de=this.getDirection();return U.setDirection(de),this.insertAfter(U,Q),U}collapseAtStart(){let U=r.$createParagraphNode();return this.getChildren().forEach(Q=>U.append(Q)),this.replace(U),!0}}function v(){return r.$applyNodeReplacement(new b)}class y extends r.ElementNode{static getType(){return"heading"}static clone(U){return new y(U.__tag,U.__key)}constructor(U,Q){super(Q),this.__tag=U}getTag(){return this.__tag}createDOM(U){let Q=this.__tag,de=document.createElement(Q);return U=U.theme.heading,U!==void 0&&n.addClassNamesToElement(de,U[Q]),de}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:O,priority:0}),h2:()=>({conversion:O,priority:0}),h3:()=>({conversion:O,priority:0}),h4:()=>({conversion:O,priority:0}),h5:()=>({conversion:O,priority:0}),h6:()=>({conversion:O,priority:0}),p:U=>(U=U.firstChild,U!==null&&T(U)?{conversion:()=>({node:null}),priority:3}:null),span:U=>T(U)?{conversion:()=>({node:D("h1")}),priority:3}:null}}exportDOM(U){if({element:U}=super.exportDOM(U),U&&n.isHTMLElement(U)){this.isEmpty()&&U.append(document.createElement("br"));var Q=this.getFormatType();U.style.textAlign=Q,(Q=this.getDirection())&&(U.dir=Q)}return{element:U}}static importJSON(U){let Q=D(U.tag);return Q.setFormat(U.format),Q.setIndent(U.indent),Q.setDirection(U.direction),Q}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(U,Q=!0){let de=U?U.anchor.offset:0,pe=de!==this.getTextContentSize()&&U?D(this.getTag()):r.$createParagraphNode(),te=this.getDirection();return pe.setDirection(te),this.insertAfter(pe,Q),de===0&&!this.isEmpty()&&U&&(U=r.$createParagraphNode(),U.select(),this.replace(U,!0)),pe}collapseAtStart(){let U=this.isEmpty()?r.$createParagraphNode():D(this.getTag());return this.getChildren().forEach(Q=>U.append(Q)),this.replace(U),!0}extractWithChild(){return!0}}function T(Z){return Z.nodeName.toLowerCase()==="span"?Z.style.fontSize==="26pt":!1}function O(Z){let U=Z.nodeName.toLowerCase(),Q=null;return(U==="h1"||U==="h2"||U==="h3"||U==="h4"||U==="h5"||U==="h6")&&(Q=D(U),Z.style!==null&&Q.setFormat(Z.style.textAlign)),{node:Q}}function A(Z){let U=v();return Z.style!==null&&U.setFormat(Z.style.textAlign),{node:U}}function D(Z){return r.$applyNodeReplacement(new y(Z))}function P(Z,U){Z.preventDefault(),U.update(()=>{let Q=r.$getSelection(),de=Z instanceof InputEvent||Z instanceof KeyboardEvent?null:Z.clipboardData;de!=null&&r.$INTERNAL_isPointSelection(Q)&&e.$insertDataTransferForRichText(de,Q,U)},{tag:"paste"})}async function M(Z,U){await e.copyToClipboard(U,n.objectKlassEquals(Z,ClipboardEvent)?Z:null),U.update(()=>{let Q=r.$getSelection();r.$isRangeSelection(Q)?Q.removeText():r.$isNodeSelection(Q)&&Q.getNodes().forEach(de=>de.remove())})}function V(Z){let U=null;if(Z instanceof DragEvent?U=Z.dataTransfer:Z instanceof ClipboardEvent&&(U=Z.clipboardData),U===null)return[!1,[],!1];var Q=U.types;return Z=Q.includes("Files"),Q=Q.includes("text/html")||Q.includes("text/plain"),[Z,Array.from(U.files),Q]}function J(Z){var U=r.$getSelection();if(!r.$isRangeSelection(U))return!1;let Q=new Set;U=U.getNodes();for(let te=0;te<U.length;te++){var de=U[te],pe=de.getKey();Q.has(pe)||(de=n.$getNearestBlockElementAncestorOrThrow(de),pe=de.getKey(),de.canIndent()&&!Q.has(pe)&&(Q.add(pe),Z(de)))}return 0<Q.size}function oe(Z){return Z=r.$getNearestNodeFromDOMNode(Z),r.$isDecoratorNode(Z)}return Io.$createHeadingNode=D,Io.$createQuoteNode=v,Io.$isHeadingNode=function(Z){return Z instanceof y},Io.$isQuoteNode=function(Z){return Z instanceof b},Io.DRAG_DROP_PASTE=C,Io.HeadingNode=y,Io.QuoteNode=b,Io.eventFiles=V,Io.registerRichText=function(Z){return n.mergeRegister(Z.registerCommand(r.CLICK_COMMAND,()=>{const U=r.$getSelection();return r.$isNodeSelection(U)?(U.clear(),!0):!1},0),Z.registerCommand(r.DELETE_CHARACTER_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteCharacter(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_WORD_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteWord(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_LINE_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteLine(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,U=>{const Q=r.$getSelection();if(typeof U=="string")r.$INTERNAL_isPointSelection(Q)&&Q.insertText(U);else{if(!r.$INTERNAL_isPointSelection(Q))return!1;const de=U.dataTransfer;de!=null?e.$insertDataTransferForRichText(de,Q,Z):r.$isRangeSelection(Q)&&(U=U.data)&&Q.insertText(U)}return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(U.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_TEXT_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.formatText(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_ELEMENT_COMMAND,U=>{var Q=r.$getSelection();if(!r.$isRangeSelection(Q)&&!r.$isNodeSelection(Q))return!1;Q=Q.getNodes();for(const de of Q)Q=n.$findMatchingParent(de,pe=>r.$isElementNode(pe)&&!pe.isInline()),Q!==null&&Q.setFormat(U);return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_LINE_BREAK_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.insertLineBreak(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(U.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INDENT_CONTENT_COMMAND,()=>J(U=>{const Q=U.getIndent();U.setIndent(Q+1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>J(U=>{const Q=U.getIndent();0<Q&&U.setIndent(Q-1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_UP_COMMAND,U=>{var Q=r.$getSelection();if(r.$isNodeSelection(Q)&&!oe(U.target)){if(U=Q.getNodes(),0<U.length)return U[0].selectPrevious(),!0}else if(r.$isRangeSelection(Q)&&(Q=r.$getAdjacentNode(Q.focus,!0),!U.shiftKey&&r.$isDecoratorNode(Q)&&!Q.isIsolated()&&!Q.isInline()))return Q.selectPrevious(),U.preventDefault(),!0;return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_DOWN_COMMAND,U=>{var Q=r.$getSelection();if(r.$isNodeSelection(Q)){if(U=Q.getNodes(),0<U.length)return U[0].selectNext(0,0),!0}else if(r.$isRangeSelection(Q)){let de=Q.focus;if(de.key==="root"&&de.offset===r.$getRoot().getChildrenSize())return U.preventDefault(),!0;if(Q=r.$getAdjacentNode(Q.focus,!1),!U.shiftKey&&r.$isDecoratorNode(Q)&&!Q.isIsolated()&&!Q.isInline())return Q.selectNext(),U.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_LEFT_COMMAND,U=>{const Q=r.$getSelection();if(r.$isNodeSelection(Q)){var de=Q.getNodes();if(0<de.length)return U.preventDefault(),de[0].selectPrevious(),!0}return r.$isRangeSelection(Q)&&t.$shouldOverrideDefaultCharacterSelection(Q,!0)?(de=U.shiftKey,U.preventDefault(),t.$moveCharacter(Q,de,!0),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,U=>{const Q=r.$getSelection();if(r.$isNodeSelection(Q)&&!oe(U.target)){var de=Q.getNodes();if(0<de.length)return U.preventDefault(),de[0].selectNext(0,0),!0}return r.$isRangeSelection(Q)?(de=U.shiftKey,t.$shouldOverrideDefaultCharacterSelection(Q,!1)?(U.preventDefault(),t.$moveCharacter(Q,de,!1),!0):!1):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_BACKSPACE_COMMAND,U=>{if(oe(U.target))return!1;const Q=r.$getSelection();if(!r.$isRangeSelection(Q))return!1;U.preventDefault(),{anchor:U}=Q;const de=U.getNode();return Q.isCollapsed()&&U.offset===0&&!r.$isRootNode(de)&&0<n.$getNearestBlockElementAncestorOrThrow(de).getIndent()?Z.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_DELETE_COMMAND,U=>{if(oe(U.target))return!1;const Q=r.$getSelection();return r.$isRangeSelection(Q)?(U.preventDefault(),Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ENTER_COMMAND,U=>{const Q=r.$getSelection();if(!r.$isRangeSelection(Q))return!1;if(U!==null){if((p||u||_)&&l)return!1;if(U.preventDefault(),U.shiftKey)return Z.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return Z.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(Z.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DROP_COMMAND,U=>{const[,Q]=V(U);if(0<Q.length){var de=o(U.clientX,U.clientY);if(de!==null){const{offset:te,node:he}=de;var pe=r.$getNearestNodeFromDOMNode(he);if(pe!==null){if(de=r.$createRangeSelection(),r.$isTextNode(pe))de.anchor.set(pe.getKey(),te,"text"),de.focus.set(pe.getKey(),te,"text");else{const Y=pe.getParentOrThrow().getKey();pe=pe.getIndexWithinParent()+1,de.anchor.set(Y,pe,"element"),de.focus.set(Y,pe,"element")}de=r.$normalizeSelection__EXPERIMENTAL(de),r.$setSelection(de)}Z.dispatchCommand(C,Q)}return U.preventDefault(),!0}return U=r.$getSelection(),!!r.$isRangeSelection(U)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGSTART_COMMAND,U=>{[U]=V(U);const Q=r.$getSelection();return!(U&&!r.$isRangeSelection(Q))},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGOVER_COMMAND,U=>{var[Q]=V(U);const de=r.$getSelection();return Q&&!r.$isRangeSelection(de)?!1:(Q=o(U.clientX,U.clientY),Q!==null&&(Q=r.$getNearestNodeFromDOMNode(Q.node),r.$isDecoratorNode(Q)&&U.preventDefault()),!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.COPY_COMMAND,U=>(e.copyToClipboard(Z,n.objectKlassEquals(U,ClipboardEvent)?U:null),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CUT_COMMAND,U=>(M(U,Z),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.PASTE_COMMAND,U=>{const[,Q,de]=V(U);if(0<Q.length&&!de)return Z.dispatchCommand(C,Q),!0;if(r.isSelectionCapturedInDecoratorInput(U.target))return!1;const pe=r.$getSelection();return r.$INTERNAL_isPointSelection(pe)?(P(U,Z),!0):!1},r.COMMAND_PRIORITY_EDITOR))},Io}var By,Wy;function Dg(){return Wy||(Wy=1,By=process.env.NODE_ENV==="development"?VO():YO()),By}var zy;function qO(){if(zy)return kh;zy=1;var e=ur(),t=nE(),n=H,r=rE(),o=vn(),i=ku,a=oE(),l=Dg(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(y){return y.getEditorState().read(r.$canShowPlaceholderCurry(y.isComposing()))}function m(y){const[T,O]=n.useState(()=>p(y));return u(()=>{function A(){const D=p(y);O(D)}return A(),o.mergeRegister(y.registerUpdateListener(()=>{A()}),y.registerEditableListener(()=>{A()}))},[y]),T}function _(y,T){const[O,A]=n.useState(()=>y.getDecorators());return u(()=>y.registerDecoratorListener(D=>{i.flushSync(()=>{A(D)})}),[y]),n.useEffect(()=>{A(y.getDecorators())},[y]),n.useMemo(()=>{const D=[],P=Object.keys(O);for(let M=0;M<P.length;M++){const V=P[M],J=n.createElement(T,{onError:Z=>y._onError(Z)},n.createElement(n.Suspense,{fallback:null},O[V])),oe=y.getElementByKey(V);oe!==null&&D.push(i.createPortal(J,oe,V))}return D},[T,O,y])}function C(y){u(()=>o.mergeRegister(l.registerRichText(y),a.registerDragonSupport(y)),[y])}function b({contentEditable:y,placeholder:T,ErrorBoundary:O}){const[A]=e.useLexicalComposerContext(),D=_(A,O);return C(A),n.createElement(n.Fragment,null,y,n.createElement(v,{content:T}),D)}function v({content:y}){const[T]=e.useLexicalComposerContext(),O=m(T),A=t();return O?typeof y=="function"?y(A):y:null}return kh.RichTextPlugin=b,kh}var Fh={},Hy;function ZO(){if(Hy)return Fh;Hy=1;var e=ur(),t=nE(),n=H,r=rE(),o=vn(),i=ku,a=oE(),l=Dg(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(v){return v.getEditorState().read(r.$canShowPlaceholderCurry(v.isComposing()))}function m(v){let[y,T]=n.useState(()=>p(v));return u(()=>{function O(){let A=p(v);T(A)}return O(),o.mergeRegister(v.registerUpdateListener(()=>{O()}),v.registerEditableListener(()=>{O()}))},[v]),y}function _(v,y){let[T,O]=n.useState(()=>v.getDecorators());return u(()=>v.registerDecoratorListener(A=>{i.flushSync(()=>{O(A)})}),[v]),n.useEffect(()=>{O(v.getDecorators())},[v]),n.useMemo(()=>{let A=[],D=Object.keys(T);for(let P=0;P<D.length;P++){let M=D[P],V=n.createElement(y,{onError:oe=>v._onError(oe)},n.createElement(n.Suspense,{fallback:null},T[M])),J=v.getElementByKey(M);J!==null&&A.push(i.createPortal(V,J,M))}return A},[y,T,v])}function C(v){u(()=>o.mergeRegister(l.registerRichText(v),a.registerDragonSupport(v)),[v])}function b({content:v}){var[y]=e.useLexicalComposerContext();y=m(y);let T=t();return y?typeof v=="function"?v(T):v:null}return Fh.RichTextPlugin=function({contentEditable:v,placeholder:y,ErrorBoundary:T}){let[O]=e.useLexicalComposerContext();return T=_(O,T),C(O),n.createElement(n.Fragment,null,v,n.createElement(b,{content:y}),T)},Fh}process.env.NODE_ENV==="development"?qO():ZO();var jh={},Gy;function JO(){if(Gy)return jh;Gy=1;var e=ur(),t=H;function n(){return n=Object.assign?Object.assign.bind():function(i){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function o({ariaActiveDescendant:i,ariaAutoComplete:a,ariaControls:l,ariaDescribedBy:u,ariaExpanded:p,ariaLabel:m,ariaLabelledBy:_,ariaMultiline:C,ariaOwns:b,ariaRequired:v,autoCapitalize:y,className:T,id:O,role:A="textbox",spellCheck:D=!0,style:P,tabIndex:M,"data-testid":V,...J}){const[oe]=e.useLexicalComposerContext(),[Z,U]=t.useState(!1),Q=t.useCallback(de=>{oe.setRootElement(de)},[oe]);return r(()=>(U(oe.isEditable()),oe.registerEditableListener(de=>{U(de)})),[oe]),t.createElement("div",n({},J,{"aria-activedescendant":Z?i:void 0,"aria-autocomplete":Z?a:"none","aria-controls":Z?l:void 0,"aria-describedby":u,"aria-expanded":Z&&A==="combobox"?!!p:void 0,"aria-label":m,"aria-labelledby":_,"aria-multiline":C,"aria-owns":Z?b:void 0,"aria-readonly":Z?void 0:!0,"aria-required":v,autoCapitalize:y,className:T,contentEditable:Z,"data-testid":V,id:O,ref:Q,role:A,spellCheck:D,style:P,tabIndex:M}))}return jh.ContentEditable=o,jh}var Bh={},Ky;function XO(){if(Ky)return Bh;Ky=1;var e=ur(),t=H;function n(){return n=Object.assign?Object.assign.bind():function(o){for(var i=1;i<arguments.length;i++){var a=arguments[i],l;for(l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l])}return o},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;return Bh.ContentEditable=function({ariaActiveDescendant:o,ariaAutoComplete:i,ariaControls:a,ariaDescribedBy:l,ariaExpanded:u,ariaLabel:p,ariaLabelledBy:m,ariaMultiline:_,ariaOwns:C,ariaRequired:b,autoCapitalize:v,className:y,id:T,role:O="textbox",spellCheck:A=!0,style:D,tabIndex:P,"data-testid":M,...V}){let[J]=e.useLexicalComposerContext(),[oe,Z]=t.useState(!1),U=t.useCallback(Q=>{J.setRootElement(Q)},[J]);return r(()=>(Z(J.isEditable()),J.registerEditableListener(Q=>{Z(Q)})),[J]),t.createElement("div",n({},V,{"aria-activedescendant":oe?o:void 0,"aria-autocomplete":oe?i:"none","aria-controls":oe?a:void 0,"aria-describedby":l,"aria-expanded":oe&&O==="combobox"?!!u:void 0,"aria-label":p,"aria-labelledby":m,"aria-multiline":_,"aria-owns":oe?C:void 0,"aria-readonly":oe?void 0:!0,"aria-required":b,autoCapitalize:v,className:y,contentEditable:oe,"data-testid":M,id:T,ref:U,role:O,spellCheck:A,style:D,tabIndex:P}))},Bh}process.env.NODE_ENV==="development"?JO():XO();var Wh,Uy;function QO(){if(Uy)return Wh;Uy=1;var e=H;function t(l,u){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,m){return p.__proto__=m,p},t(l,u)}function n(l,u){l.prototype=Object.create(u.prototype),l.prototype.constructor=l,t(l,u)}var r=function(l,u){return l===void 0&&(l=[]),u===void 0&&(u=[]),l.length!==u.length||l.some(function(p,m){return!Object.is(p,u[m])})},o={error:null},i=function(l){n(u,l);function u(){for(var m,_=arguments.length,C=new Array(_),b=0;b<_;b++)C[b]=arguments[b];return m=l.call.apply(l,[this].concat(C))||this,m.state=o,m.resetErrorBoundary=function(){for(var v,y=arguments.length,T=new Array(y),O=0;O<y;O++)T[O]=arguments[O];m.props.onReset==null||(v=m.props).onReset.apply(v,T),m.reset()},m}u.getDerivedStateFromError=function(m){return{error:m}};var p=u.prototype;return p.reset=function(){this.setState(o)},p.componentDidCatch=function(m,_){var C,b;(C=(b=this.props).onError)==null||C.call(b,m,_)},p.componentDidUpdate=function(m,_){var C=this.state.error,b=this.props.resetKeys;if(C!==null&&_.error!==null&&r(m.resetKeys,b)){var v,y;(v=(y=this.props).onResetKeysChange)==null||v.call(y,m.resetKeys,b),this.reset()}},p.render=function(){var m=this.state.error,_=this.props,C=_.fallbackRender,b=_.FallbackComponent,v=_.fallback;if(m!==null){var y={error:m,resetErrorBoundary:this.resetErrorBoundary};if(e.isValidElement(v))return v;if(typeof C=="function")return C(y);if(b)return e.createElement(b,y);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},u}(e.Component);function a({children:l,onError:u}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:u},l)}return Wh=a,Wh}var zh,Vy;function eA(){if(Vy)return zh;Vy=1;var e=H;function t(a,l){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,p){return u.__proto__=p,u},t(a,l)}function n(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,t(a,l)}function r(a,l){return a===void 0&&(a=[]),l===void 0&&(l=[]),a.length!==l.length||a.some(function(u,p){return!Object.is(u,l[p])})}var o={error:null},i=function(a){function l(){for(var p,m=arguments.length,_=Array(m),C=0;C<m;C++)_[C]=arguments[C];return p=a.call.apply(a,[this].concat(_))||this,p.state=o,p.resetErrorBoundary=function(){for(var b,v=arguments.length,y=Array(v),T=0;T<v;T++)y[T]=arguments[T];p.props.onReset==null||(b=p.props).onReset.apply(b,y),p.reset()},p}n(l,a),l.getDerivedStateFromError=function(p){return{error:p}};var u=l.prototype;return u.reset=function(){this.setState(o)},u.componentDidCatch=function(p,m){var _,C;(_=(C=this.props).onError)==null||_.call(C,p,m)},u.componentDidUpdate=function(p,m){var _=this.props.resetKeys;if(this.state.error!==null&&m.error!==null&&r(p.resetKeys,_)){var C,b;(C=(b=this.props).onResetKeysChange)==null||C.call(b,p.resetKeys,_),this.reset()}},u.render=function(){var p=this.state.error,m=this.props,_=m.fallbackRender,C=m.FallbackComponent;if(m=m.fallback,p!==null){if(p={error:p,resetErrorBoundary:this.resetErrorBoundary},e.isValidElement(m))return m;if(typeof _=="function")return _(p);if(C)return e.createElement(C,p);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},l}(e.Component);return zh=function({children:a,onError:l}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:l},a)},zh}process.env.NODE_ENV==="development"?QO():eA();var Hh={},Ar={},Yy;function tA(){if(Yy)return Ar;Yy=1;var e=Xt(),t=vn();function n(B){let W=1,X=B.getParent();for(;X!=null;){if(oe(X)){const F=X.getParent();if(he(F)){W++,X=F.getParent();continue}throw Error("A ListItemNode must have a ListNode for a parent.")}return W}return W}function r(B){let W=B.getParent();if(!he(W))throw Error("A ListItemNode must have a ListNode for a parent.");let X=W;for(;X!==null;)X=X.getParent(),he(X)&&(W=X);return W}function o(B){let W=[];const X=B.getChildren().filter(oe);for(let F=0;F<X.length;F++){const w=X[F],N=w.getFirstChild();he(N)?W=W.concat(o(N)):W.push(w)}return W}function i(B){return oe(B)&&he(B.getFirstChild())}function a(B){let W=B;for(;W.getNextSibling()==null&&W.getPreviousSibling()==null;){const X=W.getParent();if(X==null||!(oe(W)||he(W)))break;W=X}W.remove()}function l(B){return J().append(B)}function u(B,W){return oe(B)&&(W.length===0||W.length===1&&B.is(W[0])&&B.getChildrenSize()===0)}function p(B){const W=B.getParent();let X=1;if(W!=null)if(he(W))X=W.getStart();else throw Error("$getListItemValue: list node is not parent of list item node");const F=B.getPreviousSiblings();for(let w=0;w<F.length;w++){const N=F[w];oe(N)&&!he(N.getFirstChild())&&X++}return X}function m(B,W){B.update(()=>{const X=e.$getSelection();if(e.$INTERNAL_isPointSelection(X)){const F=X.getNodes(),w=X.anchor.getNode(),N=w.getParent();if(u(w,F)){const I=te(W);if(e.$isRootOrShadowRoot(N)){w.replace(I);const q=J();e.$isElementNode(w)&&(q.setFormat(w.getFormatType()),q.setIndent(w.getIndent())),I.append(q)}else if(oe(w)){const q=w.getParentOrThrow();_(I,q.getChildren()),q.replace(I)}return}else{const I=new Set;for(let q=0;q<F.length;q++){const ue=F[q];if(e.$isElementNode(ue)&&ue.isEmpty()&&!oe(ue)&&!I.has(ue.getKey())){C(ue,W);continue}if(e.$isLeafNode(ue)){let fe=ue.getParent();for(;fe!=null;){const se=fe.getKey();if(he(fe)){if(!I.has(se)){const Ce=te(W);_(Ce,fe.getChildren()),fe.replace(Ce),y(Ce),I.add(se)}break}else{const Ce=fe.getParent();if(e.$isRootOrShadowRoot(Ce)&&!I.has(se)){I.add(se),C(fe,W);break}fe=Ce}}}}}}})}function _(B,W){B.splice(B.getChildrenSize(),0,W)}function C(B,W){if(he(B))return B;const X=B.getPreviousSibling(),F=B.getNextSibling(),w=J();if(w.setFormat(B.getFormatType()),w.setIndent(B.getIndent()),_(w,B.getChildren()),he(X)&&W===X.getListType())return X.append(w),B.remove(),he(F)&&W===F.getListType()&&(_(X,F.getChildren()),F.remove()),X;if(he(F)&&W===F.getListType())return F.getFirstChildOrThrow().insertBefore(w),B.remove(),F;{const N=te(W);return N.append(w),B.replace(N),y(N),N}}function b(B,W){const X=B.getLastChild(),F=W.getFirstChild();X&&F&&i(X)&&i(F)&&(b(X.getFirstChild(),F.getFirstChild()),F.remove());const w=W.getChildren();w.length>0&&(B.append(...w),y(B)),W.remove()}function v(B){B.update(()=>{const W=e.$getSelection();if(e.$isRangeSelection(W)){const X=new Set,F=W.getNodes(),w=W.anchor.getNode();if(u(w,F))X.add(r(w));else for(let N=0;N<F.length;N++){const I=F[N];if(e.$isLeafNode(I)){const q=t.$getNearestNodeOfType(I,D);q!=null&&X.add(r(q))}}for(const N of X){let I=N;const q=o(N);for(const ue of q){const fe=e.$createParagraphNode();_(fe,ue.getChildren()),I.insertAfter(fe),I=fe,ue.__key===W.anchor.key&&W.anchor.set(fe.getKey(),0,"element"),ue.__key===W.focus.key&&W.focus.set(fe.getKey(),0,"element"),ue.remove()}N.remove()}}})}function y(B,W){const X=W||B.getChildren();if(X!==void 0)for(let F=0;F<X.length;F++){const w=X[F];if(oe(w)){const N=w.getValue(),I=p(w);N!==I&&w.setValue(I)}}}function T(B){const W=new Set;if(i(B)||W.has(B.getKey()))return;const X=B.getParent(),F=B.getNextSibling(),w=B.getPreviousSibling();if(i(F)&&i(w)){const N=w.getFirstChild();if(he(N)){N.append(B);const I=F.getFirstChild();if(he(I)){const q=I.getChildren();_(N,q),F.remove(),W.add(F.getKey())}y(N)}}else if(i(F)){const N=F.getFirstChild();if(he(N)){const I=N.getFirstChild();I!==null&&I.insertBefore(B),y(N)}}else if(i(w)){const N=w.getFirstChild();he(N)&&(N.append(B),y(N))}else if(he(X)){const N=J(),I=te(X.getListType());N.append(I),I.append(B),w?w.insertAfter(N):F?F.insertBefore(N):X.append(N),y(I)}he(X)&&y(X)}function O(B){if(i(B))return;const W=B.getParent(),X=W?W.getParent():void 0,F=X?X.getParent():void 0;if(he(F)&&oe(X)&&he(W)){const w=W?W.getFirstChild():void 0,N=W?W.getLastChild():void 0;if(B.is(w))X.insertBefore(B),W.isEmpty()&&X.remove();else if(B.is(N))X.insertAfter(B),W.isEmpty()&&X.remove();else{const I=W.getListType(),q=J(),ue=te(I);q.append(ue),B.getPreviousSiblings().forEach(Ce=>ue.append(Ce));const fe=J(),se=te(I);fe.append(se),_(se,B.getNextSiblings()),X.insertBefore(q),X.insertAfter(fe),X.replace(B)}y(W),y(F)}}function A(){const B=e.$getSelection();if(!e.$isRangeSelection(B)||!B.isCollapsed())return!1;const W=B.anchor.getNode();if(!oe(W)||W.getChildrenSize()!==0)return!1;const X=r(W),F=W.getParent();if(!he(F))throw Error("A ListItemNode must have a ListNode for a parent.");const w=F.getParent();let N;if(e.$isRootOrShadowRoot(w))N=e.$createParagraphNode(),X.insertAfter(N);else if(oe(w))N=J(),w.insertAfter(N);else return!1;N.select();const I=W.getNextSiblings();if(I.length>0){const q=te(F.getListType());if(e.$isParagraphNode(N))N.insertAfter(q);else{const ue=J();ue.append(q),N.insertAfter(ue)}I.forEach(ue=>{ue.remove(),q.append(ue)})}return a(W),!0}class D extends e.ElementNode{static getType(){return"listitem"}static clone(W){return new D(W.__value,W.__checked,W.__key)}constructor(W,X,F){super(F),this.__value=W===void 0?1:W,this.__checked=X}createDOM(W){const X=document.createElement("li"),F=this.getParent();return he(F)&&F.getListType()==="check"&&M(X,this,null),X.value=this.__value,P(X,W.theme,this),X}updateDOM(W,X,F){const w=this.getParent();return he(w)&&w.getListType()==="check"&&M(X,this,W),X.value=this.__value,P(X,F.theme,this),!1}static transform(){return W=>{const X=W.getParent();he(X)&&(y(X),X.getListType()!=="check"&&W.getChecked()!=null&&W.setChecked(void 0))}}static importDOM(){return{li:W=>({conversion:V,priority:0})}}static importJSON(W){const X=J();return X.setChecked(W.checked),X.setValue(W.value),X.setFormat(W.format),X.setDirection(W.direction),X}exportDOM(W){const X=this.createDOM(W._config);return X.style.textAlign=this.getFormatType(),{element:X}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...W){for(let X=0;X<W.length;X++){const F=W[X];if(e.$isElementNode(F)&&this.canMergeWith(F)){const w=F.getChildren();this.append(...w),F.remove()}else super.append(F)}return this}replace(W,X){if(oe(W))return super.replace(W);this.setIndent(0);const F=this.getParentOrThrow();if(!he(F))return W;if(F.__first===this.getKey())F.insertBefore(W);else if(F.__last===this.getKey())F.insertAfter(W);else{const w=te(F.getListType());let N=this.getNextSibling();for(;N;){const I=N;N=N.getNextSibling(),w.append(I)}F.insertAfter(W),W.insertAfter(w)}return X&&this.getChildren().forEach(w=>{W.append(w)}),this.remove(),F.getChildrenSize()===0&&F.remove(),W}insertAfter(W,X=!0){const F=this.getParentOrThrow();if(!he(F))throw Error("insertAfter: list node is not parent of list item node");const w=this.getNextSiblings();if(oe(W)){const N=super.insertAfter(W,X),I=W.getParentOrThrow();return he(I)&&y(I),N}if(he(W)){let N=W;const I=W.getChildren();for(let q=I.length-1;q>=0;q--)N=I[q],this.insertAfter(N,X);return N}if(F.insertAfter(W,X),w.length!==0){const N=te(F.getListType());w.forEach(I=>N.append(I)),W.insertAfter(N,X)}return W}remove(W){const X=this.getPreviousSibling(),F=this.getNextSibling();if(super.remove(W),X&&F&&i(X)&&i(F))b(X.getFirstChild(),F.getFirstChild()),F.remove();else if(F){const w=F.getParent();he(w)&&y(w)}}insertNewAfter(W,X=!0){const F=J(this.__checked==null?void 0:!1);return this.insertAfter(F,X),F}collapseAtStart(W){const X=e.$createParagraphNode();this.getChildren().forEach(I=>X.append(I));const F=this.getParentOrThrow(),w=F.getParentOrThrow(),N=oe(w);if(F.getChildrenSize()===1)if(N)F.remove(),w.select();else{F.insertBefore(X),F.remove();const I=W.anchor,q=W.focus,ue=X.getKey();I.type==="element"&&I.getNode().is(this)&&I.set(ue,I.offset,"element"),q.type==="element"&&q.getNode().is(this)&&q.set(ue,q.offset,"element")}else F.insertBefore(X),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(W){const X=this.getWritable();X.__value=W}getChecked(){return this.getLatest().__checked}setChecked(W){const X=this.getWritable();X.__checked=W}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const W=this.getParent();if(W===null)return this.getLatest().__indent;let X=W.getParentOrThrow(),F=0;for(;oe(X);)X=X.getParentOrThrow().getParentOrThrow(),F++;return F}setIndent(W){if(!(typeof W=="number"&&W>-1))throw Error("Invalid indent value.");let X=this.getIndent();for(;X!==W;)X<W?(T(this),X++):(O(this),X--);return this}insertBefore(W){if(oe(W)){const X=this.getParentOrThrow();if(he(X)){const F=this.getNextSiblings();y(X,F)}}return super.insertBefore(W)}canInsertAfter(W){return oe(W)}canReplaceWith(W){return oe(W)}canMergeWith(W){return e.$isParagraphNode(W)||oe(W)}extractWithChild(W,X){if(!e.$isRangeSelection(X))return!1;const F=X.anchor.getNode(),w=X.focus.getNode();return this.isParentOf(F)&&this.isParentOf(w)&&this.getTextContent().length===X.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return te("bullet")}}function P(B,W,X){const F=[],w=[],N=W.list,I=N?N.listitem:void 0;let q;if(N&&N.nested&&(q=N.nested.listitem),I!==void 0){const ue=I.split(" ");F.push(...ue)}if(N){const ue=X.getParent(),fe=he(ue)&&ue.getListType()==="check",se=X.getChecked();(!fe||se)&&w.push(N.listitemUnchecked),(!fe||!se)&&w.push(N.listitemChecked),fe&&F.push(se?N.listitemChecked:N.listitemUnchecked)}if(q!==void 0){const ue=q.split(" ");X.getChildren().some(fe=>he(fe))?F.push(...ue):w.push(...ue)}w.length>0&&t.removeClassNamesFromElement(B,...w),F.length>0&&t.addClassNamesToElement(B,...F)}function M(B,W,X,F){he(W.getFirstChild())?(B.removeAttribute("role"),B.removeAttribute("tabIndex"),B.removeAttribute("aria-checked")):(B.setAttribute("role","checkbox"),B.setAttribute("tabIndex","-1"),(!X||W.__checked!==X.__checked)&&B.setAttribute("aria-checked",W.getChecked()?"true":"false"))}function V(B){const W=t.isHTMLElement(B)&&B.getAttribute("aria-checked")==="true";return{node:J(W)}}function J(B){return e.$applyNodeReplacement(new D(void 0,B))}function oe(B){return B instanceof D}class Z extends e.ElementNode{static getType(){return"list"}static clone(W){const X=W.__listType||pe[W.__tag];return new Z(X,W.__start,W.__key)}constructor(W,X,F){super(F);const w=pe[W]||W;this.__listType=w,this.__tag=w==="number"?"ol":"ul",this.__start=X}getTag(){return this.__tag}setListType(W){const X=this.getWritable();X.__listType=W,X.__tag=W==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(W,X){const F=this.__tag,w=document.createElement(F);return this.__start!==1&&w.setAttribute("start",String(this.__start)),w.__lexicalListType=this.__listType,U(w,W.theme,this),w}updateDOM(W,X,F){return W.__tag!==this.__tag?!0:(U(X,F.theme,this),!1)}static importDOM(){return{ol:W=>({conversion:de,priority:0}),ul:W=>({conversion:de,priority:0})}}static importJSON(W){const X=te(W.listType,W.start);return X.setFormat(W.format),X.setIndent(W.indent),X.setDirection(W.direction),X}exportDOM(W){const{element:X}=super.exportDOM(W);return X&&t.isHTMLElement(X)&&(this.__start!==1&&X.setAttribute("start",String(this.__start)),this.__listType==="check"&&X.setAttribute("__lexicalListType","check")),{element:X}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...W){for(let X=0;X<W.length;X++){const F=W[X];if(oe(F))super.append(F);else{const w=J();if(he(F))w.append(F);else if(e.$isElementNode(F)){const N=e.$createTextNode(F.getTextContent());w.append(N)}else w.append(F);super.append(w)}}return y(this),this}extractWithChild(W){return oe(W)}}function U(B,W,X){const F=[],w=[],N=W.list;if(N!==void 0){const I=N[`${X.__tag}Depth`]||[],q=n(X)-1,ue=q%I.length,fe=I[ue],se=N[X.__tag];let Ce;const Oe=N.nested;if(Oe!==void 0&&Oe.list&&(Ce=Oe.list),se!==void 0&&F.push(se),fe!==void 0){const Be=fe.split(" ");F.push(...Be);for(let ce=0;ce<I.length;ce++)ce!==ue&&w.push(X.__tag+ce)}if(Ce!==void 0){const Be=Ce.split(" ");q>1?F.push(...Be):w.push(...Be)}}w.length>0&&t.removeClassNamesFromElement(B,...w),F.length>0&&t.addClassNamesToElement(B,...F)}function Q(B){const W=[];for(let X=0;X<B.length;X++){const F=B[X];if(oe(F)){W.push(F);const w=F.getChildren();w.length>1&&w.forEach(N=>{he(N)&&W.push(l(N))})}else W.push(l(F))}return W}function de(B){const W=B.nodeName.toLowerCase();let X=null;if(W==="ol"){const F=B.start;X=te("number",F)}else W==="ul"&&(t.isHTMLElement(B)&&B.getAttribute("__lexicallisttype")==="check"?X=te("check"):X=te("bullet"));return{after:Q,node:X}}const pe={ol:"number",ul:"bullet"};function te(B,W=1){return e.$applyNodeReplacement(new Z(B,W))}function he(B){return B instanceof Z}const Y=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),j=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),ee=e.createCommand("INSERT_CHECK_LIST_COMMAND"),ne=e.createCommand("REMOVE_LIST_COMMAND");return Ar.$createListItemNode=J,Ar.$createListNode=te,Ar.$getListDepth=n,Ar.$handleListInsertParagraph=A,Ar.$isListItemNode=oe,Ar.$isListNode=he,Ar.INSERT_CHECK_LIST_COMMAND=ee,Ar.INSERT_ORDERED_LIST_COMMAND=j,Ar.INSERT_UNORDERED_LIST_COMMAND=Y,Ar.ListItemNode=D,Ar.ListNode=Z,Ar.REMOVE_LIST_COMMAND=ne,Ar.insertList=m,Ar.removeList=v,Ar}var Rr={},qy;function nA(){if(qy)return Rr;qy=1;var e=Xt(),t=vn();function n(Y){let j=new URLSearchParams;j.append("code",Y);for(let ee=1;ee<arguments.length;ee++)j.append("v",arguments[ee]);throw Error(`Minified Lexical error #${Y}; visit https://lexical.dev/docs/error?${j} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(Y){let j=1;for(Y=Y.getParent();Y!=null;){if(P(Y)){if(Y=Y.getParent(),Q(Y)){j++,Y=Y.getParent();continue}n(40)}break}return j}function o(Y){Y=Y.getParent(),Q(Y)||n(40);let j=Y;for(;j!==null;)j=j.getParent(),Q(j)&&(Y=j);return Y}function i(Y){let j=[];Y=Y.getChildren().filter(P);for(let ee=0;ee<Y.length;ee++){let ne=Y[ee],B=ne.getFirstChild();Q(B)?j=j.concat(i(B)):j.push(ne)}return j}function a(Y){return P(Y)&&Q(Y.getFirstChild())}function l(Y){for(;Y.getNextSibling()==null&&Y.getPreviousSibling()==null;){let j=Y.getParent();if(j==null||!P(Y)&&!Q(Y))break;Y=j}Y.remove()}function u(Y){return D().append(Y)}function p(Y,j){return P(Y)&&(j.length===0||j.length===1&&Y.is(j[0])&&Y.getChildrenSize()===0)}function m(Y,j){Y.splice(Y.getChildrenSize(),0,j)}function _(Y,j){if(Q(Y))return Y;let ee=Y.getPreviousSibling(),ne=Y.getNextSibling(),B=D();return B.setFormat(Y.getFormatType()),B.setIndent(Y.getIndent()),m(B,Y.getChildren()),Q(ee)&&j===ee.getListType()?(ee.append(B),Y.remove(),Q(ne)&&j===ne.getListType()&&(m(ee,ne.getChildren()),ne.remove()),ee):Q(ne)&&j===ne.getListType()?(ne.getFirstChildOrThrow().insertBefore(B),Y.remove(),ne):(j=U(j),j.append(B),Y.replace(j),b(j),j)}function C(Y,j){var ee=Y.getLastChild();let ne=j.getFirstChild();ee&&ne&&a(ee)&&a(ne)&&(C(ee.getFirstChild(),ne.getFirstChild()),ne.remove()),ee=j.getChildren(),0<ee.length&&(Y.append(...ee),b(Y)),j.remove()}function b(Y,j){if(Y=j||Y.getChildren(),Y!==void 0)for(j=0;j<Y.length;j++){let W=Y[j];if(P(W)){let X=W.getValue();var ee=W,ne=ee.getParent(),B=1;for(ne!=null&&(Q(ne)?B=ne.getStart():n(44)),ee=ee.getPreviousSiblings(),ne=0;ne<ee.length;ne++){let F=ee[ne];P(F)&&!Q(F.getFirstChild())&&B++}X!==B&&W.setValue(B)}}}function v(Y){if(!a(Y)){var j=Y.getParent(),ee=j?j.getParent():void 0,ne=ee?ee.getParent():void 0;if(Q(ne)&&P(ee)&&Q(j)){var B=j?j.getFirstChild():void 0,W=j?j.getLastChild():void 0;if(Y.is(B))ee.insertBefore(Y),j.isEmpty()&&ee.remove();else if(Y.is(W))ee.insertAfter(Y),j.isEmpty()&&ee.remove();else{var X=j.getListType();B=D();let F=U(X);B.append(F),Y.getPreviousSiblings().forEach(w=>F.append(w)),W=D(),X=U(X),W.append(X),m(X,Y.getNextSiblings()),ee.insertBefore(B),ee.insertAfter(W),ee.replace(Y)}b(j),b(ne)}}}class y extends e.ElementNode{static getType(){return"listitem"}static clone(j){return new y(j.__value,j.__checked,j.__key)}constructor(j,ee,ne){super(ne),this.__value=j===void 0?1:j,this.__checked=ee}createDOM(j){let ee=document.createElement("li"),ne=this.getParent();return Q(ne)&&ne.getListType()==="check"&&O(ee,this,null),ee.value=this.__value,T(ee,j.theme,this),ee}updateDOM(j,ee,ne){let B=this.getParent();return Q(B)&&B.getListType()==="check"&&O(ee,this,j),ee.value=this.__value,T(ee,ne.theme,this),!1}static transform(){return j=>{let ee=j.getParent();Q(ee)&&(b(ee),ee.getListType()!=="check"&&j.getChecked()!=null&&j.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:A,priority:0})}}static importJSON(j){let ee=D();return ee.setChecked(j.checked),ee.setValue(j.value),ee.setFormat(j.format),ee.setDirection(j.direction),ee}exportDOM(j){return j=this.createDOM(j._config),j.style.textAlign=this.getFormatType(),{element:j}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...j){for(let ee=0;ee<j.length;ee++){let ne=j[ee];if(e.$isElementNode(ne)&&this.canMergeWith(ne)){let B=ne.getChildren();this.append(...B),ne.remove()}else super.append(ne)}return this}replace(j,ee){if(P(j))return super.replace(j);this.setIndent(0);let ne=this.getParentOrThrow();if(!Q(ne))return j;if(ne.__first===this.getKey())ne.insertBefore(j);else if(ne.__last===this.getKey())ne.insertAfter(j);else{let B=U(ne.getListType()),W=this.getNextSibling();for(;W;){let X=W;W=W.getNextSibling(),B.append(X)}ne.insertAfter(j),j.insertAfter(B)}return ee&&this.getChildren().forEach(B=>{j.append(B)}),this.remove(),ne.getChildrenSize()===0&&ne.remove(),j}insertAfter(j,ee=!0){var ne=this.getParentOrThrow();Q(ne)||n(39);var B=this.getNextSiblings();if(P(j))return ee=super.insertAfter(j,ee),j=j.getParentOrThrow(),Q(j)&&b(j),ee;if(Q(j)){for(ne=j,j=j.getChildren(),B=j.length-1;0<=B;B--)ne=j[B],this.insertAfter(ne,ee);return ne}if(ne.insertAfter(j,ee),B.length!==0){let W=U(ne.getListType());B.forEach(X=>W.append(X)),j.insertAfter(W,ee)}return j}remove(j){let ee=this.getPreviousSibling(),ne=this.getNextSibling();super.remove(j),ee&&ne&&a(ee)&&a(ne)?(C(ee.getFirstChild(),ne.getFirstChild()),ne.remove()):ne&&(j=ne.getParent(),Q(j)&&b(j))}insertNewAfter(j,ee=!0){return j=D(this.__checked==null?void 0:!1),this.insertAfter(j,ee),j}collapseAtStart(j){let ee=e.$createParagraphNode();this.getChildren().forEach(X=>ee.append(X));var ne=this.getParentOrThrow(),B=ne.getParentOrThrow();let W=P(B);return ne.getChildrenSize()===1?W?(ne.remove(),B.select()):(ne.insertBefore(ee),ne.remove(),ne=j.anchor,j=j.focus,B=ee.getKey(),ne.type==="element"&&ne.getNode().is(this)&&ne.set(B,ne.offset,"element"),j.type==="element"&&j.getNode().is(this)&&j.set(B,j.offset,"element")):(ne.insertBefore(ee),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(j){this.getWritable().__value=j}getChecked(){return this.getLatest().__checked}setChecked(j){this.getWritable().__checked=j}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var j=this.getParent();if(j===null)return this.getLatest().__indent;j=j.getParentOrThrow();let ee=0;for(;P(j);)j=j.getParentOrThrow().getParentOrThrow(),ee++;return ee}setIndent(j){typeof j=="number"&&-1<j||n(117);let ee=this.getIndent();for(;ee!==j;)if(ee<j){e:{var ne=new Set;if(a(this)||ne.has(this.getKey()))break e;let F=this.getParent();var B=this.getNextSibling(),W=this.getPreviousSibling();if(a(B)&&a(W)){if(W=W.getFirstChild(),Q(W)){W.append(this);var X=B.getFirstChild();Q(X)&&(X=X.getChildren(),m(W,X),B.remove(),ne.add(B.getKey())),b(W)}}else a(B)?(B=B.getFirstChild(),Q(B)&&(ne=B.getFirstChild(),ne!==null&&ne.insertBefore(this),b(B))):a(W)?(B=W.getFirstChild(),Q(B)&&(B.append(this),b(B))):Q(F)&&(ne=D(),X=U(F.getListType()),ne.append(X),X.append(this),W?W.insertAfter(ne):B?B.insertBefore(ne):F.append(ne),b(X));Q(F)&&b(F)}ee++}else v(this),ee--;return this}insertBefore(j){if(P(j)){let ee=this.getParentOrThrow();if(Q(ee)){let ne=this.getNextSiblings();b(ee,ne)}}return super.insertBefore(j)}canInsertAfter(j){return P(j)}canReplaceWith(j){return P(j)}canMergeWith(j){return e.$isParagraphNode(j)||P(j)}extractWithChild(j,ee){if(!e.$isRangeSelection(ee))return!1;j=ee.anchor.getNode();let ne=ee.focus.getNode();return this.isParentOf(j)&&this.isParentOf(ne)&&this.getTextContent().length===ee.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return U("bullet")}}function T(Y,j,ee){let ne=[],B=[];var W=(j=j.list)?j.listitem:void 0;if(j&&j.nested)var X=j.nested.listitem;if(W!==void 0&&(W=W.split(" "),ne.push(...W)),j){W=ee.getParent(),W=Q(W)&&W.getListType()==="check";let F=ee.getChecked();W&&!F||B.push(j.listitemUnchecked),W&&F||B.push(j.listitemChecked),W&&ne.push(F?j.listitemChecked:j.listitemUnchecked)}X!==void 0&&(X=X.split(" "),ee.getChildren().some(F=>Q(F))?ne.push(...X):B.push(...X)),0<B.length&&t.removeClassNamesFromElement(Y,...B),0<ne.length&&t.addClassNamesToElement(Y,...ne)}function O(Y,j,ee){Q(j.getFirstChild())?(Y.removeAttribute("role"),Y.removeAttribute("tabIndex"),Y.removeAttribute("aria-checked")):(Y.setAttribute("role","checkbox"),Y.setAttribute("tabIndex","-1"),ee&&j.__checked===ee.__checked||Y.setAttribute("aria-checked",j.getChecked()?"true":"false"))}function A(Y){return Y=t.isHTMLElement(Y)&&Y.getAttribute("aria-checked")==="true",{node:D(Y)}}function D(Y){return e.$applyNodeReplacement(new y(void 0,Y))}function P(Y){return Y instanceof y}class M extends e.ElementNode{static getType(){return"list"}static clone(j){return new M(j.__listType||Z[j.__tag],j.__start,j.__key)}constructor(j,ee,ne){super(ne),this.__listType=j=Z[j]||j,this.__tag=j==="number"?"ol":"ul",this.__start=ee}getTag(){return this.__tag}setListType(j){let ee=this.getWritable();ee.__listType=j,ee.__tag=j==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(j){let ee=document.createElement(this.__tag);return this.__start!==1&&ee.setAttribute("start",String(this.__start)),ee.__lexicalListType=this.__listType,V(ee,j.theme,this),ee}updateDOM(j,ee,ne){return j.__tag!==this.__tag?!0:(V(ee,ne.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:oe,priority:0}),ul:()=>({conversion:oe,priority:0})}}static importJSON(j){let ee=U(j.listType,j.start);return ee.setFormat(j.format),ee.setIndent(j.indent),ee.setDirection(j.direction),ee}exportDOM(j){return{element:j}=super.exportDOM(j),j&&t.isHTMLElement(j)&&(this.__start!==1&&j.setAttribute("start",String(this.__start)),this.__listType==="check"&&j.setAttribute("__lexicalListType","check")),{element:j}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...j){for(let ne=0;ne<j.length;ne++){var ee=j[ne];if(P(ee))super.append(ee);else{let B=D();Q(ee)||e.$isElementNode(ee)&&(ee=e.$createTextNode(ee.getTextContent())),B.append(ee),super.append(B)}}return b(this),this}extractWithChild(j){return P(j)}}function V(Y,j,ee){let ne=[],B=[];var W=j.list;if(W!==void 0){let F=W[`${ee.__tag}Depth`]||[];j=r(ee)-1;let w=j%F.length;var X=F[w];let N=W[ee.__tag],I;if(W=W.nested,W!==void 0&&W.list&&(I=W.list),N!==void 0&&ne.push(N),X!==void 0)for(X=X.split(" "),ne.push(...X),X=0;X<F.length;X++)X!==w&&B.push(ee.__tag+X);I!==void 0&&(ee=I.split(" "),1<j?ne.push(...ee):B.push(...ee))}0<B.length&&t.removeClassNamesFromElement(Y,...B),0<ne.length&&t.addClassNamesToElement(Y,...ne)}function J(Y){let j=[];for(let ne=0;ne<Y.length;ne++){var ee=Y[ne];P(ee)?(j.push(ee),ee=ee.getChildren(),1<ee.length&&ee.forEach(B=>{Q(B)&&j.push(u(B))})):j.push(u(ee))}return j}function oe(Y){let j=Y.nodeName.toLowerCase(),ee=null;return j==="ol"?ee=U("number",Y.start):j==="ul"&&(ee=t.isHTMLElement(Y)&&Y.getAttribute("__lexicallisttype")==="check"?U("check"):U("bullet")),{after:J,node:ee}}let Z={ol:"number",ul:"bullet"};function U(Y,j=1){return e.$applyNodeReplacement(new M(Y,j))}function Q(Y){return Y instanceof M}let de=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),pe=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),te=e.createCommand("INSERT_CHECK_LIST_COMMAND"),he=e.createCommand("REMOVE_LIST_COMMAND");return Rr.$createListItemNode=D,Rr.$createListNode=U,Rr.$getListDepth=r,Rr.$handleListInsertParagraph=function(){var Y=e.$getSelection();if(!e.$isRangeSelection(Y)||!Y.isCollapsed()||(Y=Y.anchor.getNode(),!P(Y)||Y.getChildrenSize()!==0))return!1;var j=o(Y),ee=Y.getParent();Q(ee)||n(40);let ne=ee.getParent(),B;if(e.$isRootOrShadowRoot(ne))B=e.$createParagraphNode(),j.insertAfter(B);else if(P(ne))B=D(),ne.insertAfter(B);else return!1;if(B.select(),j=Y.getNextSiblings(),0<j.length){let W=U(ee.getListType());e.$isParagraphNode(B)?B.insertAfter(W):(ee=D(),ee.append(W),B.insertAfter(ee)),j.forEach(X=>{X.remove(),W.append(X)})}return l(Y),!0},Rr.$isListItemNode=P,Rr.$isListNode=Q,Rr.INSERT_CHECK_LIST_COMMAND=te,Rr.INSERT_ORDERED_LIST_COMMAND=pe,Rr.INSERT_UNORDERED_LIST_COMMAND=de,Rr.ListItemNode=y,Rr.ListNode=M,Rr.REMOVE_LIST_COMMAND=he,Rr.insertList=function(Y,j){Y.update(()=>{var ee=e.$getSelection();if(e.$INTERNAL_isPointSelection(ee)){var ne=ee.getNodes();ee=ee.anchor.getNode();var B=ee.getParent();if(p(ee,ne))ne=U(j),e.$isRootOrShadowRoot(B)?(ee.replace(ne),B=D(),e.$isElementNode(ee)&&(B.setFormat(ee.getFormatType()),B.setIndent(ee.getIndent())),ne.append(B)):P(ee)&&(ee=ee.getParentOrThrow(),m(ne,ee.getChildren()),ee.replace(ne));else for(ee=new Set,B=0;B<ne.length;B++){var W=ne[B];if(e.$isElementNode(W)&&W.isEmpty()&&!P(W)&&!ee.has(W.getKey()))_(W,j);else if(e.$isLeafNode(W))for(W=W.getParent();W!=null;){let F=W.getKey();if(Q(W)){if(!ee.has(F)){var X=U(j);m(X,W.getChildren()),W.replace(X),b(X),ee.add(F)}break}else{if(X=W.getParent(),e.$isRootOrShadowRoot(X)&&!ee.has(F)){ee.add(F),_(W,j);break}W=X}}}}})},Rr.removeList=function(Y){Y.update(()=>{let j=e.$getSelection();if(e.$isRangeSelection(j)){var ee=new Set,ne=j.getNodes(),B=j.anchor.getNode();if(p(B,ne))ee.add(o(B));else for(B=0;B<ne.length;B++){var W=ne[B];e.$isLeafNode(W)&&(W=t.$getNearestNodeOfType(W,y),W!=null&&ee.add(o(W)))}for(let X of ee){ee=X,ne=i(X);for(let F of ne)ne=e.$createParagraphNode(),m(ne,F.getChildren()),ee.insertAfter(ne),ee=ne,F.__key===j.anchor.key&&j.anchor.set(ne.getKey(),0,"element"),F.__key===j.focus.key&&j.focus.set(ne.getKey(),0,"element"),F.remove();X.remove()}}})},Rr}var Zy,Jy;function kg(){return Jy||(Jy=1,Zy=process.env.NODE_ENV==="development"?tA():nA()),Zy}var Xy;function rA(){if(Xy)return Hh;Xy=1;var e=kg(),t=ur(),n=H,r=vn(),o=Xt();function i(l){n.useEffect(()=>r.mergeRegister(l.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(l,"number"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(l,"bullet"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(l),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[l])}function a(){const[l]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!l.hasNodes([e.ListNode,e.ListItemNode]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[l]),i(l),null}return Hh.ListPlugin=a,Hh}var Gh={},Qy;function oA(){if(Qy)return Gh;Qy=1;var e=kg(),t=ur(),n=H,r=vn(),o=Xt();function i(a){n.useEffect(()=>r.mergeRegister(a.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(a,"number"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(a,"bullet"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(a),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[a])}return Gh.ListPlugin=function(){let[a]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!a.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[a]),i(a),null},Gh}process.env.NODE_ENV==="development"?rA():oA();var Kh={},pi={},e0;function iA(){if(e0)return pi;e0=1;var e=vn(),t=Xt();const n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(v){return new r(v.__url,{rel:v.__rel,target:v.__target,title:v.__title},v.__key)}constructor(v,y={},T){super(T);const{target:O=null,rel:A=null,title:D=null}=y;this.__url=v,this.__target=O,this.__rel=A,this.__title=D}createDOM(v){const y=document.createElement("a");return y.href=this.sanitizeUrl(this.__url),this.__target!==null&&(y.target=this.__target),this.__rel!==null&&(y.rel=this.__rel),this.__title!==null&&(y.title=this.__title),e.addClassNamesToElement(y,v.theme.link),y}updateDOM(v,y,T){const O=this.__url,A=this.__target,D=this.__rel,P=this.__title;return O!==v.__url&&(y.href=O),A!==v.__target&&(A?y.target=A:y.removeAttribute("target")),D!==v.__rel&&(D?y.rel=D:y.removeAttribute("rel")),P!==v.__title&&(P?y.title=P:y.removeAttribute("title")),!1}static importDOM(){return{a:v=>({conversion:o,priority:1})}}static importJSON(v){const y=i(v.url,{rel:v.rel,target:v.target,title:v.title});return y.setFormat(v.format),y.setIndent(v.indent),y.setDirection(v.direction),y}sanitizeUrl(v){try{const y=new URL(v);if(!n.has(y.protocol))return"about:blank"}catch{return v}return v}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(v){const y=this.getWritable();y.__url=v}getTarget(){return this.getLatest().__target}setTarget(v){const y=this.getWritable();y.__target=v}getRel(){return this.getLatest().__rel}setRel(v){const y=this.getWritable();y.__rel=v}getTitle(){return this.getLatest().__title}setTitle(v){const y=this.getWritable();y.__title=v}insertNewAfter(v,y=!0){const T=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(T,y),T}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(v,y,T){if(!t.$isRangeSelection(y))return!1;const O=y.anchor.getNode(),A=y.focus.getNode();return this.isParentOf(O)&&this.isParentOf(A)&&y.getTextContent().length>0}}function o(b){let v=null;if(e.isHTMLAnchorElement(b)){const y=b.textContent;(y!==null&&y!==""||b.children.length>0)&&(v=i(b.getAttribute("href")||"",{rel:b.getAttribute("rel"),target:b.getAttribute("target"),title:b.getAttribute("title")}))}return{node:v}}function i(b,v){return t.$applyNodeReplacement(new r(b,v))}function a(b){return b instanceof r}class l extends r{static getType(){return"autolink"}static clone(v){return new l(v.__url,{rel:v.__rel,target:v.__target,title:v.__title},v.__key)}static importJSON(v){const y=u(v.url,{rel:v.rel,target:v.target,title:v.title});return y.setFormat(v.format),y.setIndent(v.indent),y.setDirection(v.direction),y}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(v,y=!0){const T=this.getParentOrThrow().insertNewAfter(v,y);if(t.$isElementNode(T)){const O=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return T.append(O),O}return null}}function u(b,v){return t.$applyNodeReplacement(new l(b,v))}function p(b){return b instanceof l}const m=t.createCommand("TOGGLE_LINK_COMMAND");function _(b,v={}){const{target:y,title:T}=v,O=v.rel===void 0?"noreferrer":v.rel,A=t.$getSelection();if(!t.$isRangeSelection(A))return;const D=A.extract();if(b===null)D.forEach(P=>{const M=P.getParent();if(a(M)){const V=M.getChildren();for(let J=0;J<V.length;J++)M.insertBefore(V[J]);M.remove()}});else{if(D.length===1){const V=D[0],J=C(V,a);if(J!==null){J.setURL(b),y!==void 0&&J.setTarget(y),O!==null&&J.setRel(O),T!==void 0&&J.setTitle(T);return}}let P=null,M=null;D.forEach(V=>{const J=V.getParent();if(!(J===M||J===null||t.$isElementNode(V)&&!V.isInline())){if(a(J)){M=J,J.setURL(b),y!==void 0&&J.setTarget(y),O!==null&&M.setRel(O),T!==void 0&&M.setTitle(T);return}if(J.is(P)||(P=J,M=i(b,{rel:O,target:y,title:T}),a(J)?V.getPreviousSibling()===null?J.insertBefore(M):J.insertAfter(M):V.insertBefore(M)),a(V)){if(V.is(M))return;if(M!==null){const oe=V.getChildren();for(let Z=0;Z<oe.length;Z++)M.append(oe[Z])}V.remove();return}M!==null&&M.append(V)}})}}function C(b,v){let y=b;for(;y!==null&&y.getParent()!==null&&!v(y);)y=y.getParentOrThrow();return v(y)?y:null}return pi.$createAutoLinkNode=u,pi.$createLinkNode=i,pi.$isAutoLinkNode=p,pi.$isLinkNode=a,pi.AutoLinkNode=l,pi.LinkNode=r,pi.TOGGLE_LINK_COMMAND=m,pi.toggleLink=_,pi}var gi={},t0;function aA(){if(t0)return gi;t0=1;var e=vn(),t=Xt();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(C){return new r(C.__url,{rel:C.__rel,target:C.__target,title:C.__title},C.__key)}constructor(C,b={},v){super(v);let{target:y=null,rel:T=null,title:O=null}=b;this.__url=C,this.__target=y,this.__rel=T,this.__title=O}createDOM(C){let b=document.createElement("a");return b.href=this.sanitizeUrl(this.__url),this.__target!==null&&(b.target=this.__target),this.__rel!==null&&(b.rel=this.__rel),this.__title!==null&&(b.title=this.__title),e.addClassNamesToElement(b,C.theme.link),b}updateDOM(C,b){let v=this.__url,y=this.__target,T=this.__rel,O=this.__title;return v!==C.__url&&(b.href=v),y!==C.__target&&(y?b.target=y:b.removeAttribute("target")),T!==C.__rel&&(T?b.rel=T:b.removeAttribute("rel")),O!==C.__title&&(O?b.title=O:b.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(C){let b=i(C.url,{rel:C.rel,target:C.target,title:C.title});return b.setFormat(C.format),b.setIndent(C.indent),b.setDirection(C.direction),b}sanitizeUrl(C){try{let b=new URL(C);if(!n.has(b.protocol))return"about:blank"}catch{}return C}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(C){this.getWritable().__url=C}getTarget(){return this.getLatest().__target}setTarget(C){this.getWritable().__target=C}getRel(){return this.getLatest().__rel}setRel(C){this.getWritable().__rel=C}getTitle(){return this.getLatest().__title}setTitle(C){this.getWritable().__title=C}insertNewAfter(C,b=!0){return C=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(C,b),C}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(C,b){if(!t.$isRangeSelection(b))return!1;C=b.anchor.getNode();let v=b.focus.getNode();return this.isParentOf(C)&&this.isParentOf(v)&&0<b.getTextContent().length}}function o(_){let C=null;if(e.isHTMLAnchorElement(_)){let b=_.textContent;(b!==null&&b!==""||0<_.children.length)&&(C=i(_.getAttribute("href")||"",{rel:_.getAttribute("rel"),target:_.getAttribute("target"),title:_.getAttribute("title")}))}return{node:C}}function i(_,C){return t.$applyNodeReplacement(new r(_,C))}function a(_){return _ instanceof r}class l extends r{static getType(){return"autolink"}static clone(C){return new l(C.__url,{rel:C.__rel,target:C.__target,title:C.__title},C.__key)}static importJSON(C){let b=u(C.url,{rel:C.rel,target:C.target,title:C.title});return b.setFormat(C.format),b.setIndent(C.indent),b.setDirection(C.direction),b}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(C,b=!0){return C=this.getParentOrThrow().insertNewAfter(C,b),t.$isElementNode(C)?(b=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),C.append(b),b):null}}function u(_,C){return t.$applyNodeReplacement(new l(_,C))}let p=t.createCommand("TOGGLE_LINK_COMMAND");function m(_,C){for(;_!==null&&_.getParent()!==null&&!C(_);)_=_.getParentOrThrow();return C(_)?_:null}return gi.$createAutoLinkNode=u,gi.$createLinkNode=i,gi.$isAutoLinkNode=function(_){return _ instanceof l},gi.$isLinkNode=a,gi.AutoLinkNode=l,gi.LinkNode=r,gi.TOGGLE_LINK_COMMAND=p,gi.toggleLink=function(_,C={}){let{target:b,title:v}=C,y=C.rel===void 0?"noreferrer":C.rel;if(C=t.$getSelection(),t.$isRangeSelection(C))if(C=C.extract(),_===null)C.forEach(T=>{if(T=T.getParent(),a(T)){let O=T.getChildren();for(let A=0;A<O.length;A++)T.insertBefore(O[A]);T.remove()}});else{if(C.length===1){let A=m(C[0],a);if(A!==null){A.setURL(_),b!==void 0&&A.setTarget(b),y!==null&&A.setRel(y),v!==void 0&&A.setTitle(v);return}}let T=null,O=null;C.forEach(A=>{var D=A.getParent();if(D!==O&&D!==null&&(!t.$isElementNode(A)||A.isInline()))if(a(D))O=D,D.setURL(_),b!==void 0&&D.setTarget(b),y!==null&&O.setRel(y),v!==void 0&&O.setTitle(v);else if(D.is(T)||(T=D,O=i(_,{rel:y,target:b,title:v}),a(D)?A.getPreviousSibling()===null?D.insertBefore(O):D.insertAfter(O):A.insertBefore(O)),a(A)){if(!A.is(O)){if(O!==null){D=A.getChildren();for(let P=0;P<D.length;P++)O.append(D[P])}A.remove()}}else O!==null&&O.append(A)})}},gi}var n0,r0;function Mg(){return r0||(r0=1,n0=process.env.NODE_ENV==="development"?iA():aA()),n0}var o0;function sA(){if(o0)return Kh;o0=1;var e=Mg(),t=ur(),n=vn(),r=Xt(),o=H;function i({validateUrl:a}){const[l]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!l.hasNodes([e.LinkNode]))throw new Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(l.registerCommand(e.TOGGLE_LINK_COMMAND,u=>{if(u===null)return e.toggleLink(u),!0;if(typeof u=="string")return a===void 0||a(u)?(e.toggleLink(u),!0):!1;{const{url:p,target:m,rel:_,title:C}=u;return e.toggleLink(p,{rel:_,target:m,title:C}),!0}},r.COMMAND_PRIORITY_LOW),a!==void 0?l.registerCommand(r.PASTE_COMMAND,u=>{const p=r.$getSelection();if(!r.$isRangeSelection(p)||p.isCollapsed()||!(u instanceof ClipboardEvent)||u.clipboardData==null)return!1;const m=u.clipboardData.getData("text");return a(m)?p.getNodes().some(_=>r.$isElementNode(_))?!1:(l.dispatchCommand(e.TOGGLE_LINK_COMMAND,m),u.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[l,a]),null}return Kh.LinkPlugin=i,Kh}var Uh={},i0;function lA(){if(i0)return Uh;i0=1;var e=Mg(),t=ur(),n=vn(),r=Xt(),o=H;return Uh.LinkPlugin=function({validateUrl:i}){let[a]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!a.hasNodes([e.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(a.registerCommand(e.TOGGLE_LINK_COMMAND,l=>{if(l===null)return e.toggleLink(l),!0;if(typeof l=="string")return i===void 0||i(l)?(e.toggleLink(l),!0):!1;let{url:u,target:p,rel:m,title:_}=l;return e.toggleLink(u,{rel:m,target:p,title:_}),!0},r.COMMAND_PRIORITY_LOW),i!==void 0?a.registerCommand(r.PASTE_COMMAND,l=>{let u=r.$getSelection();if(!r.$isRangeSelection(u)||u.isCollapsed()||!(l instanceof ClipboardEvent)||l.clipboardData==null)return!1;let p=l.clipboardData.getData("text");return i(p)?u.getNodes().some(m=>r.$isElementNode(m))?!1:(a.dispatchCommand(e.TOGGLE_LINK_COMMAND,p),l.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[a,i]),null},Uh}process.env.NODE_ENV==="development"?sA():lA();var Vh={},tn={},a0;function cA(){if(a0)return tn;a0=1;var e=Xt(),t=vn();const n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(me){const _e=new o(me.__headerState,me.__colSpan,me.__width,me.__key);return _e.__rowSpan=me.__rowSpan,_e.__backgroundColor=me.__backgroundColor,_e}static importDOM(){return{td:me=>({conversion:i,priority:0}),th:me=>({conversion:i,priority:0})}}static importJSON(me){const _e=me.colSpan||1,De=me.rowSpan||1,Fe=a(me.headerState,_e,me.width||void 0);return Fe.__rowSpan=De,Fe.__backgroundColor=me.backgroundColor||null,Fe}constructor(me=r.NO_STATUS,_e=1,De,Fe){super(_e,Fe),this.__headerState=me,this.__width=De,this.__backgroundColor=null}createDOM(me){const _e=document.createElement(this.getTag());return this.__width&&(_e.style.width=`${this.__width}px`),this.__colSpan>1&&(_e.colSpan=this.__colSpan),this.__rowSpan>1&&(_e.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(_e.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(_e,me.theme.tableCell,this.hasHeader()&&me.theme.tableCellHeader),_e}exportDOM(me){const{element:_e}=super.exportDOM(me);if(_e){const De=_e,Fe=700,ke=this.getParentOrThrow().getChildrenSize();De.style.border="1px solid black",this.__colSpan>1&&(De.colSpan=this.__colSpan),this.__rowSpan>1&&(De.rowSpan=this.__rowSpan),De.style.width=`${this.getWidth()||Math.max(90,Fe/ke)}px`,De.style.verticalAlign="top",De.style.textAlign="start";const ze=this.getBackgroundColor();ze!==null?De.style.backgroundColor=ze:this.hasHeader()&&(De.style.backgroundColor="#f2f3f5")}return{element:_e}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(me){const _e=this.getWritable();return _e.__headerState=me,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(me){const _e=this.getWritable();return _e.__width=me,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(me){this.getWritable().__backgroundColor=me}toggleHeaderStyle(me){const _e=this.getWritable();return(_e.__headerState&me)===me?_e.__headerState-=me:_e.__headerState+=me,_e}hasHeaderState(me){return(this.getHeaderStyles()&me)===me}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(me){return me.__headerState!==this.__headerState||me.__width!==this.__width||me.__colSpan!==this.__colSpan||me.__rowSpan!==this.__rowSpan||me.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(Se){const me=Se,_e=Se.nodeName.toLowerCase();let De;n.test(me.style.width)&&(De=parseFloat(me.style.width));const Fe=a(_e==="th"?r.ROW:r.NO_STATUS,me.colSpan,De);Fe.__rowSpan=me.rowSpan;const ke=me.style.backgroundColor;return ke!==""&&(Fe.__backgroundColor=ke),{forChild:(ze,tt)=>{if(l(tt)&&!e.$isElementNode(ze)){const ut=e.$createParagraphNode();return e.$isLineBreakNode(ze)&&ze.getTextContent()===`
|
|
101
|
-
`?null:(ut.append(ze),ut)}return ze},node:Fe}}function a(Se,me=1,_e){return e.$applyNodeReplacement(new o(Se,me,_e))}function l(Se){return Se instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(me){return new u(me.__height,me.__key)}static importDOM(){return{tr:me=>({conversion:p,priority:0})}}static importJSON(me){return m(me.height)}constructor(me,_e){super(_e),this.__height=me}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(me){const _e=document.createElement("tr");return this.__height&&(_e.style.height=`${this.__height}px`),t.addClassNamesToElement(_e,me.theme.tableRow),_e}isShadowRoot(){return!0}setHeight(me){const _e=this.getWritable();return _e.__height=me,this.__height}getHeight(){return this.getLatest().__height}updateDOM(me){return me.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(Se){const me=Se;let _e;return n.test(me.style.height)&&(_e=parseFloat(me.style.height)),{node:m(_e)}}function m(Se){return e.$applyNodeReplacement(new u(Se))}function _(Se){return Se instanceof u}const C=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b=Se=>C?(Se||window).getSelection():null;class v{constructor(me,_e){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=_e,this.editor=me,this.grid={cells:[],columns:0,rows:0},this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(me=>me())}trackTableGrid(){const me=new MutationObserver(_e=>{this.editor.update(()=>{let De=!1;for(let ke=0;ke<_e.length;ke++){const ze=_e[ke].target.nodeName;if(ze==="TABLE"||ze==="TR"){De=!0;break}}if(!De)return;const Fe=this.editor.getElementByKey(this.tableNodeKey);if(!Fe)throw new Error("Expected to find TableElement in DOM");this.grid=P(Fe)})});this.editor.update(()=>{const _e=this.editor.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");this.grid=P(_e),me.observe(_e,{childList:!0,subtree:!0})})}clearHighlight(){const me=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=me.getElementByKey(this.tableNodeKey);if(!De)throw new Error("Expected to find TableElement in DOM");const Fe=P(De);M(me,Fe,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(_e,me._config.theme.tableSelection),_e.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.addClassNamesToElement(_e,me._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(me){if(me!=null&&me.gridKey===this.tableNodeKey){const _e=this.editor;this.gridSelection=me,this.isHighlightingCells=!0,this.disableHighlightStyle(),M(_e,this.grid,this.gridSelection)}else me==null?this.clearHighlight():(this.tableNodeKey=me.gridKey,this.updateTableGridSelection(me))}setFocusCellForSelection(me,_e=!1){const De=this.editor;De.update(()=>{const Fe=e.$getNodeByKey(this.tableNodeKey);if(!w(Fe))throw new Error("Expected TableNode.");if(!De.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const ke=me.x,ze=me.y;if(this.focusCell=me,this.anchorCell!==null){const tt=b(De._window);tt&&tt.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ke||this.anchorY!==ze||_e))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ke===this.focusX&&ze===this.focusY)return;if(this.focusX=ke,this.focusY=ze,this.isHighlightingCells){const tt=e.$getNearestNodeFromDOMNode(me.elem);if(this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(tt)){const ut=tt.getKey();this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ut,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),De.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),M(De,this.grid,this.gridSelection)}}})}setAnchorCellForSelection(me){this.isHighlightingCells=!1,this.anchorCell=me,this.anchorX=me.x,this.anchorY=me.y,this.editor.update(()=>{const _e=e.$getNearestNodeFromDOMNode(me.elem);if(l(_e)){const De=_e.getKey();this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=De}})}formatCells(me){this.editor.update(()=>{const _e=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(_e))throw Error("Expected grid selection");const De=e.$createRangeSelection(),Fe=De.anchor,ke=De.focus;_e.getNodes().forEach(ze=>{l(ze)&&ze.getTextContentSize()!==0&&(Fe.set(ze.getKey(),0,"element"),ke.set(ze.getKey(),ze.getChildrenSize(),"element"),De.formatText(me))}),e.$setSelection(_e),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){const me=this.editor;me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(De))throw Error("Expected grid selection");const Fe=De.getNodes().filter(l);if(Fe.length===this.grid.columns*this.grid.rows){_e.selectPrevious(),_e.remove(),e.$getRoot().selectStart();return}Fe.forEach(ke=>{if(e.$isElementNode(ke)){const ze=e.$createParagraphNode(),tt=e.$createTextNode();ze.append(tt),ke.append(ze),ke.getChildren().forEach(ut=>{ut!==ze&&ut.remove()})}}),M(me,this.grid,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}}const y="__lexicalTableSelection";function T(Se,me,_e,De){const Fe=_e.getRootElement();if(Fe===null)throw new Error("No root element.");const ke=new v(_e,Se.getKey()),ze=_e._window||window;O(me,ke),me.addEventListener("mousedown",Qe=>{setTimeout(()=>{if(Qe.button!==0||!ze)return;const et=D(Qe.target);et!==null&&(ne(Qe),ke.setAnchorCellForSelection(et));const lt=()=>{ze.removeEventListener("mouseup",lt),ze.removeEventListener("mousemove",wt)},wt=_t=>{const Rt=D(_t.target);Rt!==null&&(ke.anchorX!==Rt.x||ke.anchorY!==Rt.y)&&(_t.preventDefault(),ke.setFocusCellForSelection(Rt))};ze.addEventListener("mouseup",lt),ze.addEventListener("mousemove",wt)},0)});const tt=Qe=>{Qe.button===0&&_e.update(()=>{const et=e.$getSelection(),lt=Qe.target;e.DEPRECATED_$isGridSelection(et)&&et.gridKey===ke.tableNodeKey&&Fe.contains(lt)&&ke.clearHighlight()})};ze.addEventListener("mousedown",tt),ke.listenersToRemove.add(()=>ze.removeEventListener("mousedown",tt)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_DOWN_COMMAND,Qe=>ee(_e,Qe,"down",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_UP_COMMAND,Qe=>ee(_e,Qe,"up",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_LEFT_COMMAND,Qe=>ee(_e,Qe,"backward",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,Qe=>ee(_e,Qe,"forward",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ESCAPE_COMMAND,Qe=>{const et=e.$getSelection();if(e.DEPRECATED_$isGridSelection(et)){const lt=t.$findMatchingParent(et.focus.getNode(),l);if(l(lt))return ne(Qe),lt.selectEnd(),!0}return!1},e.COMMAND_PRIORITY_HIGH));const ut=Qe=>()=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.clearText(),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),kt=>l(kt));if(!l(lt))return!1;const wt=et.anchor.getNode(),_t=et.focus.getNode(),Rt=Se.isParentOf(wt),qe=Se.isParentOf(_t);if(Rt&&!qe||qe&&!Rt)return ke.clearText(),!0;const ot=t.$findMatchingParent(et.anchor.getNode(),kt=>e.$isElementNode(kt)),vt=ot&&t.$findMatchingParent(ot,kt=>e.$isElementNode(kt)&&l(kt.getParent()));if(!e.$isElementNode(vt)||!e.$isElementNode(ot))return!1;if(Qe===e.DELETE_LINE_COMMAND&&vt.getPreviousSibling()===null)return!0;if((Qe===e.DELETE_CHARACTER_COMMAND||Qe===e.DELETE_WORD_COMMAND)&&et.isCollapsed()&&et.anchor.offset===0&&ot!==vt){const kt=ot.getChildren(),Dt=e.$createParagraphNode();return kt.forEach(Gt=>Dt.append(Gt)),ot.replace(Dt),ot.getWritable().__parent=lt.getKey(),!0}}return!1};[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(Qe=>{ke.listenersToRemove.add(_e.registerCommand(Qe,ut(Qe),e.COMMAND_PRIORITY_CRITICAL))});const Et=Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return Qe.preventDefault(),Qe.stopPropagation(),ke.clearText(),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1};ke.listenersToRemove.add(_e.registerCommand(e.KEY_BACKSPACE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_DELETE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.FORMAT_TEXT_COMMAND,Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.formatCells(Qe),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.clearHighlight(),!1;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),De&&ke.listenersToRemove.add(_e.registerCommand(e.KEY_TAB_COMMAND,Qe=>{const et=e.$getSelection();if(!e.$isRangeSelection(et)||!et.isCollapsed()||!Q(et,Se))return!1;const lt=Y(et.anchor.getNode());if(lt===null)return!1;ne(Qe);const wt=Se.getCordsFromCellNode(lt,ke.grid);return Z(ke,Se,wt.x,wt.y,Qe.shiftKey?"backward":"forward"),!0},e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.FOCUS_COMMAND,Qe=>Se.isSelected(),e.COMMAND_PRIORITY_HIGH));function jt(Qe){const et=Se.getCordsFromCellNode(Qe,ke.grid);return Se.getCellFromCordsOrThrow(et.x,et.y,ke.grid)}return ke.listenersToRemove.add(_e.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{const Qe=e.$getSelection(),et=e.$getPreviousSelection();if(e.$isRangeSelection(Qe)){const{anchor:lt,focus:wt}=Qe,_t=lt.getNode(),Rt=wt.getNode(),qe=Y(_t),ot=Y(Rt),vt=qe&&Se.is(j(qe)),kt=ot&&Se.is(j(ot)),Dt=vt!==kt,Gt=vt&&kt,sn=Qe.isBackward();if(Dt){const dr=Qe.clone();dr.focus.set(Se.getKey(),sn?0:Se.getChildrenSize(),"element"),e.$setSelection(dr),J(_e,ke)}else Gt&&(qe.is(ot)||(ke.setAnchorCellForSelection(jt(qe)),ke.setFocusCellForSelection(jt(ot),!0)))}return Qe&&!Qe.is(et)&&(e.DEPRECATED_$isGridSelection(Qe)||e.DEPRECATED_$isGridSelection(et))&&ke.gridSelection&&!ke.gridSelection.is(et)?(e.DEPRECATED_$isGridSelection(Qe)&&Qe.gridKey===ke.tableNodeKey?ke.updateTableGridSelection(Qe):!e.DEPRECATED_$isGridSelection(Qe)&&e.DEPRECATED_$isGridSelection(et)&&et.gridKey===ke.tableNodeKey&&ke.updateTableGridSelection(null),!1):(ke.hasHijackedSelectionStyles&&!Se.isSelected()?oe(_e,ke):!ke.hasHijackedSelectionStyles&&Se.isSelected()&&J(_e,ke),!1)},e.COMMAND_PRIORITY_CRITICAL)),ke}function O(Se,me){Se[y]=me}function A(Se){return Se[y]}function D(Se){let me=Se;for(;me!=null;){const _e=me.nodeName;if(_e==="TD"||_e==="TH"){const De=me._cell;return De===void 0?null:De}me=me.parentNode}return null}function P(Se){const me=[],_e={cells:me,columns:0,rows:0};let De=Se.firstChild,Fe=0,ke=0;for(me.length=0;De!=null;){const ze=De.nodeName;if(ze==="TD"||ze==="TH"){const Et=De,jt={elem:Et,hasBackgroundColor:Et.style.backgroundColor!=="",highlighted:!1,x:Fe,y:ke};De._cell=jt;let Qe=me[ke];Qe===void 0&&(Qe=me[ke]=[]),Qe[Fe]=jt}else{const Et=De.firstChild;if(Et!=null){De=Et;continue}}const tt=De.nextSibling;if(tt!=null){Fe++,De=tt;continue}const ut=De.parentNode;if(ut!=null){const Et=ut.nextSibling;if(Et==null)break;ke++,Fe=0,De=Et}}return _e.columns=Fe+1,_e.rows=ke+1,_e}function M(Se,me,_e){const De=new Set(_e?_e.getNodes():[]);V(me,(Fe,ke)=>{const ze=Fe.elem;De.has(ke)?(Fe.highlighted=!0,te(Se,Fe)):(Fe.highlighted=!1,he(Se,Fe),ze.getAttribute("style")||ze.removeAttribute("style"))})}function V(Se,me){const{cells:_e}=Se;for(let De=0;De<_e.length;De++){const Fe=_e[De];if(Fe)for(let ke=0;ke<Fe.length;ke++){const ze=Fe[ke];if(!ze)continue;const tt=e.$getNearestNodeFromDOMNode(ze.elem);tt!==null&&me(ze,tt,{x:ke,y:De})}}}function J(Se,me){me.disableHighlightStyle(),V(me.grid,_e=>{_e.highlighted=!0,te(Se,_e)})}function oe(Se,me){me.enableHighlightStyle(),V(me.grid,_e=>{const De=_e.elem;_e.highlighted=!1,he(Se,_e),De.getAttribute("style")||De.removeAttribute("style")})}const Z=(Se,me,_e,De,Fe)=>{const ke=Fe==="forward";switch(Fe){case"backward":case"forward":return _e!==(ke?Se.grid.columns-1:0)?de(me.getCellNodeFromCordsOrThrow(_e+(ke?1:-1),De,Se.grid),ke):De!==(ke?Se.grid.rows-1:0)?de(me.getCellNodeFromCordsOrThrow(ke?0:Se.grid.columns-1,De+(ke?1:-1),Se.grid),ke):ke?me.selectNext():me.selectPrevious(),!0;case"up":return De!==0?de(me.getCellNodeFromCordsOrThrow(_e,De-1,Se.grid),!1):me.selectPrevious(),!0;case"down":return De!==Se.grid.rows-1?de(me.getCellNodeFromCordsOrThrow(_e,De+1,Se.grid),!0):me.selectNext(),!0;default:return!1}},U=(Se,me,_e,De,Fe)=>{const ke=Fe==="forward";switch(Fe){case"backward":case"forward":return _e!==(ke?Se.grid.columns-1:0)&&Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e+(ke?1:-1),De,Se.grid)),!0;case"up":return De!==0?(Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De-1,Se.grid)),!0):!1;case"down":return De!==Se.grid.rows-1?(Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De+1,Se.grid)),!0):!1;default:return!1}};function Q(Se,me){if(e.$isRangeSelection(Se)||e.DEPRECATED_$isGridSelection(Se)){const _e=me.isParentOf(Se.anchor.getNode()),De=me.isParentOf(Se.focus.getNode());return _e&&De}return!1}function de(Se,me){me?Se.selectStart():Se.selectEnd()}const pe="172,206,247";function te(Se,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null?_e.style.setProperty("background-color",`rgb(${pe})`):_e.style.setProperty("background-image",`linear-gradient(to right, rgba(${pe},0.85), rgba(${pe},0.85))`),_e.style.setProperty("caret-color","transparent")}function he(Se,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null&&_e.style.removeProperty("background-color"),_e.style.removeProperty("background-image"),_e.style.removeProperty("caret-color")}function Y(Se){const me=t.$findMatchingParent(Se,l);return l(me)?me:null}function j(Se){const me=t.$findMatchingParent(Se,w);return w(me)?me:null}function ee(Se,me,_e,De,Fe){const ke=e.$getSelection();if(!Q(ke,De))return!1;if(e.$isRangeSelection(ke)&&ke.isCollapsed()){if(_e==="backward"||_e==="forward")return!1;const{anchor:ze,focus:tt}=ke,ut=t.$findMatchingParent(ze.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l);if(!l(ut)||!ut.is(Et))return!1;const jt=j(ut);if(jt!==De&&jt!=null){const qe=Se.getElementByKey(jt.getKey());if(qe!=null)return Fe.grid=P(qe),ee(Se,me,_e,jt,Fe)}const Qe=Se.getElementByKey(ut.__key),et=Se.getElementByKey(ze.key);if(et==null||Qe==null)return!1;let lt;if(ze.type==="element")lt=et.getBoundingClientRect();else{const qe=window.getSelection();if(qe===null||qe.rangeCount===0)return!1;lt=qe.getRangeAt(0).getBoundingClientRect()}const wt=_e==="up"?ut.getFirstChild():ut.getLastChild();if(wt==null)return!1;const _t=Se.getElementByKey(wt.__key);if(_t==null)return!1;const Rt=_t.getBoundingClientRect();if(_e==="up"?Rt.top>lt.top-lt.height:lt.bottom+lt.height>Rt.bottom){ne(me);const qe=De.getCordsFromCellNode(ut,Fe.grid);if(me.shiftKey){const ot=De.getCellFromCordsOrThrow(qe.x,qe.y,Fe.grid);Fe.setAnchorCellForSelection(ot),Fe.setFocusCellForSelection(ot,!0)}else return Z(Fe,De,qe.x,qe.y,_e);return!0}}else if(e.DEPRECATED_$isGridSelection(ke)){const{anchor:ze,focus:tt}=ke,ut=t.$findMatchingParent(ze.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l),[jt]=ke.getNodes(),Qe=Se.getElementByKey(jt.getKey());if(!l(ut)||!l(Et)||!w(jt)||Qe==null)return!1;Fe.updateTableGridSelection(ke);const et=P(Qe),lt=De.getCordsFromCellNode(ut,et),wt=De.getCellFromCordsOrThrow(lt.x,lt.y,et);if(Fe.setAnchorCellForSelection(wt),ne(me),me.shiftKey){const _t=De.getCordsFromCellNode(Et,et);return U(Fe,jt,_t.x,_t.y,_e)}else Et.selectEnd();return!0}return!1}function ne(Se){Se.preventDefault(),Se.stopImmediatePropagation(),Se.stopPropagation()}class B extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(me){return new B(me.__key)}static importDOM(){return{table:me=>({conversion:X,priority:1})}}static importJSON(me){return F()}constructor(me){super(me)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(me,_e){const De=document.createElement("table");return t.addClassNamesToElement(De,me.theme.table),De}updateDOM(){return!1}exportDOM(me){return{...super.exportDOM(me),after:_e=>{if(_e){const De=_e.cloneNode(),Fe=document.createElement("colgroup"),ke=document.createElement("tbody");t.isHTMLElement(_e)&&ke.append(..._e.children);const ze=this.getFirstChildOrThrow();if(!_(ze))throw new Error("Expected to find row node.");const tt=ze.getChildrenSize();for(let ut=0;ut<tt;ut++){const Et=document.createElement("col");Fe.append(Et)}return De.replaceChildren(Fe,ke),De}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(me,_e){const{rows:De,cells:Fe}=_e;for(let ke=0;ke<De;ke++){const ze=Fe[ke];if(ze==null)continue;const tt=ze.findIndex(ut=>{if(!ut)return;const{elem:Et}=ut;return e.$getNearestNodeFromDOMNode(Et)===me});if(tt!==-1)return{x:tt,y:ke}}throw new Error("Cell not found in table.")}getCellFromCords(me,_e,De){const{cells:Fe}=De,ke=Fe[_e];return ke==null?null:ke[me]??null}getCellFromCordsOrThrow(me,_e,De){const Fe=this.getCellFromCords(me,_e,De);if(!Fe)throw new Error("Cell not found at cords.");return Fe}getCellNodeFromCords(me,_e,De){const Fe=this.getCellFromCords(me,_e,De);if(Fe==null)return null;const ke=e.$getNearestNodeFromDOMNode(Fe.elem);return l(ke)?ke:null}getCellNodeFromCordsOrThrow(me,_e,De){const Fe=this.getCellNodeFromCords(me,_e,De);if(!Fe)throw new Error("Node at cords not TableCellNode.");return Fe}canSelectBefore(){return!0}canIndent(){return!1}}function W(Se,me){const _e=Se.getElementByKey(me.getKey());if(_e==null)throw new Error("Table Element Not Found");return P(_e)}function X(Se){return{node:F()}}function F(){return e.$applyNodeReplacement(new B)}function w(Se){return Se instanceof B}function N(Se,me,_e=!0){const De=F();for(let Fe=0;Fe<Se;Fe++){const ke=m();for(let ze=0;ze<me;ze++){let tt=r.NO_STATUS;typeof _e=="object"?(Fe===0&&_e.rows&&(tt|=r.ROW),ze===0&&_e.columns&&(tt|=r.COLUMN)):_e&&(Fe===0&&(tt|=r.ROW),ze===0&&(tt|=r.COLUMN));const ut=a(tt),Et=e.$createParagraphNode();Et.append(e.$createTextNode()),ut.append(Et),ke.append(ut)}De.append(ke)}return De}function I(Se){const me=t.$findMatchingParent(Se,_e=>l(_e));return l(me)?me:null}function q(Se){const me=t.$findMatchingParent(Se,_e=>_(_e));if(_(me))return me;throw new Error("Expected table cell to be inside of table row.")}function ue(Se){const me=t.$findMatchingParent(Se,_e=>w(_e));if(w(me))return me;throw new Error("Expected table cell to be inside of table.")}function fe(Se){const me=q(Se);return ue(me).getChildren().findIndex(_e=>_e.is(me))}function se(Se){return q(Se).getChildren().findIndex(me=>me.is(Se))}function Ce(Se,me){const _e=ue(Se),{x:De,y:Fe}=_e.getCordsFromCellNode(Se,me);return{above:_e.getCellNodeFromCords(De,Fe-1,me),below:_e.getCellNodeFromCords(De,Fe+1,me),left:_e.getCellNodeFromCords(De-1,Fe,me),right:_e.getCellNodeFromCords(De+1,Fe,me)}}function Oe(Se,me){const _e=Se.getChildren();if(me>=_e.length||me<0)throw new Error("Expected table cell to be inside of table row.");return _e[me].remove(),Se}function Be(Se,me,_e=!0,De,Fe){const ke=Se.getChildren();if(me>=ke.length||me<0)throw new Error("Table row target index out of range");const ze=ke[me];if(_(ze))for(let tt=0;tt<De;tt++){const ut=ze.getChildren(),Et=ut.length,jt=m();for(let Qe=0;Qe<Et;Qe++){const et=ut[Qe];if(!l(et))throw Error("Expected table cell");const{above:lt,below:wt}=Ce(et,Fe);let _t=r.NO_STATUS;const Rt=lt&<.getWidth()||wt&&wt.getWidth()||void 0;(lt&<.hasHeaderState(r.COLUMN)||wt&&wt.hasHeaderState(r.COLUMN))&&(_t|=r.COLUMN);const qe=a(_t,1,Rt);qe.append(e.$createParagraphNode()),jt.append(qe)}_e?ze.insertAfter(jt):ze.insertBefore(jt)}else throw new Error("Row before insertion index does not exist.");return Se}function ce(Se=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a INTERNAL_PointSelection");const _e=me.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(_e),[ke,ze]=e.DEPRECATED_$computeGridMap(Fe,De,De),tt=ke[0].length,{startRow:ut}=ze;if(Se){const Et=ut+De.__rowSpan-1,jt=ke[Et],Qe=m();for(let lt=0;lt<tt;lt++){const{cell:wt,startRow:_t}=jt[lt];_t+wt.__rowSpan-1<=Et?Qe.append(a(r.NO_STATUS)):wt.setRowSpan(wt.__rowSpan+1)}const et=Fe.getChildAtIndex(Et);if(!e.DEPRECATED_$isGridRowNode(et))throw Error("focusEndRow is not a GridRowNode");et.insertAfter(Qe)}else{const Et=ke[ut],jt=m();for(let et=0;et<tt;et++){const{cell:lt,startRow:wt}=Et[et];wt===ut?jt.append(a(r.NO_STATUS)):lt.setRowSpan(lt.__rowSpan+1)}const Qe=Fe.getChildAtIndex(ut);if(!e.DEPRECATED_$isGridRowNode(Qe))throw Error("focusEndRow is not a GridRowNode");Qe.insertBefore(jt)}}function le(Se,me,_e=!0,De,Fe){const ke=Se.getChildren(),ze=[];for(let tt=0;tt<ke.length;tt++){const ut=ke[tt];if(_(ut))for(let Et=0;Et<De;Et++){const jt=ut.getChildren();if(me>=jt.length||me<0)throw new Error("Table column target index out of range");const Qe=jt[me];if(!l(Qe))throw Error("Expected table cell");const{left:et,right:lt}=Ce(Qe,Fe);let wt=r.NO_STATUS;(et&&et.hasHeaderState(r.ROW)||lt&<.hasHeaderState(r.ROW))&&(wt|=r.ROW);const _t=a(wt);_t.append(e.$createParagraphNode()),ze.push({newTableCell:_t,targetCell:Qe})}}return ze.forEach(({newTableCell:tt,targetCell:ut})=>{_e?ut.insertAfter(tt):ut.insertBefore(tt)}),Se}function ye(Se=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a PointSeleciton");const _e=me.anchor.getNode(),De=me.focus.getNode(),[Fe]=e.DEPRECATED_$getNodeTriplet(_e),[ke,,ze]=e.DEPRECATED_$getNodeTriplet(De),[tt,ut,Et]=e.DEPRECATED_$computeGridMap(ze,ke,Fe),jt=tt.length,Qe=Se?Math.max(ut.startColumn,Et.startColumn):Math.min(ut.startColumn,Et.startColumn),et=Se?Qe+ke.__colSpan-1:Qe-1,lt=ze.getFirstChild();if(!e.DEPRECATED_$isGridRowNode(lt))throw Error("Expected firstTable child to be a row");let wt=null;function _t(){const qe=a(r.NO_STATUS).append(e.$createParagraphNode());return wt===null&&(wt=qe),qe}let Rt=lt;e:for(let qe=0;qe<jt;qe++){if(qe!==0){const Gt=Rt.getNextSibling();if(!e.DEPRECATED_$isGridRowNode(Gt))throw Error("Expected row nextSibling to be a row");Rt=Gt}const ot=tt[qe];if(et<0){st(Rt,_t());continue}const{cell:vt,startColumn:kt,startRow:Dt}=ot[et];if(kt+vt.__colSpan-1<=et){let Gt=vt,sn=Dt,dr=et;for(;sn!==qe&&Gt.__rowSpan>1;)if(dr-=vt.__colSpan,dr>=0){const{cell:Cr,startRow:Xo}=ot[dr];Gt=Cr,sn=Xo}else{Rt.append(_t());continue e}Gt.insertAfter(_t())}else vt.setColSpan(vt.__colSpan+1)}wt!==null&&Xe(wt)}function Me(Se,me){const _e=Se.getChildren();for(let De=0;De<_e.length;De++){const Fe=_e[De];if(_(Fe)){const ke=Fe.getChildren();if(me>=ke.length||me<0)throw new Error("Table column target index out of range");ke[me].remove()}}return Se}function Pe(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),_e=Se.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(me),[ke]=e.DEPRECATED_$getNodeTriplet(_e),[ze,tt,ut]=e.DEPRECATED_$computeGridMap(Fe,De,ke),{startRow:Et}=tt,{startRow:jt}=ut,Qe=jt+ke.__rowSpan-1;if(ze.length===Qe-Et+1){Fe.remove();return}const et=ze[0].length,lt=ze[Qe+1],wt=Fe.getChildAtIndex(Qe+1);for(let _t=Qe;_t>=Et;_t--){for(let qe=et-1;qe>=0;qe--){const{cell:ot,startRow:vt,startColumn:kt}=ze[_t][qe];if(kt===qe&&(_t===Et&&vt<Et&&ot.setRowSpan(ot.__rowSpan-(vt-Et)),vt>=Et&&vt+ot.__rowSpan-1>Qe)){if(ot.setRowSpan(ot.__rowSpan-(Qe-vt+1)),wt===null)throw Error("Expected nextRowNode not to be null");if(qe===0)st(wt,ot);else{const{cell:Dt}=lt[qe-1];Dt.insertAfter(ot)}}}const Rt=Fe.getChildAtIndex(_t);if(!e.DEPRECATED_$isGridRowNode(Rt))throw Error(`Expected GridNode childAtIndex(${String(_t)}) to be RowNode`);Rt.remove()}if(lt!==void 0){const{cell:_t}=lt[0];Xe(_t)}else{const _t=ze[Et-1],{cell:Rt}=_t[0];Xe(Rt)}}function We(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),_e=Se.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(me),[ke]=e.DEPRECATED_$getNodeTriplet(_e),[ze,tt,ut]=e.DEPRECATED_$computeGridMap(Fe,De,ke),{startColumn:Et}=tt,{startRow:jt,startColumn:Qe}=ut,et=Math.min(Et,Qe),lt=Math.max(Et+De.__colSpan-1,Qe+ke.__colSpan-1),wt=lt-et+1;if(ze[0].length===lt-et+1){Fe.selectPrevious(),Fe.remove();return}const _t=ze.length;for(let ot=0;ot<_t;ot++)for(let vt=et;vt<=lt;vt++){const{cell:kt,startColumn:Dt}=ze[ot][vt];if(Dt<et){if(vt===et){const Gt=et-Dt;kt.setColSpan(kt.__colSpan-Math.min(wt,kt.__colSpan-Gt))}}else if(Dt+kt.__colSpan-1>lt){if(vt===lt){const Gt=lt-Dt+1;kt.setColSpan(kt.__colSpan-Gt)}}else kt.remove()}const Rt=ze[jt],qe=Rt[Qe+ke.__colSpan];if(qe!==void 0){const{cell:ot}=qe;Xe(ot)}else{const ot=Rt[Qe-1],{cell:vt}=ot;Xe(vt)}}function Xe(Se){const me=Se.getFirstDescendant();me==null?Se.selectStart():me.getParentOrThrow().selectStart()}function st(Se,me){const _e=Se.getFirstChild();_e!==null?_e.insertBefore(me):Se.append(me)}function dt(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),[_e,De,Fe]=e.DEPRECATED_$getNodeTriplet(me),ke=_e.__colSpan,ze=_e.__rowSpan;if(ke>1){for(let tt=1;tt<ke;tt++)_e.insertAfter(a(r.NO_STATUS));_e.setColSpan(1)}if(ze>1){const[tt,ut]=e.DEPRECATED_$computeGridMap(Fe,_e,_e),{startColumn:Et,startRow:jt}=ut;let Qe;for(let et=1;et<ze;et++){const lt=jt+et,wt=tt[lt];if(Qe=(Qe||De).getNextSibling(),!e.DEPRECATED_$isGridRowNode(Qe))throw Error("Expected row next sibling to be a row");let _t=null;for(let Rt=0;Rt<Et;Rt++){const qe=wt[Rt],ot=qe.cell;qe.startRow===lt&&(_t=ot),ot.__colSpan>1&&(Rt+=ot.__colSpan-1)}if(_t===null)for(let Rt=0;Rt<ke;Rt++)st(Qe,a(r.NO_STATUS));else for(let Rt=0;Rt<ke;Rt++)_t.insertAfter(a(r.NO_STATUS))}_e.setRowSpan(1)}}const Ct=e.createCommand("INSERT_TABLE_COMMAND");return tn.$createTableCellNode=a,tn.$createTableNode=F,tn.$createTableNodeWithDimensions=N,tn.$createTableRowNode=m,tn.$deleteTableColumn=Me,tn.$deleteTableColumn__EXPERIMENTAL=We,tn.$deleteTableRow__EXPERIMENTAL=Pe,tn.$getElementGridForTableNode=W,tn.$getTableCellNodeFromLexicalNode=I,tn.$getTableColumnIndexFromTableCellNode=se,tn.$getTableNodeFromLexicalNodeOrThrow=ue,tn.$getTableRowIndexFromTableCellNode=fe,tn.$getTableRowNodeFromTableCellNodeOrThrow=q,tn.$insertTableColumn=le,tn.$insertTableColumn__EXPERIMENTAL=ye,tn.$insertTableRow=Be,tn.$insertTableRow__EXPERIMENTAL=ce,tn.$isTableCellNode=l,tn.$isTableNode=w,tn.$isTableRowNode=_,tn.$removeTableRowAtIndex=Oe,tn.$unmergeCell=dt,tn.INSERT_TABLE_COMMAND=Ct,tn.TableCellHeaderStates=r,tn.TableCellNode=o,tn.TableNode=B,tn.TableRowNode=u,tn.TableSelection=v,tn.applyTableHandlers=T,tn.getCellFromTarget=D,tn.getTableSelectionFromTableElement=A,tn}var nn={},s0;function uA(){if(s0)return nn;s0=1;var e=Xt(),t=vn();let n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(N){let I=new o(N.__headerState,N.__colSpan,N.__width,N.__key);return I.__rowSpan=N.__rowSpan,I.__backgroundColor=N.__backgroundColor,I}static importDOM(){return{td:()=>({conversion:i,priority:0}),th:()=>({conversion:i,priority:0})}}static importJSON(N){let I=N.rowSpan||1,q=a(N.headerState,N.colSpan||1,N.width||void 0);return q.__rowSpan=I,q.__backgroundColor=N.backgroundColor||null,q}constructor(N=r.NO_STATUS,I=1,q,ue){super(I,ue),this.__headerState=N,this.__width=q,this.__backgroundColor=null}createDOM(N){let I=document.createElement(this.getTag());return this.__width&&(I.style.width=`${this.__width}px`),1<this.__colSpan&&(I.colSpan=this.__colSpan),1<this.__rowSpan&&(I.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(I.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(I,N.theme.tableCell,this.hasHeader()&&N.theme.tableCellHeader),I}exportDOM(N){if({element:N}=super.exportDOM(N),N){var I=this.getParentOrThrow().getChildrenSize();N.style.border="1px solid black",1<this.__colSpan&&(N.colSpan=this.__colSpan),1<this.__rowSpan&&(N.rowSpan=this.__rowSpan),N.style.width=`${this.getWidth()||Math.max(90,700/I)}px`,N.style.verticalAlign="top",N.style.textAlign="start",I=this.getBackgroundColor(),I!==null?N.style.backgroundColor=I:this.hasHeader()&&(N.style.backgroundColor="#f2f3f5")}return{element:N}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(N){return this.getWritable().__headerState=N,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(N){return this.getWritable().__width=N,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(N){this.getWritable().__backgroundColor=N}toggleHeaderStyle(N){let I=this.getWritable();return I.__headerState=(I.__headerState&N)===N?I.__headerState-N:I.__headerState+N,I}hasHeaderState(N){return(this.getHeaderStyles()&N)===N}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(N){return N.__headerState!==this.__headerState||N.__width!==this.__width||N.__colSpan!==this.__colSpan||N.__rowSpan!==this.__rowSpan||N.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(w){var N=w.nodeName.toLowerCase();let I;return n.test(w.style.width)&&(I=parseFloat(w.style.width)),N=a(N==="th"?r.ROW:r.NO_STATUS,w.colSpan,I),N.__rowSpan=w.rowSpan,w=w.style.backgroundColor,w!==""&&(N.__backgroundColor=w),{forChild:(q,ue)=>l(ue)&&!e.$isElementNode(q)?(ue=e.$createParagraphNode(),e.$isLineBreakNode(q)&&q.getTextContent()===`
|
|
102
|
-
`?null:(ue.append(q),ue)):q,node:N}}function a(w,N=1,I){return e.$applyNodeReplacement(new o(w,N,I))}function l(w){return w instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(N){return new u(N.__height,N.__key)}static importDOM(){return{tr:()=>({conversion:p,priority:0})}}static importJSON(N){return m(N.height)}constructor(N,I){super(I),this.__height=N}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(N){let I=document.createElement("tr");return this.__height&&(I.style.height=`${this.__height}px`),t.addClassNamesToElement(I,N.theme.tableRow),I}isShadowRoot(){return!0}setHeight(N){return this.getWritable().__height=N,this.__height}getHeight(){return this.getLatest().__height}updateDOM(N){return N.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(w){let N;return n.test(w.style.height)&&(N=parseFloat(w.style.height)),{node:m(N)}}function m(w){return e.$applyNodeReplacement(new u(w))}function _(w){return w instanceof u}function C(w){let N=new URLSearchParams;N.append("code",w);for(let I=1;I<arguments.length;I++)N.append("v",arguments[I]);throw Error(`Minified Lexical error #${w}; visit https://lexical.dev/docs/error?${N} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let b=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";class v{constructor(N,I){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=I,this.editor=N,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(N=>N())}trackTableGrid(){let N=new MutationObserver(I=>{this.editor.update(()=>{var q=!1;for(let ue=0;ue<I.length;ue++){const fe=I[ue].target.nodeName;if(fe==="TABLE"||fe==="TR"){q=!0;break}}if(q){if(q=this.editor.getElementByKey(this.tableNodeKey),!q)throw Error("Expected to find TableElement in DOM");this.grid=T(q)}})});this.editor.update(()=>{let I=this.editor.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");this.grid=T(I),N.observe(I,{childList:!0,subtree:!0})})}clearHighlight(){let N=this.editor;this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),N.update(()=>{var I=e.$getNodeByKey(this.tableNodeKey);if(!j(I))throw Error("Expected TableNode.");if(I=N.getElementByKey(this.tableNodeKey),!I)throw Error("Expected to find TableElement in DOM");I=T(I),O(N,I,null),e.$setSelection(null),N.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){let N=this.editor;N.update(()=>{let I=N.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(I,N._config.theme.tableSelection),I.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){let N=this.editor;N.update(()=>{let I=N.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");t.addClassNamesToElement(I,N._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(N){if(N!=null&&N.gridKey===this.tableNodeKey){let I=this.editor;this.gridSelection=N,this.isHighlightingCells=!0,this.disableHighlightStyle(),O(I,this.grid,this.gridSelection)}else N==null?this.clearHighlight():(this.tableNodeKey=N.gridKey,this.updateTableGridSelection(N))}setFocusCellForSelection(N,I=!1){let q=this.editor;q.update(()=>{var ue=e.$getNodeByKey(this.tableNodeKey);if(!j(ue))throw Error("Expected TableNode.");if(!q.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");ue=N.x;let fe=N.y;if(this.focusCell=N,this.anchorCell!==null){let se=b?(q._window||window).getSelection():null;se&&se.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ue||this.anchorY!==fe||I))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ue===this.focusX&&fe===this.focusY)return;this.focusX=ue,this.focusY=fe,this.isHighlightingCells&&(ue=e.$getNearestNodeFromDOMNode(N.elem),this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(ue)&&(ue=ue.getKey(),this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ue,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),q.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),O(q,this.grid,this.gridSelection)))})}setAnchorCellForSelection(N){this.isHighlightingCells=!1,this.anchorCell=N,this.anchorX=N.x,this.anchorY=N.y,this.editor.update(()=>{var I=e.$getNearestNodeFromDOMNode(N.elem);l(I)&&(I=I.getKey(),this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=I)})}formatCells(N){this.editor.update(()=>{let I=e.$getSelection();e.DEPRECATED_$isGridSelection(I)||C(11);let q=e.$createRangeSelection(),ue=q.anchor,fe=q.focus;I.getNodes().forEach(se=>{l(se)&&se.getTextContentSize()!==0&&(ue.set(se.getKey(),0,"element"),fe.set(se.getKey(),se.getChildrenSize(),"element"),q.formatText(N))}),e.$setSelection(I),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){let N=this.editor;N.update(()=>{let I=e.$getNodeByKey(this.tableNodeKey);if(!j(I))throw Error("Expected TableNode.");var q=e.$getSelection();e.DEPRECATED_$isGridSelection(q)||C(11),q=q.getNodes().filter(l),q.length===this.grid.columns*this.grid.rows?(I.selectPrevious(),I.remove(),e.$getRoot().selectStart()):(q.forEach(ue=>{if(e.$isElementNode(ue)){let fe=e.$createParagraphNode(),se=e.$createTextNode();fe.append(se),ue.append(fe),ue.getChildren().forEach(Ce=>{Ce!==fe&&Ce.remove()})}}),O(N,this.grid,null),e.$setSelection(null),N.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0))})}}function y(w){for(;w!=null;){let N=w.nodeName;if(N==="TD"||N==="TH"){if(w=w._cell,w===void 0)break;return w}w=w.parentNode}return null}function T(w){let N=[],I={cells:N,columns:0,rows:0};var q=w.firstChild;let ue=w=0;for(N.length=0;q!=null;){var fe=q.nodeName;if(fe==="TD"||fe==="TH"){fe=q,fe={elem:fe,hasBackgroundColor:fe.style.backgroundColor!=="",highlighted:!1,x:w,y:ue},q._cell=fe;let se=N[ue];se===void 0&&(se=N[ue]=[]),se[w]=fe}else if(fe=q.firstChild,fe!=null){q=fe;continue}if(fe=q.nextSibling,fe!=null)w++,q=fe;else if(fe=q.parentNode,fe!=null){if(q=fe.nextSibling,q==null)break;ue++,w=0}}return I.columns=w+1,I.rows=ue+1,I}function O(w,N,I){let q=new Set(I?I.getNodes():[]);A(N,(ue,fe)=>{let se=ue.elem;q.has(fe)?(ue.highlighted=!0,oe(w,ue)):(ue.highlighted=!1,Z(w,ue),se.getAttribute("style")||se.removeAttribute("style"))})}function A(w,N){({cells:w}=w);for(let I=0;I<w.length;I++){let q=w[I];if(q)for(let ue=0;ue<q.length;ue++){let fe=q[ue];if(!fe)continue;let se=e.$getNearestNodeFromDOMNode(fe.elem);se!==null&&N(fe,se,{x:ue,y:I})}}}function D(w,N){N.disableHighlightStyle(),A(N.grid,I=>{I.highlighted=!0,oe(w,I)})}function P(w,N){N.enableHighlightStyle(),A(N.grid,I=>{let q=I.elem;I.highlighted=!1,Z(w,I),q.getAttribute("style")||q.removeAttribute("style")})}let M=(w,N,I,q,ue)=>{const fe=ue==="forward";switch(ue){case"backward":case"forward":return I!==(fe?w.grid.columns-1:0)?(w=N.getCellNodeFromCordsOrThrow(I+(fe?1:-1),q,w.grid),fe?w.selectStart():w.selectEnd()):q!==(fe?w.grid.rows-1:0)?(w=N.getCellNodeFromCordsOrThrow(fe?0:w.grid.columns-1,q+(fe?1:-1),w.grid),fe?w.selectStart():w.selectEnd()):fe?N.selectNext():N.selectPrevious(),!0;case"up":return q!==0?N.getCellNodeFromCordsOrThrow(I,q-1,w.grid).selectEnd():N.selectPrevious(),!0;case"down":return q!==w.grid.rows-1?N.getCellNodeFromCordsOrThrow(I,q+1,w.grid).selectStart():N.selectNext(),!0;default:return!1}},V=(w,N,I,q,ue)=>{const fe=ue==="forward";switch(ue){case"backward":case"forward":return I!==(fe?w.grid.columns-1:0)&&w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I+(fe?1:-1),q,w.grid)),!0;case"up":return q!==0?(w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I,q-1,w.grid)),!0):!1;case"down":return q!==w.grid.rows-1?(w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I,q+1,w.grid)),!0):!1;default:return!1}};function J(w,N){if(e.$isRangeSelection(w)||e.DEPRECATED_$isGridSelection(w)){let I=N.isParentOf(w.anchor.getNode());return w=N.isParentOf(w.focus.getNode()),I&&w}return!1}function oe(w,N){w=N.elem,N=e.$getNearestNodeFromDOMNode(w),l(N)||C(131),N.getBackgroundColor()===null?w.style.setProperty("background-color","rgb(172,206,247)"):w.style.setProperty("background-image","linear-gradient(to right, rgba(172,206,247,0.85), rgba(172,206,247,0.85))"),w.style.setProperty("caret-color","transparent")}function Z(w,N){w=N.elem,N=e.$getNearestNodeFromDOMNode(w),l(N)||C(131),N.getBackgroundColor()===null&&w.style.removeProperty("background-color"),w.style.removeProperty("background-image"),w.style.removeProperty("caret-color")}function U(w){return w=t.$findMatchingParent(w,l),l(w)?w:null}function Q(w){return w=t.$findMatchingParent(w,j),j(w)?w:null}function de(w,N,I,q,ue){let fe=e.$getSelection();if(!J(fe,q))return!1;if(e.$isRangeSelection(fe)&&fe.isCollapsed()){if(I==="backward"||I==="forward")return!1;let{anchor:Be,focus:ce}=fe;var se=t.$findMatchingParent(Be.getNode(),l),Ce=t.$findMatchingParent(ce.getNode(),l);if(!l(se)||!se.is(Ce))return!1;if(Ce=Q(se),Ce!==q&&Ce!=null){var Oe=w.getElementByKey(Ce.getKey());if(Oe!=null)return ue.grid=T(Oe),de(w,N,I,Ce,ue)}if(Ce=w.getElementByKey(se.__key),Oe=w.getElementByKey(Be.key),Oe==null||Ce==null)return!1;if(Be.type==="element")Ce=Oe.getBoundingClientRect();else{if(Ce=window.getSelection(),Ce===null||Ce.rangeCount===0)return!1;Ce=Ce.getRangeAt(0).getBoundingClientRect()}if(Oe=I==="up"?se.getFirstChild():se.getLastChild(),Oe==null||(w=w.getElementByKey(Oe.__key),w==null))return!1;if(w=w.getBoundingClientRect(),I==="up"?w.top>Ce.top-Ce.height:Ce.bottom+Ce.height>w.bottom){if(pe(N),w=q.getCordsFromCellNode(se,ue.grid),N.shiftKey)I=q.getCellFromCordsOrThrow(w.x,w.y,ue.grid),ue.setAnchorCellForSelection(I),ue.setFocusCellForSelection(I,!0);else return M(ue,q,w.x,w.y,I);return!0}}else if(e.DEPRECATED_$isGridSelection(fe)){let{anchor:Be,focus:ce}=fe;return Oe=t.$findMatchingParent(Be.getNode(),l),Ce=t.$findMatchingParent(ce.getNode(),l),[se]=fe.getNodes(),w=w.getElementByKey(se.getKey()),!l(Oe)||!l(Ce)||!j(se)||w==null?!1:(ue.updateTableGridSelection(fe),w=T(w),Oe=q.getCordsFromCellNode(Oe,w),Oe=q.getCellFromCordsOrThrow(Oe.x,Oe.y,w),ue.setAnchorCellForSelection(Oe),pe(N),N.shiftKey?(N=q.getCordsFromCellNode(Ce,w),V(ue,se,N.x,N.y,I)):(Ce.selectEnd(),!0))}return!1}function pe(w){w.preventDefault(),w.stopImmediatePropagation(),w.stopPropagation()}class te extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(N){return new te(N.__key)}static importDOM(){return{table:()=>({conversion:he,priority:1})}}static importJSON(){return Y()}constructor(N){super(N)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(N){let I=document.createElement("table");return t.addClassNamesToElement(I,N.theme.table),I}updateDOM(){return!1}exportDOM(N){return{...super.exportDOM(N),after:I=>{if(I){let q=I.cloneNode(),ue=document.createElement("colgroup"),fe=document.createElement("tbody");if(t.isHTMLElement(I)&&fe.append(...I.children),I=this.getFirstChildOrThrow(),!_(I))throw Error("Expected to find row node.");I=I.getChildrenSize();for(let se=0;se<I;se++){let Ce=document.createElement("col");ue.append(Ce)}return q.replaceChildren(ue,fe),q}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(N,I){let{rows:q,cells:ue}=I;for(I=0;I<q;I++){var fe=ue[I];if(fe!=null&&(fe=fe.findIndex(se=>{if(se)return{elem:se}=se,e.$getNearestNodeFromDOMNode(se)===N}),fe!==-1))return{x:fe,y:I}}throw Error("Cell not found in table.")}getCellFromCords(N,I,q){return{cells:q}=q,I=q[I],I==null?null:(N=I[N],N??null)}getCellFromCordsOrThrow(N,I,q){if(N=this.getCellFromCords(N,I,q),!N)throw Error("Cell not found at cords.");return N}getCellNodeFromCords(N,I,q){return N=this.getCellFromCords(N,I,q),N==null?null:(N=e.$getNearestNodeFromDOMNode(N.elem),l(N)?N:null)}getCellNodeFromCordsOrThrow(N,I,q){if(N=this.getCellNodeFromCords(N,I,q),!N)throw Error("Node at cords not TableCellNode.");return N}canSelectBefore(){return!0}canIndent(){return!1}}function he(){return{node:Y()}}function Y(){return e.$applyNodeReplacement(new te)}function j(w){return w instanceof te}function ee(w){if(w=t.$findMatchingParent(w,N=>_(N)),_(w))return w;throw Error("Expected table cell to be inside of table row.")}function ne(w){if(w=t.$findMatchingParent(w,N=>j(N)),j(w))return w;throw Error("Expected table cell to be inside of table.")}function B(w,N){let I=ne(w),{x:q,y:ue}=I.getCordsFromCellNode(w,N);return{above:I.getCellNodeFromCords(q,ue-1,N),below:I.getCellNodeFromCords(q,ue+1,N),left:I.getCellNodeFromCords(q-1,ue,N),right:I.getCellNodeFromCords(q+1,ue,N)}}function W(w){let N=w.getFirstDescendant();N==null?w.selectStart():N.getParentOrThrow().selectStart()}function X(w,N){let I=w.getFirstChild();I!==null?I.insertBefore(N):w.append(N)}let F=e.createCommand("INSERT_TABLE_COMMAND");return nn.$createTableCellNode=a,nn.$createTableNode=Y,nn.$createTableNodeWithDimensions=function(w,N,I=!0){let q=Y();for(let fe=0;fe<w;fe++){let se=m();for(let Ce=0;Ce<N;Ce++){var ue=r.NO_STATUS;typeof I=="object"?(fe===0&&I.rows&&(ue|=r.ROW),Ce===0&&I.columns&&(ue|=r.COLUMN)):I&&(fe===0&&(ue|=r.ROW),Ce===0&&(ue|=r.COLUMN)),ue=a(ue);let Oe=e.$createParagraphNode();Oe.append(e.$createTextNode()),ue.append(Oe),se.append(ue)}q.append(se)}return q},nn.$createTableRowNode=m,nn.$deleteTableColumn=function(w,N){let I=w.getChildren();for(let ue=0;ue<I.length;ue++){var q=I[ue];if(_(q)){if(q=q.getChildren(),N>=q.length||0>N)throw Error("Table column target index out of range");q[N].remove()}}return w},nn.$deleteTableColumn__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var N=w.anchor.getNode();w=w.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N);[N]=e.DEPRECATED_$getNodeTriplet(w);let[ue,fe,se]=e.DEPRECATED_$computeGridMap(q,I,N);var{startColumn:Ce}=fe;let{startRow:Oe,startColumn:Be}=se;w=Math.min(Ce,Be),Ce=Math.max(Ce+I.__colSpan-1,Be+N.__colSpan-1);let ce=Ce-w+1;if(ue[0].length===Ce-w+1)q.selectPrevious(),q.remove();else{var le=ue.length;for(let ye=0;ye<le;ye++)for(let Me=w;Me<=Ce;Me++){let{cell:Pe,startColumn:We}=ue[ye][Me];We<w?Me===w&&Pe.setColSpan(Pe.__colSpan-Math.min(ce,Pe.__colSpan-(w-We))):We+Pe.__colSpan-1>Ce?Me===Ce&&Pe.setColSpan(Pe.__colSpan-(Ce-We+1)):Pe.remove()}w=ue[Oe],N=w[Be+N.__colSpan],N!==void 0?({cell:N}=N,W(N)):({cell:N}=w[Be-1],W(N))}},nn.$deleteTableRow__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var N=w.anchor.getNode();w=w.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N);[w]=e.DEPRECATED_$getNodeTriplet(w);let[ue,fe,se]=e.DEPRECATED_$computeGridMap(q,I,w);({startRow:N}=fe);var{startRow:Ce}=se;if(w=Ce+w.__rowSpan-1,ue.length===w-N+1)q.remove();else{Ce=ue[0].length;var Oe=ue[w+1],Be=q.getChildAtIndex(w+1);for(let le=w;le>=N;le--){for(var ce=Ce-1;0<=ce;ce--){let{cell:ye,startRow:Me,startColumn:Pe}=ue[le][ce];if(Pe===ce&&(le===N&&Me<N&&ye.setRowSpan(ye.__rowSpan-(Me-N)),Me>=N&&Me+ye.__rowSpan-1>w))if(ye.setRowSpan(ye.__rowSpan-(w-Me+1)),Be===null&&C(122),ce===0)X(Be,ye);else{let{cell:We}=Oe[ce-1];We.insertAfter(ye)}}ce=q.getChildAtIndex(le),e.DEPRECATED_$isGridRowNode(ce)||C(123,String(le)),ce.remove()}Oe!==void 0?({cell:N}=Oe[0],W(N)):({cell:N}=ue[N-1][0],W(N))}},nn.$getElementGridForTableNode=function(w,N){if(w=w.getElementByKey(N.getKey()),w==null)throw Error("Table Element Not Found");return T(w)},nn.$getTableCellNodeFromLexicalNode=function(w){return w=t.$findMatchingParent(w,N=>l(N)),l(w)?w:null},nn.$getTableColumnIndexFromTableCellNode=function(w){return ee(w).getChildren().findIndex(N=>N.is(w))},nn.$getTableNodeFromLexicalNodeOrThrow=ne,nn.$getTableRowIndexFromTableCellNode=function(w){let N=ee(w);return ne(N).getChildren().findIndex(I=>I.is(N))},nn.$getTableRowNodeFromTableCellNodeOrThrow=ee,nn.$insertTableColumn=function(w,N,I=!0,q,ue){let fe=w.getChildren(),se=[];for(let Be=0;Be<fe.length;Be++){let ce=fe[Be];if(_(ce))for(let le=0;le<q;le++){var Ce=ce.getChildren();if(N>=Ce.length||0>N)throw Error("Table column target index out of range");Ce=Ce[N],l(Ce)||C(12);let{left:ye,right:Me}=B(Ce,ue);var Oe=r.NO_STATUS;(ye&&ye.hasHeaderState(r.ROW)||Me&&Me.hasHeaderState(r.ROW))&&(Oe|=r.ROW),Oe=a(Oe),Oe.append(e.$createParagraphNode()),se.push({newTableCell:Oe,targetCell:Ce})}}return se.forEach(({newTableCell:Be,targetCell:ce})=>{I?ce.insertAfter(Be):ce.insertBefore(Be)}),w},nn.$insertTableColumn__EXPERIMENTAL=function(w=!0){function N(){let le=a(r.NO_STATUS).append(e.$createParagraphNode());return Be===null&&(Be=le),le}var I=e.$getSelection();if(!e.$INTERNAL_isPointSelection(I))throw Error("Expected a PointSeleciton");var q=I.anchor.getNode();I=I.focus.getNode(),[q]=e.DEPRECATED_$getNodeTriplet(q);let[ue,,fe]=e.DEPRECATED_$getNodeTriplet(I),[se,Ce,Oe]=e.DEPRECATED_$computeGridMap(fe,ue,q);q=se.length,I=w?Math.max(Ce.startColumn,Oe.startColumn):Math.min(Ce.startColumn,Oe.startColumn),w=w?I+ue.__colSpan-1:I-1,I=fe.getFirstChild(),e.DEPRECATED_$isGridRowNode(I)||C(120);let Be=null;var ce=I;e:for(I=0;I<q;I++){I!==0&&(ce=ce.getNextSibling(),e.DEPRECATED_$isGridRowNode(ce)||C(121));let le=se[I];if(0>w){X(ce,N());continue}let{cell:ye,startColumn:Me,startRow:Pe}=le[w];if(Me+ye.__colSpan-1<=w){let We=ye,Xe=Pe,st=w;for(;Xe!==I&&1<We.__rowSpan;)if(st-=ye.__colSpan,0<=st){let{cell:dt,startRow:Ct}=le[st];We=dt,Xe=Ct}else{ce.append(N());continue e}We.insertAfter(N())}else ye.setColSpan(ye.__colSpan+1)}Be!==null&&W(Be)},nn.$insertTableRow=function(w,N,I=!0,q,ue){var fe=w.getChildren();if(N>=fe.length||0>N)throw Error("Table row target index out of range");if(N=fe[N],_(N))for(fe=0;fe<q;fe++){let Ce=N.getChildren(),Oe=Ce.length,Be=m();for(let ce=0;ce<Oe;ce++){var se=Ce[ce];l(se)||C(12);let{above:le,below:ye}=B(se,ue);se=r.NO_STATUS;let Me=le&&le.getWidth()||ye&&ye.getWidth()||void 0;(le&&le.hasHeaderState(r.COLUMN)||ye&&ye.hasHeaderState(r.COLUMN))&&(se|=r.COLUMN),se=a(se,1,Me),se.append(e.$createParagraphNode()),Be.append(se)}I?N.insertAfter(Be):N.insertBefore(Be)}else throw Error("Row before insertion index does not exist.");return w},nn.$insertTableRow__EXPERIMENTAL=function(w=!0){var N=e.$getSelection();if(!e.$INTERNAL_isPointSelection(N))throw Error("Expected a INTERNAL_PointSelection");N=N.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N),[ue,fe]=e.DEPRECATED_$computeGridMap(q,I,I);N=ue[0].length;var{startRow:se}=fe;if(w){w=se+I.__rowSpan-1;var Ce=ue[w];se=m();for(var Oe=0;Oe<N;Oe++){let{cell:Be,startRow:ce}=Ce[Oe];ce+Be.__rowSpan-1<=w?se.append(a(r.NO_STATUS)):Be.setRowSpan(Be.__rowSpan+1)}N=q.getChildAtIndex(w),e.DEPRECATED_$isGridRowNode(N)||C(119),N.insertAfter(se)}else{for(Ce=ue[se],w=m(),Oe=0;Oe<N;Oe++){let{cell:Be,startRow:ce}=Ce[Oe];ce===se?w.append(a(r.NO_STATUS)):Be.setRowSpan(Be.__rowSpan+1)}N=q.getChildAtIndex(se),e.DEPRECATED_$isGridRowNode(N)||C(119),N.insertBefore(w)}},nn.$isTableCellNode=l,nn.$isTableNode=j,nn.$isTableRowNode=_,nn.$removeTableRowAtIndex=function(w,N){let I=w.getChildren();if(N>=I.length||0>N)throw Error("Expected table cell to be inside of table row.");return I[N].remove(),w},nn.$unmergeCell=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");w=w.anchor.getNode();let[N,I,q]=e.DEPRECATED_$getNodeTriplet(w);w=N.__colSpan;let ue=N.__rowSpan;if(1<w){for(var fe=1;fe<w;fe++)N.insertAfter(a(r.NO_STATUS));N.setColSpan(1)}if(1<ue){let[Oe,Be]=e.DEPRECATED_$computeGridMap(q,N,N),{startColumn:ce,startRow:le}=Be,ye;for(fe=1;fe<ue;fe++){var se=le+fe;let Me=Oe[se];ye=(ye||I).getNextSibling(),e.DEPRECATED_$isGridRowNode(ye)||C(125);var Ce=null;for(let Pe=0;Pe<ce;Pe++){let We=Me[Pe],Xe=We.cell;We.startRow===se&&(Ce=Xe),1<Xe.__colSpan&&(Pe+=Xe.__colSpan-1)}if(Ce===null)for(Ce=0;Ce<w;Ce++)X(ye,a(r.NO_STATUS));else for(se=0;se<w;se++)Ce.insertAfter(a(r.NO_STATUS))}N.setRowSpan(1)}},nn.INSERT_TABLE_COMMAND=F,nn.TableCellHeaderStates=r,nn.TableCellNode=o,nn.TableNode=te,nn.TableRowNode=u,nn.TableSelection=v,nn.applyTableHandlers=function(w,N,I,q){function ue(ce){return ce=w.getCordsFromCellNode(ce,se.grid),w.getCellFromCordsOrThrow(ce.x,ce.y,se.grid)}let fe=I.getRootElement();if(fe===null)throw Error("No root element.");let se=new v(I,w.getKey()),Ce=I._window||window;N.__lexicalTableSelection=se,N.addEventListener("mousedown",ce=>{setTimeout(()=>{if(ce.button===0&&Ce){var le=y(ce.target);le!==null&&(pe(ce),se.setAnchorCellForSelection(le));var ye=()=>{Ce.removeEventListener("mouseup",ye),Ce.removeEventListener("mousemove",Me)},Me=Pe=>{const We=y(Pe.target);We===null||se.anchorX===We.x&&se.anchorY===We.y||(Pe.preventDefault(),se.setFocusCellForSelection(We))};Ce.addEventListener("mouseup",ye),Ce.addEventListener("mousemove",Me)}},0)});let Oe=ce=>{ce.button===0&&I.update(()=>{const le=e.$getSelection(),ye=ce.target;e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey&&fe.contains(ye)&&se.clearHighlight()})};Ce.addEventListener("mousedown",Oe),se.listenersToRemove.add(()=>Ce.removeEventListener("mousedown",Oe)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_DOWN_COMMAND,ce=>de(I,ce,"down",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_UP_COMMAND,ce=>de(I,ce,"up",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_LEFT_COMMAND,ce=>de(I,ce,"backward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,ce=>de(I,ce,"forward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ESCAPE_COMMAND,ce=>{var le=e.$getSelection();return e.DEPRECATED_$isGridSelection(le)&&(le=t.$findMatchingParent(le.focus.getNode(),l),l(le))?(pe(ce),le.selectEnd(),!0):!1},e.COMMAND_PRIORITY_HIGH));let Be=ce=>()=>{var le=e.$getSelection();if(!J(le,w))return!1;if(e.DEPRECATED_$isGridSelection(le))return se.clearText(),!0;if(e.$isRangeSelection(le)){const Pe=t.$findMatchingParent(le.anchor.getNode(),We=>l(We));if(!l(Pe))return!1;var ye=le.anchor.getNode(),Me=le.focus.getNode();if(ye=w.isParentOf(ye),Me=w.isParentOf(Me),ye&&!Me||Me&&!ye)return se.clearText(),!0;if(ye=(Me=t.$findMatchingParent(le.anchor.getNode(),We=>e.$isElementNode(We)))&&t.$findMatchingParent(Me,We=>e.$isElementNode(We)&&l(We.getParent())),!e.$isElementNode(ye)||!e.$isElementNode(Me))return!1;if(ce===e.DELETE_LINE_COMMAND&&ye.getPreviousSibling()===null)return!0;if((ce===e.DELETE_CHARACTER_COMMAND||ce===e.DELETE_WORD_COMMAND)&&le.isCollapsed()&&le.anchor.offset===0&&Me!==ye){le=Me.getChildren();const We=e.$createParagraphNode();return le.forEach(Xe=>We.append(Xe)),Me.replace(We),Me.getWritable().__parent=Pe.getKey(),!0}}return!1};return[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(ce=>{se.listenersToRemove.add(I.registerCommand(ce,Be(ce),e.COMMAND_PRIORITY_CRITICAL))}),N=ce=>{const le=e.$getSelection();return J(le,w)?e.DEPRECATED_$isGridSelection(le)?(ce.preventDefault(),ce.stopPropagation(),se.clearText(),!0):(e.$isRangeSelection(le)&&(ce=t.$findMatchingParent(le.anchor.getNode(),ye=>l(ye)),l(ce)),!1):!1},se.listenersToRemove.add(I.registerCommand(e.KEY_BACKSPACE_COMMAND,N,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.KEY_DELETE_COMMAND,N,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.FORMAT_TEXT_COMMAND,ce=>{let le=e.$getSelection();return J(le,w)?e.DEPRECATED_$isGridSelection(le)?(se.formatCells(ce),!0):(e.$isRangeSelection(le)&&(ce=t.$findMatchingParent(le.anchor.getNode(),ye=>l(ye)),l(ce)),!1):!1},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,()=>{var ce=e.$getSelection();return J(ce,w)&&(e.DEPRECATED_$isGridSelection(ce)?se.clearHighlight():e.$isRangeSelection(ce)&&(ce=t.$findMatchingParent(ce.anchor.getNode(),le=>l(le)),l(ce))),!1},e.COMMAND_PRIORITY_CRITICAL)),q&&se.listenersToRemove.add(I.registerCommand(e.KEY_TAB_COMMAND,ce=>{var le=e.$getSelection();return!e.$isRangeSelection(le)||!le.isCollapsed()||!J(le,w)||(le=U(le.anchor.getNode()),le===null)?!1:(pe(ce),le=w.getCordsFromCellNode(le,se.grid),M(se,w,le.x,le.y,ce.shiftKey?"backward":"forward"),!0)},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.FOCUS_COMMAND,()=>w.isSelected(),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{let ce=e.$getSelection(),le=e.$getPreviousSelection();if(e.$isRangeSelection(ce)){let{anchor:Xe,focus:st}=ce;var ye=Xe.getNode(),Me=st.getNode();ye=U(ye),Me=U(Me);var Pe=ye&&w.is(Q(ye)),We=Me&&w.is(Q(Me));let dt=Pe!==We;We=Pe&&We,Pe=ce.isBackward(),dt?(ye=ce.clone(),ye.focus.set(w.getKey(),Pe?0:w.getChildrenSize(),"element"),e.$setSelection(ye),D(I,se)):We&&!ye.is(Me)&&(se.setAnchorCellForSelection(ue(ye)),se.setFocusCellForSelection(ue(Me),!0))}return ce&&!ce.is(le)&&(e.DEPRECATED_$isGridSelection(ce)||e.DEPRECATED_$isGridSelection(le))&&se.gridSelection&&!se.gridSelection.is(le)?(e.DEPRECATED_$isGridSelection(ce)&&ce.gridKey===se.tableNodeKey?se.updateTableGridSelection(ce):!e.DEPRECATED_$isGridSelection(ce)&&e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey&&se.updateTableGridSelection(null),!1):(se.hasHijackedSelectionStyles&&!w.isSelected()?P(I,se):!se.hasHijackedSelectionStyles&&w.isSelected()&&D(I,se),!1)},e.COMMAND_PRIORITY_CRITICAL)),se},nn.getCellFromTarget=y,nn.getTableSelectionFromTableElement=function(w){return w.__lexicalTableSelection},nn}var l0,c0;function Pg(){return c0||(c0=1,l0=process.env.NODE_ENV==="development"?cA():uA()),l0}var u0;function dA(){if(u0)return Vh;u0=1;var e=ur(),t=Pg(),n=vn(),r=Xt(),o=H;function i({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){const[p]=e.useLexicalComposerContext();return o.useEffect(()=>{if(!p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode]))throw Error("TablePlugin: TableNode, TableCellNode or TableRowNode not registered on editor");return p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:m,rows:_,includeHeaders:C})=>{const b=t.$createTableNodeWithDimensions(Number(_),Number(m),C);n.$insertNodeToNearestRoot(b);const v=b.getFirstDescendant();return r.$isTextNode(v)&&v.select(),!0},r.COMMAND_PRIORITY_EDITOR)},[p]),o.useEffect(()=>{const m=new Map,_=b=>{const v=b.getKey(),y=p.getElementByKey(v);if(y&&!m.has(v)){const T=t.applyTableHandlers(b,y,p,u);m.set(v,T)}};p.getEditorState().read(()=>{const b=r.$nodesOfType(t.TableNode);for(const v of b)t.$isTableNode(v)&&_(v)});const C=p.registerMutationListener(t.TableNode,b=>{for(const[v,y]of b)if(y==="created")p.getEditorState().read(()=>{const T=r.$getNodeByKey(v);t.$isTableNode(T)&&_(T)});else if(y==="destroyed"){const T=m.get(v);T!==void 0&&(T.removeListeners(),m.delete(v))}});return()=>{C();for(const[,b]of m)b.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,m=>{if(m.getColSpan()>1||m.getRowSpan()>1){const[,,_]=r.DEPRECATED_$getNodeTriplet(m),[C]=r.DEPRECATED_$computeGridMap(_,m,m),b=C.length,v=C[0].length;let y=_.getFirstChild();if(!r.DEPRECATED_$isGridRowNode(y))throw Error("Expected TableNode first child to be a RowNode");const T=[];for(let O=0;O<b;O++){if(O!==0&&(y=y.getNextSibling(),!r.DEPRECATED_$isGridRowNode(y)))throw Error("Expected TableNode first child to be a RowNode");let A=null;for(let D=0;D<v;D++){const P=C[O][D],M=P.cell;if(P.startRow===O&&P.startColumn===D)A=M,T.push(M);else if(M.getColSpan()>1||M.getRowSpan()>1){const V=t.$createTableCellNode(M.__headerState);A!==null?A.insertAfter(V):n.$insertFirst(y,V)}}}for(const O of T)O.setColSpan(1),O.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,m=>{m.getBackgroundColor()!==null&&m.setBackgroundColor(null)})},[p,l,a]),null}return Vh.TablePlugin=i,Vh}var Yh={},d0;function fA(){if(d0)return Yh;d0=1;var e=ur(),t=Pg(),n=vn(),r=Xt(),o=H;function i(a){let l=new URLSearchParams;l.append("code",a);for(let u=1;u<arguments.length;u++)l.append("v",arguments[u]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}return Yh.TablePlugin=function({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){let[p]=e.useLexicalComposerContext();return o.useEffect(()=>(p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode])||i(10),p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:m,rows:_,includeHeaders:C})=>(m=t.$createTableNodeWithDimensions(Number(_),Number(m),C),n.$insertNodeToNearestRoot(m),m=m.getFirstDescendant(),r.$isTextNode(m)&&m.select(),!0),r.COMMAND_PRIORITY_EDITOR)),[p]),o.useEffect(()=>{let m=new Map,_=b=>{const v=b.getKey(),y=p.getElementByKey(v);y&&!m.has(v)&&(b=t.applyTableHandlers(b,y,p,u),m.set(v,b))};p.getEditorState().read(()=>{let b=r.$nodesOfType(t.TableNode);for(let v of b)t.$isTableNode(v)&&_(v)});let C=p.registerMutationListener(t.TableNode,b=>{for(const[v,y]of b)y==="created"?p.getEditorState().read(()=>{const T=r.$getNodeByKey(v);t.$isTableNode(T)&&_(T)}):y==="destroyed"&&(b=m.get(v),b!==void 0&&(b.removeListeners(),m.delete(v)))});return()=>{C();for(let[,b]of m)b.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,m=>{if(1<m.getColSpan()||1<m.getRowSpan()){var[,,_]=r.DEPRECATED_$getNodeTriplet(m);[m]=r.DEPRECATED_$computeGridMap(_,m,m);let b=m.length,v=m[0].length;if(_=_.getFirstChild(),!r.DEPRECATED_$isGridRowNode(_))throw Error("Expected TableNode first child to be a RowNode");let y=[];for(let T=0;T<b;T++){if(T!==0&&(_=_.getNextSibling(),!r.DEPRECATED_$isGridRowNode(_)))throw Error("Expected TableNode first child to be a RowNode");let O=null;for(let A=0;A<v;A++){var C=m[T][A];let D=C.cell;C.startRow===T&&C.startColumn===A?(O=D,y.push(D)):(1<D.getColSpan()||1<D.getRowSpan())&&(C=t.$createTableCellNode(D.__headerState),O!==null?O.insertAfter(C):n.$insertFirst(_,C))}}for(let T of y)T.setColSpan(1),T.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,m=>{m.getBackgroundColor()!==null&&m.setBackgroundColor(null)})},[p,l,a]),null},Yh}process.env.NODE_ENV==="development"?dA():fA();var Vn={},f0={exports:{}},h0;function sE(){return h0||(h0=1,function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
103
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
104
|
-
*
|
|
105
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
106
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
107
|
-
* @namespace
|
|
108
|
-
* @public
|
|
109
|
-
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function A(D){return D instanceof u?new u(D.type,A(D.content),D.alias):Array.isArray(D)?D.map(A):D.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(A){return Object.prototype.toString.call(A).slice(8,-1)},objId:function(A){return A.__id||Object.defineProperty(A,"__id",{value:++i}),A.__id},clone:function A(D,P){P=P||{};var M,V;switch(l.util.type(D)){case"Object":if(V=l.util.objId(D),P[V])return P[V];M={},P[V]=M;for(var J in D)D.hasOwnProperty(J)&&(M[J]=A(D[J],P));return M;case"Array":return V=l.util.objId(D),P[V]?P[V]:(M=[],P[V]=M,D.forEach(function(oe,Z){M[Z]=A(oe,P)}),M);default:return D}},getLanguage:function(A){for(;A;){var D=o.exec(A.className);if(D)return D[1].toLowerCase();A=A.parentElement}return"none"},setLanguage:function(A,D){A.className=A.className.replace(RegExp(o,"gi"),""),A.classList.add("language-"+D)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(M){var A=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(A){var D=document.getElementsByTagName("script");for(var P in D)if(D[P].src==A)return D[P]}return null}},isActive:function(A,D,P){for(var M="no-"+D;A;){var V=A.classList;if(V.contains(D))return!0;if(V.contains(M))return!1;A=A.parentElement}return!!P}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(A,D){var P=l.util.clone(l.languages[A]);for(var M in D)P[M]=D[M];return P},insertBefore:function(A,D,P,M){M=M||l.languages;var V=M[A],J={};for(var oe in V)if(V.hasOwnProperty(oe)){if(oe==D)for(var Z in P)P.hasOwnProperty(Z)&&(J[Z]=P[Z]);P.hasOwnProperty(oe)||(J[oe]=V[oe])}var U=M[A];return M[A]=J,l.languages.DFS(l.languages,function(Q,de){de===U&&Q!=A&&(this[Q]=J)}),J},DFS:function A(D,P,M,V){V=V||{};var J=l.util.objId;for(var oe in D)if(D.hasOwnProperty(oe)){P.call(D,oe,D[oe],M||oe);var Z=D[oe],U=l.util.type(Z);U==="Object"&&!V[J(Z)]?(V[J(Z)]=!0,A(Z,P,null,V)):U==="Array"&&!V[J(Z)]&&(V[J(Z)]=!0,A(Z,P,oe,V))}}},plugins:{},highlightAll:function(A,D){l.highlightAllUnder(document,A,D)},highlightAllUnder:function(A,D,P){var M={callback:P,container:A,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),l.hooks.run("before-all-elements-highlight",M);for(var V=0,J;J=M.elements[V++];)l.highlightElement(J,D===!0,M.callback)},highlightElement:function(A,D,P){var M=l.util.getLanguage(A),V=l.languages[M];l.util.setLanguage(A,M);var J=A.parentElement;J&&J.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(J,M);var oe=A.textContent,Z={element:A,language:M,grammar:V,code:oe};function U(de){Z.highlightedCode=de,l.hooks.run("before-insert",Z),Z.element.innerHTML=Z.highlightedCode,l.hooks.run("after-highlight",Z),l.hooks.run("complete",Z),P&&P.call(Z.element)}if(l.hooks.run("before-sanity-check",Z),J=Z.element.parentElement,J&&J.nodeName.toLowerCase()==="pre"&&!J.hasAttribute("tabindex")&&J.setAttribute("tabindex","0"),!Z.code){l.hooks.run("complete",Z),P&&P.call(Z.element);return}if(l.hooks.run("before-highlight",Z),!Z.grammar){U(l.util.encode(Z.code));return}if(D&&r.Worker){var Q=new Worker(l.filename);Q.onmessage=function(de){U(de.data)},Q.postMessage(JSON.stringify({language:Z.language,code:Z.code,immediateClose:!0}))}else U(l.highlight(Z.code,Z.grammar,Z.language))},highlight:function(A,D,P){var M={code:A,grammar:D,language:P};if(l.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=l.tokenize(M.code,M.grammar),l.hooks.run("after-tokenize",M),u.stringify(l.util.encode(M.tokens),M.language)},tokenize:function(A,D){var P=D.rest;if(P){for(var M in P)D[M]=P[M];delete D.rest}var V=new _;return C(V,V.head,A),m(A,V,D,V.head,0),v(V)},hooks:{all:{},add:function(A,D){var P=l.hooks.all;P[A]=P[A]||[],P[A].push(D)},run:function(A,D){var P=l.hooks.all[A];if(!(!P||!P.length))for(var M=0,V;V=P[M++];)V(D)}},Token:u};r.Prism=l;function u(A,D,P,M){this.type=A,this.content=D,this.alias=P,this.length=(M||"").length|0}u.stringify=function A(D,P){if(typeof D=="string")return D;if(Array.isArray(D)){var M="";return D.forEach(function(U){M+=A(U,P)}),M}var V={type:D.type,content:A(D.content,P),tag:"span",classes:["token",D.type],attributes:{},language:P},J=D.alias;J&&(Array.isArray(J)?Array.prototype.push.apply(V.classes,J):V.classes.push(J)),l.hooks.run("wrap",V);var oe="";for(var Z in V.attributes)oe+=" "+Z+'="'+(V.attributes[Z]||"").replace(/"/g,""")+'"';return"<"+V.tag+' class="'+V.classes.join(" ")+'"'+oe+">"+V.content+"</"+V.tag+">"};function p(A,D,P,M){A.lastIndex=D;var V=A.exec(P);if(V&&M&&V[1]){var J=V[1].length;V.index+=J,V[0]=V[0].slice(J)}return V}function m(A,D,P,M,V,J){for(var oe in P)if(!(!P.hasOwnProperty(oe)||!P[oe])){var Z=P[oe];Z=Array.isArray(Z)?Z:[Z];for(var U=0;U<Z.length;++U){if(J&&J.cause==oe+","+U)return;var Q=Z[U],de=Q.inside,pe=!!Q.lookbehind,te=!!Q.greedy,he=Q.alias;if(te&&!Q.pattern.global){var Y=Q.pattern.toString().match(/[imsuy]*$/)[0];Q.pattern=RegExp(Q.pattern.source,Y+"g")}for(var j=Q.pattern||Q,ee=M.next,ne=V;ee!==D.tail&&!(J&&ne>=J.reach);ne+=ee.value.length,ee=ee.next){var B=ee.value;if(D.length>A.length)return;if(!(B instanceof u)){var W=1,X;if(te){if(X=p(j,ne,A,pe),!X||X.index>=A.length)break;var I=X.index,F=X.index+X[0].length,w=ne;for(w+=ee.value.length;I>=w;)ee=ee.next,w+=ee.value.length;if(w-=ee.value.length,ne=w,ee.value instanceof u)continue;for(var N=ee;N!==D.tail&&(w<F||typeof N.value=="string");N=N.next)W++,w+=N.value.length;W--,B=A.slice(ne,w),X.index-=ne}else if(X=p(j,0,B,pe),!X)continue;var I=X.index,q=X[0],ue=B.slice(0,I),fe=B.slice(I+q.length),se=ne+B.length;J&&se>J.reach&&(J.reach=se);var Ce=ee.prev;ue&&(Ce=C(D,Ce,ue),ne+=ue.length),b(D,Ce,W);var Oe=new u(oe,de?l.tokenize(q,de):q,he,q);if(ee=C(D,Ce,Oe),fe&&C(D,ee,fe),W>1){var Be={cause:oe+","+U,reach:se};m(A,D,P,ee.prev,ne,Be),J&&Be.reach>J.reach&&(J.reach=Be.reach)}}}}}}function _(){var A={value:null,prev:null,next:null},D={value:null,prev:A,next:null};A.next=D,this.head=A,this.tail=D,this.length=0}function C(A,D,P){var M=D.next,V={value:P,prev:D,next:M};return D.next=V,M.prev=V,A.length++,V}function b(A,D,P){for(var M=D.next,V=0;V<P&&M!==A.tail;V++)M=M.next;D.next=M,M.prev=D,A.length-=V}function v(A){for(var D=[],P=A.head.next;P!==A.tail;)D.push(P.value),P=P.next;return D}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(A){var D=JSON.parse(A.data),P=D.language,M=D.code,V=D.immediateClose;r.postMessage(l.highlight(M,l.languages[P],P)),V&&r.close()},!1)),l;var y=l.util.currentScript();y&&(l.filename=y.src,y.hasAttribute("data-manual")&&(l.manual=!0));function T(){l.manual||l.highlightAll()}if(!l.manual){var O=document.readyState;O==="loading"||O==="interactive"&&y&&y.defer?document.addEventListener("DOMContentLoaded",T):window.requestAnimationFrame?window.requestAnimationFrame(T):window.setTimeout(T,16)}return l}(t);e.exports&&(e.exports=n),typeof Bv<"u"&&(Bv.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,o){var i={};i["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(y,T){return"✖ Error "+y+" while fetching file: "+T},i="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",u="loading",p="loaded",m="failed",_="pre[data-src]:not(["+l+'="'+p+'"]):not(['+l+'="'+u+'"])';function C(y,T,O){var A=new XMLHttpRequest;A.open("GET",y,!0),A.onreadystatechange=function(){A.readyState==4&&(A.status<400&&A.responseText?T(A.responseText):A.status>=400?O(o(A.status,A.statusText)):O(i))},A.send(null)}function b(y){var T=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(y||"");if(T){var O=Number(T[1]),A=T[2],D=T[3];return A?D?[O,Number(D)]:[O,void 0]:[O,O]}}n.hooks.add("before-highlightall",function(y){y.selector+=", "+_}),n.hooks.add("before-sanity-check",function(y){var T=y.element;if(T.matches(_)){y.code="",T.setAttribute(l,u);var O=T.appendChild(document.createElement("CODE"));O.textContent=r;var A=T.getAttribute("data-src"),D=y.language;if(D==="none"){var P=(/\.(\w+)$/.exec(A)||[,"none"])[1];D=a[P]||P}n.util.setLanguage(O,D),n.util.setLanguage(T,D);var M=n.plugins.autoloader;M&&M.loadLanguages(D),C(A,function(V){T.setAttribute(l,p);var J=b(T.getAttribute("data-range"));if(J){var oe=V.split(/\r\n?|\n/g),Z=J[0],U=J[1]==null?oe.length:J[1];Z<0&&(Z+=oe.length),Z=Math.max(0,Math.min(Z-1,oe.length)),U<0&&(U+=oe.length),U=Math.max(0,Math.min(U,oe.length)),V=oe.slice(Z,U).join(`
|
|
110
|
-
`),T.hasAttribute("data-start")||T.setAttribute("data-start",String(Z+1))}O.textContent=V,n.highlightElement(O)},function(V){T.setAttribute(l,m),O.textContent=V})}}),n.plugins.fileHighlight={highlight:function(y){for(var T=(y||document).querySelectorAll(_),O=0,A;A=T[O++];)n.highlightElement(A)}};var v=!1;n.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(f0)),f0.exports}var hA={},p0;function lE(){return p0||(p0=1,Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}),hA}var pA={},g0;function cE(){return g0||(g0=1,Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript),pA}var gA={},m0;function uE(){return m0||(m0=1,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml),gA}var mA={},v0;function dE(){return v0||(v0=1,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(m){return m=m.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(m){["url","bold","italic","strike","code-snippet"].forEach(function(_){m!==_&&(e.languages.markdown[m].inside.content.inside[_]=e.languages.markdown[_])})}),e.hooks.add("after-tokenize",function(m){if(m.language!=="markdown"&&m.language!=="md")return;function _(C){if(!(!C||typeof C=="string"))for(var b=0,v=C.length;b<v;b++){var y=C[b];if(y.type!=="code"){_(y.content);continue}var T=y.content[1],O=y.content[3];if(T&&O&&T.type==="code-language"&&O.type==="code-block"&&typeof T.content=="string"){var A=T.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");A=(/[a-z][\w-]*/i.exec(A)||[""])[0].toLowerCase();var D="language-"+A;O.alias?typeof O.alias=="string"?O.alias=[O.alias,D]:O.alias.push(D):O.alias=[D]}}}_(m.tokens)}),e.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var _="",C=0,b=m.classes.length;C<b;C++){var v=m.classes[C],y=/language-(.+)/.exec(v);if(y){_=y[1];break}}var T=e.languages[_];if(T)m.content=e.highlight(p(m.content),T,_);else if(_&&_!=="none"&&e.plugins.autoloader){var O="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);m.attributes.id=O,e.plugins.autoloader.loadLanguages(_,function(){var A=document.getElementById(O);A&&(A.innerHTML=e.highlight(A.textContent,e.languages[_],_))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;function p(m){var _=m.replace(a,"");return _=_.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(C,b){if(b=b.toLowerCase(),b[0]==="#"){var v;return b[1]==="x"?v=parseInt(b.slice(2),16):v=Number(b.slice(1)),u(v)}else{var y=l[b];return y||C}}),_}e.languages.md=e.languages.markdown}(Prism)),mA}var vA={},y0;function fE(){return y0||(y0=1,Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean),vA}var yA={},b0;function hE(){return b0||(b0=1,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)),yA}var bA={},_0;function pE(){return _0||(_0=1,Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec),bA}var _A={},x0;function gE(){return x0||(x0=1,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}),_A}var xA={},E0;function mE(){return E0||(E0=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),xA}var EA={},C0;function vE(){return C0||(C0=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),EA}var CA={},w0;function yE(){return w0||(w0=1,Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift})),CA}var wA={},T0;function bE(){return T0||(T0=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),wA}var TA={},N0;function _E(){return N0||(N0=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),TA}var NA={},S0;function xE(){return S0||(S0=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),NA}var O0;function SA(){if(O0)return Vn;O0=1;var e=sE();lE(),cE(),uE(),dE(),fE(),hE(),pE(),gE(),mE(),vE(),yE(),bE(),_E(),xE();var t=vn(),n=Xt();const r=ce=>ce!=null&&e.languages.hasOwnProperty(ce)?ce:void 0;function o(ce,le){for(const ye of ce.childNodes){if(t.isHTMLElement(ye)&&ye.tagName===le)return!0;o(ye,le)}return!1}const i="data-highlight-language";class a extends n.ElementNode{static getType(){return"code"}static clone(le){return new a(le.__language,le.__key)}constructor(le,ye){super(ye),this.__language=r(le)}createDOM(le){const ye=document.createElement("code");t.addClassNamesToElement(ye,le.theme.code),ye.setAttribute("spellcheck","false");const Me=this.getLanguage();return Me&&ye.setAttribute(i,Me),ye}updateDOM(le,ye,Me){const Pe=this.__language,We=le.__language;return Pe?Pe!==We&&ye.setAttribute(i,Pe):We&&ye.removeAttribute(i),!1}exportDOM(){const le=document.createElement("pre");le.setAttribute("spellcheck","false");const ye=this.getLanguage();return ye&&le.setAttribute(i,ye),{element:le}}static importDOM(){return{code:le=>le.textContent!=null&&(/\r?\n/.test(le.textContent)||o(le,"BR"))?{conversion:p,priority:1}:null,div:le=>({conversion:m,priority:1}),pre:le=>({conversion:p,priority:0}),table:le=>O(le)?{conversion:_,priority:3}:null,td:le=>{const ye=le,Me=ye.closest("table");return T(ye)?{conversion:b,priority:3}:Me&&O(Me)?{conversion:C,priority:3}:null},tr:le=>{const ye=le.closest("table");return ye&&O(ye)?{conversion:C,priority:3}:null}}}static importJSON(le){const ye=l(le.language);return ye.setFormat(le.format),ye.setIndent(le.indent),ye.setDirection(le.direction),ye}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(le,ye=!0){const Me=this.getChildren(),Pe=Me.length;if(Pe>=2&&Me[Pe-1].getTextContent()===`
|
|
111
|
-
`&&Me[Pe-2].getTextContent()===`
|
|
112
|
-
`&&le.isCollapsed()&&le.anchor.key===this.__key&&le.anchor.offset===Pe){Me[Pe-1].remove(),Me[Pe-2].remove();const dt=n.$createParagraphNode();return this.insertAfter(dt,ye),dt}const{anchor:We,focus:Xe}=le,st=(We.isBefore(Xe)?We:Xe).getNode();if(n.$isTextNode(st)){let dt=pe(st);const Ct=[];for(;;)if(n.$isTabNode(dt))Ct.push(n.$createTabNode()),dt=dt.getNextSibling();else if(de(dt)){let ze=0;const tt=dt.getTextContent(),ut=dt.getTextContentSize();for(;ze<ut&&tt[ze]===" ";ze++);if(ze!==0&&Ct.push(Q(" ".repeat(ze))),ze!==ut)break;dt=dt.getNextSibling()}else break;const Se=st.splitText(We.offset)[0],me=We.offset===0?0:1,_e=Se.getIndexWithinParent()+me,De=st.getParentOrThrow(),Fe=[n.$createLineBreakNode(),...Ct];De.splice(_e,0,Fe);const ke=Ct[Ct.length-1];ke?ke.select():We.offset===0?Se.selectPrevious():Se.getNextSibling().selectNext(0,0)}if(u(st)){const{offset:dt}=le.anchor;st.splice(dt,0,[n.$createLineBreakNode()]),st.select(dt+1,dt+1)}return null}canIndent(){return!1}collapseAtStart(){const le=n.$createParagraphNode();return this.getChildren().forEach(ye=>le.append(ye)),this.replace(le),!0}setLanguage(le){const ye=this.getWritable();ye.__language=r(le)}getLanguage(){return this.getLatest().__language}}function l(ce){return n.$applyNodeReplacement(new a(ce))}function u(ce){return ce instanceof a}function p(ce){let le;return t.isHTMLElement(ce)&&(le=ce.getAttribute(i)),{node:l(le)}}function m(ce){const le=ce,ye=v(le);return!ye&&!y(le)?{node:null}:{after:Me=>{const Pe=ce.parentNode;return Pe!=null&&ce!==Pe.lastChild&&Me.push(n.$createLineBreakNode()),Me},node:ye?l():null}}function _(){return{node:l()}}function C(){return{node:null}}function b(ce){const le=ce;return{after:ye=>(le.parentNode&&le.parentNode.nextSibling&&ye.push(n.$createLineBreakNode()),ye),node:null}}function v(ce){return ce.style.fontFamily.match("monospace")!==null}function y(ce){let le=ce.parentElement;for(;le!==null;){if(v(le))return!0;le=le.parentElement}return!1}function T(ce){return ce.classList.contains("js-file-line")}function O(ce){return ce.classList.contains("js-file-line-container")}const A="javascript",D={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},P={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function M(ce){return P[ce]||ce}function V(ce){const le=M(ce);return D[le]||le}const J=()=>A,oe=()=>Object.keys(e.languages).filter(ce=>typeof e.languages[ce]!="function").sort();class Z extends n.TextNode{constructor(le,ye,Me){super(le,Me),this.__highlightType=ye}static getType(){return"code-highlight"}static clone(le){return new Z(le.__text,le.__highlightType||void 0,le.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(le){const ye=super.createDOM(le),Me=U(le.theme,this.__highlightType);return t.addClassNamesToElement(ye,Me),ye}updateDOM(le,ye,Me){const Pe=super.updateDOM(le,ye,Me),We=U(Me.theme,le.__highlightType),Xe=U(Me.theme,this.__highlightType);return We!==Xe&&(We&&t.removeClassNamesFromElement(ye,We),Xe&&t.addClassNamesToElement(ye,Xe)),Pe}static importJSON(le){const ye=Q(le.text,le.highlightType);return ye.setFormat(le.format),ye.setDetail(le.detail),ye.setMode(le.mode),ye.setStyle(le.style),ye}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(le){return this}isParentRequired(){return!0}createParentElementNode(){return l()}}function U(ce,le){return le&&ce&&ce.codeHighlight&&ce.codeHighlight[le]}function Q(ce,le){return n.$applyNodeReplacement(new Z(ce,le))}function de(ce){return ce instanceof Z}function pe(ce){let le=ce,ye=ce;for(;de(ye)||n.$isTabNode(ye);)le=ye,ye=ye.getPreviousSibling();return le}function te(ce){let le=ce,ye=ce;for(;de(ye)||n.$isTabNode(ye);)le=ye,ye=ye.getNextSibling();return le}const he={defaultLanguage:A,tokenize(ce,le){return e.tokenize(ce,e.languages[le||""]||e.languages[this.defaultLanguage])}};function Y(ce,le){let ye=null,Me=null,Pe=ce,We=le,Xe=ce.getTextContent();for(;;){if(We===0){if(Pe=Pe.getPreviousSibling(),Pe===null)break;if(!(de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(Pe)){ye={node:Pe,offset:1};break}We=Math.max(0,Pe.getTextContentSize()-1),Xe=Pe.getTextContent()}else We--;const dt=Xe[We];de(Pe)&&dt!==" "&&(Me={node:Pe,offset:We})}if(Me!==null)return Me;let st=null;if(le<ce.getTextContentSize())de(ce)&&(st=ce.getTextContent()[le]);else{const dt=ce.getNextSibling();de(dt)&&(st=dt.getTextContent()[0])}if(st!==null&&st!==" ")return ye;{const dt=j(ce,le);return dt!==null?dt:ye}}function j(ce,le){let ye=ce,Me=le,Pe=ce.getTextContent(),We=ce.getTextContentSize();for(;;){if(!de(ye)||Me===We){if(ye=ye.getNextSibling(),ye===null||n.$isLineBreakNode(ye))return null;de(ye)&&(Me=0,Pe=ye.getTextContent(),We=ye.getTextContentSize())}if(de(ye)){if(Pe[Me]!==" ")return{node:ye,offset:Me};Me++}}}function ee(ce){const le=te(ce);if(n.$isLineBreakNode(le))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return le}function ne(ce,le,ye){const Me=ce.getParent();u(Me)?X(Me,le,ye):de(ce)&&ce.replace(n.$createTextNode(ce.__text))}function B(ce,le){const ye=le.getElementByKey(ce.getKey());if(ye===null)return;const Me=ce.getChildren(),Pe=Me.length;if(Pe===ye.__cachedChildrenLength)return;ye.__cachedChildrenLength=Pe;let We="1",Xe=1;for(let st=0;st<Pe;st++)n.$isLineBreakNode(Me[st])&&(We+=`
|
|
113
|
-
`+ ++Xe);ye.setAttribute("data-gutter",We)}const W=new Set;function X(ce,le,ye){const Me=ce.getKey();W.has(Me)||(W.add(Me),ce.getLanguage()===void 0&&ce.setLanguage(ye.defaultLanguage),le.update(()=>{w(Me,()=>{const Pe=n.$getNodeByKey(Me);if(!u(Pe)||!Pe.isAttached())return!1;const We=Pe.getTextContent(),Xe=ye.tokenize(We,Pe.getLanguage()||ye.defaultLanguage),st=F(Xe),dt=N(Pe.getChildren(),st),{from:Ct,to:Se,nodesForReplacement:me}=dt;return Ct!==Se||me.length?(ce.splice(Ct,Se-Ct,me),!0):!1})},{onUpdate:()=>{W.delete(Me)},skipTransforms:!0}))}function F(ce,le){const ye=[];for(const Me of ce)if(typeof Me=="string"){const Pe=Me.split(/(\n|\t)/),We=Pe.length;for(let Xe=0;Xe<We;Xe++){const st=Pe[Xe];st===`
|
|
114
|
-
`||st===`\r
|
|
115
|
-
`?ye.push(n.$createLineBreakNode()):st===" "?ye.push(n.$createTabNode()):st.length>0&&ye.push(Q(st,le))}}else{const{content:Pe}=Me;typeof Pe=="string"?ye.push(...F([Pe],Me.type)):Array.isArray(Pe)&&ye.push(...F(Pe,Me.type))}return ye}function w(ce,le){const ye=n.$getNodeByKey(ce);if(!u(ye)||!ye.isAttached())return;const Me=n.$getSelection();if(!n.$isRangeSelection(Me)){le();return}const Pe=Me.anchor,We=Pe.offset,Xe=Pe.type==="element"&&n.$isLineBreakNode(ye.getChildAtIndex(Pe.offset-1));let st=0;if(!Xe){const dt=Pe.getNode();st=We+dt.getPreviousSiblings().reduce((Ct,Se)=>Ct+Se.getTextContentSize(),0)}if(le()){if(Xe){Pe.getNode().select(We,We);return}ye.getChildren().some(dt=>{const Ct=n.$isTextNode(dt);if(Ct||n.$isLineBreakNode(dt)){const Se=dt.getTextContentSize();if(Ct&&Se>=st)return dt.select(st,st),!0;st-=Se}return!1})}}function N(ce,le){let ye=0;for(;ye<ce.length&&I(ce[ye],le[ye]);)ye++;const Me=ce.length,Pe=le.length,We=Math.min(Me,Pe)-ye;let Xe=0;for(;Xe<We;)if(Xe++,!I(ce[Me-Xe],le[Pe-Xe])){Xe--;break}const st=ye,dt=Me-Xe,Ct=le.slice(ye,Pe-Xe);return{from:st,nodesForReplacement:Ct,to:dt}}function I(ce,le){return de(ce)&&de(le)&&ce.__text===le.__text&&ce.__highlightType===le.__highlightType||n.$isTabNode(ce)&&n.$isTabNode(le)||n.$isLineBreakNode(ce)&&n.$isLineBreakNode(le)}function q(ce){if(!n.$isRangeSelection(ce))return!1;const le=ce.anchor.getNode(),ye=ce.focus.getNode();if(le.is(ye)&&u(le))return!0;const Me=le.getParent();return u(Me)&&Me.is(ye.getParent())}function ue(ce){const le=ce.getNodes(),ye=[[]];if(le.length===1&&u(le[0]))return ye;let Me=ye[0];for(let Pe=0;Pe<le.length;Pe++){const We=le[Pe];if(!(de(We)||n.$isTabNode(We)||n.$isLineBreakNode(We)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(We)?Pe!==0&&Me.length>0&&(Me=[],ye.push(Me)):Me.push(We)}return ye}function fe(ce){const le=n.$getSelection();if(!n.$isRangeSelection(le)||!q(le))return null;const ye=ce?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND,Me=ce?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND;if(ue(le).length>1)return ye;const Pe=le.getNodes()[0];if(!(u(Pe)||de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(u(Pe))return ye;const We=pe(Pe),Xe=te(Pe),st=le.anchor,dt=le.focus;let Ct,Se;return dt.isBefore(st)?(Ct=dt,Se=st):(Ct=st,Se=dt),We!==null&&Xe!==null&&Ct.key===We.getKey()&&Ct.offset===0&&Se.key===Xe.getKey()&&Se.offset===Xe.getTextContentSize()?ye:Me}function se(ce){const le=n.$getSelection();if(!n.$isRangeSelection(le)||!q(le))return!1;const ye=ue(le),Me=ye.length;if(ye.length>1){for(let Xe=0;Xe<Me;Xe++){const st=ye[Xe];if(st.length>0){let dt=st[0];Xe===0&&(dt=pe(dt)),dt!==null&&(ce===n.INDENT_CONTENT_COMMAND?dt.insertBefore(n.$createTabNode()):n.$isTabNode(dt)&&dt.remove())}}return!0}const Pe=le.getNodes()[0];if(!(u(Pe)||de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(u(Pe))return ce===n.INDENT_CONTENT_COMMAND&&le.insertNodes([n.$createTabNode()]),!0;const We=pe(Pe);if(We===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return ce===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(We)?We.insertAfter(n.$createTabNode()):We.insertBefore(n.$createTabNode()):n.$isTabNode(We)&&We.remove(),!0}function Ce(ce,le){const ye=n.$getSelection();if(!n.$isRangeSelection(ye))return!1;const{anchor:Me,focus:Pe}=ye,We=Me.offset,Xe=Pe.offset,st=Me.getNode(),dt=Pe.getNode(),Ct=ce===n.KEY_ARROW_UP_COMMAND;if(!q(ye)||!(de(st)||n.$isTabNode(st))||!(de(dt)||n.$isTabNode(dt)))return!1;if(!le.altKey){if(ye.isCollapsed()){const tt=st.getParentOrThrow();if(Ct&&We===0&&st.getPreviousSibling()===null){if(tt.getPreviousSibling()===null)return tt.selectPrevious(),le.preventDefault(),!0}else if(!Ct&&We===st.getTextContentSize()&&st.getNextSibling()===null&&tt.getNextSibling()===null)return tt.selectNext(),le.preventDefault(),!0}return!1}let Se,me;if(st.isBefore(dt)?(Se=pe(st),me=te(dt)):(Se=pe(dt),me=te(st)),Se==null||me==null)return!1;const _e=Se.getNodesBetween(me);for(let tt=0;tt<_e.length;tt++){const ut=_e[tt];if(!de(ut)&&!n.$isTabNode(ut)&&!n.$isLineBreakNode(ut))return!1}le.preventDefault(),le.stopPropagation();const De=Ct?Se.getPreviousSibling():me.getNextSibling();if(!n.$isLineBreakNode(De))return!0;const Fe=Ct?De.getPreviousSibling():De.getNextSibling();if(Fe==null)return!0;let ze=(de(Fe)||n.$isTabNode(Fe)||n.$isLineBreakNode(Fe)?Ct?pe(Fe):te(Fe):null)??Fe;return De.remove(),_e.forEach(tt=>tt.remove()),ce===n.KEY_ARROW_UP_COMMAND?(_e.forEach(tt=>ze.insertBefore(tt)),ze.insertBefore(De)):(ze.insertAfter(De),ze=De,_e.forEach(tt=>{ze.insertAfter(tt),ze=tt})),ye.setTextNodeRange(st,We,dt,Xe),!0}function Oe(ce,le){const ye=n.$getSelection();if(!n.$isRangeSelection(ye))return!1;const{anchor:Me,focus:Pe}=ye,We=Me.getNode(),Xe=Pe.getNode(),st=ce===n.MOVE_TO_START;if(!(de(We)||n.$isTabNode(We))||!(de(Xe)||n.$isTabNode(Xe)))return!1;if(st){const dt=Y(Xe,Pe.offset);if(dt!==null){const{node:Ct,offset:Se}=dt;n.$isLineBreakNode(Ct)?Ct.selectNext(0,0):ye.setTextNodeRange(Ct,Se,Ct,Se)}else Xe.getParentOrThrow().selectStart()}else ee(Xe).select();return le.preventDefault(),le.stopPropagation(),!0}function Be(ce,le){if(!ce.hasNodes([a,Z]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return le==null&&(le=he),t.mergeRegister(ce.registerMutationListener(a,ye=>{ce.update(()=>{for(const[Me,Pe]of ye)if(Pe!=="destroyed"){const We=n.$getNodeByKey(Me);We!==null&&B(We,ce)}})}),ce.registerNodeTransform(a,ye=>X(ye,ce,le)),ce.registerNodeTransform(n.TextNode,ye=>ne(ye,ce,le)),ce.registerNodeTransform(Z,ye=>ne(ye,ce,le)),ce.registerCommand(n.KEY_TAB_COMMAND,ye=>{const Me=fe(ye.shiftKey);return Me===null?!1:(ye.preventDefault(),ce.dispatchCommand(Me,void 0),!0)},n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.INSERT_TAB_COMMAND,()=>{const ye=n.$getSelection();return q(ye)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.INDENT_CONTENT_COMMAND,ye=>se(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.OUTDENT_CONTENT_COMMAND,ye=>se(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.KEY_ARROW_UP_COMMAND,ye=>Ce(n.KEY_ARROW_UP_COMMAND,ye),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.KEY_ARROW_DOWN_COMMAND,ye=>Ce(n.KEY_ARROW_DOWN_COMMAND,ye),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.MOVE_TO_END,ye=>Oe(n.MOVE_TO_END,ye),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.MOVE_TO_START,ye=>Oe(n.MOVE_TO_START,ye),n.COMMAND_PRIORITY_LOW))}return Vn.$createCodeHighlightNode=Q,Vn.$createCodeNode=l,Vn.$isCodeHighlightNode=de,Vn.$isCodeNode=u,Vn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=D,Vn.CODE_LANGUAGE_MAP=P,Vn.CodeHighlightNode=Z,Vn.CodeNode=a,Vn.DEFAULT_CODE_LANGUAGE=A,Vn.PrismTokenizer=he,Vn.getCodeLanguages=oe,Vn.getDefaultCodeLanguage=J,Vn.getEndOfCodeInLine=ee,Vn.getFirstCodeNodeOfLine=pe,Vn.getLanguageFriendlyName=V,Vn.getLastCodeNodeOfLine=te,Vn.getStartOfCodeInLine=Y,Vn.normalizeCodeLang=M,Vn.registerCodeHighlighting=Be,Vn}var Yn={},A0;function OA(){if(A0)return Yn;A0=1;var e=sE();lE(),cE(),uE(),dE(),fE(),hE(),pE(),gE(),mE(),vE(),yE(),bE(),_E(),xE();var t=vn(),n=Xt();let r=F=>F!=null&&e.languages.hasOwnProperty(F)?F:void 0;function o(F,w){for(let N of F.childNodes){if(t.isHTMLElement(N)&&N.tagName===w)return!0;o(N,w)}return!1}class i extends n.ElementNode{static getType(){return"code"}static clone(w){return new i(w.__language,w.__key)}constructor(w,N){super(N),this.__language=r(w)}createDOM(w){let N=document.createElement("code");return t.addClassNamesToElement(N,w.theme.code),N.setAttribute("spellcheck","false"),(w=this.getLanguage())&&N.setAttribute("data-highlight-language",w),N}updateDOM(w,N){let I=this.__language;return w=w.__language,I?I!==w&&N.setAttribute("data-highlight-language",I):w&&N.removeAttribute("data-highlight-language"),!1}exportDOM(){let w=document.createElement("pre");w.setAttribute("spellcheck","false");let N=this.getLanguage();return N&&w.setAttribute("data-highlight-language",N),{element:w}}static importDOM(){return{code:w=>w.textContent!=null&&(/\r?\n/.test(w.textContent)||o(w,"BR"))?{conversion:u,priority:1}:null,div:()=>({conversion:p,priority:1}),pre:()=>({conversion:u,priority:0}),table:w=>v(w)?{conversion:m,priority:3}:null,td:w=>{let N=w.closest("table");return w.classList.contains("js-file-line")?{conversion:C,priority:3}:N&&v(N)?{conversion:_,priority:3}:null},tr:w=>(w=w.closest("table"))&&v(w)?{conversion:_,priority:3}:null}}static importJSON(w){let N=a(w.language);return N.setFormat(w.format),N.setIndent(w.indent),N.setDirection(w.direction),N}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(w,N=!0){var I=this.getChildren(),q=I.length;if(2<=q&&I[q-1].getTextContent()===`
|
|
116
|
-
`&&I[q-2].getTextContent()===`
|
|
117
|
-
`&&w.isCollapsed()&&w.anchor.key===this.__key&&w.anchor.offset===q)return I[q-1].remove(),I[q-2].remove(),w=n.$createParagraphNode(),this.insertAfter(w,N),w;let{anchor:ue,focus:fe}=w;if(N=(ue.isBefore(fe)?ue:fe).getNode(),n.$isTextNode(N)){for(q=V(N),I=[];;)if(n.$isTabNode(q))I.push(n.$createTabNode()),q=q.getNextSibling();else if(M(q)){for(var se=0,Ce=q.getTextContent(),Oe=q.getTextContentSize();se<Oe&&Ce[se]===" ";se++);if(se!==0&&I.push(P(" ".repeat(se))),se!==Oe)break;q=q.getNextSibling()}else break;q=N.splitText(ue.offset)[0],se=ue.offset===0?0:1,se=q.getIndexWithinParent()+se,Ce=N.getParentOrThrow(),Oe=[n.$createLineBreakNode(),...I],Ce.splice(se,0,Oe),(I=I[I.length-1])?I.select():ue.offset===0?q.selectPrevious():q.getNextSibling().selectNext(0,0)}return l(N)&&({offset:w}=w.anchor,N.splice(w,0,[n.$createLineBreakNode()]),N.select(w+1,w+1)),null}canIndent(){return!1}collapseAtStart(){let w=n.$createParagraphNode();return this.getChildren().forEach(N=>w.append(N)),this.replace(w),!0}setLanguage(w){this.getWritable().__language=r(w)}getLanguage(){return this.getLatest().__language}}function a(F){return n.$applyNodeReplacement(new i(F))}function l(F){return F instanceof i}function u(F){let w;return t.isHTMLElement(F)&&(w=F.getAttribute("data-highlight-language")),{node:a(w)}}function p(F){let w=F.style.fontFamily.match("monospace")!==null;return w||b(F)?{after:N=>{let I=F.parentNode;return I!=null&&F!==I.lastChild&&N.push(n.$createLineBreakNode()),N},node:w?a():null}:{node:null}}function m(){return{node:a()}}function _(){return{node:null}}function C(F){return{after:w=>(F.parentNode&&F.parentNode.nextSibling&&w.push(n.$createLineBreakNode()),w),node:null}}function b(F){for(F=F.parentElement;F!==null;){if(F.style.fontFamily.match("monospace")!==null)return!0;F=F.parentElement}return!1}function v(F){return F.classList.contains("js-file-line-container")}let y={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},T={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function O(F){return T[F]||F}class A extends n.TextNode{constructor(w,N,I){super(w,I),this.__highlightType=N}static getType(){return"code-highlight"}static clone(w){return new A(w.__text,w.__highlightType||void 0,w.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(w){let N=super.createDOM(w);return w=D(w.theme,this.__highlightType),t.addClassNamesToElement(N,w),N}updateDOM(w,N,I){let q=super.updateDOM(w,N,I);return w=D(I.theme,w.__highlightType),I=D(I.theme,this.__highlightType),w!==I&&(w&&t.removeClassNamesFromElement(N,w),I&&t.addClassNamesToElement(N,I)),q}static importJSON(w){let N=P(w.text,w.highlightType);return N.setFormat(w.format),N.setDetail(w.detail),N.setMode(w.mode),N.setStyle(w.style),N}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return a()}}function D(F,w){return w&&F&&F.codeHighlight&&F.codeHighlight[w]}function P(F,w){return n.$applyNodeReplacement(new A(F,w))}function M(F){return F instanceof A}function V(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getPreviousSibling();return w}function J(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getNextSibling();return w}let oe={defaultLanguage:"javascript",tokenize(F,w){return e.tokenize(F,e.languages[w||""]||e.languages[this.defaultLanguage])}};function Z(F,w){let N=null;var I=null,q=F;let ue=w,fe=F.getTextContent();for(;;){if(ue===0){if(q=q.getPreviousSibling(),q===null)break;if(!(M(q)||n.$isTabNode(q)||n.$isLineBreakNode(q)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(q)){N={node:q,offset:1};break}ue=Math.max(0,q.getTextContentSize()-1),fe=q.getTextContent()}else ue--;let se=fe[ue];M(q)&&se!==" "&&(I={node:q,offset:ue})}if(I!==null)return I;if(I=null,w<F.getTextContentSize()?M(F)&&(I=F.getTextContent()[w]):(q=F.getNextSibling(),M(q)&&(I=q.getTextContent()[0])),I!==null&&I!==" ")return N;e:for(I=F,q=F.getTextContent(),F=F.getTextContentSize();;){if(!M(I)||w===F){if(I=I.getNextSibling(),I===null||n.$isLineBreakNode(I)){F=null;break e}M(I)&&(w=0,q=I.getTextContent(),F=I.getTextContentSize())}if(M(I)){if(q[w]!==" "){F={node:I,offset:w};break e}w++}}return F!==null?F:N}function U(F){if(F=J(F),n.$isLineBreakNode(F))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return F}function Q(F,w,N){let I=F.getParent();l(I)?pe(I,w,N):M(F)&&F.replace(n.$createTextNode(F.__text))}let de=new Set;function pe(F,w,N){let I=F.getKey();de.has(I)||(de.add(I),F.getLanguage()===void 0&&F.setLanguage(N.defaultLanguage),w.update(()=>{he(I,()=>{var q=n.$getNodeByKey(I);if(!l(q)||!q.isAttached())return!1;var ue=q.getTextContent();ue=N.tokenize(ue,q.getLanguage()||N.defaultLanguage),ue=te(ue);var fe=q.getChildren();for(q=0;q<fe.length&&Y(fe[q],ue[q]);)q++;var se=fe.length;let Ce=ue.length,Oe=Math.min(se,Ce)-q,Be=0;for(;Be<Oe;)if(Be++,!Y(fe[se-Be],ue[Ce-Be])){Be--;break}fe=q,se-=Be,ue=ue.slice(q,Ce-Be);let{from:ce,to:le,nodesForReplacement:ye}={from:fe,nodesForReplacement:ue,to:se};return ce!==le||ye.length?(F.splice(ce,le-ce,ye),!0):!1})},{onUpdate:()=>{de.delete(I)},skipTransforms:!0}))}function te(F,w){let N=[];for(let I of F)if(typeof I=="string"){F=I.split(/(\n|\t)/);let q=F.length;for(let ue=0;ue<q;ue++){let fe=F[ue];fe===`
|
|
118
|
-
`||fe===`\r
|
|
119
|
-
`?N.push(n.$createLineBreakNode()):fe===" "?N.push(n.$createTabNode()):0<fe.length&&N.push(P(fe,w))}}else({content:F}=I),typeof F=="string"?N.push(...te([F],I.type)):Array.isArray(F)&&N.push(...te(F,I.type));return N}function he(F,w){if(F=n.$getNodeByKey(F),l(F)&&F.isAttached()){var N=n.$getSelection();if(n.$isRangeSelection(N)){N=N.anchor;var I=N.offset,q=N.type==="element"&&n.$isLineBreakNode(F.getChildAtIndex(N.offset-1)),ue=0;if(!q){let fe=N.getNode();ue=I+fe.getPreviousSiblings().reduce((se,Ce)=>se+Ce.getTextContentSize(),0)}w()&&(q?N.getNode().select(I,I):F.getChildren().some(fe=>{let se=n.$isTextNode(fe);if(se||n.$isLineBreakNode(fe)){let Ce=fe.getTextContentSize();if(se&&Ce>=ue)return fe.select(ue,ue),!0;ue-=Ce}return!1}))}else w()}}function Y(F,w){return M(F)&&M(w)&&F.__text===w.__text&&F.__highlightType===w.__highlightType||n.$isTabNode(F)&&n.$isTabNode(w)||n.$isLineBreakNode(F)&&n.$isLineBreakNode(w)}function j(F){if(!n.$isRangeSelection(F))return!1;var w=F.anchor.getNode();return F=F.focus.getNode(),w.is(F)&&l(w)?!0:(w=w.getParent(),l(w)&&w.is(F.getParent()))}function ee(F){F=F.getNodes();let w=[[]];if(F.length===1&&l(F[0]))return w;let N=w[0];for(let I=0;I<F.length;I++){let q=F[I];if(!(M(q)||n.$isTabNode(q)||n.$isLineBreakNode(q)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(q)?I!==0&&0<N.length&&(N=[],w.push(N)):N.push(q)}return w}function ne(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!j(w))return null;let N=F?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND;if(F=F?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,1<ee(w).length)return N;var I=w.getNodes()[0];if(!(l(I)||M(I)||n.$isTabNode(I)||n.$isLineBreakNode(I)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(l(I))return N;let q=V(I);I=J(I);var ue=w.anchor;let fe=w.focus;return fe.isBefore(ue)?w=fe:(w=ue,ue=fe),q!==null&&I!==null&&w.key===q.getKey()&&w.offset===0&&ue.key===I.getKey()&&ue.offset===I.getTextContentSize()?N:F}function B(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!j(w))return!1;var N=ee(w);let I=N.length;if(1<N.length){for(w=0;w<I;w++){var q=N[w];0<q.length&&(q=q[0],w===0&&(q=V(q)),q!==null&&(F===n.INDENT_CONTENT_COMMAND?q.insertBefore(n.$createTabNode()):n.$isTabNode(q)&&q.remove()))}return!0}if(N=w.getNodes()[0],!(l(N)||M(N)||n.$isTabNode(N)||n.$isLineBreakNode(N)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(l(N))return F===n.INDENT_CONTENT_COMMAND&&w.insertNodes([n.$createTabNode()]),!0;if(N=V(N),N===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return F===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(N)?N.insertAfter(n.$createTabNode()):N.insertBefore(n.$createTabNode()):n.$isTabNode(N)&&N.remove(),!0}function W(F,w){let N=n.$getSelection();if(!n.$isRangeSelection(N))return!1;let{anchor:I,focus:q}=N,ue=I.offset,fe=q.offset,se=I.getNode(),Ce=q.getNode();var Oe=F===n.KEY_ARROW_UP_COMMAND;if(!j(N)||!M(se)&&!n.$isTabNode(se)||!M(Ce)&&!n.$isTabNode(Ce))return!1;if(!w.altKey){if(N.isCollapsed()){if(F=se.getParentOrThrow(),Oe&&ue===0&&se.getPreviousSibling()===null){if(F.getPreviousSibling()===null)return F.selectPrevious(),w.preventDefault(),!0}else if(!Oe&&ue===se.getTextContentSize()&&se.getNextSibling()===null&&F.getNextSibling()===null)return F.selectNext(),w.preventDefault(),!0}return!1}let Be;if(se.isBefore(Ce)){var ce=V(se);Be=J(Ce)}else ce=V(Ce),Be=J(se);if(ce==null||Be==null)return!1;let le=ce.getNodesBetween(Be);for(let Me=0;Me<le.length;Me++){let Pe=le[Me];if(!M(Pe)&&!n.$isTabNode(Pe)&&!n.$isLineBreakNode(Pe))return!1}if(w.preventDefault(),w.stopPropagation(),w=Oe?ce.getPreviousSibling():Be.getNextSibling(),!n.$isLineBreakNode(w)||(ce=Oe?w.getPreviousSibling():w.getNextSibling(),ce==null))return!0;Oe=M(ce)||n.$isTabNode(ce)||n.$isLineBreakNode(ce)?Oe?V(ce):J(ce):null;let ye=Oe??ce;return w.remove(),le.forEach(Me=>Me.remove()),F===n.KEY_ARROW_UP_COMMAND?(le.forEach(Me=>ye.insertBefore(Me)),ye.insertBefore(w)):(ye.insertAfter(w),ye=w,le.forEach(Me=>{ye.insertAfter(Me),ye=Me})),N.setTextNodeRange(se,ue,Ce,fe),!0}function X(F,w){let N=n.$getSelection();if(!n.$isRangeSelection(N))return!1;let{anchor:I,focus:q}=N;var ue=I.getNode();let fe=q.getNode();if(F=F===n.MOVE_TO_START,!M(ue)&&!n.$isTabNode(ue)||!M(fe)&&!n.$isTabNode(fe))return!1;if(F)if(ue=Z(fe,q.offset),ue!==null){let{node:se,offset:Ce}=ue;n.$isLineBreakNode(se)?se.selectNext(0,0):N.setTextNodeRange(se,Ce,se,Ce)}else fe.getParentOrThrow().selectStart();else U(fe).select();return w.preventDefault(),w.stopPropagation(),!0}return Yn.$createCodeHighlightNode=P,Yn.$createCodeNode=a,Yn.$isCodeHighlightNode=M,Yn.$isCodeNode=l,Yn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=y,Yn.CODE_LANGUAGE_MAP=T,Yn.CodeHighlightNode=A,Yn.CodeNode=i,Yn.DEFAULT_CODE_LANGUAGE="javascript",Yn.PrismTokenizer=oe,Yn.getCodeLanguages=()=>Object.keys(e.languages).filter(F=>typeof e.languages[F]!="function").sort(),Yn.getDefaultCodeLanguage=()=>"javascript",Yn.getEndOfCodeInLine=U,Yn.getFirstCodeNodeOfLine=V,Yn.getLanguageFriendlyName=function(F){return F=O(F),y[F]||F},Yn.getLastCodeNodeOfLine=J,Yn.getStartOfCodeInLine=Z,Yn.normalizeCodeLang=O,Yn.registerCodeHighlighting=function(F,w){if(!F.hasNodes([i,A]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return w==null&&(w=oe),t.mergeRegister(F.registerMutationListener(i,N=>{F.update(()=>{for(let[ue,fe]of N)if(fe!=="destroyed"){var I=n.$getNodeByKey(ue);if(I!==null)e:{var q=I;if(I=F.getElementByKey(q.getKey()),I===null)break e;q=q.getChildren();let se=q.length;if(se===I.__cachedChildrenLength)break e;I.__cachedChildrenLength=se;let Ce="1",Oe=1;for(let Be=0;Be<se;Be++)n.$isLineBreakNode(q[Be])&&(Ce+=`
|
|
120
|
-
`+ ++Oe);I.setAttribute("data-gutter",Ce)}}})}),F.registerNodeTransform(i,N=>pe(N,F,w)),F.registerNodeTransform(n.TextNode,N=>Q(N,F,w)),F.registerNodeTransform(A,N=>Q(N,F,w)),F.registerCommand(n.KEY_TAB_COMMAND,N=>{let I=ne(N.shiftKey);return I===null?!1:(N.preventDefault(),F.dispatchCommand(I,void 0),!0)},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INSERT_TAB_COMMAND,()=>{let N=n.$getSelection();return j(N)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INDENT_CONTENT_COMMAND,()=>B(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.OUTDENT_CONTENT_COMMAND,()=>B(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_UP_COMMAND,N=>W(n.KEY_ARROW_UP_COMMAND,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_DOWN_COMMAND,N=>W(n.KEY_ARROW_DOWN_COMMAND,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_END,N=>X(n.MOVE_TO_END,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_START,N=>X(n.MOVE_TO_START,N),n.COMMAND_PRIORITY_LOW))},Yn}process.env.NODE_ENV==="development"?SA():OA();ur();vn();var Ig=Xt();function AA({src:e,altText:t,width:n,height:r,maxWidth:o}){const i=H.useMemo(()=>({height:r,width:n,maxWidth:o}),[r,n,o]);return an.jsx("img",{src:e,alt:t,style:i})}function RA({altText:e,height:t,maxWidth:n=500,src:r,width:o,key:i}){return Ig.$applyNodeReplacement(new Lg(r,e,n,o,t,i))}class Lg extends Ig.DecoratorNode{constructor(t,n,r,o,i,a){super(a),oo(this,"__src"),oo(this,"__altText"),oo(this,"__width"),oo(this,"__height"),oo(this,"__maxWidth"),this.__src=t,this.__altText=n,this.__maxWidth=r,this.__width=o||"inherit",this.__height=i||"inherit"}static getType(){return"image"}static clone(t){return new Lg(t.__src,t.__altText,t.__maxWidth,t.__width,t.__height,t.__key)}getSrc(){return this.getLatest().__src}getAltText(){return this.getLatest().__altText}exportJSON(){return{altText:this.getAltText(),height:this.__height==="inherit"?0:this.__height,maxWidth:this.__maxWidth,src:this.getSrc(),type:"image",version:1,width:this.__width==="inherit"?0:this.__width}}static importJSON(t){return RA(t)}createDOM(t){const n=document.createElement("span"),r=t.theme.image;return r&&(n.className=r),n}updateDOM(){return!1}decorate(){return an.jsx(AA,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth})}}Ig.createCommand("INSERT_IMAGE_COMMAND");kg();Pg();Mg();Dg();var iu={},R0;function $A(){if(R0)return iu;R0=1;var e=vn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(a){return new n(a.__text,a.__key)}constructor(a,l){super(a,l)}createDOM(a){const l=super.createDOM(a);return e.addClassNamesToElement(l,a.theme.hashtag),l}static importJSON(a){const l=r(a.text);return l.setFormat(a.format),l.setDetail(a.detail),l.setMode(a.mode),l.setStyle(a.style),l}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(i=""){return t.$applyNodeReplacement(new n(i))}function o(i){return i instanceof n}return iu.$createHashtagNode=r,iu.$isHashtagNode=o,iu.HashtagNode=n,iu}var au={},$0;function DA(){if($0)return au;$0=1;var e=vn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(i){return new n(i.__text,i.__key)}constructor(i,a){super(i,a)}createDOM(i){let a=super.createDOM(i);return e.addClassNamesToElement(a,i.theme.hashtag),a}static importJSON(i){let a=r(i.text);return a.setFormat(i.format),a.setDetail(i.detail),a.setMode(i.mode),a.setStyle(i.style),a}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(o=""){return t.$applyNodeReplacement(new n(o))}return au.$createHashtagNode=r,au.$isHashtagNode=function(o){return o instanceof n},au.HashtagNode=n,au}process.env.NODE_ENV==="development"?$A():DA();var dl={},qh={},D0;function kA(){if(D0)return qh;D0=1;var e=ur(),t=Xt(),n=H;function r(i,a){return i.getEditorState().read(()=>{const l=t.$getNodeByKey(a);return l===null?!1:l.isSelected()})}function o(i){const[a]=e.useLexicalComposerContext(),[l,u]=n.useState(()=>r(a,i));n.useEffect(()=>{let _=!0;const C=a.registerUpdateListener(()=>{_&&u(r(a,i))});return()=>{_=!1,C()}},[a,i]);const p=n.useCallback(_=>{a.update(()=>{let C=t.$getSelection();t.$isNodeSelection(C)||(C=t.$createNodeSelection(),t.$setSelection(C)),t.$isNodeSelection(C)&&(_?C.add(i):C.delete(i))})},[a,i]),m=n.useCallback(()=>{a.update(()=>{const _=t.$getSelection();t.$isNodeSelection(_)&&_.clear()})},[a]);return[l,p,m]}return qh.useLexicalNodeSelection=o,qh}var Zh={},k0;function MA(){if(k0)return Zh;k0=1;var e=ur(),t=Xt(),n=H;function r(o,i){return o.getEditorState().read(()=>{let a=t.$getNodeByKey(i);return a===null?!1:a.isSelected()})}return Zh.useLexicalNodeSelection=function(o){let[i]=e.useLexicalComposerContext(),[a,l]=n.useState(()=>r(i,o));n.useEffect(()=>{let m=!0,_=i.registerUpdateListener(()=>{m&&l(r(i,o))});return()=>{m=!1,_()}},[i,o]);let u=n.useCallback(m=>{i.update(()=>{let _=t.$getSelection();t.$isNodeSelection(_)||(_=t.$createNodeSelection(),t.$setSelection(_)),t.$isNodeSelection(_)&&(m?_.add(o):_.delete(o))})},[i,o]),p=n.useCallback(()=>{i.update(()=>{const m=t.$getSelection();t.$isNodeSelection(m)&&m.clear()})},[i]);return[a,u,p]},Zh}var M0,P0;function EE(){return P0||(P0=1,M0=process.env.NODE_ENV==="development"?kA():MA()),M0}var I0;function PA(){if(I0)return dl;I0=1;var e=ur(),t=EE(),n=vn(),r=Xt(),o=H;const i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:_}){const[C]=e.useLexicalComposerContext(),[b,v,y]=t.useLexicalNodeSelection(_),T=o.useCallback(O=>{if(b&&r.$isNodeSelection(r.$getSelection())){O.preventDefault();const A=r.$getNodeByKey(_);m(A)&&A.remove()}return!1},[b,_]);return o.useEffect(()=>n.mergeRegister(C.registerCommand(r.CLICK_COMMAND,O=>{const A=C.getElementByKey(_);return O.target===A?(O.shiftKey||y(),v(!b),!0):!1},r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_DELETE_COMMAND,T,r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_BACKSPACE_COMMAND,T,r.COMMAND_PRIORITY_LOW)),[y,C,b,_,T,v]),o.useEffect(()=>{const O=C.getElementByKey(_);O!==null&&(O.className=b?"selected":"")},[C,b,_]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new l(C.__key)}static importJSON(C){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
|
|
121
|
-
`}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function m(_){return _ instanceof l}return dl.$createHorizontalRuleNode=p,dl.$isHorizontalRuleNode=m,dl.HorizontalRuleNode=l,dl.INSERT_HORIZONTAL_RULE_COMMAND=i,dl}var fl={},L0;function IA(){if(L0)return fl;L0=1;var e=ur(),t=EE(),n=vn(),r=Xt(),o=H;let i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:_}){let[C]=e.useLexicalComposerContext(),[b,v,y]=t.useLexicalNodeSelection(_),T=o.useCallback(O=>(b&&r.$isNodeSelection(r.$getSelection())&&(O.preventDefault(),O=r.$getNodeByKey(_),m(O)&&O.remove()),!1),[b,_]);return o.useEffect(()=>n.mergeRegister(C.registerCommand(r.CLICK_COMMAND,O=>{let A=C.getElementByKey(_);return O.target===A?(O.shiftKey||y(),v(!b),!0):!1},r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_DELETE_COMMAND,T,r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_BACKSPACE_COMMAND,T,r.COMMAND_PRIORITY_LOW)),[y,C,b,_,T,v]),o.useEffect(()=>{let O=C.getElementByKey(_);O!==null&&(O.className=b?"selected":"")},[C,b,_]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new l(C.__key)}static importJSON(){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
|
|
122
|
-
`}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function m(_){return _ instanceof l}return fl.$createHorizontalRuleNode=p,fl.$isHorizontalRuleNode=m,fl.HorizontalRuleNode=l,fl.INSERT_HORIZONTAL_RULE_COMMAND=i,fl}process.env.NODE_ENV==="development"?PA():IA();var F0=Object.prototype.hasOwnProperty;function j0(e,t,n){for(n of e.keys())if(xu(n,t))return n}function xu(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&xu(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=j0(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=j0(t,o),!o)||!xu(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(F0.call(e,n)&&++r&&!F0.call(t,n)||!(n in t)||!xu(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}let jp,CE,wE,TE,NE=!0;typeof process<"u"&&({FORCE_COLOR:jp,NODE_DISABLE_COLORS:CE,NO_COLOR:wE,TERM:TE}=process.env||{},NE=process.stdout&&process.stdout.isTTY);const Qt={enabled:!CE&&wE==null&&TE!=="dumb"&&(jp!=null&&jp!=="0"||NE),reset:xn(0,0),bold:xn(1,22),dim:xn(2,22),italic:xn(3,23),underline:xn(4,24),inverse:xn(7,27),hidden:xn(8,28),strikethrough:xn(9,29),black:xn(30,39),red:xn(31,39),green:xn(32,39),yellow:xn(33,39),blue:xn(34,39),magenta:xn(35,39),cyan:xn(36,39),white:xn(37,39),gray:xn(90,39),grey:xn(90,39),bgBlack:xn(40,49),bgRed:xn(41,49),bgGreen:xn(42,49),bgYellow:xn(43,49),bgBlue:xn(44,49),bgMagenta:xn(45,49),bgCyan:xn(46,49),bgWhite:xn(47,49)};function B0(e,t){let n=0,r,o="",i="";for(;n<e.length;n++)r=e[n],o+=r.open,i+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return o+t+i}function LA(e,t){let n={has:e,keys:t};return n.reset=Qt.reset.bind(n),n.bold=Qt.bold.bind(n),n.dim=Qt.dim.bind(n),n.italic=Qt.italic.bind(n),n.underline=Qt.underline.bind(n),n.inverse=Qt.inverse.bind(n),n.hidden=Qt.hidden.bind(n),n.strikethrough=Qt.strikethrough.bind(n),n.black=Qt.black.bind(n),n.red=Qt.red.bind(n),n.green=Qt.green.bind(n),n.yellow=Qt.yellow.bind(n),n.blue=Qt.blue.bind(n),n.magenta=Qt.magenta.bind(n),n.cyan=Qt.cyan.bind(n),n.white=Qt.white.bind(n),n.gray=Qt.gray.bind(n),n.grey=Qt.grey.bind(n),n.bgBlack=Qt.bgBlack.bind(n),n.bgRed=Qt.bgRed.bind(n),n.bgGreen=Qt.bgGreen.bind(n),n.bgYellow=Qt.bgYellow.bind(n),n.bgBlue=Qt.bgBlue.bind(n),n.bgMagenta=Qt.bgMagenta.bind(n),n.bgCyan=Qt.bgCyan.bind(n),n.bgWhite=Qt.bgWhite.bind(n),n}function xn(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:Qt.enabled?B0(this.keys,r+""):r+""):r===void 0?LA([e],[n]):Qt.enabled?B0([n],r+""):r+""}}function Wa(){}Wa.prototype={diff:function(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function a(D){return o?(setTimeout(function(){o(void 0,D)},0),!0):D}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var l=t.length,u=e.length,p=1,m=l+u;r.maxEditLength&&(m=Math.min(m,r.maxEditLength));var _=(n=r.timeout)!==null&&n!==void 0?n:1/0,C=Date.now()+_,b=[{oldPos:-1,lastComponent:void 0}],v=this.extractCommon(b[0],t,e,0);if(b[0].oldPos+1>=u&&v+1>=l)return a([{value:this.join(t),count:t.length}]);var y=-1/0,T=1/0;function O(){for(var D=Math.max(y,-p);D<=Math.min(T,p);D+=2){var P=void 0,M=b[D-1],V=b[D+1];M&&(b[D-1]=void 0);var J=!1;if(V){var oe=V.oldPos-D;J=V&&0<=oe&&oe<l}var Z=M&&M.oldPos+1<u;if(!J&&!Z){b[D]=void 0;continue}if(!Z||J&&M.oldPos+1<V.oldPos?P=i.addToPath(V,!0,void 0,0):P=i.addToPath(M,void 0,!0,1),v=i.extractCommon(P,t,e,D),P.oldPos+1>=u&&v+1>=l)return a(FA(i,P.lastComponent,t,e,i.useLongestToken));b[D]=P,P.oldPos+1>=u&&(T=Math.min(T,D-1)),v+1>=l&&(y=Math.max(y,D+1))}p++}if(o)(function D(){setTimeout(function(){if(p>m||Date.now()>C)return o();O()||D()},0)})();else for(;p<=m&&Date.now()<=C;){var A=O();if(A)return A}},addToPath:function(e,t,n,r){var o=e.lastComponent;return o&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,a=e.oldPos,l=a-r,u=0;l+1<o&&a+1<i&&this.equals(t[l+1],n[a+1]);)l++,a++,u++;return u&&(e.lastComponent={count:u,previousComponent:e.lastComponent}),e.oldPos=a,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function FA(e,t,n,r,o){for(var i=[],a;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();for(var l=0,u=i.length,p=0,m=0;l<u;l++){var _=i[l];if(_.removed){if(_.value=e.join(r.slice(m,m+_.count)),m+=_.count,l&&i[l-1].added){var C=i[l-1];i[l-1]=i[l],i[l]=C}}else{if(!_.added&&o){var b=n.slice(p,p+_.count);b=b.map(function(y,T){var O=r[m+T];return O.length>y.length?O:y}),_.value=e.join(b)}else _.value=e.join(n.slice(p,p+_.count));p+=_.count,_.added||(m+=_.count)}}var v=i[u-1];return u>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(i[u-2].value+=v.value,i.pop()),i}var W0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,z0=/\S/,SE=new Wa;SE.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!z0.test(e)&&!z0.test(t)};SE.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&W0.test(t[n])&&W0.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var OE=new Wa;OE.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
123
|
-
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var jA=new Wa;jA.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var BA=new Wa;BA.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Zd(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zd=function(t){return typeof t}:Zd=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zd(e)}var WA=Object.prototype.toString,Nu=new Wa;Nu.useLongestToken=!0;Nu.tokenize=OE.tokenize;Nu.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,a){return typeof a>"u"?n:a}:r;return typeof e=="string"?e:JSON.stringify(Bp(e,null,null,o),o," ")};Nu.equals=function(e,t){return Wa.prototype.equals.call(Nu,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Bp(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var a;if(WA.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),i=0;i<e.length;i+=1)a[i]=Bp(e[i],t,n,r,o);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),Zd(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var l=[],u;for(u in e)e.hasOwnProperty(u)&&l.push(u);for(l.sort(),i=0;i<l.length;i+=1)u=l[i],a[u]=Bp(e[u],t,n,r,u);t.pop(),n.pop()}else a=e;return a}var Wp=new Wa;Wp.tokenize=function(e){return e.slice()};Wp.join=Wp.removeEmpty=function(e){return e};Qt.red,Qt.grey,Qt.green;Qt.dim().italic;Qt.dim("→");Qt.dim("·");Qt.dim("↵");function of(e){e=e.replace(/\r?\n/g,`
|
|
124
|
-
`);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,o=(t||[]).length;for(;n<o;n++)r=Math.min(r,t[n].length);return o&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class zA extends Error{constructor(t={}){super(t.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=t.details||!1,this.generated=!!t.generated,this.operator=t.operator,this.expects=t.expects,this.actual=t.actual}}function Ho(e,t,n,r,o,i,a){if(e)return;let l=a||i;if(a instanceof Error)throw a;let u=o;throw new zA({actual:t,expects:n,operator:r,message:l,details:u,generated:!a})}function Yi(e,t){Ho(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}Yi.ok=Yi;Yi.equal=function(e,t,n){Ho(!xu(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};Yi.type=function(e,t,n){let r=typeof e;Ho(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};Yi.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Ho(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};Yi.snapshot=function(e,t,n){e=of(e),t=of(t),Ho(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};Yi.fixture=function(e,t,n){e=of(e),t=of(t),Ho(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};Yi.match=function(e,t,n){typeof t=="string"?Ho(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Ho(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};Yi.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Ho(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Ho(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Ho(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};class Ts extends Error{}class HA extends Ts{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class GA extends Ts{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class KA extends Ts{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Il extends Ts{}class AE extends Ts{constructor(t){super(`Invalid unit ${t}`)}}class Hr extends Ts{}class Ta extends Ts{constructor(){super("Zone is an abstract class")}}const gt="numeric",Go="short",io="long",af={year:gt,month:gt,day:gt},RE={year:gt,month:Go,day:gt},UA={year:gt,month:Go,day:gt,weekday:Go},$E={year:gt,month:io,day:gt},DE={year:gt,month:io,day:gt,weekday:io},kE={hour:gt,minute:gt},ME={hour:gt,minute:gt,second:gt},PE={hour:gt,minute:gt,second:gt,timeZoneName:Go},IE={hour:gt,minute:gt,second:gt,timeZoneName:io},LE={hour:gt,minute:gt,hourCycle:"h23"},FE={hour:gt,minute:gt,second:gt,hourCycle:"h23"},jE={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:Go},BE={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:io},WE={year:gt,month:gt,day:gt,hour:gt,minute:gt},zE={year:gt,month:gt,day:gt,hour:gt,minute:gt,second:gt},HE={year:gt,month:Go,day:gt,hour:gt,minute:gt},GE={year:gt,month:Go,day:gt,hour:gt,minute:gt,second:gt},VA={year:gt,month:Go,day:gt,weekday:Go,hour:gt,minute:gt},KE={year:gt,month:io,day:gt,hour:gt,minute:gt,timeZoneName:Go},UE={year:gt,month:io,day:gt,hour:gt,minute:gt,second:gt,timeZoneName:Go},VE={year:gt,month:io,day:gt,weekday:io,hour:gt,minute:gt,timeZoneName:io},YE={year:gt,month:io,day:gt,weekday:io,hour:gt,minute:gt,second:gt,timeZoneName:io};class Pu{get type(){throw new Ta}get name(){throw new Ta}get ianaName(){return this.name}get isUniversal(){throw new Ta}offsetName(t,n){throw new Ta}formatOffset(t,n){throw new Ta}offset(t){throw new Ta}equals(t){throw new Ta}get isValid(){throw new Ta}}let Jh=null;class Af extends Pu{static get instance(){return Jh===null&&(Jh=new Af),Jh}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return rC(t,n,r)}formatOffset(t,n){return Eu(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Jd={};function YA(e){return Jd[e]||(Jd[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Jd[e]}const qA={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ZA(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,l,u,p,m]=r;return[a,o,i,l,u,p,m]}function JA(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:a}=n[o],l=qA[i];i==="era"?r[l]=a:Ht(l)||(r[l]=parseInt(a,10))}return r}let $d={};class qi extends Pu{static create(t){return $d[t]||($d[t]=new qi(t)),$d[t]}static resetCache(){$d={},Jd={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=qi.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return rC(t,n,r,this.name)}formatOffset(t,n){return Eu(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=YA(this.name);let[o,i,a,l,u,p,m]=r.formatToParts?JA(r,n):ZA(r,n);l==="BC"&&(o=-Math.abs(o)+1);const _=$f({year:o,month:i,day:a,hour:u===24?0:u,minute:p,second:m,millisecond:0});let C=+n;const b=C%1e3;return C-=b>=0?b:1e3+b,(_-C)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let H0={};function XA(e,t={}){const n=JSON.stringify([e,t]);let r=H0[n];return r||(r=new Intl.ListFormat(e,t),H0[n]=r),r}let zp={};function Hp(e,t={}){const n=JSON.stringify([e,t]);let r=zp[n];return r||(r=new Intl.DateTimeFormat(e,t),zp[n]=r),r}let Gp={};function QA(e,t={}){const n=JSON.stringify([e,t]);let r=Gp[n];return r||(r=new Intl.NumberFormat(e,t),Gp[n]=r),r}let Kp={};function eR(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=Kp[o];return i||(i=new Intl.RelativeTimeFormat(e,t),Kp[o]=i),i}let Xd=null;function tR(){return Xd||(Xd=new Intl.DateTimeFormat().resolvedOptions().locale,Xd)}let G0={};function nR(e){let t=G0[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,G0[e]=t}return t}function rR(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=Hp(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=Hp(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function oR(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function iR(e){const t=[];for(let n=1;n<=12;n++){const r=Cn.utc(2009,n,1);t.push(e(r))}return t}function aR(e){const t=[];for(let n=1;n<=7;n++){const r=Cn.utc(2016,11,13+n);t.push(e(r))}return t}function Dd(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function sR(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class lR{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=QA(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):Wg(t,3);return Qn(n,this.padTo)}}}class cR{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&qi.create(l).valid?(o=l,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=Hp(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class uR{constructor(t,n,r){this.opts={style:"long",...r},!n&&tC()&&(this.rtf=eR(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):RR(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const dR={firstDay:1,minimalDays:4,weekend:[6,7]};let Ln=class vu{static fromOpts(t){return vu.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||qn.defaultLocale,l=a||(i?"en-US":tR()),u=n||qn.defaultNumberingSystem,p=r||qn.defaultOutputCalendar,m=Up(o)||qn.defaultWeekSettings;return new vu(l,u,p,m,a)}static resetCache(){Xd=null,zp={},Gp={},Kp={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return vu.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,l,u]=rR(t);this.locale=a,this.numberingSystem=n||l||null,this.outputCalendar=r||u||null,this.weekSettings=o,this.intl=oR(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=sR(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:vu.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Up(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Dd(this,t,aC,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=iR(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return Dd(this,t,cC,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=aR(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return Dd(this,void 0,()=>uC,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Cn.utc(2016,11,13,9),Cn.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Dd(this,t,dC,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[Cn.utc(-40,1,1),Cn.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(l=>l.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new lR(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new cR(t,this.intl,n)}relFormatter(t={}){return new uR(this.intl,this.isEnglish(),t)}listFormatter(t={}){return XA(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:nC()?nR(this.locale):dR}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}},Xh=null;class Lr extends Pu{static get utcInstance(){return Xh===null&&(Xh=new Lr(0)),Xh}static instance(t){return t===0?Lr.utcInstance:new Lr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Lr(Df(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Eu(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Eu(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Eu(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class fR extends Pu{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Da(e,t){if(Ht(e)||e===null)return t;if(e instanceof Pu)return e;if(gR(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Af.instance:n==="utc"||n==="gmt"?Lr.utcInstance:Lr.parseSpecifier(n)||qi.create(e)}else return bs(e)?Lr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new fR(e)}let K0=()=>Date.now(),U0="system",V0=null,Y0=null,q0=null,Z0=60,J0,X0=null;class qn{static get now(){return K0}static set now(t){K0=t}static set defaultZone(t){U0=t}static get defaultZone(){return Da(U0,Af.instance)}static get defaultLocale(){return V0}static set defaultLocale(t){V0=t}static get defaultNumberingSystem(){return Y0}static set defaultNumberingSystem(t){Y0=t}static get defaultOutputCalendar(){return q0}static set defaultOutputCalendar(t){q0=t}static get defaultWeekSettings(){return X0}static set defaultWeekSettings(t){X0=Up(t)}static get twoDigitCutoffYear(){return Z0}static set twoDigitCutoffYear(t){Z0=t%100}static get throwOnInvalid(){return J0}static set throwOnInvalid(t){J0=t}static resetCaches(){Ln.resetCache(),qi.resetCache()}}class Bo{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const qE=[0,31,59,90,120,151,181,212,243,273,304,334],ZE=[0,31,60,91,121,152,182,213,244,274,305,335];function yo(e,t){return new Bo("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Fg(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function JE(e,t,n){return n+(Iu(e)?ZE:qE)[t-1]}function XE(e,t){const n=Iu(e)?ZE:qE,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function jg(e,t){return(e-t+7)%7+1}function sf(e,t=4,n=1){const{year:r,month:o,day:i}=e,a=JE(r,o,i),l=jg(Fg(r,o,i),n);let u=Math.floor((a-l+14-t)/7),p;return u<1?(p=r-1,u=Su(p,t,n)):u>Su(r,t,n)?(p=r+1,u=1):p=r,{weekYear:p,weekNumber:u,weekday:l,...kf(e)}}function Q0(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=jg(Fg(r,1,t),n),l=jl(r);let u=o*7+i-a-7+t,p;u<1?(p=r-1,u+=jl(p)):u>l?(p=r+1,u-=jl(r)):p=r;const{month:m,day:_}=XE(p,u);return{year:p,month:m,day:_,...kf(e)}}function Qh(e){const{year:t,month:n,day:r}=e,o=JE(t,n,r);return{year:t,ordinal:o,...kf(e)}}function eb(e){const{year:t,ordinal:n}=e,{month:r,day:o}=XE(t,n);return{year:t,month:r,day:o,...kf(e)}}function tb(e,t){if(!Ht(e.localWeekday)||!Ht(e.localWeekNumber)||!Ht(e.localWeekYear)){if(!Ht(e.weekday)||!Ht(e.weekNumber)||!Ht(e.weekYear))throw new Il("Cannot mix locale-based week fields with ISO-based week fields");return Ht(e.localWeekday)||(e.weekday=e.localWeekday),Ht(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ht(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function hR(e,t=4,n=1){const r=Rf(e.weekYear),o=bo(e.weekNumber,1,Su(e.weekYear,t,n)),i=bo(e.weekday,1,7);return r?o?i?!1:yo("weekday",e.weekday):yo("week",e.weekNumber):yo("weekYear",e.weekYear)}function pR(e){const t=Rf(e.year),n=bo(e.ordinal,1,jl(e.year));return t?n?!1:yo("ordinal",e.ordinal):yo("year",e.year)}function QE(e){const t=Rf(e.year),n=bo(e.month,1,12),r=bo(e.day,1,lf(e.year,e.month));return t?n?r?!1:yo("day",e.day):yo("month",e.month):yo("year",e.year)}function eC(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=bo(t,0,23)||t===24&&n===0&&r===0&&o===0,a=bo(n,0,59),l=bo(r,0,59),u=bo(o,0,999);return i?a?l?u?!1:yo("millisecond",o):yo("second",r):yo("minute",n):yo("hour",t)}function Ht(e){return typeof e>"u"}function bs(e){return typeof e=="number"}function Rf(e){return typeof e=="number"&&e%1===0}function gR(e){return typeof e=="string"}function mR(e){return Object.prototype.toString.call(e)==="[object Date]"}function tC(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function nC(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function vR(e){return Array.isArray(e)?e:[e]}function nb(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function yR(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Ul(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Up(e){if(e==null)return null;if(typeof e!="object")throw new Hr("Week settings must be an object");if(!bo(e.firstDay,1,7)||!bo(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!bo(t,1,7)))throw new Hr("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function bo(e,t,n){return Rf(e)&&e>=t&&e<=n}function bR(e,t){return e-t*Math.floor(e/t)}function Qn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Ra(e){if(!(Ht(e)||e===null||e===""))return parseInt(e,10)}function hs(e){if(!(Ht(e)||e===null||e===""))return parseFloat(e)}function Bg(e){if(!(Ht(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Wg(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Iu(e){return e%4===0&&(e%100!==0||e%400===0)}function jl(e){return Iu(e)?366:365}function lf(e,t){const n=bR(t-1,12)+1,r=e+(t-n)/12;return n===2?Iu(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function $f(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function rb(e,t,n){return-jg(Fg(e,1,t),n)+t-1}function Su(e,t=4,n=1){const r=rb(e,t,n),o=rb(e+1,t,n);return(jl(e)-r+o)/7}function Vp(e){return e>99?e:e>qn.twoDigitCutoffYear?1900+e:2e3+e}function rC(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},l=new Intl.DateTimeFormat(n,a).formatToParts(o).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function Df(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function oC(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Hr(`Invalid unit value ${e}`);return t}function cf(e,t){const n={};for(const r in e)if(Ul(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=oC(o)}return n}function Eu(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Qn(n,2)}:${Qn(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Qn(n,2)}${Qn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function kf(e){return yR(e,["hour","minute","second","millisecond"])}const _R=["January","February","March","April","May","June","July","August","September","October","November","December"],iC=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],xR=["J","F","M","A","M","J","J","A","S","O","N","D"];function aC(e){switch(e){case"narrow":return[...xR];case"short":return[...iC];case"long":return[..._R];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const sC=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],lC=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ER=["M","T","W","T","F","S","S"];function cC(e){switch(e){case"narrow":return[...ER];case"short":return[...lC];case"long":return[...sC];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const uC=["AM","PM"],CR=["Before Christ","Anno Domini"],wR=["BC","AD"],TR=["B","A"];function dC(e){switch(e){case"narrow":return[...TR];case"short":return[...wR];case"long":return[...CR];default:return null}}function NR(e){return uC[e.hour<12?0:1]}function SR(e,t){return cC(t)[e.weekday-1]}function OR(e,t){return aC(t)[e.month-1]}function AR(e,t){return dC(t)[e.year<0?0:1]}function RR(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const _=e==="days";switch(t){case 1:return _?"tomorrow":`next ${o[e][0]}`;case-1:return _?"yesterday":`last ${o[e][0]}`;case 0:return _?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,l=Math.abs(t),u=l===1,p=o[e],m=r?u?p[1]:p[2]||p[1]:u?o[e][0]:e;return a?`${l} ${m} ago`:`in ${l} ${m}`}function ob(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const $R={D:af,DD:RE,DDD:$E,DDDD:DE,t:kE,tt:ME,ttt:PE,tttt:IE,T:LE,TT:FE,TTT:jE,TTTT:BE,f:WE,ff:HE,fff:KE,ffff:VE,F:zE,FF:GE,FFF:UE,FFFF:YE};class $r{static create(t,n={}){return new $r(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a<t.length;a++){const l=t.charAt(a);l==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||l===n?r+=l:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=l,n=l)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return $R[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Qn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(b,v)=>this.loc.extract(t,b,v),a=b=>t.isOffsetFixed&&t.offset===0&&b.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,b.format):"",l=()=>r?NR(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(b,v)=>r?OR(t,b):i(v?{month:b}:{month:b,day:"numeric"},"month"),p=(b,v)=>r?SR(t,b):i(v?{weekday:b}:{weekday:b,month:"long",day:"numeric"},"weekday"),m=b=>{const v=$r.macroTokenToFormatOpts(b);return v?this.formatWithSystemDefault(t,v):b},_=b=>r?AR(t,b):i({era:b},"era"),C=b=>{switch(b){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return p("short",!0);case"cccc":return p("long",!0);case"ccccc":return p("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return p("short",!1);case"EEEE":return p("long",!1);case"EEEEE":return p("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return _("short");case"GG":return _("long");case"GGGGG":return _("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return m(b)}};return ob($r.parseFormat(n),C)}formatDurationFromString(t,n){const r=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=u=>p=>{const m=r(p);return m?this.num(u.get(m),p.length):p},i=$r.parseFormat(n),a=i.reduce((u,{literal:p,val:m})=>p?u:u.concat(m),[]),l=t.shiftTo(...a.map(r).filter(u=>u));return ob(i,o(l))}}const fC=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Xl(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function Ql(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,l,u]=i(t,o);return[{...n,...a},l||r,u]},[{},null,1]).slice(0,2)}function ec(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function hC(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=Ra(t[n+o]);return[r,null,n+o]}}const pC=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,DR=`(?:${pC.source}?(?:\\[(${fC.source})\\])?)?`,zg=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,gC=RegExp(`${zg.source}${DR}`),Hg=RegExp(`(?:T${gC.source})?`),kR=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,MR=/(\d{4})-?W(\d\d)(?:-?(\d))?/,PR=/(\d{4})-?(\d{3})/,IR=hC("weekYear","weekNumber","weekDay"),LR=hC("year","ordinal"),FR=/(\d{4})-(\d\d)-(\d\d)/,mC=RegExp(`${zg.source} ?(?:${pC.source}|(${fC.source}))?`),jR=RegExp(`(?: ${mC.source})?`);function Bl(e,t,n){const r=e[t];return Ht(r)?n:Ra(r)}function BR(e,t){return[{year:Bl(e,t),month:Bl(e,t+1,1),day:Bl(e,t+2,1)},null,t+3]}function tc(e,t){return[{hours:Bl(e,t,0),minutes:Bl(e,t+1,0),seconds:Bl(e,t+2,0),milliseconds:Bg(e[t+3])},null,t+4]}function Lu(e,t){const n=!e[t]&&!e[t+1],r=Df(e[t+1],e[t+2]),o=n?null:Lr.instance(r);return[{},o,t+3]}function Fu(e,t){const n=e[t]?qi.create(e[t]):null;return[{},n,t+1]}const WR=RegExp(`^T?${zg.source}$`),zR=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function HR(e){const[t,n,r,o,i,a,l,u,p]=e,m=t[0]==="-",_=u&&u[0]==="-",C=(b,v=!1)=>b!==void 0&&(v||b&&m)?-b:b;return[{years:C(hs(n)),months:C(hs(r)),weeks:C(hs(o)),days:C(hs(i)),hours:C(hs(a)),minutes:C(hs(l)),seconds:C(hs(u),u==="-0"),milliseconds:C(Bg(p),_)}]}const GR={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Gg(e,t,n,r,o,i,a){const l={year:t.length===2?Vp(Ra(t)):Ra(t),month:iC.indexOf(n)+1,day:Ra(r),hour:Ra(o),minute:Ra(i)};return a&&(l.second=Ra(a)),e&&(l.weekday=e.length>3?sC.indexOf(e)+1:lC.indexOf(e)+1),l}const KR=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function UR(e){const[,t,n,r,o,i,a,l,u,p,m,_]=e,C=Gg(t,o,r,n,i,a,l);let b;return u?b=GR[u]:p?b=0:b=Df(m,_),[C,new Lr(b)]}function VR(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const YR=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,qR=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ZR=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ib(e){const[,t,n,r,o,i,a,l]=e;return[Gg(t,o,r,n,i,a,l),Lr.utcInstance]}function JR(e){const[,t,n,r,o,i,a,l]=e;return[Gg(t,l,n,r,o,i,a),Lr.utcInstance]}const XR=Xl(kR,Hg),QR=Xl(MR,Hg),e$=Xl(PR,Hg),t$=Xl(gC),vC=Ql(BR,tc,Lu,Fu),n$=Ql(IR,tc,Lu,Fu),r$=Ql(LR,tc,Lu,Fu),o$=Ql(tc,Lu,Fu);function i$(e){return ec(e,[XR,vC],[QR,n$],[e$,r$],[t$,o$])}function a$(e){return ec(VR(e),[KR,UR])}function s$(e){return ec(e,[YR,ib],[qR,ib],[ZR,JR])}function l$(e){return ec(e,[zR,HR])}const c$=Ql(tc);function u$(e){return ec(e,[WR,c$])}const d$=Xl(FR,jR),f$=Xl(mC),h$=Ql(tc,Lu,Fu);function p$(e){return ec(e,[d$,vC],[f$,h$])}const ab="Invalid Duration",yC={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},g$={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...yC},mo=146097/400,hl=146097/4800,m$={years:{quarters:4,months:12,weeks:mo/7,days:mo,hours:mo*24,minutes:mo*24*60,seconds:mo*24*60*60,milliseconds:mo*24*60*60*1e3},quarters:{months:3,weeks:mo/28,days:mo/4,hours:mo*24/4,minutes:mo*24*60/4,seconds:mo*24*60*60/4,milliseconds:mo*24*60*60*1e3/4},months:{weeks:hl/7,days:hl,hours:hl*24,minutes:hl*24*60,seconds:hl*24*60*60,milliseconds:hl*24*60*60*1e3},...yC},ys=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],v$=ys.slice(0).reverse();function Na(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new rn(r)}function bC(e,t){let n=t.milliseconds??0;for(const r of v$.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function sb(e,t){const n=bC(e,t)<0?-1:1;ys.reduceRight((r,o)=>{if(Ht(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],l=Math.floor(i/a);t[o]+=l*n,t[r]-=l*a*n}return o},null),ys.reduce((r,o)=>{if(Ht(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function y$(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class rn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?m$:g$;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||Ln.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return rn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Hr(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new rn({values:cf(t,rn.normalizeUnit),loc:Ln.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(bs(t))return rn.fromMillis(t);if(rn.isDuration(t))return t;if(typeof t=="object")return rn.fromObject(t);throw new Hr(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=l$(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=u$(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Hr("need to specify a reason the Duration is invalid");const r=t instanceof Bo?t:new Bo(t,n);if(qn.throwOnInvalid)throw new KA(r);return new rn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new AE(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?$r.create(this.loc,r).formatDurationFromString(this,t):ab}toHuman(t={}){if(!this.isValid)return ab;const n=ys.map(r=>{const o=this.values[r];return Ht(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Wg(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Cn.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?bC(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t),r={};for(const o of ys)(Ul(n.values,o)||Ul(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Na(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=oC(t(this.values[r],r));return Na(this,{values:n},!0)}get(t){return this[rn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...cf(t,rn.normalizeUnit)};return Na(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const i={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Na(this,i)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return sb(this.matrix,t),Na(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=y$(this.normalize().shiftToAll().toObject());return Na(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>rn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of ys)if(t.indexOf(a)>=0){i=a;let l=0;for(const p in r)l+=this.matrix[p][a]*r[p],r[p]=0;bs(o[a])&&(l+=o[a]);const u=Math.trunc(l);n[a]=u,r[a]=(l*1e3-u*1e3)/1e3}else bs(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return sb(this.matrix,n),Na(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Na(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of ys)if(!n(this.values[r],t.values[r]))return!1;return!0}}const pl="Invalid Interval";function b$(e,t){return!e||!e.isValid?Kn.invalid("missing or invalid start"):!t||!t.isValid?Kn.invalid("missing or invalid end"):t<e?Kn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Kn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Hr("need to specify a reason the Interval is invalid");const r=t instanceof Bo?t:new Bo(t,n);if(qn.throwOnInvalid)throw new GA(r);return new Kn({invalid:r})}static fromDateTimes(t,n){const r=lu(t),o=lu(n);return b$(r,o)??new Kn({start:r,end:o})}static after(t,n){const r=rn.fromDurationLike(n),o=lu(t);return Kn.fromDateTimes(o,o.plus(r))}static before(t,n){const r=rn.fromDurationLike(n),o=lu(t);return Kn.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,a;try{i=Cn.fromISO(r,n),a=i.isValid}catch{a=!1}let l,u;try{l=Cn.fromISO(o,n),u=l.isValid}catch{u=!1}if(a&&u)return Kn.fromDateTimes(i,l);if(a){const p=rn.fromISO(o,n);if(p.isValid)return Kn.after(i,p)}else if(u){const p=rn.fromISO(r,n);if(p.isValid)return Kn.before(l,p)}}return Kn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(r,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Kn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(lu).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),r=[];let{s:o}=this,i=0;for(;o<this.e;){const a=n[i]||this.e,l=+a>+this.e?this.e:a;r.push(Kn.fromDateTimes(o,l)),o=l,i+=1}return r}splitBy(t){const n=rn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;r<this.e;){const l=this.start.plus(n.mapUnits(u=>u*o));i=+l>+this.e?this.e:l,a.push(Kn.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Kn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Kn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),l=a.sort((u,p)=>u.time-p.time);for(const u of l)r+=u.type==="s"?1:-1,r===1?n=u.time:(n&&+n!=+u.time&&o.push(Kn.fromDateTimes(n,u.time)),n=null);return Kn.merge(o)}difference(...t){return Kn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:pl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=af,n={}){return this.isValid?$r.create(this.s.loc.clone(n),t).formatInterval(this):pl}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:pl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:pl}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:pl}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:pl}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):rn.invalid(this.invalidReason)}mapEndpoints(t){return Kn.fromDateTimes(t(this.s),t(this.e))}}class kd{static hasDST(t=qn.defaultZone){const n=Cn.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return qi.isValidZone(t)}static normalizeZone(t){return Da(t,qn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Ln.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Ln.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Ln.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Ln.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Ln.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Ln.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Ln.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Ln.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Ln.create(n,null,"gregory").eras(t)}static features(){return{relative:tC(),localeWeek:nC()}}}function lb(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(rn.fromMillis(r).as("days"))}function _$(e,t,n){const r=[["years",(u,p)=>p.year-u.year],["quarters",(u,p)=>p.quarter-u.quarter+(p.year-u.year)*4],["months",(u,p)=>p.month-u.month+(p.year-u.year)*12],["weeks",(u,p)=>{const m=lb(u,p);return(m-m%7)/7}],["days",lb]],o={},i=e;let a,l;for(const[u,p]of r)n.indexOf(u)>=0&&(a=u,o[u]=p(e,t),l=i.plus(o),l>t?(o[u]--,e=i.plus(o),e>t&&(l=e,o[u]--,e=i.plus(o))):e=l);return[e,o,l,a]}function x$(e,t,n,r){let[o,i,a,l]=_$(e,t,n);const u=t-o,p=n.filter(_=>["hours","minutes","seconds","milliseconds"].indexOf(_)>=0);p.length===0&&(a<t&&(a=o.plus({[l]:1})),a!==o&&(i[l]=(i[l]||0)+u/(a-o)));const m=rn.fromObject(i,r);return p.length>0?rn.fromMillis(u,r).shiftTo(...p).plus(m):m}const Kg={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},cb={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},E$=Kg.hanidec.replace(/[\[|\]]/g,"").split("");function C$(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(Kg.hanidec)!==-1)t+=E$.indexOf(e[n]);else for(const o in cb){const[i,a]=cb[o];r>=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}function Lo({numberingSystem:e},t=""){return new RegExp(`${Kg[e||"latn"]}${t}`)}const w$="missing Intl.DateTimeFormat.formatToParts support";function ln(e,t=n=>n){return{regex:e,deser:([n])=>t(C$(n))}}const T$=" ",_C=`[ ${T$}]`,xC=new RegExp(_C,"g");function N$(e){return e.replace(/\./g,"\\.?").replace(xC,_C)}function ub(e){return e.replace(/\./g,"").replace(xC," ").toLowerCase()}function Fo(e,t){return e===null?null:{regex:RegExp(e.map(N$).join("|")),deser:([n])=>e.findIndex(r=>ub(n)===ub(r))+t}}function db(e,t){return{regex:e,deser:([,n,r])=>Df(n,r),groups:t}}function Md(e){return{regex:e,deser:([t])=>t}}function S$(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function O$(e,t){const n=Lo(t),r=Lo(t,"{2}"),o=Lo(t,"{3}"),i=Lo(t,"{4}"),a=Lo(t,"{6}"),l=Lo(t,"{1,2}"),u=Lo(t,"{1,3}"),p=Lo(t,"{1,6}"),m=Lo(t,"{1,9}"),_=Lo(t,"{2,4}"),C=Lo(t,"{4,6}"),b=y=>({regex:RegExp(S$(y.val)),deser:([T])=>T,literal:!0}),v=(y=>{if(e.literal)return b(y);switch(y.val){case"G":return Fo(t.eras("short"),0);case"GG":return Fo(t.eras("long"),0);case"y":return ln(p);case"yy":return ln(_,Vp);case"yyyy":return ln(i);case"yyyyy":return ln(C);case"yyyyyy":return ln(a);case"M":return ln(l);case"MM":return ln(r);case"MMM":return Fo(t.months("short",!0),1);case"MMMM":return Fo(t.months("long",!0),1);case"L":return ln(l);case"LL":return ln(r);case"LLL":return Fo(t.months("short",!1),1);case"LLLL":return Fo(t.months("long",!1),1);case"d":return ln(l);case"dd":return ln(r);case"o":return ln(u);case"ooo":return ln(o);case"HH":return ln(r);case"H":return ln(l);case"hh":return ln(r);case"h":return ln(l);case"mm":return ln(r);case"m":return ln(l);case"q":return ln(l);case"qq":return ln(r);case"s":return ln(l);case"ss":return ln(r);case"S":return ln(u);case"SSS":return ln(o);case"u":return Md(m);case"uu":return Md(l);case"uuu":return ln(n);case"a":return Fo(t.meridiems(),0);case"kkkk":return ln(i);case"kk":return ln(_,Vp);case"W":return ln(l);case"WW":return ln(r);case"E":case"c":return ln(n);case"EEE":return Fo(t.weekdays("short",!1),1);case"EEEE":return Fo(t.weekdays("long",!1),1);case"ccc":return Fo(t.weekdays("short",!0),1);case"cccc":return Fo(t.weekdays("long",!0),1);case"Z":case"ZZ":return db(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return db(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return Md(/[a-z_+-/]{1,256}?/i);case" ":return Md(/[^\S\n\r]/);default:return b(y)}})(e)||{invalidReason:w$};return v.token=e,v}const A$={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function R$(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const u=/^\s+$/.test(o);return{literal:!u,val:u?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let l=A$[a];if(typeof l=="object"&&(l=l[i]),l)return{literal:!1,val:l}}function $$(e){return[`^${e.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,e]}function D$(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(Ul(n,a)){const l=n[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(o[l.token.val[0]]=l.deser(r.slice(i,i+u))),i+=u}return[r,o]}else return[r,{}]}function k$(e){const t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Ht(e.z)||(n=qi.create(e.z)),Ht(e.Z)||(n||(n=new Lr(e.Z)),r=e.Z),Ht(e.q)||(e.M=(e.q-1)*3+1),Ht(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Ht(e.u)||(e.S=Bg(e.u)),[Object.keys(e).reduce((o,i)=>{const a=t(i);return a&&(o[a]=e[i]),o},{}),n,r]}let ep=null;function M$(){return ep||(ep=Cn.fromMillis(1555555555555)),ep}function P$(e,t){if(e.literal)return e;const n=$r.macroTokenToFormatOpts(e.val),r=wC(n,t);return r==null||r.includes(void 0)?e:r}function EC(e,t){return Array.prototype.concat(...e.map(n=>P$(n,t)))}function CC(e,t,n){const r=EC($r.parseFormat(n),e),o=r.map(a=>O$(a,e)),i=o.find(a=>a.invalidReason);if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};{const[a,l]=$$(o),u=RegExp(a,"i"),[p,m]=D$(t,u,l),[_,C,b]=m?k$(m):[null,null,void 0];if(Ul(m,"a")&&Ul(m,"H"))throw new Il("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:u,rawMatches:p,matches:m,result:_,zone:C,specificOffset:b}}}function I$(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=CC(e,t,n);return[r,o,i,a]}function wC(e,t){if(!e)return null;const n=$r.create(t,e).dtFormatter(M$()),r=n.formatToParts(),o=n.resolvedOptions();return r.map(i=>R$(i,e,o))}const tp="Invalid DateTime",fb=864e13;function Pd(e){return new Bo("unsupported zone",`the zone "${e.name}" is not supported`)}function np(e){return e.weekData===null&&(e.weekData=sf(e.c)),e.weekData}function rp(e){return e.localWeekData===null&&(e.localWeekData=sf(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ps(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Cn({...n,...t,old:n})}function TC(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function Id(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Qd(e,t,n){return TC($f(e),t,n)}function hb(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,lf(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=rn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=$f(i);let[u,p]=TC(l,n,e.zone);return a!==0&&(u+=a,p=e.zone.offset(u)),{ts:u,o:p}}function su(e,t,n,r,o,i){const{setZone:a,zone:l}=n;if(e&&Object.keys(e).length!==0||t){const u=t||l,p=Cn.fromObject(e,{...n,zone:u,specificOffset:i});return a?p:p.setZone(l)}else return Cn.invalid(new Bo("unparsable",`the input "${o}" can't be parsed as ${r}`))}function Ld(e,t,n=!0){return e.isValid?$r.create(Ln.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function op(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Qn(e.c.year,n?6:4),t?(r+="-",r+=Qn(e.c.month),r+="-",r+=Qn(e.c.day)):(r+=Qn(e.c.month),r+=Qn(e.c.day)),r}function pb(e,t,n,r,o,i){let a=Qn(e.c.hour);return t?(a+=":",a+=Qn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Qn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Qn(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Qn(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Qn(Math.trunc(-e.o/60)),a+=":",a+=Qn(Math.trunc(-e.o%60))):(a+="+",a+=Qn(Math.trunc(e.o/60)),a+=":",a+=Qn(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const NC={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},L$={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},F$={ordinal:1,hour:0,minute:0,second:0,millisecond:0},SC=["year","month","day","hour","minute","second","millisecond"],j$=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],B$=["year","ordinal","hour","minute","second","millisecond"];function W$(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new AE(e);return t}function gb(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return W$(e)}}function mb(e,t){const n=Da(t.zone,qn.defaultZone),r=Ln.fromObject(t),o=qn.now();let i,a;if(Ht(e.year))i=o;else{for(const p of SC)Ht(e[p])&&(e[p]=NC[p]);const l=QE(e)||eC(e);if(l)return Cn.invalid(l);const u=n.offset(o);[i,a]=Qd(e,u,n)}return new Cn({ts:i,zone:n,loc:r,o:a})}function vb(e,t,n){const r=Ht(n.round)?!0:n.round,o=(a,l)=>(a=Wg(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,l)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const l=i(a);if(Math.abs(l)>=1)return o(l,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function yb(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let Cn=class Gn{constructor(t){const n=t.zone||qn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Bo("invalid input"):null)||(n.isValid?null:Pd(n));this.ts=Ht(t.ts)?qn.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const a=n.offset(this.ts);o=Id(this.ts,a),r=Number.isNaN(o.year)?new Bo("invalid input"):null,o=r?null:o,i=r?null:a}this._zone=n,this.loc=t.loc||Ln.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new Gn({})}static local(){const[t,n]=yb(arguments),[r,o,i,a,l,u,p]=n;return mb({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static utc(){const[t,n]=yb(arguments),[r,o,i,a,l,u,p]=n;return t.zone=Lr.utcInstance,mb({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static fromJSDate(t,n={}){const r=mR(t)?t.valueOf():NaN;if(Number.isNaN(r))return Gn.invalid("invalid input");const o=Da(n.zone,qn.defaultZone);return o.isValid?new Gn({ts:r,zone:o,loc:Ln.fromObject(n)}):Gn.invalid(Pd(o))}static fromMillis(t,n={}){if(bs(t))return t<-fb||t>fb?Gn.invalid("Timestamp out of range"):new Gn({ts:t,zone:Da(n.zone,qn.defaultZone),loc:Ln.fromObject(n)});throw new Hr(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(bs(t))return new Gn({ts:t*1e3,zone:Da(n.zone,qn.defaultZone),loc:Ln.fromObject(n)});throw new Hr("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Da(n.zone,qn.defaultZone);if(!r.isValid)return Gn.invalid(Pd(r));const o=Ln.fromObject(n),i=cf(t,gb),{minDaysInFirstWeek:a,startOfWeek:l}=tb(i,o),u=qn.now(),p=Ht(n.specificOffset)?r.offset(u):n.specificOffset,m=!Ht(i.ordinal),_=!Ht(i.year),C=!Ht(i.month)||!Ht(i.day),b=_||C,v=i.weekYear||i.weekNumber;if((b||m)&&v)throw new Il("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(C&&m)throw new Il("Can't mix ordinal dates with month/day");const y=v||i.weekday&&!b;let T,O,A=Id(u,p);y?(T=j$,O=L$,A=sf(A,a,l)):m?(T=B$,O=F$,A=Qh(A)):(T=SC,O=NC);let D=!1;for(const U of T){const Q=i[U];Ht(Q)?D?i[U]=O[U]:i[U]=A[U]:D=!0}const P=y?hR(i,a,l):m?pR(i):QE(i),M=P||eC(i);if(M)return Gn.invalid(M);const V=y?Q0(i,a,l):m?eb(i):i,[J,oe]=Qd(V,p,r),Z=new Gn({ts:J,zone:r,o:oe,loc:o});return i.weekday&&b&&t.weekday!==Z.weekday?Gn.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Z.toISO()}`):Z}static fromISO(t,n={}){const[r,o]=i$(t);return su(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=a$(t);return su(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=s$(t);return su(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Ht(t)||Ht(n))throw new Hr("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=Ln.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[l,u,p,m]=I$(a,t,n);return m?Gn.invalid(m):su(l,u,r,`format ${n}`,t,p)}static fromString(t,n,r={}){return Gn.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=p$(t);return su(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Hr("need to specify a reason the DateTime is invalid");const r=t instanceof Bo?t:new Bo(t,n);if(qn.throwOnInvalid)throw new HA(r);return new Gn({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=wC(t,Ln.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return EC($r.parseFormat(t),Ln.fromObject(n)).map(r=>r.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?np(this).weekYear:NaN}get weekNumber(){return this.isValid?np(this).weekNumber:NaN}get weekday(){return this.isValid?np(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?rp(this).weekday:NaN}get localWeekNumber(){return this.isValid?rp(this).weekNumber:NaN}get localWeekYear(){return this.isValid?rp(this).weekYear:NaN}get ordinal(){return this.isValid?Qh(this.c).ordinal:NaN}get monthShort(){return this.isValid?kd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?kd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?kd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?kd.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=$f(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),l=this.zone.offset(r-i*n);if(a===l)return[this];const u=r-a*n,p=r-l*n,m=Id(u,a),_=Id(p,l);return m.hour===_.hour&&m.minute===_.minute&&m.second===_.second&&m.millisecond===_.millisecond?[ps(this,{ts:u}),ps(this,{ts:p})]:[this]}get isInLeapYear(){return Iu(this.year)}get daysInMonth(){return lf(this.year,this.month)}get daysInYear(){return this.isValid?jl(this.year):NaN}get weeksInWeekYear(){return this.isValid?Su(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Su(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=$r.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Lr.instance(t),n)}toLocal(){return this.setZone(qn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Da(t,qn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=Qd(a,i,t)}return ps(this,{ts:o,zone:t})}else return Gn.invalid(Pd(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return ps(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=cf(t,gb),{minDaysInFirstWeek:r,startOfWeek:o}=tb(n,this.loc),i=!Ht(n.weekYear)||!Ht(n.weekNumber)||!Ht(n.weekday),a=!Ht(n.ordinal),l=!Ht(n.year),u=!Ht(n.month)||!Ht(n.day),p=l||u,m=n.weekYear||n.weekNumber;if((p||a)&&m)throw new Il("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Il("Can't mix ordinal dates with month/day");let _;i?_=Q0({...sf(this.c,r,o),...n},r,o):Ht(n.ordinal)?(_={...this.toObject(),...n},Ht(n.day)&&(_.day=Math.min(lf(_.year,_.month),_.day))):_=eb({...Qh(this.c),...n});const[C,b]=Qd(_,this.o,this.zone);return ps(this,{ts:C,o:b})}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return ps(this,hb(this,n))}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t).negate();return ps(this,hb(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=rn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?$r.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):tp}toLocaleString(t=af,n={}){return this.isValid?$r.create(this.loc.clone(n),t).formatDateTime(this):tp}toLocaleParts(t={}){return this.isValid?$r.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=t==="extended";let l=op(this,a);return l+="T",l+=pb(this,a,n,r,o,i),l}toISODate({format:t="extended"}={}){return this.isValid?op(this,t==="extended"):null}toISOWeekDate(){return Ld(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+pb(this,a==="extended",n,t,r,i):null}toRFC2822(){return Ld(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ld(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?op(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),Ld(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():tp}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return rn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=vR(n).map(rn.normalizeUnit),a=t.valueOf()>this.valueOf(),l=a?this:t,u=a?t:this,p=x$(l,u,i,o);return a?p.negate():p}diffNow(t="milliseconds",n={}){return this.diff(Gn.now(),t,n)}until(t){return this.isValid?Kn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Gn.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),vb(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?vb(t.base||Gn.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Gn.isDateTime))throw new Hr("min requires all arguments be DateTimes");return nb(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(Gn.isDateTime))throw new Hr("max requires all arguments be DateTimes");return nb(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=Ln.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return CC(a,t,n)}static fromStringExplain(t,n,r={}){return Gn.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return af}static get DATE_MED(){return RE}static get DATE_MED_WITH_WEEKDAY(){return UA}static get DATE_FULL(){return $E}static get DATE_HUGE(){return DE}static get TIME_SIMPLE(){return kE}static get TIME_WITH_SECONDS(){return ME}static get TIME_WITH_SHORT_OFFSET(){return PE}static get TIME_WITH_LONG_OFFSET(){return IE}static get TIME_24_SIMPLE(){return LE}static get TIME_24_WITH_SECONDS(){return FE}static get TIME_24_WITH_SHORT_OFFSET(){return jE}static get TIME_24_WITH_LONG_OFFSET(){return BE}static get DATETIME_SHORT(){return WE}static get DATETIME_SHORT_WITH_SECONDS(){return zE}static get DATETIME_MED(){return HE}static get DATETIME_MED_WITH_SECONDS(){return GE}static get DATETIME_MED_WITH_WEEKDAY(){return VA}static get DATETIME_FULL(){return KE}static get DATETIME_FULL_WITH_SECONDS(){return UE}static get DATETIME_HUGE(){return VE}static get DATETIME_HUGE_WITH_SECONDS(){return YE}};function lu(e){if(Cn.isDateTime(e))return e;if(e&&e.valueOf&&bs(e.valueOf()))return Cn.fromJSDate(e);if(e&&typeof e=="object")return Cn.fromObject(e);throw new Hr(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var fn=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(fn||{});function Ug(e){const t={1:fn.Monday,2:fn.Tuesday,3:fn.Wednesday,4:fn.Thursday,5:fn.Friday,6:fn.Saturday,7:fn.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function yi(e){return{[fn.Monday]:"Monday",[fn.Tuesday]:"Tuesday",[fn.Wednesday]:"Wednesday",[fn.Thursday]:"Thursday",[fn.Friday]:"Friday",[fn.Saturday]:"Saturday",[fn.Sunday]:"Sunday"}[e]}class bb{constructor(t,n,r){oo(this,"end"),oo(this,"start"),this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(u=>{if(u.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[o,i]=n.start.split(":"),[a,l]=n.end.split(":");this.end=this.end.set({hour:Number(a),minute:Number(l)}),this.start=this.start.set({hour:Number(o),minute:Number(i)}),this.end<this.start&&(this.end=this.end.plus({days:1})),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r)}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r)}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class OC{constructor(t,n){oo(this,"holidayHoursByDate"),oo(this,"hours"),oo(this,"timezone"),this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;let n=t;n=n.minus({days:1});for(const r of[n,t]){const o=this.getHours(r);if(o&&!o.isClosed)for(const i of o.openIntervals||[]){const a=new bb(r,i,this.timezone);if(a.contains(t))return a}}return null}getCurrentInterval(){return this.getInterval(Cn.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(i,a)=>i.start===a.start?0:i.start>a.start?1:-1,o=n.sort(r);for(const[i,a]of o.entries())if(a.contains(t)&&o.length>i+1)return o[i+1];for(const i of o)if(i.start>t)return i;return null}getIntervalsForNDays(t,n){const r=[];for(let o=0;o<t;o++){let i=n;i=i.plus({days:o});const a=this.getHours(i);a&&!a.isClosed&&r.push(...a.openIntervals.map(l=>new bb(i,l,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=yi(Ug(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(Cn.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,o,i]=n,a=Cn.fromObject({year:Number(r),month:Number(o),day:Number(i)},{zone:this.timezone});if(t<a)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(Cn.now())}}function z$(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function H$(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function ju(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function Bu(e){return!e.futureInterval}function G$(e){return ju(e)?an.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):Bu(e)?an.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):an.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function K$(e){return ju(e)||Bu(e)?null:an.jsx("span",{className:"HoursStatus-separator",children:" • "})}function U$(e){return ju(e)||Bu(e)?null:an.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function V$(e){if(ju(e)||Bu(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return an.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function Y$(e){var t,n;if(ju(e)||Bu(e))return null;const r={weekday:"long",...e.dayOptions??{}};let o="";if(e.isOpen){const i=e.currentInterval;o+=((t=i==null?void 0:i.end)==null?void 0:t.setLocale("en-US").toLocaleString(r))||""}else{const i=e.futureInterval;o+=((n=i==null?void 0:i.start)==null?void 0:n.setLocale("en-US").toLocaleString(r))||""}return an.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",o]})}function q$(e,t){const n=e.currentTemplate||G$,r=e.separatorTemplate||K$,o=e.futureTemplate||U$,i=e.timeTemplate||V$,a=e.dayOfWeekTemplate||Y$;return an.jsxs("div",{className:Tu("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),o(e),i(e),a(e)]})}const Z$=e=>{const[t,n]=H.useState(!1),[r,o]=H.useState(!1);H.useEffect(()=>{o(!0)},[]);const i=e.statusTemplate||q$,a=new OC(e.hours,e.timezone),l=a.isOpenNow(),u=a.getCurrentInterval(),p=a.getNextInterval(),m=(u==null?void 0:u.end)||(p==null?void 0:p.start);if(m&&!t){n(!0);const C=m.toMillis()-Cn.now().toMillis();setTimeout(()=>n(!1),C)}const _={isOpen:l,currentInterval:u,futureInterval:p,...e};return an.jsx(an.Fragment,{children:r&&i(_,e)})};function J$(e,t){const n=[];return e.forEach(r=>{const o=n[n.length-1];o?H$(o.intervals,r.intervals)?(o.endDay=r.endDay,o.isToday=o.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const o=t&&yi(r.startDay)in t?t[yi(r.startDay)]||"":yi(r.startDay),i=t&&yi(r.endDay)in t?t[yi(r.endDay)]||"":yi(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${o}`:`${o} - ${i}`}})}function X$(e,t){const n=[],r=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?n.push("Closed"):r?n.push("Open 24 hours"):e.intervals.forEach(o=>{const i=o.getStartTime("en-US",t),a=o.getEndTime("en-US",t);n.push(`${i} - ${a}`)}),n}function Q$(e,t,n){const r=[];for(let o=1;o<=7;o++){const i=Cn.fromObject({weekday:o}),a=Ug(i);r.push({startDay:a,endDay:a,dayName:n&&yi(a).toLowerCase()in n?n[yi(a).toLowerCase()]||"":yi(a),intervals:e.filter(l=>l.start.weekday===o),isToday:t.weekday===o})}return r}const eD=e=>{const[t,n]=H.useState(!1);H.useEffect(()=>{n(!0)},[]);const r=new OC(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),o=Cn.now(),i=r.getIntervalsForNDays(7,o);let a=Q$(i,o,e.dayOfWeekNames);function l(m){return m?{today:Ug(o),monday:fn.Monday,tuesday:fn.Tuesday,wednesday:fn.Wednesday,thursday:fn.Thursday,friday:fn.Friday,saturday:fn.Saturday,sunday:fn.Sunday}[m]:fn.Sunday}let u=[fn.Sunday,fn.Monday,fn.Tuesday,fn.Wednesday,fn.Thursday,fn.Friday,fn.Saturday];const p=u.indexOf(l(e.startOfWeek));return u=z$(u,7-p),a.sort((m,_)=>u.indexOf(m.startDay)-u.indexOf(_.startDay)),e.collapseDays&&(a=J$(a,e.dayOfWeekNames)),an.jsx(an.Fragment,{children:t&&an.jsx("div",{className:Tu("HoursTable",e.className),children:a.map(m=>{const _=(e.intervalStringsBuilderFn||X$)(m,e.timeOptions);return an.jsxs("div",{className:Tu("HoursTable-row",{"is-today":m.isToday}),children:[an.jsx("span",{className:"HoursTable-day",children:m.dayName}),an.jsx("span",{className:"HoursTable-intervals",children:_.map((C,b)=>an.jsx("span",{className:"HoursTable-interval",children:C},b))})]},m.dayName)})})})},Yp=Math.log2(1.6745627884839434),tD=4,nD=19,qp="js-baidu-neg-lng-fix";let AC;const rD=new Promise(e=>AC=e),oD="https://api.map.baidu.com/geoconv/v1/";let cu=[];const iD="gcj02ToBD09Callback_b872c21c";let aD=0,_b;async function RC(e){return await new Promise((t,n)=>{cu.push({coordinates:e,resolve:t,reject:n}),cu.length===1&&(_b=setTimeout(r,100)),cu.length>40&&(clearTimeout(_b),r());function r(){const o=cu;cu=[];const i=[].concat(...o.map(u=>u.coordinates)),a=iD+"_"+aD++,l=document.createElement("script");window[a]=u=>{if(u.status){const _=new Error(`Unable to convert coordinates to BD-09: Received status code ${u.status}${u.message?": "+u.message:""}`);o.forEach(C=>C.reject(_))}const p=u.result.map(_=>new Zl(_.y,_.x));let m=0;o.forEach(_=>{_.resolve(p.slice(m,m+=_.coordinates.length))}),delete window[a],l.parentNode.removeChild(l)},rD.then(u=>{const p={ak:u,callback:a,coords:i.map(m=>`${m.longitude},${m.latitude}`).join(";"),from:3,to:5};l.src=oD+"?"+Object.entries(p).map(([m,_])=>m+"="+_).join("&"),document.head.appendChild(l)})}})}class sD extends Jl{constructor(t){super(t);const n=!!(window.MSInputMethodContext&&document.documentMode);this._wrapper=t.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:t.controlEnabled,maxZoom:n?14:18,...t.providerOptions}),t.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper.dataset.baiduZoom=this.map.getZoom(),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new Zl(this.map.getCenter())}getZoom(){return this.map.getZoom()-Yp}setCenter(t,n){this._centerReady=RC([t]).then(([r])=>{const o=new BMap.Point(r.longitude,r.latitude);this.map.panTo(o,{noAnimation:!n})})}setZoom(t,n){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(t+Yp)},{enableAnimation:n})})}}class lD extends Of{constructor(t){super(t),this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;const n=this;class r extends BMap.Marker{initialize(a){return n._wrapper=super.initialize(a),n._wrapper&&(n._wrapper.style.zIndex=n._zIndex,n._originalWrapperClass=n._wrapper.getAttribute("class"),n._wrapper.setAttribute("class",n._getClass()),n._wrapper.appendChild(n._element),n.addListeners()),n._wrapper}draw(){if(n._wrapper){const a=n._wrapper.style.zIndex;super.draw(),n._wrapper.style.height="",n._wrapper.style.width="",n._wrapper.style.pointerEvents="none",n._wrapper.style.zIndex=a}else super.draw()}}this.pin=new r(new BMap.Point(0,0));const o=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(o),this.pin.setShadow(o)}addListeners(){super.addListeners(),this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(t){this._coordinateReady=RC([t]).then(([n])=>{this._negativeLngFix=n.longitude<0,this.pin.setPosition(new BMap.Point(n.longitude+(this._negativeLngFix?180:0),n.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](qp)})}setMap(t,n){this._coordinateReady.then(()=>{n&&n.getProviderMap().map.removeOverlay(this.pin),t&&t.getProviderMap().map.addOverlay(this.pin)})}setProperties(t){super.setProperties(t),this._wrapperClass=t.getClass(),this._element=t.getElement()||this._pinEl,this._zIndex=t.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?qp:""} ${this._wrapperClass}`}}const cD="https://api.map.baidu.com/getscript";function uD(e,t,n,{params:r={},version:o="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const i=n,a={ak:i,v:o,...r};AC(i);const l=document.createElement("script");l.src=cD+"?"+Object.entries(a).map(([m,_])=>m+"="+_).join("&"),l.onload=()=>e(),document.head.appendChild(l);let u="";for(let m=tD;m<=nD;m++){const _=2**(m-Yp+7);u+=`[data-baidu-zoom="${m}"] .${qp}{transform:translateX(-${_}px);}`}const p=document.createElement("style");p.appendChild(document.createTextNode(u)),document.head.appendChild(p)}new ws().withLoadFunction(uD).withMapClass(sD).withPinClass(lD).withProviderName("Baidu").build();let $C;function dD(){class e extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1}),this._container=document.createElement("div"),this._map=null,this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(n){this._pins.add(n),n._wrapper.style.position="absolute",this._container.appendChild(n._wrapper),this._map&&this.updatePinPosition(n)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(n){this._pins.delete(n),this._container.removeChild(n._wrapper)}updatePinPosition(n){if(!this._map)return;const r=this._map.tryLocationToPixel(n._location,Microsoft.Maps.PixelReference.control);n._wrapper.style.left=r.x+"px",n._wrapper.style.top=r.y+"px"}updatePinPositions(){this._pins.forEach(n=>this.updatePinPosition(n))}}$C=e}class fD extends Jl{constructor(t){super(t),this.wrapper=t.wrapper,this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!t.controlEnabled,disableZooming:!t.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...t.providerOptions}),this.pinOverlay=new $C(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler())}getCenter(){return new Zl(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new Microsoft.Maps.Location(t.latitude,t.longitude);this.map.setView({center:r}),this.pinOverlay.updatePinPositions()}setZoom(t,n){this.map.setView({zoom:Math.floor(t)}),this.pinOverlay.updatePinPositions()}}class hD extends Of{static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}constructor(t){super(t),this._map=null,this._location=new Microsoft.Maps.Location(0,0)}setCoordinate(t){this._location=new Microsoft.Maps.Location(t.latitude,t.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(t,n){n&&n.getProviderMap().pinOverlay.removePin(this),t&&t.getProviderMap().pinOverlay.addPin(this),this._map=t}}const xb="BingMapsCallback_593d7d33",pD="https://www.bing.com/api/maps/mapcontrol";function gD(e,t,n,{params:r={}}={}){window[xb]=()=>{dD(),e()};const o={callback:xb,key:n,...r};tE(pD+"?"+Object.entries(o).map(([i,a])=>i+"="+a).join("&"))}new ws().withLoadFunction(gD).withMapClass(fD).withPinClass(hD).withProviderName("Bing").build();class mD extends Jl{constructor(t){if(super(t),this.map=new mapboxgl.Map({container:t.wrapper,interactive:t.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...t.providerOptions}),t.controlEnabled){const n=new mapboxgl.NavigationControl({showCompass:!1});this.map.addControl(n)}this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new Zl(this.map.getCenter())}getZoom(){return this.map.getZoom()+1}setCenter(t,n){const r=new mapboxgl.LngLat(t.longitude,t.latitude);this.map[n?"panTo":"setCenter"](r)}setZoom(t,n){this.map[n?"zoomTo":"setZoom"](t-1)}setZoomCenter(t,n,r){const o=new mapboxgl.LngLat(n.longitude,n.latitude);this.map[r?"easeTo":"jumpTo"]({center:o,zoom:t-1})}}class vD extends Of{constructor(t){super(t),this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper})}setCoordinate(t){this.pin.setLngLat(new mapboxgl.LngLat(t.longitude,t.latitude))}setMap(t,n){t?this.pin.addTo(t.getProviderMap().map):this.pin.remove()}}function yD(e,t,n,{version:r="v1.13.0"}={}){const o=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{mapboxgl.accessToken=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new ws().withLoadFunction(yD).withMapClass(mD).withPinClass(vD).withProviderName("Mapbox").build();let DC=class extends Jl{constructor(e){super(e),this._initMap(e),e.controlEnabled&&this.map.zoomControl.setPosition("topright"),this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new Zl(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(e,t){const n=new L.latLng(e.latitude,e.longitude);this.map.panTo(n,{animate:t})}setZoom(e,t){this.map.setZoom(e,{animate:t})}setZoomCenter(e,t,n){const r=new L.latLng(t.latitude,t.longitude);this.map.setView(r,e,{animate:n})}_initMap(e){this.map=new L.map(e.wrapper,{boxZoom:e.controlEnabled,doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions});const t=e.providerOptions,n=t.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",r=t.tileLayerOptions||{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};r.accessToken=this.constructor.apiKey,L.tileLayer(n,r).addTo(this.map)}},bD=class extends Rg{constructor(e){super(e),this.pin=new L.marker,this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(e){const t=new L.latLng(e.latitude,e.longitude);this.pin.setLatLng(t)}setMap(e,t){e?this.pin.addTo(e.getProviderMap().map):this.pin.remove()}setProperties(e){const t=e.getWidth(),n=e.getHeight(),r=e.getAnchorX(),o=e.getAnchorY();this.pin.setIcon(new L.icon({iconUrl:this._icons[e.getIcon()],iconSize:[t,n],iconAnchor:[r*t,o*n],className:e.getClass()})),this.pin.setZIndexOffset(e.getZIndex())}};function _D(e,t,n,{version:r="1.7.1"}={}){const o=`https://unpkg.com/leaflet@${r}/dist/leaflet`;DC.apiKey=n;const i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>e(),document.head.appendChild(i),document.head.appendChild(a)}const kC=new ws().withLoadFunction(_D).withMapClass(DC).withPinClass(bD).withProviderName("Leaflet").build(),xD=kC.getMapClass(),ED=kC.getPinClass();class CD extends xD{_initMap(t){this.map=L.mapquest.map(t.wrapper,{boxZoom:t.controlEnabled,center:new L.latLng(0,0),doubleClickZoom:t.controlEnabled,dragging:t.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:t.controlEnabled,zoomSnap:0,...t.providerOptions})}}class wD extends ED{}function TD(e,t,n,{version:r="v1.3.2"}={}){const o=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{L.mapquest.key=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new ws().withLoadFunction(TD).withMapClass(CD).withPinClass(wD).withProviderName("MapQuest").build();const Vg=({label:e,url:t,variant:n,size:r,className:o,fontSize:i="default"})=>re.jsx(Sf,{asChild:!0,className:o,variant:n,size:r,fontSize:i,children:re.jsx(Ag,{href:t??"",children:e})});Vg.displayName="CTA";const MC=Dr("components",{variants:{weight:{default:"",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},transform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},level:{1:"font-heading1-fontWeight text-heading1-fontSize text-heading1-color",2:"font-heading2-fontWeight text-heading2-fontSize text-heading2-color",3:"font-heading3-fontWeight text-heading3-fontSize text-heading3-color",4:"font-heading4-fontWeight text-heading4-fontSize text-heading4-color",5:"font-heading5-fontWeight text-heading5-fontSize text-heading5-color",6:"font-heading6-fontWeight text-heading6-fontSize text-heading6-color"}},defaultVariants:{color:"primary",weight:"default",transform:"none"}}),Yg=ge.forwardRef(({className:e,level:t=1,color:n,weight:r,transform:o,fontSize:i,...a},l)=>{const u=`h${t}`;return re.jsx(u,{id:"tag",style:{fontSize:i==="default"?void 0:i+"px"},className:MC({color:n,className:e,weight:r,transform:o,level:t}),ref:l,...a,children:a.children})});Yg.displayName="Heading";const PC=Dr("mx-auto",{variants:{padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"},maxWidth:{default:"max-w-6xl",full:"max-w-full",xl:"max-w-4xl"}},defaultVariants:{padding:"default",maxWidth:"default"}}),nc=ge.forwardRef(({className:e,padding:t,maxWidth:n,...r},o)=>re.jsx("div",{className:"components bg-main",children:re.jsx("div",{className:Mu(e,PC({padding:t,maxWidth:n})),ref:o,...r,children:r.children})}));nc.displayName="Section";const qg=ge.createContext(void 0),ND=({value:e,children:t})=>re.jsx(qg.Provider,{value:e,children:t}),Eo=()=>{const e=ge.useContext(qg);if(!e)throw new Error("useDocument must be used within a DocumentProvider");return e},Vo=(e,t)=>{if(!(!t||typeof t!="object"||!("field"in t)||!("constantValue"in t))){if(t.constantValueEnabled)return t.constantValue;if(t.field!==""){try{const n=t.field.split(".");let r=!1,o=e;for(let i=0;i<n.length;i++)if((o==null?void 0:o[n[i]])!==void 0)o=o[n[i]];else{r=!0;break}if(!r)return o}catch(n){console.error("Error in resolveYextEntityField:",n)}console.warn(`The field ${t.field} was not found in the document.`)}}};function On(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function SD(e,t){const n=ge.createContext(t),r=i=>{const{children:a,...l}=i,u=ge.useMemo(()=>l,Object.values(l));return re.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=ge.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function rc(e,t=[]){let n=[];function r(i,a){const l=ge.createContext(a),u=n.length;n=[...n,a];const p=_=>{var O;const{scope:C,children:b,...v}=_,y=((O=C==null?void 0:C[e])==null?void 0:O[u])||l,T=ge.useMemo(()=>v,Object.values(v));return re.jsx(y.Provider,{value:T,children:b})};p.displayName=i+"Provider";function m(_,C){var y;const b=((y=C==null?void 0:C[e])==null?void 0:y[u])||l,v=ge.useContext(b);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${_}\` must be used within \`${i}\``)}return[p,m]}const o=()=>{const i=n.map(a=>ge.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return ge.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,OD(o,...t)]}function OD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const _=u(i)[`__scope${p}`];return{...l,..._}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var AD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],kn=AD.reduce((e,t)=>{const n=ge.forwardRef((r,o)=>{const{asChild:i,...a}=r,l=i?Ma:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),re.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function RD(e,t){e&&Gx.flushSync(()=>e.dispatchEvent(t))}function Zi(e){const t=ge.useRef(e);return ge.useEffect(()=>{t.current=e}),ge.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function $D(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e);ge.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var DD="DismissableLayer",Zp="dismissableLayer.update",kD="dismissableLayer.pointerDownOutside",MD="dismissableLayer.focusOutside",Eb,IC=ge.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zg=ge.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,p=ge.useContext(IC),[m,_]=ge.useState(null),C=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=ge.useState({}),v=cr(t,J=>_(J)),y=Array.from(p.layers),[T]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),O=y.indexOf(T),A=m?y.indexOf(m):-1,D=p.layersWithOutsidePointerEventsDisabled.size>0,P=A>=O,M=LD(J=>{const oe=J.target,Z=[...p.branches].some(U=>U.contains(oe));!P||Z||(o==null||o(J),a==null||a(J),J.defaultPrevented||l==null||l())},C),V=FD(J=>{const oe=J.target;[...p.branches].some(U=>U.contains(oe))||(i==null||i(J),a==null||a(J),J.defaultPrevented||l==null||l())},C);return $D(J=>{A===p.layers.size-1&&(r==null||r(J),!J.defaultPrevented&&l&&(J.preventDefault(),l()))},C),ge.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Eb=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),Cb(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=Eb)}},[m,C,n,p]),ge.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),Cb())},[m,p]),ge.useEffect(()=>{const J=()=>b({});return document.addEventListener(Zp,J),()=>document.removeEventListener(Zp,J)},[]),re.jsx(kn.div,{...u,ref:v,style:{pointerEvents:D?P?"auto":"none":void 0,...e.style},onFocusCapture:On(e.onFocusCapture,V.onFocusCapture),onBlurCapture:On(e.onBlurCapture,V.onBlurCapture),onPointerDownCapture:On(e.onPointerDownCapture,M.onPointerDownCapture)})});Zg.displayName=DD;var PD="DismissableLayerBranch",ID=ge.forwardRef((e,t)=>{const n=ge.useContext(IC),r=ge.useRef(null),o=cr(t,r);return ge.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),re.jsx(kn.div,{...e,ref:o})});ID.displayName=PD;function LD(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e),r=ge.useRef(!1),o=ge.useRef(()=>{});return ge.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let u=function(){LC(kD,n,p,{discrete:!0})};const p={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function FD(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e),r=ge.useRef(!1);return ge.useEffect(()=>{const o=i=>{i.target&&!r.current&&LC(MD,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Cb(){const e=new CustomEvent(Zp);document.dispatchEvent(e)}function LC(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?RD(o,i):o.dispatchEvent(i)}var _s=globalThis!=null&&globalThis.document?ge.useLayoutEffect:()=>{},jD=ge.useId||(()=>{}),BD=0;function Cu(e){const[t,n]=ge.useState(jD());return _s(()=>{n(r=>r??String(BD++))},[e]),t?`radix-${t}`:""}const WD=["top","right","bottom","left"],Pa=Math.min,ro=Math.max,uf=Math.round,Fd=Math.floor,_i=e=>({x:e,y:e}),zD={left:"right",right:"left",bottom:"top",top:"bottom"},HD={start:"end",end:"start"};function Jp(e,t,n){return ro(e,Pa(t,n))}function Ji(e,t){return typeof e=="function"?e(t):e}function Xi(e){return e.split("-")[0]}function oc(e){return e.split("-")[1]}function Jg(e){return e==="x"?"y":"x"}function Xg(e){return e==="y"?"height":"width"}function Ia(e){return["top","bottom"].includes(Xi(e))?"y":"x"}function Qg(e){return Jg(Ia(e))}function GD(e,t,n){n===void 0&&(n=!1);const r=oc(e),o=Qg(e),i=Xg(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=df(a)),[a,df(a)]}function KD(e){const t=df(e);return[Xp(e),t,Xp(t)]}function Xp(e){return e.replace(/start|end/g,t=>HD[t])}function UD(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function VD(e,t,n,r){const o=oc(e);let i=UD(Xi(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Xp)))),i}function df(e){return e.replace(/left|right|bottom|top/g,t=>zD[t])}function YD(e){return{top:0,right:0,bottom:0,left:0,...e}}function FC(e){return typeof e!="number"?YD(e):{top:e,right:e,bottom:e,left:e}}function ff(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function wb(e,t,n){let{reference:r,floating:o}=e;const i=Ia(t),a=Qg(t),l=Xg(a),u=Xi(t),p=i==="y",m=r.x+r.width/2-o.width/2,_=r.y+r.height/2-o.height/2,C=r[l]/2-o[l]/2;let b;switch(u){case"top":b={x:m,y:r.y-o.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:_};break;case"left":b={x:r.x-o.width,y:_};break;default:b={x:r.x,y:r.y}}switch(oc(t)){case"start":b[a]-=C*(n&&p?-1:1);break;case"end":b[a]+=C*(n&&p?-1:1);break}return b}const qD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let p=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:_}=wb(p,r,u),C=r,b={},v=0;for(let y=0;y<l.length;y++){const{name:T,fn:O}=l[y],{x:A,y:D,data:P,reset:M}=await O({x:m,y:_,initialPlacement:r,placement:C,strategy:o,middlewareData:b,rects:p,platform:a,elements:{reference:e,floating:t}});m=A??m,_=D??_,b={...b,[T]:{...b[T],...P}},M&&v<=50&&(v++,typeof M=="object"&&(M.placement&&(C=M.placement),M.rects&&(p=M.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):M.rects),{x:m,y:_}=wb(p,C,u)),y=-1)}return{x:m,y:_,placement:C,strategy:o,middlewareData:b}};async function Ou(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:_="floating",altBoundary:C=!1,padding:b=0}=Ji(t,e),v=FC(b),T=l[C?_==="floating"?"reference":"floating":_],O=ff(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(T)))==null||n?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),A=_==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),P=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},M=ff(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:A,offsetParent:D,strategy:u}):A);return{top:(O.top-M.top+v.top)/P.y,bottom:(M.bottom-O.bottom+v.bottom)/P.y,left:(O.left-M.left+v.left)/P.x,right:(M.right-O.right+v.right)/P.x}}const ZD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:p,padding:m=0}=Ji(e,t)||{};if(p==null)return{};const _=FC(m),C={x:n,y:r},b=Qg(o),v=Xg(b),y=await a.getDimensions(p),T=b==="y",O=T?"top":"left",A=T?"bottom":"right",D=T?"clientHeight":"clientWidth",P=i.reference[v]+i.reference[b]-C[b]-i.floating[v],M=C[b]-i.reference[b],V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(p));let J=V?V[D]:0;(!J||!await(a.isElement==null?void 0:a.isElement(V)))&&(J=l.floating[D]||i.floating[v]);const oe=P/2-M/2,Z=J/2-y[v]/2-1,U=Pa(_[O],Z),Q=Pa(_[A],Z),de=U,pe=J-y[v]-Q,te=J/2-y[v]/2+oe,he=Jp(de,te,pe),Y=!u.arrow&&oc(o)!=null&&te!==he&&i.reference[v]/2-(te<de?U:Q)-y[v]/2<0,j=Y?te<de?te-de:te-pe:0;return{[b]:C[b]+j,data:{[b]:he,centerOffset:te-he-j,...Y&&{alignmentOffset:j}},reset:Y}}}),JD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:p}=t,{mainAxis:m=!0,crossAxis:_=!0,fallbackPlacements:C,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...T}=Ji(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const O=Xi(o),A=Ia(l),D=Xi(l)===l,P=await(u.isRTL==null?void 0:u.isRTL(p.floating)),M=C||(D||!y?[df(l)]:KD(l)),V=v!=="none";!C&&V&&M.push(...VD(l,y,v,P));const J=[l,...M],oe=await Ou(t,T),Z=[];let U=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&Z.push(oe[O]),_){const te=GD(o,a,P);Z.push(oe[te[0]],oe[te[1]])}if(U=[...U,{placement:o,overflows:Z}],!Z.every(te=>te<=0)){var Q,de;const te=(((Q=i.flip)==null?void 0:Q.index)||0)+1,he=J[te];if(he)return{data:{index:te,overflows:U},reset:{placement:he}};let Y=(de=U.filter(j=>j.overflows[0]<=0).sort((j,ee)=>j.overflows[1]-ee.overflows[1])[0])==null?void 0:de.placement;if(!Y)switch(b){case"bestFit":{var pe;const j=(pe=U.filter(ee=>{if(V){const ne=Ia(ee.placement);return ne===A||ne==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(ne=>ne>0).reduce((ne,B)=>ne+B,0)]).sort((ee,ne)=>ee[1]-ne[1])[0])==null?void 0:pe[0];j&&(Y=j);break}case"initialPlacement":Y=l;break}if(o!==Y)return{reset:{placement:Y}}}return{}}}};function Tb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Nb(e){return WD.some(t=>e[t]>=0)}const XD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ji(e,t);switch(r){case"referenceHidden":{const i=await Ou(t,{...o,elementContext:"reference"}),a=Tb(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Nb(a)}}}case"escaped":{const i=await Ou(t,{...o,altBoundary:!0}),a=Tb(i,n.floating);return{data:{escapedOffsets:a,escaped:Nb(a)}}}default:return{}}}}};async function QD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Xi(n),l=oc(n),u=Ia(n)==="y",p=["left","top"].includes(a)?-1:1,m=i&&u?-1:1,_=Ji(t,e);let{mainAxis:C,crossAxis:b,alignmentAxis:v}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return l&&typeof v=="number"&&(b=l==="end"?v*-1:v),u?{x:b*m,y:C*p}:{x:C*p,y:b*m}}const ek=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,u=await QD(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},tk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:T=>{let{x:O,y:A}=T;return{x:O,y:A}}},...u}=Ji(e,t),p={x:n,y:r},m=await Ou(t,u),_=Ia(Xi(o)),C=Jg(_);let b=p[C],v=p[_];if(i){const T=C==="y"?"top":"left",O=C==="y"?"bottom":"right",A=b+m[T],D=b-m[O];b=Jp(A,b,D)}if(a){const T=_==="y"?"top":"left",O=_==="y"?"bottom":"right",A=v+m[T],D=v-m[O];v=Jp(A,v,D)}const y=l.fn({...t,[C]:b,[_]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[C]:i,[_]:a}}}}}},nk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:p=!0}=Ji(e,t),m={x:n,y:r},_=Ia(o),C=Jg(_);let b=m[C],v=m[_];const y=Ji(l,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const D=C==="y"?"height":"width",P=i.reference[C]-i.floating[D]+T.mainAxis,M=i.reference[C]+i.reference[D]-T.mainAxis;b<P?b=P:b>M&&(b=M)}if(p){var O,A;const D=C==="y"?"width":"height",P=["top","left"].includes(Xi(o)),M=i.reference[_]-i.floating[D]+(P&&((O=a.offset)==null?void 0:O[_])||0)+(P?0:T.crossAxis),V=i.reference[_]+i.reference[D]+(P?0:((A=a.offset)==null?void 0:A[_])||0)-(P?T.crossAxis:0);v<M?v=M:v>V&&(v=V)}return{[C]:b,[_]:v}}}},rk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...p}=Ji(e,t),m=await Ou(t,p),_=Xi(o),C=oc(o),b=Ia(o)==="y",{width:v,height:y}=i.floating;let T,O;_==="top"||_==="bottom"?(T=_,O=C===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(O=_,T=C==="end"?"top":"bottom");const A=y-m.top-m.bottom,D=v-m.left-m.right,P=Pa(y-m[T],A),M=Pa(v-m[O],D),V=!t.middlewareData.shift;let J=P,oe=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(oe=D),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(J=A),V&&!C){const U=ro(m.left,0),Q=ro(m.right,0),de=ro(m.top,0),pe=ro(m.bottom,0);b?oe=v-2*(U!==0||Q!==0?U+Q:ro(m.left,m.right)):J=y-2*(de!==0||pe!==0?de+pe:ro(m.top,m.bottom))}await u({...t,availableWidth:oe,availableHeight:J});const Z=await a.getDimensions(l.floating);return v!==Z.width||y!==Z.height?{reset:{rects:!0}}:{}}}};function Mf(){return typeof window<"u"}function ic(e){return jC(e)?(e.nodeName||"").toLowerCase():"#document"}function ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ci(e){var t;return(t=(jC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jC(e){return Mf()?e instanceof Node||e instanceof ao(e).Node:!1}function Ko(e){return Mf()?e instanceof Element||e instanceof ao(e).Element:!1}function Ei(e){return Mf()?e instanceof HTMLElement||e instanceof ao(e).HTMLElement:!1}function Sb(e){return!Mf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ao(e).ShadowRoot}function Wu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Uo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ok(e){return["table","td","th"].includes(ic(e))}function Pf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function em(e){const t=tm(),n=Ko(e)?Uo(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ik(e){let t=La(e);for(;Ei(t)&&!Vl(t);){if(em(t))return t;if(Pf(t))return null;t=La(t)}return null}function tm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vl(e){return["html","body","#document"].includes(ic(e))}function Uo(e){return ao(e).getComputedStyle(e)}function If(e){return Ko(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function La(e){if(ic(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Sb(e)&&e.host||Ci(e);return Sb(t)?t.host:t}function BC(e){const t=La(e);return Vl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ei(t)&&Wu(t)?t:BC(t)}function Au(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=BC(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ao(o);if(i){const l=Qp(a);return t.concat(a,a.visualViewport||[],Wu(o)?o:[],l&&n?Au(l):[])}return t.concat(o,Au(o,[],n))}function Qp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function WC(e){const t=Uo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ei(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=uf(n)!==i||uf(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function nm(e){return Ko(e)?e:e.contextElement}function Wl(e){const t=nm(e);if(!Ei(t))return _i(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=WC(t);let a=(i?uf(n.width):n.width)/r,l=(i?uf(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const ak=_i(0);function zC(e){const t=ao(e);return!tm()||!t.visualViewport?ak:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ao(e)?!1:t}function xs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=nm(e);let a=_i(1);t&&(r?Ko(r)&&(a=Wl(r)):a=Wl(e));const l=sk(i,n,r)?zC(i):_i(0);let u=(o.left+l.x)/a.x,p=(o.top+l.y)/a.y,m=o.width/a.x,_=o.height/a.y;if(i){const C=ao(i),b=r&&Ko(r)?ao(r):r;let v=C,y=Qp(v);for(;y&&r&&b!==v;){const T=Wl(y),O=y.getBoundingClientRect(),A=Uo(y),D=O.left+(y.clientLeft+parseFloat(A.paddingLeft))*T.x,P=O.top+(y.clientTop+parseFloat(A.paddingTop))*T.y;u*=T.x,p*=T.y,m*=T.x,_*=T.y,u+=D,p+=P,v=ao(y),y=Qp(v)}}return ff({width:m,height:_,x:u,y:p})}function rm(e,t){const n=If(e).scrollLeft;return t?t.left+n:xs(Ci(e)).left+n}function HC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:rm(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function lk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ci(r),l=t?Pf(t.floating):!1;if(r===a||l&&i)return n;let u={scrollLeft:0,scrollTop:0},p=_i(1);const m=_i(0),_=Ei(r);if((_||!_&&!i)&&((ic(r)!=="body"||Wu(a))&&(u=If(r)),Ei(r))){const b=xs(r);p=Wl(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const C=a&&!_&&!i?HC(a,u,!0):_i(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-u.scrollLeft*p.x+m.x+C.x,y:n.y*p.y-u.scrollTop*p.y+m.y+C.y}}function ck(e){return Array.from(e.getClientRects())}function uk(e){const t=Ci(e),n=If(e),r=e.ownerDocument.body,o=ro(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ro(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+rm(e);const l=-n.scrollTop;return Uo(r).direction==="rtl"&&(a+=ro(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function dk(e,t){const n=ao(e),r=Ci(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const p=tm();(!p||p&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}function fk(e,t){const n=xs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ei(e)?Wl(e):_i(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,u=o*i.x,p=r*i.y;return{width:a,height:l,x:u,y:p}}function Ob(e,t,n){let r;if(t==="viewport")r=dk(e,n);else if(t==="document")r=uk(Ci(e));else if(Ko(t))r=fk(t,n);else{const o=zC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ff(r)}function GC(e,t){const n=La(e);return n===t||!Ko(n)||Vl(n)?!1:Uo(n).position==="fixed"||GC(n,t)}function hk(e,t){const n=t.get(e);if(n)return n;let r=Au(e,[],!1).filter(l=>Ko(l)&&ic(l)!=="body"),o=null;const i=Uo(e).position==="fixed";let a=i?La(e):e;for(;Ko(a)&&!Vl(a);){const l=Uo(a),u=em(a);!u&&l.position==="fixed"&&(o=null),(i?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Wu(a)&&!u&&GC(e,a))?r=r.filter(m=>m!==a):o=l,a=La(a)}return t.set(e,r),r}function pk(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Pf(t)?[]:hk(t,this._c):[].concat(n),r],l=a[0],u=a.reduce((p,m)=>{const _=Ob(t,m,o);return p.top=ro(_.top,p.top),p.right=Pa(_.right,p.right),p.bottom=Pa(_.bottom,p.bottom),p.left=ro(_.left,p.left),p},Ob(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function gk(e){const{width:t,height:n}=WC(e);return{width:t,height:n}}function mk(e,t,n){const r=Ei(t),o=Ci(t),i=n==="fixed",a=xs(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const u=_i(0);if(r||!r&&!i)if((ic(t)!=="body"||Wu(o))&&(l=If(t)),r){const C=xs(t,!0,i,t);u.x=C.x+t.clientLeft,u.y=C.y+t.clientTop}else o&&(u.x=rm(o));const p=o&&!r&&!i?HC(o,l):_i(0),m=a.left+l.scrollLeft-u.x-p.x,_=a.top+l.scrollTop-u.y-p.y;return{x:m,y:_,width:a.width,height:a.height}}function ip(e){return Uo(e).position==="static"}function Ab(e,t){if(!Ei(e)||Uo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ci(e)===n&&(n=n.ownerDocument.body),n}function KC(e,t){const n=ao(e);if(Pf(e))return n;if(!Ei(e)){let o=La(e);for(;o&&!Vl(o);){if(Ko(o)&&!ip(o))return o;o=La(o)}return n}let r=Ab(e,t);for(;r&&ok(r)&&ip(r);)r=Ab(r,t);return r&&Vl(r)&&ip(r)&&!em(r)?n:r||ik(e)||n}const vk=async function(e){const t=this.getOffsetParent||KC,n=this.getDimensions,r=await n(e.floating);return{reference:mk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function yk(e){return Uo(e).direction==="rtl"}const bk={convertOffsetParentRelativeRectToViewportRelativeRect:lk,getDocumentElement:Ci,getClippingRect:pk,getOffsetParent:KC,getElementRects:vk,getClientRects:ck,getDimensions:gk,getScale:Wl,isElement:Ko,isRTL:yk};function _k(e,t){let n=null,r;const o=Ci(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),i();const{left:p,top:m,width:_,height:C}=e.getBoundingClientRect();if(l||t(),!_||!C)return;const b=Fd(m),v=Fd(o.clientWidth-(p+_)),y=Fd(o.clientHeight-(m+C)),T=Fd(p),A={rootMargin:-b+"px "+-v+"px "+-y+"px "+-T+"px",threshold:ro(0,Pa(1,u))||1};let D=!0;function P(M){const V=M[0].intersectionRatio;if(V!==u){if(!D)return a();V?a(!1,V):r=setTimeout(()=>{a(!1,1e-7)},1e3)}D=!1}try{n=new IntersectionObserver(P,{...A,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,A)}n.observe(e)}return a(!0),i}function xk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,p=nm(e),m=o||i?[...p?Au(p):[],...Au(t)]:[];m.forEach(O=>{o&&O.addEventListener("scroll",n,{passive:!0}),i&&O.addEventListener("resize",n)});const _=p&&l?_k(p,n):null;let C=-1,b=null;a&&(b=new ResizeObserver(O=>{let[A]=O;A&&A.target===p&&b&&(b.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var D;(D=b)==null||D.observe(t)})),n()}),p&&!u&&b.observe(p),b.observe(t));let v,y=u?xs(e):null;u&&T();function T(){const O=xs(e);y&&(O.x!==y.x||O.y!==y.y||O.width!==y.width||O.height!==y.height)&&n(),y=O,v=requestAnimationFrame(T)}return n(),()=>{var O;m.forEach(A=>{o&&A.removeEventListener("scroll",n),i&&A.removeEventListener("resize",n)}),_==null||_(),(O=b)==null||O.disconnect(),b=null,u&&cancelAnimationFrame(v)}}const Ek=ek,Ck=tk,wk=JD,Tk=rk,Nk=XD,Rb=ZD,Sk=nk,Ok=(e,t,n)=>{const r=new Map,o={platform:bk,...n},i={...o.platform,_c:r};return qD(e,t,{...o,platform:i})};var ef=typeof document<"u"?H.useLayoutEffect:H.useEffect;function hf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!hf(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!hf(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function UC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $b(e,t){const n=UC(e);return Math.round(t*n)/n}function ap(e){const t=ge.useRef(e);return ef(()=>{t.current=e}),t}function Ak(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:u,open:p}=e,[m,_]=ge.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,b]=ge.useState(r);hf(C,r)||b(r);const[v,y]=ge.useState(null),[T,O]=ge.useState(null),A=ge.useCallback(ee=>{ee!==V.current&&(V.current=ee,y(ee))},[]),D=ge.useCallback(ee=>{ee!==J.current&&(J.current=ee,O(ee))},[]),P=i||v,M=a||T,V=ge.useRef(null),J=ge.useRef(null),oe=ge.useRef(m),Z=u!=null,U=ap(u),Q=ap(o),de=ap(p),pe=ge.useCallback(()=>{if(!V.current||!J.current)return;const ee={placement:t,strategy:n,middleware:C};Q.current&&(ee.platform=Q.current),Ok(V.current,J.current,ee).then(ne=>{const B={...ne,isPositioned:de.current!==!1};te.current&&!hf(oe.current,B)&&(oe.current=B,Gx.flushSync(()=>{_(B)}))})},[C,t,n,Q,de]);ef(()=>{p===!1&&oe.current.isPositioned&&(oe.current.isPositioned=!1,_(ee=>({...ee,isPositioned:!1})))},[p]);const te=ge.useRef(!1);ef(()=>(te.current=!0,()=>{te.current=!1}),[]),ef(()=>{if(P&&(V.current=P),M&&(J.current=M),P&&M){if(U.current)return U.current(P,M,pe);pe()}},[P,M,pe,U,Z]);const he=ge.useMemo(()=>({reference:V,floating:J,setReference:A,setFloating:D}),[A,D]),Y=ge.useMemo(()=>({reference:P,floating:M}),[P,M]),j=ge.useMemo(()=>{const ee={position:n,left:0,top:0};if(!Y.floating)return ee;const ne=$b(Y.floating,m.x),B=$b(Y.floating,m.y);return l?{...ee,transform:"translate("+ne+"px, "+B+"px)",...UC(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:B}},[n,l,Y.floating,m.x,m.y]);return ge.useMemo(()=>({...m,update:pe,refs:he,elements:Y,floatingStyles:j}),[m,pe,he,Y,j])}const Rk=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Rb({element:r.current,padding:o}).fn(n):{}:r?Rb({element:r,padding:o}).fn(n):{}}}},$k=(e,t)=>({...Ek(e),options:[e,t]}),Dk=(e,t)=>({...Ck(e),options:[e,t]}),kk=(e,t)=>({...Sk(e),options:[e,t]}),Mk=(e,t)=>({...wk(e),options:[e,t]}),Pk=(e,t)=>({...Tk(e),options:[e,t]}),Ik=(e,t)=>({...Nk(e),options:[e,t]}),Lk=(e,t)=>({...Rk(e),options:[e,t]});var Fk="Arrow",VC=ge.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return re.jsx(kn.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:re.jsx("polygon",{points:"0,0 30,0 15,10"})})});VC.displayName=Fk;var jk=VC;function Lf(e,t=[]){let n=[];function r(i,a){const l=ge.createContext(a),u=n.length;n=[...n,a];function p(_){const{scope:C,children:b,...v}=_,y=(C==null?void 0:C[e][u])||l,T=ge.useMemo(()=>v,Object.values(v));return re.jsx(y.Provider,{value:T,children:b})}function m(_,C){const b=(C==null?void 0:C[e][u])||l,v=ge.useContext(b);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${_}\` must be used within \`${i}\``)}return p.displayName=i+"Provider",[p,m]}const o=()=>{const i=n.map(a=>ge.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return ge.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,Bk(o,...t)]}function Bk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const _=u(i)[`__scope${p}`];return{...l,..._}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function om(e){const[t,n]=ge.useState(void 0);return _s(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,l;if("borderBoxSize"in i){const u=i.borderBoxSize,p=Array.isArray(u)?u[0]:u;a=p.inlineSize,l=p.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var im="Popper",[YC,qC]=Lf(im),[Wk,ZC]=YC(im),JC=e=>{const{__scopePopper:t,children:n}=e,[r,o]=ge.useState(null);return re.jsx(Wk,{scope:t,anchor:r,onAnchorChange:o,children:n})};JC.displayName=im;var XC="PopperAnchor",QC=ge.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=ZC(XC,n),a=ge.useRef(null),l=cr(t,a);return ge.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:re.jsx(kn.div,{...o,ref:l})});QC.displayName=XC;var am="PopperContent",[zk,Hk]=YC(am),ew=ge.forwardRef((e,t)=>{var q,ue,fe,se,Ce,Oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:_="partial",hideWhenDetached:C=!1,updatePositionStrategy:b="optimized",onPlaced:v,...y}=e,T=ZC(am,n),[O,A]=ge.useState(null),D=cr(t,Be=>A(Be)),[P,M]=ge.useState(null),V=om(P),J=(V==null?void 0:V.width)??0,oe=(V==null?void 0:V.height)??0,Z=r+(i!=="center"?"-"+i:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Q=Array.isArray(p)?p:[p],de=Q.length>0,pe={padding:U,boundary:Q.filter(Kk),altBoundary:de},{refs:te,floatingStyles:he,placement:Y,isPositioned:j,middlewareData:ee}=Ak({strategy:"fixed",placement:Z,whileElementsMounted:(...Be)=>xk(...Be,{animationFrame:b==="always"}),elements:{reference:T.anchor},middleware:[$k({mainAxis:o+oe,alignmentAxis:a}),u&&Dk({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?kk():void 0,...pe}),u&&Mk({...pe}),Pk({...pe,apply:({elements:Be,rects:ce,availableWidth:le,availableHeight:ye})=>{const{width:Me,height:Pe}=ce.reference,We=Be.floating.style;We.setProperty("--radix-popper-available-width",`${le}px`),We.setProperty("--radix-popper-available-height",`${ye}px`),We.setProperty("--radix-popper-anchor-width",`${Me}px`),We.setProperty("--radix-popper-anchor-height",`${Pe}px`)}}),P&&Lk({element:P,padding:l}),Uk({arrowWidth:J,arrowHeight:oe}),C&&Ik({strategy:"referenceHidden",...pe})]}),[ne,B]=rw(Y),W=Zi(v);_s(()=>{j&&(W==null||W())},[j,W]);const X=(q=ee.arrow)==null?void 0:q.x,F=(ue=ee.arrow)==null?void 0:ue.y,w=((fe=ee.arrow)==null?void 0:fe.centerOffset)!==0,[N,I]=ge.useState();return _s(()=>{O&&I(window.getComputedStyle(O).zIndex)},[O]),re.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:j?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[(se=ee.transformOrigin)==null?void 0:se.x,(Ce=ee.transformOrigin)==null?void 0:Ce.y].join(" "),...((Oe=ee.hide)==null?void 0:Oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:re.jsx(zk,{scope:n,placedSide:ne,onArrowChange:M,arrowX:X,arrowY:F,shouldHideArrow:w,children:re.jsx(kn.div,{"data-side":ne,"data-align":B,...y,ref:D,style:{...y.style,animation:j?void 0:"none"}})})})});ew.displayName=am;var tw="PopperArrow",Gk={top:"bottom",right:"left",bottom:"top",left:"right"},nw=ge.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Hk(tw,r),a=Gk[i.placedSide];return re.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:re.jsx(jk,{...o,ref:n,style:{...o.style,display:"block"}})})});nw.displayName=tw;function Kk(e){return e!==null}var Uk=e=>({name:"transformOrigin",options:e,fn(t){var T,O,A;const{placement:n,rects:r,middlewareData:o}=t,a=((T=o.arrow)==null?void 0:T.centerOffset)!==0,l=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[p,m]=rw(n),_={start:"0%",center:"50%",end:"100%"}[m],C=(((O=o.arrow)==null?void 0:O.x)??0)+l/2,b=(((A=o.arrow)==null?void 0:A.y)??0)+u/2;let v="",y="";return p==="bottom"?(v=a?_:`${C}px`,y=`${-u}px`):p==="top"?(v=a?_:`${C}px`,y=`${r.floating.height+u}px`):p==="right"?(v=`${-u}px`,y=a?_:`${b}px`):p==="left"&&(v=`${r.floating.width+u}px`,y=a?_:`${b}px`),{data:{x:v,y}}}});function rw(e){const[t,n="center"]=e.split("-");return[t,n]}var Vk=JC,Yk=QC,qk=ew,Zk=nw,Jk="Portal",ow=ge.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=ge.useState(!1);_s(()=>i(!0),[]);const a=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?ku.createPortal(re.jsx(kn.div,{...r,ref:t}),a):null});ow.displayName=Jk;function Xk(e,t){return ge.useReducer((n,r)=>t[n][r]??n,e)}var ac=e=>{const{present:t,children:n}=e,r=Qk(t),o=typeof n=="function"?n({present:r.isPresent}):ge.Children.only(n),i=cr(r.ref,eM(o));return typeof n=="function"||r.isPresent?ge.cloneElement(o,{ref:i}):null};ac.displayName="Presence";function Qk(e){const[t,n]=ge.useState(),r=ge.useRef({}),o=ge.useRef(e),i=ge.useRef("none"),a=e?"mounted":"unmounted",[l,u]=Xk(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ge.useEffect(()=>{const p=jd(r.current);i.current=l==="mounted"?p:"none"},[l]),_s(()=>{const p=r.current,m=o.current;if(m!==e){const C=i.current,b=jd(p);e?u("MOUNT"):b==="none"||(p==null?void 0:p.display)==="none"?u("UNMOUNT"):u(m&&C!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),_s(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,_=b=>{const y=jd(r.current).includes(b.animationName);if(b.target===t&&y&&(u("ANIMATION_END"),!o.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},C=b=>{b.target===t&&(i.current=jd(r.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",_),t.addEventListener("animationend",_),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",_),t.removeEventListener("animationend",_)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:ge.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function jd(e){return(e==null?void 0:e.animationName)||"none"}function eM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=tM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,l=Zi(n),u=ge.useCallback(p=>{if(i){const _=typeof p=="function"?p(e):p;_!==e&&l(_)}else o(p)},[i,e,o,l]);return[a,u]}function tM({defaultProp:e,onChange:t}){const n=ge.useState(e),[r]=n,o=ge.useRef(r),i=Zi(t);return ge.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var nM="VisuallyHidden",iw=ge.forwardRef((e,t)=>re.jsx(kn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));iw.displayName=nM;var rM=iw,[Ff,uJ]=rc("Tooltip",[qC]),jf=qC(),aw="TooltipProvider",oM=700,eg="tooltip.open",[iM,sm]=Ff(aw),sw=e=>{const{__scopeTooltip:t,delayDuration:n=oM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=ge.useState(!0),u=ge.useRef(!1),p=ge.useRef(0);return ge.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),re.jsx(iM,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:ge.useCallback(()=>{window.clearTimeout(p.current),l(!1)},[]),onClose:ge.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:ge.useCallback(m=>{u.current=m},[]),disableHoverableContent:o,children:i})};sw.displayName=aw;var Bf="Tooltip",[aM,Wf]=Ff(Bf),lw=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,u=sm(Bf,e.__scopeTooltip),p=jf(t),[m,_]=ge.useState(null),C=Cu(),b=ge.useRef(0),v=a??u.disableHoverableContent,y=l??u.delayDuration,T=ge.useRef(!1),[O=!1,A]=zu({prop:r,defaultProp:o,onChange:J=>{J?(u.onOpen(),document.dispatchEvent(new CustomEvent(eg))):u.onClose(),i==null||i(J)}}),D=ge.useMemo(()=>O?T.current?"delayed-open":"instant-open":"closed",[O]),P=ge.useCallback(()=>{window.clearTimeout(b.current),T.current=!1,A(!0)},[A]),M=ge.useCallback(()=>{window.clearTimeout(b.current),A(!1)},[A]),V=ge.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{T.current=!0,A(!0)},y)},[y,A]);return ge.useEffect(()=>()=>window.clearTimeout(b.current),[]),re.jsx(Vk,{...p,children:re.jsx(aM,{scope:t,contentId:C,open:O,stateAttribute:D,trigger:m,onTriggerChange:_,onTriggerEnter:ge.useCallback(()=>{u.isOpenDelayed?V():P()},[u.isOpenDelayed,V,P]),onTriggerLeave:ge.useCallback(()=>{v?M():window.clearTimeout(b.current)},[M,v]),onOpen:P,onClose:M,disableHoverableContent:v,children:n})})};lw.displayName=Bf;var tg="TooltipTrigger",cw=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Wf(tg,n),i=sm(tg,n),a=jf(n),l=ge.useRef(null),u=cr(t,l,o.onTriggerChange),p=ge.useRef(!1),m=ge.useRef(!1),_=ge.useCallback(()=>p.current=!1,[]);return ge.useEffect(()=>()=>document.removeEventListener("pointerup",_),[_]),re.jsx(Yk,{asChild:!0,...a,children:re.jsx(kn.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:On(e.onPointerMove,C=>{C.pointerType!=="touch"&&!m.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:On(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:On(e.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",_,{once:!0})}),onFocus:On(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:On(e.onBlur,o.onClose),onClick:On(e.onClick,o.onClose)})})});cw.displayName=tg;var sM="TooltipPortal",[dJ,lM]=Ff(sM,{forceMount:void 0}),Yl="TooltipContent",uw=ge.forwardRef((e,t)=>{const n=lM(Yl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Wf(Yl,e.__scopeTooltip);return re.jsx(ac,{present:r||a.open,children:a.disableHoverableContent?re.jsx(dw,{side:o,...i,ref:t}):re.jsx(cM,{side:o,...i,ref:t})})}),cM=ge.forwardRef((e,t)=>{const n=Wf(Yl,e.__scopeTooltip),r=sm(Yl,e.__scopeTooltip),o=ge.useRef(null),i=cr(t,o),[a,l]=ge.useState(null),{trigger:u,onClose:p}=n,m=o.current,{onPointerInTransitChange:_}=r,C=ge.useCallback(()=>{l(null),_(!1)},[_]),b=ge.useCallback((v,y)=>{const T=v.currentTarget,O={x:v.clientX,y:v.clientY},A=fM(O,T.getBoundingClientRect()),D=hM(O,A),P=pM(y.getBoundingClientRect()),M=mM([...D,...P]);l(M),_(!0)},[_]);return ge.useEffect(()=>()=>C(),[C]),ge.useEffect(()=>{if(u&&m){const v=T=>b(T,m),y=T=>b(T,u);return u.addEventListener("pointerleave",v),m.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",v),m.removeEventListener("pointerleave",y)}}},[u,m,b,C]),ge.useEffect(()=>{if(a){const v=y=>{const T=y.target,O={x:y.clientX,y:y.clientY},A=(u==null?void 0:u.contains(T))||(m==null?void 0:m.contains(T)),D=!gM(O,a);A?C():D&&(C(),p())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,m,a,p,C]),re.jsx(dw,{...e,ref:i})}),[uM,dM]=Ff(Bf,{isInside:!1}),dw=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,u=Wf(Yl,n),p=jf(n),{onClose:m}=u;return ge.useEffect(()=>(document.addEventListener(eg,m),()=>document.removeEventListener(eg,m)),[m]),ge.useEffect(()=>{if(u.trigger){const _=C=>{const b=C.target;b!=null&&b.contains(u.trigger)&&m()};return window.addEventListener("scroll",_,{capture:!0}),()=>window.removeEventListener("scroll",_,{capture:!0})}},[u.trigger,m]),re.jsx(Zg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:_=>_.preventDefault(),onDismiss:m,children:re.jsxs(qk,{"data-state":u.stateAttribute,...p,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[re.jsx(Og,{children:r}),re.jsx(uM,{scope:n,isInside:!0,children:re.jsx(rM,{id:u.contentId,role:"tooltip",children:o||r})})]})})});uw.displayName=Yl;var fw="TooltipArrow",hw=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jf(n);return dM(fw,n).isInside?null:re.jsx(Zk,{...o,...r,ref:t})});hw.displayName=fw;function fM(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function hM(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function pM(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function gM(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const l=t[i].x,u=t[i].y,p=t[a].x,m=t[a].y;u>r!=m>r&&n<(p-l)*(r-u)/(m-u)+l&&(o=!o)}return o}function mM(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),vM(t)}function vM(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var yM=sw,bM=lw,_M=cw,pw=uw,xM=hw;const lm="-",EM=e=>{const t=wM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(lm);return l[0]===""&&l.length!==1&&l.shift(),gw(l,t)||CM(a)},getConflictingClassGroupIds:(a,l)=>{const u=n[a]||[];return l&&r[a]?[...u,...r[a]]:u}}},gw=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?gw(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(lm);return(a=t.validators.find(({validator:l})=>l(i)))==null?void 0:a.classGroupId},Db=/^\[(.+)\]$/,CM=e=>{if(Db.test(e)){const t=Db.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},wM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return NM(Object.entries(e.classGroups),n).forEach(([i,a])=>{ng(a,r,i,t)}),r},ng=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:kb(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(TM(o)){ng(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{ng(a,kb(t,i),n,r)})})},kb=(e,t)=>{let n=e;return t.split(lm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},TM=e=>e.isThemeGetter,NM=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,l])=>[t+a,l])):i);return[n,o]}):e,SM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},mw="!",OM=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=l=>{const u=[];let p=0,m=0,_;for(let T=0;T<l.length;T++){let O=l[T];if(p===0){if(O===o&&(r||l.slice(T,T+i)===t)){u.push(l.slice(m,T)),m=T+i;continue}if(O==="/"){_=T;continue}}O==="["?p++:O==="]"&&p--}const C=u.length===0?l:l.substring(m),b=C.startsWith(mw),v=b?C.substring(1):C,y=_&&_>m?_-m:void 0;return{modifiers:u,hasImportantModifier:b,baseClassName:v,maybePostfixModifierPosition:y}};return n?l=>n({className:l,parseClassName:a}):a},AM=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},RM=e=>({cache:SM(e.cacheSize),parseClassName:OM(e),...EM(e)}),$M=/\s+/,DM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split($M);let l="";for(let u=a.length-1;u>=0;u-=1){const p=a[u],{modifiers:m,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:b}=n(p);let v=!!b,y=r(v?C.substring(0,b):C);if(!y){if(!v){l=p+(l.length>0?" "+l:l);continue}if(y=r(C),!y){l=p+(l.length>0?" "+l:l);continue}v=!1}const T=AM(m).join(":"),O=_?T+mw:T,A=O+y;if(i.includes(A))continue;i.push(A);const D=o(y,v);for(let P=0;P<D.length;++P){const M=D[P];i.push(O+M)}l=p+(l.length>0?" "+l:l)}return l};function kM(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vw(t))&&(r&&(r+=" "),r+=n);return r}const vw=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vw(e[r]))&&(n&&(n+=" "),n+=t);return n};function MM(e,...t){let n,r,o,i=a;function a(u){const p=t.reduce((m,_)=>_(m),e());return n=RM(p),r=n.cache.get,o=n.cache.set,i=l,l(u)}function l(u){const p=r(u);if(p)return p;const m=DM(u,n);return o(u,m),m}return function(){return i(kM.apply(null,arguments))}}const Tn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},yw=/^\[(?:([a-z-]+):)?(.+)\]$/i,PM=/^\d+\/\d+$/,IM=new Set(["px","full","screen"]),LM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,BM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,WM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ki=e=>zl(e)||IM.has(e)||PM.test(e),Sa=e=>sc(e,"length",qM),zl=e=>!!e&&!Number.isNaN(Number(e)),sp=e=>sc(e,"number",zl),uu=e=>!!e&&Number.isInteger(Number(e)),zM=e=>e.endsWith("%")&&zl(e.slice(0,-1)),qt=e=>yw.test(e),Oa=e=>LM.test(e),HM=new Set(["length","size","percentage"]),GM=e=>sc(e,HM,bw),KM=e=>sc(e,"position",bw),UM=new Set(["image","url"]),VM=e=>sc(e,UM,JM),YM=e=>sc(e,"",ZM),du=()=>!0,sc=(e,t,n)=>{const r=yw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},qM=e=>FM.test(e)&&!jM.test(e),bw=()=>!1,ZM=e=>BM.test(e),JM=e=>WM.test(e),XM=()=>{const e=Tn("colors"),t=Tn("spacing"),n=Tn("blur"),r=Tn("brightness"),o=Tn("borderColor"),i=Tn("borderRadius"),a=Tn("borderSpacing"),l=Tn("borderWidth"),u=Tn("contrast"),p=Tn("grayscale"),m=Tn("hueRotate"),_=Tn("invert"),C=Tn("gap"),b=Tn("gradientColorStops"),v=Tn("gradientColorStopPositions"),y=Tn("inset"),T=Tn("margin"),O=Tn("opacity"),A=Tn("padding"),D=Tn("saturate"),P=Tn("scale"),M=Tn("sepia"),V=Tn("skew"),J=Tn("space"),oe=Tn("translate"),Z=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",qt,t],de=()=>[qt,t],pe=()=>["",Ki,Sa],te=()=>["auto",zl,qt],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",qt],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[zl,qt];return{cacheSize:500,separator:":",theme:{colors:[du],spacing:[Ki,Sa],blur:["none","",Oa,qt],brightness:W(),borderColor:[e],borderRadius:["none","","full",Oa,qt],borderSpacing:de(),borderWidth:pe(),contrast:W(),grayscale:ne(),hueRotate:W(),invert:ne(),gap:de(),gradientColorStops:[e],gradientColorStopPositions:[zM,Sa],inset:Q(),margin:Q(),opacity:W(),padding:de(),saturate:W(),scale:W(),sepia:ne(),skew:W(),space:de(),translate:de()},classGroups:{aspect:[{aspect:["auto","square","video",qt]}],container:["container"],columns:[{columns:[Oa]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...he(),qt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",uu,qt]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qt]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",uu,qt]}],"grid-cols":[{"grid-cols":[du]}],"col-start-end":[{col:["auto",{span:["full",uu,qt]},qt]}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":[du]}],"row-start-end":[{row:["auto",{span:[uu,qt]},qt]}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qt]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],ms:[{ms:[T]}],me:[{me:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qt,t]}],"min-w":[{"min-w":[qt,t,"min","max","fit"]}],"max-w":[{"max-w":[qt,t,"none","full","min","max","fit","prose",{screen:[Oa]},Oa]}],h:[{h:[qt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Oa,Sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",sp]}],"font-family":[{font:[du]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qt]}],"line-clamp":[{"line-clamp":["none",zl,sp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ki,qt]}],"list-image":[{"list-image":["none",qt]}],"list-style-type":[{list:["none","disc","decimal",qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ki,Sa]}],"underline-offset":[{"underline-offset":["auto",Ki,qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:de()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),KM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",GM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},VM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:Y()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[Ki,qt]}],"outline-w":[{outline:[Ki,Sa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[Ki,Sa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Oa,YM]}],"shadow-color":[{shadow:[du]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Oa,qt]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[_]}],saturate:[{saturate:[D]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qt]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",qt]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[uu,qt]}],"translate-x":[{"translate-x":[oe]}],"translate-y":[{"translate-y":[oe]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":de()}],"scroll-mx":[{"scroll-mx":de()}],"scroll-my":[{"scroll-my":de()}],"scroll-ms":[{"scroll-ms":de()}],"scroll-me":[{"scroll-me":de()}],"scroll-mt":[{"scroll-mt":de()}],"scroll-mr":[{"scroll-mr":de()}],"scroll-mb":[{"scroll-mb":de()}],"scroll-ml":[{"scroll-ml":de()}],"scroll-p":[{"scroll-p":de()}],"scroll-px":[{"scroll-px":de()}],"scroll-py":[{"scroll-py":de()}],"scroll-ps":[{"scroll-ps":de()}],"scroll-pe":[{"scroll-pe":de()}],"scroll-pt":[{"scroll-pt":de()}],"scroll-pr":[{"scroll-pr":de()}],"scroll-pb":[{"scroll-pb":de()}],"scroll-pl":[{"scroll-pl":de()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ki,Sa,sp]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},QM=MM(XM);function gn(...e){return QM(Mu(e))}const _w=yM,xw=bM,Ew=_M,Cw=xM,cm=ge.forwardRef(({className:e,sideOffset:t=4,...n},r)=>re.jsx(pw,{ref:r,sideOffset:t,className:gn("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...n}));cm.displayName=pw.displayName;const _o=({displayName:e,fieldId:t,constantValueEnabled:n,children:r})=>{const{tooltipsVisible:o}=Nw();if(!o)return r;let i="";return e&&t?i=`${e} (${t})`:t?i=`${t}`:e&&(i=`${e}`),re.jsx("div",{children:re.jsx(_w,{children:re.jsxs(xw,{open:!!i&&!n,children:[re.jsx(Ew,{asChild:!0,children:re.jsx("div",{className:"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]",children:r})}),re.jsxs(cm,{children:[re.jsx("p",{children:i}),re.jsx(Cw,{fill:"bg-popover"})]})]})})})},ww=H.createContext(void 0),Tw=({children:e})=>{const[t,n]=H.useState(!1),r=()=>{n(o=>!o)};return re.jsx(ww.Provider,{value:{tooltipsVisible:t,toggleTooltips:r},children:e})},Nw=()=>{const e=H.useContext(ww);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},lr=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],Sw=(e,t,n="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:n}),Wo=(e,t)=>{const[n,r]=H.useState("pending");return Ow(e,t,eP(r)),{sendToParent:i=>{if(!window.parent)throw new Error("Parent window has closed");r("pending");for(const a of t)Sw({...i,type:e},window.parent,a)},status:n}},ka=(e,t,n)=>{Ow(e,t,(o,i,a)=>{const{type:l,payload:u}=o;l===e&&typeof n=="function"&&n(p=>Sw({...p,type:e},a,i),u)})},Ow=(e,t,n)=>{const[r,o]=H.useState(),[i,a]=H.useState(),l=H.useRef(),u=H.useRef();l.current=r,u.current=i;const p=H.useCallback(({origin:m,source:_,data:C})=>{var v;if((v=C==null?void 0:C.source)!=null&&v.startsWith("react-devtools")||!t.includes(m))return;const{type:b}=C;b===e&&(a(_),o(m),n(C,m,_))},[e,t,a,o,n]);H.useEffect(()=>(window.addEventListener("message",p),()=>window.removeEventListener("message",p)),[e,i,r,p])},eP=e=>(t,n,r)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")},tP=()=>{const[e,t]=H.useState(void 0);return ka("getTemplateStream",lr,(n,r)=>{t(r.stream.schema.fields),n({status:"success",payload:{message:"templateStream received"}})}),ka("getDevEntityFields",lr,(n,r)=>{t(Aw(r)),n({status:"success",payload:{message:"getDevEntityFields received"}})}),e},Aw=e=>e.map(t=>({name:t.name,definition:{name:t.name,typeName:t.typeName,type:t.type,registryId:t.registryId,typeRegistryId:t.typeRegistryId,isList:t.isList},children:t.children?{fields:Aw(t.children)}:{}})),Rw=ge.createContext(void 0),nP=({entityFields:e,children:t})=>re.jsx(Rw.Provider,{value:e,children:t}),$w=()=>{const e=ge.useContext(Rw);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},rP=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],oP=[],Dw=e=>kw(e,""),kw=(e,t)=>{var o,i,a;const n=t?`${t}.${e.name}`:e.name;if(oP.includes(Mw(e)))return[{name:n,schemaField:e}];if(e.definition.isList)return[{name:n,schemaField:e}];const r=[{name:n,schemaField:e}];if((o=e.children)!=null&&o.fields&&((a=(i=e.children)==null?void 0:i.fields)==null?void 0:a.length)>0)for(const l of e.children.fields)r.push(...kw(l,n));return r},Mw=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function iP(e,t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),e}const aP=e=>e.reduce((t,n)=>{const r=Dw(n);for(const o of r){const i=Mw(o.schemaField);i&&(t=iP(t,i,o.name))}return t},new Map),sP=e=>{let n=$w().filter(o=>!rP.includes(o.name));if(e!=null&&e.allowList){const o=n.map(i=>i.name);e.allowList.forEach(i=>{o.includes(i)||console.warn(`The entity field filter allowList included ${i}, which does not exist in the stream.`)}),n=n.filter(i=>e.allowList.includes(i.name))}e!=null&&e.disallowList&&(n=n.filter(o=>!e.disallowList.includes(o.name)));let r=[];for(const o of n){const i=Dw(o);for(const a of i)r.push({...a.schemaField,name:a.name})}if(e!=null&&e.types){const o=aP(r),i=[];e.types.forEach(a=>{i.push(...r.filter(l=>{var u;return(u=o.get(a))==null?void 0:u.includes(l.name)}))}),r=i}return r=r.filter(o=>!!o.definition.isList==!!(e!=null&&e.includeListsOnly)),r};function lP(e){const t=e+"CollectionProvider",[n,r]=Lf(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:v,children:y}=b,T=H.useRef(null),O=H.useRef(new Map).current;return re.jsx(o,{scope:v,itemMap:O,collectionRef:T,children:y})};a.displayName=t;const l=e+"CollectionSlot",u=H.forwardRef((b,v)=>{const{scope:y,children:T}=b,O=i(l,y),A=cr(v,O.collectionRef);return re.jsx(Ma,{ref:A,children:T})});u.displayName=l;const p=e+"CollectionItemSlot",m="data-radix-collection-item",_=H.forwardRef((b,v)=>{const{scope:y,children:T,...O}=b,A=H.useRef(null),D=cr(v,A),P=i(p,y);return H.useEffect(()=>(P.itemMap.set(A,{ref:A,...O}),()=>void P.itemMap.delete(A))),re.jsx(Ma,{[m]:"",ref:D,children:T})});_.displayName=p;function C(b){const v=i(e+"CollectionConsumer",b);return H.useCallback(()=>{const T=v.collectionRef.current;if(!T)return[];const O=Array.from(T.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((P,M)=>O.indexOf(P.ref.current)-O.indexOf(M.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:_},C,r]}var cP=ge.createContext(void 0);function Pw(e){const t=ge.useContext(cP);return e||t||"ltr"}var lp="rovingFocusGroup.onEntryFocus",uP={bubbles:!1,cancelable:!0},zf="RovingFocusGroup",[rg,Iw,dP]=lP(zf),[fP,Lw]=Lf(zf,[dP]),[hP,pP]=fP(zf),Fw=ge.forwardRef((e,t)=>re.jsx(rg.Provider,{scope:e.__scopeRovingFocusGroup,children:re.jsx(rg.Slot,{scope:e.__scopeRovingFocusGroup,children:re.jsx(gP,{...e,ref:t})})}));Fw.displayName=zf;var gP=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,..._}=e,C=ge.useRef(null),b=cr(t,C),v=Pw(i),[y=null,T]=zu({prop:a,defaultProp:l,onChange:u}),[O,A]=ge.useState(!1),D=Zi(p),P=Iw(n),M=ge.useRef(!1),[V,J]=ge.useState(0);return ge.useEffect(()=>{const oe=C.current;if(oe)return oe.addEventListener(lp,D),()=>oe.removeEventListener(lp,D)},[D]),re.jsx(hP,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:y,onItemFocus:ge.useCallback(oe=>T(oe),[T]),onItemShiftTab:ge.useCallback(()=>A(!0),[]),onFocusableItemAdd:ge.useCallback(()=>J(oe=>oe+1),[]),onFocusableItemRemove:ge.useCallback(()=>J(oe=>oe-1),[]),children:re.jsx(kn.div,{tabIndex:O||V===0?-1:0,"data-orientation":r,..._,ref:b,style:{outline:"none",...e.style},onMouseDown:On(e.onMouseDown,()=>{M.current=!0}),onFocus:On(e.onFocus,oe=>{const Z=!M.current;if(oe.target===oe.currentTarget&&Z&&!O){const U=new CustomEvent(lp,uP);if(oe.currentTarget.dispatchEvent(U),!U.defaultPrevented){const Q=P().filter(Y=>Y.focusable),de=Q.find(Y=>Y.active),pe=Q.find(Y=>Y.id===y),he=[de,pe,...Q].filter(Boolean).map(Y=>Y.ref.current);Ww(he,m)}}M.current=!1}),onBlur:On(e.onBlur,()=>A(!1))})})}),jw="RovingFocusGroupItem",Bw=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=Cu(),u=i||l,p=pP(jw,n),m=p.currentTabStopId===u,_=Iw(n),{onFocusableItemAdd:C,onFocusableItemRemove:b}=p;return ge.useEffect(()=>{if(r)return C(),()=>b()},[r,C,b]),re.jsx(rg.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:re.jsx(kn.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...a,ref:t,onMouseDown:On(e.onMouseDown,v=>{r?p.onItemFocus(u):v.preventDefault()}),onFocus:On(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:On(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=yP(v,p.orientation,p.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let O=_().filter(A=>A.focusable).map(A=>A.ref.current);if(y==="last")O.reverse();else if(y==="prev"||y==="next"){y==="prev"&&O.reverse();const A=O.indexOf(v.currentTarget);O=p.loop?bP(O,A+1):O.slice(A+1)}setTimeout(()=>Ww(O))}})})})});Bw.displayName=jw;var mP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yP(e,t,n){const r=vP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return mP[r]}function Ww(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _P=Fw,xP=Bw;function zw(e){const t=ge.useRef({value:e,previous:e});return ge.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var um="Radio",[EP,Hw]=rc(um),[CP,wP]=EP(um),Gw=ge.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:l="on",onCheck:u,form:p,...m}=e,[_,C]=ge.useState(null),b=cr(t,T=>C(T)),v=ge.useRef(!1),y=_?p||!!_.closest("form"):!0;return re.jsxs(CP,{scope:n,checked:o,disabled:a,children:[re.jsx(kn.button,{type:"button",role:"radio","aria-checked":o,"data-state":Vw(o),"data-disabled":a?"":void 0,disabled:a,value:l,...m,ref:b,onClick:On(e.onClick,T=>{o||u==null||u(),y&&(v.current=T.isPropagationStopped(),v.current||T.stopPropagation())})}),y&&re.jsx(TP,{control:_,bubbles:!v.current,name:r,value:l,checked:o,required:i,disabled:a,form:p,style:{transform:"translateX(-100%)"}})]})});Gw.displayName=um;var Kw="RadioIndicator",Uw=ge.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=wP(Kw,n);return re.jsx(ac,{present:r||i.checked,children:re.jsx(kn.span,{"data-state":Vw(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});Uw.displayName=Kw;var TP=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ge.useRef(null),a=zw(n),l=om(t);return ge.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&_){const C=new Event("click",{bubbles:r});_.call(u,n),u.dispatchEvent(C)}},[a,n,r]),re.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Vw(e){return e?"checked":"unchecked"}var NP=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dm="RadioGroup",[SP,fJ]=rc(dm,[Lw,Hw]),Yw=Lw(),qw=Hw(),[OP,AP]=SP(dm),Zw=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:u,dir:p,loop:m=!0,onValueChange:_,...C}=e,b=Yw(n),v=Pw(p),[y,T]=zu({prop:i,defaultProp:o,onChange:_});return re.jsx(OP,{scope:n,name:r,required:a,disabled:l,value:y,onValueChange:T,children:re.jsx(_P,{asChild:!0,...b,orientation:u,dir:v,loop:m,children:re.jsx(kn.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":l?"":void 0,dir:v,...C,ref:t})})})});Zw.displayName=dm;var Jw="RadioGroupItem",Xw=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=AP(Jw,n),a=i.disabled||r,l=Yw(n),u=qw(n),p=ge.useRef(null),m=cr(t,p),_=i.value===o.value,C=ge.useRef(!1);return ge.useEffect(()=>{const b=y=>{NP.includes(y.key)&&(C.current=!0)},v=()=>C.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",v)}},[]),re.jsx(xP,{asChild:!0,...l,focusable:!a,active:_,children:re.jsx(Gw,{disabled:a,required:i.required,checked:_,...u,...o,name:i.name,ref:m,onCheck:()=>i.onValueChange(o.value),onKeyDown:On(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:On(o.onFocus,()=>{var b;C.current&&((b=p.current)==null||b.click())})})})});Xw.displayName=Jw;var RP="RadioGroupIndicator",Qw=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=qw(n);return re.jsx(Uw,{...o,...r,ref:t})});Qw.displayName=RP;var eT=Zw,tT=Xw,$P=Qw;/**
|
|
125
|
-
* @license lucide-react v0.414.0 - ISC
|
|
126
|
-
*
|
|
127
|
-
* This source code is licensed under the ISC license.
|
|
128
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/const DP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nT=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
130
|
-
* @license lucide-react v0.414.0 - ISC
|
|
131
|
-
*
|
|
132
|
-
* This source code is licensed under the ISC license.
|
|
133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/var kP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
135
|
-
* @license lucide-react v0.414.0 - ISC
|
|
136
|
-
*
|
|
137
|
-
* This source code is licensed under the ISC license.
|
|
138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const MP=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},u)=>H.createElement("svg",{ref:u,...kP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:nT("lucide",o),...l},[...a.map(([p,m])=>H.createElement(p,m)),...Array.isArray(i)?i:[i]]));/**
|
|
140
|
-
* @license lucide-react v0.414.0 - ISC
|
|
141
|
-
*
|
|
142
|
-
* This source code is licensed under the ISC license.
|
|
143
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const Ns=(e,t)=>{const n=H.forwardRef(({className:r,...o},i)=>H.createElement(MP,{ref:i,iconNode:t,className:nT(`lucide-${DP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
145
|
-
* @license lucide-react v0.414.0 - ISC
|
|
146
|
-
*
|
|
147
|
-
* This source code is licensed under the ISC license.
|
|
148
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const PP=Ns("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
150
|
-
* @license lucide-react v0.414.0 - ISC
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the ISC license.
|
|
153
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/const IP=Ns("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
155
|
-
* @license lucide-react v0.414.0 - ISC
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the ISC license.
|
|
158
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const LP=Ns("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
160
|
-
* @license lucide-react v0.414.0 - ISC
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the ISC license.
|
|
163
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const FP=Ns("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
165
|
-
* @license lucide-react v0.414.0 - ISC
|
|
166
|
-
*
|
|
167
|
-
* This source code is licensed under the ISC license.
|
|
168
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const jP=Ns("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
170
|
-
* @license lucide-react v0.414.0 - ISC
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the ISC license.
|
|
173
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const BP=Ns("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
|
|
175
|
-
* @license lucide-react v0.414.0 - ISC
|
|
176
|
-
*
|
|
177
|
-
* This source code is licensed under the ISC license.
|
|
178
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const WP=Ns("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),rT=ge.forwardRef(({className:e,...t},n)=>re.jsx(eT,{className:gn("ve-grid ve-gap-2",e),...t,ref:n}));rT.displayName=eT.displayName;const og=ge.forwardRef(({className:e,...t},n)=>re.jsx(tT,{ref:n,className:gn("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:re.jsx($P,{className:"ve-flex ve-items-center ve-justify-center",children:re.jsx(PP,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));og.displayName=tT.displayName;var zP="Label",oT=ge.forwardRef((e,t)=>re.jsx(kn.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));oT.displayName=zP;var iT=oT;const HP=Dr("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),ig=ge.forwardRef(({className:e,...t},n)=>re.jsx(iT,{ref:n,className:gn(HP(),e),...t}));ig.displayName=iT.displayName;const vi=class vi{constructor(t=!1){ul(this,"enable",t=>{vi.enabled=t,vi.enabled&&console.log("[DEBUG] xYextDebug enabled")});ul(this,"logData",(t,n)=>{vi.enabled&&console.log("[DEBUG]",t,"-",n)});ul(this,"logFunc",t=>{vi.enabled&&console.log("[DEBUG] -->",t,"called")});ul(this,"log",t=>{vi.enabled&&console.log("[DEBUG]",t)});vi.enabled=t,vi.enabled&&console.log("[DEBUG] xYextDebug enabled")}};ul(vi,"enabled");let Gr=vi;const GP={type:"custom",render:({onChange:e,value:t})=>re.jsxs(re.Fragment,{children:[re.jsx(Vt.FieldLabel,{label:"Alternate Text",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.alternateText,onChange:n=>{e({...t,alternateText:n})}})}),re.jsx(Vt.FieldLabel,{label:"Height",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"number"},value:t.height,onChange:n=>{e({...t,height:n})}})}),re.jsx(Vt.FieldLabel,{label:"Width",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"number"},value:t.width,onChange:n=>{e({...t,width:n})}})}),re.jsx(Vt.FieldLabel,{label:"URL",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.url,onChange:n=>{e({...t,url:n})}})})]})},ag={type:"text"},KP={type:"custom",render:({onChange:e,value:t})=>re.jsxs(re.Fragment,{children:[re.jsx(Vt.FieldLabel,{label:"Line 1",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.line1,onChange:n=>{e({...t,line1:n})}})}),re.jsx(Vt.FieldLabel,{label:"Line 2",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.line2,onChange:n=>{e({...t,line2:n})}})}),re.jsx(Vt.FieldLabel,{label:"Line 3",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.line3,onChange:n=>{e({...t,line3:n})}})}),re.jsx(Vt.FieldLabel,{label:"City",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.city,onChange:n=>{e({...t,city:n})}})}),re.jsx(Vt.FieldLabel,{label:"State/Region",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.region,onChange:n=>{e({...t,region:n})}})}),re.jsx(Vt.FieldLabel,{label:"Sublocality",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.sublocality,onChange:n=>{e({...t,sublocality:n})}})}),re.jsx(Vt.FieldLabel,{label:"Postal Code",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.postalCode,onChange:n=>{e({...t,postalCode:n})}})}),re.jsx(Vt.FieldLabel,{label:"Country Code",className:"ve-inline-block ve-pt-4",children:re.jsx(Vt.AutoField,{field:{type:"text"},value:t.countryCode,onChange:n=>{e({...t,countryCode:n})}})})]})},Mb="#969696",UP={type:"custom",render:({onChange:e,value:t})=>{const[n,r]=H.useState(t),o=(l,u)=>{const p=[...n];p[l]=u,r(p),e(p)},i=l=>{const u=n.filter((p,m)=>m!==l);r(u),e(u)},a=()=>{r([...n,""])};return re.jsxs("div",{children:[n.map((l,u)=>re.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px",gap:"4px"},children:[re.jsx(Vt.AutoField,{field:{type:"text"},value:l,onChange:p=>o(u,p)}),re.jsx("span",{style:{color:Mb},children:re.jsx(Vt.IconButton,{onClick:()=>i(u),variant:"secondary",title:"Delete",disabled:n.length===1,children:re.jsx(WP,{})})})]},u)),re.jsx("span",{style:{color:Mb,width:"auto"},children:re.jsx(Vt.Button,{onClick:a,variant:"secondary",icon:re.jsx(FP,{}),fullWidth:!0,children:re.jsx(re.Fragment,{})})})]})}},sg=new Gr,VP={"type.string":ag,"type.phone":ag,"type.image":GP,"type.address":KP},YP=(e,t)=>{if(t)return UP;const n=VP[e];return n||(sg.log(`No constant configuration for ${e}`),ag)},qP=(e,t)=>{let n;for(const r of e){const o=YP(r,t);if(!o){sg.log(`No mapped configuration for ${r}`);return}if(n||(n=o),n!==o){sg.log(`Could not resolve configuration for ${r}`);return}}return n},Yo=e=>{const t=qP(e.filter.types,!!e.filter.includeListsOnly);return{type:"custom",label:e.label,render:({field:n,value:r,onChange:o})=>{const i=sP(e.filter),a=l=>{o({field:(r==null?void 0:r.field)??"",constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:l})};return re.jsxs(re.Fragment,{children:[!!t&&re.jsx(ZP,{constantValueEnabled:r==null?void 0:r.constantValueEnabled,toggleConstantValueEnabled:a}),r!=null&&r.constantValueEnabled?re.jsx(Vt.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:t&&re.jsx(Vt.AutoField,{onChange:l=>o({field:(r==null?void 0:r.field)??"",constantValue:l,constantValueEnabled:!0}),value:r==null?void 0:r.constantValue,field:t})}):re.jsx(Vt.FieldLabel,{label:n.label||"Label is undefined",className:"ve-mt-2.5",children:re.jsx(Vt.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...i.map(l=>({label:l.name,value:l.name}))]},onChange:l=>{o({field:l,constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:!1})},value:r==null?void 0:r.field})})]})}}},ZP=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>re.jsx("div",{className:"ve-mb-2 ve-w-full",children:re.jsxs(rT,{defaultValue:(e==null?void 0:e.toString())??"false",children:[re.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[re.jsx(og,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),re.jsx(ig,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),re.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[re.jsx(og,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),re.jsx(ig,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),JP={address:Yo({label:"Address",filter:{types:["type.address"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},XP=({alignment:e,padding:t,address:n,getDirectionsProvider:r})=>{const o=Eo(),i=Vo(o,n),a=Zx(i,void 0,void 0,{provider:r});return re.jsx(nc,{className:`flex flex-col justify-center components ${e} font-body-fontWeight text-body-fontSize text-body-color`,padding:t,children:i&&re.jsx("div",{children:re.jsxs(_o,{displayName:"Address",fieldId:n.constantValueEnabled?"constant value":"address",children:[re.jsx(G1,{address:i,lines:[["line1"],["line2","city","region","postalCode"]]}),a&&re.jsx(Ag,{cta:{link:a,label:"Get Directions",linkType:"URL"},target:"_blank",className:"font-bold text-palette-primary underline hover:no-underline md:px-4;"})]})})})},QP={fields:JP,defaultProps:{alignment:"items-start",padding:"none",getDirectionsProvider:"google",address:{field:"address",constantValue:{line1:"",city:"",region:"",postalCode:"",countryCode:""}}},label:"Address",render:e=>re.jsx(XP,{...e})},eI={coordinate:Yo({label:"Get Directions",filter:{types:["type.coordinate"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},variant:{label:"Variant",type:"radio",options:[{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Outline",value:"outline"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"defaut"},{label:"Small",value:"small"},{label:"Large",value:"large"},{label:"Icon",value:"icon"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},tI=({variant:e,size:t,alignment:n,padding:r,coordinate:o,getDirectionsProvider:i,fontSize:a})=>{const l=Eo(),u=Vo(l,o);u||console.warn("yextDisplayCoordinate is not present in the stream");const p=Zx(void 0,void 0,void 0,{provider:i},u);return re.jsx(nc,{className:`flex flex-col justify-center components ${n} font-body-fontWeight text-body-fontSize text-body-color`,padding:r,children:re.jsx(Sf,{asChild:!0,variant:e,size:t,fontSize:a,children:re.jsx(Ag,{href:p??"",children:"Get Directions"})})})},nI={fields:eI,defaultProps:{variant:"primary",size:"default",alignment:"items-start",padding:"none",getDirectionsProvider:"google",coordinate:{field:"yextDisplayCoordinate",constantValue:{latitude:0,longitude:0}}},label:"Get Directions",render:e=>re.jsx(tI,{...e})},Hf=({label:e,defaultCustomValue:t})=>({type:"custom",render:({onChange:n,value:r})=>re.jsxs(Vt.FieldLabel,{label:e,children:[re.jsx(Vt.AutoField,{field:{type:"radio",options:[{value:"default",label:"Default"},{value:"custom",label:"Custom"}]},onChange:o=>n(o==="default"?"default":t),value:r==="default"?"default":"custom"}),r!=="default"&&re.jsx(Vt.AutoField,{field:{type:"number"},value:r,onChange:n})]})}),aT=ge.forwardRef(({text:e,...t},n)=>{const r=Eo();return re.jsx(_o,{displayName:"Body",fieldId:e.constantValueEnabled?"constant value":e.field,children:re.jsx(Sg,{ref:n,...t,children:Vo(r,e)})})});aT.displayName="BodyText";const rI={text:Yo({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Hf({label:"Font Size",defaultCustomValue:12}),fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},oI={label:"Body Text",fields:rI,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"},render:e=>re.jsx(aT,{...e})},iI={entityField:Yo({label:"Entity Field",filter:{types:["c_cta"]}}),fontSize:Hf({label:"Font Size",defaultCustomValue:12}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Outline",value:"outline"},{label:"Link",value:"link"}]}},aI=({entityField:e,variant:t,className:n,fontSize:r,...o})=>{const i=Eo(),a=Vo(i,e);return re.jsx(_o,{displayName:"CTA",fieldId:e.constantValueEnabled?"constant value":e.field,children:re.jsx(Vg,{label:a==null?void 0:a.name,url:(a==null?void 0:a.url)??"#",variant:t,className:gn(n),fontSize:r,...o})})},sI={label:"Call to Action",fields:iI,defaultProps:{entityField:{field:"",constantValue:{label:"Call to Action",variant:"primary",size:"default"}},variant:"primary",fontSize:"default"},render:e=>re.jsx(aI,{...e})},lI="data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Material/Outline/Mail_outline'%3e%3cpath%20id='Vector'%20d='M14.4%201.95831H1.6C0.72%201.95831%200.00799999%202.67831%200.00799999%203.55831L0%2013.1583C0%2014.0383%200.72%2014.7583%201.6%2014.7583H14.4C15.28%2014.7583%2016%2014.0383%2016%2013.1583V3.55831C16%202.67831%2015.28%201.95831%2014.4%201.95831ZM14.4%2013.1583H1.6V5.15831L8%209.15831L14.4%205.15831V13.1583ZM8%207.55831L1.6%203.55831H14.4L8%207.55831Z'%20fill='%23D83B18'/%3e%3c/g%3e%3c/svg%3e",cI=Dr("list-inside p-8",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",medium:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl"},fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background",foreground:"text-palette-foreground"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default"}}),uI={list:Yo({label:"Entity Field",filter:{types:["type.string"],allowList:["emails"],includeListsOnly:!0}}),fontSize:{label:"Font Size",type:"select",options:[{label:"Default",value:"default"},{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"medium"},{label:"Large",value:"lg"},{label:"Extra Large",value:"xl"},{label:"2xl",value:"2xl"},{label:"3xl",value:"3xl"},{label:"4xl",value:"4xl"},{label:"5xl",value:"5xl"}]},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},includeHyperlink:{label:"Include Hyperlink",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},listLength:{type:"number",label:"List Length",min:1,max:100}},dI=({list:e,fontSize:t,fontWeight:n,color:r,includeHyperlink:o,listLength:i})=>{const a=Eo();let l=Vo(a,e);return l?Array.isArray(l)||(l=[l]):l=["sample_email1@gmail.com","sample_email2@yahoo.com","sample_email3@msn.com"],re.jsx(_o,{displayName:"Email List",fieldId:e.field,children:re.jsx("ul",{className:gn("components",cI({fontSize:t,fontWeight:n,color:r}),`${o?"text-blue-600 dark:text-blue-500 hover:underline":""}`),children:l.slice(0,Math.min(l.length,i)).map((u,p)=>re.jsxs("li",{className:"mb-2 flex items-center",children:[re.jsx("img",{className:"m-2",src:lI}),re.jsx("span",{children:o?re.jsx("a",{href:u,children:u}):u})]},p))})})},fI={label:"Emails",fields:uI,defaultProps:{list:{field:"",constantValue:[]},includeHyperlink:!0,listLength:5},render:e=>re.jsx(dI,{...e})},hI=Dr("flex",{variants:{direction:{row:"flex-row",column:"flex-col"},alignment:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justification:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around"},spacing:{small:"gap-2",medium:"gap-4",large:"gap-8"},wrap:{wrap:"flex-wrap",nowrap:"flex-nowrap"}},defaultVariants:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"}}),sT=ge.forwardRef(({className:e,direction:t,alignment:n,justification:r,spacing:o,renderDropZone:i,...a},l)=>re.jsx("div",{className:gn(hI({direction:t,alignment:n,justification:r,spacing:o,className:e})),ref:l,...a,children:i({zone:"flex-container"})}));sT.displayName="FlexContainer";const pI={direction:{label:"Direction",type:"select",options:[{value:"row",label:"Horizontal"},{value:"column",label:"Vertical"}]},alignment:{label:"Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"stretch",label:"Stretch"}]},justification:{label:"Justification",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"},{value:"spaceAround",label:"Space Around"}]},spacing:{label:"Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},wrap:{label:"Wrap",type:"select",options:[{value:"nowrap",label:"No Wrap"},{value:"wrap",label:"Wrap"}]}},gI={label:"Flex Container",fields:pI,defaultProps:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"},render:({direction:e,alignment:t,justification:n,spacing:r,puck:{renderDropZone:o}})=>re.jsx(sT,{renderDropZone:o,direction:e,alignment:t,justification:n,spacing:r})},mI=Dr("components",{variants:{backgroundColor:{default:"bg-grid-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"},maxContentWidth:{default:"max-w-grid-maxWidth",lg:"max-w-[1024px]",xl:"max-w-[1280px]",xxl:"max-w-[1536px]"}},defaultVariants:{backgroundColor:"default",maxContentWidth:"default"}}),vI=Dr("components flex flex-col min-h-0 min-w-0 md:grid md:grid-cols-12 mx-auto gap-y-grid-verticalSpacing",{variants:{horizontalSpacing:{small:"gap-x-2 md:gap-x-4",medium:"gap-x-8 md:gap-x-12",large:"gap-x-12 md:gap-x-16"}},defaultVariants:{horizontalSpacing:"medium"}}),yI=Dr("flex flex-col",{variants:{verticalAlignment:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between"},verticalSpacing:{default:"gap-y-grid-verticalSpacing",small:"gap-y-2",medium:"gap-y-4",large:"gap-y-8"},padding:{none:"",small:"p-2",medium:"p-4",large:"p-8"}},defaultVariants:{verticalAlignment:"start",verticalSpacing:"default",padding:"none"}}),lT=H.forwardRef(({className:e,distribution:t,columns:n,horizontalSpacing:r,maxContentWidth:o,renderDropZone:i,backgroundColor:a,...l},u)=>re.jsx(nc,{className:mI({maxContentWidth:o,backgroundColor:a}),children:re.jsx("div",{className:gn(vI({horizontalSpacing:r,className:e})),ref:u,style:{gridTemplateColumns:t==="manual"?"repeat(12, 1fr)":`repeat(${n.length}, 1fr)`},...l,children:n.map(({span:p,verticalAlignment:m,verticalSpacing:_,padding:C},b)=>re.jsx("div",{className:gn(yI({verticalAlignment:m,verticalSpacing:_,padding:C})),style:{gridColumn:p&&t==="manual"?`span ${Math.max(Math.min(p,12),1)}`:""},children:i({zone:`column-${b}`})},b))})}));lT.displayName="GridSection";const bI={distribution:{type:"radio",options:[{value:"auto",label:"Auto"},{value:"manual",label:"Manual"}]},columns:{type:"array",getItemSummary:(e,t)=>`Column ${(t??0)+1}, span ${e.span?Math.max(Math.min(e.span,12),1):"auto"}`,arrayFields:{span:{label:"Span (1-12)",type:"number",min:0,max:12},verticalAlignment:{label:"Vertical Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"}]},verticalSpacing:{label:"Vertical Spacing",type:"select",options:[{value:"default",label:"Default"},{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},padding:{label:"Padding",type:"select",options:[{value:"none",label:"None"},{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]}}},horizontalSpacing:{label:"Horizontal Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},maxContentWidth:{label:"Maximum Content Width",type:"select",options:[{value:"default",label:"Default"},{value:"lg",label:"LG"},{value:"xl",label:"XL"},{value:"xxl",label:"2XL"}]},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},_I={label:"Grid Section",fields:bI,defaultProps:{distribution:"auto",columns:[{verticalAlignment:"start",verticalSpacing:"default",padding:"none"},{verticalAlignment:"start",verticalSpacing:"default",padding:"none"}],backgroundColor:"default",horizontalSpacing:"medium",maxContentWidth:"default"},render:({columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o,puck:{renderDropZone:i}})=>re.jsx(lT,{renderDropZone:i,columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o})},cT=H.forwardRef(({text:e,...t},n)=>{const r=Eo();return re.jsx(_o,{displayName:"Heading "+t.level,fieldId:e.constantValueEnabled?"constant value":e.field,children:re.jsx(Yg,{ref:n,...t,children:Vo(r,e)})})});cT.displayName="HeadingText";const xI={text:Yo({label:"Entity Field",filter:{types:["type.string"]}}),level:{type:"number",label:"Heading Level",min:1,max:6},fontSize:Hf({label:"Font Size",defaultCustomValue:24}),weight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"},{label:"Foreground",value:"foreground"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}},EI={label:"Heading Text",fields:xI,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},content:"Heading",level:2,fontSize:"default",weight:"default",color:"default",transform:"none"},render:e=>re.jsx(cT,{...e})},CI={startOfWeek:{label:"Start of the week",type:"radio",options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"},{label:"Today",value:"today"}]},collapseDays:{label:"Collapse days",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},showAdditionalHoursText:{label:"Show additional hours text",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},wI=({startOfWeek:e,collapseDays:t,showAdditionalHoursText:n,alignment:r,padding:o})=>{const{hours:i,additionalHoursText:a}=Eo();return re.jsx(nc,{className:`flex flex-col justify-center components ${r} font-body-fontWeight text-body-fontSize text-body-color`,padding:o,children:re.jsxs("div",{children:[i&&re.jsx(_o,{displayName:"Hours",fieldId:"hours",children:re.jsx(eD,{hours:i,startOfWeek:e,collapseDays:t})}),a&&n&&re.jsx(_o,{displayName:"Hours Text",fieldId:"additionalHoursText",children:re.jsx("div",{className:"mt-4",children:a})})]})})},TI={fields:CI,defaultProps:{startOfWeek:"today",collapseDays:!1,showAdditionalHoursText:!0,alignment:"items-center",padding:"none"},label:"Hours Card",render:e=>re.jsx(wI,{...e})},NI={hours:Yo({label:"Hours",filter:{types:["type.hours"]}}),showCurrentStatus:{type:"radio",label:"Show Current Status",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},timeFormat:{type:"select",label:"Time Format",options:[{label:"12-hour",value:"12h"},{label:"24-hour",value:"24h"}]},showDayNames:{type:"radio",label:"Show Day Names",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},dayOfWeekFormat:{type:"select",label:"Day of Week Format",options:[{label:"Short",value:"short"},{label:"Long",value:"long"}]}},SI=({hours:e,className:t,showCurrentStatus:n,timeFormat:r,showDayNames:o,dayOfWeekFormat:i})=>{const a=Eo(),l=Vo(a,e);return l?re.jsx(_o,{displayName:"Hours",fieldId:e.field,children:re.jsx(Z$,{hours:l,className:gn("font-semibold mb-2",t),currentTemplate:n?void 0:()=>re.jsx(re.Fragment,{}),separatorTemplate:n?void 0:()=>re.jsx(re.Fragment,{}),dayOfWeekTemplate:o?void 0:()=>re.jsx(re.Fragment,{}),dayOptions:{weekday:i},timeOptions:{hour12:r==="12h"},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}):null},OI={label:"Hours Status",fields:NI,defaultProps:{hours:{field:"hours",constantValue:""},className:"",showCurrentStatus:!0,timeFormat:"12h",showDayNames:!0,dayOfWeekFormat:"long"},render:e=>re.jsx(SI,{...e})},AI="https://placehold.co/640x360",RI=Dr("",{variants:{size:{small:"max-w-xs",medium:"max-w-md",large:"max-w-xl",full:"w-full"},aspectRatio:{auto:"aspect-auto",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]"},rounded:{none:"",small:"rounded-sm",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"medium",aspectRatio:"auto",rounded:null}}),$I={image:Yo({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},DI=({image:e,size:t,aspectRatio:n,rounded:r})=>{const o=Eo(),i=Vo(o,e);return i?re.jsx(_o,{displayName:"Image",fieldId:e.field,children:re.jsx("div",{className:gn(RI({size:t,aspectRatio:n,rounded:r}),"overflow-hidden"),children:re.jsx(cO,{image:i,className:"w-full h-full object-cover"})})}):null},kI={label:"Image",fields:$I,defaultProps:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:AI},constantValueEnabled:!0},size:"medium",aspectRatio:"auto",rounded:"none"},render:e=>re.jsx(DI,{...e})},MI=Dr("components",{variants:{fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background",foreground:"text-palette-foreground"}},defaultVariants:{fontWeight:"default",color:"default"}}),PI=e=>{const n=(""+e).replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);return n?[n[1]?"+1 ":"","(",n[2],") ",n[3],"-",n[4]].join(""):e},II={phone:Yo({label:"Entity Field",filter:{types:["type.phone"]}}),textSize:{label:"Text Size",type:"number",min:1},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},LI=({phone:e,textSize:t,fontWeight:n,color:r})=>{const o=Eo(),i=Vo(o,e),a={fontSize:t?t+"px":void 0};return re.jsx(_o,{displayName:"Phone",fieldId:e.field,children:re.jsx("p",{className:gn(MI({fontWeight:n,color:r})),style:a??"",children:PI(i)})})},FI={label:"Phone",fields:II,defaultProps:{textSize:16,phone:{field:"mainPhone",constantValue:""}},render:e=>re.jsx(LI,{...e})},jI=Dr("list-inside text-body-FontSize p-8",{variants:{fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-palette-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"}},defaultVariants:{padding:"none",fontWeight:"default",color:"default",textTransform:"none"}}),BI={list:Yo({label:"Entity Field",filter:{types:["type.string"],includeListsOnly:!0}}),fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},WI=({list:e,padding:t,fontWeight:n,color:r,textTransform:o})=>{const i=Eo();let a=Vo(i,e);return a?Array.isArray(a)||(a=[a]):a=["Sample text 1","Sample text 2","Sample text 3"],re.jsx(_o,{displayName:"Text List",fieldId:e.field,children:re.jsx("ul",{className:Mu(jI({padding:t,fontWeight:n,color:r,textTransform:o}),"list-disc components"),children:a.map((l,u)=>re.jsx("li",{className:"mb-2",children:l},u))})})},zI={label:"Text List",fields:BI,defaultProps:{padding:"none",list:{field:"",constantValue:[]}},render:e=>re.jsx(WI,{...e})};var fm="Progress",hm=100,[HI,hJ]=Lf(fm),[GI,KI]=HI(fm),uT=ge.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=UI,...a}=e;(o||o===0)&&!Pb(o)&&console.error(VI(`${o}`,"Progress"));const l=Pb(o)?o:hm;r!==null&&!Ib(r,l)&&console.error(YI(`${r}`,"Progress"));const u=Ib(r,l)?r:null,p=pf(u)?i(u,l):void 0;return re.jsx(GI,{scope:n,value:u,max:l,children:re.jsx(kn.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":pf(u)?u:void 0,"aria-valuetext":p,role:"progressbar","data-state":hT(u,l),"data-value":u??void 0,"data-max":l,...a,ref:t})})});uT.displayName=fm;var dT="ProgressIndicator",fT=ge.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=KI(dT,n);return re.jsx(kn.div,{"data-state":hT(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});fT.displayName=dT;function UI(e,t){return`${Math.round(e/t*100)}%`}function hT(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function pf(e){return typeof e=="number"}function Pb(e){return pf(e)&&!isNaN(e)&&e>0}function Ib(e,t){return pf(e)&&!isNaN(e)&&e<=t&&e>=0}function VI(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${hm}\`.`}function YI(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
180
|
-
- a positive number
|
|
181
|
-
- less than the value passed to \`max\` (or ${hm} if no \`max\` prop is set)
|
|
182
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
183
|
-
|
|
184
|
-
Defaulting to \`null\`.`}var pT=uT,qI=fT;const gT=ge.forwardRef(({className:e,value:t,...n},r)=>re.jsx(pT,{ref:r,className:gn("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...n,children:re.jsx(qI,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));gT.displayName=pT.displayName;function pm({progress:e}){return re.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[re.jsx(gT,{className:"ve-w-1/3 ve-loading-progress",value:e}),re.jsx("div",{children:"Loading Visual Editor..."})]})}var Lb=["light","dark"],ZI="(prefers-color-scheme: dark)",JI=ge.createContext(void 0),XI={setTheme:e=>{},themes:[]},QI=()=>{var e;return(e=ge.useContext(JI))!=null?e:XI};ge.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:a,attrs:l,nonce:u})=>{let p=i==="system",m=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,_=o?Lb.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",C=(v,y=!1,T=!0)=>{let O=a?a[v]:v,A=y?v+"|| ''":`'${O}'`,D="";return o&&T&&!y&&Lb.includes(v)&&(D+=`d.style.colorScheme = '${v}';`),n==="class"?y||O?D+=`c.add(${A})`:D+="null":O&&(D+=`d[s](n,${A})`),D},b=e?`!function(){${m}${C(e)}}()`:r?`!function(){try{${m}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${p})){var t='${ZI}',m=window.matchMedia(t);if(m.media!==t||m.matches){${C("dark")}}else{${C("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${C(a?"x[e]":"e",!0)}}${p?"":"else{"+C(i,!1,!1)+"}"}${_}}catch(e){}}()`:`!function(){try{${m}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${C(a?"x[e]":"e",!0)}}else{${C(i,!1,!1)};}${_}}catch(t){}}();`;return ge.createElement("script",{nonce:u,dangerouslySetInnerHTML:{__html:b}})});var eL=e=>{switch(e){case"success":return rL;case"info":return iL;case"warning":return oL;case"error":return aL;default:return null}},tL=Array(12).fill(0),nL=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},tL.map((n,r)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),rL=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),oL=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),iL=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),aL=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),sL=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),lL=()=>{let[e,t]=H.useState(document.hidden);return H.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},lg=1,cL=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:lg++,i=this.toasts.find(l=>l.id===o),a=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:a,title:n}):l):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,a=r.then(async u=>{if(i=["resolve",u],H.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(dL(u)&&!u.ok){o=!1;let p=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:p,description:m})}else if(t.success!==void 0){o=!1;let p=typeof t.success=="function"?await t.success(u):t.success,m=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:p,description:m})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){o=!1;let p=typeof t.error=="function"?await t.error(u):t.error,m=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:p,description:m})}}).finally(()=>{var u;o&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),l=()=>new Promise((u,p)=>a.then(()=>i[0]==="reject"?p(i[1]):u(i[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||lg++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},no=new cL,uL=(e,t)=>{let n=(t==null?void 0:t.id)||lg++;return no.addToast({title:e,...t,id:n}),n},dL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",fL=uL,hL=()=>no.toasts;Object.assign(fL,{success:no.success,info:no.info,warning:no.warning,error:no.error,custom:no.custom,message:no.message,promise:no.promise,dismiss:no.dismiss,loading:no.loading},{getHistory:hL});function pL(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}pL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
185
|
-
`);function Bd(e){return e.label!==void 0}var gL=3,mL="32px",Fb=4e3,vL=356,yL=14,bL=20,_L=200;function xL(...e){return e.filter(Boolean).join(" ")}var EL=e=>{var t,n,r,o,i,a,l,u,p,m,_;let{invert:C,toast:b,unstyled:v,interacting:y,setHeights:T,visibleToasts:O,heights:A,index:D,toasts:P,expanded:M,removeToast:V,defaultRichColors:J,closeButton:oe,style:Z,cancelButtonStyle:U,actionButtonStyle:Q,className:de="",descriptionClassName:pe="",duration:te,position:he,gap:Y,loadingIcon:j,expandByDefault:ee,classNames:ne,icons:B,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:X,cn:F}=e,[w,N]=H.useState(!1),[I,q]=H.useState(!1),[ue,fe]=H.useState(!1),[se,Ce]=H.useState(!1),[Oe,Be]=H.useState(!1),[ce,le]=H.useState(0),[ye,Me]=H.useState(0),Pe=H.useRef(b.duration||te||Fb),We=H.useRef(null),Xe=H.useRef(null),st=D===0,dt=D+1<=O,Ct=b.type,Se=b.dismissible!==!1,me=b.className||"",_e=b.descriptionClassName||"",De=H.useMemo(()=>A.findIndex(qe=>qe.toastId===b.id)||0,[A,b.id]),Fe=H.useMemo(()=>{var qe;return(qe=b.closeButton)!=null?qe:oe},[b.closeButton,oe]);H.useMemo(()=>b.duration||te||Fb,[b.duration,te]);let ke=H.useRef(0),ze=H.useRef(0),tt=H.useRef(0),ut=H.useRef(null),[Et,jt]=he.split("-"),Qe=H.useMemo(()=>A.reduce((qe,ot,vt)=>vt>=De?qe:qe+ot.height,0),[A,De]),et=lL(),lt=b.invert||C,wt=Ct==="loading";ze.current=H.useMemo(()=>De*Y+Qe,[De,Qe]),H.useEffect(()=>{N(!0)},[]),H.useEffect(()=>{let qe=Xe.current;if(qe){let ot=qe.getBoundingClientRect().height;return Me(ot),T(vt=>[{toastId:b.id,height:ot,position:b.position},...vt]),()=>T(vt=>vt.filter(kt=>kt.toastId!==b.id))}},[T,b.id]),H.useLayoutEffect(()=>{if(!w)return;let qe=Xe.current,ot=qe.style.height;qe.style.height="auto";let vt=qe.getBoundingClientRect().height;qe.style.height=ot,Me(vt),T(kt=>kt.find(Dt=>Dt.toastId===b.id)?kt.map(Dt=>Dt.toastId===b.id?{...Dt,height:vt}:Dt):[{toastId:b.id,height:vt,position:b.position},...kt])},[w,b.title,b.description,T,b.id]);let _t=H.useCallback(()=>{q(!0),le(ze.current),T(qe=>qe.filter(ot=>ot.toastId!==b.id)),setTimeout(()=>{V(b)},_L)},[b,V,T,ze]);H.useEffect(()=>{if(b.promise&&Ct==="loading"||b.duration===1/0||b.type==="loading")return;let qe;return M||y||X&&et?(()=>{if(tt.current<ke.current){let ot=new Date().getTime()-ke.current;Pe.current=Pe.current-ot}tt.current=new Date().getTime()})():Pe.current!==1/0&&(ke.current=new Date().getTime(),qe=setTimeout(()=>{var ot;(ot=b.onAutoClose)==null||ot.call(b,b),_t()},Pe.current)),()=>clearTimeout(qe)},[M,y,b,Ct,X,et,_t]),H.useEffect(()=>{b.delete&&_t()},[_t,b.delete]);function Rt(){var qe,ot,vt;return B!=null&&B.loading?H.createElement("div",{className:F(ne==null?void 0:ne.loader,(qe=b==null?void 0:b.classNames)==null?void 0:qe.loader,"sonner-loader"),"data-visible":Ct==="loading"},B.loading):j?H.createElement("div",{className:F(ne==null?void 0:ne.loader,(ot=b==null?void 0:b.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Ct==="loading"},j):H.createElement(nL,{className:F(ne==null?void 0:ne.loader,(vt=b==null?void 0:b.classNames)==null?void 0:vt.loader),visible:Ct==="loading"})}return H.createElement("li",{tabIndex:0,ref:Xe,className:F(de,me,ne==null?void 0:ne.toast,(t=b==null?void 0:b.classNames)==null?void 0:t.toast,ne==null?void 0:ne.default,ne==null?void 0:ne[Ct],(n=b==null?void 0:b.classNames)==null?void 0:n[Ct]),"data-sonner-toast":"","data-rich-colors":(r=b.richColors)!=null?r:J,"data-styled":!(b.jsx||b.unstyled||v),"data-mounted":w,"data-promise":!!b.promise,"data-swiped":Oe,"data-removed":I,"data-visible":dt,"data-y-position":Et,"data-x-position":jt,"data-index":D,"data-front":st,"data-swiping":ue,"data-dismissible":Se,"data-type":Ct,"data-invert":lt,"data-swipe-out":se,"data-expanded":!!(M||ee&&w),style:{"--index":D,"--toasts-before":D,"--z-index":P.length-D,"--offset":`${I?ce:ze.current}px`,"--initial-height":ee?"auto":`${ye}px`,...Z,...b.style},onPointerDown:qe=>{wt||!Se||(We.current=new Date,le(ze.current),qe.target.setPointerCapture(qe.pointerId),qe.target.tagName!=="BUTTON"&&(fe(!0),ut.current={x:qe.clientX,y:qe.clientY}))},onPointerUp:()=>{var qe,ot,vt,kt;if(se||!Se)return;ut.current=null;let Dt=Number(((qe=Xe.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Gt=new Date().getTime()-((ot=We.current)==null?void 0:ot.getTime()),sn=Math.abs(Dt)/Gt;if(Math.abs(Dt)>=bL||sn>.11){le(ze.current),(vt=b.onDismiss)==null||vt.call(b,b),_t(),Ce(!0),Be(!1);return}(kt=Xe.current)==null||kt.style.setProperty("--swipe-amount","0px"),fe(!1)},onPointerMove:qe=>{var ot,vt,kt;if(!ut.current||!Se)return;let Dt=qe.clientY-ut.current.y,Gt=((ot=window.getSelection())==null?void 0:ot.toString().length)>0;Number(((vt=Xe.current)==null?void 0:vt.style.getPropertyValue("--swipe-amount").replace("px",""))||0)>0&&Be(!0),!Gt&&((kt=Xe.current)==null||kt.style.setProperty("--swipe-amount",`${Math.max(0,Dt)}px`))}},Fe&&!b.jsx?H.createElement("button",{"aria-label":W,"data-disabled":wt,"data-close-button":!0,onClick:wt||!Se?()=>{}:()=>{var qe;_t(),(qe=b.onDismiss)==null||qe.call(b,b)},className:F(ne==null?void 0:ne.closeButton,(o=b==null?void 0:b.classNames)==null?void 0:o.closeButton)},(i=B==null?void 0:B.close)!=null?i:sL):null,b.jsx||H.isValidElement(b.title)?b.jsx?b.jsx:typeof b.title=="function"?b.title():b.title:H.createElement(H.Fragment,null,Ct||b.icon||b.promise?H.createElement("div",{"data-icon":"",className:F(ne==null?void 0:ne.icon,(a=b==null?void 0:b.classNames)==null?void 0:a.icon)},b.promise||b.type==="loading"&&!b.icon?b.icon||Rt():null,b.type!=="loading"?b.icon||(B==null?void 0:B[Ct])||eL(Ct):null):null,H.createElement("div",{"data-content":"",className:F(ne==null?void 0:ne.content,(l=b==null?void 0:b.classNames)==null?void 0:l.content)},H.createElement("div",{"data-title":"",className:F(ne==null?void 0:ne.title,(u=b==null?void 0:b.classNames)==null?void 0:u.title)},typeof b.title=="function"?b.title():b.title),b.description?H.createElement("div",{"data-description":"",className:F(pe,_e,ne==null?void 0:ne.description,(p=b==null?void 0:b.classNames)==null?void 0:p.description)},typeof b.description=="function"?b.description():b.description):null),H.isValidElement(b.cancel)?b.cancel:b.cancel&&Bd(b.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:b.cancelButtonStyle||U,onClick:qe=>{var ot,vt;Bd(b.cancel)&&Se&&((vt=(ot=b.cancel).onClick)==null||vt.call(ot,qe),_t())},className:F(ne==null?void 0:ne.cancelButton,(m=b==null?void 0:b.classNames)==null?void 0:m.cancelButton)},b.cancel.label):null,H.isValidElement(b.action)?b.action:b.action&&Bd(b.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:b.actionButtonStyle||Q,onClick:qe=>{var ot,vt;Bd(b.action)&&((vt=(ot=b.action).onClick)==null||vt.call(ot,qe),!qe.defaultPrevented&&_t())},className:F(ne==null?void 0:ne.actionButton,(_=b==null?void 0:b.classNames)==null?void 0:_.actionButton)},b.action.label):null))};function jb(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var CL=H.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:u,theme:p="light",richColors:m,duration:_,style:C,visibleToasts:b=gL,toastOptions:v,dir:y=jb(),gap:T=yL,loadingIcon:O,icons:A,containerAriaLabel:D="Notifications",pauseWhenPageIsHidden:P,cn:M=xL}=e,[V,J]=H.useState([]),oe=H.useMemo(()=>Array.from(new Set([r].concat(V.filter(X=>X.position).map(X=>X.position)))),[V,r]),[Z,U]=H.useState([]),[Q,de]=H.useState(!1),[pe,te]=H.useState(!1),[he,Y]=H.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=H.useRef(null),ee=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),ne=H.useRef(null),B=H.useRef(!1),W=H.useCallback(X=>{J(F=>{var w;return(w=F.find(N=>N.id===X.id))!=null&&w.delete||no.dismiss(X.id),F.filter(({id:N})=>N!==X.id)})},[]);return H.useEffect(()=>no.subscribe(X=>{if(X.dismiss){J(F=>F.map(w=>w.id===X.id?{...w,delete:!0}:w));return}setTimeout(()=>{ku.flushSync(()=>{J(F=>{let w=F.findIndex(N=>N.id===X.id);return w!==-1?[...F.slice(0,w),{...F[w],...X},...F.slice(w+1)]:[X,...F]})})})}),[]),H.useEffect(()=>{if(p!=="system"){Y(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;let X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:F})=>{Y(F?"dark":"light")})}catch{X.addListener(({matches:w})=>{try{Y(w?"dark":"light")}catch(N){console.error(N)}})}},[p]),H.useEffect(()=>{V.length<=1&&de(!1)},[V]),H.useEffect(()=>{let X=F=>{var w,N;o.every(I=>F[I]||F.code===I)&&(de(!0),(w=j.current)==null||w.focus()),F.code==="Escape"&&(document.activeElement===j.current||(N=j.current)!=null&&N.contains(document.activeElement))&&de(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[o]),H.useEffect(()=>{if(j.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,B.current=!1)}},[j.current]),H.createElement("section",{"aria-label":`${D} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},oe.map((X,F)=>{var w;let[N,I]=X.split("-");return V.length?H.createElement("ol",{key:X,dir:y==="auto"?jb():y,tabIndex:-1,ref:j,className:l,"data-sonner-toaster":!0,"data-theme":he,"data-y-position":N,"data-lifted":Q&&V.length>1&&!i,"data-x-position":I,style:{"--front-toast-height":`${((w=Z[0])==null?void 0:w.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||mL,"--width":`${vL}px`,"--gap":`${T}px`,...C},onBlur:q=>{B.current&&!q.currentTarget.contains(q.relatedTarget)&&(B.current=!1,ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||B.current||(B.current=!0,ne.current=q.relatedTarget)},onMouseEnter:()=>de(!0),onMouseMove:()=>de(!0),onMouseLeave:()=>{pe||de(!1)},onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||te(!0)},onPointerUp:()=>te(!1)},V.filter(q=>!q.position&&F===0||q.position===X).map((q,ue)=>{var fe,se;return H.createElement(EL,{key:q.id,icons:A,index:ue,toast:q,defaultRichColors:m,duration:(fe=v==null?void 0:v.duration)!=null?fe:_,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:b,closeButton:(se=v==null?void 0:v.closeButton)!=null?se:a,interacting:pe,position:X,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:W,toasts:V.filter(Ce=>Ce.position==q.position),heights:Z.filter(Ce=>Ce.position==q.position),setHeights:U,expandByDefault:i,gap:T,loadingIcon:O,expanded:Q,pauseWhenPageIsHidden:P,cn:M})})):null}))});const wL=({...e})=>{const{theme:t="system"}=QI();return re.jsx(CL,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},Hu=()=>{const{sendToParent:e}=Wo("iFrameLoaded",lr),{sendToParent:t}=Wo("pushPageSets",lr),{sendToParent:n}=Wo("openQuickFind",lr);return{iFrameLoaded:e,pushPageSets:t,openQuickFind:n}},TL=()=>{const{openQuickFind:e}=Hu(),t=n=>{(n.ctrlKey||n.metaKey)&&n.key==="k"&&e()};H.useEffect(()=>(window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}),[])},cg=e=>JSON.parse(e.replace(/\\"/g,'"')),fu=new Gr,NL=e=>{const{iFrameLoaded:t}=Hu();H.useEffect(()=>{t({payload:{message:"iFrame is loaded"}})},[]);const[n,r]=H.useState(),[o,i]=H.useState(),[a,l]=H.useState(),[u,p]=H.useState(!1),[m,_]=H.useState(),[C,b]=H.useState(!1);return ka("getTemplateMetadata",lr,(v,y)=>{const T=e.get(y.templateId);i(T);const O=y;r(y),fu.enable(O.isxYextDebug),fu.logData("TEMPLATE_METADATA",O),fu.logData("PUCK_CONFIG",T),v({status:"success",payload:{message:"payload received"}})}),ka("getVisualConfigurationData",lr,(v,y)=>{const T=cg(y.visualConfigurationData);fu.logData("VISUAL_CONFIGURATION_DATA",T),l(T),p(!0),v({status:"success",payload:{message:"getVisualConfigurationData received"}})}),ka("getThemeData",lr,(v,y)=>{const T=y,O=T?cg(T):{};fu.logData("THEME_DATA",O),_(O),b(!0),v({status:"success",payload:{message:"getThemeData received"}})}),{visualConfigurationData:a,visualConfigurationDataFetched:u,themeData:m,themeDataFetched:C,templateMetadata:n,puckConfig:o}},SL=Dr("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Vi=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Ma:"button";return re.jsx(a,{className:gn(SL({variant:t,size:n,className:e})),ref:i,...o})});Vi.displayName="Button";const mT=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:n}}}=Vt.usePuck(),r=H.useCallback(o=>{const i=window.matchMedia("(min-width: 638px)").matches,a=o==="left"?t:n,l=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!a,...i?{}:{[l]:!1}}})},[e,t,n]);return re.jsxs(re.Fragment,{children:[re.jsx(Vi,{variant:"ghost",size:"icon",onClick:()=>{r("left")},children:re.jsx(IP,{className:"sm-icon"})}),re.jsx(Vi,{variant:"ghost",size:"icon",onClick:()=>{r("right")},children:re.jsx(LP,{className:"sm-icon"})})]})};var gm="Switch",[OL,pJ]=rc(gm),[AL,RL]=OL(gm),vT=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:p,form:m,..._}=e,[C,b]=ge.useState(null),v=cr(t,D=>b(D)),y=ge.useRef(!1),T=C?m||!!C.closest("form"):!0,[O=!1,A]=zu({prop:o,defaultProp:i,onChange:p});return re.jsxs(AL,{scope:n,checked:O,disabled:l,children:[re.jsx(kn.button,{type:"button",role:"switch","aria-checked":O,"aria-required":a,"data-state":_T(O),"data-disabled":l?"":void 0,disabled:l,value:u,..._,ref:v,onClick:On(e.onClick,D=>{A(P=>!P),T&&(y.current=D.isPropagationStopped(),y.current||D.stopPropagation())})}),T&&re.jsx($L,{control:C,bubbles:!y.current,name:r,value:u,checked:O,required:a,disabled:l,form:m,style:{transform:"translateX(-100%)"}})]})});vT.displayName=gm;var yT="SwitchThumb",bT=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=RL(yT,n);return re.jsx(kn.span,{"data-state":_T(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});bT.displayName=yT;var $L=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ge.useRef(null),a=zw(n),l=om(t);return ge.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&_){const C=new Event("click",{bubbles:r});_.call(u,n),u.dispatchEvent(C)}},[a,n,r]),re.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function _T(e){return e?"checked":"unchecked"}var xT=vT,DL=bT;const ET=ge.forwardRef(({className:e,...t},n)=>re.jsx(xT,{className:gn("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:n,children:re.jsx(DL,{className:gn("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));ET.displayName=xT.displayName;const CT=()=>{const{toggleTooltips:e,tooltipsVisible:t}=Nw();return re.jsx(_w,{children:re.jsxs(xw,{children:[re.jsx(Ew,{asChild:!0,children:re.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[re.jsx(ET,{onCheckedChange:e,checked:t}),re.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),re.jsxs(cm,{children:[t?"Hide Entity Fields":"Show Entity Fields",re.jsx(Cw,{fill:"ve-bg-popover"})]})]})})};var cp="focusScope.autoFocusOnMount",up="focusScope.autoFocusOnUnmount",Bb={bubbles:!1,cancelable:!0},kL="FocusScope",wT=ge.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=ge.useState(null),p=Zi(o),m=Zi(i),_=ge.useRef(null),C=cr(t,y=>u(y)),b=ge.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ge.useEffect(()=>{if(r){let y=function(D){if(b.paused||!l)return;const P=D.target;l.contains(P)?_.current=P:Aa(_.current,{select:!0})},T=function(D){if(b.paused||!l)return;const P=D.relatedTarget;P!==null&&(l.contains(P)||Aa(_.current,{select:!0}))},O=function(D){if(document.activeElement===document.body)for(const M of D)M.removedNodes.length>0&&Aa(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",T);const A=new MutationObserver(O);return l&&A.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",T),A.disconnect()}}},[r,l,b.paused]),ge.useEffect(()=>{if(l){zb.add(b);const y=document.activeElement;if(!l.contains(y)){const O=new CustomEvent(cp,Bb);l.addEventListener(cp,p),l.dispatchEvent(O),O.defaultPrevented||(ML(jL(TT(l)),{select:!0}),document.activeElement===y&&Aa(l))}return()=>{l.removeEventListener(cp,p),setTimeout(()=>{const O=new CustomEvent(up,Bb);l.addEventListener(up,m),l.dispatchEvent(O),O.defaultPrevented||Aa(y??document.body,{select:!0}),l.removeEventListener(up,m),zb.remove(b)},0)}}},[l,p,m,b]);const v=ge.useCallback(y=>{if(!n&&!r||b.paused)return;const T=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,O=document.activeElement;if(T&&O){const A=y.currentTarget,[D,P]=PL(A);D&&P?!y.shiftKey&&O===P?(y.preventDefault(),n&&Aa(D,{select:!0})):y.shiftKey&&O===D&&(y.preventDefault(),n&&Aa(P,{select:!0})):O===A&&y.preventDefault()}},[n,r,b.paused]);return re.jsx(kn.div,{tabIndex:-1,...a,ref:C,onKeyDown:v})});wT.displayName=kL;function ML(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Aa(r,{select:t}),document.activeElement!==n)return}function PL(e){const t=TT(e),n=Wb(t,e),r=Wb(t.reverse(),e);return[n,r]}function TT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Wb(e,t){for(const n of e)if(!IL(n,{upTo:t}))return n}function IL(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function LL(e){return e instanceof HTMLInputElement&&"select"in e}function Aa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&LL(e)&&t&&e.select()}}var zb=FL();function FL(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Hb(e,t),e.unshift(t)},remove(t){var n;e=Hb(e,t),(n=e[0])==null||n.resume()}}}function Hb(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jL(e){return e.filter(t=>t.tagName!=="A")}var dp=0;function BL(){ge.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gb()),document.body.insertAdjacentElement("beforeend",e[1]??Gb()),dp++,()=>{dp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),dp--}},[])}function Gb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var bi=function(){return bi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},bi.apply(this,arguments)};function NT(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function WL(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var tf="right-scroll-bar-position",nf="width-before-scroll-bar",zL="with-scroll-bars-hidden",HL="--removed-body-scroll-bar-size";function fp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function GL(e,t){var n=H.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var KL=typeof window<"u"?ge.useLayoutEffect:ge.useEffect,Kb=new WeakMap;function UL(e,t){var n=GL(null,function(r){return e.forEach(function(o){return fp(o,r)})});return KL(function(){var r=Kb.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||fp(l,null)}),i.forEach(function(l){o.has(l)||fp(l,a)})}Kb.set(n,e)},[e]),n}function VL(e){return e}function YL(e,t){t===void 0&&(t=VL);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var u=function(){var m=a;a=[],m.forEach(i)},p=function(){return Promise.resolve().then(u)};p(),n={push:function(m){a.push(m),p()},filter:function(m){return a=a.filter(m),n}}}};return o}function qL(e){e===void 0&&(e={});var t=YL(null);return t.options=bi({async:!0,ssr:!1},e),t}var ST=function(e){var t=e.sideCar,n=NT(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return ge.createElement(r,bi({},n))};ST.isSideCarExport=!0;function ZL(e,t){return e.useMedium(t),ST}var OT=qL(),hp=function(){},Gf=ge.forwardRef(function(e,t){var n=ge.useRef(null),r=ge.useState({onScrollCapture:hp,onWheelCapture:hp,onTouchMoveCapture:hp}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,u=e.className,p=e.removeScrollBar,m=e.enabled,_=e.shards,C=e.sideCar,b=e.noIsolation,v=e.inert,y=e.allowPinchZoom,T=e.as,O=T===void 0?"div":T,A=e.gapMode,D=NT(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=C,M=UL([n,t]),V=bi(bi({},D),o);return ge.createElement(ge.Fragment,null,m&&ge.createElement(P,{sideCar:OT,removeScrollBar:p,shards:_,noIsolation:b,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:A}),a?ge.cloneElement(ge.Children.only(l),bi(bi({},V),{ref:M})):ge.createElement(O,bi({},V,{className:u,ref:M}),l))});Gf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gf.classNames={fullWidth:nf,zeroRight:tf};var JL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function XL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=JL();return t&&e.setAttribute("nonce",t),e}function QL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eF(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tF=function(){var e=0,t=null;return{add:function(n){e==0&&(t=XL())&&(QL(t,n),eF(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nF=function(){var e=tF();return function(t,n){ge.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},AT=function(){var e=nF(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},rF={left:0,top:0,right:0,gap:0},pp=function(e){return parseInt(e||"",10)||0},oF=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[pp(n),pp(r),pp(o)]},iF=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rF;var t=oF(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aF=AT(),Hl="data-scroll-locked",sF=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
186
|
-
.`.concat(zL,` {
|
|
187
|
-
overflow: hidden `).concat(r,`;
|
|
188
|
-
padding-right: `).concat(l,"px ").concat(r,`;
|
|
189
|
-
}
|
|
190
|
-
body[`).concat(Hl,`] {
|
|
191
|
-
overflow: hidden `).concat(r,`;
|
|
192
|
-
overscroll-behavior: contain;
|
|
193
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
194
|
-
padding-left: `.concat(o,`px;
|
|
195
|
-
padding-top: `).concat(i,`px;
|
|
196
|
-
padding-right: `).concat(a,`px;
|
|
197
|
-
margin-left:0;
|
|
198
|
-
margin-top:0;
|
|
199
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
200
|
-
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.`).concat(tf,` {
|
|
204
|
-
right: `).concat(l,"px ").concat(r,`;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.`).concat(nf,` {
|
|
208
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.`).concat(tf," .").concat(tf,` {
|
|
212
|
-
right: 0 `).concat(r,`;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.`).concat(nf," .").concat(nf,` {
|
|
216
|
-
margin-right: 0 `).concat(r,`;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
body[`).concat(Hl,`] {
|
|
220
|
-
`).concat(HL,": ").concat(l,`px;
|
|
221
|
-
}
|
|
222
|
-
`)},Ub=function(){var e=parseInt(document.body.getAttribute(Hl)||"0",10);return isFinite(e)?e:0},lF=function(){ge.useEffect(function(){return document.body.setAttribute(Hl,(Ub()+1).toString()),function(){var e=Ub()-1;e<=0?document.body.removeAttribute(Hl):document.body.setAttribute(Hl,e.toString())}},[])},cF=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;lF();var i=ge.useMemo(function(){return iF(o)},[o]);return ge.createElement(aF,{styles:sF(i,!t,o,n?"":"!important")})},ug=!1;if(typeof window<"u")try{var Wd=Object.defineProperty({},"passive",{get:function(){return ug=!0,!0}});window.addEventListener("test",Wd,Wd),window.removeEventListener("test",Wd,Wd)}catch{ug=!1}var gl=ug?{passive:!1}:!1,uF=function(e){return e.tagName==="TEXTAREA"},RT=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uF(e)&&n[t]==="visible")},dF=function(e){return RT(e,"overflowY")},fF=function(e){return RT(e,"overflowX")},Vb=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=$T(e,r);if(o){var i=DT(e,r),a=i[1],l=i[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},hF=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pF=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$T=function(e,t){return e==="v"?dF(t):fF(t)},DT=function(e,t){return e==="v"?hF(t):pF(t)},gF=function(e,t){return e==="h"&&t==="rtl"?-1:1},mF=function(e,t,n,r,o){var i=gF(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,u=t.contains(l),p=!1,m=a>0,_=0,C=0;do{var b=DT(e,l),v=b[0],y=b[1],T=b[2],O=y-T-i*v;(v||O)&&$T(e,l)&&(_+=O,C+=v),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(m&&(Math.abs(_)<1||!o)||!m&&(Math.abs(C)<1||!o))&&(p=!0),p},zd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yb=function(e){return[e.deltaX,e.deltaY]},qb=function(e){return e&&"current"in e?e.current:e},vF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yF=function(e){return`
|
|
223
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
224
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
225
|
-
`)},bF=0,ml=[];function _F(e){var t=ge.useRef([]),n=ge.useRef([0,0]),r=ge.useRef(),o=ge.useState(bF++)[0],i=ge.useState(AT)[0],a=ge.useRef(e);ge.useEffect(function(){a.current=e},[e]),ge.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=WL([e.lockRef.current],(e.shards||[]).map(qb),!0).filter(Boolean);return y.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=ge.useCallback(function(y,T){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var O=zd(y),A=n.current,D="deltaX"in y?y.deltaX:A[0]-O[0],P="deltaY"in y?y.deltaY:A[1]-O[1],M,V=y.target,J=Math.abs(D)>Math.abs(P)?"h":"v";if("touches"in y&&J==="h"&&V.type==="range")return!1;var oe=Vb(J,V);if(!oe)return!0;if(oe?M=J:(M=J==="v"?"h":"v",oe=Vb(J,V)),!oe)return!1;if(!r.current&&"changedTouches"in y&&(D||P)&&(r.current=M),!M)return!0;var Z=r.current||M;return mF(Z,T,y,Z==="h"?D:P,!0)},[]),u=ge.useCallback(function(y){var T=y;if(!(!ml.length||ml[ml.length-1]!==i)){var O="deltaY"in T?Yb(T):zd(T),A=t.current.filter(function(M){return M.name===T.type&&(M.target===T.target||T.target===M.shadowParent)&&vF(M.delta,O)})[0];if(A&&A.should){T.cancelable&&T.preventDefault();return}if(!A){var D=(a.current.shards||[]).map(qb).filter(Boolean).filter(function(M){return M.contains(T.target)}),P=D.length>0?l(T,D[0]):!a.current.noIsolation;P&&T.cancelable&&T.preventDefault()}}},[]),p=ge.useCallback(function(y,T,O,A){var D={name:y,delta:T,target:O,should:A,shadowParent:xF(O)};t.current.push(D),setTimeout(function(){t.current=t.current.filter(function(P){return P!==D})},1)},[]),m=ge.useCallback(function(y){n.current=zd(y),r.current=void 0},[]),_=ge.useCallback(function(y){p(y.type,Yb(y),y.target,l(y,e.lockRef.current))},[]),C=ge.useCallback(function(y){p(y.type,zd(y),y.target,l(y,e.lockRef.current))},[]);ge.useEffect(function(){return ml.push(i),e.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:C}),document.addEventListener("wheel",u,gl),document.addEventListener("touchmove",u,gl),document.addEventListener("touchstart",m,gl),function(){ml=ml.filter(function(y){return y!==i}),document.removeEventListener("wheel",u,gl),document.removeEventListener("touchmove",u,gl),document.removeEventListener("touchstart",m,gl)}},[]);var b=e.removeScrollBar,v=e.inert;return ge.createElement(ge.Fragment,null,v?ge.createElement(i,{styles:yF(o)}):null,b?ge.createElement(cF,{gapMode:e.gapMode}):null)}function xF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const EF=ZL(OT,_F);var kT=ge.forwardRef(function(e,t){return ge.createElement(Gf,bi({},e,{ref:t,sideCar:EF}))});kT.classNames=Gf.classNames;var CF=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vl=new WeakMap,Hd=new WeakMap,Gd={},gp=0,MT=function(e){return e&&(e.host||MT(e.parentNode))},wF=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=MT(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},TF=function(e,t,n,r){var o=wF(t,Array.isArray(e)?e:[e]);Gd[n]||(Gd[n]=new WeakMap);var i=Gd[n],a=[],l=new Set,u=new Set(o),p=function(_){!_||l.has(_)||(l.add(_),p(_.parentNode))};o.forEach(p);var m=function(_){!_||u.has(_)||Array.prototype.forEach.call(_.children,function(C){if(l.has(C))m(C);else try{var b=C.getAttribute(r),v=b!==null&&b!=="false",y=(vl.get(C)||0)+1,T=(i.get(C)||0)+1;vl.set(C,y),i.set(C,T),a.push(C),y===1&&v&&Hd.set(C,!0),T===1&&C.setAttribute(n,"true"),v||C.setAttribute(r,"true")}catch(O){console.error("aria-hidden: cannot operate on ",C,O)}})};return m(t),l.clear(),gp++,function(){a.forEach(function(_){var C=vl.get(_)-1,b=i.get(_)-1;vl.set(_,C),i.set(_,b),C||(Hd.has(_)||_.removeAttribute(r),Hd.delete(_)),b||_.removeAttribute(n)}),gp--,gp||(vl=new WeakMap,vl=new WeakMap,Hd=new WeakMap,Gd={})}},NF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=CF(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),TF(r,o,n,"aria-hidden")):function(){return null}},mm="Dialog",[PT,IT]=rc(mm),[SF,qo]=PT(mm),LT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=ge.useRef(null),u=ge.useRef(null),[p=!1,m]=zu({prop:r,defaultProp:o,onChange:i});return re.jsx(SF,{scope:t,triggerRef:l,contentRef:u,contentId:Cu(),titleId:Cu(),descriptionId:Cu(),open:p,onOpenChange:m,onOpenToggle:ge.useCallback(()=>m(_=>!_),[m]),modal:a,children:n})};LT.displayName=mm;var FT="DialogTrigger",jT=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(FT,n),i=cr(t,o.triggerRef);return re.jsx(kn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bm(o.open),...r,ref:i,onClick:On(e.onClick,o.onOpenToggle)})});jT.displayName=FT;var vm="DialogPortal",[OF,BT]=PT(vm,{forceMount:void 0}),WT=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=qo(vm,t);return re.jsx(OF,{scope:t,forceMount:n,children:ge.Children.map(r,a=>re.jsx(ac,{present:n||i.open,children:re.jsx(ow,{asChild:!0,container:o,children:a})}))})};WT.displayName=vm;var gf="DialogOverlay",zT=ge.forwardRef((e,t)=>{const n=BT(gf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=qo(gf,e.__scopeDialog);return i.modal?re.jsx(ac,{present:r||i.open,children:re.jsx(AF,{...o,ref:t})}):null});zT.displayName=gf;var AF=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(gf,n);return re.jsx(kT,{as:Ma,allowPinchZoom:!0,shards:[o.contentRef],children:re.jsx(kn.div,{"data-state":bm(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Es="DialogContent",HT=ge.forwardRef((e,t)=>{const n=BT(Es,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=qo(Es,e.__scopeDialog);return re.jsx(ac,{present:r||i.open,children:i.modal?re.jsx(RF,{...o,ref:t}):re.jsx($F,{...o,ref:t})})});HT.displayName=Es;var RF=ge.forwardRef((e,t)=>{const n=qo(Es,e.__scopeDialog),r=ge.useRef(null),o=cr(t,n.contentRef,r);return ge.useEffect(()=>{const i=r.current;if(i)return NF(i)},[]),re.jsx(GT,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:On(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:On(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:On(e.onFocusOutside,i=>i.preventDefault())})}),$F=ge.forwardRef((e,t)=>{const n=qo(Es,e.__scopeDialog),r=ge.useRef(!1),o=ge.useRef(!1);return re.jsx(GT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,p;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((p=n.triggerRef.current)==null?void 0:p.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),GT=ge.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=qo(Es,n),u=ge.useRef(null),p=cr(t,u);return BL(),re.jsxs(re.Fragment,{children:[re.jsx(wT,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:re.jsx(Zg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":bm(l.open),...a,ref:p,onDismiss:()=>l.onOpenChange(!1)})}),re.jsxs(re.Fragment,{children:[re.jsx(kF,{titleId:l.titleId}),re.jsx(PF,{contentRef:u,descriptionId:l.descriptionId})]})]})}),ym="DialogTitle",KT=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(ym,n);return re.jsx(kn.h2,{id:o.titleId,...r,ref:t})});KT.displayName=ym;var UT="DialogDescription",VT=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(UT,n);return re.jsx(kn.p,{id:o.descriptionId,...r,ref:t})});VT.displayName=UT;var YT="DialogClose",qT=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(YT,n);return re.jsx(kn.button,{type:"button",...r,ref:t,onClick:On(e.onClick,()=>o.onOpenChange(!1))})});qT.displayName=YT;function bm(e){return e?"open":"closed"}var ZT="DialogTitleWarning",[DF,JT]=SD(ZT,{contentName:Es,titleName:ym,docsSlug:"dialog"}),kF=({titleId:e})=>{const t=JT(ZT),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
226
|
-
|
|
227
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
228
|
-
|
|
229
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return ge.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},MF="DialogDescriptionWarning",PF=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${JT(MF).contentName}}.`;return ge.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},IF=LT,LF=jT,FF=WT,jF=zT,BF=HT,WF=KT,zF=VT,XT=qT,QT="AlertDialog",[HF,gJ]=rc(QT,[IT]),Qi=IT(),eN=e=>{const{__scopeAlertDialog:t,...n}=e,r=Qi(t);return re.jsx(IF,{...r,...n,modal:!0})};eN.displayName=QT;var GF="AlertDialogTrigger",tN=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(LF,{...o,...r,ref:t})});tN.displayName=GF;var KF="AlertDialogPortal",nN=e=>{const{__scopeAlertDialog:t,...n}=e,r=Qi(t);return re.jsx(FF,{...r,...n})};nN.displayName=KF;var UF="AlertDialogOverlay",rN=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(jF,{...o,...r,ref:t})});rN.displayName=UF;var Gl="AlertDialogContent",[VF,YF]=HF(Gl),oN=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=Qi(n),a=ge.useRef(null),l=cr(t,a),u=ge.useRef(null);return re.jsx(DF,{contentName:Gl,titleName:iN,docsSlug:"alert-dialog",children:re.jsx(VF,{scope:n,cancelRef:u,children:re.jsxs(BF,{role:"alertdialog",...i,...o,ref:l,onOpenAutoFocus:On(o.onOpenAutoFocus,p=>{var m;p.preventDefault(),(m=u.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[re.jsx(Og,{children:r}),re.jsx(ZF,{contentRef:a})]})})})});oN.displayName=Gl;var iN="AlertDialogTitle",aN=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(WF,{...o,...r,ref:t})});aN.displayName=iN;var sN="AlertDialogDescription",lN=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(zF,{...o,...r,ref:t})});lN.displayName=sN;var qF="AlertDialogAction",cN=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(XT,{...o,...r,ref:t})});cN.displayName=qF;var uN="AlertDialogCancel",dN=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=YF(uN,n),i=Qi(n),a=cr(t,o);return re.jsx(XT,{...i,...r,ref:a})});dN.displayName=uN;var ZF=({contentRef:e})=>{const t=`\`${Gl}\` requires a description for the component to be accessible for screen reader users.
|
|
230
|
-
|
|
231
|
-
You can add a description to the \`${Gl}\` by passing a \`${sN}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
232
|
-
|
|
233
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Gl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
234
|
-
|
|
235
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return ge.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},JF=eN,XF=tN,QF=nN,fN=rN,hN=oN,pN=cN,gN=dN,mN=aN,vN=lN;const _m=Dr("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),e2=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Ma:"button";return re.jsx(a,{className:gn(_m({variant:t,size:n,className:e})),ref:i,...o})});e2.displayName="Button";const t2=JF,n2=XF,r2=QF,yN=ge.forwardRef(({className:e,...t},n)=>re.jsx(fN,{className:gn("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:n}));yN.displayName=fN.displayName;const bN=ge.forwardRef(({className:e,...t},n)=>re.jsxs(r2,{children:[re.jsx(yN,{}),re.jsx(hN,{ref:n,className:gn("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));bN.displayName=hN.displayName;const _N=({className:e,...t})=>re.jsx("div",{className:gn("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});_N.displayName="AlertDialogHeader";const xN=({className:e,...t})=>re.jsx("div",{className:gn("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});xN.displayName="AlertDialogFooter";const EN=ge.forwardRef(({className:e,...t},n)=>re.jsx(mN,{ref:n,className:gn("ve-text-lg ve-font-semibold",e),...t}));EN.displayName=mN.displayName;const CN=ge.forwardRef(({className:e,...t},n)=>re.jsx(vN,{ref:n,className:gn("ve-text-sm ve-text-muted-foreground",e),...t}));CN.displayName=vN.displayName;const o2=ge.forwardRef(({className:e,...t},n)=>re.jsx(pN,{ref:n,className:gn(_m(),e),...t}));o2.displayName=pN.displayName;const wN=ge.forwardRef(({className:e,...t},n)=>re.jsx(gN,{ref:n,className:gn(_m({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));wN.displayName=gN.displayName;const TN=({disabled:e,onClearLocalChanges:t})=>{const[n,r]=H.useState(!1),o=()=>{t(),r(!1)};return re.jsxs(t2,{open:n,onOpenChange:r,children:[re.jsx(n2,{disabled:e,asChild:!0,children:re.jsx(Vi,{variant:"outline",children:"Clear Local Changes"})}),re.jsxs(bN,{children:[re.jsxs(_N,{children:[re.jsx(EN,{children:"Clear Local Changes"}),re.jsx(CN,{children:"This action will remove your local changes. It cannot be undone."})]}),re.jsxs(xN,{children:[re.jsx(wN,{children:"Cancel"}),re.jsx(Vi,{onClick:o,children:"Confirm"})]})]})]})},i2=e=>{const{onClearLocalChanges:t,onHistoryChange:n,onPublishLayout:r,isDevMode:o}=e,{appState:i,history:{back:a,forward:l,histories:u,index:p,hasPast:m,hasFuture:_,setHistories:C}}=Vt.usePuck();return H.useEffect(()=>{n(u,p)},[p,u,n]),re.jsxs("header",{className:"puck-header",children:[re.jsxs("div",{className:"header-left",children:[re.jsx(mT,{}),re.jsx(CT,{})]}),re.jsx("div",{className:"header-center"}),re.jsxs("div",{className:"actions",children:[re.jsx(Vi,{variant:"ghost",size:"icon",disabled:!m,onClick:a,children:re.jsx(jP,{className:"sm-icon"})}),re.jsx(Vi,{variant:"ghost",size:"icon",disabled:!_,onClick:l,children:re.jsx(BP,{className:"sm-icon"})}),re.jsx(TN,{disabled:u.length===1,onClearLocalChanges:()=>{t(),C([{id:"root",state:{data:u[0].state.data}}])}}),!o&&re.jsx(Vi,{variant:"secondary",disabled:u.length===1,onClick:async()=>{await r(i.data),t(),C([{id:"root",state:{data:i.data}}])},children:"Publish"})]})]})},yl=new Gr,a2=({puckConfig:e,puckInitialHistory:t,isLoading:n,clearHistory:r,templateMetadata:o,layoutSaveState:i,saveLayoutSaveState:a,publishVisualConfiguration:l,sendDevSaveStateData:u,buildVisualConfigLocalStorageKey:p})=>{const[m,_]=H.useState(!1),C=H.useRef(0),b=H.useCallback((O,A)=>{A!==0&&C.current!==A&&O.length>0&&(yl.logFunc("handleHistoryChange"),yl.logData("PUCK_INDEX",A),yl.logData("PUCK_HISTORY",O),C.current=A,yl.logFunc("saveToLocalStorage"),window.localStorage.setItem(p(),JSON.stringify(O)),(i==null?void 0:i.hash)!==O[A].id&&(o.isDevMode&&!o.devOverride?(yl.logFunc("sendDevSaveStateData"),u({payload:{devSaveStateData:JSON.stringify(O[A].state.data)}})):(yl.logFunc("saveLayoutSaveState"),a({payload:{hash:O[A].id,history:JSON.stringify(O[A].state)}}))))},[o,p,i]),v=()=>{r(),C.current=0},y=async O=>{l({payload:{visualConfigurationData:JSON.stringify(O)}})},T=async()=>{if(!n&&!m){_(!0);return}};return re.jsx(Tw,{children:re.jsx(Vt.Puck,{config:e,data:{},initialHistory:t,onChange:T,overrides:{header:()=>re.jsx(i2,{onClearLocalChanges:v,onHistoryChange:b,onPublishLayout:y,isDevMode:o.isDevMode})}})})},s2={GLOBAL:"global",INDIVIDUAL:"individual"},Zb="ROLE_",Jb="TEMPLATE_",l2="LAYOUT_",c2="ENTITY_",u2=new Gr,NN=e=>{const t=H.useCallback(()=>e?d2(e.isDevMode&&!e.devOverride,e.role,e.templateId,e.layoutId,e.entityId):"",[e]);return{clearVisualConfigLocalStorage:()=>{u2.logFunc("clearVisualConfigLocalStorage"),window.localStorage.removeItem(t())},buildVisualConfigLocalStorageKey:t}};function d2(e,t,n,r,o){const i=e?"dev":"";if(!t||!n||!o&&!r)throw new Error(`Unable to generate local storage key, missing query parameters${!o&&" entityId"}${!r&&" layoutId"}`);if(t===s2.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return i+Zb+t+Jb+n+c2+o}if(!r)throw new Error(`LayoutId required for role ${t}`);return i+Zb+t+Jb+n+l2+r}const f2=()=>{const{sendToParent:e}=Wo("saveSaveState",lr),{sendToParent:t}=Wo("deleteSaveState",lr),{sendToParent:n}=Wo("saveVisualConfigData",lr),{sendToParent:r}=Wo("sendDevSaveStateData",lr);return{saveLayoutSaveState:e,deleteLayoutSaveState:t,publishVisualConfiguration:n,sendDevLayoutSaveStateData:r}},h2=new Gr,p2=()=>{const{iFrameLoaded:e}=Hu();H.useEffect(()=>{e({payload:{message:"Layout Editor is loaded"}})},[]);const[t,n]=H.useState(),[r,o]=H.useState(!1);return ka("getSaveState",lr,(i,a)=>{let l;a&&(l={...a,history:cg(a.history)}),h2.logData("SAVE_STATE",l),n(l),o(!0),i({status:"success",payload:{message:"saveState received"}})}),{layoutSaveState:t,layoutSaveStateFetched:r}},g2=(e,t)=>{const n=m2(e);return t&&Object.entries(n).forEach(([r])=>{t[r]&&(n[r]=t[r])}),n},m2=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if("default"in i)t[`--${i.plugin}-${n}-${o}`]=typeof i.default=="number"?`${i.default}px`:i.default;else if("styles"in i)for(const a in i.styles)t[`--${i.plugin}-${n}-${o}-${a}`]=typeof i.styles[a].default=="number"?`${i.styles[a].default}px`:i.styles[a].default}}return t},v2=(e,t,n)=>{const r={};for(const o in n.styles){const i=n.styles[o];if("default"in i)i.type==="number"?r[`--${i.plugin}-${t}-${o}`]=e[o]+"px":r[`--${i.plugin}-${t}-${o}`]=e[o];else for(const a in i.styles)i.styles[a].type==="number"?r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]+"px":r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]}return r},SN="visual-editor-theme",mf=new Gr,y2=(e,t,n)=>{var a,l;mf.logFunc("applyTheme");const r=(a=e==null?void 0:e._site)==null?void 0:a.pagesTheme;let o;(r==null?void 0:r.length)>0&&(o=e.siteId!==0?r.find(u=>Number(u.themeConfiguration.siteId)===e.siteId):r[0]);let i;return o!=null&&o.themeConfiguration&&(i=JSON.parse((l=o.themeConfiguration)==null?void 0:l.data)),Object.keys(t).length>0?`${n??""}<style id="${SN}" type="text/css">${ON(i,t)}</style>`:n??""},ON=(e,t)=>{mf.logFunc("internalApplyTheme");const n=g2(t,e);return!n||Object.keys(n).length===0?"":(mf.logData("THEME_VALUES_TO_APPLY",n),".components{"+Object.entries(n).map(([r,o])=>`${r}:${o} !important`).join(";")+"}")},Ru=async(e,t)=>{mf.logFunc("updateThemeInEditor");const n=new MutationObserver(()=>{var i;const o=(i=document.getElementById("preview-frame").contentDocument)==null?void 0:i.getElementById(SN);o&&(n.disconnect(),o.innerText=ON(e,t))});n.observe(document,{childList:!0,subtree:!0})},b2="SITE_",_2="THEME_",x2=new Gr,AN=e=>{const t=H.useCallback(()=>e!=null&&e.themeEntityId?E2(e.isDevMode,e.siteId,e.themeEntityId):"",[e]);return{clearThemeLocalStorage:()=>{x2.logFunc("clearThemeLocalStorage"),window.localStorage.removeItem(t())},buildThemeLocalStorageKey:t}};function E2(e,t,n){if(!n)throw new Error("Unable to generate local storage key for themes, missing themeEntityId");return(e?"dev":"")+b2+t+_2+n}const mi=new Gr,C2=e=>{const{puckConfig:t,templateMetadata:n,visualConfigurationData:r,themeData:o,themeConfig:i}=e,{sendDevLayoutSaveStateData:a,saveLayoutSaveState:l,publishVisualConfiguration:u,deleteLayoutSaveState:p}=f2(),{layoutSaveState:m,layoutSaveStateFetched:_}=p2(),{buildVisualConfigLocalStorageKey:C,clearVisualConfigLocalStorage:b}=NN(n),{buildThemeLocalStorageKey:v}=AN(n),[y,T]=H.useState(),[O,A]=H.useState(!1),D=()=>{mi.logFunc("clearHistory"),b(),p()};H.useEffect(()=>{if(!i)return;const J=window.localStorage.getItem(v());if(n.isDevMode&&J){const oe=JSON.parse(J);if(oe.length>0){const Z=oe[oe.length-1].data;mi.log("Layout Dev Mode - Using theme data from local storage"),Ru(Z,i);return}}o&&Ru(o,i)},[o,i,n]);const P=H.useCallback(()=>{if(!n)return;if(mi.logFunc("loadPuckInitialHistory"),n.isDevMode&&!n.devOverride){const Z=window.localStorage.getItem(C());if(Z){mi.log("Layout Dev Mode - Using layout data from localStorage");const U=JSON.parse(Z),Q=U.length-1;T({histories:U,index:Q,appendData:!1}),A(!0);return}mi.log("Layout Dev Mode - No localStorage. Using layout data from Content"),r&&T({histories:[{id:"root",state:{data:r}}],appendData:!1}),A(!0);return}if(!m){b(),mi.log("Layout Prod Mode - No saveState. Using layout data from Content"),r&&T({histories:[{id:"root",state:{data:r}}],appendData:!1}),A(!0);return}const J=window.localStorage.getItem(C());if(!J){mi.log("Layout Prod Mode - No localStorage. Using layout saveState"),T({histories:r?[{id:"root",state:{data:r}},{id:m.hash,state:{data:m.history.data}}]:[{id:m.hash,state:{data:m.history.data}}],index:r?1:0,appendData:!1}),A(!0);return}const oe=JSON.parse(J).findIndex(Z=>Z.id===(m==null?void 0:m.hash));if(oe!==-1){mi.log("Layout Prod Mode - Using localStorage visual configuration"),T({histories:JSON.parse(J),index:oe,appendData:!1}),A(!0);return}b()},[T,A,b,C]);H.useEffect(()=>{_&&P()},[n,_]),H.useEffect(()=>{y&&mi.logData("PUCK_INITIAL_HISTORY",y)},[y]),H.useEffect(()=>{if(!O)return;const J=y==null?void 0:y.histories[y.histories.length-1].state.data;mi.logFunc("sendDevSaveStateData useEffect"),a({payload:{devSaveStateData:JSON.stringify(J)}})},[O,y,n]);const M=!O||!_,V=60+(O+_)*20;return M?re.jsx(pm,{progress:V}):re.jsx(a2,{puckConfig:t,puckInitialHistory:y,isLoading:M,clearHistory:D,templateMetadata:n,layoutSaveState:m,saveLayoutSaveState:l,publishVisualConfiguration:u,sendDevSaveStateData:a,buildVisualConfigLocalStorageKey:C})},w2=Dr("ve-relative ve-rounded ve-border ve-m-4 ve-mb-0 ve-p-4 ve-[&>svg~*]:pl-7 ve-[&>svg+div]:translate-y-[-3px] ve-[&>svg]:absolute ve-[&>svg]:left-4 ve-[&>svg]:top-4 ve-[&>svg]:text-foreground",{variants:{variant:{default:"ve-bg-background ve-text-foreground",destructive:"ve-border-destructive/50 ve-text-destructive ve-dark:border-destructive ve-[&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),dg=H.forwardRef(({className:e,variant:t,...n},r)=>re.jsx("div",{ref:r,role:"alert",className:gn(w2({variant:t}),e),...n}));dg.displayName="Alert";const T2=H.forwardRef(({className:e,...t},n)=>re.jsx("h5",{ref:n,className:gn("ve-mb-1 ve-font-medium ve-leading-none ve-tracking-tight",e),...t}));T2.displayName="AlertTitle";const fg=H.forwardRef(({className:e,...t},n)=>re.jsx("div",{ref:n,className:gn("ve-text-sm [&_p]:ve-leading-relaxed",e),...t}));fg.displayName="AlertDescription";var vo={},Gu={},N2=typeof Nd=="object"&&Nd&&Nd.Object===Object&&Nd,RN=N2,S2=RN,O2=typeof self=="object"&&self&&self.Object===Object&&self,A2=S2||O2||Function("return this")(),wi=A2,R2=wi,$2=R2.Symbol,Ku=$2,Xb=Ku,$N=Object.prototype,D2=$N.hasOwnProperty,k2=$N.toString,hu=Xb?Xb.toStringTag:void 0;function M2(e){var t=D2.call(e,hu),n=e[hu];try{e[hu]=void 0;var r=!0}catch{}var o=k2.call(e);return r&&(t?e[hu]=n:delete e[hu]),o}var P2=M2,I2=Object.prototype,L2=I2.toString;function F2(e){return L2.call(e)}var j2=F2,Qb=Ku,B2=P2,W2=j2,z2="[object Null]",H2="[object Undefined]",e_=Qb?Qb.toStringTag:void 0;function G2(e){return e==null?e===void 0?H2:z2:e_&&e_ in Object(e)?B2(e):W2(e)}var Ss=G2,K2=Array.isArray,Zo=K2;function U2(e){return e!=null&&typeof e=="object"}var ea=U2,V2=Ss,Y2=Zo,q2=ea,Z2="[object String]";function J2(e){return typeof e=="string"||!Y2(e)&&q2(e)&&V2(e)==Z2}var X2=J2;function Q2(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[e?l:++o];if(n(i[u],u,i)===!1)break}return t}}var ej=Q2,tj=ej,nj=tj(),rj=nj;function oj(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ij=oj,aj=Ss,sj=ea,lj="[object Arguments]";function cj(e){return sj(e)&&aj(e)==lj}var uj=cj,t_=uj,dj=ea,DN=Object.prototype,fj=DN.hasOwnProperty,hj=DN.propertyIsEnumerable,pj=t_(function(){return arguments}())?t_:function(e){return dj(e)&&fj.call(e,"callee")&&!hj.call(e,"callee")},kN=pj,vf={exports:{}};function gj(){return!1}var mj=gj;vf.exports;(function(e,t){var n=wi,r=mj,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,l=a?n.Buffer:void 0,u=l?l.isBuffer:void 0,p=u||r;e.exports=p})(vf,vf.exports);var xm=vf.exports,vj=9007199254740991,yj=/^(?:0|[1-9]\d*)$/;function bj(e,t){var n=typeof e;return t=t??vj,!!t&&(n=="number"||n!="symbol"&&yj.test(e))&&e>-1&&e%1==0&&e<t}var MN=bj,_j=9007199254740991;function xj(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=_j}var Em=xj,Ej=Ss,Cj=Em,wj=ea,Tj="[object Arguments]",Nj="[object Array]",Sj="[object Boolean]",Oj="[object Date]",Aj="[object Error]",Rj="[object Function]",$j="[object Map]",Dj="[object Number]",kj="[object Object]",Mj="[object RegExp]",Pj="[object Set]",Ij="[object String]",Lj="[object WeakMap]",Fj="[object ArrayBuffer]",jj="[object DataView]",Bj="[object Float32Array]",Wj="[object Float64Array]",zj="[object Int8Array]",Hj="[object Int16Array]",Gj="[object Int32Array]",Kj="[object Uint8Array]",Uj="[object Uint8ClampedArray]",Vj="[object Uint16Array]",Yj="[object Uint32Array]",Nn={};Nn[Bj]=Nn[Wj]=Nn[zj]=Nn[Hj]=Nn[Gj]=Nn[Kj]=Nn[Uj]=Nn[Vj]=Nn[Yj]=!0;Nn[Tj]=Nn[Nj]=Nn[Fj]=Nn[Sj]=Nn[jj]=Nn[Oj]=Nn[Aj]=Nn[Rj]=Nn[$j]=Nn[Dj]=Nn[kj]=Nn[Mj]=Nn[Pj]=Nn[Ij]=Nn[Lj]=!1;function qj(e){return wj(e)&&Cj(e.length)&&!!Nn[Ej(e)]}var Zj=qj;function Jj(e){return function(t){return e(t)}}var Cm=Jj,yf={exports:{}};yf.exports;(function(e,t){var n=RN,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,l=function(){try{var u=o&&o.require&&o.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(yf,yf.exports);var wm=yf.exports,Xj=Zj,Qj=Cm,n_=wm,r_=n_&&n_.isTypedArray,eB=r_?Qj(r_):Xj,PN=eB,tB=ij,nB=kN,rB=Zo,oB=xm,iB=MN,aB=PN,sB=Object.prototype,lB=sB.hasOwnProperty;function cB(e,t){var n=rB(e),r=!n&&nB(e),o=!n&&!r&&oB(e),i=!n&&!r&&!o&&aB(e),a=n||r||o||i,l=a?tB(e.length,String):[],u=l.length;for(var p in e)(t||lB.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||iB(p,u)))&&l.push(p);return l}var IN=cB,uB=Object.prototype;function dB(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||uB;return e===n}var Tm=dB;function fB(e,t){return function(n){return e(t(n))}}var LN=fB,hB=LN,pB=hB(Object.keys,Object),gB=pB,mB=Tm,vB=gB,yB=Object.prototype,bB=yB.hasOwnProperty;function _B(e){if(!mB(e))return vB(e);var t=[];for(var n in Object(e))bB.call(e,n)&&n!="constructor"&&t.push(n);return t}var xB=_B;function EB(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var lc=EB,CB=Ss,wB=lc,TB="[object AsyncFunction]",NB="[object Function]",SB="[object GeneratorFunction]",OB="[object Proxy]";function AB(e){if(!wB(e))return!1;var t=CB(e);return t==NB||t==SB||t==TB||t==OB}var FN=AB,RB=FN,$B=Em;function DB(e){return e!=null&&$B(e.length)&&!RB(e)}var Kf=DB,kB=IN,MB=xB,PB=Kf;function IB(e){return PB(e)?kB(e):MB(e)}var Uu=IB,LB=rj,FB=Uu;function jB(e,t){return e&&LB(e,t,FB)}var jN=jB;function BB(e){return e}var BN=BB,WB=BN;function zB(e){return typeof e=="function"?e:WB}var HB=zB,GB=jN,KB=HB;function UB(e,t){return e&&GB(e,KB(t))}var Nm=UB,VB=LN,YB=VB(Object.getPrototypeOf,Object),Sm=YB,qB=Ss,ZB=Sm,JB=ea,XB="[object Object]",QB=Function.prototype,e3=Object.prototype,WN=QB.toString,t3=e3.hasOwnProperty,n3=WN.call(Object);function r3(e){if(!JB(e)||qB(e)!=XB)return!1;var t=ZB(e);if(t===null)return!0;var n=t3.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&WN.call(n)==n3}var o3=r3;function i3(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var zN=i3;function a3(){this.__data__=[],this.size=0}var s3=a3;function l3(e,t){return e===t||e!==e&&t!==t}var Om=l3,c3=Om;function u3(e,t){for(var n=e.length;n--;)if(c3(e[n][0],t))return n;return-1}var Uf=u3,d3=Uf,f3=Array.prototype,h3=f3.splice;function p3(e){var t=this.__data__,n=d3(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():h3.call(t,n,1),--this.size,!0}var g3=p3,m3=Uf;function v3(e){var t=this.__data__,n=m3(t,e);return n<0?void 0:t[n][1]}var y3=v3,b3=Uf;function _3(e){return b3(this.__data__,e)>-1}var x3=_3,E3=Uf;function C3(e,t){var n=this.__data__,r=E3(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var w3=C3,T3=s3,N3=g3,S3=y3,O3=x3,A3=w3;function cc(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])}}cc.prototype.clear=T3;cc.prototype.delete=N3;cc.prototype.get=S3;cc.prototype.has=O3;cc.prototype.set=A3;var Vf=cc,R3=Vf;function $3(){this.__data__=new R3,this.size=0}var D3=$3;function k3(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var M3=k3;function P3(e){return this.__data__.get(e)}var I3=P3;function L3(e){return this.__data__.has(e)}var F3=L3,j3=wi,B3=j3["__core-js_shared__"],W3=B3,mp=W3,o_=function(){var e=/[^.]+$/.exec(mp&&mp.keys&&mp.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function z3(e){return!!o_&&o_ in e}var H3=z3,G3=Function.prototype,K3=G3.toString;function U3(e){if(e!=null){try{return K3.call(e)}catch{}try{return e+""}catch{}}return""}var HN=U3,V3=FN,Y3=H3,q3=lc,Z3=HN,J3=/[\\^$.*+?()[\]{}|]/g,X3=/^\[object .+?Constructor\]$/,Q3=Function.prototype,eW=Object.prototype,tW=Q3.toString,nW=eW.hasOwnProperty,rW=RegExp("^"+tW.call(nW).replace(J3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oW(e){if(!q3(e)||Y3(e))return!1;var t=V3(e)?rW:X3;return t.test(Z3(e))}var iW=oW;function aW(e,t){return e==null?void 0:e[t]}var sW=aW,lW=iW,cW=sW;function uW(e,t){var n=cW(e,t);return lW(n)?n:void 0}var Os=uW,dW=Os,fW=wi,hW=dW(fW,"Map"),Am=hW,pW=Os,gW=pW(Object,"create"),Yf=gW,i_=Yf;function mW(){this.__data__=i_?i_(null):{},this.size=0}var vW=mW;function yW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var bW=yW,_W=Yf,xW="__lodash_hash_undefined__",EW=Object.prototype,CW=EW.hasOwnProperty;function wW(e){var t=this.__data__;if(_W){var n=t[e];return n===xW?void 0:n}return CW.call(t,e)?t[e]:void 0}var TW=wW,NW=Yf,SW=Object.prototype,OW=SW.hasOwnProperty;function AW(e){var t=this.__data__;return NW?t[e]!==void 0:OW.call(t,e)}var RW=AW,$W=Yf,DW="__lodash_hash_undefined__";function kW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$W&&t===void 0?DW:t,this}var MW=kW,PW=vW,IW=bW,LW=TW,FW=RW,jW=MW;function uc(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])}}uc.prototype.clear=PW;uc.prototype.delete=IW;uc.prototype.get=LW;uc.prototype.has=FW;uc.prototype.set=jW;var BW=uc,a_=BW,WW=Vf,zW=Am;function HW(){this.size=0,this.__data__={hash:new a_,map:new(zW||WW),string:new a_}}var GW=HW;function KW(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var UW=KW,VW=UW;function YW(e,t){var n=e.__data__;return VW(t)?n[typeof t=="string"?"string":"hash"]:n.map}var qf=YW,qW=qf;function ZW(e){var t=qW(this,e).delete(e);return this.size-=t?1:0,t}var JW=ZW,XW=qf;function QW(e){return XW(this,e).get(e)}var ez=QW,tz=qf;function nz(e){return tz(this,e).has(e)}var rz=nz,oz=qf;function iz(e,t){var n=oz(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var az=iz,sz=GW,lz=JW,cz=ez,uz=rz,dz=az;function dc(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])}}dc.prototype.clear=sz;dc.prototype.delete=lz;dc.prototype.get=cz;dc.prototype.has=uz;dc.prototype.set=dz;var Rm=dc,fz=Vf,hz=Am,pz=Rm,gz=200;function mz(e,t){var n=this.__data__;if(n instanceof fz){var r=n.__data__;if(!hz||r.length<gz-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new pz(r)}return n.set(e,t),this.size=n.size,this}var vz=mz,yz=Vf,bz=D3,_z=M3,xz=I3,Ez=F3,Cz=vz;function fc(e){var t=this.__data__=new yz(e);this.size=t.size}fc.prototype.clear=bz;fc.prototype.delete=_z;fc.prototype.get=xz;fc.prototype.has=Ez;fc.prototype.set=Cz;var $m=fc,wz="__lodash_hash_undefined__";function Tz(e){return this.__data__.set(e,wz),this}var Nz=Tz;function Sz(e){return this.__data__.has(e)}var Oz=Sz,Az=Rm,Rz=Nz,$z=Oz;function bf(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Az;++t<n;)this.add(e[t])}bf.prototype.add=bf.prototype.push=Rz;bf.prototype.has=$z;var Dz=bf;function kz(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Mz=kz;function Pz(e,t){return e.has(t)}var Iz=Pz,Lz=Dz,Fz=Mz,jz=Iz,Bz=1,Wz=2;function zz(e,t,n,r,o,i){var a=n&Bz,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var _=-1,C=!0,b=n&Wz?new Lz:void 0;for(i.set(e,t),i.set(t,e);++_<l;){var v=e[_],y=t[_];if(r)var T=a?r(y,v,_,t,e,i):r(v,y,_,e,t,i);if(T!==void 0){if(T)continue;C=!1;break}if(b){if(!Fz(t,function(O,A){if(!jz(b,A)&&(v===O||o(v,O,n,r,i)))return b.push(A)})){C=!1;break}}else if(!(v===y||o(v,y,n,r,i))){C=!1;break}}return i.delete(e),i.delete(t),C}var GN=zz,Hz=wi,Gz=Hz.Uint8Array,KN=Gz;function Kz(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var Uz=Kz;function Vz(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Yz=Vz,s_=Ku,l_=KN,qz=Om,Zz=GN,Jz=Uz,Xz=Yz,Qz=1,eH=2,tH="[object Boolean]",nH="[object Date]",rH="[object Error]",oH="[object Map]",iH="[object Number]",aH="[object RegExp]",sH="[object Set]",lH="[object String]",cH="[object Symbol]",uH="[object ArrayBuffer]",dH="[object DataView]",c_=s_?s_.prototype:void 0,vp=c_?c_.valueOf:void 0;function fH(e,t,n,r,o,i,a){switch(n){case dH:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case uH:return!(e.byteLength!=t.byteLength||!i(new l_(e),new l_(t)));case tH:case nH:case iH:return qz(+e,+t);case rH:return e.name==t.name&&e.message==t.message;case aH:case lH:return e==t+"";case oH:var l=Jz;case sH:var u=r&Qz;if(l||(l=Xz),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=eH,a.set(e,t);var m=Zz(l(e),l(t),r,o,i,a);return a.delete(e),m;case cH:if(vp)return vp.call(e)==vp.call(t)}return!1}var hH=fH;function pH(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var UN=pH,gH=UN,mH=Zo;function vH(e,t,n){var r=t(e);return mH(e)?r:gH(r,n(e))}var VN=vH;function yH(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}var bH=yH;function _H(){return[]}var YN=_H,xH=bH,EH=YN,CH=Object.prototype,wH=CH.propertyIsEnumerable,u_=Object.getOwnPropertySymbols,TH=u_?function(e){return e==null?[]:(e=Object(e),xH(u_(e),function(t){return wH.call(e,t)}))}:EH,Dm=TH,NH=VN,SH=Dm,OH=Uu;function AH(e){return NH(e,OH,SH)}var qN=AH,d_=qN,RH=1,$H=Object.prototype,DH=$H.hasOwnProperty;function kH(e,t,n,r,o,i){var a=n&RH,l=d_(e),u=l.length,p=d_(t),m=p.length;if(u!=m&&!a)return!1;for(var _=u;_--;){var C=l[_];if(!(a?C in t:DH.call(t,C)))return!1}var b=i.get(e),v=i.get(t);if(b&&v)return b==t&&v==e;var y=!0;i.set(e,t),i.set(t,e);for(var T=a;++_<u;){C=l[_];var O=e[C],A=t[C];if(r)var D=a?r(A,O,C,t,e,i):r(O,A,C,e,t,i);if(!(D===void 0?O===A||o(O,A,n,r,i):D)){y=!1;break}T||(T=C=="constructor")}if(y&&!T){var P=e.constructor,M=t.constructor;P!=M&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(y=!1)}return i.delete(e),i.delete(t),y}var MH=kH,PH=Os,IH=wi,LH=PH(IH,"DataView"),FH=LH,jH=Os,BH=wi,WH=jH(BH,"Promise"),zH=WH,HH=Os,GH=wi,KH=HH(GH,"Set"),UH=KH,VH=Os,YH=wi,qH=VH(YH,"WeakMap"),ZH=qH,hg=FH,pg=Am,gg=zH,mg=UH,vg=ZH,ZN=Ss,hc=HN,f_="[object Map]",JH="[object Object]",h_="[object Promise]",p_="[object Set]",g_="[object WeakMap]",m_="[object DataView]",XH=hc(hg),QH=hc(pg),e5=hc(gg),t5=hc(mg),n5=hc(vg),gs=ZN;(hg&&gs(new hg(new ArrayBuffer(1)))!=m_||pg&&gs(new pg)!=f_||gg&&gs(gg.resolve())!=h_||mg&&gs(new mg)!=p_||vg&&gs(new vg)!=g_)&&(gs=function(e){var t=ZN(e),n=t==JH?e.constructor:void 0,r=n?hc(n):"";if(r)switch(r){case XH:return m_;case QH:return f_;case e5:return h_;case t5:return p_;case n5:return g_}return t});var Zf=gs,yp=$m,r5=GN,o5=hH,i5=MH,v_=Zf,y_=Zo,b_=xm,a5=PN,s5=1,__="[object Arguments]",x_="[object Array]",Kd="[object Object]",l5=Object.prototype,E_=l5.hasOwnProperty;function c5(e,t,n,r,o,i){var a=y_(e),l=y_(t),u=a?x_:v_(e),p=l?x_:v_(t);u=u==__?Kd:u,p=p==__?Kd:p;var m=u==Kd,_=p==Kd,C=u==p;if(C&&b_(e)){if(!b_(t))return!1;a=!0,m=!1}if(C&&!m)return i||(i=new yp),a||a5(e)?r5(e,t,n,r,o,i):o5(e,t,u,n,r,o,i);if(!(n&s5)){var b=m&&E_.call(e,"__wrapped__"),v=_&&E_.call(t,"__wrapped__");if(b||v){var y=b?e.value():e,T=v?t.value():t;return i||(i=new yp),o(y,T,n,r,i)}}return C?(i||(i=new yp),i5(e,t,n,r,o,i)):!1}var u5=c5,d5=u5,C_=ea;function JN(e,t,n,r,o){return e===t?!0:e==null||t==null||!C_(e)&&!C_(t)?e!==e&&t!==t:d5(e,t,n,r,JN,o)}var XN=JN,f5=$m,h5=XN,p5=1,g5=2;function m5(e,t,n,r){var o=n.length,i=o,a=!r;if(e==null)return!i;for(e=Object(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<i;){l=n[o];var u=l[0],p=e[u],m=l[1];if(a&&l[2]){if(p===void 0&&!(u in e))return!1}else{var _=new f5;if(r)var C=r(p,m,u,e,t,_);if(!(C===void 0?h5(m,p,p5|g5,r,_):C))return!1}}return!0}var v5=m5,y5=lc;function b5(e){return e===e&&!y5(e)}var QN=b5,_5=QN,x5=Uu;function E5(e){for(var t=x5(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,_5(o)]}return t}var C5=E5;function w5(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var eS=w5,T5=v5,N5=C5,S5=eS;function O5(e){var t=N5(e);return t.length==1&&t[0][2]?S5(t[0][0],t[0][1]):function(n){return n===e||T5(n,e,t)}}var A5=O5,R5=Ss,$5=ea,D5="[object Symbol]";function k5(e){return typeof e=="symbol"||$5(e)&&R5(e)==D5}var km=k5,M5=Zo,P5=km,I5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L5=/^\w*$/;function F5(e,t){if(M5(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||P5(e)?!0:L5.test(e)||!I5.test(e)||t!=null&&e in Object(t)}var Mm=F5,tS=Rm,j5="Expected a function";function Pm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(j5);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Pm.Cache||tS),n}Pm.Cache=tS;var B5=Pm,W5=B5,z5=500;function H5(e){var t=W5(e,function(r){return n.size===z5&&n.clear(),r}),n=t.cache;return t}var G5=H5,K5=G5,U5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V5=/\\(\\)?/g,Y5=K5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(U5,function(n,r,o,i){t.push(o?i.replace(V5,"$1"):r||n)}),t}),q5=Y5,w_=Ku,Z5=zN,J5=Zo,X5=km,Q5=1/0,T_=w_?w_.prototype:void 0,N_=T_?T_.toString:void 0;function nS(e){if(typeof e=="string")return e;if(J5(e))return Z5(e,nS)+"";if(X5(e))return N_?N_.call(e):"";var t=e+"";return t=="0"&&1/e==-Q5?"-0":t}var e4=nS,t4=e4;function n4(e){return e==null?"":t4(e)}var r4=n4,o4=Zo,i4=Mm,a4=q5,s4=r4;function l4(e,t){return o4(e)?e:i4(e,t)?[e]:a4(s4(e))}var rS=l4,c4=km,u4=1/0;function d4(e){if(typeof e=="string"||c4(e))return e;var t=e+"";return t=="0"&&1/e==-u4?"-0":t}var Jf=d4,f4=rS,h4=Jf;function p4(e,t){t=f4(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[h4(t[n++])];return n&&n==r?e:void 0}var oS=p4,g4=oS;function m4(e,t,n){var r=e==null?void 0:g4(e,t);return r===void 0?n:r}var v4=m4;function y4(e,t){return e!=null&&t in Object(e)}var b4=y4,_4=rS,x4=kN,E4=Zo,C4=MN,w4=Em,T4=Jf;function N4(e,t,n){t=_4(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=T4(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&w4(o)&&C4(a,o)&&(E4(e)||x4(e)))}var S4=N4,O4=b4,A4=S4;function R4(e,t){return e!=null&&A4(e,t,O4)}var $4=R4,D4=XN,k4=v4,M4=$4,P4=Mm,I4=QN,L4=eS,F4=Jf,j4=1,B4=2;function W4(e,t){return P4(e)&&I4(t)?L4(F4(e),t):function(n){var r=k4(n,e);return r===void 0&&r===t?M4(n,e):D4(t,r,j4|B4)}}var z4=W4;function H4(e){return function(t){return t==null?void 0:t[e]}}var G4=H4,K4=oS;function U4(e){return function(t){return K4(t,e)}}var V4=U4,Y4=G4,q4=V4,Z4=Mm,J4=Jf;function X4(e){return Z4(e)?Y4(J4(e)):q4(e)}var Q4=X4,e6=A5,t6=z4,n6=BN,r6=Zo,o6=Q4;function i6(e){return typeof e=="function"?e:e==null?n6:typeof e=="object"?r6(e)?t6(e[0],e[1]):e6(e):o6(e)}var a6=i6,s6=Kf;function l6(e,t){return function(n,r){if(n==null)return n;if(!s6(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}var c6=l6,u6=jN,d6=c6,f6=d6(u6),h6=f6,p6=h6,g6=Kf;function m6(e,t){var n=-1,r=g6(e)?Array(e.length):[];return p6(e,function(o,i,a){r[++n]=t(o,i,a)}),r}var v6=m6,y6=zN,b6=a6,_6=v6,x6=Zo;function E6(e,t){var n=x6(e)?y6:_6;return n(e,b6(t))}var C6=E6;Object.defineProperty(Gu,"__esModule",{value:!0});Gu.flattenNames=void 0;var w6=X2,T6=Xf(w6),N6=Nm,S6=Xf(N6),O6=o3,A6=Xf(O6),R6=C6,$6=Xf(R6);function Xf(e){return e&&e.__esModule?e:{default:e}}var D6=Gu.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,$6.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,A6.default)(r)?(0,S6.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,T6.default)(r)&&n.push(r)}),n};Gu.default=D6;var Vu={};function k6(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var M6=k6,P6=Os,I6=function(){try{var e=P6(Object,"defineProperty");return e({},"",{}),e}catch{}}(),L6=I6,S_=L6;function F6(e,t,n){t=="__proto__"&&S_?S_(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var iS=F6,j6=iS,B6=Om,W6=Object.prototype,z6=W6.hasOwnProperty;function H6(e,t,n){var r=e[t];(!(z6.call(e,t)&&B6(r,n))||n===void 0&&!(t in e))&&j6(e,t,n)}var aS=H6,G6=aS,K6=iS;function U6(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=r?r(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),o?K6(n,l,u):G6(n,l,u)}return n}var Qf=U6,V6=Qf,Y6=Uu;function q6(e,t){return e&&V6(t,Y6(t),e)}var Z6=q6;function J6(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var X6=J6,Q6=lc,eG=Tm,tG=X6,nG=Object.prototype,rG=nG.hasOwnProperty;function oG(e){if(!Q6(e))return tG(e);var t=eG(e),n=[];for(var r in e)r=="constructor"&&(t||!rG.call(e,r))||n.push(r);return n}var iG=oG,aG=IN,sG=iG,lG=Kf;function cG(e){return lG(e)?aG(e,!0):sG(e)}var Im=cG,uG=Qf,dG=Im;function fG(e,t){return e&&uG(t,dG(t),e)}var hG=fG,_f={exports:{}};_f.exports;(function(e,t){var n=wi,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i?n.Buffer:void 0,l=a?a.allocUnsafe:void 0;function u(p,m){if(m)return p.slice();var _=p.length,C=l?l(_):new p.constructor(_);return p.copy(C),C}e.exports=u})(_f,_f.exports);var pG=_f.exports;function gG(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var mG=gG,vG=Qf,yG=Dm;function bG(e,t){return vG(e,yG(e),t)}var _G=bG,xG=UN,EG=Sm,CG=Dm,wG=YN,TG=Object.getOwnPropertySymbols,NG=TG?function(e){for(var t=[];e;)xG(t,CG(e)),e=EG(e);return t}:wG,sS=NG,SG=Qf,OG=sS;function AG(e,t){return SG(e,OG(e),t)}var RG=AG,$G=VN,DG=sS,kG=Im;function MG(e){return $G(e,kG,DG)}var PG=MG,IG=Object.prototype,LG=IG.hasOwnProperty;function FG(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&LG.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var jG=FG,O_=KN;function BG(e){var t=new e.constructor(e.byteLength);return new O_(t).set(new O_(e)),t}var Lm=BG,WG=Lm;function zG(e,t){var n=t?WG(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var HG=zG,GG=/\w*$/;function KG(e){var t=new e.constructor(e.source,GG.exec(e));return t.lastIndex=e.lastIndex,t}var UG=KG,A_=Ku,R_=A_?A_.prototype:void 0,$_=R_?R_.valueOf:void 0;function VG(e){return $_?Object($_.call(e)):{}}var YG=VG,qG=Lm;function ZG(e,t){var n=t?qG(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var JG=ZG,XG=Lm,QG=HG,eK=UG,tK=YG,nK=JG,rK="[object Boolean]",oK="[object Date]",iK="[object Map]",aK="[object Number]",sK="[object RegExp]",lK="[object Set]",cK="[object String]",uK="[object Symbol]",dK="[object ArrayBuffer]",fK="[object DataView]",hK="[object Float32Array]",pK="[object Float64Array]",gK="[object Int8Array]",mK="[object Int16Array]",vK="[object Int32Array]",yK="[object Uint8Array]",bK="[object Uint8ClampedArray]",_K="[object Uint16Array]",xK="[object Uint32Array]";function EK(e,t,n){var r=e.constructor;switch(t){case dK:return XG(e);case rK:case oK:return new r(+e);case fK:return QG(e,n);case hK:case pK:case gK:case mK:case vK:case yK:case bK:case _K:case xK:return nK(e,n);case iK:return new r;case aK:case cK:return new r(e);case sK:return eK(e);case lK:return new r;case uK:return tK(e)}}var CK=EK,wK=lc,D_=Object.create,TK=function(){function e(){}return function(t){if(!wK(t))return{};if(D_)return D_(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),NK=TK,SK=NK,OK=Sm,AK=Tm;function RK(e){return typeof e.constructor=="function"&&!AK(e)?SK(OK(e)):{}}var $K=RK,DK=Zf,kK=ea,MK="[object Map]";function PK(e){return kK(e)&&DK(e)==MK}var IK=PK,LK=IK,FK=Cm,k_=wm,M_=k_&&k_.isMap,jK=M_?FK(M_):LK,BK=jK,WK=Zf,zK=ea,HK="[object Set]";function GK(e){return zK(e)&&WK(e)==HK}var KK=GK,UK=KK,VK=Cm,P_=wm,I_=P_&&P_.isSet,YK=I_?VK(I_):UK,qK=YK,ZK=$m,JK=M6,XK=aS,QK=Z6,eU=hG,tU=pG,nU=mG,rU=_G,oU=RG,iU=qN,aU=PG,sU=Zf,lU=jG,cU=CK,uU=$K,dU=Zo,fU=xm,hU=BK,pU=lc,gU=qK,mU=Uu,vU=Im,yU=1,bU=2,_U=4,lS="[object Arguments]",xU="[object Array]",EU="[object Boolean]",CU="[object Date]",wU="[object Error]",cS="[object Function]",TU="[object GeneratorFunction]",NU="[object Map]",SU="[object Number]",uS="[object Object]",OU="[object RegExp]",AU="[object Set]",RU="[object String]",$U="[object Symbol]",DU="[object WeakMap]",kU="[object ArrayBuffer]",MU="[object DataView]",PU="[object Float32Array]",IU="[object Float64Array]",LU="[object Int8Array]",FU="[object Int16Array]",jU="[object Int32Array]",BU="[object Uint8Array]",WU="[object Uint8ClampedArray]",zU="[object Uint16Array]",HU="[object Uint32Array]",En={};En[lS]=En[xU]=En[kU]=En[MU]=En[EU]=En[CU]=En[PU]=En[IU]=En[LU]=En[FU]=En[jU]=En[NU]=En[SU]=En[uS]=En[OU]=En[AU]=En[RU]=En[$U]=En[BU]=En[WU]=En[zU]=En[HU]=!0;En[wU]=En[cS]=En[DU]=!1;function rf(e,t,n,r,o,i){var a,l=t&yU,u=t&bU,p=t&_U;if(n&&(a=o?n(e,r,o,i):n(e)),a!==void 0)return a;if(!pU(e))return e;var m=dU(e);if(m){if(a=lU(e),!l)return nU(e,a)}else{var _=sU(e),C=_==cS||_==TU;if(fU(e))return tU(e,l);if(_==uS||_==lS||C&&!o){if(a=u||C?{}:uU(e),!l)return u?oU(e,eU(a,e)):rU(e,QK(a,e))}else{if(!En[_])return o?e:{};a=cU(e,_,l)}}i||(i=new ZK);var b=i.get(e);if(b)return b;i.set(e,a),gU(e)?e.forEach(function(T){a.add(rf(T,t,n,T,e,i))}):hU(e)&&e.forEach(function(T,O){a.set(O,rf(T,t,n,O,e,i))});var v=p?u?aU:iU:u?vU:mU,y=m?void 0:v(e);return JK(y||e,function(T,O){y&&(O=T,T=e[O]),XK(a,O,rf(T,t,n,O,e,i))}),a}var GU=rf,KU=GU,UU=1,VU=4;function YU(e){return KU(e,UU|VU)}var qU=YU;Object.defineProperty(Vu,"__esModule",{value:!0});Vu.mergeClasses=void 0;var ZU=Nm,JU=dS(ZU),XU=qU,QU=dS(XU),e8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function dS(e){return e&&e.__esModule?e:{default:e}}var t8=Vu.mergeClasses=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,QU.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,JU.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=e8({},r[l],i[l])}),o}),r};Vu.default=t8;var Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.autoprefix=void 0;var n8=Nm,L_=o8(n8),r8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o8(e){return e&&e.__esModule?e:{default:e}}var i8={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var n=t&&t.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(t,n){var r=n[t];return r||{extend:t}}},a8=Yu.autoprefix=function(t){var n={};return(0,L_.default)(t,function(r,o){var i={};(0,L_.default)(r,function(a,l){var u=i8[l];u?i=r8({},i,u(a)):i[l]=a}),n[o]=i}),n};Yu.default=a8;var qu={};Object.defineProperty(qu,"__esModule",{value:!0});qu.hover=void 0;var s8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l8=H,bp=c8(l8);function c8(e){return e&&e.__esModule?e:{default:e}}function u8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F_(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function d8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f8=qu.hover=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){d8(o,r);function o(){var i,a,l,u;u8(this,o);for(var p=arguments.length,m=Array(p),_=0;_<p;_++)m[_]=arguments[_];return u=(a=(l=F_(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return bp.default.createElement(n,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},bp.default.createElement(t,s8({},l.props,l.state)))},a),F_(l,u)}return o}(bp.default.Component)};qu.default=f8;var Zu={};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.active=void 0;var h8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p8=H,_p=g8(p8);function g8(e){return e&&e.__esModule?e:{default:e}}function m8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j_(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function v8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y8=Zu.active=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){v8(o,r);function o(){var i,a,l,u;m8(this,o);for(var p=arguments.length,m=Array(p),_=0;_<p;_++)m[_]=arguments[_];return u=(a=(l=j_(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return _p.default.createElement(n,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},_p.default.createElement(t,h8({},l.props,l.state)))},a),j_(l,u)}return o}(_p.default.Component)};Zu.default=y8;var Fm={};Object.defineProperty(Fm,"__esModule",{value:!0});var b8=function(t,n){var r={},o=function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=l};return t===0&&o("first-child"),t===n-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};Fm.default=b8;Object.defineProperty(vo,"__esModule",{value:!0});vo.ReactCSS=vo.loop=vo.handleActive=jm=vo.handleHover=vo.hover=void 0;var _8=Gu,x8=pc(_8),E8=Vu,C8=pc(E8),w8=Yu,T8=pc(w8),N8=qu,fS=pc(N8),S8=Zu,O8=pc(S8),A8=Fm,R8=pc(A8);function pc(e){return e&&e.__esModule?e:{default:e}}vo.hover=fS.default;var jm=vo.handleHover=fS.default;vo.handleActive=O8.default;vo.loop=R8.default;var $8=vo.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=(0,x8.default)(r),a=(0,C8.default)(t,i);return(0,T8.default)(a)},Wt=vo.default=$8,D8=function(t,n,r,o,i){var a=i.clientWidth,l=i.clientHeight,u=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,p=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,m=u-(i.getBoundingClientRect().left+window.pageXOffset),_=p-(i.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var C=void 0;if(_<0?C=0:_>l?C=1:C=Math.round(_*100/l)/100,n.a!==C)return{h:n.h,s:n.s,l:n.l,a:C,source:"rgb"}}else{var b=void 0;if(m<0?b=0:m>a?b=1:b=Math.round(m*100/a)/100,o!==b)return{h:n.h,s:n.s,l:n.l,a:b,source:"rgb"}}return null},xp={},k8=function(t,n,r,o){if(typeof document>"u"&&!o)return null;var i=o?new o:document.createElement("canvas");i.width=r*2,i.height=r*2;var a=i.getContext("2d");return a?(a.fillStyle=t,a.fillRect(0,0,i.width,i.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),i.toDataURL()):null},M8=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(xp[i])return xp[i];var a=k8(t,n,r,o);return xp[i]=a,a},B_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gc=function(t){var n=t.white,r=t.grey,o=t.size,i=t.renderers,a=t.borderRadius,l=t.boxShadow,u=t.children,p=Wt({default:{grid:{borderRadius:a,boxShadow:l,absolute:"0px 0px 0px 0px",background:"url("+M8(n,r,o,i.canvas)+") center left"}}});return H.isValidElement(u)?H.cloneElement(u,B_({},u.props,{style:B_({},u.props.style,p.grid)})):H.createElement("div",{style:p.grid})};gc.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var P8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function L8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W_(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function F8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Bm=function(e){F8(t,e);function t(){var n,r,o,i;L8(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=W_(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var m=D8(p,o.props.hsl,o.props.direction,o.props.a,o.container);m&&typeof o.props.onChange=="function"&&o.props.onChange(m,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},r),W_(o,i)}return I8(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,o=this.props.rgb,i=Wt({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
236
|
-
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:o.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
237
|
-
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)"},pointer:{left:0,top:o.a*100+"%"}},overwrite:P8({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return H.createElement("div",{style:i.alpha},H.createElement("div",{style:i.checkboard},H.createElement(gc,{renderers:this.props.renderers})),H.createElement("div",{style:i.gradient}),H.createElement("div",{style:i.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("div",{style:i.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:i.slider}))))}}]),t}(H.PureComponent||H.Component),j8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function B8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function H8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var G8=1,hS=38,K8=40,U8=[hS,K8],V8=function(t){return U8.indexOf(t)>-1},Y8=function(t){return Number(String(t).replace(/%/g,""))},q8=1,en=function(e){H8(t,e);function t(n){W8(this,t);var r=z8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(o){r.setUpdatedValue(o.target.value,o)},r.handleKeyDown=function(o){var i=Y8(o.target.value);if(!isNaN(i)&&V8(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===hS?i+a:i-a;r.setUpdatedValue(l,o)}},r.handleDrag=function(o){if(r.props.dragLabel){var i=Math.round(r.props.value+o.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),o)}},r.handleMouseDown=function(o){r.props.dragLabel&&(o.preventDefault(),r.handleDrag(o),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+q8++,r}return j8(t,[{key:"componentDidUpdate",value:function(r,o){this.props.value!==this.state.value&&(r.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return B8({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||G8}},{key:"setUpdatedValue",value:function(r,o){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,o),this.setState({value:r})}},{key:"render",value:function(){var r=this,o=Wt({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return H.createElement("div",{style:o.wrap},H.createElement("input",{id:this.inputId,style:o.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?H.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(H.PureComponent||H.Component),Z8=function(t,n,r,o){var i=o.clientWidth,a=o.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(o.getBoundingClientRect().left+window.pageXOffset),m=u-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var _=void 0;if(m<0)_=359;else if(m>a)_=0;else{var C=-(m*100/a)+100;_=360*C/100}if(r.h!==_)return{h:_,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var b=void 0;if(p<0)b=0;else if(p>i)b=359;else{var v=p*100/i;b=360*v/100}if(r.h!==b)return{h:b,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},J8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function X8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z_(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Q8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var mc=function(e){Q8(t,e);function t(){var n,r,o,i;X8(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=z_(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var m=Z8(p,o.props.direction,o.props.hsl,o.container);m&&typeof o.props.onChange=="function"&&o.props.onChange(m,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},r),z_(o,i)}return J8(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.direction,i=o===void 0?"horizontal":o,a=Wt({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return H.createElement("div",{style:a.hue},H.createElement("div",{className:"hue-"+i,style:a.container,ref:function(u){return r.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("style",null,`
|
|
238
|
-
.hue-horizontal {
|
|
239
|
-
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
240
|
-
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
241
|
-
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
242
|
-
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.hue-vertical {
|
|
246
|
-
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
247
|
-
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
248
|
-
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
249
|
-
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
250
|
-
}
|
|
251
|
-
`),H.createElement("div",{style:a.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:a.slider}))))}}]),t}(H.PureComponent||H.Component),yg={exports:{}},Ud={exports:{}},un={};/** @license React v16.13.1
|
|
252
|
-
* react-is.production.min.js
|
|
253
|
-
*
|
|
254
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
255
|
-
*
|
|
256
|
-
* This source code is licensed under the MIT license found in the
|
|
257
|
-
* LICENSE file in the root directory of this source tree.
|
|
258
|
-
*/var H_;function eV(){if(H_)return un;H_=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,_=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function D(M){if(typeof M=="object"&&M!==null){var V=M.$$typeof;switch(V){case t:switch(M=M.type,M){case u:case p:case r:case i:case o:case _:return M;default:switch(M=M&&M.$$typeof,M){case l:case m:case v:case b:case a:return M;default:return V}}case n:return V}}}function P(M){return D(M)===p}return un.AsyncMode=u,un.ConcurrentMode=p,un.ContextConsumer=l,un.ContextProvider=a,un.Element=t,un.ForwardRef=m,un.Fragment=r,un.Lazy=v,un.Memo=b,un.Portal=n,un.Profiler=i,un.StrictMode=o,un.Suspense=_,un.isAsyncMode=function(M){return P(M)||D(M)===u},un.isConcurrentMode=P,un.isContextConsumer=function(M){return D(M)===l},un.isContextProvider=function(M){return D(M)===a},un.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},un.isForwardRef=function(M){return D(M)===m},un.isFragment=function(M){return D(M)===r},un.isLazy=function(M){return D(M)===v},un.isMemo=function(M){return D(M)===b},un.isPortal=function(M){return D(M)===n},un.isProfiler=function(M){return D(M)===i},un.isStrictMode=function(M){return D(M)===o},un.isSuspense=function(M){return D(M)===_},un.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===p||M===i||M===o||M===_||M===C||typeof M=="object"&&M!==null&&(M.$$typeof===v||M.$$typeof===b||M.$$typeof===a||M.$$typeof===l||M.$$typeof===m||M.$$typeof===T||M.$$typeof===O||M.$$typeof===A||M.$$typeof===y)},un.typeOf=D,un}var dn={};/** @license React v16.13.1
|
|
259
|
-
* react-is.development.js
|
|
260
|
-
*
|
|
261
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the MIT license found in the
|
|
264
|
-
* LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/var G_;function tV(){return G_||(G_=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,_=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function D(Oe){return typeof Oe=="string"||typeof Oe=="function"||Oe===r||Oe===p||Oe===i||Oe===o||Oe===_||Oe===C||typeof Oe=="object"&&Oe!==null&&(Oe.$$typeof===v||Oe.$$typeof===b||Oe.$$typeof===a||Oe.$$typeof===l||Oe.$$typeof===m||Oe.$$typeof===T||Oe.$$typeof===O||Oe.$$typeof===A||Oe.$$typeof===y)}function P(Oe){if(typeof Oe=="object"&&Oe!==null){var Be=Oe.$$typeof;switch(Be){case t:var ce=Oe.type;switch(ce){case u:case p:case r:case i:case o:case _:return ce;default:var le=ce&&ce.$$typeof;switch(le){case l:case m:case v:case b:case a:return le;default:return Be}}case n:return Be}}}var M=u,V=p,J=l,oe=a,Z=t,U=m,Q=r,de=v,pe=b,te=n,he=i,Y=o,j=_,ee=!1;function ne(Oe){return ee||(ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(Oe)||P(Oe)===u}function B(Oe){return P(Oe)===p}function W(Oe){return P(Oe)===l}function X(Oe){return P(Oe)===a}function F(Oe){return typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===t}function w(Oe){return P(Oe)===m}function N(Oe){return P(Oe)===r}function I(Oe){return P(Oe)===v}function q(Oe){return P(Oe)===b}function ue(Oe){return P(Oe)===n}function fe(Oe){return P(Oe)===i}function se(Oe){return P(Oe)===o}function Ce(Oe){return P(Oe)===_}dn.AsyncMode=M,dn.ConcurrentMode=V,dn.ContextConsumer=J,dn.ContextProvider=oe,dn.Element=Z,dn.ForwardRef=U,dn.Fragment=Q,dn.Lazy=de,dn.Memo=pe,dn.Portal=te,dn.Profiler=he,dn.StrictMode=Y,dn.Suspense=j,dn.isAsyncMode=ne,dn.isConcurrentMode=B,dn.isContextConsumer=W,dn.isContextProvider=X,dn.isElement=F,dn.isForwardRef=w,dn.isFragment=N,dn.isLazy=I,dn.isMemo=q,dn.isPortal=ue,dn.isProfiler=fe,dn.isStrictMode=se,dn.isSuspense=Ce,dn.isValidElementType=D,dn.typeOf=P}()),dn}var K_;function pS(){return K_||(K_=1,process.env.NODE_ENV==="production"?Ud.exports=eV():Ud.exports=tV()),Ud.exports}/*
|
|
266
|
-
object-assign
|
|
267
|
-
(c) Sindre Sorhus
|
|
268
|
-
@license MIT
|
|
269
|
-
*/var Ep,U_;function nV(){if(U_)return Ep;U_=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(a).map(function(m){return a[m]});if(u.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(m){p[m]=m}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ep=o()?Object.assign:function(i,a){for(var l,u=r(i),p,m=1;m<arguments.length;m++){l=Object(arguments[m]);for(var _ in l)t.call(l,_)&&(u[_]=l[_]);if(e){p=e(l);for(var C=0;C<p.length;C++)n.call(l,p[C])&&(u[p[C]]=l[p[C]])}}return u},Ep}var Cp,V_;function Wm(){if(V_)return Cp;V_=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Cp=e,Cp}var wp,Y_;function gS(){return Y_||(Y_=1,wp=Function.call.bind(Object.prototype.hasOwnProperty)),wp}var Tp,q_;function rV(){if(q_)return Tp;q_=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wm(),n={},r=gS();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,l,u,p){if(process.env.NODE_ENV!=="production"){for(var m in i)if(r(i,m)){var _;try{if(typeof i[m]!="function"){var C=Error((u||"React class")+": "+l+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}_=i[m](a,m,u,l,null,t)}catch(v){_=v}if(_&&!(_ instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof _+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),_ instanceof Error&&!(_.message in n)){n[_.message]=!0;var b=p?p():"";e("Failed "+l+" type: "+_.message+(b??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Tp=o,Tp}var Np,Z_;function oV(){if(Z_)return Np;Z_=1;var e=pS(),t=nV(),n=Wm(),r=gS(),o=rV(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return Np=function(l,u){var p=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function _(B){var W=B&&(p&&B[p]||B[m]);if(typeof W=="function")return W}var C="<<anonymous>>",b={array:O("array"),bigint:O("bigint"),bool:O("boolean"),func:O("function"),number:O("number"),object:O("object"),string:O("string"),symbol:O("symbol"),any:A(),arrayOf:D,element:P(),elementType:M(),instanceOf:V,node:U(),objectOf:oe,oneOf:J,oneOfType:Z,shape:de,exact:pe};function v(B,W){return B===W?B!==0||1/B===1/W:B!==B&&W!==W}function y(B,W){this.message=B,this.data=W&&typeof W=="object"?W:{},this.stack=""}y.prototype=Error.prototype;function T(B){if(process.env.NODE_ENV!=="production")var W={},X=0;function F(N,I,q,ue,fe,se,Ce){if(ue=ue||C,se=se||q,Ce!==n){if(u){var Oe=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Oe.name="Invariant Violation",Oe}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Be=ue+":"+q;!W[Be]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[Be]=!0,X++)}}return I[q]==null?N?I[q]===null?new y("The "+fe+" `"+se+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new y("The "+fe+" `"+se+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:B(I,q,ue,fe,se)}var w=F.bind(null,!1);return w.isRequired=F.bind(null,!0),w}function O(B){function W(X,F,w,N,I,q){var ue=X[F],fe=Y(ue);if(fe!==B){var se=j(ue);return new y("Invalid "+N+" `"+I+"` of type "+("`"+se+"` supplied to `"+w+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return T(W)}function A(){return T(a)}function D(B){function W(X,F,w,N,I){if(typeof B!="function")return new y("Property `"+I+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var q=X[F];if(!Array.isArray(q)){var ue=Y(q);return new y("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an array."))}for(var fe=0;fe<q.length;fe++){var se=B(q,fe,w,N,I+"["+fe+"]",n);if(se instanceof Error)return se}return null}return T(W)}function P(){function B(W,X,F,w,N){var I=W[X];if(!l(I)){var q=Y(I);return new y("Invalid "+w+" `"+N+"` of type "+("`"+q+"` supplied to `"+F+"`, expected a single ReactElement."))}return null}return T(B)}function M(){function B(W,X,F,w,N){var I=W[X];if(!e.isValidElementType(I)){var q=Y(I);return new y("Invalid "+w+" `"+N+"` of type "+("`"+q+"` supplied to `"+F+"`, expected a single ReactElement type."))}return null}return T(B)}function V(B){function W(X,F,w,N,I){if(!(X[F]instanceof B)){var q=B.name||C,ue=ne(X[F]);return new y("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected ")+("instance of `"+q+"`."))}return null}return T(W)}function J(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function W(X,F,w,N,I){for(var q=X[F],ue=0;ue<B.length;ue++)if(v(q,B[ue]))return null;var fe=JSON.stringify(B,function(Ce,Oe){var Be=j(Oe);return Be==="symbol"?String(Oe):Oe});return new y("Invalid "+N+" `"+I+"` of value `"+String(q)+"` "+("supplied to `"+w+"`, expected one of "+fe+"."))}return T(W)}function oe(B){function W(X,F,w,N,I){if(typeof B!="function")return new y("Property `"+I+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var q=X[F],ue=Y(q);if(ue!=="object")return new y("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an object."));for(var fe in q)if(r(q,fe)){var se=B(q,fe,w,N,I+"."+fe,n);if(se instanceof Error)return se}return null}return T(W)}function Z(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<B.length;W++){var X=B[W];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(X)+" at index "+W+"."),a}function F(w,N,I,q,ue){for(var fe=[],se=0;se<B.length;se++){var Ce=B[se],Oe=Ce(w,N,I,q,ue,n);if(Oe==null)return null;Oe.data&&r(Oe.data,"expectedType")&&fe.push(Oe.data.expectedType)}var Be=fe.length>0?", expected one of type ["+fe.join(", ")+"]":"";return new y("Invalid "+q+" `"+ue+"` supplied to "+("`"+I+"`"+Be+"."))}return T(F)}function U(){function B(W,X,F,w,N){return te(W[X])?null:new y("Invalid "+w+" `"+N+"` supplied to "+("`"+F+"`, expected a ReactNode."))}return T(B)}function Q(B,W,X,F,w){return new y((B||"React class")+": "+W+" type `"+X+"."+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+w+"`.")}function de(B){function W(X,F,w,N,I){var q=X[F],ue=Y(q);if(ue!=="object")return new y("Invalid "+N+" `"+I+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));for(var fe in B){var se=B[fe];if(typeof se!="function")return Q(w,N,I,fe,j(se));var Ce=se(q,fe,w,N,I+"."+fe,n);if(Ce)return Ce}return null}return T(W)}function pe(B){function W(X,F,w,N,I){var q=X[F],ue=Y(q);if(ue!=="object")return new y("Invalid "+N+" `"+I+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));var fe=t({},X[F],B);for(var se in fe){var Ce=B[se];if(r(B,se)&&typeof Ce!="function")return Q(w,N,I,se,j(Ce));if(!Ce)return new y("Invalid "+N+" `"+I+"` key `"+se+"` supplied to `"+w+"`.\nBad object: "+JSON.stringify(X[F],null," ")+`
|
|
270
|
-
Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Oe=Ce(q,se,w,N,I+"."+se,n);if(Oe)return Oe}return null}return T(W)}function te(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(te);if(B===null||l(B))return!0;var W=_(B);if(W){var X=W.call(B),F;if(W!==B.entries){for(;!(F=X.next()).done;)if(!te(F.value))return!1}else for(;!(F=X.next()).done;){var w=F.value;if(w&&!te(w[1]))return!1}}else return!1;return!0;default:return!1}}function he(B,W){return B==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function Y(B){var W=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":he(W,B)?"symbol":W}function j(B){if(typeof B>"u"||B===null)return""+B;var W=Y(B);if(W==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return W}function ee(B){var W=j(B);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function ne(B){return!B.constructor||!B.constructor.name?C:B.constructor.name}return b.checkPropTypes=o,b.resetWarningCache=o.resetWarningCache,b.PropTypes=b,b},Np}var Sp,J_;function iV(){if(J_)return Sp;J_=1;var e=Wm();function t(){}function n(){}return n.resetWarningCache=t,Sp=function(){function r(a,l,u,p,m,_){if(_!==e){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Sp}if(process.env.NODE_ENV!=="production"){var aV=pS(),sV=!0;yg.exports=oV()(aV.isElement,sV)}else yg.exports=iV()();var lV=yg.exports;const ct=O1(lV);function cV(){this.__data__=[],this.size=0}function Ju(e,t){return e===t||e!==e&&t!==t}function eh(e,t){for(var n=e.length;n--;)if(Ju(e[n][0],t))return n;return-1}var uV=Array.prototype,dV=uV.splice;function fV(e){var t=this.__data__,n=eh(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():dV.call(t,n,1),--this.size,!0}function hV(e){var t=this.__data__,n=eh(t,e);return n<0?void 0:t[n][1]}function pV(e){return eh(this.__data__,e)>-1}function gV(e,t){var n=this.__data__,r=eh(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ta(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])}}ta.prototype.clear=cV;ta.prototype.delete=fV;ta.prototype.get=hV;ta.prototype.has=pV;ta.prototype.set=gV;function mV(){this.__data__=new ta,this.size=0}function vV(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function yV(e){return this.__data__.get(e)}function bV(e){return this.__data__.has(e)}var mS=typeof global=="object"&&global&&global.Object===Object&&global,_V=typeof self=="object"&&self&&self.Object===Object&&self,Jo=mS||_V||Function("return this")(),Fa=Jo.Symbol,vS=Object.prototype,xV=vS.hasOwnProperty,EV=vS.toString,pu=Fa?Fa.toStringTag:void 0;function CV(e){var t=xV.call(e,pu),n=e[pu];try{e[pu]=void 0;var r=!0}catch{}var o=EV.call(e);return r&&(t?e[pu]=n:delete e[pu]),o}var wV=Object.prototype,TV=wV.toString;function NV(e){return TV.call(e)}var SV="[object Null]",OV="[object Undefined]",X_=Fa?Fa.toStringTag:void 0;function As(e){return e==null?e===void 0?OV:SV:X_&&X_ in Object(e)?CV(e):NV(e)}function xo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var AV="[object AsyncFunction]",RV="[object Function]",$V="[object GeneratorFunction]",DV="[object Proxy]";function zm(e){if(!xo(e))return!1;var t=As(e);return t==RV||t==$V||t==AV||t==DV}var Op=Jo["__core-js_shared__"],Q_=function(){var e=/[^.]+$/.exec(Op&&Op.keys&&Op.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kV(e){return!!Q_&&Q_ in e}var MV=Function.prototype,PV=MV.toString;function Rs(e){if(e!=null){try{return PV.call(e)}catch{}try{return e+""}catch{}}return""}var IV=/[\\^$.*+?()[\]{}|]/g,LV=/^\[object .+?Constructor\]$/,FV=Function.prototype,jV=Object.prototype,BV=FV.toString,WV=jV.hasOwnProperty,zV=RegExp("^"+BV.call(WV).replace(IV,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HV(e){if(!xo(e)||kV(e))return!1;var t=zm(e)?zV:LV;return t.test(Rs(e))}function GV(e,t){return e==null?void 0:e[t]}function $s(e,t){var n=GV(e,t);return HV(n)?n:void 0}var $u=$s(Jo,"Map"),Du=$s(Object,"create");function KV(){this.__data__=Du?Du(null):{},this.size=0}function UV(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var VV="__lodash_hash_undefined__",YV=Object.prototype,qV=YV.hasOwnProperty;function ZV(e){var t=this.__data__;if(Du){var n=t[e];return n===VV?void 0:n}return qV.call(t,e)?t[e]:void 0}var JV=Object.prototype,XV=JV.hasOwnProperty;function QV(e){var t=this.__data__;return Du?t[e]!==void 0:XV.call(t,e)}var e9="__lodash_hash_undefined__";function t9(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Du&&t===void 0?e9:t,this}function Cs(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])}}Cs.prototype.clear=KV;Cs.prototype.delete=UV;Cs.prototype.get=ZV;Cs.prototype.has=QV;Cs.prototype.set=t9;function n9(){this.size=0,this.__data__={hash:new Cs,map:new($u||ta),string:new Cs}}function r9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function th(e,t){var n=e.__data__;return r9(t)?n[typeof t=="string"?"string":"hash"]:n.map}function o9(e){var t=th(this,e).delete(e);return this.size-=t?1:0,t}function i9(e){return th(this,e).get(e)}function a9(e){return th(this,e).has(e)}function s9(e,t){var n=th(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function na(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])}}na.prototype.clear=n9;na.prototype.delete=o9;na.prototype.get=i9;na.prototype.has=a9;na.prototype.set=s9;var l9=200;function c9(e,t){var n=this.__data__;if(n instanceof ta){var r=n.__data__;if(!$u||r.length<l9-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new na(r)}return n.set(e,t),this.size=n.size,this}function xi(e){var t=this.__data__=new ta(e);this.size=t.size}xi.prototype.clear=mV;xi.prototype.delete=vV;xi.prototype.get=yV;xi.prototype.has=bV;xi.prototype.set=c9;var xf=function(){try{var e=$s(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Hm(e,t,n){t=="__proto__"&&xf?xf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function bg(e,t,n){(n!==void 0&&!Ju(e[t],n)||n===void 0&&!(t in e))&&Hm(e,t,n)}function u9(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[++o];if(n(i[u],u,i)===!1)break}return t}}var yS=u9(),bS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ex=bS&&typeof module=="object"&&module&&!module.nodeType&&module,d9=ex&&ex.exports===bS,tx=d9?Jo.Buffer:void 0;tx&&tx.allocUnsafe;function f9(e,t){return e.slice()}var Ef=Jo.Uint8Array;function h9(e){var t=new e.constructor(e.byteLength);return new Ef(t).set(new Ef(e)),t}function p9(e,t){var n=h9(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function g9(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var nx=Object.create,m9=function(){function e(){}return function(t){if(!xo(t))return{};if(nx)return nx(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function _S(e,t){return function(n){return e(t(n))}}var xS=_S(Object.getPrototypeOf,Object),v9=Object.prototype;function Gm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||v9;return e===n}function y9(e){return typeof e.constructor=="function"&&!Gm(e)?m9(xS(e)):{}}function ja(e){return e!=null&&typeof e=="object"}var b9="[object Arguments]";function rx(e){return ja(e)&&As(e)==b9}var ES=Object.prototype,_9=ES.hasOwnProperty,x9=ES.propertyIsEnumerable,Cf=rx(function(){return arguments}())?rx:function(e){return ja(e)&&_9.call(e,"callee")&&!x9.call(e,"callee")},so=Array.isArray,E9=9007199254740991;function Km(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=E9}function vc(e){return e!=null&&Km(e.length)&&!zm(e)}function C9(e){return ja(e)&&vc(e)}function w9(){return!1}var CS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ox=CS&&typeof module=="object"&&module&&!module.nodeType&&module,T9=ox&&ox.exports===CS,ix=T9?Jo.Buffer:void 0,N9=ix?ix.isBuffer:void 0,wf=N9||w9,S9="[object Object]",O9=Function.prototype,A9=Object.prototype,wS=O9.toString,R9=A9.hasOwnProperty,$9=wS.call(Object);function D9(e){if(!ja(e)||As(e)!=S9)return!1;var t=xS(e);if(t===null)return!0;var n=R9.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&wS.call(n)==$9}var k9="[object Arguments]",M9="[object Array]",P9="[object Boolean]",I9="[object Date]",L9="[object Error]",F9="[object Function]",j9="[object Map]",B9="[object Number]",W9="[object Object]",z9="[object RegExp]",H9="[object Set]",G9="[object String]",K9="[object WeakMap]",U9="[object ArrayBuffer]",V9="[object DataView]",Y9="[object Float32Array]",q9="[object Float64Array]",Z9="[object Int8Array]",J9="[object Int16Array]",X9="[object Int32Array]",Q9="[object Uint8Array]",eY="[object Uint8ClampedArray]",tY="[object Uint16Array]",nY="[object Uint32Array]",Sn={};Sn[Y9]=Sn[q9]=Sn[Z9]=Sn[J9]=Sn[X9]=Sn[Q9]=Sn[eY]=Sn[tY]=Sn[nY]=!0;Sn[k9]=Sn[M9]=Sn[U9]=Sn[P9]=Sn[V9]=Sn[I9]=Sn[L9]=Sn[F9]=Sn[j9]=Sn[B9]=Sn[W9]=Sn[z9]=Sn[H9]=Sn[G9]=Sn[K9]=!1;function rY(e){return ja(e)&&Km(e.length)&&!!Sn[As(e)]}function oY(e){return function(t){return e(t)}}var TS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wu=TS&&typeof module=="object"&&module&&!module.nodeType&&module,iY=wu&&wu.exports===TS,Ap=iY&&mS.process,ax=function(){try{var e=wu&&wu.require&&wu.require("util").types;return e||Ap&&Ap.binding&&Ap.binding("util")}catch{}}(),sx=ax&&ax.isTypedArray,Um=sx?oY(sx):rY;function _g(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var aY=Object.prototype,sY=aY.hasOwnProperty;function lY(e,t,n){var r=e[t];(!(sY.call(e,t)&&Ju(r,n))||n===void 0&&!(t in e))&&Hm(e,t,n)}function cY(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=void 0;u===void 0&&(u=e[l]),o?Hm(n,l,u):lY(n,l,u)}return n}function uY(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dY=9007199254740991,fY=/^(?:0|[1-9]\d*)$/;function Vm(e,t){var n=typeof e;return t=t??dY,!!t&&(n=="number"||n!="symbol"&&fY.test(e))&&e>-1&&e%1==0&&e<t}var hY=Object.prototype,pY=hY.hasOwnProperty;function NS(e,t){var n=so(e),r=!n&&Cf(e),o=!n&&!r&&wf(e),i=!n&&!r&&!o&&Um(e),a=n||r||o||i,l=a?uY(e.length,String):[],u=l.length;for(var p in e)(t||pY.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Vm(p,u)))&&l.push(p);return l}function gY(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var mY=Object.prototype,vY=mY.hasOwnProperty;function yY(e){if(!xo(e))return gY(e);var t=Gm(e),n=[];for(var r in e)r=="constructor"&&(t||!vY.call(e,r))||n.push(r);return n}function SS(e){return vc(e)?NS(e,!0):yY(e)}function bY(e){return cY(e,SS(e))}function _Y(e,t,n,r,o,i,a){var l=_g(e,n),u=_g(t,n),p=a.get(u);if(p){bg(e,n,p);return}var m=i?i(l,u,n+"",e,t,a):void 0,_=m===void 0;if(_){var C=so(u),b=!C&&wf(u),v=!C&&!b&&Um(u);m=u,C||b||v?so(l)?m=l:C9(l)?m=g9(l):b?(_=!1,m=f9(u)):v?(_=!1,m=p9(u)):m=[]:D9(u)||Cf(u)?(m=l,Cf(l)?m=bY(l):(!xo(l)||zm(l))&&(m=y9(u))):_=!1}_&&(a.set(u,m),o(m,u,r,i,a),a.delete(u)),bg(e,n,m)}function OS(e,t,n,r,o){e!==t&&yS(t,function(i,a){if(o||(o=new xi),xo(i))_Y(e,t,a,n,OS,r,o);else{var l=r?r(_g(e,a),i,a+"",e,t,o):void 0;l===void 0&&(l=i),bg(e,a,l)}},SS)}function nh(e){return e}function xY(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)}var lx=Math.max;function EY(e,t,n){return t=lx(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=lx(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),xY(e,this,l)}}function CY(e){return function(){return e}}var wY=xf?function(e,t){return xf(e,"toString",{configurable:!0,enumerable:!1,value:CY(t),writable:!0})}:nh,TY=800,NY=16,SY=Date.now;function OY(e){var t=0,n=0;return function(){var r=SY(),o=NY-(r-n);if(n=r,o>0){if(++t>=TY)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var AY=OY(wY);function RY(e,t){return AY(EY(e,t,nh),e+"")}function $Y(e,t,n){if(!xo(n))return!1;var r=typeof t;return(r=="number"?vc(n)&&Vm(t,n.length):r=="string"&&t in n)?Ju(n[t],e):!1}function DY(e){return RY(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&$Y(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,i)}return t})}var Kr=DY(function(e,t,n){OS(e,t,n)}),Xu=function(t){var n=t.zDepth,r=t.radius,o=t.background,i=t.children,a=t.styles,l=a===void 0?{}:a,u=Wt(Kr({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},l),{"zDepth-1":n===1});return H.createElement("div",{style:u.wrap},H.createElement("div",{style:u.bg}),H.createElement("div",{style:u.content},i))};Xu.propTypes={background:ct.string,zDepth:ct.oneOf([0,1,2,3,4,5]),radius:ct.number,styles:ct.object};Xu.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var Rp=function(){return Jo.Date.now()},kY=/\s/;function MY(e){for(var t=e.length;t--&&kY.test(e.charAt(t)););return t}var PY=/^\s+/;function IY(e){return e&&e.slice(0,MY(e)+1).replace(PY,"")}var LY="[object Symbol]";function rh(e){return typeof e=="symbol"||ja(e)&&As(e)==LY}var cx=NaN,FY=/^[-+]0x[0-9a-f]+$/i,jY=/^0b[01]+$/i,BY=/^0o[0-7]+$/i,WY=parseInt;function ux(e){if(typeof e=="number")return e;if(rh(e))return cx;if(xo(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xo(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IY(e);var n=jY.test(e);return n||BY.test(e)?WY(e.slice(2),n?2:8):FY.test(e)?cx:+e}var zY="Expected a function",HY=Math.max,GY=Math.min;function AS(e,t,n){var r,o,i,a,l,u,p=0,m=!1,_=!1,C=!0;if(typeof e!="function")throw new TypeError(zY);t=ux(t)||0,xo(n)&&(m=!!n.leading,_="maxWait"in n,i=_?HY(ux(n.maxWait)||0,t):i,C="trailing"in n?!!n.trailing:C);function b(V){var J=r,oe=o;return r=o=void 0,p=V,a=e.apply(oe,J),a}function v(V){return p=V,l=setTimeout(O,t),m?b(V):a}function y(V){var J=V-u,oe=V-p,Z=t-J;return _?GY(Z,i-oe):Z}function T(V){var J=V-u,oe=V-p;return u===void 0||J>=t||J<0||_&&oe>=i}function O(){var V=Rp();if(T(V))return A(V);l=setTimeout(O,y(V))}function A(V){return l=void 0,C&&r?b(V):(r=o=void 0,a)}function D(){l!==void 0&&clearTimeout(l),p=0,r=u=o=l=void 0}function P(){return l===void 0?a:A(Rp())}function M(){var V=Rp(),J=T(V);if(r=arguments,o=this,u=V,J){if(l===void 0)return v(u);if(_)return clearTimeout(l),l=setTimeout(O,t),b(u)}return l===void 0&&(l=setTimeout(O,t)),a}return M.cancel=D,M.flush=P,M}var KY="Expected a function";function UY(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(KY);return xo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),AS(e,t,{leading:r,maxWait:t,trailing:o})}var VY=function(t,n,r){var o=r.getBoundingClientRect(),i=o.width,a=o.height,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(r.getBoundingClientRect().left+window.pageXOffset),m=u-(r.getBoundingClientRect().top+window.pageYOffset);p<0?p=0:p>i&&(p=i),m<0?m=0:m>a&&(m=a);var _=p/i,C=1-m/a;return{h:n.h,s:_,v:C,a:n.a,source:"hsv"}},YY=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function qY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZY(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function JY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var oh=function(e){JY(t,e);function t(n){qY(this,t);var r=ZY(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.handleChange=function(o){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,VY(o,r.props.hsl,r.container),o)},r.handleMouseDown=function(o){r.handleChange(o);var i=r.getContainerRenderWindow();i.addEventListener("mousemove",r.handleChange),i.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=UY(function(o,i,a){o(i,a)},50),r}return YY(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,o=window;!o.document.contains(r)&&o.parent!==o;)o=o.parent;return o}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.style||{},i=o.color,a=o.white,l=o.black,u=o.pointer,p=o.circle,m=Wt({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
271
|
-
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:a,black:l,pointer:u,circle:p}},{custom:!!this.props.style});return H.createElement("div",{style:m.color,ref:function(C){return r.container=C},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("style",null,`
|
|
272
|
-
.saturation-white {
|
|
273
|
-
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
274
|
-
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
275
|
-
}
|
|
276
|
-
.saturation-black {
|
|
277
|
-
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
278
|
-
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
279
|
-
}
|
|
280
|
-
`),H.createElement("div",{style:m.white,className:"saturation-white"},H.createElement("div",{style:m.black,className:"saturation-black"}),H.createElement("div",{style:m.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:m.circle}))))}}]),t}(H.PureComponent||H.Component);function XY(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var QY=_S(Object.keys,Object),e7=Object.prototype,t7=e7.hasOwnProperty;function n7(e){if(!Gm(e))return QY(e);var t=[];for(var n in Object(e))t7.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ym(e){return vc(e)?NS(e):n7(e)}function r7(e,t){return e&&yS(e,t,Ym)}function o7(e,t){return function(n,r){if(n==null)return n;if(!vc(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var RS=o7(r7);function i7(e){return typeof e=="function"?e:nh}function a7(e,t){var n=so(e)?XY:RS;return n(e,i7(t))}function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}var s7=/^\s+/,l7=/\s+$/;function Ot(e,t){if(e=e||"",t=t||{},e instanceof Ot)return e;if(!(this instanceof Ot))return new Ot(e,t);var n=c7(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Ot.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,i,a,l;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(t){return this._a=$S(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=fx(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=fx(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=dx(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=dx(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return hx(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return h7(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Dn(this._r,255)*100)+"%",g:Math.round(Dn(this._g,255)*100)+"%",b:Math.round(Dn(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Dn(this._r,255)*100)+"%, "+Math.round(Dn(this._g,255)*100)+"%, "+Math.round(Dn(this._b,255)*100)+"%)":"rgba("+Math.round(Dn(this._r,255)*100)+"%, "+Math.round(Dn(this._g,255)*100)+"%, "+Math.round(Dn(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:T7[hx(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+px(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var i=Ot(t);r="#"+px(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,i=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Ot(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v7,arguments)},brighten:function(){return this._applyModification(y7,arguments)},darken:function(){return this._applyModification(b7,arguments)},desaturate:function(){return this._applyModification(p7,arguments)},saturate:function(){return this._applyModification(g7,arguments)},greyscale:function(){return this._applyModification(m7,arguments)},spin:function(){return this._applyModification(_7,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(C7,arguments)},complement:function(){return this._applyCombination(x7,arguments)},monochromatic:function(){return this._applyCombination(w7,arguments)},splitcomplement:function(){return this._applyCombination(E7,arguments)},triad:function(){return this._applyCombination(gx,[3])},tetrad:function(){return this._applyCombination(gx,[4])}};Ot.fromRatio=function(e,t){if(Tf(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=yu(e[r]));e=n}return Ot(e,t)};function c7(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=A7(e)),Tf(e)=="object"&&(Ui(e.r)&&Ui(e.g)&&Ui(e.b)?(t=u7(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ui(e.h)&&Ui(e.s)&&Ui(e.v)?(r=yu(e.s),o=yu(e.v),t=f7(e.h,r,o),a=!0,l="hsv"):Ui(e.h)&&Ui(e.s)&&Ui(e.l)&&(r=yu(e.s),i=yu(e.l),t=d7(e.h,r,i),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=$S(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function u7(e,t,n){return{r:Dn(e,255)*255,g:Dn(t,255)*255,b:Dn(n,255)*255}}function dx(e,t,n){e=Dn(e,255),t=Dn(t,255),n=Dn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=(r+o)/2;if(r==o)i=a=0;else{var u=r-o;switch(a=l>.5?u/(2-r-o):u/(r+o),r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,l}}function d7(e,t,n){var r,o,i;e=Dn(e,360),t=Dn(t,100),n=Dn(n,100);function a(p,m,_){return _<0&&(_+=1),_>1&&(_-=1),_<1/6?p+(m-p)*6*_:_<1/2?m:_<2/3?p+(m-p)*(2/3-_)*6:p}if(t===0)r=o=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=a(u,l,e+1/3),o=a(u,l,e),i=a(u,l,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function fx(e,t,n){e=Dn(e,255),t=Dn(t,255),n=Dn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=r,u=r-o;if(a=r===0?0:u/r,r==o)i=0;else{switch(r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,v:l}}function f7(e,t,n){e=Dn(e,360)*6,t=Dn(t,100),n=Dn(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),l=n*(1-(1-o)*t),u=r%6,p=[n,a,i,i,l,n][u],m=[l,n,n,a,i,i][u],_=[i,i,l,n,n,a][u];return{r:p*255,g:m*255,b:_*255}}function hx(e,t,n,r){var o=[zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function h7(e,t,n,r,o){var i=[zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16)),zo(DS(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function px(e,t,n,r){var o=[zo(DS(r)),zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16))];return o.join("")}Ot.equals=function(e,t){return!e||!t?!1:Ot(e).toRgbString()==Ot(t).toRgbString()};Ot.random=function(){return Ot.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function p7(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.s-=t/100,n.s=ih(n.s),Ot(n)}function g7(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.s+=t/100,n.s=ih(n.s),Ot(n)}function m7(e){return Ot(e).desaturate(100)}function v7(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.l+=t/100,n.l=ih(n.l),Ot(n)}function y7(e,t){t=t===0?0:t||10;var n=Ot(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),Ot(n)}function b7(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.l-=t/100,n.l=ih(n.l),Ot(n)}function _7(e,t){var n=Ot(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Ot(n)}function x7(e){var t=Ot(e).toHsl();return t.h=(t.h+180)%360,Ot(t)}function gx(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Ot(e).toHsl(),r=[Ot(e)],o=360/t,i=1;i<t;i++)r.push(Ot({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function E7(e){var t=Ot(e).toHsl(),n=t.h;return[Ot(e),Ot({h:(n+72)%360,s:t.s,l:t.l}),Ot({h:(n+216)%360,s:t.s,l:t.l})]}function C7(e,t,n){t=t||6,n=n||30;var r=Ot(e).toHsl(),o=360/n,i=[Ot(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(Ot(r));return i}function w7(e,t){t=t||6;for(var n=Ot(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],l=1/t;t--;)a.push(Ot({h:r,s:o,v:i})),i=(i+l)%1;return a}Ot.mix=function(e,t,n){n=n===0?0:n||50;var r=Ot(e).toRgb(),o=Ot(t).toRgb(),i=n/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return Ot(a)};Ot.readability=function(e,t){var n=Ot(e),r=Ot(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};Ot.isReadable=function(e,t,n){var r=Ot.readability(e,t),o,i;switch(i=!1,o=R7(n),o.level+o.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i};Ot.mostReadable=function(e,t,n){var r=null,o=0,i,a,l,u;n=n||{},a=n.includeFallbackColors,l=n.level,u=n.size;for(var p=0;p<t.length;p++)i=Ot.readability(e,t[p]),i>o&&(o=i,r=Ot(t[p]));return Ot.isReadable(e,r,{level:l,size:u})||!a?r:(n.includeFallbackColors=!1,Ot.mostReadable(e,["#fff","#000"],n))};var xg=Ot.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T7=Ot.hexNames=N7(xg);function N7(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function $S(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Dn(e,t){S7(e)&&(e="100%");var n=O7(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function ih(e){return Math.min(1,Math.max(0,e))}function to(e){return parseInt(e,16)}function S7(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function O7(e){return typeof e=="string"&&e.indexOf("%")!=-1}function zo(e){return e.length==1?"0"+e:""+e}function yu(e){return e<=1&&(e=e*100+"%"),e}function DS(e){return Math.round(parseFloat(e)*255).toString(16)}function mx(e){return to(e)/255}var jo=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ui(e){return!!jo.CSS_UNIT.exec(e)}function A7(e){e=e.replace(s7,"").replace(l7,"").toLowerCase();var t=!1;if(xg[e])e=xg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=jo.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=jo.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=jo.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=jo.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=jo.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=jo.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=jo.hex8.exec(e))?{r:to(n[1]),g:to(n[2]),b:to(n[3]),a:mx(n[4]),format:t?"name":"hex8"}:(n=jo.hex6.exec(e))?{r:to(n[1]),g:to(n[2]),b:to(n[3]),format:t?"name":"hex"}:(n=jo.hex4.exec(e))?{r:to(n[1]+""+n[1]),g:to(n[2]+""+n[2]),b:to(n[3]+""+n[3]),a:mx(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=jo.hex3.exec(e))?{r:to(n[1]+""+n[1]),g:to(n[2]+""+n[2]),b:to(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function R7(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var vx=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return a7(n,function(i){if(t[i]&&(r+=1,isNaN(t[i])||(o+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(t[i])&&(o+=1)}}),r===o?t:!1},bu=function(t,n){var r=t.hex?Ot(t.hex):Ot(t),o=r.toHsl(),i=r.toHsv(),a=r.toRgb(),l=r.toHex();o.s===0&&(o.h=n||0,i.h=n||0);var u=l==="000000"&&a.a===0;return{hsl:o,hex:u?"transparent":"#"+l,rgb:a,hsv:i,oldHue:t.h||n||o.h,source:t.source}},za=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&Ot(t).isValid()},qm=function(t){if(!t)return"#fff";var n=bu(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},$p=function(t,n){var r=t.replace("°","");return Ot(n+" ("+r+")")._ok},gu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$7=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function D7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k7(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function M7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Ur=function(t){var n=function(r){M7(o,r);function o(i){D7(this,o);var a=k7(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return a.handleChange=function(l,u){var p=vx(l);if(p){var m=bu(l,l.h||a.state.oldHue);a.setState(m),a.props.onChangeComplete&&a.debounce(a.props.onChangeComplete,m,u),a.props.onChange&&a.props.onChange(m,u)}},a.handleSwatchHover=function(l,u){var p=vx(l);if(p){var m=bu(l,l.h||a.state.oldHue);a.props.onSwatchHover&&a.props.onSwatchHover(m,u)}},a.state=gu({},bu(i.color,0)),a.debounce=AS(function(l,u,p){l(u,p)},100),a}return $7(o,[{key:"render",value:function(){var a={};return this.props.onSwatchHover&&(a.onSwatchHover=this.handleSwatchHover),H.createElement(t,gu({},this.props,this.state,{onChange:this.handleChange},a))}}],[{key:"getDerivedStateFromProps",value:function(a,l){return gu({},bu(a.color,l.oldHue))}}]),o}(H.PureComponent||H.Component);return n.propTypes=gu({},t.propTypes),n.defaultProps=gu({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},P7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I7=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function L7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yx(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function F7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var j7=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){F7(o,r);function o(){var i,a,l,u;L7(this,o);for(var p=arguments.length,m=Array(p),_=0;_<p;_++)m[_]=arguments[_];return u=(a=(l=yx(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={focus:!1},l.handleFocus=function(){return l.setState({focus:!0})},l.handleBlur=function(){return l.setState({focus:!1})},a),yx(l,u)}return I7(o,[{key:"render",value:function(){return H.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},H.createElement(t,P7({},this.props,this.state)))}}]),o}(H.Component)},bx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B7=13,W7=function(t){var n=t.color,r=t.style,o=t.onClick,i=o===void 0?function(){}:o,a=t.onHover,l=t.title,u=l===void 0?n:l,p=t.children,m=t.focus,_=t.focusStyle,C=_===void 0?{}:_,b=n==="transparent",v=Wt({default:{swatch:bx({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,m?C:{})}}),y=function(P){return i(n,P)},T=function(P){return P.keyCode===B7&&i(n,P)},O=function(P){return a(n,P)},A={};return a&&(A.onMouseOver=O),H.createElement("div",bx({style:v.swatch,onClick:y,title:u,tabIndex:0,onKeyDown:T},A),p,b&&H.createElement(gc,{borderRadius:v.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const Ds=j7(W7);var z7=function(t){var n=t.direction,r=Wt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return H.createElement("div",{style:r.picker})},H7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kS=function(t){var n=t.rgb,r=t.hsl,o=t.width,i=t.height,a=t.onChange,l=t.direction,u=t.style,p=t.renderers,m=t.pointer,_=t.className,C=_===void 0?"":_,b=Wt({default:{picker:{position:"relative",width:o,height:i},alpha:{radius:"2px",style:u}}});return H.createElement("div",{style:b.picker,className:"alpha-picker "+C},H.createElement(Bm,H7({},b.alpha,{rgb:n,hsl:r,pointer:m,renderers:p,onChange:a,direction:l})))};kS.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:z7};Ur(kS);function MS(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var G7="__lodash_hash_undefined__";function K7(e){return this.__data__.set(e,G7),this}function U7(e){return this.__data__.has(e)}function Nf(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new na;++t<n;)this.add(e[t])}Nf.prototype.add=Nf.prototype.push=K7;Nf.prototype.has=U7;function V7(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 Y7(e,t){return e.has(t)}var q7=1,Z7=2;function PS(e,t,n,r,o,i){var a=n&q7,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var _=-1,C=!0,b=n&Z7?new Nf:void 0;for(i.set(e,t),i.set(t,e);++_<l;){var v=e[_],y=t[_];if(r)var T=a?r(y,v,_,t,e,i):r(v,y,_,e,t,i);if(T!==void 0){if(T)continue;C=!1;break}if(b){if(!V7(t,function(O,A){if(!Y7(b,A)&&(v===O||o(v,O,n,r,i)))return b.push(A)})){C=!1;break}}else if(!(v===y||o(v,y,n,r,i))){C=!1;break}}return i.delete(e),i.delete(t),C}function J7(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function X7(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Q7=1,eq=2,tq="[object Boolean]",nq="[object Date]",rq="[object Error]",oq="[object Map]",iq="[object Number]",aq="[object RegExp]",sq="[object Set]",lq="[object String]",cq="[object Symbol]",uq="[object ArrayBuffer]",dq="[object DataView]",_x=Fa?Fa.prototype:void 0,Dp=_x?_x.valueOf:void 0;function fq(e,t,n,r,o,i,a){switch(n){case dq:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case uq:return!(e.byteLength!=t.byteLength||!i(new Ef(e),new Ef(t)));case tq:case nq:case iq:return Ju(+e,+t);case rq:return e.name==t.name&&e.message==t.message;case aq:case lq:return e==t+"";case oq:var l=J7;case sq:var u=r&Q7;if(l||(l=X7),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=eq,a.set(e,t);var m=PS(l(e),l(t),r,o,i,a);return a.delete(e),m;case cq:if(Dp)return Dp.call(e)==Dp.call(t)}return!1}function hq(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function pq(e,t,n){var r=t(e);return so(e)?r:hq(r,n(e))}function gq(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function mq(){return[]}var vq=Object.prototype,yq=vq.propertyIsEnumerable,xx=Object.getOwnPropertySymbols,bq=xx?function(e){return e==null?[]:(e=Object(e),gq(xx(e),function(t){return yq.call(e,t)}))}:mq;function Ex(e){return pq(e,Ym,bq)}var _q=1,xq=Object.prototype,Eq=xq.hasOwnProperty;function Cq(e,t,n,r,o,i){var a=n&_q,l=Ex(e),u=l.length,p=Ex(t),m=p.length;if(u!=m&&!a)return!1;for(var _=u;_--;){var C=l[_];if(!(a?C in t:Eq.call(t,C)))return!1}var b=i.get(e),v=i.get(t);if(b&&v)return b==t&&v==e;var y=!0;i.set(e,t),i.set(t,e);for(var T=a;++_<u;){C=l[_];var O=e[C],A=t[C];if(r)var D=a?r(A,O,C,t,e,i):r(O,A,C,e,t,i);if(!(D===void 0?O===A||o(O,A,n,r,i):D)){y=!1;break}T||(T=C=="constructor")}if(y&&!T){var P=e.constructor,M=t.constructor;P!=M&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(y=!1)}return i.delete(e),i.delete(t),y}var Eg=$s(Jo,"DataView"),Cg=$s(Jo,"Promise"),wg=$s(Jo,"Set"),Tg=$s(Jo,"WeakMap"),Cx="[object Map]",wq="[object Object]",wx="[object Promise]",Tx="[object Set]",Nx="[object WeakMap]",Sx="[object DataView]",Tq=Rs(Eg),Nq=Rs($u),Sq=Rs(Cg),Oq=Rs(wg),Aq=Rs(Tg),$a=As;(Eg&&$a(new Eg(new ArrayBuffer(1)))!=Sx||$u&&$a(new $u)!=Cx||Cg&&$a(Cg.resolve())!=wx||wg&&$a(new wg)!=Tx||Tg&&$a(new Tg)!=Nx)&&($a=function(e){var t=As(e),n=t==wq?e.constructor:void 0,r=n?Rs(n):"";if(r)switch(r){case Tq:return Sx;case Nq:return Cx;case Sq:return wx;case Oq:return Tx;case Aq:return Nx}return t});var Rq=1,Ox="[object Arguments]",Ax="[object Array]",Vd="[object Object]",$q=Object.prototype,Rx=$q.hasOwnProperty;function Dq(e,t,n,r,o,i){var a=so(e),l=so(t),u=a?Ax:$a(e),p=l?Ax:$a(t);u=u==Ox?Vd:u,p=p==Ox?Vd:p;var m=u==Vd,_=p==Vd,C=u==p;if(C&&wf(e)){if(!wf(t))return!1;a=!0,m=!1}if(C&&!m)return i||(i=new xi),a||Um(e)?PS(e,t,n,r,o,i):fq(e,t,u,n,r,o,i);if(!(n&Rq)){var b=m&&Rx.call(e,"__wrapped__"),v=_&&Rx.call(t,"__wrapped__");if(b||v){var y=b?e.value():e,T=v?t.value():t;return i||(i=new xi),o(y,T,n,r,i)}}return C?(i||(i=new xi),Cq(e,t,n,r,o,i)):!1}function Zm(e,t,n,r,o){return e===t?!0:e==null||t==null||!ja(e)&&!ja(t)?e!==e&&t!==t:Dq(e,t,n,r,Zm,o)}var kq=1,Mq=2;function Pq(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=n[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=n[o];var l=a[0],u=e[l],p=a[1];if(a[2]){if(u===void 0&&!(l in e))return!1}else{var m=new xi,_;if(!(_===void 0?Zm(p,u,kq|Mq,r,m):_))return!1}}return!0}function IS(e){return e===e&&!xo(e)}function Iq(e){for(var t=Ym(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,IS(o)]}return t}function LS(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Lq(e){var t=Iq(e);return t.length==1&&t[0][2]?LS(t[0][0],t[0][1]):function(n){return n===e||Pq(n,e,t)}}var Fq=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jq=/^\w*$/;function Jm(e,t){if(so(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||rh(e)?!0:jq.test(e)||!Fq.test(e)||t!=null&&e in Object(t)}var Bq="Expected a function";function Xm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Bq);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Xm.Cache||na),n}Xm.Cache=na;var Wq=500;function zq(e){var t=Xm(e,function(r){return n.size===Wq&&n.clear(),r}),n=t.cache;return t}var Hq=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gq=/\\(\\)?/g,Kq=zq(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Hq,function(n,r,o,i){t.push(o?i.replace(Gq,"$1"):r||n)}),t}),Uq=1/0,$x=Fa?Fa.prototype:void 0,Dx=$x?$x.toString:void 0;function FS(e){if(typeof e=="string")return e;if(so(e))return MS(e,FS)+"";if(rh(e))return Dx?Dx.call(e):"";var t=e+"";return t=="0"&&1/e==-Uq?"-0":t}function Vq(e){return e==null?"":FS(e)}function jS(e,t){return so(e)?e:Jm(e,t)?[e]:Kq(Vq(e))}var Yq=1/0;function ah(e){if(typeof e=="string"||rh(e))return e;var t=e+"";return t=="0"&&1/e==-Yq?"-0":t}function BS(e,t){t=jS(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ah(t[n++])];return n&&n==r?e:void 0}function qq(e,t,n){var r=e==null?void 0:BS(e,t);return r===void 0?n:r}function Zq(e,t){return e!=null&&t in Object(e)}function Jq(e,t,n){t=jS(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=ah(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&Km(o)&&Vm(a,o)&&(so(e)||Cf(e)))}function Xq(e,t){return e!=null&&Jq(e,t,Zq)}var Qq=1,eZ=2;function tZ(e,t){return Jm(e)&&IS(t)?LS(ah(e),t):function(n){var r=qq(n,e);return r===void 0&&r===t?Xq(n,e):Zm(t,r,Qq|eZ)}}function nZ(e){return function(t){return t==null?void 0:t[e]}}function rZ(e){return function(t){return BS(t,e)}}function oZ(e){return Jm(e)?nZ(ah(e)):rZ(e)}function iZ(e){return typeof e=="function"?e:e==null?nh:typeof e=="object"?so(e)?tZ(e[0],e[1]):Lq(e):oZ(e)}function aZ(e,t){var n=-1,r=vc(e)?Array(e.length):[];return RS(e,function(o,i,a){r[++n]=t(o,i,a)}),r}function ks(e,t){var n=so(e)?MS:aZ;return n(e,iZ(t))}var sZ=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,i=Wt({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return H.createElement("div",{style:i.swatches},ks(n,function(a){return H.createElement(Ds,{key:a,color:a,style:i.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+a}})}),H.createElement("div",{style:i.clear}))},Qm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,m=t.className,_=m===void 0?"":m,C=o==="transparent",b=function(T,O){za(T)&&n({hex:T,source:"hex"},O)},v=Wt(Kr({default:{card:{width:a,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:qm(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},p),{"hide-triangle":l==="hide"});return H.createElement("div",{style:v.card,className:"block-picker "+_},H.createElement("div",{style:v.triangle}),H.createElement("div",{style:v.head},C&&H.createElement(gc,{borderRadius:"6px 6px 0 0"}),H.createElement("div",{style:v.label},o)),H.createElement("div",{style:v.body},H.createElement(sZ,{colors:i,onClick:b,onSwatchHover:r}),H.createElement(en,{style:{input:v.input},value:o,onChange:b})))};Qm.propTypes={width:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.string),triangle:ct.oneOf(["top","hide"]),styles:ct.object};Qm.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Ur(Qm);var bl={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},_l={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},xl={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},El={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Cl={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},wl={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Tl={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Nl={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},Sl={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},_u={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Ol={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},Al={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Rl={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},$l={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Dl={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},kl={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ml={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Pl={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},WS=function(t){var n=t.color,r=t.onClick,o=t.onSwatchHover,i=t.hover,a=t.active,l=t.circleSize,u=t.circleSpacing,p=Wt({default:{swatch:{width:l,height:l,marginRight:u,marginBottom:u,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(l/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:i,active:a});return H.createElement("div",{style:p.swatch},H.createElement(Ds,{style:p.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:p.Swatch.boxShadow+", 0 0 5px "+n}}))};WS.defaultProps={circleSize:28,circleSpacing:14};const lZ=jm(WS);var ev=function(t){var n=t.width,r=t.onChange,o=t.onSwatchHover,i=t.colors,a=t.hex,l=t.circleSize,u=t.styles,p=u===void 0?{}:u,m=t.circleSpacing,_=t.className,C=_===void 0?"":_,b=Wt(Kr({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-m,marginBottom:-m}}},p)),v=function(T,O){return r({hex:T,source:"hex"},O)};return H.createElement("div",{style:b.card,className:"circle-picker "+C},ks(i,function(y){return H.createElement(lZ,{key:y,color:y,onClick:v,onSwatchHover:o,active:a===y.toLowerCase(),circleSize:l,circleSpacing:m})}))};ev.propTypes={width:ct.oneOfType([ct.string,ct.number]),circleSize:ct.number,circleSpacing:ct.number,styles:ct.object};ev.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[bl[500],_l[500],xl[500],El[500],Cl[500],wl[500],Tl[500],Nl[500],Sl[500],_u[500],Ol[500],Al[500],Rl[500],$l[500],Dl[500],kl[500],Ml[500],Pl[500]],styles:{}};Ur(ev);function kx(e){return e===void 0}var zS={};Object.defineProperty(zS,"__esModule",{value:!0});var Mx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cZ=H,Px=uZ(cZ);function uZ(e){return e&&e.__esModule?e:{default:e}}function dZ(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Yd=24,fZ=zS.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Yd:r,i=e.height,a=i===void 0?Yd:i,l=e.style,u=l===void 0?{}:l,p=dZ(e,["fill","width","height","style"]);return Px.default.createElement("svg",Mx({viewBox:"0 0 "+Yd+" "+Yd,style:Mx({fill:n,width:o,height:a},u)},p),Px.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},hZ=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function pZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gZ(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function mZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var HS=function(e){mZ(t,e);function t(n){pZ(this,t);var r=gZ(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(o,i){o.hex?za(o.hex)&&r.props.onChange({hex:o.hex,source:"hex"},i):o.r||o.g||o.b?r.props.onChange({r:o.r||r.props.rgb.r,g:o.g||r.props.rgb.g,b:o.b||r.props.rgb.b,source:"rgb"},i):o.a?(o.a<0?o.a=0:o.a>1&&(o.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},i)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),r.props.onChange({h:o.h||r.props.hsl.h,s:Number(kx(o.s)?r.props.hsl.s:o.s),l:Number(kx(o.l)?r.props.hsl.l:o.l),source:"hsl"},i))},r.showHighlight=function(o){o.currentTarget.style.background="#eee"},r.hideHighlight=function(o){o.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return hZ(t,[{key:"render",value:function(){var r=this,o=Wt({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),H.createElement("div",{style:o.alpha},H.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),H.createElement("div",{style:o.alpha},H.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),H.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,H.createElement("div",{style:o.toggle},H.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},H.createElement(fZ,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(H.Component);HS.defaultProps={view:"hex"};var Ix=function(){var t=Wt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return H.createElement("div",{style:t.picker})},vZ=function(){var t=Wt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return H.createElement("div",{style:t.picker})},tv=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,l=t.hsv,u=t.hex,p=t.renderers,m=t.styles,_=m===void 0?{}:m,C=t.className,b=C===void 0?"":C,v=t.defaultView,y=Wt(Kr({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},_),{disableAlpha:o});return H.createElement("div",{style:y.picker,className:"chrome-picker "+b},H.createElement("div",{style:y.saturation},H.createElement(oh,{style:y.Saturation,hsl:a,hsv:l,pointer:vZ,onChange:r})),H.createElement("div",{style:y.body},H.createElement("div",{style:y.controls,className:"flexbox-fix"},H.createElement("div",{style:y.color},H.createElement("div",{style:y.swatch},H.createElement("div",{style:y.active}),H.createElement(gc,{renderers:p}))),H.createElement("div",{style:y.toggles},H.createElement("div",{style:y.hue},H.createElement(mc,{style:y.Hue,hsl:a,pointer:Ix,onChange:r})),H.createElement("div",{style:y.alpha},H.createElement(Bm,{style:y.Alpha,rgb:i,hsl:a,pointer:Ix,renderers:p,onChange:r})))),H.createElement(HS,{rgb:i,hsl:a,hex:u,view:v,onChange:r,disableAlpha:o})))};tv.propTypes={width:ct.oneOfType([ct.string,ct.number]),disableAlpha:ct.bool,styles:ct.object,defaultView:ct.oneOf(["hex","rgb","hsl"])};tv.defaultProps={width:225,disableAlpha:!1,styles:{}};Ur(tv);var yZ=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=Wt({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:qm(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return H.createElement(Ds,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},H.createElement("div",{style:l.dot}))},bZ=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=Wt({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(u,p){u.r||u.g||u.b?o({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,source:"rgb"},p):o({hex:u.hex,source:"hex"},p)};return H.createElement("div",{style:i.fields,className:"flexbox-fix"},H.createElement("div",{style:i.active}),H.createElement(en,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},nv=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,l=t.styles,u=l===void 0?{}:l,p=t.className,m=p===void 0?"":p,_=Wt(Kr({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},u)),C=function(v,y){v.hex?za(v.hex)&&n({hex:v.hex,source:"hex"},y):n(v,y)};return H.createElement(Xu,{style:_.Compact,styles:u},H.createElement("div",{style:_.compact,className:"compact-picker "+m},H.createElement("div",null,ks(o,function(b){return H.createElement(yZ,{key:b,color:b,active:b.toLowerCase()===i,onClick:C,onSwatchHover:r})}),H.createElement("div",{style:_.clear})),H.createElement(bZ,{hex:i,rgb:a,onChange:C})))};nv.propTypes={colors:ct.arrayOf(ct.string),styles:ct.object};nv.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Ur(nv);var _Z=function(t){var n=t.hover,r=t.color,o=t.onClick,i=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=Wt({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return H.createElement("div",{style:l.swatch},H.createElement(Ds,{color:r,onClick:o,onHover:i,focusStyle:a}))};const xZ=jm(_Z);var rv=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,l=t.styles,u=l===void 0?{}:l,p=t.className,m=p===void 0?"":p,_=Wt(Kr({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},u),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),C=function(v,y){return o({hex:v,source:"hex"},y)};return H.createElement("div",{style:_.card,className:"github-picker "+m},H.createElement("div",{style:_.triangleShadow}),H.createElement("div",{style:_.triangle}),ks(r,function(b){return H.createElement(xZ,{color:b,key:b,onClick:C,onSwatchHover:i})}))};rv.propTypes={width:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.string),triangle:ct.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:ct.object};rv.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Ur(rv);var EZ=function(t){var n=t.direction,r=Wt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return H.createElement("div",{style:r.picker})},CZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ov=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.hsl,a=t.direction,l=t.pointer,u=t.styles,p=u===void 0?{}:u,m=t.className,_=m===void 0?"":m,C=Wt(Kr({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},p)),b=function(y){return o({a:1,h:y.h,l:.5,s:1})};return H.createElement("div",{style:C.picker,className:"hue-picker "+_},H.createElement(mc,CZ({},C.hue,{hsl:i,pointer:l,onChange:b,direction:a})))};ov.propTypes={styles:ct.object};ov.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:EZ,styles:{}};Ur(ov);var wZ=function(t){var n=t.onChange,r=t.hex,o=t.rgb,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=Wt(Kr({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},a)),m=function(C,b){C.hex?za(C.hex)&&n({hex:C.hex,source:"hex"},b):(C.r||C.g||C.b)&&n({r:C.r||o.r,g:C.g||o.g,b:C.b||o.b,source:"rgb"},b)};return H.createElement(Xu,{styles:a},H.createElement("div",{style:p.material,className:"material-picker "+u},H.createElement(en,{style:{wrap:p.HEXwrap,input:p.HEXinput,label:p.HEXlabel},label:"hex",value:r,onChange:m}),H.createElement("div",{style:p.split,className:"flexbox-fix"},H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"r",value:o.r,onChange:m})),H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"g",value:o.g,onChange:m})),H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"b",value:o.b,onChange:m})))))};Ur(wZ);var TZ=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,i=t.hex,a=Wt({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),l=function(p,m){p["#"]?za(p["#"])&&n({hex:p["#"],source:"hex"},m):p.r||p.g||p.b?n({r:p.r||r.r,g:p.g||r.g,b:p.b||r.b,source:"rgb"},m):(p.h||p.s||p.v)&&n({h:p.h||o.h,s:p.s||o.s,v:p.v||o.v,source:"hsv"},m)};return H.createElement("div",{style:a.fields},H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(o.s*100),onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(o.v*100),onChange:l}),H.createElement("div",{style:a.divider}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:l}),H.createElement("div",{style:a.divider}),H.createElement(en,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:i.replace("#",""),onChange:l}),H.createElement("div",{style:a.fieldSymbols},H.createElement("div",{style:a.symbol},"°"),H.createElement("div",{style:a.symbol},"%"),H.createElement("div",{style:a.symbol},"%")))},NZ=function(t){var n=t.hsl,r=Wt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return H.createElement("div",{style:r.picker})},SZ=function(){var t=Wt({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return H.createElement("div",{style:t.pointer},H.createElement("div",{style:t.left},H.createElement("div",{style:t.leftInside})),H.createElement("div",{style:t.right},H.createElement("div",{style:t.rightInside})))},Lx=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=Wt({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return H.createElement("div",{style:a.button,onClick:n},r||o)},OZ=function(t){var n=t.rgb,r=t.currentColor,o=Wt({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return H.createElement("div",null,H.createElement("div",{style:o.label},"new"),H.createElement("div",{style:o.swatches},H.createElement("div",{style:o.new}),H.createElement("div",{style:o.current})),H.createElement("div",{style:o.label},"current"))},AZ=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function RZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Z(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function DZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var iv=function(e){DZ(t,e);function t(n){RZ(this,t);var r=$Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.state={currentColor:n.hex},r}return AZ(t,[{key:"render",value:function(){var r=this.props,o=r.styles,i=o===void 0?{}:o,a=r.className,l=a===void 0?"":a,u=Wt(Kr({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return H.createElement("div",{style:u.picker,className:"photoshop-picker "+l},H.createElement("div",{style:u.head},this.props.header),H.createElement("div",{style:u.body,className:"flexbox-fix"},H.createElement("div",{style:u.saturation},H.createElement(oh,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:NZ,onChange:this.props.onChange})),H.createElement("div",{style:u.hue},H.createElement(mc,{direction:"vertical",hsl:this.props.hsl,pointer:SZ,onChange:this.props.onChange})),H.createElement("div",{style:u.controls},H.createElement("div",{style:u.top,className:"flexbox-fix"},H.createElement("div",{style:u.previews},H.createElement(OZ,{rgb:this.props.rgb,currentColor:this.state.currentColor})),H.createElement("div",{style:u.actions},H.createElement(Lx,{label:"OK",onClick:this.props.onAccept,active:!0}),H.createElement(Lx,{label:"Cancel",onClick:this.props.onCancel}),H.createElement(TZ,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(H.Component);iv.propTypes={header:ct.string,styles:ct.object};iv.defaultProps={header:"Color Picker",styles:{}};Ur(iv);var kZ=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,l=Wt({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),u=function(m,_){m.hex?za(m.hex)&&n({hex:m.hex,source:"hex"},_):m.r||m.g||m.b?n({r:m.r||r.r,g:m.g||r.g,b:m.b||r.b,a:r.a,source:"rgb"},_):m.a&&(m.a<0?m.a=0:m.a>100&&(m.a=100),m.a/=100,n({h:o.h,s:o.s,l:o.l,a:m.a,source:"rgb"},_))};return H.createElement("div",{style:l.fields,className:"flexbox-fix"},H.createElement("div",{style:l.double},H.createElement(en,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:u})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.alpha},H.createElement(en,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:u,dragLabel:"true",dragMax:"100"})))},MZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GS=function(t){var n=t.colors,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=Wt({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),l=function(p,m){o({hex:p,source:"hex"},m)};return H.createElement("div",{style:a.colors,className:"flexbox-fix"},n.map(function(u){var p=typeof u=="string"?{color:u}:u,m=""+p.color+(p.title||"");return H.createElement("div",{key:m,style:a.swatchWrap},H.createElement(Ds,MZ({},p,{style:a.swatch,onClick:l,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+p.color}})))}))};GS.propTypes={colors:ct.arrayOf(ct.oneOfType([ct.string,ct.shape({color:ct.string,title:ct.string})])).isRequired};var PZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},av=function(t){var n=t.width,r=t.rgb,o=t.hex,i=t.hsv,a=t.hsl,l=t.onChange,u=t.onSwatchHover,p=t.disableAlpha,m=t.presetColors,_=t.renderers,C=t.styles,b=C===void 0?{}:C,v=t.className,y=v===void 0?"":v,T=Wt(Kr({default:PZ({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},b),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},b),{disableAlpha:p});return H.createElement("div",{style:T.picker,className:"sketch-picker "+y},H.createElement("div",{style:T.saturation},H.createElement(oh,{style:T.Saturation,hsl:a,hsv:i,onChange:l})),H.createElement("div",{style:T.controls,className:"flexbox-fix"},H.createElement("div",{style:T.sliders},H.createElement("div",{style:T.hue},H.createElement(mc,{style:T.Hue,hsl:a,onChange:l})),H.createElement("div",{style:T.alpha},H.createElement(Bm,{style:T.Alpha,rgb:r,hsl:a,renderers:_,onChange:l}))),H.createElement("div",{style:T.color},H.createElement(gc,null),H.createElement("div",{style:T.activeColor}))),H.createElement(kZ,{rgb:r,hsl:a,hex:o,onChange:l,disableAlpha:p}),H.createElement(GS,{colors:m,onClick:l,onSwatchHover:u}))};av.propTypes={disableAlpha:ct.bool,width:ct.oneOfType([ct.string,ct.number]),styles:ct.object};av.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const IZ=Ur(av);var mu=function(t){var n=t.hsl,r=t.offset,o=t.onClick,i=o===void 0?function(){}:o,a=t.active,l=t.first,u=t.last,p=Wt({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:a,first:l,last:u}),m=function(C){return i({h:n.h,s:.5,l:r,source:"hsl"},C)};return H.createElement("div",{style:p.swatch,onClick:m})},LZ=function(t){var n=t.onClick,r=t.hsl,o=Wt({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return H.createElement("div",{style:o.swatches},H.createElement("div",{style:o.swatch},H.createElement(mu,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<i&&Math.abs(r.s-.5)<i,onClick:n,first:!0})),H.createElement("div",{style:o.swatch},H.createElement(mu,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(mu,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(mu,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(mu,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<i&&Math.abs(r.s-.5)<i,onClick:n,last:!0})),H.createElement("div",{style:o.clear}))},FZ=function(){var t=Wt({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return H.createElement("div",{style:t.picker})},sv=function(t){var n=t.hsl,r=t.onChange,o=t.pointer,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=Wt(Kr({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return H.createElement("div",{style:p.wrap||{},className:"slider-picker "+u},H.createElement("div",{style:p.hue},H.createElement(mc,{style:p.Hue,hsl:n,pointer:o,onChange:r})),H.createElement("div",{style:p.swatches},H.createElement(LZ,{hsl:n,onClick:r})))};sv.propTypes={styles:ct.object};sv.defaultProps={pointer:FZ,styles:{}};Ur(sv);var KS={};Object.defineProperty(KS,"__esModule",{value:!0});var Fx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jZ=H,jx=BZ(jZ);function BZ(e){return e&&e.__esModule?e:{default:e}}function WZ(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var qd=24,zZ=KS.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?qd:r,i=e.height,a=i===void 0?qd:i,l=e.style,u=l===void 0?{}:l,p=WZ(e,["fill","width","height","style"]);return jx.default.createElement("svg",Fx({viewBox:"0 0 "+qd+" "+qd,style:Fx({fill:n,width:o,height:a},u)},p),jx.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},HZ=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.first,l=t.last,u=t.active,p=Wt({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:qm(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:u,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return H.createElement(Ds,{color:n,style:p.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},H.createElement("div",{style:p.check},H.createElement(zZ,null)))},GZ=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=Wt({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return H.createElement("div",{style:a.group},ks(o,function(l,u){return H.createElement(HZ,{key:l,color:l,active:l.toLowerCase()===i,first:u===0,last:u===o.length-1,onClick:n,onSwatchHover:r})}))},lv=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,l=t.hex,u=t.styles,p=u===void 0?{}:u,m=t.className,_=m===void 0?"":m,C=Wt(Kr({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},p)),b=function(y,T){return o({hex:y,source:"hex"},T)};return H.createElement("div",{style:C.picker,className:"swatches-picker "+_},H.createElement(Xu,null,H.createElement("div",{style:C.overflow},H.createElement("div",{style:C.body},ks(a,function(v){return H.createElement(GZ,{key:v.toString(),group:v,active:l,onClick:b,onSwatchHover:i})}),H.createElement("div",{style:C.clear})))))};lv.propTypes={width:ct.oneOfType([ct.string,ct.number]),height:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.arrayOf(ct.string)),styles:ct.object};lv.defaultProps={width:320,height:240,colors:[[bl[900],bl[700],bl[500],bl[300],bl[100]],[_l[900],_l[700],_l[500],_l[300],_l[100]],[xl[900],xl[700],xl[500],xl[300],xl[100]],[El[900],El[700],El[500],El[300],El[100]],[Cl[900],Cl[700],Cl[500],Cl[300],Cl[100]],[wl[900],wl[700],wl[500],wl[300],wl[100]],[Tl[900],Tl[700],Tl[500],Tl[300],Tl[100]],[Nl[900],Nl[700],Nl[500],Nl[300],Nl[100]],[Sl[900],Sl[700],Sl[500],Sl[300],Sl[100]],["#194D33",_u[700],_u[500],_u[300],_u[100]],[Ol[900],Ol[700],Ol[500],Ol[300],Ol[100]],[Al[900],Al[700],Al[500],Al[300],Al[100]],[Rl[900],Rl[700],Rl[500],Rl[300],Rl[100]],[$l[900],$l[700],$l[500],$l[300],$l[100]],[Dl[900],Dl[700],Dl[500],Dl[300],Dl[100]],[kl[900],kl[700],kl[500],kl[300],kl[100]],[Ml[900],Ml[700],Ml[500],Ml[300],Ml[100]],[Pl[900],Pl[700],Pl[500],Pl[300],Pl[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Ur(lv);var cv=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,m=t.className,_=m===void 0?"":m,C=Wt(Kr({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},p),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),b=function(y,T){za(y)&&n({hex:y,source:"hex"},T)};return H.createElement("div",{style:C.card,className:"twitter-picker "+_},H.createElement("div",{style:C.triangleShadow}),H.createElement("div",{style:C.triangle}),H.createElement("div",{style:C.body},ks(i,function(v,y){return H.createElement(Ds,{key:y,color:v,hex:v,style:C.swatch,onClick:b,onHover:r,focusStyle:{boxShadow:"0 0 4px "+v}})}),H.createElement("div",{style:C.hash},"#"),H.createElement(en,{label:null,style:{input:C.input},value:o.replace("#",""),onChange:b}),H.createElement("div",{style:C.clear})))};cv.propTypes={width:ct.oneOfType([ct.string,ct.number]),triangle:ct.oneOf(["hide","top-left","top-right"]),colors:ct.arrayOf(ct.string),styles:ct.object};cv.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Ur(cv);var uv=function(t){var n=Wt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return H.createElement("div",{style:n.picker})};uv.propTypes={hsl:ct.shape({h:ct.number,s:ct.number,l:ct.number,a:ct.number})};uv.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var dv=function(t){var n=Wt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return H.createElement("div",{style:n.picker})};dv.propTypes={hsl:ct.shape({h:ct.number,s:ct.number,l:ct.number,a:ct.number})};dv.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var KZ=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,l=function(b,v){if(b.hex)za(b.hex)&&n({hex:b.hex,source:"hex"},v);else if(b.rgb){var y=b.rgb.split(",");$p(b.rgb,"rgb")&&n({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},v)}else if(b.hsv){var T=b.hsv.split(",");$p(b.hsv,"hsv")&&(T[2]=T[2].replace("%",""),T[1]=T[1].replace("%",""),T[0]=T[0].replace("°",""),T[1]==1?T[1]=.01:T[2]==1&&(T[2]=.01),n({h:Number(T[0]),s:Number(T[1]),v:Number(T[2]),source:"hsv"},v))}else if(b.hsl){var O=b.hsl.split(",");$p(b.hsl,"hsl")&&(O[2]=O[2].replace("%",""),O[1]=O[1].replace("%",""),O[0]=O[0].replace("°",""),_[1]==1?_[1]=.01:_[2]==1&&(_[2]=.01),n({h:Number(O[0]),s:Number(O[1]),v:Number(O[2]),source:"hsl"},v))}},u=Wt({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),p=r.r+", "+r.g+", "+r.b,m=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",_=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return H.createElement("div",{style:u.wrap,className:"flexbox-fix"},H.createElement("div",{style:u.fields},H.createElement("div",{style:u.double},H.createElement(en,{style:{input:u.input,label:u.label},label:"hex",value:i,onChange:l})),H.createElement("div",{style:u.column},H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"rgb",value:p,onChange:l})),H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsv",value:_,onChange:l})),H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsl",value:m,onChange:l})))))},fv=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,l=t.hex,u=t.header,p=t.styles,m=p===void 0?{}:p,_=t.className,C=_===void 0?"":_,b=Wt(Kr({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},m));return H.createElement("div",{style:b.picker,className:"google-picker "+C},H.createElement("div",{style:b.head},u),H.createElement("div",{style:b.swatch}),H.createElement("div",{style:b.saturation},H.createElement(oh,{hsl:i,hsv:a,pointer:uv,onChange:r})),H.createElement("div",{style:b.body},H.createElement("div",{style:b.controls,className:"flexbox-fix"},H.createElement("div",{style:b.hue},H.createElement(mc,{style:b.Hue,hsl:i,radius:"4px",pointer:dv,onChange:r}))),H.createElement(KZ,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};fv.propTypes={width:ct.oneOfType([ct.string,ct.number]),styles:ct.object,header:ct.string};fv.defaultProps={width:652,styles:{},header:"Color picker"};Ur(fv);const UZ=({field:e,value:t,onChange:n})=>{const[r,o]=H.useState(!1),i=VZ(t);return re.jsx(re.Fragment,{children:re.jsxs(Vt.FieldLabel,{label:e.label||"Label is undefined",className:"ve-mt-2.5",children:[re.jsx("div",{style:i.swatch,onClick:()=>o(a=>!a),children:re.jsx("div",{style:i.color})}),r&&re.jsxs("div",{style:i.popover,children:[re.jsx("div",{style:i.cover,onClick:()=>o(!1)}),re.jsx(IZ,{disableAlpha:!0,color:t,onChange:a=>{n(a.hex)}})]})]})})},VZ=e=>({color:{width:"36px",height:"14px",borderRadius:"2px",background:e},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}),YZ=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([n,r])=>{if("type"in r){const o=Bx(r);o&&(t.objectFields[n]=o)}else{const o={label:r.label,type:"object",objectFields:{}};for(const i in r.styles)o.objectFields[i]=Bx(r.styles[i]);t.objectFields[n]=o}}),t},Bx=e=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return{label:e.label,type:"select",options:e.options};case"color":return{label:e.label,type:"custom",render:UZ}}},qZ=(e,t,n="")=>{const r={};return Object.entries(t.styles).forEach(([o,i])=>{if("type"in i){const a=e==null?void 0:e[`--${i.plugin}-${n}-${o}`];r[o]=Wx(i,a)}else{const a={};for(const l in i.styles){const u=i.styles[l],p=e==null?void 0:e[`--${i.plugin}-${n}-${o}-${l}`];a[l]=Wx(u,p)}r[o]=a}}),r},Wx=(e,t)=>{if(t)if(e.type==="number"){const n=Number.parseInt(t);return isNaN(n)?e.default:n}else return t;else return e.default},ZZ=e=>{var i,a;const{themeConfig:t,themeHistoriesRef:n,onThemeChange:r}=e;if(!n.current)return;if(!t)return re.jsx("div",{children:re.jsx(dg,{children:re.jsx(fg,{children:"Please contact your developer to set up theme management."})})});const o=(a=n.current)==null?void 0:a.histories[(i=n.current)==null?void 0:i.index].data;return re.jsxs("div",{children:[re.jsx(dg,{children:re.jsx(fg,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(t).map(([l,u])=>{const p=YZ(u),m=qZ(o,u,l);return re.jsx(Vt.FieldLabel,{label:p.label??"",className:"theme-field",el:"div",children:re.jsx(Vt.AutoField,{field:p,onChange:_=>r(l,u,_),value:m})},l)})]})},JZ=e=>{var p,m;const{isDevMode:t,setThemeHistories:n,onPublishTheme:r,themeConfig:o,themeHistories:i,clearThemeHistory:a,puckInitialHistory:l}=e,{history:{setHistories:u}}=Vt.usePuck();return H.useEffect(()=>{u((l==null?void 0:l.histories)||[])},[l]),H.useEffect(()=>{const _=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");_&&(_.style.display="none");const C=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");C&&(C.style.display="none")},[]),re.jsxs("header",{className:"puck-header",children:[re.jsxs("div",{className:"header-left",children:[re.jsx(mT,{}),re.jsx(CT,{})]}),re.jsx("div",{className:"header-center"}),re.jsxs("div",{className:"actions",children:[re.jsx(TN,{disabled:((p=i==null?void 0:i.histories)==null?void 0:p.length)===1,onClearLocalChanges:()=>{var _,C,b,v,y,T;a(),o&&Ru((C=(_=i==null?void 0:i.histories)==null?void 0:_[0])==null?void 0:C.data,o),n({histories:[{id:((v=(b=i==null?void 0:i.histories)==null?void 0:b[0])==null?void 0:v.id)??"",data:((T=(y=i==null?void 0:i.histories)==null?void 0:y[0])==null?void 0:T.data)??{}}],index:0})}}),!t&&re.jsx(Vi,{variant:"secondary",disabled:((m=i==null?void 0:i.histories)==null?void 0:m.length)===1,onClick:async()=>{await r()},children:"Publish"})]})]})},kp=new Gr,XZ=({puckConfig:e,puckInitialHistory:t,isLoading:n,templateMetadata:r,publishThemeConfiguration:o,themeConfig:i,saveThemeSaveState:a,themeHistories:l,setThemeHistories:u,clearThemeHistory:p,sendDevThemeSaveStateData:m,buildThemeLocalStorageKey:_})=>{const[C,b]=H.useState(!1),v=H.useRef(l);H.useEffect(()=>{v.current=l},[l]);const y=async()=>{if(kp.logFunc("saveThemeData"),!l)return;const D=l.histories[l.index];o({payload:{saveThemeData:JSON.stringify(D.data)}}),p(),u({histories:[D],index:0})},T=(D,P,M)=>{var oe,Z,U,Q;if(!v.current||!i)return;const V={...(oe=v.current.histories[v.current.index])==null?void 0:oe.data,...v2(M,D,P)},J={histories:[...v.current.histories,{id:S1.v4(),data:V}],index:v.current.histories.length};window.localStorage.setItem(_(),JSON.stringify(J.histories)),r.isDevMode&&!r.devOverride?(kp.logFunc("sendDevThemeSaveStateData"),m({payload:{devThemeSaveStateData:JSON.stringify((Z=J.histories[J.index])==null?void 0:Z.data)}})):(kp.logFunc("saveTheme"),a({payload:{history:JSON.stringify((U=J.histories[J.index])==null?void 0:U.data),hash:(Q=J.histories[J.index])==null?void 0:Q.id}})),Ru(V,i),u(J)},O=async()=>{if(!n&&!C){b(!0);return}},A=H.useCallback(()=>re.jsx(ZZ,{themeHistoriesRef:v,themeConfig:i,onThemeChange:T}),[]);return re.jsx(Tw,{children:re.jsx(Vt.Puck,{config:e,data:{},initialHistory:t,onChange:O,permissions:{drag:!1,duplicate:!1,delete:!1,insert:!1,edit:!1},overrides:{header:()=>re.jsx(JZ,{themeConfig:i,themeHistories:l,onPublishTheme:y,isDevMode:r.isDevMode,setThemeHistories:u,clearThemeHistory:p,puckInitialHistory:t}),actionBar:()=>re.jsx(re.Fragment,{}),components:()=>re.jsx(re.Fragment,{}),fields:A}})})},QZ=()=>{const{sendToParent:e}=Wo("saveThemeSaveState",lr),{sendToParent:t}=Wo("deleteThemeSaveState",lr),{sendToParent:n}=Wo("saveThemeData",lr),{sendToParent:r}=Wo("sendDevThemeSaveStateData",lr);return{saveThemeSaveState:e,deleteThemeSaveState:t,publishThemeConfiguration:n,sendDevThemeSaveStateData:r}},eJ=new Gr,tJ=()=>{const{iFrameLoaded:e}=Hu();H.useEffect(()=>{e({payload:{message:"Theme Editor is loaded"}})},[]);const[t,n]=H.useState(void 0),[r,o]=H.useState(!1);return ka("getThemeSaveState",lr,(i,a)=>{eJ.logData("THEME_SAVE_STATE",a),n(a),o(!0),i({status:"success",payload:{message:"themeSaveState received"}})}),{themeSaveState:t,themeSaveStateFetched:r}},zr=new Gr,nJ=e=>{const{puckConfig:t,templateMetadata:n,visualConfigurationData:r,themeData:o,themeConfig:i}=e,{sendDevThemeSaveStateData:a,saveThemeSaveState:l,publishThemeConfiguration:u,deleteThemeSaveState:p}=QZ(),{themeSaveState:m,themeSaveStateFetched:_}=tJ(),{buildThemeLocalStorageKey:C,clearThemeLocalStorage:b}=AN(n),{buildVisualConfigLocalStorageKey:v}=NN(n),[y,T]=H.useState(),[O,A]=H.useState(!1),[D,P]=H.useState(),[M,V]=H.useState(!1),J=H.useCallback(()=>{if(!n)return;zr.logFunc("loadPuckInitialHistory");const de=window.localStorage.getItem(v());if(n.isDevMode&&de){const pe=JSON.parse(de),te=pe.length-1;te>=0&&(zr.log("Theme Dev Mode - Using layout data from local storage"),T({histories:pe,index:te,appendData:!1}));return}r&&T({histories:[{id:"root",state:{data:r}}],appendData:!1}),A(!0)},[T,A,r]),oe=H.useCallback(()=>{if(!n)return;if(zr.logFunc("loadThemeHistory"),zr.logData("THEME_DATA",o),zr.logData("THEME_SAVE_STATE",m),n.isDevMode&&!n.devOverride){const te=window.localStorage.getItem(C());if(te){zr.log("Theme Dev Mode - Using theme localStorage");const he=JSON.parse(te),Y=he.length-1;P({histories:he,index:Y}),V(!0);return}zr.log("Theme Dev Mode - No localStorage. Using theme data from Content"),o&&P({histories:[{id:"root",data:o}],index:0}),V(!0);return}if(!m){b(),zr.log("Theme Prod Mode - No saveState. Using theme data from Content"),o&&P({histories:[{id:"root",data:o}],index:0}),V(!0);return}const de=window.localStorage.getItem(C());if(!de){zr.log("Theme Prod Mode - No localStorage. Using themeSaveState"),P({histories:o?[{id:"root",data:o},{id:m.hash,data:m.history.data}]:[{id:m.hash,data:m.history.data}],index:o?1:0}),V(!0);return}const pe=JSON.parse(de).findIndex(te=>te.id===(m==null?void 0:m.hash));if(pe!==-1){zr.log("Theme Prod Mode - Using localStorage theme data"),P({histories:JSON.parse(de),index:pe}),V(!0);return}b()},[P,V,b,C]);H.useEffect(()=>{var de;zr.logData("THEME_HISTORIES",D),D&&i&&Ru((de=D.histories[D.index])==null?void 0:de.data,i)},[D,i]),H.useEffect(()=>{_&&(J(),oe())},[n,_,r]),H.useEffect(()=>{y&&zr.logData("PUCK_INITIAL_HISTORY",y)},[y]);const Z=()=>{zr.logFunc("clearHistory"),b(),p()};H.useEffect(()=>{var pe;if(!M)return;const de=(pe=D==null?void 0:D.histories[D.index])==null?void 0:pe.data;zr.logFunc("sendDevThemeSaveStateData useEffect"),a({payload:{devThemeSaveStateData:JSON.stringify(de)}})},[M,D,n]);const U=!O||!M||!_,Q=60+(O+M+_)*13.33;return U?re.jsx(pm,{progress:Q}):re.jsx(XZ,{puckConfig:t,puckInitialHistory:y,isLoading:U,templateMetadata:n,publishThemeConfiguration:u,themeConfig:i,saveThemeSaveState:l,themeHistories:D,setThemeHistories:P,clearThemeHistory:Z,sendDevThemeSaveStateData:a,buildThemeLocalStorageKey:C})},rJ=new Gr,oJ=({document:e,componentRegistry:t,themeConfig:n})=>{e&&rJ.logData("DOCUMENT",e);const[r,o]=H.useState(void 0),[i,a]=H.useState(void 0),[l,u]=H.useState(!1),{templateMetadata:p,puckConfig:m,visualConfigurationData:_,visualConfigurationDataFetched:C,themeData:b,themeDataFetched:v}=NL(t),{pushPageSets:y}=Hu();TL(),H.useEffect(()=>{if(typeof window<"u"){const A=window.location.ancestorOrigins;A.length===0||!A[0].includes("pagescdn")&&!A[0].includes("yext.com")&&!A[0].includes("localhost")?window.location.assign("/404.html"):u(!0)}},[]),H.useEffect(()=>{if(p!=null&&p.isDevMode)try{o(pageSets),a(siteStream)}catch{console.warn("pageSets are not defined")}},[p==null?void 0:p.isDevMode]),H.useEffect(()=>{typeof window<"u"&&(p!=null&&p.isDevMode)&&r&&y({payload:{...r,siteStream:i}})},[p==null?void 0:p.isDevMode,r]);const T=!m||!p||!e||!C||!v,O=60*((!!m+!!p+!!e+C+v)/5);return re.jsxs(re.Fragment,{children:[T?l&&re.jsx(pm,{progress:O}):p.isThemeMode?re.jsx(nJ,{puckConfig:m,templateMetadata:p,visualConfigurationData:_,themeData:b,themeConfig:n}):re.jsx(C2,{puckConfig:m,templateMetadata:p,visualConfigurationData:_,themeData:b,themeConfig:n}),re.jsx(wL,{closeButton:!0,richColors:!0})]})},iJ=()=>{const[e,t]=H.useState();return ka("getEntityDocument",lr,(n,r)=>{t(r),n({status:"success",payload:{message:"getEntityDocument received"}})}),e},Ng=JSON.stringify({root:{},content:[],zones:{}});function aJ(e,t){var m,_,C,b;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:n}=e,r=n==null?void 0:n.siteId,o=n.visualConfigurations??[],i=n.pageLayouts??[],a=(m=n._site)==null?void 0:m.defaultLayouts;let l;for(const v of o)if(v.pageSet===t&&(!r||Number(v.siteId)===r)){l=JSON.parse(Mp(v.data,t));break}if(!l){for(const v of i)if(((_=v.visualConfiguration)==null?void 0:_.pageSet)===t&&(!r||Number(v.visualConfiguration.siteId)===r)){l=JSON.parse(Mp(v.visualConfiguration.data,t));break}}if(!l&&a){for(const v of a)if(((C=v.visualConfiguration)==null?void 0:C.pageSet)===t&&(!r||Number(v.visualConfiguration.siteId)===r)){l=JSON.parse(Mp(v.visualConfiguration.data,t));break}}l||(console.warn(`Unable to find puck data for pageSet: ${t}`),l=JSON.parse(Ng));const u=e;u.document.visualTemplate=l;const p=(b=n._customDataOverrides)==null?void 0:b.pagesTheme;return p&&(u.document._site?u.document._site.pagesTheme=p:u.document._site={pagesTheme:p}),u}function Mp(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Ng;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Ng}return e}const sJ=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if(t[i.plugin]||(t[i.plugin]={}),"default"in i)t[i.plugin][`${n}-${o}`]=`var(--${i.plugin}-${n}-${o})`;else if("styles"in i){const a={};for(const l in i.styles)a[l]=`var(--${i.plugin}-${n}-${o}-${l})`;t[i.plugin][`${n}-${o}`]=a}}}return t},US=(e,t)=>{const n={...t};for(const r in e)if(r in e){const o=e[r],i=n[r];zx(o)&&zx(i)?n[r]=US(o,i):(o&&i&&console.warn(`Both theme.config.ts and tailwind.config.ts provided a value for ${r}. Using the value from theme.config.ts (${i})`),n[r]=i??o)}return n},zx=e=>e!==null&&typeof e=="object",lJ=(e,t)=>{const n=sJ(t);return US(e,n)};exports.AddressComponent=QP;exports.Body=Sg;exports.BodyTextComponent=oI;exports.Button=Sf;exports.CTA=Vg;exports.CTAWrapperComponent=sI;exports.DocumentContext=qg;exports.DocumentProvider=ND;exports.Editor=oJ;exports.EmailsComponent=fI;exports.EntityField=_o;exports.EntityFieldsProvider=nP;exports.FlexContainerComponent=gI;exports.GetDirectionsComponent=nI;exports.GridSectionComponent=_I;exports.Heading=Yg;exports.HeadingTextComponent=EI;exports.HoursCardComponent=TI;exports.HoursStatusComponent=OI;exports.ImageWrapperComponent=kI;exports.Jl=Tu;exports.NumberFieldWithDefaultOption=Hf;exports.PhoneComponent=FI;exports.Section=nc;exports.TextListComponent=zI;exports.YextEntityFieldSelector=Yo;exports.Zl=Jx;exports.applyTheme=y2;exports.bodyVariants=Vx;exports.buttonVariants=qx;exports.headingVariants=MC;exports.lt=an;exports.resolveVisualEditorData=aJ;exports.resolveYextEntityField=Vo;exports.sectionVariants=PC;exports.themeResolver=lJ;exports.useDocument=Eo;exports.useEntityFields=$w;exports.usePlatformBridgeDocument=iJ;exports.usePlatformBridgeEntityFields=tP;
|